:root {
    --bg: #f4f7fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --text: #172033;
    --muted: #64748b;
    --line: #e2e8f0;
    --primary: #123c69;
    --danger: #b42318;
    --warning: #b7791f;
    --success: #15803d;
    --shadow: 0 16px 40px rgba(15, 23, 42, .08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

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

.app-shell {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: #0f172a;
    color: #fff;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(145deg, #0f766e, #38bdf8);
    display: grid;
    place-items: center;
    font-weight: 800;
}

.brand span {
    display: block;
    color: #94a3b8;
    font-size: 12px;
    margin-top: 4px;
}

.nav-links {
    display: grid;
    gap: 8px;
}

    .nav-links a {
        padding: 12px 14px;
        border-radius: 12px;
        color: #cbd5e1;
    }

        .nav-links a:hover {
            background: rgba(255,255,255,.08);
            color: #fff;
        }

.sidebar-note {
    margin-top: auto;
    background: rgba(255,255,255,.06);
    padding: 16px;
    border-radius: 16px;
    color: #cbd5e1;
}

    .sidebar-note span {
        color: #67e8f9;
        font-weight: 700;
    }

    .sidebar-note p {
        margin: 8px 0 0;
        font-size: 13px;
        line-height: 1.6;
    }

.main-content {
    padding: 28px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

    .topbar small, .eyebrow, .muted {
        color: var(--muted);
    }

    .topbar h1 {
        margin: 4px 0 0;
        font-size: 28px;
    }

.topbar-actions {
    display: flex;
    gap: 8px;
}

.pill, .tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    color: var(--muted);
}

    .pill.accent {
        color: #0f766e;
        border-color: rgba(15,118,110,.25);
        background: #ecfdf5;
    }

.alert {
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 18px;
}

    .alert.success {
        background: #dcfce7;
        color: #166534;
    }

    .alert.danger {
        background: #fee2e2;
        color: #991b1b;
    }

.hero-card, .panel, .card, .metric-card, .form-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.hero-card {
    padding: 34px;
    margin-bottom: 22px;
    background: linear-gradient(135deg, #fff, #eefaf8);
}

    .hero-card h2 {
        font-size: 34px;
        max-width: 850px;
        margin: 8px 0 12px;
        line-height: 1.35;
    }

    .hero-card p {
        max-width: 840px;
        color: var(--muted);
        line-height: 1.8;
    }

.hero-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.btn {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text);
    padding: 11px 18px;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .btn.primary {
        background: var(--primary);
        color: #fff;
        border-color: var(--primary);
    }

    .btn.small {
        padding: 7px 12px;
        font-size: 13px;
    }

.metrics-grid, .cards-grid {
    display: grid;
    gap: 16px;
    margin-bottom: 22px;
}

.metrics-grid {
    grid-template-columns: repeat(5, minmax(0,1fr));
}

.cards-grid.three {
    grid-template-columns: repeat(3, minmax(0,1fr));
}

.cards-grid.four {
    grid-template-columns: repeat(4, minmax(0,1fr));
}

.metric-card {
    padding: 18px;
}

    .metric-card span {
        color: var(--muted);
        display: block;
        font-size: 13px;
        margin-bottom: 8px;
    }

    .metric-card strong {
        font-size: 24px;
    }

.card {
    padding: 24px;
}

    .card h3 {
        margin-top: 0;
    }

    .card p {
        color: var(--muted);
        line-height: 1.7;
    }

.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 22px;
}

.panel {
    padding: 22px;
    overflow: hidden;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.panel h2 {
    margin: 0 0 14px;
    font-size: 20px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

    .data-table th, .data-table td {
        border-bottom: 1px solid var(--line);
        padding: 12px 10px;
        text-align: right;
        vertical-align: top;
    }

    .data-table th {
        color: var(--muted);
        background: var(--surface-soft);
        font-weight: 700;
    }

.tag.uploaded, .tag.approved {
    color: var(--success);
    background: #dcfce7;
    border-color: #bbf7d0;
}

.tag.pending {
    color: var(--warning);
    background: #fef3c7;
    border-color: #fde68a;
}

.tag.danger {
    color: var(--danger);
    background: #fee2e2;
    border-color: #fecaca;
}

.finding-card {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 12px;
    background: var(--surface-soft);
}

    .finding-card p {
        color: var(--muted);
        line-height: 1.6;
    }

.status-strip {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 22px;
}

.step {
    background: var(--surface);
    border: 1px solid var(--line);
    padding: 14px;
    border-radius: 14px;
    color: var(--muted);
    text-align: center;
}

    .step.done {
        color: var(--success);
        border-color: #bbf7d0;
        background: #f0fdf4;
    }

    .step.active {
        color: var(--primary);
        border-color: #bfdbfe;
        background: #eff6ff;
        font-weight: 700;
    }

.form-card, .compact-form {
    display: grid;
    gap: 12px;
}

.form-card {
    max-width: 760px;
    padding: 24px;
}

label {
    font-weight: 700;
}

input, select, textarea {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 14px;
    font: inherit;
    width: 100%;
    background: #fff;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.hint-box {
    padding: 14px;
    border-radius: 14px;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    line-height: 1.7;
}

.inline-form {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

.ai-panel {
    border-color: rgba(15,118,110,.35);
    background: #f0fdfa;
}

@media (max-width: 1100px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    .metrics-grid, .cards-grid.three, .cards-grid.four, .two-column, .status-strip {
        grid-template-columns: 1fr;
    }
}

.auth-wrapper {
    display: grid;
    place-items: start center;
    padding: 18px 0 40px;
}

.auth-wrapper.wide {
    place-items: start center;
}

.auth-card {
    width: min(100%, 520px);
}

.auth-card.wide {
    width: min(100%, 860px);
}

.auth-title h2 {
    margin: 6px 0 6px;
    font-size: 28px;
}

.auth-title p {
    margin-top: 0;
    line-height: 1.7;
}

.auth-card h3 {
    margin: 12px 0 0;
    color: var(--primary);
}

.btn.full {
    width: 100%;
}

.checkbox-line {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.checkbox-line input {
    width: auto;
}

.auth-links {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    color: var(--primary);
    font-weight: 700;
}

.validation-summary,
.field-validation {
    color: var(--danger);
    font-size: 13px;
}

.validation-summary ul {
    margin: 0;
    padding-inline-start: 20px;
}

.logout-form {
    margin: 0;
}

@media (max-width: 720px) {
    .topbar {
        align-items: flex-start;
        gap: 14px;
        flex-direction: column;
    }

    .topbar-actions {
        flex-wrap: wrap;
    }

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

    .auth-links {
        display: grid;
    }
}
/* =========================================================
   Premium Landing Page
   ========================================================= */

.landing-hero {
    min-height: calc(100vh - 90px);
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 28px;
    align-items: center;
    padding: 42px;
    border-radius: 34px;
    background: radial-gradient(circle at 15% 15%, rgba(56, 189, 248, .22), transparent 28%), radial-gradient(circle at 85% 20%, rgba(20, 184, 166, .20), transparent 28%), linear-gradient(135deg, #07111f 0%, #0f172a 45%, #123c69 100%);
    color: #fff;
    overflow: hidden;
    position: relative;
    margin-bottom: 28px;
}

    .landing-hero::before {
        content: "";
        position: absolute;
        inset: 0;
        background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
        background-size: 46px 46px;
        opacity: .45;
    }

.landing-hero-content,
.landing-hero-panel {
    position: relative;
    z-index: 1;
}

.landing-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.18);
    color: #a5f3fc;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 18px;
}

    .landing-badge.dark {
        background: #eef6ff;
        border-color: #dbeafe;
        color: #123c69;
    }

.landing-hero h1 {
    margin: 0;
    max-width: 860px;
    font-size: clamp(38px, 5vw, 72px);
    line-height: 1.15;
    letter-spacing: -1.5px;
}

.landing-hero p {
    max-width: 760px;
    margin: 22px 0 0;
    color: #cbd5e1;
    font-size: 17px;
    line-height: 2;
}

.landing-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.landing-btn {
    min-width: 160px;
    height: 48px;
    padding: 0 22px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    transition: .2s ease;
}

    .landing-btn.primary {
        background: #22c55e;
        color: #052e16;
        border: 1px solid #22c55e;
    }

    .landing-btn.secondary {
        background: rgba(255,255,255,.10);
        color: #fff;
        border: 1px solid rgba(255,255,255,.20);
    }

        .landing-btn.secondary.light {
            background: #fff;
            color: #123c69;
        }

    .landing-btn:hover {
        transform: translateY(-2px);
    }

.landing-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

    .landing-trust span {
        padding: 8px 12px;
        border-radius: 999px;
        background: rgba(255,255,255,.08);
        border: 1px solid rgba(255,255,255,.14);
        color: #dbeafe;
        font-size: 12px;
    }

.welcome-card {
    background: rgba(255,255,255,.10);
    border: 1px solid rgba(255,255,255,.16);
    box-shadow: 0 30px 80px rgba(0,0,0,.28);
    backdrop-filter: blur(22px);
    border-radius: 30px;
    padding: 24px;
}

.welcome-card-header {
    display: grid;
    gap: 6px;
    margin-bottom: 22px;
}

    .welcome-card-header span {
        color: #a5f3fc;
        font-size: 13px;
    }

    .welcome-card-header strong {
        font-size: 24px;
    }

.welcome-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15,23,42,.48);
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 22px;
    padding: 18px;
    margin-bottom: 20px;
}

    .welcome-progress small {
        color: #94a3b8;
        display: block;
        margin-bottom: 8px;
    }

    .welcome-progress strong {
        font-size: 22px;
    }

.progress-ring {
    width: 82px;
    height: 82px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: radial-gradient(circle, #0f172a 58%, transparent 60%), conic-gradient(#22c55e 0 85%, rgba(255,255,255,.16) 85% 100%);
}

    .progress-ring span {
        font-weight: 900;
        color: #fff;
    }

.welcome-list {
    display: grid;
    gap: 12px;
    padding: 0;
    margin: 0;
    list-style: none;
}

    .welcome-list li {
        display: grid;
        grid-template-columns: 46px 1fr;
        gap: 12px;
        align-items: center;
        padding: 14px;
        border-radius: 18px;
        background: rgba(255,255,255,.08);
        border: 1px solid rgba(255,255,255,.10);
    }

        .welcome-list li > span {
            width: 42px;
            height: 42px;
            display: grid;
            place-items: center;
            border-radius: 14px;
            background: rgba(34,197,94,.16);
            color: #86efac;
            font-weight: 900;
        }

    .welcome-list strong {
        display: block;
        margin-bottom: 5px;
    }

    .welcome-list small {
        color: #cbd5e1;
        line-height: 1.6;
    }

.landing-stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 34px;
}

.landing-stat-card {
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    border-radius: 24px;
    padding: 22px;
}

    .landing-stat-card span {
        color: var(--muted);
        font-size: 13px;
    }

    .landing-stat-card strong {
        display: block;
        font-size: 34px;
        margin: 10px 0 6px;
        color: #123c69;
    }

    .landing-stat-card small {
        color: var(--muted);
    }

.landing-section {
    margin-bottom: 34px;
}

.landing-section-header {
    max-width: 850px;
    margin: 0 auto 24px;
    text-align: center;
}

    .landing-section-header.compact {
        margin-bottom: 18px;
    }

    .landing-section-header span {
        color: #0f766e;
        font-weight: 800;
        font-size: 13px;
        text-transform: uppercase;
    }

    .landing-section-header h2 {
        margin: 10px 0;
        font-size: clamp(30px, 4vw, 46px);
        color: #0f172a;
    }

    .landing-section-header p {
        color: var(--muted);
        line-height: 1.9;
        font-size: 16px;
    }

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 18px;
}

.feature-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 26px;
    padding: 24px;
    box-shadow: var(--shadow);
    transition: .2s ease;
}

    .feature-card:hover {
        transform: translateY(-4px);
    }

.feature-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: #eef6ff;
    color: #123c69;
    font-weight: 900;
    margin-bottom: 18px;
}

