/* Lands Factory Portal — corporate navy, steel blue & champagne gold */
@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,500&family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap");

:root {
    /* Brand — deep navy & steel */
    --blue-950: #060a10;
    --blue-900: #0c1424;
    --blue-850: #141f33;
    --blue-800: #1c2d48;
    --blue-700: #2a4a6f;
    --blue-600: #3d6289;
    --blue-500: #5a7fa3;
    --blue-400: #8aa3bf;
    --blue-300: #b8c9da;
    --blue-200: #cdd8e6;
    --blue-100: #e4ebf3;
    --blue-50: #f0f4f8;
    /* Same hue as --blue-700; for rgba() tints */
    --blue-700-rgb: 42, 74, 111;
    /* Accent — champagne gold */
    --gold-700: #6b542c;
    --gold-600: #8a6d3a;
    --gold-500: #b8975e;
    --gold-500-rgb: 184, 151, 94;
    --gold-400: #c9a968;
    --gold-300: #dbbf87;
    --gold-100: #f5efd9;
    /* Neutrals — warm corporate grays */
    --white: #ffffff;
    --cream: #faf8f4;
    --gray-50: #f7f5f0;
    --gray-100: #ebe8e1;
    --gray-200: #ddd9cf;
    --gray-300: #c4bfb3;
    --gray-400: #948f85;
    --gray-500: #6b665c;
    --gray-600: #524e47;
    --gray-700: #3d3a35;
    --gray-900: #1c1a17;
    --border: #e0ddd4;
    --shadow: 0 1px 2px rgba(12, 20, 36, 0.07), 0 4px 14px rgba(12, 20, 36, 0.05);
    --shadow-md: 0 4px 8px rgba(12, 20, 36, 0.06), 0 14px 28px rgba(12, 20, 36, 0.06);
    --shadow-lg: 0 22px 55px rgba(12, 20, 36, 0.14);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-md: 14px;
    --sidebar-w: 272px;
    --header-h: 72px;
    --font-sans: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: var(--font-sans);/* "Cormorant Garamond", "Times New Roman", Georgia, serif;*/
    --font: var(--font-sans);
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --focus: 0 0 0 3px rgba(42, 74, 111, 0.35);
    /* Teal for chart variety */
    --teal-600: #2a5f62;
    --teal-400: #4a9096;
    --sage-700: #3d5248;
    --sage-500: #6a8578;
}

/* Purple primary theme aligned with sidebar menu */
.portal-theme-purple {
    --blue-950: #1c1638;
    --blue-900: #2a2253;
    --blue-850: #352c67;
    --blue-800: #453885;
    --blue-700: #5d4cb6;
    --blue-600: #6c5dca;
    --blue-500: #8376d9;
    --blue-400: #a39ae5;
    --blue-300: #c2bcf0;
    --blue-200: #ddd9f7;
    --blue-100: #eeecfb;
    --blue-50: #f6f5fd;
    --blue-700-rgb: 93, 76, 182;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font);
    font-weight: 500;
    color: var(--gray-900);
    /*background: linear-gradient(180deg, var(--cream) 0%, var(--blue-50) 42%, #ebe6dc 100%);*/
    background-attachment: fixed;
    min-height: 100vh;
}

    body.nav-open {
        overflow: hidden;
    }

    body.lf-modal-open {
        overflow: hidden;
    }

/* Row detail modal (View buttons, data-row-view) */
.lf-row-modal {
    position: fixed;
    inset: 0;
    z-index: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s var(--ease, ease);
}

    .lf-row-modal.is-open {
        opacity: 1;
        pointer-events: auto;
    }

    .lf-row-modal[hidden] {
        display: none !important;
    }

    .lf-row-modal.is-open[hidden] {
        display: flex !important;
    }

.lf-row-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(3px);
}

.lf-row-modal-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 520px;
    max-height: min(85vh, 720px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.22s var(--ease, ease);
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.lf-row-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1rem 0.75rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: var(--blue-50);
}

    .lf-row-modal-head h2 {
        margin: 0;
        font-size: 1.05rem;
        font-weight: 700;
        color: var(--blue-900);
    }

.lf-row-modal-x {
    font-size: 1.35rem;
    line-height: 1;
    padding: 0.25rem 0.45rem;
    border: none;
    background: transparent;
    color: var(--gray-600);
    cursor: pointer;
    border-radius: var(--radius-sm);
}

    .lf-row-modal-x:hover {
        background: var(--gray-100);
        color: var(--gray-900);
    }

.lf-row-modal-body {
    padding: 1rem 1.25rem;
    overflow-y: auto;
}

