:root {
    --app-bg: #f5f7fb;
    --panel-bg: #ffffff;
    --ink: #111827;
    --muted: #64748b;
    --line: #e2e8f0;
    --line-strong: #cbd5e1;
    --brand: #2f6fed;
    --brand-dark: #0b1f3a;
    --brand-soft: #eaf1ff;
    --sidebar-bg: #081827;
    --sidebar-line: #1d3553;
    --blue: #2f6fed;
    --amber: #b7791f;
    --red: #b42318;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    background: var(--app-bg);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

a {
    color: var(--brand-dark);
}

.app-shell {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    width: 286px;
    flex: 0 0 286px;
    background: var(--sidebar-bg);
    color: #fff;
    padding: 22px 16px;
    border-right: 1px solid #1a241d;
}

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

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--brand);
    color: #071007;
    font-weight: 850;
}

.brand-title {
    font-size: 1rem;
    font-weight: 780;
    line-height: 1.15;
}

.brand-subtitle {
    color: #a9b8ad;
    font-size: .82rem;
}

.sidebar-nav {
    margin-top: 28px;
    gap: 3px;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 38px;
    color: #d8e1d9;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: .92rem;
    font-weight: 640;
}

.sidebar-nav .nav-link::before {
    content: "";
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 999px;
    background: #48564d;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link:focus,
.sidebar-nav .nav-link.active {
    background: #18231b;
    border-color: var(--sidebar-line);
    color: #fff;
}

.sidebar-nav .nav-link:hover::before,
.sidebar-nav .nav-link.active::before {
    background: var(--brand);
}

.main-area {
    min-width: 0;
    flex: 1;
}

.topbar {
    min-height: 84px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 30px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 20;
}

.topbar-kicker {
    color: var(--muted);
    font-size: .76rem;
    font-weight: 750;
    text-transform: uppercase;
}

.page-title {
    font-size: 1.46rem;
    font-weight: 800;
}

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

.tenant-selector {
    min-width: 230px;
}

.tenant-selector .form-label {
    margin-bottom: 2px;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 760;
    text-transform: uppercase;
}

.user-pill {
    display: grid;
    gap: 1px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-bg);
    min-width: 214px;
}

.user-name {
    font-weight: 760;
    line-height: 1.2;
}

.user-role,
.user-tenant {
    color: var(--muted);
    font-size: .81rem;
    line-height: 1.25;
}

.content-area {
    padding: 28px 30px 36px;
}

.workspace-panel {
    background: var(--panel-bg);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 12px 28px rgba(20, 28, 20, .04);
}

.section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.section-title {
    font-size: 1.05rem;
    font-weight: 780;
    margin: 0;
}

.section-subtitle {
    color: var(--muted);
    font-size: .9rem;
    margin: 3px 0 0;
}

.filter-grid,
.form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

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

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

.span-2 {
    grid-column: span 2;
}

.span-4 {
    grid-column: 1 / -1;
}

.field-label,
.form-label {
    color: #28322a;
    font-size: .78rem;
    font-weight: 740;
    margin-bottom: 5px;
}

.form-control,
.form-select {
    border-color: var(--line-strong);
    border-radius: 8px;
    color: var(--ink);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 .2rem rgba(98, 216, 78, .16);
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 16px;
}

.btn {
    border-radius: 8px;
    font-weight: 700;
}

.btn-primary {
    --bs-btn-bg: #0b1f3a;
    --bs-btn-border-color: #0b1f3a;
    --bs-btn-hover-bg: #15365f;
    --bs-btn-hover-border-color: #15365f;
    --bs-btn-color: #fff;
}

.btn-success {
    --bs-btn-bg: var(--brand);
    --bs-btn-border-color: var(--brand);
    --bs-btn-color: #071007;
    --bs-btn-hover-bg: #15365f;
    --bs-btn-hover-border-color: #15365f;
    --bs-btn-hover-color: #071007;
}

.btn-outline-secondary {
    --bs-btn-border-color: var(--line-strong);
    --bs-btn-color: #29322b;
    --bs-btn-hover-bg: #eef3ec;
    --bs-btn-hover-color: #111;
}

.table {
    --bs-table-color: var(--ink);
    --bs-table-border-color: var(--line);
    margin-bottom: 0;
}

