:root {
  color-scheme: light;
  --bg: #f5f7f8; --surface: #fff; --ink: #172b33; --muted: #64727c;
  --line: #e4ebef; --accent: #007f73; --tint: #e4f4f0; --danger: #a73e37;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 15px; color: var(--ink); background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button, select, a { touch-action: manipulation; }
button, a { cursor: pointer; }
button { color: inherit; }
button:disabled { opacity: .5; cursor: default; }
a { color: var(--accent); text-decoration: none; }
:focus-visible { outline: 3px solid #168e80; outline-offset: 3px; }
[hidden] { display: none !important; }
.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.phone-shell { width: 100%; max-width: 480px; min-height: 100dvh; margin: auto; background: var(--bg); }
.brand-bar { display: flex; align-items: center; justify-content: space-between; padding: max(14px, env(safe-area-inset-top)) 20px 8px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-size: 23px; font-weight: 750; letter-spacing: -.7px; }
.brand img { object-fit: contain; }
.icon-button { width: 44px; height: 44px; display: inline-grid; place-items: center; border: 0; background: transparent; border-radius: 50%; }
.icon-button svg { width: 27px; height: 27px; }
main#content { padding: 12px 20px calc(108px + env(safe-area-inset-bottom)); }
h1 { font-size: 30px; line-height: 1.2; margin: 0; letter-spacing: -.7px; }
h2 { font-size: 18px; margin: 0; line-height: 1.4; }
h3 { font-size: 16px; margin: 0; }
p { line-height: 1.6; }
.page-heading { display: flex; justify-content: space-between; align-items: center; margin: 5px 0 8px; gap: 8px; }
.muted { color: var(--muted); font-size: 13px; }
.subtitle { margin: 8px 0 22px; }
.metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.metric { min-width: 0; padding: 18px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); text-align: left; }
.metric > span { display: block; color: var(--muted); font-size: 13px; }
.metric strong { display: block; margin-top: 8px; font-size: 31px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; letter-spacing: -.8px; font-variant-numeric: tabular-nums; }
.metric.primary strong { color: var(--accent); }
.panel { padding: 18px 15px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); margin: 0 0 18px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 15px; }
.text-button { background: transparent; border: 0; color: var(--accent); padding: 8px 0; min-height: 44px; font-size: 13px; }
.section-heading a { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; }
.section-heading a svg { width: 17px; height: 17px; }
.user-row { display: flex; gap: 12px; align-items: center; width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 15px 0; text-align: left; color: var(--ink); }
.user-row:last-child { border-bottom: 0; }
.avatar { width: 42px; height: 42px; display: grid; place-items: center; flex-shrink: 0; border-radius: 50%; background: var(--tint); color: var(--accent); font-size: 18px; font-weight: 600; }
.user-copy { flex: 1; min-width: 0; }
.user-copy strong, .user-copy small { display: block; overflow-wrap: anywhere; }
.user-copy strong { font-size: 15px; font-weight: 600; }
.user-copy small { color: var(--muted); font-size: 12px; line-height: 1.7; }
.row-chevron { width: 18px; height: 18px; color: var(--muted); }
.row-time { max-width: 72px; text-align: right; flex-shrink: 0; font-size: 11px; }
.badges { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 7px; }
.badge { background: var(--tint); color: var(--accent); font-size: 11px; padding: 3px 7px; border-radius: 5px; line-height: 1.4; }
.badge.neutral { background: #edf0f2; color: #53616c; }
.badge.warning { background: #fff1db; color: #82571e; }
.bottom-nav { position: fixed; z-index: 10; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; background: var(--surface); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, 1fr); padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); }
.bottom-nav a { color: var(--muted); display: flex; align-items: center; flex-direction: column; justify-content: center; gap: 4px; min-height: 51px; font-size: 12px; }
.bottom-nav a[aria-current="page"] { color: var(--accent); font-weight: 650; }
.bottom-nav a[aria-current="page"] svg { stroke-width: 2.4; }
.search-form { margin: 18px 0 12px; display: flex; gap: 8px; }
.search-input { display: flex; align-items: center; flex: 1; min-width: 0; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.search-input svg { width: 18px; color: var(--muted); }
.search-input input { border: 0; width: 100%; min-width: 0; padding: 14px 8px; background: transparent; outline-offset: -2px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 46px; border: 1px solid var(--accent); border-radius: 12px; padding: 10px 15px; background: var(--accent); color: white; font-weight: 600; font-size: 14px; }
.secondary { background: white; color: var(--accent); border-color: var(--line); }
.full-width { width: 100%; }
.chips { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; padding: 4px 1px 9px; }
.chip { flex: 0 0 auto; min-height: 42px; padding: 9px 13px; border: 1px solid var(--line); border-radius: 10px; background: white; font-size: 13px; }
.chip[aria-pressed="true"] { background: var(--tint); color: var(--accent); border-color: #b5ddd4; font-weight: 650; }
.filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 12px 0 18px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; font-size: 13px; }
input, select { min-height: 46px; min-width: 0; border: 1px solid #d7e2e7; border-radius: 10px; padding: 10px; color: var(--ink); background: white; width: 100%; font-size: 16px; }
input[type="date"] { width: 100%; max-width: 100%; }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; border-bottom: 1px solid var(--line); margin: 12px 0; }
.tab { min-height: 46px; border: 0; border-bottom: 2px solid transparent; background: transparent; font-size: 14px; color: var(--muted); }
.tab[aria-pressed="true"] { color: var(--accent); border-bottom-color: var(--accent); font-weight: 650; }
.message { padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: white; color: var(--muted); line-height: 1.6; overflow-wrap: anywhere; }
.message.error { color: var(--danger); border-color: #eed3d0; }
.loading { padding: 50px 0; color: var(--muted); text-align: center; }
.loading::before { content: ''; display: block; width: 24px; height: 24px; margin: 0 auto 12px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .loading::before { animation: none; } }
.chart { height: 156px; display: flex; align-items: stretch; gap: 5px; padding-top: 14px; overflow-x: auto; }
.bar-column { flex: 1; min-width: 18px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.bar-area { display: flex; align-items: flex-end; width: 100%; flex: 1; border-bottom: 1px solid var(--line); }
.bar { width: 100%; min-height: 2px; background: var(--accent); border-radius: 3px 3px 0 0; }
.bar.gap { background: repeating-linear-gradient(45deg, #e4ebef, #e4ebef 2px, transparent 2px, transparent 4px); min-height: 12px; }
.bar-column small { margin-top: 6px; font-size: 10px; color: var(--muted); white-space: nowrap; }
.day-list { margin-top: 16px; border-top: 1px solid var(--line); }
.day-list summary { padding: 12px 0; font-size: 13px; color: var(--accent); }
.data-row { display: flex; align-items: start; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.data-row:last-child { border-bottom: 0; }
.data-row > :first-child { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.data-row > :last-child { text-align: right; overflow-wrap: anywhere; }
.detail-heading { display: flex; gap: 13px; align-items: center; margin: 22px 0; }
.detail-heading h1 { font-size: 24px; overflow-wrap: anywhere; }
.detail-heading .avatar { width: 54px; height: 54px; font-size: 24px; }
.detail-heading > div:last-child { min-width: 0; }
.detail-heading p { margin: 5px 0; overflow-wrap: anywhere; }
.detail-list { margin: 0; }
.detail-list .data-row { flex-direction: column; gap: 5px; }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; text-align: left; font-size: 15px; overflow-wrap: anywhere; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 9px; margin: 18px 0; }
.pagination .muted { text-align: center; }
.ranking-row { display: block; width: 100%; border: 0; background: transparent; text-align: left; padding: 15px 0; border-bottom: 1px solid var(--line); }
.ranking-row:last-child { border-bottom: 0; }
.ranking-title { display: flex; justify-content: space-between; gap: 12px; align-items: start; margin-bottom: 9px; }
.ranking-title strong { overflow-wrap: anywhere; font-size: 14px; }
.ranking-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 12px; font-size: 12px; color: var(--muted); }
.ranking-metrics b { color: var(--ink); margin-left: 5px; font-weight: 550; }
.order-row { display: block; text-align: left; width: 100%; padding: 17px 0; background: transparent; border: 0; border-bottom: 1px solid var(--line); }
.order-row:last-child { border-bottom: 0; }
.order-head { display: flex; align-items: start; justify-content: space-between; gap: 10px; margin-bottom: 5px; }
.order-head strong { font-size: 15px; overflow-wrap: anywhere; min-width: 0; }
.order-row small { display: block; overflow-wrap: anywhere; color: var(--muted); line-height: 1.7; font-size: 12px; }
.order-bottom { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 12px; }
.amount { font-weight: 650; font-variant-numeric: tabular-nums; }
.sheet { position: fixed; margin: auto auto 0; width: min(100%, 480px); max-height: 85dvh; overflow-y: auto; border: 0; border-radius: 22px 22px 0 0; padding: 20px 24px calc(24px + env(safe-area-inset-bottom)); color: var(--ink); }
.sheet::backdrop { background: #172b3366; }
.admin-name { overflow-wrap: anywhere; }
.login-shell { padding: max(32px, env(safe-area-inset-top)) 24px; }
.login-shell > select { width: auto; display: block; margin: 25px 0 40px; }
.login-shell h1 { margin-top: 32px; }
.login-form { margin-top: 35px; display: flex; flex-direction: column; gap: 22px; }
.login-form [role="alert"] { color: var(--danger); }
@media (max-width: 350px) { main#content { padding-left: 14px; padding-right: 14px; } .metric { padding: 16px 11px; } .metric strong { font-size: 27px; } .search-form .button { padding: 10px; } }
