/* PC theme A: shared palette with miniprogram/styles/theme.wxss. */
:root { --ink:#203b35; --green:#176d58; --muted:#6c7d76; --line:#dfe7e2; --bg:#f5f7f6; --accent:#eaf3ee; --red:#b3343c; color-scheme:light; }
body { background:radial-gradient(ellipse at 40% 0, #eaf4f0 0, transparent 55%),var(--bg); }
button,input,select,textarea { transition:background-color .16s,border-color .16s,box-shadow .16s,color .16s; }
button { min-height:36px; padding:8px 14px; border-radius:8px; font-weight:500; }
button:hover:not(:disabled) { background:#edf5f1; border-color:#b6d3c4; }
button:active:not(:disabled) { background:#dbece3; }
button:focus-visible,a:focus-visible { outline:2px solid var(--green); outline-offset:3px; }
button.primary:hover:not(:disabled) { background:#125b49; border-color:#125b49; }
button.primary:active:not(:disabled) { background:#104d3e; }
button.danger:hover:not(:disabled) { color:#992b33; border-color:#edc5c9; background:#fff2f3; }
button:disabled { cursor:not-allowed; opacity:.48; }
button.small { min-height:30px; padding:6px 10px; }
button.link { min-height:0; padding:2px 0; border-radius:3px; line-height:1.6; color:var(--green); }
button.link:hover { background:transparent; text-decoration:underline; }
input,select,textarea { padding:9px 12px; min-height:38px; border-color:var(--line); border-radius:8px; line-height:1.4; }
input:focus,select:focus,textarea:focus { outline:0; box-shadow:0 0 0 3px #176d5814; }
input[type=checkbox],input[type=radio] { min-height:0; width:auto; accent-color:var(--green); }
input[type=file] { padding:8px; }
input[type=file]::file-selector-button { border:0; border-radius:5px; background:var(--accent); color:var(--green); padding:7px 12px; margin-right:12px; cursor:pointer; }
h1 { font-size:25px; letter-spacing:0; font-weight:650; }
h2 { font-size:17px; font-weight:650; }
.shell { grid-template-columns:224px minmax(0,1fr); }
.sidebar { background:white; color:var(--ink); border-right:1px solid var(--line); padding:26px 16px 20px; z-index:2; }
.sidebar .brand { color:var(--ink); font-size:20px; margin:0 8px 36px; gap:10px; }
.brand span { display:grid; place-items:center; width:40px; height:40px; padding:0; background:var(--green); color:white; border-radius:11px; font-size:22px; }
.sidebar .brand small { color:var(--muted); letter-spacing:1px; font-size:10px; margin-top:7px; }
.nav { gap:6px; }
.nav button { display:flex; gap:12px; align-items:center; color:#5b6c65; padding:12px 14px; min-height:44px; border:1px solid transparent; }
.nav button.active,.nav button.active:hover { background:var(--accent); color:var(--green); border-color:transparent; }
.nav button:hover:not(.active) { color:var(--ink); background:#f6f8f7; border-color:transparent; }
.nav-icon { width:19px; height:19px; flex:none; }
.sidebar-bottom { border-color:var(--line); padding:20px 8px 0; font-size:13px; }
.sidebar-bottom small { color:var(--muted); }
.sidebar-bottom button { color:var(--muted); border-color:var(--line); background:white; min-height:30px; }
.main { padding:30px 32px 48px; max-width:none; }
#content { max-width:1680px; margin:auto; }
.topbar { min-height:65px; margin-bottom:22px; gap:18px; }
.topbar p { margin-bottom:0; }
.topbar>.row { flex-wrap:wrap; justify-content:flex-end; }
.eyebrow { font-size:10px; letter-spacing:1.2px; margin-bottom:8px; color:var(--muted); }
#mobile-logout { display:none; }
.demo-banner { margin-bottom:20px; padding:9px 14px; background:#fffbef; border-color:#ede4c8; }
.panel,.stat { border-color:#e6ece8; border-radius:14px; box-shadow:0 2px 3px #203b3504; }
.panel { padding:22px; margin-bottom:20px; }
.panel-title h2 { margin:0; }
.stats { gap:16px; margin:20px 0; }
.stat { padding:20px 22px; position:relative; }
.stat strong { font-size:32px; margin:10px 0; line-height:1.2; letter-spacing:-.5px; }
.stat.accent { background:white; }
.stat.accent strong { color:var(--green); }
.stat small { display:block; }
button.stat { text-align:left; color:var(--ink); background:white; }
.stat strong small { display:inline; font-size:12px; font-weight:400; margin-left:6px; }
.customer-shortcuts { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-top:18px; }
.customer-shortcuts button { display:flex; align-items:center; gap:14px; background:#f7faf8; border-color:transparent; padding:14px; text-align:left; }
.customer-shortcuts strong { margin-left:auto; font-size:20px; color:var(--green); }
.visit-summary { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin:26px 0; }
.visit-summary strong { display:block; font-size:28px; margin-bottom:8px; }
.visit-summary span { font-size:12px; }
@media(max-width:1000px) { .customer-shortcuts {grid-template-columns:repeat(2,minmax(0,1fr));} }
.stat::before { content:''; position:absolute; top:21px; right:20px; width:8px; height:8px; border-radius:50%; background:#c7ded2; }
.notice { background:#f0f6f3; border:1px solid #e3eee7; color:#526a5e; padding:11px 14px; }
.dashboard-context { display:flex; gap:14px; align-items:center; justify-content:space-between; margin:16px 0; color:var(--muted); font-size:13px; flex-wrap:wrap; }
.dashboard-context strong { color:var(--ink); font-weight:600; }
.dashboard-context span { white-space:nowrap; }
th { font-size:12px; background:#f7f9f8; color:#6c7d76; padding:13px 14px; }
td { padding:14px; border-color:#eef2ef; line-height:1.6; }
tbody tr:hover { background:#fafcfb; }
td small { font-size:12px; margin-top:3px; }
.table-wrap { border:1px solid #e9eeeb; border-radius:9px; }
.table-wrap tbody tr:last-child td { border-bottom:0; }
.filters { gap:10px; align-items:center; padding-bottom:18px; border-bottom:1px solid #edf1ee; }
.filters input { min-width:150px; flex:1 1 160px; }
.filters input[name=q] { flex:2 1 220px; }
.customer-bulk { background:#f7faf8; border-radius:8px; padding:10px 12px; margin:0 0 16px; }
.customer-bulk small { margin-left:auto; }
.store-scope-bar { display:flex; flex-wrap:wrap; gap:6px; border-bottom:1px solid var(--line); padding-bottom:14px; }
.store-scope-bar button { background:transparent; border-color:transparent; padding:8px 14px; color:var(--muted); }
.store-scope-bar button.selected { color:var(--green); background:var(--accent); border-color:#cee2d7; font-weight:600; }
.store-scope-note { font-size:12px; color:var(--muted); margin:12px 0 18px; line-height:1.7; }
.store-scope-note span { margin-left:12px; color:#7f8c85; }
.store-search-row { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.store-search-row input[name=q] { flex:1 1 260px; width:auto; min-width:180px; }
.store-search-row>.select-control,.store-search-row>select { width:190px; flex:0 1 190px; }
.store-search-row>button { flex:none; }
.store-more { margin-top:14px; }
.store-more summary { width:fit-content; color:var(--green); cursor:pointer; font-size:13px; padding:6px 0; }
.store-more summary:focus-visible { outline:2px solid var(--green); outline-offset:3px; border-radius:4px; }
.store-more-fields { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; padding:14px; margin-top:8px; background:#f7faf8; border:1px solid #e7eee9; border-radius:10px; }
.store-more-fields label { display:flex; flex-direction:column; gap:6px; min-width:0; }
.store-filter-result { display:flex; align-items:baseline; flex-wrap:wrap; gap:10px 16px; padding:16px 0; font-size:12px; color:var(--muted); overflow-wrap:anywhere; }
.store-filter-result strong { color:var(--ink); font-weight:500; }
.store-filter-result span { flex:1; min-width:140px; }
.empty [data-store-scope] { margin-top:14px; }
@media(max-width:1100px) { .store-more-fields {grid-template-columns:repeat(2,minmax(0,1fr));} }
@media(max-width:700px) { .store-scope-bar button {padding:7px 10px;} .store-search-row>.select-control,.store-search-row>select {flex:1 1 160px;} .store-scope-note span {display:block;margin-left:0;} }
.pager { gap:8px; }
.pager>small { margin-right:auto; }
.detail-summary { background:#f5f9f7; gap:20px; }
.detail-summary small { display:block; margin-top:5px; }
.field { margin-bottom:16px; }
label { color:#53665c; font-size:12px; line-height:1.5; }
dialog { border:1px solid var(--line); border-radius:16px; padding:26px; width:min(880px,calc(100% - 40px)); max-width:880px; max-height:90dvh; }
dialog[open] { display:flex; flex-direction:column; overflow:hidden; }
dialog .modal-head { flex:none; }
.modal-body { min-height:0; overflow:auto; overscroll-behavior:contain; padding-right:12px; margin-right:-12px; scrollbar-gutter:stable; scrollbar-width:thin; scrollbar-color:#bdcbc4 transparent; }
.modal-body::-webkit-scrollbar { width:6px; height:6px; }
.modal-body::-webkit-scrollbar-thumb { background:#bdcbc4; border-radius:6px; }
.modal-body::-webkit-scrollbar-thumb:hover { background:#91a99b; }
.modal-body::-webkit-scrollbar-track { background:transparent; }
dialog::backdrop { background:#1d332d4d; backdrop-filter:blur(2px); }
.modal-head { padding-bottom:18px; border-bottom:1px solid #edf1ee; margin-bottom:22px; }
.modal-head small { display:block; }
.close { min-height:32px; width:32px; padding:0; background:#f3f6f4; color:var(--muted); flex:none; }
.form-section { grid-column:1/-1; color:var(--ink); font-size:14px; font-weight:600; padding:13px 0 11px; margin:0 0 14px; border-bottom:1px solid var(--line); }
.actions { gap:8px; }
.work-tabs { justify-content:flex-start; margin:0 0 16px; border-bottom:1px solid var(--line); padding-bottom:16px; }
.work-tabs #work-refresh { margin-left:auto; }
.work-route-filters { display:flex; gap:5px; padding:4px; width:fit-content; border-radius:9px; background:#f0f4f2; margin:16px 0; }
.work-route-filters button { border-color:transparent; background:transparent; min-height:32px; padding:6px 12px; }
.work-route-filters button.selected { background:white; color:var(--green); box-shadow:0 1px 4px #203b3512; }
.work-row>.actions { margin:0; max-width:45%; }
.record-excerpt { display:block; font-size:12px; color:var(--muted); margin-top:7px; max-width:100%; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; text-align:left; }
.record-body { white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.9; padding:18px; border-radius:8px; background:#f7faf8; }
.overview-tabs { display:flex; gap:8px; margin:18px 0; }
.overview-items .list-row button { text-align:left; }
.overview-items .list-row { padding:14px 0; }
.select-control { display:inline-flex; position:relative; width:100%; min-width:0; vertical-align:middle; }
.select-native { position:absolute!important; width:1px!important; height:1px!important; min-height:0!important; padding:0!important; margin:0!important; clip-path:inset(50%); overflow:hidden; opacity:0; }
.select-trigger { display:flex; align-items:center; gap:12px; justify-content:space-between; min-width:0; width:100%; height:38px; text-align:left; padding:8px 12px; background:white; font-weight:400; }
.select-trigger::after { content:''; width:6px; height:6px; border-right:1.5px solid #6c7d76; border-bottom:1.5px solid #6c7d76; transform:rotate(45deg); margin:-4px 2px 0 4px; flex:none; }
.select-trigger[aria-expanded=true] { border-color:var(--green); box-shadow:0 0 0 3px #176d5810; }
.select-trigger[aria-invalid=true] { border-color:var(--red); }
.select-label { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.filters .select-control { width:160px; flex:1 1 145px; max-width:230px; }
.select-popup { position:fixed; inset:auto; margin:0; padding:6px; border:1px solid var(--line); border-radius:10px; box-shadow:0 8px 28px #173b3726; background:white; color:var(--ink); z-index:1000; overflow:auto; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:#bdcbc4 transparent; }
.select-popup[hidden] { display:none!important; }
.select-popup input { position:sticky; top:0; margin-bottom:5px; background:#f7faf8; min-height:36px; }
.select-option { display:block; width:100%; min-height:36px; padding:9px 30px 9px 10px; border:0; text-align:left; font-size:13px; font-weight:400; position:relative; line-height:1.5; white-space:normal; overflow-wrap:anywhere; }
.select-option[aria-selected=true] { color:var(--green); background:var(--accent); font-weight:500; }
.select-option[aria-selected=true]::after { content:'✓'; position:absolute; right:10px; top:9px; }
.select-option:focus { outline:0; box-shadow:inset 0 0 0 1px #adcdbd; background:#f0f6f3; }
.select-empty { color:var(--muted); text-align:center; padding:14px 5px; margin:0; }
.login-art { background:#173f35; }
.login-art .brand span { background:#eaf3ee; color:var(--green); }
.login-side { background:radial-gradient(ellipse at top,#eaf4ef,transparent 65%),var(--bg); }
.login-card { background:white; border:1px solid var(--line); border-radius:16px; padding:32px; width:420px; box-shadow:0 8px 35px #203b3507; }
.login-card .notice { margin-bottom:0; }
.code { background:var(--accent); }
@media(min-width:1500px) { .main { padding:32px 40px 48px; } }
@media(max-width:1100px) { .shell { grid-template-columns:190px minmax(0,1fr); } .main {padding:24px;} .topbar {align-items:flex-start;} .stats {grid-template-columns:repeat(2,1fr);} }
@media(max-width:850px) { .work-row>.actions {max-width:100%;} }
@media(max-width:700px) { .shell {display:block;} .main {padding:20px 14px;} .sidebar {padding:14px; height:auto;} .sidebar .brand {margin:0;} .nav button {padding:9px;gap:6px;} .nav-icon {width:16px;height:16px;} #mobile-logout {display:block;} .topbar {flex-wrap:wrap;} .filters .select-control {max-width:none;width:auto;} .panel {padding:16px;} .login-card {padding:24px;} }
@media(prefers-reduced-motion:reduce) { *,*::before,*::after {transition:none!important;animation:none!important;} }
