/* EDMS production UI — static CSS (no Vite/Node required). */
:root {
    --background: #f3f4f6;
    --surface: #ffffff;
    --ink: #0f172a;
    --foreground: #334155;
    --muted: #6b7280;
    --border: #e5e7eb;
    --accent: #2563eb;
    --accent-soft: rgba(37, 99, 235, 0.12);
    --accent-hover: #1d4ed8;
    --success: #16a34a;
    --danger: #b91c1c;
    --font-display: "Segoe UI Variable", "Segoe UI", "Helvetica Neue", ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font-display);
    color: var(--foreground);
    background: var(--background);
}

.min-h-screen { min-height: 100vh; }
.antialiased { -webkit-font-smoothing: antialiased; }
.relative { position: relative; }
.fixed { position: fixed; }
.inset-0 { inset: 0; }
.pointer-events-none { pointer-events: none; }
.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-\[1600px\] { max-width: 1600px; }
.max-w-xl { max-width: 36rem; }
.max-w-xs { max-width: 20rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }

.edms-btn, button, .edms-input, input, select, textarea { font: inherit; }

.edms-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--ink);
    border-radius: .65rem;
    padding: .55rem .9rem;
    cursor: pointer;
    text-decoration: none;
    font-size: .9rem;
    font-weight: 600;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.edms-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.edms-btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.18);
}

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