.lf-row-modal-dl {
    margin: 0;
    display: grid;
    grid-template-columns: minmax(120px, 38%) 1fr;
    gap: 0.35rem 1rem;
    font-size: 0.88rem;
}

    .lf-row-modal-dl dt {
        margin: 0;
        color: var(--gray-500);
        font-weight: 600;
    }

    .lf-row-modal-dl dd {
        margin: 0;
        color: var(--gray-900);
        word-break: break-word;
    }

.lf-row-modal-foot {
    padding: 0.85rem 1.25rem;
    border-top: 1px solid var(--border);
    background: var(--gray-50);
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

a {
    color: var(--blue-700);
    text-decoration: none;
}

    a:hover {
        text-decoration: underline;
    }

:focus-visible {
    outline: none;
    box-shadow: var(--focus);
}

/* App layout */
.app-shell {
    display: flex;
    min-height: 100vh;
    position: relative;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 90;
    backdrop-filter: blur(2px);
}

.sidebar {
    width: var(--sidebar-w);
    background: #ececf4;
    color: #1b1631;
    padding: 1rem 0 2rem;
    font-family: var(--font-sans);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 100;
    border-right: 1px solid #d4d3df;
    box-shadow: 10px 0 30px rgba(53, 44, 90, 0.08);
    transition: transform 0.28s var(--ease);
}

.sidebar-brand {
    padding: 0.5rem 1.25rem 1.35rem;
    border-bottom: 1px solid #d9d8e5;
    margin-bottom: 0.85rem;
}

.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: linear-gradient(145deg, var(--gold-400) 0%, var(--gold-600) 45%, var(--gold-700) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    margin-bottom: 0.75rem;
    color: var(--blue-950);
    box-shadow: 0 4px 18px rgba(184, 151, 94, 0.45);
}

.sidebar-brand strong {
    display: block;
    font-family: var(--font-display);
    font-size: 1.2rem;
    letter-spacing: 0.03em;
    font-weight: 600;
    line-height: 1.2;
}

.sidebar-brand span {
    font-family: var(--font-sans);
    font-size: 0.68rem;
    font-weight: 600;
    opacity: 0.9;
    color: #6358a0;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.nav-section {
    padding: 0.72rem 1.05rem;
    margin: 0.65rem 0.72rem 0.35rem;
    /*border-radius: 999px;*/
    font-size: 1rem;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 600;
    color: #847c7c;
    background: linear-gradient(135deg, #d6d6d5 0%, #ffffff 100%);
    /*box-shadow: 0 8px 18px rgba(79, 65, 169, 0.26);*/
    font-family: var(--font-sans);
}

.sidebar a.nav-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.6rem 0.95rem 0.6rem 1.35rem;
    margin: 0.06rem 0.75rem;
    border-radius: var(--radius-sm);
    color: #151225;
    text-decoration: none;
    font-size: 1.02rem;
    font-weight: 600;
    border-left: 2px solid transparent;
    transition: background 0.18s var(--ease), color 0.18s var(--ease), transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
    font-family: var(--font-sans);
}

    .sidebar a.nav-link:hover {
        background: #dfddee;
        color: #2b2153;
        text-decoration: none;
        transform: translateX(2px);
    }

    .sidebar a.nav-link.active {
        background: linear-gradient(135deg, #5d4cb6 0%, #4f41a9 100%);
        border-left-color: #5d4cb6;
        color: #ffffff;
        font-weight: 600;
        box-shadow: 0 8px 18px rgba(79, 65, 169, 0.26);
    }

    .sidebar .nav-section + a.nav-link {
        margin-top: 0.18rem;
    }

    .sidebar .nav-section + a.nav-link,
    .sidebar .nav-section + a.nav-link ~ a.nav-link {
        padding-left: 1.6rem;
        font-size: 0.98rem;
        font-weight: 600;
    }

    .sidebar .nav-section + a.nav-link::before,
    .sidebar .nav-section + a.nav-link ~ a.nav-link::before {
        content: "›";
        color: #7366ba;
        font-size: 0.9rem;
        line-height: 1;
        margin-right: 0.25rem;
        opacity: 0.9;
    }

    .sidebar a.nav-link.active::before {
        color: rgba(255, 255, 255, 0.86);
    }

.nav-ico {
    width: 1.25rem;
    height: 1.25rem;
    opacity: 0.92;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.75);
}

    .nav-ico svg {
        display: block;
        width: 1.25rem;
        height: 1.25rem;
    }

.nav-ico--exit svg {
    width: 1.1rem;
    height: 1.1rem;
}

.nav-label {
    flex: 1;
    min-width: 0;
}

.sidebar a.nav-link:hover .nav-ico,
.sidebar a.nav-link.active .nav-ico {
    opacity: 1;
    color: inherit;
}

.sidebar-back {
    margin-top: 1.75rem;
    padding: 0 1.25rem;
}

    .sidebar-back a {
        color: #3a2e77;
        font-size: 0.85rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        opacity: 1;
        text-decoration: none;
        padding: 0.45rem 0.65rem;
        margin: 0 0.35rem;
        border-radius: var(--radius-sm);
        transition: background 0.18s var(--ease), color 0.18s var(--ease);
        font-family: var(--font-sans);
    }

        .sidebar-back a:hover {
            opacity: 1;
            color: #ffffff;
            background: #5d4cb6;
            text-decoration: none;
        }

        .sidebar-back a .nav-ico {
            color: #524292;
        }

        .sidebar-back a:hover .nav-ico {
            color: var(--white);
        }

.main-wrap {
    flex: 1;
    margin-left: var(--sidebar-w);
    min-width: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.top-header {
    min-height: var(--header-h);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(224, 221, 212, 0.9);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow);
}

.header-left {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-width: 0;
    flex: 1;
}

.header-titles {
    min-width: 0;
}

    .header-titles h1 {
        margin: 0.15rem 0 0;
        font-family: var(--font-display);
        font-size: 1.65rem;
        font-weight: 600;
        color: var(--blue-900);
        letter-spacing: 0.01em;
        line-height: 1.15;
    }

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: var(--gray-500);
}

    .breadcrumbs a {
        color: var(--gray-600);
        text-decoration: none;
    }

        .breadcrumbs a:hover {
            color: var(--blue-700);
            text-decoration: underline;
        }

    .breadcrumbs span[aria-current="page"] {
        color: var(--gray-700);
        font-weight: 500;
    }

