:root {
  --bg: #071117;
  --bg-soft: #0b1820;
  --panel: rgba(15, 31, 40, 0.88);
  --panel-solid: #10212b;
  --panel-hover: #142b36;
  --line: rgba(151, 190, 204, 0.13);
  --line-strong: rgba(151, 190, 204, 0.22);
  --text: #eef7f8;
  --muted: #8ba4ad;
  --muted-2: #5f7c86;
  --cyan: #4ce0d2;
  --cyan-dark: #1ca99f;
  --violet: #a88cff;
  --green: #69e39c;
  --amber: #ffca6d;
  --danger: #ff6b79;
  --danger-soft: rgba(255, 107, 121, 0.12);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  --radius: 18px;
  --radius-sm: 12px;
  font-family: Inter, "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 73% 8%, rgba(36, 166, 159, 0.08), transparent 28%),
    radial-gradient(circle at 18% 78%, rgba(113, 84, 190, 0.06), transparent 30%),
    var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.is-hidden { display: none !important; }

.ambient {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(110px);
  pointer-events: none;
  opacity: .08;
  z-index: 0;
}
.ambient-a { top: -180px; right: 12%; background: var(--cyan); }
.ambient-b { bottom: -200px; left: 10%; background: var(--violet); }

.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  background: var(--bg);
  color: var(--muted);
}
.loading-mark { display: flex; gap: 7px; }
.loading-mark span {
  width: 10px;
  height: 34px;
  border-radius: 8px;
  background: var(--cyan);
  animation: loading 1s ease-in-out infinite;
}
.loading-mark span:nth-child(2) { animation-delay: .12s; }
.loading-mark span:nth-child(3) { animation-delay: .24s; }
@keyframes loading { 0%, 100% { transform: scaleY(.5); opacity: .4; } 50% { transform: scaleY(1); opacity: 1; } }

