/*
 * Aurora Sovereign UI 3.0
 * A high-density enterprise operating workspace for training institutes.
 * Original interface system. No third-party ERP design is copied.
 */

:root {
    --bg: #f2f3f5;
    --bg2: #e8ebef;
    --panel: #ffffff;
    --panel2: #f7f8fa;
    --panel3: #eef1f4;
    --line: #d8dde3;
    --line2: #b9c2cc;
    --text: #17202a;
    --muted: #647181;
    --muted2: #8994a1;
    --primary: #1557c0;
    --primary2: #0c3f8f;
    --green: #087f5b;
    --yellow: #a96c00;
    --orange: #b65520;
    --red: #b4233a;
    --blue: #1557c0;
    --ink: #121820;
    --ink2: #1c2530;
    --nav: #161d25;
    --nav2: #202a35;
    --accent: #1e68d7;
    --accent-soft: #e9f1ff;
    --teal: #007f7a;
    --shadow: 0 8px 24px rgba(21, 32, 43, .08);
    --shadow-lg: 0 24px 70px rgba(15, 25, 35, .20);
    --radius: 4px;
    --global-bar: 58px;
    --navigator: 274px;
}

html[data-theme="dark"] {
    --bg: #10151b;
    --bg2: #0b0f14;
    --panel: #171e26;
    --panel2: #1c252e;
    --panel3: #25303b;
    --line: #303b47;
    --line2: #465463;
    --text: #edf2f7;
    --muted: #a7b2be;
    --muted2: #7f8a96;
    --primary: #6da3ff;
    --primary2: #8bb7ff;
    --green: #5ac79d;
    --yellow: #e0b15b;
    --orange: #e38b5c;
    --red: #ec7180;
    --blue: #76a9ff;
    --ink: #080b0f;
    --ink2: #10161d;
    --nav: #0d1218;
    --nav2: #161d25;
    --accent: #73a8ff;
    --accent-soft: #1c2a3f;
    --teal: #48bdb6;
    --shadow: 0 10px 30px rgba(0, 0, 0, .28);
    --shadow-lg: 0 28px 80px rgba(0, 0, 0, .44);
}

html,
body {
    background: var(--bg);
}

body.sovereign-ui {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: Manrope, "Segoe UI", Arial, sans-serif;
    font-size: 13px;
    letter-spacing: -.006em;
    overflow-x: hidden;
}

.sovereign-ui *,
.sovereign-ui *::before,
.sovereign-ui *::after {
    box-sizing: border-box;
}

.sovereign-ui a {
    color: inherit;
    text-decoration: none;
}

.sovereign-ui button,
.sovereign-ui input,
.sovereign-ui select,
.sovereign-ui textarea {
    font: inherit;
}

.sovereign-ui svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sovereign-shell {
    min-height: 100vh;
}

/* Global command bar */
.global-command-bar {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 120;
    height: var(--global-bar);
    display: grid;
    grid-template-columns: var(--navigator) minmax(260px, 1fr) auto;
    align-items: center;
    color: #eef3f8;
    background: var(--ink);
    border-bottom: 1px solid rgba(255, 255, 255, .10);
    box-shadow: 0 3px 14px rgba(0, 0, 0, .16);
}

.global-brand {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 17px;
    border-right: 1px solid rgba(255, 255, 255, .10);
    background: #0e141b;
    min-width: 0;
}

.mobile-nav-trigger {
    display: none;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, .16);
    background: transparent;
    color: #fff;
    cursor: pointer;
}

.sovereign-mark {
    position: relative;
    width: 34px;
    height: 34px;
    min-width: 34px;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--accent);
    border: 1px solid rgba(255, 255, 255, .30);
    overflow: hidden;
    font-size: 15px;
    font-weight: 800;
}

.sovereign-mark i {
    position: absolute;
    width: 17px;
    height: 17px;
    right: -8px;
    bottom: -8px;
    transform: rotate(45deg);
    background: #d89332;
}

.sovereign-mark span {
    position: relative;
    z-index: 1;
}

.global-brand-copy {
    min-width: 0;
    line-height: 1.1;
}

