:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --navy-950: #091426;
  --navy-900: #0f1d32;
  --navy-800: #182a45;
  --navy-700: #273b59;
  --ink: #14213a;
  --muted: #64738b;
  --subtle: #8793a6;
  --surface: #ffffff;
  --canvas: #f4f7fb;
  --line: #dce4ee;
  --line-soft: #e9eef5;
  --orange: #ec6500;
  --orange-dark: #be4e00;
  --orange-soft: #fff1e6;
  --green: #087c59;
  --green-soft: #e8f7f1;
  --red: #bd2d3a;
  --red-soft: #fff0f1;
  --amber: #9a5c00;
  --amber-soft: #fff7df;
  --blue: #275f9b;
  --blue-soft: #edf5ff;
  --shadow: 0 12px 36px rgba(20, 33, 58, .075);
  --radius: 16px;
}

* { box-sizing: border-box; }
html { background: var(--canvas); scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-size: 15px; line-height: 1.5; }
a { color: inherit; }
button, input, select { font: inherit; }
button, .button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid rgba(236, 101, 0, .32); outline-offset: 3px; }
[hidden] { display: none !important; }
.skip-link { position: fixed; z-index: 100; left: 16px; top: -60px; padding: 10px 14px; border-radius: 8px; color: white; background: var(--navy-950); transition: top .15s; }
.skip-link:focus { top: 12px; }