.sep {
    opacity: 0.45;
    user-select: none;
}

.header-tools {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
}

.header-search {
    position: relative;
    display: none;
}

@media (min-width: 768px) {
    .header-search {
        display: block;
    }
}

.header-search svg {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    color: var(--gray-400);
    pointer-events: none;
}

.header-search input {
    width: 220px;
    padding: 0.45rem 0.75rem 0.45rem 2.25rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    font: inherit;
    font-size: 0.85rem;
    background: var(--white);
    color: var(--gray-900);
    transition: border-color 0.15s, box-shadow 0.15s;
}

    .header-search input::placeholder {
        color: var(--gray-400);
    }

    .header-search input:hover {
        border-color: var(--gray-400);
    }

    .header-search input:focus {
        border-color: var(--blue-600);
        box-shadow: 0 0 0 3px rgba(var(--blue-700-rgb), 0.18);
        outline: none;
    }

.icon-btn {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--gray-700);
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

    .icon-btn:hover {
        background: var(--blue-50);
        border-color: var(--blue-200);
        color: var(--blue-800);
    }

.sidebar-toggle {
    display: none;
    flex-shrink: 0;
}

@media (max-width: 1024px) {
    .sidebar-toggle {
        display: inline-flex;
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar-overlay {
        display: block;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.28s var(--ease);
    }

    .app-shell.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .app-shell.sidebar-open .sidebar-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    .main-wrap {
        margin-left: 0;
    }
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-panel {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    width: 320px;
    max-width: calc(100vw - 2rem);
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    z-index: 200;
    overflow: hidden;
    animation: dropIn 0.2s var(--ease);
}

@keyframes dropIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown.is-open .dropdown-panel {
    display: block;
}

.dropdown-head {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--blue-900);
}

.notify-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 280px;
    overflow-y: auto;
}

    .notify-list li {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid var(--gray-100);
        font-size: 0.82rem;
        color: var(--gray-700);
        line-height: 1.45;
    }

        .notify-list li:last-child {
            border-bottom: none;
        }

    .notify-list strong {
        display: block;
        color: var(--gray-900);
        font-size: 0.85rem;
        margin-bottom: 0.2rem;
    }

.notify-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--blue-600);
    border-radius: 50%;
    border: 2px solid var(--white);
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.25rem 0.5rem 0.25rem 1.25rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--white);
    cursor: default;
}

.user-meta {
    display: none;
    flex-direction: column;
    line-height: 1.2;
    text-align: left;
}

@media (min-width: 640px) {
    .user-meta {
        display: flex;
    }
}

.user-meta span:first-child {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-900);
}

.user-meta span:last-child {
    font-size: 0.72rem;
    color: var(--gray-500);
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--blue-100), var(--gold-100));
    color: var(--blue-800);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    border: 2px solid var(--white);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.page-content {
    flex: 1;
    padding: 1.5rem 1.5rem 3rem;
    max-width: 1320px;
    width: 100%;
    margin: 0 auto;
}

