/* Panda Dashboard: same tokens, fonts and components as the Panda Launcher (renderer/style.css), always the green Overworld look. */
@font-face { font-family: "Inter"; src: url(fonts/inter.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --accent: #5ee08a; --accent-2: #22c55e; --accent-ink: #062612; --glow: 94,224,138;
  --bg-1: #0e1a14; --bg-2: #0a0d14; --bg-3: #132034;
  --text: #eef1f6; --text-2: #b9c0cc; --muted: #7f8898;
  --glass: rgba(18, 20, 27, .62); --glass-2: rgba(28, 31, 40, .72); --glass-3: rgba(40, 44, 56, .75);
  --line: rgba(255,255,255,.07); --line-2: rgba(255,255,255,.12); --line-3: rgba(255,255,255,.2);
  --red: #ff6b6b; --yellow: #ffd166; --blue: #7cc4ff;
  --ok: #5ee08a; --warn: #ffd166; --bad: #ff6b6b; --idle: #7f8898;
  --radius: 16px; --radius-sm: 11px;
  --ease: cubic-bezier(.2,.8,.2,1); --spring: cubic-bezier(.34,1.45,.5,1);
  --shadow: 0 20px 50px rgba(0,0,0,.45);
  --sidebar: 236px;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  display: flex; color: var(--text); background: var(--bg-2); overflow: hidden;
  font: 14px/1.5 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
a { color: var(--accent); }
.pixel { font-weight: 700; letter-spacing: -.2px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tiny { font-size: 11px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.ic { display: inline-flex; width: 18px; height: 18px; flex: none; }
.ic svg { width: 100%; height: 100%; }
::selection { background: rgba(var(--glow), .35); }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(255,255,255,.2); }
::-webkit-scrollbar-track { background: transparent; }
:focus-visible { outline: 2px solid rgba(var(--glow), .8); outline-offset: 2px; }

/* ================= ambient background ================= */
#bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.bg-glow {
  position: absolute; inset: 0;
  background:
    radial-gradient(900px 600px at 85% -10%, color-mix(in srgb, var(--bg-3) 90%, transparent), transparent 70%),
    radial-gradient(800px 700px at -10% 110%, color-mix(in srgb, var(--bg-1) 95%, transparent), transparent 70%),
    radial-gradient(600px 400px at 60% 110%, rgba(var(--glow), .07), transparent 70%),
    var(--bg-2);
  transition: background 1.2s var(--ease);
}
#bgParticles { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .5; }
.bg-noise {
  position: absolute; inset: 0; opacity: .06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ================= login ================= */
#login { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 16px; }
.login-card {
  width: min(400px, 100%); padding: 34px 30px 28px; border-radius: 24px; text-align: center;
  background: linear-gradient(180deg, rgba(30,33,42,.85), rgba(18,20,27,.85)); border: 1px solid var(--line-2);
  box-shadow: 0 40px 100px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.06); backdrop-filter: blur(24px) saturate(1.3);
  animation: rise .9s var(--ease) both;
}
.login-card .logo { width: 84px; height: 84px; image-rendering: pixelated; border-radius: 20px; filter: drop-shadow(0 16px 30px rgba(var(--glow), .35)); animation: floaty 3.5s ease-in-out infinite; }
.login-card h1 { margin: 16px 0 4px; font: 700 26px/1.15 "Inter"; letter-spacing: -.5px; }
.login-card p { margin: 0 0 24px; color: var(--muted); }
.login-card form { text-align: left; }
.login-card .btn { width: 100%; margin-top: 6px; }
.login-err { min-height: 20px; margin: 10px 0 0; color: #ff9c9c; font-size: 13px; text-align: center; }
.login-card.shake { animation: shake .45s var(--ease); }
.login-hint { margin-top: 18px; padding: 12px 14px; border-radius: 12px; background: rgba(var(--glow), .08); border: 1px solid rgba(var(--glow), .2); font-size: 12.5px; color: var(--text-2); text-align: left; }
.login-hint code { font-family: var(--mono); color: var(--accent); }
@keyframes rise { from { opacity: 0; transform: translateY(24px) scale(.96); filter: blur(8px); } }
@keyframes floaty { 50% { transform: translateY(-8px) rotate(-2deg); } }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

/* ================= sidebar ================= */
#app { display: flex; flex: 1; min-width: 0; position: relative; z-index: 1; }
.sidebar {
  width: var(--sidebar); flex: none; position: relative; z-index: 3;
  display: flex; flex-direction: column; padding: 18px 12px 12px;
  background: linear-gradient(180deg, rgba(12,13,18,.72), rgba(10,11,15,.82));
  border-right: 1px solid var(--line); backdrop-filter: blur(24px) saturate(1.3);
}
.brand { display: flex; align-items: center; gap: 10px; margin: 2px 8px 22px; font-size: 19px; font-weight: 700; }
.brand img { width: 32px; height: 32px; border-radius: 8px; image-rendering: pixelated; filter: drop-shadow(0 4px 10px rgba(var(--glow), .35)); }
.brand small { display: block; font: 600 10.5px/1 "Inter"; color: var(--muted); letter-spacing: .8px; text-transform: uppercase; margin-top: 3px; }
#nav { display: flex; flex-direction: column; gap: 2px; }
.nav {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 12px;
  border: 0; border-radius: 11px; background: none; color: var(--muted); text-align: left;
  transition: color .25s var(--ease), background .25s var(--ease);
}
.nav:hover { color: var(--text); background: rgba(255,255,255,.04); }
.nav.active { color: var(--text); background: linear-gradient(90deg, rgba(var(--glow), .16), rgba(var(--glow), .04)); font-weight: 600; }
.nav.active::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); box-shadow: 0 0 12px rgba(var(--glow), .8); }
.nav .ic { transition: transform .35s var(--spring), color .25s; }
.nav.active .ic { color: var(--accent); }
.nav:hover .ic { transform: scale(1.12) rotate(-4deg); }
.nav b { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 8px; font-size: 11px; line-height: 18px; text-align: center; background: rgba(var(--glow), .18); color: var(--accent); }
.nav .sdot { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--idle); flex: none; }
.nav .sdot.ok { background: var(--ok); box-shadow: 0 0 8px rgba(94,224,138,.8); }
.nav .sdot.bad { background: var(--bad); box-shadow: 0 0 8px rgba(255,107,107,.7); }
.nav .sdot.warn { background: var(--warn); }
.nav > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-sep { height: 1px; margin: 8px 10px; background: var(--line); }
.nav-label { display: flex; align-items: center; gap: 8px; margin: 12px 12px 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); opacity: .7; }

