:root {
  --bg: #f5f7f9;
  --surface: #ffffff;
  --surface-soft: #f9fafb;
  --text: #171a1f;
  --muted: #66707c;
  --border: #dfe4ea;
  --border-strong: #c9d1da;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --success: #16865b;
  --success-bg: #eaf7f1;
  --warning: #a65f00;
  --warning-bg: #fff4df;
  --danger: #c43d3d;
  --danger-bg: #fdefef;
  --sidebar: #171b22;
  --radius: 6px;
  --shadow: 0 12px 34px rgba(25, 34, 48, 0.07);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; color: var(--text); font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; letter-spacing: 0; }
button, input, textarea, select { font: inherit; letter-spacing: 0; }
a { color: inherit; text-decoration: none; }
svg { width: 18px; height: 18px; flex: 0 0 auto; }

.public-body { min-height: 100vh; background: var(--bg); }
.public-header { height: 68px; padding: 0 max(24px, calc((100vw - 1180px) / 2)); display: flex; align-items: center; justify-content: space-between; background: var(--surface); border-bottom: 1px solid var(--border); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 700; }
.brand-mark { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 6px; color: #fff; background: var(--text); font-size: 15px; }
.secure-label { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; }
.secure-label svg { color: var(--success); }
.public-shell { width: min(640px, calc(100% - 32px)); margin: 54px auto 32px; }
.steps { display: grid; grid-template-columns: repeat(6, 1fr); margin: 0 0 28px; }
.step { position: relative; display: grid; justify-items: center; gap: 8px; color: #8a929d; }
.step::after { content: ""; position: absolute; z-index: -1; top: 15px; left: calc(50% + 18px); width: calc(100% - 36px); border-top: 1px solid var(--border-strong); }
.step:last-child::after { display: none; }
.step > span { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--border-strong); border-radius: 50%; background: var(--bg); font-size: 12px; font-weight: 700; }
.step > span svg { width: 15px; }
.step small { font-size: 12px; }
.step.is-current { color: var(--primary); }
.step.is-current > span { color: #fff; border-color: var(--primary); background: var(--primary); }
.step.is-complete { color: var(--success); }
.step.is-complete > span { color: #fff; border-color: var(--success); background: var(--success); }
.step.is-complete::after { border-color: #82c7aa; }
.public-panel { padding: 38px 42px 42px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.section-heading { margin-bottom: 30px; }
.section-heading h1 { margin: 5px 0 9px; font-size: 27px; line-height: 1.25; }
.section-heading p { margin: 0; color: var(--muted); }
.eyebrow { color: var(--primary); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.stack-form { display: grid; gap: 10px; }
.stack-form label { font-weight: 650; }
.field-with-icon { position: relative; }
.field-with-icon > svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #7a8490; }
input, textarea, select { width: 100%; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); outline: none; transition: border-color .15s, box-shadow .15s; }
input { height: 46px; padding: 0 14px; }
select { height: 40px; padding: 0 34px 0 12px; }
.field-with-icon input { padding-left: 44px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; text-transform: uppercase; }
textarea { min-height: 210px; padding: 14px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.button { min-height: 40px; padding: 0 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: var(--radius); cursor: pointer; font-weight: 650; transition: background .15s, border-color .15s, color .15s; }
.button-primary { color: #fff; background: var(--primary); }
.button-primary:hover { background: var(--primary-hover); }
.button-secondary { color: #303740; background: var(--surface); border-color: var(--border-strong); }
.button-secondary:hover { background: var(--surface-soft); border-color: #aeb8c3; }
.button-success { color: #fff; background: var(--success); }
.button-danger { color: #fff; background: var(--danger); }
.button-small { min-height: 32px; padding: 0 11px; font-size: 12px; }
.button:disabled { opacity: .45; cursor: not-allowed; }
.button-wide { width: 100%; min-height: 46px; margin-top: 10px; }
.field-error { color: var(--danger); font-size: 12px; }
.label-row { display: flex; align-items: center; justify-content: space-between; }
.icon-text-button { padding: 2px 0; display: inline-flex; gap: 5px; align-items: center; border: 0; color: var(--muted); background: none; cursor: pointer; font-size: 12px; }
.icon-text-button svg { width: 15px; }
.account-data-textarea { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.public-card-code { color: #4d5865; font-weight: 650; overflow-wrap: anywhere; }
.guide-panel .section-heading { margin-bottom: 26px; }
.guide-content { display: grid; justify-items: center; text-align: center; }
.guide-icon { width: 58px; height: 58px; display: grid; place-items: center; color: var(--primary); background: #edf4ff; border-radius: var(--radius); }
.guide-icon svg { width: 28px; height: 28px; }
.guide-content h2 { margin: 18px 0 6px; font-size: 18px; }
.guide-content > p { max-width: 480px; margin: 0 0 20px; color: var(--muted); font-size: 13px; }
.guide-address { width: 100%; min-height: 54px; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; gap: 14px; color: #205a9d; background: var(--surface-soft); border: 1px solid var(--border); border-radius: var(--radius); font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; text-align: left; }
.guide-address:hover { border-color: #a9bbe4; background: #f5f8fe; }
.guide-address span { min-width: 0; overflow-wrap: anywhere; }
.guide-address svg { width: 17px; }
.guide-actions { margin-top: 28px; padding-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--border); }
.guide-actions .button { min-width: 124px; }
.submit-actions { margin-top: 10px; display: grid; grid-template-columns: minmax(124px, .45fr) minmax(0, 1fr); gap: 10px; }
.submit-actions .button { width: 100%; min-width: 0; min-height: 46px; }
.alert { padding: 11px 13px; border: 1px solid; border-radius: var(--radius); font-size: 13px; }
.alert-error, .alert-danger { color: #8e2929; border-color: #ebbbbb; background: var(--danger-bg); }
.alert-success { color: #106943; border-color: #b7decf; background: var(--success-bg); }
.alert-warning { color: #805009; border-color: #ecd19e; background: var(--warning-bg); }
.confirm-list { margin: 0; border-top: 1px solid var(--border); }
.confirm-list > div { min-height: 58px; display: grid; grid-template-columns: 135px 1fr; align-items: center; border-bottom: 1px solid var(--border); }
.confirm-list dt { color: var(--muted); }
.confirm-list dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.confirm-list.compact > div { min-height: 52px; }
.action-row { margin-top: 28px; display: flex; justify-content: flex-end; gap: 10px; }
.status { width: max-content; min-height: 24px; padding: 2px 9px; display: inline-flex; align-items: center; border-radius: 99px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.status-success, .status-completed { color: var(--success); background: var(--success-bg); }
.status-processing { color: var(--primary); background: #eaf0ff; }
.status-failed { color: var(--danger); background: var(--danger-bg); }
.status-neutral { color: #5e6671; background: #eef0f3; }
.centered { text-align: center; }
.status-panel { padding-top: 34px; }
.status-symbol { width: 64px; height: 64px; margin: 0 auto 18px; display: grid; place-items: center; border-radius: 50%; }
.status-symbol svg { width: 31px; height: 31px; }
.status-symbol-processing { color: var(--primary); background: #eaf0ff; }
.status-symbol-processing svg { animation: spin 1.2s linear infinite; }
.status-symbol-completed { color: var(--success); background: var(--success-bg); }
.status-symbol-failed { color: var(--danger); background: var(--danger-bg); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Staff workspace */
.staff-body { min-height: 100vh; background: var(--bg); }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 10; width: 224px; display: flex; flex-direction: column; color: #dfe4eb; background: var(--sidebar); }
.sidebar-brand { height: 68px; padding: 0 20px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid rgba(255,255,255,.08); color: #fff; font-size: 16px; font-weight: 700; }
.sidebar-brand .brand-mark { background: var(--primary); }
.sidebar-nav { padding: 16px 12px; display: grid; gap: 4px; }
.sidebar-nav > a { min-height: 40px; padding: 0 12px; display: flex; align-items: center; gap: 11px; border-radius: var(--radius); color: #aeb6c2; font-size: 13px; }
.sidebar-nav > a:hover { color: #fff; background: rgba(255,255,255,.06); }
.sidebar-nav > a.active { color: #fff; background: var(--primary); }
.sidebar-nav svg { width: 17px; }
.nav-label { margin: 17px 12px 6px; color: #747e8c; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.sidebar-footer { margin-top: auto; padding: 14px 14px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid rgba(255,255,255,.08); }
.user-summary { min-width: 0; display: flex; align-items: center; gap: 9px; }
.user-summary > span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #38404c; font-weight: 700; }
.user-summary div { min-width: 0; display: grid; }
.user-summary strong { max-width: 105px; overflow: hidden; text-overflow: ellipsis; color: #fff; font-size: 12px; white-space: nowrap; }
.user-summary small { color: #8993a0; font-size: 10px; }
.icon-button { width: 32px; height: 32px; padding: 0; display: inline-grid; place-items: center; border: 1px solid var(--border); border-radius: var(--radius); color: var(--muted); background: var(--surface); cursor: pointer; }
.icon-button:hover { color: var(--primary); border-color: #a9bbe4; }
.icon-button svg { width: 16px; }
.icon-button.dark { color: #9ea7b3; border-color: transparent; background: transparent; }
.icon-button-quiet { width: 26px; height: 26px; color: #89929d; border-color: transparent; background: transparent; }
.staff-main { min-height: 100vh; margin-left: 224px; }
.topbar { height: 68px; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar-title { font-weight: 700; }
.topbar-meta, .topbar-meta span, .topbar-back { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.topbar-meta svg, .topbar-back svg { width: 15px; }
.topbar-separator { margin: 0 8px; color: #a4abb4; }
.staff-content { width: min(1440px, 100%); padding: 28px; }
.messages { margin-bottom: 16px; display: grid; gap: 8px; }
.page-heading, .detail-heading { min-height: 64px; margin-bottom: 22px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.page-heading h1, .detail-heading h1 { margin: 0 0 5px; font-size: 23px; line-height: 1.3; }
.detail-heading h1 { margin-top: 8px; }
.page-heading p, .detail-heading p { margin: 0; color: var(--muted); }
.metric-strip { margin-bottom: 24px; display: grid; grid-template-columns: repeat(5, minmax(150px, 1fr)); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.metric-strip.four { grid-template-columns: repeat(4, 1fr); }
.metric-strip > a, .metric-strip > div { min-width: 0; padding: 19px 20px; display: grid; border-right: 1px solid var(--border); }
.metric-strip > :last-child { border-right: 0; }
.metric-strip span { color: var(--muted); font-size: 12px; }
.metric-strip strong { margin: 4px 0 1px; font-size: 26px; }
.metric-strip small { color: var(--muted); font-size: 11px; }
.tone-warning { color: var(--warning) !important; }
.tone-danger { color: var(--danger) !important; }
.tone-success { color: var(--success) !important; }
.table-section, .detail-section, .form-section { margin-bottom: 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.section-bar { min-height: 66px; padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--border); }
.section-bar h2 { margin: 0 0 2px; font-size: 15px; }
.section-bar p { margin: 0; color: var(--muted); font-size: 11px; }
.text-link { display: inline-flex; align-items: center; gap: 4px; color: var(--primary); font-size: 12px; font-weight: 650; }
.text-link svg { width: 14px; }
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.table-section .table-wrap { border: 0; border-radius: 0 0 var(--radius) var(--radius); }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th { height: 40px; padding: 0 14px; color: var(--muted); background: var(--surface-soft); border-bottom: 1px solid var(--border); text-align: left; font-size: 11px; font-weight: 700; }
td { min-height: 48px; padding: 11px 14px; border-bottom: 1px solid #e8ebef; font-size: 12px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfcfd; }
.cell-sub { margin-top: 2px; display: block; color: var(--muted); }
.cell-action { width: 1%; text-align: right; }
.cell-actions { display: flex; justify-content: flex-end; gap: 6px; }
.code-cell { display: flex; align-items: center; gap: 5px; }
.check-cell { width: 38px; padding-right: 0; }
.check-cell input, .check-label input { width: 15px; height: 15px; margin: 0; }
.mono, .mono-link { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.mono-link { color: var(--primary); }
.wrap { overflow-wrap: anywhere; white-space: normal; }
.empty-state { min-height: 180px; display: grid; place-items: center; align-content: center; gap: 5px; color: var(--muted); text-align: center; }
.empty-state svg { width: 25px; height: 25px; margin-bottom: 4px; color: #9ba4af; }
.empty-state strong { color: #424951; }
.empty-state span { font-size: 11px; }
.toolbar, .filter-bar, .bulk-bar { margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tabs { display: flex; border-bottom: 1px solid var(--border); }
.tabs a { min-width: 84px; padding: 9px 13px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; color: var(--muted); border-bottom: 2px solid transparent; text-align: center; font-size: 12px; }
.tabs a.active { color: var(--primary); border-color: var(--primary); font-weight: 700; }
.tab-count { min-width: 20px; height: 20px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; color: #5e6671; background: #eef0f3; border-radius: 10px; font-size: 10px; font-weight: 700; line-height: 1; }
.tabs a.active .tab-count { color: #fff; background: var(--primary); }
.tabs .tab-count-danger, .tabs a.active .tab-count-danger { color: var(--danger); background: var(--danger-bg); }
.search-form, .filter-inline { display: flex; align-items: center; gap: 8px; }
.search-form { position: relative; }
.search-form > svg { position: absolute; left: 11px; width: 15px; color: var(--muted); }
.search-form input { width: 260px; height: 36px; padding-left: 34px; }
.filter-bar { padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.filter-bar select { width: 150px; }
.search-control { min-width: 260px; flex: 1; position: relative; }
.search-control svg { position: absolute; left: 11px; top: 11px; width: 16px; color: var(--muted); }
.search-control input { height: 40px; padding-left: 36px; }
.bulk-tools { margin-bottom: 12px; display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.bulk-tools .bulk-bar { margin-bottom: 0; }
.bulk-bar { min-height: 54px; padding: 8px 12px; justify-content: flex-start; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.bulk-bar > span { margin-right: 3px; font-weight: 700; white-space: nowrap; }
.bulk-bar select { width: 120px; flex: 0 0 120px; }
.bulk-bar input { width: 145px; height: 34px; flex: 0 0 145px; }
.bulk-bar input[hidden] { display: none; }
.export-bar input { width: 135px; flex-basis: 135px; }
.check-label { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; font-size: 11px; }
.bulk-bar .check-label input { width: 15px; height: 15px; flex: 0 0 15px; }
.pagination { min-height: 56px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; }
.pagination div { display: flex; align-items: center; gap: 10px; }
.compact-actions { margin: 0; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.data-list { margin: 0; padding: 5px 18px; }
.data-list > div { min-height: 48px; display: grid; grid-template-columns: 120px 1fr; align-items: center; border-bottom: 1px solid #e9ecf0; }
.data-list > div:last-child { border: 0; }
.data-list dt { color: var(--muted); font-size: 12px; }
.data-list dd { margin: 0; font-size: 12px; font-weight: 600; }
.detail-section.prominent { border-color: #b8c8ec; }
.link-title-row { display: flex; align-items: center; gap: 9px; }
.link-title-row .status { min-height: 22px; }
.link-title-row .status svg { width: 13px; height: 13px; }
.link-refreshing svg, .link-panel [aria-busy="true"] svg { animation: spin 1.2s linear infinite; }
.link-state-note { margin: 14px 18px 0; min-height: 40px; padding: 9px 12px; display: flex; align-items: center; gap: 8px; border: 1px solid; border-radius: var(--radius); font-size: 12px; }
.link-state-note svg { width: 16px; }
.link-state-pending { color: #805009; border-color: #ecd19e; background: var(--warning-bg); }
.link-state-failed { color: #8e2929; border-color: #ebbbbb; background: var(--danger-bg); }
.secret-display, .sensitive-placeholder { margin: 14px 18px 18px; min-height: 74px; padding: 14px; border: 1px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface-soft); }
.sensitive-placeholder { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); }
.secret-display code { display: block; color: #353d47; font: 11px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; white-space: pre-wrap; }
.secret-display.revealed { border-style: solid; border-color: #e1c58f; background: #fffbf2; }
.secret-toolbar { margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; color: var(--warning); font-size: 11px; font-weight: 700; }
.secret-toolbar span { display: flex; align-items: center; gap: 6px; }
.large-code { font-size: 17px !important; font-weight: 700 !important; }
.inline-reveal { padding: 16px 18px 0; display: flex; gap: 8px; }
.inline-reveal input { height: 40px; }
.confirm-dialog { width: min(460px, calc(100% - 32px)); padding: 0; color: var(--text); border: 0; border-radius: var(--radius); background: transparent; box-shadow: 0 20px 60px rgba(17, 24, 39, .22); }
.confirm-dialog::backdrop { background: rgba(23, 27, 34, .52); }
.confirm-dialog-shell { padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.confirm-dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.confirm-dialog-header h2 { margin: 0 0 3px; font-size: 17px; }
.confirm-dialog-header p, .confirm-dialog-copy { margin: 0; color: var(--muted); font-size: 12px; }
.confirm-dialog-summary { margin: 18px 0 12px; padding: 14px; display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-soft); }
.confirm-dialog-summary span { color: var(--muted); font-size: 12px; }
.confirm-dialog-summary strong { font-size: 20px; }
.confirm-dialog-summary .confirm-dialog-email { min-width: 0; max-width: 68%; font-size: 13px; overflow-wrap: anywhere; text-align: right; }
.confirm-dialog-error { margin-top: 12px; }
.confirm-dialog-actions { margin-top: 20px; display: flex; justify-content: flex-end; gap: 8px; }
.danger-zone { margin-top: 22px; padding: 18px; border: 1px solid #e9b5b5; border-radius: var(--radius); background: #fffafa; }
.danger-zone h2 { margin: 0 0 10px; color: var(--danger); font-size: 14px; }
.danger-zone form { display: flex; gap: 10px; align-items: flex-end; }
.danger-zone textarea { min-height: 70px; }
.danger-zone button { flex: 0 0 auto; }
.neutral-zone { border-color: var(--border); background: var(--surface); }
.neutral-zone h2 { color: var(--text); }
.form-section { max-width: 800px; padding: 22px; }
.form-section.narrow { max-width: 560px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field { display: grid; gap: 6px; }
.form-field label { font-size: 12px; font-weight: 700; }
.form-field small { color: var(--muted); font-size: 10px; }
.form-field input { height: 40px; }
.form-field textarea { min-height: 86px; }
.span-2 { grid-column: 1 / -1; }
.form-actions { padding-top: 5px; display: flex; justify-content: flex-end; gap: 8px; }
.settings-form { padding: 18px; }
.proxy-settings-grid { align-items: start; }
.proxy-connections-input { min-height: 174px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
.proxy-table { min-width: 1120px; }
.proxy-connection { display: block; width: min(440px, 42vw); }
.split-tabs { margin: 10px 0 8px; font-weight: 700; }
.split-tabs.spaced { margin-top: 28px; }
.timeline { padding: 18px 22px; }
.timeline > div { min-height: 66px; padding-left: 24px; position: relative; border-left: 1px solid var(--border); }
.timeline > div:last-child { border-left-color: transparent; }
.timeline-dot { position: absolute; left: -5px; top: 3px; width: 9px; height: 9px; border: 2px solid var(--surface); border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.timeline strong { font-size: 12px; }
.timeline p { margin: 1px 0; color: var(--muted); font-size: 11px; }
.timeline time { color: #9098a2; font-size: 10px; }

/* Login */
.login-body { min-height: 100vh; display: grid; place-items: center; background: var(--bg); }
.login-shell { width: min(400px, calc(100% - 32px)); }
.login-brand { margin: 0 auto 20px; width: max-content; }
.login-panel { padding: 32px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.login-panel .stack-form { gap: 8px; }
.login-panel input { height: 42px; }
.login-note { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: 11px; }
.login-note svg { width: 14px; }
.clipboard-helper { position: fixed; opacity: 0; pointer-events: none; }

@media (max-width: 620px) {
  .public-header { height: 60px; padding: 0 18px; }
  .secure-label { font-size: 0; }
  .public-shell { margin-top: 32px; }
  .public-panel { padding: 28px 22px 30px; }
  .section-heading h1 { font-size: 23px; }
  .step small { max-width: 54px; text-align: center; line-height: 1.3; }
  .steps { margin-bottom: 22px; }
  .step { gap: 6px; }
  .step > span { width: 27px; height: 27px; }
  .guide-content > p { font-size: 12px; }
  .guide-address { font-size: 10px; }
  .guide-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .guide-actions .button { width: 100%; min-width: 0; }
  .submit-actions { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1050px) {
  .metric-strip { grid-template-columns: repeat(3, 1fr); }
  .metric-strip > :nth-child(3) { border-right: 0; }
  .metric-strip > :nth-child(n+4) { border-top: 1px solid var(--border); }
  .filter-bar { flex-wrap: wrap; }
  .search-control { flex-basis: 100%; }
  .bulk-tools { grid-template-columns: 1fr; }
  .bulk-bar { overflow-x: auto; }
}

@media (max-width: 760px) {
  .sidebar { width: 62px; }
  .sidebar-brand { padding: 0 16px; }
  .sidebar-brand > span:last-child, .sidebar-nav > a { font-size: 0; }
  .sidebar-nav > a { padding: 0; justify-content: center; }
  .sidebar-nav svg { width: 19px; }
  .nav-label, .user-summary div, .user-summary > span, .sidebar-footer form { display: none; }
  .staff-main { margin-left: 62px; }
  .topbar, .staff-content { padding-left: 16px; padding-right: 16px; }
  .page-heading, .detail-heading { display: grid; }
  .metric-strip, .metric-strip.four { grid-template-columns: 1fr 1fr; }
  .metric-strip > * { border-top: 1px solid var(--border); }
  .metric-strip > :nth-child(-n+2) { border-top: 0; }
  .metric-strip > :nth-child(2n) { border-right: 0; }
  .detail-grid { grid-template-columns: 1fr; }
  .link-section-bar { align-items: stretch; flex-direction: column; }
  .link-section-bar .action-row { justify-content: flex-start; flex-wrap: wrap; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .toolbar .tabs { width: 100%; }
  .toolbar .tabs a { flex: 1 1 0; min-width: 0; padding-right: 6px; padding-left: 6px; gap: 4px; white-space: nowrap; }
  .search-form input { width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .danger-zone form { align-items: stretch; flex-direction: column; }
  .confirm-dialog-actions { display: grid; grid-template-columns: 1fr; }
}
