/* ИЗИ ТАКСИ — панель управления. Свой фирменный стиль: тёмно-синий + жёлтый, светлые карточки. */
:root {
  --navy: #0F1E3D;
  --navy-2: #172A52;
  --navy-3: #22386A;
  --yellow: #EBD439;
  --yellow-2: #F5E37A;
  --yellow-soft: #FFF9DB;
  --bg: #F3F4F7;
  --card: #FFFFFF;
  --line: #E6E8EE;
  --line-2: #F0F1F5;
  --text: #111827;
  --muted: #6B7280;
  --muted-2: #9CA3AF;
  --link: #2F5DCB;
  --green: #16A34A; --green-bg: #E8F7EE;
  --red: #DC2626;   --red-bg: #FDECEC;
  --amber: #B45309; --amber-bg: #FEF3C7;
  --blue: #2563EB;  --blue-bg: #E8EFFE;
  --violet: #7C3AED; --violet-bg: #F1EAFE;
  --gray: #6B7280;  --gray-bg: #F1F2F5;
  --c1: #22C55E; --c2: #F59E0B; --c3: #3B82F6; --c4: #EF4444; --c5: #8B5CF6; --c6: #14B8A6; --c7: #EBD439; --c8: #64748B;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 16px rgba(16, 24, 40, .05);
  --shadow-lg: 0 20px 60px rgba(15, 30, 61, .25);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 14px; -webkit-font-smoothing: antialiased; }