.demo-pill { margin-top: auto; margin-bottom: 8px; padding: 9px 12px; border-radius: 12px; font-size: 12px; color: var(--yellow); background: rgba(255,209,102,.08); border: 1px solid rgba(255,209,102,.25); display: flex; gap: 8px; align-items: center; }
.account-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px 8px 8px; text-align: left;
  border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.03);
  transition: background .25s, border-color .25s;
}
.demo-pill[hidden] + .account-btn { margin-top: auto; }
.account-btn:hover { background: rgba(255,255,255,.06); border-color: var(--line-2); }
.account-btn .ic { color: var(--muted); width: 16px; }
.acc-avatar { width: 38px; height: 38px; border-radius: 10px; flex: none; display: grid; place-items: center; font: 700 16px "Inter"; color: var(--accent-ink); background: linear-gradient(180deg, var(--accent), var(--accent-2)); }
.acc-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.acc-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.popover { position: fixed; z-index: 60; min-width: 220px; padding: 6px; border-radius: 14px; background: rgba(24,26,34,.95); border: 1px solid var(--line-2); box-shadow: var(--shadow); backdrop-filter: blur(20px); animation: popIn .25s var(--spring); }
@keyframes popIn { from { opacity: 0; transform: translateY(8px) scale(.97); } }
.pop-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 9px; background: none; text-align: left; }
.pop-item:hover { background: rgba(255,255,255,.07); }
.pop-item.danger { color: var(--red); }
.pop-sep { height: 1px; background: var(--line); margin: 5px 6px; }

