:root {
    --bg: #f4efe7;
    --bg-soft: #fbf8f3;
    --paper: rgba(255,255,255,.70);
    --paper-strong: rgba(255,255,255,.86);
    --text: #1f2c38;
    --muted: #647482;
    --line: rgba(31,44,56,.12);
    --brand: #1d5c8f;
    --brand-deep: #173f63;
    --brand-soft: #dce9f5;
    --brand-pale: #eef5fb;
    --accent: #b98a46;
    --accent-soft: #eadcc8;
    --success: #2f7d68;
    --warn: #c28a2e;
    --danger: #b85c5c;
    --shadow: 0 22px 50px rgba(34,44,56,.10);
    --shadow-soft: 0 14px 30px rgba(34,44,56,.08);
    --radius: 24px;
    --max: 1280px;
    --header-h: 86px;
}

* {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth
}

body {
    margin: 0;
    font-family: "Manrope", sans-serif;
    color: var(--text);
    background: radial-gradient(circle at 15% 18%, rgba(29,92,143,.10), transparent 0 24%), radial-gradient(circle at 88% 10%, rgba(185,138,70,.10), transparent 0 18%), linear-gradient(180deg, #f8f4ee 0%, #f2ece4 45%, #f7f3ed 100%);
    overflow-x: hidden;
}

    body::before {
        content: "";
        position: fixed;
        inset: 0;
        pointer-events: none;
        background-image: linear-gradient(rgba(255,255,255,.14) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.14) 1px, transparent 1px);
        background-size: 40px 40px;
        mask-image: linear-gradient(to bottom, rgba(0,0,0,.35), transparent 78%);
        opacity: .32;
    }

    body.modal-open {
        overflow: hidden
    }

a {
    text-decoration: none;
    color: inherit
}

button, input, select {
    font: inherit
}

img, svg {
    display: block;
    max-width: 100%
}

.container {
    width: min(calc(100% - 2rem), var(--max));
    margin-inline: auto;
}

.topbar {
    background: linear-gradient(90deg, var(--brand-deep), var(--brand));
    color: #f7f7f4;
    position: relative;
    z-index: 50;
}

    .topbar .inner {
        min-height: 46px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        flex-wrap: wrap;
        padding: .7rem 0;
        font-size: .9rem;
    }

    .topbar .group {
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
        align-items: center;
    }

    .topbar .pill {
        display: inline-flex;
        align-items: center;
        gap: .5rem;
        opacity: .95;
    }

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    backdrop-filter: blur(18px);
    background: rgba(248,244,238,.74);
    border-bottom: 1px solid rgba(31,44,56,.08);
}

    .site-header .inner {
        min-height: var(--header-h);
        display: grid;
        grid-template-columns: auto 1fr auto;
        gap: 1.2rem;
        align-items: center;
    }

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.brand-logo {
    height: 56px;
    width: auto;
    object-fit: contain;
    flex: 0 0 auto;
    filter: drop-shadow(0 10px 20px rgba(23,63,99,.10));
}

.brand-kicker {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .22em;
    color: var(--muted);
    margin-bottom: .15rem;
}

.brand-name {
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(1.7rem, 2.2vw, 2.25rem);
    line-height: .95;
    letter-spacing: -.02em;
    font-weight: 700;
}

.nav {
    justify-self: center
}

    .nav ul {
        display: flex;
        list-style: none;
        gap: 1.35rem;
        margin: 0;
        padding: 0;
        align-items: center;
    }

    .nav a {
        position: relative;
        padding: .35rem 0;
        font-size: .95rem;
    }

        .nav a::after {
            content: "";
            position: absolute;
            left: 0;
            right: 0;
            bottom: -.22rem;
            height: 1px;
            background: var(--brand);
            transform: scaleX(0);
            transform-origin: left;
            transition: transform .28s ease;
        }

        .nav a:hover::after,
        .nav a:focus-visible::after {
            transform: scaleX(1)
        }

.header-actions {
    display: flex;
    align-items: center;
    gap: .8rem;
}

.btn, .btn-ghost, .btn-light, .btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .7rem;
    border-radius: 999px;
    padding: .95rem 1.25rem;
    font-weight: 800;
    transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease, border-color .25s ease, opacity .25s ease;
    cursor: pointer;
    white-space: nowrap;
    border: none;
}

