:root {
    --ink: #16212b;
    --muted: #637083;
    --line: #d8dee8;
    --panel: #ffffff;
    --bg: #f4f7fb;
    --brand: #285b8f;
    --brand-dark: #193f66;
    --accent: #2f855a;
    --danger: #b42318;
}

body {
    background: var(--bg);
    color: var(--ink);
    font-size: 15px;
    letter-spacing: 0;
}

.app-brand {
    align-items: center;
    color: var(--ink);
    display: inline-flex;
    gap: 10px;
}

.app-brand:hover {
    color: var(--brand);
}

.app-brand img {
    display: block;
    height: 34px;
    object-fit: contain;
    width: auto;
}

.login-brand {
    color: var(--ink);
    font-size: 20px;
    font-weight: 700;
}

.login-brand img {
    height: 46px;
}

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

.app-sidebar {
    background: #fff;
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    height: 100vh;
    left: 0;
    overflow-y: auto;
    padding: 18px 14px;
    position: fixed;
    top: 0;
    transition: transform .2s ease, width .2s ease;
    width: 264px;
    z-index: 1040;
}

.sidebar-brand {
    border-bottom: 1px solid var(--line);
    margin-bottom: 14px;
    padding: 0 8px 16px;
}

.sidebar-nav {
    display: grid;
    gap: 4px;
}

.sidebar-link {
    align-items: center;
    border-radius: 8px;
    color: var(--ink);
    display: flex;
    gap: 12px;
    font-weight: 650;
    min-height: 42px;
    padding: 10px 12px;
    text-decoration: none;
}

.sidebar-link i {
    color: var(--muted);
    font-size: 18px;
    width: 22px;
}

.sidebar-link.active,
.sidebar-link:hover {
    background: #eef5f2;
    color: var(--brand);
}

.sidebar-link.active i,
.sidebar-link:hover i {
    color: var(--accent);
}

.sidebar-overlay {
    background: rgba(22, 33, 43, .42);
    inset: 0;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    transition: opacity .2s ease;
    z-index: 1030;
}

.app-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    margin-left: 264px;
    min-width: 0;
}

.app-topbar {
    align-items: center;
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 14px;
    min-height: 66px;
    padding: 12px 28px;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.sidebar-toggle {
    align-items: center;
    display: inline-flex;
    height: 40px;
    justify-content: center;
    width: 42px;
}

.topbar-brand {
    display: none;
}

.topbar-user {
    align-items: center;
    display: flex;
    gap: 12px;
    margin-left: auto;
}

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

body.sidebar-collapsed .app-content {
    margin-left: 0;
}

.app-shell {
    padding: 28px;
}

.page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.page-heading h1,
.login-card h1 {
    font-size: 30px;
    margin: 0;
    font-weight: 700;
}

.eyebrow {
    color: var(--brand);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.panel,
.stat-card,
.login-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(22, 33, 43, .05);
}

.panel {
    padding: 20px;
}

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

.panel-header h2 {
    font-size: 18px;
    margin: 0;
}

.chart-panel {
    min-height: 330px;
}

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

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
}

.stat-card {
    padding: 18px;
}

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

.stat-card strong {
    display: block;
    font-size: 28px;
}

.stat-card.danger strong {
    color: var(--danger);
}

.workload-row {
    align-items: center;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
}

.workload-row:last-child {
    border-bottom: 0;
}

.login-body {
    min-height: 100vh;
    background:
        linear-gradient(120deg, rgba(40,91,143,.88), rgba(47,133,90,.78)),
        url('https://images.unsplash.com/photo-1454165804606-c3d57bc86b40?auto=format&fit=crop&w=1600&q=80') center/cover;
}

.login-panel {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 28px;
}

.login-card {
    max-width: 620px;
    padding: 32px;
    width: 100%;
}

.sample-login {
    border-top: 1px solid var(--line);
    padding-top: 20px;
}

