/* === Hero illustration fit and zoom === */
.fit-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    transition: transform .25s ease, filter .25s ease;
    cursor: zoom-in;
}

.zoomable:hover img {
    transform: scale(1.03);
    filter: brightness(1.05);
}

/* Lightbox overlay for zoom */
#lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .85);
    z-index: 5000;
    align-items: center;
    justify-content: center;
}

#lightbox.open {
    display: flex;
}

#lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 12px;
    box-shadow: 0 0 40px rgba(0, 0, 0, .6);
}

:root {
    --bg: #0b1220;
    --panel: #0b1224;
    --panel-2: #0d1530;
    --card: rgba(13, 22, 44, .7);
    --muted: #94a3b8;
    --text: #e5e7eb;
    --brand: #7aa2ff;
    --accent: #22c55e;
    --danger: #ef4444;
    --border: #1f2a44;
    --shadow: 0 10px 40px rgba(0, 0, 0, .45);
    --radius: 14px;
}

* {
    box-sizing: border-box
}

html,
body {
    height: 100%
}

body {
    margin: 0;
    /* Single global background that does not repeat or "restart" */
    background: radial-gradient(1920px 1080px at 10% -10%, #142042 0, transparent 60%),
        linear-gradient(180deg, #0a1022 0%, #0b1220 100%);
    background-repeat: no-repeat, no-repeat;
    background-attachment: fixed, fixed;
    /* keep background stationary to avoid seams */
    background-size: 100% 100%, 100% 100%;
    color: var(--text);
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    padding-top: 64px;
    /* offset for fixed header height */
}

a {
    color: inherit;
    text-decoration: none
}

.app-shell {
    min-height: calc(100vh - 64px)
}

/* below header */

/* Top header */
.app-header {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: saturate(130%) blur(8px);
    background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, 0));
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.app-header .brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-weight: 600;
    letter-spacing: .2px
}

.app-header .brand i {
    font-size: 1.1rem;
    color: var(--brand)
}

.app-header .hdr-right {
    display: flex;
    align-items: center;
    gap: .5rem
}

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .35rem .6rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, .03)
}

.user-chip.muted {
    opacity: .6
}

/* clickable login chip */
.user-chip[role=button] {
    cursor: pointer
}

.user-chip[role=button]:hover {
    border-color: #335493;
    background: rgba(255, 255, 255, .06)
}

/* decorative background */
.bg-decor:before,
.bg-decor:after {
    content: "";
    position: fixed;
    filter: blur(60px);
    opacity: .22;
    z-index: -1;
}

.bg-decor:before {
    width: 420px;
    height: 420px;
    left: -120px;
    top: -80px;
    background: radial-gradient(circle at 30% 30%, #7aa2ff 0, transparent 60%)
}

.bg-decor:after {
    width: 520px;
    height: 520px;
    right: -160px;
    bottom: -140px;
    background: radial-gradient(circle at 70% 70%, #22c55e 0, transparent 60%)
}

/* ===================== Landing OnePager (public site) ===================== */
:root {
    --container: 1180px;
}

/* Generic layout helpers */
.section {
    padding: 72px 0;
}

.section .section-title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: .02em;
    color: #eaf2ff;
    margin: 0 0 1rem 0;
}

.section .section-sub {
    color: var(--muted);
    max-width: 760px;
    margin-bottom: 1.6rem;
}

.container-narrow {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 16px;
}

/* Top public nav (reuses .app-header) */
.site-header {
    position: fixed;
    /* keep header always visible */
    top: 0;
    left: 0;
    right: 0;
    z-index: 2000;
    /* higher than any section overlays */
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 20px;
    backdrop-filter: saturate(130%) blur(8px);
    background: linear-gradient(180deg, rgba(9, 13, 26, .85), rgba(9, 13, 26, .65));
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.site-nav a {
    color: #cfe0ff;
    padding: .35rem .6rem;
    border-radius: 8px;
    border: 1px solid transparent;
}

.site-nav a:hover,
.site-nav a.active {
    color: #fff;
    border-color: rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .06);
}

/* Hero */
.hero {
    padding: 80px 0 56px 0;
    position: relative;
    background: transparent;
    /* use global page gradient only */
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    /* subtle top glow that fades to transparent, no hard seam */
    background: radial-gradient(1200px 600px at 10% -10%, rgba(20, 32, 66, .85) 0, rgba(20, 32, 66, 0) 60%);
}

.hero .wrap {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 16px;
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 36px;
    align-items: center;
}

.hero h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.12;
    margin: 0 0 .8rem 0;
    color: #f0f6ff;
}