.period-chip a {
    color: var(--blue-800);
    font-weight: 600;
    text-decoration: none;
}

    .period-chip a:hover {
        text-decoration: underline;
    }

.page-intro {
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}

    .page-intro p {
        margin: 0;
        max-width: 640px;
        color: var(--gray-600);
        font-size: 0.95rem;
        line-height: 1.55;
    }

.period-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.8rem;
    color: var(--gray-700);
    box-shadow: var(--shadow);
}

    .period-chip strong {
        color: var(--blue-800);
    }

/* Stats */
.grid-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.2rem 1.25rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

    .stat-card::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, var(--blue-800), var(--gold-500), var(--blue-600));
        opacity: 0.92;
    }

    .stat-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }

    .stat-card .label {
        font-size: 0.78rem;
        color: var(--gray-500);
        text-transform: uppercase;
        letter-spacing: 0.04em;
        font-weight: 600;
        margin-bottom: 0.4rem;
    }

    .stat-card .value {
        font-size: 1.55rem;
        font-weight: 800;
        color: var(--blue-900);
        letter-spacing: -0.02em;
        line-height: 1.15;
    }

    .stat-card .sub {
        font-size: 0.82rem;
        color: var(--blue-600);
        margin-top: 0.45rem;
        display: flex;
        align-items: center;
        gap: 0.35rem;
    }

.trend-up {
    color: #059669;
    font-weight: 600;
    font-size: 0.78rem;
}

.trend-down {
    color: #b45309;
    font-weight: 600;
    font-size: 0.78rem;
}

/* Cards */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.card {
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    margin-bottom: 1.25rem;
    overflow: hidden;
}

.card-header {
    padding: 1rem 1.25rem;
    background: linear-gradient(180deg, var(--blue-50) 0%, var(--cream) 100%);
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    color: var(--blue-900);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.card-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.card-body {
    padding: 1.25rem;
}

/* Partner referral / plan callouts */
.plan-callout {
    border-left: 4px solid var(--gold-500);
    padding: 1rem 1.25rem;
    background: var(--blue-50);
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
    color: var(--gray-900);
}

    .plan-callout strong {
        color: var(--blue-900);
    }

.ref-share-field {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: stretch;
}

    .ref-share-field .input {
        flex: 1;
        min-width: 200px;
        font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
        font-size: 0.86rem;
    }

/* Admin plan distribution page — section jump links */
.plan-toc {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    margin-bottom: 1.25rem;
    padding: 0.85rem 1.15rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    font-size: 0.88rem;
}

    .plan-toc a {
        font-weight: 600;
        color: var(--blue-700);
        text-decoration: none;
    }

        .plan-toc a:hover {
            text-decoration: underline;
        }

/* Partner KYC document grid */
.kyc-doc-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

@media (min-width: 900px) {
    .kyc-doc-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

.kyc-doc-card .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Admin plan distribution — P&L style table */
.pnl-table tr.pnl-section td {
    background: var(--blue-50);
    font-weight: 700;
    color: var(--blue-900);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
}

.pnl-table tr.pnl-sub td:first-child {
    padding-left: 1.35rem;
}

.pnl-table tr.pnl-total td {
    background: var(--gray-50);
    border-top: 2px solid var(--border);
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    background: var(--gray-50);
    border-bottom: 1px solid var(--border);
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 20px;
}

    .field label {
        font-size: 0.72rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: var(--gray-500);
    }

.select,
.input {
    font: inherit;
    font-size: 0.88rem;
    padding: 0.45rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--gray-900);
    min-width: 140px;
}

    .select:focus,
    .input:focus {
        outline: none;
        border-color: var(--blue-600);
        box-shadow: 0 0 0 3px rgba(var(--blue-700-rgb), 0.14);
    }

/* Table */
.table-wrap {
    overflow-x: auto;
}

table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.87rem;
}

    table.data-table th,
    table.data-table td {
        padding: 0.75rem 0.95rem;
        text-align: left;
        border-bottom: 1px solid var(--border);
    }

    table.data-table th {
        /*background: linear-gradient(180deg, var(--gray-50), var(--gray-100));*/
        color: var(--blue-900);
        font-weight: 700;
        white-space: nowrap;
        font-size: 0.78rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }

    table.data-table tbody tr {
        transition: background 0.12s;
    }

    table.data-table tr:hover td {
        background: rgba(var(--blue-700-rgb), 0.06);
    }

