:root {
    color-scheme: light;
    --bg: #f5f4f0;
    --fg: #182638;
    --muted: #66717d;
    --surface: #fff;
    --border: #e1e4e5;
    --accent: #225e61;
    --error: #b33434;
    --ok: #227158;
    --warn: #916512;
    --paper: #0b1524;
    --live: #a12828;
    --navy: #0b1524;
    --gold: #c9ad78;
    --shadow: 0 4px 22px rgb(20 35 48 / 3%);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 14px/1.6 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 3px solid #a47a2b; outline-offset: 4px; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 100; padding: 12px 20px; background: white; }
.skip-link:focus { top: 12px; }
.icon { flex-shrink: 0; vertical-align: middle; }
.env-banner { padding: 7px 20px; color: #fff; font-size: 10px; font-weight: 600; letter-spacing: .12em; text-align: center; }
.env-paper { background: var(--paper); }
.env-live { background: var(--live); }
.workspace .env-banner { margin-left: 248px; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 248px; z-index: 30; display: flex; flex-direction: column; background: var(--navy); color: #b3bfce; border-right: 1px solid #202c3c; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #344153 var(--navy); }
.brand { display: block; padding: 31px 24px 28px; border-bottom: 1px solid #ffffff0d; }
.brand img { display: block; max-width: 100%; height: auto; }
.sidebar nav { padding: 8px 14px 24px; }
.nav-label { margin: 21px 14px 9px; color: #8a99ab; font-size: 9px; text-transform: uppercase; letter-spacing: .16em; font-weight: 700; }
.nav-item { position: relative; display: flex; align-items: center; gap: 12px; min-height: 40px; margin: 3px 0; padding: 9px 13px; border: 1px solid transparent; border-radius: 7px; color: #b7c2cf; font-size: 12px; text-decoration: none; transition: background .15s, color .15s; }
.nav-item .icon { width: 17px; height: 17px; color: #8d9db0; }
.nav-item:hover { background: #ffffff08; color: white; }
.nav-item.is-active { color: #f0d6a3; background: #c9ad7814; border-color: #c9ad782b; }
.nav-item.is-active .icon { color: var(--gold); }
.nav-count { margin-left: auto; background: #c9ad7822; padding: 0 6px; border-radius: 4px; color: #f0d6a3; font-size: 10px; }
.sidebar-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: auto; padding: 20px; border-top: 1px solid #ffffff12; }
.account-avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: var(--gold); background: #c9ad7814; border: 1px solid #c9ad7826; }
.account-details { flex: 1; min-width: 0; }
.account-details .nav-label { display: block; margin: 0; font-size: 8px; }
.account-email { display: block; overflow: hidden; text-overflow: ellipsis; font-size: 11px; white-space: nowrap; }
.sidebar-footer form { margin: 0 0 0 42px; }
.sidebar-footer button.link { color: #c9ad78; font-size: 11px; }
.workspace-header { min-height: 72px; margin-left: 248px; padding: 18px 36px; display: flex; gap: 20px; align-items: center; justify-content: space-between; background: #ffffffb3; border-bottom: 1px solid var(--border); }
.workspace-title { color: var(--muted); font-size: 11px; }
.workspace-title span { margin: 0 12px; color: #bbc1c7; }
.workspace-title strong { font-weight: 500; color: var(--fg); }
.header-notifications { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; text-decoration: none; }
.header-notifications .icon { width: 17px; }
.notification-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 50%; background: #edf3f1; color: var(--accent); font-size: 10px; }
.page { max-width: 1640px; margin: 0 auto; padding: 34px 36px 48px; }
.workspace .page { margin-left: 248px; max-width: none; min-height: calc(100vh - 170px); }
.workspace-footer { margin-left: 248px; padding: 18px 36px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; border-top: 1px solid var(--border); color: var(--muted); font-size: 10px; letter-spacing: .025em; }
.footer-divider { margin: 0 10px; color: #b7aa90; }
h1, h2, h3 { line-height: 1.25; color: var(--fg); }
h1 { margin: 0 0 12px; font-size: clamp(27px, 2.5vw, 36px); letter-spacing: -.045em; font-weight: 600; }
h2 { margin: 32px 0 15px; font-size: 18px; letter-spacing: -.025em; font-weight: 600; }
h3 { margin: 0 0 8px; font-size: 15px; font-weight: 600; }
p { margin: 10px 0 18px; }
.page > h1 + .muted { max-width: 960px; margin-bottom: 26px; font-size: 13px; }
.muted { color: var(--muted); }
.card { width: calc(100% - 32px); max-width: 460px; margin: 72px auto; padding: 36px; border: 1px solid var(--border); border-top: 3px solid var(--gold); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
label { display: block; margin: 16px 0 6px; font-size: 12px; font-weight: 600; }
input, select, textarea { width: 100%; min-height: 42px; padding: 10px 12px; color: var(--fg); background: #fafbfa; border: 1px solid #d7dddf; border-radius: 7px; }
input:hover, select:hover, textarea:hover { border-color: #a9b9b9; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
input[type='checkbox'], input[type='radio'] { width: 17px; min-height: 17px; accent-color: var(--accent); }
input:disabled, button:disabled, select:disabled { opacity: .55; cursor: not-allowed; }
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin-top: 18px; padding: 11px 18px; color: white; background: var(--accent); border: 1px solid transparent; border-radius: 7px; font-weight: 600; font-size: 12px; text-decoration: none; cursor: pointer; transition: background .15s, box-shadow .15s; }
button:hover, .button:hover { background: #174a4d; box-shadow: 0 3px 8px #164b4c18; }
button.link { margin: 0; padding: 0; min-height: auto; color: var(--accent); background: none; border: none; box-shadow: none; font-weight: 500; text-decoration: underline; }
button.secondary, .button.secondary { color: var(--fg); background: white; border-color: #d7dddf; box-shadow: none; }
button.secondary:hover, .button.secondary:hover { background: #f1f3f2; }
.error { color: var(--error); font-size: 13px; }
.notice { margin: 0 0 20px; padding: 15px 18px; border: 1px solid #d2e1dc; border-left: 3px solid var(--accent); border-radius: 8px; background: #f0f6f3; }
.notice.error { background: #fff3f1; border-color: #e6bebb; color: var(--error); }
details { margin-top: 16px; padding: 12px 16px; border: 1px solid var(--border); border-radius: 8px; background: white; }
summary { cursor: pointer; font-size: 13px; font-weight: 600; }
.qr { background: white; padding: 12px; display: inline-block; border-radius: 8px; }
.codes { columns: 2; padding-left: 18px; }
code { font-size: .86em; background: #eaf0ed; border-radius: 4px; padding: 2px 5px; overflow-wrap: anywhere; }
pre { overflow-x: auto; padding: 18px; border-radius: 9px; background: #edf0ed; }
table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; font-size: 12px; }
th, td { padding: 15px 17px; border-bottom: 1px solid #edf0ee; text-align: left; vertical-align: top; }
th { color: #6b7783; background: #f9faf8; font-size: 9px; text-transform: uppercase; letter-spacing: .075em; font-weight: 700; }
th:first-child { border-radius: 10px 0 0 0; }
th:last-child { border-radius: 0 10px 0 0; }
tbody tr:last-child > td { border-bottom: 0; }
tbody tr:hover { background: #f9fbf9; }
td { font-variant-numeric: tabular-nums; }
td a { font-weight: 600; text-decoration: none; }
td a:hover { text-decoration: underline; }
td .muted { font-size: 11px; }
.state-ok { color: var(--ok); font-weight: 600; }
.state-warn { color: var(--warn); font-weight: 600; }
.state-alerting, .neg { color: var(--error); font-weight: 600; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.badge { display: inline-block; padding: 2px 8px; border: 1px solid #dbe5df; border-radius: 5px; background: #f0f5f2; color: #426454; font-size: 10px; font-weight: 600; white-space: nowrap; }
.scroll { max-width: 100%; overflow-x: auto; border-radius: 10px; scrollbar-width: thin; }
.scroll table { min-width: 650px; }
.page > table { display: block; max-width: 100%; overflow-x: auto; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 8px 20px; }
.ticket { padding: 8px 22px 22px; background: white; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); }
.ticket .muted { font-size: 12px; }
td form { margin: 0 0 6px; }
td form input { margin-top: 4px; min-height: 34px; }
td form button { margin-top: 4px; padding: 6px 12px; }
td form button.link { padding: 0; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.eyebrow { margin: 0 0 8px; color: #85704a; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .17em; }
.page-heading h1 { margin-bottom: 8px; }
.page-heading p { margin: 0; }
.page-heading .button { margin: 0; white-space: nowrap; }
.overview-hero { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 30px; margin-bottom: 24px; padding: 30px 34px; background: var(--navy); border: 1px solid #1c3040; border-radius: 13px; color: #b1bfca; }
.overview-hero::after { content: ''; position: absolute; width: 220px; height: 220px; right: 100px; top: -130px; border: 45px solid #c9ad7809; border-radius: 50%; pointer-events: none; }
.overview-hero h2 { margin: 0 0 10px; color: #f4f0e6; font-size: clamp(22px, 2vw, 28px); font-weight: 400; letter-spacing: -.025em; }
.overview-hero p { max-width: 560px; margin: 0; font-size: 12px; }
.overview-hero .eyebrow { margin-bottom: 12px; color: var(--gold); font-size: 9px; }
.hero-aside { min-width: 140px; padding-left: 30px; border-left: 1px solid #ffffff20; font-size: 11px; }
.hero-aside strong { display: block; margin: 5px 0; color: #e2c68d; font-size: 15px; font-weight: 500; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 28px; }
.metric { padding: 20px 22px; background: white; border: 1px solid var(--border); border-radius: 11px; box-shadow: var(--shadow); text-decoration: none; color: inherit; }
a.metric:hover { border-color: #b9cfc7; }
.metric-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 11px; }
.metric-label .icon { color: #9d8963; width: 18px; height: 18px; }
.metric-value { display: block; margin: 10px 0 3px; font-size: 30px; line-height: 1.2; font-weight: 600; letter-spacing: -.055em; font-variant-numeric: tabular-nums; }
.metric-note { font-size: 10px; color: var(--muted); }
.panel { min-width: 0; margin-bottom: 22px; padding: 23px; background: white; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.panel-heading h2 { margin: 0; font-size: 17px; }
.panel-heading a { font-size: 11px; font-weight: 600; text-decoration: none; }
.panel > h2:first-child { margin-top: 0; }
.panel > p:last-child { margin-bottom: 0; }
.panel table { border: 0; }
.panel th { background: #f7f8f5; }
.panel th, .panel td { padding: 13px 12px; }
.panel-footnote { margin: 14px 0 0; font-size: 11px; line-height: 1.7; }
.dashboard-columns { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(290px, 1fr); gap: 22px; align-items: start; }
.dashboard-aside .scroll table { min-width: 0; }
.workspace .card { margin-left: max(280px, calc(50% - 106px)); }
.empty-state { padding: 28px 22px; background: #f9faf7; border: 1px dashed #dbe0d8; border-radius: 8px; color: var(--muted); font-size: 12px; }
.empty-state .icon { display: block; margin-bottom: 12px; color: #a9946c; width: 24px; height: 24px; }
.empty-state p { margin: 5px 0 0; }
.empty-state h3 { font-size: 13px; }
.activity-list { list-style: none; padding: 0; margin: 0; }
.activity-list li { padding: 13px 0; border-bottom: 1px solid var(--border); font-size: 12px; }
.activity-list li:last-child { border-bottom: 0; }
.activity-list .muted { display: block; margin-top: 5px; font-size: 10px; }
.data-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin-bottom: 16px; }
.data-facts > div { padding: 14px; background: #fafbf9; }
.data-facts strong { display: block; font-size: 22px; font-weight: 500; }
.data-facts span { font-size: 10px; color: var(--muted); }
.nav-toggle, .mobile-menu { display: none; }
@media (min-width: 1900px) { .workspace .page { padding-left: max(36px, calc((100vw - 1850px) / 2)); padding-right: max(36px, calc((100vw - 1850px) / 2)); } }
@media (max-width: 1200px) {
    .workspace-header { padding: 18px 24px; }
    .page { padding: 28px 24px 40px; }
    .metrics { gap: 12px; }
    .metric { padding: 17px; }
    .dashboard-columns { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .dashboard-aside { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; align-items: start; }
}
@media (max-width: 900px) {
    .sidebar { display: none; position: static; width: auto; max-height: 65vh; }
    .sidebar .brand { display: none; }
    .sidebar nav { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; }
    .sidebar .nav-label { grid-column: 1 / -1; }
    .nav-toggle { display: block; position: absolute; top: 40px; left: 12px; width: 92px !important; height: 42px; z-index: 40; opacity: 0; cursor: pointer; }
    .mobile-menu { display: flex; align-items: center; gap: 12px; margin: 0; padding: 15px 22px; background: var(--navy); color: white; font-size: 12px; cursor: pointer; }
    .mobile-menu > span:first-child { font-size: 19px; color: var(--gold); }
    .mobile-brand { margin-left: auto; letter-spacing: .18em; color: #f1dfbc; }
    .nav-toggle:focus-visible + .mobile-menu { outline: 3px solid var(--gold); outline-offset: -4px; }
    .nav-toggle:checked ~ .sidebar { display: flex; }
    .workspace .env-banner, .workspace-header, .workspace .page, .workspace-footer { margin-left: 0; }
    .workspace .card { margin-left: auto; }
    .workspace-header { min-height: 58px; }
    .workspace-title > strong, .workspace-title > span { display: none; }
    .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .env-banner { font-size: 9px; letter-spacing: .05em; }
    .page { padding: 24px 16px 32px; }
    .workspace-header { padding: 14px 16px; }
    .header-notifications > span:not(.notification-count) { display: none; }
    .page-heading { align-items: flex-start; flex-direction: column; gap: 16px; }
    .page-heading .button { width: 100%; }
    .overview-hero { padding: 24px; flex-direction: column; align-items: stretch; gap: 20px; }
    .hero-aside { padding: 16px 0 0; border-left: 0; border-top: 1px solid #ffffff20; }
    .hero-aside strong { display: inline; margin-left: 8px; }
    .hero-aside > span:last-child { display: block; margin-top: 5px; }
    .metric { padding: 16px; }
    .metric-label { font-size: 10px; }
    .metric-value { font-size: 27px; }
    .metric-label .icon { width: 15px; height: 15px; }
    .panel { padding: 18px; }
    .dashboard-aside { display: block; }
    .sidebar nav { gap: 2px; padding-left: 8px; padding-right: 8px; }
    .nav-item { padding: 9px; gap: 8px; font-size: 11px; }
    .workspace-footer { padding: 16px; font-size: 9px; }
    .card { margin: 30px auto; padding: 26px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