.btn {
    color: #fff;
    border: 1px solid rgba(255,255,255,.12);
    background: linear-gradient(135deg, var(--brand), var(--brand-deep));
    box-shadow: 0 16px 30px rgba(29,92,143,.22);
}

    .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 20px 34px rgba(29,92,143,.28)
    }

    .btn:active {
        transform: translateY(0)
    }

.btn-ghost {
    color: var(--text);
    border: 1px solid var(--line);
    background: rgba(255,255,255,.42);
    backdrop-filter: blur(10px);
}

    .btn-ghost:hover {
        transform: translateY(-2px);
        background: rgba(255,255,255,.74);
    }

.btn-light {
    color: var(--brand-deep);
    background: #f6f4ef;
    border: 1px solid rgba(255,255,255,.2);
}

    .btn-light:hover {
        transform: translateY(-2px);
        background: #fff;
    }

.btn-danger {
    color: #fff;
    background: linear-gradient(135deg, #c56a6a, #a54747);
    box-shadow: 0 12px 24px rgba(184,92,92,.20);
}

    .btn-danger:hover {
        transform: translateY(-2px)
    }

.menu-toggle {
    display: none;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.55);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

    .menu-toggle span,
    .menu-toggle span::before,
    .menu-toggle span::after {
        display: block;
        width: 20px;
        height: 2px;
        background: var(--text);
        border-radius: 999px;
        position: relative;
        transition: .3s ease;
    }

        .menu-toggle span::before,
        .menu-toggle span::after {
            content: "";
            position: absolute;
            left: 0;
        }

        .menu-toggle span::before {
            top: -6px
        }

        .menu-toggle span::after {
            top: 6px
        }

.hero {
    padding: clamp(2.8rem, 4vw, 4.2rem) 0 2rem;
    position: relative;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 1.6rem;
    align-items: stretch;
}

.hero-copy {
    padding: 1rem 0
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    padding: .5rem .9rem;
    border-radius: 999px;
    background: rgba(255,255,255,.58);
    border: 1px solid rgba(29,92,143,.10);
    color: var(--brand);
    font-size: .82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .16em;
    backdrop-filter: blur(10px);
}

.hero h1 {
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(3.2rem, 7vw, 6.1rem);
    line-height: .92;
    letter-spacing: -.045em;
    margin: .95rem 0 1rem;
    max-width: 11ch;
    font-weight: 700;
}

.hero p.lead {
    font-size: clamp(1rem, 1.3vw, 1.16rem);
    line-height: 1.82;
    color: var(--muted);
    max-width: 62ch;
    margin: 0 0 1.5rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .9rem;
    margin-bottom: 1.8rem;
}

.hero-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 1rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--line);
}

.metric small {
    display: block;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .16em;
    font-size: .72rem;
    margin-bottom: .35rem;
}

.metric strong {
    display: block;
    font-size: clamp(1.2rem, 2.4vw, 2rem);
    color: var(--brand);
    font-weight: 800;
}

.hero-side {
    display: grid;
    gap: 1rem;
    align-content: stretch;
}

.hero-panel, .slab, .archive, .dashboard, .dashboard-sidebar {
    border-radius: 30px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255,255,255,.76), rgba(255,255,255,.56));
    border: 1px solid rgba(255,255,255,.74);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.hero-panel {
    padding: 1.2rem;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 1rem;
    min-height: 520px;
}

.panel-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .2rem;
}

.window-dots {
    display: flex;
    gap: .45rem
}

    .window-dots span {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: #d8c3a7;
    }

        .window-dots span:nth-child(2) {
            background: #9fbfd8
        }

        .window-dots span:nth-child(3) {
            background: #1d5c8f
        }

.panel-badge {
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--brand);
}

.panel-core {
    border-radius: 24px;
    overflow: hidden;
    padding: 1rem;
    background: radial-gradient(circle at 80% 20%, rgba(29,92,143,.12), transparent 0 20%), linear-gradient(180deg, rgba(255,255,255,.82), rgba(255,255,255,.62));
    border: 1px solid rgba(31,44,56,.08);
    display: grid;
    grid-template-columns: 1fr .9fr;
    gap: 1rem;
    align-items: stretch;
}