.global-brand-copy strong {
    display: block;
    overflow: hidden;
    color: #f6f8fa;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .025em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.global-brand-copy span {
    display: block;
    overflow: hidden;
    margin-top: 4px;
    color: #8e9aa7;
    font-size: 8px;
    letter-spacing: .06em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.global-context {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px;
}

.global-context span {
    color: #7f8c99;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .11em;
}

.global-context i {
    width: 1px;
    height: 16px;
    background: rgba(255, 255, 255, .15);
}

.global-context b {
    overflow: hidden;
    color: #e8edf2;
    font-size: 12px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.global-actions {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 15px 0 8px;
}

.sync-state {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 8px;
    color: #94a1ae;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
}

.sync-state i,
.environment-line i,
.live-pill i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #36b37e;
    box-shadow: 0 0 0 3px rgba(54, 179, 126, .15);
}

.global-search {
    width: 250px;
    height: 34px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 9px;
    color: #aeb8c3;
    border: 1px solid rgba(255, 255, 255, .13);
    background: rgba(255, 255, 255, .05);
    cursor: pointer;
}

.global-search:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, .28);
    background: rgba(255, 255, 255, .08);
}

.global-search svg {
    width: 15px;
    height: 15px;
}

.global-search span {
    flex: 1;
    text-align: left;
    font-size: 9px;
}

.global-search kbd,
.command-search kbd {
    padding: 2px 5px;
    color: #98a5b2;
    border: 1px solid rgba(255, 255, 255, .16);
    background: rgba(255, 255, 255, .06);
    font: 600 8px "IBM Plex Mono", monospace;
}

.global-icon-button {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: #c5ced6;
    border: 1px solid rgba(255, 255, 255, .13);
    background: transparent;
    cursor: pointer;
}

.global-icon-button:hover {
    color: #fff;
    background: rgba(255, 255, 255, .07);
}

.user-menu {
    position: relative;
}

.sovereign-user {
    height: 38px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 8px;
    color: #dce3ea;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
}

.sovereign-user:hover,
.user-menu.open .sovereign-user {
    border-color: rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .05);
}

.sovereign-user .avatar {
    width: 27px;
    height: 27px;
    border-radius: 2px;
    background: #244f88;
    box-shadow: none;
}

.sovereign-user > span:nth-child(2) {
    min-width: 0;
    text-align: left;
    line-height: 1.05;
}

.sovereign-user b {
    display: block;
    max-width: 130px;
    overflow: hidden;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sovereign-user small {
    display: block;
    margin-top: 3px;
    color: #82909e;
    font-size: 7px;
    text-transform: uppercase;
}

.sovereign-user > svg {
    width: 13px;
    height: 13px;
}

.user-dropdown {
    position: absolute;
    top: 45px;
    right: 0;
    z-index: 200;
    width: 220px;
    display: none;
    padding: 5px;
    color: var(--text);
    border: 1px solid var(--line2);
    background: var(--panel);
    box-shadow: var(--shadow-lg);
}

.user-menu.open .user-dropdown {
    display: block;
}

.user-dropdown-head {
    padding: 11px;
    border-bottom: 1px solid var(--line);
}

.user-dropdown-head b,
.user-dropdown-head small {
    display: block;
}

.user-dropdown-head b {
    font-size: 11px;
}

.user-dropdown-head small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 9px;
}

.user-dropdown a {
    display: block;
    padding: 10px 11px;
    font-size: 10px;
}

.user-dropdown a:hover {
    background: var(--panel2);
}

.danger-link {
    color: var(--red) !important;
}

/* Workspace shell */
.workspace-frame {
    min-height: 100vh;
    padding-top: var(--global-bar);
}

.module-navigator {
    position: fixed;
    inset: var(--global-bar) auto 0 0;
    z-index: 100;
    width: var(--navigator);
    display: flex;
    flex-direction: column;
    color: #b8c2cc;
    background: var(--nav);
    border-right: 1px solid #0d1218;
    transition: width .2s ease, transform .25s ease;
}

.navigator-head {
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 15px 0 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .018);
}

.navigator-head span,
.navigator-head b {
    display: block;
}

.navigator-head span {
    color: #6f7d8a;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .12em;
}

.navigator-head b {
    margin-top: 4px;
    color: #f1f4f7;
    font-size: 15px;
    font-weight: 650;
}

.navigator-head-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}

.navigator-collapse,
.sidebar-close {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    color: #7f8c99;
    border: 1px solid rgba(255, 255, 255, .10);
    background: transparent;
    cursor: pointer;
}

.navigator-collapse:hover,
.sidebar-close:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, .25);
}

.sidebar-close {
    display: none;
    font-size: 18px;
}

.nav-scroll {
    flex: 1;
    overflow: auto;
    padding: 12px 9px 24px;
}

.nav-group {
    margin: 0 0 17px;
}

.nav-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 9px 7px;
    color: #677583;
}

