@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --bg: #eef1f7;
  --panel: #ffffff;
  --panel-raised: #f6f8fc;
  --border: #e4e8f1;
  --text: #1c2942;
  --dim: #6b7690;
  --dimmer: #98a1b8;

  --sidebar-bg: #172242;
  --sidebar-text: #aab4cc;
  --sidebar-text-active: #ffffff;

  --orange: #f5821f;
  --orange-dim: #d96b0f;
  --blue: #3b82f6;
  --blue-dim: #2563eb;
  --green: #10b981;
  --green-dim: #059669;
  --red: #ef4444;
  --amber: #f5a623;
  --violet: #7c6ff0;

  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
  --radius: 14px;
}
* { box-sizing: border-box; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  margin: 0;
  line-height: 1.5;
  font-size: 14px;
  min-height: 100vh;
}
code, .mono { font-family: var(--mono); }

.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 224px;
  flex-shrink: 0;
  background: var(--sidebar-bg);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 15px;
  padding: 0 8px 22px 8px;
  color: #fff;
}
.brand .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 12px rgba(245,130,31,0.6);
}
.navbtn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--sidebar-text);
  padding: 11px 14px;
  border-radius: 9px;
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
.navbtn:hover { background: rgba(255,255,255,0.06); color: #fff; }
.navbtn.active { background: var(--orange); color: #fff; box-shadow: 0 4px 14px rgba(245,130,31,0.35); }
.navbtn .ic { font-family: var(--mono); font-size: 14px; opacity: 0.9; width: 16px; }
.sidebar-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.08); }
.sidebar-foot button.ghost { color: var(--sidebar-text); border-color: rgba(255,255,255,0.15); }
.sidebar-foot button.ghost:hover { color: #fff; border-color: rgba(255,255,255,0.3); }

.main { flex: 1; padding: 32px 40px; max-width: 1160px; }
.pagehead { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; gap: 16px; flex-wrap: wrap; }
.pagehead h1 { font-size: 22px; margin: 0 0 4px 0; font-weight: 800; letter-spacing: -0.01em; color: var(--text); }
.pagehead p { margin: 0; color: var(--dim); font-size: 13px; }

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(28,41,66,0.06), 0 1px 2px rgba(28,41,66,0.04);
}
.panel + .panel { margin-top: 20px; }
.panel h2 { font-size: 15px; margin: 0 0 4px 0; font-weight: 700; display: flex; align-items: center; gap: 8px; color: var(--text); }
.panel h3 { font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.06em; margin: 18px 0 10px 0; font-weight: 700; }
.panel .desc { color: var(--dim); font-size: 12.5px; margin: 0 0 14px 0; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

label { display: block; font-size: 12px; color: var(--dim); margin-top: 12px; margin-bottom: 5px; font-weight: 600; }
label.inline { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
input[type="text"], input[type="password"], input[type="number"], select {
  width: 100%;
  background: var(--panel-raised);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 10px;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 12.5px;
}
input:focus, select:focus { outline: none; border-color: var(--blue); background: #fff; }
input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--orange); }

button {
  background: var(--blue);
  color: #fff;
  border: none;
  padding: 9px 16px;
  border-radius: 9px;
  font-family: var(--sans);
  font-weight: 700;
  cursor: pointer;
  font-size: 12.5px;
  box-shadow: 0 2px 8px rgba(59,130,246,0.25);
}
button:hover { filter: brightness(1.05); }
button:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
button.ghost { background: transparent; color: var(--text); border: 1px solid var(--border); font-weight: 600; box-shadow: none; }
button.ghost:hover { border-color: var(--dimmer); background: var(--panel-raised); }
button.danger { background: var(--red); box-shadow: 0 2px 8px rgba(239,68,68,0.25); }
button.subtle { background: var(--panel-raised); color: var(--dim); font-weight: 600; box-shadow: none; border: 1px solid var(--border); }
button.violet { background: var(--orange); box-shadow: 0 2px 8px rgba(245,130,31,0.3); }
button.amber { background: var(--green); box-shadow: 0 2px 8px rgba(16,185,129,0.25); }

.status-line { color: var(--dim); font-size: 12px; margin-top: 10px; white-space: pre-wrap; }

table { width: 100%; border-collapse: collapse; margin-top: 6px; }
th, td { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--border); font-size: 12.5px; }
td.mono, td code { font-family: var(--mono); font-size: 12px; }
th { color: var(--dim); font-weight: 700; text-transform: uppercase; font-size: 10.5px; letter-spacing: 0.06em; }
tr:last-child td { border-bottom: none; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.02em; }
.badge.success { background: rgba(16,185,129,0.12); color: var(--green-dim); }
.badge.failed { background: rgba(239,68,68,0.12); color: var(--red); }
.badge.info { background: rgba(59,130,246,0.12); color: var(--blue-dim); }
.badge.violet { background: rgba(245,130,31,0.13); color: var(--orange-dim); }
.badge.amber { background: rgba(245,166,35,0.15); color: #a15c00; }
.badge.dim { background: var(--panel-raised); color: var(--dim); border: 1px solid var(--border); }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.actions button { padding: 6px 11px; font-size: 11px; box-shadow: none; }
.empty { color: var(--dim); text-align: center; padding: 36px 20px; font-size: 13px; }

.log-box {
  background: var(--panel-raised);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
  white-space: pre-wrap;
  max-height: 240px;
  overflow-y: auto;
  border-radius: 10px;
  padding: 12px;
  border: 1px solid var(--border);
}

.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tag { background: var(--panel-raised); border: 1px solid var(--border); border-radius: 7px; padding: 4px 8px; font-family: var(--mono); font-size: 11px; color: var(--dim); }

dialog {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
  font-family: var(--sans);
  max-width: 460px;
  width: 90%;
  box-shadow: 0 24px 70px rgba(28,41,66,0.25);
}
dialog h2 { margin-top: 0; display: flex; align-items: center; gap: 8px; }
dialog::backdrop { background: rgba(23,34,66,0.45); }

.warn-box {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 11px 13px;
  border-radius: 9px;
  font-size: 12px;
  margin-bottom: 12px;
}
.info-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  padding: 11px 13px;
  border-radius: 9px;
  font-size: 12px;
  margin-bottom: 12px;
}

.auth-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(160deg, #eef1f7 0%, #e4e9f5 100%);
}
.auth-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 36px;
  width: 340px;
  box-shadow: 0 24px 70px rgba(28,41,66,0.15);
}
.auth-box h1 { display: flex; align-items: center; gap: 8px; font-size: 17px; margin: 0 0 20px 0; font-weight: 800; color: var(--text); }
.auth-box h1 .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 12px rgba(245,130,31,0.5); }
.auth-box input { margin-bottom: 14px; }
.auth-box button { width: 100%; margin-top: 4px; padding: 11px; }

@media (max-width: 720px) {
  .shell { flex-direction: column; }
  .sidebar { width: 100%; flex-direction: row; overflow-x: auto; padding: 12px; }
  .brand { display: none; }
  .main { padding: 20px; }
}