.stack {
    display: flex;
    flex-direction: column;
    gap: .85rem;
    justify-content: center;
}

.doc-sheet {
    background: #fffdfa;
    border-radius: 18px;
    border: 1px solid rgba(31,44,56,.08);
    padding: 1rem;
    box-shadow: 0 12px 28px rgba(31,44,56,.07);
    position: relative;
}

    .doc-sheet::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 6px;
        border-radius: 18px 18px 0 0;
        background: linear-gradient(90deg, var(--brand), var(--accent));
    }

.doc-title {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin: .45rem 0 .8rem;
}

    .doc-title strong {
        font-size: .98rem;
        line-height: 1.4
    }

    .doc-title span {
        font-size: .78rem;
        color: var(--muted);
        white-space: nowrap
    }

.doc-lines {
    display: grid;
    gap: .45rem;
}

    .doc-lines i {
        display: block;
        height: 8px;
        border-radius: 999px;
        background: linear-gradient(90deg, rgba(29,92,143,.16), rgba(185,138,70,.22));
    }

        .doc-lines i:nth-child(2) {
            width: 82%
        }

        .doc-lines i:nth-child(3) {
            width: 64%
        }

        .doc-lines i:nth-child(4) {
            width: 90%
        }

        .doc-lines i:nth-child(5) {
            width: 56%
        }

.vault {
    border-radius: 22px;
    position: relative;
    overflow: hidden;
    min-height: 280px;
    background: radial-gradient(circle at 64% 18%, rgba(185,138,70,.25), transparent 0 18%), linear-gradient(160deg, #ebf2f8, #dee8f3 55%, #e9dfd1 100%);
    border: 1px solid rgba(31,44,56,.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

    .vault::before {
        content: "";
        width: 190px;
        height: 190px;
        border-radius: 50%;
        border: 12px solid rgba(29,92,143,.92);
        position: absolute;
        box-shadow: inset 0 0 0 2px rgba(255,255,255,.4);
    }

    .vault::after {
        content: "";
        width: 84px;
        height: 84px;
        border-radius: 50%;
        border: 10px solid rgba(185,138,70,.95);
        position: absolute;
        background: linear-gradient(90deg, transparent 47%, rgba(23,63,99,.82) 47% 53%, transparent 53%), linear-gradient(transparent 47%, rgba(23,63,99,.82) 47% 53%, transparent 53%);
    }

.panel-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.mini-stat {
    padding: 1rem 1.1rem;
    border-radius: 18px;
    background: rgba(255,255,255,.56);
    border: 1px solid rgba(255,255,255,.74);
}

    .mini-stat small {
        display: block;
        font-size: .72rem;
        text-transform: uppercase;
        letter-spacing: .14em;
        color: var(--muted);
        margin-bottom: .35rem;
    }

    .mini-stat strong {
        font-size: 1.15rem;
        color: var(--text);
    }

section {
    padding: clamp(2.8rem, 5vw, 5.3rem) 0;
    position: relative;
}

.section-head {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: 2rem;
    align-items: end;
    margin-bottom: 2rem;
}

    .section-head h2 {
        margin: 0;
        font-family: "Cormorant Garamond", serif;
        font-size: clamp(2.2rem, 4vw, 4rem);
        line-height: .95;
        letter-spacing: -.03em;
        max-width: 11ch;
    }

    .section-head p {
        margin: 0;
        color: var(--muted);
        line-height: 1.8;
        max-width: 65ch;
        justify-self: end;
    }

.workspace {
    display: grid;
    grid-template-columns: 1.18fr .82fr;
    gap: 1.25rem;
}

.slab {
    padding: 1.4rem
}

    .slab.soft {
        background: linear-gradient(180deg, rgba(255,255,255,.78), rgba(255,255,255,.56));
    }

    .slab h3 {
        margin: 0 0 .85rem;
        font-size: 1.08rem;
        letter-spacing: -.02em;
    }

.flow {
    display: grid;
    gap: 1rem
}

.flow-step {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
}

    .flow-step:last-child {
        border-bottom: 0
    }

.step-no {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--brand), var(--brand-deep));
    color: #fff;
    font-size: .85rem;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(29,92,143,.22);
}

.flow-step strong {
    display: block;
    margin-bottom: .2rem;
    font-size: 1rem;
}

.flow-step p {
    margin: 0;
    color: var(--muted);
    line-height: 1.68;
    font-size: .95rem;
}

.status {
    font-size: .77rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--brand);
    padding: .45rem .65rem;
    border-radius: 999px;
    background: rgba(29,92,143,.08);
    border: 1px solid rgba(29,92,143,.12);
}

