:root {
  --ink: #171714;
  --muted: #6c6b64;
  --paper: #f3f0e7;
  --panel: #fbfaf5;
  --line: #d8d4c9;
  --acid: #dfff4f;
  --orange: #ff6741;
  --red: #c93b31;
  --green: #2f7153;
  --blue: #4361b2;
  --shadow: 0 16px 50px rgba(31, 29, 22, .08);
  --mono: "DM Mono", Consolas, monospace;
  --sans: "Noto Sans SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.muted { color: var(--muted); }

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand > span:last-child { display: grid; line-height: 1; }
.brand strong { font-size: 20px; letter-spacing: -.04em; }
.brand small { margin-top: 6px; color: var(--muted); font: 10px/1 var(--mono); letter-spacing: .18em; }
.brand-mark { width: 34px; height: 32px; position: relative; display: inline-flex; align-items: center; }
.brand-mark i { display: block; width: 17px; height: 17px; background: var(--ink); transform: rotate(45deg); position: absolute; }
.brand-mark i:nth-child(1) { left: 1px; opacity: .18; }
.brand-mark i:nth-child(2) { left: 8px; opacity: .55; }
.brand-mark i:nth-child(3) { left: 15px; }

.public-shell { max-width: 1440px; margin: 0 auto; padding: 0 5vw; }
.public-header { min-height: 92px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.header-links { display: flex; align-items: center; gap: 34px; font-size: 14px; }
.header-links a:not(.outline-link) { color: var(--muted); }
.header-links a:hover { color: var(--ink); }
.outline-link { padding: 10px 18px; border: 1px solid var(--ink); font-weight: 600; transition: .2s; }
.outline-link:hover { background: var(--ink); color: white; }

.public-hero { min-height: 560px; display: grid; grid-template-columns: 1.08fr .92fr; align-items: center; gap: 7vw; border-bottom: 1px solid var(--line); }
.eyebrow, .panel-kicker, .section-number { font: 11px/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; padding: 9px 12px; border: 1px solid var(--line); background: rgba(255,255,255,.3); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(47,113,83,.12); }
.public-hero h1 { margin: 25px 0 22px; font-size: clamp(48px, 5.4vw, 82px); line-height: 1.05; letter-spacing: -.065em; }
.public-hero h1 em { font-style: normal; color: var(--orange); }
.public-hero p { max-width: 610px; font-size: 16px; line-height: 1.9; color: var(--muted); }
.trust-row { display: flex; gap: 25px; margin-top: 40px; font: 10px var(--mono); color: var(--muted); }
.hero-visual { min-height: 420px; position: relative; display: grid; place-items: center; }
.hero-visual::before { content: ""; position: absolute; inset: 10%; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 24px 24px; opacity: .55; mask-image: radial-gradient(circle, black 25%, transparent 72%); }
.ticket { width: min(440px, 80%); aspect-ratio: 1.9; border: 1px solid var(--ink); padding: 28px; position: absolute; box-shadow: var(--shadow); }
.ticket::before, .ticket::after { content: ""; position: absolute; width: 26px; height: 26px; border-radius: 50%; background: var(--paper); top: 50%; margin-top: -13px; }
.ticket::before { left: -14px; border-right: 1px solid var(--ink); }
.ticket::after { right: -14px; border-left: 1px solid var(--ink); }
.ticket-back { background: var(--ink); color: white; transform: rotate(-8deg) translate(-12px, -8px); font: 10px var(--mono); letter-spacing: .2em; }
.ticket-front { background: var(--acid); transform: rotate(3deg) translate(12px, 14px); display: flex; flex-direction: column; justify-content: space-between; }
.ticket-head, .ticket-foot { display: flex; justify-content: space-between; align-items: center; font: 9px var(--mono); letter-spacing: .12em; }
.ticket-head b { font-size: 24px; letter-spacing: -.08em; }
.ticket-code { padding: 24px 0; border-top: 1px dashed var(--ink); border-bottom: 1px dashed var(--ink); font: 18px var(--mono); letter-spacing: .12em; text-align: center; }
.seal { width: 86px; height: 86px; border-radius: 50%; background: var(--orange); color: white; position: absolute; right: 6%; bottom: 8%; z-index: 5; display: grid; place-items: center; text-align: center; font: 9px/1.1 var(--mono); transform: rotate(-12deg); border: 4px double rgba(255,255,255,.8); }
.seal b { display: block; font-size: 20px; }

.action-grid { display: grid; grid-template-columns: 1.18fr .82fr; gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 70px 0 44px; }
.action-card { background: var(--panel); padding: clamp(28px, 4vw, 58px); }
.primary-card { background: #fffef9; }
.section-number { color: var(--orange); }
.action-card h2 { font-size: 30px; letter-spacing: -.04em; margin: 16px 0 8px; }
.action-card > p { font-size: 14px; line-height: 1.75; }
.stack-form { display: grid; gap: 18px; margin-top: 32px; }
.stack-form label, .form-grid > label { display: grid; gap: 9px; font-size: 13px; font-weight: 600; }
input, select, textarea { width: 100%; border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 15px 16px; outline: none; border-radius: 0; transition: border-color .2s, box-shadow .2s; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(23,23,20,.06); }
textarea { resize: vertical; min-height: 130px; }
.button { border: 1px solid var(--ink); min-height: 52px; padding: 0 18px; display: inline-flex; justify-content: space-between; align-items: center; font-weight: 700; transition: .2s; }
.button b { font-size: 20px; }
.button:hover { transform: translateY(-2px); box-shadow: 5px 5px 0 var(--acid); }
.button:disabled { opacity: .55; cursor: wait; transform: none; box-shadow: none; }
.button-dark { background: var(--ink); color: white; }
.button-light { background: transparent; color: var(--ink); }
.compact-form { margin-top: 52px; }
.form-note { font-size: 11px !important; margin: 16px 0 0; padding-left: 14px; border-left: 2px solid var(--line); }
.result-panel { margin-top: 22px; border: 1px solid var(--ink); background: var(--acid); padding: 20px; }
.result-panel.error { background: #fff0ed; border-color: var(--red); }
.result-title { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; }
.result-title i { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: white; font-style: normal; }
.result-panel dl { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 20px 0 0; }
.result-panel dl div { border-top: 1px solid rgba(23,23,20,.25); padding-top: 9px; }
.result-panel dt { font: 10px var(--mono); color: var(--muted); }
.result-panel dd { margin: 5px 0 0; font-size: 13px; font-weight: 700; word-break: break-all; }
.status-legend { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; border-top: 1px solid var(--line); margin-top: 38px; padding-top: 24px; font-size: 12px; color: var(--muted); }
.status-dot { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; }
.status-dot.unused { background: var(--green); }.status-dot.used { background: var(--ink); }.status-dot.frozen { background: var(--blue); }.status-dot.expired { background: var(--red); }

.feature-strip { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); background: var(--panel); }
.feature-strip div { min-height: 105px; padding: 23px; display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--line); }
.feature-strip div:last-child { border: 0; }
.feature-strip b { font: 24px var(--mono); }
.feature-strip span { color: var(--muted); font-size: 12px; }
.public-footer { min-height: 170px; display: flex; justify-content: space-between; align-items: center; }
.public-footer > div { display: flex; gap: 24px; align-items: center; }
.public-footer span, .public-footer a { color: var(--muted); font-size: 12px; }

.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 80px 20px; position: relative; background-image: linear-gradient(rgba(216,212,201,.55) 1px, transparent 1px), linear-gradient(90deg, rgba(216,212,201,.55) 1px, transparent 1px); background-size: 35px 35px; }
.login-shell::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at center, rgba(243,240,231,.35), var(--paper) 68%); }
.login-brand { position: absolute; left: 5vw; top: 35px; z-index: 1; }
.login-card { width: min(530px, 100%); z-index: 1; background: var(--panel); border: 1px solid var(--ink); padding: clamp(34px, 5vw, 62px); box-shadow: 12px 12px 0 var(--acid); }
.login-intro h1 { font-size: 44px; letter-spacing: -.06em; margin: 20px 0 8px; }
.login-intro p { color: var(--muted); font-size: 14px; line-height: 1.8; }
.login-security { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); display: grid; gap: 8px; color: var(--muted); font: 10px var(--mono); }
.login-security span::before { content: "✓"; color: var(--green); margin-right: 8px; }
.back-home { position: absolute; z-index: 2; left: 5vw; bottom: 35px; font-size: 12px; color: var(--muted); }
.inline-error { color: var(--red); background: #fff0ed; padding: 12px; font-size: 12px; border-left: 3px solid var(--red); }

.console-shell { min-height: 100vh; display: grid; grid-template-columns: 246px 1fr; background: #efede5; }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--ink); color: white; display: flex; flex-direction: column; padding: 28px 18px 20px; }
.sidebar-brand { padding: 0 12px 28px; border-bottom: 1px solid #34342f; }
.sidebar-brand .brand-mark i { background: var(--acid); }
.sidebar-brand small { color: #8d8c84; }
.side-nav { display: grid; gap: 5px; margin-top: 25px; }
.side-nav button { border: 0; background: transparent; color: #99988f; padding: 13px 14px; text-align: left; display: flex; gap: 13px; align-items: center; font-size: 13px; }
.side-nav button span { width: 18px; text-align: center; font: 16px var(--mono); }
.side-nav button:hover { color: white; background: #24241f; }
.side-nav button.active { color: var(--ink); background: var(--acid); font-weight: 700; }
.sidebar-foot { margin-top: auto; border-top: 1px solid #34342f; padding-top: 18px; display: flex; align-items: center; justify-content: space-between; }
.user-chip { display: flex; align-items: center; gap: 10px; min-width: 0; }
.user-chip > span { width: 35px; height: 35px; flex: 0 0 35px; display: grid; place-items: center; background: var(--orange); font: 13px var(--mono); color: white; }
.user-chip div { display: grid; min-width: 0; }
.user-chip b { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.user-chip small { color: #85847c; font-size: 10px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.icon-button { border: 0; background: transparent; color: #aaa99f; font-size: 20px; }
.console-main { min-width: 0; padding: 0 3.2vw 60px; }
.console-header { min-height: 124px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.breadcrumb { color: var(--muted); font: 10px var(--mono); letter-spacing: .07em; text-transform: uppercase; }
.console-header h1 { font-size: 27px; letter-spacing: -.04em; margin: 8px 0 0; }
.header-actions { display: flex; align-items: center; gap: 22px; font-size: 12px; }
.header-actions a { text-decoration: underline; text-underline-offset: 4px; }
.system-state { color: var(--muted); }
.system-state i { display: inline-block; width: 7px; height: 7px; background: var(--green); border-radius: 50%; margin-right: 6px; }
.console-view { display: none; padding-top: 30px; }
.console-view.active { display: block; animation: rise .28s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.metric-card { min-height: 170px; background: var(--panel); border: 1px solid var(--line); padding: 23px; display: flex; flex-direction: column; }
.metric-card.accent { background: var(--acid); border-color: var(--ink); }
.metric-card > span { font: 10px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.metric-card strong { font-size: 36px; letter-spacing: -.05em; margin: auto 0 8px; }
.metric-card small { color: var(--muted); font-size: 11px; }
.metric-card small b { color: var(--ink); }
.dashboard-grid { display: grid; grid-template-columns: 1.45fr .55fr; gap: 14px; margin-top: 14px; }
.panel { background: var(--panel); border: 1px solid var(--line); padding: 26px; }
.panel-head { min-height: 45px; display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 25px; }
.panel-head h2, .panel h2 { font-size: 20px; margin: 7px 0 0; letter-spacing: -.035em; }
.panel-head > span, .panel-head > a { font-size: 11px; color: var(--muted); }
.panel-kicker { color: var(--orange); }
.chart-panel { min-height: 370px; }
.bar-chart { height: 250px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; align-items: end; padding-top: 15px; border-bottom: 1px solid var(--ink); }
.bar-chart > div { display: flex; height: 100%; flex-direction: column; justify-content: flex-end; align-items: stretch; gap: 8px; text-align: center; font: 10px var(--mono); color: var(--muted); }
.bar-chart i { min-height: 3px; background: var(--ink); display: block; transition: height .5s ease; }
.bar-chart > div:nth-child(1) i { background: var(--acid); border: 1px solid var(--ink); }
.bar-chart > div:nth-child(3) i { background: var(--orange); }
.quick-panel { display: flex; flex-direction: column; }
.quick-panel button { border: 0; border-top: 1px solid var(--line); background: transparent; padding: 17px 2px; display: flex; justify-content: space-between; text-align: left; font-size: 12px; }
.quick-panel button:hover { padding-left: 8px; color: var(--orange); }
.split-layout { display: grid; grid-template-columns: 1.3fr .7fr; gap: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.form-grid .span-2 { grid-column: span 2; }
.form-grid fieldset { border: 1px solid var(--line); padding: 15px; display: flex; gap: 24px; }
.form-grid legend { font-size: 12px; font-weight: 600; padding: 0 6px; }
.form-grid fieldset label { font-size: 12px; }
.form-grid input[type="checkbox"] { width: auto; padding: 0; margin-right: 5px; }
.preview-panel { background: var(--ink); color: white; }
.preview-panel h2 { font-size: 26px; }
.preview-panel dl { margin: 30px 0; }
.preview-panel dl div { display: flex; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid #3e3e38; }
.preview-panel dt { color: #aaa99f; font-size: 11px; }
.preview-panel dd { margin: 0; font: 13px var(--mono); }
.preview-panel p { color: #929188; font-size: 11px; line-height: 1.8; }
.batch-result { margin-top: 14px; }
.batch-result textarea { min-height: 280px; font: 12px/1.8 var(--mono); }
.data-panel { padding: 0; }
.data-panel .panel-head { padding: 26px 26px 0; }
.table-tools { display: flex; gap: 8px; }
.table-tools input { width: 190px; padding: 9px 11px; }
.table-tools select { width: 125px; padding: 9px; }
.table-tools button, .table-tools a { border: 1px solid var(--ink); background: transparent; padding: 8px 12px; font-size: 11px; color: var(--ink); }
.bulk-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 26px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #f7f4ec; color: var(--muted); font-size: 11px; }
.bulk-toolbar label { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.bulk-toolbar select { min-width: 150px; padding: 8px 10px; border: 1px solid var(--line); background: #fffdf8; }
.bulk-toolbar button { padding: 8px 12px; }
.bulk-toolbar small { color: var(--muted); }
.bulk-toolbar select { width: auto; }
.bulk-toolbar input[type="checkbox"], .delivery-inventory-panel input[type="checkbox"] { width: 16px; height: 16px; padding: 0; margin: 0; accent-color: var(--ink); }
.relogin-runtime-panel, .delivery-action-results { margin-bottom: 18px; }
.admin-proxy-trigger { min-height: 38px; gap: 7px; padding: 0 12px; font-size: 12px; white-space: nowrap; }
body.relogin-settings-open { overflow: hidden; }
.relogin-settings-modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 24px; overflow: hidden; overscroll-behavior: contain; background: rgba(28,27,23,.5); }
.relogin-settings-card { display: flex; flex-direction: column; width: min(1080px, 100%); max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); padding: 0; overflow: hidden; border-radius: 14px; margin: 0; box-shadow: 0 24px 80px rgba(0,0,0,.25); outline: none; }
.relogin-settings-titlebar { flex: 0 0 auto; display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; padding: 23px 28px 20px; border-bottom: 1px solid var(--line); background: #f8f5eb; }
.relogin-settings-eyebrow { font-size: 10px; letter-spacing: .08em; color: #8c7953; }
.relogin-settings-titlebar h2 { font-size: 24px; margin: 6px 0 0; }
.relogin-settings-titlebar p { margin: 8px 0 0; font-size: 11px; color: var(--muted); line-height: 1.6; }
.relogin-settings-close { flex: 0 0 36px; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 7px; background: transparent; font-size: 26px; line-height: 1; color: #615c50; }
.relogin-settings-close:hover { background: #ede6d5; }
.relogin-settings-close:focus-visible, .admin-proxy-trigger:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
.relogin-settings-body { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(290px, 1fr); min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.relogin-settings-config { min-width: 0; padding: 26px 28px 22px; }
.relogin-settings-group + .relogin-settings-group { margin-top: 25px; padding-top: 23px; border-top: 1px solid var(--line); }
.relogin-section-heading { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 18px; }
.relogin-section-heading > span { display: grid; place-items: center; flex: 0 0 27px; height: 27px; border: 1px solid #ded5bf; border-radius: 50%; color: #8a774d; font: 10px var(--mono); background: #f6f0df; }
.relogin-section-heading h3, .relogin-diagnostics-heading h3 { margin: 2px 0 0; font-size: 15px; }
.relogin-section-heading p, .relogin-diagnostics-heading p { margin: 6px 0 0; font-size: 11px; color: var(--muted); line-height: 1.6; }
.relogin-enable-row { padding: 13px 14px; margin-bottom: 18px; border: 1px solid #ded7c7; border-radius: 7px; background: #f7f2e6; }
.relogin-enable-row > span { display: grid; gap: 4px; font-size: 13px; }
.relogin-label-hint { color: var(--muted); font-size: 10px; font-weight: 400; }
.relogin-settings-card .relogin-field-grid { gap: 16px; }
.relogin-settings-card .relogin-field-grid label { gap: 7px; font-size: 12px; }
.relogin-settings-card .relogin-field-grid input, .relogin-settings-card .relogin-field-grid select, .relogin-settings-card .relogin-field-grid textarea { min-width: 0; padding: 11px 12px; border-radius: 6px; background: #fffefa; font-size: 12px; }
.relogin-settings-card .relogin-field-grid input:focus, .relogin-settings-card .relogin-field-grid select:focus, .relogin-settings-card .relogin-field-grid textarea:focus { outline: 2px solid #b69b63; outline-offset: 1px; border-color: #b69b63; }
.relogin-settings-card .relogin-field-grid small { font-size: 10px; line-height: 1.6; }
.relogin-settings-card .relogin-clear-row { padding-top: 4px; font-size: 11px; color: var(--muted); font-weight: 400; }
.relogin-proxy-format-tools { min-width: 0; }
.relogin-proxy-preview-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.relogin-proxy-preview-heading .button { min-height: 36px; border-radius: 6px; padding: 0 15px; font-size: 12px; }
.relogin-proxy-preview-heading small { font-size: 10px; }
.relogin-proxy-preview { border: 1px solid #ded7c7; border-radius: 7px; padding: 13px 14px; background: #faf7ef; font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; }
.relogin-proxy-preview > strong { font-size: 12px; }
.relogin-proxy-preview p { margin: 7px 0 0; }
.relogin-proxy-preview p:first-child { margin-top: 0; }
.relogin-proxy-preview.ready { border-color: #a7bda3; background: #f0f6ec; }
.relogin-proxy-preview.error { border-color: #d7aaa0; background: #fff2ed; }
.relogin-proxy-preview.stale { border-color: #d9c68f; background: #faf2da; }
.relogin-proxy-preview-counts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.relogin-proxy-preview-counts > div { border-right: 1px solid rgba(110,101,77,.16); }
.relogin-proxy-preview-counts > div:last-child { border-right: 0; }
.relogin-proxy-preview-counts dt { font-size: 10px; color: var(--muted); }
.relogin-proxy-preview-counts dd { margin: 2px 0 0; font: 19px var(--mono); }
.relogin-proxy-preview ul { margin: 12px 0 0; padding-left: 18px; max-height: 180px; overflow-y: auto; }
.relogin-proxy-preview li + li { margin-top: 8px; }
.relogin-proxy-preview li small { display: block; font-family: var(--mono); font-size: 9px; }
.relogin-proxy-preview-note { font-size: 10px; color: var(--muted); }
.relogin-proxy-examples { margin-top: 13px; font-size: 10px; line-height: 1.8; color: var(--muted); }
.relogin-proxy-examples summary { cursor: pointer; color: #665736; font-size: 11px; }
.relogin-proxy-examples dl { margin: 12px 0; }
.relogin-proxy-examples dt { color: var(--ink); font-weight: 600; }
.relogin-proxy-examples dd { margin: 3px 0 10px; overflow-wrap: anywhere; }
.relogin-proxy-examples code { font-family: var(--mono); color: #665736; }
.relogin-proxy-examples p { margin: 0; }
.relogin-config-note { margin: 19px 0 0; font-size: 10px; color: var(--muted); line-height: 1.8; }
.relogin-settings-diagnostics { min-width: 0; padding: 28px 24px; border-left: 1px solid var(--line); background: #f5f1e6; }
.relogin-diagnostics-heading { margin-bottom: 18px; }
.relogin-runtime-details { margin-top: 22px; border-top: 1px solid #ddd5c4; padding-top: 16px; }
.relogin-runtime-details summary { cursor: pointer; font-size: 12px; font-weight: 600; }
.relogin-runtime-details summary > span { margin-left: 7px; font-size: 10px; font-weight: 400; color: var(--muted); }
.relogin-runtime-details summary:focus-visible { outline: 2px solid #b69b63; outline-offset: 4px; }
.relogin-settings-footer { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 24px; border-top: 1px solid var(--line); background: #fbf9f1; }
.relogin-footer-copy { min-width: 0; max-width: 410px; }
.relogin-footer-copy > small { display: block; font-size: 10px; color: var(--muted); line-height: 1.6; }
.relogin-settings-footer .relogin-runtime-buttons { flex: 0 0 auto; gap: 8px; }
.relogin-settings-footer .button { min-height: 40px; padding: 0 15px; border-radius: 6px; white-space: nowrap; }
.relogin-settings-footer .button-dark { background: #332e23; border-color: #332e23; color: #fffaf0; }
.relogin-settings-footer .relogin-refresh-button { padding: 0 8px; border-color: transparent; background: transparent; color: var(--muted); }
@media (max-width: 760px) {
  .admin-theme .console-header { gap: 10px; }
  .admin-theme .console-header h1 { font-size: 22px; }
  .admin-theme .header-actions { display: flex; flex: 0 0 auto; gap: 0; }
  .admin-theme .header-actions .system-state, .admin-theme .header-actions > a { display: none; }
  .relogin-settings-modal { padding: max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom)); }
  .relogin-settings-card { max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); padding: 0; border-radius: 10px; }
  .relogin-settings-titlebar { padding: 18px 18px 15px; gap: 10px; }
  .relogin-settings-titlebar h2 { font-size: 21px; }
  .relogin-settings-titlebar p { font-size: 10px; }
  .relogin-settings-body { grid-template-columns: minmax(0,1fr); }
  .relogin-settings-config { padding: 20px 18px; }
  .relogin-settings-diagnostics { padding: 21px 18px; border-left: 0; border-top: 1px solid var(--line); }
  .relogin-settings-footer { padding: 12px 14px; flex-direction: column; align-items: stretch; gap: 10px; }
  .relogin-footer-copy { max-width: none; }
  .relogin-settings-footer .relogin-runtime-buttons { width: 100%; }
  .relogin-settings-footer .relogin-runtime-buttons .button { flex: 1; padding: 0 8px; font-size: 11px; }
  .relogin-settings-footer .relogin-runtime-buttons .relogin-refresh-button { flex: 0 0 auto; }
  .relogin-settings-card .form-grid { grid-template-columns: minmax(0,1fr); }
  .relogin-settings-card .form-grid .span-2 { grid-column: span 1; }
  .relogin-settings-card input, .relogin-settings-card select, .relogin-settings-card textarea { min-width: 0; }
}
.relogin-runtime-panel .panel-head, .delivery-action-results .panel-head { gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.relogin-runtime-buttons, .delivery-result-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.relogin-runtime-buttons .button, .delivery-result-controls .button, .delivery-action-results .panel-head .button { min-height: 38px; font-size: 12px; }
.relogin-runtime-warning { padding: 12px 14px; border: 1px solid #e1d3ad; border-radius: 7px; background: #fbf2d8; color: #74623a; font-size: 11px; line-height: 1.8; }
.relogin-runtime-warning strong { font-size: 12px; }
.relogin-runtime-warning p { margin: 6px 0 0; }
.relogin-runtime-facts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin: 12px 0 0; }
.relogin-runtime-facts > div { padding: 10px 0; border-bottom: 1px solid #e5dfd2; display: grid; gap: 5px; font-size: 11px; }
.relogin-runtime-facts span { color: var(--muted); }
.relogin-runtime-facts strong { overflow-wrap: anywhere; }
.relogin-runtime-facts .runtime-modules { grid-column: 1 / -1; }
.relogin-network-result { border: 1px solid #dcd4c1; border-radius: 8px; background: #fffdf6; padding: 17px; margin-bottom: 14px; font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }
.relogin-network-result > strong { display: block; font-size: 15px; margin-bottom: 9px; }
.relogin-network-result > small { display: block; margin-top: 13px; padding-top: 11px; border-top: 1px solid rgba(90,82,58,.14); font-size: 10px; color: var(--muted); }
.relogin-network-result.ready { border-color: #98b69d; background: #edf6ed; }
.relogin-network-result.error { border-color: #d9a19b; background: #fff1ed; }
.relogin-network-result p { margin: 6px 0; }
.relogin-network-result dl, .delivery-action-result dl { display: flex; gap: 20px; flex-wrap: wrap; margin: 10px 0 0; }
.relogin-network-result dt, .delivery-action-result dt { color: var(--muted); font-size: 11px; }
.relogin-network-result dd, .delivery-action-result dd { margin: 3px 0 0; font-family: var(--mono); overflow-wrap: anywhere; }
.relogin-proxy-form { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; margin: 0; }
.relogin-proxy-form .relogin-checkbox { display: flex; align-items: center; gap: 9px; }
.relogin-proxy-form .relogin-checkbox input { flex: 0 0 16px; width: 16px; height: 16px; padding: 0; margin: 0; }
.relogin-proxy-form small { color: var(--muted); font-weight: 400; }
.relogin-save-status { margin: 0 0 5px; font-size: 11px; line-height: 1.6; }
.relogin-save-status:empty { display: none; }
.runtime-error { color: var(--red); }
.delivery-batch-progress { margin: 0 0 12px; line-height: 1.7; font-size: 13px; font-weight: 600; }
.delivery-result-controls small { color: var(--muted); font-size: 11px; line-height: 1.6; }
.delivery-action-results-list { margin-top: 16px; display: grid; gap: 10px; max-height: 460px; overflow-y: auto; }
.delivery-action-result { padding: 14px; border: 1px solid var(--line); background: #faf8f1; font-size: 12px; overflow-wrap: anywhere; }
.delivery-action-result.success { border-left: 4px solid var(--green); }
.delivery-action-result.error { border-left: 4px solid var(--red); background: #fff4f0; }
.delivery-action-result header { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.delivery-action-result header > span { font-weight: 700; }
.delivery-action-result.error header > span { color: var(--red); }
.delivery-action-result.success header > span { color: var(--green); }
.delivery-action-result p { margin: 9px 0; line-height: 1.7; }
.delivery-inventory-panel { margin-top: 18px; }
.delivery-inventory-panel .account-selection-cell { position: sticky; left: 0; z-index: 2; width: 44px; min-width: 44px; padding: 12px 14px; background: var(--panel); }
.delivery-inventory-panel .account-action-cell { position: sticky; left: 44px; z-index: 2; width: 164px; min-width: 164px; padding: 10px; background: var(--panel); box-shadow: 4px 0 5px -4px rgba(23,23,20,.35); }
.delivery-inventory-panel th.account-selection-cell, .delivery-inventory-panel th.account-action-cell { background: #e9e6dd; }
.account-actions { display: flex; flex-wrap: wrap; gap: 5px; max-width: 160px; }
.account-actions .table-action { background: #fff; border: 1px solid var(--line); padding: 6px 8px; text-decoration: none; color: var(--ink); }
.account-actions .table-action.danger { color: var(--red); }
.account-actions .table-action:disabled { opacity: .45; cursor: wait; }
.delivery-inventory-panel .account-health-cell { min-width: 220px; max-width: 310px; white-space: normal; overflow-wrap: anywhere; line-height: 1.65; }
.account-last-action { display: grid; gap: 4px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.account-last-action.error > b { color: var(--red); }
.account-last-action.success > b { color: var(--green); }
.account-last-action small { color: var(--muted); }
.relogin-proxy-form textarea[name="proxy_pool"] { font-family: var(--mono); font-size: 12px; line-height: 1.6; }
@media (max-width: 760px) { .relogin-runtime-facts { grid-template-columns: 1fr; } .relogin-runtime-buttons { width: 100%; } .relogin-runtime-buttons .button { flex: 1; justify-content: center; } .delivery-inventory-panel .account-action-cell { min-width: 135px; width: 135px; } .account-actions { max-width: 120px; } }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { background: #e9e6dd; color: var(--muted); font: 9px var(--mono); letter-spacing: .08em; text-align: left; padding: 12px 15px; white-space: nowrap; }
td { padding: 14px 15px; border-bottom: 1px solid var(--line); font-size: 11px; white-space: nowrap; }
td code { font: 11px var(--mono); }
.empty-row { text-align: center; color: var(--muted); padding: 40px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; font: 9px var(--mono); border: 1px solid var(--line); }
.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.status-pill.unused::before, .status-pill.active::before { background: var(--green); }
.status-pill.used::before, .status-pill.revoked::before, .status-pill.disabled::before { background: var(--ink); }
.status-pill.frozen::before { background: var(--blue); }
.status-pill.expired::before, .status-pill.void::before { background: var(--red); }
.table-action { border: 0; background: transparent; text-decoration: underline; text-underline-offset: 3px; font-size: 10px; color: var(--muted); padding: 3px 5px; }
.table-action.danger { color: var(--red); }
.positive { color: var(--green); font-weight: 700; }
.negative { color: var(--red); font-weight: 700; }
.finance-settlements { margin-top: 14px; }
.table-footer { display: flex; justify-content: space-between; align-items: center; padding: 15px 24px; font-size: 10px; color: var(--muted); }
.table-footer div { display: flex; align-items: center; gap: 12px; }
.table-footer button { width: 28px; height: 28px; border: 1px solid var(--line); background: transparent; }
.secret-panel { background: var(--acid); border-color: var(--ink); }
.secret-panel > label { display: grid; gap: 6px; margin-top: 18px; font-size: 11px; }
.secret-panel code { display: block; background: rgba(255,255,255,.5); border: 1px solid var(--ink); padding: 12px; font: 11px/1.6 var(--mono); word-break: break-all; }
.secret-panel .button { width: 100%; margin-top: 18px; }
.admin-theme .side-nav button.active { background: var(--orange); color: white; }
.admin-hero { margin-top: 14px; min-height: 330px; display: flex; align-items: center; justify-content: space-between; overflow: hidden; }
.admin-hero > div:first-child { max-width: 550px; }
.admin-hero h2 { font-size: 42px; margin: 18px 0; }
.admin-hero p { color: var(--muted); line-height: 1.8; }
.admin-orbit { width: 240px; height: 240px; border: 1px solid var(--line); border-radius: 50%; position: relative; display: grid; place-items: center; }
.admin-orbit::before, .admin-orbit::after { content: ""; position: absolute; border: 1px solid var(--line); border-radius: 50%; }
.admin-orbit::before { width: 170px; height: 170px; }.admin-orbit::after { width: 90px; height: 90px; background: var(--acid); }
.admin-orbit b { z-index: 2; font: 22px var(--mono); }
.admin-orbit i { position: absolute; width: 14px; height: 14px; background: var(--orange); border-radius: 50%; z-index: 2; }
.admin-orbit i:nth-child(1) { top: 20px; left: 50%; }.admin-orbit i:nth-child(2) { left: 25px; bottom: 52px; background: var(--blue); }.admin-orbit i:nth-child(3) { right: 18px; bottom: 74px; background: var(--green); }
.compact-table { max-height: 310px; }
.config-panel { max-width: 900px; }
.config-list { display: grid; gap: 8px; margin-top: 25px; }
.config-list > div { display: grid; grid-template-columns: 180px 1fr; gap: 15px; padding: 14px; border: 1px solid var(--line); }
.config-list code { font: 11px var(--mono); word-break: break-all; }

.docs-shell { max-width: 1300px; margin: 0 auto; display: grid; grid-template-columns: 270px 1fr; min-height: 100vh; }
.docs-nav { height: 100vh; position: sticky; top: 0; border-right: 1px solid var(--line); padding: 36px 30px; display: flex; flex-direction: column; }
.docs-nav nav { display: grid; gap: 15px; margin: 55px 0; }
.docs-nav nav a { font-size: 12px; color: var(--muted); }
.docs-nav nav a:hover { color: var(--ink); }
.docs-nav .outline-link { margin-top: auto; text-align: center; }
.docs-content { padding: 70px 8vw 100px; min-width: 0; }
.docs-content header { border-bottom: 1px solid var(--ink); padding-bottom: 45px; }
.docs-content header h1 { font-size: 58px; letter-spacing: -.06em; margin: 24px 0 10px; }
.docs-content header p, .docs-content section > p { color: var(--muted); line-height: 1.8; }
.docs-content section { padding: 55px 0; border-bottom: 1px solid var(--line); position: relative; }
.docs-content h2 { font-size: 24px; margin: 10px 0 22px; }
.doc-index { font: 10px var(--mono); color: var(--orange); }
pre { background: var(--ink); color: #e8e6dc; padding: 20px; overflow: auto; font: 12px/1.75 var(--mono); }
.header-table, .endpoint-list { display: grid; grid-template-columns: 180px 1fr; border: 1px solid var(--line); margin: 20px 0; }
.header-table > *, .endpoint-list > * { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.header-table code, .endpoint-list code { font: 11px var(--mono); background: #e8e5dc; }
.header-table span, .endpoint-list span { font-size: 12px; color: var(--muted); }
.method { display: inline-block; vertical-align: 3px; padding: 5px 7px; margin-right: 8px; color: white; font: 9px var(--mono); }
.method.post { background: var(--orange); }.method.get { background: var(--green); }
.error-codes { display: grid; border: 1px solid var(--line); }
.error-codes div { display: grid; grid-template-columns: 230px 1fr; border-bottom: 1px solid var(--line); }
.error-codes div:last-child { border: 0; }
.error-codes code, .error-codes span { padding: 11px 14px; }
.error-codes code { background: #e8e5dc; font: 10px var(--mono); }
.error-codes span { font-size: 11px; color: var(--muted); }

.toast-region { position: fixed; right: 24px; bottom: 24px; z-index: 999; display: grid; gap: 10px; }
.toast { min-width: 270px; max-width: 380px; padding: 14px 16px; background: var(--ink); color: white; box-shadow: var(--shadow); font-size: 12px; border-left: 5px solid var(--acid); animation: toastIn .2s ease; }
.toast.error { border-color: var(--orange); }
@keyframes toastIn { from { transform: translateY(10px); opacity: 0; } }

@media (max-width: 1050px) {
  .public-hero { grid-template-columns: 1fr; padding: 70px 0; }
  .hero-visual { min-height: 360px; }
  .action-grid { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid, .split-layout { grid-template-columns: 1fr; }
  .console-shell { grid-template-columns: 82px 1fr; }
  .sidebar { padding-inline: 12px; }
  .sidebar-brand > span:last-child, .side-nav button:not(.active) { }
  .sidebar-brand > span:last-child, .side-nav button { font-size: 0; }
  .side-nav button span { font-size: 17px; margin: auto; }
  .side-nav button.active { justify-content: center; }
  .user-chip div, .icon-button { display: none; }
  .user-chip { margin: auto; }
}

@media (max-width: 720px) {
  .public-shell { padding: 0 20px; }
  .public-header { min-height: 76px; }
  .header-links a:not(.outline-link) { display: none; }
  .public-hero { min-height: auto; gap: 15px; }
  .public-hero h1 { font-size: 46px; }
  .trust-row { flex-direction: column; gap: 9px; }
  .hero-visual { min-height: 290px; }
  .ticket { width: 86%; padding: 20px; }
  .ticket-code { font-size: 12px; }
  .action-grid { margin-top: 30px; }
  .feature-strip { grid-template-columns: repeat(2, 1fr); }
  .feature-strip div:nth-child(2) { border-right: 0; }
  .feature-strip div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .public-footer, .public-footer > div { align-items: flex-start; flex-direction: column; }
  .public-footer { padding: 40px 0; gap: 25px; }
  .public-footer > div { gap: 10px; }
  .console-shell { display: block; }
  .sidebar { position: sticky; z-index: 10; width: 100%; height: auto; flex-direction: row; align-items: center; padding: 10px; overflow-x: auto; }
  .sidebar-brand, .sidebar-foot { display: none; }
  .side-nav { display: flex; margin: 0; gap: 6px; min-width: max-content; }
  .side-nav button, .side-nav button.active { font-size: 11px; justify-content: center; }
  .side-nav button span { margin: 0; }
  .console-main { padding: 0 14px 40px; }
  .console-header { min-height: 100px; }
  .header-actions { display: none; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric-card { min-height: 140px; padding: 16px; }
  .metric-card strong { font-size: 28px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: span 1; }
  .responsive-head { display: block; }
  .table-tools { overflow-x: auto; margin-top: 15px; }
  .admin-hero { display: block; }
  .admin-orbit { display: none; }
  .docs-shell { display: block; }
  .docs-nav { height: auto; position: static; border-right: 0; border-bottom: 1px solid var(--line); padding: 20px; }
  .docs-nav nav { display: none; }
  .docs-nav .outline-link { margin: 20px 0 0; }
  .docs-content { padding: 40px 20px; }
  .header-table, .endpoint-list, .error-codes div { grid-template-columns: 1fr; }
}

/* Customer CDK delivery workspace */
body[data-page="public"] {
  margin: 0;
  color: #17202c;
  background:
    radial-gradient(circle at 12% 8%, rgba(39, 170, 174, .13), transparent 26rem),
    radial-gradient(circle at 88% 18%, rgba(31, 128, 183, .12), transparent 28rem),
    #edf3f4;
}
.delivery-shell { min-height: 100vh; display: flex; flex-direction: column; }
.delivery-topbar { height: 74px; padding: 0 clamp(20px, 5vw, 76px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(76,103,117,.17); background: rgba(249,252,252,.78); backdrop-filter: blur(18px); position: sticky; top: 0; z-index: 30; }
.delivery-brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.delivery-brand > span:last-child { display: grid; }
.delivery-brand strong { font-size: 17px; letter-spacing: .02em; }
.delivery-brand small { color: #778894; font-family: "DM Mono", monospace; font-size: 10px; letter-spacing: .18em; margin-top: 2px; }
.delivery-logo { width: 37px; height: 37px; border-radius: 12px; display: grid; place-items: center; color: #fff; font: 700 19px/1 "DM Mono", monospace; background: linear-gradient(145deg,#087d82,#318eba); box-shadow: 0 10px 22px rgba(15,126,145,.25); }
.delivery-top-actions { display: flex; gap: 10px; }
.ghost-action, .outline-action { border: 1px solid #c8d7dc; border-radius: 12px; background: rgba(255,255,255,.76); color: #38505d; padding: 10px 15px; font-weight: 650; cursor: pointer; }
.ghost-action:hover, .outline-action:hover { border-color: #1d939b; color: #087d82; }
.redeem-landing { width: min(1180px, calc(100% - 40px)); margin: auto; display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(42px,7vw,100px); align-items: center; padding: 70px 0; }
.delivery-kicker { color: #087d82; font: 600 11px/1.4 "DM Mono", monospace; letter-spacing: .13em; text-transform: uppercase; }
.delivery-kicker i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #11a97a; box-shadow: 0 0 0 5px rgba(17,169,122,.11); margin-right: 9px; }
.redeem-copy h1, .workspace-title-row h1 { margin: 24px 0 18px; font-size: clamp(42px,5.3vw,72px); line-height: 1.08; letter-spacing: -.055em; }
.redeem-copy h1 em { color: #0a858d; font-style: normal; }
.redeem-copy > p { max-width: 620px; color: #667a86; font-size: 17px; line-height: 1.9; }
.delivery-points { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.delivery-points span { padding: 9px 12px; border: 1px solid #cfdddf; border-radius: 999px; background: rgba(255,255,255,.58); color: #58707b; font-size: 12px; }
.redeem-box { border: 1px solid rgba(159,184,193,.42); border-radius: 28px; background: rgba(255,255,255,.84); padding: clamp(24px,3vw,38px); box-shadow: 0 30px 70px rgba(53,83,95,.14); }
.redeem-box-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 24px; }
.redeem-box-head span { font-size: 25px; font-weight: 800; }
.redeem-box-head b { color: #7a8d96; font-size: 11px; font-family: "DM Mono", monospace; }
.redeem-box label { display: block; font-size: 13px; font-weight: 700; color: #40545e; margin-bottom: 9px; }
.redeem-box textarea, .modal-card textarea { width: 100%; box-sizing: border-box; resize: vertical; border: 1px solid #c7d7dc; border-radius: 16px; padding: 16px; color: #17202c; background: #f8fbfb; font: 13px/1.7 "DM Mono", monospace; outline: none; }
.redeem-box textarea:focus, .modal-card textarea:focus { border-color: #15939b; box-shadow: 0 0 0 4px rgba(21,147,155,.10); }
.redeem-hint { display: flex; justify-content: space-between; color: #81919a; font-size: 11px; margin: 9px 3px 18px; }
.delivery-primary { width: 100%; border: 0; border-radius: 15px; padding: 15px 18px; display: flex; align-items: center; justify-content: space-between; color: white; background: linear-gradient(120deg,#087d82,#2795ba); font-size: 15px; font-weight: 750; cursor: pointer; box-shadow: 0 15px 25px rgba(20,134,153,.2); }
.delivery-primary:disabled { opacity: .58; cursor: wait; }
.privacy-note { color: #8a9aa2; font-size: 11px; line-height: 1.6; margin: 16px 2px 0; }
.delivery-result { margin-top: 15px; padding: 13px 15px; border-radius: 13px; background: #e5f7f1; color: #18785f; font-size: 13px; line-height: 1.65; }
.delivery-result.error { background: #fff0ee; color: #b44b44; }
.account-workspace { width: min(1420px, calc(100% - 40px)); margin: 0 auto; padding: 54px 0 70px; flex: 1; }
.workspace-title-row { display: flex; justify-content: space-between; gap: 30px; align-items: end; margin-bottom: 32px; }
.workspace-title-row h1 { margin: 10px 0 5px; font-size: clamp(34px,4vw,54px); }
.workspace-title-row p { color: #71838c; margin: 0; }
.workspace-actions { display: flex; gap: 10px; }
.workspace-metrics { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 16px; }
.workspace-metrics article { position: relative; overflow: hidden; min-height: 112px; padding: 20px 22px; border: 1px solid rgba(159,184,193,.42); border-radius: 20px; background: rgba(255,255,255,.8); box-shadow: 0 12px 35px rgba(53,83,95,.08); }
.workspace-metrics article::after { content:""; position:absolute; width:70px; height:70px; border-radius:50%; right:-22px; top:-22px; background:rgba(20,151,157,.08); }
.workspace-metrics span, .workspace-metrics small { display: block; color: #778b95; font-size: 12px; }
.workspace-metrics strong { display: block; margin: 8px 0 2px; font: 700 30px/1 "DM Mono", monospace; }
.workspace-toolbar { position: relative; z-index: 6; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 13px; border: 1px solid rgba(159,184,193,.45); border-radius: 20px; background: rgba(255,255,255,.82); box-shadow: 0 14px 35px rgba(53,83,95,.08); }
.select-all { display: flex; align-items: center; gap: 7px; padding: 0 8px; color: #516873; font-size: 13px; font-weight: 700; }
.select-all input, .account-check input { accent-color: #0e8d94; width: 17px; height: 17px; }
.toolbar-search { flex: 1 1 180px; min-width: 160px; height: 42px; display: flex; align-items: center; gap: 8px; border: 1px solid #d1dee2; border-radius: 12px; padding: 0 12px; background: #f8fbfb; }
.toolbar-search input { width: 100%; border: 0; outline: 0; background: transparent; color: #253540; }
.toolbar-button { position: relative; border: 1px solid #cbd9dd; border-radius: 12px; padding: 11px 13px; background: #f8fbfb; color: #415965; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.toolbar-button.primary { color: white; border-color: #108c95; background: linear-gradient(120deg,#087d82,#2795ba); box-shadow: 0 10px 22px rgba(20,134,153,.16); }
.toolbar-button:disabled { opacity:.5; cursor:wait; }
.upload-button input { display: none; }
.download-control { position: relative; }
.download-menu { position: absolute; left: 0; top: calc(100% + 9px); min-width: 265px; padding: 8px; border: 1px solid #cedcdf; border-radius: 16px; background: white; box-shadow: 0 20px 45px rgba(39,69,81,.18); z-index: 20; }
.download-menu button { width: 100%; border: 0; background: transparent; display: flex; align-items: center; gap: 12px; padding: 13px 12px; border-radius: 11px; color: #314650; cursor: pointer; }
.download-menu button:hover { background: #edf6f6; color: #087d82; }
.download-menu span { font-size: 18px; }
.workspace-progress { margin: 15px 0; padding: 14px 18px; border-radius: 16px; background: #dfeaec; }
.workspace-progress > div { display:flex; justify-content:space-between; color:#536b76; font-size:12px; margin-bottom:8px; }
.workspace-progress > i { display:block; height:7px; overflow:hidden; background:#c6d7db; border-radius:99px; }
.workspace-progress em { display:block; height:100%; width:0; border-radius:99px; background:linear-gradient(90deg,#07858c,#37a2bf); transition:width .25s; }
.account-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; margin-top: 16px; }
.account-card { border: 1px solid rgba(159,184,193,.48); border-radius: 20px; background: rgba(255,255,255,.82); padding: 18px; box-shadow: 0 13px 35px rgba(53,83,95,.08); transition: transform .15s, border-color .15s; }
.account-card:hover { transform: translateY(-2px); border-color: #70b4b7; }
.account-card-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.account-check { display:flex; gap:10px; align-items:flex-start; min-width:0; }
.account-check > span { min-width:0; }
.account-check b { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:14px; }
.account-check code { display:block; margin-top:5px; color:#758891; font:10px/1.4 "DM Mono",monospace; overflow:hidden; text-overflow:ellipsis; }
.health-pill { flex:none; padding:5px 8px; border-radius:99px; background:#e9eef0; color:#71828a; font-size:10px; font-weight:700; }
.health-pill.healthy { color:#11745b; background:#dcf5eb; }
.health-pill.need_revival, .health-pill.unrecoverable { color:#b64f43; background:#ffebe8; }
.health-pill.unknown { color:#8a6a21; background:#fff3d9; }
.account-meta { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin:18px 0; }
.account-meta div { padding:10px; border-radius:11px; background:#f0f5f6; }
.account-meta span { display:block; color:#84959d; font-size:10px; margin-bottom:4px; }
.account-meta b { font-size:12px; }
.quota-mini { min-height:36px; color:#627781; font-size:11px; line-height:1.5; }
.quota-bar { display:block; height:5px; background:#d8e4e6; border-radius:99px; overflow:hidden; margin-top:5px; }
.quota-bar i { display:block; height:100%; background:#11939a; }
.card-actions { display:flex; gap:8px; margin-top:14px; }
.card-actions button { flex:1; border:1px solid #cbd9dd; border-radius:10px; padding:9px; background:#f9fbfb; color:#415965; font-size:11px; font-weight:700; cursor:pointer; }
.workspace-empty { padding:70px 20px; text-align:center; color:#82949d; }
.workspace-empty b, .workspace-empty span { display:block; }
.workspace-empty b { color:#3e555f; margin-bottom:6px; }
.delivery-footer { display:flex; justify-content:space-between; gap:20px; padding:22px clamp(20px,5vw,76px); border-top:1px solid rgba(76,103,117,.15); color:#80929b; font-size:11px; }
.delivery-modal { position:fixed; inset:0; z-index:80; display:grid; place-items:center; padding:20px; background:rgba(20,34,43,.42); backdrop-filter:blur(8px); }
.modal-card { position:relative; width:min(720px,calc(100vw - 40px)); max-height:calc(100vh - 40px); overflow:auto; box-sizing:border-box; border:1px solid rgba(255,255,255,.7); border-radius:25px; background:#f8fbfb; padding:30px; box-shadow:0 30px 90px rgba(20,42,52,.28); }
.modal-card.compact { width:min(520px,calc(100vw - 40px)); }
.modal-card h2 { margin:0 42px 8px 0; font-size:25px; }
.modal-card > p { color:#71838c; line-height:1.6; }
.modal-close { position:absolute; right:18px; top:17px; width:38px; height:38px; border:1px solid #cfdbdf; border-radius:12px; background:white; color:#263740; font-size:25px; cursor:pointer; }
.modal-card .delivery-primary { margin-top:15px; }
.detail-code { font:12px/1.5 "DM Mono",monospace; }
.detail-tabs { display:grid; grid-template-columns:1fr 1fr; gap:6px; padding:6px; margin:20px 0; border:1px solid #ccdade; border-radius:15px; background:#eaf1f2; }
.detail-tabs button { border:0; border-radius:11px; padding:12px; background:transparent; color:#71838d; font-weight:700; cursor:pointer; }
.detail-tabs button.active { color:#087d82; background:white; box-shadow:0 5px 16px rgba(44,73,83,.08); }
.detail-content { min-height:160px; padding:18px; border-radius:15px; background:white; border:1px solid #d5e1e3; }
.detail-content dl { margin:0; }
.detail-content dl div { display:flex; justify-content:space-between; gap:20px; padding:10px 0; border-bottom:1px solid #edf2f3; }
.detail-content dt { color:#7c8e97; }
.detail-content dd { margin:0; text-align:right; font-weight:700; }
.detail-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:15px; }
.api-doc-card pre { padding:16px; overflow:auto; border-radius:14px; color:#d7fbf0; background:#172a31; }
.api-mini-doc { display:grid; grid-template-columns:auto 1fr; gap:10px 18px; align-items:center; padding:16px 0; }
.api-mini-doc code { color:#087d82; font-weight:700; }
.api-mini-doc span { color:#667b85; }

@media (max-width: 1050px) {
  .redeem-landing { grid-template-columns: 1fr; max-width:760px; }
  .account-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .workspace-metrics { grid-template-columns:repeat(2,1fr); }
}
@media (max-width: 680px) {
  .delivery-topbar { height:64px; padding:0 16px; }
  .delivery-brand small { display:none; }
  .redeem-landing { width:calc(100% - 28px); padding:40px 0; gap:35px; }
  .redeem-copy h1 { font-size:42px; }
  .account-workspace { width:calc(100% - 24px); padding:34px 0 50px; }
  .workspace-title-row { align-items:flex-start; flex-direction:column; }
  .workspace-actions { width:100%; }
  .workspace-actions button { flex:1; }
  .workspace-metrics { grid-template-columns:1fr 1fr; }
  .workspace-metrics article { min-height:96px; padding:16px; }
  .account-grid { grid-template-columns:1fr; }
  .toolbar-search { flex-basis:100%; order:-1; }
  .workspace-toolbar > .toolbar-button, .download-control { flex:1 1 calc(50% - 10px); }
  .download-control > button { width:100%; }
  .download-menu { min-width:260px; }
  .delivery-footer { flex-direction:column; gap:6px; }
  .api-mini-doc { grid-template-columns:1fr; }
}

/* Public delivery v2: restrained service-console layout */
body[data-page="public"] {
  --delivery-ink: #1c2b33;
  --delivery-muted: #657983;
  --delivery-line: #d7e2e5;
  --delivery-soft: #edf4f5;
  --delivery-bg: #f2f7f8;
  --delivery-accent: #087f87;
  --delivery-accent-dark: #05666d;
  color: var(--delivery-ink);
  background: var(--delivery-bg);
}
body[data-page="public"] .delivery-shell { min-height: 100vh; }
body[data-page="public"] .delivery-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 66px;
  padding: 0 max(24px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid var(--delivery-line);
  background: rgba(255,255,255,.96);
  box-shadow: 0 1px 8px rgba(40,71,82,.04);
  backdrop-filter: none;
}
body[data-page="public"] .delivery-logo {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  font-size: 17px;
  background: #0a858d;
  box-shadow: none;
}
body[data-page="public"] .delivery-brand { gap: 10px; }
body[data-page="public"] .delivery-brand strong { font-size: 16px; letter-spacing: 0; }
body[data-page="public"] .delivery-brand small { color: #8999a1; font: 10px/1.4 var(--sans); letter-spacing: .06em; }
.delivery-nav { align-self: stretch; display: flex; align-items: center; gap: 28px; margin-left: auto; margin-right: 34px; }
.delivery-nav a, .delivery-nav button { height: 100%; display: flex; align-items: center; position: relative; border: 0; padding: 0; background: transparent; color: #60747e; font-size: 13px; cursor: pointer; }
.delivery-nav a:hover, .delivery-nav button:hover, .delivery-nav a.active { color: var(--delivery-accent); }
.delivery-nav a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--delivery-accent); }
.service-state { display: inline-flex; align-items: center; gap: 7px; color: #60747e; font-size: 12px; }
.service-state i { width: 7px; height: 7px; border-radius: 50%; background: #1eaf7a; box-shadow: 0 0 0 3px #dcf5eb; }
body[data-page="public"] .ghost-action, body[data-page="public"] .outline-action {
  border-color: #cddadd;
  border-radius: 8px;
  background: #fff;
  color: #3f5661;
  box-shadow: none;
}

body[data-page="public"] .redeem-landing {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 44px 0 52px;
  display: block;
}
.redeem-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 24px; }
.page-path { display: block; margin-bottom: 9px; color: #80929a; font-size: 12px; }
.redeem-page-head h1 { margin: 0; font-size: 32px; line-height: 1.25; letter-spacing: -.02em; }
.redeem-page-head p { margin: 9px 0 0; color: var(--delivery-muted); font-size: 14px; line-height: 1.7; }
.page-stat { min-width: 160px; display: flex; align-items: baseline; justify-content: flex-end; gap: 6px; color: #82939b; font-size: 11px; }
.page-stat strong { color: var(--delivery-accent); font: 700 24px/1 var(--mono); }
.page-stat small { font-size: 11px; }
.redeem-layout { display: grid; grid-template-columns: minmax(0,.88fr) minmax(440px,1.12fr); border: 1px solid var(--delivery-line); border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 10px 30px rgba(45,76,87,.07); }
.redeem-overview { padding: 30px; background: #f8fbfb; border-right: 1px solid var(--delivery-line); }
.overview-head { display: flex; align-items: center; gap: 12px; padding-bottom: 22px; border-bottom: 1px solid #dde7e9; }
.overview-icon { flex: 0 0 34px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--delivery-accent); font-size: 17px; }
.overview-head div, .flow-list div { display: grid; gap: 4px; }
.overview-head strong { font-size: 15px; }
.overview-head small, .flow-list small { color: #7a8d96; font-size: 12px; line-height: 1.55; }
.flow-list { list-style: none; margin: 7px 0 0; padding: 0; }
.flow-list li { position: relative; display: flex; gap: 13px; padding: 17px 0; }
.flow-list li:not(:last-child)::after { content: ""; position: absolute; left: 14px; top: 47px; bottom: -4px; width: 1px; background: #ccdcdf; }
.flow-list li > span { flex: 0 0 29px; width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid #bed1d5; border-radius: 50%; color: var(--delivery-accent); background: #fff; font: 700 11px var(--mono); }
.flow-list b { font-size: 13px; }
.credential-note { margin-top: 6px; padding: 15px 16px; border-left: 3px solid #2b9ba1; background: #e9f4f4; }
.credential-note b { color: #2e5159; font-size: 13px; }
.credential-note p { margin: 6px 0 0; color: #637a84; font-size: 12px; line-height: 1.65; }
.support-line { display: grid; gap: 5px; margin-top: 21px; }
.support-line span { color: #8b9aa1; font-size: 10px; }
.support-line b { color: #5c717b; font-size: 11px; font-weight: 600; }

body[data-page="public"] .redeem-box {
  padding: 30px 34px;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}
body[data-page="public"] .redeem-box-head { align-items: center; margin-bottom: 24px; padding-bottom: 18px; border-bottom: 1px solid #e3eaec; }
body[data-page="public"] .redeem-box-head > div { display: grid; gap: 4px; }
body[data-page="public"] .redeem-box-head span { font-size: 19px; font-weight: 700; }
body[data-page="public"] .redeem-box-head small { color: #84959d; font-size: 11px; }
body[data-page="public"] .redeem-box-head > b { display: flex; align-items: center; gap: 6px; color: #2a8a6a; font: 600 11px var(--sans); }
body[data-page="public"] .redeem-box-head > b i { width: 7px; height: 7px; border-radius: 50%; background: #26ad79; }
body[data-page="public"] .redeem-box label { margin-bottom: 8px; color: #415963; font-size: 12px; }
body[data-page="public"] .redeem-box textarea, body[data-page="public"] .modal-card textarea {
  min-height: 188px;
  padding: 14px 15px;
  border-color: #cbdadd;
  border-radius: 8px;
  color: #263941;
  background: #fbfdfd;
  font: 12px/1.75 var(--mono);
}
body[data-page="public"] .redeem-box textarea:focus, body[data-page="public"] .modal-card textarea:focus { border-color: #138c93; box-shadow: 0 0 0 3px rgba(19,140,147,.09); }
body[data-page="public"] .redeem-hint { margin: 8px 1px 17px; color: #87979f; font-size: 10px; }
body[data-page="public"] .delivery-primary {
  min-height: 46px;
  padding: 0 17px;
  border: 1px solid #087980;
  border-radius: 8px;
  background: #0a858d;
  box-shadow: none;
  font-size: 14px;
}
body[data-page="public"] .delivery-primary:hover { background: #07777e; }
body[data-page="public"] .delivery-primary b { font-size: 17px; }
body[data-page="public"] .privacy-note { display: flex; align-items: flex-start; gap: 8px; margin: 15px 0 0; color: #819198; font-size: 10px; }
body[data-page="public"] .privacy-note > span { flex: 0 0 17px; width: 17px; height: 17px; display: grid; place-items: center; border: 1px solid #cbdadd; border-radius: 50%; color: #668089; font: 700 10px Georgia,serif; }
body[data-page="public"] .privacy-note p { margin: 0; line-height: 1.7; }
body[data-page="public"] .delivery-result { border: 1px solid #c9e7dd; border-radius: 7px; }
.service-strip { display: grid; grid-template-columns: repeat(4,1fr); margin-top: 16px; border: 1px solid var(--delivery-line); border-radius: 10px; background: #fff; }
.service-strip > div { display: flex; gap: 12px; align-items: center; padding: 16px 18px; }
.service-strip > div:not(:last-child) { border-right: 1px solid #e0e8ea; }
.service-strip > div > span { color: #9aa9af; font: 11px var(--mono); }
.service-strip p { display: grid; gap: 3px; margin: 0; }
.service-strip b { font-size: 12px; }
.service-strip small { color: #87979e; font-size: 10px; }

body[data-page="public"] .account-workspace { width: min(1320px, calc(100% - 40px)); padding: 38px 0 55px; }
body[data-page="public"] .workspace-title-row { align-items: flex-end; margin-bottom: 22px; }
body[data-page="public"] .workspace-title-row h1 { margin: 0 0 7px; font-size: 30px; letter-spacing: -.02em; }
body[data-page="public"] .workspace-title-row p { font-size: 13px; }
body[data-page="public"] .workspace-metrics { gap: 10px; margin-bottom: 12px; }
body[data-page="public"] .workspace-metrics article { min-height: 98px; padding: 17px 18px; border-color: var(--delivery-line); border-radius: 10px; background: #fff; box-shadow: none; }
body[data-page="public"] .workspace-metrics article::after { display: none; }
body[data-page="public"] .workspace-metrics strong { font-size: 26px; }
body[data-page="public"] .workspace-toolbar { padding: 10px; border-color: var(--delivery-line); border-radius: 10px; background: #fff; box-shadow: none; }
body[data-page="public"] .toolbar-search, body[data-page="public"] .toolbar-button { border-radius: 7px; }
body[data-page="public"] .toolbar-button.primary { border-color: #087980; background: #0a858d; box-shadow: none; }
body[data-page="public"] .account-grid { gap: 11px; margin-top: 12px; }
body[data-page="public"] .account-card { border-color: var(--delivery-line); border-radius: 10px; background: #fff; box-shadow: none; }
body[data-page="public"] .account-card:hover { transform: none; border-color: #79b4b8; box-shadow: 0 5px 18px rgba(45,76,87,.07); }
body[data-page="public"] .account-meta div { border-radius: 6px; }
body[data-page="public"] .card-actions button { border-radius: 6px; }
body[data-page="public"] .delivery-footer { margin-top: auto; padding: 19px max(24px, calc((100vw - 1180px) / 2)); border-color: var(--delivery-line); background: #fff; }
body[data-page="public"] .delivery-modal { background: rgba(21,41,49,.45); backdrop-filter: blur(3px); }
body[data-page="public"] .modal-card { border-color: #d7e2e5; border-radius: 12px; background: #fff; box-shadow: 0 22px 65px rgba(20,42,52,.22); }
body[data-page="public"] .modal-close { border-radius: 7px; }

@media (max-width: 900px) {
  .delivery-nav { display: none; }
  .redeem-layout { grid-template-columns: 1fr; }
  .redeem-overview { border-right: 0; border-bottom: 1px solid var(--delivery-line); }
  .service-strip { grid-template-columns: repeat(2,1fr); }
  .service-strip > div:nth-child(2) { border-right: 0; }
  .service-strip > div:nth-child(-n+2) { border-bottom: 1px solid #e0e8ea; }
}
@media (max-width: 680px) {
  body[data-page="public"] .delivery-topbar { padding: 0 15px; }
  .service-state { display: none; }
  body[data-page="public"] .redeem-landing { width: calc(100% - 24px); padding: 26px 0 38px; }
  .redeem-page-head { align-items: flex-start; margin-bottom: 17px; }
  .redeem-page-head h1 { font-size: 27px; }
  .redeem-page-head p { max-width: 92%; font-size: 12px; }
  .page-stat { display: none; }
  .redeem-overview { padding: 23px 20px; }
  body[data-page="public"] .redeem-box { padding: 24px 20px; }
  body[data-page="public"] .redeem-box textarea { min-height: 168px; }
  .service-strip { grid-template-columns: 1fr 1fr; }
  .service-strip > div { padding: 14px; }
  .service-strip small { display: none; }
  body[data-page="public"] .account-workspace { width: calc(100% - 24px); padding-top: 26px; }
  body[data-page="public"] .workspace-title-row { align-items: flex-start; }
  body[data-page="public"] .delivery-footer { padding-inline: 16px; }
}

/* Public delivery v3: warm paper interface based on the approved earlier style */
body[data-page="public"] {
  --warm-ink: #2c2923;
  --warm-muted: #7b7469;
  --warm-paper: #f3eee2;
  --warm-card: #fffdf7;
  --warm-line: #d8d0c2;
  --warm-dark: #302a24;
  --warm-yellow: #e7ef63;
  --warm-orange: #ef6848;
  --warm-red: #d33131;
  margin: 0;
  color: var(--warm-ink);
  background: #e8e3d9;
}
body[data-page="public"] .delivery-shell {
  width: min(1240px, calc(100% - 28px));
  min-height: calc(100vh - 28px);
  margin: 14px auto;
  overflow: hidden;
  border: 1px solid #d5cec1;
  border-radius: 14px;
  background: var(--warm-paper);
  box-shadow: 0 8px 26px rgba(59,49,36,.13);
}
body[data-page="public"] .delivery-topbar {
  position: static;
  height: 66px;
  padding: 0 22px;
  border-bottom: 1px solid var(--warm-line);
  background: #fffaf0;
  box-shadow: none;
}
body[data-page="public"] .delivery-logo {
  width: 35px;
  height: 35px;
  border-radius: 3px;
  color: var(--warm-ink);
  background: var(--warm-yellow);
  border: 1px solid #cbd453;
  font-family: var(--mono);
  box-shadow: 3px 3px 0 var(--warm-dark);
}
body[data-page="public"] .delivery-brand strong { color: var(--warm-ink); font-size: 17px; }
body[data-page="public"] .delivery-brand small { color: #8d8477; font-family: var(--mono); letter-spacing: .12em; }
body[data-page="public"] .service-state { color: #71695e; }
body[data-page="public"] .service-state i { background: #55a56f; box-shadow: 0 0 0 3px #dcebdc; }

.delivery-frame-tools { padding: 14px 18px 0; background: var(--warm-paper); }
.security-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 9px 16px;
  border: 2px solid var(--warm-red);
  border-radius: 6px;
  color: #bd2c2c;
  background: #fff8f4;
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
}
.security-banner b { white-space: nowrap; }
body[data-page="public"] .delivery-nav {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr);
  align-self: auto;
  height: 52px;
  margin: 12px 0 0;
  padding: 6px;
  gap: 4px;
  border: 1px solid var(--warm-line);
  border-radius: 5px;
  background: #ebe5d9;
  box-shadow: 0 2px 5px rgba(55,46,34,.08);
}
body[data-page="public"] .delivery-nav a,
body[data-page="public"] .delivery-nav button {
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  padding: 0 14px;
  color: #6f685d;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
body[data-page="public"] .delivery-nav a span,
body[data-page="public"] .delivery-nav button span { font: 700 16px/1 var(--mono); }
body[data-page="public"] .delivery-nav a:hover,
body[data-page="public"] .delivery-nav button:hover { color: var(--warm-ink); background: #f7f2e8; }
body[data-page="public"] .delivery-nav a.active { color: #fff; background: var(--warm-dark); box-shadow: 2px 2px 0 #bcb2a3; }
body[data-page="public"] .delivery-nav a.active::after { display: none; }

body[data-page="public"] .redeem-landing {
  width: auto;
  margin: 0;
  padding: 30px 24px 34px;
  background: var(--warm-paper);
}
body[data-page="public"] .redeem-page-head { margin-bottom: 19px; padding: 0 2px; }
body[data-page="public"] .page-path { color: #8e8578; font-family: var(--mono); font-size: 10px; }
body[data-page="public"] .redeem-page-head h1 { color: var(--warm-ink); font-size: 31px; letter-spacing: -.035em; }
body[data-page="public"] .redeem-page-head p { color: var(--warm-muted); }
body[data-page="public"] .page-stat { color: #857c6e; }
body[data-page="public"] .page-stat strong { color: var(--warm-orange); }
body[data-page="public"] .redeem-layout {
  grid-template-columns: minmax(0,.88fr) minmax(430px,1.12fr);
  border: 1px solid #cbc2b3;
  border-radius: 7px;
  background: var(--warm-card);
  box-shadow: 0 5px 14px rgba(63,52,38,.08);
}
body[data-page="public"] .redeem-overview {
  padding: 28px;
  border-right: 1px solid #d4cab9;
  background-color: #fffdf8;
  background-image:
    linear-gradient(45deg, transparent 47%, rgba(184,163,126,.16) 48%, rgba(184,163,126,.16) 52%, transparent 53%),
    linear-gradient(-45deg, transparent 47%, rgba(184,163,126,.12) 48%, rgba(184,163,126,.12) 52%, transparent 53%);
  background-size: 18px 18px;
}
body[data-page="public"] .overview-head { border-bottom: 2px dotted #d2c7b5; }
body[data-page="public"] .overview-icon {
  border-radius: 50%;
  color: var(--warm-ink);
  background: var(--warm-yellow);
  border: 1px solid #cad250;
}
body[data-page="public"] .overview-head small,
body[data-page="public"] .flow-list small { color: #81786b; }
body[data-page="public"] .flow-list li > span {
  border-color: #cfc4b2;
  border-radius: 3px;
  color: var(--warm-ink);
  background: #f7f0df;
}
body[data-page="public"] .flow-list li:not(:last-child)::after { background: #d1c7b6; }
.yellow-pass {
  margin: 7px 0 15px;
  padding: 16px 17px;
  border: 1px solid var(--warm-dark);
  background: var(--warm-yellow);
  box-shadow: 4px 4px 0 rgba(48,42,36,.16);
  transform: rotate(-.5deg);
}
.yellow-pass > div { display: flex; align-items: center; justify-content: space-between; font: 10px var(--mono); letter-spacing: .08em; }
.yellow-pass > div b { font-size: 19px; }
.yellow-pass > strong { display: block; margin: 14px 0 9px; padding: 10px 0; border-top: 1px dashed #817f39; border-bottom: 1px dashed #817f39; font: 700 13px var(--mono); letter-spacing: .05em; }
.yellow-pass > small { color: #5e5b31; font: 9px var(--mono); }
body[data-page="public"] .credential-note { border-left-color: var(--warm-orange); background: #fff1de; }
body[data-page="public"] .credential-note b { color: #5b3f2f; }
body[data-page="public"] .credential-note p,
body[data-page="public"] .support-line b { color: #786d60; }

body[data-page="public"] .redeem-box { padding: 29px 32px; background: #fffdf8; }
body[data-page="public"] .redeem-box-head { border-bottom-color: #ddd4c7; }
body[data-page="public"] .redeem-box-head span,
body[data-page="public"] .redeem-box label { color: var(--warm-ink); }
body[data-page="public"] .redeem-box-head small,
body[data-page="public"] .redeem-hint { color: #91887b; }
body[data-page="public"] .redeem-box-head > b { color: #6b7650; }
body[data-page="public"] .redeem-box-head > b i { background: #7aa05b; }
body[data-page="public"] .redeem-box textarea,
body[data-page="public"] .modal-card textarea {
  border-color: #cfc5b6;
  border-radius: 3px;
  color: var(--warm-ink);
  background: #fffefb;
}
body[data-page="public"] .redeem-box textarea:focus,
body[data-page="public"] .modal-card textarea:focus { border-color: var(--warm-dark); box-shadow: 0 0 0 3px rgba(48,42,36,.08); }
body[data-page="public"] .delivery-primary {
  border-color: #1f1c18;
  border-radius: 3px;
  color: #fff;
  background: var(--warm-dark);
  box-shadow: 3px 3px 0 var(--warm-yellow);
}
body[data-page="public"] .delivery-primary:hover { background: #181512; transform: translate(-1px,-1px); box-shadow: 5px 5px 0 var(--warm-yellow); }
body[data-page="public"] .privacy-note { color: #8a8175; }
body[data-page="public"] .privacy-note > span { border-color: #cfc5b6; color: #756c60; }
body[data-page="public"] .delivery-result { border-radius: 3px; }
body[data-page="public"] .service-strip { border-color: #cfc5b6; border-radius: 5px; background: #fffaf0; box-shadow: 0 3px 9px rgba(63,52,38,.05); }
body[data-page="public"] .service-strip > div:not(:last-child) { border-right-color: #ddd4c6; }
body[data-page="public"] .service-strip > div > span { color: var(--warm-orange); }
body[data-page="public"] .service-strip small { color: #8b8275; }

body[data-page="public"] .account-workspace { width: auto; margin: 0; padding: 30px 24px 42px; background: var(--warm-paper); }
body[data-page="public"] .workspace-title-row h1 { color: var(--warm-ink); }
body[data-page="public"] .workspace-title-row p { color: var(--warm-muted); }
body[data-page="public"] .ghost-action,
body[data-page="public"] .outline-action,
body[data-page="public"] .toolbar-button {
  border-color: #cfc5b6;
  border-radius: 3px;
  color: #514a41;
  background: #fffaf0;
}
body[data-page="public"] .workspace-metrics article,
body[data-page="public"] .workspace-toolbar,
body[data-page="public"] .account-card {
  border-color: #cfc5b6;
  border-radius: 5px;
  background: #fffdf8;
}
body[data-page="public"] .workspace-metrics article:nth-child(1) { border-top: 3px solid #e3b447; }
body[data-page="public"] .workspace-metrics article:nth-child(2) { border-top: 3px solid #ed7354; }
body[data-page="public"] .workspace-metrics article:nth-child(3) { border-top: 3px solid #65916d; }
body[data-page="public"] .workspace-metrics article:nth-child(4) { border-top: 3px solid #b94a3d; }
body[data-page="public"] .toolbar-search { border-color: #d4cabd; border-radius: 3px; background: #fffefb; }
body[data-page="public"] .toolbar-button.primary { border-color: #1f1c18; border-radius: 3px; background: var(--warm-dark); }
body[data-page="public"] .account-meta div { background: #f2ecdf; }
body[data-page="public"] .workspace-progress { border-radius: 4px; background: #e4dccd; }
body[data-page="public"] .workspace-progress > i { background: #cfc5b6; }
body[data-page="public"] .workspace-progress em { background: var(--warm-orange); }
body[data-page="public"] .delivery-footer { margin: 0; padding: 18px 22px; border-color: var(--warm-line); background: #fffaf0; color: #837a6e; }
body[data-page="public"] .delivery-modal { background: rgba(43,37,30,.48); }
body[data-page="public"] .modal-card { border-color: #cfc5b6; border-radius: 7px; background: #fffaf0; }
body[data-page="public"] .modal-close { border-color: #cfc5b6; border-radius: 3px; }

@media (max-width: 900px) {
  body[data-page="public"] .redeem-layout { grid-template-columns: 1fr; }
  body[data-page="public"] .redeem-overview { border-right: 0; border-bottom: 1px solid #d4cab9; }
}
@media (max-width: 680px) {
  body[data-page="public"] .delivery-shell { width: 100%; min-height: 100vh; margin: 0; border: 0; border-radius: 0; }
  body[data-page="public"] .delivery-topbar { height: 62px; padding: 0 15px; }
  .delivery-frame-tools { padding: 10px 10px 0; }
  .security-banner { align-items: flex-start; gap: 3px; flex-direction: column; padding: 9px 12px; text-align: left; }
  body[data-page="public"] .delivery-nav { grid-template-columns: repeat(4,minmax(112px,1fr)); overflow-x: auto; justify-content: start; }
  body[data-page="public"] .delivery-nav a,
  body[data-page="public"] .delivery-nav button { padding: 0 10px; }
  body[data-page="public"] .redeem-landing { width: auto; padding: 25px 12px 34px; }
  body[data-page="public"] .redeem-page-head h1 { font-size: 27px; }
  body[data-page="public"] .redeem-overview { padding: 22px 18px; }
  body[data-page="public"] .redeem-box { padding: 24px 18px; }
  body[data-page="public"] .service-strip { grid-template-columns: 1fr 1fr; }
  body[data-page="public"] .account-workspace { width: auto; padding: 26px 12px 36px; }
}

/* Account workspace: 400-style information layout, retained in the warm-paper visual system. */
body[data-page="public"] .workspace-reference-panel {
  width: min(1080px, 100%);
  margin: 0 auto;
  overflow: visible;
  border: 1px solid #cfc5b6;
  border-radius: 18px;
  background: #f8f4ea;
  box-shadow: 0 12px 26px rgba(57, 48, 37, .12);
}
body[data-page="public"] .workspace-reference-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  min-height: 92px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid #d7cec0;
  background: #fffaf0;
}
body[data-page="public"] .workspace-reference-head h1 {
  margin: 0;
  color: var(--warm-ink);
  font: 800 clamp(22px, 3vw, 31px)/1.2 var(--sans);
  letter-spacing: -.035em;
}
body[data-page="public"] .workspace-reference-head p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin: 10px 0 0;
  color: #81786b;
  font-size: 11px;
}
body[data-page="public"] .workspace-reference-head p b { color: #403930; font-family: var(--mono); }
body[data-page="public"] .workspace-reference-head p i { width: 3px; height: 3px; border-radius: 50%; background: #b2a899; }
body[data-page="public"] .workspace-close {
  flex: none;
  width: 48px;
  height: 48px;
  border: 1px solid #d2c8ba;
  border-radius: 14px;
  color: #312c26;
  background: #fffdf8;
  font: 300 31px/1 var(--sans);
  cursor: pointer;
}
body[data-page="public"] .workspace-close:hover { border-color: var(--warm-dark); background: #f2ecdf; }
body[data-page="public"] .workspace-reference-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin: 18px 20px 0;
  padding: 6px;
  border: 1px solid #d4cbbd;
  border-radius: 14px;
  background: #eae4d8;
}
body[data-page="public"] .workspace-reference-tabs button {
  min-height: 56px;
  border: 0;
  border-radius: 10px;
  color: #777064;
  background: transparent;
  font: 700 15px/1 var(--sans);
  cursor: pointer;
}
body[data-page="public"] .workspace-reference-tabs button span { margin-right: 8px; font: 800 19px/1 var(--mono); }
body[data-page="public"] .workspace-reference-tabs button.active {
  color: #156f75;
  background: #fffdf8;
  box-shadow: 0 2px 6px rgba(56, 46, 34, .09);
}
body[data-page="public"] .workspace-reference-toolbar {
  position: relative;
  z-index: 7;
  display: grid;
  grid-template-columns: minmax(190px, .78fr) minmax(280px, 1.2fr) minmax(180px, .78fr);
  gap: 10px;
  padding: 18px 20px 12px;
}
body[data-page="public"] .workspace-reference-toolbar .download-control,
body[data-page="public"] .workspace-reference-toolbar .toolbar-button { width: 100%; }
body[data-page="public"] .workspace-reference-toolbar .toolbar-button {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 15px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
}
body[data-page="public"] .workspace-reference-toolbar .workspace-main-action {
  border-color: #137d84;
  color: #fff;
  background: linear-gradient(115deg, #087d82, #3095c2);
  box-shadow: 0 9px 20px rgba(23, 128, 149, .22);
}
body[data-page="public"] .workspace-reference-toolbar .workspace-main-action:hover { filter: brightness(.96); transform: translateY(-1px); }
body[data-page="public"] .workspace-reference-toolbar .upload-button { cursor: pointer; }
body[data-page="public"] .workspace-reference-toolbar .upload-button::before { content: "⇧"; font: 800 18px/1 var(--mono); }
body[data-page="public"] .workspace-reference-toolbar .upload-button input { display: none; }
body[data-page="public"] .workspace-reference-toolbar .download-menu {
  width: min(310px, calc(100vw - 48px));
  border-color: #cec4b5;
  border-radius: 13px;
  background: #fffdf8;
  box-shadow: 0 16px 32px rgba(53, 44, 33, .18);
}
body[data-page="public"] .workspace-reference-toolbar .download-menu button { min-height: 48px; color: #494239; }
body[data-page="public"] .workspace-reference-toolbar .download-menu button:hover { color: #156f75; background: #edf4f1; }
body[data-page="public"] .workspace-reference-filter {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 9px;
  margin: 0 20px 12px;
  padding: 11px 12px;
  border: 1px solid #ddd4c7;
  border-radius: 10px;
  background: rgba(255, 253, 248, .78);
}
body[data-page="public"] .workspace-reference-filter .toolbar-search { min-width: 0; }
body[data-page="public"] .workspace-reference-filter .outline-action { min-height: 42px; padding: 0 13px; }
body[data-page="public"] .workspace-reference-filter input[type="checkbox"],
body[data-page="public"] .account-row-check input { width: 17px; height: 17px; accent-color: #117f87; }
body[data-page="public"] .workspace-reference-panel > .workspace-progress { margin: 0 20px 12px; }
body[data-page="public"] .account-ledger {
  display: block;
  max-height: min(560px, 62vh);
  margin: 0 20px 20px;
  overflow-y: auto;
  border: 1px solid #d8cfc1;
  border-radius: 13px;
  background: #fffdf8;
  scrollbar-color: #aaa093 #ede6da;
  scrollbar-width: thin;
}
body[data-page="public"] .account-row {
  display: grid;
  grid-template-columns: 24px minmax(220px, 1.05fr) minmax(240px, 1fr) auto;
  align-items: center;
  gap: 15px;
  min-height: 101px;
  padding: 15px 17px;
  border-bottom: 1px solid #e4ddd2;
}
body[data-page="public"] .account-row:last-child { border-bottom: 0; }
body[data-page="public"] .account-row:hover { background: #faf5e9; }
body[data-page="public"] .account-row-check { display: flex; align-items: center; justify-content: center; }
body[data-page="public"] .account-row-identity { min-width: 0; }
body[data-page="public"] .account-row-identity > button {
  max-width: 100%;
  overflow: hidden;
  border: 0;
  padding: 0;
  color: #2d3132;
  background: transparent;
  font: 700 14px/1.4 var(--mono);
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
body[data-page="public"] .account-row-identity > button:hover { color: #107b83; }
body[data-page="public"] .account-row-identity p {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin: 8px 0 0;
  color: #8a8175;
  font-size: 10px;
}
body[data-page="public"] .account-row-identity code { color: #766d61; font: 10px/1.4 var(--mono); }
body[data-page="public"] .account-row-health { min-width: 0; }
body[data-page="public"] .account-row-health p {
  margin: 7px 0 4px;
  overflow: hidden;
  color: #625b51;
  font-size: 11px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body[data-page="public"] .account-row-health time { color: #938a7d; font-size: 10px; }
body[data-page="public"] .health-pill.manual_required { color: #8a5b12; background: #fff0c7; }
body[data-page="public"] .account-row-actions {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 6px;
  justify-content: end;
}
body[data-page="public"] .account-row-actions button {
  min-height: 34px;
  border: 1px solid #cec4b5;
  border-radius: 7px;
  padding: 0 10px;
  color: #625a50;
  background: #fffaf0;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
body[data-page="public"] .account-row-actions button:hover { border-color: #766e62; color: #2d2924; }
body[data-page="public"] .account-row-actions .row-primary { border-color: #167e84; color: #fff; background: #167e84; }
body[data-page="public"] .account-row-actions button:last-child { grid-column: 1 / -1; }
body[data-page="public"] .account-row-quota { min-width: 0; }
body[data-page="public"] .account-quota-windows { display: grid; gap: 8px; }
body[data-page="public"] .account-quota-windows p { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 5px; color: #70685d; font-size: 10px; }
body[data-page="public"] .account-quota-windows p b { color: #2b777b; font-family: var(--mono); }
body[data-page="public"] .account-quota-windows i { display: block; height: 5px; overflow: hidden; border-radius: 99px; background: #ded7cc; }
body[data-page="public"] .account-quota-windows em { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #149097, #67b5a0); }
body[data-page="public"] .account-quota-empty b,
body[data-page="public"] .account-quota-empty span { display: block; }
body[data-page="public"] .account-quota-empty b { color: #5b544a; font-size: 12px; }
body[data-page="public"] .account-quota-empty span { margin-top: 4px; color: #958c80; font-size: 10px; }
body[data-page="public"] .workspace-reference-panel .workspace-empty { margin: 0 20px 20px; border: 1px dashed #d5ccbe; border-radius: 12px; }

@media (max-width: 900px) {
  body[data-page="public"] .workspace-reference-toolbar { grid-template-columns: 1fr 1fr; }
  body[data-page="public"] .workspace-reference-toolbar .workspace-main-action { grid-column: span 1; }
  body[data-page="public"] .account-row { grid-template-columns: 24px minmax(180px, 1fr) minmax(200px, 1fr); }
  body[data-page="public"] .account-row-actions { grid-column: 2 / -1; grid-template-columns: repeat(3, auto); justify-content: start; }
  body[data-page="public"] .account-row-actions button:last-child { grid-column: auto; }
}
@media (max-width: 680px) {
  body[data-page="public"] .workspace-reference-panel { border-radius: 12px; }
  body[data-page="public"] .workspace-reference-head { min-height: 78px; padding: 17px 15px 14px; }
  body[data-page="public"] .workspace-reference-head h1 { font-size: 20px; }
  body[data-page="public"] .workspace-reference-head p { gap: 6px; }
  body[data-page="public"] .workspace-close { width: 42px; height: 42px; border-radius: 10px; }
  body[data-page="public"] .workspace-reference-tabs { margin: 13px 12px 0; }
  body[data-page="public"] .workspace-reference-tabs button { min-height: 48px; font-size: 13px; }
  body[data-page="public"] .workspace-reference-toolbar { grid-template-columns: 1fr; padding: 13px 12px 10px; }
  body[data-page="public"] .workspace-reference-filter { grid-template-columns: auto 1fr; margin: 0 12px 10px; }
  body[data-page="public"] .workspace-reference-filter .outline-action { width: 100%; }
  body[data-page="public"] .workspace-reference-panel > .workspace-progress { margin: 0 12px 10px; }
  body[data-page="public"] .account-ledger { max-height: none; margin: 0 12px 14px; }
  body[data-page="public"] .account-row { grid-template-columns: 22px minmax(0, 1fr); gap: 10px; padding: 15px 12px; }
  body[data-page="public"] .account-row-health,
  body[data-page="public"] .account-row-quota,
  body[data-page="public"] .account-row-actions { grid-column: 2; }
  body[data-page="public"] .account-row-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body[data-page="public"] .account-row-actions button { padding: 0 6px; }
}
