/* EDMS production UI — static CSS (no Vite/Node required). */
:root {
    --background: #f3f4f6;
    --surface: #ffffff;
    --ink: #0f172a;
    --foreground: #334155;
    --muted: #6b7280;
    --border: #e5e7eb;
    --accent: #d64894;
    --accent-soft: rgba(214, 72, 148, 0.12);
    --accent-hover: #b8327a;
    --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(214, 72, 148, 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(214, 72, 148, 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(214, 72, 148, 0.12);
    color: #b8327a;
    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(214, 72, 148, 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__logo {
    display: block;
    width: min(13.75rem, 72vw);
    height: auto;
    filter: drop-shadow(0 10px 24px rgba(214, 72, 148, 0.28));
}

.login-brand__mark {
    display: inline-flex;
    flex-shrink: 0;
    filter: drop-shadow(0 8px 16px rgba(214, 72, 148, 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(214, 72, 148, 0.2); color: #f472b6; }
.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: #d64894;
    box-shadow: 0 0 0 3px rgba(214, 72, 148, 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: #d64894;
}

.login-link {
    border: 0;
    background: none;
    padding: 0;
    color: #d64894;
    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: #d64894;
    color: #fff;
    font-size: 0.98rem;
    font-weight: 700;
    padding: 0.85rem 1rem;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(214, 72, 148, 0.25);
}

.login-submit:hover { background: #b8327a; }
.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-logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    min-width: 0;
    text-decoration: none;
}

.shell-brand-logo img {
    display: block;
    width: min(10.5rem, 100%);
    height: auto;
}

.shell-brand-org {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: rgba(226, 232, 240, 0.72);
    max-width: 11rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.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(244, 114, 182, 0.9);
    max-width: 9.5rem;
}

.shell-sidebar__collapse,
.shell-sidebar__close {
    margin-left: auto;
    border: 0;
    background: transparent;
    color: #94a3b8;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 0.45rem;
    flex-shrink: 0;
}

.shell-sidebar__collapse:hover,
.shell-sidebar__close:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.shell-sidebar__collapse { display: none; }

.shell-expand-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.55rem;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #374151;
    cursor: pointer;
    flex-shrink: 0;
}

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

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

.shell-nav-section {
    margin: 0.85rem 0 0.2rem;
    padding: 0 0.55rem;
    font-size: 0.62rem;
    font-weight: 650;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #7f90a8;
    line-height: 1.2;
    list-style: none;
}

.shell-nav-divider {
    list-style: none;
    height: 1px;
    margin: 0.55rem 0.35rem 0.25rem;
    background: rgba(255, 255, 255, 0.08);
    border: 0;
}

.nav-group {
    list-style: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0.2rem 0;
}

.nav-group:last-child { border-bottom: 0; }

.nav-group.is-open {
    margin: 0.15rem 0 0.35rem;
    padding: 0.2rem 0 0.35rem;
    border-radius: 0.9rem;
    border-bottom-color: transparent;
    background: linear-gradient(180deg, rgba(214, 72, 148, 0.12), rgba(88, 28, 135, 0.06));
    box-shadow: inset 2px 0 0 #ec4899;
}

.nav-group--tasks.is-open {
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.12), rgba(30, 64, 175, 0.05));
    box-shadow: inset 2px 0 0 #3b82f6;
}

.nav-group--site.is-open {
    background: linear-gradient(180deg, rgba(249, 115, 22, 0.12), rgba(154, 52, 18, 0.05));
    box-shadow: inset 2px 0 0 #f97316;
}

.nav-group--quality.is-open {
    background: linear-gradient(180deg, rgba(34, 197, 94, 0.12), rgba(21, 128, 61, 0.05));
    box-shadow: inset 2px 0 0 #22c55e;
}

.nav-group--commissioning.is-open {
    background: linear-gradient(180deg, rgba(20, 184, 166, 0.12), rgba(15, 118, 110, 0.05));
    box-shadow: inset 2px 0 0 #14b8a6;
}

.nav-group--ehs.is-open {
    background: linear-gradient(180deg, rgba(244, 63, 94, 0.12), rgba(159, 18, 57, 0.05));
    box-shadow: inset 2px 0 0 #f43f5e;
}

.nav-group--admin.is-open {
    background: linear-gradient(180deg, rgba(167, 139, 250, 0.12), rgba(91, 33, 182, 0.05));
    box-shadow: inset 2px 0 0 #a78bfa;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    width: 100%;
    border: 0;
    background: transparent;
    color: #e8eef7;
    text-decoration: none;
    border-radius: 0.85rem;
    padding: 0.65rem 0.7rem;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.nav-item.is-active,
.nav-item--dash.is-active {
    background: linear-gradient(90deg, rgba(214, 72, 148, 0.42), rgba(88, 28, 135, 0.22) 55%, rgba(15, 23, 42, 0));
    box-shadow: inset 3px 0 0 #ec4899;
    color: #fff;
}

.nav-group.is-open > .nav-item,
.nav-group.is-open > .nav-item.is-active {
    background: transparent;
    box-shadow: none;
}

.nav-item__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 0.7rem;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
}

.nav-item--dash .nav-item__icon {
    background: transparent;
    color: #fff;
}

.nav-item__icon--documents { background: rgba(236, 72, 153, 0.16); color: #f472b6; }
.nav-item__icon--tasks { background: rgba(59, 130, 246, 0.16); color: #60a5fa; }
.nav-item__icon--site { background: rgba(249, 115, 22, 0.16); color: #fb923c; }
.nav-item__icon--quality { background: rgba(34, 197, 94, 0.16); color: #4ade80; }
.nav-item__icon--commissioning { background: rgba(20, 184, 166, 0.16); color: #2dd4bf; }
.nav-item__icon--ehs { background: rgba(244, 63, 94, 0.16); color: #fb7185; }
.nav-item__icon--admin { background: rgba(167, 139, 250, 0.16); color: #c4b5fd; }

.nav-item__body {
    min-width: 0;
    flex: 1;
    display: grid;
    gap: 0.12rem;
}

.nav-item__title {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-item__desc {
    display: block;
    font-size: 0.72rem;
    font-weight: 500;
    color: #8b9bb3;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-item__chevron {
    margin-left: auto;
    flex-shrink: 0;
    color: #94a3b8;
    transition: transform 0.15s ease;
}

.nav-group--documents .nav-item__chevron { color: #f472b6; }
.nav-group--tasks .nav-item__chevron { color: #60a5fa; }
.nav-group--site .nav-item__chevron { color: #fb923c; }
.nav-group--quality .nav-item__chevron { color: #4ade80; }
.nav-group--commissioning .nav-item__chevron { color: #2dd4bf; }
.nav-group--ehs .nav-item__chevron { color: #fb7185; }
.nav-group--admin .nav-item__chevron { color: #c4b5fd; }

.nav-item__chevron.is-open {
    transform: rotate(180deg);
}

.nav-sub {
    list-style: none;
    margin: 0.1rem 0.45rem 0.25rem;
    padding: 0.15rem 0;
    display: grid;
    gap: 0.12rem;
}

.nav-sublink {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: #c5d0e0;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 550;
    padding: 0.55rem 0.65rem 0.55rem 0.7rem;
    border-radius: 0.65rem;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.nav-sublink__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.15rem;
    height: 1.15rem;
    flex-shrink: 0;
    color: #9aa8bc;
}

.nav-sublink__label {
    min-width: 0;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-sublink__chevron {
    flex-shrink: 0;
    color: #7f90a8;
    opacity: 0.85;
}

.nav-sublink:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.nav-sublink:hover .nav-sublink__icon,
.nav-sublink:hover .nav-sublink__chevron {
    color: #fff;
}

.nav-sublink.is-active {
    color: #fff;
    background: rgba(214, 72, 148, 0.22);
    box-shadow: inset 3px 0 0 #ec4899;
}

.nav-group--tasks .nav-sublink.is-active {
    background: rgba(59, 130, 246, 0.2);
    box-shadow: inset 3px 0 0 #3b82f6;
}

.nav-group--site .nav-sublink.is-active {
    background: rgba(249, 115, 22, 0.2);
    box-shadow: inset 3px 0 0 #f97316;
}

.nav-group--quality .nav-sublink.is-active {
    background: rgba(34, 197, 94, 0.2);
    box-shadow: inset 3px 0 0 #22c55e;
}

.nav-group--commissioning .nav-sublink.is-active {
    background: rgba(20, 184, 166, 0.2);
    box-shadow: inset 3px 0 0 #14b8a6;
}

.nav-group--ehs .nav-sublink.is-active {
    background: rgba(244, 63, 94, 0.2);
    box-shadow: inset 3px 0 0 #f43f5e;
}

.nav-group--admin .nav-sublink.is-active {
    background: rgba(167, 139, 250, 0.2);
    box-shadow: inset 3px 0 0 #a78bfa;
}

.nav-sublink.is-active .nav-sublink__icon,
.nav-sublink.is-active .nav-sublink__chevron {
    color: #fff;
}

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

/* legacy aliases kept for any residual markup */
.shell-nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    width: 100%;
    border: 0;
    background: transparent;
    color: #d5deea;
    text-decoration: none;
    border-radius: 0.65rem;
    padding: 0.62rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
}

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

.shell-nav-sublink.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.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, #d64894, #8b2a66);
    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%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: transparent;
    color: #cbd5e1;
    border-radius: 0.55rem;
    padding: 0.55rem 0.7rem;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
}

.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;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.shell-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    min-height: 3.6rem;
    background: rgba(255, 255, 255, 0.96);
    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.25rem;
    height: 2.25rem;
    border-radius: 0.55rem;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #374151;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    flex-shrink: 0;
}

.shell-menu-btn:hover,
.shell-icon-btn:hover,
.shell-expand-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.shell-icon-btn--brand {
    background: linear-gradient(135deg, #e879f9, #d64894 55%, #a21caf);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 8px 16px rgba(214, 72, 148, 0.28);
}

.shell-icon-btn--brand:hover {
    background: linear-gradient(135deg, #f0abfc, #db2777 55%, #86198f);
    border-color: transparent;
    color: #fff;
}

.shell-chip-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    height: 2.25rem;
    padding: 0 0.75rem;
    border-radius: 0.55rem;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #1f2937;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    flex-shrink: 0;
}

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

.shell-topbar__search {
    flex: 1 1 12rem;
    min-width: 0;
    max-width: 20rem;
}

.shell-global-search__field {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    height: 2.25rem;
    padding: 0 0.7rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.55rem;
    background: #fff;
    color: #94a3b8;
}

.shell-global-search__field:focus-within {
    border-color: var(--brand, #d64894);
    box-shadow: 0 0 0 3px rgba(214, 72, 148, 0.12);
    color: #334155;
}

.shell-global-search__input {
    width: 100%;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    height: auto !important;
    font-size: 0.84rem;
    color: #0f172a;
}

.shell-global-search__input::placeholder {
    color: #94a3b8;
}

.shell-global-search__kbd {
    display: none;
    margin-left: auto;
    flex-shrink: 0;
    padding: 0.12rem 0.4rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.35rem;
    background: #f8fafc;
    color: #94a3b8;
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.2;
    font-family: inherit;
}

.shell-topbar__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
    min-width: 0;
}

.shell-topbar__context {
    display: block;
    flex-shrink: 1;
    min-width: 0;
    max-width: 100%;
}

.shell-topbar-tools {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    min-width: 0;
}

.shell-switcher {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    min-width: 0;
}

.shell-switcher__field {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin: 0;
    min-width: 0;
}

.shell-switcher__field span {
    font-size: 0.65rem;
    font-weight: 600;
    color: #6b7280;
    line-height: 1;
}

.shell-switcher__control {
    position: relative;
    display: flex;
    align-items: center;
}

.shell-switcher__icon {
    position: absolute;
    left: 0.6rem;
    color: #64748b;
    pointer-events: none;
    z-index: 1;
}

.shell-switcher .edms-input,
.shell-switcher select {
    width: auto;
    min-width: 10.5rem;
    max-width: 15rem;
    height: 2.25rem;
    border-radius: 0.55rem;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.3rem 1.75rem 0.3rem 1.85rem;
    background: #fff;
}

.shell-switcher__field:last-child .edms-input,
.shell-switcher__field:last-child select {
    min-width: 12rem;
    max-width: 18rem;
}

.shell-recent,
.shell-profile {
    position: relative;
    flex-shrink: 0;
}

.shell-avatar--btn {
    border: 0;
    cursor: pointer;
    padding: 0;
}

.shell-avatar--btn:focus-visible {
    outline: 2px solid var(--brand, #d64894);
    outline-offset: 2px;
}

.shell-menu-panel {
    position: absolute;
    top: calc(100% + 0.4rem);
    right: 0;
    z-index: 40;
    min-width: 13.5rem;
    padding: 0.4rem;
    border-radius: 0.7rem;
    border: 1px solid #e5e7eb;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.shell-recent__panel {
    min-width: 15rem;
}

.shell-menu-panel__label {
    margin: 0;
    padding: 0.35rem 0.55rem 0.45rem;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6b7280;
}

.shell-menu-panel__empty {
    margin: 0;
    padding: 0.55rem;
    font-size: 0.82rem;
    color: #6b7280;
}

.shell-menu-panel__item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    width: 100%;
    border: 0;
    background: transparent;
    color: #111827;
    text-align: left;
    text-decoration: none;
    border-radius: 0.5rem;
    padding: 0.5rem 0.55rem;
    cursor: pointer;
    font-size: 0.84rem;
    font-weight: 600;
}

.shell-menu-panel__item span {
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
}

.shell-menu-panel__item:hover {
    background: #f8fafc;
}

.shell-menu-panel__item--danger {
    color: #b91c1c;
}

.shell-profile__meta {
    padding: 0.45rem 0.55rem 0.55rem;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 0.25rem;
}

.shell-profile__meta strong {
    display: block;
    font-size: 0.86rem;
    color: #111827;
}

.shell-profile__meta span {
    display: block;
    margin-top: 0.1rem;
    font-size: 0.75rem;
    color: #6b7280;
    word-break: break-all;
}

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

/* Command Centre dashboard */
.cc { display: grid; gap: 1rem; }
.cc-pagehead {
    margin-bottom: 0.35rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}
.cc-pagehead__copy { min-width: 0; flex: 1; }
.cc-pagehead__art {
    display: none;
    flex-shrink: 0;
    width: min(18rem, 38%);
    margin-top: -0.35rem;
}
.cc-pagehead__art svg { width: 100%; height: auto; display: block; }
.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-title__accent { color: #d64894; }
.cc-subtitle { margin: 0.3rem 0 0; color: #6b7280; font-size: 0.92rem; }
.cc-empty-state {
    display: grid;
    justify-items: center;
    text-align: center;
    gap: 0.45rem;
    padding: 2rem 1rem 1.5rem;
}
.cc-empty-state__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 999px;
    background: rgba(214, 72, 148, 0.1);
    color: #d64894;
    margin-bottom: 0.25rem;
}
.cc-empty-state__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 750;
    color: #0f172a;
}
.cc-empty-state__cta {
    margin-top: 0.55rem;
}

.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(214, 72, 148, 0.12); color: #d64894; }
.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: #d64894; }
.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: #d64894;
    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: #d64894; }
.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: #b8327a; }
.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: #d64894; }
.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: #d64894;
    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 (max-width: 1099px) {
    .shell-topbar {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .shell-topbar__search {
        flex: 1 1 calc(100% - 3rem);
        max-width: none;
    }

    .shell-topbar__actions {
        width: 100%;
        margin-left: 0;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .shell-topbar__context {
        width: 100%;
    }

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

    .shell-switcher {
        flex: 1 1 auto;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.45rem;
    }

    .shell-switcher .edms-input,
    .shell-switcher select,
    .shell-switcher__field:last-child .edms-input,
    .shell-switcher__field:last-child select {
        min-width: 0;
        max-width: none;
        width: 100%;
    }
}

@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: 18.5rem minmax(0, 1fr);
        transition: grid-template-columns 0.2s ease;
    }

    .shell.is-nav-collapsed {
        grid-template-columns: 0 minmax(0, 1fr);
    }

    .shell-sidebar {
        position: sticky;
        top: 0;
        height: 100vh;
        width: 18.5rem;
        transform: none;
        transition: transform 0.2s ease, width 0.2s ease;
    }

    .shell.is-nav-collapsed .shell-sidebar {
        transform: translateX(-105%);
        pointer-events: none;
    }

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

    .shell.is-nav-collapsed .shell-expand-btn { display: inline-flex; }

    .shell-topbar { padding: 0.65rem 1.25rem; }
    .shell-content { padding: 1.25rem 1.35rem 1.5rem; }
    .shell-topbar__context { display: block; }
    .shell-topbar__search { max-width: 24rem; }
    .shell-global-search__kbd { display: inline-block; }

    .cc-pagehead__art { display: block; }
    .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-eyebrow {
    margin: 0 0 0.35rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted, #6b7c93);
}

.page-head h1 {
    margin: 0;
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--ink, #0b1220);
    line-height: 1.2;
}

.page-lead {
    margin: 0.4rem 0 0;
    color: var(--muted, #6b7c93);
    font-size: 0.95rem;
    max-width: 44rem;
    line-height: 1.45;
}

.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);
}


/* ——— Master Document Register ——— */
.mdr { gap: 1rem; }
.mdr-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}
.mdr-breadcrumb {
    margin: 0 0 0.35rem;
    font-size: 0.78rem;
    color: #94a3b8;
    font-weight: 500;
}
.mdr-breadcrumb span { color: #cbd5e1; margin: 0 0.2rem; }
.mdr-title {
    margin: 0;
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #0f172a;
    line-height: 1.15;
}
.mdr-subtitle {
    margin: 0.35rem 0 0;
    color: #64748b;
    font-size: 0.95rem;
}
.mdr-head__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
}
.mdr-toast {
    margin: 0;
    padding: 0.65rem 0.85rem;
    border-radius: 0.65rem;
    background: #ecfdf5;
    color: #166534;
    font-size: 0.88rem;
    font-weight: 600;
}
.mdr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    height: 2.35rem;
    padding: 0 0.9rem;
    border-radius: 0.65rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #0f172a;
    font-size: 0.86rem;
    font-weight: 650;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}
.mdr-btn:hover { background: #f8fafc; border-color: #cbd5e1; }
.mdr-btn--primary {
    background: #d64894;
    border-color: #d64894;
    color: #fff;
    box-shadow: 0 8px 16px rgba(214, 72, 148, 0.2);
}
.mdr-btn--primary:hover {
    background: #c23d84;
    border-color: #c23d84;
    color: #fff;
}
.mdr-btn--ghost { background: #fff; }
.mdr-btn.is-disabled,
.mdr-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}
.mdr-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 0.65rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    cursor: pointer;
    flex-shrink: 0;
}
.mdr-icon-btn:hover { background: #f8fafc; color: #0f172a; }

.mdr-toolbar {
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 0.95rem;
    padding: 0.85rem;
    display: grid;
    gap: 0.75rem;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.03);
}
.mdr-toolbar__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
}
.mdr-toolbar__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.15rem;
}
.mdr-toolbar__right {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
}
.mdr-search {
    position: relative;
    flex: 1 1 16rem;
    min-width: 12rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    height: 2.35rem;
    padding: 0 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    background: #fff;
    color: #94a3b8;
}
.mdr-search:focus-within {
    border-color: #d64894;
    box-shadow: 0 0 0 3px rgba(214, 72, 148, 0.12);
    color: #64748b;
}
.mdr-search input {
    width: 100%;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    height: auto !important;
    font-size: 0.88rem;
    color: #0f172a;
}
.mdr-select {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    height: 2.35rem;
    padding: 0 0.55rem 0 0.7rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    background: #fff;
    color: #64748b;
    min-width: 8.5rem;
}
.mdr-select select {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 1.1rem 0 0 !important;
    height: auto !important;
    width: auto;
    min-width: 0;
    font-size: 0.84rem;
    font-weight: 550;
    color: #0f172a;
    cursor: pointer;
}
.mdr-select--view { min-width: 11rem; }
.mdr-select--sort { min-width: 14rem; }
.mdr-select--compact { min-width: 8rem; height: 2.1rem; }
.mdr-views {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}
.mdr-views__label {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 600;
}
.mdr-save-view { position: relative; }
.mdr-save-panel {
    position: absolute;
    top: calc(100% + 0.4rem);
    left: 0;
    z-index: 20;
    display: flex;
    gap: 0.4rem;
    padding: 0.55rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.7rem;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
    min-width: 16rem;
}
.mdr-input {
    flex: 1;
    height: 2.15rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.55rem;
    padding: 0 0.65rem;
    font-size: 0.84rem;
}

.mdr-table-card {
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 0.95rem;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.03);
}
.mdr-table-wrap { overflow-x: auto; }
.mdr-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 52rem;
}
.mdr-table thead th {
    padding: 0.75rem 0.85rem;
    text-align: left;
    font-size: 0.68rem;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94a3b8;
    background: #fafbfc;
    border-bottom: 1px solid #eef2f7;
    white-space: nowrap;
}
.mdr-th-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    border: 0;
    background: transparent;
    padding: 0;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    cursor: pointer;
}
.mdr-th-btn.is-active { color: #d64894; }
.mdr-table tbody td {
    padding: 0.85rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
    color: #334155;
    vertical-align: middle;
}
.mdr-table tbody tr:hover td { background: #fafbfd; }
.mdr-table__check { width: 2.6rem; }
.mdr-table__actions { width: 2.8rem; text-align: right; }
.mdr-docnum {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: #0f172a;
    font-weight: 700;
    text-decoration: none;
}
.mdr-docnum:hover { color: #d64894; }
.mdr-fileicon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.1rem;
    height: 1.35rem;
    padding: 0 0.3rem;
    border-radius: 0.3rem;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #fff;
}
.mdr-fileicon--pdf { background: #ef4444; }
.mdr-fileicon--dwg { background: #2563eb; }
.mdr-fileicon--xls { background: #16a34a; }
.mdr-title-cell { color: #0f172a; font-weight: 550; max-width: 18rem; }
.mdr-rev { font-weight: 650; color: #475569; }
.mdr-status {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}
.mdr-status--approved { background: #dcfce7; color: #166534; }
.mdr-status--review { background: #dbeafe; color: #1d4ed8; }
.mdr-status--draft { background: #ffedd5; color: #c2410c; }
.mdr-status--rejected { background: #fee2e2; color: #b91c1c; }
.mdr-row-menu { position: relative; display: inline-flex; justify-content: flex-end; width: 100%; }
.mdr-kebab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 0.5rem;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
}
.mdr-kebab:hover { background: #f1f5f9; color: #0f172a; }
.mdr-menu-panel {
    position: absolute;
    top: calc(100% + 0.25rem);
    right: 0;
    z-index: 25;
    min-width: 10rem;
    padding: 0.35rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.65rem;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}
.mdr-menu-item {
    display: block;
    padding: 0.5rem 0.6rem;
    border-radius: 0.45rem;
    color: #0f172a;
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 600;
}
.mdr-menu-item:hover { background: #f8fafc; }
.mdr-empty {
    text-align: center;
    color: #64748b;
    padding: 2.5rem 1rem !important;
}

.mdr-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    border-top: 1px solid #eef2f7;
    background: #fcfcfd;
}
.mdr-foot__bulk {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
}
.mdr-foot__hint { font-size: 0.84rem; color: #64748b; font-weight: 550; }
.mdr-foot__pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
}
.mdr-foot__range { font-size: 0.84rem; color: #64748b; font-weight: 550; }
.mdr-pages { display: inline-flex; align-items: center; gap: 0.25rem; }
.mdr-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.45rem;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
    font-size: 0.84rem;
    font-weight: 650;
    cursor: pointer;
}
.mdr-page-btn:hover:not(:disabled) { background: #f8fafc; }
.mdr-page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.mdr-page-btn.is-active {
    background: #d64894;
    border-color: #d64894;
    color: #fff;
}

@media (max-width: 900px) {
    .mdr-title { font-size: 1.4rem; }
    .mdr-toolbar__meta { align-items: stretch; }
    .mdr-foot { flex-direction: column; align-items: stretch; }
    .mdr-foot__pager { justify-content: space-between; }
}

/* ——— Drawings register ——— */
.drw-disciplines {
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 0.95rem;
    padding: 0.85rem 1rem;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.03);
}
.drw-disciplines__label {
    margin: 0 0 0.65rem;
    font-size: 0.82rem;
    font-weight: 750;
    color: #0f172a;
}
.drw-disciplines__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}
.drw-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 2rem;
    padding: 0 0.85rem;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
    font-size: 0.82rem;
    font-weight: 650;
    cursor: pointer;
}
.drw-chip:hover { background: #f8fafc; border-color: #cbd5e1; }
.drw-chip.is-active {
    background: #d64894;
    border-color: #d64894;
    color: #fff;
    box-shadow: 0 6px 14px rgba(214, 72, 148, 0.22);
}
.drw-toolbar__filters {
    align-items: flex-end;
}
.drw-field {
    display: inline-flex;
    flex-direction: column;
    gap: 0.28rem;
    min-width: 8.5rem;
}
.drw-field__label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.02em;
}
.drw-field .mdr-select { width: 100%; }
.drw-clear {
    border: 0;
    background: transparent;
    color: #2563eb;
    font-size: 0.84rem;
    font-weight: 650;
    cursor: pointer;
    padding: 0.4rem 0.2rem;
    margin-left: auto;
    align-self: flex-end;
}
.drw-clear:hover { color: #1d4ed8; text-decoration: underline; }
.drw-clear.is-muted { color: #94a3b8; }
.drw-clear.is-muted:hover { color: #64748b; }
.drw-table { min-width: 60rem; }
.drw-docnum { font-weight: 700; }
.drw-badges {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}
.drw-suitability {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.45rem;
    border-radius: 0.4rem;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.02em;
}
.drw-date { color: #64748b; white-space: nowrap; }
.drw-links {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    white-space: nowrap;
}
.drw-link-icon {
    display: inline-flex;
    color: #64748b;
    text-decoration: none;
}
.drw-link-icon:hover { color: #d64894; }
.drw-link-mdr {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 650;
    text-decoration: none;
}
.drw-link-mdr:hover { color: #d64894; }

@media (max-width: 900px) {
    .drw-clear { margin-left: 0; }
}

/* ——— Transmittals (Issue Control) ——— */
.trx-saved-views {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    height: 2.35rem;
    padding: 0 0.85rem;
    border-radius: 0.65rem;
    border: 1px solid #f0b6d6;
    background: #fff;
    color: #d64894;
    font-size: 0.86rem;
    font-weight: 650;
    cursor: pointer;
}
.trx-saved-views:hover { background: #fdf2f8; }
.trx-card { overflow: visible; }
.trx-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: flex-end;
    padding: 0.95rem 1rem;
    border-bottom: 1px solid #eef2f7;
}
.trx-filters .mdr-search { flex: 1 1 16rem; }
.trx-clear {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 0;
    background: transparent;
    color: #d64894;
    font-size: 0.84rem;
    font-weight: 650;
    cursor: pointer;
    padding: 0.4rem 0.2rem;
    margin-left: auto;
    align-self: flex-end;
}
.trx-clear:hover { color: #c23d84; text-decoration: underline; }
.trx-clear.is-muted { color: #94a3b8; }
.trx-clear.is-muted:hover { color: #64748b; text-decoration: none; }
.trx-table { min-width: 58rem; }
.trx-table tbody tr:nth-child(even) td { background: #fcfcfd; }
.trx-number {
    font-weight: 750;
    color: #0f172a;
    letter-spacing: -0.01em;
}
.trx-status--issued { background: #dbeafe; color: #1d4ed8; }
.trx-status--draft { background: #f1f5f9; color: #475569; }
.trx-status--responded { background: #dcfce7; color: #166534; }
.trx-due {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    color: #64748b;
    white-space: nowrap;
}
.trx-due.is-overdue { color: #0f172a; }
.trx-overdue {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    color: #dc2626;
    font-size: 0.78rem;
    font-weight: 750;
}
.trx-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    padding: 0.9rem 1.05rem;
    border-radius: 0.85rem;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1e3a8a;
}
.trx-banner__copy {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin: 0;
}
.trx-banner__copy p {
    margin: 0;
    font-size: 0.9rem;
    color: #1e40af;
    line-height: 1.45;
}
.trx-banner__copy strong { color: #1e3a8a; font-weight: 750; }
.trx-banner__copy svg { flex-shrink: 0; margin-top: 0.1rem; color: #2563eb; }
.trx-banner__link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #d64894;
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
.trx-banner__link:hover { color: #c23d84; text-decoration: underline; }

@media (max-width: 900px) {
    .trx-clear { margin-left: 0; }
    .trx-banner { align-items: flex-start; }
}

/* ——— RFIs & TQs ——— */
.rfi-export {
    border-color: #f0b6d6;
    color: #0f172a;
}
.rfi-export svg { color: #d64894; }
.rfi-export:hover { background: #fdf2f8; border-color: #e8a0c8; }
.rfi-new { position: relative; }
.rfi-new__menu {
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 0;
    z-index: 30;
    min-width: 10rem;
    padding: 0.35rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.65rem;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}
.rfi-new__menu .mdr-menu-item {
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    cursor: pointer;
}
.rfi-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}
.rfi-stat {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.95rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.95rem;
    background: #fff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.03);
}
.rfi-stat__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    flex-shrink: 0;
}
.rfi-stat__icon--open,
.rfi-stat__icon--awaiting { background: #dbeafe; color: #2563eb; }
.rfi-stat__icon--overdue { background: #fee2e2; color: #dc2626; }
.rfi-stat__icon--closed { background: #dcfce7; color: #16a34a; }
.rfi-stat__label {
    margin: 0;
    font-size: 0.82rem;
    color: #64748b;
    font-weight: 600;
}
.rfi-stat__value {
    margin: 0.1rem 0 0;
    font-size: 1.45rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.03em;
    line-height: 1.1;
}
.rfi-stat__value--danger { color: #dc2626; }
.rfi-card { overflow: visible; }
.rfi-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.15rem;
    padding: 0.35rem 1rem 0;
    border-bottom: 1px solid #eef2f7;
}
.rfi-tab {
    border: 0;
    background: transparent;
    padding: 0.75rem 0.85rem;
    font-size: 0.88rem;
    font-weight: 650;
    color: #64748b;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.rfi-tab:hover { color: #0f172a; }
.rfi-tab.is-active {
    color: #d64894;
    border-bottom-color: #d64894;
}
.rfi-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: flex-end;
    padding: 0.95rem 1rem 0.55rem;
}
.rfi-filters .mdr-search { flex: 1 1 14rem; }
.rfi-filters-btn { height: 2.35rem; }
.rfi-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    padding: 0.35rem 1rem 0.85rem;
}
.rfi-views {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    color: #64748b;
}
.rfi-views__label {
    font-size: 0.8rem;
    font-weight: 650;
}
.rfi-table { min-width: 64rem; }
.rfi-ref {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}
.rfi-type {
    display: inline-flex;
    align-items: center;
    padding: 0.12rem 0.4rem;
    border-radius: 0.35rem;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}
.rfi-type--rfi { background: #dbeafe; color: #1d4ed8; }
.rfi-type--tq { background: #ede9fe; color: #6d28d9; }
.rfi-ref__code { font-weight: 750; color: #0f172a; }
.rfi-subject { display: grid; gap: 0.2rem; }
.rfi-subject__title { font-weight: 700; color: #0f172a; }
.rfi-subject__doc {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: #64748b;
    font-size: 0.78rem;
}
.rfi-person {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}
.rfi-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 999px;
    background: var(--avatar, #64748b);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}
.rfi-status--awaiting { background: #dbeafe; color: #1d4ed8; }
.rfi-status--review { background: #ffedd5; color: #c2410c; }
.rfi-status--open { background: #e0f2fe; color: #0369a1; }
.rfi-status--answered { background: #dcfce7; color: #166534; }
.rfi-status--closed { background: #f1f5f9; color: #475569; }

@media (max-width: 1100px) {
    .rfi-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .rfi-stats { grid-template-columns: 1fr; }
}

/* ——— Reports ——— */
.rpt-project {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    height: 2.35rem;
    padding: 0 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    background: #fff;
    color: #64748b;
    min-width: 14rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.rpt-project select {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 1rem 0 0 !important;
    height: auto !important;
    font-size: 0.86rem;
    font-weight: 650;
    color: #0f172a;
    cursor: pointer;
    max-width: 18rem;
}
.rpt-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    align-items: stretch;
}
.rpt-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.03);
    overflow: hidden;
    min-height: 100%;
}
.rpt-card.is-disabled { opacity: 0.72; }
.rpt-card__head {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    padding: 1.15rem 1.15rem 0.85rem;
}
.rpt-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 999px;
    background: #fce7f3;
    color: #d64894;
    flex-shrink: 0;
}
.rpt-card__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
}
.rpt-card__desc {
    margin: 0.25rem 0 0;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.45;
}
.rpt-card__body {
    display: grid;
    gap: 0.85rem;
    padding: 0.35rem 1.15rem 1rem;
    flex: 1;
}
.rpt-field {
    display: grid;
    gap: 0.3rem;
}
.rpt-field__label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748b;
}
.rpt-select,
.rpt-select select { width: 100%; min-width: 0; }
.rpt-dates {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
.rpt-date {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    height: 2.35rem;
    padding: 0 0.7rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    background: #fff;
    color: #64748b;
}
.rpt-date input[type="date"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
    border: 0;
}
.rpt-date__display {
    font-size: 0.88rem;
    font-weight: 600;
    color: #0f172a;
}
.rpt-panel {
    padding: 0.85rem 0.95rem;
    border-radius: 0.75rem;
    background: #f0f7ff;
    border: 1px solid #dbeafe;
}
.rpt-panel__title {
    margin: 0 0 0.55rem;
    font-size: 0.8rem;
    font-weight: 750;
    color: #1e3a8a;
}
.rpt-checklist {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.45rem;
}
.rpt-checklist li {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.88rem;
    color: #1e40af;
    font-weight: 550;
}
.rpt-checklist svg { color: #16a34a; flex-shrink: 0; }
.rpt-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.rpt-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    background: #e2e8f0;
    color: #334155;
    font-size: 0.75rem;
    font-weight: 650;
}
.rpt-note {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.7rem 0.85rem;
    border-radius: 0.7rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
}
.rpt-note p { margin: 0; font-size: 0.84rem; line-height: 1.4; }
.rpt-note svg { flex-shrink: 0; margin-top: 0.1rem; }
.rpt-filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
}
.rpt-card__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.85rem;
    padding: 0.95rem 1.15rem;
    border-top: 1px solid #eef2f7;
    background: #fcfcfd;
}
.rpt-card__hint {
    font-size: 0.82rem;
    color: #64748b;
    font-weight: 550;
    padding-left: 0.85rem;
    border-left: 1px solid #e2e8f0;
}
.rpt-locked {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
}

@media (max-width: 980px) {
    .rpt-grid { grid-template-columns: 1fr; }
    .rpt-filters { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .rpt-dates { grid-template-columns: 1fr; }
    .rpt-card__hint { border-left: 0; padding-left: 0; }
}

/* ——— Project audit ——— */
.aud-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
}
.aud-readonly {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 0.72rem;
    font-weight: 750;
}
.aud-readonly--lg {
    background: #eff6ff;
    color: #1e40af;
    font-size: 0.78rem;
    padding: 0.28rem 0.65rem;
}
.aud-filters__row {
    align-items: flex-end;
    width: 100%;
}
.aud-custom-dates {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    padding-top: 0.35rem;
}
.aud-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}
.aud.has-details .aud-layout {
    grid-template-columns: minmax(0, 1.6fr) minmax(18rem, 0.9fr);
}
.aud-card__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.95rem 1rem 0.55rem;
}
.aud-card__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
}
.aud-table { min-width: 42rem; }
.aud-table tbody tr {
    cursor: pointer;
}
.aud-table tbody tr.is-selected td {
    background: #fdf2f8 !important;
}
.aud-table__chev {
    width: 2.4rem;
    text-align: right;
    color: #cbd5e1;
}
.aud-time {
    display: grid;
    gap: 0.1rem;
}
.aud-time strong {
    color: #0f172a;
    font-weight: 750;
}
.aud-time span {
    color: #94a3b8;
    font-size: 0.78rem;
}
.aud-event,
.aud-record {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}
.aud-event__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 999px;
    flex-shrink: 0;
}
.aud-event__icon--export { background: #dbeafe; color: #2563eb; }
.aud-event__icon--upload { background: #dcfce7; color: #16a34a; }
.aud-event__icon--change { background: #fce7f3; color: #d64894; }
.aud-event__icon--success { background: #dcfce7; color: #15803d; }
.aud-event__icon--danger { background: #fee2e2; color: #dc2626; }
.aud-event__icon--neutral { background: #f1f5f9; color: #64748b; }
.aud-record { color: #334155; }
.aud-record svg { color: #2563eb; flex-shrink: 0; }

.aud-details {
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
    padding: 1rem 1.05rem 0.85rem;
    position: sticky;
    top: 1rem;
}
.aud-details__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.aud-details__head h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
}
.aud-details__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 0.5rem;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
}
.aud-details__close:hover { background: #f1f5f9; color: #0f172a; }
.aud-details__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.aud-ref {
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748b;
    font-variant-numeric: tabular-nums;
}
.aud-details__fields {
    margin: 0;
    display: grid;
    gap: 0.85rem;
}
.aud-details__fields dt {
    margin: 0 0 0.25rem;
    font-size: 0.7rem;
    font-weight: 750;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #94a3b8;
}
.aud-details__fields dd {
    margin: 0;
    color: #0f172a;
    font-size: 0.92rem;
    font-weight: 600;
}
.aud-record-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #d64894;
    font-weight: 700;
}
.aud-changes {
    margin-top: 1.15rem;
    padding-top: 0.95rem;
    border-top: 1px solid #eef2f7;
}
.aud-changes h4 {
    margin: 0 0 0.75rem;
    font-size: 0.88rem;
    font-weight: 800;
    color: #0f172a;
}
.aud-change { margin-bottom: 0.85rem; }
.aud-change__field {
    margin: 0 0 0.4rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
}
.aud-change__boxes {
    display: grid;
    gap: 0.45rem;
}
.aud-change__box {
    padding: 0.55rem 0.7rem;
    border-radius: 0.55rem;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #334155;
    font-size: 0.84rem;
}
.aud-change__box span { color: #64748b; font-weight: 650; }
.aud-change__box--new {
    background: #eff6ff;
    border-color: #bfdbfe;
}
.aud-details__foot {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1.15rem;
    padding-top: 0.85rem;
    border-top: 1px solid #eef2f7;
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 550;
}

@media (max-width: 1100px) {
    .aud.has-details .aud-layout {
        grid-template-columns: 1fr;
    }
    .aud-details { position: static; }
}

/* ——— Workflow templates ——— */
.wf-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}
.wf-layout.has-details {
    grid-template-columns: minmax(0, 1.55fr) minmax(18rem, 0.9fr);
}
.wf-table { min-width: 40rem; }
.wf-table tbody tr { cursor: pointer; }
.wf-table tbody tr.is-selected td {
    background: #fdf2f8 !important;
}
.wf-table tbody tr.is-selected td:first-child {
    box-shadow: inset 3px 0 0 #d64894;
}
.wf-template {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
}
.wf-template__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.55rem;
    flex-shrink: 0;
}
.wf-template__icon--pink { background: #fce7f3; color: #d64894; }
.wf-template__icon--blue { background: #dbeafe; color: #2563eb; }
.wf-template__icon--purple { background: #ede9fe; color: #7c3aed; }
.wf-template__icon--orange { background: #ffedd5; color: #ea580c; }
.wf-template__icon--teal { background: #ccfbf1; color: #0d9488; }
.wf-template__icon--slate { background: #f1f5f9; color: #64748b; }
.wf-template strong {
    display: block;
    color: #0f172a;
    font-weight: 750;
}
.wf-template span {
    display: block;
    margin-top: 0.15rem;
    color: #94a3b8;
    font-size: 0.78rem;
}
.wf-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
}
.wf-status__dot {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 999px;
    background: currentColor;
}
.wf-status--active { background: #dcfce7; color: #166534; }
.wf-status--draft { background: #f1f5f9; color: #475569; }
.wf-list__foot { justify-content: space-between; }

.wf-details {
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
    padding: 1.1rem 1.15rem 1rem;
    position: sticky;
    top: 1rem;
}
.wf-details__head {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}
.wf-details__head h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
}
.wf-details__head p {
    margin: 0.3rem 0 0;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.45;
}
.wf-details__title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
}
.wf-details__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.wf-meta {
    margin: 0 0 1.1rem;
    display: grid;
    gap: 0.75rem;
}
.wf-meta dt {
    margin: 0 0 0.2rem;
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94a3b8;
}
.wf-meta dd {
    margin: 0;
    color: #0f172a;
    font-size: 0.92rem;
    font-weight: 650;
}
.wf-stages h4 {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    font-weight: 800;
    color: #0f172a;
}
.wf-stages__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.75rem;
    position: relative;
}
.wf-stages__list li {
    display: grid;
    grid-template-columns: 1.75rem 1fr;
    gap: 0.7rem;
    align-items: start;
    position: relative;
}
.wf-stages__list li:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 0.8rem;
    top: 1.85rem;
    bottom: -0.75rem;
    width: 2px;
    background: #fbcfe8;
}
.wf-stages__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 999px;
    background: #d64894;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    position: relative;
    z-index: 1;
}
.wf-stages__card {
    border: 1px solid #e5e7eb;
    border-radius: 0.7rem;
    background: #fff;
    padding: 0.7rem 0.8rem;
}
.wf-stages__card strong {
    display: block;
    color: #0f172a;
    font-size: 0.9rem;
}
.wf-stages__card p {
    margin: 0.25rem 0 0;
    color: #64748b;
    font-size: 0.8rem;
    line-height: 1.4;
}
.wf-stages__empty {
    color: #64748b;
    font-size: 0.88rem;
    grid-template-columns: 1fr !important;
}
.wf-note {
    display: flex;
    gap: 0.55rem;
    align-items: flex-start;
    margin-top: 1.1rem;
    padding: 0.75rem 0.85rem;
    border-radius: 0.7rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}
.wf-note p { margin: 0; font-size: 0.84rem; line-height: 1.4; }
.wf-note svg { flex-shrink: 0; margin-top: 0.1rem; color: #2563eb; }
.wf-create {
    display: grid;
    gap: 0.75rem;
}
.wf-create .mdr-input { width: 100%; }
.wf-create__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.35rem;
}
.wf-error {
    color: #b91c1c;
    font-size: 0.78rem;
    font-weight: 600;
}

@media (max-width: 1100px) {
    .wf-layout.has-details { grid-template-columns: 1fr; }
    .wf-details { position: static; }
}
