
:root {
  color-scheme: dark;
  --bg: #0b1020;
  --panel: #11182a;
  --panel-2: #151e32;
  --border: #27334b;
  --text: #e8edf7;
  --muted: #8f9bb2;
  --primary: #5b8cff;
  --primary-hover: #78a1ff;
  --danger: #f87171;
  --success: #4ade80;
  --warning: #fbbf24;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
a { color: #91b1ff; text-decoration: none; }
a:hover { text-decoration: underline; }
.auth-card { width: min(100%, 420px); background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 28px; box-shadow: 0 24px 80px rgba(0,0,0,.35); }
.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; font-weight: 700; letter-spacing: -.01em; }
.logo { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: #18284a; color: #9fbbff; border: 1px solid #2f4672; font-size: 15px; }
h1 { font-size: 22px; margin: 0 0 8px; }
h2 { margin: 0 0 10px; font-size: 18px; }
p { color: var(--muted); line-height: 1.55; }
label { display: block; margin: 16px 0 7px; color: #c7d0e0; font-size: 13px; font-weight: 600; }
input { width: 100%; background: #0c1324; color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 11px 12px; outline: none; }
input:focus { border-color: #4e78d6; box-shadow: 0 0 0 3px rgba(91,140,255,.12); }
button, .button { appearance: none; border: 0; border-radius: 8px; background: var(--primary); color: white; font-weight: 650; padding: 11px 14px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
button:hover, .button:hover { background: var(--primary-hover); text-decoration: none; }
button:disabled { opacity: .65; cursor: default; }
.button.secondary, button.secondary { background: #1b2842; border: 1px solid #314261; color: #d7dfec; }
.button.secondary:hover, button.secondary:hover { background: #243554; }
.full { width: 100%; margin-top: 20px; }
.error { color: #fecaca; background: rgba(127,29,29,.22); border: 1px solid rgba(248,113,113,.35); border-radius: 8px; padding: 10px 12px; margin-top: 14px; font-size: 13px; }
.meta { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 12px; color: #738098; display: flex; justify-content: space-between; gap: 12px; }
.device { margin: 20px 0; background: #0c1324; border: 1px solid var(--border); border-radius: 10px; padding: 14px; }
.device-row { display: flex; justify-content: space-between; gap: 14px; padding: 7px 0; font-size: 13px; }
.device-row span:first-child { color: var(--muted); }
.app { min-height: 100vh; display: grid; grid-template-columns: 230px 1fr; }
.sidebar { border-right: 1px solid var(--border); background: #0d1425; padding: 20px 14px; }
.sidebar .brand { padding: 0 8px; margin-bottom: 18px; }
.nav { display: grid; gap: 4px; }
.nav a { color: #aeb9cc; padding: 10px 11px; border-radius: 7px; font-size: 14px; }
.nav a:hover, .nav a.active { text-decoration: none; background: #17223a; color: white; }
.main { min-width: 0; }
.topbar { min-height: 64px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 26px; background: rgba(13,20,37,.72); backdrop-filter: blur(12px); }
.badge { font-size: 12px; padding: 4px 8px; border: 1px solid #315346; border-radius: 999px; background: #102a22; color: #86efac; }
.content { padding: 26px; max-width: 1200px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; margin: 20px 0; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 18px; min-width: 0; }
.stat { font-size: 28px; font-weight: 750; margin-top: 6px; }
.muted { color: var(--muted); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 12px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: #8290a8; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
code { color: #b8c7e6; background: #0a1120; border: 1px solid #222f48; border-radius: 6px; padding: 3px 6px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.section { margin-top: 20px; }
.notice { border-left: 3px solid #fbbf24; background: rgba(120,83,15,.15); padding: 12px 14px; color: #f8dda0; border-radius: 6px; font-size: 13px; }
@media (max-width: 780px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .grid { grid-template-columns: 1fr; }
  .topbar, .content { padding-left: 18px; padding-right: 18px; }
}
