/* Genshin workspace: reference workbench layout; all artwork stays local. */
:root {
  font-family: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  font-size: 14px; line-height: 1.5; color: #35435a; background: #f4f2ec; color-scheme: light;
  --ink: #35435a; --muted: #7b8290; --line: #e7e3d9; --surface: #fffefb;
  --accent: #92713a; --accent-soft: #f5edda; --gold: #d9bd82; --navy: #26364c;
  --green: #35786b; --radius: 12px; --sidebar-width: 216px;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; transition: background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease; }
button:disabled { opacity: .42; cursor: not-allowed; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex="0"]:focus-visible { outline: 3px solid #b9924f; outline-offset: 3px; }
input::placeholder, textarea::placeholder { color: #8b9098; }
input, select, textarea { color: var(--ink); }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin: 0; font-size: 29px; font-weight: 650; letter-spacing: .5px; line-height: 1.4; }
h2 { margin: 0; font-size: 16px; font-weight: 650; }
h3 { margin: 0; font-size: 13px; font-weight: 600; }
.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
.icon { display: inline-block; flex: 0 0 auto; width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -60px; left: 16px; z-index: 100; padding: 10px 16px; background: var(--navy); color: white; border-radius: 8px; }
.skip-link:focus { top: 10px; }

/* Reference-style sidebar, with the navy / gold Teyvat palette. */
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; width: var(--sidebar-width); padding: 30px 17px 20px; display: flex; flex-direction: column; background: var(--navy); color: #dce0e7; border-right: 1px solid #b59a6340; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; margin: 0 10px 38px; }
.brand-symbol { display: grid; place-items: center; flex: 0 0 auto; width: 40px; height: 44px; color: #e4c68d; }
.brand-symbol .icon { width: 39px; height: 39px; stroke-width: 1.15; }
.brand-name { color: #f5eddc; font-family: "Microsoft YaHei", sans-serif; font-size: 25px; font-weight: 600; letter-spacing: 4px; }
.brand-caption { display: block; margin-top: 3px; color: #b7b3a7; font-family: "Segoe UI", sans-serif; font-size: 8px; font-weight: 500; letter-spacing: 1.4px; white-space: nowrap; }
.workspace-label { display: flex; justify-content: space-between; align-items: center; padding: 0 14px; margin-bottom: 12px; color: #b1b8c4; font-size: 10px; letter-spacing: 1px; }
.workspace-label > span { color: #d9c79f; font-size: 9px; padding: 1px 5px; border: 1px solid #d9bd8238; border-radius: 3px; letter-spacing: 0; }
nav { display: grid; gap: 5px; }
.nav { position: relative; display: flex; align-items: center; gap: 11px; min-height: 44px; padding: 10px 14px; color: #c3cad5; background: transparent; border: 1px solid transparent; border-radius: 7px; font-size: 12px; text-align: left; white-space: nowrap; }
.nav-icon { display: flex; width: 20px; justify-content: center; }
.nav:hover { color: #f4e1b5; background: #ffffff07; }
.nav.active { color: #f1d59b; background: #d4b47816; border-color: #d4b47832; font-weight: 600; }
.nav.active::before { position: absolute; content: ""; left: -1px; width: 3px; height: 18px; background: #d9bd82; border-radius: 2px; }
.nav-section-label { margin: 24px 14px 6px; color: #a6afbd; font-size: 10px; letter-spacing: 1px; }
.counter { margin-left: auto; min-width: 19px; border-radius: 4px; background: #ffffff0b; color: #b9c3d1; font-size: 10px; text-align: center; padding: 1px 5px; }
.nav.active .counter { color: #f1d59b; background: #d4b47820; }
.sidebar-ornament { position: relative; display: grid; justify-items: center; gap: 14px; margin: auto 14px 0; padding: 40px 0 28px; color: #c9b27d; opacity: .52; }
.sidebar-ornament::before, .sidebar-ornament::after { content: ""; position: absolute; top: 50px; width: 45px; height: 1px; background: linear-gradient(90deg, transparent, #c9b27d); }
.sidebar-ornament::before { left: 0; }
.sidebar-ornament::after { right: 0; transform: rotate(180deg); }
.sidebar-ornament > span { font-size: 21px; line-height: 1; }
.sidebar-ornament small { font-size: 7px; letter-spacing: 1.4px; white-space: nowrap; }
.sidebar-note { padding: 16px 10px; font-size: 10px; color: #d0d5dd; line-height: 1.8; }
.sidebar-note small { display: block; margin-top: 4px; font-size: 9px; color: #a5aebd; }
.sidebar-note .dot { background: #84b6a1; }
.sidebar-bottom { display: flex; align-items: center; gap: 10px; padding: 17px 10px 0; border-top: 1px solid #ffffff13; font-size: 11px; color: #dedfdc; }
.sidebar-bottom small { display: block; font-size: 9px; margin-top: 3px; color: #a5aebd; }
.sidebar-bottom .avatar { background: #d9bd8215; color: #e0c797; border: 1px solid #d9bd8226; }
.dot { display: inline-block; width: 6px; height: 6px; flex-shrink: 0; border-radius: 50%; background: var(--green); margin-right: 6px; vertical-align: 1px; }
.dot.idle-dot { background: #969eaa; }
.avatar { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 36px; height: 36px; border-radius: 9px; color: #92713a; background: #f5eddd; font-size: 12px; }
.avatar.small { width: 30px; height: 30px; border-radius: 50%; font-size: 11px; }

/* Workbench shell and shared controls. */
.app { margin-left: var(--sidebar-width); min-width: 0; }
header { display: flex; justify-content: space-between; align-items: center; gap: 16px; height: 68px; padding: 0 32px; background: var(--surface); border-bottom: 1px solid var(--line); }
.breadcrumb { color: var(--muted); font-size: 11px; white-space: nowrap; }
.breadcrumb > span { margin: 0 12px; color: #bcb6a9; }
.breadcrumb b { color: var(--ink); font-weight: 500; }
.header-right { display: flex; align-items: center; gap: 15px; }
.connection { font-size: 10px; color: #6e7c7b; white-space: nowrap; }
.connection.offline { color: #a35245; }
.connection.offline .dot { background: #b66654; }
.header-divider { height: 17px; width: 1px; background: var(--line); }
.mode-badge { display: inline-flex; align-items: center; padding: 4px 8px; border: 1px solid #e9dec5; border-radius: 5px; color: #87682f; background: #faf3e4; font-size: 10px; white-space: nowrap; }
.mode-badge .dot { background: #aa8848; }
body[data-mode="live"] .mode-badge { background: #edf4f0; border-color: #d5e5dc; color: #357565; }
body[data-mode="live"] .mode-badge .dot { background: #357565; }
main { max-width: 1600px; min-height: calc(100vh - 68px); padding: 29px 32px 18px; margin: 0 auto; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 22px; }
.eyebrow, .section-kicker { font-size: 9px; font-weight: 600; color: #9b855c; letter-spacing: 1.7px; margin-bottom: 7px; }
.heading-star { display: inline-block; margin-left: 11px; color: #b89b61; font-size: 18px; vertical-align: 3px; }
.page-head p { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.heading-actions { display: flex; align-items: center; gap: 18px; }
.heading-date { color: #848780; font-size: 10px; white-space: nowrap; }
body:not([data-page="overview"]) .heading-date { display: none; }
button.primary, button.secondary { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 37px; padding: 8px 14px; border-radius: 6px; font-size: 11px; font-weight: 550; white-space: nowrap; }
.primary { background: #d9bd82; border: 1px solid #ccb078; color: #354158; box-shadow: 0 2px 4px #70552a09; }
.primary:hover:not(:disabled) { background: #e5cb97; border-color: #b89b61; }
.secondary { background: var(--surface); border: 1px solid #dcdedc; color: #5d6878; }
.secondary:hover:not(:disabled) { border-color: #c9b687; background: #faf6ed; }
button .icon { width: 16px; height: 16px; }
.compact { min-height: 31px !important; padding: 5px 10px !important; font-size: 10px !important; }
.text-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; padding: 4px 0; background: none; color: #7c6948; font-size: 11px; white-space: nowrap; }
.text-button:hover { color: #9a742f; }
.text-button .icon { width: 14px; height: 14px; }
.mode-notice { display: flex; align-items: center; gap: 11px; margin-bottom: 23px; padding: 12px 16px; border: 1px solid #e9dfc7; border-radius: 7px; background: #faf6eb; }
.notice-icon { color: #a18a57; }
.mode-notice strong { margin-right: 14px; font-weight: 600; font-size: 11px; color: #827044; }
.mode-notice div > span { font-size: 10px; color: #8b8373; }
.mode-notice > button { margin-left: auto; font-size: 10px; }
.mode-notice.live { background: #edf3f0; border-color: #d7e5dc; }
.mode-notice.live strong, .mode-notice.live .notice-icon { color: var(--green); }
.mode-notice.live div > span { color: #647c73; }
.view { min-width: 0; }
.mobile-only { display: none !important; }

/* Overview: metrics, six-tier catalog, quick actions and recent tasks. */
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 23px; }
.metrics article { min-width: 0; padding: 19px 20px 17px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.metrics .metric-gold { background: linear-gradient(120deg, #fffefb 40%, #f9f0dd); border-color: #e7d9bb; }
.metrics .metric-jade { background: linear-gradient(120deg, #fffefb 40%, #edf4ee); }
.metric-label { display: flex; justify-content: space-between; align-items: center; color: #7a8190; font-size: 11px; }
.metric-label > span { color: #9ba5af; font-size: 20px; line-height: 1; }
.metric-gold .metric-label > span { color: #b69a62; }
.metric-jade .metric-label > span { color: #83a795; }
.metric-value { margin: 10px 0 7px; font-size: 32px; line-height: 1.3; font-weight: 600; letter-spacing: -.7px; font-variant-numeric: tabular-nums; }
.metric-value > span { margin-left: 7px; font-size: 16px; font-weight: 400; color: #9b9fa7; letter-spacing: 0; }
.metrics small { font-size: 10px; color: #7d838f; }
.metric-foot { display: flex; align-items: center; gap: 14px; }
.capacity { width: 65px; max-width: 40%; height: 4px; background: #ede9e1; border-radius: 4px; }
.capacity span { display: block; height: 100%; width: 0; background: #b69a62; border-radius: 4px; transition: width .2s ease; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 21px 22px 18px; }
.panel-head p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.7; }
.panel-mark { color: #c4ad78; font-size: 22px; }
.section-kicker { font-size: 8px; letter-spacing: 1.5px; margin-bottom: 5px; }
.catalog-tabs { display: inline-flex; gap: 4px; padding: 4px; background: #f2f0e9; border-radius: 7px; border: 1px solid #ebe6db; }
.catalog-tabs button { border: 0; border-radius: 4px; background: transparent; padding: 6px 14px; color: #7a7f86; font-size: 11px; }
.catalog-tabs button.active { background: var(--surface); color: #846936; box-shadow: 0 1px 4px #4f3e2410; }
.catalog-tabs button:hover { color: #76571f; }
.catalog-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; padding: 0 22px 20px; }
.catalog-grid > .empty { grid-column: 1 / -1; }
.catalog-card { position: relative; min-width: 0; display: flex; align-items: center; flex-direction: column; padding: 13px 8px 12px; border: 1px solid #e9e3d4; border-radius: 8px; background: linear-gradient(180deg, #f6f0e3, #fffdf7 70%); color: var(--ink); }
.catalog-card:hover { border-color: #b69a62; box-shadow: 0 4px 12px #69512910; }
.catalog-card img { display: block; width: 76px; height: 76px; object-fit: contain; }
.catalog-card strong { font-size: 12px; font-weight: 600; line-height: 1.5; margin-top: 5px; }
.catalog-card small { color: #8d8a80; font-size: 9px; margin-top: 2px; }
.catalog-card .catalog-price { margin-top: 12px; padding-top: 9px; border-top: 1px solid #e9e1cf; width: 100%; color: #84642c; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.catalog-card[data-family="beyond"] { background: linear-gradient(180deg, #eaf2ef, #fffefb 70%); border-color: #dce7e0; }
.catalog-card[data-family="beyond"]:hover { border-color: #82a795; }
.catalog-card[data-family="beyond"] .catalog-price { color: #497c6b; border-color: #e0e9e2; }
.catalog-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 11px 22px; border-top: 1px solid #eee9df; color: #85877e; font-size: 9px; background: #fcfaf5; }
.catalog-footer .dot { width: 5px; height: 5px; background: #a78e55; }
.overview-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 20px; margin-top: 22px; }
.quick-actions { padding: 0 22px 8px; }
.quick-actions > button { display: grid; grid-template-columns: 35px minmax(0, 1fr) 16px; gap: 13px; align-items: center; width: 100%; padding: 15px 0; border: 0; border-top: 1px solid #eeeae1; background: transparent; text-align: left; color: var(--ink); }
.quick-actions > button:hover strong { color: var(--accent); }
.quick-actions > button > .icon { color: #a6aaac; width: 15px; height: 15px; }
.quick-icon { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 35px; height: 35px; border-radius: 8px; background: #f5edda; color: #a1844b; }
.quick-icon.jade { color: #558575; background: #eaf2ec; }
.quick-icon.blue { color: #6e859e; background: #edf0f4; }
.quick-icon .icon { width: 18px; height: 18px; }
.quick-actions strong { display: block; font-size: 12px; font-weight: 550; }
.quick-actions small { display: block; font-size: 10px; color: var(--muted); margin-top: 4px; }
.empty { padding: 37px 20px; color: #858c99; font-size: 11px; text-align: center; line-height: 2; }
.empty-symbol { display: block; margin: 0 auto 9px; color: #c0b69c; font-size: 29px; }
.queue-preview .empty { margin: 0 22px; padding: 42px 15px; border-top: 1px solid var(--line); }
.mini-task { display: flex; align-items: center; gap: 12px; padding: 17px 22px; border-top: 1px solid #eeeae1; }
.mini-task > div { min-width: 0; }
.mini-task strong { display: block; font-size: 11px; font-weight: 500; }
.mini-task small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.mini-task .status { margin-left: auto; flex-shrink: 0; }
.health-preview { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; padding: 18px 22px; margin-top: 22px; }
.health-summary { display: flex; align-items: center; gap: 12px; }
.health-summary h3 { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 12px; }
.health-summary p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.health-row { display: flex; flex-direction: column; gap: 6px; font-size: 10px; color: var(--muted); }
.health-row b { color: #596977; font-weight: 500; }

/* Accounts and operational pages. */
.section-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; margin-bottom: 18px; }
.section-head p { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.count-pill { display: inline-block; margin-left: 7px; padding: 1px 6px; border-radius: 4px; font-size: 10px; font-weight: 400; color: #8b806a; background: #f0ece2; vertical-align: 2px; }
.account-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; padding: 0 22px 19px; gap: 10px; border-bottom: 1px solid var(--line); }
.search { display: flex; align-items: center; gap: 9px; width: 270px; max-width: 100%; height: 36px; padding: 0 11px; border: 1px solid #dedfdc; border-radius: 6px; background: #fffefa; color: #9a9ea4; }
.search input { min-width: 0; width: 100%; border: 0; background: none; font-size: 11px; color: var(--ink); outline: 0; }
.search:focus-within { outline: 2px solid #b9924f; outline-offset: 2px; }
.search .icon { width: 16px; height: 16px; }
.toolbar select, .worker-control select { height: 36px; border: 1px solid #dedfdc; border-radius: 6px; background: #fffefa; padding: 0 10px; font-size: 11px; }
.toolbar-space { flex: 1; }
.toolbar-hint { color: #8d9297; font-size: 10px; }
.table-scroll { overflow: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; white-space: nowrap; }
th { height: 40px; padding: 10px 15px; background: #faf8f2; border-bottom: 1px solid var(--line); color: #898b88; font-size: 10px; font-weight: 500; }
td { height: 80px; padding: 16px 15px; border-bottom: 1px solid #efebe2; color: #677181; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.selected { background: #faf5e8; }
.checkbox-col { width: 48px; padding-left: 22px; padding-right: 8px; }
input[type="checkbox"] { width: 15px; height: 15px; vertical-align: middle; accent-color: #a58a51; cursor: pointer; flex-shrink: 0; }
.account-cell { display: flex; align-items: center; gap: 11px; }
.account-cell strong { display: block; font-size: 12px; font-weight: 550; color: var(--ink); }
.account-cell small { display: block; margin-top: 5px; color: #8d929a; font-size: 10px; }
.balance { font-variant-numeric: tabular-nums; color: var(--ink); font-size: 14px; }
.balance > small { margin-left: 6px; color: #93979b; font-size: 10px; }
.balance-note { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; max-width: 220px; white-space: normal; line-height: 1.5; }
.align-right { text-align: right; padding-right: 22px; }
.status { display: inline-flex; align-items: center; gap: 4px; border-radius: 4px; padding: 3px 7px; font-size: 10px; line-height: 1.6; font-weight: 400; white-space: nowrap; background: #f0f2f2; color: #78838a; }
.status.good { background: #eaf3ed; color: #357565; }
.status.running { background: #f6edda; color: #94732c; }
.status.failed { background: #faeee8; color: #ab5f4e; }
.status.pending { background: #efedf6; color: #7a6f98; }
.status .dot { margin-right: 1px; width: 5px; height: 5px; }
.table-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding: 13px 22px; border-top: 1px solid var(--line); font-size: 10px; color: #8a8e92; }
.worker-control { display: flex; align-items: center; gap: 7px; }
.worker-control select { height: 27px; padding: 0 6px; font-size: 10px; }
.footer-divider { margin: 0 4px; color: #cbc8bd; }
.account-guide { display: flex; align-items: center; gap: 14px; padding: 22px 5px; color: #9c8a65; }
.account-guide > div { flex: 1; }
.account-guide strong { font-size: 11px; font-weight: 500; color: #727b80; }
.account-guide p { margin: 4px 0 0; color: #92958f; font-size: 10px; line-height: 1.8; }
.task-card { padding: 22px; border-bottom: 1px solid var(--line); }
.task-card:last-child { border: 0; }
.task-top { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.task-top strong { font-size: 13px; font-weight: 550; }
.task-top > .status { margin-left: auto; }
.task-meta { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 12px 0; color: #90969f; font-size: 10px; }
.task-progress { display: block; width: 100%; height: 5px; appearance: none; border: 0; border-radius: 3px; overflow: hidden; background: #eee9df; }
.task-progress::-webkit-progress-bar { background: #eee9df; }
.task-progress::-webkit-progress-value { background: #b49a63; }
.task-progress::-moz-progress-bar { background: #b49a63; }
.task-description { display: flex; justify-content: space-between; gap: 14px; margin-top: 10px; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.padded { padding: 24px; }
.update-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 22px; }
.update-stats > div { padding: 20px; background: #f7f5ef; border: 1px solid #eeeadf; border-radius: 8px; }
.update-stats span { display: block; font-size: 11px; color: var(--muted); }
.update-stats b { display: block; margin-top: 12px; font-size: 20px; font-weight: 550; }
.info-box { margin-top: 20px; padding: 15px 18px; border-radius: 7px; background: #edece6; color: #82877f; font-size: 11px; line-height: 1.9; overflow-wrap: anywhere; }
.check-row { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.check-row:last-child { border: 0; }
.check-mark { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 27px; height: 27px; border-radius: 50%; background: #eaf3ed; color: #4f8871; }
.check-row strong { display: block; font-size: 12px; font-weight: 500; }
.check-row small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.check-row .status { margin-left: auto; }
.log-row { display: grid; grid-template-columns: 85px 120px minmax(0, 1fr); gap: 20px; padding: 15px 22px; border-bottom: 1px solid var(--line); font-size: 11px; overflow-wrap: anywhere; }
.log-row:last-child { border: 0; }
.log-row time { color: #949aa3; font-variant-numeric: tabular-nums; }
.log-row b { color: #687889; font-weight: 500; }
footer { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; padding-bottom: 8px; font-size: 9px; color: #93978f; }

/* Login, product confirmations and receipt import keep the original controls. */
dialog { width: 470px; max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 27px; border: 1px solid #cdbb95; border-radius: 13px; background: var(--surface); color: var(--ink); box-shadow: 0 24px 90px #1c29384a; }
dialog::backdrop { background: #1d2c4166; backdrop-filter: blur(4px); }
dialog h2 { margin: 5px 0 0; font-size: 21px; font-weight: 600; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 23px; padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.dialog-head small { font-size: 10px; color: #9a8358; letter-spacing: 1px; }
.icon-button { width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: #f2efe6; color: #8b867b; font-size: 23px; line-height: 1; }
.icon-button:hover { background: #eae3d4; color: #64543a; }
form > label, .form-grid > label, .live-fields > label, #account-login-inputs label, #account-role-picker label, #account-mobile-inputs > label, .mobile-code-row > label { display: block; margin-bottom: 18px; font-size: 11px; color: #6e7988; }
form input:not([type="checkbox"]), textarea { display: block; width: 100%; margin-top: 8px; padding: 10px 12px; border: 1px solid #deded5; border-radius: 6px; background: #fffefa; font-size: 12px; color: var(--ink); }
textarea { min-height: 80px; resize: vertical; font-family: monospace; }
form select, #account-role-select, #account-login-method { display: block; width: 100%; margin-top: 8px; padding: 10px; border: 1px solid #deded5; border-radius: 6px; background: #fffefa; font-size: 12px; color: var(--ink); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-note { font-size: 11px; color: var(--muted); line-height: 1.8; background: #f5f3ed; padding: 12px 14px; border-radius: 7px; overflow-wrap: anywhere; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.product-picker { display: block; margin-bottom: 16px; font-size: 12px; color: var(--muted); }
.product { display: flex; align-items: center; gap: 12px; padding: 16px; border: 1px solid #e5d6b7; border-radius: 9px; background: linear-gradient(120deg, #f8f0df, #fffdf7); }
.product-image, .product-placeholder { width: 80px; height: 80px; flex: 0 0 80px; object-fit: contain; }
.product-placeholder { display: grid; place-items: center; font-size: 36px; color: #b39960; }
.product-copy { min-width: 0; flex: 1; }
.product strong { display: block; font-size: 14px; font-weight: 550; line-height: 1.5; }
.product small { display: block; margin-top: 6px; font-size: 10px; color: #998e75; }
.product > b { margin-left: auto; flex-shrink: 0; font-size: 16px; font-weight: 600; white-space: nowrap; color: #8c6f35; }
.order-summary { padding: 8px 0; margin: 12px 0; }
.order-summary > div { display: flex; justify-content: space-between; margin: 16px 0; font-size: 12px; }
.order-summary span { color: var(--muted); }
.order-summary b { font-weight: 500; }
.confirm-line { display: flex !important; align-items: flex-start; gap: 8px; color: #7b8290; line-height: 1.8; }
.receipt-import-panel { border: 1px solid var(--line); border-radius: 9px; padding: 16px; margin: 18px 0; background: #faf9f4; }
.receipt-import-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.receipt-import-head strong { font-size: 14px; }
.receipt-import-head .form-note { margin: 6px 0 0; }
.receipt-import-head button { flex-shrink: 0; }
.receipt-import-results { max-height: 280px; overflow: auto; }
.receipt-import-row { border-top: 1px solid var(--line); padding: 14px 0; }
.receipt-import-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.receipt-import-row > small { font-size: 11px; color: var(--muted); }
.receipt-import-row label { display: block; font-size: 11px; margin-top: 10px; }
.receipt-assignment { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 8px; padding: 16px; margin: 12px 0; }
.receipt-assignment strong { display: block; font-size: 12px; font-weight: 500; }
.receipt-assignment small { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; }
.receipt-assignment p { flex-basis: 100%; margin: 0; font-size: 11px; font-variant-numeric: tabular-nums; }
#recharge-dialog { width: 560px; }
.wide { width: 100%; margin: 8px 0 0; }
.mobile-code-row { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 12px; }
.mobile-code-row > label { flex: 1; min-width: 0; margin-bottom: 0; }
.mobile-code-row > button { flex-shrink: 0; min-width: 116px; min-height: 40px; }
.balance-comparison { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.balance-comparison > div { border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.balance-comparison span, .balance-comparison small { display: block; color: var(--muted); font-size: 10px; }
.balance-comparison strong { display: block; margin-top: 8px; font-size: 20px; font-weight: 500; font-variant-numeric: tabular-nums; }
.balance-comparison small { margin-top: 5px; }
.balance-reading { font-variant-numeric: tabular-nums; font-size: 14px; }
.timeline { border-left: 1px solid #dfd5bd; margin: 16px 8px; padding-left: 20px; }
.timeline > div { position: relative; margin-bottom: 20px; font-size: 12px; overflow-wrap: anywhere; }
.timeline > div::before { content: ""; position: absolute; left: -24px; top: 5px; width: 7px; height: 7px; border-radius: 50%; background: #b69a62; }
.timeline time { display: block; margin-top: 5px; color: #949ba5; font-size: 10px; }
.error-copy, #recharge-note.error-copy { color: #a95645; }
#toast { position: fixed; z-index: 50; left: calc(50% + var(--sidebar-width) / 2); bottom: 26px; transform: translateX(-50%); max-width: min(660px, 80vw); padding: 12px 20px; border: 1px solid #d5ba8159; border-radius: 8px; background: #2d3c50; color: #f4e7cc; box-shadow: 0 6px 24px #2223; font-size: 12px; }

/* Device rules retain long-field behavior and all original controls. */
.fingerprint-section { margin-top: 24px; }
.fingerprint-flow { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 14px 0; font-size: 11px; }
.fingerprint-flow > span { padding: 5px 8px; background: #f5f0e5; border: 1px solid #eae0ca; border-radius: 4px; }
.fingerprint-flow b { font-weight: 400; color: #ae9a74; }
.fingerprint-settings { display: flex; align-items: flex-end; gap: 18px; margin-top: 18px; }
.fingerprint-settings label { flex: 1; font-size: 11px; color: #73808e; }
.fingerprint-settings select, #fingerprint-sdk { display: block; min-width: 140px; max-width: 100%; border: 1px solid #deded5; border-radius: 6px; padding: 10px; background: #fffefa; color: var(--ink); font-size: 11px; }
.fingerprint-settings select { width: 100%; margin-top: 8px; }
.fingerprint-table th:first-child, .fingerprint-table td:first-child { padding-left: 22px; }
.fingerprint-table td { min-width: 110px; white-space: normal; }
.fingerprint-table td > small { display: block; color: var(--muted); font-size: 10px; margin-top: 6px; max-width: 260px; line-height: 1.6; overflow-wrap: anywhere; }
.fingerprint-table strong { font-weight: 500; }
.fingerprint-rules { max-height: 480px; overflow: auto; }
.fingerprint-rule { border-bottom: 1px solid var(--line); padding: 12px 0; font-size: 11px; }
.fingerprint-rule summary { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; line-height: 1.7; }
.fingerprint-rule summary code { min-width: 82px; color: var(--accent); overflow-wrap: anywhere; }
.fingerprint-rule summary > span:not(.status) { flex: 1; }
.fingerprint-rule dl { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 10px; background: #f7f5ef; padding: 14px; margin: 12px 0 0; }
.fingerprint-rule dt { color: var(--muted); }
.fingerprint-rule dd { margin: 0; overflow-wrap: anywhere; }
#fingerprint-schema-details { margin-top: 16px; font-size: 11px; }
#fingerprint-schema { max-height: 400px; overflow: auto; background: #f7f5ef; padding: 16px; font-size: 10px; }

/* Responsive rail and card tables follow the reference workbench. */
@media (max-width: 1200px) {
  :root { --sidebar-width: 190px; }
  .sidebar { padding-left: 12px; padding-right: 12px; }
  .brand { margin-left: 6px; gap: 7px; }
  .brand-caption { font-size: 7px; letter-spacing: 1px; }
  header { padding: 0 24px; }
  main { padding: 26px 24px 18px; }
  .header-right { gap: 11px; }
  .metrics { gap: 12px; }
  .metrics article { padding: 17px 16px; }
  .metric-foot { gap: 8px; }
  .catalog-grid { gap: 9px; }
  .catalog-card strong { font-size: 11px; }
  .account-panel .panel-head { align-items: flex-start; }
  .toolbar-hint { display: none; }
}
@media (max-width: 980px) {
  :root { --sidebar-width: 68px; }
  .sidebar { padding: 25px 9px 15px; }
  .brand { margin: 0 auto 29px; }
  .brand-name, .workspace-label, .nav-label, .nav .counter, .sidebar-note, .sidebar-bottom, .sidebar-ornament { display: none; }
  .nav { justify-content: center; padding: 11px 8px; }
  .nav-section-label { margin: 15px 8px 5px; padding: 0; height: 1px; background: #ffffff20; font-size: 0; }
  .overview-grid { gap: 16px; }
  .heading-date, .connection, .header-divider { display: none; }
  .health-preview { gap: 16px; }
  .health-summary { flex-basis: 100%; }
}
@media (max-width: 760px) {
  main { padding: 23px 18px 16px; }
  header { height: 60px; padding: 0 18px; }
  .header-right { gap: 9px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .catalog-card img { width: 80px; height: 80px; }
  .overview-grid { grid-template-columns: 1fr; gap: 18px; }
  .section-head p { line-height: 1.8; }
  .mode-notice div > span { display: block; margin-top: 4px; }
  .account-actions { width: 100%; }
  .toolbar-space { display: none; }
  .search { flex: 1 1 200px; }
  .account-guide { align-items: flex-start; }
  .account-guide > button { display: none; }
  .table-scroll table { min-width: 630px; }
  .fingerprint-settings { flex-wrap: wrap; }
  .fingerprint-rule summary { flex-wrap: wrap; }
  .fingerprint-rule dl { grid-template-columns: 80px minmax(0, 1fr); }
  .log-row { grid-template-columns: 70px minmax(0, 1fr); gap: 8px 18px; }
  .log-row > span { grid-column: 1 / -1; }
  footer { font-size: 8px; line-height: 1.8; }
}
@media (max-width: 600px) {
  :root { --sidebar-width: 0px; }
  .sidebar { position: sticky; inset: 0 0 auto; width: 100%; height: auto; padding: 7px 10px; border-right: 0; border-bottom: 1px solid #bc9b5b5c; }
  .brand, .nav-section-label { display: none; }
  nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
  nav::-webkit-scrollbar { display: none; }
  .nav { flex: 0 0 auto; gap: 6px; min-height: 36px; padding: 8px 10px; font-size: 10px; }
  .nav-label { display: inline; }
  .nav-icon, .nav-icon .icon { width: 16px; height: 16px; }
  .nav.active::before { display: none; }
  header { height: 52px; gap: 8px; padding: 0 14px; }
  .breadcrumb { font-size: 10px; }
  .breadcrumb > span { margin: 0 5px; }
  .header-right { gap: 8px; }
  .mode-badge { font-size: 9px; padding: 3px 5px; }
  #mode-switch { font-size: 9px; }
  #refresh-all { padding: 6px !important; min-height: 28px !important; }
  #refresh-all > span { display: none; }
  main { padding: 22px 14px 14px; }
  .page-head { gap: 10px; margin-bottom: 18px; }
  .page-head h1 { font-size: 25px; }
  .page-head p { font-size: 10px; line-height: 1.8; }
  .eyebrow { font-size: 8px; letter-spacing: 1.2px; }
  .heading-star { font-size: 14px; }
  .heading-actions { flex-shrink: 0; }
  #add-account { padding: 7px 10px; font-size: 10px; }
  .mode-notice { gap: 9px; padding: 11px 12px; margin-bottom: 18px; }
  .mode-notice strong { font-size: 10px; }
  .mode-notice div > span { font-size: 9px; line-height: 1.8; }
  .mode-notice > button { display: none; }
  .metrics { gap: 10px; margin-bottom: 18px; }
  .metrics article { padding: 15px 14px; }
  .metric-value { font-size: 29px; }
  .metric-label { font-size: 10px; }
  .metrics small { font-size: 9px; }
  .panel-head { padding: 18px 16px 15px; gap: 12px; }
  .panel-head h2 { font-size: 15px; }
  .panel-head p { font-size: 10px; }
  .catalog-panel .panel-head { align-items: flex-start; }
  .catalog-tabs { gap: 2px; padding: 3px; }
  .catalog-tabs button { padding: 5px 8px; font-size: 10px; }
  .catalog-grid { padding: 0 15px 15px; gap: 8px; }
  .catalog-card { padding: 9px 6px 10px; }
  .catalog-card img { width: 64px; height: 64px; }
  .catalog-card strong { font-size: 10px; }
  .catalog-card small { font-size: 8px; }
  .catalog-card .catalog-price { font-size: 13px; margin-top: 10px; }
  .catalog-footer { padding: 10px 16px; font-size: 8px; }
  .overview-grid { margin-top: 18px; }
  .quick-actions { padding: 0 16px 6px; }
  .quick-actions > button { padding: 14px 0; }
  .mini-task { padding: 16px; }
  .health-preview { padding: 17px 16px; margin-top: 18px; }
  .health-row { flex: 1; font-size: 9px; }
  .health-preview > button { width: 100%; }
  .account-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .account-actions > button { font-size: 10px; padding: 7px 9px; }
  .account-actions > #recharge-button { grid-column: 1 / -1; }
  .toolbar { padding: 0 16px 16px; gap: 8px; }
  .search { flex-basis: 100%; width: 100%; }
  .toolbar select { flex: 1; }
  .mobile-only { display: inline-flex !important; }
  .account-table { overflow: visible; }
  .account-table table, .account-table tbody { display: block; min-width: 0; white-space: normal; }
  .account-table thead { display: none; }
  .account-table tr { display: grid; grid-template-columns: 20px minmax(0, 1fr) minmax(0, 1fr); gap: 13px 12px; padding: 17px 16px; border-bottom: 1px solid var(--line); }
  .account-table tr:last-child { border-bottom: 0; }
  .account-table td { height: auto; min-width: 0; padding: 0; border: 0; font-size: 11px; }
  .account-table td:nth-child(2) { grid-column: 2 / -1; }
  .account-table td:nth-child(3), .account-table td:nth-child(5) { grid-column: 2; }
  .account-table td:last-child { text-align: right; align-self: end; }
  .account-table td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 6px; color: #969b9f; font-size: 9px; }
  .account-table td:only-child { grid-column: 1 / -1; }
  .account-table .balance-note, .account-table .account-cell small { font-size: 9px; }
  .account-table .account-cell { gap: 9px; }
  .table-footer { padding: 12px 16px; gap: 10px; }
  .worker-control { flex-wrap: wrap; font-size: 9px; }
  .account-guide { gap: 10px; padding-top: 18px; }
  .padded, .task-card { padding: 18px 16px; }
  .task-top { gap: 8px; }
  .task-top strong { font-size: 11px; }
  .check-row { padding: 16px; gap: 10px; }
  .check-row .status { flex-shrink: 0; }
  .update-stats { grid-template-columns: 1fr; gap: 10px; }
  .update-stats > div { padding: 16px; }
  .fingerprint-settings { gap: 12px; }
  .fingerprint-settings > label { flex-basis: 100%; }
  .fingerprint-flow { gap: 8px; font-size: 10px; }
  .info-box { padding: 13px 15px; font-size: 10px; }
  footer { flex-wrap: wrap; gap: 5px; margin-top: 22px; }
  footer > span { flex-basis: 100%; }
  dialog { padding: 21px; border-radius: 11px; }
  .product { flex-wrap: wrap; padding: 13px; }
  .product > b { width: 100%; text-align: right; }
  .receipt-import-head { flex-wrap: wrap; }
  .receipt-import-head button { width: 100%; }
  .balance-comparison { gap: 8px; }
  .balance-comparison > div { padding: 8px; }
  .balance-comparison strong { font-size: 17px; }
  #toast { left: 50%; max-width: calc(100vw - 28px); width: max-content; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}


body[data-production="true"] [data-maintenance],body[data-production="true"] #mode-switch,body[data-production="true"] #mode-notice { display:none !important; }