/* ================= views ================= */
main { flex: 1; position: relative; min-width: 0; overflow: hidden; }
.view { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; animation: viewIn .5s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(14px) scale(.995); } }
.page { padding: 38px 40px 60px; max-width: 1320px; margin: 0 auto; }
.page.full { height: 100%; display: flex; flex-direction: column; padding-bottom: 28px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 30px; line-height: 1.1; font-weight: 700; letter-spacing: -.6px; }
.page-head p { margin: 8px 0 0; color: var(--muted); }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
h2 { font-size: 20px; margin: 0; letter-spacing: -.2px; }
h3 { font-size: 16px; margin: 0; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 34px 0 14px; }
.section-title h2 { display: flex; align-items: center; gap: 10px; }
.section-title h2 .ic { color: var(--accent); }
.stagger > * { animation: cardIn .55s var(--ease) both; }
.stagger > *:nth-child(1) { animation-delay: .02s } .stagger > *:nth-child(2) { animation-delay: .06s } .stagger > *:nth-child(3) { animation-delay: .1s }
.stagger > *:nth-child(4) { animation-delay: .14s } .stagger > *:nth-child(5) { animation-delay: .18s } .stagger > *:nth-child(n+6) { animation-delay: .22s }
@keyframes cardIn { from { opacity: 0; transform: translateY(16px) scale(.98); } }