.table-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.badge {
    display: inline-block;
    padding: 0.22rem 0.55rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-warn {
    background: #fef3c7;
    color: #92400e;
}

.badge-info {
    background: var(--blue-100);
    color: var(--blue-800);
}

.badge-muted {
    background: var(--gray-100);
    color: var(--gray-600);
}

.badge-activity-sale {
    background: #dcfce7;
    color: #166534;
}

.badge-activity-book {
    background: var(--blue-50);
    color: var(--blue-800);
}

.badge-activity-visit {
    background: #fef3c7;
    color: #92400e;
}

.project-grid-partner {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(288px, 1fr));
    gap: 1.25rem;
}

.project-card-p {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

    .project-card-p .project-card-ph {
        height: 132px;
        background: linear-gradient(145deg, var(--blue-100), var(--gold-100));
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 800;
        color: var(--blue-800);
        font-size: 1.15rem;
        letter-spacing: 0.02em;
    }

    .project-card-p .project-card-body {
        padding: 1.1rem 1.2rem 1.2rem;
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    .project-card-p h2 {
        margin: 0 0 0.35rem;
        font-size: 1.05rem;
        color: var(--blue-900);
    }

    .project-card-p .addr {
        font-size: 0.85rem;
        color: var(--gray-600);
        line-height: 1.45;
        margin-bottom: 0.85rem;
    }

    .project-card-p .mini-stats {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        font-size: 0.8rem;
        margin-bottom: 1rem;
    }

        .project-card-p .mini-stats span {
            color: var(--gray-500);
        }

        .project-card-p .mini-stats strong {
            color: var(--blue-900);
            display: block;
        }

.project-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

.form-stack .field {
    margin-bottom: 1rem;
}

    .form-stack .field:last-child {
        margin-bottom: 0;
    }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.52rem 1.05rem;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.12s, box-shadow 0.15s, background 0.15s, border-color 0.15s;
    text-decoration: none;
}

    .btn:hover {
        text-decoration: none;
    }

    .btn:active {
        transform: scale(0.98);
    }

.btn-primary {
    background: linear-gradient(135deg, var(--blue-800), var(--blue-600));
    color: var(--white);
    box-shadow: 0 2px 12px rgba(var(--blue-700-rgb), 0.38);
}

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

.btn-ghost {
    background: transparent;
    color: var(--blue-700);
    border: 1px solid transparent;
}

    .btn-ghost:hover {
        background: var(--blue-50);
    }

.btn-outline {
    background: var(--white);
    color: var(--blue-700);
    border: 1px solid var(--blue-300);
}

    .btn-outline:hover {
        background: var(--blue-50);
        border-color: var(--blue-600);
    }

.btn-sm {
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
}

/* Charts */
.chart-card {
    padding: 1rem 1.25rem 1.25rem;
}

.chart-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gray-500);
    margin-bottom: 1rem;
}

.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    height: 140px;
    padding-top: 0.5rem;
}

.bar {
    flex: 1;
    min-width: 0;
    background: linear-gradient(180deg, var(--blue-500), var(--blue-700));
    border-radius: 6px 6px 2px 2px;
    opacity: 0.9;
    position: relative;
    transition: opacity 0.15s, transform 0.15s;
}

    .bar:hover {
        opacity: 1;
        transform: scaleY(1.02);
        transform-origin: bottom;
    }

.bar-labels {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.7rem;
    color: var(--gray-500);
    text-align: center;
}

    .bar-labels span {
        flex: 1;
    }

.bar-chart--premium {
    height: 158px;
    gap: 0.55rem;
    padding: 0.35rem 0.25rem 0;
    background: linear-gradient(180deg, rgba(var(--blue-700-rgb), 0.05), transparent 55%);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(var(--blue-700-rgb), 0.1);
}

    .bar-chart--premium .bar {
        box-shadow: 0 4px 14px rgba(var(--blue-700-rgb), 0.2);
        border-radius: 8px 8px 3px 3px;
    }

        .bar-chart--premium .bar:nth-child(6n + 1) {
            background: linear-gradient(180deg, var(--blue-400), var(--blue-800));
        }

        .bar-chart--premium .bar:nth-child(6n + 2) {
            background: linear-gradient(180deg, var(--blue-500), var(--blue-900));
        }

        .bar-chart--premium .bar:nth-child(6n + 3) {
            background: linear-gradient(180deg, var(--gold-300), var(--gold-700));
        }

        .bar-chart--premium .bar:nth-child(6n + 4) {
            background: linear-gradient(180deg, var(--teal-400), var(--teal-600));
        }

        .bar-chart--premium .bar:nth-child(6n + 5) {
            background: linear-gradient(180deg, var(--blue-300), var(--blue-600));
        }

        .bar-chart--premium .bar:nth-child(6n + 6) {
            background: linear-gradient(180deg, var(--gray-400), var(--blue-850));
        }