.feature-card h3 {
    margin: 0 0 10px;
    font-size: 20px;
}

.feature-card p {
    color: var(--muted);
    line-height: 1.8;
    margin: 0;
}

.landing-flow {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 30px;
    padding: 28px;
    box-shadow: var(--shadow);
    margin-bottom: 34px;
}

.flow-track {
    display: grid;
    grid-template-columns: repeat(5, minmax(0,1fr));
    gap: 12px;
}

.flow-step {
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 18px;
    position: relative;
}

    .flow-step.active {
        background: #ecfdf5;
        border-color: #bbf7d0;
    }

    .flow-step span {
        width: 38px;
        height: 38px;
        display: grid;
        place-items: center;
        border-radius: 14px;
        background: #123c69;
        color: #fff;
        font-weight: 900;
        margin-bottom: 14px;
    }

    .flow-step strong {
        display: block;
        margin-bottom: 8px;
    }

    .flow-step small {
        color: var(--muted);
        line-height: 1.6;
    }

.landing-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    align-items: center;
    background: radial-gradient(circle at 10% 10%, rgba(34,197,94,.12), transparent 30%), linear-gradient(135deg, #ffffff, #eef6ff);
    border: 1px solid var(--line);
    border-radius: 34px;
    padding: 34px;
    box-shadow: var(--shadow);
    margin-bottom: 34px;
}