.hero p.lead {
    font-size: 1.1rem;
    color: #c8d6ff;
}

.hero .cta {
    display: flex;
    gap: .6rem;
    margin-top: 1.2rem;
}

.hero .badge-kicker {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .2rem .55rem;
    border: 1px solid rgba(122, 162, 255, .35);
    background: rgba(122, 162, 255, .12);
    color: #dbeafe;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.hero .illustration {
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(255, 255, 255, .04);
    padding: 12px;
    box-shadow: var(--shadow);
}

.hero .illus-box {
    height: 280px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02));
    display: grid;
    place-items: center;
    color: #9fb2d1;
}

/* Features grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.feature {
    position: relative;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px;
    box-shadow: var(--shadow);
}

.feature-badge {
    position: absolute;
    top: 10px;
    left: 16px;
    padding: .12rem .55rem;
    border-radius: 999px;
    font-size: .7rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    border: 1px solid rgba(34, 197, 94, .45);
    background: rgba(34, 197, 94, .18);
    color: #bbf7d0;
    font-weight: 700;
}

.feature h4 {
    margin: .4rem 0 .25rem 0;
    color: #eaf2ff;
}

.feature p {
    color: var(--muted);
}

.feature i {
    color: var(--brand);
}

/* Pricing */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.price-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.price {
    font-size: 2rem;
    font-weight: 800;
    color: #eaf2ff;
}

.price small {
    font-size: .9rem;
    color: var(--muted);
    font-weight: 600;
}

.price-card ul {
    margin: .25rem 0 0 0;
    padding-left: 1.1rem;
    color: #cfe0ff;
}

.price-card li {
    margin: .15rem 0;
}

.price-card .btn {
    margin-top: auto;
}

/* Forms (Start using + Contact) */
.form-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px;
    box-shadow: var(--shadow);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 16px;
}

.form-grid .full {
    grid-column: 1/-1;
}

.help {
    color: var(--muted);
    font-size: .9rem;
}

/* Availability pill */
.sub-availability {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .15rem .5rem;
    border-radius: 999px;
    font-size: .82rem;
    border: 1px solid var(--border);
}

.sub-availability.ok {
    background: rgba(34, 197, 94, .14);
    color: #86efac;
    border-color: rgba(34, 197, 94, .35);
}

.sub-availability.bad {
    background: rgba(239, 68, 68, .14);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, .35);
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, .03);
    color: var(--muted);
    padding: 26px 0;
}

/* Responsive */
@media (max-width: 992px) {
    .hero .wrap {
        grid-template-columns: 1fr;
    }

    .features-grid,
    .pricing-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 576px) {

    .features-grid,
    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* ==== Autofill fix (Safari/Chrome) for dark inputs ==== */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px rgba(15, 22, 40, 0.85) inset !important;
    -webkit-text-fill-color: #e5e7eb !important;
    caret-color: #e5e7eb !important;
    transition: background-color 9999s ease-in-out 0s !important;
}

/* ======================= Fancy Tables (Admin) ======================= */
.table-beauty {
    border-collapse: separate;
    border-spacing: 0 10px;
    /* row gap to create card-like rows */
    width: 100%;
}

.table-beauty thead th {
    background: transparent !important;
    color: #cbd5e1 !important;
    border: 0 !important;
    font-weight: 600;
    letter-spacing: .02em;
    padding: .4rem .6rem;
}

.table-beauty tbody tr {
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--border);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .20);
}

.table-beauty tbody tr:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, .055);
}

.table-beauty tbody td,
.table-beauty tbody th {
    border: 0 !important;
    padding: .65rem .75rem !important;
}

