:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-muted: #f8fafb;
  --line: #dce2e7;
  --line-strong: #c7d0d8;
  --text: #182126;
  --text-soft: #5e6b73;
  --text-faint: #849099;
  --nav: #172025;
  --nav-soft: #253139;
  --green: #16835b;
  --green-dark: #0f6848;
  --green-soft: #e6f5ee;
  --blue: #2777b7;
  --blue-soft: #e9f2fa;
  --amber: #9c6813;
  --amber-soft: #fbf1db;
  --red: #bd3f3a;
  --red-soft: #faeaea;
  --shadow: 0 1px 2px rgba(20, 32, 38, .06), 0 6px 18px rgba(20, 32, 38, .04);
  --sidebar-width: 236px;
  --radius: 6px;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; color: var(--text); background: var(--bg); font-family: "Segoe UI", "Microsoft YaHei", Arial, sans-serif; font-size: 14px; line-height: 1.5; }
button, input, select { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
.app-icon { flex: 0 0 auto; width: 18px; height: 18px; display: inline-block; background-color: currentColor; -webkit-mask-image: var(--app-icon-image); mask-image: var(--app-icon-image); -webkit-mask-position: center; mask-position: center; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-size: contain; mask-size: contain; }
.app-icon-shield { --app-icon-image: url("../icons/shield.6696262af1cf.png"); }
.app-icon-dashboard { --app-icon-image: url("../icons/dashboard.908efe6a7e72.png"); }
.app-icon-globe { --app-icon-image: url("../icons/globe.fd5fbb97cf13.png"); }
.app-icon-bell { --app-icon-image: url("../icons/bell.678f9f944e33.png"); }
.app-icon-history { --app-icon-image: url("../icons/history.554fc597f8a4.png"); }
.app-icon-logout { --app-icon-image: url("../icons/logout.60126346ddfc.png"); }
.app-icon-menu { --app-icon-image: url("../icons/menu.289e3cbb5fd2.png"); }
.app-icon-close { --app-icon-image: url("../icons/close.99c773592554.png"); }
.app-icon-plus { --app-icon-image: url("../icons/plus.00360bc6e2d8.png"); }
.app-icon-arrow-left { --app-icon-image: url("../icons/arrow-left.7833d35a37b6.png"); }
.app-icon-chevron-right { --app-icon-image: url("../icons/chevron-right.42aeff43cf63.png"); }
.app-icon-download { --app-icon-image: url("../icons/download.fca4adf4a756.png"); }
.app-icon-refresh { --app-icon-image: url("../icons/refresh.3fba051a9041.png"); }
.app-icon-archive { --app-icon-image: url("../icons/archive.5a0cf5e5418c.png"); }
.app-icon-check { --app-icon-image: url("../icons/check.f2506ccabf00.png"); }
.app-icon-alert { --app-icon-image: url("../icons/alert.4c58c3d60753.png"); }
.app-icon-clock { --app-icon-image: url("../icons/clock.9ecee606afd3.png"); }
.app-icon-key { --app-icon-image: url("../icons/key.a6bb735fa5b0.png"); }
.app-icon-copy { --app-icon-image: url("../icons/copy.cebcdd47a179.png"); }
.app-icon-info { --app-icon-image: url("../icons/info.5d4605d481af.png"); }
.app-icon-lock { --app-icon-image: url("../icons/lock.307da1f6058f.png"); }
.app-icon-search { --app-icon-image: url("../icons/search.68be0e7122ea.png"); }
h1, h2, p { margin-top: 0; }
code { font-family: "Cascadia Code", Consolas, monospace; }

.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 50; width: var(--sidebar-width); display: flex; flex-direction: column; color: #dce3e7; background: var(--nav); border-right: 1px solid #29343a; }
.brand { min-height: 72px; display: flex; align-items: center; gap: 11px; padding: 14px 20px; border-bottom: 1px solid #2a353b; }
.brand-mark { flex: 0 0 auto; width: 35px; height: 35px; display: grid; place-items: center; color: white; background: var(--green); border-radius: 6px; }
.brand-mark .app-icon { width: 21px; height: 21px; }
.brand strong { display: block; color: white; font-size: 16px; line-height: 1.2; }
.brand small { display: block; margin-top: 3px; color: #8fa0aa; font-size: 11px; }
.nav-list { flex: 1; display: flex; flex-direction: column; gap: 3px; padding: 18px 12px; }
.nav-item { min-height: 42px; display: flex; align-items: center; gap: 11px; padding: 0 11px; color: #aebcc4; border-radius: 5px; transition: color .15s, background .15s; }
.nav-item .app-icon { width: 17px; height: 17px; }
.nav-item:hover { color: white; background: #202c32; }
.nav-item.is-active { color: white; background: var(--nav-soft); box-shadow: inset 3px 0 var(--green); }
.nav-count { min-width: 21px; height: 20px; margin-left: auto; display: grid; place-items: center; padding: 0 6px; color: white; background: var(--red); border-radius: 10px; font-size: 11px; font-weight: 700; }
.sidebar-foot { display: flex; align-items: center; gap: 8px; padding: 15px 14px; border-top: 1px solid #2a353b; }
.sidebar-foot form { margin-left: auto; }
.sidebar-foot .icon-button { color: #aebcc4; border-color: #39464d; }
.user-summary { min-width: 0; display: flex; align-items: center; gap: 9px; }
.user-summary > span:last-child { min-width: 0; }
.user-summary strong, .user-summary small { display: block; max-width: 112px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-summary strong { color: #edf1f3; font-size: 13px; }
.user-summary small { color: #8fa0aa; font-size: 11px; }
.avatar { flex: 0 0 auto; width: 32px; height: 32px; display: grid; place-items: center; color: #dcefe6; background: #2a453d; border: 1px solid #3a5e52; border-radius: 50%; font-size: 12px; font-weight: 700; }
.mobile-header, .sidebar-scrim { display: none; }
.app-main { min-height: 100vh; margin-left: var(--sidebar-width); }
.page-shell { width: min(1240px, 100%); margin: 0 auto; padding: 34px 36px 56px; }
.page-shell-narrow { width: min(850px, 100%); }

.page-header { min-height: 72px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.page-header h1 { margin-bottom: 5px; font-size: 26px; line-height: 1.25; letter-spacing: 0; }
.page-header p { margin-bottom: 0; color: var(--text-soft); }
.eyebrow { margin-bottom: 5px !important; color: var(--green) !important; font-size: 11px; font-weight: 700; letter-spacing: 0; text-transform: uppercase; }
.back-link { width: max-content; display: flex; align-items: center; gap: 5px; margin-bottom: 13px; color: var(--text-soft); font-size: 13px; }
.back-link:hover { color: var(--green-dark); }
.back-link .app-icon { width: 16px; height: 16px; }
.detail-header { align-items: flex-end; }
.title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.title-row h1 { max-width: 100%; overflow-wrap: anywhere; }
.header-actions { display: flex; align-items: center; gap: 8px; }

.button { min-height: 38px; width: max-content; max-width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 14px; color: var(--text); background: white; border: 1px solid var(--line-strong); border-radius: 5px; cursor: pointer; font-weight: 600; line-height: 1.2; transition: background .15s, border-color .15s, color .15s; }
.button .app-icon { width: 16px; height: 16px; }
.button:hover { background: #f2f5f6; border-color: #aeb9c1; }
.button-primary { color: white; background: var(--green); border-color: var(--green); }
.button-primary:hover { color: white; background: var(--green-dark); border-color: var(--green-dark); }
.button-secondary { background: white; }
.button-danger-ghost { color: var(--red); background: transparent; border-color: #dfaaa8; }
.button-danger-ghost:hover { color: #9b2f2b; background: var(--red-soft); border-color: #cf7773; }
.button-full { width: 100%; }
.button-table { min-height: 36px; padding: 7px 10px; }
.button:disabled { color: #8e989e; background: #e9edef; border-color: #d6dde1; cursor: not-allowed; }
.icon-button { flex: 0 0 auto; width: 36px; height: 36px; display: inline-grid; place-items: center; padding: 0; color: var(--text-soft); background: transparent; border: 1px solid var(--line); border-radius: 5px; cursor: pointer; }
.icon-button:hover { color: var(--text); background: var(--surface-muted); border-color: var(--line-strong); }
.icon-button .app-icon { width: 17px; height: 17px; }
.icon-button.inverse { color: #dce7eb; border-color: #53616a; }
.icon-button.inverse:hover { color: white; background: #34434b; }
.icon-button.danger { color: var(--red); border-color: #dfaaa8; }
.icon-button.danger:hover { color: #9b2f2b; background: var(--red-soft); border-color: #cf7773; }
.flip { transform: rotate(180deg); }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 26px; }
.metric { min-height: 126px; display: flex; align-items: flex-start; gap: 18px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.metric-icon { flex: 0 0 auto; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 7px; }
.metric-icon .app-icon { width: 36px; height: 36px; }
.metric-icon.is-green { color: var(--green); background: var(--green-soft); }
.metric-icon.is-blue { color: var(--blue); background: var(--blue-soft); }
.metric-icon.is-red { color: var(--red); background: var(--red-soft); }
.metric-icon.is-amber { color: var(--amber); background: var(--amber-soft); }
.metric > div { min-width: 0; }
.metric > div > span, .metric small { display: block; color: var(--text-soft); font-size: 12px; }
.metric strong { display: block; margin: 1px 0; font-size: 27px; line-height: 1.15; }
.metric small { color: var(--text-faint); font-size: 11px; }

.content-section, .form-section, .side-section { margin-top: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.content-section.no-top-gap { margin-top: 0; }
.section-heading { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.section-heading h2 { margin-bottom: 2px; font-size: 15px; letter-spacing: 0; }
.section-heading p { margin-bottom: 0; color: var(--text-soft); font-size: 12px; }
.text-link { display: inline-flex; align-items: center; gap: 3px; color: var(--green-dark); font-size: 12px; font-weight: 600; }
.text-link .app-icon { width: 15px; height: 15px; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; min-width: 700px; border-collapse: collapse; }
th, td { padding: 13px 18px; text-align: left; vertical-align: middle; border-bottom: 1px solid #e7ecef; }
th { color: var(--text-soft); background: var(--surface-muted); font-size: 11px; font-weight: 700; white-space: nowrap; }
td { font-size: 13px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfcfc; }
.align-right { text-align: right; }
.table-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.table-actions form { margin: 0; }
.nowrap { white-space: nowrap; }
.domain-link { color: var(--text); font-weight: 650; }
.domain-link:hover, .domain-cell:hover strong { color: var(--green-dark); }
.domain-cell { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.domain-cell > span:last-child { min-width: 0; }
.domain-cell strong, .domain-cell small { display: block; }
.domain-cell strong { max-width: 290px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.domain-cell small { margin-top: 2px; color: var(--text-faint); font-size: 11px; }
.domain-icon { flex: 0 0 auto; width: 31px; height: 31px; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); border-radius: 5px; }
.domain-icon .app-icon { width: 16px; height: 16px; }
.status { width: max-content; display: inline-flex; align-items: center; gap: 6px; color: var(--text-soft); font-size: 12px; white-space: nowrap; }
.status i, .boolean i { flex: 0 0 auto; width: 7px; height: 7px; background: #96a1a8; border-radius: 50%; }
.status-valid, .status-success, .status-completed, .status-succeeded { color: var(--green-dark); }
.status-valid i, .status-success i, .status-completed i, .status-succeeded i { background: var(--green); }
.status-processing, .status-running, .status-validating, .status-issuing, .status-prechecking, .status-ordering { color: var(--blue); }
.status-processing i, .status-running i, .status-validating i, .status-issuing i, .status-prechecking i, .status-ordering i { background: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.status-failed, .status-error, .status-expired { color: var(--red); }
.status-failed i, .status-error i, .status-expired i { background: var(--red); }
.status-pending, .status-queued, .status-waiting { color: var(--amber); }
.status-pending i, .status-queued i, .status-waiting i { background: #c58a29; }
.tag { width: max-content; display: inline-flex; align-items: center; min-height: 24px; padding: 3px 8px; color: #4d5b63; background: #eef2f4; border: 1px solid #dce3e7; border-radius: 4px; font-size: 11px; white-space: nowrap; }
.tag-production { color: var(--green-dark); background: var(--green-soft); border-color: #b8dfce; }
.tag-staging { color: var(--blue); background: var(--blue-soft); border-color: #bfd9ec; }
.tag-alert { color: var(--red); background: var(--red-soft); border-color: #edc1bf; }
.boolean { display: inline-flex; align-items: center; gap: 6px; color: var(--text-soft); font-size: 12px; white-space: nowrap; }
.boolean.is-on { color: var(--green-dark); }
.boolean.is-on i { background: var(--green); }
.muted { color: var(--text-faint); font-size: 12px; }
.cell-detail { display: block; max-width: 360px; margin-top: 3px; color: var(--text-soft); font-size: 11px; }
.date-range { white-space: nowrap; }
.date-range small { display: block; color: var(--text-faint); font-size: 11px; }
.short-code { display: inline-block; max-width: 190px; overflow: hidden; color: #40505a; text-overflow: ellipsis; vertical-align: middle; white-space: nowrap; }

.toolbar { margin-bottom: 12px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.filter-form { display: flex; align-items: center; gap: 9px; }
.search-field { width: min(340px, 100%); height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 10px; background: white; border: 1px solid var(--line-strong); border-radius: 5px; }
.search-field:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(22, 131, 91, .1); }
.search-field .app-icon { width: 16px; height: 16px; color: var(--text-faint); }
.search-field input { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; }
select, .field input { width: 100%; min-height: 40px; padding: 8px 10px; color: var(--text); background: white; border: 1px solid var(--line-strong); border-radius: 5px; outline: 0; }
.filter-form select { width: 150px; }
select:focus, .field input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(22, 131, 91, .1); }

.empty-state { min-height: 230px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 28px; color: var(--text-soft); text-align: center; }
.empty-state .app-icon { width: 27px; height: 27px; margin-bottom: 4px; color: var(--text-faint); }
.empty-state strong { color: var(--text); }
.empty-state span { font-size: 12px; }
.empty-state .button { margin-top: 9px; }
.empty-state.compact { min-height: 110px; flex-direction: row; }
.empty-state.compact .app-icon { width: 20px; height: 20px; margin: 0; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 15px; border-top: 1px solid var(--line); }
.pagination span { color: var(--text-soft); font-size: 12px; }

.form-layout { display: flex; flex-direction: column; gap: 16px; }
.form-section { margin-top: 0; overflow: hidden; }
.form-section-head { display: flex; align-items: center; gap: 12px; padding: 16px 19px; background: var(--surface-muted); border-bottom: 1px solid var(--line); }
.form-section-head > span { width: 28px; height: 28px; display: grid; place-items: center; color: var(--green-dark); background: var(--green-soft); border-radius: 50%; font-size: 11px; font-weight: 700; }
.form-section-head h2 { margin-bottom: 2px; font-size: 15px; }
.form-section-head p { margin-bottom: 0; color: var(--text-soft); font-size: 12px; }
.form-section-body { padding: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field > span { color: #38454c; font-size: 12px; font-weight: 650; }
.field > small { color: var(--text-faint); font-size: 11px; }
.field .field-error, .field-error { display: block; color: var(--red); font-size: 11px; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.choice > input { position: absolute; opacity: 0; pointer-events: none; }
.choice-body { position: relative; min-height: 88px; display: flex; align-items: center; gap: 12px; padding: 15px; background: white; border: 1px solid var(--line-strong); border-radius: 6px; cursor: pointer; }
.choice-body > span:nth-child(2) { min-width: 0; }
.choice-body strong, .choice-body small { display: block; }
.choice-body small { margin-top: 3px; color: var(--text-soft); font-size: 11px; }
.choice-icon { flex: 0 0 auto; width: 36px; height: 36px; display: grid; place-items: center; color: var(--text-soft); background: #eef2f4; border-radius: 5px; }
.choice-body > i { position: absolute; top: 8px; right: 8px; width: 19px; height: 19px; display: none; place-items: center; color: white; background: var(--green); border-radius: 50%; }
.choice-body > i .app-icon { width: 12px; height: 12px; }
.choice input:checked + .choice-body { background: #f7fcf9; border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.choice input:checked + .choice-body .choice-icon { color: var(--green-dark); background: var(--green-soft); }
.choice input:checked + .choice-body > i { display: grid; }
.choice input:focus-visible + .choice-body { outline: 3px solid rgba(22, 131, 91, .18); }
.notice { display: flex; align-items: flex-start; gap: 11px; padding: 14px 16px; color: #36576c; background: #edf6fa; border: 1px solid #c9e2ed; border-radius: 5px; }
.notice > .app-icon { width: 18px; height: 18px; margin-top: 1px; }
.notice strong { display: block; margin-bottom: 2px; font-size: 12px; }
.notice p { margin-bottom: 0; color: #547284; font-size: 12px; }
.notice form { margin-top: 10px; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; padding-top: 2px; }
.form-alert { display: flex; align-items: flex-start; gap: 9px; padding: 12px; color: #932f2b; background: var(--red-soft); border: 1px solid #e8b8b5; border-radius: 5px; font-size: 12px; }
.form-alert .app-icon { width: 17px; height: 17px; }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; gap: 20px; }
.detail-main, .detail-aside { min-width: 0; }
.detail-main .content-section:first-child { margin-top: 0; }
.detail-aside { display: flex; flex-direction: column; gap: 14px; }
.side-section { margin-top: 0; overflow: hidden; }
.side-section .section-heading { min-height: 56px; padding: 12px 15px; }
.side-section > p, .side-section > form, .side-section > .hint { margin: 13px 15px; }
.side-section > p { color: var(--text-soft); font-size: 12px; }
.hint { display: block; color: var(--text-faint); font-size: 11px; text-align: center; }
.stepper { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 22px 20px; list-style: none; }
.stepper li { position: relative; display: flex; align-items: center; gap: 10px; min-width: 0; }
.stepper li:not(:last-child)::after { content: ""; position: absolute; z-index: 0; top: 17px; left: 40px; right: 9px; height: 1px; background: var(--line-strong); }
.stepper li > span { position: relative; z-index: 1; flex: 0 0 auto; width: 34px; height: 34px; display: grid; place-items: center; color: var(--text-faint); background: white; border: 1px solid var(--line-strong); border-radius: 50%; font-size: 12px; font-weight: 700; }
.stepper li > span .app-icon { width: 16px; height: 16px; }
.stepper li > div { min-width: 0; padding-right: 9px; background: white; }
.stepper strong, .stepper small { display: block; }
.stepper strong { font-size: 12px; }
.stepper small { margin-top: 2px; overflow: hidden; color: var(--text-faint); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.stepper .is-done > span { color: white; background: var(--green); border-color: var(--green); }
.stepper .is-done:not(:last-child)::after { background: var(--green); }
.stepper .is-active > span { color: var(--blue); background: var(--blue-soft); border-color: var(--blue); box-shadow: 0 0 0 3px rgba(39, 119, 183, .1); }
.detail-main .notice { margin: 0 20px 20px; }
.production-box { margin: 0 20px 20px; padding: 16px; background: #f7faf8; border: 1px solid #c6dfd3; border-radius: 5px; }
.production-box > div strong { font-size: 13px; }
.production-box > div p { margin: 3px 0 13px; color: var(--text-soft); font-size: 12px; }
.production-box form { display: grid; grid-template-columns: minmax(190px, 1fr) auto; align-items: end; gap: 10px; }
.manual-challenge { padding: 18px 20px 20px; }
.manual-row { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; gap: 12px; margin-bottom: 12px; }
.manual-row > span { color: var(--text-soft); font-size: 12px; font-weight: 650; }
.manual-challenge .code-box { margin: 0; }
.manual-challenge .notice { margin: 4px 0 14px; }
.manual-challenge form { display: flex; justify-content: flex-end; }
.timeline { padding: 5px 18px 18px; }
.timeline-item { position: relative; display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 11px; padding-top: 17px; }
.timeline-item:not(:last-child)::before { content: ""; position: absolute; top: 26px; bottom: -17px; left: 4px; width: 1px; background: var(--line); }
.timeline-dot { position: relative; z-index: 1; width: 9px; height: 9px; margin-top: 5px; background: #96a1a8; border: 2px solid white; border-radius: 50%; box-shadow: 0 0 0 1px #96a1a8; }
.timeline-dot.status-success, .timeline-dot.status-completed { background: var(--green); box-shadow: 0 0 0 1px var(--green); }
.timeline-dot.status-failed { background: var(--red); box-shadow: 0 0 0 1px var(--red); }
.timeline-dot.status-running, .timeline-dot.status-processing { background: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.timeline-content { min-width: 0; padding-bottom: 5px; }
.timeline-content > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.timeline-content p { margin: 4px 0 2px; overflow-wrap: anywhere; color: var(--text-soft); font-size: 12px; }
.timeline-content time { color: var(--text-faint); font-size: 10px; }
.code-box { display: flex; align-items: center; gap: 8px; margin: 0 15px 15px; padding: 10px; color: #e8eff2; background: #253139; border-radius: 5px; }
.code-box code { min-width: 0; flex: 1; overflow: hidden; font-size: 11px; overflow-wrap: anywhere; }
.meta-list { margin: 0; padding: 5px 15px 12px; }
.meta-list div { display: flex; align-items: flex-start; justify-content: space-between; gap: 13px; padding: 9px 0; border-bottom: 1px solid #edf0f2; }
.meta-list div:last-child { border-bottom: 0; }
.meta-list dt { color: var(--text-soft); font-size: 11px; }
.meta-list dd { max-width: 170px; margin: 0; overflow-wrap: anywhere; font-size: 11px; font-weight: 600; text-align: right; }

.notification-list { overflow: hidden; }
.notification { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 13px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.notification:last-child { border-bottom: 0; }
.notification.is-unread { background: #f7fbf9; box-shadow: inset 3px 0 var(--green); }
.notification-icon { width: 36px; height: 36px; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); border-radius: 5px; }
.notification-icon .app-icon { width: 18px; height: 18px; }
.notification-icon.is-error, .notification-icon.is-warning { color: var(--red); background: var(--red-soft); }
.notification-icon.is-success { color: var(--green); background: var(--green-soft); }
.notification-title { display: flex; align-items: center; gap: 8px; }
.notification-title strong { font-size: 13px; }
.notification-title span { padding: 1px 5px; color: white; background: var(--green); border-radius: 3px; font-size: 9px; }
.notification p { margin: 4px 0; overflow-wrap: anywhere; color: var(--text-soft); font-size: 12px; }
.notification time { color: var(--text-faint); font-size: 10px; }

.flash-stack { position: fixed; z-index: 100; top: 18px; right: 18px; width: min(390px, calc(100vw - 36px)); display: flex; flex-direction: column; gap: 8px; }
.flash { display: grid; grid-template-columns: 19px minmax(0, 1fr) 28px; align-items: center; gap: 9px; padding: 11px 10px 11px 13px; color: #29465a; background: white; border: 1px solid #bed6e4; border-left: 3px solid var(--blue); border-radius: 5px; box-shadow: 0 10px 30px rgba(24, 33, 38, .14); }
.flash-success { color: var(--green-dark); border-color: #afd8c5; border-left-color: var(--green); }
.flash-error { color: #8c322e; border-color: #e2aaa7; border-left-color: var(--red); }
.flash > .app-icon { width: 18px; height: 18px; }
.flash span { overflow-wrap: anywhere; font-size: 12px; }
.flash-close { width: 28px; height: 28px; display: grid; place-items: center; padding: 0; color: inherit; background: transparent; border: 0; border-radius: 4px; cursor: pointer; }
.flash-close:hover { background: rgba(0, 0, 0, .05); }
.flash-close .app-icon { width: 15px; height: 15px; }

.auth-page { min-height: 100vh; background: #edf1f3; }
.auth-main { min-height: 100vh; display: grid; place-items: center; padding: 30px 18px; }
.login-shell { width: min(390px, 100%); }
.login-brand { display: flex; align-items: center; justify-content: center; gap: 11px; margin-bottom: 20px; }
.brand-mark-large { width: 43px; height: 43px; }
.brand-mark-large .app-icon { width: 25px; height: 25px; }
.login-brand strong, .login-brand span { display: block; }
.login-brand strong { font-size: 19px; line-height: 1.2; }
.login-brand div > span { margin-top: 3px; color: var(--text-soft); font-size: 11px; }
.login-panel { padding: 26px; background: white; border: 1px solid var(--line); border-radius: 7px; box-shadow: 0 12px 35px rgba(23, 32, 37, .08); }
.login-panel header { margin-bottom: 21px; }
.login-panel h1 { margin-bottom: 6px; font-size: 21px; }
.login-panel header > p:last-child { margin-bottom: 0; color: var(--text-soft); font-size: 12px; }
.form-stack { display: flex; flex-direction: column; gap: 15px; }
.login-foot { margin: 16px 0 0; color: var(--text-faint); font-size: 10px; text-align: center; }

@media (max-width: 1080px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: minmax(0, 1fr) 270px; }
}

@media (max-width: 820px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-scrim { position: fixed; inset: 0; z-index: 40; display: block; visibility: hidden; background: rgba(13, 20, 24, .46); opacity: 0; transition: opacity .2s, visibility .2s; }
  .sidebar-scrim.is-open { visibility: visible; opacity: 1; }
  .mobile-header { position: sticky; top: 0; z-index: 30; height: 56px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; color: white; background: var(--nav); border-bottom: 1px solid #2a353b; }
  .mobile-header .icon-button { color: white; border-color: #405059; }
  .mobile-brand { display: flex; align-items: center; gap: 7px; }
  .mobile-brand .app-icon { width: 20px; height: 20px; color: #55c896; }
  .app-main { margin-left: 0; }
  .page-shell { padding: 25px 20px 45px; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-aside { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-aside .side-section:last-child { grid-column: 1 / -1; }
  .stepper li > div { padding-right: 5px; }
  .stepper small { display: none; }
}

@media (max-width: 600px) {
  .page-shell { padding: 20px 14px 38px; }
  .page-header { min-height: 0; align-items: flex-start; flex-direction: column; gap: 14px; margin-bottom: 20px; }
  .page-header h1 { font-size: 22px; overflow-wrap: anywhere; }
  .page-header > .button { width: 100%; }
  .header-actions, .header-actions form, .header-actions .button { width: 100%; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .metric { min-height: 108px; gap: 11px; padding: 15px; }
  .metric-icon { width: 44px; height: 44px; }
  .metric-icon .app-icon { width: 28px; height: 28px; }
  .metric strong { font-size: 23px; }
  .metric small { display: none; }
  .section-heading { min-height: 58px; padding: 12px 14px; }
  th, td { padding: 12px 14px; }
  .toolbar { padding: 10px; }
  .filter-form { align-items: stretch; flex-direction: column; }
  .search-field, .filter-form select, .filter-form .button { width: 100%; }
  .choice-grid { grid-template-columns: 1fr; }
  .form-section-body { padding: 16px; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions .button { width: 100%; }
  .detail-aside { grid-template-columns: 1fr; }
  .detail-aside .side-section:last-child { grid-column: auto; }
  .stepper { padding: 18px 12px; }
  .stepper li { flex-direction: column; align-items: flex-start; gap: 5px; }
  .stepper li:not(:last-child)::after { top: 17px; left: 34px; right: 4px; }
  .stepper li > div { width: 100%; padding-right: 4px; }
  .stepper strong { max-width: 86px; overflow-wrap: anywhere; }
  .detail-main .notice, .production-box { margin-right: 14px; margin-left: 14px; }
  .production-box form { grid-template-columns: 1fr; }
  .production-box .button { width: 100%; }
  .manual-challenge { padding: 16px 14px; }
  .manual-row { grid-template-columns: 1fr; gap: 6px; }
  .manual-challenge form, .manual-challenge .button { width: 100%; }
  .timeline { padding-right: 14px; padding-left: 14px; }
  .notification { padding: 14px; }
  .login-panel { padding: 22px 18px; }
}

@media (max-width: 390px) {
  .metric { align-items: flex-start; flex-direction: column; }
  .metric > div > span { font-size: 11px; }
  .metric strong { font-size: 21px; }
}

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