.nav-label span {
    width: 24px;
    color: #7a8793;
    font: 600 8px "IBM Plex Mono", monospace;
}

.nav-label b {
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.nav-item {
    position: relative;
    min-height: 39px;
    display: grid;
    grid-template-columns: 38px 21px minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
    margin: 1px 0;
    padding: 5px 9px 5px 6px;
    color: #a5b1bc;
    border-left: 3px solid transparent;
    border-radius: 0;
    background: transparent;
    font-size: 10px;
    font-weight: 550;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.nav-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, .055);
    transform: none;
}

.nav-item.active {
    color: #fff;
    border-left-color: #5f9cff;
    background: #253446;
    box-shadow: none;
}

.nav-item.active::before {
    display: none;
}

.nav-code {
    color: #5f6d7a;
    font: 500 7px "IBM Plex Mono", monospace;
    letter-spacing: -.02em;
}

.nav-item.active .nav-code {
    color: #80adf2;
}

.nav-icon {
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    color: #7f90a0;
}

.nav-icon svg {
    width: 15px;
    height: 15px;
}

.nav-item.active .nav-icon {
    color: #8ab8ff;
}

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

.nav-badge {
    min-width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    padding: 0 5px;
    color: #fff;
    background: #b4233a;
    border-radius: 2px;
    font: 600 8px "IBM Plex Mono", monospace;
}

.navigator-footer {
    padding: 12px 17px 15px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    background: rgba(0, 0, 0, .10);
}

.environment-line,
.release-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.environment-line {
    justify-content: flex-start;
    gap: 8px;
    color: #9aa6b1;
    font-size: 8px;
}

.release-line {
    margin-top: 8px;
    color: #65727e;
    font: 500 7px "IBM Plex Mono", monospace;
}

.release-line b {
    color: #91a0ad;
}

.workspace-stage {
    min-height: calc(100vh - var(--global-bar));
    margin-left: var(--navigator);
    display: flex;
    flex-direction: column;
    transition: margin-left .2s ease;
}

.context-bar {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 10px 26px;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
}

.context-title span {
    display: block;
    color: var(--muted2);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.context-title h1 {
    margin: 4px 0 0;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -.025em;
}

.context-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}

.context-link,
.context-primary {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 11px;
    color: var(--text);
    border: 1px solid var(--line);
    background: var(--panel);
    font-size: 9px;
    font-weight: 650;
    cursor: pointer;
}

.context-link:hover {
    border-color: var(--line2);
    background: var(--panel2);
}

.context-primary {
    color: #fff;
    border-color: var(--primary2);
    background: var(--primary2);
}

.content {
    flex: 1;
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
    padding: 24px 26px 38px;
}

.app-footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 0 26px 18px;
    color: var(--muted2);
    font-size: 8px;
}

/* Collapsed navigator */
body.nav-collapsed {
    --navigator: 78px;
}

body.nav-collapsed .global-brand-copy,
body.nav-collapsed .navigator-head > div:first-child,
body.nav-collapsed .nav-label b,
body.nav-collapsed .nav-text,
body.nav-collapsed .nav-code,
body.nav-collapsed .nav-badge,
body.nav-collapsed .navigator-footer span,
body.nav-collapsed .release-line span {
    display: none;
}

body.nav-collapsed .global-brand {
    justify-content: center;
    padding: 0;
}

body.nav-collapsed .navigator-head {
    justify-content: center;
    padding: 0;
}

body.nav-collapsed .navigator-collapse {
    transform: rotate(180deg);
}

body.nav-collapsed .nav-label {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

body.nav-collapsed .nav-label span {
    width: auto;
}

body.nav-collapsed .nav-item {
    grid-template-columns: 1fr;
    justify-items: center;
    padding-left: 5px;
    padding-right: 5px;
}

body.nav-collapsed .nav-item.active {
    border-left-color: #5f9cff;
}

/* Dashboard / cockpit */
.cockpit-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding: 2px 0 20px;
    border-bottom: 1px solid var(--line);
}

.cockpit-intro .eyebrow {
    display: block;
    color: var(--primary);
    font: 600 8px "IBM Plex Mono", monospace;
    letter-spacing: .10em;
}

.cockpit-intro h2 {
    margin: 8px 0 6px;
    font-size: clamp(24px, 2.1vw, 34px);
    font-weight: 700;
    letter-spacing: -.045em;
}

.cockpit-intro p {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    font-size: 11px;
}

.cockpit-hero-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn {
    min-height: 38px;
    border-radius: 2px;
    box-shadow: none;
}