/* rounded corners per row */
.table-beauty tbody tr td:first-child {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

.table-beauty tbody tr td:last-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

/* compact variant */
.table-compact tbody td {
    padding: .5rem .65rem !important;
}

/* utilities */
.td-muted {
    color: var(--muted);
    font-size: .85rem;
}

.text-truncate-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Buttons inside tables */
.table-beauty .btn.btn-ghost {
    border-color: #2a3b66;
}

.table-beauty .btn.btn-ghost:hover {
    border-color: #3b5aa1;
}

/* Status colors for tenant requests */
.status-pill.st-new {
    background: rgba(59, 130, 246, .15);
    color: #93c5fd;
    border-color: rgba(59, 130, 246, .35);
}

.status-pill.st-in_progress {
    background: rgba(245, 158, 11, .14);
    color: #fcd34d;
    border-color: rgba(245, 158, 11, .35);
}

.status-pill.st-done {
    background: rgba(34, 197, 94, .14);
    color: #86efac;
    border-color: rgba(34, 197, 94, .35);
}

.status-pill.st-rejected {
    background: rgba(239, 68, 68, .14);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, .35);
}

/* sticky header look for long lists */
.table-wrap {
    position: relative;
}

.table-wrap .table-head-sticky thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .03)) !important;
    border-bottom: 1px solid var(--border) !important;
}

/* === Landing forms: full-row inputs + polish === */
.form-card .form-control,
.form-card .form-select,
.form-card textarea {
    width: 100%;
    box-sizing: border-box;
}

/* Desktop: 2 kolumny, ale kolumny kurczą się poprawnie */
@media (min-width: 900px) {
    .form-grid.split-2 {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 16px 20px;
    }
}

/* Input-group na pełną szerokość */
/* Input group alignment (subdomain) */
.form-card .input-group {
    display: flex;
    align-items: stretch;
}

.form-card .input-group .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.form-card .input-group .input-group-text {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: 0 .8rem;
    height: 44px;
    border: 1px solid #2a3b66;
    border-left: 0;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
    background: linear-gradient(180deg, rgba(17, 24, 48, .92), rgba(12, 19, 40, .92));
    color: #cfe0ff;
}

/* === Subdomain input visual width enhancement === */
.form-card .input-group {
    display: flex;
    align-items: stretch;
    width: 100%;
    max-width: 800px;
}

.form-card .input-group .form-control {
    flex: 1 1 auto;
    min-width: 300px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.form-card .input-group .input-group-text {
    flex: 0 0 auto;
    max-width: 140px;
    text-align: center;
}

/* Spójny „glass” i placeholdery */
.form-card {
    backdrop-filter: blur(6px) saturate(120%);
}

.form-card .form-control,
.form-card .form-select {
    background: rgba(12, 19, 40, .86);
    border-color: #25345e;
}

.form-card .form-control::placeholder,
textarea::placeholder {
    color: #9fb3d6;
    opacity: .75;
}

.form-card .form-select:focus,
.form-card .form-control:focus {
    border-color: #3d63a7;
    box-shadow: 0 0 0 .25rem rgba(110, 168, 254, .12);
}

.form-card .btn.btn-ghost {
    border-color: #2a3b66;
    background: rgba(122, 162, 255, .08);
}

.form-card .btn.btn-ghost:hover {
    border-color: #3b5aa1;
    background: rgba(122, 162, 255, .14);
}

/* ================= Bootstrap‑like look & grid (dark) ================= */
/* Grid */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -12px;
    margin-right: -12px;
}

.row.g-3 {
    margin-left: -12px;
    margin-right: -12px;
}

[class^="col-"],
[class*=" col-"] {
    padding-left: 12px;
    padding-right: 12px;
}

.col-12 {
    flex: 0 0 100%;
    max-width: 100%;
}