.split-content h2 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.35;
}

.split-content p {
    color: var(--muted);
    line-height: 2;
    font-size: 16px;
}

.split-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 22px;
}

    .split-list div {
        background: #fff;
        border: 1px solid var(--line);
        border-radius: 18px;
        padding: 16px;
    }

    .split-list strong {
        display: block;
        margin-bottom: 6px;
        color: #123c69;
    }

    .split-list small {
        color: var(--muted);
        line-height: 1.7;
    }

.mini-window {
    background: #0f172a;
    color: #fff;
    border-radius: 28px;
    padding: 20px;
    box-shadow: 0 30px 70px rgba(15, 23, 42, .25);
}

.mini-window-bar {
    display: flex;
    gap: 7px;
    margin-bottom: 18px;
}

    .mini-window-bar span {
        width: 11px;
        height: 11px;
        border-radius: 50%;
        background: rgba(255,255,255,.28);
    }

.mini-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
    padding: 14px;
    border-radius: 16px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    margin-bottom: 10px;
}

    .mini-row small {
        color: #94a3b8;
    }

    .mini-row strong {
        grid-column: 1;
    }

.mini-tag {
    grid-row: span 2;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 800;
}

    .mini-tag.danger {
        background: #fee2e2;
        color: #991b1b;
    }

    .mini-tag.warning {
        background: #fef3c7;
        color: #92400e;
    }

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

