:root {
  color-scheme: dark;
  --bg: #0b1019;
  --surface: #141b27;
  --surface2: #1b2432;
  --border: #2b3648;
  --line: #253042;
  --text: #f0f4fa;
  --muted: #99a7b9;
  --accent: #d0dce9;
  --accent-ink: #17212f;
  --success: #70cfab;
  --warning: #f5c987;
  --danger: #ef9a9a;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--text);
  background: radial-gradient(80% 90% at 4% -20%, #1c2a3d 0%, transparent 75%), var(--bg);
  line-height: 1.5;
  min-height: 100vh;
}
[hidden] { display: none !important; }
.shell { max-width: 1400px; padding: 0 30px; margin: auto; }
.site-header {
  padding: 29px 0 25px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 13px; }
.mark {
  width: 45px; height: 45px; border: 1px solid #a4b6c9; color: #e7f0f7;
  border-radius: 14px; display: grid; place-items: center; font: 600 27px Georgia,serif;
  background: linear-gradient(145deg,#3d4c5c,#171f2b);
}
.brand strong { display: block; letter-spacing: .24em; font-size: 19px; }
.brand span, .eyebrow { font-size: 10px; letter-spacing: .18em; color: #a8b8cc; }
.brand span { display: block; margin-top: 3px; }
.session-bar { display: flex; gap: 16px; align-items: center; font-size: 13px; color: var(--muted); }
h1, h2 { margin: 8px 0 8px; letter-spacing: -.035em; line-height: 1.15; }
h1 { font-size: clamp(28px, 3.4vw, 39px); font-weight: 600; }
h2 { font-size: 19px; font-weight: 600; }
p { margin: 7px 0 18px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
main { min-height: 65vh; }
.login-shell { display: flex; justify-content: center; padding: 75px 0; }
.login-panel { max-width: 450px; width: 100%; }
.panel {
  background: linear-gradient(145deg, rgba(24,33,46,.98), rgba(17,24,35,.98));
  border: 1px solid var(--border);
  border-radius: 17px;
  padding: 25px;
  min-width: 0;
  box-shadow: 0 14px 40px rgba(0,0,0,.09);
}
label { display: block; margin: 14px 0 6px; color: #bfcbda; font-size: 12px; font-weight: 600; }
input, select {
  display: block; width: 100%; background: #0c1420; border: 1px solid #354257;
  color: var(--text); padding: 12px 13px; border-radius: 9px; font: inherit; font-size: 14px;
  transition: border-color .15s;
}
input:focus, select:focus { border-color: #9faec1; outline: 2px solid rgba(169,188,210,.15); }
input::placeholder { color: #64748b; }
.button {
  cursor: pointer; white-space: nowrap; border-radius: 9px; padding: 10px 14px;
  font: 600 12px Inter, "Segoe UI",sans-serif; border: 1px solid transparent;
  background: #283444; color: #e8eff8;
}
.button:focus-visible { outline: 2px solid #bed2e7; outline-offset: 2px; }
.button:disabled { opacity: .6; cursor: wait; }
.button.primary { background: linear-gradient(120deg,#e5edf5,#a9bccf); color: var(--accent-ink); border-color: #c5d3e1; }
.button.secondary { background: #273348; border-color: #3c4d64; }
.button.ghost { background: transparent; border-color: #3c4d64; }
.button.danger { background: #3d2630; border-color: #65404b; color: #f5b2b5; }
.button.full { width: 100%; margin-top: 20px; padding: 13px; }
.button.tiny { font-size: 11px; padding: 6px 9px; }
.page-heading { margin-top: 36px; display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin: 20px 0; }
.stat { border: 1px solid var(--border); background: rgba(26,35,48,.8); border-radius: 13px; padding: 20px; }
.stat span { display: block; color: var(--muted); font-size: 12px; }
.stat strong { display: block; font-size: 30px; font-weight: 600; margin-top: 6px; }
.layout { display: grid; grid-template-columns: minmax(265px,320px) minmax(0,1fr); align-items: start; gap: 18px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.panel-head h2 { margin-bottom: 0; }
.create-panel form { margin-top: 10px; }
.table-scroll { max-width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
thead th { color: #9eadc1; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; font-size: 10px; }
th, td { padding: 13px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th:first-child,td:first-child { padding-left: 0; }
th:last-child,td:last-child { padding-right: 0; }
tbody tr:hover { background: rgba(255,255,255,.015); }
td strong { color: #e8eef7; }
.empty { text-align: center; padding: 28px; color: var(--muted); }
.pill { display: inline-block; border: 1px solid #344257; padding: 3px 7px; border-radius: 50px; font-size: 11px; color: #bfcddd; white-space: nowrap; }
.pill.ok { border-color: #3b6d61; color: var(--success); }
.pill.warn { border-color: #866e4b; color: var(--warning); }
.pill.bad { border-color: #8b5054; color: var(--danger); }
.actions { display: flex; flex-wrap: wrap; gap: 5px; min-width: 200px; }
.logs-panel { margin-top: 18px; }
.message { margin: 24px 0 0; padding: 13px 17px; border-radius: 10px; border: 1px solid #48647b; background: #1a2c3e; font-size: 13px; }
.message.error { border-color: #975763; background: #3c2630; }
.message.success { border-color: #4b8672; background: #203b35; }
footer { border-top: 1px solid var(--border); color: #78869a; text-align: center; padding: 26px; margin-top: 45px; font-size: 11px; letter-spacing: .08em; }
@media (max-width: 1024px) {
  .layout { grid-template-columns: 1fr; }
  .create-panel { max-width: unset; }
  .stats { gap: 10px; }
}
@media (max-width: 600px) {
  .shell { padding: 0 15px; }
  .site-header { padding: 18px 0; flex-wrap: wrap; }
  .brand strong { font-size: 16px; }
  .page-heading { flex-wrap: wrap; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: 13px; }
  .panel { padding: 17px; }
  .session-bar { font-size: 11px; }
  .login-shell { padding: 36px 0; }
}
