:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #17324d; background: #f3f7fb;
  --ink: #17324d; --muted: #667d93; --line: #dbe7f0; --brand: #0878b9; --brand-dark: #055a8d;
  --brand-soft: #e8f5fc; --surface: #fff; --shadow: 0 18px 48px rgba(30, 82, 125, .09); --radius: 18px;
}

/* JD uses a warm rose identity while SWD keeps the default blue theme. */
html[data-group="jd"] {
  color: #563447;
  background: #fff7fa;
  --ink: #563447;
  --muted: #866b79;
  --line: #efd9e4;
  --brand: #d85d91;
  --brand-dark: #b63f75;
  --brand-soft: #fff0f6;
  --shadow: 0 18px 48px rgba(145, 55, 96, .1);
}
html[data-group="jd"] body { background: radial-gradient(circle at 85% 8%, rgba(242, 168, 198, .2), transparent 25%), #fff7fa; }
html[data-group="jd"] .sidebar { color: #ffe8f2; background: linear-gradient(165deg, #c75486 0%, #a83d72 48%, #762750 100%); box-shadow: 10px 0 34px rgba(111, 36, 77, .12); }
html[data-group="jd"] .brand-mark { color: #a63c70; box-shadow: 0 8px 18px rgba(91, 24, 59, .2); }
html[data-group="jd"] .brand-copy span { color: #f7c6da; }
html[data-group="jd"] .side-section-label { color: #f2b8d0; }
html[data-group="jd"] .side-nav-item { color: #f9d9e7; }
html[data-group="jd"] .side-nav-item .ui-icon { color: #ffe7f1; }
html[data-group="jd"] .side-nav-item.active { box-shadow: inset 3px 0 #fff, 0 8px 22px rgba(89, 24, 57, .14); }
html[data-group="jd"] .sidebar-note { color: #ffe7f1; background: rgba(91, 24, 58, .23); }
html[data-group="jd"] .sidebar-note small { color: #f3bfd4; }
html[data-group="jd"] .sidebar-footer { color: #edb1ca; }
html[data-group="jd"] .sidebar-footer-line { color: #dd91b1; }
html[data-group="jd"] .eyebrow,
html[data-group="jd"] .section-kicker { color: #b96a8e; }
html[data-group="jd"] .group-chip { border-color: #f2c9da; }
html[data-group="jd"] .intro-points { color: #7d5c6d; }
html[data-group="jd"] .intro-points i { background: #fde5ef; }
html[data-group="jd"] .auth-card,
html[data-group="jd"] .card { border-color: rgba(239, 216, 227, .94); }
html[data-group="jd"] input,
html[data-group="jd"] select,
html[data-group="jd"] textarea { background: #fffafd; border-color: #ead4df; }
html[data-group="jd"] input:hover,
html[data-group="jd"] select:hover,
html[data-group="jd"] textarea:hover { border-color: #dda9c1; }
html[data-group="jd"] input:focus,
html[data-group="jd"] select:focus,
html[data-group="jd"] textarea:focus { border-color: #d66b99; box-shadow: 0 0 0 3px rgba(214,107,153,.15); }
html[data-group="jd"] .button:focus-visible,
html[data-group="jd"] .side-nav-item:focus-visible,
html[data-group="jd"] .text-link:focus-visible { outline-color: rgba(214,107,153,.4); }
html[data-group="jd"] .button.primary { box-shadow: 0 7px 16px rgba(184,63,117,.18); }
html[data-group="jd"] .button.secondary { background: #fff0f6; border-color: #f1ccdc; }
html[data-group="jd"] .button.secondary:hover { background: #fce2ed; }
html[data-group="jd"] .button.outline { border-color: #e8bad0; }
html[data-group="jd"] .button.ghost { color: #806273; background: #fff6f9; border-color: #f1e0e8; }
html[data-group="jd"] .button.ghost:hover { background: #ffedf4; }
html[data-group="jd"] .feedback-panel,
html[data-group="jd"] .user-list,
html[data-group="jd"] .import-preview { color: #76596a; background: #fff7fa; border-color: #f0dce5; }
html[data-group="jd"] .record-link:hover,
html[data-group="jd"] .records-table tbody tr:hover,
html[data-group="jd"] .records-table tbody tr:focus { background: #fff1f6; }
html[data-group="jd"] .query-page { background: radial-gradient(circle at 16% 20%, rgba(229, 112, 160, .17), transparent 30%), radial-gradient(circle at 90% 10%, rgba(248, 188, 212, .2), transparent 26%), linear-gradient(145deg, #fffafd 0%, #fdf1f6 100%); }
html[data-group="jd"] .query-topbar { border-bottom-color: rgba(235, 202, 217, .9); }
html[data-group="jd"] .query-back { color: #7b5669; border-color: #edd7e2; }
html[data-group="jd"] .query-pill { background: rgba(255, 237, 245, .92); border-color: #f0c7d9; }
html[data-group="jd"] .query-journey span { background: linear-gradient(145deg, #e57aa7, #c64e83); box-shadow: 0 7px 16px rgba(198,78,131,.2); }
html[data-group="jd"] .query-journey > i { background: linear-gradient(90deg, #e9b7cc, #f4d8e4); }
html[data-group="jd"] .query-card { box-shadow: 0 28px 80px rgba(132, 45, 86, .13); }
html[data-group="jd"] .query-card::before { background: rgba(241, 187, 211, .28); }
html[data-group="jd"] .query-card-icon { background: linear-gradient(145deg, #e36f9f, #b94076); box-shadow: 0 12px 28px rgba(185,64,118,.22); }
html[data-group="jd"] .query-result { box-shadow: 0 22px 60px rgba(132,45,86,.11); }
html[data-group="jd"] .query-footer { border-top-color: rgba(235,202,217,.9); }
html[data-group="jd"] .accessory-list { background: #fff8fb; border-color: #edd7e2; }
html[data-group="jd"] .accessory-pill { border-color: #ebcedb; box-shadow: 0 3px 10px rgba(129,48,85,.05); }
html[data-group="jd"] .accessory-pill:has(input:checked) { background: #fff0f6; border-color: #e2a9c2; }
html[data-group="jd"] .config-manager,
html[data-group="jd"] .admin-correction { background: #fff9fb; border-color: #e8c9d7; }
html[data-group="jd"] .quick-outbound-field { background: #fff7fa; border-color: #edc8d8; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 300px; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 85% 8%, rgba(169, 221, 245, .22), transparent 25%), #f3f7fb; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; } a { color: inherit; text-decoration: none; }
main:not(.main-content) { max-width: 1100px; margin: 2rem auto; padding: 0 1rem; }
main:not(.main-content) header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
main:not(.main-content) form { display: grid; gap: .65rem; max-width: 32rem; }
main:not(.main-content) input, main:not(.main-content) button { font: inherit; padding: .65rem .75rem; border: 1px solid #b9c5d3; border-radius: 8px; }
main:not(.main-content) button { background: var(--brand); color: white; border: 0; }
main:not(.main-content) pre { white-space: pre-wrap; background: #edf5fa; color: var(--ink); padding: 1rem; border-radius: 10px; overflow: auto; }

.app-shell { display: flex; min-height: 100vh; }
.sidebar { position: fixed; z-index: 2; inset: 0 auto 0 0; display: flex; width: 264px; flex-direction: column; padding: 30px 20px 22px; color: #d8efff; background: linear-gradient(165deg, #096da8 0%, #07578e 48%, #063e6d 100%); box-shadow: 10px 0 34px rgba(23, 73, 112, .1); transition: transform .24s ease, box-shadow .24s ease; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { display: grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; color: #0a5b91; font-size: 13px; font-weight: 800; letter-spacing: -.08em; background: #fff; border-radius: 13px; box-shadow: 0 8px 18px rgba(0, 34, 70, .16); }
.brand-copy { display: grid; gap: 4px; }
.brand-copy strong { color: white; font-size: 15px; letter-spacing: .04em; }
.brand-copy span { color: #a8d9f2; font-size: 11px; }
.sidebar-rule { height: 1px; margin: 30px 0 24px; background: rgba(255,255,255,.16); }
.sidebar-navigation { display: grid; gap: 22px; }
.side-section-label { margin: 0 12px 9px; color: #92cae9; font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.side-nav { display: grid; gap: 5px; }
.side-nav-item { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 12px 13px; color: #c2e3f4; font-size: 14px; font-weight: 650; border-radius: 12px; transition: background .2s ease, color .2s ease, transform .2s ease; }
.side-nav-item:hover, .side-nav-item.active { color: white; background: rgba(255,255,255,.14); }
.side-nav-item:hover { transform: translateX(2px); }
.side-nav-item.active { box-shadow: inset 3px 0 #fff, 0 8px 22px rgba(0, 35, 69, .1); }
.admin-nav-block { display: grid; }
.ui-icon { position: relative; display: inline-block; width: 20px; height: 20px; flex: 0 0 20px; color: currentColor; }
.side-nav-item .ui-icon { color: #d8f0fb; }
.icon-search::before { content: ""; position: absolute; width: 10px; height: 10px; left: 2px; top: 2px; border: 2px solid currentColor; border-radius: 50%; }
.icon-search::after { content: ""; position: absolute; width: 8px; height: 2px; right: 0; bottom: 3px; background: currentColor; border-radius: 2px; transform: rotate(45deg); transform-origin: right center; }
.icon-dashboard::before { content: ""; position: absolute; inset: 2px; border: 2px solid currentColor; border-radius: 4px; box-shadow: inset 0 5px 0 transparent; }
.icon-database::before { content: ""; position: absolute; left: 2px; top: 3px; width: 16px; height: 12px; border: 2px solid currentColor; border-radius: 50% / 28%; box-shadow: inset 0 -4px 0 transparent; }
.icon-database::after { content: ""; position: absolute; left: 2px; top: 8px; width: 16px; height: 7px; border: 2px solid currentColor; border-top: 0; border-radius: 0 0 50% 50% / 0 0 35% 35%; }
.icon-dashboard::after { content: ""; position: absolute; left: 6px; top: 6px; width: 3px; height: 3px; background: currentColor; border-radius: 1px; box-shadow: 6px 0 currentColor, 0 6px currentColor, 6px 6px currentColor; }
.icon-admin::before { content: ""; position: absolute; width: 7px; height: 7px; left: 6px; top: 1px; border: 2px solid currentColor; border-radius: 50%; }
.icon-admin::after { content: ""; position: absolute; width: 15px; height: 8px; left: 2px; bottom: 1px; border: 2px solid currentColor; border-bottom: 0; border-radius: 9px 9px 3px 3px; }
.icon-user::before { content: ""; position: absolute; width: 6px; height: 6px; left: 7px; top: 2px; border: 2px solid currentColor; border-radius: 50%; }
.icon-user::after { content: ""; position: absolute; width: 13px; height: 7px; left: 3px; bottom: 1px; border: 2px solid currentColor; border-bottom: 0; border-radius: 8px 8px 2px 2px; }
.icon-lock::before { content: ""; position: absolute; width: 10px; height: 8px; left: 5px; top: 1px; border: 2px solid currentColor; border-bottom: 0; border-radius: 7px 7px 0 0; }
.icon-lock::after { content: ""; position: absolute; width: 16px; height: 11px; left: 2px; bottom: 1px; background: currentColor; border-radius: 4px; }
.icon-login::before { content: ""; position: absolute; width: 12px; height: 12px; right: 1px; top: 4px; border: 2px solid currentColor; border-left: 0; border-radius: 0 4px 4px 0; }
.icon-login::after { content: "→"; position: absolute; left: 0; top: -2px; font-size: 18px; font-weight: 700; line-height: 20px; }
.icon-order::before { content: ""; position: absolute; inset: 1px 3px; border: 2px solid currentColor; border-radius: 3px; }
.icon-order::after { content: ""; position: absolute; left: 7px; top: 6px; width: 7px; height: 2px; background: currentColor; border-radius: 2px; box-shadow: 0 4px 0 currentColor, 0 8px 0 currentColor; }
.icon-phone::before { content: ""; position: absolute; inset: 3px 5px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 4px 4px 9px 9px; transform: rotate(-35deg); }
.icon-phone::after { content: ""; position: absolute; left: 4px; top: 2px; width: 5px; height: 5px; border: 2px solid currentColor; border-radius: 2px; box-shadow: 7px 9px 0 -1px currentColor; transform: rotate(-35deg); }
.icon-records::before { content: ""; position: absolute; inset: 2px 3px; border: 2px solid currentColor; border-radius: 3px; }
.icon-records::after { content: ""; position: absolute; left: 7px; top: 6px; width: 7px; height: 2px; background: currentColor; border-radius: 2px; box-shadow: 0 4px 0 currentColor, 0 8px 0 currentColor; }
.icon-shield::before { content: ""; position: absolute; inset: 1px 3px; border: 2px solid currentColor; border-radius: 8px 8px 10px 10px; clip-path: polygon(0 0,100% 0,100% 66%,50% 100%,0 66%); }
.sidebar-note { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 13px 12px; color: #cff0ff; background: rgba(0, 32, 67, .2); border: 1px solid rgba(255,255,255,.1); border-radius: 12px; }
.sidebar-note div { display: grid; gap: 3px; }
.sidebar-note strong { color: white; font-size: 12px; } .sidebar-note small { color: #a9daef; font-size: 11px; }
.note-dot, .online-status i, .workflow-dot { display: inline-block; width: 7px; height: 7px; flex: 0 0 7px; background: #43d6ae; border-radius: 50%; box-shadow: 0 0 0 4px rgba(67,214,174,.15); }
.sidebar-footer { display: grid; gap: 4px; margin-top: 22px; padding: 16px 12px 0; color: #8fc6e7; font-size: 11px; border-top: 1px solid rgba(255,255,255,.14); }
.sidebar-footer-line { color: #72acd0; font-size: 10px; }

.sidebar-toggle { position: fixed; z-index: 4; top: 24px; left: 244px; display: grid; width: 38px; height: 38px; padding: 0; place-items: center; color: var(--brand); background: rgba(255,255,255,.97); border: 1px solid var(--line); border-radius: 50%; box-shadow: 0 8px 24px rgba(20,66,101,.16); transition: left .24s ease, transform .18s ease, background .18s ease; }
.sidebar-toggle:hover { background: var(--brand-soft); transform: translateY(-1px); }
.sidebar-toggle:focus-visible { outline: 3px solid rgba(77,168,212,.38); outline-offset: 3px; }
.sidebar-toggle span { display: block; width: 9px; height: 9px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateX(2px) rotate(45deg); transition: transform .24s ease; }
html.sidebar-collapsed .sidebar { transform: translateX(-100%); box-shadow: none; }
html.sidebar-collapsed .main-content { width: 100%; margin-left: 0; }
html.sidebar-collapsed .sidebar-toggle { left: 16px; }
html.sidebar-collapsed .sidebar-toggle span { transform: translateX(-2px) rotate(225deg); }

.main-content { width: calc(100% - 264px); margin-left: 264px; padding: 34px clamp(24px, 4vw, 64px) 22px; transition: width .24s ease, margin-left .24s ease; }
.main-content > .topbar, .main-content > #login, .main-content > #change, .main-content > #work, .main-content > #adminPage, .main-content > #recordsPage, .main-content > .page-footer { width: min(100%, 1420px); margin-left: auto; margin-right: auto; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 34px; }
.eyebrow, .section-kicker { margin: 0 0 8px; color: #5f93b3; font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.topbar h1 { margin: 0; color: var(--ink); font-size: clamp(25px, 3vw, 32px); letter-spacing: -.04em; }
.group-chip { display: inline-flex; align-items: center; min-height: 26px; margin-left: 9px; padding: 4px 10px; vertical-align: middle; color: var(--brand); font-size: 13px; font-weight: 800; letter-spacing: .02em; background: var(--brand-soft); border: 1px solid #c5e6f5; border-radius: 8px; }
.topbar-actions { display: flex; align-items: center; gap: 22px; padding-bottom: 3px; color: var(--muted); font-size: 12px; }
.online-status { display: inline-flex; align-items: center; gap: 9px; white-space: nowrap; }
.text-link { color: var(--brand); font-weight: 700; } .text-link:hover { color: var(--brand-dark); text-decoration: underline; }

.auth-view { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 430px); align-items: center; gap: clamp(30px, 7vw, 110px); min-height: 520px; max-width: 1030px; margin: 0 auto; }
.auth-intro { max-width: 450px; padding: 24px 0; }
.auth-intro h2 { max-width: 400px; margin: 0 0 15px; color: var(--ink); font-size: clamp(28px, 4vw, 44px); line-height: 1.18; letter-spacing: -.06em; }
.auth-intro p { max-width: 380px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.9; }
.compact-intro h2 { font-size: clamp(26px, 4vw, 38px); }
.intro-points { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 34px; color: #53718d; font-size: 12px; }
.intro-points span { display: inline-flex; align-items: center; gap: 7px; }
.intro-points i { display: grid; width: 18px; height: 18px; place-items: center; color: var(--brand); font-size: 12px; font-style: normal; background: #dff3fc; border-radius: 50%; }
.auth-card, .card { background: rgba(255,255,255,.96); border: 1px solid rgba(211, 227, 238, .92); border-radius: var(--radius); box-shadow: var(--shadow); }
.auth-card { padding: 30px; }
.card-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 25px; }
.card-heading h2 { margin: 0; color: var(--ink); font-size: 22px; letter-spacing: -.03em; }
.heading-icon { display: grid; width: 37px; height: 37px; place-items: center; color: var(--brand); font-size: 20px; background: var(--brand-soft); border-radius: 11px; }
.stack-form { display: grid; gap: 15px; }
.field { display: grid; gap: 7px; min-width: 0; }
.field label { color: #425f79; font-size: 13px; font-weight: 700; }
.field label small { margin-left: 4px; color: #99aaba; font-weight: 500; }
.field-note { color: var(--muted); font-size: 11px; }
.field em, .required-note em { color: #e16e61; font-style: normal; }
input, select, textarea { width: 100%; color: var(--ink); background: #fbfdff; border: 1px solid #d5e3ee; border-radius: 9px; outline: 0; transition: border-color .18s ease, box-shadow .18s ease, background .18s ease; }
input, select { min-height: 42px; padding: 10px 12px; } textarea { min-height: 82px; padding: 11px 12px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #a9bac9; }
input:hover, select:hover, textarea:hover { border-color: #aecfe2; }
input:focus, select:focus, textarea:focus { background: white; border-color: #4da8d4; box-shadow: 0 0 0 3px rgba(77,168,212,.15); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 43px; padding: 10px 16px; color: white; font-size: 13px; font-weight: 800; border: 1px solid transparent; border-radius: 10px; transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease; }
.button:hover { transform: translateY(-1px); } .button:active { transform: translateY(0); }
.button:focus-visible, .side-nav-item:focus-visible, .text-link:focus-visible { outline: 3px solid rgba(77,168,212,.38); outline-offset: 3px; }
.button.primary { background: var(--brand); box-shadow: 0 7px 16px rgba(13,111,174,.16); } .button.primary:hover { background: var(--brand-dark); }
.button.secondary { color: var(--brand); background: #eaf6fc; border-color: #cae8f5; } .button.secondary:hover { background: #d9f0fa; }
.button.outline { color: var(--brand); background: white; border-color: #bddcea; } .button.outline:hover { background: var(--brand-soft); }
.button.ghost { color: #5d7890; background: #f3f8fb; border-color: #dfebf2; } .button.ghost:hover { color: var(--brand); background: #eaf5fa; }
.button.wide { width: 100%; } .button.small { min-height: 35px; padding: 7px 12px; font-size: 11px; }
.form-message { min-height: 18px; margin: 12px 0 0; color: #d85f5f; font-size: 12px; }
.receiver-barcode-zone { margin-top: 14px; padding: 11px 12px; background: #f7fbfd; border: 1px solid #dceaf2; border-radius: 11px; }
.receiver-barcode-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.receiver-barcode-head > div { display: grid; gap: 2px; }
.receiver-barcode-head strong { color: var(--ink); font-size: 12px; }
.receiver-barcode-head small { color: var(--muted); font-size: 10px; }
.receiver-barcode-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 7px; }
.receiver-barcode-card { display: grid; min-width: 0; padding: 6px 8px; color: var(--ink); text-align: left; background: #fff; border: 1px solid #d8e8f1; border-radius: 9px; cursor: pointer; }
.receiver-barcode-card:hover, .receiver-barcode-card:focus-visible { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); outline: 0; }
.receiver-barcode-card img { width: 100%; height: 32px; object-fit: contain; }
.receiver-barcode-card span { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; margin-top: 3px; }
.receiver-barcode-card strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.receiver-barcode-card small { flex: 0 0 auto; color: var(--muted); font-size: 8px; }
.receiver-barcode-empty { grid-column: 1 / -1; margin: 3px 0; color: var(--muted); font-size: 11px; text-align: center; }

#work { padding-bottom: 10px; }
.user-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 23px; padding: 11px 14px; background: rgba(255,255,255,.7); border: 1px solid var(--line); border-radius: 12px; }
.bottom-account-bar { margin: 4px 0 0; }
.user-context { display: flex; align-items: center; gap: 10px; }
.user-avatar { display: grid; width: 31px; height: 31px; place-items: center; color: var(--brand); font-size: 17px; background: var(--brand-soft); border-radius: 9px; }
.user-context div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; }
.user-context strong { color: var(--ink); font-size: 12px; } .muted-label { width: 100%; color: #99abba; font-size: 10px; }
.role-separator { color: #b8c6d1; } .role-label { color: var(--brand); font-size: 11px; }
.work-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 0 0 25px; }
.work-intro h2 { margin: 0 0 7px; color: var(--ink); font-size: clamp(22px, 3vw, 30px); letter-spacing: -.05em; }
.work-intro p { margin: 0; color: var(--muted); font-size: 13px; }
.workflow-badge { display: flex; align-items: center; gap: 11px; padding: 11px 14px; color: #3c6a83; background: #f0faf9; border: 1px solid #d7f0e9; border-radius: 11px; }
.workflow-badge div { display: grid; gap: 3px; } .workflow-badge strong { font-size: 11px; } .workflow-badge small { color: #7c9a9e; font-size: 10px; }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(330px, .85fr); align-items: start; gap: 20px; }
.primary-workspace { margin-bottom: 28px; }
.secondary-work-intro { margin-top: 4px; }
.card { overflow: hidden; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 23px 25px 17px; }
.card-head h2 { margin: 0 0 7px; color: var(--ink); font-size: 19px; letter-spacing: -.03em; }
.card-head p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.status-badge { flex: 0 0 auto; padding: 6px 9px; color: #20835f; font-size: 10px; font-weight: 800; background: #e9f8f1; border-radius: 6px; }
.card-symbol, .admin-lock { display: grid; width: 32px; height: 32px; place-items: center; color: var(--brand); font-weight: 800; background: var(--brand-soft); border-radius: 9px; }
.card-body { padding: 5px 25px 25px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.field-wide { grid-column: 1 / -1; }
.input-action { display: flex; gap: 8px; } .input-action input { min-width: 0; } .input-action .button { flex: 0 0 auto; }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 17px; padding-top: 19px; border-top: 1px solid #edf3f7; }
.required-note { color: #9aabba; font-size: 10px; }
.side-stack { display: grid; gap: 20px; } .order-card { position: sticky; top: 22px; } .order-card .card-body { padding-top: 4px; }
.quick-outbound-field { display: grid; gap: 7px; padding: 11px; background: #f3f9fd; border: 1px solid #c9dfec; border-radius: 12px; }
.quick-outbound-field > label { color: #2d5874; font-size: 12px; font-weight: 800; }.quick-outbound-field > small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 13px 0 9px; }
.result-wrap { margin-top: 21px; } .result-label { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; color: #90a4b6; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.result-label::before { content: ""; width: 5px; height: 5px; background: #9ac7dc; border-radius: 50%; }
pre { margin: 0; max-height: 190px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; color: #4c718c; font: 11px/1.65 ui-monospace, SFMono-Regular, Consolas, monospace; background: #f4f9fc; border: 1px solid #e1eef4; border-radius: 9px; }
.result-wrap pre { min-height: 55px; padding: 11px; }
.admin-section { margin-top: 30px; padding-top: 30px; scroll-margin-top: 24px; border-top: 1px solid #dbe7f0; }
.admin-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.admin-section-heading h2 { margin: 0 0 7px; color: var(--ink); font-size: 26px; letter-spacing: -.04em; }
.admin-section-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.admin-card { overflow: visible; }
.admin-body { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 28px 30px 32px; }
.admin-block + .admin-block { padding-left: 30px; border-left: 1px solid #edf3f7; }
.admin-block h3 { margin: 0 0 7px; color: var(--ink); font-size: 18px; } .admin-block .button { margin-top: 2px; } .admin-block > .button { margin-top: 12px; }
.admin-description { margin: 0 0 20px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.admin-block pre { max-height: 140px; margin-top: 12px; padding: 10px; } .import-block > p { margin: -6px 0 17px; color: var(--muted); font-size: 11px; }
.file-field { display: grid; gap: 7px; } .file-field input { padding: 8px; font-size: 11px; }
.file-field input::file-selector-button { margin-right: 8px; padding: 5px 8px; color: var(--brand); font: inherit; background: var(--brand-soft); border: 0; border-radius: 5px; cursor: pointer; }
.page-footer { display: flex; justify-content: space-between; gap: 16px; margin-top: 30px; padding-top: 16px; color: #9aabba; font-size: 10px; border-top: 1px solid #e2edf4; }
.print-agent-download { display: flex; justify-content: flex-end; margin-top: 8px; padding-right: 2px; }
.print-agent-download a { color: #a5b3be; font-size: 10px; line-height: 1.5; text-decoration: none; }
.print-agent-download a:hover, .print-agent-download a:focus-visible { color: #6f8799; text-decoration: underline; }

/* 1920×1080 workshop layout: keep both primary cards fully in the first viewport. */
@media (min-width: 1500px) and (min-height: 850px) {
  .main-content { padding-top: 22px; }
  .topbar { margin-bottom: 18px; }
  .user-bar { padding-block: 8px; }
  .bottom-account-bar { margin-top: 4px; }
  .primary-workspace { gap: 16px; margin-bottom: 26px; }
  .primary-workspace .card-head { padding: 17px 20px 12px; }
  .primary-workspace .card-head h2 { margin-bottom: 4px; }
  .primary-workspace .card-body { padding: 3px 20px 18px; }
  .primary-workspace .form-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px 11px; margin-bottom: 10px; }
  .primary-workspace .field-wide { grid-column: 1 / -1; }
  .primary-workspace .field:has(#departmentPhone) { grid-column: span 1; }
  .primary-workspace .field { gap: 4px; }
  .primary-workspace input,
  .primary-workspace select { min-height: 38px; padding-block: 7px; }
  .primary-workspace textarea { min-height: 58px; padding-block: 8px; }
  .primary-workspace .button { min-height: 39px; padding-block: 7px; }
  .primary-workspace .accessory-field { gap: 7px; }
  .primary-workspace .accessory-list { min-height: 48px; padding: 8px; }
  .primary-workspace .accessory-pill { min-height: 36px; }
  .primary-workspace .accessory-pill label { padding-block: 6px; }
  .primary-workspace .accessory-summary { min-height: 16px; }
  .primary-workspace .form-actions { margin-top: 10px; padding-top: 12px; }
  .primary-workspace .receiver-barcode-zone { display: grid; grid-template-columns: 155px minmax(0, 1fr); align-items: center; gap: 8px; margin-top: 10px; padding-block: 7px; }
  .primary-workspace .receiver-barcode-head { margin-bottom: 0; }
  .primary-workspace .receiver-barcode-card { padding-block: 4px; }
  .primary-workspace .receiver-barcode-card img { height: 27px; }
  .primary-workspace .action-grid { margin-block: 9px 7px; }
  .primary-workspace .admin-correction { margin-top: 10px; padding: 10px; }
  .primary-workspace .result-wrap { margin-top: 12px; }
}

/* Laptop compact layout: 1920x1080 displays commonly expose about 1280x720 CSS pixels at 150% scaling. */
@media (min-width: 1001px) and (max-width: 1499px) and (max-height: 850px) {
  .main-content { padding: 18px 24px; }
  .topbar { margin-bottom: 14px; }
  .eyebrow, .section-kicker { margin-bottom: 5px; }
  .topbar h1 { font-size: 27px; }
  .group-chip { min-height: 24px; padding-block: 3px; font-size: 12px; }
  .workspace-grid.primary-workspace { grid-template-columns: minmax(0, 1fr); gap: 14px; margin-bottom: 20px; }
  .primary-workspace .card-head { padding: 14px 18px 9px; }
  .primary-workspace .card-head h2 { margin-bottom: 3px; font-size: 17px; }
  .primary-workspace .card-head p { font-size: 11px; line-height: 1.45; }
  .primary-workspace .status-badge { padding-block: 5px; }
  .primary-workspace .card-body { padding: 2px 18px 14px; }
  .primary-workspace .form-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px 10px; margin-bottom: 8px; }
  .primary-workspace .field-wide { grid-column: 1 / -1; }
  .primary-workspace .field { gap: 3px; }
  .primary-workspace .field label { font-size: 12px; }
  .primary-workspace input,
  .primary-workspace select { min-height: 34px; padding: 6px 9px; font-size: 13px; }
  .primary-workspace textarea { min-height: 50px; padding: 7px 9px; font-size: 13px; }
  .primary-workspace .button { min-height: 35px; padding: 6px 12px; font-size: 12px; }
  .primary-workspace .button.small { min-height: 32px; padding: 5px 10px; font-size: 10px; }
  .primary-workspace .field-note { font-size: 10px; }
  .primary-workspace .accessory-field { gap: 5px; }
  .primary-workspace .accessory-list { min-height: 40px; gap: 6px; padding: 6px; }
  .primary-workspace .accessory-pill { min-height: 32px; }
  .primary-workspace .accessory-pill label { padding: 5px 7px; font-size: 12px; }
  .primary-workspace .accessory-pill input { width: 15px; height: 15px; padding: 0; }
  .primary-workspace .accessory-summary { min-height: 14px; font-size: 10px; line-height: 1.3; }
  .primary-workspace .form-actions { margin-top: 7px; padding-top: 9px; }
  .primary-workspace .receiver-barcode-zone { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: center; gap: 8px; margin-top: 8px; padding: 6px 9px; }
  .primary-workspace .receiver-barcode-head { margin-bottom: 0; }
  .primary-workspace .receiver-barcode-list { gap: 5px; }
  .primary-workspace .receiver-barcode-card { padding: 3px 6px; }
  .primary-workspace .receiver-barcode-card img { height: 23px; }
  .primary-workspace .action-grid { margin-block: 8px 6px; }
  .primary-workspace .result-wrap { margin-top: 10px; }
}

/* Standalone administration */
.admin-page-content { max-width: 1040px; margin: 0 auto; }
.admin-page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 4px 0 24px; padding: 6px 2px; }
.admin-page-heading h2 { margin: 4px 0 9px; color: var(--ink); font-size: clamp(25px, 3vw, 34px); letter-spacing: -.045em; }
.admin-page-heading p { max-width: 680px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.75; }
.admin-heading-icon { width: 52px; height: 52px; flex: 0 0 52px; border-radius: 15px; box-shadow: 0 10px 24px rgba(13,111,174,.13); }
.admin-heading-icon .ui-icon { width: 23px; height: 23px; }
.admin-quick-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.admin-quick-nav button { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 2px 10px; align-items: center; min-width: 0; padding: 12px 14px; color: #496a81; text-align: left; background: rgba(255,255,255,.78); border: 1px solid #dce9f1; border-radius: 12px; cursor: pointer; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.admin-quick-nav button:hover, .admin-quick-nav button:focus-visible { background: white; border-color: #a9d2e6; outline: 0; transform: translateY(-1px); }
.admin-quick-nav .ui-icon { grid-row: 1 / 3; width: 20px; height: 20px; color: var(--brand); }
.admin-quick-nav strong { overflow: hidden; color: var(--ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.admin-quick-nav small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.admin-dashboard { display: flex; flex-direction: column; gap: 12px; }
.admin-module { width: 100%; overflow: visible; scroll-margin-top: 22px; }
.admin-module.account-module { order: 1; }
.admin-module.receiver-people-module { order: 2; }
.admin-module.department-phone-module { order: 3; }
.admin-module.print-template-module { order: 4; }
.admin-module.password-module { order: 5; }
.admin-module.import-module { order: 6; }
.admin-module > summary { list-style: none; cursor: pointer; }
.admin-module > summary::-webkit-details-marker { display: none; }
.admin-module-head { position: relative; display: flex; align-items: flex-start; gap: 14px; padding: 20px 64px 18px 22px; border-bottom: 0; }
.admin-module[open] > .admin-module-head { border-bottom: 1px solid #edf3f7; }
.admin-module-head::after { content: ""; position: absolute; top: 50%; right: 25px; width: 9px; height: 9px; border-right: 2px solid #7a98ad; border-bottom: 2px solid #7a98ad; transform: translateY(-70%) rotate(45deg); transition: transform .18s ease; }
.admin-module[open] > .admin-module-head::after { transform: translateY(-30%) rotate(225deg); }
.admin-module-head .card-symbol { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 12px; }
.admin-module-head h3 { margin: 3px 0 6px; color: var(--ink); font-size: 20px; letter-spacing: -.035em; }
.admin-module-head p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.admin-module-body { padding: 21px 24px 25px; }
.admin-module .user-list { max-height: 340px; overflow: auto; }
.account-module #userForm { grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.2fr) minmax(140px, .65fr) auto; align-items: end; gap: 12px; }
.account-module #userForm .button { width: auto; min-height: 43px; white-space: nowrap; }
.template-selector-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; margin-bottom: 18px; }
.paper-size-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.print-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px 14px; margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 11px; }
.print-fields legend { padding: 0 6px; color: var(--ink); font-size: 12px; font-weight: 750; }
.print-fields label, .check-line { display: flex; align-items: center; gap: 8px; color: #516d83; font-size: 12px; }
.print-fields input, .check-line input { width: 16px; height: 16px; accent-color: var(--brand); }
.layout-editor { overflow: hidden; background: #f8fbfd; border: 1px solid #dce9f1; border-radius: 12px; }
.layout-editor > summary { display: flex; align-items: baseline; gap: 10px; padding: 13px 15px; color: #365d77; cursor: pointer; list-style: none; }
.layout-editor > summary::-webkit-details-marker { display: none; }.layout-editor > summary small { color: var(--muted); font-size: 11px; }
.layout-editor-body { display: grid; gap: 12px; padding: 14px; border-top: 1px solid #e2edf3; }
.layout-toolbar { display: grid; grid-template-columns: minmax(120px,.7fr) minmax(150px,1fr) auto auto; gap: 8px; }
.layout-custom-row { display: grid; grid-template-columns: minmax(130px,.6fr) minmax(180px,1fr) auto; gap: 8px; margin-top: 9px; }
.layout-workbench { display: grid; grid-template-columns: minmax(360px,1.35fr) minmax(220px,.65fr); align-items: start; gap: 13px; margin-top: 10px; }
.layout-canvas-wrap { padding: 16px; overflow: auto; background: #eaf2f7; border-radius: 11px; }
.layout-canvas { position: relative; width: min(100%, 680px); min-width: 360px; overflow: hidden; touch-action: none; background-color: white; background-image: linear-gradient(to right,rgba(73,132,166,.12) 1px,transparent 1px),linear-gradient(to bottom,rgba(73,132,166,.12) 1px,transparent 1px); background-size: 8.333% 12.5%; border: 1px solid #adc8d8; box-shadow: 0 5px 18px rgba(25,75,105,.1); }
.layout-element { position: absolute; display: block; min-width: 0; padding: 1px 3px; overflow: hidden; color: #193f59; line-height: 1.15; white-space: nowrap; text-overflow: ellipsis; touch-action: none; background: rgba(232,247,253,.86); border: 1px solid #70b6d7; border-radius: 3px; cursor: grab; }
.layout-element.layout-barcode { color: transparent; background: repeating-linear-gradient(90deg,#15384f 0 2px,#fff 2px 4px,#15384f 4px 7px,#fff 7px 9px); }
.layout-element.layout-qr_code { color: transparent; background: conic-gradient(from 90deg at 25% 25%,#15384f 25%,#fff 0 50%,#15384f 0 75%,#fff 0) 0 0/8px 8px; }
.layout-element.is-selected { z-index: 2; outline: 2px solid #0b82bf; outline-offset: 1px; }.layout-element.has-overlap { border-color: #cf5c5c; box-shadow: inset 0 0 0 1px #cf5c5c; }.layout-element.is-dragging { cursor: grabbing; }
.layout-inspector { display: grid; gap: 11px; padding: 13px; background: white; border: 1px solid #dde9f0; border-radius: 11px; }
.layout-inspector > strong { color: #2f5973; font-size: 12px; overflow-wrap: anywhere; }.layout-inspector-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.layout-inspector-grid label { display: grid; gap: 4px; color: #668096; font-size: 10px; }.layout-inspector-grid input,.layout-inspector-grid select { min-height: 34px; padding: 6px 8px; font-size: 11px; }
.field-label { color: var(--ink); font-size: 12px; font-weight: 750; }
.copy-field-configs { display: grid; gap: 12px; }
.copy-field-panel { background: #f8fbfd; }
.phone-table { display: grid; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; }
.phone-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; padding: 10px 11px; color: var(--ink); text-align: left; background: white; border: 0; border-top: 1px solid var(--line); cursor: pointer; }
.phone-row:first-child { border-top: 0; }.phone-row:hover { background: var(--brand-soft); }.phone-row small { color: var(--brand); }
.phone-row.is-selected { position: relative; z-index: 1; background: var(--brand-soft); box-shadow: inset 3px 0 var(--brand); }
.phone-row.is-recently-saved { animation: receiver-saved-flash 2.6s ease both; }
.receiver-person-list { display: grid; gap: 7px; }
.receiver-person-form { padding: 14px; background: #f8fbfd; border: 1px solid #deebf2; border-radius: 12px; }
.receiver-form-mode { display: flex; align-items: center; gap: 11px; padding: 11px 12px; color: #496a81; background: white; border: 1px solid #dce9f1; border-radius: 10px; }
.receiver-form-mode > span { flex: 0 0 auto; padding: 4px 7px; color: var(--brand); font-size: 10px; font-weight: 800; background: var(--brand-soft); border-radius: 6px; }
.receiver-form-mode > div { display: grid; gap: 3px; min-width: 0; }
.receiver-form-mode strong { color: var(--ink); font-size: 13px; overflow-wrap: anywhere; }
.receiver-form-mode small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.receiver-form-mode.is-editing { background: #fff9ef; border-color: #ecd7ad; }
.receiver-form-mode.is-editing > span { color: #9a651e; background: #f8e8c8; }
.receiver-person-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.receiver-person-actions .button { min-width: 138px; }
.receiver-person-actions .button.primary { min-width: 240px; }
.receiver-person-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 10px 11px; color: var(--ink); text-align: left; background: #f8fbfd; border: 1px solid #e3edf3; border-radius: 9px; cursor: pointer; }
.receiver-person-row:hover, .receiver-person-row:focus-visible { border-color: var(--brand); outline: 0; }
.receiver-person-row.is-selected { background: var(--brand-soft); border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 14%, transparent); }
.receiver-person-row.is-recently-saved { animation: receiver-saved-flash 2.6s ease both; }
@keyframes receiver-saved-flash { 0%, 35% { background: #edf9f3; border-color: #67b68f; box-shadow: 0 0 0 3px rgba(76,169,124,.12); } 100% { background: #f8fbfd; border-color: #e3edf3; box-shadow: none; } }
.receiver-person-row > span:first-child { display: grid; gap: 2px; }
.receiver-person-row strong { font-size: 12px; }
.receiver-person-row small { color: var(--muted); font-family: Consolas, "Microsoft YaHei UI", sans-serif; font-size: 9px; }
.receiver-person-tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.receiver-person-tags em { padding: 3px 5px; color: var(--brand); font-size: 9px; font-style: normal; font-weight: 800; background: var(--brand-soft); border-radius: 5px; }
.receiver-person-tags em.is-disabled { color: #9a6b75; background: #f8e9ed; }
.module-divider { height: 1px; margin: 24px 0 19px; background: #e8f0f5; }
.module-subhead { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 13px; }
.module-subhead div { display: grid; gap: 3px; }
.module-subhead strong { color: var(--ink); font-size: 13px; }
.module-subhead small { color: var(--muted); font-size: 10px; }
.import-notice { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 20px; padding: 13px 14px; color: #467087; background: #f1f8fc; border: 1px solid #dbeef7; border-radius: 11px; }
.import-notice .ui-icon { margin-top: 1px; color: var(--brand); }
.import-notice p { display: grid; gap: 4px; margin: 0; font-size: 11px; line-height: 1.45; }
.import-notice strong { color: var(--ink); font-size: 12px; }
.import-notice b { color: var(--brand); }
.admin-feedback { margin-top: 18px; }

@media (max-width: 1000px) {
  .sidebar { width: 224px; } .sidebar-toggle { left: 204px; } .main-content { width: calc(100% - 224px); margin-left: 224px; padding-inline: 28px; }
  .workspace-grid { grid-template-columns: minmax(0, 1fr); } .side-stack { grid-template-columns: 1fr; align-items: start; }
  .order-card { position: static; } .admin-body { grid-template-columns: 1fr; gap: 25px; }
  .admin-block + .admin-block { padding: 25px 0 0; border-top: 1px solid #edf3f7; border-left: 0; }
  .admin-quick-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-module #userForm { grid-template-columns: 1fr 1fr; }.account-module #userForm .button { width: 100%; }
}
@media (max-width: 720px) {
  .sidebar-toggle { display: none; }
  .app-shell { display: block; } .sidebar { position: static; width: 100%; height: auto; padding: 16px 18px; }
  html.sidebar-collapsed .sidebar { transform: none; } html.sidebar-collapsed .main-content { width: 100%; margin-left: 0; }
  .sidebar-rule, .side-section-label, .sidebar-note, .sidebar-footer { display: none; } .brand-copy span { display: none; }
  .sidebar-navigation { position: absolute; top: 9px; right: 10px; display: flex; gap: 3px; } .side-nav, .admin-nav-block { display: flex; } .side-nav-item { display: grid; min-width: 41px; min-height: 50px; justify-items: center; gap: 2px; padding: 5px 4px; } .side-nav-item span:last-child { display: block; font-size: 8px; line-height: 1; white-space: nowrap; }
  .main-content { width: 100%; margin-left: 0; padding: 24px 16px 18px; } .topbar { align-items: flex-start; margin-bottom: 22px; }
  .topbar-actions { align-items: flex-end; flex-direction: column; gap: 7px; font-size: 10px; } .text-link { display: none; }
  .auth-view { grid-template-columns: 1fr; gap: 5px; min-height: 0; margin-top: 15px; } .auth-intro { padding: 12px 0 18px; }
  .auth-intro h2 { font-size: 30px; } .auth-intro p { font-size: 13px; } .intro-points { margin-top: 21px; } .auth-card { padding: 22px 18px; }
  .work-intro { align-items: flex-start; flex-direction: column; } .workflow-badge { width: 100%; } .side-stack { grid-template-columns: 1fr; }
  .card-head { padding-inline: 18px; } .card-body { padding-inline: 18px; } .form-grid { grid-template-columns: 1fr; gap: 13px; }
  .field-wide { grid-column: auto; } .form-actions { align-items: stretch; flex-direction: column; } .form-actions .button { width: 100%; }
  .receiver-barcode-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-section-heading { align-items: flex-start; } .admin-section-heading h2 { font-size: 23px; } .admin-body { padding: 22px 18px; }
  .admin-page-heading { align-items: flex-start; } .admin-page-heading h2 { font-size: 24px; line-height: 1.25; } .admin-heading-icon { display: none; }
  .admin-quick-nav { gap: 8px; }
  .admin-module-head, .admin-module-body { padding-inline: 19px; }
  .account-module #userForm { grid-template-columns: 1fr; }
  .page-footer { flex-direction: column; gap: 6px; }
  .print-agent-download { justify-content: center; }
}
@media (max-width: 420px) {
  .topbar h1 { font-size: 24px; } .group-chip { margin-left: 3px; font-size: 9px; } .online-status { font-size: 9px; }
  .user-bar { align-items: flex-start; flex-direction: column; } .user-bar .button { align-self: flex-end; }
  .input-action { align-items: stretch; flex-direction: column; } .input-action .button { width: 100%; } .action-grid { grid-template-columns: 1fr; }
  .admin-module-head { padding-right: 48px; }.admin-module-head::after { right: 20px; }
  .receiver-person-actions .button, .receiver-person-actions .button.primary { width: 100%; min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* v2 interaction states and readable structured results */
.button:disabled { cursor: not-allowed; opacity: .58; transform: none; box-shadow: none; }
.button[aria-busy="true"] { cursor: wait; }
.form-message.success { color: #20835f; }
.form-message.error { color: #c45858; }
.feedback-panel { padding: 12px 13px; color: #4c718c; background: #f4f9fc; border: 1px solid #e1eef4; border-radius: 9px; font-size: 12px; line-height: 1.6; }
.feedback-panel > strong { display: block; margin-bottom: 7px; color: var(--ink); font-size: 12px; }
.feedback-panel dl, .import-preview dl { display: grid; gap: 5px; margin: 0; }
.feedback-row { display: flex; justify-content: space-between; gap: 15px; border-top: 1px solid #e6f0f5; padding-top: 5px; }
.feedback-row dt { color: #8aa0b1; }
.feedback-row dd { max-width: 70%; margin: 0; color: var(--ink); text-align: right; overflow-wrap: anywhere; }
.work-secondary-panel { margin: 20px 0; overflow: hidden; background: rgba(255,255,255,.66); border: 1px solid var(--line); border-radius: 14px; }
.work-secondary-panel > summary { position: relative; padding: 15px 52px 15px 18px; list-style: none; cursor: pointer; }
.work-secondary-panel > summary::-webkit-details-marker { display: none; }
.work-secondary-panel > summary::after { content: ""; position: absolute; top: 50%; right: 23px; width: 8px; height: 8px; border-right: 2px solid #7a98ad; border-bottom: 2px solid #7a98ad; transform: translateY(-70%) rotate(45deg); transition: transform .18s ease; }
.work-secondary-panel[open] > summary::after { transform: translateY(-30%) rotate(225deg); }
.work-secondary-panel > summary > span { display: grid; gap: 3px; }
.work-secondary-panel > summary strong { color: var(--ink); font-size: 15px; }
.work-secondary-panel > summary small { color: var(--muted); font-size: 10px; }
.work-secondary-panel[open] > summary { border-bottom: 1px solid var(--line); }
.work-secondary-panel .dashboard-grid { padding: 16px; }
.dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 0; }
.list-card .card-head { padding-bottom: 15px; }
.list-count { flex: 0 0 auto; min-width: 28px; padding: 5px 8px; color: var(--brand); font-size: 12px; font-weight: 800; text-align: center; background: var(--brand-soft); border-radius: 7px; }
.record-list { min-height: 80px; padding: 0 20px 17px; }
.record-table { overflow: hidden; border: 1px solid #e5eef4; border-radius: 9px; }
.record-table-row { display: grid; grid-template-columns: 1.2fr 1fr 1.25fr; align-items: center; gap: 10px; width: 100%; padding: 10px 11px; color: var(--ink); font-size: 11px; text-align: left; background: white; border: 0; border-top: 1px solid #edf3f7; }
.record-table-row:first-child { border-top: 0; }
.record-table-heading { color: #8aa0b1; font-size: 10px; font-weight: 700; background: #f7fbfd; }
.record-link { cursor: pointer; }
.record-link:hover { background: #f0f8fc; }
.record-number { color: var(--brand); font-weight: 800; overflow-wrap: anywhere; }
.record-link strong, .record-link small { display: block; }
.record-link small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.status-text { color: #357c68; font-size: 10px; line-height: 1.35; }
.status-1 { color: #a36a34; }
.status-2 { color: #36759a; }
.empty-list { margin: 0; padding: 19px 4px 6px; color: #94a8b7; font-size: 12px; text-align: center; }
.user-list, .import-preview { margin-top: 12px; padding: 11px; color: #4c718c; background: #f4f9fc; border: 1px solid #e1eef4; border-radius: 9px; font-size: 12px; }
.user-table { overflow: hidden; border: 1px solid #e1eef4; border-radius: 7px; }
.user-table-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(100px, .75fr) minmax(80px, .75fr) minmax(112px, .55fr); align-items: center; gap: 8px; padding: 8px; border-top: 1px solid #e5eef4; }
.user-table-row:first-child { border-top: 0; }
.user-table-heading { color: #8aa0b1; font-size: 10px; background: #f7fbfd; }
.user-table-row > span:last-child { justify-self: stretch; text-align: right; }
.user-table-row > span:last-child small { color: var(--muted); font-size: 10px; }
.reset-password-target { margin: 0; padding: 11px 13px; color: var(--muted); background: #f4f9fc; border: 1px solid #e1eef4; border-radius: 9px; }
.reset-password-target strong { color: var(--ink); }
.import-preview p { margin: 10px 0 0; color: var(--muted); }
.query-page { background: linear-gradient(145deg, #f4f8fc, #edf6fb); }
main.query-shell { max-width: 860px; margin: 0 auto; padding: clamp(28px, 7vw, 72px) 20px 30px; }
.query-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.query-header h1 { margin: 0 0 8px; color: var(--ink); font-size: clamp(28px, 5vw, 42px); letter-spacing: -.05em; }
.query-header p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 14px; }
.query-card { max-width: 760px; margin: 0 auto; }
.query-card .card-head { padding: 27px 30px 18px; }
.query-card .card-head h2 { font-size: 22px; }
.query-mark { display: grid; width: 38px; height: 38px; place-items: center; color: var(--brand); font-weight: 800; background: var(--brand-soft); border-radius: 10px; }
main.query-shell .query-form { max-width: none; padding: 0 30px 25px; }
.query-form label { color: #49647e; font-size: 13px; font-weight: 700; }
.query-input-row { display: flex; gap: 9px; }
.query-input-row input { min-width: 0; min-height: 46px; font-size: 15px; letter-spacing: .05em; }
.query-input-row .button { flex: 0 0 120px; }
.query-form > small { color: #8aa0b1; font-size: 12px; }
.query-card > .form-message { margin: 0 30px 18px; }
.query-result { margin: 0 30px 30px; padding: 20px; background: #f7fbfd; border: 1px solid #e0edf4; border-radius: 11px; }
.query-result-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.query-result-heading h3 { margin: 0; color: var(--ink); font-size: 20px; }
.query-status { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 21px 0; }
.query-step { position: relative; display: grid; gap: 7px; justify-items: center; padding: 11px 5px; color: #91a5b4; font-size: 11px; text-align: center; border: 1px solid #e0eaf0; border-radius: 8px; }
.query-step span { display: grid; width: 24px; height: 24px; place-items: center; font-weight: 800; border-radius: 50%; background: #eaf1f5; }
.query-step.is-complete { color: #357c68; border-color: #cde9df; background: #f2fbf7; }
.query-step.is-complete span { color: white; background: #42a783; }
.query-step.is-current { box-shadow: 0 0 0 2px rgba(66,167,131,.15); }
.query-details { display: grid; gap: 7px; margin: 0; padding-top: 13px; border-top: 1px solid #e0edf4; }
.query-details .feedback-row { font-size: 12px; }
.query-footer { margin: 18px 0 0; color: #8da2b2; font-size: 12px; text-align: center; }

@media (max-width: 720px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .user-table-row { grid-template-columns: minmax(0, 1fr) 112px; }
  .user-table-heading { display: none; }
  .record-list { padding-inline: 14px; }
  .query-header { align-items: flex-start; flex-direction: column; }
  main.query-shell .query-form, .query-card .card-head { padding-inline: 20px; }
  .query-card > .form-message { margin-inline: 20px; }
  .query-result { margin-inline: 20px; padding: 15px; }
}
@media (max-width: 440px) {
  .record-table-row { grid-template-columns: 1.2fr 1fr; }
  .record-table-row > :last-child { grid-column: 2; }
  .record-table-heading > :last-child { display: none; }
  .query-input-row { align-items: stretch; flex-direction: column; }
  .query-input-row .button { flex-basis: auto; width: 100%; }
  .query-status { gap: 4px; }
  .query-step { font-size: 10px; }
}

/* Public query experience */
.query-page { min-height: 100vh; color: var(--ink); background: radial-gradient(circle at 16% 20%, rgba(91, 187, 226, .18), transparent 30%), radial-gradient(circle at 90% 10%, rgba(83, 211, 180, .12), transparent 26%), linear-gradient(145deg, #f7fbfe 0%, #edf5fa 100%); }
.query-topbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; width: min(calc(100% - 40px), 1240px); margin: 0 auto; padding: 28px 0 20px; border-bottom: 1px solid rgba(198, 220, 234, .8); }
.query-brand { display: flex; align-items: center; gap: 12px; }
.query-brand > span:last-child { display: grid; gap: 3px; }
.query-brand strong { color: var(--ink); font-size: 15px; letter-spacing: .03em; }
.query-brand small { color: #6f8ba0; font-size: 12px; }
.query-back { display: inline-flex; align-items: center; gap: 9px; padding: 10px 13px; color: #486d87; font-size: 13px; font-weight: 700; background: rgba(255,255,255,.68); border: 1px solid #d8e7f0; border-radius: 11px; transition: color .18s ease, background .18s ease, transform .18s ease; }
.query-back:hover { color: var(--brand); background: white; transform: translateY(-1px); }
main.query-shell { display: grid; align-content: start; width: min(calc(100% - 40px), 1240px); max-width: none; min-height: calc(100vh - 96px); margin: 0 auto; padding: clamp(46px, 7vw, 92px) 0 28px; }
.query-hero { display: grid; grid-template-columns: minmax(0, 1.14fr) minmax(380px, .86fr); align-items: center; gap: clamp(50px, 8vw, 108px); }
.query-hero-copy { padding: 16px 0; }
.query-pill { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 24px; padding: 8px 12px; color: var(--brand); font-size: 12px; font-weight: 800; background: rgba(232, 245, 252, .9); border: 1px solid #c9e7f5; border-radius: 999px; }
.query-pill .ui-icon { width: 17px; height: 17px; flex-basis: 17px; transform: scale(.85); }
.query-hero h1 { margin: 0; color: var(--ink); font-size: clamp(48px, 6vw, 72px); line-height: 1.08; letter-spacing: -.075em; }
.query-hero h1 em { color: var(--brand); font-style: normal; }
.query-hero-copy > p { max-width: 570px; margin: 24px 0 0; color: var(--muted); font-size: 16px; line-height: 1.85; }
.query-journey { display: grid; grid-template-columns: 1fr 30px 1fr 30px 1fr; align-items: center; gap: 8px; margin-top: 42px; }
.query-journey > div { display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 2px 10px; min-width: 0; }
.query-journey span { grid-row: 1 / 3; display: grid; width: 30px; height: 30px; place-items: center; color: white; font-size: 12px; font-weight: 800; background: linear-gradient(145deg, #2097ce, #0878b9); border-radius: 50%; box-shadow: 0 7px 16px rgba(8,120,185,.18); }
.query-journey strong { color: #35566f; font-size: 12px; white-space: nowrap; }
.query-journey small { color: #8ba0b0; font-size: 10px; white-space: nowrap; }
.query-journey > i { height: 1px; background: linear-gradient(90deg, #9fd1e6, #cde5ef); }
.query-card { position: relative; max-width: none; margin: 0; padding: 36px; overflow: visible; border-radius: 24px; box-shadow: 0 28px 80px rgba(29, 83, 124, .13); }
.query-card::before { content: ""; position: absolute; z-index: -1; inset: 18px -18px -18px 18px; background: rgba(180, 220, 239, .26); border-radius: 24px; }
.query-card-icon { display: grid; width: 48px; height: 48px; margin-bottom: 24px; place-items: center; color: white; background: linear-gradient(145deg, #1590c9, #076ca9); border-radius: 15px; box-shadow: 0 12px 28px rgba(8,120,185,.22); }
.query-card-icon .ui-icon { transform: scale(1.05); }
.query-card h2 { margin: 0 0 8px; color: var(--ink); font-size: 27px; letter-spacing: -.04em; }
.query-card > p:not(.form-message) { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
main.query-shell .query-form { display: grid; max-width: none; gap: 9px; margin-top: 26px; padding: 0; }
.query-form label { color: #425f79; font-size: 13px; font-weight: 750; }
.query-form input { min-height: 52px; padding: 12px 14px; font-size: 15px; letter-spacing: .045em; background: #f9fcfe; }
.query-form .button { min-height: 50px; margin-top: 4px; font-size: 14px; }
.query-form .button .ui-icon { width: 18px; height: 18px; flex-basis: 18px; transform: scale(.85); }
.query-card > .form-message { min-height: 20px; margin: 12px 0 0; }
.query-help { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 15px; color: #7b94a7; font-size: 11px; border-top: 1px solid #e8f0f5; }
.query-help .ui-icon { width: 17px; height: 17px; flex-basis: 17px; color: #51a78c; transform: scale(.82); }
.query-result { width: min(100%, 900px); margin: 52px auto 0; padding: 30px; background: white; border-radius: 20px; box-shadow: 0 22px 60px rgba(29,83,124,.11); }
.query-result-heading { align-items: center; }
.query-result-heading h3 { font-size: 25px; }
.query-status { gap: 12px; margin: 26px 0; }
.query-step { min-height: 100px; align-content: center; gap: 9px; padding: 15px 8px; font-size: 12px; border-radius: 12px; }
.query-step span { width: 30px; height: 30px; }
.query-details { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; padding-top: 20px; }
.query-details .feedback-row { padding: 9px 0; font-size: 13px; }
.query-footer { display: flex; justify-content: space-between; gap: 20px; margin: 72px 0 0; padding-top: 20px; color: #8299aa; font-size: 12px; border-top: 1px solid rgba(198,220,234,.8); }
.query-footer span:first-child { color: #58758a; font-weight: 750; }

@media (max-width: 900px) {
  .query-hero { grid-template-columns: 1fr; gap: 42px; }
  .query-hero-copy { max-width: 680px; }
  .query-card { width: min(100%, 620px); }
}
@media (max-width: 620px) {
  .query-topbar { width: min(calc(100% - 32px), 1240px); padding-top: 18px; }
  .query-brand .brand-mark { width: 38px; height: 38px; flex-basis: 38px; }
  .query-back span:last-child { display: inline; font-size: 10px; }
  main.query-shell { width: min(calc(100% - 32px), 1240px); padding-top: 24px; }
  .query-card { grid-row: 1; }
  .query-hero-copy { grid-row: 2; }
  .query-hero { gap: 34px; }
  .query-hero h1 { font-size: clamp(38px, 12vw, 50px); }
  .query-hero-copy > p { font-size: 14px; }
  .query-journey { grid-template-columns: 1fr; gap: 14px; margin-top: 32px; }
  .query-journey > i { display: none; }
  .query-journey strong, .query-journey small { white-space: normal; }
  .query-card { padding: 27px 22px; border-radius: 19px; }
  .query-card::before { inset: 10px -8px -10px 8px; border-radius: 19px; }
  .query-result { margin-top: 36px; padding: 22px 18px; }
  .query-status { grid-template-columns: 1fr; }
  .query-step { grid-template-columns: 38px 1fr; justify-items: start; min-height: 0; text-align: left; }
  .query-step span { grid-row: 1; }
  .query-details { grid-template-columns: 1fr; }
  .query-footer { align-items: flex-start; flex-direction: column; margin-top: 48px; }
}

/* Business workflow additions */
.accessory-field { display: grid; gap: 10px; }
.accessory-toolbar { display: grid; grid-template-columns: minmax(180px, 1fr) auto; gap: 8px; }
.accessory-list { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; min-height: 62px; padding: 12px; background: #f7fbfd; border: 1px solid #d8e7f0; border-radius: 12px; }
.accessory-empty { margin: 0; color: #93a8b7; font-size: 12px; }
.accessory-pill { display: inline-flex; align-items: stretch; min-height: 42px; overflow: hidden; background: white; border: 1px solid #cfe0ea; border-radius: 11px; box-shadow: 0 3px 10px rgba(28,91,128,.04); }
.accessory-pill label { display: inline-flex; align-items: center; gap: 8px; padding: 9px 8px 9px 11px; color: #315a74; font-size: 13px; font-weight: 720; cursor: pointer; }
.accessory-pill input { width: 17px; height: 17px; margin: 0; accent-color: var(--brand); }
.accessory-pill:has(input:checked) { background: #eef9fd; border-color: #9fd3e8; }
.accessory-pill:has(input:not(:checked)) label span { color: #899ba8; text-decoration: line-through; }
.accessory-remove { width: 34px; padding: 0; color: #8ba0af; background: transparent; border: 0; border-left: 1px solid #e2edf3; font-size: 18px; cursor: pointer; }
.accessory-remove:hover, .accessory-remove:focus-visible { color: #c45858; background: #fff4f4; }
.accessory-add { display: grid; grid-template-columns: minmax(180px, 1fr) auto auto auto; gap: 8px; }
.accessory-summary { min-height: 18px; margin: 0; color: #5a7c92; font-size: 12px; line-height: 1.5; }
.config-manager { padding: 12px; background: #f8fbfd; border: 1px dashed #c6dce8; border-radius: 12px; }
.config-manager .receiver-form-mode { margin-bottom: 10px; }
.config-manager-row { display: grid; grid-template-columns: minmax(150px, 1fr) repeat(4,auto); gap: 8px; }
.config-manager > small { display: block; margin-top: 8px; color: #8298a8; font-size: 11px; }
.danger-subtle { color: #b45a5a; }
.admin-correction { display: grid; gap: 7px; margin-top: 15px; padding: 14px; color: #516d83; background: #f8fbfd; border: 1px dashed #cbdde9; border-radius: 12px; }
.admin-correction > label { color: #35566f; font-size: 12px; font-weight: 750; }
.admin-correction small { color: #8398a8; font-size: 11px; }
dialog { padding: 0; border: 0; }
dialog::backdrop { background: rgba(10, 39, 62, .48); backdrop-filter: blur(3px); }
.print-dialog, .record-dialog { width: min(calc(100% - 32px), 760px); color: var(--ink); background: transparent; border-radius: 20px; }
.print-dialog-card, .record-dialog-card { display: grid; gap: 20px; max-height: min(86vh, 850px); padding: 27px; overflow: auto; background: white; border-radius: 20px; box-shadow: 0 26px 80px rgba(8,47,78,.24); }
.dialog-close { width: 34px; height: 34px; padding: 0; color: #668096; font-size: 24px; line-height: 1; background: #eef5f9; border: 0; border-radius: 50%; }
.preview-toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-bottom: 8px; }
.preview-toolbar .button { width: 34px; min-width: 34px; padding: 6px; font-size: 17px; }
.preview-zoom-range { width: min(180px, 42vw); accent-color: var(--brand); }
.preview-zoom-value { min-width: 42px; color: var(--muted); font-size: 12px; text-align: right; }
.label-preview { display: flex; align-items: flex-start; gap: 12px; min-height: 190px; padding: 14px; overflow: auto; background: #f2f7fa; border-radius: 13px; }
.rendered-label-page { position: relative; flex: 0 0 220px; width: 220px; margin: 0; overflow: hidden; background: #fff; border: 1px dashed #b9ccd8; border-radius: 9px; box-shadow: 0 5px 14px rgba(17, 54, 78, .08); zoom: var(--preview-zoom, 1); }
.rendered-label-page img { display: block; width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.rendered-label-page figcaption { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.label-copy { position: relative; display: flex; width: 220px; min-width: 220px; flex: 0 0 220px; flex-direction: column; gap: 3px; padding: 12px; overflow: hidden; font-size: var(--template-font-size,7.5pt); zoom: var(--preview-zoom,1); background: white; border: 1px dashed #a9c5d6; border-radius: 9px; }
.label-copy strong, .label-copy span, .label-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.label-copy strong { font-size: 1.1em; }.label-copy span { font-size: 1em; letter-spacing: .01em; }.label-copy span b { font-weight: 750; }.label-copy small { color: var(--muted); font-size: .95em; }
.label-copy .label-order-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 6px; }
.label-copy .label-order-row > span { min-width: 0; }
.label-copy .label-order-only { grid-template-columns: auto; justify-content: end; }
.label-copy .copy-name { color: #111; font-size: 1em; font-weight: 400; letter-spacing: 0; }
.preview-barcode { height: 14px; margin: 4px 12% 4px; background: repeating-linear-gradient(90deg,var(--ink) 0 2px,transparent 2px 4px,var(--ink) 4px 7px,transparent 7px 9px); opacity: 1; }
.label-copy.has-qr { display: grid; grid-template-rows: auto minmax(0,1fr); align-content: start; gap: 4px; }
.qr-preview-top { position: relative; display: grid; grid-template-columns: var(--qr-preview-width,30%) minmax(0,1fr); align-items: start; gap: 8px; min-height: 0; }
.label-copy.has-qr .preview-qr { width: 100%; max-width: none; aspect-ratio: 1; background: conic-gradient(from 90deg at 25% 25%,#102f48 25%,#fff 0 50%,#102f48 0 75%,#fff 0) 0 0/8px 8px; border: 4px solid white; outline: 1px solid #d8e3ea; }
.qr-scan-hint { align-self: center; justify-self: center; display: grid; gap: 1px; padding-top: 1.35em; color: #111; font-size: .9em; font-weight: 550; line-height: 1.2; text-align: center; }
.qr-scan-hint span { overflow: visible; text-overflow: clip; }
.qr-preview-top .copy-name { position: absolute; top: 0; right: 0; }
.qr-preview-fields { display: grid; align-content: start; gap: 2px; min-width: 0; }
.qr-preview-fields .label-field-value { display: block; min-width: 0; }

/* Tokenized mobile work-order query */
.mobile-query-page { min-height: 100vh; color: var(--ink); background: radial-gradient(circle at 12% 8%, rgba(91,187,226,.2), transparent 32%), linear-gradient(160deg,#f7fbfe,#edf5fa); }
.mobile-query-shell { width: min(100% - 28px, 520px); margin: 0 auto; padding: max(24px,env(safe-area-inset-top)) 0 max(28px,env(safe-area-inset-bottom)); }
.mobile-query-brand { display: flex; align-items: center; gap: 11px; margin: 0 4px 20px; }
.mobile-query-brand > span:last-child { display: grid; gap: 2px; }.mobile-query-brand strong { font-size: 15px; }.mobile-query-brand small { color: var(--muted); font-size: 11px; }
.mobile-query-card { padding: 24px 22px; border-radius: 20px; box-shadow: 0 18px 50px rgba(24,72,104,.12); }
.mobile-query-card h1 { margin: 5px 0 8px; font-size: clamp(23px,7vw,31px); letter-spacing: -.04em; }.mobile-query-card > p { margin: 0; color: var(--muted); }
.mobile-query-eyebrow { color: var(--brand); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.mobile-result-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }.mobile-result-head h1 { margin-bottom: 0; }
.mobile-status-track { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; margin: 24px 0; }
.mobile-status-step { display: grid; justify-items: center; gap: 7px; padding: 11px 4px; color: #91a5b4; font-size: 11px; border: 1px solid #e0eaf0; border-radius: 10px; }
.mobile-status-step span { display: grid; width: 25px; height: 25px; place-items: center; background: #eaf1f5; border-radius: 50%; font-weight: 800; }
.mobile-status-step.is-complete { color: #357c68; background: #f2fbf7; border-color: #cde9df; }.mobile-status-step.is-complete span { color: white; background: #42a783; }.mobile-status-step.is-current { box-shadow: 0 0 0 2px rgba(66,167,131,.14); }
.mobile-query-details { margin: 0; border-top: 1px solid #e4edf3; }.mobile-query-details div { display: grid; grid-template-columns: 84px minmax(0,1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid #edf2f6; }.mobile-query-details dt { color: var(--muted); font-size: 12px; }.mobile-query-details dd { margin: 0; color: #284c67; font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }
.mobile-query-details .mobile-primary-status { align-items: center; padding: 15px 0; }.mobile-primary-status .status-badge { display: inline-flex; }
.mobile-expiry-note { margin-top: 17px !important; padding: 11px 13px; color: #6d8292 !important; font-size: 11px; line-height: 1.55; background: #f5f9fb; border-radius: 10px; }
.mobile-query-error { border-top: 4px solid #d38a7c; }.mobile-query-footer { margin-top: 18px; color: #8ba0b0; font-size: 11px; text-align: center; }
.records-card { overflow: hidden; }
.records-card > .card-head { padding: 24px 26px 18px; }
.records-filters { display: grid; gap: 12px; padding: 16px 26px; background: #f7fafc; border-block: 1px solid #e6eef4; }
.records-filter-primary { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(150px, .34fr) auto auto; align-items: end; gap: 11px; }
.records-filters .field { min-width: 0; }
.records-filters .button { min-height: 43px; white-space: nowrap; }
.records-filter-advanced { overflow: hidden; background: white; border: 1px solid #e0eaf1; border-radius: 10px; }
.records-filter-advanced > summary { position: relative; display: flex; align-items: baseline; gap: 9px; padding: 10px 38px 10px 12px; color: #537087; list-style: none; cursor: pointer; }
.records-filter-advanced > summary::-webkit-details-marker { display: none; }
.records-filter-advanced > summary::after { content: ""; position: absolute; top: 50%; right: 16px; width: 7px; height: 7px; border-right: 2px solid #7a98ad; border-bottom: 2px solid #7a98ad; transform: translateY(-70%) rotate(45deg); transition: transform .18s ease; }
.records-filter-advanced[open] > summary::after { transform: translateY(-30%) rotate(225deg); }
.records-filter-advanced > summary strong { font-size: 11px; }
.records-filter-advanced > summary small { color: var(--muted); font-size: 10px; }
.records-filter-advanced-body { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; padding: 12px; border-top: 1px solid #e6eef4; }
.records-summary { display: flex; justify-content: space-between; padding: 16px 26px 10px; color: #698196; font-size: 12px; }
.records-table-wrap { min-height: 300px; overflow-x: auto; }
.records-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.records-table th { padding: 12px 16px; color: #6d8498; font-size: 11px; text-align: left; background: #fbfdfe; border-bottom: 1px solid #e4edf3; }
.records-table td { padding: 14px 16px; color: #456177; border-bottom: 1px solid #edf2f6; vertical-align: middle; }
.records-table tbody tr { cursor: pointer; transition: background .15s ease; }.records-table tbody tr:hover, .records-table tbody tr:focus { outline: none; background: #f1f8fc; }
.records-table td strong { display: block; color: #17466a; font-size: 12px; }.records-table td small { display: block; margin-top: 3px; color: #8ca0af; }
.record-detail-link { color: var(--brand); font-size: 11px; font-weight: 800; white-space: nowrap; }
.history-tag { display: inline-flex !important; width: max-content; padding: 2px 5px; color: #6f8292 !important; background: #eef3f6; border-radius: 4px; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 19px 24px 24px; color: #647d91; font-size: 12px; }
.detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 24px; margin: 0; }
.record-notes { margin-top: 14px; padding: 14px 16px; background: #f7fafc; border: 1px solid #e4edf3; border-radius: 12px; }
.record-notes h3 { margin: 0 0 8px; color: #35566f; font-size: 13px; }
.record-notes p { margin: 0; color: #4e6c82; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; white-space: pre-wrap; }
.record-notes p + p { margin-top: 9px; padding-top: 9px; border-top: 1px solid #e5edf2; }
.record-notes p span { display: block; color: #8aa0b1; font-size: 10px; }
.audit-summary { margin-top: 8px; padding-top: 18px; border-top: 1px solid #e4edf3; }.audit-summary h3 { margin: 0 0 12px; font-size: 15px; }
.audit-summary p { display: grid; grid-template-columns: 1fr auto; gap: 3px 12px; margin: 0; padding: 9px 0; color: #668096; font-size: 11px; border-bottom: 1px solid #edf2f6; }.audit-summary strong { color: #385b73; }.audit-summary small { grid-column: 1 / -1; }

@media (max-width: 1180px) { .records-filter-primary { grid-template-columns: minmax(220px,1fr) minmax(150px,.45fr) auto auto; }.records-filters .button { width: 100%; } }
@media (max-width: 720px) {
  .accessory-toolbar { grid-template-columns: minmax(0, 1fr) auto; }
  .accessory-add { grid-template-columns: 1fr 1fr 1fr; }.accessory-add input { grid-column: 1 / -1; }
  .config-manager-row { grid-template-columns: 1fr 1fr; }.config-manager-row input { grid-column: 1 / -1; }.config-manager-row .button { width: 100%; }
  .records-filters { padding: 14px 16px; }.records-filter-primary { grid-template-columns: 1fr 1fr; }.records-filter-primary .field:first-child { grid-column: 1 / -1; }.records-filter-advanced-body { grid-template-columns: 1fr 1fr; }
  .template-selector-row { grid-template-columns: 1fr 1fr; }.template-selector-row select { grid-column: 1 / -1; }.paper-size-grid, .print-fields { grid-template-columns: 1fr; }
  .layout-toolbar,.layout-custom-row { grid-template-columns: 1fr 1fr; }.layout-toolbar select:first-child,.layout-custom-row input { grid-column: 1 / -1; }.layout-workbench { grid-template-columns: 1fr; }.layout-canvas { min-width: 320px; }
  .records-card > .card-head { align-items: flex-start; flex-direction: column; padding-inline: 18px; }.records-summary { padding-inline: 18px; }.detail-grid { grid-template-columns: 1fr; }
  .records-table-wrap { min-height: 0; padding: 0 14px 8px; overflow: visible; }
  .records-table, .records-table tbody { display: block; width: 100%; }
  .records-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; clip-path: inset(50%); }
  .records-table tbody { display: grid; gap: 10px; }
  .records-table tbody tr { display: grid; gap: 0; padding: 11px 13px; background: white; border: 1px solid #dfebf2; border-radius: 12px; box-shadow: 0 5px 16px rgba(35,82,112,.05); }
  .records-table td { display: grid; grid-template-columns: 78px minmax(0,1fr); align-items: start; gap: 10px; padding: 6px 0; border: 0; }
  .records-table td::before { content: attr(data-label); color: var(--muted); font-size: 10px; font-weight: 650; }
  .records-table td:first-child { padding-top: 2px; padding-bottom: 9px; border-bottom: 1px solid #edf2f6; }
  .records-table td:first-child strong { color: var(--brand); font-size: 13px; }
  .records-table .record-detail-cell { margin-top: 4px; padding-top: 9px; border-top: 1px solid #edf2f6; }
}
@media (max-width: 440px) {
  .accessory-toolbar { grid-template-columns: 1fr; }.accessory-toolbar #toggleConfigManager { width: 100%; }
  .accessory-add { grid-template-columns: 1fr 1fr 1fr; }.accessory-add input { grid-column: 1 / -1; }.accessory-add .button { width: 100%; }
  .accessory-pill { min-height: 44px; }
  .records-filter-primary, .records-filter-advanced-body { grid-template-columns: 1fr; }.records-filter-primary .field:first-child { grid-column: auto; }
}