.table thead th {
    background: #f0f4ee;
    color: #2e382f;
    border-bottom: 1px solid var(--line-strong);
    font-size: .76rem;
    font-weight: 800;
    text-transform: uppercase;
    white-space: nowrap;
}

.table td {
    vertical-align: middle;
    font-size: .9rem;
}

.table-responsive {
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.grid-actions {
    display: flex;
    gap: 6px;
    white-space: nowrap;
}

.badge-soft {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #eef3ec;
    color: #243027;
    font-size: .78rem;
    font-weight: 760;
}

.badge-critical {
    background: #fde8e5;
    color: var(--red);
}

.badge-high {
    background: #fff4df;
    color: var(--amber);
}

.badge-ok {
    background: var(--brand-soft);
    color: var(--brand-dark);
}

.row-overdue td {
    background: #fff1ef !important;
}

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

.kpi-card {
    background: var(--panel-bg);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
}

.kpi-label {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 760;
    text-transform: uppercase;
}

.kpi-value {
    font-size: 1.8rem;
    font-weight: 850;
    line-height: 1.1;
    margin-top: 8px;
}

.chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.chart-panel {
    background: var(--panel-bg);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
    min-height: 320px;
}

.chart-panel canvas {
    width: 100% !important;
    height: 250px !important;
}

.print-toolbar {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-bottom: 16px;
}

.report-section {
    margin-bottom: 20px;
}

.report-section h2 {
    font-size: 1.05rem;
    margin-bottom: 10px;
}

.grc-hero-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 24px;
    align-items: center;
    margin-bottom: 18px;
    padding: 24px;
    border: 1px solid #20462a;
    border-radius: 8px;
    background:
        linear-gradient(135deg, #071526 0%, #0b1f3a 72%, #15365f 100%);
    color: #fff;
}

.grc-hero-panel h2 {
    max-width: 900px;
    margin: 8px 0 8px;
    font-size: clamp(1.6rem, 3vw, 2.8rem);
    line-height: 1.05;
    font-weight: 850;
}

.grc-hero-panel p {
    max-width: 760px;
    margin: 0;
    color: #dce8df;
}

.grc-score {
    display: grid;
    place-items: center;
    min-height: 150px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 8px;
    background: rgba(255, 255, 255, .08);
}

.grc-score span {
    color: #cfe1d3;
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.grc-score strong {
    font-size: 2.8rem;
    line-height: 1;
}

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

.bar-list {
    display: grid;
    gap: 12px;
}

.bar-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 5px;
    font-size: .88rem;
}

.bar-meta span {
    font-weight: 700;
}

.bar-meta strong {
    color: var(--brand-dark);
}

.bar-track {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #e9efe6;
}

.bar-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--brand), #0b1f3a);
}

.login-body {
    background:
        linear-gradient(135deg, rgba(98, 216, 78, .18), rgba(255, 255, 255, 0) 38%),
        #f5f7fb;
}

