@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap");

:root {
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #202124;
  background: #f5f6f8;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --bg: #f5f6f8;
  --surface: #fff;
  --surface-subtle: #fafbfc;
  --border: #e9ebef;
  --border-strong: #dfe2e8;
  --text: #202124;
  --muted: #858b98;
  --soft: #a3a8b2;
  --blue: #4078f5;
  --blue-light: #edf3ff;
  --green: #20a578;
  --green-light: #eaf8f2;
  --amber: #d49222;
  --amber-light: #fff6e5;
  --red: #dc6268;
  --red-light: #fff0f0;
  --purple: #8c6ce0;
  --purple-light: #f2efff;
  --shadow: 0 1px 2px rgba(25, 32, 45, .025), 0 8px 24px rgba(25, 32, 45, .025);
}

* { box-sizing: border-box; }
html, body, #app { width: 100%; height: 100%; min-width: 1120px; margin: 0; }
body { height: 100vh; overflow: hidden; font-size: 13px; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid rgba(64, 120, 245, .2);
  outline-offset: 1px;
}
button { cursor: pointer; }

.app-shell { height: 100vh; display: flex; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 10; width: 236px;
  display: flex; flex-direction: column; background: #fff;
  border-right: 1px solid var(--border);
}
.brand { height: 73px; display: flex; align-items: center; gap: 11px; padding: 0 22px; border-bottom: 1px solid var(--border); }
.brand-mark { width: 33px; height: 33px; display: grid; place-items: center; border-radius: 11px; background: #17191e; color: #fff; font-size: 17px; font-weight: 700; letter-spacing: -.08em; }
.brand-name { font-size: 18px; font-weight: 700; letter-spacing: -.055em; }
.brand-tag { display: block; margin-top: 1px; color: var(--muted); font-size: 10px; font-weight: 500; letter-spacing: .01em; }
.nav-section { padding: 19px 12px 5px; color: #a0a5af; font-size: 10px; font-weight: 700; letter-spacing: .105em; text-transform: uppercase; }
.side-nav { min-height: 0; flex: 1; overflow-y: auto; padding: 0 10px; }
.nav-item { width: 100%; height: 40px; display: flex; align-items: center; gap: 11px; padding: 0 11px; border: 0; border-radius: 8px; color: #666d7a; background: transparent; text-align: left; transition: color .16s, background .16s; }
.nav-item:hover { color: var(--text); background: #f7f8fa; }
.nav-item.active { color: #356de0; background: #eef3ff; font-weight: 600; }
.nav-icon { width: 17px; height: 17px; display: inline-grid; place-items: center; flex: 0 0 17px; }
.nav-icon svg, .icon svg { width: 17px; height: 17px; display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-badge { min-width: 20px; height: 19px; display: grid; place-items: center; margin-left: auto; padding: 0 6px; border-radius: 6px; color: #fff; background: #ee6e73; font-size: 10px; font-weight: 700; }
.nav-badge.quiet { color: #777f8e; background: #f0f1f4; }
.sidebar-bottom { margin-top: auto; padding: 14px 12px 16px; border-top: 1px solid var(--border); }
.team-card { display: flex; align-items: center; gap: 10px; padding: 8px; }
.team-avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: #fff; background: #17191e; font-weight: 700; }
.team-copy { min-width: 0; flex: 1; }
.team-copy strong { display: block; font-size: 12px; }
.team-copy small { color: var(--muted); font-size: 10px; }

.main-area { min-width: 0; width: calc(100% - 236px); height: 100vh; margin-left: 236px; display: flex; flex-direction: column; }
.topbar { height: 73px; flex: 0 0 73px; display: flex; align-items: center; justify-content: flex-end; padding: 0 24px; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--border); }
.breadcrumbs { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; }
.breadcrumbs strong { color: #333843; font-weight: 600; }
.crumb-separator { color: #c4c8d0; }
.top-actions { display: flex; align-items: center; gap: 9px; }
.icon-button { width: 35px; height: 35px; position: relative; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 9px; color: #707785; background: #fff; transition: background .16s, border-color .16s; }
.icon-button:hover { background: #f8f9fb; border-color: var(--border-strong); }
.notification-dot { position: absolute; top: 7px; right: 7px; width: 6px; height: 6px; border: 1.5px solid white; border-radius: 50%; background: #ef7377; }
.top-separator { width: 1px; height: 27px; margin: 0 4px; background: var(--border); }
.admin-profile { display: flex; align-items: center; gap: 9px; padding-left: 3px; }
.profile-avatar { width: 33px; height: 33px; display: grid; place-items: center; border-radius: 50%; color: #6247ba; background: #eee9ff; font-size: 11px; font-weight: 700; }
.profile-copy strong { display: block; font-size: 11px; font-weight: 600; }
.profile-copy small { color: var(--muted); font-size: 10px; }

.page-content { width: 100%; max-width: 1600px; min-height: 0; flex: 1; overflow: hidden; padding: 12px 22px 16px; margin: 0 auto; }
#page-view { height: 100%; min-height: 0; overflow: auto; }
.page-content[data-page="support"] #page-view,
.page-content[data-page="orders"] #page-view,
.page-content[data-page="drivers"] #page-view,
.page-content[data-page="cars"] #page-view,
.page-content[data-page="clients"] #page-view { overflow: hidden; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-heading h1 { margin: 0; color: #20232a; font-size: 25px; font-weight: 700; letter-spacing: -.045em; }
.page-heading p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.heading-actions { display: flex; align-items: center; gap: 9px; }
.eyebrow { margin: 0 0 7px; color: #959ba7; font-size: 10px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.button { min-height: 35px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 13px; border: 1px solid var(--border-strong); border-radius: 8px; background: #fff; color: #555d6a; font-size: 11px; font-weight: 600; transition: background .16s, border-color .16s, transform .16s; }
.button:hover { border-color: #cbd0d9; background: #f9fafb; }
.button:active { transform: translateY(1px); }
.button .icon svg { width: 14px; height: 14px; }
.button-primary { border-color: #3973ed; color: #fff; background: #4078f5; }
.button-primary:hover { border-color: #2e68e6; background: #356eea; }
.button-soft { border-color: #e4ebff; color: #3c70e4; background: #f1f5ff; }
.button-soft:hover { background: #e8efff; }
.button-danger { border-color: #fae1e1; color: #c5545a; background: #fff6f6; }
.button-success { border-color: #d5f0e4; color: #16875d; background: #f1fbf6; }
.button-ghost { border-color: transparent; background: transparent; }
.button-ghost:hover { border-color: transparent; background: #f3f4f6; }
.button-sm { min-height: 29px; padding: 0 9px; font-size: 10px; }
.button:disabled { opacity: .55; cursor: not-allowed; }

.demo-banner { display: flex; align-items: center; gap: 9px; margin-bottom: 19px; padding: 10px 13px; border: 1px solid #f2e3bc; border-radius: 9px; color: #8a6a2d; background: #fffaf0; font-size: 11px; }
.demo-banner .icon svg { width: 15px; height: 15px; }
.demo-banner strong { font-weight: 700; }
.demo-tag { display: inline-flex; align-items: center; padding: 3px 6px; border: 1px solid #f2e4c1; border-radius: 5px; color: #9a762e; background: #fff; font-family: "JetBrains Mono", monospace; font-size: 9px; }

.grid { display: grid; gap: 15px; }
.kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; }
.overview-dashboard { height: 100%; min-height: 0; display: grid; grid-template-rows: auto minmax(220px, 1.15fr) minmax(160px, .85fr); gap: 12px; }
.overview-dashboard .kpi-grid { gap: 12px; margin: 0; }
.overview-dashboard .kpi-card { min-height: 108px; padding: 13px 15px 11px; }
.overview-main-grid, .overview-bottom-grid { min-height: 0; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(300px, .8fr); gap: 12px; }
.overview-card { min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.overview-card .card-header { flex: 0 0 auto; }
.overview-card > .card-body { min-height: 0; flex: 1; }
.card { min-width: 0; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); box-shadow: var(--shadow); }
.kpi-card { min-height: 119px; padding: 16px 17px 14px; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; color: #737a87; font-size: 11px; }
.kpi-icon { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 8px; color: #4778e5; background: #eff4ff; }
.kpi-icon svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.kpi-icon.green { color: #19956b; background: #eaf8f2; }
.kpi-icon.amber { color: #bd8422; background: #fff6e7; }
.kpi-icon.purple { color: #7c63ce; background: #f1edff; }
.kpi-value-row { display: flex; align-items: baseline; gap: 9px; margin-top: 8px; }
.kpi-value { color: #242831; font-size: 24px; font-weight: 700; letter-spacing: -.055em; }
.kpi-change { color: #1e9b6e; font-size: 10px; font-weight: 600; }
.kpi-foot { margin-top: 3px; color: #9ba1ac; font-size: 10px; }
.dashboard-grid { grid-template-columns: minmax(0, 1.45fr) minmax(300px, .9fr); align-items: start; }
.card-header { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 17px; border-bottom: 1px solid #eff0f3; }
.card-title { margin: 0; color: #30343c; font-size: 12px; font-weight: 700; }
.card-subtitle { margin: 4px 0 0; color: #989eaa; font-size: 10px; }
.card-body { padding: 16px 17px; }
.select, .search-input, .date-filter { height: 33px; border: 1px solid var(--border); border-radius: 7px; color: #59616e; background: #fff; font-size: 10px; }
.select { padding: 0 9px; }
.search-wrap { position: relative; }
.search-wrap .icon { position: absolute; top: 9px; left: 10px; color: #999faa; }
.search-wrap .icon svg { width: 14px; height: 14px; }
.search-input { width: 222px; padding: 0 10px 0 31px; }
.search-input::placeholder { color: #a7acb6; }
.date-filter { display: inline-flex; align-items: center; gap: 7px; padding: 0 10px; white-space: nowrap; }
.date-filter .icon svg { width: 14px; height: 14px; }

.chart-wrap { height: 216px; padding: 7px 10px 0 0; }
.overview-card .chart-wrap { height: 100%; min-height: 170px; }
.chart-wrap svg { width: 100%; height: 100%; overflow: visible; }
.chart-grid-line { stroke: #edf0f4; stroke-width: 1; }
.chart-label { fill: #9ba1ac; font-family: "DM Sans", sans-serif; font-size: 10px; }
.chart-area { fill: url(#chartFill); }
.chart-line { fill: none; stroke: #4c80f4; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.chart-dot { fill: #fff; stroke: #4c80f4; stroke-width: 2; }
.chart-legend { display: flex; align-items: center; gap: 7px; color: #858b97; font-size: 10px; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; background: #4c80f4; }
.bars-chart { height: 144px; display: flex; align-items: flex-end; justify-content: space-around; gap: 12px; padding: 15px 7px 0; }
.bar-column { height: 100%; display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: flex-end; gap: 8px; color: #9ba1ac; font-size: 9px; }
.bar-pair { width: min(48px, 100%); height: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 4px; }
.bar { width: 13px; min-height: 7px; border-radius: 4px 4px 1px 1px; background: #dfe8ff; }
.bar.primary { background: #5384f2; }
.bar-alt { background: #dcefe7; }
.chart-legend-row { display: flex; gap: 14px; margin-top: 13px; color: #858b97; font-size: 9px; }
.legend-mini { width: 7px; height: 7px; display: inline-block; margin-right: 5px; border-radius: 2px; background: #5384f2; }
.legend-mini.muted { background: #dcefe7; }

.mini-list { display: grid; }
.mini-row { display: flex; align-items: center; gap: 10px; min-height: 61px; padding: 9px 0; border-bottom: 1px solid #f0f1f3; }
.mini-row:last-child { border-bottom: 0; }
.avatar { width: 34px; height: 34px; display: grid; flex: 0 0 34px; place-items: center; border-radius: 50%; color: #5a6caa; background: #edf1fb; font-size: 10px; font-weight: 700; }
.avatar.pink { color: #aa6680; background: #faedf2; }
.avatar.green { color: #4d896e; background: #e9f5ed; }
.avatar.orange { color: #9a6e34; background: #fff1dc; }
.avatar.purple { color: #7561b1; background: #f0ebff; }
.mini-copy { min-width: 0; flex: 1; }
.mini-copy strong { display: block; overflow: hidden; color: #414650; font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.mini-copy small { display: block; overflow: hidden; margin-top: 4px; color: #969ca7; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.mini-time { align-self: flex-start; padding-top: 2px; color: #a0a5af; font-size: 9px; white-space: nowrap; }
.mini-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 11px; border-top: 1px solid #f0f1f3; color: #959ba6; font-size: 10px; }
.coefficient-list { display: flex; flex-direction: column; justify-content: space-around; gap: 11px; padding-top: 12px; padding-bottom: 12px; }
.coefficient-row { display: grid; gap: 6px; }
.coefficient-copy { display: flex; align-items: baseline; justify-content: space-between; color: #6c7380; font-size: 10px; }
.coefficient-copy strong { color: #343943; font-size: 12px; font-weight: 700; }
.coefficient-row small { color: #989eaa; font-size: 9px; }
.coefficient-track { height: 5px; overflow: hidden; border-radius: 5px; background: #edf0f4; }
.coefficient-track span { height: 100%; display: block; border-radius: inherit; background: #5384f2; }
.coefficient-track.demand span { background: #9274dc; }
.coefficient-track.wait span { background: #32a981; }
.coefficient-summary { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 7px; padding-top: 9px; border-top: 1px solid #eff0f3; color: #9298a3; font-size: 8px; }
.coefficient-summary span { display: grid; gap: 4px; }
.coefficient-summary strong { color: #444a55; font-size: 10px; font-weight: 700; white-space: nowrap; }
.demand-body { display: flex; flex-direction: column; gap: 8px; }
.demand-chart { min-height: 0; flex: 1; display: grid; grid-template-columns: repeat(8, minmax(0,1fr)); align-items: end; gap: 12px; padding: 6px 5px 0; }
.demand-column { min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 5px; }
.demand-value { color: #858c99; font-size: 8px; }
.demand-bar-track { width: min(28px, 100%); min-height: 35px; flex: 1; display: flex; align-items: flex-end; overflow: hidden; border-radius: 5px 5px 2px 2px; background: #f0f2f6; }
.demand-bar-track span { width: 100%; min-height: 6px; display: block; border-radius: 5px 5px 2px 2px; background: #c8d7fb; }
.demand-bar-track span.busy { background: #7899ec; }
.demand-bar-track span.peak { background: #4c78df; }
.demand-column small { color: #989eaa; font-size: 8px; }
.demand-foot { display: flex; justify-content: space-between; gap: 8px; color: #9ba1ac; font-size: 8px; }
.attention-list { display: flex; flex-direction: column; justify-content: space-evenly; padding-top: 7px; padding-bottom: 7px; }
.attention-row { width: 100%; min-height: 35px; display: flex; align-items: center; gap: 9px; padding: 4px 0; border: 0; border-bottom: 1px solid #f0f1f3; background: transparent; text-align: left; }
.attention-row:last-child { border-bottom: 0; }
.attention-row:hover .attention-copy strong { color: #3973ed; }
.attention-icon { width: 27px; height: 27px; display: grid; flex: 0 0 27px; place-items: center; border-radius: 7px; }
.attention-icon svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.attention-icon.purple { color: #7c63ce; background: #f1edff; }
.attention-icon.blue { color: #4778e5; background: #eff4ff; }
.attention-icon.amber { color: #bd8422; background: #fff6e7; }
.attention-copy { min-width: 0; flex: 1; }
.attention-copy strong { display: block; color: #414650; font-size: 10px; font-weight: 600; transition: color .16s; }
.attention-copy small { display: block; overflow: hidden; margin-top: 3px; color: #969ca7; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.attention-count { min-width: 22px; height: 21px; display: grid; place-items: center; padding: 0 6px; border-radius: 6px; color: #687180; background: #f0f1f4; font-size: 9px; font-weight: 700; }

.queue-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 15px; }
.queue-card { padding: 16px; }
.queue-top { display: flex; align-items: center; justify-content: space-between; color: #6c7380; font-size: 11px; }
.queue-number { margin: 9px 0 4px; color: #252a32; font-size: 24px; font-weight: 700; letter-spacing: -.04em; }
.queue-note { color: #a0a5af; font-size: 10px; }
.queue-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 12px; padding: 0; border: 0; color: #4276e9; background: none; font-size: 10px; font-weight: 600; }
.queue-link:hover { color: #225bd2; }

.table-card { height: 100%; display: flex; flex-direction: column; overflow: hidden; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; border-bottom: 1px solid #eff0f3; }
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 8px; }
.tabs { height: 44px; display: flex; align-items: stretch; gap: 18px; padding: 0 16px; border-bottom: 1px solid #eff0f3; }
.tab { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 0 2px; border: 0; color: #898f9b; background: transparent; font-size: 11px; }
.tab:hover { color: #4e5664; }
.tab.active { color: #3973ed; font-weight: 600; }
.tab.active::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: #4078f5; content: ""; }
.tab-count { padding: 2px 6px; border-radius: 5px; color: #878d99; background: #f1f2f5; font-size: 9px; }
.tab.active .tab-count { color: #3973ed; background: #edf3ff; }
.table-scroll { width: 100%; min-height: 0; overflow: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
thead th { position: sticky; top: 0; z-index: 2; height: 39px; padding: 0 13px; color: #969ca7; background: #fcfcfd; font-size: 9px; font-weight: 600; white-space: nowrap; }
tbody td { height: 55px; padding: 7px 13px; border-top: 1px solid #f0f1f3; color: #555c68; font-size: 10px; white-space: nowrap; }
tbody tr { transition: background .14s; }
tbody tr:hover { background: #fafbfc; }
tbody tr.selected { background: #f2f6ff; }
.person-cell { display: flex; align-items: center; gap: 9px; }
.person-cell .avatar { width: 30px; height: 30px; flex-basis: 30px; font-size: 9px; }
.person-cell strong, .stack-cell strong { display: block; color: #39404b; font-size: 10px; font-weight: 600; }
.person-cell small, .stack-cell small { display: block; margin-top: 3px; color: #9ba1ab; font-size: 9px; }
.mono { color: #777f8d; font-family: "JetBrains Mono", monospace; font-size: 9px; }
.status { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 5px; font-size: 9px; font-weight: 600; }
.status::before { width: 5px; height: 5px; border-radius: 50%; background: currentColor; content: ""; }
.status.green { color: #198c65; background: #eaf8f1; }
.status.amber { color: #a97924; background: #fff5e3; }
.status.red { color: #c2555d; background: #fff0f0; }
.status.blue { color: #4475de; background: #edf3ff; }
.status.gray { color: #7a818e; background: #f0f1f4; }
.status.purple { color: #7a63c5; background: #f2efff; }
.row-action { width: 28px; height: 28px; display: inline-grid; place-items: center; border: 1px solid transparent; border-radius: 6px; color: #89909b; background: transparent; }
.row-action:hover { border-color: var(--border); background: #fff; }
.row-action svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.table-footer { min-height: 51px; display: flex; align-items: center; justify-content: space-between; padding: 0 15px; border-top: 1px solid #eff0f3; color: #969ca7; font-size: 10px; }
.pagination { display: flex; align-items: center; gap: 5px; }
.page-button { width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 6px; color: #69717e; background: #fff; font-size: 10px; }
.page-button.active { border-color: #d8e3ff; color: #3c72e6; background: #eef3ff; }
.page-button:disabled { opacity: .4; cursor: default; }
.page-button svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 1.8; }

.split-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; gap: 15px; }
.table-card > .split-layout { min-height: 0; flex: 1; align-items: stretch; gap: 0; overflow: hidden; }
.table-card > .split-layout > .table-scroll { height: 100%; }
.table-card > .split-layout > .detail-card { min-height: 0; overflow-y: auto; }
.detail-card { position: sticky; top: 17px; overflow: hidden; }
.detail-head { display: flex; align-items: center; gap: 11px; padding: 17px; border-bottom: 1px solid #eff0f3; }
.detail-head .avatar { width: 42px; height: 42px; flex-basis: 42px; font-size: 12px; }
.detail-head-copy { min-width: 0; flex: 1; }
.detail-head-copy h3 { margin: 0; color: #30353e; font-size: 13px; }
.detail-head-copy p { margin: 4px 0 0; color: #969ca7; font-size: 10px; }
.detail-section { padding: 15px 17px; border-bottom: 1px solid #eff0f3; }
.detail-label { margin: 0 0 11px; color: #9ba1ab; font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.detail-line { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin: 10px 0; color: #89909c; font-size: 10px; }
.detail-line:last-child { margin-bottom: 0; }
.detail-line strong { max-width: 180px; color: #444a55; font-weight: 600; text-align: right; }
.detail-actions { display: flex; gap: 8px; padding: 14px 17px; }
.detail-actions .button { flex: 1; }
.placeholder { min-height: 220px; display: grid; place-items: center; padding: 28px; color: #9ba1ac; text-align: center; }
.placeholder-icon { width: 48px; height: 48px; display: grid; place-items: center; margin: 0 auto 11px; border-radius: 14px; color: #7793dc; background: #eff4ff; }
.placeholder-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.placeholder strong { display: block; margin-bottom: 5px; color: #59616e; font-size: 12px; }
.placeholder p { max-width: 250px; margin: 0; font-size: 10px; line-height: 1.6; }

.inbox-layout { height: 100%; min-height: 0; display: grid; grid-template-columns: 285px minmax(370px, 1fr) 300px; grid-template-rows: minmax(0, 1fr); overflow: hidden; border: 1px solid var(--border); border-radius: 11px; background: #fff; box-shadow: var(--shadow); }
.inbox-list { min-width: 0; min-height: 0; display: flex; flex-direction: column; border-right: 1px solid var(--border); }
.inbox-heading { min-height: 63px; display: flex; align-items: center; justify-content: space-between; padding: 0 15px; border-bottom: 1px solid #eff0f3; }
.inbox-heading h2 { margin: 0; color: #343943; font-size: 13px; }
.inbox-heading small { display: block; margin-top: 4px; color: #989eaa; font-size: 9px; }
.inbox-tools { display: flex; gap: 6px; padding: 10px 11px; }
.inbox-search { width: 100%; }
.inbox-tabs { display: flex; gap: 2px; padding: 0 10px 9px; border-bottom: 1px solid #eff0f3; }
.inbox-tab { min-height: 27px; padding: 0 8px; border: 0; border-radius: 6px; color: #8a909c; background: transparent; font-size: 9px; }
.inbox-tab.active { color: #3d71e0; background: #edf3ff; font-weight: 600; }
.thread-list { min-height: 0; flex: 1; overflow-y: auto; }
.thread { width: 100%; display: flex; align-items: flex-start; gap: 9px; padding: 12px 11px; border: 0; border-bottom: 1px solid #f0f1f3; background: #fff; text-align: left; transition: background .14s; }
.thread:hover { background: #fafbfc; }
.thread.active { background: #f1f5ff; box-shadow: inset 2px 0 #4b7df0; }
.thread .avatar { width: 31px; height: 31px; flex-basis: 31px; }
.thread-content { min-width: 0; flex: 1; }
.thread-top { display: flex; justify-content: space-between; gap: 6px; }
.thread-top strong { overflow: hidden; color: #3e444e; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.thread-top time { color: #a2a7b1; font-size: 8px; white-space: nowrap; }
.thread-preview { display: block; overflow: hidden; margin-top: 4px; color: #959ba6; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.thread-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 7px; }
.unread-count { min-width: 16px; height: 16px; display: inline-grid; place-items: center; border-radius: 50%; color: #fff; background: #4a7df1; font-size: 8px; }
.priority-dot { width: 6px; height: 6px; border-radius: 50%; background: #eaa840; }
.chat-panel { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.chat-header { min-height: 63px; display: flex; align-items: center; justify-content: space-between; padding: 0 17px; border-bottom: 1px solid #eff0f3; }
.chat-person { display: flex; align-items: center; gap: 9px; }
.chat-person .avatar { width: 32px; height: 32px; flex-basis: 32px; }
.chat-person strong { display: block; color: #3c424d; font-size: 11px; }
.chat-person small { display: flex; align-items: center; gap: 5px; margin-top: 3px; color: #9ba1ac; font-size: 9px; }
.online-dot { width: 6px; height: 6px; border-radius: 50%; background: #26b483; }
.chat-actions { display: flex; gap: 6px; }
.message-list { min-height: 0; flex: 1; overflow-y: auto; padding: 17px 20px; background: #fcfcfd; }
.message-date { margin: 1px 0 16px; color: #a3a8b2; font-size: 9px; text-align: center; }
.message { width: fit-content; max-width: 80%; margin-bottom: 12px; }
.message.outgoing { margin-left: auto; }
.message-bubble { padding: 10px 12px; border: 1px solid #ebedf1; border-radius: 10px 10px 10px 3px; color: #4c525d; background: #fff; font-size: 10px; line-height: 1.55; }
.message.outgoing .message-bubble { border-color: #4a7bf0; border-radius: 10px 10px 3px 10px; color: #fff; background: #4a7bf0; }
.message-time { display: block; margin-top: 4px; color: #a3a8b2; font-size: 8px; }
.message.outgoing .message-time { text-align: right; }
.system-message { width: fit-content; max-width: 88%; margin: 17px auto; padding: 7px 10px; border-radius: 7px; color: #888e9a; background: #f2f3f5; font-size: 9px; text-align: center; }
.quick-replies { display: flex; gap: 6px; padding: 9px 13px 0; }
.quick-reply { padding: 5px 8px; border: 1px solid #e8eaf0; border-radius: 6px; color: #727987; background: #fff; font-size: 8px; }
.quick-reply:hover { border-color: #cdd9f4; color: #3973e8; }
.composer { padding: 9px 13px 12px; border-top: 1px solid #eff0f3; }
.composer-box { display: flex; align-items: flex-end; gap: 8px; padding: 8px 9px 8px 11px; border: 1px solid #e6e8ed; border-radius: 9px; background: #fff; }
.composer textarea { min-height: 23px; max-height: 70px; flex: 1; resize: none; border: 0; outline: none; color: #414752; background: transparent; font-size: 10px; line-height: 1.45; }
.composer textarea::placeholder { color: #a2a7b1; }
.send-button { width: 29px; height: 29px; display: grid; flex: 0 0 29px; place-items: center; border: 0; border-radius: 7px; color: #fff; background: #477bf1; }
.send-button:hover { background: #326be5; }
.send-button svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.contact-panel { min-width: 0; min-height: 0; overflow-y: auto; border-left: 1px solid var(--border); background: #fff; }
.contact-profile { padding: 18px 14px 15px; border-bottom: 1px solid #eff0f3; text-align: center; }
.contact-profile .avatar { width: 55px; height: 55px; margin: 0 auto 9px; font-size: 15px; }
.contact-profile h3 { margin: 0; color: #343943; font-size: 12px; }
.contact-profile p { margin: 4px 0 0; color: #9ba1ac; font-size: 9px; }
.contact-badges { display: flex; justify-content: center; gap: 5px; margin-top: 10px; }
.contact-info { padding: 14px; border-bottom: 1px solid #eff0f3; }
.contact-info .detail-label { margin-bottom: 9px; }
.contact-info .detail-line { margin: 9px 0; font-size: 9px; }
.timeline { display: grid; gap: 12px; }
.timeline-item { display: flex; align-items: flex-start; gap: 9px; }
.timeline-icon { width: 24px; height: 24px; display: grid; flex: 0 0 24px; place-items: center; border-radius: 7px; color: #4279ef; background: #eff4ff; }
.timeline-icon svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.timeline-text strong { display: block; color: #555b66; font-size: 9px; font-weight: 600; }
.timeline-text small { display: block; margin-top: 3px; color: #a0a5af; font-size: 8px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(25, 29, 38, .38); backdrop-filter: blur(3px); }
.modal { width: min(470px, 100%); overflow: hidden; border: 1px solid #e7e9ee; border-radius: 12px; background: #fff; box-shadow: 0 20px 70px rgba(22, 29, 45, .2); }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 19px; border-bottom: 1px solid #eff0f3; }
.modal-header h2 { margin: 0; color: #30343c; font-size: 14px; }
.modal-body { padding: 18px 19px; color: #6e7581; font-size: 11px; line-height: 1.6; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 13px 19px; border-top: 1px solid #eff0f3; }
.toast-region { position: fixed; right: 25px; bottom: 24px; z-index: 60; display: grid; gap: 8px; }
.toast { display: flex; align-items: center; gap: 9px; min-width: 235px; padding: 11px 14px; border: 1px solid #e8eaf0; border-radius: 9px; color: #49515e; background: #fff; box-shadow: 0 7px 28px rgba(28, 35, 49, .12); font-size: 11px; animation: toast-in .2s ease-out; }
.toast-mark { width: 7px; height: 7px; border-radius: 50%; background: #28a779; }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.empty-state { padding: 34px 20px; color: #979daa; text-align: center; font-size: 11px; }
.empty-state strong { display: block; margin-bottom: 5px; color: #5a616e; font-size: 12px; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-right { text-align: right; }
.muted { color: #9ba1ac; }

.car-thumb { width: 37px; height: 31px; display: grid; flex: 0 0 37px; place-items: center; border: 1px solid #e8ebf0; border-radius: 7px; color: #7f8794; background: #f4f5f7; }
.car-thumb svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.car-white { color: #828c9b; background: linear-gradient(135deg,#fbfcfd,#edf0f4); }
.car-gray { color: #6b7482; background: linear-gradient(135deg,#e9edf2,#dce1e8); }
.car-black { color: #f4f5f7; background: linear-gradient(135deg,#565b65,#333741); }
.car-preview { min-height: 145px; display: grid; place-items: center; gap: 6px; padding: 14px; color: #8a919e; background: linear-gradient(135deg,#f8fafc,#eff2f6); font-size: 10px; }
.car-preview.car-black { color: #e4e6e9; }
.car-illustration { width: 145px; height: 67px; display: grid; place-items: center; border: 1px solid rgba(130,140,155,.17); border-radius: 36px 42px 15px 15px; color: rgba(95,106,120,.68); background: rgba(255,255,255,.55); }
.car-illustration svg { width: 108px; height: 52px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.photo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.photo-placeholder { min-height: 76px; display: grid; place-items: center; align-content: center; gap: 6px; border: 1px dashed #dfe3e9; border-radius: 7px; color: #9ba1ad; background: #fafbfc; font-size: 8px; }
.photo-placeholder:hover { border-color: #b6c8f3; color: #557de1; background: #f5f8ff; }
.photo-placeholder svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.photo-placeholder span { display: block; }
.distribution { display: grid; gap: 17px; padding: 3px 0 14px; }
.distribution-row { display: grid; gap: 7px; }
.distribution-label { display: flex; align-items: center; justify-content: space-between; color: #747b88; font-size: 10px; }
.distribution-label strong { color: #444a55; font-size: 10px; }
.distribution-track { height: 6px; overflow: hidden; border-radius: 5px; background: #f0f1f4; }
.distribution-track span { height: 100%; display: block; border-radius: inherit; }
.placeholder-note { display: flex; align-items: flex-start; gap: 7px; padding: 9px; border: 1px solid #edf0f5; border-radius: 7px; color: #8d94a1; background: #fafbfc; font-size: 9px; line-height: 1.5; }
.placeholder-note .icon svg { width: 13px; height: 13px; }
.future-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 0; padding: 3px 17px 7px; }
.future-item { min-width: 0; display: flex; align-items: center; gap: 10px; padding: 13px 8px; border-bottom: 1px solid #f0f1f3; }
.future-item:nth-last-child(-n+3) { border-bottom: 0; }
.future-item .kpi-icon { flex: 0 0 29px; }
.future-item strong { display: block; color: #525965; font-size: 10px; font-weight: 600; }
.future-item small { display: block; margin-top: 4px; color: #9ba1ac; font-size: 9px; line-height: 1.4; }
.settings-layout { display: grid; grid-template-columns: 228px minmax(0,1fr); align-items: start; gap: 15px; }
.settings-nav { overflow: hidden; padding: 6px; }
.settings-nav-item { width: 100%; display: grid; gap: 4px; padding: 11px 10px; border: 0; border-radius: 7px; color: #555c69; background: transparent; text-align: left; }
.settings-nav-item:hover { background: #f8f9fb; }
.settings-nav-item.active { color: #3973ed; background: #eef3ff; }
.settings-nav-item strong { font-size: 10px; font-weight: 600; }
.settings-nav-item small { color: #989eaa; font-size: 8px; }
.settings-content { display: grid; gap: 15px; }
.settings-form { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; padding: 18px; }
.form-field { display: grid; gap: 7px; color: #737a87; font-size: 10px; font-weight: 600; }
.form-field input, .form-field select { height: 36px; padding: 0 10px; border: 1px solid #e6e8ed; border-radius: 7px; outline: 0; color: #454b56; background: #fff; font-size: 10px; }
.form-field input:focus, .form-field select:focus { border-color: #8eafff; box-shadow: 0 0 0 3px rgba(64,120,245,.1); }
.settings-note { padding: 0 18px 16px; color: #a0a5af; font-size: 9px; }
.future-card .future-grid { grid-template-columns: 1fr 1fr; }
.future-card .future-item:nth-last-child(-n+3) { border-bottom: 1px solid #f0f1f3; }
.future-card .future-item:nth-last-child(-n+2) { border-bottom: 0; }

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101114;
  --surface: #181a1f;
  --surface-subtle: #1d2026;
  --border: #2a2d34;
  --border-strong: #383c45;
  --text: #f1f2f4;
  --muted: #a1a6b0;
  --soft: #777e8b;
  --shadow: 0 1px 3px rgba(0,0,0,.18);
  background: var(--bg);
  color: var(--text);
}
:root[data-theme="dark"] body { background: var(--bg); }
:root[data-theme="dark"] .sidebar,
:root[data-theme="dark"] .topbar,
:root[data-theme="dark"] .card,
:root[data-theme="dark"] .inbox-layout,
:root[data-theme="dark"] .contact-panel,
:root[data-theme="dark"] .inbox-list,
:root[data-theme="dark"] .thread,
:root[data-theme="dark"] .button,
:root[data-theme="dark"] .icon-button,
:root[data-theme="dark"] .select,
:root[data-theme="dark"] .search-input,
:root[data-theme="dark"] .date-filter,
:root[data-theme="dark"] .page-button,
:root[data-theme="dark"] .composer-box,
:root[data-theme="dark"] .modal,
:root[data-theme="dark"] .photo-placeholder,
:root[data-theme="dark"] .form-field input,
:root[data-theme="dark"] .form-field select { color: #e5e7eb; background-color: #181a1f; border-color: #2a2d34; }
:root[data-theme="dark"] .topbar { background-color: #15171b; }
:root[data-theme="dark"] .main-area { background-color: #101114; }
:root[data-theme="dark"] .brand,
:root[data-theme="dark"] .sidebar-bottom,
:root[data-theme="dark"] .card-header,
:root[data-theme="dark"] .inbox-heading,
:root[data-theme="dark"] .inbox-tabs,
:root[data-theme="dark"] .chat-header,
:root[data-theme="dark"] .contact-profile,
:root[data-theme="dark"] .contact-info,
:root[data-theme="dark"] .detail-head,
:root[data-theme="dark"] .detail-section,
:root[data-theme="dark"] .detail-actions,
:root[data-theme="dark"] .toolbar,
:root[data-theme="dark"] .tabs,
:root[data-theme="dark"] .table-footer,
:root[data-theme="dark"] tbody td,
:root[data-theme="dark"] .thread,
:root[data-theme="dark"] .composer,
:root[data-theme="dark"] .settings-nav-item,
:root[data-theme="dark"] .future-item { border-color: #292c33; }
:root[data-theme="dark"] .brand-name,
:root[data-theme="dark"] .page-heading h1,
:root[data-theme="dark"] .card-title,
:root[data-theme="dark"] .kpi-value,
:root[data-theme="dark"] .queue-number,
:root[data-theme="dark"] .mini-copy strong,
:root[data-theme="dark"] .person-cell strong,
:root[data-theme="dark"] .stack-cell strong,
:root[data-theme="dark"] .detail-head-copy h3,
:root[data-theme="dark"] .detail-line strong,
:root[data-theme="dark"] .contact-profile h3,
:root[data-theme="dark"] .thread-top strong,
:root[data-theme="dark"] .chat-person strong,
:root[data-theme="dark"] .timeline-text strong,
:root[data-theme="dark"] .distribution-label strong,
:root[data-theme="dark"] .future-item strong,
:root[data-theme="dark"] .settings-nav-item,
:root[data-theme="dark"] thead th { color: #e6e8ec; }
:root[data-theme="dark"] .page-heading p,
:root[data-theme="dark"] .card-subtitle,
:root[data-theme="dark"] .kpi-foot,
:root[data-theme="dark"] .queue-note,
:root[data-theme="dark"] .mini-copy small,
:root[data-theme="dark"] .person-cell small,
:root[data-theme="dark"] .stack-cell small,
:root[data-theme="dark"] .detail-label,
:root[data-theme="dark"] .detail-line,
:root[data-theme="dark"] .contact-profile p,
:root[data-theme="dark"] .thread-preview,
:root[data-theme="dark"] .message-time,
:root[data-theme="dark"] .future-item small { color: #9298a3; }
:root[data-theme="dark"] .nav-item { color: #a3a8b2; }
:root[data-theme="dark"] .nav-item:hover,
:root[data-theme="dark"] .thread:hover,
:root[data-theme="dark"] tbody tr:hover,
:root[data-theme="dark"] .settings-nav-item:hover { background: #202329; }
:root[data-theme="dark"] .nav-item.active,
:root[data-theme="dark"] .thread.active,
:root[data-theme="dark"] tbody tr.selected,
:root[data-theme="dark"] .settings-nav-item.active { color: #8fb0ff; background: #202941; }
:root[data-theme="dark"] .chat-panel { background: #181a1f; }
:root[data-theme="dark"] .message-list { background: #15171b; }
:root[data-theme="dark"] .message-bubble { color: #d7dae0; background: #202329; border-color: #30343c; }
:root[data-theme="dark"] .message.outgoing .message-bubble { color: #fff; background: #477bf1; border-color: #477bf1; }
:root[data-theme="dark"] .composer textarea { color: #e5e7eb; }
:root[data-theme="dark"] .quick-reply { color: #b6bbc4; background: #202329; border-color: #30343c; }
:root[data-theme="dark"] .system-message,
:root[data-theme="dark"] thead th,
:root[data-theme="dark"] .mini-footer { background: #1d2026; }
:root[data-theme="dark"] .table-scroll { background: #181a1f; }
:root[data-theme="dark"] .demo-banner { color: #e3c37c; background: #292316; border-color: #51452b; }
:root[data-theme="dark"] .demo-tag { color: #e3c37c; background: #302919; border-color: #51452b; }
:root[data-theme="dark"] .placeholder-note,
:root[data-theme="dark"] .form-field input,
:root[data-theme="dark"] .form-field select { background: #15171b; }
:root[data-theme="dark"] .distribution-track { background: #292c33; }
:root[data-theme="dark"] .car-preview { background: linear-gradient(135deg,#202329,#191b20); }
:root[data-theme="dark"] .car-illustration { background: rgba(255,255,255,.04); }
:root[data-theme="dark"] .modal-backdrop { background: rgba(0,0,0,.58); }
:root[data-theme="dark"] .modal-body { color: #b4bac4; }
:root[data-theme="dark"] .inbox-heading h2,
:root[data-theme="dark"] .placeholder strong { color: #e1e3e8; }
:root[data-theme="dark"] .coefficient-copy strong,
:root[data-theme="dark"] .coefficient-summary strong,
:root[data-theme="dark"] .attention-copy strong { color: #e1e3e8; }
:root[data-theme="dark"] .coefficient-summary,
:root[data-theme="dark"] .attention-row { border-color: #292c33; }
:root[data-theme="dark"] .coefficient-track,
:root[data-theme="dark"] .demand-bar-track { background: #292c33; }
:root[data-theme="dark"] .attention-count { color: #c5cad3; background: #292c33; }