.hidden { display: none !important; }
a { color: var(--link); text-decoration: none; cursor: pointer; }
a:hover { text-decoration: underline; }
h1 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.02em; color: var(--text); }
h2 { margin: 0 0 12px; font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
h3 { margin: 0 0 8px; font-size: 15px; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.err { color: var(--red); }
.ok { color: var(--green); }
b, strong { font-weight: 700; }
input, select, textarea, button { font: inherit; color: inherit; }
::selection { background: var(--yellow-2); }

/* ---------- Вход ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: #fff; }
.login-side { background: radial-gradient(1200px 600px at 0% 100%, #24407A 0%, transparent 60%), radial-gradient(700px 400px at 100% 0%, #1C3363 0%, transparent 60%), var(--navy);
  color: #fff; padding: 40px 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-side::after { content: ''; position: absolute; right: -120px; bottom: -120px; width: 380px; height: 380px; border-radius: 50%; border: 60px solid rgba(235, 212, 57, .12); }
.login-brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 20px; }
.login-brand img { width: 40px; height: 40px; }
.login-hero h2 { font-size: 38px; line-height: 1.15; margin: 0 0 14px; max-width: 460px; letter-spacing: -.03em; }
.login-hero p { color: #C3CCE0; font-size: 16px; margin: 0 0 28px; max-width: 420px; }
.login-stats { display: flex; gap: 14px; flex-wrap: wrap; }
.login-stats div { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); border-radius: 12px; padding: 12px 16px; min-width: 120px; }
.login-stats b { display: block; font-size: 22px; color: var(--yellow); }
.login-stats span { font-size: 12px; color: #C3CCE0; }
.login-foot { color: #8C99B8; font-size: 12px; }
.login-form { padding: 48px; display: flex; flex-direction: column; gap: 14px; justify-content: center; max-width: 440px; width: 100%; margin: 0 auto; }
.login-form h1 { font-size: 28px; }
.login-form .muted { margin: -6px 0 8px; }
.fld { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: #374151; }
.fld .in { padding: 11px 13px; font-size: 15px; }
@media (max-width: 900px) { .login { grid-template-columns: 1fr; } .login-side { display: none; } }

/* ---------- Каркас ---------- */
.layout { display: flex; min-height: 100vh; }
.side { width: 252px; flex: none; background: linear-gradient(180deg, var(--navy) 0%, #0B1832 100%); color: #DCE3F2; padding: 18px 14px 30px; position: sticky; top: 0; height: 100vh; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #2A3E6B transparent; transition: width .2s, padding .2s; }
.side.collapsed { width: 0; padding: 0; overflow: hidden; }
.side-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; color: #fff; padding: 2px 8px 18px; letter-spacing: -.01em; }
.side-brand img { width: 34px; height: 34px; }
.side .city { margin: 0 4px 16px; }
.side .city select { width: 100%; background: var(--navy-2); color: #fff; border: 1px solid var(--navy-3); border-radius: 10px; padding: 9px 10px; font-weight: 600; cursor: pointer; }
.side .grp { margin-bottom: 2px; }
.side .grp > a { display: flex; align-items: center; gap: 12px; color: #C9D2E6; padding: 10px 12px; font-weight: 600; border-radius: 10px; transition: background .15s, color .15s; }
.side .grp > a:hover { background: rgba(255, 255, 255, .06); color: #fff; text-decoration: none; }
.side .grp > a .ic { width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; opacity: .9; }
.side .grp > a .ic svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.side .grp > a .chev { margin-left: auto; width: 14px; height: 14px; transition: transform .2s; opacity: .6; stroke: currentColor; fill: none; stroke-width: 2; }
.side .grp.open > a .chev { transform: rotate(90deg); }
.side .grp.open > a { color: #fff; }
.side .grp > a.active { background: var(--yellow); color: var(--navy); }
.side .grp > a.active .ic { opacity: 1; }
.side .sub { display: none; margin: 2px 0 8px 22px; padding-left: 12px; border-left: 1px solid #2A3E6B; }
.side .grp.open .sub { display: block; }
.side .sub a { display: block; font-size: 13px; padding: 7px 10px; color: #9FAECB; border-radius: 8px; font-weight: 500; }
.side .sub a:hover { background: rgba(255, 255, 255, .06); color: #fff; text-decoration: none; }
.side .sub a.active { background: rgba(235, 212, 57, .14); color: var(--yellow); font-weight: 600; }
.side .badge { margin-left: auto; background: var(--red); color: #fff; border-radius: 10px; padding: 0 7px; font-size: 11px; line-height: 18px; font-weight: 700; }
.side .badge + .chev { margin-left: 6px; }
.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top { height: 62px; background: rgba(255, 255, 255, .85); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 14px; padding: 0 24px; position: sticky; top: 0; z-index: 30; }
.top .burger { background: none; border: 0; cursor: pointer; padding: 6px; border-radius: 8px; display: flex; }
.top .burger:hover { background: var(--gray-bg); }
.top .burger svg { width: 22px; height: 22px; stroke: var(--text); stroke-width: 2; stroke-linecap: round; }
.top-clock { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.top .spacer { flex: 1; }
.top .user { position: relative; }
.top .user > button { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px 6px 6px; cursor: pointer; display: flex; align-items: center; gap: 10px; font-weight: 600; }
.top .user > button:hover { border-color: #D1D5DB; }
.top .user .av { width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: var(--yellow); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; }
.top .user .role { display: block; font-size: 11px; color: var(--muted); font-weight: 500; text-align: left; line-height: 1.1; }
.user-menu { position: absolute; right: 0; top: 46px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); min-width: 200px; padding: 6px; }
.user-menu a { display: block; padding: 9px 12px; color: var(--text); border-radius: 8px; }
.user-menu a:hover { background: var(--gray-bg); text-decoration: none; }
.main { flex: 1; padding: 24px 28px 40px; }
.sheet { max-width: 1480px; margin: 0 auto; }
@media (max-width: 900px) { .side { position: fixed; z-index: 40; left: 0; box-shadow: var(--shadow-lg); } .main { padding: 14px; } .top { padding: 0 12px; } }
.crumbs { font-size: 12px; margin-bottom: 6px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs a::after { content: ' ›'; }
.page-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head .grow { flex: 1; }
.city-pick { display: inline-flex; align-items: center; gap: 6px; background: var(--yellow-soft); color: #7A6400; font-size: 13px; font-weight: 700; border: 1px solid #F3E4A0; border-radius: 999px; padding: 5px 12px; cursor: pointer; }
.footer { color: var(--muted-2); font-size: 12px; text-align: center; padding: 26px 0 0; }

/* ---------- Элементы ---------- */
.btn { border: 1px solid var(--line); border-radius: 10px; padding: 9px 16px; cursor: pointer; font-weight: 600; background: var(--card); color: var(--text); white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background .15s, border-color .15s, box-shadow .15s, transform .05s; text-decoration: none !important; }
.btn:hover { border-color: #CBD0DA; box-shadow: 0 1px 3px rgba(0, 0, 0, .06); }
.btn:active { transform: translateY(1px); }
.btn.green, .btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.green:hover, .btn.primary:hover { background: var(--navy-2); }
.btn.yellow { background: var(--yellow); border-color: var(--yellow); color: var(--navy); }
.btn.red { background: #fff; border-color: #F5C2C2; color: var(--red); }
.btn.red:hover { background: var(--red-bg); }
.btn.blue { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--link); padding: 4px 8px; }
.btn.ghost:hover { background: var(--gray-bg); box-shadow: none; }
.btn.sm { padding: 6px 11px; font-size: 12px; border-radius: 8px; }
.btn.lg { padding: 12px 18px; font-size: 15px; }
.btn:disabled { opacity: .5; cursor: default; }
.in, .sel, textarea.in { background: var(--card); border: 1px solid #DDE1E8; border-radius: 10px; padding: 8px 11px; min-width: 0; transition: border-color .15s, box-shadow .15s; }
.in:focus, .sel:focus { outline: none; border-color: var(--navy-3); box-shadow: 0 0 0 3px rgba(47, 93, 203, .15); }
.in:disabled, .sel:disabled { background: var(--line-2); color: #4B5563; }
.in::placeholder { color: var(--muted-2); }
.sel { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B7280' stroke-width='1.6' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; padding-right: 32px; cursor: pointer; }
.side .city select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23EBD439' stroke-width='1.6' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; }
input[type=checkbox], input[type=radio] { accent-color: var(--navy); width: 15px; height: 15px; }
.in.w60 { width: 64px; } .in.w80 { width: 84px; } .in.w100 { width: 104px; } .in.w140 { width: 150px; } .in.w200 { width: 210px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.filters .in, .filters .sel { flex: 1 1 150px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 6px 0 16px; flex-wrap: wrap; }
.tabs a { position: relative; padding: 10px 14px; color: var(--muted); font-weight: 600; font-size: 13px; border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; align-items: center; gap: 6px; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--text); border-bottom-color: var(--yellow); }
.tabs a.warn { color: var(--red); }
.tabs a sup { position: static; background: var(--gray-bg); color: var(--text); border-radius: 999px; padding: 1px 7px; font-size: 11px; line-height: 16px; font-weight: 700; }
.tabs a.active sup { background: var(--navy); color: #fff; }
.tabs a.warn sup { background: var(--red); color: #fff; }
.seg { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 4px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 9px; color: var(--muted); cursor: pointer; font-weight: 600; font-size: 13px; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--navy); color: #fff; }
.checks { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; margin-bottom: 14px; }
.checks label { display: flex; align-items: center; gap: 7px; cursor: pointer; color: #374151; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }
.span2 { grid-column: span 2; } @media (max-width: 700px) { .span2 { grid-column: auto; } }

/* Таблицы — в карточке */
.tbl-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--card); }
.sheet > table.tbl, .tbl-standalone, #wbox > table.tbl, #rbox > table.tbl, #optsBox table.tbl, .modal-pad table.tbl { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.tbl-wrap table.tbl { border: 0; box-shadow: none; }
.tbl th { text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 11px 12px; background: #FAFBFC; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tr.click { cursor: pointer; transition: background .1s; }
.tbl tr.click:hover td { background: #FBFAF3; }
.tbl tr.dim td { color: var(--muted-2); }
.tbl tfoot td { font-weight: 700; background: #FAFBFC; border-top: 1px solid var(--line); }
.tbl .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbl td > a:first-child { font-weight: 600; }
.empty { padding: 42px; text-align: center; color: var(--muted); }
.st { font-weight: 700; font-size: 13px; }
.st.green { color: var(--green); } .st.red { color: var(--red); } .st.amber { color: var(--amber); } .st.blue { color: var(--blue); } .st.gray { color: var(--gray); } .st.violet { color: var(--violet); }
.timer { display: inline-block; margin-top: 3px; color: var(--green); font-variant-numeric: tabular-nums; font-size: 12px; font-weight: 600; background: var(--green-bg); border-radius: 6px; padding: 1px 6px; }
.timer.late { color: var(--red); background: var(--red-bg); }
.district { font-size: 11px; color: var(--muted); background: var(--gray-bg); border-radius: 5px; padding: 0 6px; display: inline-block; margin: 2px 0; }
.tag { display: inline-block; border-radius: 999px; padding: 2px 9px; font-size: 11px; font-weight: 700; }
.tag.green { background: var(--green-bg); color: var(--green); } .tag.red { background: var(--red-bg); color: var(--red); }
.tag.amber { background: var(--amber-bg); color: var(--amber); } .tag.blue { background: var(--blue-bg); color: var(--blue); }
.tag.gray { background: var(--gray-bg); color: var(--gray); } .tag.violet { background: var(--violet-bg); color: var(--violet); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.cars-online { font-size: 12px; color: var(--muted); line-height: 1.4; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 5px 12px; }
.cars-online b { color: var(--text); margin-right: 8px; }

/* Показатели (главная) */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1200px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .tiles { grid-template-columns: 1fr; } }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; min-height: 210px; box-shadow: var(--shadow); }
.tile.wide { grid-column: span 2; } @media (max-width: 700px) { .tile.wide { grid-column: auto; } }
.tile h4 { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.tile .big { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 6px; }
.tile .delta { font-size: 12px; margin-left: 8px; font-weight: 700; padding: 2px 7px; border-radius: 999px; vertical-align: middle; }
.tile .delta.down { color: var(--red); background: var(--red-bg); } .tile .delta.up { color: var(--green); background: var(--green-bg); }
.hint { display: inline-flex; align-items: center; justify-content: center; background: var(--gray-bg); color: var(--muted); border-radius: 50%; width: 16px; height: 16px; font-size: 10px; font-weight: 700; cursor: help; }
.drv-list div { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line-2); color: var(--muted); font-weight: 500; }
.drv-list div b { font-size: 22px; min-width: 40px; color: var(--text); font-weight: 800; }
.drv-list div:nth-child(1) b { color: var(--blue); } .drv-list div:nth-child(2) b { color: var(--red); }
.drv-list div:nth-child(3) b { color: var(--green); } .drv-list div:nth-child(4) b { color: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11px; margin-bottom: 6px; color: var(--muted); }
svg.chart { width: 100%; height: 150px; display: block; overflow: visible; }
svg.chart .grid line { stroke: #EEF0F4; stroke-width: 1; }
svg.chart text { font-size: 8.5px; fill: #9CA3AF; }

/* Модальные окна */
.modal { position: fixed; inset: 0; background: rgba(10, 18, 38, .55); backdrop-filter: blur(3px); z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 28px 12px; overflow-y: auto; }
.modal-box { background: #fff; border-radius: 18px; width: 100%; max-width: 760px; position: relative; box-shadow: var(--shadow-lg); overflow: hidden; }
.modal-box.wide { max-width: 1100px; }
.modal-box.narrow { max-width: 500px; }
.modal-close { position: absolute; right: 10px; top: 8px; border: 0; background: var(--gray-bg); width: 32px; height: 32px; border-radius: 50%; font-size: 20px; line-height: 1; color: var(--text); cursor: pointer; z-index: 2; }
.modal-close:hover { background: #E5E7EB; }
.modal-pad { padding: 24px 26px; }
.modal-pad h2 { padding-right: 36px; }
.mtabs { display: flex; gap: 4px; padding: 12px 18px 0; border-bottom: 1px solid var(--line); background: #FAFBFC; }
.mtabs a { padding: 9px 12px; font-size: 13px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.mtabs a:hover { color: var(--text); text-decoration: none; }
.mtabs a.active { color: var(--text); border-bottom-color: var(--yellow); }
.ohead { background: var(--navy); color: #fff; padding: 16px 22px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; border-left: 6px solid var(--yellow); }
.ohead.s-searching { border-left-color: var(--yellow); } .ohead.s-accepted, .ohead.s-arrived { border-left-color: #60A5FA; }
.ohead.s-in_progress { border-left-color: #4ADE80; } .ohead.s-completed { border-left-color: #9CA3AF; } .ohead.s-cancelled { border-left-color: #F87171; }
.ohead.s-frozen { border-left-color: #93C5FD; }
.ohead h3 { margin: 0; font-size: 18px; font-weight: 700; }
.ohead h3 span { color: var(--yellow); }
.ohead .grow { flex: 1; }
.ohead .sel { background-color: var(--navy-2); border-color: var(--navy-3); color: #fff; }
.ohead .sub { font-size: 12px; width: 100%; margin-top: -4px; color: #C3CCE0; }
.ohead .sub b { color: #fff; }
.osec { padding: 16px 22px; border-bottom: 1px solid var(--line); }
.osec.gray { background: #FAFBFC; }
.orow { display: grid; grid-template-columns: 26px minmax(0, 1fr) 150px 80px 80px 10px; gap: 10px; align-items: end; margin-bottom: 10px; }
.orow .pt { width: 22px; height: 22px; border-radius: 50%; background: var(--yellow); color: var(--navy); font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.orow:nth-child(2) .pt { background: var(--navy); color: var(--yellow); }
.orow label, .flab { font-size: 11px; color: var(--muted); display: block; margin-bottom: 4px; font-weight: 600; }
.orow .in, .orow .sel { width: 100%; }
@media (max-width: 700px) { .orow { grid-template-columns: 26px 1fr 1fr; } }
.ocols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.ocols > div { padding: 16px 22px; border-right: 1px solid var(--line); }
.ocols > div:last-child { border-right: 0; }
.ocols b { font-size: 13px; }
@media (max-width: 700px) { .ocols { grid-template-columns: 1fr; } .ocols > div { border-right: 0; border-bottom: 1px solid var(--line); } }
.ofoot { display: flex; align-items: center; gap: 10px; padding: 14px 22px; background: #FAFBFC; flex-wrap: wrap; }
.ofoot .grow { flex: 1; }
.person { display: flex; gap: 12px; align-items: flex-start; }
.avatar { width: 48px; height: 48px; border-radius: 12px; background: var(--gray-bg); display: flex; align-items: center; justify-content: center; color: var(--muted-2); flex: none; }
.avatar svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.counters { display: flex; gap: 6px; margin-top: 6px; font-size: 11px; flex-wrap: wrap; }
.counters span { background: var(--gray-bg); border-radius: 6px; padding: 1px 7px; font-weight: 600; }
.counters span:first-child { background: var(--green-bg); color: var(--green); }
.counters span:nth-child(2) { background: var(--red-bg); color: var(--red); }
.price-big { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.events { padding: 18px 22px; font-size: 13px; }
.events div { display: grid; grid-template-columns: 130px 1fr; gap: 14px; padding: 8px 0; border-bottom: 1px dashed var(--line); position: relative; }
.events .t { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.map { height: 440px; background: #E9ECF2; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.map.tall { height: calc(100vh - 230px); min-height: 440px; }
.map-off { padding: 48px; text-align: center; color: var(--muted); }
.drv-pick { max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; margin-top: 6px; box-shadow: var(--shadow); }
.drv-pick div { padding: 8px 12px; border-bottom: 1px solid var(--line-2); cursor: pointer; font-size: 12px; display: flex; gap: 8px; align-items: center; }
.drv-pick div:hover { background: var(--yellow-soft); }

/* Формы карточек */
.form { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 12px 20px; align-items: center; max-width: 920px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); }
.modal-pad .form { border: 0; box-shadow: none; padding: 4px 0; }
.form > label { color: #374151; font-size: 13px; font-weight: 500; text-align: right; }
.form .in, .form .sel, .form textarea { width: 100%; max-width: 440px; }
.form .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.form h3 { grid-column: 1 / -1; margin: 12px 0 0; padding-top: 14px; border-top: 1px solid var(--line-2); font-size: 14px; }
.form h3:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
@media (max-width: 700px) { .form { grid-template-columns: 1fr; } .form > label { text-align: left; } }
.price-grid { display: grid; grid-template-columns: 280px 190px 190px; gap: 10px 16px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); max-width: 920px; }
.price-grid .hd { font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.price-grid label { font-size: 13px; color: #374151; }
.price-grid .cell { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.price-grid .in { width: 100px; }
@media (max-width: 700px) { .price-grid { grid-template-columns: 1fr 1fr 1fr; } }
.save-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); padding: 14px 18px; border-radius: var(--radius); margin-top: 18px; box-shadow: var(--shadow); max-width: 920px; }
.modal-pad .save-bar { box-shadow: none; max-width: none; }
.bal-box { display: flex; gap: 14px; align-items: stretch; flex-wrap: wrap; }
.bal-box .cur { background: var(--navy); color: #C3CCE0; border-radius: var(--radius); padding: 16px 24px; text-align: left; min-width: 200px; }
.bal-box .cur b { display: block; color: var(--yellow); font-size: 28px; margin-top: 6px; font-weight: 800; }
.bal-box .cur b.neg { color: #FCA5A5; }
.bal-box .op { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: grid; grid-template-columns: 240px 1fr auto; gap: 10px; flex: 1; min-width: 300px; box-shadow: var(--shadow); }

/* Уведомление */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 12px 18px 12px 16px; border-radius: 12px; z-index: 100; max-width: 90vw; box-shadow: var(--shadow-lg); border-left: 4px solid var(--yellow); font-weight: 500; }
.toast.err { background: #7F1D1D; border-left-color: #FCA5A5; }
.loading { padding: 48px; text-align: center; color: var(--muted); }
.bal-box .op { grid-template-columns: 230px 140px 1fr auto; align-items: center; }
.bal-box .op .sel { order: 0; } .bal-box .op .row { order: 1; } .bal-box .op .in#bCom { order: 2; } .bal-box .op .btn { order: 3; }
@media (max-width: 900px) { .bal-box .op { grid-template-columns: 1fr 1fr; } }
.addr-sug { position: absolute; left: 0; right: 0; top: 100%; margin-top: 4px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); z-index: 60; max-height: 300px; overflow-y: auto; }
.addr-sug div { padding: 9px 12px; cursor: pointer; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.addr-sug div:last-child { border-bottom: 0; }
.addr-sug div:hover, .addr-sug div.on { background: var(--yellow-soft); }

/* ===== Разделы «как в Gootax» (настройки, справочники) ===== */
.gx-form h3 { grid-column: 1 / -1; }
.gx-inline { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.gx-stack { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.gx-stack .in, .gx-stack textarea { width: 100%; max-width: 520px; }
.gx-chk { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; text-align: left; cursor: pointer; }
.gx-sel { max-width: 440px; }
.gx-multi { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 12px; max-height: 190px; overflow: auto;
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: #FAFBFC; }
.gx-multi label { font-size: 13px; display: flex; gap: 6px; align-items: center; }
pre.code { background: #F6F7F9; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; white-space: pre-wrap; font-size: 12px; }
@media (max-width: 760px) { .gx-multi { grid-template-columns: 1fr; } }
.gx-form .tbl td:first-child { white-space: nowrap; }

/* ===== Простая форма «Новый заказ» ===== */
.modal-box.nw-box { max-width: 860px; }
.nw-head { display: flex; align-items: center; gap: 14px; padding: 18px 60px 14px 26px; border-bottom: 1px solid var(--line); background: var(--navy); color: #fff; }
.nw-head h2 { margin: 0; font-size: 20px; }
.nw-head .sel { width: auto; min-width: 180px; }
.nw-city { background: rgba(255,255,255,.12); border-radius: 999px; padding: 4px 12px; font-weight: 600; }
.modal-box.nw-box .modal-close { color: #fff; }
.nw-body { padding: 8px 26px 4px; }
.nw-sec { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line-2); }
.nw-num { flex: 0 0 28px; height: 28px; border-radius: 50%; background: var(--yellow); color: var(--navy); font-weight: 800; display: flex; align-items: center; justify-content: center; margin-top: 2px; }
.nw-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.nw-title { font-weight: 700; font-size: 15px; }
.nw-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.nw-row .in, .nw-addr .in { width: 100%; max-width: none; }
.nw-big { font-size: 17px; font-weight: 600; }
.nw-hint { color: var(--muted); font-size: 13px; min-height: 18px; }
.nw-addr { display: flex; align-items: center; gap: 10px; }
.nw-addr .pt { flex: 0 0 26px; height: 26px; border-radius: 50%; background: var(--green); color: #fff; font-weight: 800; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.nw-addr .pt.b { background: var(--navy); }
.nw-grow { flex: 1; min-width: 0; position: relative; }
.nw-small { flex: 0 0 110px; width: 110px !important; }
.nw-tariffs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.nw-tariff { border: 2px solid var(--line); background: #fff; border-radius: 12px; padding: 10px 12px; text-align: left; display: flex; flex-direction: column; gap: 2px; cursor: pointer; font: inherit; }
.nw-tariff span { color: var(--muted); font-size: 13px; }
.nw-tariff:hover { border-color: var(--yellow-2); }
.nw-tariff.on { border-color: var(--yellow); background: var(--yellow-soft); }
.nw-tariff.on span { color: var(--text); font-weight: 700; }
.nw-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 14px; font: inherit; font-weight: 600; cursor: pointer; }
.chip-btn.small { padding: 5px 11px; font-size: 13px; font-weight: 500; }
.chip-btn.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.nw-more { margin: 14px 0 6px; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; }
.nw-more summary { cursor: pointer; padding: 12px 0; font-weight: 700; }
.nw-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; padding: 4px 0 16px; }
.nw-grid label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: #374151; }
.nw-grid .in, .nw-grid .sel { width: 100%; max-width: none; }
.nw-check { flex-direction: row !important; align-items: center; align-self: end; padding-bottom: 8px; }
.nw-grid .drv-pick { position: absolute; left: 0; right: 0; top: 100%; z-index: 5; }
.nw-foot { display: flex; align-items: center; gap: 10px; padding: 14px 26px; border-top: 1px solid var(--line); background: #FAFBFC; position: sticky; bottom: 0; }
.nw-total { display: flex; flex-direction: column; }
.nw-total b { font-size: 26px; line-height: 1.1; }
.nw-go { height: 46px; padding: 0 22px; font-size: 15px; }
@media (max-width: 700px) {
  .nw-row, .nw-grid { grid-template-columns: 1fr; }
  .nw-body, .nw-head, .nw-foot { padding-left: 16px; padding-right: 16px; }
  .nw-foot { flex-wrap: wrap; }
}
.nw-foot .grow { flex: 1; }
.tbl tr.total td { font-weight: 700; border-top: 2px solid var(--line); background: var(--bg, #f6f8fb); }
.ac-rule { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--gray-bg); border-radius: 10px; padding: 8px 10px; font-size: 13px; }
.ac-rule .in { flex: none; text-align: center; font-weight: 700; }