.edms-input,
input[type="email"],
input[type="password"],
input[type="text"],
input[type="number"],
input[type="date"],
input[type="file"],
select,
textarea {
    width: 100%;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: .65rem;
    padding: .6rem .75rem;
    color: var(--ink);
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.edms-input:focus,
input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.edms-card {
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: .9rem;
    padding: 1.15rem 1.2rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.edms-nav-link {
    display: block;
    border-radius: .55rem;
    padding: .55rem .7rem;
    color: var(--ink);
    text-decoration: none;
    font-weight: 600;
}

.edms-nav-link:hover {
    background: var(--accent-soft);
}

.edms-nav-link.is-active {
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 700;
    box-shadow: inset 3px 0 0 var(--accent);
}

label { display: block; margin-bottom: .35rem; font-size: .85rem; font-weight: 600; color: #374151; }

.space-y-1 > * + * { margin-top: .25rem; }
.space-y-2 > * + * { margin-top: .5rem; }
.space-y-3 > * + * { margin-top: .75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

.text-sm { font-size: .9rem; }
.text-xs { font-size: .75rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.font-medium { font-weight: 600; }
.font-semibold { font-weight: 600; }
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.text-red-600, .text-danger, .text-red-700 { color: #9b2c2c; }
.text-green-800 { color: #1f6b4a; }
.text-\[var\(--ink\)\] { color: var(--ink); }
.text-\[var\(--muted\)\] { color: var(--muted); }
.text-\[var\(--foreground\)\] { color: var(--foreground); }
.text-\[var\(--accent\)\] { color: var(--accent); }

.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }
.p-0 { padding: 0; }
.p-3 { padding: .75rem; }
.px-2 { padding-left: .5rem; padding-right: .5rem; }
.px-3 { padding-left: .75rem; padding-right: .75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-2 { padding-top: .5rem; padding-bottom: .5rem; }
.py-3 { padding-top: .75rem; padding-bottom: .75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.pb-2 { padding-bottom: .5rem; }
.pb-4 { padding-bottom: 1rem; }
.mt-1 { margin-top: .25rem; }
.mt-2 { margin-top: .5rem; }
.mt-3 { margin-top: .75rem; }
.mt-4 { margin-top: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }

.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.whitespace-nowrap { white-space: nowrap; }
.uppercase { text-transform: uppercase; }
.tracking-tight { letter-spacing: -0.02em; }
.tracking-wide { letter-spacing: .04em; }
.tracking-\[0\.16em\] { letter-spacing: .16em; }

.border { border: 1px solid var(--border); }
.border-b { border-bottom: 1px solid var(--border); }
.border-t { border-top: 1px solid color-mix(in srgb, var(--border) 60%, transparent); }
.border-\[var\(--border\)\] { border-color: var(--border); }

.min-w-full { width: 100%; min-width: 48rem; }
.min-w-0 { min-width: 0; }
.w-full { width: 100%; }
.w-48 { width: 12rem; }
.w-40 { width: 10rem; }

table { border-collapse: collapse; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.flex-1 { flex: 1 1 auto; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.gap-2 { gap: .5rem; }
.gap-3 { gap: .75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }

.rounded-md { border-radius: .5rem; }
.rounded-lg { border-radius: .75rem; }
.rounded-xl { border-radius: .9rem; }
.shadow-\[0_10px_30px_rgba\(48\,38\,22\,0\.05\)\] { box-shadow: 0 10px 30px rgba(48, 38, 22, 0.05); }

.bg-\[var\(--surface\)\]\/90 { background: color-mix(in srgb, var(--surface) 90%, transparent); }
.bg-white\/40 { background: rgba(255,255,255,.4); }
.bg-white\/50 { background: rgba(255,255,255,.5); }

.edms-badge {
    display: inline-block;
    border-radius: 999px;
    padding: .18rem .55rem;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .02em;
    background: #f1f5f9;
    color: #475569;
}

.edms-badge-current {
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
    text-transform: none;
}

.edms-row-current { background: rgba(214, 122, 58, 0.06); }

.edms-bell-badge {
    position: absolute;
    right: -0.25rem;
    top: -0.25rem;
    display: flex;
    min-width: 1.25rem;
    height: 1.25rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--accent);
    padding: 0 .25rem;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
}

.edms-bell-panel {
    position: absolute;
    right: 0;
    z-index: 40;
    margin-top: .5rem;
    width: 22rem;
    max-width: min(22rem, calc(100vw - 2rem));
    border: 1px solid var(--border);
    border-radius: .75rem;
    background: var(--surface);
    box-shadow: 0 12px 30px rgba(48, 38, 22, 0.12);
}

[x-cloak] { display: none !important; }
.underline { text-decoration: underline; }
.underline-offset-2 { text-underline-offset: 2px; }
.opacity-70 { opacity: .7; }
.max-h-80 { max-height: 20rem; }
.h-fit { height: fit-content; }
.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }
.block { display: block; }
.hidden { display: none; }

@media (min-width: 640px) {
    .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sm\:col-span-2 { grid-column: span 2 / span 2; }
}

@media (min-width: 1024px) {
    .lg\:px-8 { padding-left: 2rem; padding-right: 2rem; }
    .lg\:flex-row { flex-direction: row; }
    .lg\:items-end { align-items: flex-end; }
    .lg\:justify-between { justify-content: space-between; }
    .lg\:min-w-\[34rem\] { min-width: 34rem; }
    .lg\:grid-cols-\[220px_minmax\(0\,1fr\)\] { grid-template-columns: 220px minmax(0, 1fr); }
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
    .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .md\:col-span-2 { grid-column: span 2 / span 2; }
}

/* ——— Login page (split marketing + auth) ——— */
.login-body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI Variable", "Segoe UI", "Helvetica Neue", ui-sans-serif, system-ui, sans-serif;
    background: #f3f4f6;
    color: #111827;
}

.login-page {
    display: grid;
    min-height: 100vh;
    grid-template-columns: 1fr;
}

.login-hero {
    position: relative;
    display: none;
    overflow: hidden;
    background: linear-gradient(165deg, #0b1220 0%, #111827 55%, #0f172a 100%);
    color: #fff;
    padding: 2.5rem 3rem 1.75rem;
}

.login-hero__glow {
    position: absolute;
    inset: auto -20% -30% 20%;
    height: 70%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.28), transparent 65%);
    pointer-events: none;
}

.login-hero__preview {
    position: absolute;
    right: -6%;
    bottom: 8%;
    width: min(78%, 34rem);
    opacity: 0.28;
    transform: rotate(-6deg);
    pointer-events: none;
}

.login-preview-card {
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(8px);
    padding: 1rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.login-preview-card__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
    margin-bottom: 0.85rem;
}

.login-preview-card__stats div {
    border-radius: 0.55rem;
    background: rgba(255, 255, 255, 0.06);
    padding: 0.55rem 0.65rem;
}

.login-preview-card__stats span {
    display: block;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.55);
}

.login-preview-card__stats strong {
    font-size: 1rem;
}

.login-preview-card__body {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr;
    gap: 0.75rem;
}

.login-preview-card__table {
    display: grid;
    gap: 0.4rem;
}

.login-preview-card__table div {
    height: 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

.login-preview-card__table div:nth-child(odd) { width: 92%; }
.login-preview-card__table div:nth-child(even) { width: 70%; }

.login-preview-card__chart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 0.65rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.75rem;
}

.login-preview-card__donut {
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 50%;
    background:
        conic-gradient(#3b82f6 0 42%, #22c55e 42% 68%, #a855f7 68% 88%, #64748b 88% 100%);
    mask: radial-gradient(circle at center, transparent 48%, #000 50%);
    -webkit-mask: radial-gradient(circle at center, transparent 48%, #000 50%);
}

.login-preview-card__chart p {
    margin: 0;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.6);
}

.login-hero__content {
    position: relative;
    z-index: 1;
    max-width: 34rem;
    margin-top: 1.5rem;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 2.75rem;
}

.login-brand__mark {
    display: inline-flex;
    flex-shrink: 0;
    filter: drop-shadow(0 8px 16px rgba(37, 99, 235, 0.35));
}

.login-brand__name {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
}

.login-brand__tag {
    margin: 0.3rem 0 0;
    font-size: 0.78rem;
    color: rgba(226, 232, 240, 0.72);
}

.login-hero__title {
    margin: 0;
    font-size: clamp(1.85rem, 2.4vw, 2.55rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.15;
}

.login-hero__lead {
    margin: 1rem 0 0;
    max-width: 30rem;
    font-size: 1rem;
    line-height: 1.55;
    color: rgba(226, 232, 240, 0.78);
}

.login-features {
    list-style: none;
    margin: 2.25rem 0 0;
    padding: 0;
    display: grid;
    gap: 1.15rem;
}

.login-features li {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
}

.login-features__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 0.65rem;
    flex-shrink: 0;
}

.login-features__icon--blue { background: rgba(37, 99, 235, 0.2); color: #60a5fa; }
.login-features__icon--purple { background: rgba(168, 85, 247, 0.2); color: #c084fc; }
.login-features__icon--green { background: rgba(34, 197, 94, 0.18); color: #4ade80; }

.login-features strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
}

.login-features span {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.85rem;
    line-height: 1.45;
    color: rgba(226, 232, 240, 0.68);
}

.login-hero__copy {
    position: absolute;
    left: 3rem;
    bottom: 1.35rem;
    z-index: 1;
    margin: 0;
    font-size: 0.75rem;
    color: rgba(148, 163, 184, 0.85);
}

.login-panel {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #f3f4f6;
    padding: 1.25rem 1.25rem 1.5rem;
}

.login-panel__top {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.65rem;
}

.login-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #374151;
    border-radius: 999px;
    padding: 0.4rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: default;
    opacity: 0.9;
}

.login-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #4b5563;
    text-decoration: none;
}

.login-panel__main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
    max-width: 28rem;
    margin: 0 auto;
    padding: 1.5rem 0 0.5rem;
}

.login-card {
    width: 100%;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    padding: 2rem 1.75rem 1.75rem;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.login-card__title {
    margin: 0;
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #111827;
}

.login-card__subtitle {
    margin: 0.4rem 0 0;
    color: #6b7280;
    font-size: 0.95rem;
}

.login-form {
    margin-top: 1.6rem;
}

.login-label {
    display: block;
    margin: 0 0 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
}

.login-form .login-label:not(:first-of-type) {
    margin-top: 1rem;
}

.login-field {
    position: relative;
}

.login-field__icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    display: inline-flex;
    pointer-events: none;
}

.login-input,
.login-form input.login-input {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 0.65rem;
    background: #fff;
    color: #111827;
    padding: 0.78rem 2.6rem 0.78rem 2.65rem;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.login-input--password {
    padding-right: 2.75rem;
}

.login-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.login-field__toggle {
    position: absolute;
    right: 0.55rem;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #9ca3af;
    padding: 0.35rem;
    cursor: pointer;
    display: inline-flex;
}

.login-error {
    margin: 0.4rem 0 0;
    font-size: 0.82rem;
    color: #b91c1c;
}

.login-form__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.95rem;
}

.login-remember {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    font-size: 0.88rem;
    color: #4b5563;
    cursor: pointer;
}

.login-remember input {
    width: auto;
    margin: 0;
    accent-color: #2563eb;
}

.login-link {
    border: 0;
    background: none;
    padding: 0;
    color: #2563eb;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.login-link:hover { text-decoration: underline; }

.login-hint {
    margin: 0.55rem 0 0;
    font-size: 0.8rem;
    color: #6b7280;
    line-height: 1.4;
}

.login-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    width: 100%;
    margin-top: 1.15rem;
    border: 0;
    border-radius: 0.65rem;
    background: #2563eb;
    color: #fff;
    font-size: 0.98rem;
    font-weight: 700;
    padding: 0.85rem 1rem;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.25);
}

.login-submit:hover { background: #1d4ed8; }
.login-submit:disabled { opacity: 0.7; cursor: wait; }

.login-or {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.15rem 0;
    color: #9ca3af;
    font-size: 0.82rem;
}

.login-or::before,
.login-or::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.login-sso {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 0.65rem;
    background: #fff;
    color: #111827;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.8rem 1rem;
    cursor: pointer;
}

.login-sso:hover { background: #f9fafb; }

.login-access {
    margin: 1.2rem 0 0;
    text-align: center;
    font-size: 0.88rem;
    color: #6b7280;
}

.login-trust {
    list-style: none;
    margin: 0;
    padding: 0.85rem 0.5rem;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
    border-top: 1px solid #e5e7eb;
}

.login-trust li {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    color: #6b7280;
}

.login-trust svg { flex-shrink: 0; margin-top: 0.1rem; color: #9ca3af; }

.login-trust strong {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: #374151;
}

.login-trust span {
    display: block;
    font-size: 0.72rem;
    color: #9ca3af;
}

@media (min-width: 640px) {
    .login-trust {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
        text-align: left;
    }

    .login-trust li:not(:last-child) {
        border-right: 1px solid #e5e7eb;
        padding-right: 0.5rem;
    }
}

@media (min-width: 960px) {
    .login-page {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    }

    .login-hero {
        display: flex;
        flex-direction: column;
    }

    .login-panel {
        padding: 1.5rem 2rem 1.75rem;
    }

    .login-panel__main {
        max-width: 26.5rem;
    }
}

@media (max-width: 959px) {
    .login-panel__main {
        padding-top: 0.75rem;
    }
}

/* ——— App shell (dark sidebar + light content) ——— */
.shell-body {
    margin: 0;
    min-height: 100vh;
    background: #f3f4f6;
    color: #111827;
    font-family: "Segoe UI Variable", "Segoe UI", "Helvetica Neue", ui-sans-serif, system-ui, sans-serif;
}

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

.shell-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    width: min(18.5rem, 88vw);
    display: flex;
    flex-direction: column;
    background: #0b1220;
    color: #e5e7eb;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
}

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

.shell-backdrop {
    position: fixed;
    inset: 0;
    z-index: 30;
    background: rgba(15, 23, 42, 0.45);
}

.shell-sidebar__brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.15rem 1rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.shell-brand-name {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
}

.shell-brand-tag {
    margin: 0.15rem 0 0;
    font-size: 0.65rem;
    line-height: 1.3;
    color: rgba(147, 197, 253, 0.85);
    max-width: 9.5rem;
}

.shell-sidebar__close {
    margin-left: auto;
    border: 0;
    background: transparent;
    color: #94a3b8;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.shell-nav {
    flex: 1;
    overflow: auto;
    padding: 0.85rem 0.75rem;
}

.shell-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.2rem;
}

.shell-nav-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    width: 100%;
    border: 0;
    background: transparent;
    color: #cbd5e1;
    text-decoration: none;
    border-radius: 0.65rem;
    padding: 0.7rem 0.8rem;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
}

.shell-nav-link:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }

.shell-nav-link.is-active {
    background: rgba(37, 99, 235, 0.18);
    color: #fff;
    box-shadow: inset 3px 0 0 #2563eb;
}

.shell-nav-link.is-disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.shell-nav-link--toggle { justify-content: flex-start; }
.shell-nav-chevron { margin-left: auto; transition: transform 0.15s ease; }
.shell-nav-chevron.is-open { transform: rotate(180deg); }

.shell-nav-badge {
    margin-left: auto;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.shell-nav-sub {
    list-style: none;
    margin: 0.15rem 0 0.35rem 2.4rem;
    padding: 0;
    display: grid;
    gap: 0.15rem;
}

.shell-nav-sub a {
    display: block;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.84rem;
    padding: 0.35rem 0.45rem;
    border-radius: 0.4rem;
}

.shell-nav-sub a:hover,
.shell-nav-sub a.is-active { color: #fff; background: rgba(255, 255, 255, 0.05); }

.shell-sidebar__footer {
    padding: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.shell-user-card {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 0.75rem;
}

.shell-user-card__meta strong {
    display: block;
    font-size: 0.88rem;
    color: #fff;
}

.shell-user-card__meta span {
    display: block;
    font-size: 0.72rem;
    color: #94a3b8;
}

.shell-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.shell-avatar--lg { width: 2.4rem; height: 2.4rem; }

.shell-context {
    display: grid;
    gap: 0.45rem;
    margin-bottom: 0.75rem;
}

.shell-context div {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 0.55rem;
    padding: 0.45rem 0.6rem;
}

.shell-context span {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
}

.shell-context strong {
    display: block;
    margin-top: 0.1rem;
    font-size: 0.82rem;
    color: #e2e8f0;
    font-weight: 600;
}

.shell-logout button {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    color: #cbd5e1;
    border-radius: 0.55rem;
    padding: 0.5rem 0.7rem;
    cursor: pointer;
    font-size: 0.85rem;
}

.shell-logout button:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }

.shell-copy {
    margin: 0.7rem 0 0;
    font-size: 0.68rem;
    color: #64748b;
}

.shell-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.shell-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #e5e7eb;
}

.shell-menu-btn,
.shell-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 0.65rem;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #374151;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    flex-shrink: 0;
}

.shell-topbar__greeting {
    min-width: 0;
    flex: 1;
}

.shell-topbar__greeting h1 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #111827;
}

.shell-topbar__greeting p {
    margin: 0.1rem 0 0;
    font-size: 0.82rem;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shell-topbar__actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.shell-topbar-switcher {
    display: none;
}

.shell-topbar-switcher .edms-input,
.shell-topbar-switcher select {
    height: 2.4rem;
    border-radius: 0.65rem;
    font-size: 0.82rem;
    padding: 0.35rem 0.65rem;
    background: #fff;
}

.shell-topbar-switcher label {
    margin: 0;
    color: #6b7280;
    font-size: 0.65rem;
}

.shell-content {
    flex: 1;
    padding: 1rem;
}

/* Command Centre dashboard */
.cc { display: grid; gap: 1rem; }
.cc-pagehead { margin-bottom: 0.25rem; }
.cc-kicker {
    margin: 0;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #64748b;
}
.cc-title {
    margin: 0.25rem 0 0;
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #0f172a;
}
.cc-subtitle { margin: 0.3rem 0 0; color: #6b7280; font-size: 0.92rem; }

.cc-card,
.cc-stat {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.9rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.cc-empty { padding: 1.5rem; }
.cc-empty h3 { margin: 0 0 0.35rem; }
.cc-empty p { margin: 0; color: #6b7280; }

.cc-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
}

.cc-stat {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    padding: 1rem 1.05rem;
}

.cc-stat__icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.cc-stat__icon--blue { background: rgba(37, 99, 235, 0.12); color: #2563eb; }
.cc-stat__icon--purple { background: rgba(168, 85, 247, 0.12); color: #a855f7; }
.cc-stat__icon--green { background: rgba(34, 197, 94, 0.12); color: #16a34a; }
.cc-stat__icon--orange { background: rgba(245, 158, 11, 0.14); color: #d97706; }

.cc-stat__label { margin: 0; font-size: 0.78rem; color: #6b7280; font-weight: 600; }
.cc-stat__value { margin: 0.15rem 0 0; font-size: 1.55rem; font-weight: 800; color: #0f172a; letter-spacing: -0.03em; }
.cc-stat__meta { margin: 0.25rem 0 0; font-size: 0.78rem; font-weight: 600; }
.cc-stat__meta.is-up { color: #16a34a; }
.cc-stat__meta.is-down { color: #dc2626; }
.cc-stat__meta.is-info { color: #2563eb; }
.cc-stat__meta.is-danger { color: #dc2626; }
.cc-stat__meta.is-warn { color: #d97706; }

.cc-grid-2,
.cc-grid-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
}

.cc-card { padding: 1rem 1.1rem 1.05rem; }
.cc-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}
.cc-card__head h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
}
.cc-card__head a,
.cc-card__foot a {
    color: #2563eb;
    font-size: 0.84rem;
    font-weight: 600;
    text-decoration: none;
}
.cc-card__head a:hover,
.cc-card__foot a:hover { text-decoration: underline; }
.cc-card__foot {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.85rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f1f5f9;
    font-size: 0.8rem;
    color: #64748b;
}

.cc-muted { margin: 0; color: #6b7280; font-size: 0.9rem; }

.cc-table-wrap { overflow-x: auto; }
.cc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
}
.cc-table th {
    text-align: left;
    color: #64748b;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.45rem 0.4rem;
    border-bottom: 1px solid #e5e7eb;
}
.cc-table td {
    padding: 0.7rem 0.4rem;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: middle;
}
.cc-doclink {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #0f172a;
    font-weight: 700;
    text-decoration: none;
}
.cc-doclink:hover { color: #2563eb; }
.cc-docicon {
    display: inline-flex;
    color: #64748b;
}

.cc-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.18rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}
.cc-pill--green { background: #dcfce7; color: #166534; }
.cc-pill--blue { background: #dbeafe; color: #1d4ed8; }
.cc-pill--amber { background: #ffedd5; color: #c2410c; }
.cc-pill--red { background: #fee2e2; color: #b91c1c; }
.cc-pill--slate { background: #f1f5f9; color: #475569; }

.cc-workflow {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    align-items: center;
}
.cc-donut {
    width: 10.5rem;
    height: 10.5rem;
    border-radius: 50%;
    margin: 0 auto;
    display: grid;
    place-items: center;
}
.cc-donut__hole {
    width: 6.6rem;
    height: 6.6rem;
    border-radius: 50%;
    background: #fff;
    display: grid;
    place-content: center;
    text-align: center;
}
.cc-donut__hole strong {
    font-size: 1.4rem;
    color: #0f172a;
}
.cc-donut__hole span {
    font-size: 0.72rem;
    color: #64748b;
}
.cc-legend {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.45rem;
}
.cc-legend li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.86rem;
    color: #475569;
}
.cc-legend i {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 999px;
    display: inline-block;
}
.cc-legend b { margin-left: auto; color: #0f172a; }
.cc-legend__total {
    margin-top: 0.35rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e5e7eb;
    font-weight: 700;
    color: #0f172a;
}

.cc-list,
.cc-activity {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.7rem;
}
.cc-list li {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}
.cc-list__title {
    color: #0f172a;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.9rem;
}
.cc-list__title:hover { color: #2563eb; }
.cc-list p {
    margin: 0.15rem 0 0;
    font-size: 0.78rem;
    color: #64748b;
}

.cc-activity li {
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
}
.cc-activity__dot {
    width: 0.65rem;
    height: 0.65rem;
    margin-top: 0.35rem;
    border-radius: 999px;
    background: #2563eb;
    flex-shrink: 0;
}
.cc-activity__title {
    margin: 0;
    font-size: 0.88rem;
    color: #0f172a;
    font-weight: 600;
    text-transform: capitalize;
}
.cc-activity__meta {
    margin: 0.15rem 0 0;
    font-size: 0.76rem;
    color: #64748b;
}

.cc-insight-label {
    margin: 0 0 0.45rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748b;
}
.cc-statusbar {
    display: flex;
    height: 0.7rem;
    border-radius: 999px;
    overflow: hidden;
    background: #e5e7eb;
}
.cc-statusbar span { display: block; height: 100%; }
.cc-status-legend {
    list-style: none;
    margin: 0.65rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.3rem;
}
.cc-status-legend li {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: #475569;
}
.cc-status-legend i {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
}
.cc-insight-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    margin-top: 1rem;
}
.cc-insight {
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 0.75rem;
    background: #f8fafc;
}
.cc-insight p {
    margin: 0;
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 700;
}
.cc-insight strong {
    display: block;
    margin-top: 0.25rem;
    font-size: 1.35rem;
    color: #0f172a;
}
.cc-insight strong.is-ready { color: #16a34a; }
.cc-insight span {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.72rem;
    color: #64748b;
}

.cc-footer {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.35rem 0.15rem 0.75rem;
    color: #64748b;
    font-size: 0.78rem;
}

@media (min-width: 720px) {
    .cc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cc-workflow { grid-template-columns: auto 1fr; }
}

@media (min-width: 1100px) {
    .shell {
        grid-template-columns: 17.5rem minmax(0, 1fr);
    }

    .shell-sidebar {
        position: sticky;
        top: 0;
        height: 100vh;
        width: 17.5rem;
        transform: none;
    }

    .shell-sidebar__close,
    .shell-menu-btn,
    .shell-backdrop { display: none; }

    .shell-topbar { padding: 0.95rem 1.35rem; }
    .shell-content { padding: 1.25rem 1.35rem 1.5rem; }
    .shell-topbar-switcher { display: block; min-width: 22rem; }
    .shell-topbar__greeting h1 { font-size: 1.2rem; }

    .cc-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .cc-grid-2 { grid-template-columns: 1.35fr 0.9fr; }
    .cc-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .cc-footer {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

/* ——— Shared page chrome (all modules) ——— */
.page-stack {
    display: grid;
    gap: 1rem;
}

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

.page-head__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.page-title {
    margin: 0.2rem 0 0;
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--ink);
    line-height: 1.2;
}

.page-subtitle {
    margin: 0.35rem 0 0;
    color: var(--muted);
    font-size: 0.92rem;
    max-width: 44rem;
}

.page-section-title {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    font-weight: 800;
    color: var(--ink);
}

.page-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    gap: 0.65rem;
}

.page-stat {
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background: #f8fafc;
    padding: 0.75rem 0.85rem;
    font-size: 0.86rem;
    color: var(--muted);
}

.page-stat strong {
    display: block;
    margin-top: 0.2rem;
    font-size: 1.25rem;
    color: var(--ink);
}

.page-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.page-filters .edms-btn.is-active,
.edms-btn.is-active {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
}

.shell-content .space-y-6 {
    display: grid;
    gap: 1rem;
}

.shell-content .space-y-6 > * + * {
    margin-top: 0;
}

.shell-content .space-y-4 {
    display: grid;
    gap: 1rem;
}

.shell-content .space-y-4 > * + * {
    margin-top: 0;
}

.shell-content table.min-w-full {
    width: 100%;
    border-collapse: collapse;
}

.shell-content table.min-w-full thead {
    background: #f8fafc;
}

.shell-content table.min-w-full th {
    text-align: left;
    color: #64748b;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
}

.shell-content table.min-w-full td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: middle;
}

.shell-content table.min-w-full tbody tr:hover {
    background: #f8fafc;
}

.shell-content .rounded-lg.border,
.shell-content article.rounded-lg {
    border-color: var(--border) !important;
    background: #fff !important;
    border-radius: 0.75rem !important;
}

.shell-content .bg-white\/40,
.shell-content .bg-white\/50 {
    background: #fff !important;
}

.shell-content .text-green-800 {
    color: var(--success) !important;
    font-weight: 600;
}

.shell-content a.font-medium,
.shell-content a.underline {
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
}

.shell-content a.font-medium:hover,
.shell-content a.underline:hover {
    text-decoration: underline;
}

.shell-content h2.font-medium {
    font-size: 1rem;
    font-weight: 800;
    color: var(--ink);
}

.edms-card > h1.text-xl,
.edms-card h1.text-xl {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ink);
}

.edms-card.overflow-x-auto.p-0 {
    overflow: hidden;
}

.edms-card.overflow-x-auto.p-0 > .border-b,
.edms-card.overflow-x-auto > div.border-b {
    background: #f8fafc;
    font-weight: 800;
    color: var(--ink);
}

