:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #e8f1ff;
  background: #071225;
  font-synthesis: none;
  --panel: #0b1b34;
  --panel-2: #102544;
  --line: #1d3d68;
  --muted: #91a9ca;
  --blue: #4c8dff;
  --green: #22d3a6;
  --yellow: #f5c451;
  --red: #ff667c;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 78% 4%, #18325e 0, #071225 38%, #050d1c 100%); }
button, input { font: inherit; }
button { cursor: pointer; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 250px 1fr; }
.sidebar { padding: 28px 20px; border-right: 1px solid var(--line); background: rgba(5, 15, 32, .88); position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 22px; margin-bottom: 38px; }
.logo { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: linear-gradient(135deg, #5b96ff, #2755cf); box-shadow: 0 12px 30px #2557cb55; }
.nav-item { display: flex; gap: 10px; align-items: center; padding: 13px 14px; border-radius: 12px; color: var(--muted); margin: 6px 0; }
.nav-item.active { color: white; background: #132c50; }
.sidebar-bottom { position: absolute; bottom: 24px; left: 20px; right: 20px; }
.status-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 14px var(--green); margin-right: 8px; }
.content { padding: 30px clamp(22px, 4vw, 64px) 60px; min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 28px; }
.topbar h1 { margin: 0; font-size: clamp(26px, 4vw, 42px); }
.muted { color: var(--muted); }
.card { background: linear-gradient(145deg, rgba(17, 40, 74, .94), rgba(8, 25, 50, .94)); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 18px 50px #0004; }
.hero { padding: 30px; display: flex; justify-content: space-between; gap: 24px; align-items: center; margin-bottom: 20px; }
.hero h2 { font-size: clamp(30px, 4vw, 54px); line-height: 1.05; max-width: 680px; margin: 10px 0; }
.badge { display: inline-flex; align-items: center; gap: 8px; color: #8fffe3; background: #0c3a3a; border: 1px solid #146358; border-radius: 999px; padding: 7px 12px; font-size: 12px; font-weight: 800; letter-spacing: .06em; }
.endpoint { min-width: 240px; padding: 20px; background: #0b1b35; border: 1px solid var(--line); border-radius: 16px; }
.endpoint strong { display: block; margin: 8px 0; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 20px 0; }
.metric { padding: 20px; }
.metric b { display: block; font-size: 30px; margin-top: 10px; }
.table-card { overflow: hidden; margin-top: 20px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 1040px; }
th, td { text-align: left; padding: 16px 14px; border-bottom: 1px solid #18365d; vertical-align: middle; }
th { font-size: 11px; color: #84a4d0; text-transform: uppercase; letter-spacing: .07em; }
.user-cell strong { display: block; }
.state { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 750; text-transform: capitalize; }
.state.running { color: #8fffe3; background: #0c3a3a; }
.state.waiting { color: #a9bdd8; background: #172943; }
.state.starting, .state.generating, .state.stopping { color: #ffe7a0; background: #4a3510; }
.state.error { color: #ffb0bd; background: #4b1825; }
.progress-box { min-width: 210px; }
.progress-label { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; margin-bottom: 7px; }
.progress-track { height: 10px; border-radius: 999px; background: #071226; overflow: hidden; border: 1px solid #21456f; }
.progress-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, #3f77ff, #25d3ad); transition: width .45s ease; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { border: 1px solid #2a5687; color: #dceaff; background: #102848; border-radius: 10px; padding: 9px 13px; font-weight: 750; }
.btn:hover:not(:disabled) { border-color: #5a96e6; background: #17365d; }
.btn.primary { background: linear-gradient(135deg, #5c96ff, #3569db); border-color: #6aa0ff; color: white; }
.btn.success { border-color: #1b806c; color: #8fffe3; background: #0c3a3a; }
.btn.danger { border-color: #7e2f43; color: #ffb0bd; background: #3b1520; }
.btn:disabled { opacity: .42; cursor: not-allowed; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(460px, 100%); padding: 34px; }
.login-card h1 { margin: 10px 0 6px; }
.field { display: grid; gap: 7px; margin: 18px 0; }
.field input { width: 100%; padding: 13px 14px; color: white; background: #07162b; border: 1px solid #2a4d78; border-radius: 11px; outline: none; }
.field input:focus { border-color: #5d96f7; box-shadow: 0 0 0 3px #4d87ec25; }
.login-card .btn { width: 100%; padding: 13px; }
.alert { padding: 13px 15px; border-radius: 11px; margin: 14px 0; border: 1px solid #714054; color: #ffc4ce; background: #351522; }
#toast { position: fixed; right: 22px; bottom: 22px; max-width: 420px; padding: 13px 16px; border-radius: 12px; background: #10294a; border: 1px solid #34689d; box-shadow: 0 16px 44px #0008; opacity: 0; transform: translateY(15px); pointer-events: none; transition: .25s; }
#toast.show { opacity: 1; transform: translateY(0); }
.two-col { display: grid; grid-template-columns: 1.25fr .75fr; gap: 18px; margin-top: 20px; }
.list { padding: 8px 18px 18px; }
.list-item { padding: 13px 2px; border-bottom: 1px solid #18365d; }
.add-grid { display: grid; grid-template-columns: 1fr 1fr 130px auto; gap: 10px; align-items: end; }
.small { font-size: 12px; }
@media (max-width: 1050px) { .metrics { grid-template-columns: repeat(2, 1fr); } .two-col { grid-template-columns: 1fr; } .add-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .shell { grid-template-columns: 1fr; } .sidebar { display: none; } .content { padding: 20px 14px 40px; } .hero { align-items: flex-start; flex-direction: column; } .endpoint { width: 100%; } .metrics { grid-template-columns: 1fr 1fr; } .topbar { align-items: flex-start; } }
.btn.download { border-color: #16806f; color: #98ffe7; background: #0c3b35; }
.active-job { margin: 18px 0; display: grid; grid-template-columns: auto auto 1fr; gap: 12px; align-items: center; padding: 14px 18px; border: 1px solid #82631c; border-radius: 14px; background: #3c2c0f; color: #ffe8a3; }
.client-note { margin-top: 20px; }
@media (max-width: 760px) { .active-job { grid-template-columns: 1fr; } }