.login-layout {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-panel {
    width: min(440px, 100%);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 28px;
    box-shadow: 0 18px 45px rgba(20, 28, 20, .12);
}

.login-brand {
    margin-bottom: 28px;
}

.login-brand .brand-title {
    color: var(--ink);
}

.login-brand .brand-subtitle {
    color: var(--muted);
}

.public-body {
    background: #f5f7fb;
    color: var(--ink);
}

.public-header {
    position: sticky;
    top: 0;
    z-index: 50;
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px clamp(18px, 4vw, 56px);
    background: rgba(244, 246, 242, .94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

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

.public-brand strong,
.public-brand small {
    display: block;
    line-height: 1.15;
}

.public-brand small {
    color: var(--muted);
    font-size: .82rem;
}

.public-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: .92rem;
    font-weight: 750;
}

.public-nav a {
    color: #263029;
    text-decoration: none;
}

.public-login-link {
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    padding: 8px 14px;
    background: #fff;
}

.public-hero {
    min-height: calc(100vh - 76px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
    gap: clamp(24px, 5vw, 72px);
    align-items: center;
    padding: clamp(36px, 7vw, 92px) clamp(18px, 4vw, 56px);
    background:
        linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255,255,255,.035) 1px, transparent 1px),
        linear-gradient(135deg, #071526 0%, #0b1f3a 54%, #102a4a 100%);
    background-size: 56px 56px, 56px 56px, auto;
}

.public-hero-copy {
    max-width: 830px;
    color: #fff;
}

.eyebrow {
    color: var(--brand);
    font-size: .78rem;
    font-weight: 850;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.public-hero h1 {
    max-width: 760px;
    margin: 14px 0 18px;
    font-size: clamp(2.4rem, 6vw, 5.5rem);
    line-height: .98;
    font-weight: 880;
}

.public-hero p {
    max-width: 660px;
    color: #dce8df;
    font-size: 1.08rem;
}

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

.btn-outline-light {
    border-color: rgba(255, 255, 255, .55);
    color: #fff;
}

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

.login-card {
    background: rgba(255, 255, 255, .98);
    border: 1px solid rgba(255, 255, 255, .75);
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 24px 70px rgba(10, 20, 12, .2);
}

.login-card h2 {
    margin-bottom: 4px;
    font-size: 1.4rem;
    font-weight: 820;
}

.login-card p {
    color: var(--muted);
    margin-bottom: 18px;
}

.public-band {
    padding: clamp(42px, 6vw, 78px) clamp(18px, 4vw, 56px);
    background: #fff;
}

.public-band-muted {
    background: #eef3ec;
}

.public-section-heading {
    max-width: 880px;
    margin-bottom: 24px;
}

.public-section-heading h2 {
    margin: 8px 0 0;
    font-size: clamp(1.7rem, 3.8vw, 3.4rem);
    line-height: 1.05;
    font-weight: 850;
}

.public-section-heading p {
    margin-top: 12px;
    color: var(--muted);
    font-size: 1rem;
}

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

.value-grid article,
.request-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 20px;
}

.value-grid article {
    background: #f8faf7;
}

.value-grid strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 8px;
}

.value-grid p {
    margin: 0;
    color: var(--muted);
}

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

.public-proof-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 24px;
}

.public-proof-strip span {
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 8px;
    background: rgba(255, 255, 255, .08);
    color: #eef7ef;
    font-weight: 780;
}

.module-grid span {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-weight: 780;
}

.module-grid span::before {
    content: "";
    width: 8px;
    height: 8px;
    margin-right: 10px;
    border-radius: 999px;
    background: var(--brand);
}

.public-contact {
    display: grid;
    grid-template-columns: minmax(0, .82fr) minmax(360px, 1fr);
    gap: clamp(24px, 5vw, 64px);
    align-items: start;
    padding: clamp(42px, 6vw, 78px) clamp(18px, 4vw, 56px);
    background: #fff;
}

.request-panel {
    box-shadow: 0 18px 44px rgba(20, 28, 20, .08);
}

.public-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 22px clamp(18px, 4vw, 56px);
    background: #0f1712;
    color: #d8e1d9;
    font-size: .9rem;
}