.side-panel {
    display: grid;
    gap: 1.25rem
}

.feature-list {
    display: grid;
    gap: 1rem
}

.feature-line {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .85rem;
    align-items: flex-start;
}

.icon-chip {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(29,92,143,.16), rgba(185,138,70,.22));
    border: 1px solid rgba(29,92,143,.08);
    display: grid;
    place-items: center;
    font-weight: 800;
    color: var(--brand);
    flex: 0 0 auto;
}

.feature-line strong {
    display: block;
    margin-bottom: .25rem
}

.feature-line p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
    font-size: .95rem
}

.bands {
    overflow: hidden;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: rgba(255,255,255,.30);
    backdrop-filter: blur(8px);
}

.marquee {
    display: flex;
    gap: 2rem;
    white-space: nowrap;
    padding: 1rem 0;
    min-width: max-content;
    animation: scrollX 24s linear infinite;
    font-size: .95rem;
    color: var(--brand);
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

    .marquee span::before {
        content: "✦";
        color: var(--accent);
        margin-right: 1rem;
    }

@keyframes scrollX {
    from {
        transform: translateX(0)
    }

    to {
        transform: translateX(-50%)
    }
}

.archives {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 1.2rem;
}

.archive {
    padding: 1.4rem 1.25rem;
    position: relative;
    transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}

    .archive:hover {
        transform: translateY(-6px);
        box-shadow: 0 24px 50px rgba(34,44,56,.14);
        border-color: rgba(29,92,143,.18);
    }

    .archive::before {
        content: "";
        position: absolute;
        top: -34px;
        right: -34px;
        width: 92px;
        height: 92px;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(29,92,143,.22), transparent 72%);
    }

    .archive .tag {
        display: inline-flex;
        font-size: .72rem;
        text-transform: uppercase;
        letter-spacing: .14em;
        padding: .42rem .65rem;
        border-radius: 999px;
        background: rgba(29,92,143,.08);
        color: var(--brand);
        font-weight: 800;
        margin-bottom: 1rem;
    }

    .archive h3 {
        font-size: 1.22rem;
        margin: 0 0 .7rem;
    }

    .archive p {
        margin: 0 0 1rem;
        color: var(--muted);
        line-height: 1.75;
    }

    .archive a {
        display: inline-flex;
        align-items: center;
        gap: .5rem;
        font-weight: 800;
        color: var(--brand);
    }

.cta {
    padding-bottom: 5rem
}

.cta-shell {
    position: relative;
    overflow: hidden;
    border-radius: 34px;
    padding: clamp(1.5rem, 3vw, 2.5rem);
    background: linear-gradient(135deg, var(--brand-deep), var(--brand));
    color: #f6f4ef;
    box-shadow: 0 28px 60px rgba(23,63,99,.28);
}

    .cta-shell::before {
        content: "";
        position: absolute;
        width: 340px;
        height: 340px;
        border-radius: 50%;
        right: -100px;
        top: -110px;
        background: radial-gradient(circle, rgba(185,138,70,.30), transparent 68%);
    }

.cta-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1.5rem;
    align-items: end;
}

.cta h2 {
    margin: 0 0 .8rem;
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(2.2rem, 4vw, 4.2rem);
    line-height: .95;
    letter-spacing: -.03em;
    max-width: 12ch;
}

.cta p {
    margin: 0;
    color: rgba(246,244,239,.84);
    line-height: 1.8;
    max-width: 60ch;
}

