:root {
  --ink: #16181d;
  --muted: #6d7480;
  --line: #e5e8ed;
  --bg: #f4f6f8;
  --panel: #ffffff;
  --nav: #111317;
  --accent: #5a3df0;
  --accent-soft: #eeeaff;
  --success: #07865f;
  --danger: #d33b3b;
  --warning: #b36b00;
  --shadow: 0 18px 50px rgba(18, 24, 40, .08);
  font-family: "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); }
a { color: var(--accent); text-decoration: none; }
button, input { font: inherit; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 230px; padding: 30px 20px;
  background: var(--nav); color: white; display: flex; flex-direction: column;
}
.brand { display: flex; align-items: center; gap: 12px; color: white; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center;
  background: linear-gradient(135deg, #7258ff, #e9e5ff); color: #24166d; font-weight: 800;
}
.brand-mark.large { width: 58px; height: 58px; margin: 0 auto 18px; font-size: 24px; }
.brand strong { display: block; font-size: 17px; letter-spacing: .04em; }
.brand small { color: #9298a7; font-size: 11px; }
.sidebar nav { display: grid; gap: 7px; margin-top: 46px; }
.sidebar nav a { color: #9da3b1; padding: 12px 14px; border-radius: 10px; }
.sidebar nav a:hover, .sidebar nav a.active { color: white; background: #23262d; }
.sidebar-foot { margin-top: auto; color: #8f96a4; font-size: 12px; }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #38cf95; margin-right: 7px; }
.shell { margin-left: 230px; padding: 32px 42px 60px; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
h1 { margin: 3px 0 0; font-size: 29px; letter-spacing: -.03em; }
h2 { margin: 4px 0 0; font-size: 21px; letter-spacing: -.02em; }
h3 { margin: 18px 0 4px; font-size: 20px; }
.eyebrow { color: #7a8090; font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.userbox { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.role { color: var(--muted); background: white; border: 1px solid var(--line); padding: 5px 9px; border-radius: 99px; }
.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; background: #edf7f3; color: #146c52; }
.flash.error { background: #fff0f0; color: #a92b2b; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 34px; }
.metrics article, .panel, .app-card, .app-summary, .job-meta { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; }
.metrics article { padding: 20px 22px; }
.metrics span, .metrics small { display: block; color: var(--muted); font-size: 12px; }
.metrics strong { display: block; font-size: 34px; margin: 8px 0 4px; letter-spacing: -.04em; }
.section-head { display: flex; align-items: end; justify-content: space-between; margin: 28px 0 15px; }
.section-head.compact { padding: 22px 24px 0; margin: 0 0 14px; }
.subtle, .muted { color: var(--muted); font-size: 12px; }
.app-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 17px; }
.app-card { padding: 22px; color: var(--ink); transition: .2s ease; }
.app-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #d7d2ff; }
.app-head { display: flex; align-items: center; justify-content: space-between; }
.app-icon { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 800; }
.health { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--success); }
.health.bad { color: var(--danger); }
.health i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.domain { color: var(--muted); margin: 3px 0 20px; font-size: 12px; }
dl { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 22px; }
dt { color: var(--muted); font-size: 11px; margin-bottom: 4px; }
dd { margin: 0; font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.enter { font-size: 12px; font-weight: 700; }
.panel { margin-top: 22px; padding-bottom: 4px; overflow: hidden; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th { text-align: left; color: var(--muted); font-size: 11px; font-weight: 600; padding: 12px 24px; background: #fafbfc; }
td { padding: 14px 24px; border-top: 1px solid #f0f2f5; vertical-align: middle; }
td small { display: block; margin-top: 3px; color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
.pill { display: inline-block; border-radius: 99px; padding: 4px 9px; background: #eff1f4; color: #5d6470; font-size: 10px; font-weight: 700; }
.pill.active, .pill.done { color: var(--success); background: #e8f7f1; }
.pill.failed, .pill.error, .pill.interrupted { color: var(--danger); background: #fff0f0; }
.pill.running, .pill.queued { color: var(--warning); background: #fff6e8; }
.pill.pending_approval { color: #7558d7; background: #f1edff; }
.link-button { border: 0; background: none; padding: 0; color: var(--accent); cursor: pointer; }
.btn, button.primary { display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 10px; padding: 11px 18px; background: var(--ink); color: white; cursor: pointer; font-weight: 700; }
.wide { width: 100%; }
.back { display: inline-block; margin-bottom: 16px; color: var(--muted); font-size: 12px; }
.app-summary { display: flex; justify-content: space-between; padding: 24px; margin-bottom: 20px; }
.app-summary strong { display: block; font-size: 26px; margin: 8px 0; }
.app-summary a { font-size: 12px; }
.health-block { text-align: right; }
.health-block span { color: var(--muted); font-size: 11px; }
.health-block strong { font-size: 15px; color: var(--success); }
.health-block.bad strong { color: var(--danger); }
.upload-panel { padding-bottom: 22px; }
.upload-form, .user-form { padding: 0 24px; display: grid; gap: 14px; }
.upload-form { grid-template-columns: 1fr 1.4fr auto; align-items: end; }
.upload-form .check, .upload-form .notice { grid-column: 1 / -1; }
label { color: #4f5560; font-size: 12px; font-weight: 600; }
label input:not([type=checkbox]):not([type=file]) { display: block; width: 100%; margin-top: 7px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfd; outline: none; }
label input:focus { border-color: #8a76ff; box-shadow: 0 0 0 3px #f0edff; }
.file-field input { display: block; margin-top: 7px; width: 100%; padding: 8px; border: 1px dashed #c9ced8; border-radius: 9px; background: #fbfcfd; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.notice { padding: 10px 12px; border-radius: 8px; background: #f4f2ff; color: #5f50a3; font-size: 12px; }
.actions { display: flex; gap: 14px; align-items: center; }
.actions form { display: inline; }
.empty { padding: 50px; text-align: center; color: var(--muted); background: white; border: 1px dashed #d8dce4; border-radius: 16px; }
.job-head { display: flex; justify-content: space-between; align-items: center; margin: 10px 0 20px; }
.job-meta { display: grid; grid-template-columns: repeat(4, 1fr); overflow: hidden; }
.job-meta div { padding: 18px 22px; border-right: 1px solid var(--line); }
.job-meta div:last-child { border: 0; }
.job-meta span { display: block; color: var(--muted); font-size: 11px; margin-bottom: 5px; }
.job-meta strong { font-size: 12px; }
.log-panel { padding-bottom: 22px; }
pre { margin: 0 24px; padding: 20px; min-height: 260px; max-height: 680px; overflow: auto; border-radius: 11px; background: #11151c; color: #b9e6d7; line-height: 1.55; font-size: 12px; white-space: pre-wrap; }
.user-form { grid-template-columns: 1fr 1fr; }
.app-selector { grid-column: 1 / -1; }
.app-selector > span { display: block; color: #4f5560; font-size: 12px; font-weight: 600; margin-bottom: 8px; }
.checks { display: flex; flex-wrap: wrap; gap: 14px; }
.login-page { min-height: 100vh; display: grid; grid-template-columns: 1.2fr .8fr; background: #111318; }
.login-visual { position: relative; display: flex; align-items: center; padding: 8vw; overflow: hidden; color: white; background: radial-gradient(circle at 20% 15%, #31286f, transparent 38%), linear-gradient(145deg, #12131a, #1d1634); }
.login-copy { position: relative; z-index: 2; max-width: 580px; }
.login-copy h1 { font-size: clamp(36px, 5vw, 68px); line-height: 1.08; margin: 20px 0; }
.login-copy p { color: #b7bac6; max-width: 440px; line-height: 1.8; }
.login-orbit { position: absolute; border: 1px solid rgba(180, 165, 255, .24); border-radius: 50%; }
.orbit-a { width: 560px; height: 560px; right: -180px; bottom: -180px; }
.orbit-b { width: 370px; height: 370px; right: -85px; bottom: -85px; }
.login-panel { display: grid; place-items: center; background: #f6f7f9; padding: 30px; }
.login-card { width: min(390px, 100%); padding: 42px; background: white; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); text-align: center; }
.login-card h2 { font-size: 25px; margin-bottom: 4px; }
.login-card label { display: block; text-align: left; margin-top: 18px; }
.login-card button { margin-top: 24px; }
.login-note { color: #a1a6b1; font-size: 11px; margin: 22px 0 0; }
@media (max-width: 900px) {
  .sidebar { position: static; width: auto; flex-direction: row; align-items: center; padding: 14px 18px; }
  .sidebar nav { margin: 0 0 0 auto; display: flex; }
  .sidebar-foot { display: none; }
  .shell { margin-left: 0; padding: 24px 18px 50px; }
  .metrics { grid-template-columns: 1fr; }
  .login-page { grid-template-columns: 1fr; }
  .login-visual { min-height: 32vh; padding: 40px 28px; }
  .login-panel { padding: 24px; }
  .upload-form, .user-form { grid-template-columns: 1fr; }
  .upload-form .check, .upload-form .notice, .app-selector { grid-column: auto; }
  .job-meta { grid-template-columns: 1fr 1fr; }
}