.shell { min-height: 100vh; }
.top { height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(24px, calc((100vw - 1320px) / 2)); color: white; background: var(--navy-950); border-bottom: 1px solid rgba(255,255,255,.08); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brandmark { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 12px; color: white; font-size: 16px; font-weight: 900; letter-spacing: -.04em; background: linear-gradient(145deg, #fa8127, #d84a00); box-shadow: 0 9px 22px rgba(236,101,0,.28); }
.brand b, .brand small { display: block; }
.brand b { font-size: 17px; letter-spacing: -.01em; }
.brand small { margin-top: 1px; color: #aab9ce; font-size: 11px; }
.user { display: flex; align-items: center; gap: 11px; color: #d9e2ef; font-size: 13px; }
.user-avatar { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; color: #fff; background: var(--navy-800); font-weight: 800; }
.user a { margin-left: 5px; color: #d9e2ef; text-underline-offset: 3px; }
.nav { min-height: 57px; display: flex; align-items: center; gap: 6px; padding: 8px max(24px, calc((100vw - 1320px) / 2)); overflow-x: auto; border-bottom: 1px solid var(--line); background: var(--surface); }
.nav a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 9px; color: #526078; font-size: 13px; font-weight: 750; text-decoration: none; white-space: nowrap; }
.nav a span { width: 18px; text-align: center; color: #8190a5; font-size: 16px; }
.nav a:hover { color: var(--ink); background: #f2f5f9; }
.nav a.active { color: var(--orange-dark); background: var(--orange-soft); }
.nav a.active span { color: var(--orange); }
.operation-bar { min-height: 58px; display: flex; align-items: center; gap: 12px; padding: 9px max(24px, calc((100vw - 1320px) / 2)); color: white; background: var(--blue); text-decoration: none; }
.operation-bar strong, .operation-bar small { display: block; }
.operation-bar small { color: #d8e9fb; font-size: 12px; }
.operation-link { margin-left: auto; font-weight: 800; font-size: 13px; }
.wrap { width: min(1320px, calc(100% - 44px)); margin: 34px auto 56px; }
.footer { padding: 20px; color: var(--subtle); font-size: 11px; text-align: center; border-top: 1px solid var(--line); }

.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 0 0 24px; }
.eyebrow, .section-kicker, .context-label { display: block; color: var(--orange-dark); font-size: 10px; font-weight: 900; letter-spacing: .16em; }
.eyebrow.light { color: #ff9e58; }
.hero h1 { margin: 7px 0 5px; font-size: clamp(28px, 3vw, 38px); line-height: 1.12; letter-spacing: -.035em; }
.hero p { max-width: 720px; margin: 0; color: var(--muted); }
.hero > .env-badge { margin-bottom: 5px; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card, .section-block { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.card h2, .card h3, .section-block h2 { margin: 0; letter-spacing: -.02em; }
.card > p, .section-heading p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.full { grid-column: 1 / -1; }
.section-block { margin-top: 20px; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.section-heading h2 { margin-top: 4px; font-size: 21px; }
.quiet-summary, .count-pill { display: inline-flex; align-items: center; min-height: 30px; padding: 5px 10px; border-radius: 999px; color: #56657b; background: #f1f4f8; font-size: 11px; font-weight: 800; white-space: nowrap; }

.all-clear, .attention { display: flex; align-items: flex-start; gap: 14px; padding: 16px 18px; margin-bottom: 20px; border: 1px solid #bfe6d7; border-radius: 14px; color: #075c43; background: var(--green-soft); }
.all-clear > span, .attention-icon { width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: white; background: var(--green); font-weight: 900; }
.all-clear strong, .attention strong { display: block; }
.all-clear p, .attention p { margin: 3px 0 0; font-size: 13px; }
.attention p + a { display: inline-block; margin-top: 5px; }
.attention.critical { color: #7d1e2b; border-color: #efbdc2; background: var(--red-soft); }
.attention.critical .attention-icon { background: var(--red); }
.attention.warning { color: #714800; border-color: #efd18f; background: var(--amber-soft); }
.attention.warning .attention-icon { background: #bd7500; }
.attention.neutral { color: #264b72; border-color: #cddff0; background: var(--blue-soft); }
.attention.neutral .attention-icon { background: var(--blue); }
.attention a { font-weight: 800; }

.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.card-head > div > h2 { margin-top: 8px; font-size: 24px; }
.env-badge { display: inline-flex; align-items: center; justify-content: center; min-height: 24px; padding: 3px 8px; border: 1px solid transparent; border-radius: 7px; font-size: 10px; font-weight: 900; letter-spacing: .07em; white-space: nowrap; }
.env-badge.prod { color: #a72935; border-color: #f0bdc2; background: var(--red-soft); }
.env-badge.hml { color: #245a8e; border-color: #c8dcef; background: var(--blue-soft); }
.state { display: inline-flex; align-items: center; gap: 6px; min-height: 25px; padding: 4px 9px; border-radius: 999px; font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
.state i { font-style: normal; }
.state.success { color: #06714f; background: var(--green-soft); }
.state.failed { color: #a92836; background: var(--red-soft); }
.state.running { color: #275f9b; background: var(--blue-soft); }
.state.warning { color: #885300; background: var(--amber-soft); }
.state.neutral { color: #5c697c; background: #eff3f7; }
.environment-card.unavailable { border-color: #efbdc2; }
.environment-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 16px 0; margin-top: 14px; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.environment-summary div { min-width: 0; padding: 0 12px; border-right: 1px solid var(--line-soft); }
.environment-summary div:first-child { padding-left: 0; }
.environment-summary div:last-child { padding-right: 0; border-right: 0; }
.environment-summary small, .environment-summary strong, .environment-summary span { display: block; }
.environment-summary small { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .04em; }
.environment-summary strong { margin-top: 3px; font-size: 23px; }
.environment-summary span { color: var(--subtle); font-size: 11px; }
.card-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 15px; }
.text-link { color: #245a8e; font-size: 12px; font-weight: 800; text-decoration: none; }
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.technical { position: relative; }
.technical summary { cursor: pointer; color: #5f6c80; font-size: 12px; font-weight: 750; }
.technical summary:hover { color: var(--ink); }
.technical-panel { padding: 14px; margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; color: #495870; font-size: 12px; }
.technical-panel dl, .review-list { margin: 0; }
.technical-panel dl > div { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 6px 0; }
.technical-panel dt, .review-list dt { color: var(--muted); }
.technical-panel dd, .review-list dd { margin: 0; overflow-wrap: anywhere; font-weight: 700; }
.technical-panel code { display: block; margin-top: 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
.active-list { max-height: 230px; margin-top: 8px; overflow: auto; border: 1px solid var(--line-soft); border-radius: 8px; background: white; }
.active-item { padding: 9px 10px; border-bottom: 1px solid var(--line-soft); }
.active-item:last-child { border-bottom: 0; }
.active-item small { color: var(--muted); }

.dashboard-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; margin-top: 18px; }
.action-card, .protection-card { min-height: 230px; display: flex; flex-direction: column; align-items: flex-start; }
.action-card h2, .protection-card h2 { margin-top: 7px; font-size: 21px; }
.action-card .actions, .protection-card .actions { margin-top: auto; }
.backup-summary { display: flex; gap: 10px; width: 100%; margin: 15px 0 5px; }
.backup-summary div { flex: 1; padding: 12px; border: 1px solid var(--line-soft); border-radius: 11px; background: #f8fafc; }
.backup-summary strong, .backup-summary span { display: block; }
.backup-summary strong { font-size: 22px; }
.backup-summary span { color: var(--muted); font-size: 11px; }
.history { padding-bottom: 8px; }
.history-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 13px; padding: 14px 0; border-top: 1px solid var(--line-soft); }
.history-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; font-weight: 900; }
.history-icon.success { color: var(--green); background: var(--green-soft); }
.history-icon.failed { color: var(--red); background: var(--red-soft); }
.history-icon.running { color: var(--blue); background: var(--blue-soft); }
.history-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; color: var(--muted); font-size: 11px; }
.route { display: inline-flex; padding: 2px 6px; border-radius: 5px; background: #eef2f7; color: #435269; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; font-weight: 800; }
.history-row .technical { margin-top: 6px; }

.button, button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 15px; border: 1px solid transparent; border-radius: 9px; cursor: pointer; color: white; background: var(--orange); font-weight: 800; font-size: 13px; line-height: 1.2; text-decoration: none; transition: background .15s, border-color .15s, box-shadow .15s, transform .15s; }
.button:hover, button:hover { background: var(--orange-dark); }
.button:active, button:active { transform: translateY(1px); }
.button.primary, button.primary { background: var(--orange); }
.button.secondary, button.secondary { color: #263a55; border-color: #d4deea; background: #edf2f7; }
.button.secondary:hover, button.secondary:hover { background: #e1e8f0; }
.button.ghost, button.ghost { color: #374a64; border-color: var(--line); background: white; }
.button.ghost:hover, button.ghost:hover { border-color: #b9c6d6; background: #f8fafc; }
.button.danger, button.danger { background: var(--red); }
.button.danger:hover, button.danger:hover { background: #98202c; }
.button.compact, button.compact { min-height: 36px; padding: 8px 11px; font-size: 12px; }
button:disabled { cursor: wait; opacity: .68; }
.actions, .wizard-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.wizard-actions { justify-content: space-between; padding-top: 18px; border-top: 1px solid var(--line-soft); }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; }
.steps.update-steps { grid-template-columns: repeat(3, 1fr); }
.step { display: flex; align-items: center; gap: 9px; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; color: #7b889b; background: #eef2f7; font-size: 12px; }
.step > span { width: 23px; height: 23px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: #6f7c8f; background: white; font-size: 10px; }
.step.active { color: #a74100; border-color: #f3bd92; background: var(--orange-soft); }
.step.active > span { color: white; background: var(--orange); }
.step.done { color: #087353; border-color: #bce4d4; background: var(--green-soft); }
.step.done > span { color: white; background: var(--green); }
.wizard-card { padding: 26px; }
.direction-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.choice { display: block; padding: 21px; border: 1px solid var(--line); border-radius: 14px; background: white; text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
.choice:hover { border-color: #f0a26b; box-shadow: 0 12px 30px rgba(236,101,0,.1); transform: translateY(-2px); }
.choice.critical:hover { border-color: #df8a93; box-shadow: 0 12px 30px rgba(189,45,58,.09); }
.choice h3 { margin: 15px 0 8px; font-size: 21px; }
.choice p { min-height: 42px; color: var(--muted); font-size: 13px; }
.purpose-icon { width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: 12px; border-radius: 11px; color: var(--orange-dark); background: var(--orange-soft); font-size: 22px; font-weight: 900; }
.choice.critical .purpose-icon { color: var(--red); background: var(--red-soft); }
.route-large { display: flex; align-items: center; gap: 8px; margin: 9px 0; }
.route-large > span:not(.env-badge) { color: #77869b; }
.choice-action { display: inline-block; margin-top: 10px; color: var(--orange-dark); font-size: 12px; font-weight: 900; }
.choice.critical .choice-action { color: var(--red); }
.version-line { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; margin: 12px 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.version-line span { color: var(--muted); font-size: 12px; }
.version-line strong { font-size: 22px; }

.context-bar { position: sticky; z-index: 4; top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 76px; padding: 13px 17px; margin-bottom: 16px; border: 1px solid #cddff0; border-radius: 13px; background: rgba(237,245,255,.96); box-shadow: 0 8px 24px rgba(20,33,58,.08); backdrop-filter: blur(9px); }
.context-bar.critical { border-color: #efbdc2; background: rgba(255,240,241,.96); }
.context-bar > div > strong { display: flex; align-items: center; gap: 8px; margin: 4px 0; }
.context-bar small, .context-workflow span, .context-workflow small { display: block; color: var(--muted); font-size: 11px; }
.context-workflow { max-width: 50%; text-align: right; }
.context-workflow strong { display: block !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.context-workflow.muted strong { color: var(--subtle); }
.direction-arrow { color: #6a7890; }

.field { display: grid; gap: 7px; margin: 14px 0; }
.field label { color: #2a3b54; font-size: 12px; font-weight: 850; }
.field input, .field select { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #cbd6e3; border-radius: 9px; color: var(--ink); background: white; }
.field input:focus, .field select:focus { outline: 3px solid rgba(236,101,0,.16); border-color: var(--orange); }
.field small { color: var(--muted); font-size: 11px; }
.search-form { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: end; gap: 10px; padding: 15px; margin-bottom: 14px; border-radius: 12px; background: #f7f9fc; }
.search-form .field { margin: 0; }
.search-input { position: relative; }
.search-input > span { position: absolute; left: 13px; top: 10px; color: #8190a4; font-size: 18px; }
.search-input input { padding-left: 38px; }
.workflow-list { border: 1px solid var(--line-soft); border-radius: 12px; overflow: hidden; }
.workflow-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 15px; border-bottom: 1px solid var(--line-soft); background: white; }
.workflow-row:last-child { border-bottom: 0; }
.workflow-row:hover { background: #fbfcfe; }
.workflow-main { display: flex; align-items: flex-start; gap: 11px; min-width: 0; }
.workflow-main > div { min-width: 0; }
.workflow-main strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workflow-icon { width: 32px; height: 32px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 9px; color: var(--orange-dark); background: var(--orange-soft); }
.workflow-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 5px; color: var(--muted); font-size: 11px; }
.workflow-row .technical { margin-top: 5px; }
.workflow-row .technical code { color: #64738b; font-size: 11px; }
.list-note { color: var(--muted); font-size: 11px; }

.result-state { display: flex; align-items: flex-start; gap: 13px; padding: 17px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 13px; }
.result-state > span { width: 31px; height: 31px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; font-weight: 900; }
.result-state h2 { margin: 0 0 3px; font-size: 18px; }
.result-state p { margin: 2px 0; color: inherit; font-size: 13px; }
.result-state.success { color: #075e44; border-color: #bce4d4; background: var(--green-soft); }
.result-state.success > span { color: white; background: var(--green); }
.result-state.failed { color: #862230; border-color: #efbdc2; background: var(--red-soft); }
.result-state.failed > span { color: white; background: var(--red); }
.result-state.running { color: #275f9b; border-color: #cddff0; background: var(--blue-soft); }
.result-state.running > span { color: white; background: var(--blue); }
.verification-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin: 20px 0; }
.verification-grid section > p { margin: 2px 0 10px; color: var(--muted); font-size: 12px; }
.checklist { display: grid; gap: 8px; }
.verification-item { display: flex; align-items: flex-start; gap: 10px; padding: 11px; border: 1px solid #d5e8df; border-radius: 10px; background: #f5fbf8; }
.verification-item > span { width: 22px; height: 22px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: white; background: var(--green); font-size: 10px; font-weight: 900; }
.verification-item strong, .verification-item small { display: block; }
.verification-item small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.verification-item.blocked { border-color: #efbdc2; background: var(--red-soft); }
.verification-item.blocked > span { background: var(--red); }
.blocked-note { color: var(--red); font-size: 12px; font-weight: 800; }

.review-card { max-width: 920px; margin-left: auto; margin-right: auto; }
.critical-review { border-top: 4px solid var(--red); }
.review-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.review-heading h2 { margin-top: 7px; font-size: 24px; }
.review-heading p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.review-list { display: grid; margin: 20px 0; border-top: 1px solid var(--line-soft); }
.review-list > div { display: grid; grid-template-columns: minmax(150px, .6fr) 1.4fr; gap: 18px; padding: 12px 2px; border-bottom: 1px solid var(--line-soft); }
.version-transition { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; margin: 20px 0; }
.version-transition > div { padding: 16px; border: 1px solid var(--line); border-radius: 11px; background: #f8fafc; }
.version-transition span, .version-transition strong { display: block; }
.version-transition div span { color: var(--muted); font-size: 11px; }
.version-transition strong { margin-top: 2px; font-size: 25px; }
.confirmation-form { padding-top: 18px; margin-top: 20px; border-top: 1px solid var(--line); }
.confirmation-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.phrase { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 39px; padding: 6px 8px 6px 12px; border: 1px dashed #bcc8d7; border-radius: 8px; background: #f7f9fc; }
.phrase code { overflow-wrap: anywhere; color: #30435f; font-size: 11px; font-weight: 800; }
.copy-button { min-height: 28px; padding: 5px 8px; color: #42546e; border-color: var(--line); background: white; font-size: 10px; }
.copy-button:hover { background: #edf2f7; }
.submit-operation { min-width: 230px; flex-direction: column; align-items: flex-start; margin-top: 5px; text-align: left; }
.submit-operation small { opacity: .8; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }

.backup-columns { align-items: start; }
.backup-card .card-head { margin-bottom: 3px; }
.backup-list { display: grid; gap: 8px; margin-top: 17px; }
.backup-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 12px; border: 1px solid var(--line-soft); border-radius: 11px; background: #fbfcfe; }
.backup-icon { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; color: #546780; background: #edf2f7; }
.backup-row strong, .backup-row span { display: block; }
.backup-row span { margin-top: 2px; color: var(--muted); font-size: 11px; }
.backup-row .technical { margin-top: 4px; }
.backup-row code { font-size: 10px; }
.policy-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 18px; }
.policy-card > div { display: flex; align-items: flex-start; gap: 12px; }
.policy-icon { width: 31px; height: 31px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: white; background: var(--amber); font-weight: 900; }
.policy-card p { margin: 3px 0 0; }
.empty-state { padding: 32px 20px; color: var(--muted); text-align: center; }
.empty-state > span { width: 45px; height: 45px; display: grid; place-items: center; margin: 0 auto 10px; border-radius: 50%; color: #66768b; background: #edf2f7; font-size: 21px; }
.empty-state h2, .empty-state h3 { color: var(--ink); }
.empty-state p { max-width: 480px; margin: 5px auto 15px; }
.empty-state.compact { padding: 26px 12px; border: 1px dashed #cbd6e3; border-radius: 11px; }
.version-form { max-width: 720px; }

.notice { padding: 14px 16px; margin-bottom: 16px; border: 1px solid #efd18f; border-radius: 11px; color: #764a00; background: var(--amber-soft); font-size: 13px; }
.notice.error, .error { color: #8c2330; border-color: #efbdc2; background: var(--red-soft); }
.notice strong, .notice span { display: block; }
.separator { height: 1px; margin: 18px 0; background: var(--line); }

.job-card { max-width: 980px; margin: 0 auto; }
.job-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(230px, .5fr); gap: 25px; margin-top: 22px; }
.progress-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.progress-heading span { color: var(--muted); font-size: 12px; font-weight: 800; }
.progress-heading strong { font-size: 24px; }
progress { width: 100%; height: 16px; overflow: hidden; border: 0; border-radius: 999px; background: #e8edf3; accent-color: var(--orange); }
progress::-webkit-progress-bar { background: #e8edf3; }
progress::-webkit-progress-value { border-radius: 999px; background: var(--orange); }
progress::-moz-progress-bar { border-radius: 999px; background: var(--orange); }
.job-stages { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 0; margin: 20px 0 0; list-style: none; }
.job-stages li { display: flex; flex-direction: column; gap: 5px; padding: 8px; color: #8793a6; border-top: 2px solid #dbe3ed; font-size: 10px; }
.job-stages li.done { color: var(--green); border-color: var(--green); }
.job-stages li.active { color: var(--orange-dark); border-color: var(--orange); }
.safe-leave { display: flex; align-items: flex-start; gap: 10px; padding: 14px; border: 1px solid #cddff0; border-radius: 11px; color: #264b72; background: var(--blue-soft); }
.safe-leave > span { font-size: 20px; }
.safe-leave strong { display: block; font-size: 12px; }
.safe-leave p { margin: 3px 0 0; font-size: 11px; }
.log-details { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.console { max-height: 330px; overflow: auto; padding: 15px; border-radius: 10px; color: #dce7f5; background: var(--navy-950); white-space: pre-wrap; font: 11px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; }
.job-result-actions { display: flex; gap: 10px; margin-top: 18px; }
.polling-note { color: var(--muted); font-size: 11px; }
.spinner { width: 18px; height: 18px; display: inline-block; flex: 0 0 auto; border: 2px solid rgba(255,255,255,.35); border-top-color: white; border-radius: 50%; animation: spin .8s linear infinite; }
.result-state .spinner { width: 31px; height: 31px; border-width: 3px; border-color: #b8d3ee; border-top-color: var(--blue); background: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }

.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(520px, 1.15fr) minmax(430px, .85fr); background: white; }
.login-art { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh; padding: clamp(42px, 7vh, 80px) clamp(44px, 7vw, 110px); overflow: hidden; color: white; background: radial-gradient(circle at 80% 12%, rgba(236,101,0,.22), transparent 25%), linear-gradient(145deg, #091426 0%, #11213a 60%, #1c3552 100%); }
.login-art:after { content: ""; position: absolute; width: 420px; height: 420px; right: -170px; bottom: -170px; border: 70px solid rgba(255,255,255,.035); border-radius: 50%; }
.login-copy { position: relative; z-index: 1; margin-top: clamp(70px, 14vh, 145px); }
.login-copy h1 { max-width: 650px; margin: 12px 0 20px; font-size: clamp(42px, 5vw, 68px); line-height: 1.02; letter-spacing: -.055em; }
.login-copy p { max-width: 570px; margin: 0; color: #b9c8da; font-size: 17px; }
.login-proof { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.12); }
.login-proof strong, .login-proof span { display: block; }
.login-proof strong { font-size: 18px; }
.login-proof span { margin-top: 2px; color: #9fb0c7; font-size: 10px; }
.login-side { display: grid; place-items: center; padding: 34px; background: #f8fafc; }
.login-box { width: min(440px, 100%); }
.login-box > .brand { display: none; color: var(--ink); margin-bottom: 42px; }
.login-box h2 { margin: 8px 0 5px; font-size: 31px; letter-spacing: -.035em; }
.login-box > p { margin: 0 0 24px; color: var(--muted); }
.login-box form { padding: 25px; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: 0 22px 65px rgba(20,33,58,.11); }
.login-box form button { width: 100%; margin-top: 7px; }
.login-note { margin-top: 16px !important; color: var(--subtle) !important; font-size: 10px; text-align: center; }

@media (max-width: 980px) {
  .wrap { width: min(100% - 30px, 1320px); }
  .grid, .dashboard-grid, .direction-grid, .verification-grid, .backup-columns { grid-template-columns: 1fr; }
  .job-layout { grid-template-columns: 1fr; }
  .login-page { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .login-side { min-height: 100vh; }
  .login-box > .brand { display: inline-flex; }
}

@media (max-width: 700px) {
  .top { padding: 0 16px; }
  .user > span:not(.user-avatar) { display: none; }
  .nav { padding-left: 12px; padding-right: 12px; }
  .operation-bar { padding-left: 16px; padding-right: 16px; }
  .operation-link { display: none; }
  .hero { align-items: flex-start; flex-direction: column; }
  .hero .button { width: 100%; }
  .grid, .dashboard-grid { grid-template-columns: 1fr; }
  .section-heading, .card-head, .review-heading, .policy-card, .card-actions { align-items: flex-start; flex-direction: column; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .steps.update-steps { grid-template-columns: repeat(3, 1fr); }
  .step { padding: 8px; }
  .context-bar { position: static; align-items: flex-start; }
  .context-workflow { max-width: 54%; }
  .search-form { grid-template-columns: 1fr 1fr; }
  .search-form .field { grid-column: 1 / -1; }
  .workflow-row { align-items: flex-start; flex-direction: column; }
  .workflow-row > .button { width: 100%; }
  .confirmation-fields { grid-template-columns: 1fr; }
  .submit-operation { width: 100%; align-items: center; text-align: center; }
  .review-list > div { grid-template-columns: 1fr; gap: 3px; }
  .backup-row { grid-template-columns: auto 1fr; }
  .backup-row > .button { grid-column: 1 / -1; width: 100%; }
  .environment-summary { grid-template-columns: 1fr 1fr; }
  .environment-summary div { padding: 8px 10px; border: 0; }
  .job-stages { grid-template-columns: 1fr; }
  .job-stages li { flex-direction: row; border-top: 0; border-left: 2px solid #dbe3ed; }
  .history-row { grid-template-columns: auto 1fr; }
  .history-row > .state { grid-column: 2; justify-self: start; }
}

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