.mini-line-chart {
    height: 72px;
    margin: 0.25rem 0 0.5rem;
}

    .mini-line-chart svg {
        width: 100%;
        height: 72px;
        display: block;
    }

    .mini-line-chart .area {
        fill: url(#cpSparkGrad);
        opacity: 0.85;
    }

    .mini-line-chart .line {
        fill: none;
        stroke: var(--blue-600);
        stroke-width: 2.25;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

.viz-donut-wrap {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    flex-wrap: wrap;
    margin: 0 0 1.25rem;
    padding: 1rem 1.1rem;
    background: linear-gradient(135deg, rgba(var(--blue-700-rgb), 0.07), rgba(255, 255, 255, 0.85));
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.viz-donut {
    width: 148px;
    height: 148px;
    border-radius: 50%;
    flex-shrink: 0;
    background: conic-gradient( var(--blue-700) 0deg 82.8deg, var(--blue-600) 82.8deg 95.76deg, var(--blue-500) 95.76deg 101.16deg, var(--blue-400) 101.16deg 111.96deg, var(--gray-200) 111.96deg 360deg );
    box-shadow: 0 12px 28px rgba(var(--blue-700-rgb), 0.16), inset 0 0 0 1px rgba(0, 0, 0, 0.04);
    position: relative;
}

    .viz-donut::after {
        content: "";
        position: absolute;
        inset: 24%;
        background: var(--white);
        border-radius: 50%;
        box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.06);
    }

.viz-legend {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.82rem;
    color: var(--gray-600);
    line-height: 1.55;
}

    .viz-legend li {
        display: flex;
        align-items: center;
        gap: 0.45rem;
        margin-bottom: 0.35rem;
    }

        .viz-legend li:last-child {
            margin-bottom: 0;
        }

    .viz-legend i {
        width: 10px;
        height: 10px;
        border-radius: 2px;
        flex-shrink: 0;
    }

    .viz-legend .dot-d {
        background: var(--blue-700);
    }

    .viz-legend .dot-s {
        background: var(--blue-600);
    }

    .viz-legend .dot-r {
        background: var(--blue-500);
    }

    .viz-legend .dot-c {
        background: var(--blue-400);
    }

    .viz-legend .dot-x {
        background: var(--gray-300);
    }

.hbar-chart {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.hbar-row {
    display: grid;
    grid-template-columns: 88px 1fr;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.82rem;
}

.hbar-lbl {
    color: var(--gray-600);
    font-weight: 600;
}

.hbar-track {
    display: flex;
    height: 10px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--gray-100);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.hbar-seg {
    height: 100%;
    min-width: 2px;
    transition: filter 0.15s;
}

    .hbar-seg:hover {
        filter: brightness(1.08);
    }

.hbar-seg--direct {
    background: linear-gradient(90deg, var(--blue-500), var(--blue-700));
}

.hbar-seg--team {
    background: linear-gradient(90deg, var(--gold-400), var(--gold-600));
}

.waterfall-chart {
    display: flex;
    align-items: flex-end;
    gap: 0.45rem;
    height: 120px;
    padding: 0.35rem 0.2rem 0;
}

    .waterfall-chart .wf {
        flex: 1;
        min-width: 0;
        border-radius: 6px 6px 2px 2px;
        position: relative;
        background: linear-gradient(180deg, var(--blue-500), var(--blue-700));
        box-shadow: 0 4px 12px rgba(var(--blue-700-rgb), 0.22);
    }

    .waterfall-chart .wf--deduct {
        background: linear-gradient(180deg, #94a3b8, #64748b);
        box-shadow: 0 4px 12px rgba(100, 116, 139, 0.25);
    }

    .waterfall-chart .wf--net {
        background: linear-gradient(180deg, #22c55e, #15803d);
        box-shadow: 0 4px 12px rgba(22, 163, 74, 0.28);
    }

.wf-labels {
    display: flex;
    gap: 0.45rem;
    margin-top: 0.45rem;
    font-size: 0.68rem;
    color: var(--gray-500);
    text-align: center;
}

    .wf-labels span {
        flex: 1;
    }

.timeline {
    border-left: 2px solid var(--blue-200);
    margin: 0 0 0 0.5rem;
    padding: 0 0 0 1rem;
}

.timeline-item {
    position: relative;
    padding-bottom: 1.1rem;
}

    .timeline-item::before {
        content: "";
        position: absolute;
        left: -1.35rem;
        top: 0.2rem;
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: var(--blue-600);
        border: 2px solid var(--white);
        box-shadow: 0 0 0 2px var(--blue-200);
    }

    .timeline-item time {
        font-size: 0.75rem;
        color: var(--gray-500);
        font-weight: 600;
    }

    .timeline-item p {
        margin: 0.25rem 0 0;
        font-size: 0.88rem;
        color: var(--gray-700);
        line-height: 1.45;
    }

.kpi-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.75rem;
}

.kpi {
    flex: 1;
    min-width: 120px;
    padding: 0.75rem;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

    .kpi .k {
        font-size: 0.72rem;
        color: var(--gray-500);
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }

    .kpi .v {
        font-size: 1.15rem;
        font-weight: 800;
        color: var(--blue-900);
        margin-top: 0.2rem;
    }

.progress {
    height: 8px;
    background: var(--gray-100);
    border-radius: 99px;
    overflow: hidden;
    margin-top: 0.75rem;
}

    .progress > i {
        display: block;
        height: 100%;
        background: linear-gradient(90deg, var(--blue-600), var(--blue-400));
        border-radius: 99px;
    }

.footer-app {
    margin-top: auto;
    padding: 1rem 1.5rem;
    text-align: center;
    font-size: 0.78rem;
    color: var(--gray-500);
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.6);
}

/* Landing */
.portal-landing {
    min-height: 100vh;
    background: radial-gradient(ellipse 120% 80% at 50% -22%, rgba(var(--blue-700-rgb), 0.14), transparent 52%), radial-gradient(ellipse 90% 60% at 100% 0%, rgba(var(--gold-500-rgb), 0.14), transparent 45%), linear-gradient(165deg, var(--cream) 0%, var(--white) 42%, var(--blue-50) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
    position: relative;
    overflow: hidden;
}

    .portal-landing::before {
        content: "";
        position: absolute;
        width: 600px;
        height: 600px;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(var(--blue-700-rgb), 0.09), transparent 70%);
        top: -200px;
        right: -150px;
        pointer-events: none;
    }

.portal-box {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.8);
    padding: 2.5rem 2rem;
    max-width: 560px;
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 1;
}

.portal-badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: var(--blue-50);
    color: var(--blue-800);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    border: 1px solid var(--blue-100);
}

.portal-box h1 {
    margin: 0 0 0.5rem;
    color: var(--blue-900);
    font-family: var(--font-display);
    font-size: 2.35rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.portal-box > p.lead {
    color: var(--gray-600);
    margin: 0 0 1.75rem;
    line-height: 1.6;
    font-size: 1rem;
}

.portal-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
}

    .portal-actions a {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.65rem;
        padding: 1rem 1.25rem;
        border-radius: var(--radius);
        font-weight: 700;
        text-decoration: none;
        transition: transform 0.15s var(--ease), box-shadow 0.2s;
    }

        .portal-actions a.admin-entry {
            background: linear-gradient(135deg, var(--blue-900), var(--blue-700));
            color: var(--white);
            box-shadow: 0 8px 28px rgba(var(--blue-700-rgb), 0.38);
        }

        .portal-actions a.partner-entry {
            background: var(--white);
            color: var(--blue-800);
            border: 2px solid var(--gold-500);
        }

        .portal-actions a:hover {
            transform: translateY(-3px);
            text-decoration: none;
        }

.portal-features {
    margin-top: 2rem;
    text-align: left;
    display: grid;
    gap: 0.65rem;
}

    .portal-features li {
        display: flex;
        align-items: flex-start;
        gap: 0.65rem;
        font-size: 0.88rem;
        color: var(--gray-600);
        line-height: 1.45;
        list-style: none;
        margin: 0;
    }

        .portal-features li::before {
            content: "";
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: var(--blue-600);
            margin-top: 0.35rem;
            flex-shrink: 0;
        }

.portal-foot {
    margin-top: 1.75rem;
    font-size: 0.78rem;
    color: var(--gray-500);
    line-height: 1.5;
}

.muted {
    color: var(--gray-500);
    font-size: 0.9rem;
}

.prose-list {
    margin: 0;
    padding-left: 1.25rem;
    line-height: 1.65;
    color: var(--gray-700);
}

    .prose-list li {
        margin-bottom: 0.5rem;
    }

.tabs {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border);
    padding: 0 1rem;
    background: var(--gray-50);
}

.tab {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-500);
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.15s;
}

    .tab:hover {
        color: var(--blue-700);
    }

    .tab[aria-selected="true"] {
        color: var(--blue-800);
        border-bottom-color: var(--blue-600);
    }

