:root {
    --sb: #16113a;
    --sb-2: #120d31;
    --ac: #7c3aed;
    --acl: #a78bfa;
    --row: #2b1760;
    --bg: #f4f4f6;
    --wh: #fff;
    --bd: #e8e8ec;
    --ink: #1a1035;
    --muted: #777286;
    --tr: .28s cubic-bezier(.4, 0, .2, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }
body {
    margin: 0;
    overflow: hidden;
    font-family: "DM Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
    color: var(--ink);
    background: var(--bg);
}

svg { stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(circle at 18% 22%, rgba(167,139,250,.22), transparent 28%),
        radial-gradient(circle at 80% 18%, rgba(21,128,61,.18), transparent 24%),
        linear-gradient(135deg, #120d31 0%, #2d1b69 56%, #151033 100%);
}
.login-shell {
    width: min(1120px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr);
    align-items: stretch;
    margin: auto;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 28px;
    overflow: hidden;
    background: rgba(255,255,255,.06);
    box-shadow: 0 34px 90px rgba(0,0,0,.32);
    backdrop-filter: blur(22px);
}
.login-card {
    width: 100%;
    padding: 54px 44px;
    border: 0;
    border-left: 1px solid rgba(255,255,255,.12);
    border-radius: 0;
    color: #fff;
    background: rgba(13,9,36,.52);
}
.login-story {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 52px;
    color: #fff;
    overflow: hidden;
}
.login-story::after {
    content: "";
    position: absolute;
    right: -120px;
    bottom: -140px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(167,139,250,.24), transparent 66%);
}
.login-brand-main {
    width: min(320px, 82%);
    padding: 0;
    margin-bottom: 34px;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.login-brand-main img {
    width: 100%;
    max-height: 150px;
    object-fit: contain;
}
.login-chip {
    width: fit-content;
    padding: 7px 11px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 999px;
    color: #d8ccff;
    background: rgba(255,255,255,.08);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.login-story h1 { max-width: 520px; margin: 18px 0 12px; font-size: 40px; line-height: 1.08; font-weight: 700; }
.login-story p { max-width: 570px; margin: 0; color: rgba(255,255,255,.72); font-size: 16px; line-height: 1.65; }
.login-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    max-width: 620px;
    margin-top: 36px;
}
.login-metrics div {
    padding: 16px;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 16px;
    background: rgba(255,255,255,.07);
}
.login-metrics strong { display: block; font-size: 15px; font-weight: 700; }
.login-metrics span { color: rgba(255,255,255,.58); font-size: 12px; }
.login-form-head { margin-bottom: 28px; }
.login-form-head span { color: var(--acl); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.login-form-head strong { display: block; margin-top: 4px; font-size: 22px; font-weight: 700; }
.login-mobile-logo { display: none; }
.login-card label { color: rgba(255,255,255,.68); }
.login-card .form-control {
    min-height: 48px;
    color: #fff;
    background: rgba(255,255,255,.09);
    border-color: rgba(255,255,255,.15);
    border-radius: 12px;
}
.login-card .form-control::placeholder { color: rgba(255,255,255,.35); }
.password-field { position: relative; }
.password-field .form-control { padding-right: 52px; }
.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    padding: 0;
    z-index: 2;
    color: #a78bfa;
    border: 0;
    border-radius: 0;
    background: transparent;
    transform: translateY(-50%);
    box-shadow: none;
}
.password-toggle:hover,
.password-toggle:focus-visible { color: #c4b5fd; background: transparent; outline: none; }
.password-toggle svg { width: 21px; height: 21px; stroke-width: 2.2; }
.password-toggle .eye-closed { display: none; }
.password-toggle.is-visible .eye-open { display: none; }
.password-toggle.is-visible .eye-closed { display: block; }
.login-submit {
    width: 100%;
    min-height: 50px;
    color: #fff;
    background: #7c3aed;
    border: 0;
    border-radius: 12px;
    font-weight: 700;
    box-shadow: 0 16px 36px rgba(124,58,237,.28);
}
.login-submit:hover,
.login-submit:focus-visible { background: #6d28d9; outline: none; }
.pwa-install-button {
    width: 100%;
    min-height: 52px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding: 8px 14px;
    color: #e9e4ff;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(167,139,250,.34);
    border-radius: 12px;
    text-align: left;
}
.pwa-install-button:hover { background: rgba(255,255,255,.11); }
.pwa-install-button svg { width: 22px; height: 22px; flex: 0 0 auto; }
.pwa-install-button strong { display: block; font-size: 13px; font-weight: 600; }
.pwa-install-button small { display: block; color: rgba(255,255,255,.5); font-size: 11px; }
.pwa-sheet {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.pwa-sheet-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    border: 0;
    background: rgba(7,4,24,.68);
    backdrop-filter: blur(4px);
}
.pwa-sheet section {
    position: relative;
    width: min(520px, 100%);
    padding: 26px 24px 32px;
    border-radius: 20px 20px 0 0;
    color: #21163e;
    background: #fff;
    box-shadow: 0 -20px 60px rgba(0,0,0,.25);
}
.pwa-sheet-mark {
    width: 64px;
    height: 64px;
    margin-bottom: 14px;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 8px 24px rgba(22,17,58,.16);
}
.pwa-sheet-mark img { width: 100%; height: 100%; object-fit: cover; }
.pwa-sheet-close {
    position: absolute;
    right: 18px;
    top: 18px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    color: #655d75;
    background: #f2f0f6;
    border: 0;
    border-radius: 50%;
    font-size: 24px;
}
.pwa-sheet section > span { color: var(--ac); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.pwa-sheet h2 { margin: 5px 0 16px; font-size: 22px; font-weight: 600; }
.pwa-sheet ol { margin: 0; padding-left: 22px; color: #5f586e; }
.pwa-sheet li { padding: 5px 0; }
.pwa-sheet-open { overflow: hidden; }

.mobile-bar, .mobile-overlay { display: none; }
.app-shell {
    display: flex;
    height: 100vh;
    min-height: 0;
}
.sidebar {
    width: 265px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow: hidden;
    color: #fff;
    background: var(--sb);
    transition: width var(--tr), transform var(--tr);
}
.sidebar.is-collapsed { width: 64px; }
.brand {
    min-height: 56px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 14px;
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,.07);
}
.brand-mark {
    width: 34px;
    height: 34px;
    max-width: 34px;
    max-height: 34px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 800;
    background: var(--ac);
    overflow: hidden;
}
.brand-mark-icon {
    padding: 3px;
    background: transparent;
}
.brand-mark img,
.brand-mark-icon img {
    width: 28px !important;
    height: 28px !important;
    max-width: 28px !important;
    max-height: 28px !important;
    display: block;
    border-radius: 8px;
    object-fit: cover;
}
.brand-text, .user-text {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
}
.brand strong, .user-box strong { display: block; font-size: 12px; font-weight: 600; }
.brand small, .user-box small { display: block; color: rgba(255,255,255,.36); font-size: 10.5px; }
.collapse-btn {
    margin: 10px 12px;
    padding: 7px;
    display: grid;
    place-items: center;
    color: rgba(255,255,255,.38);
    background: transparent;
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 8px;
}
.collapse-btn:hover { color: #fff; background: rgba(255,255,255,.06); }
.collapse-btn svg { width: 16px; height: 16px; }
.sidebar.is-collapsed .collapse-btn svg { transform: rotate(180deg); }

.menu {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px 0 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.18) transparent;
}
.menu::-webkit-scrollbar { width: 5px; }
.menu::-webkit-scrollbar-thumb { background: rgba(255,255,255,.16); border-radius: 999px; }
.menu-label {
    padding: 12px 18px 5px;
    color: rgba(255,255,255,.24);
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    white-space: nowrap;
}
.menu-parent {
    position: relative;
    width: 100%;
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 16px;
    color: rgba(255,255,255,.83);
    background: transparent;
    border: 0;
    text-align: left;
    transition: background var(--tr), color var(--tr);
}
.menu-parent:hover, .menu-parent.open {
    color: #fff;
    background: var(--row);
}
.menu-parent.open::before {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--acl);
}
.ni-ic {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
}
.menu-title {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    color: inherit;
    font-size: 13px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.chev {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
    opacity: .58;
    transition: transform var(--tr);
}
.menu-parent.open .chev { transform: rotate(90deg); }
.submenu {
    max-height: 0;
    overflow: hidden;
    background: rgba(0,0,0,.12);
    transition: max-height .36s ease;
}
.submenu.open { max-height: 720px; }
.submenu a {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 16px 8px 46px;
    color: rgba(255,255,255,.48);
    font-size: 12.5px;
    text-decoration: none;
    white-space: nowrap;
    transition: background var(--tr), color var(--tr);
}
.submenu.open a:first-child { margin-top: 4px; }
.submenu.open a:last-child { margin-bottom: 8px; }
.submenu a:hover, .submenu a.active {
    color: var(--acl);
    background: rgba(255,255,255,.05);
}
.submenu a.is-disabled {
    color: rgba(255,255,255,.22);
    pointer-events: none;
}
.submenu small {
    margin-left: 3px;
    color: rgba(255,255,255,.24);
    font-size: 10px;
}
.dot {
    width: 5px;
    height: 5px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: currentColor;
    opacity: .72;
}
.sidebar.is-collapsed .brand-text,
.sidebar.is-collapsed .menu-label,
.sidebar.is-collapsed .menu-title,
.sidebar.is-collapsed .chev,
.sidebar.is-collapsed .submenu,
.sidebar.is-collapsed .user-text {
    display: none;
}
.sidebar.is-collapsed .menu-parent { justify-content: center; padding-inline: 0; }
.sidebar.is-collapsed .brand { justify-content: center; padding-inline: 0; }

.user-box {
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-top: 1px solid rgba(255,255,255,.07);
}
.avatar {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
    color: #fff;
    background: var(--ac);
    font-size: 11px;
    font-weight: 800;
}

.main-panel {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg);
}
.topbar {
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 16px;
    background: #fff;
    border-bottom: 1px solid var(--bd);
}
.topbar h1 { margin: 0; color: var(--ink); font-size: 18px; font-weight: 600; }
.topbar-title { min-width: 0; }
.breadcrumb-line {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: #7d7888;
    font-size: 13px;
    white-space: nowrap;
}
.breadcrumb-line strong {
    color: #17102f;
    font-weight: 600;
}
.breadcrumb-line .sep { color: #aaa5b3; }
.eyebrow {
    display: block;
    color: #888;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.topbar-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.btn-top {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    color: #271a48;
    background: #f4f4f6;
    border: 1px solid var(--bd);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn-top:hover {
    color: #160f33;
    background: #ebebef;
    transform: translateY(-1px);
}
.btn-top svg {
    width: 14px;
    height: 14px;
}
.btn-version {
    color: #5b21b6;
    background: #f0eeff;
    border-color: #ddd6fe;
}
.btn-version.active {
    color: #fff;
    background: var(--ac);
    border-color: var(--ac);
}
.btn-main {
    color: #fff;
    background: var(--ac);
    border-color: var(--ac);
    box-shadow: 0 8px 18px rgba(124,58,237,.25);
}
.btn-main:hover { color: #fff; background: #6d28d9; }
.btn-ghost { color: #271a48; }
.content-panel {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 16px;
}
.work-card {
    border: 1px solid var(--bd);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(22,17,58,.06);
}
.report-frame {
    width: 100%;
    height: calc(100vh - 148px);
    min-height: 520px;
    display: block;
    border: 1px solid var(--bd);
    border-radius: 12px;
    background: #fff;
}
.empty-state {
    min-height: 420px;
    display: grid;
    place-items: center;
    color: var(--muted);
    text-align: center;
}
.dashboard-welcome {
    min-height: calc(100vh - 106px);
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(360px, 1.1fr);
    align-items: center;
    gap: 28px;
    padding: 34px;
    border: 1px solid var(--bd);
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(255,255,255,.96), rgba(246,244,255,.88)),
        radial-gradient(circle at 80% 20%, rgba(124,58,237,.12), transparent 35%);
    box-shadow: 0 24px 70px rgba(22,17,58,.08);
}
.welcome-kicker {
    color: var(--ac);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.welcome-copy h2 {
    max-width: 520px;
    margin: 10px 0 12px;
    color: #17102f;
    font-size: 38px;
    line-height: 1.06;
    font-weight: 850;
}
.welcome-copy p {
    max-width: 570px;
    color: #615a76;
    font-size: 16px;
    line-height: 1.7;
}
.welcome-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}
.welcome-actions span {
    padding: 8px 12px;
    color: #4c1d95;
    border: 1px solid #ddd6fe;
    border-radius: 999px;
    background: #f0eeff;
    font-size: 12px;
    font-weight: 800;
}
.bi-visual {
    position: relative;
    width: 100%;
    margin: 0;
    overflow: hidden;
    aspect-ratio: 1.53 / 1;
    border: 1px solid #dedbec;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 28px 70px rgba(22,17,58,.16);
}
.bi-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.28);
}
.bi-visual img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}
.preview-top { display: flex; gap: 7px; padding: 4px 4px 14px; }
.preview-top span { width: 9px; height: 9px; border-radius: 50%; background: #c4bfd3; }
.preview-grid {
    display: grid;
    grid-template-columns: 1.4fr .8fr;
    gap: 12px;
}
.preview-panel {
    min-height: 128px;
    padding: 14px;
    border: 1px solid #eceaf2;
    border-radius: 14px;
    background: #fafaff;
}
.preview-panel strong { display: block; color: #33235f; font-size: 12px; margin-bottom: 12px; }
.preview-chart div { height: 150px; display: flex; align-items: end; gap: 12px; }
.preview-chart i { flex: 1; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, #1d8bd1, #0f5f99); }
.preview-score span { display: block; color: #15803d; font-size: 46px; font-weight: 900; }
.preview-score small { color: #15803d; font-weight: 800; }
.preview-lines span, .preview-table span { display: block; height: 10px; margin: 12px 0; border-radius: 999px; background: linear-gradient(90deg, #7c3aed, #d8b4fe); }
.preview-lines span:nth-child(3), .preview-table span:nth-child(3) { width: 74%; }
.preview-lines span:nth-child(4), .preview-table span:nth-child(4) { width: 58%; }
.preview-table { grid-column: span 2; min-height: 116px; }
.row-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    white-space: nowrap;
}
.btn-icon-action {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border-radius: 7px;
}
.btn-icon-action svg { width: 16px; height: 16px; }
.btn-outline-danger.btn-icon-action:hover { color: #fff; }
.menu-icon-preview {
    width: 27px;
    height: 27px;
    display: inline-grid;
    place-items: center;
    margin-left: 7px;
    color: #5f586d;
    vertical-align: middle;
}
.menu-icon-preview .ni-ic { width: 18px; height: 18px; }
.confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 20px;
}
.confirm-modal-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(13,9,36,.62);
    backdrop-filter: blur(4px);
}
.confirm-dialog {
    position: relative;
    width: min(430px, 100%);
    padding: 26px;
    border: 1px solid #ebe8f4;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 30px 90px rgba(13,9,36,.3);
}
.confirm-dialog-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    margin-bottom: 16px;
    color: #b42318;
    border: 1px solid #fecaca;
    border-radius: 50%;
    background: #fff1f2;
}
.confirm-dialog-icon svg { width: 22px; height: 22px; }
.confirm-dialog-copy > span {
    color: #7c3aed;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.confirm-dialog-copy h2 {
    margin: 5px 0 8px;
    color: #17102f;
    font-size: 22px;
    font-weight: 700;
}
.confirm-dialog-copy p {
    margin: 0;
    color: #625b70;
    font-size: 14px;
    line-height: 1.55;
}
.confirm-dialog-warning {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-top: 18px;
    padding: 12px;
    color: #7a2e0e;
    border: 1px solid #fed7aa;
    border-radius: 7px;
    background: #fff7ed;
    font-size: 12px;
    line-height: 1.45;
}
.confirm-dialog-warning svg { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 1px; }
.confirm-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    margin-top: 22px;
}
.btn-confirm-cancel,
.btn-confirm-delete {
    min-height: 40px;
    padding: 8px 15px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 700;
}
.btn-confirm-cancel { color: #4f485c; border: 1px solid #d9d6df; background: #fff; }
.btn-confirm-cancel:hover { background: #f6f5f8; }
.btn-confirm-delete { color: #fff; border: 1px solid #b42318; background: #b42318; box-shadow: 0 8px 18px rgba(180,35,24,.2); }
.btn-confirm-delete:hover { background: #912018; }
.btn-confirm-delete:disabled { cursor: wait; opacity: .7; }
.confirm-modal-open { overflow: hidden !important; }
.version-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.version-bar .btn {
    border-radius: 8px;
}
.table td, .table th { vertical-align: middle; }
.admin-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}
.stat {
    padding: 18px;
    border: 1px solid var(--bd);
    border-radius: 8px;
    background: #fff;
    color: #17102f;
    overflow: hidden;
    position: relative;
}
.stat::after {
    content: "";
    position: absolute;
    right: -26px;
    top: -34px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    opacity: .14;
    background: currentColor;
}
.stat span { color: var(--muted); font-size: 13px; }
.stat strong { display: block; margin-top: 4px; font-size: 28px; }
.stat small { color: #827b93; }
.stat-purple { color: #7c3aed; }
.stat-blue { color: #2563eb; }
.stat-green { color: #15803d; }
.stat-orange { color: #ea580c; }
.admin-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 24px;
    margin-bottom: 16px;
    color: #fff;
    border-radius: 14px;
    background:
        radial-gradient(circle at 82% 22%, rgba(167,139,250,.36), transparent 30%),
        linear-gradient(135deg, #16113a, #3b1f79);
    box-shadow: 0 22px 60px rgba(22,17,58,.16);
}
.admin-hero h2 { margin: 8px 0; font-size: 30px; font-weight: 850; }
.admin-hero p { margin: 0; color: rgba(255,255,255,.72); }
.admin-hero-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.admin-two-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.admin-panel { padding: 18px; }
.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.panel-head span { color: var(--ac); font-size: 11px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.panel-head h3 { margin: 2px 0 0; font-size: 18px; font-weight: 850; }
.panel-head a { color: var(--ac); font-size: 13px; font-weight: 800; text-decoration: none; }
.activity-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid #efedf4;
}
.activity-row strong { display: block; font-size: 14px; }
.activity-row span, .activity-row small { color: #80798d; font-size: 12px; }
.screen-intro {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
    padding: 18px 20px;
    border: 1px solid var(--bd);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(22,17,58,.06);
}
.screen-intro h2 { margin: 5px 0 4px; font-size: 24px; font-weight: 850; }
.screen-intro p { margin: 0; color: #6c657b; }
.mini-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}
.mini-stats span {
    padding: 10px 12px;
    border: 1px solid #e6e1f6;
    border-radius: 12px;
    background: #f8f7ff;
    color: #5b5570;
    font-size: 12px;
}
.mini-stats strong { display: block; color: #2b1760; font-size: 18px; }
.form-card {
    background: linear-gradient(180deg, #fff, #fbfaff);
}
.sticky-card { position: sticky; top: 12px; }
.form-title { margin-bottom: 16px; }
.form-title span { color: var(--ac); font-size: 11px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.form-title h2 { margin: 2px 0 0; font-size: 22px; font-weight: 850; }
.permission-box {
    max-height: 240px;
    overflow: auto;
    padding: 10px;
    border: 1px solid #dfdde8;
    border-radius: 10px;
    background: #fff;
}
.permission-box .form-check { margin-bottom: 7px; }
.btn-save {
    min-height: 46px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, #7c3aed, #2563eb);
    font-weight: 800;
    box-shadow: 0 14px 28px rgba(37,99,235,.18);
}
.table-card { overflow: hidden; }
.table-scroll {
    max-height: 650px;
    overflow: auto;
}
.pro-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #fff;
    color: #3d3654;
    font-size: 12px;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.pro-table tbody tr:hover { background: #f8f7ff; }
.table-footer-note {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-top: 12px;
    color: #7c758a;
    border-top: 1px solid #efedf4;
    font-size: 12px;
}
.audit-filter {
    display: grid;
    grid-template-columns: minmax(220px, 1.3fr) repeat(3, minmax(130px, .7fr)) auto;
    align-items: end;
    gap: 12px;
}
.audit-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-nav {
    position: relative;
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 4px 8px;
    padding: 9px 8px;
    color: rgba(255,255,255,.9);
    text-decoration: none;
    border: 1px solid rgba(167,139,250,.22);
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(124,58,237,.34), rgba(255,255,255,.06));
}
.admin-nav:hover {
    color: #fff;
    background: linear-gradient(135deg, rgba(124,58,237,.54), rgba(255,255,255,.08));
}
.sidebar.is-collapsed .admin-nav { justify-content: center; padding-inline: 0; }
.sidebar.is-collapsed .admin-nav .menu-title { display: none; }
.form-control, .form-select {
    border-color: #dfdde8;
    border-radius: 9px;
}
.form-control:focus, .form-select:focus {
    border-color: var(--acl);
    box-shadow: 0 0 0 .2rem rgba(124,58,237,.12);
}
.form-label {
    color: #4d475f;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* Compact executive density */
.content-panel { padding: 12px 16px; }
.screen-intro {
    padding: 12px 16px;
    margin-bottom: 12px;
    border-radius: 10px;
}
.screen-intro h2 {
    margin: 3px 0;
    font-size: 21px;
    font-weight: 600;
}
.screen-intro p { font-size: 14px; }
.welcome-kicker,
.panel-head span,
.form-title span {
    font-weight: 700;
    letter-spacing: .08em;
}
.mini-stats span {
    padding: 8px 10px;
    border-radius: 10px;
}
.mini-stats strong { font-size: 16px; font-weight: 600; }
.form-card { border-radius: 8px; }
.form-title { margin-bottom: 10px; }
.form-title h2 {
    font-size: 18px;
    font-weight: 600;
}
.form-card .mb-3 { margin-bottom: .72rem !important; }
.form-control,
.form-select {
    min-height: 36px;
    padding: 6px 10px;
    font-size: 14px;
}
textarea.form-control { min-height: 36px; }
.permission-box {
    max-height: 174px;
    padding: 8px;
    font-size: 13px;
}
.permission-box .form-check {
    min-height: 22px;
    margin-bottom: 3px;
}
.btn-save {
    min-height: 40px;
    font-weight: 600;
}
.panel-head h3 {
    font-size: 16px;
    font-weight: 600;
}
.table-card { border-radius: 8px; }
.table-scroll { max-height: 520px; }
.pro-table { margin-bottom: 0; }
.pro-table thead th {
    padding: 8px 8px;
    font-size: 11px;
    font-weight: 600;
}
.pro-table tbody td {
    padding: 8px 8px;
    font-size: 14px;
}
.pro-table td strong {
    font-weight: 600;
}
.badge {
    font-weight: 600;
}
.audit-filter {
    padding: 12px !important;
    margin-bottom: 12px !important;
}
.audit-filter .form-label { margin-bottom: 4px; }
.table-footer-note { padding-top: 8px; }
.admin-hero {
    padding: 18px;
    margin-bottom: 12px;
    border-radius: 10px;
}
.admin-hero h2 {
    font-size: 24px;
    font-weight: 600;
}
.stat {
    padding: 13px 14px;
    border-radius: 8px;
}
.stat strong {
    font-size: 24px;
    font-weight: 600;
}
.admin-panel { padding: 14px; }
.activity-row { padding: 9px 0; }
.activity-row strong { font-weight: 600; }
.dashboard-welcome {
    min-height: calc(100vh - 92px);
    padding: 26px;
}
.welcome-copy h2 {
    font-size: 32px;
    font-weight: 600;
}
.welcome-copy p {
    font-size: 15px;
}

@media (max-width: 860px) {
    .login-page { padding: 0; }
    .login-shell {
        min-height: 100vh;
        grid-template-columns: 1fr;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }
    .login-story { display: none; }
    .login-story h1 { font-size: 32px; }
    .login-metrics { grid-template-columns: 1fr; }
    .login-card {
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-height: 100vh;
        border-left: 0;
        padding: 32px 24px;
        background: rgba(13,9,36,.42);
    }
    .login-mobile-logo {
        display: block;
        width: min(250px, 78vw);
        margin: 0 auto 28px;
    }
    .login-mobile-logo img {
        width: 100%;
        object-fit: contain;
    }
    body { overflow: auto; }
    .mobile-bar {
        height: 52px;
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 0 14px;
        color: #fff;
        background: var(--sb);
    }
    .hambtn {
        width: 36px;
        height: 36px;
        display: grid;
        place-items: center;
        color: rgba(255,255,255,.82);
        background: transparent;
        border: 0;
    }
    .hambtn svg { width: 22px; height: 22px; }
    .mobile-overlay.is-open {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 20;
        background: rgba(0,0,0,.52);
    }
    .app-shell { height: calc(100vh - 52px); }
    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 30;
        width: 280px !important;
        transform: translateX(-100%);
    }
    .sidebar.is-open { transform: translateX(0); }
    .collapse-btn { display: none; }
    .main-panel { width: 100%; }
    .topbar { align-items: flex-start; flex-direction: column; }
    .content-panel { padding: 8px; }
    .report-frame { height: calc(100vh - 178px); min-height: 420px; }
    .admin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-welcome,
    .admin-two-col {
        grid-template-columns: 1fr;
    }
    .dashboard-welcome { min-height: auto; padding: 22px; }
    .preview-grid { grid-template-columns: 1fr; }
    .preview-table { grid-column: auto; }
    .admin-hero,
    .screen-intro {
        align-items: flex-start;
        flex-direction: column;
    }
    .audit-filter { grid-template-columns: 1fr 1fr; }
    .audit-actions { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
    .login-card { padding: 28px 22px; border-radius: 0; }
    .login-brand-main { width: 100%; }
    .welcome-copy h2 { font-size: 28px; }
    .bi-visual { margin-top: 4px; aspect-ratio: 1.2 / 1; }
    .bi-visual img { object-position: center; }
    .admin-grid { grid-template-columns: 1fr; }
    .topbar-actions { width: 100%; justify-content: flex-start; }
    .audit-filter { grid-template-columns: 1fr; }
    .mini-stats { justify-content: flex-start; }
    .table-footer-note { flex-direction: column; }
}
