:root {
  --bg: #0a0b0f;
  --panel: #111318;
  --panel-2: #171a21;
  --line: #282c35;
  --text: #f4f4ee;
  --muted: #969aa5;
  --acid: #c8ff48;
  --violet: #8c79ff;
  --danger: #ff6d75;
  --warning: #ffce5c;
  --radius: 18px;
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); }
body { margin: 0; min-height: 100vh; color: var(--text); background: radial-gradient(circle at 85% 0%, #292245 0, transparent 28rem), var(--bg); }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.noise { position: fixed; inset: 0; pointer-events: none; opacity: .035; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E"); z-index: 100; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 2rem; }
.login-card { width: min(440px, 100%); padding: 3rem; border: 1px solid var(--line); border-radius: 28px; background: rgba(17,19,24,.88); box-shadow: 0 40px 120px rgba(0,0,0,.45); backdrop-filter: blur(18px); }
.brand-mark { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 16px; color: #0b0d0a; background: var(--acid); font-weight: 900; transform: rotate(-5deg); }
.eyebrow { margin: 1.2rem 0 .45rem; color: var(--acid); font: 700 .68rem/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .18em; }
h1 { font-size: clamp(2.7rem, 7vw, 4rem); line-height: .94; margin: 0; letter-spacing: -.06em; }
h2, h3 { margin: 0; letter-spacing: -.035em; }
.login-copy { color: var(--muted); line-height: 1.75; margin: 1.5rem 0 2rem; }
.button { border: 1px solid transparent; border-radius: 12px; padding: .78rem 1rem; cursor: pointer; transition: .2s ease; font-weight: 750; color: var(--text); background: var(--panel-2); }
.button:hover { transform: translateY(-1px); border-color: #454b59; }
.button:disabled { opacity: .45; cursor: wait; transform: none; }
.button.primary { color: #0a0c08; background: var(--acid); }
.button.secondary { color: var(--text); border-color: #3f4655; background: #20242d; }
.button.ghost { border-color: var(--line); background: transparent; color: var(--muted); }
.button.wide { width: 100%; margin-top: .7rem; }
.button.compact { padding: .55rem .8rem; }
.emergency-form { display: grid; gap: .8rem; margin-top: 1rem; }
.security-note, .hint { color: var(--muted); font-size: .78rem; line-height: 1.5; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 235px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 1.4rem 1rem; border-right: 1px solid var(--line); background: rgba(10,11,15,.88); backdrop-filter: blur(16px); display: flex; flex-direction: column; }
.logo { color: var(--text); text-decoration: none; display: flex; gap: .8rem; align-items: center; padding: .45rem .5rem 1.7rem; line-height: .9; }
.logo span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--acid); color: #090b07; font-weight: 900; }
.logo strong { font-size: .95rem; }
#nav { display: grid; gap: .32rem; }
#nav a { color: var(--muted); text-decoration: none; padding: .78rem .85rem; border-radius: 12px; display: flex; gap: .72rem; align-items: center; font-size: .9rem; }
#nav a i { font: normal .62rem ui-monospace, monospace; opacity: .6; }
#nav a:hover, #nav a.active { color: var(--text); background: var(--panel-2); }
#nav a.active::after { content: ""; width: 6px; height: 6px; margin-left: auto; border-radius: 50%; background: var(--acid); box-shadow: 0 0 18px var(--acid); }
.sidebar-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 1rem; }
.user-chip { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.user-chip > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #2a2e38; color: var(--acid); font-weight: 800; }
.user-chip div { display: grid; min-width: 0; }
.user-chip strong { font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip small { color: var(--muted); }
.icon-button { border: 0; color: var(--muted); background: transparent; font-size: 1.2rem; cursor: pointer; }
.content-shell { min-width: 0; padding: 0 clamp(1rem, 3vw, 3.2rem) 4rem; }
.topbar { min-height: 102px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); gap: 1rem; }
.topbar .eyebrow { margin-top: 0; }
.topbar h2 { font-size: 1.65rem; }
.system-status { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; justify-content: flex-end; }
.status-dot { font-size: .76rem; color: var(--muted); }
.status-dot::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: .42rem; }
.status-dot.online { color: var(--acid); }
.status-dot.offline { color: var(--danger); }
.page { display: none; padding-top: 2rem; }
.page.active { display: block; animation: rise .25s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
.hero-panel { min-height: 230px; padding: clamp(1.5rem, 4vw, 3rem); border: 1px solid #353149; border-radius: 24px; display: flex; align-items: flex-end; justify-content: space-between; background: linear-gradient(125deg, #161923 0%, #211c34 62%, #312754 100%); overflow: hidden; position: relative; }
.hero-panel::after { content: ""; position: absolute; width: 300px; height: 300px; border: 1px solid rgba(200,255,72,.25); border-radius: 50%; right: -120px; top: -160px; box-shadow: 0 0 0 42px rgba(200,255,72,.03), 0 0 0 84px rgba(200,255,72,.025); }
.hero-panel h3 { font-size: clamp(2rem, 4vw, 3.8rem); line-height: .98; max-width: 760px; }
.hero-panel em { color: var(--acid); font-style: normal; }
.metric-strip { display: flex; gap: .4rem; position: relative; z-index: 1; }
.metric-strip article { min-width: 85px; padding: .8rem; border: 1px solid rgba(255,255,255,.09); border-radius: 14px; background: rgba(9,10,14,.45); }
.metric-strip strong { display: block; font-size: 1.5rem; }
.metric-strip span { color: var(--muted); font-size: .72rem; }
.grid { display: grid; gap: 1.2rem; margin-top: 1.2rem; }
.grid.two-one { grid-template-columns: minmax(0, 2fr) minmax(270px, 1fr); }
.panel { border: 1px solid var(--line); background: rgba(17,19,24,.84); border-radius: var(--radius); padding: 1.35rem; }
.panel.narrow { max-width: 650px; }
.panel-head, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.panel-head { margin-bottom: 1.2rem; }
.panel-head .eyebrow, .section-heading .eyebrow { margin-top: 0; }
.panel-head h3, .section-heading h3 { font-size: 1.45rem; }
.step-pill { padding: .4rem .65rem; border: 1px solid var(--line); border-radius: 100px; color: var(--muted); font: .66rem ui-monospace, monospace; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
label { color: #c8cbd2; font-size: .78rem; font-weight: 700; display: grid; gap: .5rem; }
input, textarea, select { width: 100%; color: var(--text); border: 1px solid #303541; background: #0d0f14; border-radius: 11px; padding: .78rem .85rem; outline: none; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(140,121,255,.12); }
.span-2 { grid-column: 1 / -1; }
.inline-actions, .submit-row { display: flex; align-items: center; gap: 1rem; justify-content: space-between; }
.submit-row { margin-top: 1.2rem; border-top: 1px solid var(--line); padding-top: 1.2rem; }
.check-row { display: flex; align-items: center; gap: .65rem; }
.check-row input { width: auto; accent-color: var(--acid); }
.task-list { display: grid; gap: .7rem; }
.task-item { padding: .9rem; border: 1px solid var(--line); border-radius: 12px; background: #0d0f14; }
.task-item > div { display: flex; justify-content: space-between; gap: .5rem; }
.task-item strong { font-size: .86rem; }
.task-item small { color: var(--muted); }
.progress { height: 4px; background: #282d37; border-radius: 10px; overflow: hidden; margin-top: .65rem; }
.progress span { display: block; height: 100%; background: var(--acid); }
.section-heading { margin-bottom: 1.2rem; }
.card-grid, .media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.prompt-card, .media-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.prompt-card { padding: 1.2rem; }
.prompt-card p { color: var(--muted); font-size: .84rem; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.tags { display: flex; gap: .35rem; flex-wrap: wrap; }
.tags span { font-size: .67rem; color: var(--acid); border: 1px solid #3e4b28; border-radius: 99px; padding: .25rem .45rem; }
.media-card img, .media-card video { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: #050608; }
.media-meta { padding: 1rem; }
.media-meta small { color: var(--muted); }
.explainer .big-number { font-size: 5rem; font-weight: 900; color: #292e38; }
.explainer p { color: var(--muted); line-height: 1.75; }
.table-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; background: var(--panel); }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { text-align: left; padding: 1rem; border-bottom: 1px solid var(--line); font-size: .82rem; }
th { color: var(--muted); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; }
.state-badge { display: inline-flex; padding: .3rem .55rem; border-radius: 99px; background: #252a34; color: #cbd0db; font-size: .68rem; }
.state-badge.succeeded { background: rgba(200,255,72,.12); color: var(--acid); }
.state-badge.failed, .state-badge.submission_unknown { background: rgba(255,109,117,.12); color: var(--danger); }
.state-badge.running, .state-badge.leased { background: rgba(140,121,255,.15); color: #b8aeff; }
.warning-box { color: var(--warning); background: rgba(255,206,92,.08); border: 1px solid rgba(255,206,92,.22); border-radius: 12px; padding: 1rem; font-size: .8rem; line-height: 1.6; }
.empty-state { color: var(--muted); text-align: center; padding: 2rem; }
dialog { width: min(620px, calc(100% - 2rem)); color: var(--text); border: 1px solid var(--line); border-radius: 20px; background: var(--panel); }
dialog::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(6px); }
.dialog-card { display: grid; gap: 1rem; }
.toast { position: fixed; right: 1.2rem; bottom: 1.2rem; max-width: 420px; padding: .9rem 1.1rem; border: 1px solid var(--line); border-radius: 12px; background: #1e222b; box-shadow: 0 18px 60px rgba(0,0,0,.45); transform: translateY(130%); opacity: 0; transition: .25s; z-index: 200; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { border-color: #67383e; color: #ffd3d6; }
@media (max-width: 980px) { .app-shell { grid-template-columns: 84px 1fr; } .logo strong, #nav a:not(.active)::after, #nav a { font-size: 0; } #nav a i { font-size: .7rem; } .logo { justify-content: center; } .sidebar-foot .user-chip div { display: none; } .grid.two-one { grid-template-columns: 1fr; } }
@media (max-width: 680px) { .app-shell { display: block; } .sidebar { position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; top: auto; height: auto; padding: .55rem; border: 0; border-top: 1px solid var(--line); } .logo, .sidebar-foot { display: none; } #nav { display: flex; overflow-x: auto; } #nav a { flex: 0 0 58px; justify-content: center; } .content-shell { padding: 0 1rem 7rem; } .topbar { align-items: flex-start; padding: 1rem 0; } .system-status { max-width: 170px; } .hero-panel { display: block; } .metric-strip { margin-top: 2rem; } .form-grid { grid-template-columns: 1fr; } .span-2 { grid-column: auto; } }