.tab-panels {
    padding: 1.25rem;
}

.tab-panel[hidden] {
    display: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Project manager — land / plot forms */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

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

textarea.input {
    min-height: 88px;
    resize: vertical;
    width: 100%;
}

.photo-drop {
    border: 2px dashed var(--gray-200);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
    background: var(--gray-50);
    min-height: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    transition: border-color 0.15s, background 0.15s;
}

    .photo-drop:hover {
        border-color: var(--gold-500);
        background: var(--gold-100);
    }

    .photo-drop img,
    .photo-drop .photo-preview-img {
        max-height: 120px;
        max-width: 100%;
        object-fit: contain;
        border-radius: var(--radius-sm);
        box-shadow: var(--shadow);
    }

    .photo-drop .photo-placeholder {
        font-size: 0.85rem;
        color: var(--gray-500);
    }

.plot-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

.thumb-sm {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 8px;
    background: var(--gray-100);
    border: 1px solid var(--border);
}

.thumb-fallback {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: var(--blue-50);
    color: var(--blue-800);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.1;
    padding: 0.2rem;
    border: 1px solid var(--border);
}

.subhead-form {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gray-500);
    margin: 0 0 0.75rem;
}

.hint {
    font-size: 0.78rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

.perm-table-wrap .perm-matrix td.table-num,
.perm-table-wrap .perm-matrix th.table-num {
    text-align: center;
    vertical-align: middle;
}

.perm-table-wrap .perm-matrix input[type="checkbox"] {
    width: 1.05rem;
    height: 1.05rem;
    accent-color: var(--blue-700);
    cursor: pointer;
}

/* demo: toast + visually blocked table rows */
.lf-proto-toast {
    position: fixed;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%) translateY(120%);
    z-index: 500;
    max-width: min(420px, calc(100vw - 2rem));
    padding: 0.65rem 1.1rem;
    border-radius: var(--radius-sm);
    background: var(--blue-900);
    color: var(--white);
    font-size: 0.88rem;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s var(--ease), transform 0.25s var(--ease);
}

    .lf-proto-toast.lf-proto-toast--show {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    .lf-proto-toast.lf-proto-toast--err {
        background: var(--gray-700);
    }

tr[data-proto-blocked="1"] {
    opacity: 0.72;
}

@media (max-width: 1024px) {
    .header-search input {
        width: 160px;
    }
}


/* Scrollbar width */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

/* Scrollbar track (background) */
::-webkit-scrollbar-track {
    background: #13131A;
    border-radius: 10px;
}

/* Scrollbar handle */
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #8C929D, #3f41a8);
    border-radius: 10px;
    border: 2px solid #13131A;
    transition: all 0.3s ease;
}

    /* Hover effect */
    ::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(180deg, #6b6df0, #8C929D);
    }

    /* Active click */
    ::-webkit-scrollbar-thumb:active {
        background: #ffffff;
    }

