:root {
  --bg: #070d1d;
  --surface: #0f172a;
  --surface-2: #1e293b;
  --border: rgba(56, 189, 248, 0.22);
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --green: #22c55e;
  --red: #ef4444;
  --amber: #f59e0b;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(circle at top, #0f1c38, var(--bg) 60%);
  color: var(--text);
  min-height: 100vh;
}
.hidden { display: none !important; }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card {
  width: 100%; max-width: 400px; background: rgba(15, 23, 42, 0.92);
  border: 1px solid var(--border); border-radius: 18px; padding: 28px;
  display: flex; flex-direction: column; gap: 14px;
}
.brand-badge { font-weight: 800; font-size: 20px; letter-spacing: 0.04em; color: #fff; }
.brand-badge span {
  background: linear-gradient(135deg, #0ea5e9, #22c55e); color: #04101f;
  padding: 2px 9px; border-radius: 8px; margin-left: 4px; font-size: 14px;
}
.muted { color: var(--muted); font-size: 13px; line-height: 1.5; }
.err-msg { color: #fca5a5; font-size: 13px; min-height: 18px; }

input, select {
  width: 100%; padding: 11px 13px; border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.25); background: #0b1224; color: #fff; font-size: 14px;
}
button { cursor: pointer; border: none; border-radius: 10px; font-weight: 600; font-size: 14px; padding: 10px 16px; }
.btn-primary { background: linear-gradient(135deg, #0ea5e9, #2563eb); color: #fff; }
.btn-ghost { background: rgba(30, 41, 59, 0.8); color: #e2e8f0; border: 1px solid rgba(148, 163, 184, 0.2); text-decoration: none; }
.btn-on { background: rgba(34, 197, 94, 0.2); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.4); }
.btn-off { background: rgba(239, 68, 68, 0.16); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.35); }

.topbar {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
  padding: 14px 22px; background: rgba(10, 15, 30, 0.88); border-bottom: 1px solid var(--border);
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 10px; }
.pill { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.pill-ok { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
.pill-warn { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }

.tabs { display: flex; gap: 8px; padding: 12px 22px; overflow-x: auto; border-bottom: 1px solid rgba(148, 163, 184, 0.12); }
.tab { background: transparent; color: var(--muted); padding: 9px 14px; border-radius: 10px; white-space: nowrap; }
.tab.active { background: rgba(14, 165, 233, 0.18); color: var(--accent); border: 1px solid var(--border); }

.container { max-width: 1120px; margin: 0 auto; padding: 20px; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }

.card {
  background: rgba(15, 23, 42, 0.86); border: 1px solid var(--border);
  border-radius: 16px; padding: 18px; margin-bottom: 16px;
}
.card h2 { font-size: 17px; margin-bottom: 10px; color: #e0f2fe; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.dev-card {
  background: rgba(15, 23, 42, 0.9); border: 1px solid var(--border);
  border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px;
}
.dev-top { display: flex; justify-content: space-between; align-items: start; gap: 8px; }
.dev-name { font-size: 16px; font-weight: 700; }
.dev-meta { font-size: 12px; color: var(--muted); }
.dev-actions { display: flex; gap: 8px; }
.dev-actions button { flex: 1; padding: 8px; font-size: 13px; }

.bridge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.bridge-item { background: rgba(30, 41, 59, 0.65); border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.bridge-item strong { display: block; color: #fff; margin-bottom: 3px; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.row-form { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.row-form input { flex: 1; min-width: 200px; }

.code-box {
  background: #040814; border: 1px solid rgba(56, 189, 248, 0.25); border-radius: 10px;
  padding: 12px; font-size: 12px; color: #7dd3fc; overflow-x: auto; margin: 8px 0; white-space: pre-wrap; word-break: break-all;
}
.events-list { display: flex; flex-direction: column; gap: 8px; max-height: 360px; overflow-y: auto; }
.event-row { background: rgba(30, 41, 59, 0.55); border-radius: 8px; padding: 9px 12px; font-size: 12px; }