.sample-login-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.sample-login-user {
    align-items: center;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    display: flex;
    gap: 10px;
    justify-content: space-between;
    min-height: 58px;
    padding: 10px 12px;
    text-align: left;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.sample-login-user:hover,
.sample-login-user:focus-visible {
    border-color: var(--brand);
    box-shadow: 0 8px 20px rgba(31, 58, 95, .12);
    outline: 0;
    transform: translateY(-1px);
}

.sample-login-user strong,
.sample-login-user small {
    display: block;
}

.sample-login-user small {
    color: var(--muted);
    font-size: 12px;
}

.table th {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

.form-label {
    color: var(--ink);
    font-weight: 600;
}

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

.btn-primary:hover {
    background: var(--brand-dark);
    border-color: var(--brand-dark);
}

.public-body {
    background: #fff;
}

.public-navbar {
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.public-navbar .nav-link {
    color: var(--ink);
    font-weight: 600;
}

.public-navbar .nav-link.active,
.public-navbar .nav-link:hover {
    color: var(--brand);
}

.public-hero {
    background:
        linear-gradient(90deg, rgba(10, 24, 36, .86), rgba(10, 24, 36, .5)),
        url('https://images.unsplash.com/photo-1551836022-d5d88e9218df?auto=format&fit=crop&w=1800&q=80') center/cover;
    color: #fff;
    min-height: calc(100vh - 73px);
    padding: 112px 0 72px;
}

.public-hero .eyebrow,
.public-page-hero .eyebrow {
    color: #84c7a4;
}

.hero-content {
    max-width: 760px;
    padding-top: 8vh;
}

.hero-content h1,
.public-page-hero h1 {
    font-size: clamp(42px, 6vw, 72px);
    font-weight: 800;
    line-height: 1.02;
    margin: 0 0 22px;
}

.hero-content p {
    font-size: 21px;
    line-height: 1.55;
    margin-bottom: 30px;
    max-width: 690px;
}

.public-section {
    padding: 82px 0;
}

.section-band {
    background: #eef5f2;
}

.section-heading {
    margin: 0 auto 36px;
    max-width: 740px;
    text-align: center;
}

.section-heading h2,
.public-section h2,
.public-cta h2 {
    font-size: 34px;
    font-weight: 750;
    letter-spacing: 0;
    margin-bottom: 14px;
}

.section-heading p,
.public-page-hero p,
.public-section .lead {
    color: var(--muted);
    font-size: 18px;
    line-height: 1.6;
}

.benefit-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.five-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.feature-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 24px;
}

.feature-card i,
.feature-row i,
.contact-panel i,
.portal-preview i {
    color: var(--accent);
    font-size: 26px;
}

.feature-card h3 {
    font-size: 19px;
    font-weight: 750;
    margin: 16px 0 10px;
}

.feature-card p,
.feature-row p,
.value-panel p,
.contact-panel p,
.narrow-copy p {
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 0;
}

.dashboard-preview {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(22, 33, 43, .14);
    padding: 22px;
}

.preview-top {
    align-items: center;
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 8px;
    padding-bottom: 16px;
}

.preview-top span {
    background: #d7e3ee;
    border-radius: 50%;
    display: block;
    height: 10px;
    width: 10px;
}

.preview-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 20px 0;
}

.preview-grid div {
    background: #f6f8fb;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
}

.preview-grid small {
    color: var(--muted);
    display: block;
    margin-bottom: 8px;
}

.preview-grid strong {
    display: block;
    font-size: 26px;
}

.preview-table {
    display: grid;
    gap: 12px;
}

.preview-table span {
    background: linear-gradient(90deg, #285b8f, #2f855a);
    border-radius: 8px;
    display: block;
    height: 13px;
}

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

.check-list span {
    align-items: center;
    display: flex;
    gap: 10px;
    font-weight: 650;
}

.check-list i {
    color: var(--accent);
    font-size: 20px;
}

.module-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.module-strip span {
    background: #eef5f2;
    border: 1px solid #cfe2d9;
    border-radius: 8px;
    color: var(--ink);
    font-weight: 650;
    padding: 12px 16px;
}

.public-cta {
    background: var(--brand);
    color: #fff;
    padding: 66px 0;
    text-align: center;
}

.public-cta p {
    font-size: 18px;
    margin: 0 auto 24px;
    max-width: 660px;
}

.public-page-hero {
    background:
        linear-gradient(90deg, rgba(10, 24, 36, .88), rgba(25, 63, 102, .72)),
        url('https://images.unsplash.com/photo-1450101499163-c8848c66ca85?auto=format&fit=crop&w=1800&q=80') center/cover;
    color: #fff;
    padding: 106px 0 78px;
}

.public-page-hero.compact {
    padding: 82px 0 60px;
}

.public-page-hero p {
    color: rgba(255, 255, 255, .88);
    max-width: 760px;
}

.value-panel,
.public-form,
.contact-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 28px;
}

.value-panel {
    box-shadow: 0 14px 40px rgba(22, 33, 43, .07);
}

.value-panel h2:not(:first-child) {
    margin-top: 28px;
}

.feature-list {
    display: grid;
    gap: 16px;
}

.feature-row {
    align-items: flex-start;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: flex;
    gap: 18px;
    padding: 22px;
}

.feature-row h2 {
    font-size: 22px;
    margin-bottom: 6px;
}

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

.portal-preview div {
    align-items: center;
    background: #f6f8fb;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: flex;
    gap: 14px;
    min-height: 96px;
    padding: 20px;
}

.portal-preview span {
    font-size: 17px;
    font-weight: 700;
}

.public-form {
    box-shadow: 0 14px 40px rgba(22, 33, 43, .06);
}

.demo-form {
    margin: 0 auto;
    max-width: 860px;
}

.contact-panel {
    position: sticky;
    top: 96px;
}

.contact-panel h2 {
    font-size: 26px;
}

.contact-panel p {
    align-items: center;
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
}

.narrow-copy {
    max-width: 820px;
}

.narrow-copy h2 {
    font-size: 24px;
    margin-top: 28px;
}

.narrow-copy h2:first-child {
    margin-top: 0;
}

.public-footer {
    background: #f6f8fb;
    border-top: 1px solid var(--line);
    padding: 54px 0 28px;
}

.footer-brand {
    color: var(--ink);
    font-size: 20px;
    font-weight: 750;
    text-decoration: none;
}

.footer-brand img {
    height: 42px;
}

.public-footer h2 {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .08em;
    margin-bottom: 14px;
    text-transform: uppercase;
}

.public-footer a {
    color: var(--muted);
    display: block;
    margin-bottom: 8px;
    text-decoration: none;
}

.public-footer a:hover {
    color: var(--brand);
}

.footer-bottom {
    align-items: center;
    border-top: 1px solid var(--line);
    color: var(--muted);
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin-top: 36px;
    padding-top: 22px;
}

.footer-bottom a {
    display: inline-block;
    margin: 0 0 0 14px;
}

@media (max-width: 768px) {
    .app-sidebar {
        transform: translateX(-100%);
        width: 280px;
    }

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

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

    .app-content {
        margin-left: 0;
    }

    .app-topbar {
        padding: 12px 18px;
    }

    .topbar-brand {
        display: inline-flex;
    }

    .topbar-user span {
        display: none;
    }

    .app-shell {
        padding: 18px;
    }

    .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .public-hero {
        min-height: auto;
        padding: 78px 0 58px;
    }

    .hero-content {
        padding-top: 0;
    }

    .hero-content h1,
    .public-page-hero h1 {
        font-size: 42px;
    }

    .hero-content p {
        font-size: 18px;
    }

    .public-section {
        padding: 56px 0;
    }

    .section-heading h2,
    .public-section h2,
    .public-cta h2 {
        font-size: 28px;
    }

    .preview-grid,
    .portal-preview {
        grid-template-columns: 1fr;
    }

    .feature-row {
        flex-direction: column;
    }

    .footer-bottom {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media print {
    .app-sidebar,
    .app-topbar,
    .sidebar-overlay {
        display: none;
    }

    .app-content {
        margin-left: 0;
    }

    .app-shell {
        padding: 0;
    }
}