/* ================= controls ================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
  height: 40px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line-2); font-weight: 600; font-size: 13.5px;
  background: rgba(255,255,255,.05); color: var(--text); text-decoration: none;
  transition: background .2s, border-color .2s, transform .3s var(--spring), box-shadow .3s, opacity .2s;
}
.btn:hover:not(:disabled) { background: rgba(255,255,255,.09); border-color: var(--line-3); transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(1px) scale(.98); }
.btn:disabled { opacity: .4; cursor: default; box-shadow: none; filter: saturate(.3); }
.btn .ic { width: 16px; height: 16px; }
.btn.primary { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 100%, white 12%), var(--accent-2)); color: var(--accent-ink); border-color: transparent; box-shadow: 0 8px 22px rgba(var(--glow), .3), inset 0 1px 0 rgba(255,255,255,.35); }
.btn.primary:hover:not(:disabled) { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 100%, white 25%), var(--accent)); box-shadow: 0 12px 30px rgba(var(--glow), .42), inset 0 1px 0 rgba(255,255,255,.4); }
.btn.danger { background: rgba(255,107,107,.12); color: #ff9c9c; border-color: rgba(255,107,107,.3); }
.btn.danger:hover:not(:disabled) { background: rgba(255,107,107,.22); }
.btn.ghost { background: transparent; }
.btn.soft { background: rgba(var(--glow), .12); color: var(--accent); border-color: rgba(var(--glow), .25); }
.btn.soft:hover:not(:disabled) { background: rgba(var(--glow), .2); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 10px; }
.btn.lg { height: 48px; padding: 0 22px; font-size: 15px; border-radius: 14px; }
.btn .spinner { width: 14px; height: 14px; }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); display: inline-grid; place-items: center; transition: background .2s, color .2s; flex: none; }
.icon-btn:hover { background: rgba(255,255,255,.08); color: var(--text); }
.icon-btn.danger:hover { background: rgba(255,107,107,.15); color: var(--red); }
.icon-btn.on { color: var(--accent); background: rgba(var(--glow), .12); }
.icon-btn .ic { width: 17px; height: 17px; }

.input, select.input {
  width: 100%; height: 42px; padding: 0 14px; border-radius: 12px; outline: none;
  background: rgba(0,0,0,.25); border: 1px solid var(--line-2); color: var(--text);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.input:focus { border-color: rgba(var(--glow), .7); box-shadow: 0 0 0 4px rgba(var(--glow), .14); background: rgba(0,0,0,.35); }
select.input { appearance: none; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: right 17px center, right 12px center; background-size: 5px 5px; background-repeat: no-repeat; }
select.input option { background: #1c1f27; }
.search { position: relative; flex: 1; min-width: 180px; }
.search .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search .input { padding-left: 42px; }
.field-label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 8px; }
.field { margin-bottom: 16px; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }

.seg { position: relative; display: inline-flex; flex-wrap: wrap; padding: 4px; border-radius: 13px; background: rgba(0,0,0,.28); border: 1px solid var(--line); }
.seg button { display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; padding: 7px 14px; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: 13px; transition: color .25s, background .3s var(--ease); }
.seg button:hover { color: var(--text); }
.seg button.active { color: var(--text); background: rgba(255,255,255,.1); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 4px 12px rgba(0,0,0,.25); }
.seg button b { font-size: 11px; padding: 1px 7px; border-radius: 8px; background: rgba(255,255,255,.1); }
.seg button .ic { width: 15px; height: 15px; }

.chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 99px; font-size: 12.5px; font-weight: 500; border: 1px solid var(--line-2); background: rgba(255,255,255,.03); color: var(--text-2); transition: background .2s, color .2s, border-color .2s, transform .3s var(--spring); }
.chip:hover { color: var(--text); transform: translateY(-1px); background: rgba(255,255,255,.07); }
.chip.active { background: rgba(var(--glow), .16); border-color: rgba(var(--glow), .5); color: var(--accent); }
.chip .ic { width: 14px; height: 14px; }
.chip.code { font-family: var(--mono); font-size: 12px; }
.quick-label { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.chips.quick { margin-bottom: 12px; }
.quick-chip { flex-direction: column; align-items: flex-start; gap: 1px; padding: 7px 14px; border-radius: 12px; text-align: left; }
.quick-chip b { font-weight: 600; color: var(--text); font-size: 12.5px; }
.quick-chip code { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.quick-chip:hover code { color: var(--accent); }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 7px; font-size: 11px; font-weight: 700; letter-spacing: .2px; background: rgba(255,255,255,.08); color: var(--text-2); white-space: nowrap; }
.badge.accent { background: rgba(var(--glow), .16); color: var(--accent); }
.badge.warn { background: rgba(255,209,102,.14); color: var(--yellow); }
.badge.red { background: rgba(255,107,107,.14); color: #ff9c9c; }
.badge.blue { background: rgba(124,196,255,.14); color: var(--blue); }
.badge .ic { width: 12px; height: 12px; }

.card { background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); backdrop-filter: blur(16px) saturate(1.2); }
.card.pad { padding: 20px 22px; }
.card-hover { transition: transform .45s var(--spring), box-shadow .45s var(--ease), border-color .3s; }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-2); }

.spinner { width: 15px; height: 15px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.skel { background: linear-gradient(90deg, rgba(255,255,255,.04) 0%, rgba(255,255,255,.09) 50%, rgba(255,255,255,.04) 100%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; border-radius: 12px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 50px 20px; color: var(--muted); }
.empty img { width: 64px; height: 64px; border-radius: 14px; image-rendering: pixelated; opacity: .9; animation: floaty 4s ease-in-out infinite; }
.empty strong { color: var(--text); font-size: 16px; }
.empty code { font-family: var(--mono); font-size: 12px; color: var(--accent); }

/* ================= status ================= */
.st { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; padding: 3px 10px 3px 8px; border-radius: 99px; white-space: nowrap; }
.st i.d { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.st.ok { color: var(--ok); background: rgba(94,224,138,.12); }
.st.ok i.d { animation: ping 1.8s infinite; box-shadow: 0 0 0 0 rgba(94,224,138,.7); }
.st.warn { color: var(--warn); background: rgba(255,209,102,.12); }
.st.bad { color: #ff9c9c; background: rgba(255,107,107,.13); }
.st.idle { color: var(--muted); background: rgba(255,255,255,.06); }
.st .ic { width: 13px; height: 13px; }
@keyframes ping { 70% { box-shadow: 0 0 0 7px rgba(94,224,138,0); } 100% { box-shadow: 0 0 0 0 rgba(94,224,138,0); } }

/* ================= overview ================= */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.tile { position: relative; overflow: hidden; padding: 18px 20px 16px; border-radius: 20px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(16px); min-height: 150px; display: flex; flex-direction: column; }
.tile .tl { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }
.tile .tl .ic { width: 16px; height: 16px; color: var(--accent); }
.tile .tv { font-size: 32px; font-weight: 700; letter-spacing: -.8px; line-height: 1.15; margin-top: 8px; font-variant-numeric: tabular-nums; }
.tile .tv small { font-size: 18px; color: var(--muted); margin-left: 2px; }
.tile .ts { font-size: 12.5px; color: var(--muted); }
.tile.hero-tile { background: radial-gradient(400px 200px at 0% 0%, rgba(var(--glow), .22), transparent 70%), var(--glass); }
.tile .bgicon { position: absolute; right: -12px; bottom: -16px; width: 110px; height: 110px; opacity: .08; color: var(--accent); }
.tile .bgicon svg { width: 100%; height: 100%; }
.meter { height: 8px; border-radius: 8px; background: rgba(255,255,255,.08); overflow: hidden; margin-top: auto; }
.meter i { display: block; height: 100%; border-radius: 8px; background: var(--accent); transition: width .8s var(--ease); }
.meter.warn i { background: var(--warn); } .meter.bad i { background: var(--bad); }
.spark { position: relative; margin-top: auto; height: 46px; }
.spark svg { width: 100%; height: 100%; display: block; overflow: visible; }
.spark .tip { position: absolute; top: -26px; transform: translateX(-50%); padding: 3px 8px; border-radius: 7px; font-size: 11px; font-weight: 600; background: rgba(24,26,34,.95); border: 1px solid var(--line-2); white-space: nowrap; pointer-events: none; }

.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.svc { padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 14px; cursor: pointer; }
.svc-top { display: flex; align-items: center; gap: 12px; }
.svc-ico { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; flex: none; background: rgba(var(--glow), .12); color: var(--accent); border: 1px solid rgba(var(--glow), .22); }
.svc-ico .ic { width: 21px; height: 21px; }
.svc-ico.bad { background: rgba(255,107,107,.12); color: var(--red); border-color: rgba(255,107,107,.25); }
.svc-ico.idle { background: rgba(255,255,255,.05); color: var(--muted); border-color: var(--line-2); }
.svc-name { font-weight: 700; font-size: 15px; }
.svc-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.svc-meta span { display: inline-flex; align-items: center; gap: 5px; }
.svc-meta .ic { width: 13px; height: 13px; }
.svc-foot { display: flex; gap: 8px; }

/* ================= consoles ================= */
.console { position: relative; flex: 1; min-height: 320px; display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; background: rgba(5,6,8,.8); border: 1px solid var(--line); box-shadow: inset 0 1px 0 rgba(255,255,255,.03); }
.console-bar { display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 16px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.02); }
.console-bar .title { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.console-bar .title .live { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px rgba(var(--glow), .9); animation: blink 1.4s ease-in-out infinite; }
.console-bar .title .live.off { background: var(--muted); box-shadow: none; animation: none; }
.console-bar .search { max-width: 280px; }
.console-bar .search .input { height: 32px; border-radius: 9px; font-size: 12.5px; padding-left: 36px; }
.console-bar .search .ic { left: 12px; width: 15px; height: 15px; }
@keyframes blink { 50% { opacity: .35; } }
.console pre { flex: 1; margin: 0; padding: 14px 18px; overflow: auto; font: 12.5px/1.65 var(--mono); color: #aeb6c3; white-space: pre-wrap; word-break: break-word; user-select: text; }
.console pre > span { display: block; }
.console pre .w { color: var(--yellow); }
.console pre .e { color: #ff8a8a; }
.console pre .ok { color: var(--accent); }
.console pre .sys { color: var(--blue); }
.console pre .cmd { color: var(--text); font-weight: 600; margin-top: 6px; }
.console pre .cmd::before { content: "› "; color: var(--accent); }
.console pre .ts { color: #5d6573; }
.console pre mark { background: rgba(var(--glow), .3); color: var(--text); border-radius: 3px; }
.console-input { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px; border-top: 1px solid var(--line); background: rgba(255,255,255,.02); }
.console-input .prompt { font: 600 12.5px var(--mono); color: var(--accent); white-space: nowrap; max-width: 45%; overflow: hidden; text-overflow: ellipsis; }
.console-input input { flex: 1; min-width: 0; height: 34px; border: 0; outline: none; background: none; font: 13px var(--mono); color: var(--text); }
.jump { position: absolute; right: 18px; bottom: 70px; }

/* ================= services page ================= */
.svc-title { align-items: center; margin-bottom: 18px; }
.svc-title .svc-ico { width: 52px; height: 52px; border-radius: 15px; }
.svc-title h1 { font-size: 26px; }
.svc-title p { margin-top: 4px; }
.facts-bar { display: flex; gap: 28px; flex-wrap: wrap; padding: 14px 20px; margin-bottom: 14px; }
.fact { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); min-width: 0; }
.fact b { color: var(--text); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fact b.mono { font-size: 12.5px; }

/* ================= tables ================= */
.table-card { overflow: hidden; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .2s; }
tbody tr.click { cursor: pointer; }
tbody tr.click:hover { background: rgba(255,255,255,.035); }
td.num { font-variant-numeric: tabular-nums; }
.who { display: flex; align-items: center; gap: 10px; }
.who img { width: 30px; height: 30px; border-radius: 8px; image-rendering: pixelated; background: var(--glass-3); }
.who .ph { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--glass-3); font: 700 13px "Inter"; color: var(--text-2); }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }

/* ================= dialog ================= */
.dialog { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; }
.dialog-backdrop { position: absolute; inset: 0; background: rgba(3,4,6,.65); backdrop-filter: blur(8px); animation: fadeIn .3s var(--ease); }
.dialog-panel { position: relative; width: min(440px, 100%); border-radius: 22px; background: linear-gradient(180deg, rgba(30,33,42,.97), rgba(20,22,28,.97)); border: 1px solid var(--line-2); box-shadow: 0 40px 100px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.06); animation: dialogIn .5s var(--spring); }
.dialog-panel h3 { padding: 20px 22px 4px; font: 700 17px "Inter"; letter-spacing: -.2px; }
.dialog-panel p { margin: 0; padding: 6px 22px 16px; color: var(--text-2); line-height: 1.6; }
.dialog-panel p code { font-family: var(--mono); font-size: 12.5px; color: var(--accent); }
.dialog-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 6px 22px 20px; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes dialogIn { from { opacity: 0; transform: translateY(18px) scale(.96); } }

.toasts { position: fixed; right: 22px; bottom: 22px; z-index: 90; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 11px; max-width: 400px; padding: 12px 16px 12px 13px; border-radius: 14px; background: rgba(30,33,42,.94); backdrop-filter: blur(16px); border: 1px solid var(--line-2); box-shadow: 0 18px 40px rgba(0,0,0,.5); font-size: 13px; pointer-events: auto; animation: toastIn .55s var(--spring) both; }
.toast.out { animation: toastOut .35s var(--ease) both; }
.toast .ic { color: var(--accent); }
.toast.err .ic { color: var(--red); }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.95); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px); } }

