:root {
  color-scheme: light;
  --brand: #287c7e;
  --brand-strong: #1e686c;
  --brand-soft: #e8f4f3;
  --brand-pale: #f3f9f8;
  --ink: #223337;
  --muted: #6e7f82;
  --line: #dfe7e7;
  --line-strong: #cbd8d8;
  --canvas: #f3f6f6;
  --card: #fff;
  --danger: #b84d4d;
  --danger-soft: #fff1f0;
  --warning: #a66b13;
  --warning-soft: #fff7e7;
  --success: #287758;
  --success-soft: #e8f6ef;
  --shadow: 0 8px 28px rgba(30, 70, 72, .08);
  --detail-width: 360px;
  --master-detail-gap: 8px;
  --preview-offset: 0px;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-size: 13px; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid rgba(40, 124, 126, .34);
  outline-offset: 2px;
}

.skip-link { position: fixed; left: 12px; top: -60px; z-index: 1000; padding: 8px 12px; background: #fff; color: var(--brand); border-radius: 6px; }
.skip-link:focus { top: 12px; }
.preview-banner { position: sticky; top: 0; z-index: 90; min-height: 34px; display: flex; justify-content: center; align-items: center; gap: 10px; padding: 6px 16px; background: #fff0c8; color: #754f0b; border-bottom: 1px solid #e9ca78; box-shadow: 0 2px 8px rgba(117, 79, 11, .08); }
.preview-banner strong { padding: 2px 7px; color: #fff; background: #9c6a11; border-radius: 4px; letter-spacing: .5px; }

.auth-view { min-height: calc(100vh - var(--preview-offset)); display: grid; place-items: center; padding: 28px; background: radial-gradient(circle at 14% 20%, #d7eeeb 0, transparent 34%), linear-gradient(145deg, #edf7f5, #f8faf9); }
.login-card { width: min(410px, 100%); padding: 34px; background: var(--card); border: 1px solid rgba(40, 124, 126, .14); border-radius: 18px; box-shadow: 0 24px 60px rgba(29, 78, 78, .14); }
.login-brand { display: grid; place-items: center; width: 48px; height: 48px; color: #fff; background: linear-gradient(145deg, #399697, #216d71); border-radius: 14px; font-size: 22px; font-weight: 800; box-shadow: 0 9px 20px rgba(40, 124, 126, .25); }
.eyebrow { margin: 20px 0 4px; color: var(--brand); font-size: 10px; font-weight: 700; letter-spacing: 1.4px; }
.login-card h1 { margin: 0; font-size: 24px; }
.login-copy { margin: 8px 0 22px; color: var(--muted); line-height: 1.7; }
.login-card label, .form-field > label { display: block; margin: 14px 0 6px; color: #526467; font-size: 12px; font-weight: 650; }
input, textarea { width: 100%; min-height: 36px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; color: var(--ink); outline: none; }
textarea { min-height: 82px; resize: vertical; line-height: 1.6; }
input:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(40, 124, 126, .09); }
input[readonly] { color: #667679; background: #f1f4f4; }
.login-submit { width: 100%; margin-top: 20px; }
.form-error, .inline-error { color: var(--danger); }
.form-error { margin: 10px 0 0; }
.inline-error { margin: 10px; padding: 10px 12px; background: var(--danger-soft); border: 1px solid #edcccc; border-radius: 7px; }

.platform-shell { height: calc(100vh - var(--preview-offset)); display: flex; flex-direction: column; overflow: hidden; }
.topbar { height: 60px; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 2px 12px rgba(27, 66, 68, .04); }
.topbar-brand { display: flex; align-items: center; gap: 10px; }
.topbar-mark { display: grid; place-items: center; width: 34px; height: 34px; color: #fff; background: linear-gradient(145deg, #3b9594, #287277); border-radius: 9px; font-weight: 800; }
.topbar-brand b, .topbar-brand small { display: block; }
.topbar-brand b { font-size: 15px; }
.topbar-brand small { margin-top: 1px; color: var(--muted); font-size: 10px; }
.topbar-account { display: flex; align-items: center; gap: 12px; color: #566a6d; }
.text-button { padding: 4px; border: 0; background: none; color: var(--brand); cursor: pointer; }
.shell-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 176px minmax(0, 1fr); }
.sidebar { padding: 18px 12px; color: #dceeed; background: linear-gradient(180deg, #1d6568, #164e53); }
.sidebar > p { margin: 0 10px 8px; color: rgba(255, 255, 255, .55); font-size: 10px; letter-spacing: 1px; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 9px; min-height: 38px; padding: 8px 11px; border: 0; border-radius: 7px; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.nav-item.active { background: rgba(255, 255, 255, .15); color: #fff; font-weight: 700; box-shadow: inset 3px 0 #9ee0dc; }
.sidebar-note { margin: 22px 5px 0; padding: 12px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 8px; background: rgba(255, 255, 255, .06); }
.sidebar-note b, .sidebar-note span { display: block; }
.sidebar-note b { margin-bottom: 5px; color: #fff; font-size: 11px; }
.sidebar-note span { color: rgba(255, 255, 255, .65); font-size: 10px; line-height: 1.6; }
.workspace { min-width: 0; min-height: 0; display: flex; flex-direction: column; padding: 9px 10px 10px; }
.menu-bar, .filter-bar, .customer-content { width: 100%; }
.menu-bar, .filter-bar { flex-shrink: 0; }
.menu-bar { height: 58px; display: flex; align-items: center; justify-content: space-between; padding: 0 15px; background: #fff; border: 1px solid var(--line); border-radius: 8px 8px 0 0; }
.breadcrumb { margin: 0 0 2px; color: var(--muted); font-size: 10px; }
.menu-bar h1 { margin: 0; font-size: 17px; }
.button { min-height: 34px; padding: 7px 13px; border: 1px solid transparent; border-radius: 6px; cursor: pointer; font-weight: 650; transition: background .15s, border-color .15s, opacity .15s; }
.button:disabled { opacity: .48; cursor: not-allowed; }
.button-primary { color: #fff; background: linear-gradient(135deg, #31898a, #246f73); border-color: #246f73; }
.button-primary:hover:not(:disabled) { background: var(--brand-strong); }
.button-secondary { color: #4d6265; background: #fff; border-color: var(--line-strong); }
.button-secondary:hover:not(:disabled) { border-color: #9ab8b8; background: #f9fbfb; }
.button-danger { color: var(--danger); background: var(--danger-soft); border-color: #e7c0c0; }
.button-warning { color: #925e0d; background: var(--warning-soft); border-color: #e9d2a3; }
.button-small { min-height: 29px; padding: 5px 9px; font-size: 11px; }

.filter-bar { min-height: 66px; display: grid; grid-template-columns: 240px 140px 140px auto minmax(0, 1fr); align-items: end; gap: 10px; padding: 10px 15px; background: #fff; border: solid var(--line); border-width: 0 1px 1px; }
.filter-field { min-width: 0; }
.filter-field > span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10px; }
.filter-field input { height: 34px; min-height: 34px; }
.filter-actions { display: flex; gap: 7px; }
.list-summary { align-self: center; justify-self: end; margin: 0 0 0 3px; color: var(--muted); white-space: nowrap; }
.choice { position: relative; }
.choice-trigger { width: 100%; height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; color: var(--ink); text-align: left; cursor: pointer; }
.choice-trigger::after { content: ""; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid #6f8082; transition: transform .15s; }
.choice.open .choice-trigger { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(40, 124, 126, .08); }
.choice.open .choice-trigger::after { transform: rotate(180deg); }
.choice-menu { position: absolute; z-index: 45; top: calc(100% + 4px); left: 0; right: 0; max-height: 240px; overflow: auto; padding: 4px; background: #fff; border: 1px solid var(--line-strong); border-radius: 7px; box-shadow: 0 12px 28px rgba(31, 69, 70, .14); }
.choice-menu button { width: 100%; min-height: 31px; padding: 6px 8px; border: 0; border-radius: 4px; background: #fff; color: #4a5d60; text-align: left; cursor: pointer; }
.choice-menu button:hover, .choice-menu button.active-option { color: var(--brand); background: var(--brand-soft); }

.customer-content { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) var(--detail-width); gap: var(--master-detail-gap); padding: 0 8px 8px; background: rgba(255,255,255,.9); border: 1px solid rgba(190,207,217,.65); border-top: none; border-radius: 0 0 10px 10px; overflow: hidden; }
.list-pane, .detail-pane { min-width: 0; min-height: 0; background: #fff; }
.list-pane { display: flex; flex-direction: column; overflow: hidden; }
.table-scroll { flex: 1; min-height: 0; overflow: auto; border: 1px solid #e0eaec; border-radius: 7px; background: #fff; scrollbar-color: #bdcece transparent; }
table { width: 100%; min-width: 680px; border-collapse: collapse; table-layout: fixed; }
th { position: sticky; top: 0; z-index: 2; height: 40px; padding: 10px 8px; color: #6d878f; background: #f5f9f9; border-right: 1px solid #eef3f4; border-bottom: 1px solid #e2ecee; font-size: 11px; font-weight: 650; text-align: center; white-space: nowrap; }
th:last-child, td:last-child { border-right: 0; }
th:nth-child(1) { width: 31%; } th:nth-child(2) { width: 15%; } th:nth-child(3) { width: 17%; } th:nth-child(4) { width: 14%; } th:nth-child(5) { width: 23%; }
td { height: 52px; padding: 8px; border-right: 1px solid #eef3f4; border-bottom: 1px solid #eaf0f1; color: #4a5a6e; vertical-align: middle; text-align: center; overflow: hidden; }
td:first-child { text-align: left; }
tbody tr { cursor: pointer; transition: background .12s; }
tbody tr:hover td, tbody tr.selected td { background: #edf8f7; }
tbody tr.selected td:first-child { box-shadow: inset 3px 0 var(--brand); }
.customer-primary, .customer-secondary { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.customer-primary { color: #2b4144; font-weight: 700; }
.customer-secondary { margin-top: 3px; color: var(--muted); font-size: 10px; }
.status-badge { display: inline-flex; align-items: center; max-width: 100%; padding: 3px 7px; border-radius: 999px; font-size: 10px; white-space: nowrap; }
.status-normal, .status-current, .status-enabled { color: var(--success); background: var(--success-soft); }
.status-buffer, .status-upcoming { color: var(--warning); background: var(--warning-soft); }
.status-stopped, .status-expired, .status-withdrawn { color: var(--danger); background: var(--danger-soft); }
.status-unregistered, .status-unopened, .status-neutral { color: #66777a; background: #edf1f1; }
.sync-dot { display: inline-block; width: 6px; height: 6px; margin-right: 5px; background: #b5c1c1; border-radius: 50%; vertical-align: 1px; }
.sync-dot.online { background: #4a9a77; }
.load-more-state { min-height: 42px; display: grid; place-items: center; color: var(--muted); font-size: 11px; }
.loading-state { padding: 18px; color: var(--muted); text-align: center; }
.empty-state { padding: 80px 20px; color: var(--muted); text-align: center; }
.empty-state > span { font-size: 34px; }
.empty-state b { display: block; margin: 8px 0; color: #506164; }
.empty-state p { margin: 0; }
.no-selection { padding: 60px 20px; color: var(--muted); text-align: center; }
.no-selection-mark { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 14px; color: var(--brand); background: var(--brand-soft); border-radius: 18px; font-size: 22px; font-weight: 800; }
.no-selection h2 { margin: 0 0 8px; color: var(--ink); }
.no-selection p { line-height: 1.8; }
.scope-note { display: flex; flex-direction: column; gap: 4px; margin-top: 18px; padding: 12px; color: #5d7073; background: var(--brand-pale); border: 1px solid #d7e8e7; border-radius: 7px; font-size: 11px; }

.detail-pane { width: var(--detail-width); display: flex; flex-direction: column; overflow: hidden; border: 1px solid #dce8ea; border-radius: 8px; }
.detail-header { min-height: 58px; flex-shrink: 0; display: flex; align-items: center; gap: 8px; padding: 13px 14px; background: linear-gradient(180deg, #f5fbfa, #edf6f5); border-bottom: 1px solid var(--line); }
.detail-header > div { min-width: 0; flex: 1; }
.detail-header h2, .detail-header p { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-header h2 { font-size: 15px; }
.detail-header p { margin-top: 2px; color: var(--muted); font-size: 10px; }
.icon-button, .mobile-back { border: 0; background: transparent; color: #637679; cursor: pointer; }
.icon-button { width: 30px; height: 30px; font-size: 21px; }
.mobile-back { display: none; }
.detail-scroll { flex: 1; min-height: 0; overflow: auto; padding: 10px; }
.detail-actions { display: grid; grid-template-columns: 1fr auto; gap: 7px; margin-bottom: 10px; }
.detail-actions .button-primary { grid-column: 1 / -1; }
.detail-section { margin-bottom: 9px; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 7px; }
.detail-section-title { min-height: 35px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 9px; color: #31595a; background: #edf7f6; border-bottom: 1px solid #dcebea; font-weight: 700; }
.detail-section-body { padding: 5px 9px 8px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 10px; }
.detail-field { min-width: 0; padding: 7px 0; border-bottom: 1px solid #eef1f1; }
.detail-field.wide { grid-column: 1 / -1; }
.detail-field span, .detail-field b { display: block; }
.detail-field span { margin-bottom: 3px; color: var(--muted); font-size: 10px; }
.detail-field b { overflow-wrap: anywhere; color: #405356; font-size: 11px; font-weight: 550; }
.detail-help { margin: 8px 0 2px; padding: 8px; color: #6a5a38; background: var(--warning-soft); border-radius: 5px; font-size: 10px; line-height: 1.6; }
.module-list { display: grid; gap: 5px; }
.module-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid #eef1f1; }
.module-row:last-child { border-bottom: 0; }
.event-list { display: grid; gap: 8px; }
.event-item { position: relative; padding-left: 14px; }
.event-item::before { content: ""; position: absolute; top: 5px; left: 1px; width: 6px; height: 6px; background: var(--brand); border-radius: 50%; }
.event-item b, .event-item span, .event-item small { display: block; }
.event-item b { font-size: 11px; }
.event-item span { margin: 3px 0; color: #506164; font-size: 10px; line-height: 1.55; overflow-wrap: anywhere; }
.event-item small { color: #899597; font-size: 9px; }
.section-empty { padding: 10px 0; color: var(--muted); font-size: 10px; text-align: center; }

.modal-backdrop { position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; padding: 18px; background: rgba(20, 48, 50, .55); }
.modal-card { width: min(620px, 100%); max-height: min(760px, 92vh); display: flex; flex-direction: column; overflow: hidden; background: #fff; border-radius: 10px; box-shadow: 0 28px 80px rgba(13, 43, 45, .28); }
.modal-card.modal-small { width: min(430px, 100%); }
.modal-head { min-height: 50px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 15px; background: #f3f9f8; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 15px; }
.modal-body { overflow: auto; padding: 15px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 11px 15px; background: #fafcfc; border-top: 1px solid var(--line); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.form-field.wide { grid-column: 1 / -1; }
.form-field small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.required { color: var(--danger); }
.modal-error { margin: 12px 0 0; padding: 9px 10px; color: var(--danger); background: var(--danger-soft); border-radius: 6px; line-height: 1.55; }
.impact-box { margin: 10px 0; padding: 10px 12px; color: #685a3e; background: var(--warning-soft); border: 1px solid #ead7ac; border-radius: 7px; line-height: 1.7; }
.impact-box strong { display: block; margin-bottom: 4px; color: #755317; }
.preview-box { margin-top: 12px; padding: 11px; background: var(--brand-pale); border: 1px solid #cfe5e3; border-radius: 7px; }
.preview-box b, .preview-box span { display: block; }
.preview-box span { margin-top: 5px; color: #506568; }
.preview-box em { color: var(--brand); font-style: normal; font-weight: 700; }
.modal-module-list { display: grid; gap: 8px; }
.modal-module-row { display: grid; grid-template-columns: minmax(110px, 1fr) 180px; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid #edf1f1; }
.confirm-copy { margin: 2px 0 0; color: #4e6164; line-height: 1.8; white-space: pre-line; }
.safe-access-link { display: inline-flex; margin-top: 10px; }
.credential-value { min-height: 78px; margin-top: 12px; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 11px; overflow-wrap: anywhere; }
.toast { position: fixed; z-index: 160; left: 50%; bottom: 24px; max-width: min(520px, calc(100% - 30px)); padding: 10px 14px; color: #fff; background: #213f41; border-radius: 7px; box-shadow: var(--shadow); opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #9f4545; }

.shared-dialog.modal-overlay { position: fixed; inset: 0; z-index: 120; display: none; place-items: center; padding: 18px; background: rgba(20, 48, 50, .55); }
.shared-dialog.modal-overlay.open { display: grid; }
.shared-dialog .modal-box { width: min(410px, 100%); overflow: hidden; background: #fff; border-radius: 10px; box-shadow: 0 28px 80px rgba(13, 43, 45, .28); }
.shared-dialog .modal-header { min-height: 50px; display: flex; align-items: center; gap: 10px; padding: 10px 15px; background: #f3f9f8; border-bottom: 1px solid var(--line); }
.shared-dialog .mh-icon { display: grid; place-items: center; width: 28px; height: 28px; color: #9b6b1e; background: #fff0ce; border-radius: 8px; font-weight: 800; }
.shared-dialog .modal-header h3 { flex: 1; margin: 0; font-size: 15px; }
.shared-dialog .mh-close { width: 30px; height: 30px; border: 0; background: transparent; color: #718184; font-size: 20px; cursor: pointer; }
.shared-dialog .modal-body { padding: 18px 20px 10px; }
.shared-dialog .modal-body p { margin: 0; color: #4e6164; line-height: 1.8; white-space: pre-line; }
.shared-dialog .modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 15px 15px; }
.shared-dialog .btn-cancel, .shared-dialog .btn-save { min-height: 34px; padding: 7px 15px; border-radius: 6px; cursor: pointer; font-weight: 650; }
.shared-dialog .btn-cancel { color: #4d6265; background: #fff; border: 1px solid var(--line-strong); }
.shared-dialog .btn-save { color: #fff; background: var(--brand); border: 1px solid var(--brand); }

@media (max-width: 900px) {
  .filter-bar { grid-template-columns: minmax(160px, 240px) minmax(120px, 140px) minmax(120px, 140px); }
  .filter-actions { grid-column: 1 / 3; }
  .list-summary { grid-column: 3; justify-self: end; }
  table { min-width: 640px; }
  th, td { padding-left: 6px; padding-right: 6px; }
}

@media (max-width: 700px) {
  .preview-banner { position: relative; align-items: flex-start; gap: 6px; padding: 7px 10px; font-size: 10px; text-align: center; }
  .auth-view { padding: 18px; }
  .login-card { padding: 25px 20px; }
  .topbar { height: 56px; padding: 0 12px; }
  .topbar-brand small, .topbar-account > span { display: none; }
  .shell-body { display: flex; }
  .sidebar { display: none; }
  .workspace { flex: 1; padding: 0; }
  .menu-bar { height: 58px; padding: 0 12px; border-width: 0 0 1px; border-radius: 0; }
  .breadcrumb { display: none; }
  .menu-bar h1 { font-size: 18px; }
  .filter-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 12px 12px; border-width: 0 0 1px; }
  .filter-query { grid-column: 1 / -1; }
  .filter-actions { grid-column: 1 / 2; }
  .filter-actions .button { flex: 1; }
  .list-summary { grid-column: 2; justify-self: end; }
  .customer-content, .customer-content.has-detail { min-height: 0; display: flex; padding: 0; border: 0; border-radius: 0; }
  .list-pane { flex: 1; padding: 0; }
  .table-scroll { padding: 8px 10px 18px; border: 0; border-radius: 0; background: #eef4f4; }
  table { min-width: 0; display: block; }
  thead { display: none; }
  tbody { display: grid; gap: 8px; }
  tbody tr { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 12px; padding: 13px 34px 12px 12px; border: 1px solid #dce7e7; border-radius: 9px; background: #fff; box-shadow: 0 2px 8px rgba(35,70,72,.035); }
  tbody tr::after { content: "›"; position: absolute; right: 12px; top: 16px; color: #879698; font-size: 20px; line-height: 1; }
  tbody tr:hover td, tbody tr.selected td { background: transparent; }
  tbody tr.selected { border-color: #82b8b8; background: #f4fafa; box-shadow: inset 3px 0 var(--brand), 0 2px 8px rgba(35,70,72,.05); }
  tbody tr.selected td:first-child { box-shadow: none; }
  td { height: auto; min-width: 0; padding: 0; border: 0; text-align: left; overflow: visible; }
  td:first-child { grid-column: 1 / -1; padding-right: 10px; }
  td:nth-child(n+2) { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; gap: 4px; }
  td:nth-child(n+2)::before { color: #88989a; font-size: 9px; line-height: 1; }
  td:nth-child(2)::before { content: "服务状态"; }
  td:nth-child(3)::before { content: "付费周期"; }
  td:nth-child(4)::before { content: "激活状态"; }
  td:nth-child(5)::before { content: "同步状态"; }
  .customer-primary { font-size: 14px; }
  td:nth-child(n+2) .customer-primary { max-width: 100%; font-size: 11px; font-weight: 650; }
  td:nth-child(n+2) .customer-secondary { max-width: 100%; margin-top: 0; }
  .detail-pane { display: none; position: fixed; inset: var(--preview-offset) 0 0; z-index: 80; width: 100%; height: auto; min-height: 0; border: 0; border-radius: 0; }
  .customer-content.has-detail .detail-pane { display: flex; }
  .detail-header { min-height: 58px; padding: 8px 10px; color: #fff; background: linear-gradient(115deg, #368e89, #287c7e 55%, #236c73); }
  .detail-header p, .detail-header .icon-button, .mobile-back { color: #fff; }
  .detail-header .icon-button { display: none; }
  .mobile-back { display: inline-flex; align-items: center; min-width: 62px; height: 38px; padding: 0 7px; border-radius: 7px; background: rgba(255, 255, 255, .12); }
  .detail-scroll { padding: 10px 10px calc(16px + env(safe-area-inset-bottom)); background: #eef4f4; }
  .no-selection { display: none; }
  .modal-backdrop { align-items: end; padding: 0; }
  .modal-card, .modal-card.modal-small { width: 100%; max-height: 94vh; border-radius: 14px 14px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .shared-dialog.modal-overlay { align-items: end; padding: 0; }
  .shared-dialog .modal-box { width: 100%; border-radius: 14px 14px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .form-grid { grid-template-columns: 1fr; }
  .form-field.wide { grid-column: auto; }
  .modal-module-row { grid-template-columns: minmax(0, 1fr) 150px; }
  .modal-foot { position: sticky; bottom: 0; }
  .toast { bottom: calc(16px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
/* The customer switch window searches only customer names. */
.customer-switch-mode .sidebar,.customer-switch-mode #add-customer,.customer-switch-mode .filter-field:not(.filter-query){display:none!important}
.customer-switch-mode .shell-body{grid-template-columns:minmax(0,1fr)}
.customer-switch-mode .filter-bar{grid-template-columns:minmax(160px,240px) auto minmax(0,1fr)}
