:root {
  color-scheme: dark;
  --bg: #080b10;
  --surface: #11161f;
  --surface-2: #171e29;
  --surface-3: #0c1118;
  --line: #293344;
  --line-strong: #3d4a60;
  --text: #eef2f7;
  --muted: #98a5b6;
  --dim: #687588;
  --accent: #d9e2ef;
  --good: #7fc995;
  --warn: #e3b86d;
  --bad: #e58b8b;
  --radius: 14px;
  --radius-small: 9px;
  --shadow: 0 18px 46px rgba(0, 0, 0, .24);
}

/* Operations center */
.operations-empty { min-height: 320px; }
.operations-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.operations-toolbar > div:first-child { display: grid; gap: 2px; margin-right: auto; }
.operations-toolbar > div:first-child strong { font-size: 15px; }
.operations-toolbar > div:first-child span,.operations-range-note { color: var(--muted); font-size: 10px; }
.operations-periods { display: flex; gap: 5px; }
.operations-periods button.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.operations-range-note { margin: 0 0 12px; }
.operations-summary-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin-bottom: 14px; }
.operations-summary { position: relative; overflow: hidden; min-height: 102px; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--surface); }
.operations-summary::before { position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--line-strong); content: ''; }
.operations-summary span,.operations-summary small { display: block; color: var(--muted); font-size: 10px; }
.operations-summary strong { display: block; margin: 6px 0 3px; font-size: 28px; line-height: 1; }
.operations-summary.critical::before { background: var(--bad); }
.operations-summary.critical strong,.operations-drop.negative { color: var(--bad); }
.operations-summary.attention::before { background: var(--warn); }
.operations-summary.attention strong,.warning-text { color: var(--warn); }
.operations-summary.sample::before { background: var(--muted); }
.operations-summary.resolved::before { background: var(--good); }
.operations-change-panel,.operations-resource-panel { margin-top: 14px; }
.operations-change-table { min-width: 1220px; }
.operations-resource-table { min-width: 1120px; }
.operations-comparison-row.significant { background: color-mix(in srgb,var(--bad) 4%,transparent); }
.operations-comparison-row.small,.operations-comparison-row.insufficient { background: color-mix(in srgb,var(--muted) 3%,transparent); }
.operations-change-table td:first-child,.operations-resource-table td:first-child { min-width: 190px; }
.operations-change-table td small,.operations-resource-table td small,.operations-status + small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.operations-bin-link { font-family: ui-monospace,SFMono-Regular,Consolas,monospace; font-size: 13px; letter-spacing: .04em; }
.operations-status.critical { border-color: color-mix(in srgb,var(--bad) 32%,var(--line)); color: var(--bad); }
.operations-status.attention { border-color: color-mix(in srgb,var(--warn) 38%,var(--line)); color: var(--warn); }
.operations-status.small,.operations-status.insufficient { color: var(--muted); }
.operations-rate { display: grid; min-width: 140px; gap: 5px; }
.operations-rate > span { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.operations-rate b { font-size: 13px; }
.operations-rate small { color: var(--muted); font-size: 9px; }
.operations-rate progress { width: 100%; height: 5px; overflow: hidden; appearance: none; border: 0; border-radius: 99px; background: var(--surface-3); }
.operations-rate progress::-webkit-progress-bar { border-radius: 99px; background: var(--surface-3); }
.operations-rate progress::-webkit-progress-value { border-radius: 99px; background: var(--accent); }
.operations-rate progress::-moz-progress-bar { border-radius: 99px; background: var(--accent); }
.operations-rate.previous progress::-webkit-progress-value { background: var(--muted); }
.operations-rate.previous progress::-moz-progress-bar { background: var(--muted); }
.operations-drop { min-width: 80px; font-size: 13px; font-weight: 800; }
.operations-row-actions { display: flex; min-width: 170px; flex-wrap: wrap; gap: 5px; }
.operations-resource-table tr.resource-gap { background: color-mix(in srgb,var(--warn) 4%,transparent); }
.job-resource-preview { display: grid; gap: 5px; border: 1px solid var(--line); border-left: 3px solid var(--good); border-radius: 9px; padding: 11px 12px; background: var(--surface-3); }
.job-resource-preview.has-gap { border-left-color: var(--warn); }
.job-resource-preview > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.job-resource-preview strong,.job-resource-preview b { color: var(--text); font-size: 11px; }
.job-resource-preview span,.job-resource-preview small { color: var(--muted); font-size: 9px; }

@media (max-width: 900px) {
  .operations-toolbar { align-items: stretch; flex-wrap: wrap; }
  .operations-toolbar > div:first-child { width: 100%; }
  .operations-periods { flex: 1; }
  .operations-periods button { flex: 1; }
  .operations-summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 520px) {
  .operations-summary-grid { gap: 7px; }
  .operations-summary { min-height: 88px; padding: 11px 12px; }
  .operations-summary strong { font-size: 23px; }
  .operations-toolbar > button { width: 100%; }
  .job-resource-preview > div { display: grid; gap: 3px; }
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 80% -10%, rgba(80, 105, 143, .13), transparent 34%),
    linear-gradient(180deg, #090c12, var(--bg) 45%);
  color: var(--text);
  font: 14px/1.5 Inter, "Segoe UI", Arial, "Microsoft YaHei", sans-serif;
}

button, input, select, textarea { font: inherit; }

button {
  min-height: 40px;
  border: 1px solid #d8e0eb;
  border-radius: var(--radius-small);
  background: #e8edf4;
  color: #111721;
  padding: 8px 14px;
  font-weight: 750;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, transform .16s ease, opacity .16s ease;
}

button:hover:not(:disabled) { background: #fff; transform: translateY(-1px); }
button:active:not(:disabled) { transform: translateY(0); }
button:disabled { cursor: not-allowed; opacity: .42; }

.primary { background: #e8edf4; color: #111721; }
.secondary { border-color: var(--line-strong); background: #171e29; color: var(--text); }
.secondary:hover:not(:disabled) { border-color: #64738b; background: #202938; }
.full { width: 100%; }
.compact { min-height: 34px; padding: 6px 10px; font-size: 12px; }
.hidden { display: none !important; }

input:not([type="checkbox"]):not([type="radio"]), select, textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-small);
  outline: 0;
  background-color: var(--surface-3);
  color: var(--text);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

input:not([type="checkbox"]):not([type="radio"]), select {
  height: 42px;
  padding: 0 12px;
}

select {
  appearance: none;
  padding-right: 38px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background-image:
    linear-gradient(45deg, transparent 50%, #91a0b4 50%),
    linear-gradient(135deg, #91a0b4 50%, transparent 50%),
    linear-gradient(to right, var(--line), var(--line));
  background-position:
    calc(100% - 17px) 18px,
    calc(100% - 12px) 18px,
    calc(100% - 34px) 8px;
  background-size: 5px 5px, 5px 5px, 1px 26px;
  background-repeat: no-repeat;
}

select option { background: #111720; color: var(--text); }

textarea {
  min-height: 190px;
  padding: 12px 13px;
  resize: vertical;
  line-height: 1.55;
}

input::placeholder, textarea::placeholder { color: #657286; opacity: 1; }

input:not([type="checkbox"]):not([type="radio"]):hover,
select:hover,
textarea:hover { border-color: #56657d; }

input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
  border-color: #8493a9;
  background-color: #0e141d;
  box-shadow: 0 0 0 3px rgba(128, 146, 171, .14);
}

input[type="checkbox"], input[type="radio"] {
  width: 16px;
  height: 16px;
  margin: 0;
  vertical-align: middle;
  accent-color: #dce5f1;
}

label { color: var(--muted); }

.field {
  display: grid;
  gap: 7px;
  min-width: 0;
}
.proxy-source-fields .field[hidden], #proxy-fallback-wrap[hidden] { display: none !important; }

.field > span {
  color: #aab6c6;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .08em;
}

.login-shell { max-width: 460px; margin: 10vh auto; padding: 0 18px; }
.login-brand { border-left: 3px solid #e9eef5; padding-left: 13px; margin-bottom: 20px; letter-spacing: 2px; }
.login-brand strong, .login-brand small, .brand strong, .brand small { display: block; }
.login-brand small, .brand small { color: var(--dim); font-size: 10px; margin-top: 5px; letter-spacing: .18em; }
.login-panel label { display: grid; gap: 6px; margin-bottom: 13px; font-size: 12px; }
.notice { min-height: 21px; margin: 12px 0 0; color: var(--muted); }
.session-loading-status { display: flex; align-items: center; gap: 14px; min-height: 68px; }
.session-loading-status > div { min-width: 0; }
.session-loading-status strong { display: block; color: var(--text); font-size: 15px; }
.session-loading-status .notice { margin-top: 5px; overflow-wrap: anywhere; }
.session-spinner { flex: 0 0 auto; width: 24px; height: 24px; border: 2px solid var(--line-strong); border-top-color: var(--accent); border-radius: 50%; animation: session-spin .8s linear infinite; }
.session-loading-shell[data-state="error"] .session-spinner { border-color: var(--bad); animation: none; }
@keyframes session-spin { to { transform: rotate(360deg); } }

.app { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: rgba(10, 14, 20, .94);
  padding: 23px 13px;
  backdrop-filter: blur(14px);
}

.brand { padding: 0 12px 24px; border-bottom: 1px solid var(--line); margin-bottom: 15px; letter-spacing: 1px; }
.brand strong { font-size: 18px; }
.nav {
  display: block;
  width: 100%;
  min-height: 42px;
  margin: 3px 0;
  border-color: transparent;
  background: transparent;
  color: #aeb9c8;
  text-align: left;
  font-weight: 650;
}
.nav:hover:not(:disabled), .nav.active { transform: none; border-color: var(--line-strong); background: #171e29; color: #fff; }
.nav.active { box-shadow: inset 3px 0 #dfe7f2; }

.main { width: 100%; max-width: 1600px; min-width: 0; padding: 30px clamp(18px, 3vw, 42px) 48px; }
.header { display: flex; align-items: end; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 20px; }
.header h1 { margin: 6px 0 0; font-size: clamp(24px, 2.4vw, 31px); line-height: 1.1; letter-spacing: -.025em; }
.eyebrow { color: var(--dim); font-size: 10px; font-weight: 800; letter-spacing: .2em; }

.panel, .card, .table-panel, .details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(18, 24, 34, .98), rgba(13, 18, 26, .98));
  box-shadow: var(--shadow);
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 11px 15px;
  border-bottom: 1px solid var(--line);
  color: #b7c1ce;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .08em;
}
.bar small { color: var(--dim); font-size: 9px; letter-spacing: .15em; }
.panel-body { display: grid; gap: 11px; min-width: 0; padding: 17px; }
.panel-body > label:not(.field) { display: grid; gap: 7px; }
.panel-body > label:not(.field) input:not([type="checkbox"]) { margin-top: 3px; }
.panel-body > label:has(> input[type="checkbox"]),
.panel-body > label:has(> input[type="radio"]) {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
}
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.form-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.form-actions button { flex: 1 1 160px; }
.helper-copy { display: block; line-height: 1.7; }

.grid { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 13px; margin-top: 18px; }
.card { min-width: 0; padding: 17px; color: #b8c2cf; }
.card .number { margin-top: 10px; color: var(--text); font-size: 29px; font-weight: 720; letter-spacing: -.03em; }
.muted { color: var(--muted); font-size: 12px; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 16px; margin-top: 18px; align-items: start; }
.import-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 18px; align-items: start; }
.import-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: stretch; }
.import-group-link { display: flex; align-items: center; justify-content: center; min-width: 118px; border: 1px solid var(--line-strong); border-radius: var(--radius-small); padding: 7px 12px; text-decoration: none; white-space: nowrap; }
.quick-import-workspace { display: grid; grid-template-columns: minmax(440px, .92fr) minmax(0, 1.08fr); gap: 16px; align-items: start; min-width: 0; }
.quick-import-workspace > * { min-width: 0; }
.quick-import-workspace .preview-panel { margin-top: 0; }
#card-preview { max-height: min(620px, calc(100vh - 190px)); overflow: auto; align-content: start; scrollbar-gutter: stable; }
#card-import textarea, #card-full-prepare textarea { min-height: 260px; }
.card-group-library .group-list { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: min(560px, 60vh); overflow-y: auto; overscroll-behavior: contain; padding-right: 6px; scrollbar-gutter: stable; }
.preview-panel { margin-top: 16px; }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(16, 22, 31, .96);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .15);
}
.filter-toolbar > input:not([type="checkbox"]), .filter-toolbar > select { flex: 1 1 150px; max-width: 260px; }
.filter-toolbar > button { flex: 0 0 auto; }
.filter-toolbar > label { display:flex;align-items:center;gap:7px;color:var(--muted);font-size:12px; }
.filter-toolbar > label input { min-width:135px; }
.filter-grid { display:grid;grid-template-columns:minmax(180px,1.6fr) repeat(5,minmax(110px,1fr));gap:9px;margin-bottom:12px; }
.filter-grid > button { width:auto; }
.address-language-switch { margin: 12px 0; }
.address-language-switch button.active { border-color: #6f66d8; background: #2a2450; color: #fff; }
#address-results[data-language="local"] .address-language-english,
#address-results[data-language="english"] .address-language-local { display: none; }
.address-language { margin-top: 12px; }
.address-language em { color: var(--muted); font-style: normal; }
.address-supply-panel { margin: 14px 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 14px 34px rgba(0, 0, 0, .14); }
.address-supply-panel .table-head { align-items: flex-start; }
.address-supply-panel .table-head span { max-width: 68ch; text-align: right; overflow-wrap: anywhere; }
.address-supply-list { display: grid; }
.address-supply-row { min-width: 0; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.address-supply-row:last-child { border-bottom: 0; }
.address-supply-row > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.address-supply-row > header div { min-width: 0; }
.address-supply-row > header strong, .address-supply-row > header span { display: block; overflow-wrap: anywhere; }
.address-supply-row > header div > span { color: var(--muted); font-size: 12px; }
.address-supply-metrics { display: grid; grid-template-columns: repeat(5, minmax(92px, 1fr)); gap: 8px; margin-top: 12px; }
.address-supply-metrics > div { min-width: 0; padding: 9px 10px; border-radius: var(--radius-small); background: var(--surface-2); }
.address-supply-metrics span, .address-supply-metrics small { display: block; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.address-supply-metrics b { display: block; margin: 2px 0; font-size: 18px; line-height: 1.2; }
.address-supply-metrics .shortage b { color: var(--bad); }
.address-supply-state { display: flex; align-items: center; gap: 10px; min-width: 0; margin-top: 10px; color: var(--muted); font-size: 12px; }
.address-supply-state > strong { flex: 1 1 auto; min-width: 0; color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.address-supply-state > button { flex: 0 0 auto; }
.address-supply-row.failed { background: color-mix(in srgb, var(--bad) 6%, var(--surface)); }
.address-supply-row.running { background: color-mix(in srgb, var(--warn) 4%, var(--surface)); }
.address-country-catalog-panel { margin-top: 18px; }
.address-country-catalog-layout { grid-template-columns: minmax(300px, .9fr) minmax(0, 1.35fr); }
.address-country-profile { align-items: start; }
.address-country-profile .group-main { min-width: 0; }
.address-country-profile .group-actions { align-content: start; }
#address-country-profile-form { margin: 0; }
#address-country-profile-form textarea { min-height: 190px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; line-height: 1.5; resize: vertical; }
#address-country-validation { display: grid; gap: 10px; min-height: 46px; }
#address-country-validation .address-result { margin: 0; }
.card-filter-toolbar > input:not([type="checkbox"]), .card-filter-toolbar > select { min-width: 130px; }
.card-collection-tabs { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: 7px; margin-top: 18px; padding: 6px; border: 1px solid var(--line); border-radius: var(--radius-small); background: var(--surface-3); }
.card-collection-tabs button { min-width: 0; border-color: transparent; background: transparent; color: var(--muted); }
.card-collection-tabs button:hover:not(:disabled) { border-color: var(--line-strong); background: var(--surface-2); color: var(--text); transform: none; }
.card-collection-tabs button[aria-selected="true"] { border-color: var(--accent-border); background: var(--accent-soft); color: var(--text); }
.action-toolbar { align-items: stretch; }
.action-toolbar > strong { display: flex; flex: 0 0 auto; align-items: center; padding: 0 6px; white-space: nowrap; }
.action-toolbar > input:not([type="checkbox"]), .action-toolbar > select { flex: 1 1 190px; max-width: 300px; }
.action-toolbar > button { flex: 0 0 auto; }
.card-expiry-tool { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 10px; border: 1px solid color-mix(in srgb,var(--warn) 45%,var(--line)); border-left: 3px solid var(--warn); border-radius: var(--radius-small); padding: 11px 12px; background: color-mix(in srgb,var(--warn) 5%,var(--surface)); }
.card-expiry-tool > div:first-child { display: grid; gap: 3px; min-width: 0; }
.card-expiry-tool strong { font-size: 12px; }
.card-expiry-tool span { line-height: 1.45; }
.card-expiry-actions { display: flex; flex: 0 0 auto; gap: 7px; }
.card-archive-filter { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.archived-group-fold { grid-column: 1 / -1; min-width: 0; border: 1px solid var(--line); border-radius: var(--radius-small); background: var(--surface-2); }
.archived-group-fold > summary { display: flex; align-items: center; gap: 9px; padding: 12px 14px; color: var(--text); cursor: pointer; }
.archived-group-fold > summary b { min-width: 24px; padding: 2px 7px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--muted); text-align: center; }
.archived-group-fold > summary small { margin-left: auto; color: var(--dim); }
.archived-group-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0 10px 10px; }
.archived-group-list .group-item { box-shadow: none; }

.table-panel { margin-top: 14px; overflow: hidden; }
.table-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.table-head > * { min-width: 0; }
.table-wrap { overflow: auto; scrollbar-color: #48556a #10151d; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th, td { padding: 11px 12px; border-bottom: 1px solid #252e3c; text-align: left; vertical-align: top; white-space: nowrap; }
th { position: sticky; top: 0; z-index: 1; background: #0d1219; color: #9da9b8; font-weight: 680; }
tbody tr:hover { background: rgba(91, 110, 140, .08); }
td.wrap { min-width: 190px; max-width: 420px; white-space: normal; overflow-wrap: anywhere; }

.terminal { margin: 0; min-height: 380px; max-height: 600px; overflow: auto; padding: 16px; background: #05070a; color: #d7dfe9; font: 12px/1.7 ui-monospace, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.empty { margin-top: 18px; padding: 44px 22px; border: 1px dashed #3d4a5e; border-radius: var(--radius); background: rgba(12, 17, 24, .7); color: var(--muted); text-align: center; }
.empty strong { display: block; margin-bottom: 8px; color: #e4eaf2; }
.compact-empty { margin: 0; padding: 24px 16px; }

.status { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.status::before { content: ""; flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: #788596; }
.status.resolved::before, .status.active::before, .status.available::before, .status.valid::before { background: var(--good); }
.status.not_found::before, .status.disabled::before, .status.ambiguous::before { background: var(--warn); }
.status.error::before, .status.archived::before, .status.unrecognized::before { background: var(--bad); }
.status.suspected_success::before { background: var(--accent); }
.status.failed::before { background: var(--bad); }
.status.confirmed_success::before { background: var(--good); }
.link { min-height: 0; border: 0; background: transparent; color: #d8e1ec; padding: 0; text-decoration: underline; }
.link:hover:not(:disabled) { transform: none; background: transparent; }
.pager { display: flex; align-items: center; gap: 9px; padding: 13px 16px; }
.account-check-toolbar > span { flex: 1 1 320px; line-height: 1.55; }
.account-check-toolbar > button { flex: 0 0 auto; }
.account-check-metrics { grid-template-columns: repeat(6,minmax(120px,1fr)); gap: 10px; margin-top: 14px; }
.account-check-metrics .card { min-height: 92px; padding: 13px 14px; }
.account-check-metrics .number { margin: 7px 0 3px; font-size: 25px; }
.account-check-review-metric { border-color: color-mix(in srgb,var(--accent) 48%,var(--line)); }
.maintenance-insight-panel { margin-top: 14px; overflow: hidden; }
.maintenance-insight-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(240px,310px); gap: 14px; padding: 14px; }
.maintenance-insight-summary { display: grid; grid-template-columns: repeat(4,minmax(100px,1fr)); gap: 8px; margin-bottom: 10px; }
.maintenance-insight-summary div { min-width: 0; border: 1px solid var(--line); border-radius: 9px; padding: 10px 11px; background: var(--surface-3); }
.maintenance-insight-summary span { display: block; color: var(--dim); font-size: 10px; }
.maintenance-insight-summary strong { display: block; margin-top: 5px; font-size: 20px; }
.maintenance-bin-table { max-height: 250px; border: 1px solid var(--line); border-radius: 9px; }
.maintenance-bin-table table { min-width: 520px; }
.maintenance-bin-table th,.maintenance-bin-table td { padding: 8px 10px; }
.maintenance-lease-lookup { align-self: start; border: 1px solid var(--line); border-radius: 10px; padding: 13px; background: var(--surface-3); }
.maintenance-lease-lookup label,.maintenance-lease-lookup label span { display: block; }
.maintenance-lease-lookup label span { margin-bottom: 7px; color: var(--muted); font-size: 11px; font-weight: 700; }
.maintenance-lease-lookup input,.maintenance-lease-lookup button { width: 100%; }
.maintenance-lease-lookup button { margin-top: 9px; }
.maintenance-lease-lookup small { display: block; margin-top: 9px; line-height: 1.5; }
.account-check-table-panel table { min-width: 1640px; }
.account-check-table-panel th, .account-check-table-panel td { padding: 9px 10px; }
.account-check-row-actions { display: flex; flex-wrap: wrap; gap: 6px; min-width: 310px; }

.details { margin-top: 14px; overflow: hidden; }
.details-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 16px; }
.definition { min-width: 0; padding: 12px; border: 1px solid #273141; border-radius: 9px; background: #0c1118; overflow-wrap: anywhere; }
.definition span { display: block; margin-bottom: 6px; color: var(--dim); font-size: 10px; font-weight: 750; letter-spacing: .08em; }
.history { min-width: 0; padding: 0 15px 15px; }
.cloud-job-dialog { width: min(1120px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: #10161f; color: var(--text); box-shadow: 0 28px 90px rgba(0,0,0,.55); }
.cloud-job-dialog::backdrop { background: rgba(3,6,10,.76); backdrop-filter: blur(3px); }
.dialog-shell { max-height: calc(100vh - 32px); overflow: auto; }
.dialog-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; border-bottom: 1px solid var(--line); background: #10161f; }
.dialog-head h2 { margin: 4px 0 0; font-size: 20px; overflow-wrap: anywhere; }
.dialog-body { padding-bottom: 18px; }
.cloud-job-detail-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dialog-section { margin: 0 16px 16px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: rgba(12,17,24,.72); }
.dialog-section h3 { margin: 0; padding: 11px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.dialog-section .table-wrap { max-height: 300px; overflow: auto; }
.dialog-list { display: grid; gap: 8px; margin: 0; padding: 12px 14px; list-style: none; }
.dialog-list li { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #252e3c; }
.dialog-list li:last-child { border-bottom: 0; }
.dialog-list li span { color: var(--muted); overflow-wrap: anywhere; }
.job-card-manager-body { display: grid; gap: 12px; padding: 12px 14px; }
.job-card-manager .toolbar { padding: 0; }
.job-card-manager .choice-list { max-height: 220px; border: 1px solid #273141; border-radius: 9px; padding: 8px 12px; background: #0c1118; }
.job-card-manager-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.job-card-manager-actions .muted { flex: 1 1 280px; }
@media (max-width: 820px) { .cloud-job-detail-grid { grid-template-columns: 1fr; } .cloud-job-dialog { width: calc(100vw - 16px); } }
.history-item { display: grid; grid-template-columns: 140px 110px minmax(0, 1fr) minmax(180px, auto); gap: 10px; padding: 10px; border-top: 1px solid #27303d; font-size: 12px; overflow-wrap: anywhere; }

.preview { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 14px; margin-top: 18px; }
.preview-results { max-height: 360px; overflow: auto; }
.preview-row { display: grid; grid-template-columns: 68px 110px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-bottom: 1px solid #27303d; }
.preview-row > * { min-width: 0; }
.preview-row code { color: #dce3ec; white-space: normal; overflow-wrap: anywhere; }
.summary { display: flex; flex-wrap: wrap; gap: 8px; }
.badge { border: 1px solid #3c485b; border-radius: 999px; padding: 5px 9px; background: #151c26; font-size: 11px; }
.bin-preview-select { display: flex; align-items: center; gap: 8px; color: var(--text); }
.bin-preview-select code { min-width: 0; }

.bin-workspace { display: grid; grid-template-columns: minmax(270px, 330px) minmax(0, 1fr); gap: 16px; margin-top: 16px; align-items: start; }
.bin-group-sidebar { min-width: 0; overflow: hidden; }
.bin-group-create { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.bin-group-list { display: grid; gap: 8px; max-height: 720px; overflow: auto; padding-right: 2px; scrollbar-color: #48556a #10151d; }
.bin-group-item { display: grid; gap: 10px; min-width: 0; padding: 11px; border: 1px solid #2d3849; border-radius: 10px; background: #0c1118; cursor: pointer; transition: border-color .16s ease, background .16s ease; }
.bin-group-item:hover { border-color: #4a5870; background: #111925; }
.bin-group-item.active { border-color: #8493a9; background: #17202d; box-shadow: inset 3px 0 #dfe7f2; }
.bin-group-main { display: grid; gap: 4px; min-width: 0; }
.bin-group-main strong { overflow: hidden; color: #e5ebf3; text-overflow: ellipsis; white-space: nowrap; }
.bin-group-main span { color: var(--muted); font-size: 10px; }
.bin-group-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.danger { border-color: #7b3541; background: #3a1d24; color: #ffb5bf; }
.danger:hover:not(:disabled) { border-color: #a84b5b; background: #4b222c; }
.bin-results-panel { margin-top: 0; }
.bin-selection-bar { margin: 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.bin-selection-bar > strong { margin-right: auto; white-space: nowrap; }
.bin-selection-bar > select { flex: 1 1 190px; max-width: 310px; }
.bin-selection-bar > button { flex: 0 0 auto; }
.credential-selection-bar { margin: 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.credential-selection-bar > strong { margin-right: auto; white-space: nowrap; }
.credential-selection-bar > button { flex: 0 0 auto; }
.bin-paste-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: stretch; padding: 12px 14px; border-bottom: 1px solid var(--line); background: rgba(10, 15, 22, .62); }
.bin-paste-row textarea { min-height: 82px; resize: vertical; }
.bin-paste-row button { max-width: 220px; }
.bin-group-badges { display: flex; flex-wrap: wrap; gap: 5px; }
.bin-group-badges .badge { padding: 3px 7px; }

.group-list { display: grid; gap: 10px; margin-top: 7px; padding: 0; }
.group-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-width: 0;
  padding: 13px;
  border: 1px solid #2d3849;
  border-radius: 11px;
  background: #0c1118;
}
.group-main { display: grid; gap: 10px; min-width: 0; }
.group-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.group-title strong { min-width: 0; max-width: 100%; overflow: hidden; color: #e6ebf2; text-overflow: ellipsis; white-space: nowrap; }
.group-id { flex: 0 0 auto; color: var(--dim); font: 11px ui-monospace, Consolas, monospace; }
.group-title .status { flex: 0 0 auto; padding: 3px 7px; border: 1px solid #354156; border-radius: 999px; font-size: 10px; }
.group-stats { display: flex; flex-wrap: wrap; gap: 7px; }
.group-stats span { padding: 5px 8px; border: 1px solid #283342; border-radius: 7px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.group-stats b { color: #e1e7ef; font-size: 12px; }
.group-actions { display: grid; grid-template-columns: repeat(2, minmax(64px, 1fr)); gap: 7px; min-width: 142px; }
.group-actions button:disabled { cursor: default; opacity: .38; }
.group-actions button { width: 100%; white-space: nowrap; }
.group-actions .danger { border-color: #7b3541; background: #3a1d24; color: #ffb5bf; }
.group-actions .danger:hover { border-color: #a84b5b; background: #4b222c; }

.task-layout { grid-template-columns: minmax(470px, .92fr) minmax(560px, 1.08fr); }
.task-layout > * { min-width: 0; }
.task-layout #job-card-filter { grid-template-columns: minmax(0, 1fr) auto auto; }
.task-layout #cloud-job-filter { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.task-layout #cloud-job-filter > input[name="search"] { grid-column: 1 / -1; }
.task-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.task-form-grid .span-two { grid-column: 1 / -1; }
.planned-count-field { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.planned-count-field > span { grid-column: 1 / -1; }
.planned-count-field input { min-width: 0; }
.planned-count-field button { min-height: 42px; white-space: nowrap; letter-spacing: 0; }
.choice-toggle { display: flex; align-items: flex-start; gap: 9px; min-width: 0; line-height: 1.55; }
.choice-toggle input { flex: 0 0 auto; margin-top: 2px; }
.compact-choice { width: fit-content; margin: 8px 0; color: #c4cedb; font-size: 11px; }
.subheading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 3px; color: #b9c4d2; font-size: 11px; font-weight: 750; letter-spacing: .07em; }
.subheading small { color: var(--dim); font-size: 10px; font-weight: 500; letter-spacing: 0; text-align: right; }
.selection-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.choice-list { display: grid; gap: 0; min-height: 46px; padding: 5px; border: 1px solid #2d3849; border-radius: 10px; background: var(--surface-3); }
.choice-list:empty::after { content: "暂无可选记录"; padding: 10px; color: var(--dim); }
.choice-list label { display: flex; align-items: flex-start; gap: 9px; min-width: 0; padding: 8px 9px; border-radius: 7px; color: #b7c2d0; overflow-wrap: anywhere; }
.choice-list label:hover { background: #151d28; color: var(--text); }
.failure-status-panel{margin-top:18px}.failure-option-list{display:grid;gap:9px}.failure-option-row{display:grid;grid-template-columns:36px minmax(180px,1fr) auto auto;gap:10px;align-items:center;padding:10px;border:1px solid var(--line);border-radius:10px;background:#111821}.failure-option-order{color:var(--dim);font-size:11px;text-align:center}.failure-option-row .choice-toggle{white-space:nowrap}
.choice-list label input { flex: 0 0 auto; margin-top: 1px; }
.order-preview-heading { align-items: center; }
.order-preview-heading button { min-height: 32px; letter-spacing: 0; }
.job-card-order { max-height: 240px; }
.job-card-order-row { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 9px; align-items: center; padding: 8px 9px; border-bottom: 1px solid #27303d; color: #b7c2d0; }
.job-card-order-row:last-child { border-bottom: 0; }
.job-card-order-row b { display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid #46536a; border-radius: 50%; color: #e4eaf2; font-size: 11px; }
.job-card-order-row span { min-width: 0; overflow-wrap: anywhere; }
.search-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; }
.job-list { display: grid; gap: 10px; min-width: 0; }
.job-item { display: grid; gap: 12px; min-width: 0; padding: 14px; border: 1px solid #2d3849; border-radius: 11px; background: var(--surface-3); }
.job-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; min-width: 0; }
.job-heading > div { display: grid; gap: 3px; min-width: 0; }
.job-heading strong { min-width: 0; overflow: hidden; color: #e7ecf3; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.job-id { color: var(--dim); font: 10px ui-monospace, Consolas, monospace; letter-spacing: .06em; }
.job-heading > .status { flex: 0 0 auto; padding: 4px 8px; border: 1px solid #354156; border-radius: 999px; font-size: 10px; }
.job-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.job-meta > div { min-width: 0; padding: 9px 10px; border: 1px solid #273241; border-radius: 8px; background: #101721; }
.job-meta > div:last-child { grid-column: 1 / -1; }
.job-meta span { display: block; margin-bottom: 4px; color: var(--dim); font-size: 9px; font-weight: 750; letter-spacing: .08em; }
.job-meta b { display: block; color: #bdc7d4; font-size: 11px; font-weight: 600; overflow-wrap: anywhere; }
.job-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.site-list { gap: 8px; }
.site-item { display: grid; grid-template-columns: minmax(140px, .8fr) auto minmax(240px, 1.3fr); align-items: center; gap: 12px; min-width: 0; padding: 11px 12px; border: 1px solid #2b3544; border-radius: 9px; background: var(--surface-3); }
.site-item > div { display: grid; min-width: 0; }
.site-item strong { overflow: hidden; color: #dde4ed; text-overflow: ellipsis; white-space: nowrap; }
.site-item > div span { color: var(--dim); font: 10px ui-monospace, Consolas, monospace; }
.site-item code { min-width: 0; color: #aeb9c7; font-size: 11px; overflow-wrap: anywhere; }

.toast { position: fixed; top: 20px; right: 20px; z-index: 20; max-width: min(420px, calc(100vw - 40px)); padding: 12px 15px; border-radius: 10px; background: #edf1f6; color: #111721; box-shadow: var(--shadow); opacity: 0; transform: translateY(-8px); pointer-events: none; transition: .2s; }
.toast.show { opacity: 1; transform: none; }
.toast.error { background: #7f3030; color: #fff; }

@media (max-width: 1240px) {
  .filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .import-layout { grid-template-columns: 1fr; }
  .task-layout { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
}

@media (max-width: 1400px) and (min-width: 821px) {
  .task-layout { grid-template-columns: 1fr; }
}

@media (max-width: 1050px) {
  .grid { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
  .preview, .two { grid-template-columns: 1fr; }
  .quick-import-workspace { grid-template-columns: 1fr; }
  .card-group-library .group-list { grid-template-columns: 1fr; max-height: min(480px, 54vh); }
  .archived-group-list { grid-template-columns: 1fr; }
  .bin-workspace { grid-template-columns: 1fr; }
  .bin-group-list { max-height: 330px; }
  .details-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .history-item { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: sticky; z-index: 5; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 9px; overflow-x: auto; overflow-y: hidden; }
  .brand { display: none; }
  .sidebar nav { display: flex; width: max-content; }
  .nav { width: auto; min-width: 108px; text-align: center; }
  .nav.active { box-shadow: inset 0 -3px #dfe7f2; }
  .main { padding: 20px 12px 36px; }
  .header { align-items: flex-start; }
  .filter-toolbar > input:not([type="checkbox"]), .filter-toolbar > select { max-width: none; }
}

@media (max-width: 620px) {
  .card-collection-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .archived-group-fold > summary { flex-wrap: wrap; }
  .archived-group-fold > summary small { flex-basis: 100%; margin-left: 0; }
  .filter-grid { grid-template-columns: 1fr; }
  .grid, .details-grid, .form-grid { grid-template-columns: 1fr; }
  .import-toolbar { grid-template-columns: 1fr; }
  .import-group-link { width: 100%; }
  #card-preview { max-height: none; overflow: visible; }
  #card-import textarea, #card-full-prepare textarea { min-height: 220px; }
  .header h1 { font-size: 24px; }
  .toolbar { align-items: stretch; }
  .toolbar > input:not([type="checkbox"]), .toolbar > select, .toolbar > button { flex: 1 1 100%; max-width: none; }
  .action-toolbar > strong { min-height: 34px; }
  .group-item { grid-template-columns: 1fr; align-items: stretch; }
  .group-actions { grid-template-columns: repeat(4, minmax(0, 1fr)); min-width: 0; }
  .task-form-grid, .job-meta { grid-template-columns: 1fr; }
  .task-layout #cloud-job-filter { grid-template-columns: 1fr; }
  .task-form-grid .span-two, .job-meta > div:last-child { grid-column: auto; }
  .subheading, .job-heading { align-items: flex-start; flex-direction: column; }
  .subheading small { text-align: left; }
  .job-actions { justify-content: stretch; }
  .job-actions button { flex: 1 1 90px; }
  .site-item { grid-template-columns: 1fr; align-items: start; }
  .preview-row { grid-template-columns: 58px minmax(90px, auto) minmax(0, 1fr); font-size: 11px; }
  .history-item { grid-template-columns: 1fr; }
  .table-head { align-items: flex-start; flex-direction: column; }
  .bin-paste-row { grid-template-columns: 1fr; }
  .bin-paste-row button { max-width: none; }
}

@media (max-width: 430px) {
  .group-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .preview-row { grid-template-columns: 1fr; }
}
  .device-grid{grid-template-columns:repeat(auto-fit,minmax(360px,1fr))}.device-item .form-actions{margin-top:16px}.device-permissions{margin:16px 0 0;padding:12px;border:1px solid var(--line-soft);border-radius:10px}.device-permissions legend{padding:0 6px;color:var(--muted);font-size:12px}.device-permission-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:10px}.device-cloud-job-grid{grid-template-columns:1fr;max-height:240px;overflow:auto}.device-permission{display:flex;align-items:center;gap:7px;color:var(--text);font-size:12px}.device-permission input{width:16px;height:16px;flex:0 0 auto;accent-color:var(--accent)}.device-permission span{min-width:0}.device-permission b,.device-permission small{display:block;overflow-wrap:anywhere}.device-permission small{margin-top:2px;color:var(--dim);font-weight:400}.activation-code{display:block;margin:18px 0;padding:20px;border:1px solid var(--line);border-radius:12px;background:#080d14;color:#9fe6c3;font-size:24px;font-weight:800;letter-spacing:2px;text-align:center;user-select:all}

/* Cloud console information-architecture refresh. Existing controls and flows are unchanged. */
:root {
  --bg: #071019;
  --surface: #101b27;
  --surface-2: #152333;
  --surface-3: #0a1520;
  --line: #223448;
  --line-strong: #36506a;
  --text: #f3f7fb;
  --muted: #9babbc;
  --dim: #6f8195;
  --accent: #65d7c4;
  --accent-soft: rgba(101, 215, 196, .12);
  --accent-blue: #7fa8ff;
  --good: #73d6a0;
  --warn: #efbd68;
  --bad: #f28f98;
  --radius: 16px;
  --radius-small: 10px;
  --shadow: 0 18px 48px rgba(0, 7, 14, .2);
}

body {
  background:
    radial-gradient(circle at 86% 0%, rgba(59, 115, 155, .16), transparent 30%),
    radial-gradient(circle at 38% 100%, rgba(49, 130, 119, .08), transparent 32%),
    var(--bg);
}

button { border-color: #77dfce; background: var(--accent); color: #06251f; }
button:hover:not(:disabled) { border-color: #a0f0e3; background: #82e6d5; }
.secondary { border-color: var(--line-strong); background: #142334; color: #dce7f2; }
.secondary:hover:not(:disabled) { border-color: #54718f; background: #1a2d41; }
.danger { border-color: #7b3d4a; background: #3b202a; color: #ffc0c6; }

.app { grid-template-columns: 268px minmax(0, 1fr); }
.sidebar {
  display: flex;
  flex-direction: column;
  padding: 20px 14px 16px;
  border-right-color: rgba(74, 105, 135, .38);
  background: rgba(7, 16, 25, .94);
  box-shadow: 18px 0 50px rgba(0, 5, 11, .18);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 5px 20px;
  padding: 3px 7px 20px;
  border-bottom-color: rgba(74, 105, 135, .3);
  letter-spacing: 0;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(101, 215, 196, .55);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(101, 215, 196, .22), rgba(69, 126, 171, .12));
  color: #a9f1e5;
  font-size: 17px;
  font-weight: 850;
  box-shadow: inset 0 0 18px rgba(101, 215, 196, .08);
}
.brand-copy { min-width: 0; }
.brand-copy strong { font-size: 15px; letter-spacing: .04em; }
.brand-copy small { margin-top: 3px; color: var(--dim); font-size: 9px; letter-spacing: .17em; }
#navigation { display: grid; gap: 18px; }
.nav-section { display: grid; gap: 3px; }
.nav-label { padding: 0 12px 6px; color: #60758a; font-size: 9px; font-weight: 800; letter-spacing: .16em; }
.nav {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 43px;
  margin: 0;
  padding: 6px 10px;
  border-radius: 11px;
  color: #9fb0c1;
  font-weight: 650;
}
.nav-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid #263b50;
  border-radius: 8px;
  background: #0c1824;
  color: #7890a7;
  font-size: 10px;
  font-weight: 800;
}
.nav:hover:not(:disabled) { border-color: transparent; background: rgba(36, 57, 77, .54); color: #edf5fb; }
.nav.active {
  border-color: rgba(101, 215, 196, .24);
  background: linear-gradient(90deg, rgba(101, 215, 196, .16), rgba(39, 73, 102, .2));
  color: #effffc;
  box-shadow: inset 3px 0 var(--accent);
}
.nav.active .nav-icon { border-color: rgba(101, 215, 196, .48); background: rgba(101, 215, 196, .13); color: #a5eee2; }
.sidebar-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding: 18px 12px 4px; color: #71859a; font-size: 10px; }
.health-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 4px rgba(115, 214, 160, .1); }

.main { max-width: none; padding: 0 clamp(20px, 3vw, 44px) 56px; }
.header {
  position: sticky;
  top: 0;
  z-index: 4;
  align-items: center;
  min-height: 116px;
  padding: 24px 0 20px;
  border-bottom-color: rgba(64, 91, 117, .42);
  background: linear-gradient(180deg, rgba(7, 16, 25, .98) 72%, rgba(7, 16, 25, .82));
  backdrop-filter: blur(16px);
}
.page-heading { min-width: 0; }
.header h1 { margin-top: 5px; font-size: clamp(25px, 2.2vw, 34px); font-weight: 760; }
.header p { max-width: 760px; margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.eyebrow { color: #668197; letter-spacing: .18em; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.session-badge { display: inline-flex; align-items: center; gap: 9px; min-height: 34px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px; color: #9eb0c1; font-size: 11px; white-space: nowrap; }
#content { padding-top: 4px; }

.panel, .card, .table-panel, .details {
  border-color: rgba(55, 80, 105, .72);
  background: linear-gradient(150deg, rgba(16, 29, 42, .98), rgba(10, 21, 32, .98));
  box-shadow: var(--shadow);
}
.bar {
  min-height: 50px;
  padding: 13px 17px;
  border-bottom-color: rgba(55, 80, 105, .62);
  color: #dbe5ee;
  font-size: 12px;
  letter-spacing: .045em;
}
.bar small { color: #6f879d; }
.panel-body { gap: 13px; padding: 18px; }
.grid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-top: 20px; }
.card { position: relative; min-height: 128px; padding: 19px; overflow: hidden; }
.card::after { content: ""; position: absolute; top: 0; right: 0; width: 72px; height: 72px; background: radial-gradient(circle at 100% 0%, rgba(101, 215, 196, .13), transparent 68%); pointer-events: none; }
.card .number { margin: 12px 0 4px; color: #f7fbff; font-size: 32px; }
.two, .preview { gap: 18px; margin-top: 20px; }

.toolbar {
  gap: 10px;
  margin-top: 18px;
  padding: 14px;
  border-color: rgba(55, 80, 105, .72);
  background: rgba(13, 25, 37, .94);
  box-shadow: 0 12px 32px rgba(0, 6, 13, .13);
}
.filter-toolbar { border-color: #35516a; }
.action-toolbar { border-color: rgba(101, 215, 196, .42); background: linear-gradient(90deg, rgba(101, 215, 196, .07), rgba(13, 25, 37, .94) 28%); }
input:not([type="checkbox"]):not([type="radio"]), select, textarea { border-color: #30485f; background-color: #091521; }
input:not([type="checkbox"]):not([type="radio"]):focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(101, 215, 196, .12); }

.table-panel { margin-top: 16px; }
.table-head { min-height: 55px; padding: 15px 18px; border-bottom-color: rgba(55, 80, 105, .65); }
.table-head strong { color: #e8f0f7; font-size: 13px; }
.table-wrap { background: rgba(7, 15, 23, .28); }
th, td { padding: 12px 13px; border-bottom-color: rgba(43, 61, 80, .68); }
th { background: #0a1722; color: #90a4b7; font-size: 10px; letter-spacing: .045em; text-transform: uppercase; }
tbody tr:nth-child(even) { background: rgba(31, 51, 69, .1); }
tbody tr:hover { background: rgba(101, 215, 196, .055); }
.pager { justify-content: flex-end; border-top: 1px solid rgba(43, 61, 80, .55); }
.definition { border-color: #294056; background: #091520; }
.badge { border-color: #38536c; background: #122334; }
.status::before { box-shadow: 0 0 0 3px rgba(120, 133, 150, .08); }
.status.resolved::before, .status.active::before, .status.available::before, .status.valid::before, .status.completed::before { box-shadow: 0 0 0 3px rgba(115, 214, 160, .1); }
.empty { border-color: #365069; background: rgba(10, 23, 34, .72); }
.toast { border: 1px solid #8fe6d7; background: #dffaf5; color: #082820; }

@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: block; padding: 9px 10px; }
  #navigation { display: flex; width: max-content; gap: 6px; }
  .nav-section { display: flex; gap: 4px; }
  .nav-label, .sidebar-foot { display: none; }
  .nav { grid-template-columns: 24px auto; width: auto; min-width: max-content; padding: 5px 9px; }
  .nav-icon { width: 24px; height: 24px; }
  .nav.active { box-shadow: inset 0 -3px var(--accent); }
  .main { padding: 0 12px 38px; }
  .header { position: relative; min-height: 104px; padding-top: 18px; }
  .session-badge { display: none; }
}

@media (max-width: 620px) {
  #content > * { max-width: calc(100vw - 24px); }
  .grid { width: calc(100vw - 24px); grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .header { align-items: flex-start; }
  .header p { max-width: 250px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { min-height: 112px; padding: 15px; }
  .card .number { font-size: 27px; }
}

@media (max-width: 430px) {
  .grid { grid-template-columns: 1fr; }
  .header-actions { align-self: flex-start; }
}

/* Dual-theme console skin: warm white/orange daylight + deep-sea night. */
:root,
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f5f7;
  --canvas-glow: rgba(242, 105, 33, .1);
  --surface: #ffffff;
  --surface-2: #fff8f3;
  --surface-3: #fafbfc;
  --sidebar: rgba(255, 252, 249, .96);
  --header: rgba(244, 245, 247, .94);
  --line: #e3e6ea;
  --line-strong: #c8ced6;
  --text: #1b2028;
  --muted: #69717d;
  --dim: #8a929e;
  --accent: #f36b21;
  --accent-hover: #dd5813;
  --accent-soft: rgba(243, 107, 33, .1);
  --accent-border: rgba(243, 107, 33, .32);
  --accent-contrast: #ffffff;
  --good: #138b61;
  --warn: #b56b08;
  --bad: #c5444d;
  --shadow: 0 14px 36px rgba(54, 47, 42, .08);
  --shadow-raised: 0 18px 46px rgba(54, 47, 42, .12);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #06111b;
  --canvas-glow: rgba(48, 142, 158, .15);
  --surface: #0d1b28;
  --surface-2: #122433;
  --surface-3: #081722;
  --sidebar: rgba(5, 17, 27, .96);
  --header: rgba(6, 17, 27, .94);
  --line: #20384a;
  --line-strong: #38566b;
  --text: #edf6fa;
  --muted: #9aafbc;
  --dim: #6d8797;
  --accent: #58d4c5;
  --accent-hover: #75e2d5;
  --accent-soft: rgba(88, 212, 197, .11);
  --accent-border: rgba(88, 212, 197, .3);
  --accent-contrast: #062a25;
  --good: #68d3a0;
  --warn: #e8af55;
  --bad: #ef8790;
  --shadow: 0 16px 42px rgba(0, 5, 10, .22);
  --shadow-raised: 0 22px 56px rgba(0, 5, 10, .34);
}

html, body { background-color: var(--bg); }
body {
  background:
    radial-gradient(circle at 88% -8%, var(--canvas-glow), transparent 32%),
    radial-gradient(circle at 10% 105%, color-mix(in srgb, var(--accent) 5%, transparent), transparent 28%),
    var(--bg);
  color: var(--text);
}

button {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-contrast);
  box-shadow: none;
}
button:hover:not(:disabled) { border-color: var(--accent-hover); background: var(--accent-hover); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 28%, transparent);
  outline-offset: 2px;
}
.secondary { border-color: var(--line-strong); background: var(--surface-2); color: var(--text); }
.secondary:hover:not(:disabled) { border-color: color-mix(in srgb, var(--accent) 48%, var(--line-strong)); background: var(--accent-soft); }
.danger { border-color: color-mix(in srgb, var(--bad) 58%, var(--line)); background: color-mix(in srgb, var(--bad) 12%, var(--surface)); color: var(--bad); }
.danger:hover:not(:disabled) { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 18%, var(--surface)); }

input:not([type="checkbox"]):not([type="radio"]), select, textarea {
  border-color: var(--line-strong);
  background-color: var(--surface-3);
  color: var(--text);
}
input::placeholder, textarea::placeholder { color: var(--dim); }
input:not([type="checkbox"]):not([type="radio"]):hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--accent) 46%, var(--line-strong)); }
input:not([type="checkbox"]):not([type="radio"]):focus, select:focus, textarea:focus {
  border-color: var(--accent);
  background-color: var(--surface);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 13%, transparent);
}
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }
select option { background: var(--surface); color: var(--text); }
label, .muted, .notice { color: var(--muted); }
.field > span { color: var(--muted); }

.login-shell { max-width: 480px; margin: max(8vh, 48px) auto; }
.login-topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.login-brand { margin: 0; border-left-color: var(--accent); }
.login-panel { box-shadow: var(--shadow-raised); }
.login-panel .bar { color: var(--text); }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 82px;
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--muted);
  white-space: nowrap;
}
.theme-toggle:hover:not(:disabled) { border-color: var(--accent-border); background: var(--accent-soft); color: var(--text); }
.theme-toggle svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.theme-toggle-label { font-size: 11px; }
html[data-theme="light"] .theme-icon-sun { display: none; }
html[data-theme="dark"] .theme-icon-moon { display: none; }

.sidebar { border-right-color: var(--line); background: var(--sidebar); box-shadow: 18px 0 48px color-mix(in srgb, var(--text) 6%, transparent); }
.brand { border-bottom-color: var(--line); }
.brand-mark { border-color: var(--accent-border); background: var(--accent-soft); color: var(--accent); }
.brand-mark svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.brand-copy strong { color: var(--text); }
.brand-copy small, .nav-label, .sidebar-foot { color: var(--dim); }
.nav { color: var(--muted); }
.nav-icon { border-color: var(--line); background: var(--surface-3); color: var(--dim); }
.nav-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.nav:hover:not(:disabled) { border-color: transparent; background: var(--accent-soft); color: var(--text); }
.nav.active { border-color: var(--accent-border); background: linear-gradient(90deg, var(--accent-soft), color-mix(in srgb, var(--accent) 3%, transparent)); color: var(--text); box-shadow: inset 3px 0 var(--accent); }
.nav.active .nav-icon { border-color: var(--accent-border); background: var(--accent-soft); color: var(--accent); }

.header { border-bottom-color: var(--line); background: linear-gradient(180deg, var(--header) 72%, color-mix(in srgb, var(--header) 82%, transparent)); }
.header h1 { margin-top: 0; color: var(--text); }
.header p { color: var(--muted); }
.session-badge { border-color: var(--line); color: var(--muted); background: color-mix(in srgb, var(--surface) 72%, transparent); }

.panel, .card, .table-panel, .details {
  border-color: var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.bar { border-bottom-color: var(--line); color: var(--text); background: color-mix(in srgb, var(--surface-2) 62%, var(--surface)); }
.bar small { color: var(--dim); }
.card { color: var(--muted); }
.card::after { background: radial-gradient(circle at 100% 0%, var(--accent-soft), transparent 68%); }
.card .number { color: var(--text); }
.toolbar { border-color: var(--line); background: var(--surface); box-shadow: var(--shadow); }
.filter-toolbar { border-color: color-mix(in srgb, var(--accent) 28%, var(--line)); }
.action-toolbar { border-color: var(--accent-border); background: linear-gradient(90deg, var(--accent-soft), var(--surface) 28%); }

.table-head { border-bottom-color: var(--line); }
.table-head strong { color: var(--text); }
.table-wrap { background: var(--surface); scrollbar-color: var(--line-strong) var(--surface-3); }
th, td { border-bottom-color: var(--line); }
th { background: var(--surface-2); color: var(--muted); }
tbody tr:nth-child(even) { background: color-mix(in srgb, var(--surface-2) 48%, transparent); }
tbody tr:hover { background: var(--accent-soft); }
.pager { border-top-color: var(--line); }
.definition, .job-item, .job-meta > div, .site-item, .failure-option-row, .choice-list label, .activation-code {
  border-color: var(--line);
  background: var(--surface-3);
}
.definition span, .job-meta span, .job-id, .failure-option-order { color: var(--dim); }
.job-heading strong, .job-meta b, .site-item strong, .empty strong { color: var(--text); }
.site-item > div span, .site-item code { color: var(--muted); }
.choice-list label:hover { background: var(--accent-soft); color: var(--text); }
.job-card-order-row { border-bottom-color: var(--line); color: var(--muted); }
.job-card-order-row b { border-color: var(--line-strong); color: var(--text); }
.badge { border-color: var(--line-strong); background: var(--surface-2); color: var(--muted); }
.empty { border-color: var(--line-strong); background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.toast { border: 1px solid var(--accent-border); background: var(--surface); color: var(--text); box-shadow: var(--shadow-raised); }
.toast.error { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 18%, var(--surface)); color: var(--bad); }
.activation-code { color: var(--good); }
.terminal { background: var(--surface-3); color: var(--text); }
.bin-group-item, .group-item, .job-card-manager .choice-list, .bin-paste-row, .preview-row {
  border-color: var(--line);
  background: var(--surface-3);
}
.bin-group-item:hover { border-color: var(--accent-border); background: var(--accent-soft); }
.bin-group-item.active { border-color: var(--accent-border); background: var(--accent-soft); box-shadow: inset 3px 0 var(--accent); }
.bin-group-main strong, .group-title strong, .group-stats b, .preview-row code, .choice-list label, .compact-choice, .subheading, .job-heading strong, .job-meta b { color: var(--text); }
.group-stats span, .group-title .status { border-color: var(--line); }
.cloud-job-dialog, .dialog-head, .dialog-section { border-color: var(--line); background: var(--surface); }
.dialog-list li, .preview-row { border-bottom-color: var(--line); }

.import-workspace { display: grid; gap: 12px; min-width: 0; }
.import-mode-switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 7px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-3); }
.import-mode-switch button { display: grid; gap: 4px; min-width: 0; border-color: transparent; background: transparent; color: var(--muted); text-align: left; }
.import-mode-switch button:hover:not(:disabled) { border-color: var(--line-strong); background: var(--surface-2); color: var(--text); transform: none; }
.import-mode-switch button[aria-selected="true"] { border-color: var(--accent-border); background: var(--accent-soft); color: var(--text); box-shadow: 0 8px 22px color-mix(in srgb, var(--text) 7%, transparent); }
.import-mode-switch button span { color: var(--dim); font-size: 10px; font-weight: 500; }
.full-import-batches { margin-top: 16px; }
.full-import-batch-controls { display: grid; grid-template-columns: minmax(150px, .7fr) minmax(260px, 1.5fr) auto; gap: 9px; }
.full-import-batch-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-top: 4px; }
.full-import-batch-heading > div { display: grid; gap: 4px; min-width: 0; }
.full-import-batch-heading strong { color: var(--text); overflow-wrap: anywhere; }
.full-import-batch-heading span { color: var(--muted); font-size: 11px; }
.full-import-completion { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--radius-small); background: var(--surface-3); color: var(--muted); }
.full-import-completion strong { color: var(--text); }
.full-import-completion.success { border-color: color-mix(in srgb, var(--good) 48%, var(--line)); background: color-mix(in srgb, var(--good) 8%, var(--surface-3)); }
.full-import-completion.pending { border-color: color-mix(in srgb, var(--warn) 42%, var(--line)); }
.full-import-filter > input:not([type="checkbox"]), .full-import-filter > select { min-width: 132px; }
.full-import-actions > label { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding-inline: 6px; white-space: nowrap; }
.full-import-actions #card-full-selection-note { flex: 1 1 100%; line-height: 1.6; white-space: normal; }
#card-full-workspace { width: 100%; min-width: 0; max-width: 100%; }
#card-full-workspace > *, #card-full-workspace .table-panel { min-width: 0; max-width: 100%; }
#card-full-workspace .table-wrap { width: 100%; max-width: 100%; overflow-x: auto; }
#card-full-workspace table { min-width: 1180px; }
#card-full-workspace td:nth-child(9), #card-full-workspace td:nth-child(12) { max-width: 260px; white-space: normal; overflow-wrap: anywhere; }
.status.pending::before, .status.open::before, .status.unqueried::before { background: var(--warn); }
.status.imported::before, .status.completed::before { background: var(--good); }
.status.invalid::before { background: var(--bad); }

@media (max-width: 1320px) {
  .import-layout { grid-template-columns: 1fr; }
  .account-check-metrics { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .maintenance-insight-layout { grid-template-columns: 1fr; }
  .maintenance-lease-lookup { display: grid; grid-template-columns: minmax(180px,1fr) auto; align-items: end; gap: 9px; }
  .maintenance-lease-lookup button { width: auto; margin: 0; }
  .maintenance-lease-lookup small { grid-column: 1 / -1; margin: 0; }
}

.dashboard-filter-panel { margin-bottom: 14px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface-2); box-shadow: 0 10px 28px rgba(0,0,0,.12); }
.dashboard-section-nav { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 5px; margin: 0; border: 1px solid var(--line); border-radius: 13px; padding: 5px; background: var(--surface-2); }
.dashboard-section-nav button { display: flex; min-width: 0; min-height: 52px; align-items: center; justify-content: space-between; gap: 9px; border-color: transparent; border-radius: 9px; padding: 7px 10px; background: transparent; color: var(--muted); text-align: left; box-shadow: none; }
.dashboard-section-nav button:hover:not(:disabled) { transform: none; border-color: var(--line); background: var(--surface-3); color: var(--text); }
.dashboard-section-nav button.active { border-color: var(--accent-border); background: var(--accent-soft); color: var(--text); }
.dashboard-section-nav button span,.dashboard-section-nav button strong,.dashboard-section-nav button small { display: block; min-width: 0; }
.dashboard-section-nav button strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-section-nav button small { overflow: hidden; margin-top: 2px; color: var(--dim); font-size: 8px; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-section-nav button b { min-width: 0; max-width: 48%; flex: 0 1 auto; overflow: hidden; color: var(--dim); font-size: 9px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-section-nav button.active b { color: var(--accent); }
.dashboard-section-panel { margin-top: 17px; }
.dashboard-section-panel[hidden] { display: none !important; }
.dashboard-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin: 0 2px 10px; }
.dashboard-section-heading > div { min-width: 0; }
.dashboard-section-heading span { color: var(--accent); font-size: 8px; font-weight: 850; letter-spacing: .16em; }
.dashboard-section-heading h2 { margin: 3px 0 0; color: var(--text); font-size: 17px; }
.dashboard-section-heading p { max-width: 660px; margin: 0; color: var(--dim); font-size: 10px; line-height: 1.5; text-align: right; }
.dashboard-section-overview .dashboard-triage,.dashboard-section-devices .device-work-section { margin-top: 0; }
.dashboard-section-overview .dashboard-kpi { background: var(--surface); box-shadow: none; }
.dashboard-section-analytics .dashboard-panel-grid { grid-template-rows: repeat(2,minmax(210px,auto)); }
.dashboard-section-delivery .account-delivery-panel { margin-top: 0; }
.dashboard-section-events .dashboard-events .terminal { max-height: min(62vh,640px); }
.dashboard-date-filter { display: grid; grid-template-columns: minmax(170px,.68fr) auto minmax(400px,1fr); align-items: center; gap: 10px 12px; min-height: 70px; padding: 11px 13px; }
.dashboard-filter-heading { display: flex; min-width: 150px; align-items: center; gap: 10px; }
.dashboard-filter-heading > span:last-child, .dashboard-range-summary > span:last-child { min-width: 0; }
.dashboard-filter-heading strong, .dashboard-filter-heading small, .dashboard-range-summary strong, .dashboard-range-summary small { display: block; }
.dashboard-filter-heading strong { color: var(--text); font-size: 12px; }
.dashboard-filter-heading small, .dashboard-range-summary small { margin-top: 2px; color: var(--dim); font-size: 9px; line-height: 1.35; }
.dashboard-filter-icon { display: grid; flex: 0 0 auto; width: 34px; height: 34px; place-content: center; border: 1px solid var(--accent-border); border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.dashboard-filter-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dashboard-scope-switch { display: inline-grid; grid-template-columns: repeat(2,auto); gap: 3px; border: 1px solid var(--line); border-radius: 10px; padding: 3px; background: var(--surface-3); }
.dashboard-scope-switch button { min-height: 31px; border: 0; border-radius: 7px; padding: 5px 10px; background: transparent; color: var(--muted); font-size: 10px; box-shadow: none; white-space: nowrap; }
.dashboard-scope-switch button:hover:not(:disabled) { transform: none; background: var(--accent-soft); color: var(--text); }
.dashboard-scope-switch button.active { background: var(--accent); color: var(--accent-contrast); }
.dashboard-business-fields { display: grid; grid-template-columns: minmax(120px,1fr) minmax(88px,.55fr) minmax(120px,1fr); gap: 7px; min-width: 0; }
.dashboard-business-fields label { display: grid; gap: 4px; min-width: 0; color: var(--muted); font-size: 9px; font-weight: 700; }
.dashboard-business-fields select { width: 100%; min-width: 0; min-height: 33px; padding-block: 5px; text-overflow: ellipsis; }
.dashboard-range-fields { display: grid; grid-column: 1 / 3; grid-template-columns: minmax(125px,1fr) auto minmax(125px,1fr) auto; align-items: end; gap: 7px; min-width: 0; border-top: 1px solid var(--line); padding-top: 9px; }
.dashboard-range-fields label { display: grid; gap: 4px; min-width: 0; color: var(--muted); font-size: 9px; font-weight: 700; }
.dashboard-range-fields input { width: 100%; min-width: 0; min-height: 33px; padding-block: 5px; font-variant-numeric: tabular-nums; }
.dashboard-range-fields button { min-height: 33px; white-space: nowrap; }
.dashboard-range-arrow { align-self: end; min-height: 33px; color: var(--dim); line-height: 33px; }
.dashboard-range-summary { display: flex; min-width: 0; align-self: stretch; align-items: center; gap: 9px; border-top: 1px solid var(--line); padding-top: 9px; }
.dashboard-range-summary strong { overflow: hidden; color: var(--text); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.range-status-dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 4px color-mix(in srgb,var(--good) 14%,transparent); }
.dashboard-metrics { grid-template-columns: repeat(4,minmax(112px,1fr)); gap: 10px; margin-top: 14px; }
.dashboard-metrics .card { min-height: 88px; padding: 13px 14px; font-size: 12px; }
.dashboard-metrics .card .number { margin: 7px 0 3px; font-size: 25px; }
.dashboard-metrics .card .muted { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.device-work-section { display: grid; gap: 11px; margin-top: 18px; }
.device-work-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding-inline: 2px; }
.device-work-heading > div { min-width: 0; }
.device-work-heading > div > span { color: var(--accent); font-size: 9px; font-weight: 850; letter-spacing: .14em; }
.device-work-heading h2 { margin: 4px 0 3px; color: var(--text); font-size: 17px; }
.device-work-heading p, .device-work-coverage-note, .device-work-comparison-note { margin: 0; color: var(--dim); font-size: 10px; line-height: 1.55; }
.device-work-filter-chip { flex: 0 0 auto; border: 1px solid var(--accent-border); border-radius: 999px; padding: 5px 9px; background: var(--accent-soft); color: var(--text); font-size: 9px; font-weight: 750; }
.device-work-card-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; }
.device-work-card { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px 12px; min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; background: linear-gradient(145deg,var(--surface-2),var(--surface-3)); box-shadow: 0 8px 24px color-mix(in srgb,var(--text) 5%,transparent); }
.device-work-card > div:first-child > span, .device-work-card > div:first-child > strong { display: block; }
.device-work-card > div:first-child > span { color: var(--accent); font-size: 8px; font-weight: 800; letter-spacing: .1em; }
.device-work-card > div:first-child > strong { margin-top: 3px; color: var(--text); font-size: 12px; }
.device-work-counts { display: flex; gap: 12px; text-align: right; }
.device-work-counts b { color: var(--text); font-size: 18px; font-variant-numeric: tabular-nums; }
.device-work-counts small { display: block; margin-top: 1px; color: var(--dim); font-size: 8px; font-weight: 600; }
.device-work-card p { grid-column: 1 / -1; min-height: 16px; margin: 0; overflow: hidden; color: var(--muted); font-size: 9px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.device-work-card footer { display: flex; grid-column: 1 / -1; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); padding-top: 7px; color: var(--dim); font-size: 8px; }
.device-work-card.unsupported { grid-template-columns: 1fr; opacity: .72; border-style: dashed; box-shadow: none; }
.device-work-card .device-work-unavailable { min-height: 26px; color: var(--muted); font-weight: 750; white-space: normal; }
.device-work-card.unsupported footer span { overflow-wrap: anywhere; }
.device-work-coverage-note { border-left: 2px solid var(--accent-border); padding-left: 9px; }
.device-work-comparison { min-width: 0; overflow: hidden; }
.device-work-comparison-bar { display: flex; min-height: 54px; align-items: center; justify-content: space-between; gap: 14px; }
.device-work-comparison-bar > span { min-width: 0; }
.device-work-comparison-bar > span small { display: block; margin-top: 2px; }
.device-work-tabs { display: inline-flex; flex: 0 0 auto; gap: 2px; border: 1px solid var(--line); border-radius: 9px; padding: 2px; background: var(--surface-3); }
.device-work-tabs button, .device-work-sort button { min-height: 28px; border: 0; border-radius: 6px; padding: 4px 8px; background: transparent; color: var(--muted); font-size: 9px; box-shadow: none; white-space: nowrap; }
.device-work-tabs button:hover:not(:disabled), .device-work-sort button:hover:not(:disabled) { transform: none; background: var(--accent-soft); color: var(--text); }
.device-work-tabs button.active { background: var(--accent); color: var(--accent-contrast); }
.device-work-sort { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; border-bottom: 1px solid var(--line); padding: 6px 12px; background: var(--surface-3); }
.device-work-sort > span { margin-right: 4px; color: var(--dim); font-size: 9px; }
.device-work-sort button.active { color: var(--accent); font-weight: 800; }
.device-work-table-wrap { max-height: 420px; scrollbar-gutter: stable; }
.device-work-table { min-width: 860px; table-layout: fixed; }
.device-work-table th:nth-child(1) { width: 17%; }
.device-work-table th:nth-child(2) { width: 8%; }
.device-work-table th:nth-child(3) { width: 31%; }
.device-work-table th:nth-child(4) { width: 11%; }
.device-work-table th:nth-child(5), .device-work-table th:nth-child(6) { width: 9%; }
.device-work-table th:nth-child(7) { width: 15%; }
.device-work-table th, .device-work-table td { padding: 8px 11px; }
.device-work-table td { color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.device-work-table td:first-child > small { display: block; margin-top: 2px; color: var(--dim); font-size: 8px; }
.device-work-name { display: flex; min-width: 0; align-items: center; gap: 6px; }
.device-work-name strong { overflow: hidden; color: var(--text); text-overflow: ellipsis; white-space: nowrap; }
.device-work-name em, .small-sample { display: inline-block; flex: 0 0 auto; border-radius: 999px; padding: 2px 5px; background: var(--accent-soft); color: var(--accent); font-size: 7px; font-style: normal; font-weight: 800; }
.small-sample { display: block; width: max-content; margin-top: 3px; color: var(--warn); }
.device-work-table tr.selected-device td { background: color-mix(in srgb,var(--accent) 8%,var(--surface)); }
.device-work-table tr.selected-device td:first-child { box-shadow: inset 3px 0 var(--accent); }
.device-work-table tr.unsupported td { color: var(--dim); }
.device-work-rate { color: var(--good); }
.device-work-anomaly { color: var(--bad) !important; font-weight: 800; }
.device-work-scope-note { white-space: normal; overflow-wrap: anywhere; }
.device-work-comparison-note { border-top: 1px solid var(--line); padding: 8px 12px 10px; }
@media (max-width: 1320px) { .device-work-card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
.dashboard-recent-results { margin-top: 14px; overflow: hidden; }
.dashboard-recent-results > .bar { min-height: 48px; gap: 14px; }
.dashboard-recent-results > .bar > span { min-width: 0; }
.dashboard-recent-results > .bar > span > small { display: block; margin-top: 2px; }
.dashboard-recent-results > .bar > small { flex: 0 0 auto; text-align: right; }
.dashboard-result-list { display: grid; gap: 6px; padding: 11px 13px 13px; }
.dashboard-result-row { display: grid; grid-template-columns: 44px minmax(0,1fr) auto; width: 100%; min-height: 64px; align-items: center; gap: 10px; border-color: var(--line); border-radius: 10px; padding: 8px 10px; background: var(--surface-3); color: var(--text); text-align: left; box-shadow: none; }
.dashboard-result-row:hover:not(:disabled) { transform: none; border-color: var(--line-strong); background: var(--surface-2); }
.dashboard-result-status { display: grid; min-height: 26px; place-content: center; border: 1px solid color-mix(in srgb,var(--good) 38%,var(--line)); border-radius: 8px; background: color-mix(in srgb,var(--good) 10%,var(--surface-2)); color: var(--good); font-size: 10px; font-weight: 800; }
.dashboard-result-row.failure .dashboard-result-status { border-color: color-mix(in srgb,var(--bad) 38%,var(--line)); background: color-mix(in srgb,var(--bad) 10%,var(--surface-2)); color: var(--bad); }
.dashboard-result-main { min-width: 0; }
.dashboard-result-main strong, .dashboard-result-main small, .dashboard-result-main em { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-result-main strong { font-size: 11px; }
.dashboard-result-main small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.dashboard-result-main em { margin-top: 3px; color: var(--dim); font-size: 9px; font-style: normal; }
.dashboard-result-row time { align-self: start; padding-top: 1px; color: var(--dim); font-size: 9px; white-space: nowrap; }
.dashboard-result-empty { display: grid; min-height: 64px; place-content: center; border: 1px dashed var(--line); border-radius: 10px; color: var(--dim); font-size: 10px; }
.dashboard-workbench { display: grid; grid-template-columns: minmax(0,2fr) minmax(360px,.72fr); align-items: stretch; gap: 16px; margin-top: 16px; }
.dashboard-panel-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); grid-template-rows: repeat(2,minmax(210px,1fr)); grid-auto-rows: max-content; gap: 14px; min-width: 0; }
.chart-panel { min-width: 0; overflow: hidden; }
.chart-panel .bar, .dashboard-control-bar { min-height: 48px; gap: 10px; }
.dashboard-result-bar > span > small { display: block; margin-top: 2px; }
.dashboard-result-controls { display: flex; min-width: 0; align-items: center; gap: 7px; }
.dashboard-result-controls label { display: flex; min-width: 0; align-items: center; gap: 5px; color: var(--dim); font-size: 9px; font-weight: 700; }
.dashboard-result-controls select { width: min(154px,22vw); min-width: 96px; min-height: 31px; padding-block: 4px; text-overflow: ellipsis; }
.chart-panel .bar > span { min-width: 0; }
.chart-panel .bar > span > small { display: block; margin-top: 2px; }
.chart-body { min-width: 0; padding: 11px 14px 12px; }
.compact-chart-body { max-height: 520px; overflow-y: auto; padding-top: 9px; scrollbar-gutter: stable; }
.donut-layout { display: grid; grid-template-columns: minmax(120px,.74fr) minmax(145px,1.26fr); align-items: center; gap: 12px; }
.donut-chart { position: relative; width: min(142px,100%); margin: auto; aspect-ratio: 1; }
.donut-chart svg { display: block; width: 100%; height: 100%; }
.chart-track, .chart-segment { fill: none; stroke-width: 12; }
.chart-track { stroke: var(--line); }
.chart-segment { stroke-linecap: butt; }
.donut-center { position: absolute; inset: 27%; display: grid; place-content: center; text-align: center; }
.donut-center strong { color: var(--text); font-size: 20px; line-height: 1; }
.donut-center span { margin-top: 6px; color: var(--muted); font-size: 10px; }
.chart-legend { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.chart-legend li { display: grid; grid-template-columns: 9px minmax(0,1fr) auto 34px; align-items: center; gap: 8px; min-width: 0; color: var(--muted); font-size: 11px; }
.chart-legend li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chart-legend li b { color: var(--text); }
.chart-legend li small { color: var(--dim); text-align: right; }
.chart-swatch { width: 8px; height: 8px; border-radius: 50%; }
.chart-footnote { margin-top: 7px; color: var(--dim); font-size: 10px; text-align: center; }
.chart-empty { display: grid; min-height: 145px; place-content: center; color: var(--muted); text-align: center; }
.rate-chart, .bin-chart { display: block; width: 100%; height: auto; overflow: visible; }
.bin-track { fill: var(--surface-2); stroke: var(--line); stroke-width: 1; }
.rate-guide { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 5; }
.rate-line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.rate-point { fill: var(--surface); stroke: var(--accent); stroke-width: 2.5; }
.rate-value, .rate-day, .rate-sample, .bin-label, .bin-count { font-family: "Segoe UI","Microsoft YaHei",sans-serif; }
.rate-value { fill: var(--text); font-size: 10px; font-weight: 750; }
.rate-day, .rate-sample { fill: var(--muted); font-size: 9px; }
.bin-label { fill: var(--text); font-size: 11px; font-family: ui-monospace,Consolas,monospace; }
.bin-count { fill: var(--muted); font-size: 11px; font-weight: 700; }
.dashboard-control-bar { display: flex; align-items: center; justify-content: space-between; }
.dashboard-bin-decision { grid-column: 1 / -1; min-width: 0; overflow: hidden; }
.dashboard-bin-decision-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.dashboard-bin-category-tabs { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 14px 11px; border-bottom: 1px solid var(--line); }
.dashboard-bin-category-tabs button { display: inline-flex; align-items: center; gap: 4px; }
.dashboard-bin-category-tabs button span { color: var(--dim); font-size: 9px; }
.dashboard-bin-category-tabs button.active { border-color: var(--accent-border); background: var(--accent-soft); color: var(--text); }
.dashboard-bin-decision-table-wrap { max-height: 390px; overflow: auto; scrollbar-gutter: stable; }
.dashboard-bin-decision-table { min-width: 720px; table-layout: fixed; }
.dashboard-bin-decision-table th:nth-child(1) { width: 25%; }
.dashboard-bin-decision-table th:nth-child(2) { width: 15%; }
.dashboard-bin-decision-table th:nth-child(3) { width: 18%; }
.dashboard-bin-decision-table th:nth-child(4) { width: 22%; }
.dashboard-bin-decision-table th:nth-child(5) { width: 20%; }
.dashboard-bin-decision-table td > small, .dashboard-bin-detail-table td > small { display: block; margin-top: 3px; color: var(--dim); font-size: 9px; }
.dashboard-bin-detail-body { display: grid; gap: 14px; padding: 14px; }
.dashboard-bin-detail-group { min-width: 0; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--surface-2); }
.dashboard-bin-detail-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 11px 13px; border-bottom: 1px solid var(--line); }
.dashboard-bin-detail-group-head span { color: var(--muted); font-size: 10px; }
.dashboard-bin-detail-table-wrap { max-height: 280px; overflow: auto; scrollbar-gutter: stable; }
.dashboard-bin-detail-table { min-width: 650px; table-layout: fixed; }
.dashboard-bin-detail-table th:nth-child(1) { width: 28%; }
.dashboard-bin-detail-table th:nth-child(2) { width: 17%; }
.dashboard-bin-detail-table th:nth-child(3) { width: 20%; }
.dashboard-bin-detail-table th:nth-child(4), .dashboard-bin-detail-table th:nth-child(5) { width: 17.5%; }
.dashboard-bin-detail-dialog { position: fixed; inset: 16px 0; width: min(1120px, calc(100vw - 32px)); height: min(900px, calc(100vh - 32px)); max-height: none; margin: auto; overflow: hidden; }
.dashboard-bin-detail-dialog::backdrop { background: rgba(3, 6, 10, .94); backdrop-filter: blur(3px); }
.dashboard-bin-detail-dialog .dialog-shell { height: 100%; max-height: none; overflow: auto; background: var(--surface); }
.panel-switches { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; }
.mini-switch, .icon-switch { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 9px; padding: 2px; background: var(--surface-3); }
.mini-switch button, .icon-switch button { display: grid; min-width: 29px; min-height: 27px; place-content: center; border: 0; border-radius: 6px; padding: 3px 6px; background: transparent; color: var(--muted); font-size: 10px; box-shadow: none; }
.mini-switch button span { margin-left: 1px; color: var(--dim); font-size: 8px; }
.mini-switch button:hover:not(:disabled), .icon-switch button:hover:not(:disabled) { transform: none; background: var(--accent-soft); color: var(--text); }
.mini-switch button.active, .icon-switch button.active { background: var(--accent); color: var(--accent-contrast); }
.mini-switch button.active span { color: currentColor; }
.site-switch button { min-width: 31px; font-weight: 800; letter-spacing: .03em; }
.icon-switch button { width: 29px; padding: 4px; }
.icon-switch svg, .copy-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.historical-bin-performance-panel { grid-column: 1 / -1; min-width: 0; overflow: hidden; }
.historical-bin-performance-panel .bar > span { min-width: 0; }
.historical-bin-performance-panel .bar > span > small { display: block; margin-top: 2px; }
.historical-bin-performance-body { display: grid; gap: 10px; min-width: 0; padding: 10px 12px 12px; }
.historical-bin-summary { display: flex; flex-wrap: wrap; gap: 7px; }
.historical-bin-summary .badge { padding-block: 4px; }
.historical-bin-table-wrap { max-height: 360px; border: 1px solid var(--line); border-radius: 10px; scrollbar-gutter: stable; }
.historical-bin-table { min-width: 0; table-layout: fixed; }
.task-bin-table th:nth-child(1) { width: 22%; }
.task-bin-table th:nth-child(2) { width: 30%; }
.task-bin-table th:nth-child(3) { width: 14%; }
.task-bin-table th:nth-child(4), .task-bin-table th:nth-child(5) { width: 17%; }
.historical-success-bin-table th:nth-child(1) { width: 14%; }
.historical-success-bin-table th:nth-child(2) { width: 22%; }
.historical-success-bin-table th:nth-child(3) { width: 8%; }
.historical-success-bin-table th:nth-child(4) { width: 12%; }
.historical-success-bin-table th:nth-child(5), .historical-success-bin-table th:nth-child(6) { width: 11%; }
.historical-success-bin-table th:nth-child(7), .historical-success-bin-table th:nth-child(8) { width: 11%; }
.historical-bin-table th, .historical-bin-table td { padding: 9px 11px; }
.historical-bin-table td:first-child code { color: var(--text); font-size: 12px; font-weight: 760; }
.historical-bin-table tr.no-recent-results td { color: var(--dim); }
.historical-bin-table tr.no-recent-results td:first-child code { color: var(--muted); }
.bin-identity { display: flex; align-items: center; gap: 7px; min-width: 0; }
.bin-country { overflow: hidden; text-overflow: ellipsis; }
.bin-type { display: inline-grid; flex: 0 0 auto; min-width: 24px; min-height: 24px; place-content: center; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface-3); color: var(--text); font-size: 10px; font-weight: 800; }
.performance-result { display: inline-flex; align-items: baseline; gap: 5px; font-variant-numeric: tabular-nums; }
.performance-result strong { font-size: 12px; }
.performance-result small { font-size: 10px; }
.performance-result.success { color: var(--good); }
.performance-result.failure { color: var(--bad); }
.result-count.success, .performance-rate.success { color: var(--good); }
.result-count.failure, .performance-rate.failure { color: var(--bad); }
.result-count, .performance-rate { font-variant-numeric: tabular-nums; }
.historical-bin-note { margin: 0; color: var(--dim); font-size: 10px; line-height: 1.55; overflow-wrap: anywhere; }
.historical-bin-empty { min-height: 180px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; margin: -1px; padding: 0; border: 0; clip: rect(0,0,0,0); white-space: nowrap; }
.account-delivery-panel { grid-column: 1 / -1; overflow: hidden; }
.delivery-heading > span, .delivery-heading strong, .delivery-heading small { display: block; }
.delivery-heading small { margin-top: 2px; color: var(--dim); font-size: 9px; font-weight: 600; }
.delivery-counts { color: var(--muted); font-size: 10px; font-weight: 600; }
.delivery-counts b { color: var(--text); font-size: 13px; }
.delivery-counts .danger-text { color: var(--bad); }
.delivery-tabs { display: flex; gap: 5px; overflow-x: auto; border-bottom: 1px solid var(--line); padding: 8px 12px 0; }
.delivery-tab { flex: 0 0 auto; min-height: 34px; border: 0; border-bottom: 2px solid transparent; border-radius: 8px 8px 0 0; padding: 0 11px; background: transparent; color: var(--muted); box-shadow: none; }
.delivery-tab:hover:not(:disabled), .delivery-tab.active { transform: none; border-bottom-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.delivery-tab strong { margin-left: 4px; font-variant-numeric: tabular-nums; }
.delivery-toolbar { display: grid; grid-template-columns: minmax(170px,1fr) minmax(120px,.55fr) minmax(110px,.45fr) 130px 130px auto auto; gap: 7px; border-bottom: 1px solid var(--line); padding: 10px 12px; }
.delivery-toolbar input, .delivery-toolbar select, .delivery-toolbar button { min-width: 0; min-height: 34px; }
.delivery-primary-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding: 9px 12px; background: var(--surface-2); }
.delivery-reader-toggle { align-items: center; margin-right: auto; border-left: 1px solid var(--line); padding-left: 10px; color: var(--text); font-size: 10px; font-weight: 700; }
.delivery-reader-toggle input { margin: 0; }
.delivery-reader-toggle small { color: var(--dim); font-size: 9px; font-weight: 500; }
.delivery-selection { color: var(--muted); font-size: 10px; }
.delivery-list { min-height: 96px; padding: 6px 12px; }
.delivery-row { display: grid; grid-template-columns: 24px minmax(170px,.72fr) minmax(240px,1fr) minmax(120px,.45fr) minmax(235px,auto); align-items: center; gap: 10px; border-bottom: 1px solid var(--line-soft); padding: 9px 2px; }
.delivery-row:last-child { border-bottom: 0; }
.delivery-row.exception { margin-block: 4px; border: 1px solid color-mix(in srgb,var(--bad) 35%,var(--line)); border-radius: 9px; padding-inline: 8px; background: color-mix(in srgb,var(--bad) 7%,var(--surface-2)); }
.delivery-select { display: grid; place-items: center; }
.delivery-account, .delivery-context, .delivery-time { min-width: 0; }
.delivery-account strong, .delivery-account span, .delivery-context > span, .delivery-context small, .delivery-time span, .delivery-time small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.delivery-account strong { color: var(--text); font-size: 12px; }
.delivery-account span, .delivery-context > span, .delivery-time span { margin-top: 2px; color: var(--muted); font-size: 9px; }
.delivery-context small, .delivery-time small { margin-top: 3px; color: var(--dim); font-size: 9px; }
.delivery-source { display: inline-block; border-radius: 999px; padding: 2px 6px; background: var(--surface-3); color: var(--muted); font-style: normal; }
.delivery-source.corrected { background: color-mix(in srgb,var(--warning) 14%,var(--surface-3)); color: var(--warning); }
.delivery-actions { display: flex; justify-content: flex-end; gap: 5px; flex-wrap: wrap; }
.delivery-actions button { min-height: 30px; padding-inline: 9px; font-size: 9px; }
.delivery-lock { color: var(--warn); font-size: 9px; line-height: 1.35; text-align: right; }
.delivery-lock small { color: var(--muted); }
.delivery-empty { min-height: 84px; }
.delivery-pager { border-top: 1px solid var(--line); padding: 8px 12px 10px; }
.dashboard-events { display: flex; min-width: 0; min-height: 0; overflow: hidden; flex-direction: column; }
.dashboard-events .terminal { flex: 1 1 auto; min-height: 0; max-height: none; }
.task-analysis-filter-panel { display: grid; grid-template-columns: minmax(170px,.55fr) minmax(520px,1.45fr); align-items: center; gap: 10px 16px; margin-bottom: 14px; padding: 12px 14px; }
.task-analysis-filter-heading { display: flex; min-width: 0; align-items: center; gap: 10px; }
.task-analysis-filter-heading > span:last-child, .task-analysis-filter-heading strong, .task-analysis-filter-heading small { display: block; min-width: 0; }
.task-analysis-filter-heading strong { color: var(--text); font-size: 12px; }
.task-analysis-filter-heading small { margin-top: 2px; color: var(--dim); font-size: 9px; line-height: 1.35; }
.task-analysis-selector { display: grid; grid-template-columns: minmax(170px,.7fr) minmax(280px,1.3fr) auto auto; align-items: end; gap: 8px; min-width: 0; }
.task-analysis-selector label { display: grid; min-width: 0; gap: 4px; color: var(--muted); font-size: 9px; font-weight: 700; }
.task-analysis-selector input, .task-analysis-selector select { width: 100%; min-width: 0; min-height: 34px; text-overflow: ellipsis; }
.task-analysis-selector button { min-height: 34px; white-space: nowrap; }
.task-analysis-filter-status { display: flex; grid-column: 1 / -1; align-items: center; gap: 9px; border-top: 1px solid var(--line); padding-top: 9px; color: var(--muted); font-size: 10px; }
.task-analysis-empty { min-height: 280px; }
.task-analysis-identity { display: flex; min-width: 0; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 14px; padding: 15px 17px; }
.task-analysis-identity > div { min-width: 0; }
.task-analysis-identity .job-id { color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .06em; }
.task-analysis-identity h2 { overflow: hidden; margin: 5px 0 4px; color: var(--text); font-size: 19px; text-overflow: ellipsis; white-space: nowrap; }
.task-analysis-identity p { margin: 0; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.task-analysis-progress { overflow: hidden; }
.task-analysis-progress > .bar > strong { color: var(--accent); font-size: 17px; font-variant-numeric: tabular-nums; }
.analysis-progress-track { height: 5px; background: var(--surface-3); }
.analysis-progress-track i { display: block; height: 100%; border-radius: 0 99px 99px 0; background: linear-gradient(90deg,var(--accent),var(--good)); transition: width .2s ease; }
.analysis-width-0 { width: 0; }.analysis-width-5 { width: 5%; }.analysis-width-10 { width: 10%; }.analysis-width-15 { width: 15%; }.analysis-width-20 { width: 20%; }.analysis-width-25 { width: 25%; }.analysis-width-30 { width: 30%; }.analysis-width-35 { width: 35%; }.analysis-width-40 { width: 40%; }.analysis-width-45 { width: 45%; }.analysis-width-50 { width: 50%; }.analysis-width-55 { width: 55%; }.analysis-width-60 { width: 60%; }.analysis-width-65 { width: 65%; }.analysis-width-70 { width: 70%; }.analysis-width-75 { width: 75%; }.analysis-width-80 { width: 80%; }.analysis-width-85 { width: 85%; }.analysis-width-90 { width: 90%; }.analysis-width-95 { width: 95%; }.analysis-width-100 { width: 100%; }
.task-analysis-metrics, .task-analysis-results { grid-template-columns: repeat(4,minmax(120px,1fr)); gap: 10px; padding: 12px 13px 0; }
.task-analysis-results { padding-block: 10px 13px; }
.task-analysis-metrics .card, .task-analysis-results .card { min-height: 86px; padding: 12px 13px; }
.task-analysis-metrics .card > span, .task-analysis-results .card > span { color: var(--muted); font-size: 10px; }
.task-analysis-metrics .number, .task-analysis-results .number { margin: 6px 0 3px; color: var(--text); font-size: 24px; font-weight: 760; font-variant-numeric: tabular-nums; }
.task-analysis-results .number.good { color: var(--good); }
.task-analysis-results .number.bad { color: var(--bad); }
.task-analysis-metrics small, .task-analysis-results small { color: var(--dim); font-size: 9px; line-height: 1.4; }
.task-analysis-section { margin-top: 18px; }
.analysis-section-heading { display: flex; min-width: 0; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.analysis-section-heading > div:first-child { min-width: 0; }
.analysis-section-heading > div:first-child > span { color: var(--accent); font-size: 9px; font-weight: 800; letter-spacing: .15em; }
.analysis-section-heading h2 { margin: 3px 0; color: var(--text); font-size: 17px; }
.analysis-section-heading p { margin: 0; color: var(--muted); font-size: 10px; }
.analysis-summary-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.task-analysis-two { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin-top: 14px; }
.task-analysis-structure-grid { grid-template-columns: 1fr; }
.task-analysis-two > .panel, .task-analysis-wide { min-width: 0; overflow: hidden; }
.task-analysis-wide { margin-top: 14px; }
.task-analysis-bin-history { min-width: 0; overflow: hidden; }
.bin-history-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; padding: 13px 14px 8px; }
.bin-history-distribution { min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: var(--surface-3); }
.bin-history-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.bin-history-heading > span, .bin-history-heading strong, .bin-history-heading small, .bin-history-heading > b { display: block; }
.bin-history-heading strong { color: var(--text); font-size: 13px; }
.bin-history-heading small { margin-top: 3px; color: var(--dim); font-size: 9px; font-weight: 500; line-height: 1.4; }
.bin-history-heading > b { flex: 0 0 auto; color: var(--text); font-size: 14px; text-align: right; font-variant-numeric: tabular-nums; }
.bin-history-track { display: flex; height: 13px; overflow: hidden; margin: 13px 0 11px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface-2); }
.bin-history-segment { display: block; min-width: 2px; height: 100%; }
.bin-history-segment.historical_success, .bin-history-swatch.historical_success { background: var(--good); }
.bin-history-segment.historical_no_success, .bin-history-swatch.historical_no_success { background: var(--warn); }
.bin-history-segment.no_history, .bin-history-swatch.no_history { background: var(--dim); }
.bin-history-legend { display: grid; gap: 5px; }
.bin-history-legend-row { display: grid; grid-template-columns: 9px minmax(0,1fr) auto 42px; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding-top: 6px; }
.bin-history-legend-row:first-child { border-top: 0; padding-top: 0; }
.bin-history-swatch { width: 8px; height: 8px; border-radius: 2px; }
.bin-history-legend-copy { min-width: 0; }
.bin-history-legend-row strong, .bin-history-legend-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bin-history-legend-row strong { color: var(--muted); font-size: 10px; }
.bin-history-legend-row small { margin-top: 1px; color: var(--dim); font-size: 8px; }
.bin-history-legend-row b, .bin-history-legend-row em { color: var(--text); font-size: 10px; font-style: normal; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bin-history-legend-row em { color: var(--muted); }
.bin-history-bin-links { display: flex; max-height: 62px; flex-wrap: wrap; gap: 3px 7px; margin-top: 4px; overflow: auto; scrollbar-gutter: stable; }
.task-analysis-bin-link { font-family: ui-monospace,SFMono-Regular,Consolas,monospace; letter-spacing: .04em; }
.bin-history-bin-links .task-analysis-bin-link { font-size: 9px; }
.bin-history-note { margin: 2px 14px 12px; color: var(--dim); font-size: 10px; line-height: 1.5; }
.bin-history-empty { min-height: 126px; }
.check-category-panel { margin-top: 0; }
.check-category-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px 14px 0; }
.check-category-card { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-3); }
.check-category-heading, .check-category-detail-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.check-category-heading strong, .check-category-detail-heading strong { color: var(--text); font-size: 13px; }
.check-category-heading b, .check-category-detail-heading > b { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.check-category-track { height: 8px; overflow: hidden; margin: 10px 0 8px; border-radius: 99px; background: var(--surface-2); }
.check-category-track i { display: block; height: 100%; min-width: 2px; border-radius: inherit; }
.check-category-track i.chart-color-0, .check-bin-row i.chart-color-0 { background: #f36b21; }
.check-category-track i.chart-color-1, .check-bin-row i.chart-color-1 { background: #2f8fe8; }
.check-category-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; color: var(--dim); font-size: 10px; }
.check-category-meta b { color: var(--text); font-size: 12px; font-variant-numeric: tabular-nums; }
.check-category-meta small { margin-left: 4px; color: var(--dim); }
.check-category-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px 14px 0; }
.check-category-detail { min-width: 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-3); }
.check-category-detail-heading small { display: block; margin-top: 3px; color: var(--dim); font-size: 9px; }
.check-bin-table-wrap { max-height: 270px; margin-top: 10px; overflow: auto; scrollbar-gutter: stable; }
.check-bin-table { min-width: 650px; table-layout: fixed; }
.check-bin-table th, .check-bin-table td { padding: 8px 9px; }
.check-bin-table th:nth-child(1) { width: 17%; }
.check-bin-table th:nth-child(2), .check-bin-table th:nth-child(3) { width: 12%; }
.check-bin-table th:nth-child(4), .check-bin-table th:nth-child(5) { width: 12%; }
.check-bin-table th:nth-child(6) { width: 17%; }
.check-bin-table th:nth-child(7) { width: 18%; }
.check-bin-table td { font-variant-numeric: tabular-nums; }
.check-bin-table td:first-child code { color: var(--text); font-size: 10px; font-weight: 760; }
.check-bin-rate { display: block; font-weight: 760; }
.check-bin-rate.success { color: var(--good); }
.check-bin-rate.failure { color: var(--bad); margin-top: 2px; }
.check-category-note { margin: 10px 14px 13px; color: var(--dim); font-size: 10px; line-height: 1.5; }
.task-analysis-table { min-width: 820px; }
.analysis-table-wrap { max-height: 410px; scrollbar-gutter: stable; }
.task-analysis-table th, .task-analysis-table td { padding: 9px 10px; }
.task-analysis-table th:first-child { min-width: 155px; }
.task-analysis-table td { font-variant-numeric: tabular-nums; }
.task-analysis-table td:first-child { color: var(--text); }
.task-analysis-table code { color: var(--text); font-weight: 760; }
.analysis-rate { display: inline-grid; gap: 1px; }
.analysis-rate strong { color: var(--text); font-size: 12px; }
.analysis-rate small { color: var(--dim); font-size: 8px; white-space: nowrap; }
.analysis-rate.low-sample strong { color: var(--warn); }
.analysis-bars { display: grid; gap: 9px; padding: 14px; }
.analysis-bar-row { display: grid; grid-template-columns: minmax(120px,1fr) minmax(120px,2fr) auto 42px; align-items: center; gap: 9px; font-size: 10px; }
.analysis-bar-row > span { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.analysis-bar-row > div { height: 9px; overflow: hidden; border-radius: 99px; background: var(--surface-3); }
.analysis-bar-row i { display: block; height: 100%; border-radius: inherit; background: var(--bad); }
.analysis-bar-row b { color: var(--text); font-variant-numeric: tabular-nums; }
.analysis-bar-row small { color: var(--dim); text-align: right; }
.analysis-health-list { display: grid; gap: 8px; padding: 12px 14px 14px; }
.analysis-health-item { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; background: var(--surface-3); }
.analysis-health-item > span:nth-child(2) { min-width: 0; }
.analysis-health-item strong, .analysis-health-item small { display: block; }
.analysis-health-item strong { color: var(--text); font-size: 11px; }
.analysis-health-item small { overflow: hidden; margin-top: 2px; color: var(--dim); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.analysis-health-item > b { color: var(--good); font-size: 10px; }
.analysis-health-item.warning > b { color: var(--warn); }
.analysis-health-item.critical > b { color: var(--bad); }
.analysis-health-item.warning .health-dot { background: var(--warn); }
.analysis-health-item.critical .health-dot { background: var(--bad); }
.device-performance-table { min-width: 760px; }
.analysis-recent-wrap { max-height: 430px; scrollbar-gutter: stable; }
.analysis-recent-wrap table { min-width: 1040px; }
.task-analysis-note { margin: 11px 2px 0; color: var(--dim); font-size: 10px; line-height: 1.6; }
@media (max-width: 1120px) {
  .dashboard-date-filter { grid-template-columns: auto 1fr; }
  .dashboard-scope-switch { justify-self: end; }
  .dashboard-business-fields,.dashboard-range-fields,.dashboard-range-summary { grid-column: 1 / -1; }
  .dashboard-range-summary { border-top: 1px solid var(--line); border-left: 0; padding: 9px 0 0; }
  .dashboard-section-nav { display: flex; overflow-x: auto; scrollbar-gutter: stable; }
  .dashboard-section-nav button { flex: 0 0 158px; }
  .dashboard-section-overview .dashboard-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .task-analysis-filter-panel { grid-template-columns: 1fr; }
  .task-analysis-selector { grid-template-columns: minmax(160px,.8fr) minmax(260px,1.2fr) auto auto; }
  .task-analysis-metrics, .task-analysis-results { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .task-analysis-two { grid-template-columns: 1fr; }
  .bin-history-grid { grid-template-columns: 1fr; }
  .check-category-details { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .task-analysis-selector { grid-template-columns: 1fr 1fr; }
  .task-analysis-selector label { grid-column: 1 / -1; }
  .task-analysis-selector button { width: 100%; }
  .task-analysis-identity, .analysis-section-heading { align-items: flex-start; flex-direction: column; }
  .analysis-summary-badges { justify-content: flex-start; }
  .task-analysis-metrics, .task-analysis-results { grid-template-columns: 1fr 1fr; }
  .check-category-summary-grid { grid-template-columns: 1fr; }
}
.chart-segment.chart-color-0 { stroke: #f36b21; }.chart-segment.chart-color-1 { stroke: #2f8fe8; }.chart-segment.chart-color-2 { stroke: #17a673; }.chart-segment.chart-color-3 { stroke: #e0a11b; }.chart-segment.chart-color-4 { stroke: #8a67d5; }.chart-segment.chart-color-5 { stroke: #d85678; }
.chart-swatch.chart-color-0 { background:#f36b21 }.chart-swatch.chart-color-1 { background:#2f8fe8 }.chart-swatch.chart-color-2 { background:#17a673 }.chart-swatch.chart-color-3 { background:#e0a11b }.chart-swatch.chart-color-4 { background:#8a67d5 }.chart-swatch.chart-color-5 { background:#d85678 }
.bin-bar.chart-color-0 { fill:#f36b21 }.bin-bar.chart-color-1 { fill:#2f8fe8 }.bin-bar.chart-color-2 { fill:#17a673 }.bin-bar.chart-color-3 { fill:#e0a11b }.bin-bar.chart-color-4 { fill:#8a67d5 }.bin-bar.chart-color-5 { fill:#d85678 }
html[data-theme="dark"] .chart-segment.chart-color-0 { stroke:#58d4c5 } html[data-theme="dark"] .chart-segment.chart-color-1 { stroke:#68a9ff } html[data-theme="dark"] .chart-segment.chart-color-2 { stroke:#75d69e } html[data-theme="dark"] .chart-segment.chart-color-3 { stroke:#e8af55 } html[data-theme="dark"] .chart-segment.chart-color-4 { stroke:#a78bfa } html[data-theme="dark"] .chart-segment.chart-color-5 { stroke:#f08fa8 }
html[data-theme="dark"] .chart-swatch.chart-color-0 { background:#58d4c5 } html[data-theme="dark"] .chart-swatch.chart-color-1 { background:#68a9ff } html[data-theme="dark"] .chart-swatch.chart-color-2 { background:#75d69e } html[data-theme="dark"] .chart-swatch.chart-color-3 { background:#e8af55 } html[data-theme="dark"] .chart-swatch.chart-color-4 { background:#a78bfa } html[data-theme="dark"] .chart-swatch.chart-color-5 { background:#f08fa8 }
html[data-theme="dark"] .bin-bar.chart-color-0 { fill:#58d4c5 } html[data-theme="dark"] .bin-bar.chart-color-1 { fill:#68a9ff } html[data-theme="dark"] .bin-bar.chart-color-2 { fill:#75d69e } html[data-theme="dark"] .bin-bar.chart-color-3 { fill:#e8af55 } html[data-theme="dark"] .bin-bar.chart-color-4 { fill:#a78bfa } html[data-theme="dark"] .bin-bar.chart-color-5 { fill:#f08fa8 }

html[data-theme="light"] .status::before { box-shadow: 0 0 0 3px rgba(67, 76, 88, .07); }
html[data-theme="dark"] .status::before { box-shadow: 0 0 0 3px rgba(146, 169, 182, .08); }
.status.resolved::before, .status.active::before, .status.available::before, .status.valid::before, .status.completed::before { box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 13%, transparent); }
.address-language-switch button.active { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }

@media (max-width: 820px) {
  body { overflow-x: hidden; }
  .app { width: 100%; max-width: 100vw; grid-template-columns: minmax(0, 1fr); min-width: 0; }
  .sidebar { width: 100%; min-width: 0; max-width: 100vw; border-bottom-color: var(--line); box-shadow: 0 10px 30px color-mix(in srgb, var(--text) 7%, transparent); }
  .main, #content { width: 100%; min-width: 0; max-width: 100vw; }
  .brand { display: none; }
  .nav.active { box-shadow: inset 0 -3px var(--accent); }
  .header-actions { gap: 7px; }
  .theme-toggle { min-width: 38px; padding-inline: 9px; }
  .header-actions .theme-toggle-label { display: none; }
  .dashboard-date-filter { grid-template-columns: auto 1fr; }
  .dashboard-scope-switch { justify-self: end; }
  .dashboard-business-fields { grid-column: 1 / -1; }
  .dashboard-range-fields { grid-column: 1 / -1; }
  .dashboard-range-summary { grid-column: 1 / -1; border-top: 1px solid var(--line); border-left: 0; padding: 9px 0 0; }
  .dashboard-workbench { grid-template-columns: minmax(0,1fr); }
  .dashboard-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .device-work-comparison-bar { align-items: flex-start; flex-direction: column; }
  .device-work-tabs { width: 100%; overflow-x: auto; }
  .device-work-tabs button { flex: 1 0 auto; }
  .dashboard-panel-grid { grid-template-columns: 1fr; grid-template-rows: none; }
  .historical-bin-performance-panel { grid-column: auto; }
  .account-delivery-panel { grid-column: auto; }
  .delivery-toolbar { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .delivery-row { grid-template-columns: 24px minmax(150px,.8fr) minmax(190px,1fr); }
  .delivery-time { grid-column: 2; }
  .delivery-actions { grid-column: 3; grid-row: 1 / span 2; }
  .dashboard-events { min-height: 360px; }
  .dashboard-events .terminal { max-height: 420px; }
  .full-import-batch-controls { grid-template-columns: 1fr; }
  .address-supply-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .address-supply-panel .table-head { flex-direction: column; gap: 4px; }
  .address-supply-panel .table-head span { text-align: left; }
  .account-check-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .maintenance-insight-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .maintenance-lease-lookup { display: block; }
  .maintenance-lease-lookup button { width: 100%; margin-top: 9px; }
  .maintenance-lease-lookup small { margin-top: 9px; }
}

@media (max-width: 520px) {
  .login-topbar { align-items: flex-start; }
  .header { flex-wrap: wrap; gap: 12px; }
  .header-actions { width: 100%; flex-wrap: wrap; justify-content: flex-start; }
  .dashboard-date-filter { grid-template-columns: 1fr; padding: 11px; }
  .dashboard-filter-heading { min-width: 0; }
  .dashboard-scope-switch { width: 100%; grid-template-columns: repeat(2,1fr); justify-self: stretch; }
  .dashboard-business-fields { grid-column: auto; grid-template-columns: 1fr; }
  .dashboard-range-fields { grid-column: auto; grid-template-columns: 1fr auto 1fr; }
  .dashboard-range-fields button { grid-column: 1 / -1; width: 100%; }
  .dashboard-range-summary { grid-column: auto; }
  .device-work-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .device-work-card-grid { grid-template-columns: 1fr; }
  .device-work-card p { white-space: normal; }
  .device-work-sort { flex-wrap: nowrap; overflow-x: auto; }
  .dashboard-recent-results > .bar { align-items: flex-start; flex-direction: column; }
  .dashboard-recent-results > .bar > small { text-align: left; }
  .dashboard-result-row { grid-template-columns: 44px minmax(0,1fr); }
  .dashboard-result-row time { grid-column: 2; padding-top: 0; }
  .donut-layout { grid-template-columns: 1fr; }
  .donut-chart { width: 170px; }
  .dashboard-control-bar, .delivery-heading { align-items: flex-start; flex-direction: column; }
  .dashboard-result-bar { align-items: flex-start; flex-direction: column; }
  .dashboard-result-controls { width: 100%; justify-content: space-between; }
  .dashboard-result-controls label { flex: 1 1 auto; }
  .dashboard-result-controls select { width: 100%; max-width: 220px; }
  .delivery-counts { text-align: left; }
  .delivery-toolbar { grid-template-columns: 1fr; }
  .delivery-primary-actions > button:first-child { width: 100%; }
  .delivery-reader-toggle { width: 100%; margin-right: 0; border-left: 0; padding-left: 0; }
  .delivery-row { grid-template-columns: 24px minmax(0,1fr); }
  .delivery-context, .delivery-time, .delivery-actions { grid-column: 2; grid-row: auto; }
  .delivery-actions { justify-content: flex-start; }
  .panel-switches { width: 100%; justify-content: space-between; }
  .historical-bin-performance-body { padding-inline: 10px; }
  .task-bin-table { min-width: 660px; }
  .historical-success-bin-table { min-width: 820px; }
  .import-mode-switch { grid-template-columns: 1fr; }
  .full-import-actions > label { width: 100%; }
  .address-supply-row > header, .address-supply-state { align-items: flex-start; flex-direction: column; }
  .address-supply-state > button { width: 100%; }
  .account-check-toolbar > button { flex: 1 1 100%; }
}

@media (max-width: 640px) {
  .card-expiry-tool { align-items: stretch; flex-direction: column; }
  .card-expiry-actions { display: grid; grid-template-columns: 1fr; }
}

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

:root {
  --motion-fast: 120ms;
  --motion-base: 180ms;
  --motion-layout: 280ms;
  --ease-out: cubic-bezier(.2,.8,.2,1);
  --ease-emphasized: cubic-bezier(.16,1,.3,1);
}

.mobile-nav-bar { display: none; }
.view-enter { animation: view-enter var(--motion-base) var(--ease-out) both; }
@keyframes view-enter { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

button.is-loading { position: relative; cursor: wait; }
button.is-loading::after { content: ""; display: inline-block; width: 13px; height: 13px; margin-left: 8px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -2px; animation: button-spin .72s linear infinite; }
@keyframes button-spin { to { transform: rotate(360deg); } }

.dashboard-triage { margin-top: 16px; overflow: hidden; }
.dashboard-triage .bar { background: linear-gradient(90deg,color-mix(in srgb,var(--warn) 10%,var(--surface-2)),var(--surface-2)); }
.triage-count { display: grid; min-width: 28px; min-height: 28px; place-content: center; border: 1px solid var(--line); border-radius: 999px; color: var(--text); background: var(--surface-3); font-size: 12px; }
.triage-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1px; background: var(--line); }
.triage-item { display: grid; grid-template-columns: 9px minmax(0,1fr) auto; align-items: center; gap: 11px; min-height: 74px; border: 0; border-radius: 0; padding: 13px 15px; background: var(--surface); color: var(--text); text-align: left; box-shadow: none; }
.triage-item:hover:not(:disabled) { background: var(--surface-2); transform: none; }
.triage-indicator { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 4px color-mix(in srgb,var(--warn) 12%,transparent); }
.triage-item.critical .triage-indicator { background: var(--bad); box-shadow: 0 0 0 4px color-mix(in srgb,var(--bad) 12%,transparent); }
.triage-item strong,.triage-item small { display: block; }
.triage-item small { margin-top: 3px; color: var(--muted); font-weight: 500; overflow-wrap: anywhere; }
.triage-action { color: var(--accent); font-size: 11px; white-space: nowrap; }
.triage-clear { display: flex; grid-column: 1/-1; align-items: center; gap: 12px; min-height: 74px; padding: 14px 16px; background: var(--surface); }
.triage-clear strong,.triage-clear small { display: block; }
.triage-clear small { margin-top: 3px; color: var(--muted); }
.dashboard-metrics { grid-template-columns: repeat(4,minmax(150px,1fr)); }
.dashboard-kpi .number { display: flex; align-items: baseline; gap: 5px; }
.dashboard-kpi .number small { color: var(--dim); font-size: 13px; font-weight: 650; }

.address-editor-body { gap: 14px; }
.address-editor-section { min-width: 0; margin: 0; border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--surface-3); }
.address-editor-section legend { padding: 0 8px; color: var(--text); font-size: 12px; font-weight: 800; letter-spacing: .04em; }
.address-editor-section legend span { margin-right: 7px; color: var(--accent); font-family: ui-monospace,Consolas,monospace; font-size: 10px; }
.address-editor-section .task-form-grid { margin-top: 4px; }
.address-editor-section > .field { margin-top: 12px; }
.address-publish-options { margin-top: 4px; }
.sticky-actions { z-index: 3; padding: 10px; border: 1px solid var(--accent-border); border-radius: 12px; background: color-mix(in srgb,var(--surface) 92%,transparent); box-shadow: var(--shadow-raised); backdrop-filter: blur(12px); }

.action-dialog { width: min(580px,calc(100vw - 24px)); max-height: calc(100vh - 24px); border: 1px solid var(--line); border-radius: 16px; padding: 0; background: var(--surface); color: var(--text); box-shadow: 0 28px 90px rgba(0,0,0,.5); }
.action-dialog::backdrop { background: rgba(3,9,14,.72); backdrop-filter: blur(4px); }
.action-dialog[open] { animation: dialog-enter var(--motion-layout) var(--ease-emphasized) both; }
@keyframes dialog-enter { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.action-dialog-body { display: grid; gap: 13px; padding: 18px; }
.action-dialog-body > p { margin: 0; color: var(--muted); }
.action-dialog-impact { display: grid; gap: 7px; margin: 0; padding: 12px 12px 12px 30px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-3); color: var(--muted); }
.action-dialog-fields { display: grid; gap: 12px; }
.action-dialog-error { margin: 0; color: var(--bad); }
.action-dialog-actions { display: flex; justify-content: flex-end; gap: 9px; padding: 14px 18px; border-top: 1px solid var(--line); background: var(--surface-2); }

.toast { top: auto; bottom: max(20px,env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 12px; transform: translateY(12px); transition: opacity var(--motion-base) var(--ease-out),transform var(--motion-base) var(--ease-out); }
.toast.show { pointer-events: auto; }
#toast-message { min-width: 0; flex: 1 1 auto; overflow-wrap: anywhere; }
#toast-close { flex: 0 0 auto; min-height: 30px; border-color: currentColor; padding: 4px 8px; background: transparent; color: inherit; font-size: 11px; box-shadow: none; }

.event-filter-panel { margin-top: 18px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-panel); }
.event-filter-panel form { display: grid; gap: 14px; padding: 16px; }
.event-filter-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.event-filter-heading > span { min-width: 0; }
.event-filter-heading strong,.event-filter-heading small { display: block; }
.event-filter-heading strong { color: var(--text); font-size: 14px; }
.event-filter-heading small { margin-top: 3px; color: var(--dim); font-size: 10px; }
.event-range-presets { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.event-range-presets button.active { border-color: var(--accent); background: color-mix(in srgb,var(--accent) 18%,var(--surface-2)); color: var(--text); }
.event-filter-grid { display: grid; grid-template-columns: minmax(230px,1.45fr) repeat(3,minmax(150px,1fr)); gap: 11px; }
.event-filter-grid label { display: grid; gap: 6px; min-width: 0; color: var(--muted); font-size: 11px; font-weight: 650; }
.event-filter-grid label span { padding-left: 2px; }
.event-filter-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; border-top: 1px solid var(--line); padding-top: 13px; }
.event-filter-actions > #event-refresh-status { flex: 1 1 260px; }
.event-auto-refresh { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.event-category,.event-severity { display: inline-flex; align-items: center; min-height: 24px; border: 1px solid var(--line); border-radius: 999px; padding: 3px 8px; background: var(--surface-3); color: var(--muted); font-size: 10px; font-weight: 750; white-space: nowrap; }
.event-category.proxy { border-color: color-mix(in srgb,var(--accent) 48%,var(--line)); color: var(--accent); }
.event-category.task { border-color: color-mix(in srgb,var(--accent-blue,var(--accent)) 52%,var(--line)); color: var(--accent-blue,var(--accent)); }
.event-category.browser { border-color: color-mix(in srgb,var(--warn) 46%,var(--line)); color: var(--warn); }
.event-severity.error { border-color: color-mix(in srgb,var(--bad) 54%,var(--line)); background: color-mix(in srgb,var(--bad) 10%,var(--surface-3)); color: var(--bad); }
.event-name,.event-code { display: block; }
.event-name { color: var(--text); font-size: 12px; white-space: nowrap; }
.event-code { margin-top: 4px; color: var(--dim); font-size: 10px; }
.event-detail { min-width: 280px; max-width: 560px; line-height: 1.55; }
.event-table-panel .table-wrap { max-height: min(68vh,760px); }

.analysis-mode-tabs { display: inline-grid; grid-template-columns: repeat(2,minmax(150px,1fr)); gap: 4px; margin: 0 0 14px; border: 1px solid var(--line); border-radius: 12px; padding: 4px; background: var(--surface-2); }
.analysis-mode-tabs button { display: grid; min-height: 50px; gap: 2px; align-content: center; border-color: transparent; padding: 7px 16px; background: transparent; color: var(--muted); text-align: left; box-shadow: none; }
.analysis-mode-tabs button strong,.analysis-mode-tabs button small { display: block; }
.analysis-mode-tabs button strong { color: inherit; font-size: 12px; }
.analysis-mode-tabs button small { color: var(--dim); font-size: 9px; font-weight: 550; }
.analysis-mode-tabs button.active { border-color: var(--accent-border); background: var(--accent-soft); color: var(--text); }
.analysis-mode-tabs button.active small { color: var(--accent); }
.bin-performance-filter-panel { margin-top: 0; overflow: hidden; }
.bin-performance-filter { display: grid; grid-template-columns: minmax(140px,.8fr) minmax(170px,1fr) minmax(190px,1.15fr) minmax(125px,.7fr) minmax(145px,.75fr) minmax(145px,.75fr) auto; gap: 10px; align-items: end; padding: 14px; }
.bin-performance-filter label { display: grid; min-width: 0; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 700; }
.bin-performance-filter label > span { padding-left: 2px; }
.bin-performance-filter .bin-performance-history-toggle { min-height: 39px; grid-template-columns: auto minmax(0,1fr); align-items: center; align-self: end; gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--surface-3); color: var(--text); }
.bin-performance-history-toggle input { margin: 0; }
.bin-performance-filter .bin-performance-history-toggle > span { padding-left: 0; line-height: 1.35; }
.bin-performance-actions { display: flex; gap: 7px; }
.bin-performance-actions button { min-width: 70px; }
.bin-performance-empty { min-height: 210px; }
.bin-performance-summary { margin-top: 14px; overflow: hidden; }
.bin-performance-summary-grid { grid-template-columns: repeat(4,minmax(125px,1fr)); gap: 10px; padding: 14px; }
.bin-performance-summary-grid .card { min-height: 96px; padding: 13px 14px; }
.bin-performance-summary-grid .number { margin: 7px 0 2px; font-size: 25px; }
.bin-identity-panel { display: grid; grid-template-columns: minmax(260px,.72fr) minmax(0,1.28fr); gap: 14px; border-top: 1px solid var(--line); padding: 14px; background: color-mix(in srgb,var(--surface-3) 58%,transparent); }
.bin-identity-facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.bin-identity-facts > div { min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; background: var(--surface-3); }
.bin-identity-facts span,.bin-related-list small { display: block; color: var(--dim); font-size: 9px; }
.bin-identity-facts strong { display: block; margin-top: 5px; overflow-wrap: anywhere; font-size: 12px; }
.bin-related-list { min-width: 0; }
.bin-related-list > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.bin-related-links { display: flex; flex-wrap: wrap; gap: 7px; }
.bin-related-link { display: inline-grid; gap: 2px; min-width: 116px; border-color: var(--line); padding: 8px 10px; background: var(--surface-3); color: var(--text); text-align: left; }
.bin-related-link strong { font-family: ui-monospace,SFMono-Regular,Consolas,monospace; letter-spacing: .04em; }
.bin-related-link span { color: var(--dim); font-size: 9px; font-weight: 500; }
.bin-performance-check-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; border-top: 1px solid var(--line); padding: 14px; }
.bin-performance-check-card { display: grid; min-width: 0; grid-template-columns: minmax(0,.72fr) minmax(150px,1fr); gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; background: var(--surface-3); }
.bin-performance-check-card > div:first-child strong,.bin-performance-check-card > div:first-child span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bin-performance-check-card > div:first-child strong { color: var(--text); font-size: 12px; }
.bin-performance-check-card > div:first-child span { margin-top: 4px; color: var(--dim); font-size: 9px; }
.bin-performance-table-panel { margin-top: 14px; }
.bin-performance-table { min-width: 1480px; table-layout: fixed; }
.bin-performance-table th:nth-child(1) { width: 200px; }
.bin-performance-table th:nth-child(2) { width: 150px; }
.bin-performance-table th:nth-child(3),.bin-performance-table th:nth-child(4) { width: 84px; }
.bin-performance-table th:nth-child(n+5):nth-child(-n+8) { width: 190px; }
.bin-performance-table th:nth-child(9) { width: 142px; }
.bin-performance-table td { vertical-align: top; }
.bin-performance-table td > small,.bin-performance-table td > strong { display: block; }
.bin-performance-table td > small { margin-top: 4px; color: var(--dim); }
.table-link { max-width: 100%; min-height: 0; border: 0; padding: 0; background: transparent; color: var(--accent); font-size: 12px; font-weight: 760; text-align: left; box-shadow: none; white-space: normal; }
.table-link:hover { transform: none; background: transparent; color: var(--text); box-shadow: none; text-decoration: underline; }
.bin-performance-metric { display: grid; min-width: 0; gap: 3px; border-left: 2px solid var(--line-strong); padding-left: 9px; }
.bin-performance-metric strong,.bin-performance-metric span,.bin-performance-metric small { display: block; }
.bin-performance-metric strong { color: var(--text); font-size: 12px; }
.bin-performance-metric span { color: var(--muted); font-size: 10px; }
.bin-performance-metric small { color: var(--dim); font-size: 9px; line-height: 1.4; }
.bin-performance-metric.low-sample { border-left-color: var(--warn); }
.bin-performance-note { margin: 0; border-top: 1px solid var(--line); padding: 11px 14px; color: var(--dim); font-size: 10px; line-height: 1.6; }
.global-bin-filter { grid-template-columns: repeat(6,minmax(130px,1fr)); }
.global-bin-filter .bin-performance-actions { justify-content: flex-end; }
.global-bin-summary { margin-bottom: 14px; }
.global-bin-rank-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.global-bin-rank-grid .table-panel { min-width: 0; overflow: hidden; }
.global-bin-rank-grid .table-wrap { max-height: 430px; overflow: auto; scrollbar-gutter: stable; }
.global-bin-rank-table { min-width: 610px; table-layout: fixed; }
.global-bin-rank-table th:nth-child(1) { width: 33%; }
.global-bin-rank-table th:nth-child(2) { width: 11%; }
.global-bin-rank-table th:nth-child(3) { width: 26%; }
.global-bin-rank-table th:nth-child(4) { width: 30%; }
.global-bin-rank-table td > strong,.global-bin-rank-table td > small,.global-bin-performance-table td > strong,.global-bin-performance-table td > small { display: block; }
.global-bin-rank-table td > small,.global-bin-performance-table td > small { margin-top: 3px; color: var(--dim); font-size: 9px; }
.global-bin-performance-table { min-width: 1240px; table-layout: fixed; }
.global-bin-performance-table th:nth-child(1) { width: 160px; }
.global-bin-performance-table th:nth-child(2) { width: 190px; }
.global-bin-performance-table th:nth-child(3) { width: 78px; }
.global-bin-performance-table th:nth-child(4) { width: 125px; }
.global-bin-performance-table th:nth-child(5),.global-bin-performance-table th:nth-child(6) { width: 130px; }
.global-bin-performance-table th:nth-child(7) { width: 220px; }
.global-bin-performance-table th:nth-child(8) { width: 150px; }
.global-bin-performance-table td { vertical-align: top; font-variant-numeric: tabular-nums; }
.global-bin-link { font-family: ui-monospace,SFMono-Regular,Consolas,monospace; letter-spacing: .04em; }
.low-sample-row { background: color-mix(in srgb,var(--warn) 5%,transparent); }
.low-sample-row td:first-child strong,.low-sample-row .table-link { color: var(--warn); }
.global-bin-pager { justify-content: flex-end; border-top: 1px solid var(--line); margin-top: 0; padding: 10px 14px; }

@media (max-width: 1500px) and (min-width: 821px) {
  .bin-performance-filter { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .bin-performance-actions { grid-column: 4; justify-content: flex-end; }
  .global-bin-filter .bin-performance-actions { grid-column: 3 / -1; }
}

@media (max-width: 820px) {
  .dashboard-section-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
  .dashboard-section-heading p { max-width: none; text-align: left; }
  .sidebar { position: sticky; top: 0; overflow: visible; padding: 9px 10px; }
  .mobile-nav-bar { display: flex; min-height: 48px; align-items: center; justify-content: space-between; gap: 12px; }
  .mobile-nav-context { display: grid; min-width: 0; }
  .mobile-nav-context small { color: var(--dim); font-size: 9px; letter-spacing: .16em; }
  .mobile-nav-context strong { overflow: hidden; color: var(--text); text-overflow: ellipsis; white-space: nowrap; }
  #mobile-nav-toggle { display: inline-flex; align-items: center; gap: 7px; }
  #mobile-nav-toggle svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
  #navigation { position: absolute; top: calc(100% + 1px); left: 10px; right: 10px; display: none; width: auto; max-height: calc(100vh - 78px); overflow-y: auto; gap: 13px; border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: var(--sidebar); box-shadow: var(--shadow-raised); }
  .sidebar.mobile-nav-open #navigation { display: grid; }
  #navigation .nav-section { display: grid; gap: 3px; }
  #navigation .nav-label { display: block; padding: 3px 8px; }
  #navigation .nav { width: 100%; min-width: 0; grid-template-columns: 24px minmax(0,1fr); }
  .nav.active { box-shadow: inset 3px 0 var(--accent); }
  .triage-list { grid-template-columns: 1fr; }
  .dashboard-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .toast { right: 12px; bottom: max(12px,env(safe-area-inset-bottom)); max-width: calc(100vw - 24px); }
  .event-filter-heading { align-items: flex-start; flex-direction: column; }
  .event-range-presets { justify-content: flex-start; }
  .event-filter-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .analysis-mode-tabs { display: grid; width: 100%; }
  .bin-performance-filter { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .bin-performance-actions { grid-column: 1 / -1; }
  .bin-performance-summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .bin-identity-panel { grid-template-columns: 1fr; }
  .bin-performance-check-grid { grid-template-columns: 1fr; }
  .global-bin-rank-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .dashboard-metrics { grid-template-columns: 1fr 1fr; }
  .triage-item { grid-template-columns: 9px minmax(0,1fr); }
  .triage-action { grid-column: 2; }
  .address-editor-section { padding: 12px; }
  .address-editor-actions { position: sticky; bottom: max(8px,env(safe-area-inset-bottom)); }
  .address-editor-actions button { flex-basis: 100%; }
  .action-dialog-actions { position: sticky; bottom: 0; }
  .event-filter-grid { grid-template-columns: 1fr; }
  .event-filter-actions > button { flex: 1 1 100%; }
  .event-filter-actions > #event-refresh-status { order: 5; flex-basis: 100%; }
  .analysis-mode-tabs button { padding-inline: 10px; }
  .bin-performance-filter { grid-template-columns: 1fr; }
  .bin-performance-actions { grid-column: auto; }
  .bin-performance-actions button { flex: 1 1 50%; }
  .bin-performance-summary-grid { grid-template-columns: 1fr 1fr; }
  .bin-identity-facts { grid-template-columns: 1fr; }
  .bin-related-list > div:first-child { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  .view-enter,.action-dialog[open] { animation: none; }
}