.cta-actions {
    display: flex;
    gap: .9rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.dashboard-section {
    display: none;
    padding-top: 1rem;
    padding-bottom: 5rem;
}

    .dashboard-section.active {
        display: block
    }

.dashboard-shell {
    display: grid;
    grid-template-columns: 290px 1fr;
    gap: 1.2rem;
    align-items: start;
}

.dashboard-sidebar {
    padding: 1rem;
    position: sticky;
    top: calc(var(--header-h) + 1rem);
    overflow: visible;
}

.user-card {
    padding: 1rem;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(29,92,143,.92), rgba(23,63,99,.98));
    color: #f8f6f2;
    box-shadow: var(--shadow-soft);
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
}

    .user-card::after {
        content: "";
        position: absolute;
        width: 130px;
        height: 130px;
        right: -30px;
        top: -30px;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(185,138,70,.28), transparent 70%);
    }

.avatar {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.16);
    border: 1px solid rgba(255,255,255,.18);
    font-weight: 800;
    margin-bottom: .8rem;
}

.user-card small {
    display: block;
    opacity: .78;
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: .72rem;
    margin-bottom: .35rem;
}

.user-card strong {
    display: block;
    font-size: 1.14rem;
    margin-bottom: .2rem;
}

.user-card p {
    margin: 0;
    color: rgba(248,246,242,.82);
    line-height: 1.6;
    font-size: .92rem;
}

.side-nav {
    display: grid;
    gap: .35rem;
    margin-bottom: 1rem;
}

    .side-nav button {
        width: 100%;
        text-align: left;
        padding: .9rem 1rem;
        border-radius: 16px;
        border: 1px solid transparent;
        background: transparent;
        color: var(--text);
        font-weight: 700;
        cursor: pointer;
        transition: .25s ease;
    }

        .side-nav button:hover {
            background: rgba(29,92,143,.06)
        }

        .side-nav button.active {
            background: rgba(29,92,143,.10);
            border-color: rgba(29,92,143,.10);
            color: var(--brand);
        }

.sidebar-box {
    padding: 1rem;
    border-radius: 18px;
    background: rgba(255,255,255,.56);
    border: 1px solid rgba(31,44,56,.08);
}

    .sidebar-box h4 {
        margin: 0 0 .6rem;
        font-size: .95rem;
    }

    .sidebar-box p {
        margin: 0;
        color: var(--muted);
        line-height: 1.65;
        font-size: .9rem;
    }

.dashboard {
    padding: 1rem
}

.dash-top {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.dash-title h2 {
    margin: 0 0 .35rem;
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: .95;
    letter-spacing: -.03em;
}

.dash-title p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
    max-width: 58ch;
}

.dash-tools {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
}

.search-wrap {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .82rem 1rem;
    border-radius: 999px;
    background: rgba(255,255,255,.72);
    border: 1px solid rgba(31,44,56,.08);
    min-width: min(100%, 320px);
}

    .search-wrap input {
        border: none;
        background: transparent;
        outline: none;
        width: 100%;
        color: var(--text);
    }

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.kpi {
    padding: 1.1rem;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255,255,255,.78), rgba(255,255,255,.58));
    border: 1px solid rgba(255,255,255,.76);
    box-shadow: var(--shadow-soft);
}

    .kpi small {
        display: block;
        font-size: .72rem;
        text-transform: uppercase;
        letter-spacing: .14em;
        color: var(--muted);
        margin-bottom: .45rem;
    }

    .kpi strong {
        display: block;
        font-size: 1.6rem;
        color: var(--brand);
        margin-bottom: .25rem;
    }

    .kpi span {
        font-size: .9rem;
        color: var(--muted);
    }

.dash-grid {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.dash-panel {
    padding: 1.1rem;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255,255,255,.78), rgba(255,255,255,.58));
    border: 1px solid rgba(255,255,255,.76);
    box-shadow: var(--shadow-soft);
}

    .dash-panel h3 {
        margin: 0 0 .9rem;
        font-size: 1.04rem;
        letter-spacing: -.02em;
    }

.doc-table, .user-table {
    display: grid;
    gap: .8rem;
}

.doc-row {
    display: grid;
    grid-template-columns: 1.6fr .8fr .8fr auto;
    gap: 1rem;
    align-items: center;
    padding: .95rem 1rem;
    border-radius: 18px;
    background: rgba(255,255,255,.62);
    border: 1px solid rgba(31,44,56,.08);
}