/* Firefox support */
* {
    scrollbar-width: thin;
    scrollbar-color: #8C929D #13131A;
}

/* Authentication pages */
.auth-page {
    min-height: 100vh;
    margin: 0;
    background: radial-gradient(ellipse 95% 70% at 10% 0%, rgba(var(--blue-700-rgb), 0.14), transparent 52%), radial-gradient(ellipse 95% 70% at 100% 10%, rgba(var(--gold-500-rgb), 0.13), transparent 45%), linear-gradient(150deg, var(--blue-50) 0%, var(--cream) 48%, var(--white) 100%);
}

.auth-form-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.auth-card {
    width: 100%;
    max-width: 460px;
    background: rgba(255, 255, 255, 0.93);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 1.6rem 1.35rem 1.3rem;
}

    .auth-card h1 {
        margin: 0.15rem 0 0.5rem;
        font-family: var(--font-display);
        color: var(--blue-900);
        font-size: 2rem;
    }

.auth-subtitle {
    margin: 0 0 1rem;
    color: var(--gray-600);
    font-size: 0.92rem;
    line-height: 1.45;
}

.auth-submit {
    width: 100%;
    margin-top: 0.5rem;
}

.auth-links {
    margin-top: 0.95rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

    .auth-links a {
        font-size: 0.84rem;
        font-weight: 600;
    }

.auth-alert {
    border-radius: var(--radius-sm);
    padding: 0.62rem 0.75rem;
    margin-bottom: 0.85rem;
    font-size: 0.84rem;
    font-weight: 600;
    border: 1px solid transparent;
}

.auth-alert-error {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}

.auth-alert-success {
    background: #ecfdf5;
    color: #065f46;
    border-color: #a7f3d0;
}

.captcha-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.55rem;
}

.captcha-img {
    height: 46px;
    width: 150px;
    max-width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--white);
}
