:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-solid: #ffffff;
  --line: #e7e7eb;
  --line-strong: #c9c9d0;
  --text: #1d1d1f;
  --muted: #86868b;
  --blue: #0071e3;
  --blue-soft: #eaf3ff;
  --green: #16803c;
  --green-soft: #eaf8ef;
  --orange: #b86400;
  --orange-soft: #fff5e6;
  --red: #c93434;
  --red-soft: #fff0f0;
  --shadow: 0 16px 48px rgba(0, 0, 0, 0.08);
  --small-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
  --radius: 18px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Helvetica Neue", Arial, sans-serif;
}

@media (max-width: 780px) {
  html, body { width: 100%; max-width: 100%; min-width: 320px; overflow-x: hidden; }
  .mobile-app-shell { width: min(100%, 430px); max-width: 430px; min-height: 100dvh; margin: 0 auto; }
  .login-logo { width: 82px; height: 82px; border-radius: 14px; }
  .problem-overview-grid { grid-template-columns: 1fr; }
  .problem-card-media { min-height: 180px; }
  .problem-card-media .media-card { height: 160px; }
  .problem-card-footer { align-items: flex-start; flex-direction: column; }
  .problem-card-footer > div { width: 100%; justify-content: flex-start; }
  .problem-overview-modal { width: 100%; }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #17181c;
  --panel: rgba(36, 37, 43, 0.92);
  --panel-solid: #24252b;
  --line: #3a3b43;
  --line-strong: #5a5b65;
  --text: #f4f4f5;
  --muted: #a3a4ad;
  --blue: #5aa7ff;
  --blue-soft: #1f3855;
  --green: #62d28d;
  --green-soft: #1d3b2a;
  --orange: #f0ae56;
  --orange-soft: #46351d;
  --red: #ff7777;
  --red-soft: #4b2529;
  --shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
  --small-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
}
:root[data-theme="pink"] {
  --bg: #fff5f8;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-solid: #ffffff;
  --line: #f2dce5;
  --line-strong: #d9b9c7;
  --blue: #d34f82;
  --blue-soft: #fff0f5;
  --green: #328b63;
  --green-soft: #eaf8f0;
}
:root[data-theme="blue-gradient"] {
  --bg: linear-gradient(135deg, #eef7ff 0%, #f5f0ff 100%);
  --panel: rgba(255, 255, 255, 0.78);
  --line: #dce8f8;
  --line-strong: #b8d0ec;
  --blue-soft: #eaf3ff;
}
:root[data-theme="green-gradient"] {
  --bg: linear-gradient(135deg, #effcf7 0%, #f5fbef 100%);
  --panel: rgba(255, 255, 255, 0.8);
  --line: #d9eee3;
  --line-strong: #b6d8c7;
  --blue: #25856f;
  --blue-soft: #e8f8f2;
}

* { box-sizing: border-box; }
html { min-width: 0; min-height: 100%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overflow-x: hidden; }
body.modal-open { overflow: hidden; }
body { min-width: 0; margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); overflow-x: hidden; overscroll-behavior-x: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.loading-screen { min-height: 100vh; display: grid; place-content: center; gap: 12px; color: var(--muted); text-align: center; }
.spinner { width: 22px; height: 22px; border: 2px solid #d7d7dc; border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; margin: auto; }
@keyframes spin { to { transform: rotate(360deg); } }

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 32px; background: radial-gradient(circle at 50% 10%, #fff 0, #f5f5f7 58%); }
.login-shell { width: min(430px, 100%); }
.brand-logo-shell { position: relative; display: grid; place-items: center; overflow: hidden; background: #102d4f; color: #fff; box-shadow: var(--small-shadow); }
.brand-logo-shell .brand-logo-fallback { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 42%; letter-spacing: 0; }
.brand-logo-shell img { position: relative; z-index: 1; display: block; width: 100%; height: 100%; object-fit: contain; border-radius: inherit; }
.brand-logo-shell.logo-missing img { display: none; }
.login-logo { width: 96px; height: 96px; border-radius: 16px; }
.brand-mark { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--text); color: #fff; font-weight: 700; font-size: 22px; letter-spacing: -1px; box-shadow: var(--small-shadow); }
.login-heading { margin: 24px 0 6px; font-size: 34px; letter-spacing: -.03em; }
.login-subtitle { margin: 0 0 26px; color: var(--muted); font-size: 16px; }
.login-panel { background: rgba(255,255,255,.8); border: 1px solid rgba(255,255,255,.85); border-radius: 26px; padding: 28px; box-shadow: var(--shadow); backdrop-filter: blur(20px); }
.login-remember { display: flex; align-items: center; gap: 8px; margin-top: 14px; color: var(--muted); font-size: 13px; cursor: pointer; user-select: none; }
.login-remember input { width: 16px; height: 16px; margin: 0; accent-color: var(--blue); }
.login-error { margin: 14px 0 0; padding: 10px 12px; border: 1px solid color-mix(in srgb, #c93434 28%, transparent); border-radius: 10px; background: color-mix(in srgb, #c93434 9%, transparent); color: #b42318; font-size: 13px; line-height: 1.45; }
.login-hint { margin: 20px 0 0; color: var(--muted); font-size: 12px; text-align: center; }
.install-page { align-items: start; padding: 42px 20px; }
.install-shell { width: min(860px, 100%); }
.install-panel { padding: 22px; }
.install-section { padding: 0 0 20px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.install-section:last-of-type { margin-bottom: 0; border-bottom: 0; }
.install-section h3 { margin: 0 0 12px; font-size: 16px; }
.install-section .section-heading { margin: 0 0 12px; }
.install-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.install-check-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.install-check { min-width: 0; display: flex; align-items: flex-start; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: #fafafc; }
.install-check.ok { border-color: #b8dec5; background: var(--green-soft); }
.install-check.bad { border-color: #ecc6c6; background: var(--red-soft); }
.install-check > strong { flex: 0 0 auto; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--green); color: #fff; font-size: 12px; }
.install-check.bad > strong { background: var(--red); }
.install-check span { min-width: 0; display: grid; gap: 2px; font-size: 12px; }
.install-check small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.install-test-result { display: inline-block; margin-left: 10px; color: var(--muted); font-size: 12px; }
.install-submit { width: 100%; margin-top: 2px; }
.install-result { line-height: 2; }
.install-result code { padding: 3px 6px; border-radius: 6px; background: #f1f1f4; }
@media (max-width: 700px) { .install-check-grid, .install-grid { grid-template-columns: 1fr; } .install-test-result { display: block; margin: 8px 0 0; } }
.site-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.site-card { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel-solid); box-shadow: var(--small-shadow); }
.site-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.site-card > header > div { min-width: 0; display: grid; gap: 3px; }
.site-card-actions { display: flex !important; align-items: center; gap: 6px; }
.site-card > header strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-card > header span { color: var(--muted); font-size: 11px; }
.site-stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin: 14px 0; }
.site-stat-grid span { min-width: 0; display: grid; gap: 2px; padding: 8px; border-radius: 9px; background: var(--blue-soft); }
.site-stat-grid small { color: var(--muted); font-size: 10px; }
.site-stat-grid b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.site-admin-list { display: grid; gap: 7px; margin-bottom: 13px; }
.site-admin-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 9px; border-radius: 9px; background: #f7f7f9; }
.site-admin-row > span:first-child { min-width: 0; display: grid; gap: 1px; }
.site-admin-row strong, .site-admin-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-admin-row small { color: var(--muted); font-size: 10px; }
.site-admin-actions { display: flex; align-items: center; gap: 5px; }
.site-overview-table { min-width: 760px; }
.platform-overview-heading { align-items: center; }
.site-admin-form { padding-top: 13px; border-top: 1px solid var(--line); }
.site-admin-form > strong { display: block; margin-bottom: 9px; font-size: 12px; }
.site-admin-form .form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(100px, auto); align-items: end; }
.site-admin-form .form-actions { margin-top: 0; }
@media (max-width: 700px) { .site-card-grid { grid-template-columns: 1fr; } .site-admin-form .form-grid { grid-template-columns: 1fr 1fr; } .site-admin-form .form-actions { grid-column: 1 / -1; } }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 236px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; align-self: start; height: 100vh; max-height: 100vh; overflow-y: auto; border-right: 1px solid var(--line); background: rgba(255,255,255,.72); backdrop-filter: blur(24px); padding: 22px 14px; display: flex; flex-direction: column; gap: 26px; }
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 0 10px; }
.sidebar-brand .sidebar-brand-logo { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 9px; }
.sidebar-brand .brand-mark { width: 34px; height: 34px; border-radius: 11px; font-size: 14px; }
.sidebar-brand strong { font-size: 15px; }
.sidebar-brand small { display: block; color: var(--muted); font-size: 11px; }
.nav-list { display: grid; gap: 4px; }
.nav-button { border: 0; background: transparent; color: #5d5d63; text-align: left; padding: 11px 12px; border-radius: 12px; display: flex; align-items: center; gap: 10px; transition: .18s ease; }
.nav-button { position: relative; }
.nav-badge { min-width: 18px; height: 18px; margin-left: auto; padding: 0 5px; border-radius: 999px; background: var(--red); color: #fff; display: inline-grid; place-items: center; font-size: 10px; font-weight: 700; line-height: 1; box-shadow: 0 0 0 3px var(--red-soft); }
.nav-button:hover { background: #f0f0f3; color: var(--text); }
.nav-button.active { background: var(--text); color: #fff; }
.nav-icon { width: 22px; text-align: center; font-size: 15px; }
.sidebar-footer { margin-top: auto; padding: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.sidebar-footer strong { color: var(--text); display: block; margin-bottom: 3px; }
.sidebar-settings-button { flex: 0 0 auto; }

.main-column { min-width: 0; }
.topbar { min-height: 74px; padding: 16px 34px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.72); display: flex; justify-content: space-between; align-items: center; gap: 20px; position: sticky; top: 0; z-index: 4; backdrop-filter: blur(20px); }
.topbar h1 { font-size: 23px; margin: 0; letter-spacing: -.02em; }
.topbar p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.topbar-quote { position: absolute; left: 50%; max-width: min(46vw, 680px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transform: translateX(-50%); color: var(--muted); font-size: 13px; text-align: center; pointer-events: none; }
.section-heading > div > p { display: none; }
/* 页面顶部已经显示当前导航标题，内容区不再重复显示同名标题。 */
.content > .section-heading:first-child > div > h2 { display: none; }
.content > .section-heading:first-child:has(> div:only-child) { display: none; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 6px 10px 6px 7px; background: #fff; border: 1px solid var(--line); border-radius: 999px; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: #ececef; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.user-chip small { display: block; color: var(--muted); font-size: 11px; }
.content { padding: 30px 34px 54px; max-width: 1600px; }

.grid { display: grid; gap: 16px; }
.stats-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 18px; gap: 12px; }
.stat-card { background: var(--panel-solid); border: 1px solid var(--line); border-radius: 15px; padding: 14px 15px; min-width: 0; box-shadow: var(--small-shadow); }
.stat-card .stat-label { color: var(--muted); font-size: 12px; }
.stat-card .stat-value { font-size: 25px; letter-spacing: -.03em; margin: 6px 0 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-card .stat-note { color: var(--muted); font-size: 11px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-card.is-masked .stat-value { color: var(--muted); letter-spacing: .12em; }
.period-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.overview-visibility-button { width: 34px; height: 32px; margin-left: 2px; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-solid); color: var(--muted); display: inline-grid; place-items: center; font-size: 15px; }
.overview-visibility-button:hover { background: var(--blue-soft); color: var(--blue); border-color: var(--blue); }
.section-heading.overview-recent-heading { justify-content: flex-start; }
.overview-submit-button { min-height: 44px; margin-left: 20px; padding: 0 20px; border-radius: 13px; font-size: 14px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 28px 0 14px; }
.section-heading h2 { margin: 0; font-size: 19px; letter-spacing: -.02em; }
.section-heading p { color: var(--muted); margin: 4px 0 0; font-size: 13px; }
.panel { background: var(--panel-solid); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--small-shadow); }
.panel-pad { padding: 22px; }
.split-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, .8fr); gap: 18px; align-items: start; }
.user-create-panel { width: min(100%, 1040px); margin-bottom: 16px; }
.user-create-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(230px, 1.25fr); align-items: end; gap: 12px; }
.user-create-form .field { min-width: 0; }
.user-create-form .form-actions { margin-top: 0; flex-wrap: wrap; }
.user-create-form .form-actions .button { flex: 1 1 0; min-width: 0; white-space: nowrap; }
.batch-user-panel { width: min(100%, 1040px); margin-bottom: 18px; }
.batch-user-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 15px; }
.batch-user-heading h3 { margin: 0; }
.batch-user-heading p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.batch-user-form { display: grid; grid-template-columns: minmax(150px, 1.4fr) repeat(3, minmax(86px, .7fr)) minmax(150px, 1.2fr) auto; align-items: end; gap: 12px; }
.batch-user-form .field { min-width: 0; }
.batch-user-form .form-actions { margin-top: 0; }
.batch-user-modal { width: min(820px, 100%); }
.batch-user-modal .modal-body { padding: 22px; }
.batch-user-modal .batch-user-form { grid-template-columns: minmax(180px, 1.4fr) repeat(3, minmax(95px, .75fr)) minmax(180px, 1.2fr); }
.batch-user-modal .batch-user-form .form-actions { grid-column: 1 / -1; margin-top: 4px; }
.batch-user-modal .field-help { display: block; margin-top: 14px; }

.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 720px; }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid #f0f0f2; vertical-align: middle; white-space: nowrap; }
th { color: var(--muted); font-size: 12px; font-weight: 500; background: #fbfbfc; }
tbody tr { transition: background .16s ease; }
tbody tr:hover { background: #fafafa; }
tbody tr.clickable { cursor: pointer; }
td strong { font-weight: 600; }
.muted { color: var(--muted); }
.subline { color: var(--muted); font-size: 12px; margin-top: 2px; }
.money { font-variant-numeric: tabular-nums; }
.money.profit { color: var(--green); }

.order-identity { display: flex; align-items: center; justify-content: flex-start; flex-wrap: nowrap; gap: 5px; min-width: 0; white-space: nowrap; }
.order-unread-indicator { display: inline-flex; align-items: center; flex: 0 0 auto; }
.order-unread-indicator[hidden] { display: none; }
.modal-order-identity { display: grid; justify-items: start; gap: 5px; }
.order-id-badge { display: inline-flex; align-items: center; min-width: 48px; min-height: 28px; padding: 0 10px; border: 1px solid #c9dff6; border-radius: 9px; background: #eef6ff; color: #126bc0; font-size: 14px; font-weight: 750; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.order-date-box { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 8px; border-radius: 7px; background: #f2f2f5; color: #55555b; font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.modal-order-identity { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: 0; }
.modal-order-identity .order-id-badge { min-height: 32px; font-size: 16px; }
.modal-order-identity .order-date-box { font-size: 14px; }
.is-draft { background: #fff9f9; }
.draft-submit-panel { display: grid; gap: 12px; margin-bottom: 18px; padding: 14px; border: 1px solid #f2b8b8; border-radius: 15px; background: #fff5f5; }
.draft-submit-panel strong { color: var(--red); }
.draft-submit-panel p { margin: 4px 0 0; color: #8b4b4b; font-size: 12px; line-height: 1.5; }
.draft-submit-panel form { display: grid; gap: 10px; }

.status { display: inline-flex; align-items: center; width: max-content; max-width: 100%; flex: 0 0 auto; gap: 7px; border-radius: 999px; padding: 6px 11px; font-size: 13px; line-height: 1.1; white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: currentColor; }
.status-neutral { color: #6c6c72; background: #f1f1f3; }
.status-blue { color: #126bc0; background: var(--blue-soft); }
.status-green { color: var(--green); background: var(--green-soft); }
.status-orange { color: var(--orange); background: var(--orange-soft); }
.status-red { color: var(--red); background: var(--red-soft); }

.button { border: 1px solid transparent; border-radius: 12px; min-height: 38px; padding: 0 15px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; transition: .18s ease; font-weight: 600; }
.button.primary { background: var(--blue); color: #fff; box-shadow: 0 5px 12px rgba(0, 113, 227, .18); }
.button.primary:hover { background: #0066cc; transform: translateY(-1px); }
.button.secondary { background: #f1f1f3; color: var(--text); }
.button.secondary:hover { background: #e6e6e9; }
.button.ghost { background: transparent; color: var(--muted); }
.button.ghost:hover { background: #f3f3f5; color: var(--text); }
.button.danger { background: var(--red-soft); color: var(--red); }
.button.small { min-height: 32px; padding: 0 11px; font-size: 12px; border-radius: 10px; }
.button:disabled { opacity: .46; cursor: not-allowed; transform: none; }
.video-open-button { background: var(--green); border-color: var(--green); color: #fff; box-shadow: 0 5px 12px rgba(22, 128, 60, .18); }
.video-open-button:hover { filter: brightness(.95); transform: translateY(-1px); }
.icon-button { width: 32px; height: 32px; border: 0; border-radius: 10px; background: #f1f1f3; color: #55555b; display: inline-grid; place-items: center; font-size: 16px; }
.icon-button:hover { background: var(--blue-soft); color: var(--blue); }
.order-table th:first-child, .order-table td:first-child { width: 64px; min-width: 64px; padding-left: 8px; padding-right: 8px; text-align: center; }
.row-check-hit { width: 46px; height: 46px; margin: 0 auto; display: grid; place-items: center; border-radius: 12px; cursor: pointer; }
.row-check-hit:hover { background: var(--blue-soft); }
.row-check { appearance: none; width: 28px; height: 28px; margin: 0; border: 1.5px solid #b9bac2; border-radius: 50%; background: var(--panel-solid); display: inline-grid; place-items: center; vertical-align: middle; cursor: pointer; transition: .16s ease; }
.row-check:hover { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(0, 113, 227, .1); }
.row-check:checked { border-color: var(--blue); background: var(--blue); }
.row-check:checked::after { content: ""; width: 10px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.submit-order-panel { margin-top: 0; }
.selected-devices-panel { margin: 16px 0; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-solid); overflow: hidden; }
.selected-devices-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.selected-devices-head > div { display: grid; gap: 2px; }
.selected-devices-head span { color: var(--muted); font-size: 11px; }
.selected-devices-total { color: var(--blue); white-space: nowrap; }
.selected-device-list { display: grid; gap: 0; }
.selected-device-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) 144px 96px auto; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.selected-device-row:last-child { border-bottom: 0; }
.selected-device-index { width: 23px; height: 23px; border-radius: 50%; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); font-size: 12px; font-weight: 700; }
.selected-device-info { min-width: 0; display: grid; gap: 2px; }
.selected-device-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selected-device-info small { color: var(--muted); font-size: 11px; }
.selected-device-quantity { display: grid; justify-items: center; gap: 3px; color: var(--muted); font-size: 10px; }
.quantity-stepper { width: 140px; min-height: 36px; display: grid; grid-template-columns: 34px minmax(0, 1fr) 34px; align-items: center; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--panel-solid); box-shadow: 0 2px 8px rgba(0, 0, 0, .04); }
.quantity-stepper-button { width: 34px; height: 34px; display: grid; place-items: center; border: 0; background: transparent; color: var(--blue); font-size: 19px; line-height: 1; cursor: pointer; transition: background .16s ease, color .16s ease; }
.quantity-stepper-button:hover { background: var(--blue-soft); }
.quantity-stepper-button:active { background: var(--blue); color: #fff; }
.quantity-stepper input { width: 100%; min-height: 34px; padding: 0 4px; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--text); text-align: center; font-size: 14px; font-weight: 700; box-shadow: none; }
.quantity-stepper input:focus { outline: 2px solid rgba(0, 113, 227, .2); outline-offset: -2px; }
.quantity-stepper input::-webkit-outer-spin-button, .quantity-stepper input::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; }
.selected-device-subtotal { text-align: right; white-space: nowrap; }
.order-device-detail-block { margin-top: 14px; }
.order-device-detail-list { display: grid; gap: 6px; }
.order-device-detail-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto auto; align-items: center; gap: 9px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-solid); }
.order-device-detail-row > span { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-size: 11px; font-weight: 700; }
.order-device-detail-row em { color: var(--muted); font-size: 11px; font-style: normal; white-space: nowrap; }
.order-device-detail-row b { color: var(--blue); white-space: nowrap; }
.submit-order-fields { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; gap: 13px 14px; margin-top: 16px; }
.submit-order-fields .submit-order-number { grid-column: 1; grid-row: 1; }
.submit-order-fields .submit-order-purchase { grid-column: 2; grid-row: 1; }
.submit-order-fields .submit-order-carrier { grid-column: 3; grid-row: 1; }
.submit-order-fields .submit-order-tracking { grid-column: 4; grid-row: 1; }
.submit-order-fields .submit-order-pickup { grid-column: 1; grid-row: 2; }
.submit-order-fields .submit-order-note { grid-column: 2 / span 3; grid-row: 2; max-width: none; }
.submit-order-fields .submit-order-image { grid-column: 3; grid-row: 2; }
.submit-order-fields .submit-detail-image { grid-column: 4; grid-row: 2; }
.submit-order-fields .field input { min-height: 40px; }
.submit-order-fields .submit-order-note input { min-height: 34px; }
.submit-order-actions { margin-top: 20px; flex-wrap: wrap; align-items: flex-end; }
.submit-upload-status { flex: 1 0 100%; min-height: 18px; }
.submit-order-actions .upload-icon { width: 19px; height: 19px; font-size: 15px; }
.submit-upload-control { min-width: 180px; display: grid; align-content: end; gap: 4px; flex: 0 1 190px; }
.submit-upload-control .upload-progress-status { min-height: 16px; color: transparent; text-align: center; }
.submit-upload-control .upload-progress-status.ready,
.submit-upload-control .upload-progress-status.error { color: var(--muted); }
.submit-upload-control .upload-progress-status.ready { color: var(--green); }
.submit-upload-control .upload-progress-status.error { color: var(--red); }
.submit-upload-button { width: 100%; min-width: 0; gap: 6px; white-space: normal; line-height: 1.25; text-align: center; }
.upload-progress-ring { --upload-progress: 0deg; position: relative; width: 28px; height: 28px; flex: 0 0 28px; display: none; place-items: center; border-radius: 50%; background: conic-gradient(var(--blue) var(--upload-progress), #e6e7ec 0); }
.upload-progress-ring.is-visible { display: grid; }
.upload-progress-ring::before { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--panel-solid); }
.upload-progress-ring span { position: relative; z-index: 1; color: var(--blue); font-size: 8px; font-weight: 700; line-height: 1; }
.upload-progress-ring.is-complete { background: conic-gradient(var(--green) 360deg, var(--green) 0); }
.upload-progress-ring.is-complete span { color: var(--green); }
.upload-progress-ring.is-error { background: conic-gradient(var(--red) 360deg, var(--red) 0); }
.upload-progress-ring.is-error span { color: var(--red); font-size: 12px; }
.upload-progress-status { color: var(--muted); font-size: 10px; line-height: 1; }
.upload-progress-status.ready { color: var(--green); }
.upload-progress-status.error { color: var(--red); }
.admin-order-edit { padding: 9px 11px; }
.admin-processing-fields { gap: 7px 9px; }
.admin-order-edit .form-actions { margin-top: 5px; }
.admin-order-edit .field input, .admin-order-edit .field textarea, .admin-order-edit .select-trigger { min-height: 34px; padding-top: 6px; padding-bottom: 6px; }
.admin-order-edit .admin-note-field textarea { height: 34px; min-height: 34px; }
.admin-order-bottom { display: grid; grid-template-columns: minmax(220px, .85fr) minmax(250px, 1.15fr); align-items: end; gap: 12px; margin-top: 7px; }
.admin-order-actions { display: grid; grid-template-columns: repeat(2, minmax(108px, 1fr)); align-items: center; justify-content: stretch; gap: 8px; }
.admin-order-actions .button { min-height: 38px; padding: 0 13px; font-size: 13px; border-radius: 11px; }
.admin-save-status { margin-left: auto; color: var(--muted); font-size: 11px; }
.admin-order-actions .admin-save-status { grid-column: 1 / -1; margin-left: 0; text-align: right; }
.admin-save-status.saving { color: var(--blue); }
.admin-save-status.pending { color: var(--orange); }
.admin-save-status.saved { color: var(--green); }
.admin-save-status.error { color: var(--red); }
.settlement-button { background: var(--green); border-color: var(--green); color: #fff; box-shadow: 0 5px 12px rgba(22, 128, 60, .18); }
.settlement-button:hover { filter: brightness(.95); transform: translateY(-1px); }
.order-info-column > .detail-block { margin-top: 14px; }
.order-info-column > .detail-block:first-of-type { margin-top: 0; }
.order-info-column .detail-block h3 { margin-bottom: 7px; }
.order-info-column .media-grid { gap: 7px; }
.order-info-column .media-card img, .order-info-column .media-card video { width: auto; height: 100px; max-width: 100%; }
.order-info-column .media-card figcaption { min-height: 25px; padding: 5px 7px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { color: #55555b; font-size: 12px; font-weight: 600; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid #dcdce1; border-radius: 11px; background: #fff; color: var(--text); min-height: 40px; padding: 9px 11px; outline: none; transition: border .16s, box-shadow .16s; }
.field textarea { resize: vertical; min-height: 84px; }
.admin-note-field textarea { min-height: 40px; height: 40px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #5da9ed; box-shadow: 0 0 0 4px rgba(0,113,227,.1); }
.select-field { position: relative; min-width: 0; }
.select-trigger { width: 100%; min-height: 40px; padding: 9px 34px 9px 11px; border: 1px solid #dcdce1; border-radius: 11px; background: #fff; color: var(--text); text-align: left; position: relative; transition: border .16s, box-shadow .16s; }
.select-trigger::after { content: ""; position: absolute; right: 13px; top: 50%; width: 7px; height: 7px; border-right: 1.5px solid #77777d; border-bottom: 1.5px solid #77777d; transform: translateY(-65%) rotate(45deg); transition: transform .16s ease; }
.select-field.open .select-trigger { border-color: #5da9ed; box-shadow: 0 0 0 4px rgba(0,113,227,.1); }
.select-field.open .select-trigger::after { transform: translateY(-25%) rotate(225deg); }
.select-menu { display: none; position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; right: 0; max-height: 260px; overflow-y: auto; padding: 5px; border: 1px solid #d9d9df; border-radius: 12px; background: rgba(255,255,255,.98); box-shadow: 0 12px 28px rgba(0,0,0,.14); }
.select-field.open .select-menu { display: grid; gap: 2px; }
.select-option { width: 100%; min-height: 34px; padding: 7px 9px; border: 0; border-radius: 8px; background: transparent; color: var(--text); text-align: left; font-size: 13px; }
.select-option:hover, .select-option.selected { background: var(--blue-soft); color: var(--blue); }
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.field input.file-input { width: 1px; height: 1px; min-height: 1px; padding: 0; border: 0; }
.file-picker { display: grid; gap: 7px; }
.file-picker-button { min-height: 42px; width: fit-content; max-width: 100%; border: 1px solid #d6d6dc; border-radius: 13px; background: linear-gradient(#fff, #f6f6f8); padding: 0 14px; display: inline-flex; align-items: center; gap: 8px; color: #3e3e43; font-weight: 600; cursor: pointer; box-shadow: 0 2px 5px rgba(0,0,0,.04); transition: .18s ease; }
.file-picker-button:hover { border-color: #8bbcf0; background: var(--blue-soft); color: var(--blue); transform: translateY(-1px); }
.upload-icon { width: 21px; height: 21px; display: grid; place-items: center; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-size: 17px; line-height: 1; }
.file-name { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.field-help { color: var(--muted); font-size: 12px; }
.ocr-status { color: var(--muted); font-size: 12px; line-height: 1.4; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ocr-status [data-ocr-status-message] { min-width: 0; overflow-wrap: break-word; word-break: normal; }
.ocr-retry-button { flex: 0 0 auto; min-height: 30px; padding: 0 10px; }
.ocr-retry-button[hidden] { display: none; }
.ocr-status.success { color: var(--green); }
.ocr-status.warning { color: var(--orange); }
.ocr-status.error { color: var(--red); }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.toolbar .field { min-width: 160px; }
.order-filter-actions { display: flex; align-items: center; gap: 8px; align-self: flex-end; }
.batch-settlement-button { white-space: nowrap; }
.completed-orders-button { white-space: nowrap; }
.completed-orders-back-button { min-height: 42px; padding-inline: 16px; white-space: nowrap; }
.problem-overview-heading { align-items: center; }
.problem-overview-count { color: var(--muted); font-size: 12px; }
.problem-overview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.problem-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: var(--panel-solid); box-shadow: 0 10px 30px rgba(24, 28, 40, .07); }
.problem-card-media { min-height: 210px; padding: 14px; display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; align-items: center; background: linear-gradient(180deg, #fafafd 0%, #f4f5f8 100%); }
.problem-card-media .media-card { width: 100%; height: 190px; border-radius: 16px; background: #fff; box-shadow: 0 4px 16px rgba(20, 24, 32, .06); }
.problem-card-media .media-card img { width: 100%; height: 100%; max-height: none; object-fit: contain; }
.problem-no-image { min-height: 186px; display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.problem-card-body { display: grid; gap: 12px; padding: 16px 17px 17px; }
.problem-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.problem-card-heading > div { min-width: 0; display: grid; gap: 3px; }
.problem-card-heading strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.problem-card-heading span { color: var(--muted); font-size: 11px; }
.problem-card-heading .status { padding: 5px 8px; font-size: 11px; }
.problem-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.problem-tags span { padding: 5px 10px; border-radius: 999px; background: var(--orange-soft); color: var(--orange); font-size: 11px; font-weight: 600; }
.problem-card-details { display: grid; gap: 8px; margin: 0; }
.problem-card-details > div { display: grid; grid-template-columns: 94px minmax(0, 1fr); gap: 8px; }
.problem-card-details dt { color: var(--muted); font-size: 12px; }
.problem-card-details dd { min-width: 0; margin: 0; color: var(--text); font-size: 13px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.problem-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.problem-card-footer small { color: var(--muted); font-size: 10px; }
.problem-card-footer > div { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.problem-upload-button { grid-column: 1 / -1; background: var(--orange-soft); border-color: #efc98f; color: var(--orange); }
.problem-upload-button:hover { background: #ffebc8; border-color: var(--orange); }
.modal.problem-overview-modal { width: min(680px, 100%); max-height: min(92vh, 980px); overflow: hidden; border-radius: 28px; }
.problem-overview-modal .modal-head { border-radius: 28px 28px 0 0; }
.problem-overview-modal .modal-body { min-width: 0; padding: 18px 22px 22px; overflow-x: hidden; overflow-y: auto; scrollbar-width: none; }
.problem-overview-modal .modal-body::-webkit-scrollbar { display: none; }
.problem-modal-images { min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 18px; overflow: hidden; }
.problem-modal-images .media-card { width: 100%; max-width: 100%; height: 170px; border: 1px solid var(--line); border-radius: 16px; background: #f7f7f9; overflow: hidden; }
.problem-modal-images .media-card img { max-width: 100%; }
.problem-overview-modal .field input, .problem-overview-modal .field select, .problem-overview-modal .field textarea, .problem-overview-modal .select-trigger { border-radius: 16px; }
.problem-overview-modal .field textarea { min-height: 106px; padding: 12px 13px; }
.problem-overview-modal .form-actions { padding-top: 4px; }
.problem-modal-images .media-card img { width: 100%; height: 100%; max-height: none; object-fit: contain; }
.required-mark { color: var(--red); }

.quote-preview { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 16px; }
.quote-option { color: var(--muted); }
.upload-box { border: 1px dashed #c8c8ce; border-radius: 14px; padding: 16px; background: #fafafc; }
.upload-box strong { display: block; margin-bottom: 4px; }
.upload-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.media-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.media-card { width: fit-content; max-width: 100%; justify-self: start; border: 0; border-radius: 14px; overflow: hidden; background: transparent; display: grid; place-items: center; }
.media-card { position: relative; }
.media-card img, .media-card video { width: auto; height: auto; max-width: 100%; max-height: 320px; display: block; object-fit: contain; background: transparent; }
.media-card img { object-position: center; }
.media-clickable { cursor: pointer; transition: transform .16s ease, box-shadow .16s ease; }
.media-clickable:hover { transform: translateY(-2px); box-shadow: var(--small-shadow); }
.media-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(20,20,24,.68); color: #fff; pointer-events: none; }

.quote-results { display: grid; gap: 7px; max-height: 360px; overflow: auto; margin-top: 10px; padding: 2px; }
.quote-option { width: 100%; border: 1px solid var(--line); border-radius: 13px; background: #fff; padding: 11px 13px; display: flex; align-items: center; justify-content: space-between; gap: 15px; text-align: left; color: var(--text); }
.quote-option:hover, .quote-option.selected { border-color: #70aeee; background: var(--blue-soft); }
.quote-option span { min-width: 0; display: grid; gap: 2px; }
.quote-option strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quote-option small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quote-option b { color: var(--blue); white-space: nowrap; }
.compact-empty { padding: 20px; }
.selected-quote { margin-top: 13px; padding: 13px 15px; border: 1px solid #b9d7f6; background: var(--blue-soft); border-radius: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.selected-quote span { color: var(--muted); display: block; font-size: 11px; }
.selected-quote strong { display: block; margin-top: 2px; }
.version-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

.empty-state { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty-state strong { display: block; color: var(--text); font-size: 16px; margin-bottom: 6px; }
.empty-state p { margin: 0; }
.inline-note { background: #f6f6f8; padding: 11px 13px; border-radius: 11px; color: var(--muted); font-size: 12px; }
.danger-note { background: var(--red-soft); color: var(--red); }
.trash-notice { margin-bottom: 16px; }
.order-trash-panel { overflow: hidden; }
.order-trash-table { min-width: 980px; }
.order-trash-table td { white-space: normal; }
.order-trash-table td:first-child { min-width: 150px; }
.order-trash-table .subline { overflow-wrap: anywhere; }
.trash-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.profile-trash-heading { margin-top: 24px; }
.profile-trash-heading h3 { margin: 0; }
.profile-order-trash-table { min-width: 760px; }
.profile-order-trash-table th:nth-child(1) { width: 18%; }
.profile-order-trash-table th:nth-child(2) { width: 23%; }
.profile-order-trash-table th:nth-child(3) { width: 24%; }
.profile-order-trash-table th:nth-child(4) { width: 17%; }
.profile-order-trash-table th:nth-child(5) { width: 18%; }
.user-order-delete-button { min-width: 52px; }
.trash-expiry { display: grid; gap: 1px; margin-top: 6px; }
.trash-expiry strong { color: var(--red); font-size: 12px; }
.trash-expiry span { color: var(--muted); font-size: 11px; }
.trash-detail-modal { width: min(1040px, 100%); }
.trash-detail-body { padding: 18px 22px 24px; }
.trash-detail-expiry { margin-bottom: 16px; }
.trash-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.trash-detail-grid > .detail-block { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-solid); }
.trash-detail-wide { grid-column: 1 / -1; }
.trash-detail-list { display: grid; gap: 8px; }
.trash-detail-list > div { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.trash-detail-list span, .trash-detail-list em { color: var(--muted); font-size: 12px; font-style: normal; }
.trash-detail-list b { color: var(--green); }
.trash-amount-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.trash-amount-grid > div { display: grid; gap: 3px; padding: 10px; background: #f6f6f8; border-radius: 8px; }
.trash-amount-grid span { color: var(--muted); font-size: 11px; }
.trash-amount-grid strong { font-size: 16px; }
.trash-record { padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; }
.trash-record + .trash-record { margin-top: 8px; }
.trash-record header { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.trash-record header span, .trash-settlement-meta { color: var(--muted); font-size: 11px; }
.trash-record p { margin: 8px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.trash-settlement-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 7px; }
.trash-note-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.trash-chat-list { display: grid; gap: 12px; max-height: 460px; padding: 14px; overflow-y: auto; background: #fbfbfc; border: 1px solid var(--line); border-radius: 8px; }
.delete-order-check { display: grid; gap: 10px; margin: 0 0 16px; }
.delete-order-check > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-solid); }
.delete-order-check dt { color: var(--muted); font-size: 12px; }
.delete-order-check dd { margin: 0; color: var(--text); font-weight: 700; overflow-wrap: anywhere; }

.modal-backdrop { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 26px; background: rgba(20,20,24,.3); backdrop-filter: blur(9px); }
.modal { width: min(1180px, 100%); max-height: min(92vh, 980px); overflow: auto; background: rgba(255,255,255,.96); border: 1px solid rgba(255,255,255,.8); border-radius: 24px; box-shadow: 0 26px 90px rgba(0,0,0,.2); }
.modal.compact { width: min(620px, 100%); }
.mobile-chat-modal { width: min(1180px, 100%); height: min(92vh, 980px); max-height: min(92vh, 980px); overflow: hidden; background: rgba(255,255,255,.96); border: 1px solid rgba(255,255,255,.8); border-radius: 24px; box-shadow: 0 26px 90px rgba(0,0,0,.2); display: flex; flex-direction: column; contain: layout paint; }
.mobile-chat-backdrop { padding: 26px; }
.mobile-chat-modal-head { min-height: 60px; padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); }
.mobile-chat-modal-head > div { min-width: 0; display: grid; gap: 3px; }
.mobile-chat-modal-head strong { font-size: 17px; }
.mobile-chat-modal-head span { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mobile-chat-close-button { flex: 0 0 auto; min-height: 36px; padding: 0 14px; border-radius: 10px; }
.mobile-chat-modal > .chat-panel { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; border-radius: 0; border: 0; }
.mobile-chat-modal > .chat-panel .chat-head { display: none; }
.mobile-chat-modal > .chat-panel .chat-list { flex: 1 1 auto; max-height: none; }
.modal-head { padding: 20px 22px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1; background: rgba(255,255,255,.92); backdrop-filter: blur(12px); }
.modal-head h2 { margin: 0; font-size: 19px; }
.modal-head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.order-modal-head { position: relative; align-items: center; padding: 12px 16px; gap: 8px; }
.order-modal-head h2 { font-size: 17px; }
.order-modal-head p { margin-top: 2px; font-size: 11px; }
.order-modal-heading { min-width: 0; flex: 1 1 auto; }
.order-title-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.order-title-meta span + span::before { content: ""; display: inline-block; width: 3px; height: 3px; margin: 0 9px 2px 0; border-radius: 50%; background: #b3b3b8; }
.order-head-summary { display: grid; grid-template-columns: minmax(148px, 1.15fr) repeat(3, minmax(108px, 1fr)); gap: 7px; flex: 0 1 auto; min-width: 0; }
.order-head-summary.price-count-0 { grid-template-columns: minmax(180px, 1fr); }
.order-head-summary.price-count-1 { grid-template-columns: minmax(180px, 1.2fr) minmax(118px, 1fr); }
.order-head-summary.price-count-2 { grid-template-columns: minmax(148px, 1.2fr) repeat(2, minmax(118px, 1fr)); }
.order-head-summary.price-count-3 { grid-template-columns: minmax(148px, 1.15fr) repeat(3, minmax(108px, 1fr)); }
.order-head-summary:not(.has-prices) { grid-template-columns: minmax(180px, 1fr); }
.order-summary-card { min-width: 0; min-height: 42px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 11px; background: #f7f7f9; display: grid; align-content: center; gap: 1px; }
.order-summary-card span { color: var(--muted); font-size: 10px; line-height: 1.2; white-space: nowrap; }
.order-summary-card strong, .order-summary-card small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-device-card strong.order-device-inline { overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; }
.order-summary-card strong { color: var(--text); font-size: 13px; font-weight: 700; }
.order-summary-card small { color: var(--muted); font-size: 11px; }
.order-device-inline { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; font-size: 16px !important; }
.order-device-inline em { min-width: 0; color: var(--muted); font-size: 14px; font-style: normal; font-weight: 600; white-space: normal; overflow-wrap: anywhere; }
.order-row-device { display: inline-flex; align-items: baseline; gap: 8px; min-width: 0; max-width: 100%; white-space: nowrap; }
.order-row-device em { min-width: 0; overflow: hidden; color: var(--muted); font-size: 12px; font-style: normal; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.order-price-card strong { font-size: 14px; font-variant-numeric: tabular-nums; }
.order-profit-card strong.profit { color: var(--green); }
.order-profit-card strong.loss { color: var(--red); }
.order-workspace > .modal-body { padding: 16px; }
.order-workspace { display: flex; flex-direction: column; overflow: hidden; height: min(92vh, 980px); }
.order-workspace > .modal-head { flex: 0 0 auto; }
.order-workspace > .modal-body { flex: 1 1 auto; min-height: 0; overflow: hidden; }
.close-button { width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: #f1f1f3; color: #5d5d63; font-size: 18px; }
.close-button:hover { background: #e4e4e7; }
.detail-grid { display: grid; grid-template-columns: minmax(390px, .95fr) minmax(430px, 1.05fr); gap: 18px; align-items: stretch; height: 100%; min-height: 0; }
.detail-grid.read-only-order-detail { grid-template-columns: minmax(0, 1fr); }
.read-only-order-detail .order-chat-column { display: none; }
.read-only-order-detail .order-info-column { overflow-y: auto; scrollbar-width: none; }
.read-only-order-detail .order-info-column::-webkit-scrollbar { display: none; }
.order-info-column, .order-chat-column { min-width: 0; min-height: 0; }
.order-info-column { overflow: hidden; }
.order-info-column .media-card img, .order-info-column .media-card video { width: auto; height: 100px; max-width: 100%; }
.order-info-column .media-play { top: 50px; }
.order-info-column .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.order-info-column .media-card { width: 100%; min-height: 220px; background: #f7f7f9; }
.order-info-column .media-card img, .order-info-column .media-card video { width: 100%; height: 220px; max-width: 100%; max-height: 220px; object-fit: contain; background: #f7f7f9; }
.order-info-column .media-play { top: 50%; }
.admin-user-media-block .media-grid { gap: 10px; }
.admin-user-media-block .media-card { min-height: 210px; width: 100%; background: #f7f7f9; }
.admin-user-media-block .media-card img, .admin-user-media-block .media-card video { width: 100%; height: 210px; max-height: 210px; object-fit: contain; }
.order-media-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.order-media-row { display: flex; align-items: center; gap: 10px; min-height: 34px; }
.order-media-label { color: var(--muted); font-size: 12px; }
.order-media-row-actions { display: flex; align-items: center; gap: 7px; }
.admin-media-block .order-media-actions { display: grid; gap: 7px; }
.admin-media-block .order-media-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 7px; min-width: 0; }
.admin-media-block .order-media-row-actions { min-width: 0; flex-wrap: nowrap; gap: 6px; }
.order-media-actions .media-disabled { background: #f1f1f3; border-color: var(--line); color: var(--muted); box-shadow: none; }
.media-empty-note { margin-top: 7px; font-size: 12px; }
.admin-media-heading { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.admin-media-heading h3 { margin: 0 !important; }
.inline-media-upload { margin: 0; display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.inline-media-upload .file-picker { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.inline-media-upload .file-picker-button { min-height: 30px; padding: 0 10px; border-radius: 10px; font-size: 12px; }
.inline-media-upload .upload-icon { width: 18px; height: 18px; font-size: 15px; }
.pickup-meta-item .pickup-code-value { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; }
.pickup-meta-item .status { display: inline-flex; width: max-content; flex: 0 0 auto; }
.mobile-order-user { display: none; }
.order-tracking-anchor { display: none; }
.order-chat-column { overflow: hidden; display: flex; flex-direction: column; }
.detail-block + .detail-block { margin-top: 16px; }
.detail-block h3 { margin: 0 0 11px; font-size: 14px; }
.meta-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px 16px; }
.order-status-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.order-status-list .meta-item { display: flex; align-items: center; gap: 5px; min-width: 0; white-space: nowrap; }
.order-status-list .meta-item > span { display: inline; margin: 0; flex: 0 0 auto; }
.order-status-list .meta-item > strong { display: inline; min-width: 0; }
.order-status-list .status { width: max-content; max-width: 100%; padding: 6px 10px; font-size: 13px; }
.meta-item span { display: block; color: var(--muted); font-size: 11px; margin-bottom: 2px; }
.meta-item > span .status { margin-left: 4px; vertical-align: middle; font-size: 12px; }
.meta-item > span .status.status-green { color: var(--green); }
.meta-item strong { font-size: 13px; }
.tracking-form { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; align-items: end; gap: 10px; flex-wrap: wrap; }
.tracking-form .field { flex: 1 1 240px; }
.tracking-form .field-help { margin-top: 4px; }
.user-purchase-amount-editor form { display: flex; align-items: end; gap: 10px; }
.user-purchase-amount-editor .field { flex: 1 1 180px; }
.user-purchase-amount-editor .button { flex: 0 0 auto; }
@media (max-width: 560px) {
  .user-purchase-amount-editor form { align-items: stretch; flex-direction: column; }
  .user-purchase-amount-editor .field { flex-basis: auto; }
  .user-purchase-amount-editor .button { width: 100%; }
}
.tracking-save-status { color: var(--muted); font-size: 11px; white-space: nowrap; padding-bottom: 10px; }
.tracking-save-status.saving { color: var(--blue); }
.tracking-save-status.pending { color: var(--orange); }
.tracking-save-status.saved { color: var(--green); }
.tracking-save-status.error { color: var(--red); }
.chat-panel { --chat-message-size: 18px; --chat-message-line-height: 1.6; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #fbfbfc; display: flex; flex-direction: column; min-height: 0; height: 100%; position: static; }
.chat-panel.chat-font-small { --chat-message-size: 15px; --chat-message-line-height: 1.55; }
.chat-panel.chat-font-large { --chat-message-size: 22px; --chat-message-line-height: 1.65; }
.chat-head { padding: 13px 15px; background: #fff; border-bottom: 1px solid var(--line); font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.chat-head small { color: var(--muted); font-size: 11px; font-weight: 400; }
.chat-list { padding: 14px; display: grid; align-content: start; gap: 12px; overflow-y: auto; overflow-x: hidden; overflow-anchor: none; flex: 1 1 auto; min-height: 0; max-height: none; }
.chat-message { width: fit-content; max-width: min(94%, 720px); display: grid; gap: 4px; }
.chat-message.mine { justify-self: end; justify-items: end; }
.chat-message .bubble { width: fit-content; max-width: 100%; min-width: 0; justify-self: start; background: #fff; border: 1px solid var(--line); border-radius: 15px; padding: 11px 13px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--chat-message-size); line-height: var(--chat-message-line-height); }
.chat-message.mine .bubble { justify-self: end; background: var(--blue); border-color: var(--blue); color: #fff; min-width: 0; }
.chat-message small { color: var(--muted); font-size: 14px; line-height: 1.4; }
.chat-message .chat-sender { color: var(--text); font-weight: 700; }
.chat-message .chat-time { color: var(--muted); font-weight: 500; }
.chat-compose { border-top: 1px solid var(--line); background: #fff; padding: 12px; }
.chat-compose textarea { width: 100%; border: 0; resize: none; outline: 0; min-height: 54px; }
.chat-compose .toolbar { justify-content: space-between; }
.chat-compose .file-picker { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chat-compose .file-picker-button { min-height: 32px; border-radius: 10px; padding: 0 10px; font-size: 12px; }
.chat-compose .file-name, .chat-compose .field-help { display: none; }
.chat-media { width: min(520px, 100%); }
.chat-media .media-grid { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; }
.chat-media .media-card { flex: 0 0 auto; width: min(300px, 100%); min-width: 180px; min-height: 135px; max-width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: 13px; background: #f2f3f5; display: grid; place-items: center; }
.chat-media .media-card-video { contain: layout paint; }
.chat-media .media-card-video video { pointer-events: none; }
.chat-media .media-card img, .chat-media .media-card video { display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; max-width: 100%; max-height: none; object-fit: contain; background: #f2f3f5; }
.media-load-status { display: none; padding: 14px; color: var(--muted); font-size: 12px; line-height: 1.5; text-align: center; }
.media-load-status .media-retry-button { display: inline-flex; margin-left: 8px; min-height: 32px; }
.media-card.media-load-error, .media-preview.media-load-error { background: #f2f3f5; }
.media-card.media-load-error .media-load-status, .media-preview.media-load-error .media-load-status { display: block; }

.chat-loading p { margin: 0; }

.amount-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.amount-grid > div { padding: 11px 12px; background: #f7f7f9; border-radius: 12px; }
.amount-grid span { display: block; color: var(--muted); font-size: 11px; }
.amount-grid strong { display: block; margin-top: 3px; }
.money.loss { color: var(--red); }
.profit-formula { display: block; margin-top: 8px; }

.admin-settlement-action { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.admin-settlement-action > div { display: grid; gap: 2px; }
.admin-settlement-action span, .admin-settlement-action small { color: var(--muted); font-size: 12px; }
.admin-settlement-action strong { font-size: 15px; }
.admin-settlement-action.ready strong { color: var(--green); }
.admin-settlement-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 14px 0; }
.admin-settlement-summary > div { min-width: 0; display: grid; gap: 3px; padding: 9px; border-radius: 10px; background: #f7f7f9; }
.admin-settlement-summary span { color: var(--muted); font-size: 10px; }
.admin-settlement-summary strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.admin-settlement-summary .current { background: var(--blue-soft); }
.admin-settlement-summary .current strong { color: var(--blue); }
.media-upload-form { margin-top: 11px; display: flex; align-items: end; gap: 10px; flex-wrap: wrap; }
.media-upload-form .file-name, .media-upload-form .field-help { display: none; }
.media-upload-status { color: var(--muted); font-size: 11px; }
.media-upload-status.saving { color: var(--blue); }
.media-upload-status.error { color: var(--red); }
.order-media-image-grid { margin-top: 8px; }
.order-media-image-grid figcaption { align-items: center; }
.media-delete-button { min-height: 28px !important; padding: 0 9px !important; font-size: 11px !important; }
.settlement-profile { margin-top: 13px; padding: 13px; background: #f7f7f9; border-radius: 13px; }
.modal.compact.settlement-modal { width: min(920px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: hidden; }
.settlement-modal { display: flex; flex-direction: column; }
.settlement-modal .modal-head { flex: 0 0 auto; }
.settlement-backdrop { z-index: 50; }
.settlement-modal > .settlement-form { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.settlement-modal .settlement-form { min-height: 0; }
.settlement-modal .modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
.settlement-intro { margin-bottom: 13px; }
.settlement-profile-missing { margin-top: 13px; }
.settlement-order-list { display: grid; gap: 10px; margin-top: 14px; }
.settlement-item { display: block; min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel-solid); }
.settlement-item > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.settlement-item > header > div { min-width: 0; display: grid; gap: 3px; }
.settlement-item > header > div > span { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settlement-amount-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.settlement-amount-detail { min-width: 0; display: grid; gap: 3px; padding: 8px; border-radius: 9px; background: #f7f7f9; }
.settlement-amount-detail small { color: var(--muted); font-size: 10px; }
.settlement-amount-detail strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.settlement-amount-detail.settlement-amount-current { background: var(--blue-soft); }
.settlement-amount-current strong { color: var(--blue); }
.settlement-modal-footer { flex: 0 0 auto; display: flex; justify-content: flex-end; gap: 9px; padding: 12px 22px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--panel-solid); }
.settlement-modal-footer .button { touch-action: manipulation; }
.settlement-profile .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.settlement-profile .media-card { width: 100%; min-width: 0; height: 230px; aspect-ratio: auto; background: #fff; }
.settlement-profile .media-card img, .settlement-profile .media-card video { width: 100%; max-width: 100%; height: 100%; min-height: 0; max-height: none; object-fit: contain; background: #fff; image-rendering: auto; }
.settlement-modal-batch.settlement-count-2 .settlement-profile .media-card { height: 160px; }
.settlement-modal-batch.settlement-count-3 .settlement-profile .media-card { height: 160px; }
.settlement-modal-batch.settlement-count-4 .settlement-profile .media-card { height: 130px; }
.settlement-profile .media-card figcaption { min-height: 30px; }
.settings-password-panel { margin-bottom: 16px; }
.settings-password-panel form { display: flex; align-items: flex-end; gap: 14px; width: min(100%, calc(100vw - 320px), 1040px); max-width: 1040px; }
.settings-password-panel form .form-grid { flex: 1 1 auto; min-width: 0; }
.settings-password-panel .form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.settings-password-panel form .form-actions { flex: 0 0 auto; margin-top: 0; }
.profile-name-panel { display: flex; align-items: flex-end; gap: 14px; width: min(100%, 1040px); }
.profile-name-panel form { display: flex; align-items: flex-end; gap: 14px; flex: 1 1 auto; width: auto; }
.profile-name-panel form .field { flex: 1 1 auto; max-width: 420px; }
.profile-name-panel .form-actions { margin-top: 0; }
.profile-name-panel .field-help { padding-bottom: 11px; }
.profile-password-divider { height: 1px; margin: 20px 0; background: var(--line); }
.settlement-amount { color: var(--blue); font-size: 18px; text-align: right; font-variant-numeric: tabular-nums; }
.settlement-order-links { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.settlement-record-items { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.settlement-record-item { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel-solid); }
.settlement-record-item small { color: var(--muted); font-size: 11px; }
.settlement-order-link { border: 0; padding: 0; background: transparent; color: var(--blue); font: inherit; cursor: pointer; }
.settlement-order-link:hover { text-decoration: underline; }
.settlement-row-clickable { cursor: pointer; }
.settlement-row-clickable:hover td { background: var(--blue-soft); }
.settlement-order-number { color: var(--blue); font-weight: 600; }
.settlement-summary-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.settlement-summary-card { min-width: 0; padding: 15px 16px; border: 1px solid var(--line); border-radius: 15px; background: var(--panel-solid); color: var(--text); text-align: left; box-shadow: var(--small-shadow); transition: .18s ease; }
.settlement-summary-card:hover, .settlement-summary-card.selected { border-color: var(--blue); background: var(--blue-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 12%, transparent); transform: translateY(-1px); }
.settlement-summary-card span, .settlement-summary-card small { display: block; color: var(--muted); }
.settlement-summary-card span { font-size: 12px; }
.settlement-summary-card strong { display: block; margin: 7px 0 3px; color: var(--text); font-size: 21px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.settlement-summary-card small { font-size: 11px; }
.settlement-records-mobile { display: none; }
.settlement-batch-card { padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-solid); box-shadow: var(--small-shadow); }
.settlement-batch-card + .settlement-batch-card { margin-top: 10px; }
.settlement-batch-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.settlement-batch-card > header > div { min-width: 0; display: grid; gap: 3px; }
.settlement-batch-card > header strong { font-size: 14px; }
.settlement-batch-card > header span { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settlement-batch-highlight { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 12px; }
.settlement-batch-highlight strong { color: var(--blue); font-size: 21px; font-variant-numeric: tabular-nums; }
.settlement-batch-highlight span { color: var(--muted); font-size: 11px; white-space: nowrap; }
.settlement-batch-orders { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.settlement-batch-label { color: var(--muted); font-size: 11px; }
.settlement-batch-orders .settlement-record-items { margin-top: 6px; }
.settlement-batch-card > footer { display: flex; justify-content: flex-end; margin-top: 11px; }
.settlement-filter-note { display: flex; align-items: center; gap: 9px; margin: 0 0 10px; color: var(--muted); font-size: 12px; }
.settlement-total { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding: 15px 16px; border-radius: 13px; background: var(--blue-soft); color: var(--muted); }
.settlement-total strong { color: var(--blue); font-size: 25px; font-variant-numeric: tabular-nums; }
.settlement-status-link { border: 0; padding: 0; background: transparent; cursor: pointer; }
.settlement-detail-modal { width: min(720px, calc(100vw - 32px)); }
.settlement-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.settlement-detail-grid > div { min-width: 0; display: grid; gap: 4px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel-solid); }
.settlement-detail-grid span, .settlement-detail-remark h3, .settlement-detail-orders h3 { color: var(--muted); font-size: 11px; }
.settlement-detail-grid strong { overflow-wrap: anywhere; font-size: 14px; }
.settlement-detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.settlement-detail-remark, .settlement-detail-orders { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.settlement-detail-remark p { margin: 7px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--blue-soft); line-height: 1.6; overflow-wrap: anywhere; }
.settlement-detail-orders h3 { margin: 0 0 8px; }
.settlement-detail-order { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.alipay-config-section { display: grid; gap: 12px; margin-bottom: 16px; }
.alipay-site-config-card { display: grid; gap: 14px; }
.alipay-site-config-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.alipay-site-config-head h3, .alipay-site-config-head p { margin: 0; }
.alipay-site-config-head p { margin-top: 4px; color: var(--muted); font-size: 12px; }
.alipay-config-switch { align-self: end; min-height: 42px; }
.alipay-secret-grid textarea { width: 100%; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; line-height: 1.45; }
@media (max-width: 780px) {
  .settlement-detail-grid { grid-template-columns: 1fr; }
  .alipay-config-switch { align-self: stretch; }
}
.quote-page-heading { margin-bottom: 8px; }
.quote-admin-panel { width: 100%; }
.quote-admin-toolbar { display: grid; grid-template-columns: minmax(220px, .75fr) minmax(0, 1.25fr); align-items: end; gap: 10px; margin-bottom: 8px; }
.quote-admin-toolbar .field { max-width: 560px; }
.quote-inline-import { display: grid; grid-template-columns: minmax(120px, .9fr) minmax(130px, 1fr) auto; align-items: end; gap: 8px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 12px; background: #fafafc; }
.quote-inline-import .file-name, .quote-inline-import .field-help { display: none; }
.quote-inline-import .file-picker-button { min-height: 38px; padding: 0 11px; font-size: 12px; }
.quote-inline-import .form-actions { margin-top: 0; }
.quote-result-count { margin-top: 8px; color: var(--muted); font-size: 12px; }
.quote-mobile-list { display: none; }
.quote-mobile-card { width: 100%; padding: 13px 14px; border: 0; border-bottom: 1px solid var(--line); background: var(--panel-solid); color: var(--text); text-align: left; display: grid; gap: 8px; }
.quote-mobile-card:last-child { border-bottom: 0; }
.quote-mobile-card:hover, .quote-mobile-card.selected { background: var(--blue-soft); }
.quote-mobile-card-head, .quote-mobile-card-grid, .quote-mobile-card-note { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.quote-mobile-card-head strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quote-mobile-card-head > span { flex: 0 0 auto; color: var(--muted); font-size: 11px; }
.quote-mobile-card-grid { justify-content: flex-start; gap: 18px; }
.quote-mobile-card-grid > span { min-width: 66px; display: grid; gap: 2px; }
.quote-mobile-card-grid small, .quote-mobile-card-note small { color: var(--muted); font-size: 10px; }
.quote-mobile-card-grid b { font-size: 13px; }
.quote-price-value { overflow-wrap: anywhere; white-space: normal; }
.quote-mobile-card-note { align-items: flex-start; justify-content: flex-start; gap: 8px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.quote-mobile-card-note span { min-width: 0; overflow-wrap: anywhere; }
.quote-mobile-card .quote-select-hint { justify-self: end; }
.quote-table-wrap { width: 100%; min-height: 0; margin-top: 8px; max-height: calc(100vh - 260px); overflow: auto; border: 1px solid var(--line); border-radius: 14px; }
.quote-table-wrap table { min-width: 860px; }
.quote-table th, .quote-table td { vertical-align: top; }
.quote-result-row { cursor: pointer; }
.quote-result-row:hover, .quote-result-row.selected { background: var(--blue-soft); }
.quote-select-hint { color: var(--blue); font-size: 12px; white-space: nowrap; }
.quote-search-empty { margin-top: 10px; padding: 20px 14px; border: 1px dashed var(--line); border-radius: 13px; color: var(--muted); text-align: center; background: color-mix(in srgb, var(--panel-solid) 70%, transparent); }
.quote-picker-entry { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel-solid); }
.quote-picker-entry > span { color: var(--muted); font-size: 12px; }
.quote-picker-open-button { min-height: 40px; }
.quote-picker-modal { width: min(760px, 100%); max-height: min(88vh, 780px); display: flex; flex-direction: column; overflow: hidden; }
.quote-picker-modal .modal-head { flex: 0 0 auto; }
.quote-picker-modal .modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.quote-picker-modal .quote-results { max-height: none; }
.quote-picker-modal .quote-picker-results { margin-top: 12px; }
.quote-picker-modal .quote-picker-mobile-list { display: grid; gap: 9px; max-height: none; overflow: visible; margin-top: 0; border: 0; }
.quote-picker-modal .quote-picker-mobile-list .quote-mobile-card { min-height: 116px; border: 1px solid var(--line); border-radius: 14px; appearance: none; }
.quote-picker-modal .quote-picker-mobile-list .quote-mobile-card-head strong { white-space: normal; overflow-wrap: anywhere; }
.quote-picker-modal .quote-picker-mobile-list .quote-mobile-card:hover,
.quote-picker-modal .quote-picker-mobile-list .quote-mobile-card.selected { border-color: #70aeee; }
.quote-picker-footer { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--panel-solid); }
.quote-picker-footer > span { flex: 1 1 auto; color: var(--muted); font-size: 12px; text-align: center; }
.scanner-manual-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; }
.scanner-manual-form .field { min-width: 0; }
.scanner-manual-form .button { min-height: 42px; }
.scanner-result-modal { width: min(720px, 100%); max-height: min(88vh, 820px); display: flex; flex-direction: column; overflow: hidden; }
.scanner-result-modal .modal-head { flex: 0 0 auto; }
.scanner-result-modal .modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.scanner-result-list { display: grid; gap: 10px; }
.scanner-result-empty { display: grid; gap: 9px; padding: 18px; border: 1px dashed var(--line-strong); border-radius: 13px; background: #f7f7f9; }
.scanner-result-empty p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.scanner-result-empty code { display: block; padding: 10px 12px; border-radius: 9px; background: #fff; color: var(--text); font: 600 14px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.scanner-result-backdrop { z-index: 60; }

.scanner-desktop-layout { display: grid; gap: 16px; }
.scanner-desktop-query { padding: 20px 22px; }
.scanner-desktop-query-head, .scanner-history-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.scanner-desktop-query-head h3, .scanner-history-head h3 { margin: 0; font-size: 16px; }
.scanner-desktop-query-head span, .scanner-history-head span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.scanner-record-count, .scanner-history-head > strong { color: var(--blue); font-size: 13px; font-variant-numeric: tabular-nums; }
.scanner-desktop-query .scanner-manual-form { margin-top: 16px; padding-top: 0; border-top: 0; }
.scanner-desktop-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.scanner-history-panel { min-width: 0; overflow: hidden; }
.scanner-history-head { padding: 17px 18px; border-bottom: 1px solid var(--line); background: var(--panel-solid); }
.scanner-history-list { display: grid; gap: 10px; max-height: 620px; padding: 12px; overflow-y: auto; }
.scanner-history-item { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel-solid); box-shadow: var(--small-shadow); }
.scanner-history-item.is-unmatched { background: #fafafa; }
.scanner-history-item > header, .scanner-history-item > footer { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.scanner-history-item > header > div { min-width: 0; display: grid; gap: 2px; }
.scanner-history-item > header strong, .scanner-history-item > header span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scanner-history-item > header span { color: var(--muted); font-size: 12px; }
.scanner-history-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-top: 13px; }
.scanner-history-meta span { min-width: 0; display: grid; gap: 2px; }
.scanner-history-meta small { color: var(--muted); font-size: 10px; }
.scanner-history-meta b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.scanner-history-item > footer { align-items: center; margin-top: 13px; }
.scanner-history-item > footer small, .scanner-history-result { color: var(--muted); font-size: 11px; }
.scanner-history-actions { display: flex; gap: 7px; }
.scanner-history-empty { padding: 42px 16px; color: var(--muted); text-align: center; font-size: 12px; }

.order-table { width: 100%; min-width: 0; table-layout: fixed; border-collapse: separate; border-spacing: 0 4px; }
.admin-order-table th:nth-child(1), .admin-order-table td:nth-child(1) { width: 5%; }
.admin-order-table th:nth-child(2), .admin-order-table td:nth-child(2) { width: 12%; }
.admin-order-table th:nth-child(3), .admin-order-table td:nth-child(3) { width: 10%; }
.admin-order-table th:nth-child(4), .admin-order-table td:nth-child(4) { width: 15%; }
.admin-order-table th:nth-child(5), .admin-order-table td:nth-child(5) { width: 20%; text-align: left; padding-left: 20px; }
.admin-order-table th:nth-child(6), .admin-order-table td:nth-child(6) { width: 18%; }
.admin-order-table th:nth-child(7), .admin-order-table td:nth-child(7) { width: 10%; }
.admin-order-table th:nth-child(8), .admin-order-table td:nth-child(8) { width: 10%; }
.user-order-table th:nth-child(1), .user-order-table td:nth-child(1) { display: none; width: 0; padding: 0; }
.user-order-table th:nth-child(2), .user-order-table td:nth-child(2) { width: 18%; }
.user-order-table th:nth-child(3), .user-order-table td:nth-child(3) { width: 22%; }
.user-order-table th:nth-child(4), .user-order-table td:nth-child(4) { width: 16%; }
.user-order-table th:nth-child(5), .user-order-table td:nth-child(5) { width: 26%; }
.user-order-table th:nth-child(6), .user-order-table td:nth-child(6) { width: 18%; }
.order-table th:last-child, .order-table td:last-child { padding-left: 4px; padding-right: 4px; }
.order-table tbody td { overflow: hidden; text-overflow: ellipsis; }
.admin-order-table .order-status-inline { flex-wrap: nowrap; white-space: nowrap; }
.order-table tbody tr.clickable td { padding-top: 7px; padding-bottom: 7px; }
.order-table tbody tr.clickable td { background: var(--panel-solid); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.order-table tbody tr.clickable td:first-child { border-left: 1px solid var(--line); border-radius: 15px 0 0 15px; }
.order-table tbody tr.clickable td:last-child { border-right: 1px solid var(--line); border-radius: 0 15px 15px 0; }
.order-table tbody tr.clickable:hover td { background: color-mix(in srgb, var(--blue-soft) 44%, var(--panel-solid)); }
.order-table tbody tr.is-pinned td { background: color-mix(in srgb, var(--blue-soft) 28%, var(--panel-solid)); }

.user-order-groups { display: grid; gap: 14px; }
.user-order-group { overflow: hidden; }
.user-order-group-head { display: flex; align-items: center; justify-content: flex-start; gap: 20px; padding: 16px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.user-order-group-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.user-order-group-head strong { display: block; font-size: 15px; white-space: nowrap; }
.user-order-group-head .subline { margin-top: 0; white-space: nowrap; }
.user-order-group-head .button { flex: 0 0 auto; }
.user-order-group .table-wrap { border-radius: 0; }
.pin-label { display: inline-flex; flex: 0 0 auto; margin-top: 0; padding: 2px 6px; border-radius: 999px; color: var(--blue); background: var(--blue-soft); font-size: 10px; }
.is-pinned { background: #fbfdff; }
.pickup-code { color: var(--blue); letter-spacing: .04em; }
.employee-row { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.employee-create-panel { width: min(100%, calc(100vw - 280px), 1320px); margin-bottom: 16px; min-width: 0; overflow: hidden; }
.employee-create-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(88px, 102px); align-items: end; gap: 12px; width: 100%; min-width: 0; }
.employee-create-form .field { min-width: 0; }
.employee-create-form .form-actions { margin-top: 0; }
.employee-stats-panel { width: min(100%, calc(100vw - 280px), 1320px); min-width: 0; }
.employee-mobile-list { display: none; }
.employee-mobile-card { border: 1px solid var(--line); border-radius: 13px; background: var(--panel-solid); overflow: hidden; }
.employee-mobile-card-head { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 14px; }
.employee-mobile-card-head > div { min-width: 0; display: grid; gap: 3px; }
.employee-mobile-card-head strong, .employee-mobile-card-head span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.employee-mobile-card-head span { color: var(--muted); font-size: 12px; }
.employee-mobile-manage { display: grid; gap: 12px; padding: 0 14px 14px; border-top: 1px solid var(--line); }
.employee-mobile-info { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding-top: 12px; }
.employee-mobile-info span { min-width: 0; display: grid; gap: 3px; padding: 8px 9px; border-radius: 9px; background: var(--blue-soft); }
.employee-mobile-info small, .employee-mobile-permissions > small { color: var(--muted); font-size: 10px; }
.employee-mobile-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.employee-mobile-info strong.profit { color: var(--green); }
.employee-mobile-info strong.loss { color: var(--red); }
.employee-mobile-permissions { display: grid; gap: 7px; }
.employee-mobile-permissions .employee-permission-list { gap: 8px; }
.employee-mobile-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.employee-table-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.employee-table { min-width: 0; width: 100%; table-layout: fixed; font-size: 12px; }
.employee-table th, .employee-table td { padding: 10px 8px; }
.employee-table th:nth-child(1) { width: 11%; }
.employee-table th:nth-child(2) { width: 15%; }
.employee-table th:nth-child(3), .employee-table th:nth-child(4) { width: 7%; }
.employee-table th:nth-child(5) { width: 12%; }
.employee-table th:nth-child(6), .employee-table th:nth-child(7) { width: 10%; }
.employee-table th:nth-child(8) { width: 15%; }
.employee-table th:nth-child(9) { width: 13%; }
.employee-table td { white-space: normal; overflow-wrap: anywhere; }
.employee-self-row td { background: color-mix(in srgb, var(--blue-soft) 45%, var(--panel-solid)); }
.employee-permission-list { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.employee-permission-list label { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 11px; cursor: pointer; }
.employee-permission-list input { width: 15px; height: 15px; accent-color: var(--blue); }
.employee-row-actions { display: flex; align-items: center; gap: 5px; margin-top: 5px; flex-wrap: wrap; }
.employee-status-actions { display: flex; align-items: center; gap: 5px; flex-wrap: nowrap; white-space: nowrap; }
.employee-status-actions .status { padding: 4px 5px; font-size: 10px; }
.employee-status-actions .button { padding: 4px 5px; font-size: 10px; min-width: 0; }
.employee-stat-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 10px; }
.employee-stat-card { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: var(--panel-solid); }
.employee-stat-card > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 10px; }
.employee-stat-card > header > div { display: grid; gap: 2px; min-width: 0; }
.employee-stat-card > header strong, .employee-stat-card > header span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.employee-stat-card > header span { color: var(--muted); font-size: 11px; }
.employee-stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.employee-stat-grid > div { aspect-ratio: 1.65; min-width: 0; padding: 8px; display: flex; flex-direction: column; justify-content: space-between; border-radius: 9px; background: color-mix(in srgb, var(--blue-soft) 62%, var(--panel-solid)); }
.employee-stat-grid small { color: var(--muted); font-size: 10px; }
.employee-stat-grid b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; font-variant-numeric: tabular-nums; }
.account-card-list { display: grid; gap: 14px; }
.account-owner-card { border: 1px solid var(--line); border-radius: 16px; background: #fff; overflow: hidden; box-shadow: var(--small-shadow); }
.account-owner-head { display: grid; grid-template-columns: minmax(150px, .8fr) minmax(0, 1.7fr) auto; align-items: center; gap: 10px; padding: 13px 15px; background: #fafafd; border-bottom: 1px solid var(--line); }
.account-owner-head > div:first-child { display: grid; gap: 4px; }
.account-title-row { display: flex; align-items: center; gap: 8px; }
.account-owner-head strong { font-size: 15px; }
.account-owner-head span { color: var(--muted); font-size: 12px; }
.account-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.owner-total-stats { min-width: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.owner-total-stats span { min-width: 0; padding: 6px 7px; border-radius: 9px; background: var(--blue-soft); }
.owner-total-stats small { display: block; color: var(--muted); font-size: 10px; white-space: nowrap; }
.owner-total-stats b { display: block; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-variant-numeric: tabular-nums; }
.employee-account-list { padding: 12px 16px 16px; display: grid; gap: 10px; }
.owner-self-stats { display: grid; gap: 7px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.account-section-label { color: var(--muted); font-size: 11px; font-weight: 700; }
.employee-section-label { margin-top: 2px; }
.owner-stats { display: grid; gap: 7px; }
.owner-stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.owner-stat { min-width: 0; padding: 9px 10px; border-radius: 10px; background: var(--blue-soft); }
.owner-stat small { display: block; color: var(--muted); font-size: 10px; }
.owner-stat strong { display: block; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.employee-account-card { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: start; gap: 10px; padding: 11px 12px; border: 1px solid #ececf0; border-radius: 12px; background: #fff; }
.account-avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--blue-soft); color: var(--blue); font-weight: 700; }
.account-main { min-width: 0; display: grid; gap: 3px; }
.employee-name-line { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.employee-name-line strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.employee-name-line span { flex: 0 0 auto; color: var(--muted); font-size: 11px; white-space: nowrap; }
.employee-account-stat-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-top: 6px; }
.employee-account-stat { min-width: 0; padding: 6px 7px; border-radius: 8px; background: color-mix(in srgb, var(--blue-soft) 72%, var(--panel-solid)); }
.employee-account-stat small { display: block; color: var(--muted); font-size: 9px; white-space: nowrap; }
.employee-account-stat strong { display: block; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-variant-numeric: tabular-nums; }
.employee-account-stat.profit strong { color: var(--green); }
.employee-account-stat.loss strong { color: var(--red); }
.account-main strong, .account-main span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-main span, .account-status { color: var(--muted); font-size: 11px; }
.account-status { display: grid; justify-items: end; gap: 6px; }
.user-management-section { margin-top: 22px; }
.user-management-heading { align-items: end; }
.user-management-tools { display: flex; align-items: end; justify-content: flex-end; gap: 8px; flex: 0 0 auto; }
.user-sort-control { width: min(260px, 100%); display: grid; gap: 6px; flex: 0 0 auto; }
.user-sort-control > label { color: var(--muted); font-size: 12px; font-weight: 600; }
.user-sort-control .select-field { width: 100%; }
.user-management-section .section-heading { margin: 0 0 10px; }
.user-management-section .section-heading h3 { margin: 0; font-size: 16px; }
.user-management-section .section-heading .muted { display: block; margin-top: 3px; font-size: 12px; }
.user-management-table-panel { overflow: hidden; }
.user-management-table-wrap { overflow-x: auto; }
.user-management-table { width: 100%; min-width: 1060px; table-layout: fixed; }
.user-owner-table { min-width: 900px; }
.user-management-table th, .user-management-table td { padding: 11px 12px; }
.user-management-table th { white-space: nowrap; }
.user-management-table td { white-space: normal; }
.user-owner-table th:nth-child(1) { width: 17%; }
.user-owner-table th:nth-child(2), .user-owner-table th:nth-child(3) { width: 8%; }
.user-owner-table th:nth-child(4), .user-owner-table th:nth-child(5) { width: 9%; }
.user-owner-table th:nth-child(6) { width: 36%; }
.user-owner-table th:nth-child(7) { width: 13%; }
.user-employee-table { min-width: 1180px; }
.user-employee-table th:nth-child(1) { width: 14%; }
.user-employee-table th:nth-child(2) { width: 15%; }
.user-employee-table th:nth-child(3), .user-employee-table th:nth-child(4) { width: 8%; }
.user-employee-table th:nth-child(5), .user-employee-table th:nth-child(6), .user-employee-table th:nth-child(7) { width: 10%; }
.user-employee-table th:nth-child(8) { width: 17%; }
.user-employee-table th:nth-child(9) { width: 18%; }
.user-table-identity, .user-account-cell { min-width: 0; display: grid; gap: 3px; }
.user-table-identity > strong, .user-account-cell > strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-table-identity .status { justify-self: start; padding: 4px 8px; font-size: 11px; }
.user-account-cell > span { color: var(--muted); font-size: 11px; }
.user-table-number { font-variant-numeric: tabular-nums; font-weight: 650; }
.user-metric-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; min-width: 0; }
.user-metric { min-width: 0; display: grid; gap: 2px; padding: 6px 7px; border-radius: 8px; background: color-mix(in srgb, var(--blue-soft) 70%, var(--panel-solid)); }
.user-metric small { color: var(--muted); font-size: 10px; white-space: nowrap; }
.user-metric b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-variant-numeric: tabular-nums; }
.user-metric.profit b, .user-management-table .profit { color: var(--green); }
.user-metric.loss b, .user-management-table .loss { color: var(--red); }
.user-table-actions { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.user-table-actions .button { min-width: 0; padding: 5px 8px; font-size: 11px; }
.user-permission-list { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 7px; min-width: 140px; }
.user-permission-list span { color: var(--muted); font-size: 11px; white-space: nowrap; }
.user-permission-list span::before { content: "×"; margin-right: 3px; color: var(--line-strong); }
.user-permission-list span.is-enabled { color: var(--green); }
.user-permission-list span.is-enabled::before { content: "✓"; color: var(--green); }
.user-management-table tbody tr:hover td { background: color-mix(in srgb, var(--blue-soft) 38%, var(--panel-solid)); }
.communication-cell { display: flex; align-items: center; gap: 8px; position: relative; }
.admin-order-table .communication-cell { justify-content: flex-end; }
.chat-text-button { min-width: 52px; padding-left: 10px; padding-right: 10px; }
.unread-dot { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--red); color: #fff; font-size: 10px; display: inline-grid; place-items: center; }
.mobile-order-statuses { display: none; }
.order-status-inline { display: flex; align-items: center; gap: 7px; min-width: 0; flex-wrap: wrap; }
.order-status-inline .status { width: max-content; min-width: 0; flex: 0 0 auto; overflow: visible; text-overflow: clip; padding: 7px 10px; font-size: 14px; }
.order-money-cell { display: table-cell; min-width: 0; overflow: hidden; white-space: nowrap; }
.order-money-item { display: inline-flex; flex: 0 1 auto; flex-direction: row; align-items: baseline; gap: 3px; min-width: 0; overflow: hidden; white-space: nowrap; }
.order-money-item + .order-money-item { margin-left: 7px; }
.order-money-item small, .order-money-item strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-money-item small { color: var(--muted); font-size: 11px; font-weight: 500; }
.order-money-item strong { font-weight: 650; }

.pickup-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }
.pickup-column { min-width: 0; overflow: hidden; }
.pickup-column-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.pickup-column-head h3 { margin: 0; font-size: 16px; }
.pickup-column-head span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.pickup-column.is-collapsed .pickup-column-head { border-bottom: 0; }
.pickup-column-head-actions { min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.pickup-column-head-actions > .status { flex: 0 0 auto; white-space: nowrap; }
.pickup-column-toggle { flex: 0 0 auto; min-width: 58px; }
.pickup-item-list { display: grid; gap: 10px; padding: 12px; }
.pickup-item { padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-solid); box-shadow: var(--small-shadow); }
.pickup-item-head, .pickup-item-order, .pickup-item-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pickup-item-head { align-items: flex-start; margin-bottom: 9px; }
.pickup-item-identity { min-width: 0; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.pickup-item-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pickup-logistics { min-width: 0; display: inline-flex; align-items: center; gap: 7px; padding: 5px 9px; border-radius: 9px; background: var(--blue-soft); color: var(--muted); font-size: 11px; }
.pickup-logistics b { color: var(--text); font-variant-numeric: tabular-nums; }
.pickup-code-block { display: grid; justify-items: end; gap: 2px; min-width: 100px; }
.pickup-code-line { display: inline-flex; align-items: center; gap: 6px; }
.pickup-code-label { color: var(--muted); font-size: 11px; }
.pickup-code-line .status { padding: 4px 8px; font-size: 11px; }
.pickup-item-order { margin: 9px 0; color: var(--muted); font-size: 12px; }
.pickup-item-actions { justify-content: flex-start; flex-wrap: wrap; }
.pickup-item-actions small { margin-left: auto; color: var(--muted); font-size: 11px; }

.chat-management-workspace { display: grid; grid-template-columns: minmax(260px, 320px) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); height: min(900px, calc(100vh - 158px)); min-height: 0; overflow: hidden; }
.chat-thread-sidebar { min-width: 0; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: #fbfbfc; }
.chat-sidebar-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 15px 16px; border-bottom: 1px solid var(--line); background: #fff; }
.chat-sidebar-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.chat-sidebar-head span { color: var(--muted); font-size: 11px; }
.chat-sidebar-title .status { flex: 0 0 auto; padding: 4px 8px; font-size: 11px; }
.chat-sidebar-title .status.status-orange { color: var(--orange); }
.chat-sidebar-title .status.status-green { color: var(--green); }
.chat-font-control { display: flex; align-items: center; gap: 6px; }
.chat-reference-control { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.72); }
.chat-reference-control > span { color: var(--muted); font-size: 11px; white-space: nowrap; }
.chat-reference-control .select-field { min-width: 190px; }
.chat-reference { width: fit-content; max-width: min(90%, 420px); margin: 0 0 7px; padding: 5px 9px; border-radius: 8px; color: var(--blue); background: var(--blue-soft); font-size: 12px; }
.chat-font-control > span { color: var(--muted); font-size: 12px; }
.chat-font-control .button { min-width: 42px; min-height: 38px; padding: 0 11px; font-size: 14px; border-radius: 11px; }
.chat-management-main { min-width: 0; min-height: 0; height: auto; overflow: hidden; display: flex; flex-direction: column; background: #f7f7f9; }
.chat-management-chat { border: 0; border-radius: 0; height: auto; min-height: 0; flex: 1 1 auto; display: flex; flex-direction: column; overflow: hidden; background: #f7f7f9; }
.chat-management-head { flex: 0 0 auto; display: flex; align-items: center; justify-content: flex-start; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: #fff; }
.chat-management-order-meta { min-width: 0; display: grid; gap: 3px; }
.chat-management-order-meta strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-management-order-meta span { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-management-head-actions { display: flex; align-items: center; justify-content: flex-start; gap: 12px; flex: 1 1 auto; min-width: 0; }
.chat-management-prices { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 11px; }
.chat-management-prices span { display: grid; gap: 2px; white-space: nowrap; }
.chat-management-prices b { color: var(--text); font-size: 13px; }
.chat-quick-media { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.chat-quick-media-button { min-width: 64px; padding: 0 9px; }
.chat-management-head-actions .chat-font-control { margin-left: auto; }
.chat-management-empty { height: 100%; min-height: 0; display: grid; place-content: center; justify-items: center; gap: 6px; color: var(--muted); }
.chat-management-empty strong { color: var(--text); }
.chat-management-list { flex: 1 1 auto; overflow-y: auto; min-height: 0; }
.chat-management-chat > .chat-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.chat-management-chat > .chat-compose { flex: 0 0 auto; }
.chat-thread-row { width: 100%; border: 0; border-bottom: 1px solid #f0f0f2; background: #fff; padding: 16px 18px; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 12px; text-align: left; color: var(--text); }
.chat-thread-row:last-child { border-bottom: 0; }
.chat-thread-row:hover, .chat-thread-row.has-unread, .chat-thread-row.active { background: #eef6ff; }
.thread-avatar { width: 38px; height: 38px; border-radius: 50%; background: #edf0f4; display: grid; place-items: center; font-weight: 700; color: #555; }
.thread-main { display: grid; min-width: 0; gap: 3px; }
.thread-main strong, .thread-main span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-main span { color: var(--muted); font-size: 12px; }
.thread-side { display: grid; justify-items: end; gap: 3px; }
.thread-side b { min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--red); color: #fff; display: grid; place-items: center; font-size: 10px; }
.thread-side small { color: var(--muted); font-size: 11px; }

.media-modal { position: relative; width: fit-content; max-width: calc(100vw - 32px); max-height: calc(100vh - 32px); overflow: hidden; background: var(--panel-solid); }
.media-preview { max-width: calc(100vw - 32px); max-height: calc(100vh - 104px); padding: 18px; display: grid; place-items: center; background: var(--panel-solid); }
.media-preview img { display: block; width: auto; height: auto; max-width: calc(100vw - 68px); max-height: calc(100vh - 140px); object-fit: contain; }
.media-preview video { display: block; width: min(720px, calc(100vw - 68px)); height: min(70vh, calc(100vh - 140px)); max-width: calc(100vw - 68px); max-height: calc(100vh - 140px); object-fit: contain; background: #111; }
.media-close-button { position: absolute; top: 12px; right: 12px; z-index: 2; }
.media-actions { display: flex; justify-content: center; padding: 10px 16px 14px; border-top: 1px solid var(--line); }
.delete-confirm-modal { width: min(460px, 100%); }
.delete-confirm-modal .modal-body { padding-top: 16px; }
.delete-confirm-modal .form-actions { margin-top: 16px; }

.toast { position: fixed; z-index: 40; right: 24px; bottom: 24px; max-width: min(380px, calc(100vw - 48px)); padding: 13px 16px; border-radius: 14px; background: rgba(29,29,31,.94); color: #fff; box-shadow: var(--shadow); }
.toast.error { background: rgba(201,52,52,.95); }
.ocr-flash { position: fixed; z-index: 80; top: max(18px, calc(env(safe-area-inset-top) + 14px)); left: 50%; width: max-content; max-width: calc(100vw - 32px); min-height: 42px; padding: 11px 16px; border-radius: 8px; background: rgba(29,29,31,.94); color: #fff; box-shadow: var(--shadow); transform: translateX(-50%); display: grid; place-items: center; font-size: 14px; text-align: center; pointer-events: none; animation: ocr-flash-in .14s ease-out; }
.ocr-flash.warning { background: rgba(178,103,0,.96); }
.ocr-flash.error { background: rgba(201,52,52,.96); }
@keyframes ocr-flash-in { from { opacity: 0; transform: translate(-50%, -6px); } to { opacity: 1; transform: translate(-50%, 0); } }
.mobile-menu { display: none; }

.audit-log-heading { align-items: center; }
.audit-log-filter-form { margin-bottom: 16px; }
.audit-log-filter-actions { align-self: end; }
.audit-log-table-panel { overflow: hidden; }
.audit-log-meta { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; color: var(--muted); font-size: 12px; }
.audit-log-table { min-width: 980px; }
.audit-log-table th, .audit-log-table td { vertical-align: top; }
.audit-log-table td > small, .audit-log-table td > strong, .audit-actor small, .audit-device, .audit-user-agent { display: block; }
.audit-log-table td > small, .audit-actor small, .audit-user-agent { margin-top: 3px; color: var(--muted); font-size: 11px; }
.audit-user-agent { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audit-detail { max-width: 300px; min-width: 220px; white-space: normal; overflow-wrap: anywhere; }
.audit-log-pagination { display: flex; align-items: center; justify-content: center; gap: 14px; padding-top: 14px; }

.theme-panel { margin-bottom: 16px; }
.theme-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.theme-card { min-width: 0; min-height: 82px; padding: 10px; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 9px; text-align: left; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-solid); color: var(--text); transition: .18s ease; }
.theme-card:hover, .theme-card.selected { border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 14%, transparent); transform: translateY(-1px); }
.theme-card strong, .theme-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.theme-card strong { font-size: 12px; }
.theme-card small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.theme-card i { color: var(--blue); font-size: 16px; font-style: normal; }
.theme-swatch { width: 28px; height: 28px; border-radius: 9px; border: 1px solid rgba(0,0,0,.08); }
.theme-swatch-light { background: linear-gradient(135deg, #fff, #e9edf3); }
.theme-swatch-dark { background: linear-gradient(135deg, #15161a, #555761); }
.theme-swatch-pink { background: linear-gradient(135deg, #ffd7e5, #d34f82); }
.theme-swatch-blue-gradient { background: linear-gradient(135deg, #bce0ff, #9b8cff); }
.theme-swatch-green-gradient { background: linear-gradient(135deg, #b9f2d5, #75b99b); }

:root[data-theme="dark"] .login-page { background: radial-gradient(circle at 50% 10%, #2b2c32 0, #17181c 58%); }
:root[data-theme="dark"] .sidebar,
:root[data-theme="dark"] .topbar,
:root[data-theme="dark"] .user-chip,
:root[data-theme="dark"] .panel,
:root[data-theme="dark"] .stat-card,
:root[data-theme="dark"] .modal,
:root[data-theme="dark"] .modal-head,
:root[data-theme="dark"] .chat-head,
:root[data-theme="dark"] .chat-compose,
:root[data-theme="dark"] .media-card,
:root[data-theme="dark"] .settlement-profile,
:root[data-theme="dark"] .field input,
:root[data-theme="dark"] .field textarea,
:root[data-theme="dark"] .select-trigger,
:root[data-theme="dark"] .select-menu,
:root[data-theme="dark"] .theme-card { background-color: var(--panel-solid); color: var(--text); }
:root[data-theme="dark"] th { background: #2a2b31; }
:root[data-theme="dark"] td { border-bottom-color: var(--line); }
:root[data-theme="dark"] tbody tr:hover { background: #2b2c32; }
:root[data-theme="dark"] .button.secondary,
:root[data-theme="dark"] .icon-button,
:root[data-theme="dark"] .close-button { background: #34353c; color: var(--text); }
:root[data-theme="dark"] .button.secondary:hover,
:root[data-theme="dark"] .icon-button:hover,
:root[data-theme="dark"] .close-button:hover { background: #44454d; }
:root[data-theme="dark"] .nav-button { color: #c2c3ca; }
:root[data-theme="dark"] .nav-button:hover { background: #2e2f36; color: var(--text); }
:root[data-theme="dark"] .nav-button.active { background: #f4f4f5; color: #17181c; }
:root[data-theme="dark"] .chat-message .bubble { background: #2f3037; }
:root[data-theme="dark"] .inline-note,
:root[data-theme="dark"] .amount-grid > div,
:root[data-theme="dark"] .order-summary-card { background: #2e2f36; }
:root[data-theme="dark"] .media-card img,
:root[data-theme="dark"] .media-card video { background: transparent; }
:root[data-theme="dark"] .settlement-profile .media-card { background: #fff; }

@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .settlement-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .split-grid, .detail-grid { grid-template-columns: 1fr; }
  .chat-panel { position: static; min-height: 0; }
}
@media (max-width: 780px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; inset: auto 14px 14px; z-index: 10; width: auto; height: auto; max-height: none; overflow: visible; border: 1px solid var(--line); border-radius: 18px; padding: 8px; display: flex; flex-direction: row; gap: 0; box-shadow: var(--shadow); }
  .sidebar-brand, .sidebar-footer { display: none; }
  .sidebar-settings-button { display: none; }
  .nav-list { display: flex; width: 100%; overflow-x: auto; }
  .nav-button { flex: 1 0 auto; justify-content: center; padding: 10px 12px; }
  .nav-button span:last-child { display: none; }
  .topbar { padding: 14px 18px; }
  .topbar-quote { position: static; order: 3; flex: 1 0 100%; max-width: none; transform: none; font-size: 11px; }
  .topbar h1 { font-size: 19px; }
  .topbar p { display: none; }
  .content { padding: 22px 16px 110px; }
  .selected-device-row { grid-template-columns: 24px minmax(0, 1fr) auto; }
  .selected-device-quantity { grid-column: 2; }
  .selected-device-subtotal { grid-column: 3; grid-row: 1 / span 2; }
  .selected-device-row > .button { grid-column: 1 / span 2; justify-self: start; }
  .chat-reference-control { align-items: flex-start; flex-direction: column; }
  .chat-reference-control .select-field { width: 100%; min-width: 0; }
  .form-grid, .form-grid.three, .upload-grid { grid-template-columns: 1fr; }
  .settings-password-panel .form-grid { grid-template-columns: 1fr; }
  .settings-password-panel form { display: grid; width: 100%; max-width: none; }
  .settings-password-panel form .form-actions { margin-top: 0; }
  .employee-create-panel, .employee-stats-panel { width: 100%; }
  .employee-create-form { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: end; }
  .employee-create-form .form-actions { margin-top: 0; align-items: stretch; }
  .employee-create-form .form-actions .button { width: 100%; min-height: 40px; padding-left: 8px; padding-right: 8px; }
  .user-create-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .user-create-form .form-actions { grid-column: 1 / -1; justify-content: stretch; }
  .batch-user-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .batch-user-form .form-actions { justify-content: stretch; }
  .batch-user-form .form-actions .button { width: 100%; }
  .batch-user-modal .modal-body { padding: 16px; }
  .batch-user-modal .batch-user-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-name-panel, .profile-name-panel form { display: grid; width: 100%; max-width: none; }
  .profile-name-panel form .field { max-width: none; }
  .profile-name-panel .field-help { padding-bottom: 0; }
  .submit-order-fields > .field { grid-column: 1 !important; grid-row: auto !important; }
  .submit-order-fields .submit-order-note { max-width: none; }
  .field.full { grid-column: auto; }
  .stats-grid { gap: 10px; }
  .stat-card { padding: 15px; }
  .stat-card .stat-value { font-size: 24px; }
  .user-chip { padding-right: 7px; }
  .user-chip > div { display: none; }
  .modal-backdrop { padding: 10px; }
  .order-trash-panel { border: 0; background: transparent; box-shadow: none; overflow: visible; }
  .order-trash-table-wrap { overflow: visible; }
  .order-trash-table { display: block; min-width: 0; }
  .order-trash-table thead { display: none; }
  .order-trash-table tbody { display: grid; gap: 10px; }
  .order-trash-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 12px; padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: var(--panel-solid); box-shadow: var(--small-shadow); }
  .order-trash-table td { display: block; min-width: 0 !important; padding: 0; border: 0; white-space: normal; }
  .order-trash-table td:first-child, .order-trash-table td:last-child { grid-column: 1 / -1; }
  .profile-order-trash-table { min-width: 0; }
  .trash-actions .button { flex: 1 1 0; }
  .trash-detail-modal { width: 100vw; height: 100dvh; max-height: none; border-radius: 0; }
  .trash-detail-modal .modal-head { position: sticky; top: 0; }
  .trash-detail-body { padding: 14px; }
  .trash-detail-grid { grid-template-columns: minmax(0, 1fr); gap: 11px; }
  .trash-detail-wide { grid-column: auto; }
  .trash-detail-grid .meta-list { grid-template-columns: minmax(0, 1fr); }
  .trash-detail-list > div { grid-template-columns: 24px minmax(0, 1fr); }
  .trash-detail-list > div em, .trash-detail-list > div b { grid-column: 2; }
  .trash-amount-grid { grid-template-columns: minmax(0, 1fr); }
  .trash-chat-list { max-height: none; }
  .delete-order-check > div { grid-template-columns: 86px minmax(0, 1fr); }
  .modal { border-radius: 20px; max-height: 94vh; }
  .order-workspace { height: 94vh; }
  .order-modal-head { flex-wrap: wrap; }
  .order-head-summary { width: 100%; order: 3; grid-template-columns: minmax(0, 1.25fr) repeat(2, minmax(0, 1fr)); gap: 6px; }
  .order-head-summary .order-device-card { grid-column: 1 / -1; }
  .order-head-summary.price-count-0 { grid-template-columns: minmax(0, 1fr); }
  .order-head-summary.price-count-1 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-head-summary.price-count-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-head-summary.price-count-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .order-head-summary:not(.has-prices) { grid-template-columns: minmax(0, 1fr); }
  .order-summary-card { padding: 8px 7px; border-radius: 10px; }
  .order-summary-card span { font-size: 9px; }
  .order-summary-card strong { font-size: 12px; }
  .order-summary-card small { font-size: 10px; }
  .order-price-card strong { font-size: 13px; }
  .modal-body { padding: 16px; }
  .modal.compact.settlement-modal { width: calc(100vw - 20px); max-height: calc(100vh - 20px); }
  .settlement-profile .media-grid { grid-template-columns: 1fr; }
  .settlement-profile .media-card { height: 220px; }
  .amount-grid { grid-template-columns: 1fr; }
  .order-status-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .quote-admin-toolbar { grid-template-columns: 1fr; }
  .quote-inline-import { grid-template-columns: 1fr; }
  .quote-table-wrap { min-height: 380px; max-height: calc(100vh - 300px); }
  .theme-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settlement-amount-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mobile-app-shell .settlement-modal { width: 100vw; height: 100dvh; max-height: none; border-radius: 0; }
  .mobile-app-shell .settlement-modal .modal-body { padding: 14px; }
  .mobile-app-shell .settlement-modal .modal-body { display: flex; flex-direction: column; }
  .mobile-app-shell .settlement-modal .settlement-order-list { order: 1; }
  .mobile-app-shell .settlement-modal .settlement-total { order: 2; }
  .mobile-app-shell .settlement-modal .settlement-profile,
  .mobile-app-shell .settlement-modal .settlement-profile-missing { order: 3; }
  .mobile-app-shell .settlement-modal-footer { padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); }
  .mobile-app-shell .settlement-modal-footer .button { flex: 1 1 0; min-height: 44px; }
  .mobile-app-shell .order-info-column .media-card { min-height: 190px; }
  .mobile-app-shell .order-info-column .media-card img, .mobile-app-shell .order-info-column .media-card video { height: 190px; max-height: 190px; }
  .admin-settlement-action { align-items: flex-start; flex-direction: column; }
  .mobile-app-shell .admin-settlement-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-order-bottom { grid-template-columns: 1fr; }
  .admin-order-actions { justify-content: flex-start; }
  .media-upload-form { align-items: stretch; }
  .file-picker-button { width: 100%; justify-content: center; }
  .form-grid.three.admin-processing-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-processing-fields > .field:first-child { grid-column: 1 / -1; }
  .admin-media-heading { gap: 7px; }
  .mobile-app-shell .inline-media-upload { align-items: center; flex: 0 0 auto; }
  .mobile-app-shell .inline-media-upload .file-picker-button { width: auto; }
  .mobile-app-shell .inline-media-upload .media-upload-status { display: none; }
  .order-detail-footer { bottom: 0; }
  .mobile-app-shell .order-table tbody tr.clickable td.admin-order-user-cell { display: none; }
  .mobile-app-shell .order-table tbody tr.clickable td:nth-child(2) .order-identity { display: flex; align-items: center; flex-wrap: nowrap; gap: 5px; min-width: 0; }
  .mobile-app-shell .order-table tbody tr.clickable td:nth-child(2) .mobile-order-user { display: flex; align-items: center; min-width: 0; margin-left: auto; gap: 4px; text-align: right; overflow: hidden; }
  .mobile-app-shell .order-table tbody tr.clickable td:nth-child(2) .mobile-order-user strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-app-shell .order-table tbody tr.clickable td:nth-child(2) .mobile-order-user strong { font-size: 12px; }
  .mobile-app-shell .order-table tbody tr.admin-order-row td:nth-child(6),
  .mobile-app-shell .order-table tbody tr.admin-order-row td:nth-child(7) { display: none; }
  .mobile-app-shell .order-table tbody tr.admin-order-row td:nth-child(5) { grid-column: 1 / -1; }
  .mobile-app-shell .order-table tbody tr.admin-order-row .mobile-order-statuses { display: flex; align-items: center; gap: 4px; min-width: 0; margin-top: 7px; overflow: hidden; }
  .mobile-app-shell .order-table tbody tr.admin-order-row .mobile-order-statuses .status { width: max-content; min-width: 0; flex: 0 0 auto; justify-content: center; overflow: visible; text-overflow: clip; white-space: nowrap; padding: 5px 8px; font-size: 12px; }
  .mobile-app-shell .user-create-form { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: end; }
  .mobile-app-shell .user-create-form .form-actions { margin-top: 0; align-items: stretch; }
  .mobile-app-shell .user-create-form .form-actions .button { width: 100%; min-height: 40px; padding-left: 8px; padding-right: 8px; }
  .mobile-app-shell .batch-user-form { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .mobile-app-shell .batch-user-form .form-actions { margin-top: 0; align-items: stretch; }
  .mobile-app-shell .batch-user-form .form-actions .button { width: 100%; min-height: 40px; }
  .account-owner-head { grid-template-columns: 1fr; align-items: flex-start; }
  .owner-total-stats { width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .user-order-group-head { align-items: flex-start; gap: 9px 14px; }
  .user-order-group-title { flex-wrap: wrap; gap: 4px 10px; }
  .employee-account-card { grid-template-columns: 30px minmax(0, 1fr); }
  .employee-account-card .account-status { grid-column: 2; justify-items: start; }
  .employee-account-card .account-actions { justify-content: flex-start; }
  .employee-name-line { flex-wrap: wrap; gap: 2px 7px; }
  .employee-account-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .owner-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pickup-columns { grid-template-columns: 1fr; }
  .pickup-column-head { padding: 14px 15px; }
  .pickup-column-head-actions { gap: 6px; }
  .pickup-column-toggle { min-width: 52px; padding-left: 8px; padding-right: 8px; }
  .pickup-item-list { padding: 10px; }
  .settlement-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .settlement-summary-card { padding: 12px; }
  .settlement-summary-card strong { font-size: 18px; }
  .pickup-item-head { align-items: flex-start; flex-direction: column; }
  .pickup-code-block { justify-items: start; }
  .chat-management-workspace { grid-template-columns: 1fr; height: auto; min-height: 0; }
  .chat-thread-sidebar { max-height: 260px; border-right: 0; border-bottom: 1px solid var(--line); }
  .chat-management-chat { height: auto; min-height: 560px; }
  .chat-management-workspace { display: block; overflow: visible; }
  .chat-management-main { display: none; }
  .chat-thread-sidebar { max-height: none; border-bottom: 0; }
  .chat-management-list { overflow: visible; }
  .chat-thread-row { padding: 13px 16px; grid-template-columns: 38px minmax(0, 1fr) auto; }
  .chat-management-empty { min-height: 560px; }
  .chat-management-head { align-items: flex-start; flex-direction: column; }
  .chat-management-head-actions { width: 100%; justify-content: space-between; flex-wrap: wrap; }
  .chat-management-head-actions .chat-font-control { margin-left: 0; }
  .chat-management-prices { flex-wrap: wrap; }
}

.mobile-bottom-nav,
.mobile-more-backdrop { display: none; }

@media (min-width: 781px) {
  .order-info-column .media-card img,
  .order-info-column .media-card video { height: 220px; }
  .order-info-column .media-play { top: 110px; }
}

@media (max-width: 780px) {
  html, body { width: 100%; min-width: 0; max-width: 100%; overflow-x: hidden; }
  .mobile-app-shell, .mobile-app-shell .main-column, .mobile-app-shell .content { width: 100%; min-width: 0; max-width: 100%; }
  .mobile-app-shell { min-height: 100dvh; }
  .mobile-topbar { min-height: 62px; padding: 10px 14px; flex-wrap: wrap; }
  .mobile-topbar > div { min-width: 0; }
  .mobile-topbar .topbar-actions { gap: 4px; }
  .mobile-topbar .button.ghost.small { padding: 0 7px; }
  .mobile-topbar .user-chip { border: 0; background: transparent; padding: 4px; }
  .mobile-topbar .avatar { width: 30px; height: 30px; }
  .mobile-app-shell .content { padding: 18px 14px 104px; }
  .mobile-app-shell .content > .section-heading:first-child { margin-top: 0 !important; }
  .mobile-bottom-nav { position: fixed; inset: auto 10px 10px; z-index: 12; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; padding: 7px; border: 1px solid var(--line); border-radius: 19px; background: rgba(255,255,255,.92); box-shadow: var(--shadow); backdrop-filter: blur(20px); }
  .mobile-bottom-nav.nav-count-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .mobile-bottom-nav .mobile-nav-button { position: relative; min-width: 0; min-height: 55px; border: 0; border-radius: 13px; background: transparent; color: var(--muted); display: grid; place-items: center; align-content: center; gap: 3px; font-size: 10px; font-weight: 600; }
  .mobile-bottom-nav .mobile-nav-button.active { color: var(--blue); background: var(--blue-soft); }
  .mobile-nav-icon { min-height: 21px; font-size: 20px; line-height: 1; }
  .mobile-bottom-nav .nav-badge { position: absolute; top: 4px; right: calc(50% - 18px); margin: 0; }
  .mobile-more-backdrop { position: fixed; inset: 0; z-index: 11; display: flex; align-items: flex-end; background: rgba(20,20,24,.22); backdrop-filter: blur(3px); }
  .mobile-more-sheet { width: 100%; padding: 16px 16px calc(94px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; background: var(--panel-solid); box-shadow: 0 -16px 60px rgba(0,0,0,.16); animation: mobile-sheet-in .18s ease-out; }
  .mobile-more-sheet > header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
  .mobile-more-sheet > header strong { font-size: 18px; }
  .mobile-more-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
  .mobile-more-item { min-height: 78px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); color: var(--text); display: grid; place-items: center; align-content: center; gap: 8px; font-size: 12px; }
  .mobile-more-item:active, .mobile-more-item:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); }
  .mobile-more-icon { font-size: 23px; line-height: 1; }
  @keyframes mobile-sheet-in { from { transform: translateY(18px); opacity: .6; } to { transform: translateY(0); opacity: 1; } }
  .mobile-app-shell .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mobile-app-shell .stat-card { min-height: 110px; padding: 14px; border-radius: 15px; }
  .mobile-app-shell .stat-card .stat-value { font-size: 23px; }
  .mobile-app-shell .panel { border-radius: 16px; }
  .mobile-app-shell .order-page-list .user-order-group { border: 0; box-shadow: none; background: transparent; }
  .mobile-app-shell .user-order-group-head { padding: 12px 0; border: 0; }
  .mobile-app-shell .order-table-wrap { overflow: visible; }
  .mobile-app-shell .order-table { min-width: 0; display: block; }
  .mobile-app-shell .order-table thead { display: none; }
  .mobile-app-shell .order-table tbody, .mobile-app-shell .order-table tr { display: grid; }
  .mobile-app-shell .order-table th, .mobile-app-shell .order-table td { width: auto !important; }
  .mobile-app-shell .order-table tbody { gap: 10px; }
  .mobile-app-shell .order-table tbody tr.clickable { grid-template-columns: 1fr auto; gap: 6px 12px; padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: var(--panel-solid); box-shadow: var(--small-shadow); }
  .mobile-app-shell .order-table tbody tr.clickable td { display: block; min-width: 0; padding: 0; border: 0; white-space: normal; background: transparent; }
  .mobile-app-shell .order-table tbody tr.clickable td:first-child { display: none; }
  .mobile-app-shell .order-table tbody tr.clickable td:nth-child(2) { grid-column: 1; }
  .mobile-app-shell .order-table tbody tr.clickable td:nth-child(3) { grid-column: 1 / -1; }
  .mobile-app-shell .order-table tbody tr.clickable td:nth-child(4) { grid-column: 1; }
  .mobile-app-shell .order-table tbody tr.clickable td:nth-last-child(1) { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
  .mobile-app-shell .order-table tbody tr.clickable td:nth-last-child(2) { grid-column: 1; }
  .mobile-app-shell .order-table .communication-cell { justify-content: flex-start; }
  .mobile-app-shell .order-table .money { font-size: 13px; }
  .mobile-app-shell .order-table .communication-cell { justify-content: flex-end; gap: 5px; }
  .mobile-app-shell .order-table .communication-cell > .status { padding: 4px 6px; font-size: 10px; }
  .mobile-app-shell .order-table .chat-text-button { min-width: 50px; min-height: 32px; padding: 0 9px; font-size: 11px; }
  .mobile-app-shell .order-table .order-status-inline { display: flex; align-items: center; gap: 5px; min-width: 0; overflow: visible; flex-wrap: wrap; }
  .mobile-app-shell .order-table .order-status-inline .status { width: max-content; min-width: 0; flex: 0 0 auto; justify-content: center; overflow: visible; text-overflow: clip; white-space: nowrap; padding: 5px 8px; font-size: 12px; }
  .mobile-app-shell .order-table tbody tr.clickable td.order-money-cell { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .mobile-app-shell .admin-order-table tbody tr.clickable td:nth-child(7) { padding-left: 0; }
  .mobile-app-shell .order-table .order-money-item { flex: 0 0 auto; }
  .mobile-app-shell .order-table .order-money-item small { font-size: 10px; }
  .mobile-app-shell .order-table .order-money-item strong { font-size: 13px; }
  .mobile-app-shell .toolbar { padding: 12px; display: grid; grid-template-columns: 1fr; }
  .mobile-app-shell .toolbar[data-form="order-filter"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mobile-app-shell .toolbar[data-form="order-filter"] > .field:first-child,
  .mobile-app-shell .toolbar[data-form="order-filter"] > .order-filter-actions { grid-column: 1 / -1; }
  .mobile-app-shell .toolbar .field { min-width: 0; }
  .mobile-app-shell .order-filter-actions { order: 0; display: flex; align-items: stretch; }
  .mobile-app-shell .order-filter-actions .button { flex: 1; }
  .mobile-app-shell .quote-table-desktop { display: none; }
  .mobile-app-shell .quote-mobile-list { display: block; max-height: 380px; overflow-y: auto; margin-top: 8px; border: 1px solid var(--line); border-radius: 14px; }
  .mobile-app-shell .quote-mobile-card { min-height: 112px; }
  .mobile-app-shell .quote-picker-entry { align-items: stretch; flex-direction: column; }
  .mobile-app-shell .quote-picker-open-button { width: 100%; }
  .mobile-app-shell .quote-picker-modal { width: 100vw; height: 100dvh; max-height: none; border-radius: 0; }
  .mobile-app-shell .quote-picker-modal .modal-head { position: sticky; top: 0; z-index: 1; }
  .mobile-app-shell .quote-picker-modal .modal-body { padding: 14px; }
  .mobile-app-shell .quote-picker-modal .quote-mobile-list { max-height: none; }
  .mobile-app-shell .quote-picker-footer { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .mobile-app-shell .scanner-result-modal, .scanner-result-modal { width: 100vw; max-height: 100dvh; border-radius: 0; }
  .scanner-result-backdrop { padding: 0; }
  .mobile-app-shell .submit-order-actions { position: sticky; bottom: calc(90px + env(safe-area-inset-bottom)); z-index: 6; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 14px -22px -22px; padding: 10px 22px calc(10px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--panel-solid) 94%, transparent); border-top: 1px solid var(--line); backdrop-filter: blur(14px); }
  .mobile-app-shell .submit-order-actions .submit-upload-status { grid-column: 1 / -1; }
  .mobile-app-shell .submit-order-actions .ocr-status { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .mobile-app-shell .submit-order-actions .button.ocr-retry-button { width: auto; min-width: 88px; min-height: 34px; padding: 0 10px; justify-self: end; }
  .mobile-app-shell .submit-upload-control { width: 100%; min-width: 0; }
  .mobile-app-shell .submit-order-actions .button { width: 100%; min-width: 0; min-height: 44px; padding-left: 6px; padding-right: 6px; font-size: 12px; }
  .mobile-app-shell [data-submit-section] { scroll-margin-top: 82px; }
  .mobile-app-shell .employee-table-head .muted { display: none; }
  .mobile-app-shell .employee-table-desktop { display: none; }
  .mobile-app-shell .employee-mobile-list { display: grid; gap: 10px; }
  .mobile-app-shell .modal-backdrop { padding: 0; }
  .order-workspace-backdrop { padding: 0; overflow: hidden; }
  .modal.order-workspace { width: 100%; height: 100dvh; max-height: none; border-radius: 0; }
  .order-workspace, .order-workspace > .modal-body, .order-workspace .detail-grid, .order-workspace .order-info-column, .order-workspace .order-chat-column { min-width: 0; max-width: 100%; }
  .order-workspace > .modal-body { padding: 12px; overflow-x: hidden; overflow-y: auto; overscroll-behavior-x: none; touch-action: pan-y; }
  .order-workspace .detail-grid { display: flex; flex-direction: column; }
  .order-workspace .order-chat-column { order: 3; }
  .order-workspace .detail-grid { display: flex; flex-direction: column; height: auto; }
  .order-workspace .order-info-column { overflow: visible; }
  .order-info-column .media-grid { width: 100%; min-width: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; overflow: hidden; }
  .order-info-column .media-card { width: 100%; min-width: 0; max-width: 100%; min-height: 0; margin: 0; justify-self: stretch; }
  .order-info-column .media-card img, .order-info-column .media-card video { display: block; width: 100%; min-width: 0; max-width: 100%; height: 142px; max-height: 142px; object-fit: contain; }
  .user-upload-media-block { min-width: 0; max-width: 100%; overflow: hidden; }
  .user-upload-media-block .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .user-upload-media-block .media-card { aspect-ratio: 1 / 1; }
  .user-upload-media-block .media-card img, .user-upload-media-block .media-card video { height: 100%; max-height: none; }
  .order-modal-head { position: sticky; top: 0; z-index: 3; padding: 12px 14px; }
  .order-head-summary { gap: 6px; }
  .order-head-summary .order-summary-card { padding: 8px 7px; border-radius: 11px; }
  .order-status-list { gap: 5px; }
  .order-status-list .meta-item { gap: 3px; font-size: 10px; }
  .order-status-list .meta-item > span { font-size: 10px; }
  .order-status-list .status { width: max-content; min-width: 0; flex: 0 0 auto; overflow: visible; text-overflow: clip; padding: 5px 8px; font-size: 12px; }
  .mobile-app-shell .settlement-records-panel { border: 0; background: transparent; box-shadow: none; }
  .mobile-app-shell .settlement-records-desktop { display: none; }
  .mobile-app-shell .settlement-records-mobile { display: block; }
  .mobile-app-shell .settlement-batch-card { padding: 12px; }
  .mobile-app-shell .chat-panel { min-height: 0; }
  .mobile-app-shell .chat-list { min-height: 0; max-height: none; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  .mobile-app-shell .chat-compose { position: static; flex: 0 0 auto; padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .mobile-chat-modal { width: 100vw; max-width: none; height: 100dvh; min-height: 0; max-height: none; border: 0; border-radius: 0; overflow: hidden; display: flex; flex-direction: column; }
  .mobile-chat-backdrop { padding: 0; }
  .mobile-chat-modal-head { min-height: 60px; padding: 11px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
  .mobile-chat-modal-head > div { min-width: 0; display: grid; gap: 2px; }
  .mobile-chat-modal-head span { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-chat-close-button { flex: 0 0 auto; min-height: 34px; padding: 0 13px; border-radius: 10px; }
  .mobile-chat-modal > .chat-panel { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; border-radius: 0; }
  .mobile-chat-modal > .chat-panel .chat-head { display: none; }
  .mobile-chat-modal > .chat-panel .chat-list { flex: 1 1 0; min-height: 0; max-height: none; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  .mobile-chat-modal > .chat-panel .chat-compose { position: static; flex: 0 0 auto; padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .order-chat-open-button { flex: 0 0 auto; }
  .order-detail-footer { position: sticky; bottom: 0; z-index: 4; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 0 0; background: var(--panel-solid); }
  .mobile-page-heading { margin-bottom: 13px; }
  .mobile-page-heading h2 { margin: 0; font-size: 20px; }
  .mobile-page-heading p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
  .scanner-panel { padding: 12px; overflow: hidden; }
  .scanner-viewport { position: relative; min-height: 270px; overflow: hidden; border-radius: 14px; background: #17181c; }
  .scanner-viewport video { width: 100%; height: 270px; display: block; object-fit: cover; background: #17181c; }
  .scanner-frame { position: absolute; inset: 22% 12%; border: 2px solid rgba(255,255,255,.9); border-radius: 12px; box-shadow: 0 0 0 999px rgba(0,0,0,.24); }
  .scanner-frame::after { content: ""; position: absolute; left: 6%; right: 6%; top: 50%; height: 2px; background: #47a7ff; box-shadow: 0 0 12px #47a7ff; opacity: 0; }
  .scanner-viewport.is-active .scanner-frame::after { opacity: 1; animation: scanner-line 1.8s ease-in-out infinite; }
  @keyframes scanner-line { 0%, 100% { transform: translateY(-75px); } 50% { transform: translateY(75px); } }
  .scanner-hint { position: absolute; left: 14px; right: 14px; bottom: 12px; color: #fff; text-align: center; font-size: 12px; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
  .scanner-controls { display: flex; justify-content: center; padding: 12px 0 4px; }
  .scanner-manual-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 9px; padding-top: 11px; border-top: 1px solid var(--line); }
  .scanner-manual-form .button { min-height: 40px; }
  .scanner-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 12px 0 0; }
  .mobile-app-shell .scanner-stats { grid-template-columns: 1fr; }
  .scanner-stats .stat-card { min-height: 96px; padding: 12px; }
  .scanner-stats .stat-value { font-size: 22px; }
  .scanner-empty { margin-top: 12px; }
  .scanner-results { margin-top: 18px; }
  .scanner-results .section-heading { margin: 0 0 10px; }
  .scanner-results .section-heading h3 { margin: 0; font-size: 16px; }
  .scanner-order-result { padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: var(--panel-solid); box-shadow: var(--small-shadow); }
  .scanner-order-result + .scanner-order-result { margin-top: 10px; }
  .scanner-order-result > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
  .scanner-order-result > header div { display: grid; gap: 2px; }
  .scanner-order-result > header span { color: var(--muted); font-size: 12px; }
  .scanner-order-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 13px; }
  .scanner-order-grid > div { display: grid; gap: 2px; min-width: 0; }
  .scanner-order-grid small, .scanner-order-grid span { color: var(--muted); font-size: 11px; }
  .scanner-order-grid strong { overflow-wrap: anywhere; font-size: 13px; }
  .scanner-result-actions { display: flex; gap: 8px; margin-top: 14px; }
  .scanner-result-actions .button { flex: 1; }
  .mobile-app-shell .settings-password-panel .form-actions { justify-content: stretch; }
  .mobile-app-shell .settings-password-panel .form-actions .button { width: 100%; }
}

@media (max-width: 780px) {
  .mobile-app-shell .user-management-heading { align-items: stretch; }
  .mobile-app-shell .user-management-tools { width: 100%; justify-content: space-between; flex-wrap: wrap; }
  .mobile-app-shell .user-sort-control { width: min(260px, 100%); }
  .mobile-app-shell .user-management-section { margin-top: 18px; }
  .mobile-app-shell .user-management-section .section-heading { align-items: flex-start; }
  .mobile-app-shell .user-management-table-panel { border-radius: 14px; }
  .mobile-app-shell .user-management-table-wrap { margin: 0; -webkit-overflow-scrolling: touch; }
  .mobile-app-shell .user-management-table th, .mobile-app-shell .user-management-table td { padding: 10px; }
  .mobile-app-shell .user-management-table th { font-size: 11px; }
  .mobile-app-shell .user-management-table .button { min-height: 32px; }
  .mobile-app-shell input, .mobile-app-shell select, .mobile-app-shell textarea { font-size: 16px; }
}
.order-migration-panel { margin-bottom: 18px; }
.platform-feature-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.platform-feature-row h3 { margin: 0 0 6px; font-size: 18px; }
.platform-feature-row p { margin: 0; color: var(--muted); }
.feature-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; flex: 0 0 auto; }
.feature-switch input { position: absolute; opacity: 0; pointer-events: none; }
.feature-switch span { width: 44px; height: 24px; border-radius: 12px; background: #9ca3af; padding: 3px; transition: background .2s ease; }
.feature-switch span::after { content: ''; display: block; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s ease; }
.feature-switch input:checked + span { background: #16835f; }
.feature-switch input:checked + span::after { transform: translateX(20px); }
.feature-switch input:focus-visible + span { outline: 3px solid rgba(22,131,95,.25); outline-offset: 2px; }
.feature-switch strong { min-width: 48px; font-size: 14px; }
@media (max-width: 780px) {
  .platform-feature-row { align-items: flex-start; flex-direction: column; }
}