.mini-chart {
    height: 150px;
    display: flex;
    align-items: end;
    gap: 10px;
    padding: 18px;
    border-radius: 18px;
    background: rgba(255,255,255,.06);
    margin-top: 14px;
}

    .mini-chart div {
        flex: 1;
        border-radius: 12px 12px 4px 4px;
        background: linear-gradient(180deg, #38bdf8, #22c55e);
    }

.portal-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 16px;
    margin-bottom: 34px;
}

.portal-card {
    display: block;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 26px;
    padding: 24px;
    box-shadow: var(--shadow);
    transition: .2s ease;
}

    .portal-card:hover {
        transform: translateY(-4px);
        border-color: rgba(18,60,105,.35);
    }

    .portal-card span {
        color: #0f766e;
        font-size: 12px;
        font-weight: 900;
        text-transform: uppercase;
    }

    .portal-card h3 {
        margin: 10px 0;
        color: #123c69;
    }

    .portal-card p {
        margin: 0;
        color: var(--muted);
        line-height: 1.8;
    }

.landing-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 32px;
    border-radius: 32px;
    background: linear-gradient(135deg, #123c69, #0f172a);
    color: #fff;
    box-shadow: var(--shadow);
}

    .landing-cta span {
        color: #a5f3fc;
        font-weight: 800;
    }

    .landing-cta h2 {
        margin: 8px 0;
        font-size: 30px;
    }

    .landing-cta p {
        color: #cbd5e1;
        margin: 0;
    }

@media (max-width: 1200px) {
    .landing-hero,
    .landing-split {
        grid-template-columns: 1fr;
    }

    .landing-stats,
    .flow-track,
    .portal-grid {
        grid-template-columns: repeat(2, minmax(0,1fr));
    }

    .feature-grid {
        grid-template-columns: repeat(2, minmax(0,1fr));
    }
}

@media (max-width: 720px) {
    .landing-hero {
        padding: 24px;
        border-radius: 24px;
    }

    .landing-stats,
    .feature-grid,
    .flow-track,
    .landing-split,
    .portal-grid {
        grid-template-columns: 1fr;
    }

    .split-list {
        grid-template-columns: 1fr;
    }

    .landing-cta {
        display: block;
    }

        .landing-cta .landing-actions {
            margin-top: 20px;
        }

    .landing-btn {
        width: 100%;
    }
}