.btn:hover {
    transform: none;
}

.sovereign-primary {
    color: #fff !important;
    border-color: var(--primary2) !important;
    background: var(--primary2) !important;
}

.sovereign-primary:hover {
    background: var(--primary) !important;
}

.sovereign-secondary {
    color: var(--text) !important;
    background: var(--panel) !important;
}

.executive-status-band {
    display: grid;
    grid-template-columns: minmax(300px, 1.6fr) 1px repeat(4, minmax(120px, .7fr));
    align-items: stretch;
    margin-top: 18px;
    color: #edf3f8;
    background: #152437;
    border-top: 3px solid #2875d4;
    box-shadow: var(--shadow);
}

.status-score {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 112px;
    padding: 18px 22px;
}

.score-ring {
    --score: 80;
    position: relative;
    width: 66px;
    height: 66px;
    min-width: 66px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: conic-gradient(#63a4ff calc(var(--score) * 1%), rgba(255,255,255,.12) 0);
}

.score-ring::after {
    content: "";
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    background: #152437;
}

.score-ring span,
.score-ring small {
    position: relative;
    z-index: 1;
}

.score-ring span {
    margin-top: 5px;
    font: 700 20px "IBM Plex Mono", monospace;
}

.score-ring small {
    margin-top: -16px;
    color: #94a8ba;
    font-size: 7px;
}

.status-score > div:last-child span,
.status-score > div:last-child b,
.status-score > div:last-child small {
    display: block;
}

.status-score > div:last-child span {
    color: #75a8e6;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .10em;
}

.status-score > div:last-child b {
    margin-top: 6px;
    font-size: 17px;
    font-weight: 650;
}

.status-score > div:last-child small {
    margin-top: 5px;
    color: #90a1b1;
    font-size: 8px;
}

.status-divider {
    width: 1px;
    margin: 18px 0;
    background: rgba(255,255,255,.12);
}

.status-fact {
    min-width: 0;
    padding: 22px 17px;
    border-left: 1px solid rgba(255,255,255,.08);
}

.status-fact span,
.status-fact b,
.status-fact small {
    display: block;
}

.status-fact span {
    color: #90a1b1;
    font-size: 8px;
}

.status-fact b {
    overflow: hidden;
    margin-top: 10px;
    font: 700 20px "IBM Plex Mono", monospace;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.status-fact small {
    margin-top: 5px;
    color: #718599;
    font-size: 7px;
}

.transaction-launcher {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 12px;
    border: 1px solid var(--line);
    background: var(--panel);
}

.transaction-launcher a {
    min-width: 0;
    display: grid;
    grid-template-columns: auto 30px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    min-height: 70px;
    padding: 10px 13px;
    border-right: 1px solid var(--line);
}

.transaction-launcher a:last-child {
    border-right: 0;
}

.transaction-launcher a:hover {
    background: var(--panel2);
}

.launch-code {
    color: var(--muted2);
    font: 500 7px "IBM Plex Mono", monospace;
}

.transaction-launcher i {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    color: var(--primary);
    border: 1px solid var(--line);
    background: var(--accent-soft);
    font-style: normal;
    font-size: 13px;
}

.transaction-launcher b,
.transaction-launcher small {
    display: block;
}

.transaction-launcher b {
    font-size: 10px;
}

.transaction-launcher small {
    margin-top: 3px;
    overflow: hidden;
    color: var(--muted);
    font-size: 7px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.transaction-launcher em {
    color: var(--muted2);
    font-style: normal;
}

.metric-ledger {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.metric-ledger article {
    min-width: 0;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    min-height: 104px;
    padding: 15px;
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: 0 2px 7px rgba(20, 31, 42, .035);
}

.metric-symbol {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: #fff;
    background: #2a5ca1;
    font: 700 14px "IBM Plex Mono", monospace;
}

.metric-symbol.finance { background: #087f5b; }
.metric-symbol.growth { background: #a76b00; }
.metric-symbol.control { background: #a92f43; }

.metric-copy {
    min-width: 0;
}

.metric-copy span,
.metric-copy strong,
.metric-copy small,
.metric-side b,
.metric-side span {
    display: block;
}

.metric-copy span {
    color: var(--muted);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .06em;
}

.metric-copy strong {
    overflow: hidden;
    margin-top: 6px;
    font: 700 20px "IBM Plex Mono", monospace;
    letter-spacing: -.04em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.metric-copy small {
    margin-top: 5px;
    color: var(--muted2);
    font-size: 7px;
}

.metric-side {
    min-width: 58px;
    padding-left: 10px;
    text-align: right;
    border-left: 1px solid var(--line);
}

.metric-side b {
    overflow: hidden;
    font: 600 11px "IBM Plex Mono", monospace;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.metric-side span {
    margin-top: 5px;
    color: var(--muted2);
    font-size: 7px;
}

.cockpit-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(360px, .75fr);
    gap: 12px;
    margin-top: 14px;
}

.sovereign-panel {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 0;
    background: var(--panel);
    box-shadow: 0 3px 12px rgba(20, 31, 42, .045);
}

.sovereign-panel-head {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 13px 16px;
    border-bottom: 1px solid var(--line);
    background: var(--panel);
}

.sovereign-panel-head > div:first-child {
    min-width: 0;
}

.sovereign-panel-head span,
.sovereign-panel-head h3,
.sovereign-panel-head p {
    display: block;
}

.sovereign-panel-head > div:first-child > span {
    color: var(--primary);
    font: 600 7px "IBM Plex Mono", monospace;
    letter-spacing: .08em;
}

.sovereign-panel-head h3 {
    margin: 5px 0 0;
    font-size: 13px;
    font-weight: 700;
}

.sovereign-panel-head p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 8px;
}

.head-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.state-chip,
.live-pill {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    padding: 5px 7px;
    color: var(--muted);
    border: 1px solid var(--line);
    background: var(--panel2);
    font: 600 7px "IBM Plex Mono", monospace !important;
}

.live-pill {
    color: var(--green);
}

.text-action,
.text-button,
.table-open {
    color: var(--primary);
    font-size: 8px;
    font-weight: 700;
}

.text-button {
    padding: 6px 8px;
    border: 1px solid var(--line);
    background: var(--panel);
    cursor: pointer;
}

.text-button:hover,
.text-action:hover,
.table-open:hover {
    color: var(--primary2);
    text-decoration: underline;
}

.performance-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    min-height: 340px;
}

.sovereign-chart {
    min-height: 340px;
    padding: 10px 12px 3px;
}

.sovereign-chart canvas {
    width: 100%;
    height: 310px;
}

.financial-register {
    border-left: 1px solid var(--line);
    background: var(--panel2);
}

.financial-register div {
    min-height: 68px;
    padding: 13px 14px;
    border-bottom: 1px solid var(--line);
}

.financial-register div:last-child {
    border-bottom: 0;
}

.financial-register span,
.financial-register b {
    display: block;
}

.financial-register span {
    color: var(--muted);
    font-size: 7px;
    text-transform: uppercase;
}

.financial-register b {
    margin-top: 7px;
    font: 650 13px "IBM Plex Mono", monospace;
}

.financial-register .positive { color: var(--green); }
.financial-register .negative { color: var(--red); }

.decision-list {
    display: grid;
}

.decision-row {
    min-height: 72px;
    display: grid;
    grid-template-columns: 28px 58px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 11px 12px;
    border-bottom: 1px solid var(--line);
    border-left: 3px solid var(--blue);
}

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

.decision-row:hover {
    background: var(--panel2);
}

.decision-row.warning { border-left-color: var(--yellow); }
.decision-row.danger,
.decision-row.urgent { border-left-color: var(--red); }
.decision-row.success { border-left-color: var(--green); }

.decision-number {
    color: var(--muted2);
    font: 600 9px "IBM Plex Mono", monospace;
}

.decision-severity {
    color: var(--red);
    font: 600 7px "IBM Plex Mono", monospace;
}

.decision-row.info .decision-severity { color: var(--blue); }
.decision-row.warning .decision-severity { color: var(--yellow); }
.decision-row.success .decision-severity { color: var(--green); }

.decision-row b,
.decision-row small {
    display: block;
}

.decision-row b {
    font-size: 10px;
}

.decision-row small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 7px;
    line-height: 1.35;
}

.decision-row em {
    color: var(--primary);
    font-size: 7px;
    font-style: normal;
    font-weight: 700;
}

.pipeline-panel {
    margin-top: 12px;
}

.pipeline-track {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr auto 1fr;
    align-items: center;
    padding: 17px;
    background: var(--panel2);
}

.pipeline-stage {
    min-width: 0;
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    background: var(--panel);
}

.pipeline-stage > span {
    color: var(--muted2);
    font: 600 8px "IBM Plex Mono", monospace;
}

.pipeline-stage b,
.pipeline-stage small {
    display: block;
}

.pipeline-stage b {
    overflow: hidden;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pipeline-stage small {
    margin-top: 3px;
    color: var(--muted2);
    font-size: 7px;
}

.pipeline-stage strong {
    font: 700 15px "IBM Plex Mono", monospace;
}

.pipeline-arrow {
    padding: 0 6px;
    color: var(--muted2);
    font-style: normal;
}

.lower-layout {
    grid-template-columns: minmax(0, 1.25fr) minmax(380px, .9fr);
}

.schedule-register,
.task-register {
    display: grid;
}

.schedule-register-row {
    min-height: 66px;
    display: grid;
    grid-template-columns: 62px 4px minmax(0, 1fr) minmax(190px, .65fr) auto;
    align-items: center;
    gap: 11px;
    padding: 9px 13px;
    border-bottom: 1px solid var(--line);
}

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

.schedule-register-row:hover {
    background: var(--panel2);
}

.schedule-register-row time b,
.schedule-register-row time small,
.schedule-course b,
.schedule-course small,
.schedule-resource span,
.schedule-resource small {
    display: block;
}

.schedule-register-row time b {
    font: 650 11px "IBM Plex Mono", monospace;
}

.schedule-register-row time small {
    margin-top: 3px;
    color: var(--muted2);
    font: 500 8px "IBM Plex Mono", monospace;
}

.course-indicator {
    width: 4px;
    height: 32px;
    background: var(--course-color, var(--primary));
}

.schedule-course b,
.schedule-resource span {
    font-size: 9px;
}

.schedule-course small,
.schedule-resource small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 7px;
}

.schedule-register-row em {
    color: var(--primary);
    font-size: 7px;
    font-style: normal;
    font-weight: 700;
}

.task-register-row {
    min-height: 68px;
    display: grid;
    grid-template-columns: 4px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    padding: 10px 13px;
    border-bottom: 1px solid var(--line);
}

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

.task-priority {
    width: 4px;
    height: 36px;
    background: var(--blue);
}

.task-priority.high { background: var(--orange); }
.task-priority.urgent { background: var(--red); }
.task-priority.low { background: var(--green); }

.task-register-row div span,
.task-register-row div b,
.task-register-row div small {
    display: block;
}

.task-register-row div span {
    color: var(--muted2);
    font: 500 7px "IBM Plex Mono", monospace;
}

.task-register-row div b {
    margin-top: 4px;
    font-size: 9px;
}

.task-register-row div small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 7px;
}

.row-complete {
    min-height: 28px;
    padding: 0 8px;
    color: var(--green);
    border: 1px solid color-mix(in srgb, var(--green) 35%, var(--line));
    background: transparent;
    font-size: 7px;
    font-weight: 700;
    cursor: pointer;
}

.row-complete:hover {
    color: #fff;
    background: var(--green);
}

.admissions-register-panel {
    margin-top: 12px;
}

.sovereign-table {
    width: 100%;
    border-collapse: collapse;
}

.sovereign-table th {
    height: 36px;
    padding: 7px 11px;
    color: var(--muted);
    background: var(--panel2);
    border-bottom: 1px solid var(--line);
    font-size: 7px;
    font-weight: 700;
    letter-spacing: .06em;
    text-align: left;
    text-transform: uppercase;
}

.sovereign-table td {
    height: 51px;
    padding: 8px 11px;
    border-bottom: 1px solid var(--line);
    font-size: 8px;
    vertical-align: middle;
}

.sovereign-table tbody tr:hover {
    background: var(--panel2);
}

.master-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.master-cell > span {
    width: 28px;
    height: 28px;
    min-width: 28px;
    display: grid;
    place-items: center;
    color: #fff;
    background: #325c8e;
    font-size: 9px;
    font-weight: 700;
}

.master-cell b,
.master-cell small {
    display: block;
}

.master-cell b {
    font-size: 9px;
}

.master-cell small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 7px;
}

.sovereign-empty {
    min-height: 120px;
    display: grid;
    place-content: center;
    gap: 5px;
    padding: 20px;
    text-align: center;
}

.sovereign-empty b {
    font-size: 10px;
}

.sovereign-empty span {
    color: var(--muted);
    font-size: 8px;
}

/* Common page components */
.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.section-head h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -.035em;
}

.section-head p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 9px;
}

.section-actions {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
}

.panel,
.metric-card,
.data-card,
.form-card,
.chart-card {
    border: 1px solid var(--line);
    border-radius: 0;
    background: var(--panel);
    box-shadow: 0 3px 12px rgba(20,31,42,.045);
}

.panel {
    padding: 16px;
}

.panel.compact {
    padding: 12px;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 13px;
    padding-bottom: 11px;
    border-bottom: 1px solid var(--line);
}

.panel-head h3 {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
}

.panel-head p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 8px;
}