.login-screen {
  position: relative;
  z-index: 20;
  min-height: 100vh;
  padding: 28px;
  display: grid;
  place-items: center;
}
.login-card {
  width: min(460px, 100%);
  padding: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: rgba(13, 29, 38, .94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 34px; }
.login-brand > span { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; color: #04201e; background: var(--cyan); font-size: 20px; font-weight: 900; }
.login-brand strong, .login-brand small { display: block; }
.login-brand strong { font-size: 15px; }
.login-brand small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.login-card h1 { margin: 5px 0 10px; font-size: 30px; }
.login-copy { margin: 0 0 24px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.login-card > label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 11px; font-weight: 700; }
.password-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.password-row .field { min-width: 0; }
.login-submit { width: 100%; justify-content: center; margin-top: 8px; }
.login-error { min-height: 21px; margin: 8px 0 2px; color: var(--danger); font-size: 11px; }
.login-security { margin-top: 22px; padding: 12px 14px; border: 1px solid rgba(105, 227, 156, .13); border-radius: 12px; display: flex; gap: 9px; color: var(--muted); background: rgba(105, 227, 156, .045); }
.login-security span { color: var(--green); font-weight: 900; }
.login-security p { margin: 0; font-size: 10px; line-height: 1.6; }

.app-shell { position: relative; z-index: 1; min-height: 100vh; display: grid; grid-template-columns: 244px 1fr; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 244px;
  padding: 28px 20px 22px;
  border-right: 1px solid var(--line);
  background: rgba(7, 17, 23, .88);
  backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  z-index: 10;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 28px; }
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 20px;
  color: #061519;
  background: var(--cyan);
  box-shadow: 0 0 26px rgba(76, 224, 210, .23);
}
.brand strong { display: block; font-size: 15px; letter-spacing: .02em; }
.brand span { display: block; margin-top: 3px; color: var(--muted-2); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }

.nav-list { display: grid; gap: 5px; }
.nav-item {
  width: 100%;
  min-height: 45px;
  border: 0;
  border-radius: 12px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: .18s ease;
  text-align: left;
}
.nav-item:hover { color: var(--text); background: rgba(255, 255, 255, .035); }
.nav-item.active { color: var(--text); background: rgba(76, 224, 210, .09); box-shadow: inset 2px 0 var(--cyan); }
.nav-icon { width: 22px; text-align: center; color: var(--cyan); font-size: 18px; }
.nav-badge { margin-left: auto; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 9px; display: grid; place-items: center; color: var(--muted); background: rgba(255,255,255,.05); font-size: 11px; }

.security-card {
  margin-top: auto;
  display: flex;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(105, 227, 156, .16);
  border-radius: 13px;
  background: rgba(105, 227, 156, .055);
}
.security-icon { flex: 0 0 24px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: #062013; background: var(--green); font-size: 12px; font-weight: 900; }
.security-card strong { font-size: 12px; }
.security-card p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }

.sidebar-foot { padding: 18px 6px 0; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.sidebar-foot small { margin-left: auto; color: var(--muted-2); }
.status-dot { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 10px currentColor; }
.status-dot.online { color: var(--green); background: var(--green); }
.status-dot.offline { color: var(--danger); background: var(--danger); }

.main-content { grid-column: 2; width: 100%; max-width: 1600px; padding: 24px 38px 50px; margin: 0 auto; }
.topbar { height: 78px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.topbar h1 { margin: 3px 0 0; font-size: clamp(22px, 2.1vw, 30px); letter-spacing: -.03em; }
.eyebrow { margin: 0; color: var(--cyan-dark); font-size: 9px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.live-pill { height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 20px; display: flex; align-items: center; gap: 8px; color: var(--muted); background: rgba(255,255,255,.025); font-size: 12px; }
.icon-button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: rgba(255,255,255,.025); color: var(--muted); font-size: 20px; cursor: pointer; transition: .2s; }
.icon-button:hover { color: var(--cyan); border-color: rgba(76,224,210,.35); transform: rotate(20deg); }
.icon-button.loading { animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.view { display: none; animation: view-in .22s ease; }
.view.active { display: block; }
@keyframes view-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

.hero-card {
  position: relative;
  min-height: 198px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr minmax(310px, 390px);
  align-items: center;
  gap: 30px;
  padding: 34px 36px;
  border: 1px solid rgba(76, 224, 210, .16);
  border-radius: 22px;
  background:
    linear-gradient(112deg, rgba(76,224,210,.11), transparent 45%),
    var(--panel);
  box-shadow: var(--shadow);
}
.hero-card::after { content: ""; position: absolute; width: 250px; height: 250px; top: -125px; right: 24%; border: 1px solid rgba(76,224,210,.1); border-radius: 50%; box-shadow: 0 0 0 42px rgba(76,224,210,.025), 0 0 0 84px rgba(76,224,210,.018); pointer-events: none; }
.hero-copy { position: relative; z-index: 1; min-width: 0; }
.hero-label { display: flex; align-items: center; gap: 8px; color: var(--cyan); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 0 rgba(76,224,210,.5); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(76,224,210,0); } 100% { box-shadow: 0 0 0 0 rgba(76,224,210,0); } }
.hero-copy h2 { margin: 12px 0 23px; font-size: clamp(24px, 3vw, 38px); letter-spacing: -.04em; }
.hero-meta { display: flex; gap: 32px; min-width: 0; }
.hero-meta span { min-width: 0; display: grid; gap: 5px; }
.hero-meta small { color: var(--muted-2); font-size: 10px; }
.hero-meta strong { max-width: 300px; overflow: hidden; color: #d8e9eb; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.hero-actions { position: relative; z-index: 1; display: grid; gap: 10px; }

.button { border: 1px solid transparent; border-radius: 12px; min-height: 44px; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer; transition: .18s ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.button-primary { color: #061b1c; background: var(--cyan); font-weight: 800; box-shadow: 0 10px 28px rgba(76,224,210,.12); }
.button-primary:hover { background: #6be9de; }
.button-soft { color: var(--text); border-color: var(--line); background: rgba(255,255,255,.045); }
.button-soft:hover { border-color: rgba(76,224,210,.26); background: rgba(76,224,210,.07); }
.button-danger { color: white; background: #da5060; font-weight: 800; }
.button-danger:hover { background: #ea5d6d; }
.button-danger-outline { color: #ff9aa4; border-color: rgba(255,107,121,.23); background: var(--danger-soft); }
.button-danger-outline:hover { border-color: rgba(255,107,121,.4); background: rgba(255,107,121,.17); }
.button-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: rgba(255,255,255,.06); font-size: 17px; }
.hero-actions .button { min-height: 58px; justify-content: flex-start; padding: 8px 14px; text-align: left; }
.hero-actions .button span:last-child { display: grid; gap: 3px; }
.hero-actions .button strong { font-size: 13px; }
.hero-actions .button small { color: var(--muted); font-size: 9px; }
.button.compact { min-height: 38px; padding: 0 13px; font-size: 12px; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-top: 14px; }
.metric-card { min-width: 0; min-height: 168px; padding: 18px 19px 15px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.metric-head { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 11px; }
.metric-icon { height: 24px; min-width: 32px; padding: 0 6px; border-radius: 7px; display: grid; place-items: center; font-size: 8px; font-weight: 900; letter-spacing: .06em; }
.metric-icon.cyan { color: var(--cyan); background: rgba(76,224,210,.1); }
.metric-icon.violet { color: var(--violet); background: rgba(168,140,255,.1); }
.metric-icon.green { color: var(--green); background: rgba(105,227,156,.1); }
.metric-icon.amber { color: var(--amber); background: rgba(255,202,109,.1); }
.metric-value { display: flex; align-items: baseline; gap: 5px; margin-top: 13px; }
.metric-value strong { font-size: 28px; letter-spacing: -.04em; }
.metric-value span { color: var(--muted-2); font-size: 10px; }
.metric-card p { margin: 8px 0 0; overflow: hidden; color: var(--muted-2); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.sparkline { height: 34px; margin: 7px -2px 0; }
.sparkline svg { width: 100%; height: 100%; overflow: visible; }
.sparkline path.line { fill: none; stroke: var(--cyan); stroke-width: 2; vector-effect: non-scaling-stroke; }
.sparkline path.area { fill: rgba(76,224,210,.08); }
.metric-card[data-metric="fps"] .sparkline path.line { stroke: var(--green); }
.metric-card[data-metric="fps"] .sparkline path.area { fill: rgba(105,227,156,.08); }
.meter { height: 5px; margin-top: 18px; overflow: hidden; border-radius: 5px; background: rgba(255,255,255,.055); }
.meter i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--violet); transition: width .35s ease; }
.metric-card[data-metric="disk"] .meter i { background: var(--amber); }

.overview-columns { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .8fr); gap: 14px; margin-top: 14px; }
.panel-card, .table-card, .timeline-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: 0 12px 35px rgba(0,0,0,.09); }
.panel-card { padding: 21px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 15px; }
.panel-head h3 { margin: 4px 0 0; font-size: 15px; }
.text-button { border: 0; color: var(--cyan-dark); background: transparent; cursor: pointer; font-size: 10px; }
.text-button:hover { color: var(--cyan); }
.health-badge { padding: 5px 8px; border-radius: 8px; color: var(--amber); background: rgba(255,202,109,.09); font-size: 9px; }
.health-badge.good { color: var(--green); background: rgba(105,227,156,.09); }
.health-badge.bad { color: var(--danger); background: var(--danger-soft); }

.compact-player-list { display: grid; }
.compact-player { min-height: 49px; display: grid; grid-template-columns: 32px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; border-top: 1px solid rgba(151,190,204,.08); }
.compact-player:first-child { border-top: 0; }
.avatar { width: 31px; height: 31px; border-radius: 10px; display: grid; place-items: center; color: var(--cyan); background: rgba(76,224,210,.08); font-size: 11px; font-weight: 800; }
.player-copy { min-width: 0; }
.player-copy strong { display: block; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.player-copy small { display: block; margin-top: 3px; color: var(--muted-2); font-size: 8px; }
.ping { color: var(--green); font-size: 10px; }
.mini-action { border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; color: var(--muted); background: rgba(255,255,255,.025); cursor: pointer; font-size: 9px; }
.mini-action:hover { color: var(--cyan); border-color: rgba(76,224,210,.25); }
.compact-empty { min-height: 120px; display: grid; place-items: center; color: var(--muted-2); font-size: 11px; }

.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 13px; }
.check-list li { display: flex; align-items: center; gap: 11px; }
.check { width: 26px; height: 26px; flex: 0 0 26px; border-radius: 8px; display: grid; place-items: center; font-size: 11px; font-weight: 900; }
.check.good { color: #052014; background: var(--green); }
.check.bad { color: white; background: var(--danger); }
.check.pending { color: var(--amber); background: rgba(255,202,109,.1); }
.check-list strong { display: block; font-size: 11px; }
.check-list small { display: block; margin-top: 2px; color: var(--muted-2); font-size: 8px; }

.section-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 8px 0 20px; }
.section-intro h2 { margin: 0; font-size: 22px; }
.section-intro p { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.table-card { overflow: hidden; }
.table-tools { min-height: 66px; padding: 13px 18px; display: flex; align-items: center; gap: 15px; border-bottom: 1px solid var(--line); }
.table-tools > span { margin-left: auto; color: var(--muted); font-size: 10px; }
.search-box { width: min(360px, 100%); min-height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; display: flex; align-items: center; gap: 8px; background: rgba(2,10,14,.3); }
.search-box span { color: var(--muted-2); font-size: 18px; }
.search-box input { width: 100%; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 11px; }
.search-box input::placeholder { color: var(--muted-2); }
.responsive-table { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 13px 18px; color: var(--muted-2); font-size: 9px; font-weight: 700; text-align: left; text-transform: uppercase; letter-spacing: .07em; }
td { padding: 14px 18px; border-top: 1px solid rgba(151,190,204,.075); color: #c8dcdf; font-size: 10px; }
tbody tr:hover { background: rgba(255,255,255,.018); }
.table-player { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.table-player strong { display: block; color: var(--text); font-size: 11px; }
.table-player small { display: block; margin-top: 3px; color: var(--muted-2); font-size: 8px; }
.mono { font-family: Consolas, "SFMono-Regular", monospace; color: var(--muted); font-size: 9px; }
.state-pill { padding: 4px 7px; border-radius: 8px; color: var(--green); background: rgba(105,227,156,.08); font-size: 8px; }
.manage-button { border: 1px solid rgba(76,224,210,.18); border-radius: 8px; padding: 6px 10px; color: var(--cyan); background: rgba(76,224,210,.06); cursor: pointer; font-size: 9px; }
.manage-button:hover { background: rgba(76,224,210,.12); }

.empty-state { min-height: 220px; padding: 35px; display: grid; place-items: center; align-content: center; text-align: center; }
.empty-state > div { width: 45px; height: 45px; border-radius: 14px; display: grid; place-items: center; color: var(--cyan); background: rgba(76,224,210,.08); font-size: 22px; }
.empty-state h3 { margin: 14px 0 5px; font-size: 14px; }
.empty-state p { margin: 0; color: var(--muted); font-size: 10px; }

.notice-card { margin-bottom: 16px; padding: 13px 16px; border: 1px solid rgba(76,224,210,.14); border-radius: 12px; display: flex; align-items: flex-start; gap: 11px; background: rgba(76,224,210,.045); }
.notice-card > span { width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%; display: grid; place-items: center; color: #062023; background: var(--cyan); font-size: 11px; font-weight: 900; }
.notice-card p { margin: 1px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.notice-card strong { color: #cfe7e9; }
.grant-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.grant-card { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.grant-top { display: flex; align-items: center; gap: 11px; }
.grant-top .avatar { width: 38px; height: 38px; }
.grant-identity { min-width: 0; }
.grant-identity strong { display: block; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.grant-identity small { display: block; margin-top: 3px; color: var(--muted-2); font: 8px Consolas, monospace; }
.duration-pill { margin-left: auto; padding: 5px 7px; border-radius: 8px; color: var(--cyan); background: rgba(76,224,210,.08); font-size: 8px; }
.duration-pill.permanent { color: var(--amber); background: rgba(255,202,109,.08); }
.permission-tags { margin: 15px 0; display: flex; flex-wrap: wrap; gap: 6px; }
.permission-tag { padding: 4px 7px; border-radius: 7px; color: var(--muted); background: rgba(255,255,255,.045); font-size: 8px; }
.grant-actions { padding-top: 12px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; }
.revoke-button { border: 0; color: #ff929d; background: transparent; cursor: pointer; font-size: 9px; }

.timeline-card { padding: 10px 22px; }
.timeline { display: grid; }
.timeline-item { position: relative; min-height: 68px; padding: 14px 0 14px 29px; border-top: 1px solid rgba(151,190,204,.075); }
.timeline-item:first-child { border-top: 0; }
.timeline-item::before { content: ""; position: absolute; left: 5px; top: 20px; width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(105,227,156,.08); }
.timeline-item.failed::before { background: var(--danger); box-shadow: 0 0 0 4px rgba(255,107,121,.08); }
.timeline-item::after { content: ""; position: absolute; left: 9px; top: 34px; bottom: -15px; width: 1px; background: var(--line); }
.timeline-item:last-child::after { display: none; }
.timeline-head { display: flex; gap: 10px; align-items: center; }
.timeline-head strong { font-size: 11px; }
.timeline-head time { margin-left: auto; color: var(--muted-2); font-size: 8px; }
.timeline-item p { margin: 5px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.timeline-meta { margin-top: 4px; color: var(--muted-2); font-size: 8px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 50; padding: 24px; display: grid; place-items: center; background: rgba(1,7,10,.76); backdrop-filter: blur(7px); }
.modal { position: relative; width: min(620px, 100%); max-height: min(780px, calc(100vh - 48px)); overflow: auto; border: 1px solid var(--line-strong); border-radius: 20px; background: #10212a; box-shadow: 0 35px 90px rgba(0,0,0,.5); animation: modal-in .2s ease; }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
.modal-close { position: absolute; top: 15px; right: 15px; z-index: 2; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); background: rgba(255,255,255,.025); cursor: pointer; font-size: 20px; line-height: 1; }
.modal-body { padding: 27px; }
.modal-kicker { color: var(--cyan-dark); font-size: 9px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.modal-body h2 { margin: 8px 40px 8px 0; font-size: 21px; }
.modal-description { margin: 0 0 20px; color: var(--muted); font-size: 10px; line-height: 1.65; }
.modal-player { margin: 18px 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; display: flex; align-items: center; gap: 11px; background: rgba(0,0,0,.1); }
.modal-player strong { display: block; font-size: 12px; }
.modal-player small { display: block; margin-top: 3px; color: var(--muted-2); font: 8px Consolas, monospace; }
.modal-section { margin-top: 19px; }
.modal-section > label, .field-label { display: block; margin-bottom: 8px; color: #c7dadd; font-size: 10px; font-weight: 700; }
.field, .select { width: 100%; height: 42px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; color: var(--text); background: rgba(2,10,14,.34); font-size: 11px; }
.field::placeholder { color: var(--muted-2); }
.select option { color: var(--text); background: var(--panel-solid); }
.field-hint { margin: 7px 0 0; color: var(--muted-2); font-size: 8px; line-height: 1.5; }
.confirm-box { margin-top: 13px; padding: 12px; border: 1px solid rgba(255,107,121,.18); border-radius: 11px; background: rgba(255,107,121,.055); }
.confirm-box p { margin: 0 0 9px; color: #f0a3aa; font-size: 9px; line-height: 1.55; }
.confirm-box code { color: white; }
.modal-actions { margin-top: 22px; display: flex; justify-content: flex-end; gap: 9px; }
.modal-actions .button { min-width: 110px; }

.effect-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.effect-button { min-height: 70px; padding: 10px; border: 1px solid var(--line); border-radius: 11px; display: grid; justify-items: start; align-content: center; gap: 4px; color: var(--text); background: rgba(255,255,255,.025); cursor: pointer; text-align: left; }
.effect-button:hover { border-color: rgba(76,224,210,.25); background: rgba(76,224,210,.055); }
.effect-button span { color: var(--cyan); font-size: 16px; }
.effect-button strong { font-size: 10px; }
.effect-button small { color: var(--muted-2); font-size: 8px; }
.player-modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }
.row-actions { display: flex; justify-content: flex-end; gap: 6px; }
.kick-button { border: 1px solid rgba(255,107,121,.24); border-radius: 8px; padding: 6px 9px; color: var(--danger); background: var(--danger-soft); cursor: pointer; font-size: 8px; }
.kick-button:hover { border-color: rgba(255,107,121,.48); background: rgba(255,107,121,.18); }

.preset-row { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.preset-button { border: 1px solid var(--line); border-radius: 9px; padding: 6px 9px; color: var(--muted); background: rgba(255,255,255,.025); cursor: pointer; font-size: 8px; }
.preset-button:hover { color: var(--cyan); border-color: rgba(76,224,210,.25); }
.permission-options { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.permission-option { min-height: 53px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; display: flex; align-items: center; gap: 9px; cursor: pointer; }
.permission-option:has(input:checked) { border-color: rgba(76,224,210,.28); background: rgba(76,224,210,.05); }
.permission-option input { width: 15px; height: 15px; accent-color: var(--cyan); }
.permission-option strong { display: block; font-size: 9px; }
.permission-option small { display: block; margin-top: 2px; color: var(--muted-2); font: 7px Consolas, monospace; }

.toast-region { position: fixed; z-index: 80; top: 20px; right: 20px; width: min(360px, calc(100vw - 40px)); display: grid; gap: 9px; pointer-events: none; }
.toast { padding: 13px 15px; border: 1px solid var(--line-strong); border-radius: 12px; display: flex; gap: 10px; align-items: flex-start; background: #142832; box-shadow: 0 18px 45px rgba(0,0,0,.33); animation: toast-in .2s ease; pointer-events: auto; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.toast-icon { width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%; display: grid; place-items: center; color: #042016; background: var(--green); font-size: 11px; font-weight: 900; }
.toast.error .toast-icon { color: white; background: var(--danger); }
.toast strong { display: block; font-size: 10px; }
.toast p { margin: 3px 0 0; color: var(--muted); font-size: 8px; line-height: 1.5; }

@media (max-width: 1120px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-card { grid-template-columns: 1fr 330px; }
}

@media (max-width: 880px) {
  .app-shell { display: block; }
  .sidebar { position: sticky; top: 0; width: 100%; height: auto; padding: 11px 14px; border-right: 0; border-bottom: 1px solid var(--line); flex-direction: row; align-items: center; }
  .brand { padding: 0; }
  .brand-mark { width: 32px; height: 32px; }
  .brand div:last-child { display: none; }
  .nav-list { margin-left: 10px; display: flex; overflow-x: auto; }
  .nav-item { min-height: 36px; width: auto; padding: 0 10px; white-space: nowrap; }
  .nav-icon, .nav-badge, .security-card, .sidebar-foot { display: none; }
  .main-content { padding: 16px 18px 40px; }
  .topbar { height: 65px; }
  .hero-card { grid-template-columns: 1fr; }
  .hero-actions { grid-template-columns: 1fr 1fr; }
  .overview-columns { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .login-screen { padding: 14px; }
  .login-card { padding: 26px 20px; }
  .login-card h1 { font-size: 26px; }
  .password-row { grid-template-columns: 1fr; }
  .password-row .button { width: 100%; }
  .main-content { padding-inline: 12px; }
  .topbar h1 { font-size: 21px; }
  .live-pill { display: none; }
  #logout-button { padding-inline: 9px; }
  .hero-card { padding: 24px 20px; }
  .hero-meta { gap: 18px; flex-wrap: wrap; }
  .hero-actions { grid-template-columns: 1fr; }
  .metric-grid, .grant-grid { grid-template-columns: 1fr; }
  .section-intro { align-items: flex-start; flex-direction: column; }
  .section-intro .button { width: 100%; }
  .table-tools { align-items: stretch; flex-direction: column; }
  .table-tools > span { margin-left: 0; }
  .effect-grid { grid-template-columns: repeat(2, 1fr); }
  .permission-options, .player-modal-actions { grid-template-columns: 1fr; }
  .modal-backdrop { padding: 10px; }
  .modal { max-height: calc(100vh - 20px); }
  .modal-body { padding: 23px 18px; }
}
