:root {
  --ink: #172022;
  --ink-2: #4b595b;
  --ink-3: #798587;
  --paper: #f3f4f0;
  --surface: #ffffff;
  --surface-2: #e9ece8;
  --line: #d4d9d4;
  --line-dark: #aeb8b5;
  --dark: #11191b;
  --dark-2: #1d292b;
  --teal: #147c73;
  --teal-soft: #dcefeb;
  --amber: #b76222;
  --amber-soft: #f6e7d7;
  --red: #a63f38;
  --red-soft: #f5dfdc;
  --blue: #396b89;
  --blue-soft: #dfeaf0;
  --shadow: 0 16px 40px rgba(22, 31, 33, 0.08);
  --mono: "SFMono-Regular", "Cascadia Code", "Liberation Mono", monospace;
  --sans: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--paper); font-family: var(--sans); font-size: 14px; letter-spacing: 0; }
button, input { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
[hidden] { display: none !important; }
.grain { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .22; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.08'/%3E%3C/svg%3E"); }
.mono { font-family: var(--mono); }
.eyebrow { margin: 0 0 7px; color: var(--teal); font: 600 10px/1.2 var(--mono); letter-spacing: 0; }

.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 28px; background: linear-gradient(90deg, var(--dark) 0 38%, #e8ebe6 38% 100%); position: relative; }
.login-shell::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 40px 40px; mask-image: linear-gradient(90deg, black 0 38%, transparent 70%); pointer-events: none; }
.login-panel { width: min(100%, 430px); padding: 42px; border: 1px solid var(--line); background: var(--surface); box-shadow: 14px 14px 0 rgba(17,25,27,.13), var(--shadow); position: relative; }
.brand-mark { width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 28px; color: #fff; background: var(--teal); }
.brand-mark svg { width: 24px; }
.login-panel h1 { margin: 0; font-size: 27px; line-height: 1.25; }
.login-copy { margin: 12px 0 30px; color: var(--ink-2); line-height: 1.75; }
.login-form { display: grid; gap: 18px; }
.login-footer { position: absolute; right: 28px; bottom: 24px; display: flex; align-items: center; gap: 10px; color: var(--ink-2); font: 500 10px var(--mono); text-transform: uppercase; }
.dot { width: 3px; height: 3px; border-radius: 50%; background: var(--teal); }

.field { display: grid; gap: 8px; color: var(--ink-2); font-size: 12px; font-weight: 600; }
.field small { color: var(--ink-3); font-size: 11px; font-weight: 400; }
.input-wrap { min-height: 42px; display: flex; align-items: center; gap: 10px; padding: 0 12px; border: 1px solid var(--line-dark); background: var(--surface); transition: border-color .18s, box-shadow .18s; }
.input-wrap:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(20,124,115,.12); }
.input-wrap svg { width: 16px; color: var(--ink-3); flex: 0 0 auto; }
.input-wrap input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--ink); background: transparent; }
.input-wrap input::placeholder, .table-search input::placeholder { color: #9aa5a3; }
.input-large { min-height: 48px; }
.input-large input { font-size: 15px; }
.label-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.label-row output { color: var(--teal); font: 600 12px var(--mono); }
input[type="range"] { width: 100%; height: 3px; margin: 7px 0 2px; appearance: none; background: linear-gradient(to right, var(--teal) 0 var(--range, 22.22%), var(--line) var(--range, 22.22%) 100%); border-radius: 0; }
input[type="range"]::-webkit-slider-thumb { width: 16px; height: 16px; appearance: none; border: 3px solid var(--surface); border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 1px var(--teal); cursor: pointer; }
.range-scale { display: flex; justify-content: space-between; color: var(--ink-3); font: 10px var(--mono); }
.form-error { margin: 0; padding: 9px 11px; color: var(--red); background: var(--red-soft); border-left: 3px solid var(--red); font-size: 12px; line-height: 1.5; }

.button { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 14px; border: 1px solid transparent; border-radius: 3px; text-decoration: none; cursor: pointer; transition: transform .16s, background .16s, border-color .16s, opacity .16s; }
.button:hover:not(:disabled):not(.is-disabled) { transform: translateY(-1px); }
.button:focus-visible, .icon-button:focus-visible, .tab:focus-visible { outline: 3px solid rgba(20,124,115,.2); outline-offset: 2px; }
.button svg { width: 16px; height: 16px; }
.button-wide { width: 100%; min-height: 46px; }
.button-primary { color: #fff; background: var(--dark); }
.button-primary:hover:not(:disabled) { background: var(--teal); }
.button-secondary { color: var(--ink); border-color: var(--line-dark); background: var(--surface); }
.button-secondary:hover { border-color: var(--ink); }
.button-export { color: #fff; background: var(--teal); }
.button-export:hover { background: #0d6962; }
.button-quiet { min-height: 34px; padding: 0 10px; border-color: var(--line); background: transparent; }
.button:disabled, .is-disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
.icon-button { width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 1px solid transparent; border-radius: 3px; color: var(--ink-2); background: transparent; cursor: pointer; }
.icon-button:hover { border-color: var(--line); background: var(--surface-2); }
.icon-button svg { width: 16px; }
.is-spinning svg { animation: spin .8s linear infinite; }

.topbar { height: 66px; position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 26px; border-bottom: 1px solid #293538; color: #fff; background: rgba(17,25,27,.98); }
.app-brand { min-width: 0; display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.app-brand strong { display: block; font-size: 14px; }
.app-brand small { display: block; margin-top: 3px; color: #839092; font: 500 8px var(--mono); letter-spacing: 0; }
.brand-mark-small { width: 34px; height: 34px; margin: 0; }
.brand-mark-small svg { width: 18px; }
.topbar-actions { display: flex; align-items: center; gap: 6px; min-width: 0; }
.topbar .icon-button { color: #b6c0c0; }
.topbar .icon-button:hover { border-color: #354345; background: #202c2e; }
.button-header { min-height: 32px; color: #c9d4d2; border-color: #354345; background: #202c2e; }
.button-header:hover { color: #fff; border-color: #55706f; }
.separator { width: 1px; height: 22px; margin: 0 7px; background: #384446; }
.session-name { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #cdd5d4; font-size: 12px; }
.service-badge, .task-status { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font-size: 11px; font-weight: 600; }
.service-badge { margin-right: 6px; padding: 5px 9px; border: 1px solid #344244; color: #acb7b6; background: #1a2527; }
.status-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: currentColor; }

.workspace { min-height: calc(100vh - 66px); display: grid; grid-template-columns: 330px minmax(0, 1fr); }
.command-rail { position: sticky; top: 66px; height: calc(100vh - 66px); overflow-y: auto; padding: 28px 26px 22px; border-right: 1px solid var(--line); background: #eceeea; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.section-heading h1, .section-heading h2 { margin: 0; font-size: 19px; line-height: 1.25; }
.command-index { color: #a8b0ad; font: 600 19px var(--mono); }
.task-form { display: grid; gap: 24px; margin-top: 30px; }
.mode-field { padding: 0; border: 0; }
.mode-field legend { margin-bottom: 8px; }
.mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.mode-option { min-width: 0; cursor: pointer; }
.mode-option input { position: absolute; opacity: 0; pointer-events: none; }
.mode-option > span { min-height: 84px; display: grid; place-items: center; align-content: center; gap: 5px; padding: 10px 6px; border: 1px solid var(--line); color: var(--ink-2); background: rgba(255,255,255,.6); text-align: center; transition: border-color .16s, background .16s, color .16s; }
.mode-option svg { width: 18px; }
.mode-option strong { font-size: 12px; }
.mode-option small { font-size: 9px; font-family: var(--mono); }
.mode-option input:checked + span { border-color: var(--teal); color: var(--teal); background: var(--surface); box-shadow: inset 0 -3px var(--teal); }
.mode-option input:focus-visible + span { outline: 3px solid rgba(20,124,115,.16); outline-offset: 2px; }
.notice { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid #cad5d0; background: #f7f8f5; }
.notice svg { width: 16px; margin-top: 2px; color: var(--teal); flex: 0 0 auto; }
.notice p { display: grid; gap: 3px; margin: 0; font-size: 11px; line-height: 1.55; }
.notice p span { color: var(--ink-2); }
.rail-footnote { display: flex; gap: 9px; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 10px; line-height: 1.65; }
.rail-footnote svg { width: 15px; flex: 0 0 auto; }
.rail-footnote p { margin: 0; }

.content-area { min-width: 0; padding: 28px clamp(20px, 3vw, 42px) 50px; }
.empty-state { min-height: 420px; position: relative; display: grid; place-items: center; align-content: center; overflow: hidden; border: 1px solid var(--line); background: rgba(255,255,255,.52); text-align: center; }
.empty-state::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 50px 50px; opacity: .28; mask-image: radial-gradient(circle, black, transparent 75%); }
.empty-coordinate { position: absolute; top: 18px; right: 20px; color: var(--ink-3); font: 10px var(--mono); }
.empty-icon { width: 74px; height: 74px; z-index: 1; display: grid; place-items: center; border: 1px solid var(--line-dark); border-radius: 50%; color: var(--teal); background: var(--surface); box-shadow: 0 0 0 12px rgba(255,255,255,.54), 0 0 0 13px var(--line); }
.empty-icon svg { width: 29px; }
.empty-state h2 { z-index: 1; margin: 27px 0 8px; font-size: 21px; }
.empty-state > p { z-index: 1; max-width: 460px; margin: 0; color: var(--ink-2); line-height: 1.7; }
.empty-steps { z-index: 1; display: flex; align-items: center; gap: 14px; margin-top: 30px; color: var(--ink-2); font-size: 11px; }
.empty-steps span { display: flex; align-items: center; gap: 6px; }
.empty-steps b { color: var(--teal); font: 600 10px var(--mono); }
.empty-steps svg { width: 13px; color: var(--line-dark); }

.task-detail { border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); animation: detailIn .35s ease-out both; }
.detail-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 24px 26px; border-bottom: 1px solid var(--line); }
.detail-title { min-width: 0; }
.detail-kicker { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; color: var(--teal); font-size: 10px; font-weight: 700; }
.detail-kicker span:first-child { padding: 3px 6px; color: var(--surface); background: var(--teal); }
.detail-kicker .mono { max-width: 220px; overflow: hidden; color: var(--ink-3); text-overflow: ellipsis; white-space: nowrap; }
.detail-title h2 { margin: 0; font-size: 23px; overflow-wrap: anywhere; }
.detail-title p { margin: 8px 0 0; color: var(--ink-3); font: 11px var(--mono); }
.detail-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.task-status { min-height: 38px; padding: 0 12px; border: 1px solid currentColor; }
.status-neutral { color: var(--ink-3); }
.status-queued { color: var(--blue); }
.status-running { color: var(--teal); }
.status-running .status-dot { animation: pulse 1.2s infinite; }
.status-success { color: var(--teal); }
.status-warning { color: var(--amber); }
.status-danger { color: var(--red); }
.status-cancelled { color: var(--ink-3); }
.blocked-notice { display: flex; gap: 14px; margin: 18px 26px 0; padding: 14px; border: 1px solid #e4bc96; background: var(--amber-soft); color: var(--amber); }
.blocked-notice svg { width: 21px; flex: 0 0 auto; }
.blocked-notice strong { color: #783e14; }
.blocked-notice p { margin: 4px 0 0; color: #8f5429; font-size: 12px; line-height: 1.6; }

.progress-section { padding: 25px 26px 20px; border-bottom: 1px solid var(--line); }
.progress-overview { display: grid; grid-template-columns: auto minmax(180px, .8fr) minmax(320px, 1.2fr); align-items: center; gap: clamp(20px, 3vw, 38px); }
.ring { --progress: 0deg; width: 116px; height: 116px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--teal) var(--progress), var(--surface-2) 0); position: relative; transition: background .4s; }
.ring::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--surface); }
.ring > div { z-index: 1; display: grid; text-align: center; }
.ring strong { font: 600 25px var(--mono); }
.ring span { margin-top: 2px; color: var(--ink-3); font-size: 9px; }
.progress-copy h3 { margin: 0; font-size: 17px; }
.progress-copy > p:last-child { max-width: 380px; margin: 7px 0 0; color: var(--ink-2); font-size: 12px; line-height: 1.65; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(74px, 1fr)); margin: 0; border: 1px solid var(--line); }
.metrics div { min-width: 0; padding: 13px 11px; border-right: 1px solid var(--line); }
.metrics div:last-child { border-right: 0; }
.metrics dt { margin-bottom: 7px; color: var(--ink-3); font-size: 9px; white-space: nowrap; }
.metrics dd { margin: 0; font: 600 18px var(--mono); }
.metrics dd small { color: var(--ink-3); font-size: 11px; }
.linear-progress { height: 5px; margin-top: 22px; overflow: hidden; background: var(--surface-2); }
.linear-progress span { display: block; width: 0; height: 100%; background: var(--teal); transition: width .35s ease; }
.progress-legend { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 12px; color: var(--ink-2); font-size: 10px; }
.progress-legend span { display: flex; align-items: center; gap: 6px; }
.progress-legend b { font: 600 10px var(--mono); }
.legend-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); }
.legend-dot.success { background: var(--teal); }
.legend-dot.empty { background: var(--blue); }
.legend-dot.failed { background: var(--red); }
.legend-dot.pending { background: var(--line-dark); }

.detail-tabs { display: flex; padding: 0 26px; border-bottom: 1px solid var(--line); }
.tab { min-height: 48px; display: flex; align-items: center; gap: 7px; padding: 0 15px; border: 0; border-bottom: 2px solid transparent; color: var(--ink-3); background: transparent; cursor: pointer; }
.tab svg { width: 15px; }
.tab b { min-width: 20px; padding: 2px 5px; border-radius: 2px; color: var(--ink-3); background: var(--surface-2); font: 600 9px var(--mono); }
.tab.is-active { border-bottom-color: var(--teal); color: var(--ink); }
.tab.is-active b { color: var(--teal); background: var(--teal-soft); }
.tab-panel { min-width: 0; padding: 0 26px 24px; }
.table-toolbar { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 18px; color: var(--ink-3); font-size: 11px; }
.table-search { width: min(220px, 45%); min-height: 32px; display: flex; align-items: center; gap: 7px; padding: 0 9px; border: 1px solid var(--line); background: var(--paper); }
.table-search:focus-within { border-color: var(--teal); }
.table-search svg { width: 13px; flex: 0 0 auto; }
.table-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 11px; }
.table-scroll { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 11px; }
th { height: 36px; padding: 0 10px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--ink-3); background: #f3f5f2; font-weight: 500; text-align: left; white-space: nowrap; }
td { min-height: 45px; padding: 10px; border-bottom: 1px solid #e6e9e5; color: var(--ink-2); vertical-align: middle; }
tbody tr { transition: background .14s; }
tbody tr:hover { background: #f7f8f5; }
.cell-main { color: var(--ink); font-weight: 600; }
.cell-stack { display: grid; gap: 3px; min-width: 130px; }
.cell-stack small { color: var(--ink-3); font-size: 9px; }
.cell-error { max-width: 240px; color: var(--red); overflow-wrap: anywhere; }
.state-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 7px; border-radius: 2px; white-space: nowrap; font-size: 10px; font-weight: 600; }
.state-pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.state-pill.status-running::before { animation: pulse 1.2s infinite; }
.status-running.state-pill, .status-success.state-pill { background: var(--teal-soft); }
.status-queued.state-pill { background: var(--blue-soft); }
.status-warning.state-pill { background: var(--amber-soft); }
.status-danger.state-pill { background: var(--red-soft); }
.status-neutral.state-pill, .status-cancelled.state-pill { background: var(--surface-2); }
.limit-flag { display: inline-flex; align-items: center; gap: 4px; color: var(--amber); }
.limit-flag svg { width: 12px; }
.job-link { width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid var(--line); color: var(--ink-2); text-decoration: none; }
.job-link:hover { border-color: var(--teal); color: var(--teal); }
.job-link svg { width: 13px; }
.table-empty { min-height: 92px; display: flex; align-items: center; justify-content: center; gap: 9px; border-bottom: 1px solid var(--line); color: var(--ink-3); font-size: 11px; }
.table-empty svg { width: 17px; }
.table-empty .spin { animation: spin 1s linear infinite; }

.history-section { margin-top: 34px; }
.history-heading { align-items: center; margin-bottom: 14px; }
.history-heading h2 { font-size: 18px; }
.history-table { position: relative; min-height: 100px; border: 1px solid var(--line); background: var(--surface); }
.history-table table { min-width: 740px; }
.history-table tbody tr { cursor: pointer; }
.history-table tbody tr.is-current { background: #eff6f3; box-shadow: inset 3px 0 var(--teal); }
.history-task { display: grid; gap: 3px; max-width: 250px; }
.history-task strong { overflow: hidden; color: var(--ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.history-task small { color: var(--ink-3); font: 9px var(--mono); }
.history-progress { min-width: 104px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 7px; }
.history-progress > span { height: 3px; overflow: hidden; background: var(--surface-2); }
.history-progress i { display: block; height: 100%; background: var(--teal); }
.history-progress b { font: 500 9px var(--mono); }
.row-action { width: 28px; height: 28px; display: grid; place-items: center; border: 0; color: var(--ink-3); background: transparent; cursor: pointer; }
.row-action:hover { color: var(--teal); }
.row-action svg { width: 14px; }

.toast-region { position: fixed; z-index: 50; right: 22px; bottom: 22px; width: min(360px, calc(100vw - 32px)); display: grid; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 13px 14px; border: 1px solid #314042; color: #fff; background: var(--dark); box-shadow: 0 14px 34px rgba(0,0,0,.2); animation: toastIn .25s ease-out both; }
.toast svg { width: 17px; flex: 0 0 auto; color: #74c5b9; }
.toast p { margin: 0; font-size: 12px; line-height: 1.55; }
.toast.toast-error svg { color: #ef8c82; }
.login-dialog { width: min(720px, calc(100vw - 28px)); max-height: calc(100vh - 40px); padding: 0; border: 1px solid var(--line-dark); color: var(--ink); background: var(--surface); box-shadow: 0 24px 70px rgba(0,0,0,.28); }
.login-dialog::backdrop { background: rgba(10,17,18,.72); }
.login-dialog > header, .login-dialog > footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.login-dialog > footer { border-top: 1px solid var(--line); border-bottom: 0; }
.login-dialog h2, .login-dialog p { margin: 0; }
.login-dialog footer p { color: var(--ink-2); font-size: 11px; }
.login-dialog img { display: block; width: 100%; max-height: 62vh; object-fit: contain; background: #fff; }
.login-session-status { min-height: 48px; display: flex; align-items: center; gap: 11px; padding: 9px 18px; border-bottom: 1px solid var(--line); background: #eef3f1; }
.login-session-status .status-dot { flex: 0 0 auto; }
.login-session-status p { display: grid; gap: 2px; }
.login-session-status strong { font-size: 11px; }
.login-session-status small { color: var(--ink-2); font-size: 10px; line-height: 1.4; }
.login-session-status.status-pending .status-dot { background: #d89b38; animation: pulse 1.4s ease-in-out infinite; }
.login-session-status.status-restricted { background: #fff1ed; }
.login-session-status.status-restricted .status-dot { background: #c74e43; box-shadow: 0 0 0 3px rgba(199,78,67,.12); }
.login-session-status.status-authenticated { background: #e7f5ef; }
.login-session-status.status-authenticated .status-dot { background: var(--teal); box-shadow: 0 0 0 3px rgba(0,123,112,.12); }
.login-capture-loading { min-height: 360px; display: grid; place-items: center; align-content: center; gap: 12px; color: var(--ink-3); }
.login-capture-loading svg { width: 24px; animation: spin 1s linear infinite; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .28; transform: scale(.75); } }
@keyframes detailIn { from { opacity: 0; transform: translateY(8px); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }

@media (max-width: 1050px) {
  .workspace { grid-template-columns: 290px minmax(0, 1fr); }
  .command-rail { padding-inline: 20px; }
  .progress-overview { grid-template-columns: auto 1fr; }
  .metrics { grid-column: 1 / -1; }
}

@media (max-width: 780px) {
  .topbar { height: 60px; padding: 0 14px; }
  .app-brand small, .session-name, .separator { display: none; }
  .service-badge { max-width: 118px; overflow: hidden; }
  .button-header span { display: none; }
  .button-header { width: 34px; padding: 0; }
  .service-badge span:last-child { overflow: hidden; text-overflow: ellipsis; }
  .workspace { display: block; }
  .command-rail { position: static; height: auto; overflow: visible; padding: 22px 18px; border-right: 0; border-bottom: 1px solid var(--line); }
  .task-form { margin-top: 22px; gap: 20px; }
  .rail-footnote { margin-top: 20px; }
  .content-area { padding: 20px 14px 36px; }
  .empty-state { min-height: 340px; padding: 35px 20px; }
  .detail-header { display: grid; padding: 20px 16px; }
  .detail-actions { justify-content: flex-start; }
  .detail-actions .task-status { order: -1; }
  .blocked-notice { margin: 14px 16px 0; }
  .progress-section { padding: 20px 16px 17px; }
  .progress-overview { grid-template-columns: auto minmax(0, 1fr); gap: 17px; }
  .ring { width: 94px; height: 94px; }
  .ring strong { font-size: 21px; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metrics div:nth-child(2) { border-right: 0; }
  .metrics div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .detail-tabs { padding: 0 10px; }
  .tab { flex: 1; justify-content: center; padding-inline: 8px; }
  .tab-panel { padding-inline: 14px; }
  .table-toolbar { align-items: stretch; flex-direction: column; justify-content: center; gap: 8px; padding: 10px 0; }
  .table-search { width: 100%; }
  table { min-width: 780px; }
  .jobs-table { min-width: 700px; }
  .history-section { margin-top: 26px; }
  .login-shell { padding: 18px; background: var(--dark); }
  .login-panel { padding: 30px 24px; box-shadow: 8px 8px 0 rgba(255,255,255,.08); }
  .login-footer { right: 18px; bottom: 14px; color: #849092; }
}

@media (max-width: 480px) {
  .app-brand strong { font-size: 12px; }
  .brand-mark-small { width: 30px; height: 30px; }
  .topbar-actions { gap: 1px; }
  .service-badge { max-width: 96px; padding-inline: 7px; }
  .mode-switch { grid-template-columns: 1fr 1fr; }
  .detail-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .detail-actions .task-status { grid-column: 1 / -1; justify-content: center; }
  .detail-actions .button { width: 100%; padding-inline: 8px; }
  .detail-actions .button-export:last-child:nth-child(even) { grid-column: 1 / -1; }
  .progress-copy .eyebrow { display: none; }
  .progress-copy h3 { font-size: 14px; }
  .progress-copy > p:last-child { font-size: 10px; }
  .empty-steps { gap: 7px; font-size: 9px; }
  .empty-steps svg { width: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