.grid {
    gap: 12px;
}

.metrics {
    gap: 10px;
    margin-bottom: 14px;
}

.metric-card {
    padding: 14px;
}

.metric-card::after {
    display: none;
}

.metric-label {
    font-size: 8px;
}

.metric-value {
    font: 700 21px "IBM Plex Mono", monospace;
}

.metric-icon {
    border-radius: 0;
}

.table-wrap {
    overflow: auto;
}

.table {
    border-collapse: collapse;
}

.table th {
    color: var(--muted);
    background: var(--panel2);
    border-bottom: 1px solid var(--line);
    font-size: 8px;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.table td {
    border-bottom: 1px solid var(--line);
    font-size: 9px;
}

.table tbody tr:hover {
    background: var(--panel2);
}

.badge {
    border-radius: 2px;
    font-size: 7px;
    font-weight: 700;
}

.tabs {
    border-radius: 0;
}

.tab,
.tabs a {
    border-radius: 0;
}

.field label {
    color: var(--muted);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.field input,
.field select,
.field textarea {
    border-radius: 2px;
    border-color: var(--line2);
    background: var(--panel);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 14%, transparent);
}

.modal-backdrop {
    background: rgba(7, 12, 18, .72);
    backdrop-filter: blur(3px);
}

.modal-card {
    border-radius: 2px;
    border-color: var(--line2);
}

.sovereign-modal-card {
    max-width: 720px;
}

.modal-head h3 {
    font-size: 15px;
}

.modal-close {
    border-radius: 0;
}

/* Command center */
.command-panel {
    position: relative;
    width: min(720px, calc(100% - 30px));
    margin: 10vh auto;
    overflow: hidden;
    color: var(--text);
    border: 1px solid var(--line2);
    border-radius: 2px;
    background: var(--panel);
    box-shadow: 0 40px 120px rgba(0,0,0,.42);
}

.command-kicker {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    border-bottom: 1px solid var(--line);
    background: var(--panel2);
}

.command-kicker span {
    color: var(--primary);
    font: 600 7px "IBM Plex Mono", monospace;
    letter-spacing: .10em;
}

.command-kicker b {
    font-size: 8px;
    font-weight: 600;
}

.command-search {
    height: 62px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 15px;
    border-bottom: 1px solid var(--line);
}

.command-search input {
    flex: 1;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
    font-size: 13px;
}

.command-search kbd {
    color: var(--muted);
    border-color: var(--line2);
    background: var(--panel2);
}

.command-results {
    padding: 7px;
}

.command-results a {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    min-height: 57px;
    padding: 8px 10px;
    border-left: 3px solid transparent;
}

.command-results a:hover,
.command-results a.focused {
    border-left-color: var(--primary);
    background: var(--panel2);
}

.command-results a > span {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    color: var(--primary);
    border: 1px solid var(--line);
    background: var(--accent-soft);
}

.command-results b,
.command-results small {
    display: block;
}

.command-results b {
    font-size: 10px;
}

.command-results small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 8px;
}

