:root {
  --ink: #172033;
  --muted: #68758a;
  --soft: #f5f7fb;
  --panel: #ffffff;
  --line: #e2e7ef;
  --line-dark: #cdd5e1;
  --blue: #2457d6;
  --blue-dark: #183fa7;
  --green: #159447;
  --orange: #c16a17;
  --red: #c53939;
  --nav: #192535;
  --shadow: 0 12px 36px rgba(28, 43, 68, .07);
  --radius: 12px;
  --mono: "SF Mono", "Menlo", "Consolas", monospace;
}

/* Keep the native hidden attribute authoritative over component display rules. */
[hidden] { display: none !important; }

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; color: var(--ink); background: #eef2f7; font-family: "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 14px; }
body.setup-open { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: not-allowed; }
input, select, textarea { width: 100%; border: 1px solid var(--line-dark); border-radius: 8px; background: #fff; color: var(--ink); outline: 0; }
input, select { height: 36px; padding: 0 10px; }
textarea { min-height: 106px; padding: 10px; line-height: 1.55; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(36, 87, 214, .10); }

.app-shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.side-nav { position: sticky; top: 0; min-height: 100vh; padding: 22px 14px 16px; color: #dce5f5; background: var(--nav); display: flex; flex-direction: column; gap: 18px; }
.app-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 18px; border-bottom: 1px solid rgba(255,255,255,.10); }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: #fff; background: var(--blue); font-weight: 800; }
.app-brand strong { display: block; color: #fff; font-size: 16px; }
.app-brand span { display: block; margin-top: 3px; color: #9eacc1; font-size: 11px; }
.primary-nav { display: grid; gap: 4px; }
.nav-item { height: 40px; border: 0; border-radius: 8px; padding: 0 12px; color: #aebbd0; background: transparent; text-align: left; display: flex; align-items: center; gap: 11px; }
.nav-item:hover, .nav-item.is-active { color: #fff; background: rgba(255,255,255,.10); }
.nav-item.is-active { box-shadow: inset 3px 0 var(--blue); }
.nav-icon { width: 18px; color: #90a6c9; font-size: 18px; text-align: center; }
.nav-item.is-active .nav-icon { color: #73a2ff; }
.side-divider { height: 1px; background: rgba(255,255,255,.10); }
.side-section-title { color: #8f9eb5; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.side-status-list { display: grid; gap: 10px; }
.side-status-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #b8c4d7; font-size: 12px; }
.side-capture-card { padding: 13px; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; background: rgba(255,255,255,.06); }
.side-capture-title { display: flex; align-items: center; justify-content: space-between; color: #aebbd0; font-size: 12px; }
.side-capture-card strong { display: block; margin: 10px 0 5px; color: #fff; font-size: 13px; }
.side-capture-card small { display: block; color: #98a8bf; font-size: 11px; line-height: 1.45; }
.side-action, .network-reset { width: 100%; border: 1px solid rgba(125,159,220,.42); border-radius: 7px; background: rgba(66,113,210,.20); color: #d9e6ff; }
.side-action { height: 32px; margin-top: 11px; }
.side-action:hover { background: rgba(66,113,210,.38); }
.side-footer { margin-top: auto; display: grid; gap: 10px; color: #8595ad; font-size: 11px; }
.network-reset { height: 30px; border-color: rgba(255,255,255,.16); background: transparent; color: #aebbd0; font-size: 11px; }
.network-reset:hover { border-color: rgba(255,255,255,.36); color: #fff; }

.status-chip { height: 24px; padding: 0 8px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 11px; font-weight: 700; }
.status-chip i, .live-label i { width: 6px; height: 6px; border-radius: 50%; display: inline-block; background: currentColor; }
.status-ok { color: #147a3b; background: #e9f7ee; }
.status-info { color: #2457d6; background: #edf2ff; }
.status-wait { color: #a75b16; background: #fff3e2; }
.status-danger { color: #bd3636; background: #ffebeb; }
.status-muted { color: #748196; background: #eef1f5; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: #77849a; }
.pulse-dot.on { background: #35c875; box-shadow: 0 0 0 4px rgba(53,200,117,.15); animation: pulse 1.4s ease infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(53,200,117,0); } }

.main-shell { min-width: 0; padding: 0 26px 42px; }
.topbar { height: 64px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.breadcrumb { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 13px; }
.breadcrumb b { color: #a8b2c2; font-weight: 400; }
.breadcrumb strong { color: var(--ink); font-weight: 700; }
.topbar-actions { display: flex; align-items: center; gap: 18px; color: var(--muted); font-size: 12px; }
.topbar-time { font-family: var(--mono); color: #536177; }
.view { display: none; max-width: 1420px; margin: 0 auto; padding-top: 30px; }
.view.is-visible { display: block; }
.view-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.view-header h1 { margin: 5px 0 4px; font-size: 28px; line-height: 1.2; letter-spacing: 0; }
.view-header p { margin: 0; color: var(--muted); }
.eyebrow { color: var(--blue); font-size: 11px; letter-spacing: .12em; font-weight: 800; }
.primary-button, .quiet-button, .danger-button, .text-button { border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; }
.primary-button { min-height: 36px; border: 1px solid var(--blue); padding: 0 14px; color: #fff; background: var(--blue); }
.primary-button:hover { border-color: var(--blue-dark); background: var(--blue-dark); }
.quiet-button { min-height: 34px; border: 1px solid var(--line-dark); padding: 0 11px; color: #46546a; background: #fff; }
.quiet-button:hover { border-color: var(--blue); color: var(--blue); }
.danger-button { min-height: 34px; border: 1px solid #efb4b4; padding: 0 11px; color: var(--red); background: #fff6f6; }
.danger-button:hover { border-color: var(--red); background: #ffeded; }
.text-button { border: 0; padding: 0; color: var(--blue); background: transparent; }
.compact-button { min-height: 30px; height: 30px; padding: 0 9px; font-size: 12px; }
.muted-label { color: var(--muted); font-size: 12px; }
.result-count { color: var(--muted); font-size: 12px; }

.overview-strip { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); }
.overview-strip > div { min-height: 100px; padding: 18px 20px; border-right: 1px solid var(--line); }
.overview-strip > div:last-child { border-right: 0; }
.overview-strip span, .overview-strip small { display: block; color: var(--muted); font-size: 12px; }
.overview-strip strong { display: block; margin: 8px 0 4px; color: var(--ink); font-size: 26px; line-height: 1; }
.overview-strip strong i { color: #9aa6b8; font-size: 14px; font-style: normal; font-weight: 500; }
.green-number { color: var(--green) !important; }
.content-toolbar { min-height: 56px; padding: 0 16px; border: 1px solid var(--line); border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; background: #fbfcfe; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.toolbar-title { display: flex; align-items: baseline; gap: 10px; }
.toolbar-title strong { font-size: 15px; }
.toolbar-title span { color: var(--muted); font-size: 12px; }
.toolbar-controls { display: flex; align-items: center; gap: 8px; }
.toolbar-add-device { flex: 0 0 auto; }
.toolbar-controls input { width: 230px; }
.toolbar-controls select { width: 120px; }
.device-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); background: var(--panel); }
.device-unit { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #fff; text-align: left; box-shadow: 0 3px 12px rgba(32,49,76,.03); transition: border-color .15s, box-shadow .15s, transform .15s; }
.device-unit:hover { border-color: #9eb7ee; box-shadow: 0 10px 25px rgba(32,61,120,.10); transform: translateY(-2px); }
.device-unit.is-running { border-color: #94d4ad; box-shadow: inset 3px 0 var(--green), 0 8px 22px rgba(21,148,71,.08); }
.device-unit-head, .device-wechat, .device-unit-foot, .device-metrics { display: flex; align-items: center; }
.device-unit-head { gap: 10px; }
.device-title { min-width: 0; flex: 1; }
.device-title strong, .device-title small, .device-wechat strong, .device-wechat small, .device-task-preview span, .device-task-preview strong, .device-task-preview small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.device-title strong { font-size: 15px; }
.device-title small { margin-top: 3px; color: var(--muted); font-family: var(--mono); font-size: 10px; }
.device-symbol { width: 27px; height: 32px; padding: 5px 4px; border: 2px solid #7890bb; border-radius: 6px; display: grid; align-content: center; gap: 3px; flex: 0 0 auto; }
.device-symbol span { height: 2px; border-radius: 2px; background: #7890bb; }
.device-symbol.large { width: 38px; height: 46px; border-color: var(--blue); padding: 7px 5px; }
.device-symbol.large span { background: var(--blue); }
.device-wechat { gap: 9px; margin: 18px 0 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.wechat-avatar { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: #18894a; background: #e9f7ee; font-weight: 800; }
.device-wechat { min-width: 0; }
.device-wechat strong { font-size: 13px; }
.device-wechat small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.device-task-preview { min-height: 60px; padding: 11px 12px; border-radius: 8px; background: var(--soft); }
.device-task-preview span { color: var(--muted); font-size: 10px; }
.device-task-preview strong { margin-top: 5px; color: #32415a; font-size: 13px; }
.device-task-preview small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.muted-text { color: #8793a6 !important; font-weight: 500; }
.device-metrics { gap: 17px; margin: 15px 0; color: var(--muted); font-size: 11px; }
.device-metrics b { color: var(--ink); font-size: 15px; }
.device-unit-foot { justify-content: space-between; gap: 10px; color: var(--muted); font-size: 11px; }
.open-detail { color: var(--blue); font-weight: 700; }
.empty-state { min-height: 150px; padding: 28px; border: 1px dashed var(--line-dark); border-radius: 10px; color: var(--muted); display: grid; place-items: center; align-content: center; gap: 7px; text-align: center; }
.empty-state strong { color: #44536a; }
.empty-state span { font-size: 12px; }
.empty-device { grid-column: 1 / -1; }

.detail-view-header { align-items: center; }
.detail-view-header h1 { margin-top: 6px; }
.back-button { display: block; margin-bottom: 10px; border: 0; padding: 0; color: var(--blue); background: transparent; font-size: 12px; }
.detail-header-actions { display: flex; align-items: center; gap: 10px; }
.detail-summary { min-height: 94px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); display: grid; grid-template-columns: minmax(190px, 1fr) 1.25fr minmax(180px, .9fr); align-items: center; gap: 20px; }
.detail-summary-main { display: flex; align-items: center; gap: 11px; }
.detail-summary-main strong, .detail-summary-main small { display: block; }
.detail-summary-main strong { font-size: 15px; }
.detail-summary-main small { margin-top: 5px; color: var(--muted); font-size: 11px; }
.detail-summary-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.detail-summary-stats div { padding-left: 12px; border-left: 1px solid var(--line); }
.detail-summary-stats strong, .detail-summary-stats span { display: block; }
.detail-summary-stats strong { font-size: 18px; }
.detail-summary-stats span { margin-top: 5px; color: var(--muted); font-size: 11px; }
.detail-summary-proxy { padding-left: 17px; border-left: 1px solid var(--line); }
.detail-summary-proxy span, .detail-summary-proxy strong, .detail-summary-proxy small { display: block; }
.detail-summary-proxy span, .detail-summary-proxy small { color: var(--muted); font-size: 11px; }
.detail-summary-proxy strong { margin: 5px 0; font-size: 13px; }
.detail-tabs { margin-top: 20px; border-bottom: 1px solid var(--line-dark); display: flex; gap: 20px; }
.detail-tab { position: relative; min-height: 42px; border: 0; padding: 0 2px; color: var(--muted); background: transparent; }
.detail-tab:hover, .detail-tab.is-active { color: var(--blue); }
.detail-tab.is-active::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--blue); }
.detail-tab span { min-width: 18px; height: 18px; margin-left: 4px; padding: 0 5px; border-radius: 99px; color: var(--muted); background: #e9edf3; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; }
.detail-panel { display: none; padding-top: 20px; }
.detail-panel.is-active { display: block; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.panel-heading h2 { margin: 0; font-size: 17px; }
.panel-heading p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.heading-actions { display: flex; align-items: center; gap: 12px; }
.account-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.account-card { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); box-shadow: 0 4px 16px rgba(32,49,76,.035); }
.account-card.is-running { border-color: #9ad9b2; box-shadow: inset 3px 0 var(--green); }
.account-card-head { min-height: 48px; display: flex; align-items: center; gap: 9px; }
.slot-number, .empty-slot-icon { width: 31px; height: 31px; border-radius: 8px; display: grid; place-items: center; color: var(--blue); background: #edf2ff; font-weight: 800; }
.account-title { min-width: 0; flex: 1; }
.account-title span, .account-title strong, .account-title small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-title span { color: var(--muted); font-size: 10px; }
.account-title strong { margin: 3px 0; font-size: 13px; }
.account-title small { color: var(--muted); font-size: 10px; }
.account-card-meta { display: flex; justify-content: space-between; gap: 8px; margin: 14px 0 10px; padding: 8px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.account-card-meta b { color: var(--ink); font-weight: 600; }
.patient-list { min-height: 94px; }
.patient-item { min-height: 37px; padding: 5px 0; display: flex; align-items: center; gap: 8px; }
.patient-index { width: 19px; height: 19px; border-radius: 5px; color: var(--muted); background: #f0f3f7; display: grid; place-items: center; font-size: 10px; }
.patient-item > div { min-width: 0; flex: 1; }
.patient-item strong, .patient-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.patient-item strong { font-size: 12px; }
.patient-item small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.patient-item.is-warning { color: var(--red); }
.patient-item.is-warning small { color: var(--red); }
.patient-empty { padding: 26px 0; color: #9aa6b8; font-size: 12px; text-align: center; }
.account-card-actions { min-height: 32px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px; }
.account-card-actions form { margin: 0; }
.account-card-actions .quiet-button { min-height: 28px; padding: 0 8px; font-size: 11px; }
.danger-text { color: var(--red) !important; }
.icon-action { width: 22px; height: 22px; border: 0; border-radius: 5px; background: transparent; font-size: 17px; line-height: 1; }
.icon-action:hover { background: #ffebeb; }
.empty-account { min-height: 300px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 9px; color: var(--muted); }
.empty-account strong { color: var(--ink); }
.empty-account .text-button { margin-top: 9px; }
.remote-add { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 10px; }
.remote-add summary { color: var(--muted); cursor: pointer; font-size: 11px; }
.inline-form { display: grid; grid-template-columns: 1fr 1.3fr auto; gap: 6px; margin-top: 9px; }
.inline-form input, .inline-form button { min-width: 0; height: 30px; font-size: 11px; }

.task-form { padding: 17px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); }
.task-form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
label > span, .task-form label > span { display: block; margin-bottom: 6px; color: #536177; font-size: 11px; font-weight: 700; }
label > span em { color: #9aa6b8; font-style: normal; font-weight: 400; }
.field-help { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.schedule-browser { margin-top: 17px; padding: 13px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfe; }
.schedule-browser-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.schedule-browser-head strong, .schedule-browser-head span { display: block; }
.schedule-browser-head strong { font-size: 12px; }
.schedule-browser-head span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.schedule-state { margin-top: 11px; color: var(--muted); font-size: 11px; }
.schedule-filters { display: grid; grid-template-columns: 1.2fr repeat(4, 1fr) auto auto; gap: 7px; margin-top: 12px; align-items: center; }
.schedule-filters input, .schedule-filters select { height: 31px; font-size: 11px; }
.check-control { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.check-control input { width: auto; height: auto; }
.schedule-results { max-height: 330px; margin-top: 11px; overflow-y: auto; }
.schedule-row { width: 100%; min-height: 54px; padding: 8px 10px; border: 0; border-top: 1px solid var(--line); color: var(--ink); background: #fff; display: flex; justify-content: space-between; gap: 15px; text-align: left; }
.schedule-row:hover { background: #f4f7fd; }
.schedule-row.is-selected { box-shadow: inset 3px 0 0 var(--blue); background: #eef4ff; }
.schedule-row span:last-child { text-align: right; }
.schedule-row strong, .schedule-row small { display: block; }
.schedule-row strong { font-size: 12px; }
.schedule-row small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.schedule-row b { color: var(--blue); font-size: 12px; }
.error-list { margin-top: 13px; padding: 10px 12px; border: 1px solid #f1c6c6; border-radius: 7px; color: var(--red); background: #fff5f5; display: grid; gap: 4px; font-size: 11px; }
.advanced-options { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 11px; }
.advanced-options summary { color: var(--muted); cursor: pointer; font-size: 11px; }
.advanced-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-top: 12px; }
.advanced-grid input, .advanced-grid select { height: 31px; font-size: 11px; }
.task-actions { min-height: 37px; margin-top: 18px; display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.task-help { margin-right: auto; max-width: 50%; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }

.log-viewer { border: 1px solid var(--line); border-radius: var(--radius); background: #111c2d; overflow: hidden; box-shadow: var(--shadow); }
.log-viewer-head { height: 42px; padding: 0 13px; border-bottom: 1px solid rgba(255,255,255,.09); color: #99a9bf; display: flex; align-items: center; justify-content: space-between; font-size: 11px; }
.log-viewer-head .text-button { color: #9fc0ff; }
.log-lines { height: min(58vh, 560px); padding: 12px 14px; overflow: auto; color: #c8d4e6; font-family: var(--mono); font-size: 11px; line-height: 1.65; white-space: pre-wrap; }
.log-lines.is-empty { display: none; }
.log-lines div { padding: 1px 0; }
.empty-state.compact { min-height: 120px; border: 0; color: #9aa9bf; background: transparent; }
.live-label { color: var(--green); font-size: 11px; display: inline-flex; align-items: center; gap: 6px; }

.order-panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); overflow: hidden; }
.list-toolbar { min-height: 62px; padding: 0 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.list-toolbar strong, .list-toolbar span { display: block; }
.list-toolbar strong { font-size: 15px; }
.list-toolbar span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.list-toolbar-actions { display: flex; align-items: center; gap: 9px; }
.order-list-scroll { max-height: 640px; overflow: auto; }
.order-row { min-height: 70px; padding: 11px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.order-row:last-child { border-bottom: 0; }
.order-row.is-history { display: none; background: #fafbfc; }
.order-main { min-width: 0; flex: 1; display: grid; grid-template-columns: 1.05fr 1.2fr .9fr 1.2fr; gap: 18px; align-items: center; }
.order-main strong, .order-main span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-main strong { font-size: 12px; }
.order-main span { margin-top: 5px; color: var(--muted); font-size: 10px; }
.order-end { min-width: 88px; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.order-end form { margin: 0; }
.order-end .status-chip { font-size: 10px; }
.history-note { padding: 10px 16px; color: var(--muted); background: #fafbfc; font-size: 11px; }

.management-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 14px; }
.management-card { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); }
.full-card { margin-top: 14px; }
.management-form { display: grid; gap: 13px; }
.form-submit { display: flex; justify-content: flex-end; gap: 8px; }
.proxy-table, .doctor-table { border-top: 1px solid var(--line); }
.proxy-item, .doctor-item { min-height: 52px; padding: 9px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1.5fr 1.4fr 1fr .9fr 28px; gap: 10px; align-items: center; }
.proxy-item:last-child, .doctor-item:last-child { border-bottom: 0; }
.proxy-item strong, .proxy-item span, .doctor-item strong, .doctor-item span, .doctor-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proxy-item strong, .doctor-item strong { font-size: 12px; }
.proxy-item span, .doctor-item span, .doctor-item small { color: var(--muted); font-size: 10px; }
.doctor-item { grid-template-columns: 1.1fr 1.6fr 28px; }
.doctor-item strong { margin-bottom: 4px; }

.settings-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 20px; }
.setup-info { padding: 18px 14px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfe; text-align: center; }
.setup-info-icon { width: 42px; height: 42px; margin: 0 auto 11px; border-radius: 11px; color: #18894a; background: #e9f7ee; display: grid; place-items: center; font-weight: 800; }
.setup-info strong, .setup-info span, .setup-info small { display: block; }
.setup-info strong { font-size: 13px; }
.setup-info span, .setup-info small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.setup-info .quiet-button { width: 100%; height: 30px; margin-top: 15px; font-size: 11px; }
.settings-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.settings-form .wide { grid-column: 1 / -1; }
.form-submit { grid-column: 1 / -1; }
.danger-zone { margin-top: 20px; padding: 14px 16px; border: 1px solid #f0cccc; border-radius: 9px; display: flex; justify-content: space-between; align-items: center; gap: 12px; background: #fff9f9; }
.danger-zone strong, .danger-zone span { display: block; }
.danger-zone strong { font-size: 12px; color: var(--red); }
.danger-zone span { margin-top: 4px; color: var(--muted); font-size: 11px; }

.setup-layer { position: fixed; inset: 0; z-index: 100; overflow: auto; background: #eef2f7; }
.setup-shell { width: min(900px, calc(100% - 40px)); min-height: 100vh; margin: 0 auto; padding: 26px 0 50px; }
.setup-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.setup-header h1 { margin: 6px 0 0; font-size: 22px; }
.setup-progress { color: var(--muted); font-size: 12px; }
.setup-steps { width: min(620px, 100%); margin: 45px auto 35px; display: flex; align-items: flex-start; }
.setup-steps i { flex: 1; height: 1px; margin: 15px 10px 0; background: var(--line-dark); }
.setup-step { color: #a0aabd; text-align: center; font-size: 11px; }
.setup-step b { width: 30px; height: 30px; margin: 0 auto 7px; border: 1px solid var(--line-dark); border-radius: 50%; color: #8b98aa; background: #fff; display: grid; place-items: center; }
.setup-step.is-active { color: var(--blue); }
.setup-step.is-active b { border-color: var(--blue); color: #fff; background: var(--blue); }
.setup-body { min-height: 470px; padding: 42px 56px; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: 0 18px 50px rgba(26,43,74,.10); }
.setup-page { display: none; grid-template-columns: .9fr 1.1fr; gap: 60px; align-items: center; }
.setup-page.is-active { display: grid; }
.setup-copy h2 { margin: 18px 0 10px; font-size: 23px; }
.setup-copy p { margin: 0; color: var(--muted); line-height: 1.75; font-size: 13px; }
.setup-icon { width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center; font-weight: 800; }
.setup-icon.blue { color: #2b5eda; background: #edf2ff; }
.setup-icon.green { color: #18894a; background: #e9f7ee; }
.setup-icon.orange { color: #b65e13; background: #fff0df; }
.setup-form { display: grid; gap: 15px; }
.setup-tip { padding: 11px 12px; border-radius: 8px; background: var(--soft); }
.setup-tip strong, .setup-tip span { display: block; }
.setup-tip strong { font-size: 11px; }
.setup-tip span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.setup-actions { margin-top: 9px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.capture-step-card { padding: 20px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfe; }
.capture-status-large { padding-bottom: 18px; border-bottom: 1px solid var(--line); display: flex; gap: 11px; align-items: flex-start; }
.capture-status-large strong, .capture-status-large span { display: block; }
.capture-status-large strong { font-size: 14px; }
.capture-status-large div span { margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.capture-checklist { display: grid; gap: 11px; padding: 18px 0 8px; }
.capture-checklist div { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; }
.capture-checklist b { width: 21px; height: 21px; border: 1px solid var(--line-dark); border-radius: 50%; color: #8996a9; display: grid; place-items: center; font-size: 10px; }
.capture-checklist b.done { border-color: var(--green); color: #fff; background: var(--green); }
.success-hero { grid-column: 1 / -1; text-align: center; }
.success-mark { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%; color: #fff; background: var(--green); display: grid; place-items: center; font-size: 32px; }
.success-hero h2 { margin: 0 0 10px; font-size: 23px; }
.success-hero p { margin: 0; color: var(--muted); }
.success-hero .setup-actions { justify-content: center; margin-top: 28px; }

.toast-stack { position: fixed; right: 24px; bottom: 22px; z-index: 300; width: min(380px, calc(100vw - 48px)); display: grid; gap: 8px; }
.toast { padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: #fff; box-shadow: 0 12px 30px rgba(24,39,66,.16); font-size: 12px; animation: toast-in .18s ease-out; }
.toast-success { border-left: 3px solid var(--green); }
.toast-error { border-left: 3px solid var(--red); color: var(--red); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.operation-busy { position: fixed; inset: 0; z-index: 250; background: rgba(22,34,53,.18); display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity .15s; }
.operation-busy.active { opacity: 1; pointer-events: auto; }
.operation-card { min-width: 260px; max-width: calc(100vw - 40px); padding: 17px 20px; border: 1px solid #cfdbf5; border-radius: 11px; color: var(--ink); background: #fff; box-shadow: 0 18px 50px rgba(22,34,53,.20); display: flex; align-items: center; gap: 11px; }
.operation-spinner { width: 16px; height: 16px; border: 2px solid #d4def5; border-top-color: var(--blue); border-radius: 50%; animation: spin .75s linear infinite; }
.operation-busy.error .operation-card { border-color: #efc2c2; color: var(--red); }
.operation-busy.success .operation-spinner { border: 0; animation: none; }
.operation-busy.success .operation-spinner::before { content: "✓"; color: var(--green); font-weight: 800; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1050px) {
  .app-shell { grid-template-columns: 200px minmax(0, 1fr); }
  .main-shell { padding-right: 18px; padding-left: 18px; }
  .detail-summary { grid-template-columns: 1fr; gap: 13px; }
  .detail-summary-proxy { padding: 11px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .task-form-grid { grid-template-columns: repeat(3, 1fr); }
  .schedule-filters { grid-template-columns: repeat(3, 1fr); }
  .advanced-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .app-shell { display: block; }
  .side-nav { position: static; min-height: 0; padding: 12px; display: block; }
  .app-brand { padding-bottom: 12px; }
  .primary-nav { margin-top: 10px; grid-template-columns: repeat(4, 1fr); }
  .nav-item { height: 34px; justify-content: center; padding: 0 4px; font-size: 11px; }
  .nav-icon { display: none; }
  .side-divider, .side-section-title, .side-status-list, .side-footer { display: none; }
  .side-capture-card { margin-top: 10px; }
  .main-shell { padding: 0 12px 28px; }
  .topbar { height: 50px; }
  .topbar-summary { display: none; }
  .view { padding-top: 20px; }
  .view-header { align-items: flex-start; flex-direction: column; }
  .view-header h1 { font-size: 24px; }
  .overview-strip { grid-template-columns: repeat(2, 1fr); }
  .overview-strip > div:nth-child(2) { border-right: 0; }
  .overview-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .content-toolbar { align-items: stretch; flex-direction: column; padding: 12px; }
  .toolbar-controls { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 112px; }
  .toolbar-add-device { width: max-content; grid-column: 1 / -1; }
  .toolbar-controls input, .toolbar-controls select { width: 100%; }
  .device-grid { grid-template-columns: 1fr; padding: 10px; }
  .detail-header-actions { width: 100%; justify-content: space-between; }
  .detail-tabs { gap: 14px; overflow-x: auto; }
  .detail-tab { flex: 0 0 auto; }
  .panel-heading, .heading-actions { align-items: flex-start; flex-direction: column; }
  .account-grid, .management-grid { grid-template-columns: 1fr; }
  .task-form-grid, .advanced-grid, .settings-form { grid-template-columns: 1fr; }
  .schedule-filters { grid-template-columns: 1fr 1fr; }
  .task-actions { align-items: stretch; flex-wrap: wrap; justify-content: flex-start; }
  .task-help { width: 100%; max-width: 100%; }
  .order-main { grid-template-columns: 1fr 1fr; gap: 9px; }
  .order-row { align-items: flex-start; flex-direction: column; }
  .order-end { width: 100%; justify-content: flex-start; }
  .proxy-item { grid-template-columns: 1.2fr 1fr 28px; grid-template-rows: auto auto; }
  .proxy-item span:nth-of-type(2) { display: none; }
  .proxy-item span:nth-of-type(3) { display: block; grid-column: 1 / 3; grid-row: 2; }
  .proxy-item form { grid-column: 3; grid-row: 1 / 3; }
  .setup-shell { width: calc(100% - 24px); padding-top: 16px; }
  .setup-body { padding: 28px 20px; }
  .setup-page { grid-template-columns: 1fr; gap: 25px; }
  .setup-steps { margin: 30px auto 24px; }
  .setup-step span { display: none; }
  .inline-form { grid-template-columns: 1fr; }
}

/* Server console */
.standard-app { min-height: 100vh; margin: 0; color: #18283d; background: #f5f7fb; font-family: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif; }
.standard-app button, .standard-app input, .standard-app select { font: inherit; }
.standard-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 10; width: 232px; padding: 24px 15px; border-right: 1px solid #e2e7ef; background: #fff; display: flex; flex-direction: column; }
.standard-brand { display: flex; align-items: center; gap: 11px; padding: 0 10px 31px; }
.standard-brand-mark { width: 34px; height: 34px; border-radius: 9px; color: #fff; background: #2458b8; display: grid; place-items: center; font-weight: 800; }
.standard-brand strong, .standard-brand small { display: block; }
.standard-brand strong { font-size: 15px; letter-spacing: .02em; }
.standard-brand small { margin-top: 3px; color: #8997aa; font-size: 10px; letter-spacing: .08em; }
.standard-nav { display: grid; gap: 4px; }
.standard-nav button { min-height: 42px; border: 0; border-radius: 7px; padding: 0 13px; color: #65758c; background: transparent; display: flex; align-items: center; gap: 11px; cursor: pointer; text-align: left; font-size: 13px; }
.standard-nav button span { width: 19px; color: #96a4b7; font-size: 16px; text-align: center; }
.standard-nav button:hover { color: #2458b8; background: #f1f5fd; }
.standard-nav button.is-active { color: #1f54b5; background: #edf3ff; font-weight: 700; }
.standard-nav button.is-active span { color: #2458b8; }
.standard-sidebar-foot { margin-top: auto; padding: 17px 10px 0; border-top: 1px solid #edf0f4; }
.standard-sidebar-foot small { display: block; margin: 9px 0 15px; overflow: hidden; color: #9aa7b8; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.standard-sidebar-foot a { color: #6280ae; font-size: 11px; text-decoration: none; }
.server-indicator { display: flex; align-items: center; gap: 8px; color: #4c607b; font-size: 12px; }
.server-indicator i, .standard-live-dot { width: 7px; height: 7px; border-radius: 50%; background: #cf6670; display: inline-block; }
.server-indicator i.is-ok, .standard-live-dot { background: #2da36a; }
.standard-main { min-height: 100vh; margin-left: 232px; padding: 0 42px 60px; }
.standard-topbar { height: 83px; border-bottom: 1px solid #e4e9f0; display: flex; align-items: center; justify-content: space-between; }
.standard-topbar h1, .standard-hero h2, .standard-modal h2 { margin: 4px 0 0; color: #192a43; font-size: 24px; line-height: 1.2; letter-spacing: 0; }
.standard-kicker { color: #7590ba; font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.standard-top-actions { display: flex; align-items: center; gap: 10px; color: #8090a5; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
.standard-icon-button { width: 30px; height: 30px; border: 1px solid #dfe5ed; border-radius: 6px; color: #677991; background: #fff; display: inline-grid; place-items: center; cursor: pointer; }
.standard-icon-button:hover { border-color: #9cb8e9; color: #2458b8; background: #f5f8ff; }
.standard-alert { margin: 20px 0 0; padding: 11px 14px; border: 1px solid #e0e7f2; border-radius: 7px; display: flex; align-items: center; gap: 11px; font-size: 12px; }
.standard-alert strong { white-space: nowrap; }
.standard-alert span { color: #65758c; overflow: hidden; text-overflow: ellipsis; }
.standard-alert button { margin-left: auto; border: 0; color: #2458b8; background: transparent; cursor: pointer; white-space: nowrap; }
.standard-alert.is-danger { border-color: #efcdd1; color: #a73645; background: #fff8f8; }
.standard-alert.is-warn { border-color: #f0ddaf; background: #fffaf0; }
.standard-success-alert { position: sticky; top: 12px; z-index: 70; margin: 16px 0 -4px; padding: 13px 14px; border: 1px solid #bfe6cf; border-radius: 8px; color: #1f6041; background: linear-gradient(135deg, #f4fcf7, #eaf8f0); box-shadow: 0 9px 24px rgba(24, 107, 66, .11); display: flex; align-items: center; gap: 11px; }
.standard-success-alert[hidden] { display: none !important; }
.standard-success-icon { width: 26px; height: 26px; flex: 0 0 26px; border-radius: 50%; color: #fff; background: #2b9b66; display: grid; place-items: center; font-size: 16px; font-weight: 700; }
.standard-success-content { min-width: 0; display: grid; gap: 3px; }
.standard-success-content strong { color: #1d6a45; font-size: 13px; }
.standard-success-content span, .standard-success-content small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #4b7a61; font-size: 11px; }
.standard-success-content small { color: #739583; font-family: var(--mono); }
.standard-success-actions { margin-left: auto; display: flex; align-items: center; gap: 7px; }
.standard-success-actions .standard-primary { min-height: 30px; padding: 0 10px; font-size: 11px; }
.standard-view { display: none; padding-top: 31px; }
.standard-view.is-visible { display: block; }
.standard-hero { min-height: 71px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.standard-hero p { margin: 9px 0 0; color: #7b899e; font-size: 12px; }
.standard-primary, .standard-secondary, .standard-small-button { border-radius: 6px; cursor: pointer; white-space: nowrap; }
.standard-primary { min-height: 35px; border: 1px solid #2458b8; padding: 0 14px; color: #fff; background: #2458b8; font-size: 12px; font-weight: 700; }
.standard-primary:hover { background: #19489e; }
.standard-primary:disabled { border-color: #aebbcf; color: #f5f7fa; background: #aebbcf; cursor: not-allowed; }
.standard-secondary { min-height: 34px; border: 1px solid #d7e0eb; padding: 0 13px; color: #53667e; background: #fff; font-size: 12px; }
.standard-secondary:hover { border-color: #96b4e8; color: #2458b8; }
.standard-stat-grid, .standard-resource-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 26px; }
.standard-stat-grid article, .standard-resource-grid article { min-height: 112px; padding: 16px 17px; border: 1px solid #e1e7ef; border-radius: 8px; background: #fff; }
.standard-stat-grid article.is-accent { border-color: #bfe0d0; background: #f5fcf8; }
.standard-stat-grid span, .standard-stat-grid small, .standard-resource-grid span, .standard-resource-grid small { display: block; color: #8795a8; font-size: 11px; }
.standard-stat-grid strong, .standard-resource-grid strong { display: block; margin: 12px 0 5px; color: #1b2f4a; font-size: 27px; line-height: 1; }
.standard-stat-grid article.is-accent strong { color: #27885a; }
.standard-two-col, .standard-settings-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 14px; margin-top: 15px; }
.standard-panel { margin-top: 15px; padding: 17px 18px; border: 1px solid #e1e7ef; border-radius: 8px; background: #fff; }
.standard-panel.flush { padding: 0; overflow: hidden; }
.order-history-panel { margin-top: 12px; }
.order-history-panel .standard-panel-head { padding: 13px 16px; align-items: center; }
.order-history-panel .standard-secondary { min-height: 28px; font-size: 10px; }
.standard-panel-head { min-height: 34px; display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.panel-head-actions { display: flex; align-items: center; gap: 10px; }
.standard-panel-head h3 { margin: 0; color: #233852; font-size: 14px; }
.standard-panel-head small { display: block; margin-top: 5px; color: #8b98aa; font-size: 11px; }
.standard-link { border: 0; padding: 2px 0; color: #4d76bd; background: transparent; cursor: pointer; font-size: 11px; }
.standard-count { color: #8c9aab; font-size: 11px; }
.standard-task-list { margin-top: 12px; }
.standard-task-row { min-height: 53px; border-top: 1px solid #edf0f4; display: flex; align-items: center; gap: 10px; }
.standard-task-row > div { min-width: 0; flex: 1; }
.standard-task-row strong, .standard-task-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.standard-task-row strong { color: #2a3d58; font-size: 12px; }
.standard-task-row small { margin-top: 4px; color: #8997a9; font-size: 10px; }
.mode-mark { width: 27px; height: 27px; border-radius: 6px; display: grid; place-items: center; font-size: 11px; font-weight: 800; }
.mode-direct { color: #2c64c6; background: #eaf1ff; }
.mode-stock { color: #a66b19; background: #fff4df; }
.mode-rebook { color: #795dc1; background: #f1edff; }
.mode-brush { color: #218459; background: #e8f7ee; }
.standard-status, .mode-pill { display: inline-flex; align-items: center; justify-content: center; border-radius: 99px; white-space: nowrap; }
.standard-status { min-height: 21px; padding: 0 8px; color: #687b94; background: #f0f3f7; font-size: 10px; }
.standard-status.status-ready, .standard-status.status-succeeded, .standard-status.status-paid { color: #257c53; background: #e8f7ee; }
.standard-status.status-running { color: #2458b8; background: #eaf1ff; }
.standard-status.status-failed, .standard-status.status-danger, .standard-status.status-canceled, .standard-status.status-cancelled { color: #ad3e4a; background: #fff0f1; }
.standard-status.status-warn, .standard-status.status-created { color: #98631c; background: #fff4df; }
.standard-status.status-interrupted { color: #975b1a; background: #fff3de; }
.standard-order-summary { margin-top: 22px; }
.standard-order-summary > strong { display: block; color: #1b2f4a; font-size: 34px; line-height: 1; }
.standard-order-summary > span { display: block; margin-top: 7px; color: #8795a8; font-size: 11px; }
.summary-line { margin-top: 18px; padding-top: 11px; border-top: 1px solid #edf0f4; display: flex; justify-content: space-between; color: #7d8da3; font-size: 11px; }
.summary-line b { color: #334966; }
.standard-toolbar { margin-top: 24px; padding: 9px 11px; border: 1px solid #e1e7ef; border-radius: 7px; background: #fff; display: flex; align-items: center; gap: 8px; }
.standard-toolbar input { width: 280px; }
.standard-toolbar input, .standard-toolbar select { height: 32px; border: 1px solid #dce4ee; border-radius: 5px; padding: 0 9px; color: #354962; background: #fff; outline: none; font-size: 11px; }
.standard-toolbar input:focus, .standard-toolbar select:focus { border-color: #86a9e4; box-shadow: 0 0 0 3px #edf3ff; }
.standard-toolbar .standard-count { margin-left: auto; }
.resource-filter-bar { margin-top: 13px; padding: 9px; border: 1px solid #e7ebf1; border-radius: 6px; background: #fafbfd; display: flex; align-items: center; gap: 8px; }
.resource-filter-bar input, .resource-filter-bar select { height: 31px; box-sizing: border-box; border: 1px solid #dce4ee; border-radius: 5px; padding: 0 9px; color: #354962; background: #fff; outline: none; font-size: 11px; }
.resource-filter-bar input { width: min(320px, 100%); }
.resource-filter-bar select { width: 220px; min-width: 160px; }
.resource-filter-bar input:focus, .resource-filter-bar select:focus { border-color: #86a9e4; box-shadow: 0 0 0 3px #edf3ff; }
.resource-filter-bar-wide input { width: auto; min-width: 180px; flex: 1 1 280px; }
.resource-filter-bar-wide select { flex: 0 1 220px; }
.standard-logout-form { margin: 0; }
.standard-logout-form .standard-secondary { min-height: 30px; padding: 0 9px; font-size: 10px; }
.standard-table-wrap { width: 100%; overflow-x: auto; }
.standard-table-wrap table { width: 100%; min-width: 740px; border-collapse: collapse; }
.standard-table-wrap th { padding: 12px 16px; color: #93a0b1; background: #fbfcfe; font-size: 10px; font-weight: 700; text-align: left; white-space: nowrap; }
.standard-table-wrap td { padding: 12px 16px; border-top: 1px solid #edf0f4; color: #52657e; font-size: 11px; vertical-align: middle; }
.standard-table-wrap td strong, .standard-table-wrap td small { display: block; }
.standard-table-wrap td strong { color: #2b3e58; font-size: 12px; }
.standard-table-wrap td small { margin-top: 4px; color: #8a98aa; font-size: 10px; }
.standard-table-wrap td small.error-text { color: #b13c4a; }
.standard-table-wrap tr:hover td { background: #fbfcff; }
.device-resource-row { cursor: pointer; }
.device-resource-row:focus td { outline: 2px solid #86a9e4; outline-offset: -2px; background: #f5f8ff; }
.device-resource-table { min-width: 850px !important; }
.table-empty { height: 110px; color: #9ba8b8 !important; text-align: center; }
.mode-pill { min-height: 24px; padding: 0 9px; font-size: 10px; }
.task-table th:last-child, .task-table td:last-child { text-align: right; }
.table-actions { min-width: 125px; white-space: nowrap; }
.standard-small-button { min-height: 27px; border: 1px solid #cddaf0; padding: 0 8px; color: #3768b9; background: #f5f8ff; font-size: 10px; }
.standard-small-button:hover { border-color: #86a9e4; background: #edf3ff; }
.standard-small-button:disabled { border-color: #e3e8ef; color: #9da8b6; background: #f6f7f9; cursor: not-allowed; }
.standard-small-button.is-danger { border-color: #efcbd0; color: #b34451; background: #fff7f7; }
.standard-definition { margin: 18px 0 0; }
.standard-definition div { padding: 11px 0; border-top: 1px solid #edf0f4; display: flex; justify-content: space-between; gap: 15px; font-size: 11px; }
.standard-definition dt { color: #8997a9; }
.standard-definition dd { margin: 0; color: #314762; text-align: right; }
.standard-panel-copy { margin: 20px 0 18px; color: #718198; font-size: 12px; line-height: 1.8; }
.inline-button { display: inline-flex; align-items: center; text-decoration: none; }
.standard-modal, .standard-drawer { position: fixed; inset: 0; z-index: 50; background: rgba(19, 31, 49, .31); display: flex; justify-content: center; align-items: center; padding: 22px; }
.standard-modal[data-query-helper-modal] { z-index: 70; }
.standard-modal-card { width: min(820px, 100%); max-height: min(780px, calc(100vh - 44px)); overflow: auto; padding: 24px; border-radius: 10px; background: #fff; box-shadow: 0 20px 60px rgba(20, 35, 58, .25); }
.standard-schedule-picker-card { width: min(900px, 100%); }
.schedule-picker-entry { display: flex; align-items: center; gap: 10px; padding-top: 4px; }
.schedule-picker-entry .field-help { margin-top: 0; }
.schedule-picker-toolbar { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.schedule-picker-toolbar span:last-child { margin-left: auto; color: var(--blue); font-weight: 700; }
.schedule-picker-filters { display: grid; grid-template-columns: 1fr 1.35fr .8fr .8fr auto; gap: 8px; align-items: end; margin-top: 12px; }
.schedule-picker-filters input, .schedule-picker-filters select { width: 100%; height: 34px; box-sizing: border-box; border: 1px solid #dce4ee; border-radius: 5px; padding: 0 9px; color: #2f4561; background: #fff; outline: none; font-size: 11px; }
.schedule-picker-date span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10px; font-weight: 700; }
.schedule-picker-available { height: 34px; display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.schedule-picker-available input { width: 16px; height: 16px; padding: 0; }
.schedule-picker-results { max-height: 450px; margin-top: 12px; overflow-y: auto; border: 1px solid var(--line); border-radius: 6px; background: #fbfcfe; }
.schedule-picker-row { width: 100%; min-height: 64px; padding: 10px 12px; border: 0; border-top: 1px solid var(--line); color: var(--ink); background: #fff; display: flex; justify-content: space-between; gap: 16px; text-align: left; cursor: pointer; }
.schedule-picker-row:first-child { border-top: 0; }
.schedule-picker-row:hover { background: #f2f6fd; }
.schedule-picker-row.is-disabled { color: #97a3b3; background: #fafbfd; cursor: not-allowed; }
.schedule-picker-row > span:last-child { min-width: 140px; text-align: right; }
.schedule-picker-row strong, .schedule-picker-row small { display: block; }
.schedule-picker-row strong { font-size: 12px; }
.schedule-picker-row small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.schedule-picker-status { color: #28754e; font-size: 12px; }
.schedule-picker-status.is-waitlist { color: #a36218; }
.schedule-picker-status.is-pending { color: #6c7d92; }
.standard-modal-head { margin-bottom: 20px; display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; }
.standard-modal-head h2 { font-size: 20px; }
.standard-form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 11px; }
.standard-form-grid label > span { display: block; margin-bottom: 6px; color: #61728a; font-size: 11px; font-weight: 700; }
.standard-form-grid label > span small { color: #a2adbb; font-weight: 400; }
.standard-form-grid input, .standard-form-grid select { width: 100%; height: 34px; box-sizing: border-box; border: 1px solid #dce4ee; border-radius: 5px; padding: 0 9px; color: #2f4561; background: #fff; outline: none; font-size: 11px; }
.standard-form-grid input:focus, .standard-form-grid select:focus { border-color: #86a9e4; box-shadow: 0 0 0 3px #edf3ff; }
.standard-form-grid .span-2 { grid-column: span 2; }
.mode-hint { grid-column: span 2; padding: 9px 11px; border-left: 3px solid #8caee5; color: #657994; background: #f5f8fd; font-size: 11px; line-height: 1.5; }
.standard-form-checks { margin-top: 18px; padding-top: 13px; border-top: 1px solid #edf0f4; display: flex; gap: 20px; }
.check-row { display: inline-flex; align-items: center; gap: 7px; color: #60728b; font-size: 11px; }
.check-row input[type="checkbox"] { width: 16px; height: 16px; flex: 0 0 16px; border-radius: 3px; padding: 0; accent-color: #2458b8; }
.check-row span { white-space: nowrap; }
.standard-form-foot { margin-top: 20px; padding-top: 15px; border-top: 1px solid #edf0f4; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.standard-modal-card > form > .standard-form-foot { position: sticky; bottom: -24px; z-index: 2; padding-bottom: 2px; background: #fff; }
.standard-form-foot > span { margin-right: auto; color: #8c99aa; font-size: 10px; }
.standard-modal-subtitle { margin: 7px 0 0; color: #7f8da1; font-size: 11px; }
.standard-patient-modal-card { width: min(500px, 100%); }
.standard-modal-field { display: block; margin-top: 14px; }
.standard-modal-field > span { display: block; margin-bottom: 6px; color: #61728a; font-size: 11px; font-weight: 700; }
.standard-modal-field input, .standard-modal-field select { width: 100%; height: 36px; box-sizing: border-box; border: 1px solid #dce4ee; border-radius: 5px; padding: 0 10px; color: #2f4561; background: #fff; outline: none; font-size: 12px; }
.standard-modal-field input:focus, .standard-modal-field select:focus { border-color: #86a9e4; box-shadow: 0 0 0 3px #edf3ff; }
.standard-modal-note { margin-top: 16px; padding: 10px 11px; border: 1px solid #e5ebf3; border-radius: 5px; color: #7a899d; background: #fafcff; font-size: 11px; line-height: 1.6; }
.standard-modal-field textarea { width: 100%; min-height: 190px; box-sizing: border-box; border: 1px solid #dce4ee; border-radius: 5px; padding: 10px; resize: vertical; color: #2f4561; background: #fff; outline: none; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; line-height: 1.55; }
.standard-modal-field textarea:focus { border-color: #86a9e4; box-shadow: 0 0 0 3px #edf3ff; }
.resource-patient-names { min-width: 260px; display: flex; flex-wrap: wrap; gap: 6px; }
.resource-patient-names span { color: #344b68; }
.patient-resource-chip { min-height: 26px; padding: 3px 4px 3px 7px; border: 1px solid #e3e8ef; border-radius: 5px; background: #fbfcfe; display: inline-flex; align-items: center; gap: 5px; }
.patient-resource-chip em { padding: 1px 4px; border-radius: 4px; font-size: 9px; font-style: normal; }
.patient-resource-chip em.is-ok { color: #257c53; background: #e8f7ee; }
.patient-resource-chip em.is-warn { color: #98631c; background: #fff4df; }
.patient-resource-chip em.is-bad { color: #ad3e4a; background: #fff0f1; }
.patient-chip-action, .line-icon-button { width: 20px; height: 20px; border: 0; border-radius: 4px; padding: 0; color: #3768b9; background: #edf3ff; cursor: pointer; font-size: 12px; line-height: 20px; }
.patient-chip-action.is-danger, .line-icon-button:not(.is-neutral) { color: #b34451; background: #fff1f2; }
.resource-patient-names button:disabled, .line-icon-button:disabled { color: #a8b0ba; background: #f1f3f5; cursor: not-allowed; }
.muted-resource { color: #9aa6b5 !important; }
.account-resource-table th:last-child, .account-resource-table td:last-child { text-align: right; }
.proxy-resource-table th:last-child, .proxy-resource-table td:last-child { text-align: right; }
.doctor-resource-table th:last-child, .doctor-resource-table td:last-child { text-align: right; }
.inactive-resource-table th:last-child, .inactive-resource-table td:last-child { text-align: right; }
.account-resource-table td { vertical-align: top; }
.resource-history-panel .standard-panel-head { align-items: center; }
.resource-type-badge { min-width: 42px; min-height: 21px; padding: 0 6px; border-radius: 4px; color: #58708f; background: #eef2f7; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; }
.resource-event-list { margin-top: 11px; }
.resource-event-row { min-height: 39px; border-top: 1px solid #edf0f4; display: grid; grid-template-columns: 118px 48px minmax(120px, 1fr) minmax(90px, .5fr); align-items: center; gap: 9px; color: #687990; font-size: 10px; }
.resource-event-row time { color: #96a2b1; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.resource-event-row strong { min-width: 0; overflow: hidden; color: #334965; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.standard-drawer { justify-content: flex-end; padding: 0; }
.standard-drawer-card { width: min(470px, 100%); height: 100%; overflow: auto; padding: 24px; background: #fff; box-shadow: -15px 0 45px rgba(20, 35, 58, .15); }
.standard-log-modal-card { width: min(880px, 100%); height: min(760px, calc(100vh - 44px)); max-height: calc(100vh - 44px); overflow: hidden; display: grid; grid-template-rows: auto auto minmax(0, 1fr); }
.standard-log-modal-card .standard-modal-head { align-items: center; }
.standard-log-modal-card .standard-events { min-height: 0; overflow: auto; border: 1px solid #e1e7ef; border-radius: 5px; padding: 0 14px; background: #fbfcfe; }
.log-live-indicator { margin-left: auto; margin-right: 10px; color: #19764e; font-size: 11px; }
.log-live-indicator::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: #2b9b66; vertical-align: 0; }
.standard-events { margin-top: 12px; }
.event-tools { display: grid; grid-template-columns: minmax(0, 1fr) 92px; gap: 8px; margin-top: 14px; }
.event-tools input, .event-tools select { min-width: 0; height: 32px; border: 1px solid #d9e1eb; border-radius: 4px; padding: 0 9px; color: #344b68; background: #fff; font-size: 11px; }
.event-item { padding: 12px 0; border-top: 1px solid #edf0f4; }
.event-item.event-error { border-left: 3px solid #c6505b; padding-left: 9px; background: #fffafb; }
.event-item.event-warning { border-left: 3px solid #d69b36; padding-left: 9px; background: #fffcf5; }
.event-item time { color: #94a0b0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
.event-item p { margin: 7px 0 0; color: #425773; font-size: 12px; line-height: 1.5; }
.event-level { margin-left: 8px; color: #6684b2; font-size: 10px; text-transform: uppercase; }
.event-level.error { color: #b23a48; }.event-level.warning { color: #a56f13; }
.standard-empty { padding: 28px 0; color: #9ba8b8; font-size: 11px; text-align: center; }
.standard-toast-stack { position: fixed; right: 22px; bottom: 20px; z-index: 80; width: min(350px, calc(100vw - 44px)); display: grid; gap: 7px; }
.standard-toast { padding: 11px 13px; border: 1px solid #dae2ec; border-left: 3px solid #7e9fda; border-radius: 6px; color: #3c506c; background: #fff; box-shadow: 0 10px 28px rgba(24, 39, 66, .15); font-size: 11px; }
.standard-toast.success { border-left-color: #2b9b66; }
.standard-toast.error { border-left-color: #c6505b; color: #a53a48; }
body.modal-open { overflow: hidden; }
.standard-busy { position: fixed; inset: 0; z-index: 100; background: rgba(19,31,49,.16); display: grid; place-items: center; }
.standard-busy[hidden] { display: none; }
.standard-busy-card { min-width: 190px; padding: 16px 18px; border: 1px solid #dfe6ef; border-radius: 8px; color: #405674; background: #fff; box-shadow: 0 16px 42px rgba(20,35,58,.18); display: flex; align-items: center; gap: 10px; font-size: 12px; }
.standard-spinner { width: 15px; height: 15px; border: 2px solid #d9e3f3; border-top-color: #2458b8; border-radius: 50%; animation: standard-spin .75s linear infinite; }
@keyframes standard-spin { to { transform: rotate(360deg); } }
.standard-order-modal-card { width: min(620px, 100%); }
.payment-request-panel { margin-top: 16px; border: 1px solid #dce5ef; border-radius: 6px; background: #f8fafc; overflow: hidden; }
.payment-request-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-bottom: 1px solid #e3e9f0; color: #385271; font-size: 12px; }
.payment-request-head span { color: #6684b2; font-size: 11px; }
.payment-request-lines { padding: 4px 12px 8px; }
.payment-trace-line { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 10px; padding: 6px 0; border-bottom: 1px solid #edf1f5; font-size: 11px; }
.payment-trace-line:last-child { border-bottom: 0; }
.payment-trace-line span { color: #8a99ab; }
.payment-trace-line strong { min-width: 0; color: #425773; font-weight: 500; overflow-wrap: anywhere; }
.payment-trace-line.success strong { color: #23794f; }
.payment-trace-line.error strong { color: #b23a48; }
.standard-proxy-import-modal-card { width: min(620px, 100%); }
.standard-order-detail { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.standard-order-detail > div { min-width: 0; padding: 12px 0; border-top: 1px solid #edf0f4; }
.standard-order-detail dt { color: #8997a9; font-size: 10px; }
.standard-order-detail dd { margin: 5px 0 0; overflow-wrap: anywhere; color: #314762; font-size: 12px; }
.standard-loading { padding: 24px 0; color: #7d8ca1; font-size: 12px; }
.standard-device-modal-card { width: min(980px, 100%); }
.device-detail-summary { display: grid; grid-template-columns: minmax(250px, 1.8fr) repeat(3, minmax(85px, .55fr)); align-items: center; gap: 12px; padding: 15px; border: 1px solid #e4eaf2; border-radius: 8px; background: #fafcff; }
.device-detail-identity { min-width: 0; display: flex; align-items: center; gap: 11px; }
.device-detail-identity > div { min-width: 0; }
.device-detail-identity strong, .device-detail-identity small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.device-detail-identity strong { color: #263b57; font-size: 14px; }
.device-detail-identity small { margin-top: 5px; color: #8391a4; font-size: 10px; }
.device-large-symbol { width: 37px; height: 43px; border: 2px solid #7195d3; border-radius: 7px; color: #7195d3; display: grid; place-items: center; flex: 0 0 auto; font-size: 18px; }
.device-detail-stat { padding-left: 13px; border-left: 1px solid #e2e8f0; }
.device-detail-stat strong, .device-detail-stat span { display: block; }
.device-detail-stat strong { color: #263b57; font-size: 18px; }
.device-detail-stat span { margin-top: 4px; color: #8997a9; font-size: 10px; }
.device-detail-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 13px; padding: 11px 0; border-top: 1px solid #edf0f4; border-bottom: 1px solid #edf0f4; }
.device-detail-meta div { min-width: 0; padding-left: 12px; border-left: 1px solid #edf0f4; }
.device-detail-meta div:first-child { padding-left: 0; border-left: 0; }
.device-detail-meta span, .device-detail-meta strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.device-detail-meta span { color: #8a98aa; font-size: 10px; }
.device-detail-meta strong { margin-top: 5px; color: #405673; font-size: 11px; }
.device-detail-actions { margin-top: 13px; display: flex; flex-wrap: wrap; gap: 7px; }
.device-proxy-editor { margin-top: 12px; padding: 10px 12px; border: 1px solid #e3e9f1; border-radius: 7px; background: #fafcff; display: flex; align-items: flex-end; gap: 8px; }
.device-proxy-editor label { min-width: 0; flex: 1; }
.device-proxy-editor span { display: block; margin-bottom: 5px; color: #8997a9; font-size: 10px; }
.device-proxy-editor select { width: 100%; height: 34px; border: 1px solid #dce4ee; border-radius: 5px; padding: 0 9px; color: #354962; background: #fff; outline: none; font-size: 11px; }
.device-proxy-editor select:focus { border-color: #86a9e4; box-shadow: 0 0 0 3px #edf3ff; }
.device-account-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; margin-top: 15px; }
.device-account-card { min-width: 0; padding: 13px; border: 1px solid #e1e7ef; border-radius: 8px; background: #fff; }
.device-account-card.is-empty { background: #fbfcfe; }
.device-account-head { min-height: 37px; display: flex; align-items: center; gap: 9px; }
.device-account-head > b { width: 25px; height: 25px; border-radius: 6px; color: #2458b8; background: #edf3ff; display: grid; place-items: center; font-size: 11px; }
.device-account-head > div { min-width: 0; }
.device-account-head strong, .device-account-head small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.device-account-head strong { color: #2e4563; font-size: 12px; }
.device-account-head small { margin-top: 4px; color: #8a98aa; font-size: 10px; }
.device-detail-section { margin-top: 12px; padding-top: 10px; border-top: 1px solid #edf0f4; }
.device-detail-section > span { display: block; margin-bottom: 6px; color: #8997a9; font-size: 10px; }
.device-patient-line, .device-task-line { min-height: 31px; display: flex; align-items: center; gap: 7px; }
.device-patient-line > span { width: 17px; height: 17px; border-radius: 4px; color: #73839a; background: #f0f3f7; display: grid; place-items: center; font-size: 9px; }
.device-patient-line > div, .device-task-line > div { min-width: 0; flex: 1; }
.device-patient-line strong, .device-patient-line small, .device-task-line strong, .device-task-line small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.device-patient-line strong, .device-task-line strong { color: #405673; font-size: 11px; }
.device-patient-line small, .device-task-line small { margin-top: 3px; color: #8b99aa; font-size: 9px; }
.device-task-line .mode-pill { min-height: 20px; padding: 0 6px; font-size: 9px; }
.device-patient-line .line-icon-button { flex: 0 0 auto; }
.device-empty-line { padding: 7px 0; color: #a0aaba; font-size: 10px; }
.device-account-foot { margin-top: 10px; padding-top: 9px; border-top: 1px solid #edf0f4; display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #8b98aa; font-size: 10px; }
.device-account-foot b { color: #4e6e9b; font-weight: 600; }
.device-card-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.capture-setup-box { padding: 12px; border: 1px solid #dfe8f6; border-left: 3px solid #5f86ca; border-radius: 6px; background: #f7faff; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.capture-setup-box strong, .capture-setup-box small { display: block; }
.capture-setup-box strong { color: #385579; font-size: 12px; }
.capture-setup-box small { margin-top: 5px; color: #7c8da5; font-size: 10px; }
.standard-device-add-modal-card { width: min(520px, 100%); }
.standard-account-bind-modal-card { width: min(520px, 100%); }
.standard-app-capture-modal-card { width: min(620px, 100%); max-height: min(820px, calc(100vh - 32px)); overflow-y: auto; }
.standard-app-capture-modal-card .standard-modal-field textarea { min-height: 180px; }
.app-capture-auto-foot { padding-top: 10px; }
.standard-section-divider { display: flex; align-items: center; gap: 10px; margin: 14px 0 2px; color: #8795a8; font-size: 10px; }
.standard-section-divider::before, .standard-section-divider::after { content: ""; height: 1px; background: #e5eaf0; flex: 1; }
.standard-doctor-modal-card { width: min(520px, 100%); }
.task-preflight { margin-top: 14px; padding: 11px 12px; border: 1px solid #dfe6ef; border-radius: 6px; color: #52657e; background: #fafcff; font-size: 11px; }
.task-preflight > div { display: flex; justify-content: space-between; gap: 12px; }
.task-preflight > div strong { color: #314762; }
.task-preflight > div span { color: #8492a5; }
.task-preflight ul { margin: 9px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.task-preflight li { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 8px; }
.task-preflight li strong { color: #60728b; }
.task-preflight li span { min-width: 0; overflow-wrap: anywhere; }
.task-preflight.is-ready { border-color: #cce7d8; background: #f5fbf7; }
.task-preflight.has-errors { border-color: #efcbd0; background: #fff8f8; }
.task-preflight .is-ok strong { color: #25714d; }
.task-preflight .is-error strong { color: #b34451; }
.account-bind-capture { margin-bottom: 14px; }
.standard-login { min-height: 100vh; margin: 0; color: #18283d; background: #f5f7fb; display: grid; place-items: center; font-family: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif; }
.standard-login-card { width: min(360px, calc(100% - 36px)); padding: 28px; border: 1px solid #e1e7ef; border-radius: 10px; background: #fff; box-shadow: 0 16px 45px rgba(26, 43, 74, .09); }
.standard-login-card > .standard-brand-mark { margin-bottom: 22px; }
.standard-login-card h1 { margin: 8px 0; color: #192a43; font-size: 22px; }
.standard-login-card p { margin: 0 0 22px; color: #8290a4; font-size: 12px; }
.standard-login-card form { display: grid; gap: 14px; }
.standard-login-card label span { display: block; margin-bottom: 6px; color: #61728a; font-size: 11px; font-weight: 700; }
.standard-login-card input { width: 100%; height: 36px; box-sizing: border-box; border: 1px solid #dce4ee; border-radius: 5px; padding: 0 9px; outline: none; }
.standard-login-card input:focus { border-color: #86a9e4; box-shadow: 0 0 0 3px #edf3ff; }
.standard-login-card .standard-primary { width: 100%; }
@media (max-width: 900px) {
  .standard-sidebar { width: 190px; }
  .standard-main { margin-left: 190px; padding-right: 24px; padding-left: 24px; }
  .standard-two-col, .standard-settings-grid { grid-template-columns: 1fr; }
  .standard-form-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 650px) {
  .standard-sidebar { position: static; width: auto; padding: 13px; border-right: 0; border-bottom: 1px solid #e2e7ef; }
  .standard-brand { padding-bottom: 12px; }
  .standard-nav { grid-template-columns: repeat(5, 1fr); }
  .standard-nav button { min-height: 35px; justify-content: center; padding: 0 2px; font-size: 10px; }
  .standard-nav button span { display: none; }
  .standard-sidebar-foot { display: none; }
  .standard-main { margin-left: 0; padding: 0 13px 35px; }
  .standard-topbar { height: 62px; }
  .standard-topbar h1 { font-size: 20px; }
  .standard-top-actions { font-size: 9px; }
  .standard-hero { align-items: flex-start; flex-direction: column; gap: 14px; }
  .standard-hero .standard-primary, .standard-hero .standard-secondary { align-self: flex-end; }
  .standard-stat-grid, .standard-resource-grid { grid-template-columns: repeat(2, 1fr); }
  .standard-stat-grid article, .standard-resource-grid article { min-height: 94px; padding: 13px; }
  .standard-stat-grid strong, .standard-resource-grid strong { font-size: 23px; }
  .standard-toolbar { align-items: stretch; flex-wrap: wrap; }
  .standard-toolbar input { width: calc(100% - 0px); }
  .standard-toolbar select { flex: 1; }
  .standard-toolbar .standard-count { margin-left: 0; }
  .resource-filter-bar { align-items: stretch; flex-direction: column; }
  .resource-filter-bar input, .resource-filter-bar select { width: 100%; }
  .resource-event-row { grid-template-columns: 92px 45px minmax(0, 1fr); }
  .resource-event-row > span:last-child { grid-column: 3; }
  .standard-panel { padding: 14px 13px; }
  .standard-form-grid { grid-template-columns: 1fr; }
  .standard-form-grid .span-2 { grid-column: auto; }
  .schedule-picker-entry { align-items: stretch; flex-direction: column; }
  .schedule-picker-filters { grid-template-columns: 1fr 1fr; }
  .schedule-picker-row { align-items: flex-start; flex-direction: column; gap: 7px; }
  .schedule-picker-row > span:last-child { min-width: 0; text-align: left; }
  .standard-form-foot { align-items: flex-end; flex-wrap: wrap; }
  .standard-modal-card > form > .standard-form-foot { bottom: -18px; padding-bottom: 4px; }
  .standard-order-detail { grid-template-columns: 1fr; }
  .device-detail-summary, .device-detail-meta { grid-template-columns: repeat(2, 1fr); }
  .device-detail-identity { grid-column: 1 / -1; }
  .device-detail-stat:nth-child(3) { border-left: 0; }
  .device-detail-meta div:nth-child(3) { grid-column: 1 / -1; padding-top: 9px; padding-left: 0; border-top: 1px solid #edf0f4; border-left: 0; }
  .device-account-grid { grid-template-columns: 1fr; }
  .device-proxy-editor { align-items: stretch; flex-direction: column; }
  .device-proxy-editor .standard-secondary { width: 100%; }
  .standard-form-foot > span { width: 100%; margin-right: 0; line-height: 1.5; }
  .task-preflight > div { align-items: flex-start; flex-direction: column; gap: 4px; }
  .task-preflight li { grid-template-columns: 72px minmax(0, 1fr); }
  .standard-modal { padding: 0; align-items: flex-end; }
  .standard-modal-card { max-height: calc(100vh - 20px); padding: 18px 15px; border-radius: 10px 10px 0 0; }
}

.order-payment-observation { min-width: 170px; }
.order-payment-observation small { max-width: 230px; white-space: normal; overflow-wrap: anywhere; }
[data-payment-deadline] { font-variant-numeric: tabular-nums; min-height: 1.5em; }
