/* public/css/main.css */

:root {
  --brand:        #2563EB;
  --brand-dark:   #1D4ED8;
  --brand-light:  #EFF6FF;
  --brand-2:      #7C3AED;
  --success:      #16A34A;
  --success-light:#F0FDF4;
  --warning:      #D97706;
  --warning-light:#FFFBEB;
  --danger:       #DC2626;
  --danger-light: #FEF2F2;
  --info:         #0891B2;
  --info-light:   #ECFEFF;
  --bg:           #F8FAFC;
  --surface:      #FFFFFF;
  --surface-2:    #F1F5F9;
  --border:       #E2E8F0;
  --border-2:     #CBD5E1;
  --text:         #0F172A;
  --text-2:       #475569;
  --text-3:       #94A3B8;
  --text-inv:     #FFFFFF;
  --radius:       12px;
  --radius-lg:    16px;
  --radius-xl:    20px;
  --shadow:       0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:    0 4px 12px rgba(0,0,0,.10);
  --shadow-lg:    0 10px 30px rgba(0,0,0,.12);
  --sidebar-w:    240px;
  --topbar-h:     60px;
  --font:         'Manrope', system-ui, sans-serif;
  --transition:   0.18s ease;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.5; min-height: 100vh; }
a { text-decoration: none; color: inherit; }
button, input, textarea, select { font-family: inherit; font-size: inherit; }