@media (max-width: 1199.98px) {
    .filter-grid,
    .form-grid,
    .kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .app-shell {
        display: block;
    }

    .sidebar {
        width: 100%;
        padding: 18px;
    }

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

    .topbar {
        align-items: flex-start;
        flex-direction: column;
        position: static;
    }

    .topbar-actions {
        width: 100%;
        flex-wrap: wrap;
    }

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

    .grc-grid,
    .grc-hero-panel {
        grid-template-columns: 1fr;
    }

    .public-hero,
    .public-contact {
        grid-template-columns: 1fr;
    }

    .public-hero {
        background:
            linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
            linear-gradient(180deg, rgba(255,255,255,.035) 1px, transparent 1px),
            linear-gradient(135deg, #071526 0%, #0b1f3a 100%);
        background-size: 48px 48px, 48px 48px, auto;
    }

    .value-grid,
    .module-grid,
    .public-proof-strip {
        grid-template-columns: 1fr;
    }

    .public-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .public-nav {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 4px;
    }
}

@media (max-width: 575.98px) {
    .sidebar-nav,
    .filter-grid,
    .form-grid,
    .kpi-grid {
        grid-template-columns: 1fr;
    }

    .span-2,
    .span-4 {
        grid-column: auto;
    }

    .topbar,
    .content-area {
        padding: 18px;
    }

    .tenant-selector,
    .user-pill {
        width: 100%;
        min-width: 0;
    }

    .public-footer {
        flex-direction: column;
    }
}

@media print {
    .sidebar,
    .topbar,
    .print-toolbar,
    .btn,
    .filter-grid,
    .action-row {
        display: none !important;
    }

    .app-shell,
    .main-area {
        display: block;
        min-height: auto;
    }

    .content-area {
        padding: 0;
    }

    .workspace-panel,
    .chart-panel,
    .kpi-card {
        box-shadow: none;
        border-color: #ccc;
    }
}

/* Premium navy theme overrides */
body {
    background:
        linear-gradient(180deg, #f8fafc 0%, #f2f5f9 100%);
}

.sidebar {
    background: linear-gradient(180deg, #071526 0%, #0b1f3a 100%);
    border-right-color: #132b49;
}

.brand-mark {
    background: #ffffff;
    color: #0b1f3a;
    box-shadow: 0 0 0 1px rgba(255,255,255,.18), 0 10px 26px rgba(0,0,0,.18);
}

.brand-subtitle,
.sidebar-nav .nav-link {
    color: #cbd5e1;
}

.sidebar-nav .nav-link::before {
    background: #64748b;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link:focus,
.sidebar-nav .nav-link.active {
    background: rgba(255,255,255,.08);
    border-color: #2c4668;
}

.sidebar-nav .nav-link:hover::before,
.sidebar-nav .nav-link.active::before {
    background: #7aa2ff;
}

.topbar {
    background: rgba(255,255,255,.95);
    border-bottom-color: #e2e8f0;
}

.workspace-panel,
.kpi-card,
.chart-panel,
.login-panel,
.request-panel,
.value-grid article,
.module-grid span {
    border-color: #e2e8f0;
    box-shadow: 0 16px 42px rgba(15, 23, 42, .06);
}

.form-control:focus,
.form-select:focus {
    border-color: #2f6fed;
    box-shadow: 0 0 0 .2rem rgba(47, 111, 237, .14);
}

.btn-primary,
.btn-success {
    --bs-btn-bg: #0b1f3a;
    --bs-btn-border-color: #0b1f3a;
    --bs-btn-color: #ffffff;
    --bs-btn-hover-bg: #15365f;
    --bs-btn-hover-border-color: #15365f;
    --bs-btn-hover-color: #ffffff;
}

.btn-outline-secondary {
    --bs-btn-border-color: #cbd5e1;
    --bs-btn-color: #0f172a;
    --bs-btn-hover-bg: #eef2f7;
    --bs-btn-hover-color: #0b1f3a;
}

.table thead th {
    background: #f1f5f9;
    color: #1e293b;
}

.table-hover tbody tr:hover td {
    background: #f8fafc;
}

.badge-soft {
    background: #eef2f7;
    color: #334155;
}

.badge-ok {
    background: #eaf1ff;
    color: #174a9f;
}

.badge-high {
    background: #f2f5f9;
    color: #475569;
}

.badge-critical {
    background: #e8edf5;
    color: #0f172a;
}

.feature-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background: linear-gradient(135deg, #ffffff 0%, #f4f7fb 100%);
}

.feature-panel h2 {
    max-width: 760px;
    margin: 4px 0 8px;
    color: #0b1f3a;
    font-size: 1.55rem;
    line-height: 1.18;
    font-weight: 820;
}

.feature-panel p {
    max-width: 760px;
    margin: 0;
    color: #475569;
    font-size: .98rem;
}

.three-panel-grid,
.help-grid,
.source-grid {
    display: grid;
    gap: 18px;
}

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

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

.workflow-steps {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.workflow-step {
    min-height: 86px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    padding: 12px;
    background: #f8fafc;
    color: #475569;
}

.workflow-step.active {
    border-color: #9bb7e9;
    background: #eef4ff;
    color: #0b1f3a;
}

.workflow-step span,
.help-card span {
    color: #2f6fed;
    font-size: .76rem;
    font-weight: 830;
}

.workflow-step strong {
    font-size: .92rem;
}

.stacked-bars {
    display: grid;
    gap: 14px;
}

.bar-row {
    display: grid;
    gap: 7px;
}

.bar-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #1e293b;
    font-size: .9rem;
}

.bar-meta span {
    color: #64748b;
    font-weight: 720;
}

.bar-track {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

.bar-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #0b1f3a, #2f6fed);
}

.executive-note p {
    color: #334155;
    font-size: .98rem;
    line-height: 1.6;
}

.narrow-panel {
    max-width: 760px;
}

.form-hint {
    margin-top: 6px;
    color: #64748b;
    font-size: .82rem;
}

.document-actions {
    align-self: end;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.document-preview {
    max-height: 640px;
    overflow: auto;
}

.document-preview html,
.document-preview body {
    background: transparent;
}

.document-preview table {
    width: 100%;
}

.source-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: #334155;
}

.source-notice strong {
    color: #0b1f3a;
    white-space: nowrap;
}

.help-card,
.source-card {
    min-height: 210px;
}

.help-card h2,
.source-card h2 {
    margin: 10px 0 8px;
    color: #0b1f3a;
    font-size: 1rem;
    line-height: 1.25;
    font-weight: 780;
}

.help-card p,
.source-card p {
    margin: 0;
    color: #475569;
    font-size: .92rem;
    line-height: 1.5;
}

.source-card {
    display: flex;
    flex-direction: column;
}

.source-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.source-date {
    color: #64748b;
    font-size: .78rem;
    font-weight: 720;
}

.source-relevance {
    margin: 14px 0;
    padding: 10px 12px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #334155;
    font-size: .86rem;
    line-height: 1.45;
}

.source-card .btn {
    margin-top: auto;
    align-self: flex-start;
}

.source-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.brand-logo-link,
.brand-logo-link:hover,
.brand-logo-link:focus {
    display: block;
    color: inherit;
    text-decoration: none;
}

.brand-logo {
    display: block;
    width: 100%;
    max-width: 238px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 16px 38px rgba(0, 0, 0, .18);
}

.login-brand-logo {
    margin-bottom: 28px;
}

.login-brand-logo img {
    display: block;
    width: 100%;
    max-width: 310px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .12);
}

.public-brand-logo {
    display: block;
    width: clamp(176px, 18vw, 248px);
    height: auto;
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .11);
}

.public-hero-logo {
    display: block;
    width: min(420px, 92%);
    height: auto;
    margin-bottom: 22px;
    border-radius: 8px;
    box-shadow: 0 28px 74px rgba(0, 0, 0, .22);
}

.document-preview .doc-header {
    display: flex;
    align-items: center;
    gap: 18px;
    border-bottom: 1px solid #cbd5e1;
    margin-bottom: 18px;
    padding-bottom: 12px;
}

.document-preview .doc-logo {
    width: 220px;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.document-preview .doc-brand {
    color: #64748b;
    font-size: .88rem;
}

.guide-hero,
.deadline-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    background: linear-gradient(135deg, #ffffff 0%, #f5f7fb 100%);
}

.guide-hero h2,
.deadline-hero h2 {
    max-width: 900px;
    margin: 4px 0 10px;
    color: #0b1f3a;
    font-size: clamp(1.7rem, 3vw, 2.8rem);
    line-height: 1.08;
    font-weight: 850;
}

.guide-hero p,
.deadline-hero p {
    max-width: 860px;
    margin: 0;
    color: #475569;
    font-size: 1rem;
    line-height: 1.58;
}

.guide-actions,
.deadline-hero-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.guide-stepper {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.guide-stepper span {
    min-height: 48px;
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    background: #f8fafc;
    color: #0b1f3a;
    font-size: .86rem;
    font-weight: 760;
}

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

.guide-roadmap article {
    min-height: 180px;
    padding: 16px;
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    background: #f8fafc;
}

.guide-roadmap span {
    color: #2f6fed;
    font-size: .76rem;
    font-weight: 850;
    text-transform: uppercase;
}

.guide-roadmap h3 {
    margin: 8px 0;
    color: #0b1f3a;
    font-size: 1rem;
    line-height: 1.25;
    font-weight: 820;
}

.guide-roadmap p {
    margin: 0;
    color: #475569;
    font-size: .9rem;
    line-height: 1.5;
}

.guide-layout {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.guide-index {
    position: sticky;
    top: 104px;
    display: grid;
    gap: 6px;
}

.guide-index h2 {
    margin: 0 0 8px;
    color: #0b1f3a;
    font-size: 1rem;
    font-weight: 820;
}

.guide-index a {
    display: block;
    padding: 8px 10px;
    border-radius: 8px;
    color: #334155;
    text-decoration: none;
    font-size: .9rem;
    font-weight: 680;
}

.guide-index a:hover,
.guide-index a:focus {
    background: #eef4ff;
    color: #0b1f3a;
}

.guide-content {
    display: grid;
    gap: 18px;
}

.guide-section h2 {
    margin: 0 0 10px;
    color: #0b1f3a;
    font-size: 1.24rem;
    font-weight: 830;
}

.guide-section p,
.guide-section li {
    color: #334155;
    line-height: 1.58;
}

.guide-section ol,
.guide-section ul {
    margin-bottom: 0;
}

.guide-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: .92rem;
}

.guide-table th,
.guide-table td {
    border: 1px solid #dbe4ef;
    padding: 10px;
    vertical-align: top;
}

.guide-table th {
    background: #f1f5f9;
    color: #0b1f3a;
    font-weight: 800;
}

.guide-callout {
    margin-top: 14px;
    padding: 12px 14px;
    border-left: 4px solid #2f6fed;
    border-radius: 8px;
    background: #eef4ff;
    color: #0b1f3a;
    font-weight: 680;
}

.evidence-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.evidence-grid span {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 9px 11px;
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    background: #f8fafc;
    color: #334155;
    font-weight: 700;
    font-size: .88rem;
}

.deadline-kpi.danger .kpi-value {
    color: #b42318;
}

.deadline-timeline {
    display: grid;
    gap: 12px;
}

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

.milestone-card {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    padding: 16px;
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 12px 30px rgba(15, 23, 42, .05);
}

.milestone-card.critical {
    border-color: #efc4bd;
    box-shadow: inset 4px 0 0 #b42318, 0 12px 30px rgba(15, 23, 42, .05);
}

.milestone-card.high {
    border-color: #bdd0f4;
    box-shadow: inset 4px 0 0 #2f6fed, 0 12px 30px rgba(15, 23, 42, .05);
}

.milestone-area {
    color: #64748b;
    font-size: .72rem;
    font-weight: 830;
    text-transform: uppercase;
}

.milestone-card h3 {
    margin: 8px 0;
    color: #0b1f3a;
    font-size: 1rem;
    line-height: 1.25;
    font-weight: 830;
}

.milestone-card p {
    margin: 0;
    color: #475569;
    font-size: .9rem;
    line-height: 1.5;
}

.milestone-footer {
    display: grid;
    gap: 2px;
    margin-top: auto;
    padding-top: 14px;
}

.milestone-footer strong {
    color: #0b1f3a;
    font-size: .88rem;
}

.milestone-footer span {
    color: #64748b;
    font-size: .78rem;
    font-weight: 760;
}

.deadline-card {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
}

.deadline-card.critical {
    border-color: #f0c0ba;
}

.deadline-card.high {
    border-color: #c7d7f5;
}

.deadline-date {
    display: grid;
    align-content: center;
    gap: 4px;
    padding: 14px;
    background: #f1f5f9;
    color: #0b1f3a;
}

.deadline-card.critical .deadline-date {
    background: #fff1ef;
    color: #8f1d14;
}

.deadline-card.high .deadline-date {
    background: #eef4ff;
}

.deadline-date strong {
    font-size: 1.05rem;
}

.deadline-date span {
    color: #64748b;
    font-size: .78rem;
    font-weight: 780;
}

.deadline-body {
    padding: 14px 14px 14px 0;
}

.deadline-type {
    color: #64748b;
    font-size: .76rem;
    font-weight: 820;
    text-transform: uppercase;
}

.deadline-body h3,
.mini-deadline h3 {
    margin: 4px 0 4px;
    color: #0b1f3a;
    font-size: .98rem;
    line-height: 1.25;
    font-weight: 800;
}

.deadline-body p,
.mini-deadline p {
    margin: 0;
    color: #64748b;
    font-size: .86rem;
    line-height: 1.45;
}

.deadline-lanes {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}

.deadline-lane {
    display: grid;
    gap: 10px;
}

.mini-deadline {
    padding: 12px;
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .04);
}

.mini-deadline.critical {
    border-color: #f0c0ba;
    box-shadow: inset 4px 0 0 #b42318;
}

.mini-deadline.high {
    border-color: #bfd1f4;
    box-shadow: inset 4px 0 0 #2f6fed;
}

.mini-deadline span {
    color: #64748b;
    font-size: .76rem;
    font-weight: 820;
    text-transform: uppercase;
}

.mini-deadline.regulatory a {
    display: inline-block;
    margin-top: 8px;
    color: #0b1f3a;
    font-weight: 760;
}

@media (max-width: 1199.98px) {
    .three-panel-grid,
    .help-grid,
    .source-grid,
    .deadline-lanes,
    .milestone-map {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

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

@media (max-width: 767.98px) {
    .feature-panel,
    .source-notice,
    .guide-hero,
    .deadline-hero {
        flex-direction: column;
        align-items: stretch;
    }

    .three-panel-grid,
    .help-grid,
    .source-grid,
    .workflow-steps,
    .deadline-lanes,
    .milestone-map,
    .guide-layout,
    .guide-stepper,
    .guide-roadmap,
    .evidence-grid {
        grid-template-columns: 1fr;
    }

    .guide-index {
        position: static;
    }

    .deadline-card {
        grid-template-columns: 1fr;
    }

    .deadline-body {
        padding: 0 14px 14px;
    }

    .document-actions {
        justify-content: flex-start;
    }

    .public-brand-logo {
        width: 188px;
    }

    .public-hero-logo {
        width: min(340px, 100%);
    }
}

.row-overdue td {
    background: #f8fafc !important;
    box-shadow: inset 4px 0 0 #64748b;
}

.progress-bar,
.bg-success {
    background-color: #2f6fed !important;
}

.grc-hero-panel {
    border-color: #1d3553;
    background:
        radial-gradient(circle at 12% 10%, rgba(122, 162, 255, .22), transparent 32%),
        linear-gradient(135deg, #071526 0%, #0b1f3a 58%, #15365f 100%);
}

.grc-hero-panel p {
    color: #dbe5f2;
}

.grc-score {
    border-color: rgba(255,255,255,.24);
    background: rgba(255,255,255,.09);
}

.grc-score span {
    color: #cbd5e1;
}

.bar-meta strong {
    color: #0b1f3a;
}

.bar-track {
    background: #e2e8f0;
}

.bar-track span {
    background: linear-gradient(90deg, #2f6fed, #0b1f3a);
}

.login-body {
    background:
        radial-gradient(circle at 20% 14%, rgba(47,111,237,.14), transparent 30%),
        #f5f7fb;
}

.public-body {
    background: #f5f7fb;
}

.public-header {
    background: rgba(255,255,255,.94);
    border-bottom-color: #e2e8f0;
}

.public-nav a {
    color: #1e293b;
}

.public-login-link {
    border-color: #cbd5e1;
    background: #ffffff;
}

.public-hero {
    background:
        linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255,255,255,.035) 1px, transparent 1px),
        linear-gradient(135deg, #071526 0%, #0b1f3a 54%, #102a4a 100%);
    background-size: 56px 56px, 56px 56px, auto;
}

.public-hero p {
    color: #dbe5f2;
}

.eyebrow {
    color: #7aa2ff;
}

.btn-outline-light {
    border-color: rgba(255,255,255,.58);
    color: #ffffff;
}

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

.login-card {
    border-color: rgba(255,255,255,.75);
    box-shadow: 0 28px 76px rgba(8,24,39,.26);
}

.public-band {
    background: #ffffff;
}

.public-band-muted {
    background: #eef2f7;
}

.value-grid article {
    background: #f8fafc;
}

.module-grid span::before {
    background: #2f6fed;
}

.public-proof-strip span {
    background: rgba(255,255,255,.09);
    border-color: rgba(255,255,255,.22);
    color: #edf4ff;
}

.public-footer {
    background: #071526;
    color: #dbe5f2;
}

/* Homepage refinement: clean navy hero, no diagonal overlap */
.public-header {
    min-height: 72px;
    padding: 14px clamp(18px, 4vw, 54px);
    background: rgba(255,255,255,.98);
    box-shadow: 0 8px 28px rgba(15,23,42,.05);
}

.public-brand .brand-mark {
    background: #f8fafc;
    color: #0b1f3a;
    box-shadow: 0 10px 24px rgba(15,23,42,.12);
}

.public-brand strong {
    color: #111827;
    font-weight: 850;
}

.public-brand small {
    color: #64748b;
}

.public-nav {
    gap: 22px;
}

.public-login-link {
    padding: 9px 18px;
    border-color: #b6c4d8;
    color: #0b1f3a !important;
}

.public-hero {
    position: relative;
    min-height: auto;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
    align-items: center;
    padding: clamp(56px, 7vw, 92px) clamp(18px, 4vw, 56px);
    background:
        linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255,255,255,.035) 1px, transparent 1px),
        linear-gradient(135deg, #071526 0%, #0b1f3a 54%, #102a4a 100%);
    background-size: 56px 56px, 56px 56px, auto;
    overflow: hidden;
}

.public-hero-copy {
    max-width: 760px;
    color: #ffffff;
}

.public-hero h1 {
    max-width: 740px;
    margin: 14px 0 18px;
    color: #ffffff;
    font-size: clamp(2.35rem, 5.3vw, 4.85rem);
    line-height: 1.02;
    font-weight: 850;
}

.public-hero p {
    max-width: 650px;
    color: #dbe5f2;
    font-size: 1.08rem;
    line-height: 1.58;
}

.hero-actions {
    margin-top: 30px;
}

.hero-actions .btn {
    min-height: 42px;
    padding-inline: 18px;
}

.public-proof-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 28px;
}

.public-proof-strip span {
    min-height: 70px;
    display: flex;
    align-items: center;
    border: 1px solid rgba(203,213,225,.26);
    background: rgba(255,255,255,.075);
    color: #eef4ff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.login-card {
    width: 100%;
    align-self: center;
    background: #ffffff;
    border: 1px solid #d8e1ee;
    box-shadow: 0 28px 68px rgba(2,12,27,.34);
}

.login-card h2 {
    color: #0b1f3a;
    font-size: 1.46rem;
}

.login-card p {
    color: #64748b;
    font-size: .96rem;
    line-height: 1.5;
}

.login-card .form-label {
    color: #1e293b;
}

.login-card .form-control {
    background: #ffffff;
    border-color: #b8c6d9;
}

.login-card .btn {
    justify-content: center;
}

.public-band {
    padding-top: clamp(48px, 6vw, 72px);
    padding-bottom: clamp(48px, 6vw, 72px);
}

.public-band-muted {
    background: #f1f5f9;
}

.public-contact {
    background: #ffffff;
}

@media (max-width: 991.98px) {
    .public-header {
        position: static;
        gap: 14px;
    }

    .public-nav {
        display: grid;
        grid-template-columns: repeat(4, max-content);
        gap: 14px;
        align-items: center;
    }

    .public-hero {
        grid-template-columns: 1fr;
        padding: 44px 18px 36px;
        background:
            linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
            linear-gradient(180deg, rgba(255,255,255,.035) 1px, transparent 1px),
            linear-gradient(135deg, #071526 0%, #0b1f3a 100%);
        background-size: 48px 48px, 48px 48px, auto;
    }

    .public-hero h1 {
        max-width: none;
        font-size: clamp(2.18rem, 10vw, 3.2rem);
    }

    .public-hero p {
        max-width: none;
    }

    .public-proof-strip {
        grid-template-columns: 1fr;
    }

    .public-proof-strip span {
        min-height: 52px;
    }

    .login-card {
        max-width: none;
        box-shadow: 0 20px 50px rgba(2,12,27,.24);
    }
}

@media (max-width: 575.98px) {
    .public-header {
        padding: 14px 18px;
    }

    .public-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        overflow: visible;
    }

    .public-nav a {
        display: flex;
        align-items: center;
        min-height: 38px;
    }

    .public-login-link {
        justify-content: center;
        border-radius: 999px;
    }

    .public-hero h1 {
        font-size: 2.35rem;
    }

    .hero-actions {
        display: grid;
        grid-template-columns: 1fr;
    }
}