.user-row {
    display: grid;
    grid-template-columns: 1.4fr .8fr .8fr .8fr auto;
    gap: 1rem;
    align-items: center;
    padding: .95rem 1rem;
    border-radius: 18px;
    background: rgba(255,255,255,.62);
    border: 1px solid rgba(31,44,56,.08);
}

.doc-main strong,
.user-main strong {
    display: block;
    margin-bottom: .18rem;
    font-size: .96rem;
}

.doc-main span,
.user-main span {
    font-size: .86rem;
    color: var(--muted);
}

.doc-meta, .user-meta {
    font-size: .88rem;
    color: var(--muted);
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .42rem .68rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    border: 1px solid transparent;
    white-space: nowrap;
}

    .badge.approved {
        color: var(--success);
        background: rgba(47,125,104,.10);
        border-color: rgba(47,125,104,.12);
    }

    .badge.review {
        color: var(--warn);
        background: rgba(194,138,46,.12);
        border-color: rgba(194,138,46,.14);
    }

    .badge.restricted {
        color: var(--danger);
        background: rgba(184,92,92,.10);
        border-color: rgba(184,92,92,.12);
    }

    .badge.role {
        color: var(--brand);
        background: rgba(29,92,143,.08);
        border-color: rgba(29,92,143,.12);
    }

    .badge.active {
        color: var(--success);
        background: rgba(47,125,104,.10);
        border-color: rgba(47,125,104,.12);
    }

    .badge.inactive {
        color: var(--danger);
        background: rgba(184,92,92,.10);
        border-color: rgba(184,92,92,.12);
    }

.timeline {
    display: grid;
    gap: .85rem
}

.event {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .8rem;
    align-items: flex-start;
    padding: .2rem 0;
}

.event-dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    margin-top: .35rem;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    box-shadow: 0 0 0 6px rgba(29,92,143,.08);
}

.event strong {
    display: block;
    margin-bottom: .15rem;
    font-size: .95rem;
}

.event p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
    font-size: .9rem;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 1rem;
}

.quick {
    padding: 1rem;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255,255,255,.78), rgba(255,255,255,.58));
    border: 1px solid rgba(255,255,255,.76);
    box-shadow: var(--shadow-soft);
}

    .quick strong {
        display: block;
        margin: .1rem 0 .35rem;
        font-size: 1rem;
    }

    .quick p {
        margin: 0 0 .9rem;
        color: var(--muted);
        line-height: 1.65;
        font-size: .92rem;
    }

.panel-note {
    padding: .95rem 1rem;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(29,92,143,.08), rgba(185,138,70,.08));
    border: 1px solid rgba(29,92,143,.08);
    color: var(--muted);
    line-height: 1.65;
    font-size: .9rem;
    margin-top: 1rem;
}

.dashboard-view {
    display: none
}

    .dashboard-view.active {
        display: block
    }

.admin-only {
    display: none
}

    .admin-only.visible {
        display: block
    }

.admin-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .85rem;
}

.field {
    display: grid;
    gap: .42rem;
}

    .field.full {
        grid-column: 1 / -1;
    }

    .field label {
        font-size: .84rem;
        font-weight: 700;
        color: var(--text);
    }

    .field input,
    .field select {
        width: 100%;
        border: 1px solid rgba(31,44,56,.10);
        background: rgba(255,255,255,.88);
        border-radius: 16px;
        padding: 1rem 1rem;
        color: var(--text);
        outline: none;
        transition: border-color .2s ease, box-shadow .2s ease;
    }

        .field input:focus,
        .field select:focus {
            border-color: rgba(29,92,143,.45);
            box-shadow: 0 0 0 4px rgba(29,92,143,.10);
        }

.inline-actions {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
    align-items: center;
}

.tiny-btn {
    padding: .7rem .95rem;
    border-radius: 999px;
    border: 1px solid rgba(31,44,56,.10);
    background: rgba(255,255,255,.78);
    font-weight: 700;
    cursor: pointer;
    transition: .25s ease;
}

    .tiny-btn:hover {
        transform: translateY(-1px);
        background: #fff;
    }