/* Sidebar */
.sidebar { position: fixed; top: 0; left: 0; width: var(--sidebar-w); height: 100vh; background: var(--text); display: flex; flex-direction: column; z-index: 100; transition: transform var(--transition); overflow: hidden; }
.sidebar-logo { display: flex; align-items: center; gap: 10px; padding: 20px 18px; border-bottom: 1px solid rgba(255,255,255,.08); }
.logo-icon { width: 34px; height: 34px; background: var(--brand); border-radius: 9px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 16px; flex-shrink: 0; }
.logo-text { font-size: 16px; font-weight: 800; color: #fff; letter-spacing: -.3px; }
.sidebar-nav { flex: 1; padding: 12px 10px; overflow-y: auto; }
.nav-section-label { font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: rgba(255,255,255,.3); padding: 14px 8px 6px; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: rgba(255,255,255,.65); font-size: 13.5px; font-weight: 500; transition: all var(--transition); margin-bottom: 2px; }
.nav-link i { font-size: 15px; flex-shrink: 0; width: 18px; text-align: center; }
.nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-link.active { background: var(--brand); color: #fff; font-weight: 600; }
.nav-badge { margin-left: auto; background: var(--brand); color: #fff; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 10px; min-width: 18px; text-align: center; }
.sidebar-user { padding: 14px 12px; border-top: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; gap: 10px; }
.user-avatar { width: 34px; height: 34px; background: var(--brand); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.user-info { flex: 1; min-width: 0; }
.user-phone { font-size: 12px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11px; color: rgba(255,255,255,.4); }
.logout-btn { color: rgba(255,255,255,.4); font-size: 15px; transition: color var(--transition); padding: 4px; }
.logout-btn:hover { color: var(--danger); }

/* Topbar */
.main-wrap { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar { height: var(--topbar-h); background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; padding: 0 24px; position: sticky; top: 0; z-index: 50; gap: 12px; }
.topbar-toggle { display: none; background: none; border: none; font-size: 20px; cursor: pointer; color: var(--text-2); padding: 4px; }
.topbar-title { font-size: 15px; font-weight: 700; color: var(--text); flex: 1; }
.topbar-right { display: flex; align-items: center; gap: 6px; }
.topbar-icon-btn { width: 36px; height: 36px; border-radius: 9px; display: flex; align-items: center; justify-content: center; color: var(--text-2); font-size: 16px; transition: all var(--transition); background: transparent; border: 1px solid transparent; }
.topbar-icon-btn:hover { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.topbar-icon-btn.text-danger { color: var(--danger); }
.topbar-icon-btn.text-danger:hover { background: var(--danger-light); border-color: #FECACA; }

/* Page Content */
.page-content { padding: 24px; flex: 1; }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.page-header h1, .page-header h2 { font-size: 22px; font-weight: 800; letter-spacing: -.4px; }
.page-header p { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.page-header-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Cards & Stats */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.card-header { padding: 16px 20px; border-bottom: 1px solid var(--border); font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-body { padding: 20px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; display: flex; align-items: flex-start; gap: 14px; transition: box-shadow var(--transition); }
.stat-card:hover { box-shadow: var(--shadow-md); }
.stat-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.stat-icon.blue   { background: var(--brand-light); color: var(--brand); }
.stat-icon.green  { background: var(--success-light); color: var(--success); }
.stat-icon.orange { background: var(--warning-light); color: var(--warning); }
.stat-icon.purple { background: #F5F3FF; color: var(--brand-2); }
.stat-icon.red    { background: var(--danger-light); color: var(--danger); }
.stat-icon.cyan   { background: var(--info-light); color: var(--info); }
.stat-value { font-size: 26px; font-weight: 800; line-height: 1.1; letter-spacing: -.5px; }
.stat-label { font-size: 12px; color: var(--text-2); margin-top: 3px; }
.stat-delta { font-size: 11px; margin-top: 4px; }
.stat-delta.up   { color: var(--success); }
.stat-delta.down { color: var(--danger); }

/* Tables */
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.table-toolbar { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
table { width: 100%; border-collapse: collapse; }
thead { background: var(--surface-2); }
th { padding: 11px 16px; text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--text-3); white-space: nowrap; border-bottom: 1px solid var(--border); }
td { padding: 13px 16px; font-size: 13px; color: var(--text); border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr { transition: background var(--transition); }
tbody tr:hover { background: var(--surface-2); }

/* Badges & Pills & Dots */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.badge-blue    { background: var(--brand-light); color: var(--brand); }
.badge-green   { background: var(--success-light); color: var(--success); }
.badge-orange  { background: var(--warning-light); color: var(--warning); }
.badge-red     { background: var(--danger-light); color: var(--danger); }
.badge-purple  { background: #F5F3FF; color: var(--brand-2); }
.badge-gray    { background: var(--surface-2); color: var(--text-2); }
.badge-cyan    { background: var(--info-light); color: var(--info); }
.status-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.status-dot::before { content: ''; width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.status-dot.green::before  { background: var(--success); box-shadow: 0 0 0 2px #BBF7D0; }
.status-dot.orange::before { background: var(--warning); box-shadow: 0 0 0 2px #FDE68A; }
.status-dot.red::before    { background: var(--danger);  box-shadow: 0 0 0 2px #FECACA; }
.status-dot.blue::before   { background: var(--brand);   box-shadow: 0 0 0 2px #BFDBFE; }
.status-dot.gray::before   { background: var(--text-3);  box-shadow: 0 0 0 2px var(--border); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 9px; font-size: 13px; font-weight: 600; cursor: pointer; border: 1px solid transparent; transition: all var(--transition); white-space: nowrap; line-height: 1; }
.btn i { font-size: 14px; }
.btn-primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); box-shadow: 0 4px 12px rgba(37,99,235,.3); }
.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-success:hover { background: #15803D; }
.btn-danger  { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover  { background: #B91C1C; }
.btn-warning { background: var(--warning); color: #fff; border-color: var(--warning); }
.btn-outline { background: var(--surface); color: var(--text-2); border-color: var(--border); }
.btn-outline:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-2); }
.btn-ghost { background: transparent; color: var(--text-2); border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 7px; }
.btn-lg { padding: 11px 22px; font-size: 15px; border-radius: 10px; }
.btn-icon { padding: 8px; width: 34px; height: 34px; justify-content: center; }
.btn-icon.btn-sm { width: 28px; height: 28px; padding: 5px; }
.btn:disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }

/* Forms & Alerts */
.form-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 5px; }
.form-control { width: 100%; padding: 9px 12px; background: var(--surface); border: 1.5px solid var(--border); border-radius: 8px; color: var(--text); font-size: 13px; transition: border-color var(--transition), box-shadow var(--transition); }
.form-control:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
select.form-control { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%2394A3B8' d='M1.5 5.5l6.5 6.5 6.5-6.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 14px; padding-right: 32px; }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-group { margin-bottom: 16px; }
.form-row { display: grid; gap: 12px; }
.form-row.cols-2 { grid-template-columns: 1fr 1fr; }
.form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.alert { padding: 12px 16px; border-radius: 10px; font-size: 13px; display: flex; align-items: flex-start; gap: 10px; margin-bottom: 16px; border: 1px solid transparent; }
.alert-success { background: var(--success-light); color: #14532D; border-color: #BBF7D0; }
.alert-danger  { background: var(--danger-light);  color: #7F1D1D; border-color: #FECACA; }
.alert-warning { background: var(--warning-light); color: #78350F; border-color: #FDE68A; }
.alert-info    { background: var(--info-light);    color: #164E63; border-color: #A5F3FC; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-3); }
.empty-state i { font-size: 42px; display: block; margin-bottom: 12px; opacity: .4; }
.empty-state p { font-size: 15px; color: var(--text-2); font-weight: 600; }
.empty-state small { font-size: 13px; color: var(--text-3); display: block; margin-top: 4px; }

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* Responsive */
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 99; }
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .main-wrap { margin-left: 0; }
  .topbar-toggle { display: flex; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row.cols-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .page-content { padding: 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-row.cols-2, .form-row.cols-3 { grid-template-columns: 1fr; }
  th, td { padding: 10px 12px; }
}

/* Utilities */
.text-muted { color: var(--text-3); }
.text-brand { color: var(--brand); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.mb-0 { margin-bottom: 0; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mt-8 { margin-top: 8px; }
.w-100 { width: 100%; }

/* Fleet Map (диспетчерская карта) */
.fleet-wrapper { display: flex; height: calc(100vh - 60px); margin: -1.5rem; background: #f4f6f9; }
.fleet-map-container { flex: 1; position: relative; }
#fleet-map { width: 100%; height: 100%; }
.smart-filters { position: absolute; top: 15px; left: 15px; right: 15px; background: rgba(255,255,255,0.95); padding: 10px 15px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); z-index: 1000; display: flex; gap: 15px; align-items: center; backdrop-filter: blur(4px); flex-wrap: wrap; }
.filter-btn { font-size: 13px; font-weight: 600; color: #64748b; padding: 6px 12px; border-radius: 20px; cursor: pointer; transition: all 0.2s; border: 1px solid transparent; display: flex; align-items: center; background: #f1f5f9; }
.filter-btn:hover { background: #e2e8f0; }
.filter-btn.active { background: #fff; border-color: #cbd5e1; box-shadow: 0 2px 5px rgba(0,0,0,0.05); color: #0f172a; }
.fleet-legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.bg-free { background: #10b981; }
.bg-load { background: #f59e0b; }
.bg-route { background: #3b82f6; }
.bg-unload { background: #8b5cf6; }
.v-divider { width: 1px; height: 24px; background: #cbd5e1; margin: 0 5px; }
.city-search-box { display: flex; gap: 8px; flex: 1; max-width: 400px; }
.city-search-box input { flex: 1; padding: 6px 12px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 13px; outline: none; }
.city-search-box input:focus { border-color: #3b82f6; box-shadow: 0 0 0 2px rgba(59,130,246,0.2); }
.fleet-sidebar { width: 380px; background: #ffffff; border-left: 1px solid #e2e8f0; display: flex; flex-direction: column; z-index: 10; }
.fleet-sidebar-header { padding: 20px; border-bottom: 1px solid #e2e8f0; background: #f8fafc; }
.fleet-sidebar-header h4 { margin: 0; font-size: 18px; font-weight: 700; color: #0f172a; }
.fleet-driver-list { flex: 1; overflow-y: auto; padding-bottom: 20px; }
.fleet-driver-item { padding: 15px 20px; border-bottom: 1px solid #f1f5f9; cursor: pointer; transition: background 0.2s; }
.fleet-driver-item:hover { background: #f8fafc; }
.driver-name { font-weight: 600; color: #1e293b; font-size: 15px; }
.driver-car { font-size: 13px; color: #64748b; margin-top: 2px; }
.driver-plate { text-transform: uppercase; background: #e2e8f0; padding: 2px 6px; border-radius: 4px; font-size: 11px; font-weight: bold; color: #334155; }
.status-pill { padding: 3px 8px; border-radius: 12px; font-size: 11px; font-weight: 600; color: #fff; }
#sidebar-stats { background: #eff6ff; padding: 12px; border-radius: 8px; margin-top: 12px; border: 1px solid #bbf7d0; font-size: 13px; color: #065f46; }

/* Chat icon with notifications */
.chat-icon-wrap { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; transition: background 0.3s; }
.chat-icon-wrap i { font-size: 18px; }
.chat-notify-badge { position: absolute; top: -5px; right: -5px; background: #ef4444; color: #fff; border-radius: 50%; min-width: 17px; height: 17px; font-size: 9px; font-weight: 800; display: none; align-items: center; justify-content: center; padding: 0 3px; border: 2px solid #fff; }
.chat-icon-wrap.has-unread { background: rgba(239,68,68,0.15); }
.chat-icon-wrap.has-unread i { color: #ef4444 !important; }
@keyframes bellShake {
  0% { transform: rotate(0deg); }
  10% { transform: rotate(-20deg); }
  20% { transform: rotate(20deg); }
  30% { transform: rotate(-15deg); }
  40% { transform: rotate(15deg); }
  50% { transform: rotate(-8deg); }
  60% { transform: rotate(8deg); }
  70% { transform: rotate(-4deg); }
  80% { transform: rotate(4deg); }
  90% { transform: rotate(0deg); }
  100% { transform: rotate(0deg); }
}
.chat-icon-wrap.shaking { animation: bellShake 0.7s ease; }
@keyframes badgePop {
  0% { transform: scale(0); }
  60% { transform: scale(1.4); }
  100% { transform: scale(1); }
}
.chat-notify-badge.popping { animation: badgePop 0.3s ease forwards; }

/* Reports */
.rpt-page { padding: 4px 0 40px; }
.rpt-back { display: inline-flex; align-items: center; gap: 6px; color: #6b7280; font-size: 13px; text-decoration: none; margin-bottom: 8px; }
.rpt-back:hover { color: #1B2B4B; }
.rpt-header { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-bottom: 20px; }
.rpt-title { font-size: 22px; font-weight: 800; color: #1B2B4B; display: flex; align-items: center; gap: 10px; margin: 0 0 4px; }
.rpt-subtitle { font-size: 13px; color: #6b7280; margin: 0; }
.rpt-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-excel { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; background: #16a34a; color: #fff; border-radius: 8px; font-weight: 600; font-size: 13px; text-decoration: none; }
.btn-excel:hover { background: #15803d; color: #fff; }
.btn-print { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; background: #fff; color: #1B2B4B; border: 1.5px solid #1B2B4B; border-radius: 8px; font-weight: 600; font-size: 13px; cursor: pointer; }
.btn-print:hover { background: #1B2B4B; color: #fff; }
.rpt-filters { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 18px 20px; margin-bottom: 16px; }
.filter-form { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 14px; }
.filter-field { display: flex; flex-direction: column; gap: 5px; }
.filter-field label { font-size: 11px; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: .4px; display: flex; align-items: center; gap: 4px; }
.filter-field-wide { flex: 1; min-width: 220px; }
.f-input { padding: 8px 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 13px; font-family: inherit; background: #fafafa; color: #111827; min-width: 150px; outline: none; }
.f-input:focus { border-color: #1B2B4B; background: #fff; }
.btn-apply { display: inline-flex; align-items: center; gap: 6px; padding: 9px 20px; background: #1B2B4B; color: #fff; border: none; border-radius: 8px; font-weight: 700; font-size: 13px; cursor: pointer; align-self: flex-end; }
.rpt-period-badge { display: inline-flex; align-items: center; gap: 6px; background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; border-radius: 20px; padding: 5px 14px; font-size: 12px; font-weight: 600; margin-bottom: 16px; }
.sum-row { display: flex; gap: 14px; margin-bottom: 18px; }
.sum-mini { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 14px 20px; display: flex; flex-direction: column; gap: 2px; min-width: 140px; }
.sum-num { font-size: 26px; font-weight: 800; color: #1B2B4B; }
.sum-lbl { font-size: 11px; color: #6b7280; font-weight: 600; }
.rpt-table-wrap { background: #fff; overflow-x: auto; }
.rpt-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 900px; }
.rpt-table thead tr { background: #1B2B4B; }
.rpt-table th { color: #fff; padding: 10px 13px; text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; white-space: nowrap; }
.rpt-table td { padding: 10px 13px; border-bottom: 1px solid #f3f4f6; vertical-align: middle; }
.rpt-table tbody tr:hover { background: #f9fafb; }
.th-num { width: 40px; }
.td-num { color: #9ca3af; font-size: 12px; text-align: center; }
.td-phone { font-size: 12px; white-space: nowrap; }
.td-date { font-size: 12px; color: #6b7280; white-space: nowrap; }
.td-cargo { font-size: 12px; max-width: 120px; }
.td-price { font-weight: 700; color: #16a34a; white-space: nowrap; }
.td-empty { text-align: center; padding: 48px; color: #9ca3af; font-size: 14px; }
.driver-name { font-weight: 700; font-size: 13px; }
.driver-plate { font-size: 11px; color: #6b7280; font-family: monospace; background: #f3f4f6; padding: 1px 5px; border-radius: 4px; display: inline-block; margin-top: 2px; }
.disp-name-sm { font-size: 12px; font-weight: 600; }
.login-sm { background: #f3f4f6; padding: 1px 6px; border-radius: 4px; font-size: 11px; color: #374151; }
.route-from { font-size: 12px; color: #059669; font-weight: 600; }
.route-to { font-size: 12px; color: #dc2626; }
.order-num { font-weight: 700; color: #2563eb; font-size: 13px; }

/* Reports Index */
.reports-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }
.report-card { display: flex; align-items: center; gap: 16px; background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 22px 20px; text-decoration: none; color: inherit; transition: all .18s; }
.report-card:hover { border-color: #1B2B4B; box-shadow: 0 4px 16px rgba(27,43,75,.1); transform: translateY(-2px); }
.rc-icon { width: 54px; height: 54px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 24px; flex-shrink: 0; }
.rc-blue { background: #eff6ff; color: #3b82f6; }
.rc-green { background: #f0fdf4; color: #16a34a; }
.rc-purple { background: #ede9fe; color: #7c3aed; }
.rc-orange { background: #fff7ed; color: #ea580c; }
.rc-body { flex: 1; }
.rc-title { font-size: 15px; font-weight: 700; color: #111827; margin-bottom: 4px; }
.rc-desc { font-size: 12px; color: #6b7280; line-height: 1.5; }
.rc-arrow { font-size: 22px; color: #d1d5db; flex-shrink: 0; }
.report-card:hover .rc-arrow { color: #1B2B4B; }
@media (max-width: 768px) { .reports-grid { grid-template-columns: 1fr; } }

/* Controller Panel */
.ctrl-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 4px; }
.ctrl-notif-item { padding: 12px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: flex-start; gap: 10px; }
.ctrl-notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin-top: 5px; flex-shrink: 0; }
.ctrl-notif-title { font-weight: 600; font-size: 13px; }
.ctrl-notif-body { font-size: 12px; color: var(--text-2); }
.ctrl-link-more { font-size: 12px; color: var(--brand); text-decoration: none; }
.ctrl-link-more:hover { text-decoration: underline; }
.ctrl-empty-box { text-align: center; padding: 80px 20px; color: var(--text-3); background: #fff; border: 1px solid var(--border); border-radius: 16px; }
.ctrl-empty-box i { font-size: 48px; display: block; margin-bottom: 12px; opacity: .3; }
.ctrl-empty-box p { font-size: 16px; font-weight: 600; color: var(--text-2); }
.ctrl-empty-box small { font-size: 13px; }
@media (max-width: 900px) { .ctrl-grid-2 { grid-template-columns: 1fr; } }

/* Complaints Page */
.complaint-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1000; align-items: center; justify-content: center; }
.complaint-modal { background: #fff; border-radius: 16px; padding: 28px; width: 100%; max-width: 520px; box-shadow: 0 10px 30px rgba(0,0,0,.2); margin: 20px; }
.complaint-modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.complaint-modal-title { font-size: 17px; font-weight: 800; color: var(--danger); display: flex; align-items: center; gap: 8px; }
.complaint-modal-close { background: none; border: none; cursor: pointer; font-size: 22px; color: var(--text-3); line-height: 1; }
.complaint-driver-box { background: var(--surface-2); border-radius: 10px; padding: 14px; margin-bottom: 16px; }
.complaint-label { font-size: 12px; color: var(--text-3); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .4px; font-weight: 700; }
.complaint-driver-name { font-weight: 700; font-size: 15px; color: var(--text); }
.complaint-driver-phone { font-size: 13px; color: var(--text-2); }
.complaint-section { margin-bottom: 16px; }
.complaint-text-title { font-weight: 700; font-size: 15px; color: var(--text); }
.complaint-body-box { font-size: 14px; color: var(--text); line-height: 1.6; background: var(--surface-2); padding: 14px; border-radius: 10px; white-space: pre-wrap; word-break: break-word; }
.complaint-actions { display: flex; gap: 10px; }
.complaint-actions .btn { flex: 1; justify-content: center; }
.complaint-row-body { max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--text-2); }

/* Chat layout */
.chats-layout { display: flex; height: calc(100vh - 64px); background: #f0f2f5; }
.chats-sidebar { width: 280px; min-width: 240px; background: #fff; border-right: 1px solid #e5e7eb; display: flex; flex-direction: column; overflow: hidden; }
.chats-sidebar-header { padding: 16px; font-size: 17px; font-weight: 700; border-bottom: 1px solid #f3f4f6; display: flex; align-items: center; gap: 8px; }
.chats-list { flex: 1; overflow-y: auto; }
.chat-item { display: flex; align-items: center; gap: 10px; padding: 12px 14px; text-decoration: none; color: inherit; border-bottom: 1px solid #f3f4f6; transition: background .15s; cursor: pointer; }
.chat-item:hover { background: #f9fafb; }
.chat-item.active { background: #eef2ff; border-left: 3px solid #1B2B4B; }
.chat-avatar { position: relative; width: 42px; height: 42px; background: #e5e7eb; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; color: #6b7280; flex-shrink: 0; }
.unread-badge { position: absolute; top: -3px; right: -3px; background: #ef4444; color: #fff; border-radius: 50%; width: 18px; height: 18px; font-size: 10px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.chat-name { font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.chat-preview { font-size: 12px; color: #9ca3af; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.no-chats { text-align: center; padding: 40px 20px; color: #9ca3af; }
.chat-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.chat-empty-state { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #9ca3af; gap: 12px; }
.chat-main-header { background: #fff; padding: 12px 18px; border-bottom: 1px solid #e5e7eb; display: flex; align-items: center; }
.chat-header-info { display: flex; align-items: center; gap: 10px; }
.chat-header-avatar { width: 38px; height: 38px; background: #1B2B4B; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 16px; }
.chat-header-name { font-weight: 700; font-size: 14px; }
.chat-header-status { font-size: 11px; color: #22c55e; }
.chat-messages { flex: 1; overflow-y: auto; padding: 14px 18px; display: flex; flex-direction: column; gap: 6px; }
.no-messages { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #9ca3af; gap: 10px; margin: auto; }
.msg-wrap { display: flex; }
.msg-wrap.mine { justify-content: flex-end; }
.msg-wrap.theirs { justify-content: flex-start; }
.msg-bubble { max-width: 65%; padding: 10px 13px; border-radius: 16px; font-size: 14px; line-height: 1.5; word-break: break-word; }
.msg-wrap.mine .msg-bubble { background: #1B2B4B; color: #fff; border-bottom-right-radius: 4px; }
.msg-wrap.theirs .msg-bubble { background: #fff; color: #1a1a1a; border-bottom-left-radius: 4px; box-shadow: 0 1px 3px rgba(0,0,0,.07); }
.msg-sender { font-size: 11px; font-weight: 700; color: #1B2B4B; margin-bottom: 4px; }
.msg-wrap.mine .msg-sender { color: rgba(255,255,255,.7); }
.msg-time { font-size: 10px; color: rgba(255,255,255,.55); text-align: right; margin-top: 4px; }
.msg-wrap.theirs .msg-time { color: #9ca3af; }
.msg-img { max-width: 220px; max-height: 160px; border-radius: 8px; display: block; cursor: pointer; }
.msg-audio { margin: 4px 0; }
.msg-file { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; background: rgba(255,255,255,.15); border-radius: 8px; color: inherit; text-decoration: none; font-size: 12px; }
.msg-wrap.theirs .msg-file { background: #f3f4f6; color: #1B2B4B; }
.msg-location-card { display: block; text-decoration: none; color: inherit; border-radius: 12px; overflow: hidden; width: 240px; border: 1px solid rgba(255,255,255,0.2); }
.msg-wrap.theirs .msg-location-card { border-color: #e5e7eb; }
.msg-location-map-placeholder { background: linear-gradient(135deg, #1a3a5c 0%, #2d6a9f 100%); height: 100px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: white; }
.msg-location-map-placeholder i { font-size: 32px; color: #ff4444; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4)); }
.msg-location-coords { font-size: 10px; opacity: 0.7; font-family: monospace; }
.msg-location-footer { display: flex; align-items: center; gap: 5px; padding: 7px 10px; font-size: 12px; background: rgba(255,255,255,0.1); }
.msg-wrap.theirs .msg-location-footer { background: #f9fafb; color: #374151; }
.msg-location-open { margin-left: auto; font-weight: 700; font-size: 11px; color: #93c5fd; }
.msg-wrap.theirs .msg-location-open { color: #1B2B4B; }
.attach-preview { background: #fff; border-top: 1px solid #e5e7eb; padding: 10px 18px; }
.attach-preview-inner { display: flex; align-items: center; gap: 10px; background: #f9fafb; border-radius: 10px; padding: 8px 12px; }
.attach-remove { background: none; border: none; color: #ef4444; font-size: 18px; cursor: pointer; margin-left: auto; }
.attach-menu { background: #fff; border-top: 1px solid #e5e7eb; padding: 10px 18px; display: flex; gap: 14px; }
.attach-btn-item { display: flex; flex-direction: column; align-items: center; gap: 4px; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 12px; padding: 10px 14px; cursor: pointer; font-size: 11px; font-weight: 600; color: #374151; min-width: 56px; }
.attach-btn-item:hover { background: #f3f4f6; }
.attach-btn-item i { font-size: 22px; }
.chat-input-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: #fff; border-top: 1px solid #e5e7eb; }
.input-attach-btn { width: 38px; height: 38px; border: none; border-radius: 50%; background: #f3f4f6; color: #6b7280; font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .15s; flex-shrink: 0; }
.input-attach-btn:hover, .input-attach-btn.active { background: #1B2B4B; color: #fff; }
.chat-input { flex: 1; border: 1px solid #e5e7eb; border-radius: 20px; padding: 9px 16px; font-size: 14px; outline: none; background: #f9fafb; }
.chat-input:focus { border-color: #1B2B4B; background: #fff; }
.chat-send-btn { width: 40px; height: 40px; background: #1B2B4B; color: #fff; border: none; border-radius: 50%; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.chat-send-btn:disabled { opacity: .5; }

.badge-yellow {
  background: #fef9c3 !important;
  color: #854d0e !important;
}

/* Фиолетовый бейдж (К выгрузке / Международный) */
.badge-purple {
  background: #f5f3ff !important;
  color: #6d28d9 !important;
}

/* Сетка чатов (grid вместо flex, как в исходном шаблоне) */
.chats-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 0;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  height: calc(100vh - 160px);
}

/* Левая панель чатов (без фиксированной ширины, она задаётся гридом) */
.chats-sidebar-left {
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

/* Ссылка-элемент списка чатов (вместо chat-item, который display:flex) */
.chat-item-link {
  display: block;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: background .15s;
}
.chat-item-link.active {
  background: var(--brand-light);
}
.chat-item-link:not(.active):hover {
  background: var(--surface-2);
}

/* Уменьшенный аватар (38×38 вместо 42×42) */
.chat-avatar-sm {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--brand-light);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

/* Информационный блок чата (имя + превью) */
.chat-info {
  flex: 1;
  min-width: 0;
}

/* Имя чата (переопределяем размер, если нужно) */
.chat-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
}
/* Превью сообщения */
.chat-preview {
  font-size: 11px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Утилита flex:1 */
.flex-1 {
  flex: 1;
}

.grid { display: grid; }
.gap-12 { gap: 12px; }
.gap-10 { gap: 10px; }
.gap-4 { gap: 4px; }
.flex-col { display: flex; flex-direction: column; }
.flex { display: flex; }
.wrap { flex-wrap: wrap; }
.justify-center { justify-content: center; }
.mt-2 { margin-top: 2px; }
.mt-4 { margin-top: 4px; }
.mt-6 { margin-top: 6px; }
.mb-8 { margin-bottom: 8px; }
.p-10 { padding: 10px; }
.fs-18 { font-size: 18px; }
.fs-24 { font-size: 24px; }
.fs-28 { font-size: 28px; }

/* Текстовые стили */
.label-uppercase {
  font-size: 11px;
  color: var(--text-3);
  font-weight: 600;
  text-transform: uppercase;
}
.value-bold {
  font-weight: 600;
}

/* Сетка документов */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

/* Картинка документа */
.doc-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: pointer;
}
.doc-pdf-placeholder {
  display: none;
  width: 100%;
  height: 140px;
  border-radius: 8px;
  border: 1px solid var(--border);
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  color: var(--text-3);
  font-size: 13px;
  flex-direction: column;
  gap: 6px;
}
.doc-placeholder {
  width: 100%;
  height: 140px;
  border-radius: 8px;
  border: 2px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  font-size: 12px;
  flex-direction: column;
  gap: 4px;
}


.fs-11 { font-size: 11px; }
.fs-13 { font-size: 13px; }
.fw-600 { font-weight: 600; }
.text-warning { color: var(--warning); }
.flex { display: flex; }
.gap-6 { gap: 6px; }
.inline { display: inline; }
.min-w-200 { min-width: 200px; }
.w-160 { width: 160px; }


/* Модальное окно */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.modal-container {
  background: #fff;
  border-radius: 16px;
  padding: 28px;
  width: 100%;
  max-width: 460px;
  box-shadow: var(--shadow-lg);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.modal-title {
  font-size: 17px;
  font-weight: 800;
  margin: 0;
}
.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: var(--text-3);
}
.full-width {
  grid-column: 1 / -1;
}
.mt-8 {
  margin-top: 8px;
}

.max-w-540 { max-width: 540px; }
.p-11 { padding: 11px; }

/* Дополнительные классы для order-detail.hbs */
.grid-1fr-380 {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
}
.gap-20 { gap: 20px; }
.text-center { text-align: center; }
.text-danger { color: var(--danger); }
.text-brand { color: var(--brand); }
.text-success { color: var(--success); }
.me-8 { margin-right: 8px; }
.me-8 i { margin-right: 8px; }
.break-all { word-break: break-all; }
.mt-3 { margin-top: 3px; }
.mt-4 { margin-top: 4px; }
.mt-12 { margin-top: 12px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.align-start { align-items: flex-start; }
.driver-avatar-sm {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--brand-light);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
}
.route-dots-vertical {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 3px;
}
.route-dots-vertical .dot-green {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--success);
}
.route-dots-vertical .dot-red {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--danger);
}
.route-dots-vertical .dot-line {
  width: 2px;
  flex: 1;
  background: var(--border);
  margin: 4px 0;
  min-height: 30px;
}

.ms-1 { margin-left: 4px; }

.order-form-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.form-section {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px 22px;
}
.fsect-title {
  font-size: 15px;
  font-weight: 700;
  color: #1B2B4B;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.add-pt-btn {
  margin-left: auto;
  background: none;
  border: 1.5px dashed #1B2B4B;
  color: #1B2B4B;
  border-radius: 8px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s;
}
.add-pt-btn:hover {
  background: #1B2B4B;
  color: #fff;
}
.form-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.fg {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 180px;
}
.fg.flex2 { flex: 2; }
.fg.flex1 { flex: 1; }
.fg label {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
}
.loc-point {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px;
  background: #fff;
}
.loc-point.extra {
  border-color: #bfdbfe;
  background: #eff6ff;
}
.pt-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.pt-badge {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}
.pt-load {
  background: #dcfce7;
  color: #15803d;
}
.pt-unload {
  background: #fee2e2;
  color: #dc2626;
}
.remove-pt-btn {
  margin-left: auto;
  background: none;
  border: none;
  color: #ef4444;
  font-size: 18px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
}
.remove-pt-btn:hover {
  background: #fee2e2;
}
.geo-status {
  font-size: 11px;
  margin-top: 3px;
  min-height: 14px;
}
.geo-status.ok {
  color: #15803d;
}
.geo-status.err {
  color: #dc2626;
}
.geo-status.loading {
  color: #6b7280;
}
.route-type-btns {
  display: flex;
  gap: 12px;
}
.route-btn {
  flex: 1;
  display: flex;
  align-items: center;
  cursor: pointer;
}
.route-btn input {
  display: none;
}
.route-btn span {
  flex: 1;
  text-align: center;
  padding: 12px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.15s;
}
.route-btn input:checked + span {
  border-color: #1B2B4B;
  background: #1B2B4B;
  color: #fff;
}
.checks-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.chk-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}
.chk-item input {
  width: 16px;
  height: 16px;
  cursor: pointer;
}
.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding-top: 8px;
  flex-wrap: wrap;
}
.btn-secondary {
  background: #6b7280;
  color: #fff;
}

/* ========== ДОПОЛНЕНИЯ ДЛЯ CUSTOMER-РАЗДЕЛА ========== */

/* Сетка формы нового заказа */
.customer-order-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
}
@media (max-width: 900px) {
  .customer-order-grid {
    grid-template-columns: 1fr;
  }
}

/* Текстовая линия высоты */
.lh-16 {
  line-height: 1.6;
}

/* Таймлайн */
.timeline {
  position: relative;
  padding-left: 24px;
}
.timeline-item {
  position: relative;
  padding-bottom: 20px;
}
.timeline-dot {
  position: absolute;
  left: -24px;
  top: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--brand);
  border: 2px solid white;
  box-shadow: 0 0 0 2px var(--brand);
}
.timeline-dot.bg-success {
  background: var(--success);
  box-shadow: 0 0 0 2px var(--success);
}
.timeline-line {
  position: absolute;
  left: -18px;
  top: 14px;
  width: 2px;
  height: calc(100% - 10px);
  background: var(--border);
}
.timeline-content {
  margin-top: -4px;
}
.timeline-title {
  font-weight: 600;
  font-size: 13px;
}
.timeline-time {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 2px;
}
.timeline-note {
  font-size: 13px;
  color: var(--text-2);
  margin-top: 4px;
  padding: 8px;
  background: var(--bg);
  border-radius: 6px;
}

/* Цвет текста для иконок */
.text-success {
  color: var(--success);
}
.text-danger {
  color: var(--danger);
}
.text-warning {
  color: var(--warning);
}
.text-brand {
  color: var(--brand);
}

/* Размер шрифта */
.fs-22 {
  font-size: 22px;
}
.fs-15 {
  font-size: 15px;
}

/* Общие */
.text-warning { color: var(--warning); }
.text-brand { color: var(--brand); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.fw-700 { font-weight: 700; }
.fw-600 { font-weight: 600; }
.fs-11 { font-size: 11px; }
.fs-12 { font-size: 12px; }
.fs-13 { font-size: 13px; }
.fs-15 { font-size: 15px; }
.text-underline { text-decoration: underline; }
.mb-20 { margin-bottom: 20px; }
.mt-8 { margin-top: 8px; }
.mt-4 { margin-top: 4px; }
.font-monospace { font-family: monospace; }

/* Сетка контроллера */
.controller-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 4px;
}
@media (max-width: 900px) {
  .controller-grid-2 { grid-template-columns: 1fr; }
}

/* Стили для чатов контроллера */
.controller-chats-container {
  display: flex;
  height: calc(100vh - 120px);
  gap: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.chats-sidebar {
  width: 300px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.chats-sidebar-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 15px;
}
.chats-list {
  flex: 1;
  overflow-y: auto;
}
.chat-item-link {
  display: block;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: background .15s;
}
.chat-item-link.active { background: var(--brand-light); }
.chat-item-link:hover:not(.active) { background: var(--surface-2); }
.chat-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.chat-item-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
}
.chat-item-preview {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-main-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.chat-main-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chat-empty-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  text-align: center;
}
.chat-empty-panel i {
  font-size: 48px;
  display: block;
  margin-bottom: 12px;
  opacity: .3;
}
.chat-input-form {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
}
.empty-state-sm {
  text-align: center;
  padding: 40px;
  color: var(--text-3);
  font-size: 13px;
}

/* Уведомления */
.notifications-list {
  max-height: 320px;
  overflow-y: auto;
}
.notif-item {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  margin-top: 5px;
  flex-shrink: 0;
}
.notif-title {
  font-weight: 600;
  font-size: 13px;
}
.notif-body {
  font-size: 12px;
  color: var(--text-2);
}
.notif-time {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 2px;
}

/* Таблица простых заказов */
.simple-table {
  width: 100%;
  border-collapse: collapse;
}
.simple-table tr {
  border-bottom: 1px solid var(--border);
}
.simple-table td {
  padding: 10px 16px;
}
.ctrl-link-more {
  font-size: 12px;
  color: var(--brand);
  text-decoration: none;
}
.ctrl-link-more:hover {
  text-decoration: underline;
}
.ctrl-empty-box {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-3);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
}
.ctrl-empty-box i {
  font-size: 48px;
  display: block;
  margin-bottom: 12px;
  opacity: .3;
}
.ctrl-empty-box p {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-2);
}
.ctrl-empty-box small {
  font-size: 13px;
}

/* Ширины */
.w-140 { width: 140px; }
.w-150 { width: 150px; }
.w-180 { width: 180px; }


/* ========== СТИЛИ ДЛЯ AUTH-СТРАНИЦ ========== */

/* Общие классы */
.mt-8 { margin-top: 8px; }
.mt-10 { margin-top: 10px; }
.mb-10 { margin-bottom: 10px; }
.p-11 { padding: 11px; }
.text-center { text-align: center; }
.w-100 { width: 100%; }
.justify-center { justify-content: center; }

/* Login страница */
.login-page-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1E3A8A 0%, #2563EB 50%, #1D4ED8 100%);
}
.login-container {
  width: 100%;
  max-width: 420px;
  padding: 16px;
}
.login-header { text-align: center; margin-bottom: 32px; }
.login-logo-icon {
  width: 64px;
  height: 64px;
  background: rgba(255,255,255,.15);
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  backdrop-filter: blur(10px);
}
.login-logo-icon i { font-size: 28px; color: #fff; }
.login-title { color: #fff; font-size: 26px; font-weight: 800; margin-bottom: 6px; }
.login-subtitle { color: rgba(255,255,255,.7); font-size: 14px; }
.login-form-card {
  background: #fff;
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.login-form-title { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.login-form-desc { color: var(--text-2); font-size: 13px; margin-bottom: 24px; }
.password-group { position: relative; }
.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-3);
  font-size: 15px;
}
.login-footer {
  text-align: center;
  color: rgba(255,255,255,.5);
  font-size: 12px;
  margin-top: 20px;
}

/* Auth layout (двухколоночная) */
.auth-page {
  display: flex;
  min-height: 100vh;
  background: linear-gradient(135deg, #1E3A8A 0%, #2563EB 50%, #1D4ED8 100%);
}
.auth-left {
  flex: 1;
  padding: 60px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-left-title { font-size: 42px; font-weight: 800; line-height: 1.1; margin-bottom: 20px; }
.auth-left-desc { font-size: 17px; opacity: .75; max-width: 340px; line-height: 1.6; margin-bottom: 40px; }
.auth-features { display: flex; flex-direction: column; gap: 12px; }
.feature-item { display: flex; align-items: center; gap: 10px; opacity: .85; }
.feature-item i { font-size: 20px; }
.auth-right {
  flex: 1;
  background: #fff;
  border-radius: 40px 0 0 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  overflow-y: auto;
}
.auth-box { max-width: 520px; width: 100%; }
.auth-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.auth-logo-icon {
  width: 48px;
  height: 48px;
  background: var(--brand-light);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-logo-icon i { font-size: 24px; color: var(--brand); }
.auth-logo-text { font-size: 18px; font-weight: 800; color: var(--text); }
.section-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  margin: 16px 0 12px;
}
.trailer-checkboxes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.trailer-checkboxes label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.form-check-group {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
}
.form-check-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
}
.auth-divider {
  border-top: 1px solid var(--border);
  margin: 20px 0;
}
.auth-link {
  font-size: 13px;
  color: var(--brand);
  text-decoration: none;
}
.auth-link:hover { text-decoration: underline; }

/* Адаптивность */
@media (max-width: 900px) {
  .auth-page { flex-direction: column; }
  .auth-left { padding: 40px 24px; text-align: center; align-items: center; }
  .auth-left-desc { max-width: 100%; }
  .auth-features { align-items: flex-start; }
  .auth-right { border-radius: 24px 24px 0 0; padding: 24px; }
}

/* ========== ДОПОЛНЕНИЯ ДЛЯ ADMIN-РАЗДЕЛА ========== */

/* Грид дашборда */
.admin-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}
@media (max-width: 900px) {
  .admin-dashboard-grid { grid-template-columns: 1fr; }
}

/* Утилиты */
.fs-7 { font-size: 7px; }
.fs-10 { font-size: 10px; }
.p-30 { padding: 30px; }
.mt-16 { margin-top: 16px; }
.me-1 { margin-right: 4px; }
.me-8 { margin-right: 8px; }
.mb-16 { margin-bottom: 16px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.flex-1 { flex: 1; }
.max-w-520 { max-width: 520px; }
.max-w-360 { max-width: 360px; }
.max-w-400 { max-width: 400px; }
.w-190 { width: 190px; }
.w-140 { width: 140px; }
.w-180 { width: 180px; }
.min-w-200 { min-width: 200px; }
.order-route-cell { max-width: 200px; }

/* Стили для модальных окон (если не добавлены) */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.modal-container {
  background: #fff;
  border-radius: 16px;
  padding: 28px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.modal-title {
  font-size: 17px;
  font-weight: 800;
  margin: 0;
}
.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: var(--text-3);
}
/* Цвета для фильтров карты */
.bg-warning-light { background: #fcd34d; }
.bg-purple-light { background: #c084fc; }
.text-warning { color: var(--warning); }
.border-warning { border-color: #fed7aa; }

/* Детали пользователя */
.user-avatar-large {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--brand-light);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 22px;
  margin-bottom: 12px;
}
.user-name-large {
  font-size: 18px;
  font-weight: 800;
}
.user-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 900px) {
  .user-detail-grid { grid-template-columns: 1fr; }
}
.info-table {
  width: 100%;
  font-size: 13px;
}
.info-table td {
  padding: 6px 0;
}
.info-table td.label {
  color: var(--text-2);
}
.info-table td.value {
  font-weight: 600;
}

/* Кнопки редактирования */
.edit-btn {
  color: #2563eb;
  border-color: #2563eb;
}
.edit-driver-btn {
  color: #2563eb;
  border-color: #2563eb;
}

/* Поиск в сайдбаре карты */
.search-wrapper {
  position: relative;
}
.search-icon-inline {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 12px;
  pointer-events: none;
}

/* ========== ТАБЛИЦЫ ЗАКАЗОВ (АДМИН И ДИСПЕТЧЕР) ========== */
.admin-orders-table,
.dispatcher-orders-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.admin-orders-table th,
.dispatcher-orders-table th {
  padding: 12px 8px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-3);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.admin-orders-table td,
.dispatcher-orders-table td {
  padding: 12px 8px;
  font-size: 13px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  word-break: break-word;
}

.admin-orders-table tr:hover,
.dispatcher-orders-table tr:hover {
  background: var(--surface-2);
}

/* Ширина колонок для админа */
.admin-orders-table th:nth-child(1) { width: 5%; }  /* № */
.admin-orders-table th:nth-child(2) { width: 15%; } /* Груз */
.admin-orders-table th:nth-child(3) { width: 20%; } /* Маршрут */
.admin-orders-table th:nth-child(4) { width: 15%; } /* Водитель */
.admin-orders-table th:nth-child(5) { width: 15%; } /* Заказчик */
.admin-orders-table th:nth-child(6) { width: 15%; } /* Диспетчер */
.admin-orders-table th:nth-child(7) { width: 10%; } /* Статус */
.admin-orders-table th:nth-child(8) { width: 5%; }  /* Цена */

/* Ширина колонок для диспетчера */
.dispatcher-orders-table th:nth-child(1) { width: 5%; }  /* № */
.dispatcher-orders-table th:nth-child(2) { width: 20%; } /* Груз */
.dispatcher-orders-table th:nth-child(3) { width: 25%; } /* Маршрут */
.dispatcher-orders-table th:nth-child(4) { width: 15%; } /* Водитель */
.dispatcher-orders-table th:nth-child(5) { width: 5%; }  /* Цена */
.dispatcher-orders-table th:nth-child(6) { width: 10%; } /* Статус */
.dispatcher-orders-table th:nth-child(7) { width: 10%; } /* Дата */
.dispatcher-orders-table th:nth-child(8) { width: 10%; } /* Действия */

/* Внутренние элементы */
.order-number {
  font-weight: 700;
  color: var(--brand);
  white-space: nowrap;
}
.cargo-name {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 4px;
}
.cargo-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.route-from {
  font-size: 12px;
  margin-bottom: 2px;
}
.route-to {
  font-size: 11px;
  color: var(--text-3);
}
.driver-name {
  font-weight: 600;
  font-size: 13px;
}
.driver-plate {
  font-size: 11px;
  color: var(--text-3);
}
.order-price {
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
}
.order-date {
  font-size: 12px;
  color: var(--text-2);
  white-space: nowrap;
}
.order-actions {
  white-space: nowrap;
}
.empty-state-td {
  text-align: center;
  padding: 40px !important;
}

/* ========== ТАБЛИЦА ЗАКАЗОВ КОНТРОЛЛЕРА ========== */
.controller-orders-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.controller-orders-table th {
  padding: 12px 8px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-3);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.controller-orders-table td {
  padding: 12px 8px;
  font-size: 13px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  word-break: break-word;
}

.controller-orders-table tr:hover {
  background: var(--surface-2);
}

/* Ширина колонок */
.controller-orders-table th:nth-child(1) { width: 5%; }  /* # */
.controller-orders-table th:nth-child(2) { width: 25%; } /* Маршрут */
.controller-orders-table th:nth-child(3) { width: 15%; } /* Водитель */
.controller-orders-table th:nth-child(4) { width: 15%; } /* Диспетчер */
.controller-orders-table th:nth-child(5) { width: 15%; } /* Заказчик */
.controller-orders-table th:nth-child(6) { width: 10%; } /* Дата */
.controller-orders-table th:nth-child(7) { width: 10%; } /* Статус */
.controller-orders-table th:nth-child(8) { width: 5%; }  /* Цена */

/* Переиспользуем существующие классы для внутренних элементов */
.controller-orders-table .order-number {
  font-weight: 700;
  color: var(--brand);
  white-space: nowrap;
}
.controller-orders-table .route-from {
  font-size: 12px;
  margin-bottom: 2px;
}
.controller-orders-table .route-to {
  font-size: 11px;
  color: var(--text-3);
}
.controller-orders-table .driver-name {
  font-weight: 600;
  font-size: 13px;
}
.controller-orders-table .driver-plate {
  font-size: 11px;
  color: var(--text-3);
}
.controller-orders-table .order-date {
  font-size: 12px;
  color: var(--text-2);
  white-space: nowrap;
}
.controller-orders-table .order-price {
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
}
.empty-state-td {
  text-align: center;
  padding: 40px !important;
}

/* Улучшения для карты */
.fleet-driver-item {
  transition: background 0.2s;
}
.fleet-driver-item .driver-name {
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.status-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}
.status-pill[style*="background:#fcd34d"] {
  color: #000 !important;
}
.driver-plate {
  font-family: monospace;
  font-weight: 700;
}
.search-status-btns .ss-btn {
  font-size: 11px;
  padding: 4px 10px;
}

/* Горизонтальное расположение кнопок статуса в сайдбаре */
.search-status-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.search-status-btns .ss-btn {
  flex: 0 0 auto;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

/* Улучшение блока поиска города в верхней панели карты */
.smart-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
}
.city-search-box {
  display: flex;
  gap: 6px;
  flex: 2;
  min-width: 240px;
}
.city-search-box input {
  flex: 1;
  min-width: 140px;
}
.city-search-box .btn {
  white-space: nowrap;
}

/* Кнопки фильтров (Все, Свободен и т.д.) на верхней панели – тоже горизонтально */
.smart-filters .filter-btn {
  margin: 0;
  white-space: nowrap;
}
.v-divider {
  margin: 0 4px;
}

/* Для мобильных устройств – адаптация */
@media (max-width: 768px) {
  .smart-filters {
    flex-direction: column;
    align-items: stretch;
  }
  .city-search-box {
    width: 100%;
  }
  .search-status-btns {
    justify-content: center;
  }
}

/* Цветовая легенда документов (под фильтрами карты) */
.doc-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-2);
  margin: 6px 0;
  flex-wrap: wrap;
}
.doc-legend-label { font-weight: 600; color: var(--text); }
.doc-legend-item { display: flex; align-items: center; gap: 4px; }
.doc-legend-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--border-2);
}
.doc-legend-dot.ok       { background: #10b981; }
.doc-legend-dot.warn     { background: #fbbf24; }
.doc-legend-dot.critical { background: #f97316; }
.doc-legend-dot.expired  { background: #ef4444; }
.doc-legend-dot.unknown  { background: #94a3b8; }
 
/* Секция «Документы» в попапе карты */
.doc-section {
  background: var(--bg);
  padding: 6px 8px;
  border-radius: 5px;
  margin: 7px 0;
  border-left: 3px solid var(--border-2);
}
.doc-section-title {
  font-weight: 600;
  font-size: 11px;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.doc-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 0;
  font-size: 12px;
}
.doc-row-icon {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.doc-row-name { color: var(--text); font-weight: 500; min-width: 110px; }
.doc-row-info { color: var(--text-2); font-size: 11px; }
 
/* Содержимое попапа на карте */
.popup-driver {
  min-width: 260px;
  font-size: 13px;
}
.popup-driver-name {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 3px;
}
.popup-driver-phone {
  color: var(--text-2);
  margin-bottom: 8px;
}
.popup-truck-plate,
.driver-plate {
  text-transform: uppercase;
  background: var(--border);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text);
}
.popup-current-trip {
  background: var(--success-light);
  padding: 6px;
  border-radius: 5px;
  border-left: 3px solid var(--success);
  margin: 7px 0;
  font-size: 12px;
}
.popup-current-trip b { color: #047857; }
.popup-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.popup-btn {
  flex: 1;
  text-align: center;
  padding: 5px 0;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.popup-btn-chat   { background: #3b82f6; color: #fff; }
.popup-btn-assign { background: #10b981; color: #fff; }
.popup-btn-blocked {
  background: var(--border-2);
  color: var(--text-2);
  cursor: not-allowed;
  pointer-events: none;
}
 
/* Бейдж с предупреждением о документах (в сайдбаре) */
.doc-warn-badge {
  font-size: 11px;
  padding: 3px 7px;
  border-radius: 5px;
  margin-top: 5px;
  font-weight: 600;
}
.doc-warn-badge.expired  { background: #fee2e2; color: #991b1b; }
.doc-warn-badge.critical { background: #fed7aa; color: #9a3412; }
.doc-warn-badge.warn     { background: #fef3c7; color: #854d0e; }
 
/* Дополнительные статусы (которых не было в Fleet Map) */
.bg-warning-light { background: #fcd34d; }
.bg-purple-light  { background: #c084fc; }
 
/* Сводка по документам в шапке сайдбара */
.docs-summary {
  margin-top: 5px;
  font-size: 12px;
}
.docs-summary-item {
  font-weight: 600;
  margin-right: 8px;
}
.docs-summary-item.expired  { color: #ef4444; }
.docs-summary-item.critical { color: #f97316; }
.docs-summary-item.warn     { color: #fbbf24; }
.chat-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.chat-avatar-initial {
  font-weight: 700;
  font-size: 18px;
  color: #1B2B4B;
  text-transform: uppercase;
}
.chat-header-avatar .chat-avatar-initial {
  color: #fff;
  font-size: 16px;
}
.chat-header-avatar .chat-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}


.chat-avatar-sm img.chat-avatar-img,
.chat-header-avatar img.chat-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
 
.chat-avatar-sm,
.chat-header-avatar {
  overflow: hidden;
}

/* ============================================================
   МОНИТОРИНГ ТС — обновлённый вид панели карты
   (добавлено в конец: перекрывает прежние правила)
   ============================================================ */
.fleet-sidebar {
  width: 360px;
  background: var(--surface);
  border-left: 1px solid var(--border);
}
.fleet-sidebar-header {
  padding: 18px 18px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.fleet-sidebar-header h4 {
  display: flex; align-items: center; gap: 9px;
  margin: 0 0 14px; font-size: 16px; font-weight: 800;
  color: var(--text); letter-spacing: -0.01em;
}
.fleet-sidebar-header h4 i {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--brand-light); color: var(--brand);
  font-size: 15px; margin: 0 !important;
}

/* Сводка "Машин: N" */
#sidebar-stats {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px; margin: 0 0 14px;
  font-size: 13px; color: var(--text-2); line-height: 1.55;
}
#sidebar-stats b { color: var(--text); font-weight: 800; }

/* Поиск */
.search-wrapper { position: relative; margin-bottom: 12px; }
.search-icon-inline { left: 12px; color: var(--text-3); font-size: 13px; }
.driver-search-input {
  width: 100%; box-sizing: border-box;
  padding: 10px 12px 10px 34px;
  font: inherit; font-size: 13px; color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.driver-search-input::placeholder { color: var(--text-3); }
.driver-search-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

/* Кнопки-фильтры статуса */
.search-status-btns { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.search-status-btns .ss-btn {
  flex: 0 0 auto; font-size: 12px; font-weight: 600;
  padding: 5px 11px; border-radius: 20px; white-space: nowrap; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-2);
  transition: all var(--transition);
}
.search-status-btns .ss-btn:hover { background: var(--surface-2); border-color: var(--border-2); }
.search-status-btns .ss-btn.active {
  background: var(--brand); border-color: var(--brand); color: #fff;
  box-shadow: 0 2px 6px rgba(37,99,235,.25);
}

/* Список и карточки водителей */
.fleet-driver-list {
  flex: 1; overflow-y: auto;
  background: var(--bg);
  padding: 14px; display: flex; flex-direction: column; gap: 10px;
}
.fleet-driver-list::-webkit-scrollbar { width: 8px; }
.fleet-driver-list::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 8px; }
.fleet-driver-item {
  padding: 14px !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.fleet-driver-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand) !important;
  background: var(--surface) !important;
}
.fleet-driver-item .driver-name { font-weight: 800; font-size: 14px; color: var(--text); }
.fleet-driver-item .driver-car { font-size: 12.5px; color: var(--text-2); margin-top: 4px; }

/* Статус-пилюли */
.status-pill {
  display: inline-block; padding: 3px 10px;
  border-radius: 999px; font-size: 11px; font-weight: 700;
  color: #fff; letter-spacing: .01em;
}
.status-pill.bg-warning-light, .status-pill.bg-purple-light { color: #1f2937 !important; }
.bg-secondary { background: #94a3b8; }

/* Номерные знаки */
.fleet-driver-item .driver-plate {
  font-family: ui-monospace, monospace; font-weight: 700; font-size: 11px;
  background: var(--surface-2); color: var(--text);
  padding: 1px 6px; border-radius: 5px; border: 1px solid var(--border);
}

/* Кнопки действий в карточке */
.fleet-driver-item .btn-sm {
  font-size: 11.5px; padding: 5px 10px; border-radius: 8px; font-weight: 600;
}

/* Легенда "Документы" — компактная плавающая плашка внизу-слева карты
   (раньше лежала в потоке вверху и перекрывалась панелью фильтров) */
.doc-legend {
  position: absolute;
  bottom: 14px;
  left: 14px;
  z-index: 1000;
  margin: 0;
  gap: 9px 14px;
  padding: 8px 13px;
  background: rgba(255,255,255,0.96);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  font-size: 11.5px;
  max-width: calc(100% - 28px);
}
.doc-legend-label {
  font-weight: 700; color: var(--text-2);
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em;
}

/* Верхняя панель фильтров — отступ слева под кнопки зума (+/-), чтобы не перекрывались */
.smart-filters { left: 58px; }


.mb-24 { margin-bottom: 24px; }
.toolbar-title { display:flex; align-items:center; gap:8px; font-size:15px; }
.toolbar-title .text-muted { font-weight:400; font-size:13px; }
.empty-state-sm { padding:24px 16px; }
.empty-state-sm i { font-size:28px; }

.btn-outline-danger { color:#dc2626; border:1px solid #dc2626; background:transparent; }
.btn-outline-danger:hover { background:#dc2626; color:#fff; }
.w-full { width:100%; }


.star-rating{display:inline-flex;flex-direction:row-reverse;justify-content:center;gap:4px}
  .star-rating input{display:none}
  .star-rating label{font-size:32px;line-height:1;color:#d8dbe0;cursor:pointer;transition:color .15s}
  .star-rating label:hover,
  .star-rating label:hover ~ label,
  .star-rating input:checked ~ label{color:#f5a623}
  .rate-reasons{margin:6px 0 14px;display:flex;flex-direction:column;gap:8px}
  .reason-row{display:flex;align-items:center;justify-content:space-between;gap:10px}
  .reason-row .reason-label{font-size:13px;color:#475569}
  .mini-stars{display:inline-flex;flex-direction:row-reverse;gap:2px}
  .mini-stars input{display:none}
  .mini-stars label{font-size:19px;line-height:1;color:#d8dbe0;cursor:pointer;transition:color .12s}
  .mini-stars label:hover,
  .mini-stars label:hover ~ label,
  .mini-stars input:checked ~ label{color:#f5a623}
/* --- AVG логотип на странице входа --- */
.login-logo-icon {
  background: #fff !important;
  padding: 6px;
}
.login-logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