/* ================= forms ================= */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; align-items: end; }
.form-grid .field { margin: 0; }

/* ================= responsive ================= */
.menu-btn { display: none; }
@media (max-width: 820px) {
  body { flex-direction: column; }
  #app { flex-direction: column; }
  .sidebar { width: 100%; flex-direction: row; align-items: center; padding: 10px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { margin: 0; font-size: 17px; }
  .brand small { display: none; }
  .menu-btn { display: inline-grid; margin-left: auto; }
  #nav { display: none; position: absolute; top: 100%; left: 0; right: 0; padding: 10px 16px; background: rgba(12,13,18,.97); border-bottom: 1px solid var(--line); backdrop-filter: blur(24px); }
  .sidebar.open #nav { display: flex; }
  .nav.active::before { display: none; }
  .demo-pill { display: none; }
  .account-btn { width: auto; margin: 0 0 0 6px !important; padding: 4px; border: 0; background: none; }
  .account-btn .acc-text, .account-btn > .ic { display: none; }
  .acc-avatar { width: 34px; height: 34px; }
  .page { padding: 24px 16px 40px; }
  .page.full { min-height: 100%; height: auto; }
  .page-head h1 { font-size: 30px; }
  .facts-bar { gap: 16px 22px; }
  .console { min-height: 60vh; }
  .console-bar .search { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ================= switch and slider (from the launcher) ================= */
.setting-row { display: flex; align-items: center; gap: 16px; cursor: pointer; }
.switch { appearance: none; width: 44px; height: 26px; border-radius: 26px; flex: none; position: relative; background: rgba(255,255,255,.12); border: 1px solid var(--line-2); transition: background .3s var(--ease); cursor: pointer; margin: 0; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); transition: transform .4s var(--spring); }
.switch:checked { background: var(--accent); border-color: transparent; box-shadow: 0 0 16px rgba(var(--glow), .4); }
.switch:checked::after { transform: translateX(18px); }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--accent) var(--pct, 50%), rgba(255,255,255,.1) var(--pct, 50%)); outline: none; }
input[type=range]:disabled { opacity: .4; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.4), 0 0 0 4px rgba(var(--glow), .25); cursor: pointer; transition: transform .2s var(--spring); }
input[type=range]::-moz-range-thumb { width: 20px; height: 20px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.4), 0 0 0 4px rgba(var(--glow), .25); cursor: pointer; }
input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.15); }
