:root {
  --bg: #070b16;
  --bg-2: #0b1122;
  --card: rgba(14, 20, 36, 0.82);
  --line: rgba(226, 232, 240, 0.13);
  --text: #f8fafc;
  --muted: #a8b3c7;
  --accent: #86ffd9;
  --accent-2: #9ab8ff;
  --danger: #ff8ca0;
  --warning: #ffd58c;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(1000px 400px at -10% 0%, rgba(134, 255, 217, 0.16), transparent 60%),
    radial-gradient(900px 420px at 110% 10%, rgba(154, 184, 255, 0.16), transparent 62%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  color: var(--text);
  padding: 24px;
  position: relative;
}
.glow { position: fixed; inset: auto; width: 340px; height: 340px; border-radius: 999px; filter: blur(60px); opacity: .24; pointer-events: none; z-index: 0; }
.glow-left { left: -120px; top: -120px; background: rgba(134, 255, 217, .45); }
.glow-right { right: -120px; top: -80px; background: rgba(154, 184, 255, .45); }
.top, .workspace { position: relative; z-index: 1; }
.top { margin: 0 auto 20px; max-width: 1200px; }
.top-inner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; }
.brand-logo { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-weight: 800; letter-spacing: .08em; color: #062315; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 10px 30px rgba(134,255,217,.3); }
.eyebrow { margin: 0; font-size: 11px; letter-spacing: .22em; color: var(--muted); }
.title-wrap h1 { margin: 3px 0 0; font-size: 28px; line-height: 1.15; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 20px; box-shadow: var(--shadow); backdrop-filter: blur(8px); }
.status-line { margin-top: 14px; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; color: var(--muted); }
.dot { width: 10px; height: 10px; border-radius: 999px; background: var(--accent); box-shadow: 0 0 0 6px rgba(134,255,217,.12); }
.workspace { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-head h2, .card-head h3 { margin: 0; font-size: 18px; }
.server-list { display: grid; gap: 12px; }
.server-item { border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: rgba(11,17,34,.6); }
.server-item h3 { margin: 0 0 8px; font-size: 16px; }
.server-meta { font-size: 13px; color: var(--muted); margin-top: 5px; }
.server-summary { margin-top: 10px; font-size: 13px; color: #dbe5f5; }
.pill { display: inline-flex; align-items: center; justify-content: center; min-height: 28px; padding: 0 12px; border-radius: 999px; font-size: 12px; border: 1px solid transparent; background: rgba(148,163,184,.14); color: var(--text); }
.pill.success { color: #123b2d; border-color: rgba(134,255,217,.5); background: rgba(134,255,217,.9); }
.pill.error { color: #4d0f1f; border-color: rgba(255,140,160,.5); background: rgba(255,140,160,.9); }
.pill.warning { color: #51380b; border-color: rgba(255,213,140,.45); background: rgba(255,213,140,.88); }
.status-inline { display: inline-flex; align-items: center; gap: 7px; color: var(--accent); font-size: 12px; font-weight: 800; white-space: nowrap; }
.status-dot { display: inline-block; width: 9px; height: 9px; margin-right: 7px; border-radius: 999px; vertical-align: middle; }
.status-dot.on { background: var(--accent); box-shadow: 0 0 0 5px rgba(134,255,217,.11), 0 0 18px rgba(134,255,217,.42); }
.status-dot.off { background: var(--danger); box-shadow: 0 0 0 5px rgba(255,140,160,.11), 0 0 18px rgba(255,140,160,.32); }
.field-label { display: block; margin: 8px 0 8px; font-size: 12px; color: var(--muted); letter-spacing: .14em; }
.field { margin-top: 14px; }
select, input { width: 100%; min-height: 48px; border-radius: 15px; border: 1px solid var(--line); background: rgba(11,17,34,.68); color: var(--text); padding: 0 14px; outline: none; font-size: 15px; }
select:focus, input:focus { border-color: rgba(134,255,217,.65); box-shadow: 0 0 0 4px rgba(134,255,217,.10); }
.output { border: 1px solid var(--line); background: rgba(11,17,34,.62); border-radius: 16px; padding: 14px; }
.value-row { margin-top: 12px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.value-row .label { display: block; font-size: 11px; letter-spacing: .14em; color: var(--muted); }
.value-row strong { display: block; margin-top: 6px; font-size: 18px; }
.actions { margin-top: 14px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.btn { min-height: 44px; border: 1px solid transparent; border-radius: 999px; color: var(--text); font-weight: 700; letter-spacing: .01em; cursor: pointer; }
.btn.primary { color: #062315; background: linear-gradient(135deg, var(--accent), #72ffd0 45%, var(--accent-2)); }
.btn.ghost { background: rgba(148,163,184,.12); border-color: var(--line); }
.btn.ghost.danger { color: #ffdce4; border-color: rgba(255,140,160,.35); background: rgba(255,140,160,.15); }
.action-output { margin-top: 14px; white-space: pre-wrap; color: #d9e6f7; min-height: 80px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.history-panel { margin-top: 14px; border: 1px solid var(--line); border-radius: 16px; background: rgba(11,17,34,.6); padding: 12px; }
.logs { margin: 8px 0 0; padding: 0 6px 0 0; list-style: none; display: grid; gap: 8px; max-height: 260px; overflow: auto; scrollbar-width: thin; scrollbar-color: rgba(134,255,217,.55) rgba(11,17,34,.35); }
.logs::-webkit-scrollbar { width: 9px; }
.logs::-webkit-scrollbar-track { background: rgba(11,17,34,.38); border-radius: 999px; }
.logs::-webkit-scrollbar-thumb { background: linear-gradient(180deg, rgba(134,255,217,.72), rgba(154,184,255,.65)); border-radius: 999px; border: 2px solid rgba(11,17,34,.8); }
.logs::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, rgba(134,255,217,.92), rgba(154,184,255,.84)); }
.logs li { border: 1px solid var(--line); background: rgba(15,23,42,.65); border-radius: 12px; padding: 10px; font-size: 13px; }
.log-top { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.log-meta { color: var(--muted); font-size: 12px; }
.login-wrap { max-width: 460px; margin: 70px auto 0; }
.login-wrap h1 { margin: 8px 0 6px; }
.login-help { color: var(--muted); margin: 0 0 10px; }
.modal { position: fixed; inset: 0; z-index: 30; display: none; place-items: center; padding: 20px; background: rgba(2,6,23,.68); backdrop-filter: blur(12px); }
.modal.show { display: grid; }
.modal-card { position: relative; width: min(520px,100%); border: 1px solid var(--line); border-radius: 28px; background: rgba(16,24,42,.96); box-shadow: var(--shadow); padding: 26px; }
.modal-card h2 { margin: 6px 0 10px; letter-spacing: -.03em; }
.modal-body { color: var(--muted); line-height: 1.65; margin: 0 0 14px; }
.modal-close { position: absolute; top: 13px; right: 13px; width: 36px; height: 36px; border: 0; border-radius: 999px; color: var(--text); background: rgba(255,255,255,.08); font-size: 24px; line-height: 1; cursor: pointer; }
.modal-server-box { margin: 14px 0; }
.modal-server-box strong { display: block; margin-top: 6px; font-size: 20px; }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.modal-error { color: var(--danger); min-height: 18px; margin: 8px 2px 0; font-size: 13px; }
.hidden { display: none !important; }
@media (max-width: 980px) {
  body { padding: 14px; }
  .workspace { grid-template-columns: 1fr; }
  .top-inner { grid-template-columns: auto 1fr; }
  .logout-form { grid-column: 1 / -1; }
  .actions { grid-template-columns: 1fr; }
  .value-row { grid-template-columns: 1fr; }
  .btn { width: 100%; min-height: 48px; }
  select, input { min-height: 54px; font-size: 17px; border-radius: 17px; }
  .modal-actions { grid-template-columns: 1fr; }
}
