:root {
  color-scheme: dark;
  font-family: "DM Sans", "Noto Sans SC", -apple-system, BlinkMacSystemFont, sans-serif;
  background: #211f1c;
  color: #f4eee5;
  font-synthesis: none;
  --bg: #211f1c;
  --panel: #2b2824;
  --panel-2: #36322d;
  --line: #49433b;
  --muted: #b9ad9d;
  --text: #f4eee5;
  --accent: #d99a68;
  --accent-soft: #49362a;
  --mint: #8dc4a2;
  --green: #7fc091;
  --red: #e98778;
  --amber: #e6a85f;
  --radius: 18px;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
.hidden { display: none !important; }

.login-screen { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 520px); }
.login-brand { padding: clamp(30px, 7vw, 100px); display: flex; flex-direction: column; justify-content: space-between; background: radial-gradient(ellipse at 16% 16%, #59402f 0, transparent 42%), linear-gradient(145deg, #302a24, #211f1c 70%); }
.brand-lockup { display: flex; align-items: center; gap: 14px; font-weight: 700; letter-spacing: .02em; font-size: 20px; }
.brand-mark { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 16px; background: linear-gradient(145deg, #e0a36c, #a76d45); color: white; box-shadow: 0 10px 30px #d2925b44; }
.brand-copy { max-width: 560px; }
.brand-copy h1 { font-size: clamp(34px, 5vw, 62px); line-height: 1.1; margin: 0 0 20px; letter-spacing: -.04em; }
.brand-copy p, .brand-foot { color: #a6b2c3; line-height: 1.7; }
.login-panel { display: grid; place-items: center; padding: 32px; background: #282521; }
.login-card { width: min(100%, 390px); }
.login-card h2 { font-size: 28px; margin: 0 0 8px; }
.login-card > p { color: var(--muted); margin: 0 0 28px; }
.field { display: grid; gap: 8px; margin: 14px 0; }
.field label { color: #b6c1d0; font-size: 13px; font-weight: 600; }
.field input, .field select, .field textarea, .search-input { color: var(--text); background: #24211e; border: 1px solid var(--line); border-radius: 11px; padding: 12px 13px; outline: none; min-width: 0; }
.field textarea { min-height: 86px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px #d99a6822; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); border-radius: 11px; padding: 10px 14px; font-weight: 600; transition: .18s ease; }
.button:hover { border-color: #596985; transform: translateY(-1px); }
.button.primary { background: var(--accent); border-color: var(--accent); color: white; }
.button.quiet { background: transparent; }
.button.danger { color: var(--red); }
.button.small { padding: 7px 10px; font-size: 12px; }
.button.full { width: 100%; margin-top: 10px; padding: 13px; }
.error { color: #ff929b; background: #3a1e28; border: 1px solid #6b303d; border-radius: 10px; padding: 10px 12px; font-size: 13px; margin: 12px 0; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 238px minmax(0, 1fr); }
.sidebar { padding: 24px 15px 16px; background: #282521; border-right: 1px solid #39342e; display: flex; flex-direction: column; min-height: 100vh; position: sticky; top: 0; height: 100vh; }
.sidebar .brand-lockup { padding: 0 8px 28px; font-size: 16px; }
.sidebar .brand-mark { width: 38px; height: 38px; border-radius: 13px; }
.nav-label { color: #6f8094; text-transform: uppercase; font-size: 10px; font-weight: 700; letter-spacing: .12em; padding: 10px 12px; }
.nav-list { display: grid; gap: 4px; }
.nav-item { border: 0; width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; background: transparent; color: #9eacbe; border-radius: 11px; padding: 11px 12px; font-weight: 600; }
.nav-item:hover { background: #39342e; color: var(--text); }
.nav-item.active { color: #f5d7bb; background: var(--accent-soft); }
.nav-icon { width: 20px; text-align: center; font-size: 17px; }
.sidebar-bottom { margin-top: auto; border-top: 1px solid #202b3a; padding: 15px 8px 0; display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #d4d2ff; background: #242643; font-weight: 700; flex: 0 0 auto; }
.user-copy { min-width: 0; flex: 1; }
.user-copy strong, .user-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-copy small { color: var(--muted); margin-top: 3px; }
.main { min-width: 0; padding: 28px clamp(18px, 3.5vw, 52px) 50px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 28px; }
.topbar h1 { font-size: 28px; letter-spacing: -.025em; margin: 0; }
.topbar p { color: var(--muted); margin: 6px 0 0; font-size: 13px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.connection { display: inline-flex; align-items: center; gap: 7px; color: #9be2bd; background: #142a24; border: 1px solid #25513f; padding: 8px 11px; border-radius: 999px; font-size: 12px; }
.connection::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.connection.pending { color: #f1c47f; background: #3d3020; border-color: #74552d; }
.connection.pending::before { background: var(--amber); }
.connection.offline { color: #ffb0b6; background: #3a2029; border-color: #723541; }
.connection.offline::before { background: var(--red); }
.offline-start { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.offline-start .panel { width: min(100%, 520px); padding: 28px; }
.offline-start p { color: var(--muted); line-height: 1.65; }
.page-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 18px; }
.search-input { flex: 1; min-width: min(260px, 100%); padding: 11px 14px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat-card, .panel, .trip-card, .customer-card, .agency-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.stat-card { padding: 18px; min-height: 126px; }
.stat-top { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 13px; }
.stat-icon { color: var(--mint); background: #16332f; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; }
.stat-value { font-size: 30px; font-weight: 700; margin-top: 14px; letter-spacing: -.03em; }
.stat-note { color: var(--muted); margin-top: 3px; font-size: 12px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 24px 0 13px; }
.section-heading h2 { font-size: 17px; margin: 0; }
.section-heading small { color: var(--muted); }
.panel { padding: 18px; }
.trip-list { display: grid; gap: 12px; }
.trip-card { padding: 17px; display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 16px; align-items: start; }
.trip-time { background: #0c121b; border: 1px solid #293549; border-radius: 13px; padding: 12px 8px; text-align: center; }
.trip-time strong { display: block; font-size: 18px; }
.trip-time small { display: block; color: var(--muted); margin-top: 5px; }
.trip-main { min-width: 0; }
.trip-title { display: flex; flex-wrap: wrap; gap: 9px; align-items: baseline; }
.trip-title strong { font-size: 16px; }
.trip-title span, .trip-meta, .trip-route-label { color: var(--muted); font-size: 12px; }
.trip-route { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 6px 10px; margin-top: 12px; align-items: start; }
.trip-route-label { color: #90a0b3; }
.trip-route-value { min-width: 0; overflow-wrap: anywhere; font-size: 13px; }
.trip-meta { display: flex; flex-wrap: wrap; gap: 7px 14px; margin-top: 11px; }
.trip-price { text-align: right; font-size: 16px; font-weight: 700; white-space: nowrap; }
.trip-status, .pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 5px 9px; background: #202b3a; color: #b5c2d2; font-size: 11px; font-weight: 600; }
.pill.accent { background: #49362a; color: #f0c49f; }
.pill.green { background: #18382d; color: #8ce0b2; }
.pill.orange { background: #3d3020; color: #f1c47f; }
.pill.red { background: #3a2029; color: #ff9aa2; }
.customer-grid, .agency-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.customer-card, .agency-card { padding: 17px; display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.customer-id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.customer-initial { width: 43px; height: 43px; flex: 0 0 auto; border-radius: 15px; display: grid; place-items: center; background: #232442; color: #a9a5ff; font-size: 18px; font-weight: 700; }
.customer-info { min-width: 0; }
.customer-info strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.customer-info small { display: block; color: var(--muted); margin-top: 5px; line-height: 1.5; }
.customer-stats { display: flex; gap: 12px; align-items: center; color: #b7c4d3; font-size: 12px; white-space: nowrap; }
.trip-dashboard { display: grid; gap: 14px; }
.trip-dashboard .section-heading { margin: 3px 0 0; }
.trip-dashboard .tabs { margin-bottom: 0; }
.home-trip-dashboard { margin-top: 2px; }
.trip-date-strip { display: flex; gap: 9px; overflow-x: auto; padding: 2px 1px 5px; scrollbar-width: none; }
.trip-date-strip::-webkit-scrollbar { display: none; }
.trip-date-card { width: 82px; min-width: 82px; min-height: 78px; display: grid; justify-items: center; align-content: center; gap: 3px; padding: 8px 6px; border: 1px solid var(--line); border-radius: 17px; background: linear-gradient(145deg, #35312b, #2b2824); color: var(--text); transition: transform .18s ease, border-color .18s, background .18s; }
.trip-date-card:hover { transform: translateY(-2px); border-color: #55519c; }
.trip-date-card span, .trip-date-card small { color: var(--muted); font-size: 11px; }
.trip-date-card strong { font-size: 15px; }
.trip-date-card.active { color: white; border-color: #8884ff; background: linear-gradient(145deg, #706cf5, #514dc4); box-shadow: 0 8px 22px #514dc444; }
.trip-date-card.active span, .trip-date-card.active small { color: #e4e3ff; }
.trip-mode-switch { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.trip-mode-switch button { min-height: 38px; border: 0; border-radius: 11px; color: var(--muted); background: transparent; font-weight: 650; }
.trip-mode-switch button.active { color: #f5d7bb; background: #49362a; box-shadow: inset 0 0 0 1px #80583c; }
.trip-calendar { padding: 14px; border: 1px solid var(--line); border-radius: 17px; background: linear-gradient(145deg, #35312b, #2b2824); }
.calendar-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.calendar-heading strong { font-size: 14px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.calendar-weekdays { margin-bottom: 5px; color: var(--muted); text-align: center; font-size: 11px; }
.calendar-day { min-height: 42px; display: grid; justify-items: center; align-content: center; gap: 1px; border: 1px solid transparent; border-radius: 11px; color: var(--text); background: transparent; }
.calendar-day:disabled { color: #5e6b7d; cursor: default; }
.calendar-day.has-trips { background: #1d2939; border-color: #2e3d52; }
.calendar-day.active { color: white; background: var(--accent); border-color: #aaa7ff; }
.calendar-day small { color: var(--muted); font-size: 9px; }
.calendar-day.active small { color: #eeedff; }
.page-tools.trip-search-tools { margin: 0; }
.search-wrap { min-width: 200px; flex: 1; position: relative; display: flex; align-items: center; }
.search-wrap > span { position: absolute; left: 13px; color: var(--muted); font-size: 21px; line-height: 1; pointer-events: none; }
.search-wrap .search-input { width: 100%; padding-left: 40px; }
.trip-card-full { grid-template-columns: 78px minmax(0, 1fr); gap: 14px; padding: 16px; background: linear-gradient(145deg, #35312b, #2b2824 78%); }
.trip-card-full .trip-time { position: sticky; top: 12px; }
.trip-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.trip-heading .trip-price { flex: 0 0 auto; color: #f4f5ff; font-size: 18px; }
.trip-title { gap: 10px; align-items: center; }
.trip-title strong { font-size: 18px; }
.trip-title .trip-service { color: #f0c49f; background: #49362a; border-radius: 999px; padding: 5px 9px; font-size: 12px; font-weight: 650; }
.trip-facts { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.trip-facts span { padding: 5px 9px; border-radius: 999px; background: #202b3a; color: #b6c2d2; font-size: 11px; }
.trip-route-full { display: grid; grid-template-columns: minmax(0, 1fr); gap: 9px; margin-top: 17px; min-width: 0; width: 100%; }
.route-point { display: grid; grid-template-columns: 23px 74px minmax(0, 1fr); gap: 8px; align-items: baseline; position: relative; min-width: 0; width: 100%; }
.route-icon { color: var(--mint); font-size: 18px; line-height: 1; }
.route-point.end .route-icon { color: var(--amber); }
.route-point.stop .route-icon { color: #f0a857; }
.route-point .trip-route-label { color: var(--muted); }
.route-point .trip-route-value { grid-column: 3; min-width: 0; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.trip-flight { overflow: hidden; margin-top: 14px; border: 1px solid #494239; border-radius: 14px; background: #27241f; }
.flight-summary { width: 100%; display: flex; align-items: center; gap: 9px; padding: 11px 12px; border: 0; text-align: left; color: var(--text); background: transparent; }
.flight-summary:hover { background: #172333; }
.flight-plane { color: var(--accent); font-size: 17px; }
.flight-summary strong { font-size: 14px; }
.flight-summary small { color: var(--muted); }
.flight-summary b { margin-left: auto; color: #aaa7ff; font-size: 11px; }
.flight-chevron { color: var(--muted); }
.flight-details { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 0 12px 12px; }
.flight-details div { display: grid; gap: 4px; padding: 9px; border-radius: 10px; background: #17212e; }
.flight-details small, .trip-money-summary small { color: var(--muted); font-size: 10px; }
.flight-details strong { font-size: 12px; }
.trip-memo { margin: 12px 0 0; padding: 10px 12px; color: #b6c2d2; background: #182331; border-left: 2px solid #5854b7; border-radius: 0 10px 10px 0; font-size: 12px; line-height: 1.5; }
.trip-status-row { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #273447; }
.trip-money-summary { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 12px; }
.trip-money-summary span { display: grid; gap: 3px; }
.trip-money-summary strong { font-size: 13px; font-variant-numeric: tabular-nums; }
.trip-money-summary .trip-net { color: #83ddb1; }
.trip-expense-summary { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.trip-expense-summary span { color: #c5cfdb; background: #202b3a; border-radius: 8px; padding: 5px 8px; font-size: 10px; }
.trip-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.trip-actions .complete-action { color: #c9c7ff; border-color: #4b4784; background: #292747; }
.trip-actions .settle-action { color: #92e1b8; border-color: #285943; background: #18382d; }
.settlement-trip-summary { display: flex; align-items: center; gap: 13px; padding: 14px; border: 1px solid #303c50; border-radius: 15px; background: linear-gradient(120deg, #1d2939, #182331); }
.settlement-trip-summary strong { display: block; }
.settlement-trip-summary p { margin: 4px 0; color: #b4c1d1; font-size: 12px; }
.settlement-trip-summary small { display: block; color: var(--muted); line-height: 1.45; }
.settlement-expense-list { display: grid; gap: 8px; }
.settlement-expense { display: grid; grid-template-columns: 110px minmax(0, 1fr) minmax(90px, 140px) 38px; gap: 8px; align-items: center; }
.settlement-expense input, .settlement-expense select { width: 100%; min-width: 0; min-height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; color: var(--text); background: #0d151f; }
.settlement-empty { margin: 2px 0 8px; color: var(--muted); font-size: 12px; }
.settlement-net { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border: 1px solid #285943; border-radius: 14px; background: linear-gradient(110deg, #18382d, #172c2a); }
.settlement-net span { color: #b4d8c2; font-weight: 650; }
.settlement-net strong { color: #91e0b5; font-size: 21px; font-variant-numeric: tabular-nums; }
.tabs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.tab { border: 1px solid var(--line); background: var(--panel); color: #aab7c7; border-radius: 999px; padding: 8px 13px; font-size: 12px; font-weight: 600; }
.tab.active { background: var(--accent-soft); color: #c9c7ff; border-color: #55519c; }
.wallet-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); gap: 14px; }
.wallet-total { padding: 22px; background: linear-gradient(135deg, #24234b, #162d35); border: 1px solid #36385c; border-radius: var(--radius); }
.wallet-total small { color: #bbc3d1; }
.wallet-total strong { display: block; font-size: 34px; margin: 9px 0; }
.wallet-date-navigator { display: flex; align-items: center; justify-content: space-between; max-width: 540px; margin: 12px auto 18px; }
.wallet-date-navigator > strong { color: #e8edf5; font-size: 15px; line-height: 1.4; text-align: center; }
.wallet-chart-panel { display: flex; align-items: center; justify-content: center; gap: 28px; }
.wallet-chart { width: min(310px, 42vw); aspect-ratio: 1; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: conic-gradient(var(--wallet-chart)); box-shadow: inset 0 -8px 0 #080d14aa; }
.wallet-chart-center { width: 62%; aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 50%; background: #111b27; box-shadow: 0 0 0 1px #263447; text-align: center; }
.wallet-chart-center small { color: #8d9bad; font-size: 11px; }
.wallet-chart-center strong { margin-top: 6px; font-size: clamp(14px, 2vw, 22px); }
.wallet-chart-panel .finance-list { flex: 1 1 240px; min-width: 190px; }
.finance-row > span { display: flex; align-items: center; gap: 8px; }
.finance-row > span i { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--category-color); }
.finance-list { display: grid; gap: 12px; }
.finance-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid #253144; }
.finance-row:last-child { border-bottom: 0; }
.finance-row small { color: var(--muted); }
.finance-row strong { font-variant-numeric: tabular-nums; }
.empty { text-align: center; padding: 50px 20px; color: var(--muted); border: 1px dashed #344154; border-radius: var(--radius); }
.empty strong { color: var(--text); display: block; margin-bottom: 6px; }
.modal-backdrop { position: fixed; inset: 0; z-index: 10; background: #05080dcc; backdrop-filter: blur(8px); display: grid; place-items: center; padding: 20px; }
.modal { width: min(100%, 620px); max-height: min(90vh, 900px); overflow: auto; background: #2a2722; border: 1px solid #484138; border-radius: 20px; padding: 22px; box-shadow: 0 30px 90px #0007; }
.editor-modal { width: min(100%, 780px); padding: 24px; background: radial-gradient(ellipse at 100% 0%, #684a3444, transparent 40%), #2a2722; border-color: #484138; }
.editor-modal .modal-head { position: sticky; top: -24px; z-index: 2; margin: -24px -24px 18px; padding: 19px 24px 15px; background: #2a2722ed; backdrop-filter: blur(16px); border-bottom: 1px solid #403a32; }
.editor-form { display: grid; gap: 13px; }
.form-intro { display: flex; align-items: center; gap: 14px; padding: 15px 17px; border: 1px solid #554536; border-radius: 17px; background: linear-gradient(115deg, #45362a, #302c26); }
.form-emblem { width: 43px; height: 43px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 14px; color: #fff0df; background: linear-gradient(145deg, #dfa26d, #a66d45); box-shadow: 0 8px 22px #c5875144; font-size: 22px; }
.trip-intro .form-emblem { color: #e5f3e8; background: linear-gradient(145deg, #57866a, #475e50); }
.form-intro strong { display: block; font-size: 15px; letter-spacing: -.01em; }
.form-intro p, .form-section-title p { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.form-section { padding: 15px 17px 7px; border: 1px solid #464038; border-radius: 17px; background: linear-gradient(145deg, #35312b, #2d2a25); }
.form-section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 3px; }
.form-section-title h3 { margin: 0; font-size: 14px; letter-spacing: -.01em; }
.form-section .field { margin: 10px 0; }
.form-section .field label { font-size: 12px; color: #aab8c9; }
.form-section .field input, .form-section .field select, .form-section .field textarea { min-height: 43px; border-radius: 12px; background: #24211e; border-color: #494239; transition: border-color .18s, box-shadow .18s, background .18s; }
.form-section .field input:hover, .form-section .field select:hover, .form-section .field textarea:hover { border-color: #43546e; }
.form-section .field input:focus, .form-section .field select:focus, .form-section .field textarea:focus { background: #2c2822; }
.form-section .field input::placeholder, .form-section .field textarea::placeholder { color: #64748a; }
.service-type-field { min-width: 0; padding: 0; border: 0; }
.service-type-field legend { margin-bottom: 8px; color: #aab8c9; font-size: 12px; font-weight: 600; }
.service-type-picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.service-type-option { position: relative; min-height: 48px; display: flex; align-items: center; gap: 8px; padding: 8px 11px; overflow: hidden; border: 1px solid #494239; border-radius: 12px; color: #d6cec2; background: #24211e; cursor: pointer; transition: .18s ease; font-size: 13px; font-weight: 600; }
.service-type-option:hover { border-color: #52627a; background: #131e2b; }
.service-type-option input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.service-type-option:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.service-type-option.selected { color: #f5d7bb; border-color: #b87b4f; background: linear-gradient(120deg, #49362a, #39302a); box-shadow: inset 0 0 0 1px #d99a6822; }
.service-type-icon { width: 23px; flex: 0 0 auto; display: grid; place-items: center; color: #9290ff; font-size: 17px; }
.service-type-check { display: none; margin-left: auto; color: #9e9cff; font-size: 12px; }
.service-type-option.selected .service-type-check { display: inline; }
.order-source-field { min-width: 0; padding: 0; border: 0; }
.order-source-field legend { margin-bottom: 8px; color: #aab8c9; font-size: 12px; font-weight: 600; }
.order-source-picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.order-source-option { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid #494239; border-radius: 13px; color: #d6cec2; background: #24211e; cursor: pointer; }
.order-source-option input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.order-source-option.selected { color: #f5d7bb; border-color: #b87b4f; background: linear-gradient(120deg, #49362a, #39302a); }
.order-source-icon { color: #9693ff; font-size: 20px; }
.order-source-option strong, .order-source-option small { display: block; }
.order-source-option small { margin-top: 3px; color: #8190a2; font-size: 10px; }
.order-source-check { display: none; margin-left: auto; color: #aaa8ff; }
.order-source-option.selected .order-source-check { display: block; }
.customer-category-field { min-width: 0; padding: 0; border: 0; }
.customer-category-field legend { margin-bottom: 8px; color: #aab8c9; font-size: 12px; font-weight: 600; }
.customer-category-picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.customer-category-option { position: relative; display: grid; place-items: center; min-height: 43px; border: 1px solid #494239; border-radius: 12px; color: #d6cec2; background: #24211e; cursor: pointer; font-size: 12px; font-weight: 600; }
.customer-category-option input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.customer-category-option.selected { color: #f5d7bb; border-color: #b87b4f; background: linear-gradient(120deg, #49362a, #39302a); }
.customer-agency-fields { margin-top: 9px; }
.agency-info-fields { grid-column: 1 / -1; margin-top: 10px; }
.agency-selected-summary { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr) auto; gap: 12px; align-items: center; padding: 12px; border: 1px solid #29384a; border-radius: 13px; background: #111b27; }
.agency-selected-summary small, .agency-selected-summary strong { display: block; }
.agency-selected-summary small { color: #8796a9; font-size: 10px; }
.agency-selected-summary strong { margin-top: 4px; overflow-wrap: anywhere; font-size: 12px; }
.address-input-row { display: flex; align-items: stretch; gap: 6px; min-width: 0; }
.address-input-row input { min-width: 0; flex: 1 1 auto; }
.address-pick-button, .location-button { flex: 0 0 auto; padding: 0 10px; white-space: nowrap; }
.address-pick-button span { margin-left: 4px; }
.location-button { color: #a29fff; }
.route-fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; align-items: end; min-width: 0; }
.route-fields .field { min-width: 0; }
.route-fields > .field:first-child, .route-fields > .field:last-child { grid-column: 1; }
.route-fields .address-input-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 40px 40px; gap: 6px; width: 100%; }
.route-fields .address-input-row input { width: 100%; }
.route-fields .address-pick-button { padding: 0 8px; }
.route-fields .location-button { width: 40px; padding: 0; }
.route-swap { grid-column: 1; justify-self: center; height: 34px; padding: 0 12px; color: #f0c49f; }
.route-swap span { display: inline; margin-left: 5px; font-size: 11px; }
.stops-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.stops-heading label, .stops-heading small { display: block; }
.stops-heading small { margin-top: 3px; color: #8190a2; font-size: 10px; }
.stops-list { display: grid; gap: 8px; }
.stop-field { margin: 0; }
.stop-remove-button { flex: 0 0 40px; padding-inline: 0; font-size: 20px; }
.readonly-status { min-height: 42px; display: flex; align-items: center; padding: 0 12px; border: 1px solid #494239; border-radius: 11px; color: #d6cec2; background: #24211e; }
.toggle-line { display: flex; align-items: center; gap: 9px; color: #dce4ef; font-size: 13px; }
.toggle-line input { width: 17px; height: 17px; accent-color: #8582ff; }
.reminder-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.compact-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.reminder-fields .field small { display: block; margin-top: 5px; color: #8796a9; font-size: 10px; }
.second-reminder-toggle { align-self: center; }
.flight-lookup-row { display: flex; align-items: center; gap: 10px; }
.flight-lookup-result { color: #aeb8c6; font-size: 12px; }
.picker-backdrop { z-index: 15; }
.picker-modal { max-width: 560px; max-height: min(75vh, 700px); overflow: auto; }
.picker-list { display: grid; gap: 7px; }
.picker-row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px; border: 1px solid #29384a; border-radius: 12px; color: #e7edf5; background: #111b27; text-align: left; cursor: pointer; }
.picker-row:hover { border-color: #7774ff; background: #192336; }
.picker-row-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; color: #a29fff; background: #282744; }
.picker-row strong, .picker-row small { display: block; }
.picker-row strong { font-size: 16px; line-height: 1.35; }
.picker-row small { margin-top: 5px; color: #94a2b2; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.picker-row .pill { font-size: 12px; vertical-align: middle; }
.empty-hint { padding: 20px; color: #93a0b0; text-align: center; }
.dynamic-row-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dynamic-row-heading strong { font-size: 12px; }
.customer-contact-rows, .customer-address-rows { display: grid; gap: 8px; }
.dynamic-record { display: grid; grid-template-columns: minmax(100px, .55fr) minmax(0, 1fr) auto 40px; align-items: center; gap: 7px; padding: 8px; border: 1px solid #29384a; border-radius: 12px; background: #101923; }
.dynamic-record input, .dynamic-record select { min-width: 0; }
.default-choice { display: flex; align-items: center; gap: 5px; color: #9daaba; font-size: 10px; white-space: nowrap; }
.default-choice input { width: 14px; height: 14px; accent-color: #8582ff; }
.expense-catalog-panel .section-heading p { margin: 4px 0 0; color: #8d9bad; font-size: 11px; }
.expense-name-list { display: grid; gap: 7px; }
.expense-name-row { display: flex; gap: 8px; }
.expense-name-row input { flex: 1; min-width: 0; }
.detail-modal { max-width: 820px; }
.customer-detail-hero, .detail-summary { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid #29384a; border-radius: 15px; background: #111b27; }
.customer-detail-hero .customer-initial { width: 56px; height: 56px; font-size: 24px; }
.customer-detail-hero h3 { margin: 0 0 5px; }
.customer-detail-hero small, .detail-summary small { color: #91a0b1; }
.detail-summary { justify-content: space-between; }
.detail-summary strong { display: block; font-size: 18px; }
.detail-summary small { display: block; margin-top: 5px; font-size: 11px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.detail-grid > div { min-width: 0; padding: 10px; border-radius: 10px; background: #111a25; }
.detail-grid small, .detail-grid strong { display: block; }
.detail-grid small { margin-bottom: 5px; color: #8c9aab; font-size: 10px; }
.detail-grid strong { overflow-wrap: anywhere; font-size: 12px; }
.detail-record-list, .customer-history-list { display: grid; gap: 7px; }
.detail-record { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px; border: 1px solid #29384a; border-radius: 10px; background: #111a25; }
.detail-record strong, .detail-record span { display: block; }
.detail-record span { margin-top: 4px; color: #dae2ed; font-size: 12px; overflow-wrap: anywhere; }
.customer-history-row { display: grid; grid-template-columns: .65fr 1.7fr .7fr; gap: 10px; width: 100%; padding: 10px; border: 1px solid #29384a; border-radius: 10px; color: #e2e8f0; background: #111a25; text-align: left; cursor: pointer; }
.customer-history-row small, .customer-history-row strong { display: block; }
.customer-history-row small { margin-bottom: 4px; color: #8d9bad; font-size: 10px; }
.customer-history-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.detail-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.form-actions { position: sticky; bottom: -24px; z-index: 2; margin: 2px -24px -24px; padding: 15px 24px 20px; background: #111923ee; backdrop-filter: blur(16px); border-top: 1px solid #253246; }
.editor-modal .button { min-height: 42px; border-radius: 12px; }
.editor-modal .button.primary { box-shadow: 0 8px 20px #706dff33; }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 16px; }
.modal-head h2 { margin: 0; font-size: 19px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 12px; }
.toast { position: fixed; z-index: 20; right: 22px; bottom: 22px; padding: 12px 16px; border: 1px solid #3a7057; background: #153326; color: #a5e2bd; border-radius: 12px; box-shadow: 0 12px 34px #0006; }
.loading { min-height: 48vh; display: grid; place-items: center; color: var(--muted); }
.spinner { width: 26px; height: 26px; border: 2px solid #334054; border-top-color: var(--accent); border-radius: 50%; animation: spin .75s linear infinite; margin: 0 auto 12px; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 920px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .customer-grid, .agency-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .login-screen { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .login-panel { min-height: 100vh; padding: 24px; }
  .app-shell { display: block; padding-bottom: 72px; }
  .sidebar { position: fixed; z-index: 5; bottom: 0; top: auto; left: 0; right: 0; width: 100%; height: 66px; min-height: 0; border-right: 0; border-top: 1px solid #273447; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: #0e141eee; backdrop-filter: blur(16px); }
  .sidebar .brand-lockup, .nav-label, .sidebar-bottom { display: none; }
  .nav-list { display: flex; justify-content: space-around; height: 100%; }
  .nav-item { display: grid; justify-items: center; align-content: center; gap: 2px; min-width: 52px; padding: 5px 8px; font-size: 10px; }
  .nav-icon { font-size: 17px; line-height: 1.2; }
  .main { padding: 22px 14px 28px; }
  .topbar { align-items: flex-start; margin-bottom: 20px; }
  .topbar h1 { font-size: 24px; }
  .connection { font-size: 0; padding: 9px; }
  .connection::before { width: 8px; height: 8px; }
  .stats-grid { gap: 8px; }
  .stat-card { padding: 13px; min-height: 110px; }
  .stat-value { font-size: 24px; }
  .trip-card { grid-template-columns: 68px minmax(0,1fr); gap: 10px; padding: 12px; }
  .trip-time { padding: 9px 5px; }
  .trip-time strong { font-size: 15px; }
  .trip-price { grid-column: 2; grid-row: 1; }
  .trip-main { grid-column: 2; }
  .trip-route { grid-template-columns: 60px minmax(0,1fr); }
  .trip-dashboard { gap: 11px; }
  .trip-date-strip { margin: 0 -2px; }
  .trip-date-card { width: 74px; min-width: 74px; min-height: 72px; border-radius: 15px; }
  .trip-search-tools { align-items: stretch; }
  .trip-search-tools .search-wrap { min-width: 100%; }
  .trip-search-tools > .button { flex: 1; }
  .trip-card-full { grid-template-columns: 64px minmax(0,1fr); gap: 9px; padding: 11px; }
  .trip-card-full .trip-time { top: 8px; padding: 9px 4px; }
  .trip-heading { gap: 5px; }
  .trip-title { display: grid; align-items: start; gap: 6px; }
  .trip-title strong { font-size: 16px; }
  .trip-heading .trip-price { font-size: 16px; }
  .trip-facts { gap: 5px; }
  .trip-facts span { padding: 5px 7px; font-size: 10px; }
  .route-point { grid-template-columns: 19px 62px minmax(0, 1fr); gap: 5px; }
  .route-point .trip-route-value { font-size: 12px; }
  .route-point .trip-route-label { font-size: 10px; }
  .flight-summary { gap: 6px; padding: 9px; }
  .flight-summary small { display: none; }
  .flight-details { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .settlement-expense { grid-template-columns: 92px minmax(0,1fr) 90px 34px; gap: 5px; }
  .settlement-expense input, .settlement-expense select { padding: 7px; font-size: 12px; }
  .trip-money-summary { gap: 9px 14px; }
  .trip-money-summary strong { font-size: 12px; }
  .trip-actions { justify-content: flex-start; gap: 6px; }
  .trip-actions .button { flex: 1; min-width: 80px; padding-inline: 8px; font-size: 11px; }
  .customer-grid, .agency-grid { gap: 8px; }
  .customer-card, .agency-card { padding: 13px; }
  .customer-stats { display: none; }
  .wallet-layout { grid-template-columns: 1fr; }
  .wallet-chart-panel { flex-direction: column; }
  .wallet-chart { width: min(300px, 72vw); }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .modal-backdrop { padding: 10px; align-items: end; }
  .modal, .editor-modal { width: 100%; max-height: 94dvh; border-radius: 22px 22px 14px 14px; padding: 18px; }
  .editor-modal .modal-head { top: -18px; margin: -18px -18px 13px; padding: 15px 18px 12px; }
  .form-intro { padding: 12px; }
  .form-section { padding: 12px 13px 5px; }
  .service-type-picker { gap: 6px; }
  .service-type-option { min-height: 45px; gap: 5px; padding: 7px; font-size: 11px; }
  .service-type-icon { width: 18px; font-size: 15px; }
  .route-fields { grid-template-columns: minmax(0, 1fr); }
  .route-fields > .field:first-child, .route-fields > .field:last-child, .route-swap { grid-column: 1; grid-row: auto; }
  .route-swap { justify-self: end; height: 34px; margin: -5px 0; }
  .address-input-row { flex-wrap: wrap; }
  .address-input-row input { flex-basis: 100%; }
  .reminder-fields { grid-template-columns: 1fr; }
  .second-reminder-toggle { margin: 4px 0; }
  .order-source-picker { grid-template-columns: 1fr; }
  .agency-selected-summary { grid-template-columns: 1fr 1fr auto; }
  .dynamic-record { grid-template-columns: minmax(86px, .55fr) minmax(0, 1fr) auto 34px; gap: 5px; padding: 6px; }
  .form-actions { bottom: -18px; margin: 0 -18px -18px; padding: 12px 18px calc(14px + env(safe-area-inset-bottom)); }
}

/* Warm light theme */
:root {
  color-scheme: light;
  background: #f4f0e8;
  color: #302b25;
  --bg: #f4f0e8;
  --panel: #fffdf9;
  --panel-2: #f5f0e7;
  --line: #e3dacd;
  --muted: #81786d;
  --text: #302b25;
  --accent: #b97545;
  --accent-soft: #f2e4d7;
  --mint: #398a7d;
  --green: #3f8a5a;
  --red: #bf5b50;
  --amber: #b97935;
}
body { background: var(--bg); color: var(--text); }
.login-brand { background: radial-gradient(ellipse at 16% 16%, #ead6c1 0, transparent 42%), linear-gradient(145deg, #f2e7d8, #e8dfd2 70%); }
.brand-copy p, .brand-foot { color: #706457; }
.login-panel, .sidebar { background: #fbf8f2; }
.sidebar { border-right-color: var(--line); }
.nav-item { color: #71695f; }
.nav-item:hover { background: #f0e9de; color: var(--text); }
.nav-item.active { color: #8e542f; background: #f2e4d7; }
.sidebar-bottom { border-top-color: var(--line); }
.avatar { color: #8e542f; background: #f2e4d7; }
.field label, .form-section .field label, .service-type-field legend, .order-source-field legend, .customer-category-field legend { color: #71695f; }
.field input, .field select, .field textarea, .search-input,
.form-section .field input, .form-section .field select, .form-section .field textarea,
.settlement-expense input, .settlement-expense select { color: var(--text); background: #fffdf9; border-color: var(--line); }
.field input:focus, .field select:focus, .field textarea:focus, .search-input:focus { box-shadow: 0 0 0 3px #b9754522; }
.button { color: var(--text); }
.button:hover { border-color: #c3ad96; }
.button.primary { color: white; background: #b97545; border-color: #b97545; }
.button.danger { color: var(--red); }
.connection { color: #39744d; background: #e6f1e7; border-color: #c9dfcb; }
.stat-icon { background: #e4f0e8; }
.trip-time, .trip-flight, .flight-details div, .readonly-status,
.service-type-option, .order-source-option, .customer-category-option { color: var(--text); background: #f8f4ed; border-color: var(--line); }
.trip-card-full, .trip-date-card, .trip-calendar { background: linear-gradient(145deg, #fffdf9, #f7f2e9); }
.trip-date-card.active, .trip-mode-switch button.active { color: #8e542f; background: #f2e4d7; border-color: #d6b89b; }
.trip-title .trip-service, .pill.accent { color: #8e542f; background: #f2e4d7; }
.trip-facts span, .trip-expense-summary span, .pill, .trip-status { color: #655d53; background: #eee8de; }
.trip-actions .complete-action { color: #8e542f; border-color: #d6b89b; background: #f2e4d7; }
.trip-actions .settle-action, .pill.green { color: #39744d; border-color: #c9dfcb; background: #e6f1e7; }
.wallet-total { color: #fff8ef; background: linear-gradient(135deg, #a9673d, #7e7657); border-color: #c49a70; }
.wallet-total small, .wallet-date-navigator > strong { color: #fff3e2; }
.wallet-chart-center { color: var(--text); background: #fffdf9; box-shadow: 0 0 0 1px var(--line); }
.settlement-trip-summary { background: linear-gradient(120deg, #f4e9dc, #f8f3ea); border-color: var(--line); }
.settlement-trip-summary p { color: #6f665a; }
.settlement-net { color: #315d40; border-color: #c9dfcb; background: linear-gradient(110deg, #e6f1e7, #f0f5eb); }
.settlement-net span, .settlement-net strong { color: #39744d; }
.tab.active { color: #8e542f; background: #f2e4d7; border-color: #d6b89b; }
.modal, .editor-modal { color: var(--text); background: #fffdf9; border-color: var(--line); }
.editor-modal .modal-head, .form-actions { background: #fffdf9ed; border-color: var(--line); }
.form-section { background: linear-gradient(145deg, #fffdf9, #f8f4ed); border-color: var(--line); }
.form-intro { background: linear-gradient(115deg, #f4e5d5, #f4eee4); border-color: #e5d2bd; }
.form-emblem { color: #fff8ef; background: linear-gradient(145deg, #d99a68, #a9663e); }
.trip-intro .form-emblem { color: #eff8ee; background: linear-gradient(145deg, #6da287, #52735d); }
.service-type-option.selected, .order-source-option.selected, .customer-category-option.selected { color: #8e542f; border-color: #d6b89b; background: linear-gradient(120deg, #f5e5d6, #f2e9dc); }
.service-type-icon, .order-source-icon, .route-swap, .location-button { color: #a9653d; }
.picker-row:hover, .picker-row:focus-visible { color: #302b25; border-color: #c58b60; background: #f8f0e7; }
.picker-row:hover small, .picker-row:focus-visible small { color: #71695f; }
.picker-row { color: #302b25; border-color: #e3dacd; background: #fffdf9; }
.picker-row small { color: #71695f; }
.picker-row-icon { color: #9b633e; background: #f2e4d7; }
.address-picker-row { align-items: flex-start; }
.address-picker-copy { display: block; min-width: 0; flex: 1; }
.address-picker-row .picker-address-main { display: block; color: #302b25; font-size: 18px; font-weight: 700; line-height: 1.45; overflow-wrap: anywhere; }
.address-picker-row .picker-address-meta { display: flex; align-items: center; gap: 8px; margin-top: 7px; color: #81786d; font-size: 13px; line-height: 1.3; }
.address-picker-row .picker-address-meta .pill { display: inline-flex; width: auto; margin: 0; padding: 3px 9px; font-size: 11px; }
.address-picker-row:hover .picker-address-main, .address-picker-row:focus-visible .picker-address-main { color: #302b25; }
.agency-selected-summary { color: #302b25; border-color: #e3dacd; background: linear-gradient(135deg, #f7f1e8, #fffdf9); }
.agency-selected-summary small { color: #81786d; }
.agency-selected-summary strong { color: #302b25; }
.field input:focus, .field select:focus, .field textarea:focus, .search-input:focus,
.form-section .field input:focus, .form-section .field select:focus, .form-section .field textarea:focus {
  color: #302b25;
  background: #fffdf9;
  border-color: #b97545;
  box-shadow: 0 0 0 3px #b9754522;
}
.field input::placeholder, .field textarea::placeholder, .search-input::placeholder { color: #82796f; opacity: 1; }
.flight-details div { background: #f3eee5; }
.empty { border-color: #d4c9bb; }
.customer-detail-hero, .detail-summary { color: var(--text); background: linear-gradient(135deg, #f5e9dc, #fffaf2); border-color: #e5d6c4; }
.customer-detail-hero .customer-initial { color: #8e542f; background: #f0dfce; }
.customer-detail-hero small, .detail-summary small { color: #81786d; }
.detail-grid > div, .detail-record, .customer-history-row { color: var(--text); background: #fffdf9; border-color: #e3dacd; }
.detail-grid small, .customer-history-row small { color: #81786d; }
.detail-record span, .customer-history-row { color: #40392f; }
.customer-history-row:hover { background: #f8f0e7; border-color: #d8b99a; }
.dynamic-record { color: var(--text); background: #fffdf9; border-color: #e3dacd; }
.default-choice { color: #71695f; }
.default-choice input { accent-color: #b97545; }
.dynamic-record .button.danger { color: #bf5b50; background: #f8eee7; border-color: #ead4c5; }
.customer-card .customer-initial { color: #8e542f; background: #f0dfce; }
.customer-card .customer-stats { color: #81786d; }
.customer-card .customer-stats strong { color: #4a4035; }
.wallet-layout { grid-template-columns: minmax(0, 1fr); gap: 14px; }
.wallet-total { display: grid; grid-template-columns: auto minmax(180px, 1fr) minmax(0, auto); align-items: center; gap: 16px; padding: 18px 22px; }
.wallet-total small:first-child { font-size: 13px; font-weight: 700; }
.wallet-total strong { margin: 0; font-size: clamp(25px, 3vw, 34px); }
.wallet-total small:last-child { text-align: right; }
.wallet-date-navigator > strong { color: #40392f; }
.wallet-chart-panel { display: grid; grid-template-columns: minmax(240px, .85fr) minmax(0, 1.15fr); justify-content: stretch; gap: clamp(20px, 4vw, 48px); padding: clamp(22px, 4vw, 44px); }
.wallet-chart-shell { position: relative; width: clamp(220px, 24vw, 290px); aspect-ratio: 1; margin-bottom: 8px; isolation: isolate; }
.wallet-chart-depth, .wallet-chart-depth-back, .wallet-chart { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; }
.wallet-chart-depth-back { z-index: 0; transform: translateY(20px); filter: brightness(.42) saturate(1.2) drop-shadow(0 9px 8px #45382b40); pointer-events: none; }
.wallet-chart-depth { z-index: 1; transform: translateY(12px); filter: brightness(.62) saturate(1.12); pointer-events: none; }
.wallet-chart { z-index: 2; display: grid; place-items: center; background: transparent; box-shadow: none; filter: drop-shadow(0 -1px 1px #fff5) drop-shadow(0 2px 2px #45382b38); }
.wallet-chart-svg { grid-area: 1 / 1; display: block; width: 100%; height: 100%; overflow: visible; }
.wallet-chart-center { position: relative; grid-area: 1 / 1; z-index: 1; width: 65%; color: #302b25; background: #fffdf9; box-shadow: 0 0 0 1px var(--line); }
.wallet-chart-center small { color: #81786d; font-size: 10px; }
.wallet-chart-center strong { max-width: 100%; margin-top: 3px; color: #302b25; font-size: clamp(12px, 1.1vw, 16px); line-height: 1.15; overflow-wrap: anywhere; }
.wallet-chart-center .wallet-net-value { margin-top: 3px; }
.wallet-chart-divider { width: 42px; height: 1px; margin: 5px 0 2px; background: #e3dacd; }
.wallet-chart-panel .finance-list { width: 100%; min-width: 0; }
.finance-row { grid-template-columns: minmax(0, 1fr) auto 48px; gap: 12px; border-color: #e3dacd; }
.finance-row > span { min-width: 0; color: #40392f; }
.finance-row > span:not(i) { overflow-wrap: anywhere; }
.finance-row strong { color: #302b25; }
.finance-row small { color: #81786d; text-align: right; }
.tab { color: #71695f; border-color: #e3dacd; background: #fffdf9; }
@media (max-width: 680px) {
  .wallet-total { grid-template-columns: auto minmax(0, 1fr); gap: 8px 12px; }
  .wallet-total small:first-child { grid-column: 1 / -1; }
  .wallet-total small:last-child { grid-column: 1 / -1; text-align: left; }
  .wallet-chart-panel { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 22px; }
  .wallet-chart-shell { width: min(280px, 72vw); }
  .wallet-chart-panel .finance-list { width: 100%; }
}
.trip-customer-select { display: flex; gap: 8px; }
.trip-customer-select > button:first-child { flex: 1; justify-content: space-between; min-width: 0; }
.trip-customer-select [data-trip-customer-label] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-search { position: sticky; top: 0; z-index: 1; padding: 2px 0 6px; background: #fffdf9; }
.picker-search input { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: #fffdf9; font: inherit; }
.contact-quick-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.contact-quick-actions .button { text-decoration: none; }
.detail-record > div:first-child { min-width: 0; }
@media (max-width: 680px) {
  .trip-customer-select { align-items: stretch; }
  .trip-customer-select .button { padding-inline: 10px; }
  .contact-quick-actions { gap: 4px; }
}

.customer-editor-modal .modal-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.customer-editor-modal .modal-head h2 { grid-column: 2; }
.customer-editor-modal .modal-head > :first-child { justify-self: start; }
.customer-editor-modal .modal-head > :last-child { justify-self: end; }
.customer-editor-modal .modal-head .button { white-space: nowrap; }
.account-asset-panel { margin-top: 18px; }
.account-asset-panel .section-heading { margin: 0 0 14px; }
.asset-list { display: grid; gap: 10px; }
.asset-row { display: flex; align-items: center; gap: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 15px; background: var(--panel-2); }
.asset-image-button { width: 94px; height: 94px; flex: 0 0 auto; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); background: var(--panel); }
.asset-image-button img { width: 100%; height: 100%; object-fit: contain; }
.asset-row-content { min-width: 0; flex: 1; display: grid; gap: 9px; }
.asset-row-content > label:not(.button) { display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
.asset-row-content input { width: 100%; min-width: 0; min-height: 38px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; color: var(--text); background: var(--bg); }
.asset-upload { position: relative; width: fit-content; overflow: hidden; cursor: pointer; }
.asset-upload input, .business-avatar-picker input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.business-card-editor { display: grid; grid-template-columns: minmax(290px, 0.8fr) minmax(360px, 1.2fr); gap: 16px; align-items: start; }
.business-card-settings { display: grid; gap: 14px; }
.business-card-photo { display: grid; place-items: center; padding: 8px; }
.business-avatar-picker { position: relative; display: grid; place-items: center; width: 116px; height: 116px; overflow: hidden; border: 2px solid var(--accent); border-radius: 50%; color: var(--muted); background: var(--panel-2); cursor: pointer; }
.business-avatar-picker img { width: 100%; height: 100%; object-fit: cover; }
.business-avatar-picker > span { position: absolute; inset: auto 0 0; padding: 5px 2px; text-align: center; color: white; background: #0009; font-size: 10px; }
.readonly-profile { display: grid; gap: 8px; }
.readonly-profile label { display: grid; grid-template-columns: 88px minmax(0, 1fr); align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.readonly-profile input { min-width: 0; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; color: var(--text); background: var(--bg); }
.business-style-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.business-style-option { display: grid; gap: 6px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: var(--panel-2); text-align: left; }
.business-style-option.selected { border-color: var(--accent); background: var(--accent-soft); }
.business-style-option small { color: var(--muted); }
.business-card-preview { min-height: 260px; display: flex; flex-direction: column; justify-content: space-between; padding: 26px; border: 1px solid var(--line); border-radius: 20px; color: #fff; box-shadow: 0 18px 38px #0002; }
.business-card-preview.flat { background: linear-gradient(135deg, #425867, #273b49); }
.business-card-preview.metallic { background: linear-gradient(125deg, #b59c74, #656666 52%, #897258); }
.preview-heading { display: flex; align-items: center; gap: 15px; }
.preview-heading > img, .preview-heading > span { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; object-fit: cover; background: #ffffff35; font-size: 24px; }
.preview-heading strong, .preview-heading small { display: block; }
.preview-heading strong { font-size: 22px; }
.preview-heading small, .preview-contact { color: #ffffffc9; }
.preview-contact { display: grid; gap: 5px; overflow-wrap: anywhere; }
.business-card-preview > small { align-self: end; color: #ffffffa8; }
.qr-preview { display: grid; justify-items: center; gap: 18px; padding: 12px; }
.qr-preview img { max-width: min(100%, 420px); max-height: 58vh; object-fit: contain; }
.customer-stats { display: grid; gap: 3px; white-space: normal; }
.customer-stats strong { font-size: 11px; }
.customer-income { color: var(--green); }
.customer-unpaid { color: var(--amber); }
@media (max-width: 900px) { .business-card-editor { grid-template-columns: 1fr; } }
@media (max-width: 620px) {
  .asset-row { gap: 9px; padding: 9px; }
  .asset-image-button { width: 72px; height: 72px; }
  .asset-row > .button { padding-inline: 8px; }
  .customer-editor-modal .modal-head { top: -18px; margin: -18px -18px 13px; padding: 15px 18px 12px; }
}

/* Shared iOS/Web smart order draft: keep the text input and preview readable. */
.smart-input-section { display: grid; gap: 10px; }
.smart-input-section textarea { width: 100%; min-height: 110px; resize: vertical; padding: 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: var(--panel, #fff); }
.smart-input-section small, .smart-input-section p { color: var(--muted); }
.smart-input-section button { justify-self: start; }
/* Match text contrast to the existing light theme. */
.trip-heading .trip-price { color: var(--text); }
.trip-money-summary .trip-net { color: var(--green); }
.trip-date-card.active span, .trip-date-card.active small { color: #8e542f; }
.trip-date-card.active { box-shadow: 0 5px 16px #8e542f18; }