.modal-user-dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 980px);
    border-radius: 32px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255,255,255,.86), rgba(255,255,255,.72));
    border: 1px solid rgba(255,255,255,.72);
    box-shadow: 0 30px 80px rgba(15,24,34,.22);
    backdrop-filter: blur(18px);
    display: grid;    
    transform: translateY(18px) scale(.98);
    opacity: 0;
    transition: transform .32s ease, opacity .32s ease;
}

.modal.open .modal-user-dialog {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.modal-visual {
    min-height: 560px;
    padding: 1.35rem;
    background: radial-gradient(circle at 72% 18%, rgba(185,138,70,.16), transparent 0 22%), linear-gradient(180deg, rgba(220,233,245,.92), rgba(248,244,238,.72));
    border-right: 1px solid rgba(31,44,56,.08);
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 1rem;
}

.modal-mini-panel {
    border-radius: 24px;
    overflow: hidden;
    padding: 1rem;
    background: linear-gradient(180deg, rgba(255,255,255,.82), rgba(255,255,255,.64));
    border: 1px solid rgba(31,44,56,.08);
    box-shadow: var(--shadow-soft);
    display: grid;
    gap: .85rem;
    align-content: start;
}

    .modal-mini-panel h3 {
        margin: 0;
        font-size: 1.02rem;
        letter-spacing: -.02em;
    }

    .modal-mini-panel p {
        margin: 0;
        color: var(--muted);
        line-height: 1.7;
        font-size: .94rem;
    }

.security-list {
    display: grid;
    gap: .85rem;
    margin-top: .2rem;
}

.security-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .8rem;
    align-items: flex-start;
}

    .security-item strong {
        display: block;
        margin-bottom: .2rem;
        font-size: .94rem;
    }

    .security-item span {
        color: var(--muted);
        line-height: 1.65;
        font-size: .88rem;
    }

.modal-form-side {
    padding: 1.35rem;
    display: grid;
    align-content: center;
}

.login-card {
    border-radius: 26px;
    background: linear-gradient(180deg, rgba(255,255,255,.86), rgba(255,255,255,.68));
    border: 1px solid rgba(31,44,56,.08);
    box-shadow: var(--shadow-soft);
    padding: 1.25rem;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: 1px solid rgba(31,44,56,.08);
    background: rgba(255,255,255,.84);
    color: var(--text);
    cursor: pointer;
    transition: .25s ease;
}

    .modal-close:hover {
        background: #fff;
        transform: translateY(-2px);
    }

.login-card .head {
    padding-right: 3.2rem;
    margin-bottom: 1rem;
}

    .login-card .head small {
        display: inline-flex;
        padding: .42rem .7rem;
        border-radius: 999px;
        background: rgba(29,92,143,.08);
        color: var(--brand);
        font-size: .73rem;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: .14em;
        border: 1px solid rgba(29,92,143,.12);
        margin-bottom: .8rem;
    }

    .login-card .head h3 {
        margin: 0 0 .35rem;
        font-size: 1.3rem;
        letter-spacing: -.03em;
    }

    .login-card .head p {
        margin: 0;
        color: var(--muted);
        line-height: 1.7;
        font-size: .95rem;
    }

.login-form {
    display: grid;
    gap: .85rem;
}

.login-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    font-size: .9rem;
    margin-top: .15rem;
}

.check {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    color: var(--muted);
}

    .check input {
        accent-color: var(--brand)
    }

.forgot {
    color: var(--brand);
    font-weight: 700;
}

.login-actions {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    margin-top: .2rem;
}

.login-note {
    margin-top: .9rem;
    padding: .9rem 1rem;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(29,92,143,.07), rgba(185,138,70,.08));
    border: 1px solid rgba(29,92,143,.10);
    color: var(--muted);
    font-size: .9rem;
    line-height: 1.65;
}

    .login-note.is-error {
        color: #8b2d2d;
        background: linear-gradient(135deg, rgba(184,92,92,.10), rgba(185,138,70,.08));
        border-color: rgba(184,92,92,.16);
    }

    .login-note.is-success {
        color: #1f5b4b;
        background: linear-gradient(135deg, rgba(47,125,104,.10), rgba(29,92,143,.08));
        border-color: rgba(47,125,104,.16);
    }