.command-results em {
    color: var(--muted2);
    font: 500 7px "IBM Plex Mono", monospace;
    font-style: normal;
}

/* Alerts */
.flash-stack {
    position: fixed;
    top: 72px;
    right: 18px;
    z-index: 220;
    display: grid;
    gap: 7px;
}

.flash {
    min-width: 300px;
    max-width: 460px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 13px;
    border: 1px solid var(--line2);
    border-left: 4px solid var(--primary);
    border-radius: 0;
    background: var(--panel);
    box-shadow: var(--shadow);
    font-size: 9px;
}

.flash.success { border-left-color: var(--green); }
.flash.error { border-left-color: var(--red); }
.flash.warning { border-left-color: var(--yellow); }

.flash button {
    margin-left: auto;
    border: 0;
    background: transparent;
    cursor: pointer;
}

/* Login refinement */
.auth-body {
    font-family: Manrope, "Segoe UI", Arial, sans-serif;
}

.auth-card,
.verify-card {
    border-radius: 3px;
}

.auth-logo,
.verify-mark {
    border-radius: 2px;
}

/* Responsive */
@media (max-width: 1380px) {
    .global-search { width: 190px; }
    .executive-status-band { grid-template-columns: minmax(280px,1.45fr) 1px repeat(4,minmax(105px,.65fr)); }
    .metric-ledger { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .cockpit-layout { grid-template-columns: minmax(0,1.45fr) minmax(320px,.8fr); }
}

@media (max-width: 1120px) {
    .global-command-bar { grid-template-columns: var(--navigator) 1fr auto; }
    .global-context span,
    .global-context i,
    .sync-state { display: none; }
    .transaction-launcher { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .transaction-launcher a:nth-child(2) { border-right: 0; }
    .transaction-launcher a:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
    .executive-status-band { grid-template-columns: 1.5fr repeat(2,1fr); }
    .status-divider { display: none; }
    .status-fact:nth-last-child(-n+2) { border-top: 1px solid rgba(255,255,255,.08); }
    .cockpit-layout,
    .lower-layout { grid-template-columns: 1fr; }
    .pipeline-track { overflow-x: auto; grid-template-columns: repeat(9, minmax(120px,auto)); }
}

@media (max-width: 900px) {
    :root { --navigator: 286px; }
    .global-command-bar { grid-template-columns: 1fr auto; }
    .global-brand { border-right: 0; }
    .global-context { display: none; }
    .mobile-nav-trigger { display: flex; }
    .module-navigator {
        transform: translateX(-102%);
        box-shadow: 35px 0 80px rgba(0,0,0,.40);
    }
    .module-navigator.open { transform: translateX(0); }
    .navigator-collapse { display: none; }
    .sidebar-close { display: grid; }
    .workspace-stage { margin-left: 0; }
    .global-search span,
    .global-search kbd,
    .sovereign-user > span:nth-child(2),
    .sovereign-user > svg { display: none; }
    .global-search { width: 36px; justify-content: center; padding: 0; }
    .context-bar { padding: 10px 15px; }
    .context-link { display: none; }
    .content { padding: 18px 15px 32px; }
    .app-footer { padding: 0 15px 16px; }
    body.nav-collapsed { --navigator: 286px; }
    body.nav-collapsed .global-brand-copy,
    body.nav-collapsed .navigator-head > div:first-child,
    body.nav-collapsed .nav-label b,
    body.nav-collapsed .nav-text,
    body.nav-collapsed .nav-code,
    body.nav-collapsed .nav-badge,
    body.nav-collapsed .navigator-footer span,
    body.nav-collapsed .release-line span { display: initial; }
    body.nav-collapsed .nav-item { grid-template-columns: 38px 21px minmax(0,1fr) auto; justify-items: initial; }
}

@media (max-width: 680px) {
    .global-brand-copy { display: none; }
    .global-actions { padding-right: 8px; }
    .sync-state { display: none; }
    .cockpit-hero { align-items: flex-start; flex-direction: column; }
    .cockpit-hero-actions { width: 100%; }
    .cockpit-hero-actions .btn { flex: 1; }
    .executive-status-band { grid-template-columns: 1fr 1fr; }
    .status-score { grid-column: 1 / -1; }
    .status-fact { border-top: 1px solid rgba(255,255,255,.08); }
    .transaction-launcher { grid-template-columns: 1fr; }
    .transaction-launcher a { border-right: 0; border-bottom: 1px solid var(--line); }
    .transaction-launcher a:last-child { border-bottom: 0; }
    .metric-ledger { grid-template-columns: 1fr; }
    .performance-body { grid-template-columns: 1fr; }
    .financial-register { border-left: 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(2,1fr); }
    .financial-register div { border-right: 1px solid var(--line); }
    .schedule-register-row { grid-template-columns: 56px 4px minmax(0,1fr) auto; }
    .schedule-resource { display: none; }
    .decision-row { grid-template-columns: 26px 50px minmax(0,1fr); }
    .decision-row em { display: none; }
    .sovereign-panel-head { align-items: flex-start; flex-direction: column; }
    .head-controls { width: 100%; justify-content: space-between; }
    .app-footer { display: block; }
    .app-footer span { display: block; margin-top: 4px; }
    .flash-stack { left: 10px; right: 10px; }
    .flash { min-width: 0; width: 100%; }
}

@media print {
    .global-command-bar,
    .module-navigator,
    .context-bar,
    .app-footer,
    .cockpit-hero-actions,
    .context-actions,
    .no-print,
    .flash-stack {
        display: none !important;
    }
    .workspace-frame { padding: 0; }
    .workspace-stage { margin: 0; }
    .content { padding: 0; max-width: none; }
    .sovereign-panel,
    .panel { box-shadow: none; border-color: #bbb; }
}
