:root {
  color-scheme: light;
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #333333;
  background: #f8f6f8;
  --accent: #8b5d6e;
  --accent-hover: #764c5b;
  --brand-secondary: #b48aa0;
  --brand-soft: #f5eef1;
  --brand-line: #dcccd6;
  --muted: #746d76;
  --line: #e6e3e7;
  --surface-subtle: #faf8fa;
  --white: #ffffff;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
button, input, select, textarea {
  min-height: 34px;
  border: 1px solid #d9d3da;
  border-radius: 6px;
  padding: 6px 10px;
  color: inherit;
  background: var(--white);
}
input, select, textarea { accent-color: var(--accent); }
input:hover, select:hover, textarea:hover { border-color: var(--brand-secondary); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: #7b717b; opacity: 1; }
button { cursor: pointer; white-space: nowrap; }
button:hover { border-color: var(--brand-secondary); color: var(--accent-hover); background: var(--surface-subtle); }
button:disabled { opacity: .5; cursor: default; }
button.primary { color: var(--white); background: var(--accent); border-color: var(--accent); font-weight: 600; }
button.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--white); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, p { margin: 0; }
h1 { font-size: 22px; font-weight: 650; letter-spacing: -.3px; }
h2 { font-size: 15px; font-weight: 650; }
label { display: grid; gap: 5px; font-size: 13px; font-weight: 600; }
label input, label select, label textarea { min-width: 0; font-weight: 400; }
label textarea { resize: vertical; }
label input[readonly] { background: var(--surface-subtle); color: var(--muted); }
.lead-highlight { background: var(--brand-soft); }
.followup-content { min-width: 180px; max-width: 440px; white-space: pre-wrap; overflow-wrap: anywhere; }
.checkbox-field { display: flex; align-items: center; gap: 8px; min-height: 34px; cursor: pointer; }
.checkbox-field input { width: 16px; height: 16px; min-height: 0; margin: 0; accent-color: var(--accent); }
.bulk-customer-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.bulk-delete-customer-list { max-height: 220px; overflow: auto; }
.contact-kinds { margin: 0; border: 0; padding: 0; }
.contact-kinds legend { font-size: 13px; font-weight: 600; padding: 0; }
.assignment-fields { display: grid; gap: 10px; }
.source-select-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.dispatch-preview { color: var(--accent); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.dispatch-preview::before { content: ""; display: inline-block; width: 5px; height: 5px; margin-right: 7px; border-radius: 50%; background: var(--brand-secondary); vertical-align: 2px; }
.dispatch-controls { display: grid; gap: 6px; justify-items: end; max-width: 100%; }
.dispatch-pause-duration { color: var(--accent-hover); font-size: 13px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.contact-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.contact-status button { min-height: 28px; padding: 3px 9px; }
.contact-reminder-item { display: grid; gap: 5px; margin-top: 12px; padding: 11px 12px; border-radius: 7px; background: var(--brand-soft); }
.contact-reminder-item p { color: var(--muted); font-size: 12px; }
.contact-reminder-item .link { justify-self: start; }
a, .link { color: var(--accent-hover); }
.link { border: 0; border-radius: 2px; background: transparent; padding: 1px 2px; min-height: 0; text-decoration: none; }
.link:hover { background: transparent; text-decoration: underline; text-underline-offset: 3px; }
.brand-logo { display: block; width: 112px; height: 56px; flex: 0 0 auto; color: var(--accent); }
.brand { display: flex; align-items: center; gap: 12px; min-height: 62px; padding: 0 4px; }
.brand-version { border-left: 1px solid var(--brand-line); padding-left: 10px; color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .4px; white-space: nowrap; }
.login { display: grid; place-items: center; min-height: 100vh; min-height: 100dvh; padding: 32px 24px; background: #f4edf6 url('/login-background.png') center / cover no-repeat; }
.login .login-panel { width: min(100%, 440px); display: grid; gap: 20px; padding: 30px 36px 36px; border: 1px solid #ffffffbd; border-radius: 20px; background: #ffffffbd; box-shadow: 0 18px 48px #5f3f6324; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.login-brand { justify-self: center; }
.login-brand .brand-logo { width: 176px; height: 88px; }
.login-panel h1 { display: flex; align-items: center; justify-content: center; gap: 24px; margin: -4px 0 12px; color: #8c8291; text-align: center; font-size: 18px; font-weight: 600; letter-spacing: .6px; }
.login-panel h1::before, .login-panel h1::after { content: ""; height: 1px; flex: 1; background: linear-gradient(90deg, transparent, #dcd1e2); }
.login-panel h1::after { transform: rotate(180deg); }
.login-panel label { gap: 8px; font-size: 14px; }
.login-input { display: block; position: relative; min-width: 0; }
.login-panel input { width: 100%; height: 44px; min-height: 44px; padding: 9px 42px; border-color: #ded5e4; border-radius: 8px; background: #ffffff66; font-size: 15px; }
.login-panel input:focus { border-color: var(--accent); background: #ffffffb3; }
.login-input-icon { position: absolute; left: 13px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: #9a91a2; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.login-password-toggle { position: absolute; right: 4px; top: 50%; display: grid; place-items: center; width: 36px; height: 36px; min-height: 0; padding: 8px; border: 0; border-radius: 6px; background: transparent; color: #8f849a; transform: translateY(-50%); }
.login-password-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.login-password-toggle[aria-pressed="true"] .eye-slash { display: none; }
.login-panel > button.primary { min-height: 44px; margin-top: 6px; border: 0; border-radius: 8px; background: linear-gradient(110deg, #a47791, #b28aa3); font-size: 20px; font-weight: 650; letter-spacing: 2px; }
.login-panel > button.primary:hover { background: linear-gradient(110deg, #93617d, #a47791); }
.login-panel .error { font-size: 13px; overflow-wrap: anywhere; }
.workspace { display: grid; grid-template-columns: 216px minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
aside { display: flex; flex-direction: column; gap: 22px; padding: 13px 12px 20px; background: var(--white); border-right: 1px solid var(--line); }
aside nav { display: grid; gap: 5px; }
aside nav button { display: flex; align-items: center; gap: 10px; position: relative; min-height: 40px; padding: 8px 12px; text-align: left; border: 1px solid transparent; background: transparent; color: #655e68; font-size: 13px; }
aside nav button:hover { background: var(--surface-subtle); color: var(--accent); border-color: transparent; }
aside nav button.selected { background: var(--brand-soft); color: var(--accent-hover); border-color: transparent; font-weight: 650; }
aside nav button.selected::before { content: ""; position: absolute; left: 0; top: 11px; bottom: 11px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
aside nav .nav-count { margin-left: auto; min-width: 20px; padding: 0 5px; border-radius: 10px; background: var(--brand-soft); color: var(--accent-hover); font-size: 11px; line-height: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.nav-icon { width: 17px; height: 17px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.nav-chevron { margin-left: auto; width: 14px; height: 14px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
aside nav button[aria-expanded="true"] .nav-chevron { transform: rotate(90deg); }
aside nav .customer-submenu { margin: -2px 0 3px 21px; padding-left: 13px; border-left: 1px solid var(--brand-line); }
aside nav .customer-submenu button { width: 100%; min-height: 32px; padding: 5px 12px; font-size: 12px; }
.appointment-toolbar { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; margin: 0 0 16px; }
.appointment-toolbar > label { display: grid; grid-template-rows: 20px 44px; align-content: start; gap: 8px; width: 240px; max-width: 100%; min-width: 0; }
.appointment-toolbar input, .appointment-toolbar select, .appointment-advanced select { -webkit-appearance: none; appearance: none; box-sizing: border-box; width: 100%; height: 44px; min-height: 44px; margin: 0; padding: 10px 12px; line-height: 22px; }
.appointment-toolbar select, .appointment-advanced select { padding-right: 32px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 17px) 19px, calc(100% - 13px) 19px; background-size: 4px 4px; background-repeat: no-repeat; }
.appointment-toolbar > button { height: 44px; }
.appointment-advanced { display: flex; flex-wrap: wrap; gap: 12px; padding: 14px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.appointment-advanced > label { display: grid; gap: 8px; width: 240px; max-width: 100%; min-width: 0; }
.appointment-calendar-scroll { overflow-x: auto; border-top: 1px solid var(--line); }
table.appointment-calendar { table-layout: fixed; min-width: 770px; width: 100%; border-collapse: collapse; }
.appointment-calendar th { padding: 11px 6px; text-align: center; font-size: 12px; color: var(--muted); background: var(--surface-subtle); }
.appointment-calendar td { height: 130px; vertical-align: top; padding: 9px 7px; white-space: normal; border: 1px solid var(--line); }
.appointment-calendar tr:last-child td { border-bottom: 0; }
.appointment-calendar td:first-child { border-left: 0; }
.appointment-calendar td:last-child { border-right: 0; }
.calendar-outside { background: #fcfbfc; }
.calendar-day-heading { display: flex; justify-content: space-between; align-items: center; gap: 3px; margin-bottom: 8px; }
.calendar-day-number { display: grid; place-items: center; width: 24px; height: 24px; font-size: 12px; font-weight: 600; }
.calendar-day-count { font-size: 11px; color: var(--accent); white-space: nowrap; }
.calendar-today .calendar-day-number { border-radius: 50%; color: white; background: var(--accent); }
.calendar-past .calendar-day-number { color: #b4aeb6; }
.appointment-calendar-group { display: block; width: 100%; margin: 0 0 6px; padding: 7px; text-align: left; border: 1px solid var(--brand-line); border-radius: 7px; background: var(--brand-soft); }
.appointment-calendar-group:hover { background: #ede2e9; border-color: var(--accent); }
.calendar-customer-name { display: block; margin-bottom: 16px; color: var(--accent-hover); font-size: 12px; line-height: 1.4; font-weight: 650; overflow-wrap: anywhere; }
.appointment-customer-name input { color: var(--accent-hover); background: var(--surface-subtle); font-weight: 600; }
.calendar-appointment { display: grid; gap: 2px; font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
.calendar-appointment + .calendar-appointment { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--brand-line); }
.calendar-time { color: var(--accent-hover); font-weight: 650; font-variant-numeric: tabular-nums; }
.calendar-hospital { font-weight: 550; }
.calendar-translator { color: var(--muted); }
.content { min-width: 0; }
.topbar { min-height: 55px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 24px; border-bottom: 1px solid var(--line); background: var(--white); }
#breadcrumb { color: var(--muted); font-size: 15px; font-weight: 600; }
.topbar-context { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 24px; min-width: 0; }
.workspace-clocks { display: grid; gap: 1px; color: var(--muted); font-size: 12px; line-height: 1.45; font-variant-numeric: tabular-nums; }
.workspace-clocks > span { display: flex; gap: 8px; white-space: nowrap; }
#staff { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.session .staff-name { min-height: 0; max-width: 180px; padding: 0; white-space: normal; overflow-wrap: anywhere; text-align: left; font-weight: 500; }
.staff-position { color: var(--muted); }
.session { display: flex; align-items: center; gap: 12px; margin-left: auto; color: var(--muted); font-size: 12px; }
.session button { min-height: 30px; padding: 4px 10px; font-size: 12px; }
#logout { color: var(--muted); }
.page { max-width: 1550px; margin: 0 auto; padding: 22px 24px; }
.page-heading, .panel-heading, .actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-heading { margin-bottom: 16px; }
.customer-title { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; }
.customer-title label { font-weight: 400; }
.customer-filter-form { padding: 16px; display: grid; gap: 16px; }
.customer-search-bar { display: grid; grid-template-columns: 130px minmax(0, 300px) max-content; gap: 12px; align-items: end; }
.customer-search-bar > label { min-width: 0; grid-template-rows: 20px 36px; align-content: start; }
.customer-search-bar input, .customer-search-bar select { -webkit-appearance: none; appearance: none; width: 100%; height: 36px; min-height: 36px; margin: 0; line-height: 1.4; }
.customer-search-bar select { padding-right: 30px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 15px, calc(100% - 12px) 15px; background-size: 4px 4px; background-repeat: no-repeat; }
.customer-search-bar > button { height: 36px; }
.customer-advanced { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.customer-filter-footer { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.customer-filter-summary { display: flex; flex-wrap: wrap; gap: 6px; margin-right: auto; }
.panel { border: 1px solid var(--line); background: var(--white); border-radius: 9px; overflow: hidden; }
.panel + .panel { margin-top: 14px; }
.panel-heading { min-height: 46px; padding: 11px 14px; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: 13px; font-variant-numeric: tabular-nums; }
th { color: #655a67; background: var(--surface-subtle); font-weight: 600; white-space: nowrap; }
td, th { padding: 9px 14px; border-top: 1px solid #efecf0; }
td { overflow-wrap: anywhere; }
tbody tr:hover { background: #fcf9fb; }
.empty { color: var(--muted); padding: 18px 14px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; padding: 12px 14px; }
.pager { display: flex; gap: 8px; justify-content: flex-end; padding: 10px 14px; border-top: 1px solid var(--line); }
.record { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 18px; padding: 0 14px 16px; margin: 0; }
.record dt { color: var(--muted); font-size: 12px; }
.record dd { margin: 3px 0 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.customer-detail-title { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; min-width: 0; }
.customer-detail-title h1 { overflow-wrap: anywhere; }
.customer-detail-id { padding-left: 18px; border-left: 1px solid var(--brand-line); color: var(--muted); font-size: 15px; font-variant-numeric: tabular-nums; }
.customer-source-summary, .customer-tag-summary { display: grid; gap: 7px; }
.customer-tags-entry { grid-column: 1 / -1; }
.customer-tag-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.customer-tag-category { min-width: 36px; margin-right: 3px; color: var(--muted); font-size: 12px; }
.customer-tag-summary > button { justify-self: start; }
.customer-tag-choices { margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 7px; }
.customer-tag-choices legend { padding: 0 5px; color: var(--accent-hover); font-weight: 600; }
.customer-tag-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 10px; }
.pill { display: inline-block; background: var(--brand-soft); color: var(--accent-hover); border-radius: 4px; padding: 2px 7px; font-size: 12px; font-weight: 500; }
.home-title, .home-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.home-title { gap: 10px; }
.home-filters { gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 7px; background: var(--white); }
.home-filters button { min-height: 28px; padding: 3px 10px; border-color: transparent; background: transparent; color: var(--muted); font-size: 12px; }
.home-filters button[aria-pressed="true"] { color: var(--accent-hover); background: var(--brand-soft); border-color: transparent; font-weight: 600; }
.home-metrics { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--line); }
.home-metric { padding: 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.home-metric:last-child { border-right: 0; }
.home-metric dt, .home-note { color: var(--muted); font-size: 12px; }
.home-metric dd { margin: 4px 0 0; font-size: 25px; font-weight: 600; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.home-metric:first-child dd, .home-metric:nth-child(2) dd { color: var(--accent-hover); }
.home-metric .metric-pending { color: var(--muted); font-size: 13px; line-height: 37px; font-weight: 400; letter-spacing: 0; }
.home-metric .metric-number { font: inherit; color: inherit; letter-spacing: inherit; max-width: 100%; padding: 0; text-align: left; white-space: normal; overflow-wrap: anywhere; }
.detail-source { margin: 10px 16px; color: var(--muted); font-size: 13px; }
.home-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; align-items: start; }
.home-grid .panel { margin-top: 0; min-width: 0; }
.home-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 16px; align-items: start; }
.home-overview { grid-column: 1; grid-row: 1; min-width: 0; }
.home-layout > .home-grid { margin-top: 0; }
.home-primary-grid { grid-column: 1; grid-row: 2; align-items: stretch; min-width: 0; }
.home-secondary-grid { grid-column: 1; grid-row: 3; min-width: 0; }
.home-side-channels { grid-column: 2; grid-row: 3; min-width: 0; margin-top: 0; }
.home-schedule-slot { grid-column: 2; grid-row: 1 / span 2; position: relative; align-self: stretch; min-width: 0; min-height: 0; }
.home-schedule-slot > .home-appointments { position: absolute; inset: 0; margin: 0; }
.home-appointments { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.home-appointments > .panel-heading { flex: 0 0 auto; }
.schedule-body { padding: 0 14px 14px; flex: 1; min-height: 0; overflow-y: auto; }
.schedule-month { font-size: 12px; font-weight: 600; color: var(--muted); margin: 4px 0 12px; }
.schedule-dates { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 3px; }
.schedule-day { display: grid; gap: 3px; min-width: 0; min-height: 54px; padding: 6px 2px; border: 0; background: transparent; text-align: center; }
.schedule-day span { font-size: 10px; color: var(--muted); }
.schedule-day strong { font-size: 14px; }
.schedule-day[aria-pressed="true"] { background: var(--accent); color: white; border-radius: 8px; }
.schedule-day[aria-pressed="true"] span { color: white; }
.schedule-summary { border-top: 1px solid var(--line); margin-top: 14px; padding: 12px 0 9px; font-size: 11px; color: var(--muted); }
.schedule-cards { display: grid; gap: 9px; }
.schedule-card { display: block; width: 100%; min-width: 0; text-align: left; padding: 11px 12px; border: 0; border-left: 3px solid; border-radius: 7px; }
.schedule-card:hover { filter: brightness(.98); }
.schedule-tone-0 { background: #fff2e9; border-left-color: #cf9569; }
.schedule-tone-1 { background: #edf3fa; border-left-color: #82a2c3; }
.schedule-tone-2 { background: #f2ecf7; border-left-color: #a08ab6; }
.schedule-card-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.schedule-card-title strong { font-size: 13px; overflow-wrap: anywhere; }
.schedule-arrow { font-size: 20px; line-height: 1; color: var(--muted); }
.schedule-date-label { display: block; color: var(--muted); font-size: 11px; margin: 3px 0 5px; }
.schedule-visit { display: grid; gap: 2px; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.schedule-visit + .schedule-visit { border-top: 1px solid #ffffffaa; padding-top: 7px; margin-top: 7px; }
.schedule-time { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.schedule-more { margin-top: 12px; width: 100%; background: transparent; font-size: 12px; }
.schedule-retry { margin: 0 14px 14px; }
.schedule-empty { color: var(--muted); margin: 0; padding: 18px 0; font-size: 12px; }
@media (min-width: 1051px) and (max-width: 1300px) {
  .home-layout .home-grid { grid-template-columns: 1fr; }
  .home-layout .home-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1050px) {
  .home-layout { grid-template-columns: 1fr; }
  .home-schedule-slot { grid-column: 1; grid-row: 3; position: static; }
  .home-schedule-slot > .home-appointments { position: static; }
  .home-schedule-slot .schedule-body { overflow: visible; flex: none; }
  .home-secondary-grid { grid-row: 4; }
  .home-side-channels { grid-column: 1; grid-row: 5; }
}
.dashboard-trend { padding: 0 16px 12px; }
.trend-controls { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 2px 0 8px; }
.trend-controls select { min-height: 30px; padding: 3px 8px; font-size: 12px; }
.trend-headline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.trend-headline strong { min-width: 0; overflow-wrap: anywhere; font-size: 28px; font-weight: 650; color: var(--accent-hover); letter-spacing: -.6px; font-variant-numeric: tabular-nums; }
.trend-chart { position: relative; min-width: 0; }
.trend-chart > svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-axis { fill: #827888; font: 12px -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; }
.chart-gridline { stroke: #ece5ed; stroke-width: 1; stroke-dasharray: 4 5; }
.trend-line { stroke: var(--accent); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.trend-guide { stroke: #b48aa0; stroke-width: 1; stroke-dasharray: 3 4; }
.trend-dot { fill: var(--accent); stroke: var(--white); stroke-width: 2; }
.trend-tooltip { position: absolute; z-index: 1; max-width: 82%; padding: 5px 8px; border: 1px solid #e6d9e4; border-radius: 7px; color: var(--accent-hover); background: #fffcffed; box-shadow: 0 3px 12px #593d5012; transform: translateX(-50%); font-size: 11px; font-variant-numeric: tabular-nums; pointer-events: none; white-space: nowrap; }
.chart-note { padding: 2px 16px 12px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.dashboard-trend > .chart-note { padding: 4px 0 0; }
.trend-goal { margin-top: 9px; color: var(--accent-hover); font-size: 12px; }
.chart-empty { position: absolute; inset: 40% 0 auto; text-align: center; color: var(--muted); font-size: 12px; }
.personal-summary { border-top: 1px solid var(--line); }
.personal-summary > summary { cursor: pointer; padding: 10px 14px; color: var(--accent-hover); font-size: 12px; }
.journey-chart { display: grid; grid-template-columns: minmax(140px, .95fr) minmax(150px, 1fr); align-items: center; gap: 8px; padding: 0 16px 2px; }
.journey-chart > svg { width: 100%; max-width: 245px; justify-self: center; }
.journey-total { fill: var(--accent-hover); font-size: 29px; font-weight: 650; font-variant-numeric: tabular-nums; }
.journey-caption { fill: var(--muted); font-size: 12px; }
.journey-segment { transition: opacity .15s; }
.journey-segment:hover { opacity: .8; }
.journey-legend { display: grid; gap: 6px; padding: 10px 0; }
.journey-legend-item { display: grid; grid-template-columns: 8px minmax(48px, 1fr) auto 38px; align-items: center; gap: 8px; min-height: 28px; padding: 3px 5px; border: 0; background: transparent; text-align: left; font-size: 12px; }
.journey-legend-item .home-note { text-align: right; font-size: 11px; }
.journey-swatch { width: 8px; height: 8px; border-radius: 50%; }
.home-funnel { display: grid; gap: 6px; margin: 0; padding: 4px 18px 18px; list-style: none; }
.home-funnel li { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 26px; padding: 3px 14px; border-radius: 999px; background: #f2eaf0; color: #685061; font-size: 12px; line-height: 20px; }
.home-funnel li strong { min-width: 24px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.home-funnel .link { padding: 0 2px; line-height: 20px; }
.home-funnel li:first-child { background: linear-gradient(90deg, #d4bacb, #e3d1dd); color: #543d4b; }
.home-funnel li:nth-child(2) { margin-inline: 3%; background: linear-gradient(90deg, #e0cad7, #ebdfe7); }
.home-funnel li:nth-child(3) { margin-inline: 6%; background: linear-gradient(90deg, #e9dae4, #f0e7ed); }
.home-funnel li:nth-child(4) { margin-inline: 9%; }
.home-funnel li:nth-child(5) { margin-inline: 12%; background: #f5eef2; }
.home-funnel li:nth-child(6) { margin-inline: 15%; background: #f8f4f7; }
.error { color: #a42e41; }
.error:empty { display: none; }
#notice { color: var(--accent-hover); background: var(--brand-soft); border: 1px solid var(--brand-line); padding: 8px 12px; margin-bottom: 14px; border-radius: 6px; font-size: 13px; }
#notice.error { color: #a42e41; background: #fceff1; border-color: #edc6cf; }
dialog { border: 1px solid var(--line); border-radius: 12px; width: min(calc(100% - 32px), 460px); max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); padding: 22px; box-shadow: 0 20px 70px #49334428; color: #333333; overflow-y: auto; }
dialog::backdrop { background: #30233066; }
dialog h2 { font-size: 18px; padding-bottom: 11px; border-bottom: 1px solid var(--line); }
dialog form, .fields { display: grid; gap: 12px; }
.order-receipt-preview { display: grid; gap: 6px; justify-items: start; }
.order-receipt-preview img { max-width: 100%; max-height: 230px; object-fit: contain; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.form-actions button { min-width: 66px; }
.dispatch-alert { position: fixed; z-index: 100; display: flex; flex-direction: column; right: max(24px, env(safe-area-inset-right)); bottom: max(24px, env(safe-area-inset-bottom)); width: min(340px, calc(100vw - 32px)); min-height: 240px; max-height: min(440px, calc(100dvh - 32px)); overflow-y: auto; padding: 17px 18px 16px; border: 1px solid var(--brand-line); border-top: 3px solid var(--accent); border-radius: 12px; background: var(--white); color: #333333; box-shadow: 0 12px 40px #593d5026; }
.dispatch-alert-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dispatch-alert .dispatch-alert-heading h2 { border: 0; padding: 0; font-size: 16px; color: var(--accent-hover); }
.dispatch-alert-heading h2::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: var(--accent); vertical-align: 2px; }
.dispatch-alert-heading button { min-height: 26px; width: 26px; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 21px; line-height: 26px; }
.dispatch-alert-summary { margin-top: 5px; color: var(--muted); font-size: 12px; }
.dispatch-alert-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 11px 12px; border-radius: 7px; background: var(--brand-soft); }
.dispatch-alert-identity, .dispatch-alert-timing { display: grid; gap: 4px; min-width: 0; }
.dispatch-alert-identity strong { font-size: 14px; font-weight: 600; }
.dispatch-alert-identity span { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.dispatch-alert-timing { flex: 0 0 auto; text-align: right; }
.dispatch-alert-timing span { color: var(--muted); font-size: 11px; }
.dispatch-alert-timing strong { font-size: 14px; color: var(--accent-hover); }
.dispatch-alert-timing .dispatch-alert-clock { font-size: 23px; line-height: 1.2; font-variant-numeric: tabular-nums; letter-spacing: .4px; }
.dispatch-alert-clock.urgent { color: #a42e41; }
.dispatch-alert-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 15px; }
.dispatch-alert-footer span { color: var(--muted); font-size: 12px; }
.dispatch-alert-footer button { min-width: 100px; }
@media (max-width: 1100px) {
  .home-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-metric:nth-child(3) { border-right: 0; }
}
@media (max-width: 860px) {
  .workspace { grid-template-columns: 192px minmax(0, 1fr); }
  .brand { gap: 8px; }
  .brand-logo { width: 100px; height: 50px; }
  .brand-version { padding-left: 7px; font-size: 9px; }
  .home-grid { grid-template-columns: 1fr; }
  .page, .topbar { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 680px) {
  .trend-headline strong { font-size: 25px; }
  .chart-axis { font-size: 20px; }
  .trend-tooltip { font-size: 10px; padding: 3px 5px; }
  .journey-chart { grid-template-columns: 1fr; gap: 0; }
  .journey-chart > svg { max-width: 200px; }
  .journey-legend { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px 8px; padding-top: 0; }
  .journey-legend-item { grid-template-columns: 7px minmax(42px,1fr) auto; gap: 5px; font-size: 11px; }
  .journey-legend-item .home-note { grid-column: 2 / -1; font-size: 10px; }
  .login { padding: 24px 16px; background-position: 68% center; }
  .login .login-panel { padding: 26px 24px 30px; gap: 18px; background: #ffffffdf; border-radius: 18px; }
  .customer-search-bar { grid-template-columns: 110px minmax(0, 1fr); }
  .customer-search-bar > button { grid-column: 1 / -1; }
  .customer-advanced { grid-template-columns: 1fr; }
  .dispatch-alert { right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); min-height: min(240px, calc(100dvh - 32px)); max-height: calc(100dvh - 32px); }
  .workspace { grid-template-columns: 1fr; }
  aside { gap: 9px; padding: 8px 12px 11px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { min-height: 43px; }
  .brand-logo { width: 92px; height: 44px; }
  aside nav { display: flex; flex-wrap: wrap; gap: 3px; }
  aside nav button { min-height: 34px; gap: 6px; padding: 6px 9px; }
  .nav-icon { width: 15px; height: 15px; }
  .page, .topbar { padding: 12px; }
  .topbar { flex-wrap: wrap; gap: 8px; }
  .session { gap: 8px; flex-wrap: wrap; }
  .record { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-metric:nth-child(3) { border-right: 1px solid var(--line); }
  .home-metric:nth-child(2n) { border-right: 0; }
  .home-metric dd { font-size: 23px; }
  .home-grid { grid-template-columns: 1fr; }
  .login { padding: 18px; }
  .login-panel { padding: 25px; }
  dialog { padding: 18px; }
}