footer {
    padding: 1.2rem 0 2.5rem;
    color: var(--muted);
    font-size: .92rem;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    border-top: 1px solid var(--line);
    padding-top: 1.2rem;
}

.hidden {
    display: none !important
}

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .8s ease, transform .8s ease;
}

    .reveal.visible {
        opacity: 1;
        transform: translateY(0);
    }

.stagger > * {
    opacity: 0;
    transform: translateY(22px);
    animation: fadeUp .8s ease forwards;
}

    .stagger > *:nth-child(1) {
        animation-delay: .08s
    }

    .stagger > *:nth-child(2) {
        animation-delay: .18s
    }

    .stagger > *:nth-child(3) {
        animation-delay: .28s
    }

    .stagger > *:nth-child(4) {
        animation-delay: .38s
    }

    .stagger > *:nth-child(5) {
        animation-delay: .48s
    }

    .stagger > *:nth-child(6) {
        animation-delay: .58s
    }

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0)
    }
}

.mobile-panel {
    position: fixed;
    inset: 72px 1rem auto 1rem;
    z-index: 45;
    background: rgba(251,248,243,.96);
    border: 1px solid rgba(31,44,56,.08);
    border-radius: 24px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    padding: 1rem;
    display: none;
}

    .mobile-panel.open {
        display: block
    }

    .mobile-panel nav ul {
        list-style: none;
        margin: 0;
        padding: 0;
        display: grid;
        gap: .4rem;
    }

    .mobile-panel nav a,
    .mobile-panel nav button {
        display: block;
        width: 100%;
        text-align: left;
        padding: .9rem 1rem;
        border-radius: 16px;
        font-weight: 700;
        background: none;
        border: none;
        cursor: pointer;
    }

        .mobile-panel nav a:hover,
        .mobile-panel nav button:hover {
            background: rgba(29,92,143,.06);
        }

@media (max-width: 1180px) {
    .dashboard-shell {
        grid-template-columns: 1fr
    }

    .dashboard-sidebar {
        position: static
    }

    .kpi-grid {
        grid-template-columns: repeat(2, minmax(0,1fr))
    }

    .dash-grid, .admin-grid {
        grid-template-columns: 1fr
    }

    .quick-grid {
        grid-template-columns: 1fr 1fr
    }

    .modal-dialog {
        grid-template-columns: 1fr
    }

    .modal-visual {
        min-height: auto;
        border-right: none;
        border-bottom: 1px solid rgba(31,44,56,.08);
    }
}

@media (max-width: 1080px) {
    .nav {
        display: none
    }

    .menu-toggle {
        display: inline-flex
    }

    .header-actions .btn-ghost {
        display: none
    }

    .hero-grid,
    .workspace,
    .section-head,
    .cta-grid,
    .panel-core {
        grid-template-columns: 1fr;
    }

    .archives {
        grid-template-columns: 1fr 1fr
    }

    .section-head p {
        justify-self: start
    }

    .cta-actions {
        justify-content: flex-start
    }
}

@media (max-width: 900px) {
    .user-row {
        grid-template-columns: 1fr;
        gap: .55rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .doc-row {
        grid-template-columns: 1fr;
        gap: .55rem;
    }

    .quick-grid,
    .kpi-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    :root {
        --header-h: 72px
    }

    .topbar .inner {
        justify-content: center;
        text-align: center
    }

    .hero-meta,
    .panel-footer,
    .archives {
        grid-template-columns: 1fr;
    }

    .brand-kicker {
        display: none
    }

    .brand-name {
        font-size: 1.65rem
    }

    .brand-logo {
        height: 48px
    }

    .hero h1 {
        max-width: 12ch
    }

    .hero-panel, .slab, .archive, .cta-shell, .dashboard, .dashboard-sidebar, .modal-dialog {
        border-radius: 24px
    }

    .flow-step {
        grid-template-columns: auto 1fr
    }

        .flow-step .status {
            grid-column: 2;
            justify-self: start
        }

    .login-row {
        align-items: flex-start
    }

    .dash-top {
        flex-direction: column
    }

    .search-wrap {
        min-width: 100%
    }

    .modal {
        padding: .6rem
    }

    .modal-visual,
    .modal-form-side {
        padding: 1rem
    }

    .login-card {
        padding: 1rem
    }
}