@media (min-width: 768px) {
    .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Form controls to feel like Bootstrap in dark */
.form-label {
    display: block;
    margin-bottom: .5rem;
    font-weight: 500;
    color: #dbeafe;
}

.form-control,
.form-select,
.input-group-text {
    width: 100%;
    background: rgba(16, 23, 44, .92);
    border: 1px solid #2a3b66;
    border-radius: .5rem;
    /* ~8px */
    color: #e5e7eb;
}

.form-control:focus,
.form-select:focus {
    outline: 0;
    border-color: #4a6ed9;
    box-shadow: 0 0 0 .25rem rgba(74, 110, 217, .2);
}

.input-group {
    display: flex;
    align-items: stretch;
}

.input-group .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group .input-group-text {
    border-left: 0;
    background: rgba(16, 23, 44, .92);
    color: #cbd5e1;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem .8rem;
    border-radius: .5rem;
    border: 1px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}

.btn-primary:hover {
    filter: brightness(1.05);
}

.btn-outline-light {
    background: transparent;
    border-color: rgba(255, 255, 255, .25);
    color: #e5e7eb;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, .06);
}

/* =================== Enhanced form fields (dark, polished) =================== */
.form-card .form-label {
    display: block;
    margin-bottom: .45rem;
    font-weight: 600;
    letter-spacing: .01em;
    color: #e8efff;
}

/* Base look */
.form-card .form-control,
.form-card .form-select {
    height: 44px;
    padding: .55rem .8rem;
    background: linear-gradient(180deg, rgba(17, 24, 48, .92), rgba(12, 19, 40, .92));
    border: 1px solid #2a3b66;
    border-radius: 12px;
    color: #e5e7eb;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .02), 0 1px 0 rgba(0, 0, 0, .18);
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.form-card .form-control:hover,
.form-card .form-select:hover {
    border-color: #3b5aa1;
}

/* Focus ring */
.form-card .form-control:focus,
.form-card .form-select:focus {
    outline: 0;
    border-color: #6ea8fe;
    box-shadow: 0 0 0 .25rem rgba(110, 168, 254, .16), inset 0 1px 0 rgba(255, 255, 255, .02);
}

/* Placeholder */
.form-card .form-control::placeholder {
    color: #9fb3d6;
    opacity: .8;
}

/* Textarea to match look */
.form-card textarea.form-control {
    min-height: 120px;
    height: auto;
    line-height: 1.35;
    padding: .7rem .8rem;
    resize: vertical;
}

/* Input group alignment (subdomain) */
.form-card .input-group {
    display: flex;
    align-items: stretch;
}

.form-card .input-group .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* Validation helpers (optional classes) */
.form-card .form-control.is-valid {
    border-color: #22c55e;
    box-shadow: 0 0 0 .2rem rgba(34, 197, 94, .18);
}

.form-card .form-control.is-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 .2rem rgba(239, 68, 68, .18);
}

/* Sub-availability chip spacing */
#subdStatus {
    margin-top: .45rem;
}

/* Status: closed (releases subdomain) */
.status-pill.st-closed {
    background: rgba(148, 163, 184, .18);
    color: #cbd5e1;
    border-color: rgba(148, 163, 184, .35);
}

/* Slight row polish */
.table-beauty tbody tr {
    transition: transform .12s ease, background-color .12s ease;
}

/* === Ghost button (global) === */
.btn-ghost {
    border: 1px solid rgba(122, 162, 255, .32);
    background: rgba(122, 162, 255, .10);
    color: #dbeafe;
    transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .12s ease;
}

.btn-ghost:hover {
    border-color: #7aa2ff;
    background: rgba(122, 162, 255, .18);
    box-shadow: 0 4px 18px rgba(122, 162, 255, .18);
}

.btn-ghost:active {
    transform: translateY(1px);
}

.btn-ghost.btn-sm {
    padding: .28rem .55rem;
    font-size: .875rem;
    border-radius: 10px;
}

/* ========== Admin dashboard tiles ========== */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 16px;
}

@media (max-width: 768px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
}

.admin-tile {
    display: block;
    padding: 18px 20px;
    border-radius: 16px;
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    text-decoration: none;
    color: inherit;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}

.admin-tile:hover {
    transform: translateY(-2px);
    background: rgba(15, 23, 42, .96);
    border-color: #3b5aa1;
    box-shadow: 0 14px 45px rgba(15, 23, 42, .7);
}

.admin-tile-title {
    margin: 0 0 .35rem 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: #eaf2ff;
}

.admin-tile-desc {
    margin: 0;
    color: var(--muted);
    font-size: .92rem;
}

/* Upewnij się, że przyciski w wierszach są klikalne */
.table-beauty tbody tr {
    position: relative;
}

.table-beauty .btn {
    position: relative;
    z-index: 2;
    pointer-events: auto;
}

/* Sortowalne nagłówki */
.table-head-sticky thead th.sortable {
    cursor: pointer;
    user-select: none;
}

.table-head-sticky thead th.sortable::after {
    content: "\\25B4\\25BE";
    font-size: .7rem;
    opacity: .45;
    margin-left: .35rem;
}

.table-head-sticky thead th.sort-asc::after {
    content: "\\25B4";
    opacity: .9;
}

.table-head-sticky thead th.sort-desc::after {
    content: "\\25BE";
    opacity: .9;
}

.stats-progress {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(15, 23, 42, .9);
    border: 1px solid rgba(148, 163, 184, .45);
}

.stats-progress .progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4f46e5, #22c55e);
}