:root {
  color-scheme: dark;
  --bg: #020908;
  --sidebar: #041116;
  --panel: #071b20;
  --panel-2: #0a2427;
  --line: rgba(41, 176, 177, .28);
  --line-strong: rgba(58, 213, 208, .48);
  --lime: #a8ff00;
  --cyan: #20d8dd;
  --text: #f5faf8;
  --muted: #91a4a4;
  --soft: #637879;
  --warning: #ff9e36;
  --danger: #ff525d;
  --success: #65e886;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { min-height: 100vh; min-height: 100svh; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 264px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 26px 14px 22px; display: flex; flex-direction: column; background: radial-gradient(circle at 0 80%, rgba(8, 114, 104, .17), transparent 38%), linear-gradient(180deg, #06161c, #020b0e); border-right: 1px solid var(--line); z-index: 20; }
.brand { display: inline-flex; align-items: center; gap: 12px; padding: 0 13px 28px; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px 13px 5px 13px; transform: skew(-8deg); color: #04100d; background: linear-gradient(145deg, var(--cyan), var(--lime)); font-size: 23px; font-weight: 1000; box-shadow: 0 0 26px rgba(168, 255, 0, .13); }
.brand b { display: block; font-size: 20px; letter-spacing: .08em; }
.brand b span { color: var(--lime); }
.brand small { display: block; margin-top: 4px; color: #a6b8bb; font-size: 9px; letter-spacing: .25em; }
.sidebar nav { display: grid; gap: 4px; }
.nav-item { min-height: 48px; padding: 0 13px; display: flex; align-items: center; gap: 13px; color: #b7c5c6; border: 1px solid transparent; border-radius: 12px; font-size: 14px; font-weight: 650; }
.nav-icon { width: 25px; color: #719092; font-size: 10px; font-variant-numeric: tabular-nums; letter-spacing: .05em; }
.nav-item:hover { color: white; background: rgba(255, 255, 255, .03); }
.nav-item.active { color: var(--lime); background: linear-gradient(90deg, rgba(168, 255, 0, .15), rgba(32, 216, 221, .05)); border-color: rgba(168, 255, 0, .2); }
.nav-item.active .nav-icon { color: var(--lime); }
.sidebar-foot { margin-top: auto; padding: 18px 13px 2px; display: flex; gap: 11px; align-items: center; color: #dfe9e7; border-top: 1px solid var(--line); }
.sidebar-foot small { display: block; max-width: 165px; margin-top: 3px; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-dot { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: var(--lime); box-shadow: 0 0 14px var(--lime); }
.main { min-width: 0; }
.topbar { min-height: 74px; padding: 0 28px; display: flex; align-items: center; justify-content: flex-end; gap: 22px; border-bottom: 1px solid var(--line); background: rgba(2, 9, 8, .9); position: sticky; top: 0; z-index: 15; backdrop-filter: blur(16px); }
.global-search { width: min(360px, 40vw); min-height: 42px; padding: 0 14px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); background: rgba(7, 27, 32, .74); border-radius: 12px; }
.global-search input { width: 100%; border: 0; outline: 0; background: none; color: var(--text); font-size: 14px; }
.global-search input::placeholder, input::placeholder, textarea::placeholder { color: #647b7c; }
.topbar-user { display: flex; align-items: center; gap: 10px; }
.avatar { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; color: #c8f9f5; background: #0d2e37; font-weight: 800; }
.user-copy { display: grid; gap: 2px; min-width: 90px; }
.user-copy b { font-size: 13px; }
.user-copy small { color: var(--muted); font-size: 11px; }
.logout { border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.logout:hover { color: white; }
.menu-button, .nav-toggle, .nav-backdrop { display: none; }
.content { padding: 30px clamp(20px, 3vw, 44px) 60px; }
.page-head { margin-bottom: 24px; display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.page-head h1 { margin: 0; font-size: clamp(30px, 3vw, 46px); letter-spacing: -.045em; line-height: 1.05; }
.page-head p { margin: 8px 0 0; color: var(--muted); font-size: 15px; }
.eyebrow { margin: 0 0 10px; color: var(--lime); font-size: 11px; font-weight: 900; letter-spacing: .15em; }
.updated { color: var(--muted); font-size: 12px; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.metric, .card { border: 1px solid var(--line); background: linear-gradient(145deg, rgba(10, 36, 39, .95), rgba(5, 22, 27, .98)); border-radius: 18px; box-shadow: inset 0 1px rgba(255,255,255,.025); }
.metric { min-height: 128px; padding: 21px; position: relative; overflow: hidden; }
.metric::after { content: ""; position: absolute; width: 90px; height: 90px; top: -45px; right: -35px; border-radius: 50%; background: currentColor; opacity: .06; }
.metric-label { color: var(--muted); font-size: 13px; }
.metric-value { margin-top: 12px; font-size: clamp(30px, 3vw, 44px); line-height: 1; font-weight: 900; font-variant-numeric: tabular-nums; }
.tone-lime { color: var(--lime); } .tone-cyan { color: var(--cyan); } .tone-warning { color: var(--warning); } .tone-danger { color: var(--danger); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, .75fr); gap: 16px; }
.card { padding: 22px; }
.card-title { margin: 0 0 18px; display: flex; align-items: center; justify-content: space-between; gap: 14px; font-size: 17px; }
.card-title small { color: var(--muted); font-weight: 500; }
.role-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.role { padding: 16px; border: 1px solid rgba(69, 130, 132, .22); background: rgba(1, 13, 16, .36); border-radius: 13px; }
.role span { color: var(--muted); font-size: 12px; }
.role b { display: block; margin-top: 8px; font-size: 25px; }
.attention-list, .health-grid, .compact-list { display: grid; gap: 9px; }
.attention-row, .health-row, .compact-row { min-height: 48px; padding: 10px 13px; display: flex; align-items: center; justify-content: space-between; gap: 14px; background: rgba(1, 13, 16, .4); border: 1px solid rgba(69, 130, 132, .18); border-radius: 11px; }
.attention-row:hover { border-color: var(--line-strong); }
.attention-row span, .compact-row span { color: #c0cdcb; font-size: 13px; }
.attention-row b { min-width: 28px; color: var(--warning); text-align: right; font-variant-numeric: tabular-nums; }
.health-grid { grid-template-columns: 1fr 1fr; }
.health-row { justify-content: flex-start; }
.health-row .live-dot { width: 7px; height: 7px; }
.health-row span { display: grid; gap: 2px; font-size: 12px; }
.health-row small { color: var(--muted); }
.chart { height: 240px; padding: 26px 8px 4px; display: flex; align-items: flex-end; gap: 10px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, transparent, rgba(168,255,0,.025)); }
.bar { flex: 1; min-width: 10px; max-width: 68px; height: var(--height); position: relative; border-radius: 8px 8px 2px 2px; background: linear-gradient(180deg, var(--lime), rgba(168,255,0,.17)); }
.bar b { position: absolute; top: -23px; left: 50%; transform: translateX(-50%); font-size: 11px; }
.bar small { position: absolute; bottom: -25px; left: 50%; transform: translateX(-50%); color: var(--muted); font-size: 9px; white-space: nowrap; }
.data-card { padding: 0; overflow: hidden; }
.filters { margin-bottom: 16px; padding: 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border: 1px solid var(--line); background: var(--panel); border-radius: 15px; }
.filters input, .filters select, .field input, .field select, .field textarea, .login-card input { min-height: 42px; padding: 0 13px; color: var(--text); background: #031116; border: 1px solid var(--line); border-radius: 10px; outline: 0; }
.filters input { flex: 1; min-width: 220px; }
.filters input:focus, .filters select:focus, .field textarea:focus, .login-card input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(32,216,221,.08); }
.button { min-height: 42px; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line-strong); border-radius: 10px; background: #082027; color: var(--text); font-size: 12px; font-weight: 850; cursor: pointer; }
.button:hover { filter: brightness(1.12); }
.button.primary { color: #06100d; background: var(--lime); border-color: var(--lime); }
.button.danger { color: #ffadb2; border-color: rgba(255,82,93,.55); background: rgba(255,82,93,.06); }
.button.full { width: 100%; min-height: 52px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { padding: 14px 16px; color: #87a0a0; background: rgba(2, 13, 16, .6); text-align: left; font-size: 11px; letter-spacing: .04em; white-space: nowrap; }
td { padding: 15px 16px; border-top: 1px solid rgba(55, 114, 116, .18); vertical-align: middle; }
tr:hover td { background: rgba(32,216,221,.025); }
.primary-cell { min-width: 210px; }
.primary-cell strong { display: block; }
.primary-cell small, td small { display: block; margin-top: 5px; color: var(--muted); }
.status { display: inline-flex; align-items: center; min-height: 27px; padding: 4px 9px; border: 1px solid var(--line); border-radius: 999px; color: #bad0d0; background: rgba(32,216,221,.05); white-space: nowrap; font-size: 11px; font-weight: 750; }
.status.success { color: var(--success); border-color: rgba(101,232,134,.38); background: rgba(101,232,134,.07); }
.status.warning { color: var(--warning); border-color: rgba(255,158,54,.42); background: rgba(255,158,54,.08); }
.status.danger { color: #ff8f97; border-color: rgba(255,82,93,.48); background: rgba(255,82,93,.08); }
.status.lime { color: var(--lime); border-color: rgba(168,255,0,.38); background: rgba(168,255,0,.07); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(310px, .4fr); gap: 16px; align-items: start; }
.detail { position: sticky; top: 94px; }
.detail h2 { margin: 0 0 18px; font-size: 22px; }
.detail dl { display: grid; grid-template-columns: 120px 1fr; gap: 12px; margin: 0; font-size: 13px; }
.detail dt { color: var(--muted); } .detail dd { margin: 0; }
.field { display: grid; gap: 7px; margin-top: 14px; color: var(--muted); font-size: 12px; }
.field textarea { min-height: 92px; padding-top: 11px; resize: vertical; }
.feedback-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, .55fr); gap: 22px; }
.feedback-main h2 { margin: 17px 0 10px; font-size: 18px; line-height: 1.45; }
.feedback-main p, .feedback-main small { color: var(--muted); font-size: 12px; }
.feedback-form { padding-left: 20px; border-left: 1px solid var(--line); }
.history { grid-column: 1 / -1; padding-top: 14px; border-top: 1px solid var(--line); }
.history summary, details summary { color: var(--cyan); cursor: pointer; font-size: 12px; font-weight: 750; list-style: none; }
.inline-review { min-width: 290px; margin-top: 9px; padding: 12px; display: grid; gap: 8px; position: absolute; right: 16px; z-index: 4; background: #071b20; border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 18px 45px rgba(0,0,0,.42); }
.inline-review input { min-height: 40px; padding: 0 11px; color: var(--text); background: #031116; border: 1px solid var(--line); border-radius: 9px; }
.periods { display: flex; gap: 8px; flex-wrap: wrap; }
.action-row { margin-top: 15px; display: flex; gap: 9px; flex-wrap: wrap; }
.safety { margin: 16px 0 0; padding: 11px 13px; color: #9eb3b4; background: rgba(32,216,221,.05); border: 1px solid rgba(32,216,221,.2); border-radius: 10px; font-size: 11px; line-height: 1.45; }
.messages { margin-bottom: 18px; display: grid; gap: 8px; }
.message { padding: 13px 15px; border: 1px solid var(--line-strong); border-radius: 11px; background: rgba(32,216,221,.08); font-size: 13px; }
.message.success { color: #c7ffd3; border-color: rgba(101,232,134,.4); background: rgba(101,232,134,.08); }
.message.error { color: #ffc7ca; border-color: rgba(255,82,93,.4); background: rgba(255,82,93,.08); }
.pagination { margin-top: 18px; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--muted); font-size: 12px; }
.pagination a { padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; }
.empty-row { padding: 42px 20px; color: var(--muted); text-align: center; }
.stack { display: grid; gap: 16px; }
.wide-card { grid-column: 1 / -1; }
.progress { height: 8px; overflow: hidden; background: #102d32; border-radius: 999px; }
.progress > span { display: block; height: 100%; width: var(--progress); background: linear-gradient(90deg, var(--cyan), var(--lime)); border-radius: inherit; }
.timeline { margin: 16px 0 0; padding: 0; list-style: none; }
.timeline li { padding: 0 0 14px 20px; position: relative; color: #c4d0cf; font-size: 12px; border-left: 1px solid var(--line-strong); }
.timeline li::before { content: ""; position: absolute; left: -5px; top: 2px; width: 9px; height: 9px; border-radius: 50%; background: var(--cyan); }
.timeline small { display: block; margin-top: 4px; color: var(--muted); }
.login-body { display: grid; place-items: center; min-height: 100vh; padding: 24px; background: radial-gradient(circle at 12% 90%, rgba(0,155,149,.18), transparent 35%), radial-gradient(circle at 90% 8%, rgba(79,141,72,.2), transparent 30%), #020908; }
.login-shell { width: min(1050px, 100%); display: grid; grid-template-columns: 1.15fr .85fr; border: 1px solid var(--line); border-radius: 30px; overflow: hidden; background: rgba(3,17,18,.9); box-shadow: 0 36px 110px rgba(0,0,0,.45); }
.login-brand { min-height: 610px; padding: 52px; display: flex; flex-direction: column; justify-content: center; background: linear-gradient(145deg, rgba(7,38,35,.86), rgba(2,10,12,.96)), repeating-linear-gradient(90deg, transparent 0 62px, rgba(32,216,221,.04) 63px); }
.hero-brand { position: absolute; align-self: flex-start; top: calc(50% - 280px); padding-left: 0; }
.login-brand h1 { margin: 10px 0 22px; font-size: clamp(48px, 6vw, 78px); line-height: .95; letter-spacing: -.065em; }
.login-brand h1 span { color: var(--lime); }
.login-brand > p:last-child { max-width: 560px; color: var(--muted); font-size: 17px; line-height: 1.55; }
.login-card { padding: 54px 44px; align-self: center; }
.login-card h2 { margin: 0 0 28px; font-size: 29px; }
.login-card form { display: grid; gap: 16px; }
.login-card label { display: grid; gap: 8px; color: var(--muted); font-size: 12px; }
.security-note { margin: 18px 0 0; color: var(--soft); font-size: 11px; line-height: 1.5; text-align: center; }
.empty-state { width: min(520px, 100%); padding: 46px; text-align: center; border: 1px solid var(--line); border-radius: 24px; background: var(--panel); }
.empty-state h1 { margin: 18px 0 10px; }.empty-state p { color: var(--muted); }.empty-icon { width: 64px; height: 64px; margin: auto; display: grid; place-items: center; color: var(--warning); border: 1px solid currentColor; border-radius: 20px; font-size: 30px; }
@media (max-width: 1180px) { .metrics { grid-template-columns: 1fr 1fr; } .role-grid { grid-template-columns: 1fr 1fr; } .dashboard-grid { grid-template-columns: 1fr; } .detail { position: static; } }
@media (max-width: 860px) {
  .shell { display: block; }
  .sidebar { position: fixed; left: 0; width: min(290px, 86vw); transform: translateX(-105%); transition: transform .2s ease; box-shadow: 26px 0 70px rgba(0,0,0,.45); }
  .nav-toggle:checked ~ .sidebar { transform: translateX(0); }
  .nav-toggle:checked ~ .nav-backdrop { display: block; position: fixed; inset: 0; z-index: 19; background: rgba(0,0,0,.55); }
  .menu-button { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 11px; color: var(--lime); cursor: pointer; }
  .topbar { padding: 0 16px; justify-content: space-between; }
  .global-search { display: none; }
  .user-copy { display: none; }
  .content { padding: 24px 15px 48px; }
  .split, .feedback-card { grid-template-columns: 1fr; }
  .feedback-form { padding: 16px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .login-shell { grid-template-columns: 1fr; }
  .login-brand { display: none; }
}
@media (max-width: 560px) {
  .metrics { grid-template-columns: 1fr 1fr; gap: 9px; }
  .metric { min-height: 104px; padding: 16px; }
  .metric-label { font-size: 11px; }
  .metric-value { font-size: 29px; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .page-head h1 { font-size: 31px; }
  .role-grid, .health-grid { grid-template-columns: 1fr 1fr; }
  .card { padding: 16px; border-radius: 15px; }
  .topbar-user { margin-left: auto; }
  .login-card { padding: 36px 24px; }
}
