/* ============ RouteIQ — premium dark dashboard (Vapi aesthetic) ============ */
:root {
  --bg: #0a0a0a;
  --bg-2: #0d0d0d;
  --card: rgba(255, 255, 255, 0.025);
  --card-solid: #111213;
  --card-2: rgba(255, 255, 255, 0.045);
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.12);
  --border-teal: rgba(20, 184, 166, 0.22);
  --text: #f3f4f6;
  --text-2: #d1d5db;
  --text-dim: #9ca3af;
  --text-faint: #6b7280;
  --teal: #14b8a6;
  --teal-bright: #00d9a6;
  --cyan: #06b6d4;
  --teal-soft: rgba(20, 184, 166, 0.1);
  --teal-glow: 0 0 24px rgba(20, 184, 166, 0.25);
  --teal-glow-sm: 0 0 14px rgba(20, 184, 166, 0.2);
  --green: #10b981;
  --amber: #f59e0b;
  --rose: #fb7185;
  --radius: 16px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.55);
  --font: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(20, 184, 166, 0.06), transparent 60%),
    radial-gradient(700px 400px at -10% 110%, rgba(6, 182, 212, 0.04), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ============ App shell — exact viewport fit ============ */
.app { display: flex; height: 100vh; overflow: hidden; }

/* ============ Sidebar ============ */
.sidebar {
  width: 260px;
  height: 100vh;
  flex-shrink: 0;
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  padding: 24px 14px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  overflow-y: auto;
}

.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px; }
.brand-mark {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  display: grid; place-items: center;
  font-weight: 700; font-size: 19px; color: #041210;
  letter-spacing: -0.02em;
  box-shadow: var(--teal-glow);
}
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-weight: 700; font-size: 16.5px; letter-spacing: -0.02em; }
.brand-tag { font-size: 11px; color: var(--text-faint); font-weight: 500; letter-spacing: 0.02em; }

.nav { display: flex; flex-direction: column; gap: 3px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--text-dim);
  font-family: var(--font);
  font-size: 13.5px; font-weight: 500;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  text-align: left;
}
.nav-item svg { width: 17px; height: 17px; fill: currentColor; flex-shrink: 0; }
.nav-item:hover { background: var(--card-2); color: var(--text); }
.nav-item.active {
  background: var(--teal-soft);
  border-color: var(--border-teal);
  color: var(--teal-bright);
  font-weight: 600;
  box-shadow: var(--teal-glow-sm);
}
.nav-item.active svg { fill: var(--teal-bright); }
.nav-badge {
  margin-left: auto;
  background: var(--teal);
  color: #041210;
  font-size: 10.5px; font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
}

.sidebar-foot { margin-top: auto; }
.ai-status {
  display: flex; align-items: center; gap: 10px;
  background: var(--card);
  border: 1px solid var(--border-teal);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 12px;
}
.ai-status strong { display: block; font-size: 12.5px; letter-spacing: -0.01em; }
.ai-status span { color: var(--text-dim); font-size: 11px; }

.pulse-dot {
  width: 9px; height: 9px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--teal-bright);
  box-shadow: 0 0 0 0 rgba(0, 217, 166, 0.4);
  animation: pulse 2s infinite;
}
.pulse-dot.ok { animation: none; box-shadow: 0 0 8px rgba(0, 217, 166, 0.5); }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 217, 166, 0.4); }
  70% { box-shadow: 0 0 0 9px rgba(0, 217, 166, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 217, 166, 0); }
}

/* ============ Main — flex column, views own their scrolling ============ */
.main {
  flex: 1;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.view { display: none; }
.view.active {
  display: block;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 28px;
  animation: fadeUp 0.3s ease;
}
#view-inbox.active {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.view-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 24px;
  flex-shrink: 0;
}
h1 { font-size: 23px; font-weight: 700; letter-spacing: -0.02em; }
.subtitle { color: var(--text-dim); font-size: 13.5px; margin-top: 3px; }
.head-meta { display: flex; align-items: center; gap: 14px; }
.date-chip {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 12.5px;
  color: var(--text-dim);
  font-weight: 500;
}
.avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  display: grid; place-items: center;
  font-weight: 700; font-size: 13px; color: #041210;
  box-shadow: var(--teal-glow-sm);
}

/* ============ Cards — dark glassmorphism ============ */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--border-teal); }
.card-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 20px 0;
}
.card-head h3 { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }

.chip {
  font-size: 11px; font-weight: 600;
  padding: 4px 10px;
  border-radius: 99px;
  background: var(--teal-soft);
  color: var(--teal-bright);
  border: 1px solid var(--border-teal);
  white-space: nowrap;
}
.chip.dim { background: var(--card-2); color: var(--text-dim); border-color: var(--border); }
.chip.live { background: rgba(16, 185, 129, 0.12); color: #34d399; border-color: rgba(16, 185, 129, 0.25); }
.chip.green { background: rgba(16, 185, 129, 0.12); color: #34d399; border-color: rgba(16, 185, 129, 0.25); }
.chip.amber { background: rgba(245, 158, 11, 0.1); color: #fbbf24; border-color: rgba(245, 158, 11, 0.25); }
.chip.rose { background: rgba(251, 113, 133, 0.1); color: var(--rose); border-color: rgba(251, 113, 133, 0.25); }
.chip.wa { background: rgba(16, 185, 129, 0.12); color: #34d399; border-color: rgba(16, 185, 129, 0.25); }
.chip.sms { background: rgba(6, 182, 212, 0.12); color: #22d3ee; border-color: rgba(6, 182, 212, 0.25); }

/* ============ KPI cards ============ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 22px;
}
.kpi-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  padding: 20px;
  display: flex; gap: 16px; align-items: flex-start;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.kpi-card:hover { transform: translateY(-3px); border-color: var(--border-teal); box-shadow: var(--shadow-lg); }
.kpi-icon {
  width: 42px; height: 42px; flex-shrink: 0;
  border-radius: 12px;
  display: grid; place-items: center;
}
.kpi-icon svg { width: 20px; height: 20px; fill: #fff; opacity: 0.95; }
.kpi-icon.indigo { background: linear-gradient(135deg, var(--teal), var(--cyan)); box-shadow: var(--teal-glow-sm); }
.kpi-icon.green { background: linear-gradient(135deg, #059669, #10b981); }
.kpi-icon.amber { background: linear-gradient(135deg, #b45309, #f59e0b); }
.kpi-icon.rose { background: linear-gradient(135deg, #be123c, #fb7185); }
.kpi-body { display: flex; flex-direction: column; gap: 2px; }
.kpi-label { font-size: 12px; color: var(--text-dim); font-weight: 500; }
.kpi-value { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.kpi-value.kpi-down { color: #34d399; }
.kpi-delta { font-size: 11.5px; font-weight: 500; }
.kpi-delta.up { color: #34d399; }

/* ============ Dashboard row / charts ============ */
.dash-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 18px;
}
.chart-card { padding-bottom: 20px; }
.bar-chart {
  display: flex; align-items: flex-end; gap: 18px;
  height: 190px;
  padding: 24px 24px 0;
}
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.bar {
  width: 100%; max-width: 46px;
  border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, var(--teal-bright), rgba(20, 184, 166, 0.35));
  box-shadow: 0 0 16px rgba(20, 184, 166, 0.2);
  min-height: 6px;
  transform-origin: bottom;
  animation: growBar 0.9s cubic-bezier(0.22, 1, 0.36, 1) backwards;
  transition: filter 0.2s ease;
}
.bar:hover { filter: brightness(1.2); }
.bar.muted { background: rgba(255, 255, 255, 0.08); box-shadow: none; }
@keyframes growBar { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.bar-label { font-size: 11px; color: var(--text-faint); font-weight: 500; }
.bar-val { font-size: 11px; font-weight: 600; color: var(--text-2); }

.activity-card { padding-bottom: 12px; }
.activity-list { list-style: none; padding: 10px 20px 10px; }
.activity-list li {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}
.activity-list li:last-child { border-bottom: none; }
.act-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.act-dot.indigo { background: var(--teal-bright); box-shadow: 0 0 8px rgba(0, 217, 166, 0.5); }
.act-dot.green { background: #10b981; }
.act-dot.amber { background: #f59e0b; }
.act-dot.rose { background: var(--rose); }
.activity-list strong { display: block; font-size: 13px; font-weight: 600; letter-spacing: -0.01em; }
.activity-list small { color: var(--text-dim); font-size: 11.5px; }

/* ============ Inbox — perfect flex fit, no fixed heights ============ */
.inbox-wrap {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 280px 1fr;
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
}
.inbox-wrap:hover { transform: none; box-shadow: var(--shadow); border-color: var(--border); }
.chat-list {
  border-right: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.015);
  display: flex; flex-direction: column;
  min-height: 0;
  overflow-y: auto;
}
.chat-search { padding: 14px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.chat-search input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 13px;
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.chat-search input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.chat-search input::placeholder { color: var(--text-faint); }

.chat-item {
  display: flex; align-items: center; gap: 11px;
  padding: 13px 14px;
  background: transparent; border: none;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease;
  font-family: var(--font);
}
.chat-item:hover { background: rgba(20, 184, 166, 0.05); }
.chat-item.active { background: var(--teal-soft); }
.chat-av {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12.5px; font-weight: 700;
}
.chat-av.fr { background: linear-gradient(135deg, var(--teal), var(--cyan)); color: #041210; box-shadow: var(--teal-glow-sm); }
.chat-av.qw { background: linear-gradient(135deg, #0e7490, #06b6d4); color: #02171d; }
.chat-av.gb { background: linear-gradient(135deg, #047857, #10b981); color: #02120c; }
.chat-meta { min-width: 0; flex: 1; }
.chat-meta strong { display: block; font-size: 13px; color: var(--text); font-weight: 600; letter-spacing: -0.01em; }
.chat-meta small {
  display: block;
  color: var(--text-dim); font-size: 11.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chat-side {
  display: flex; flex-direction: column;
  align-items: flex-end; justify-content: space-between;
  align-self: stretch;
  padding: 2px 0;
  flex-shrink: 0;
}
.chat-time { font-size: 10.5px; color: var(--text-faint); font-weight: 500; }
.unread-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--teal-bright);
  box-shadow: 0 0 8px rgba(0, 217, 166, 0.6);
}

.chat-thread {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.chat-head {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.chat-head strong { display: block; font-size: 14px; letter-spacing: -0.01em; }
.chat-head small { color: var(--text-dim); font-size: 11.5px; }
.chat-head .chip { margin-left: auto; }

.chat-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 22px 24px;
  display: flex; flex-direction: column; gap: 12px;
  background:
    radial-gradient(600px 300px at 50% 0%, rgba(20, 184, 166, 0.03), transparent 70%),
    transparent;
}
.chat-body::-webkit-scrollbar { width: 6px; }
.chat-body::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 3px; }

.bubble {
  max-width: 68%;
  padding: 11px 15px;
  border-radius: 16px;
  font-size: 13.5px;
  animation: bubbleIn 0.25s ease;
}
@keyframes bubbleIn { from { opacity: 0; transform: translateY(6px) scale(0.98); } to { opacity: 1; transform: none; } }
.bubble.in {
  align-self: flex-start;
  background: var(--card-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  border-bottom-left-radius: 5px;
}
.bubble.out {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.9), rgba(6, 182, 212, 0.85));
  border: 1px solid rgba(0, 217, 166, 0.35);
  color: #031613;
  font-weight: 500;
  box-shadow: var(--teal-glow-sm);
  border-bottom-right-radius: 5px;
}
.bubble .b-time { display: block; font-size: 10px; opacity: 0.6; margin-top: 5px; text-align: right; }
.bubble .b-ai {
  display: inline-block;
  font-size: 9.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.6px;
  background: rgba(3, 22, 19, 0.25);
  border-radius: 4px;
  padding: 1px 5px;
  margin-bottom: 5px;
}

.typing {
  align-self: flex-end;
  display: flex; gap: 5px;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.9), rgba(6, 182, 212, 0.85));
  border: 1px solid rgba(0, 217, 166, 0.35);
  border-radius: 16px;
  border-bottom-right-radius: 5px;
  box-shadow: var(--teal-glow-sm);
  padding: 14px 16px;
}
.typing span {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(3, 22, 19, 0.75);
  animation: typingBounce 1.2s infinite ease-in-out;
}
.typing span:nth-child(2) { animation-delay: 0.15s; }
.typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-5px); opacity: 1; }
}

.chat-input {
  display: flex; gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  flex-shrink: 0;
}
.chat-input input {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 15px;
  color: var(--text);
  font-family: var(--font);
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.chat-input input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.chat-input input::placeholder { color: var(--text-faint); }

/* ============ Buttons ============ */
.btn {
  border: none;
  border-radius: 12px;
  padding: 11px 20px;
  font-family: var(--font);
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, filter 0.15s ease;
}
.btn:active { transform: scale(0.97); }
.btn.primary {
  background: linear-gradient(135deg, var(--teal), var(--teal-bright));
  color: #041210;
  box-shadow: var(--teal-glow-sm);
}
.btn.primary:hover { filter: brightness(1.1); transform: translateY(-1px); box-shadow: var(--teal-glow); }
.btn.primary:disabled { opacity: 0.35; cursor: not-allowed; box-shadow: none; transform: none; }
.btn.ghost {
  background: var(--card-2);
  color: var(--text-2);
  border: 1px solid var(--border-strong);
}
.btn.ghost:hover { background: rgba(255, 255, 255, 0.08); border-color: var(--border-teal); }
.btn.sm { padding: 8px 15px; font-size: 12px; border-radius: 10px; }

/* ============ Tables ============ */
.table-card { overflow: hidden; }
.table-card:hover { transform: none; box-shadow: var(--shadow); border-color: var(--border); }
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.7px;
  color: var(--text-faint);
  padding: 13px 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}
.table td {
  padding: 15px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--text-2);
}
.table td strong { color: var(--text); font-weight: 600; }
.table tbody tr { transition: background 0.15s ease; }
.table tbody tr:hover { background: rgba(20, 184, 166, 0.04); }
.table tbody tr:last-child td { border-bottom: none; }
.dim-cell { color: var(--text-dim); font-size: 12.5px; }

/* ============ Bookings ============ */
.booking-list { display: flex; flex-direction: column; gap: 12px; }
.booking-card {
  display: grid;
  grid-template-columns: 86px 1fr auto auto;
  align-items: center;
  gap: 20px;
  padding: 16px 20px;
}
.booking-date {
  text-align: center;
  background: var(--teal-soft);
  border: 1px solid var(--border-teal);
  border-radius: 12px;
  padding: 9px 6px;
}
.booking-date .d { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; color: var(--teal-bright); }
.booking-date .m { font-size: 10.5px; text-transform: uppercase; letter-spacing: 1px; color: var(--teal); font-weight: 700; }
.booking-info strong { display: block; font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em; }
.booking-info small { color: var(--text-dim); font-size: 12.5px; }
.booking-slot { font-size: 12.5px; color: var(--text-dim); font-weight: 500; white-space: nowrap; }

/* ============ Missed collections ============ */
.missed-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.issue-card { padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.issue-head { display: flex; justify-content: space-between; align-items: center; }
.issue-time { font-size: 11px; color: var(--text-faint); font-weight: 500; }
.issue-card h3 { font-size: 16px; font-weight: 600; letter-spacing: -0.02em; }
.ai-box {
  background: var(--teal-soft);
  border: 1px solid var(--border-teal);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 12.5px;
  color: var(--text-2);
}
.ai-box.resolved { background: rgba(16, 185, 129, 0.08); border-color: rgba(16, 185, 129, 0.25); }
.ai-box-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.7px;
  color: var(--teal-bright);
  margin-bottom: 6px;
}
.ai-box.resolved .ai-box-head { color: #34d399; }
.issue-actions { display: flex; gap: 10px; margin-top: 4px; }

/* ============ Analytics ============ */
.analytics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.bar-chart.tall { height: 210px; }
.line-chart-wrap { padding: 18px 20px 8px; }
.line-chart-wrap canvas { width: 100%; }
.stat-card { padding: 20px; }
.stat-card .card-head { padding: 0 0 12px; }
.big-stat { font-size: 42px; font-weight: 700; letter-spacing: -0.03em; }
.stat-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 12px; color: var(--text-dim);
}
.green-text { color: #34d399; font-weight: 600; }

/* ============ Settings ============ */
.settings-card { padding: 26px; max-width: 860px; }
.settings-card:hover { transform: none; box-shadow: var(--shadow); border-color: var(--border); }
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 22px;
}
.form-grid label {
  display: flex; flex-direction: column; gap: 7px;
  font-size: 12px; font-weight: 600;
  color: var(--text-dim);
}
.form-grid input, .form-grid select {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 11px 14px;
  color: var(--text);
  font-family: var(--font);
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.form-grid input:focus, .form-grid select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.form-grid select option { background: var(--card-solid); }
.settings-actions { margin-top: 24px; }

/* ============ Modal ============ */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(5px);
  display: none;
  place-items: center;
  z-index: 100;
}
.modal-backdrop.open { display: grid; animation: fadeUp 0.25s ease; }
.modal {
  background: var(--card-solid);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 26px;
  width: 440px;
  max-width: calc(100vw - 40px);
}
.modal h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 6px; }
.slot-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 18px 0 22px;
}
.slot {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 11px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-2);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.slot:hover { border-color: var(--teal); }
.slot.selected { background: var(--teal-soft); border-color: var(--teal); color: var(--teal-bright); font-weight: 600; box-shadow: var(--teal-glow-sm); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* ============ Toasts ============ */
.toast-stack {
  position: fixed;
  top: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 10px;
  z-index: 200;
}
.toast {
  display: flex; align-items: center; gap: 11px;
  background: rgba(17, 18, 19, 0.9);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-teal);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 13px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  min-width: 300px;
  animation: toastIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.toast.leaving { animation: toastOut 0.3s ease forwards; }
.toast .t-icon {
  width: 26px; height: 26px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--teal-soft);
  display: grid; place-items: center;
}
.toast .t-icon svg { width: 14px; height: 14px; fill: var(--teal-bright); }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(40px); } }

/* ============ Responsive ============ */
@media (max-width: 1200px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-row, .analytics-grid { grid-template-columns: 1fr; }
  .missed-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .sidebar { width: 76px; padding: 18px 10px; }
  .brand-text, .nav-item span:not(.nav-badge), .sidebar-foot { display: none; }
  .nav-item { justify-content: center; padding: 12px; }
  .view.active { padding: 18px; }
  .inbox-wrap { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .chat-list { border-right: none; border-bottom: 1px solid var(--border); max-height: 240px; }
  .booking-card { grid-template-columns: 70px 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}
