/* ============================================================
   KINGDOM CARES — Design System v3 (Uber-inspired)
   Fonts: Fraunces (display) + Inter (body)

   TABLE OF CONTENTS
   ─────────────────────────────────────────────────────────────
   Search for the section name to jump to it.

   TOKENS & BASE
     DESIGN TOKENS        — CSS custom properties (colors, radius, shadow)
     RESET & BASE         — html/body, *, box-sizing
     LOADING              — splash loader
     SCREEN TRANSITIONS   — slide animations

   AUTH
     AUTH VIEW            — auth container, tabs
     BRAND MARK           — logo
     FORM COMPONENTS      — inputs, selects, textareas
     BUTTONS              — kc-btn variants
     AUTH ROLE PICKER     — Customer / Driver card chooser

   SHELL
     APP SHELL            — .view containers
     TOP HEADER           — kc-app-header
     BOTTOM TAB BAR       — kc-tabbar, kc-tab

   CUSTOMER SCREENS
     RIDER HOME           — tiles, search trigger, active banner
     BOOKING SCREEN       — fare card, vehicle picker
     ACTIVE TRIP SCREEN   — driver card, map, actions
     MY TRIPS LIST        — ride history rows
     CUSTOMER PROFILE     — profile screen, referral, places

   DRIVER SCREENS
     DRIVER HOME SCREEN   — earnings hero, available rides
     PENDING DRIVER       — waiting for approval screen
     APPLICATIONS CARDS   — driver application cards

   ADMIN SCREENS
     ADMIN LAYOUT         — sidebar, main, nav
     ADMIN TABLE          — kc-table, kc-table-scroll
     KPI GRID             — stat cards grid

   COMPONENTS
     TOAST                — toast notification
     STATUS PILLS         — kc-pill-* ride status badges
     DRIVER STATUS PILLS  — kc-driver-pill-*
     MODALS               — kc-modal overlay + sheets
     TIP MODAL            — tip selection
     PAYMENT NOTICE       — payment info chip
     POST-RIDE MODAL      — rating + tip
     CHAT OVERLAY         — in-ride messaging
     CHAT SYSTEM          — bubble wrap, avatars, typing dots, receipts
     NOTIFICATION BELL    — bell icon + badge
     NOTIFICATION PANEL   — slide-in panel
     SIDEBAR BADGE        — unread count badge
     RECENT RIDE ROWS     — compact ride list items
     ADMIN TABLE ACTIONS  — action button row
     TOGGLE LABEL         — online/offline toggle
     PARTNER CARDS        — partnership tiles
     FEATURED PLACES      — place cards with images
     FREQUENT PLACES      — quick-book place chips
     FULL PROFILE MODAL   — admin rider/driver profile sheet

   NAVIGATION (GPS)
     NAV ENGINE           — kc-nav-* drive-mode overlay

   RESPONSIVE
     @media queries       — tablet, mobile, landscape, safe-area

   ─────────────────────────────────────────────────────────────
   ADDING NEW CSS:
     For new features, create a file in css/components/ or css/screens/
     and add a <link> tag in index.html after the style.css link.
     This keeps style.css stable while new code is organized.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,400&family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── DESIGN TOKENS ────────────────────────────────────────── */
:root {
  /* Brand — Kingdom purple */
  --purple-950: #0F0D2B;
  --purple-900: #1A1744;
  --purple-800: #2D2780;
  --purple-700: #3D35A8;
  --purple-600: #5147C2;
  --purple-200: #C4BFED;
  --purple-100: #ECEAFE;
  --purple-50:  #F5F4FF;

  /* Brand — Kingdom gold */
  --gold-700: #92600D;
  --gold-600: #B8801F;
  --gold-500: #D4A03A;
  --gold-400: #EAC060;
  --gold-300: #F0D080;
  --gold-200: #F5DFA0;
  --gold-100: #FAF0CC;
  --gold-50:  #FEFBF0;

  /* Clean neutrals (Uber-style) */
  --black:    #000000;
  --gray-900: #141414;
  --gray-800: #222222;
  --gray-700: #3D3D3D;
  --gray-600: #545454;
  --gray-500: #717171;
  --gray-400: #9C9C9C;
  --gray-300: #CDCDCD;
  --gray-200: #E3E3E3;
  --gray-100: #F4F4F4;
  --gray-50:  #FAFAFA;
  --white:    #FFFFFF;

  /* Semantic */
  --cream:      #F9F8F5;
  --ink:        #1A1744;
  --ink-soft:   #454263;
  --ink-mute:   #8986A8;
  --line:       #EBEBEB;
  --success:    #1A7A52;
  --success-bg: #E0F5EC;
  --danger:     #C0392B;
  --danger-bg:  #FDECEA;
  --info:       #1B6FA8;
  --info-bg:    #DDF0FF;

  /* Shadow system */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.06);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 6px 20px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.05);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.10), 0 4px 12px rgba(0,0,0,0.06);
  --shadow-xl: 0 24px 64px rgba(0,0,0,0.14), 0 8px 20px rgba(0,0,0,0.08);
  --shadow-brand: 0 8px 28px rgba(45,39,128,0.24);
  --shadow-gold:  0 4px 20px rgba(212,160,58,0.25);
  --shadow-inset: inset 0 1px 3px rgba(0,0,0,0.06);

  /* Border radius */
  --radius-xs:   8px;
  --radius-sm:   12px;
  --radius-md:   16px;
  --radius-lg:   20px;
  --radius-xl:   24px;
  --radius-2xl:  32px;
  --radius-full: 9999px;

  /* Easing */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out:    cubic-bezier(0, 0, 0.2, 1);
}

/* ── RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--gray-50);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--purple-700); text-decoration: none; cursor: pointer; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }
.hidden { display: none !important; }
.view { min-height: 100vh; }

/* ── LOADING ─────────────────────────────────────────────── */
#kc-loading {
  position: fixed; inset: 0;
  background: var(--purple-950);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 20px;
  z-index: 9999;
}
.kc-loading-mark {
  width: 140px; height: 140px;
  background: var(--purple-950);
  border-radius: 32px;
  display: flex; align-items: center; justify-content: center;
  animation: kc-breathe 2s var(--ease-smooth) infinite;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06);
}
.kc-loading-name {
  font-family: 'Fraunces', serif;
  font-size: 20px; font-weight: 500;
  color: rgba(255,255,255,0.9);
  letter-spacing: -0.01em;
}
@keyframes kc-breathe {
  0%,100% { transform: scale(0.96); box-shadow: 0 0 0 0 rgba(212,160,58,0.35); }
  50%      { transform: scale(1.04); box-shadow: 0 0 0 16px rgba(212,160,58,0); }
}

/* ── SCREEN TRANSITIONS ───────────────────────────────────── */
@keyframes kc-slide-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes kc-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes kc-spin { to { transform: rotate(360deg); } }
@keyframes kc-blink { 0%,100% { opacity: 1; } 50% { opacity: 0.2; } }
@keyframes kc-pulse-ring {
  0%   { box-shadow: 0 0 0 0 currentColor; }
  70%  { box-shadow: 0 0 0 10px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* ── AUTH VIEW ───────────────────────────────────────────── */
#auth-view {
  min-height: 100vh;
  background: linear-gradient(170deg, var(--purple-950) 0%, #1E1958 45%, #3D35A8 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 32px 20px; position: relative; overflow: hidden;
}
#auth-view::before {
  content: '';
  position: absolute; top: -30%; right: -20%;
  width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(212,160,58,0.14) 0%, transparent 65%);
  pointer-events: none;
}
#auth-view::after {
  content: '';
  position: absolute; bottom: -20%; left: -20%;
  width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, rgba(81,71,194,0.25) 0%, transparent 65%);
  pointer-events: none;
}
.kc-auth-wrap {
  width: 100%; max-width: 400px; position: relative; z-index: 1;
}
.kc-auth-brand {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 36px; justify-content: center;
}
.kc-auth-card {
  background: rgba(255,255,255,0.98);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255,255,255,0.08);
  animation: kc-slide-up 0.35s var(--ease-out);
}
.kc-auth-card h2 {
  font-family: 'Fraunces', serif;
  font-size: 28px; font-weight: 500;
  color: var(--purple-950);
  letter-spacing: -0.03em; margin-bottom: 24px; line-height: 1;
}
.kc-auth-switch {
  text-align: center; margin-top: 22px;
  font-size: 13px; color: var(--ink-mute);
}
.kc-auth-switch a { color: var(--purple-700); font-weight: 700; }

/* ── BRAND MARK ──────────────────────────────────────────── */
.kc-brand-mark {
  width: 64px; height: 64px;
  background: var(--purple-950);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06);
}
.kc-brand-name {
  font-family: 'Fraunces', serif;
  font-weight: 600; font-size: 22px;
  color: var(--white); letter-spacing: -0.02em;
}
.kc-brand-tag { font-size: 11px; color: rgba(255,255,255,0.55); font-style: italic; margin-top: 1px; }

/* ── FORM COMPONENTS ─────────────────────────────────────── */
.kc-form-label {
  display: block;
  font-size: 11px; font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin: 20px 0 7px;
}
.kc-input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 15px; color: var(--ink);
  background: var(--white);
  transition: border-color 0.15s var(--ease-smooth),
              box-shadow 0.15s var(--ease-smooth),
              background 0.15s;
  outline: none;
}
.kc-input:focus {
  border-color: var(--purple-600);
  background: var(--purple-50);
  box-shadow: 0 0 0 3px rgba(81,71,194,0.10);
}
.kc-input::placeholder { color: var(--gray-400); }
.kc-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Role selector */
.kc-role-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kc-role-btn {
  padding: 16px 10px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--white); cursor: pointer;
  text-align: center; transition: all 0.18s var(--ease-smooth);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.kc-role-btn .role-emoji { font-size: 24px; }
.kc-role-btn .role-label { font-size: 13px; font-weight: 600; color: var(--ink); }
.kc-role-btn:hover { border-color: var(--purple-600); background: var(--purple-50); }
.kc-role-btn.active {
  border-color: var(--purple-700);
  background: var(--purple-50);
  box-shadow: 0 0 0 3px rgba(81,71,194,0.10);
}

/* Error */
.kc-error {
  background: var(--danger-bg); border: 1px solid rgba(192,57,43,0.15);
  color: var(--danger); border-radius: var(--radius-xs);
  padding: 10px 14px; font-size: 13px; margin-top: 12px; font-weight: 500;
}

/* ── BUTTONS ─────────────────────────────────────────────── */
.kc-cta {
  width: 100%;
  background: var(--ink);
  color: var(--white);
  border: none; padding: 16px 24px;
  border-radius: var(--radius-full);
  font-size: 15px; font-weight: 700;
  cursor: pointer; font-family: inherit;
  transition: transform 0.14s var(--ease-out), background 0.15s, box-shadow 0.15s;
  margin-top: 16px;
  letter-spacing: -0.01em;
  box-shadow: none;
}
.kc-cta:hover { background: var(--gray-800); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,0,0,0.2); }
.kc-cta:active { transform: scale(0.97); box-shadow: none; }
.kc-cta.purple {
  background: linear-gradient(145deg, var(--purple-700) 0%, var(--purple-800) 100%);
  box-shadow: var(--shadow-brand);
}
.kc-cta.purple:hover { box-shadow: 0 8px 28px rgba(45,39,128,0.35); transform: translateY(-1px); }
.kc-cta.gold {
  background: linear-gradient(145deg, var(--gold-400) 0%, var(--gold-500) 100%);
  color: var(--purple-950);
  box-shadow: var(--shadow-gold);
}
.kc-cta.gold:hover { box-shadow: 0 8px 28px rgba(212,160,58,0.38); transform: translateY(-1px); }
.kc-cta:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }
.kc-cta-inline {
  padding: 10px 22px; width: auto; margin-top: 0;
  font-size: 13px; border-radius: var(--radius-full);
}

/* ── APP SHELL ───────────────────────────────────────────── */
.kc-app-shell {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--white);
  position: relative;
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: 0 0 80px rgba(0,0,0,0.12);
}
.kc-screen-full {
  flex: 1; display: flex;
  flex-direction: column;
  min-height: 0; overflow: hidden;
}
.kc-screen-scroll {
  flex: 1; overflow-y: auto;
  padding: 8px 20px 108px;
  scroll-behavior: smooth;
}
.kc-screen-scroll::-webkit-scrollbar { width: 0; }

/* ── TOP HEADER ──────────────────────────────────────────── */
.kc-app-header {
  padding: 20px 20px 16px;
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.kc-header-brand { display: flex; align-items: center; gap: 10px; }
.kc-header-brand .kc-brand-mark { width: 36px; height: 36px; border-radius: 10px; overflow: hidden; background: var(--purple-950); }
.kc-header-brand .kc-brand-name { font-size: 17px; color: var(--purple-950); }

.kc-greet-eyebrow {
  font-size: 12px; color: var(--gray-500);
  font-weight: 500; letter-spacing: 0.01em; margin-bottom: 1px;
}
.kc-greet-name {
  font-family: 'Fraunces', serif;
  font-size: 24px; font-weight: 500;
  color: var(--ink); letter-spacing: -0.03em; line-height: 1;
}
.kc-greet-accent { color: var(--gold-500); font-style: italic; }

.kc-logout-btn {
  padding: 8px 16px; font-size: 12px; font-weight: 600;
  border: 1.5px solid var(--gray-200); border-radius: var(--radius-full);
  background: transparent; color: var(--gray-600);
  cursor: pointer; font-family: inherit; transition: all 0.15s;
}
.kc-logout-btn:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-bg); }

.kc-screen-header {
  padding: 16px 20px;
  display: flex; align-items: center; gap: 14px;
  border-bottom: 1px solid var(--gray-100);
  flex-shrink: 0; background: var(--white);
}
.kc-back-btn {
  width: 38px; height: 38px; border-radius: var(--radius-full);
  background: var(--gray-100); border: none;
  color: var(--gray-800);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background 0.15s;
  flex-shrink: 0;
}
.kc-back-btn:hover { background: var(--gray-200); }
.kc-header-title {
  font-family: 'Fraunces', serif;
  font-size: 20px; font-weight: 500;
  color: var(--ink); letter-spacing: -0.025em;
}

/* ── BOTTOM TAB BAR ──────────────────────────────────────── */
.kc-tabbar {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(0,0,0,0.06);
  padding: 8px 4px 24px;
  display: flex; justify-content: space-around;
  z-index: 20; flex-shrink: 0;
}
.kc-tab {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; gap: 3px;
  font-size: 10px; font-weight: 500; color: var(--gray-400);
  cursor: pointer; border: none; background: transparent;
  font-family: inherit; padding: 6px 4px;
  border-radius: var(--radius-xs); transition: color 0.15s;
  position: relative;
}
.kc-tab svg { width: 22px; height: 22px; transition: transform 0.2s var(--ease-spring); }
.kc-tab:hover { color: var(--gray-700); }
.kc-tab.active { color: var(--ink); font-weight: 700; }
.kc-tab.active svg { transform: scale(1.1); stroke: var(--purple-700); }
.kc-tab.active::after {
  content: '';
  position: absolute; bottom: -2px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--purple-700);
}

/* ── RIDER HOME ──────────────────────────────────────────── */
.kc-search-trigger {
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-2xl);
  padding: 16px 20px;
  margin: 16px 0;
  cursor: pointer; transition: all 0.18s var(--ease-smooth);
  text-align: left; width: 100%;
  font-family: inherit;
  box-shadow: var(--shadow-sm);
}
.kc-search-trigger:hover {
  border-color: var(--gray-300);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  background: var(--white);
}
.kc-search-trigger:active { transform: scale(0.98); }
.kc-search-label {
  font-size: 11px; color: var(--gray-500);
  font-weight: 600; margin-bottom: 12px;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.kc-search-dot-row { display: flex; align-items: center; gap: 14px; padding: 5px 0; }
.kc-search-dot { width: 10px; height: 10px; flex-shrink: 0; }
.kc-search-dot.start {
  background: var(--gray-800); border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.08);
}
.kc-search-dot.end {
  background: var(--gold-500); border-radius: 3px;
  box-shadow: 0 0 0 3px rgba(212,160,58,0.15);
}
.kc-search-line { width: 1.5px; height: 14px; background: var(--gray-200); margin-left: 4px; }
.kc-search-field { font-size: 14px; color: var(--ink); font-weight: 500; }
.kc-search-field.ghost { color: var(--gray-400); font-weight: 400; }

/* Section labels */
.kc-section-label {
  font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--gray-500);
  font-weight: 700; margin: 24px 0 12px;
}

/* Quick trip tiles */
.kc-tile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kc-tile {
  background: var(--white); border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md); padding: 16px;
  cursor: pointer; transition: all 0.2s var(--ease-smooth); text-align: left;
  font-family: inherit; width: 100%;
  box-shadow: var(--shadow-xs);
}
.kc-tile:hover {
  border-color: var(--purple-200);
  background: var(--purple-50);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.kc-tile:active { transform: scale(0.97); }
.kc-tile-icon {
  width: 44px; height: 44px;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px; color: var(--gray-700);
  transition: background 0.15s;
}
.kc-tile:hover .kc-tile-icon { background: var(--purple-100); color: var(--purple-700); }
.kc-tile-title { font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 2px; }
.kc-tile-sub { font-size: 11px; color: var(--gray-500); }

/* Active ride banner */
.kc-upcoming {
  background: var(--ink);
  border-radius: var(--radius-xl); padding: 22px;
  margin: 14px 0; color: var(--white);
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.kc-upcoming::before {
  content: ""; position: absolute; right: -24px; top: -24px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(212,160,58,0.28) 0%, transparent 70%);
  pointer-events: none;
}
.kc-upcoming-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--gold-400); font-weight: 700; margin-bottom: 6px;
}
.kc-upcoming-title {
  font-family: 'Fraunces', serif; font-size: 19px;
  font-weight: 500; margin-bottom: 4px; position: relative; z-index: 1;
}
.kc-upcoming-meta { font-size: 12px; opacity: 0.7; margin-bottom: 16px; position: relative; z-index: 1; }
.kc-upcoming-actions { display: flex; gap: 8px; position: relative; z-index: 1; }
.kc-upcoming-btn {
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  color: var(--white); padding: 9px 16px;
  border-radius: var(--radius-full);
  font-size: 12px; font-weight: 600; cursor: pointer;
  font-family: inherit; transition: all 0.15s;
}
.kc-upcoming-btn:hover { background: rgba(255,255,255,0.20); }
.kc-upcoming-btn.primary {
  background: linear-gradient(145deg, var(--gold-400) 0%, var(--gold-500) 100%);
  color: var(--purple-950); border-color: transparent;
  font-weight: 700; box-shadow: var(--shadow-gold);
}
.kc-upcoming-status {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  background: rgba(255,255,255,0.14); padding: 4px 10px;
  border-radius: var(--radius-full); display: inline-block; margin-bottom: 8px;
}

/* Trust banner */
.kc-trust {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; background: var(--gold-50);
  border: 1px solid var(--gold-100); border-radius: var(--radius-md); margin: 16px 0;
}
.kc-trust-icon {
  width: 36px; height: 36px; background: var(--white);
  border-radius: var(--radius-xs); display: flex; align-items: center;
  justify-content: center; color: var(--gold-600); flex-shrink: 0;
  box-shadow: var(--shadow-xs);
}
.kc-trust-text { font-size: 12px; color: var(--gold-700); line-height: 1.5; }
.kc-trust-text strong { display: block; font-size: 13px; margin-bottom: 2px; }

/* ── BOOKING SCREEN ──────────────────────────────────────── */
.kc-purpose-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.kc-purpose {
  padding: 13px 6px; border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm); background: var(--white);
  cursor: pointer; text-align: center; font-family: inherit;
  transition: all 0.15s var(--ease-smooth); box-shadow: var(--shadow-xs);
}
.kc-purpose:hover { border-color: var(--purple-200); background: var(--purple-50); }
.kc-purpose.selected {
  border-color: var(--purple-700);
  background: var(--purple-50);
  box-shadow: 0 0 0 3px rgba(81,71,194,0.08);
}
.kc-purpose-emoji { font-size: 20px; margin-bottom: 5px; }
.kc-purpose-label { font-size: 11px; font-weight: 600; color: var(--ink); }

.kc-needs-list { display: flex; flex-wrap: wrap; gap: 8px; }
.kc-need-chip {
  padding: 9px 16px; border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-full); background: var(--white);
  cursor: pointer; font-family: inherit; font-size: 13px;
  color: var(--ink-soft); transition: all 0.15s; font-weight: 500;
}
.kc-need-chip:hover { border-color: var(--gold-300); background: var(--gold-50); }
.kc-need-chip.selected {
  border-color: var(--gold-500);
  background: var(--gold-50);
  color: var(--gold-700); font-weight: 600;
  box-shadow: 0 0 0 3px rgba(212,160,58,0.10);
}

/* Fare card */
.kc-price-card {
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg); padding: 20px; margin: 20px 0;
  box-shadow: var(--shadow-xs);
}
.kc-price-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0; font-size: 13px; color: var(--gray-600);
}
.kc-price-row.total {
  border-top: 1px solid var(--gray-200); margin-top: 10px;
  padding-top: 14px; font-size: 15px; font-weight: 700; color: var(--ink);
}
.kc-price-amount {
  font-family: 'Fraunces', serif; font-size: 28px;
  font-weight: 600; color: var(--ink); letter-spacing: -0.025em;
}

/* ── ACTIVE TRIP SCREEN ──────────────────────────────────── */
.kc-map-area {
  height: 270px; background: #E5E8ED;
  position: relative; flex-shrink: 0; overflow: hidden;
}
.kc-map-area svg { width: 100%; height: 100%; display: block; }

.kc-trip-sheet {
  background: var(--white); flex: 1; overflow-y: auto;
  padding: 28px 20px 100px;
  border-radius: 28px 28px 0 0; margin-top: -24px;
  position: relative; z-index: 2;
  box-shadow: 0 -8px 32px rgba(0,0,0,0.10);
}
.kc-trip-sheet::before {
  content: ""; position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  width: 36px; height: 4px;
  background: var(--gray-200); border-radius: 2px;
}
.kc-trip-status-label {
  font-size: 13px; color: var(--gold-700); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em; margin-top: 10px;
}
.kc-trip-eta {
  font-family: 'Fraunces', serif; font-size: 48px;
  font-weight: 500; color: var(--ink); letter-spacing: -0.03em;
  margin: 4px 0 20px; line-height: 1;
}
.kc-trip-searching {
  text-align: center; padding: 44px 20px; color: var(--gray-500);
}
.kc-trip-searching .spin {
  width: 48px; height: 48px;
  border: 3px solid var(--gray-200); border-top-color: var(--ink);
  border-radius: 50%; animation: kc-spin 0.8s linear infinite;
  margin: 0 auto 20px;
}
.kc-trip-searching p { font-size: 16px; font-weight: 700; color: var(--ink); }
.kc-trip-searching small { font-size: 12px; color: var(--gray-500); margin-top: 6px; display: block; }

/* Driver card (customer trip view) */
.kc-driver-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px; background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); margin-bottom: 12px;
  box-shadow: var(--shadow-xs);
}
.kc-driver-avatar {
  width: 54px; height: 54px; border-radius: 50%;
  background: linear-gradient(145deg, var(--gold-400), var(--gold-600));
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-family: 'Fraunces', serif;
  font-weight: 700; font-size: 18px; flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(212,160,58,0.25);
}
.kc-driver-info { flex: 1; min-width: 0; }
.kc-driver-name { font-size: 16px; font-weight: 700; color: var(--ink); }
.kc-driver-meta { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.kc-driver-stars { color: var(--gold-500); }

.kc-trip-route {
  padding: 16px;
  background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: var(--radius-md); margin-bottom: 12px;
}
.kc-trip-route-row { display: flex; align-items: flex-start; gap: 12px; padding: 4px 0; }
.kc-trip-route-dot { width: 10px; height: 10px; flex-shrink: 0; margin-top: 4px; border-radius: 50%; }
.kc-trip-route-dot.from { background: var(--gray-800); box-shadow: 0 0 0 3px rgba(0,0,0,0.08); }
.kc-trip-route-dot.to   { background: var(--gold-500); border-radius: 3px; box-shadow: 0 0 0 3px rgba(212,160,58,0.15); }
.kc-trip-route-text { font-size: 13px; color: var(--gray-600); }
.kc-trip-route-text strong { color: var(--ink); display: block; margin-bottom: 2px; }

/* ── MY TRIPS LIST ───────────────────────────────────────── */
.kc-trip-card {
  background: var(--white); border: 1.5px solid var(--gray-100);
  border-radius: var(--radius-md); padding: 16px; margin-bottom: 10px;
  box-shadow: var(--shadow-xs); transition: all 0.18s var(--ease-smooth);
}
.kc-trip-card:hover { box-shadow: var(--shadow-sm); border-color: var(--gray-200); transform: translateY(-1px); }
.kc-trip-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.kc-trip-card-id  { font-size: 12px; color: var(--gray-400); font-weight: 500; }

/* Status pills */
.kc-pill {
  font-size: 10px; padding: 4px 12px; border-radius: var(--radius-full);
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  display: inline-block;
}
.kc-pill-requested  { background: var(--purple-100); color: var(--purple-800); }
.kc-pill-accepted   { background: var(--gold-100);   color: var(--gold-700);   }
.kc-pill-inprogress { background: var(--info-bg);    color: var(--info);       }
.kc-pill-completed  { background: var(--success-bg); color: var(--success);    }
.kc-pill-cancelled  { background: var(--danger-bg);  color: var(--danger);     }

.kc-trip-loc { font-size: 13px; color: var(--gray-600); line-height: 1.6; }
.kc-trip-loc strong { color: var(--ink); }

/* ── DRIVER HOME SCREEN ──────────────────────────────────── */
.kc-driver-home-wrap { padding: 16px 20px 108px; }

.kc-driver-hello {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px;
}
.kc-online-toggle {
  display: flex; align-items: center; gap: 8px;
  background: var(--success-bg);
  color: var(--success);
  padding: 9px 18px; border-radius: var(--radius-full);
  font-size: 12px; font-weight: 700; cursor: pointer;
  border: 1.5px solid rgba(26,122,82,0.18);
  font-family: inherit; transition: all 0.18s;
}
.kc-online-toggle::before {
  content: ""; width: 8px; height: 8px;
  background: var(--success); border-radius: 50%;
  animation: kc-blink 2s ease-in-out infinite;
  box-shadow: 0 0 0 3px rgba(26,122,82,0.18);
}
.kc-online-toggle.offline { background: var(--gray-100); color: var(--gray-600); border-color: var(--gray-200); }
.kc-online-toggle.offline::before { background: var(--gray-400); box-shadow: none; animation: none; }

/* Earnings hero */
.kc-earnings-hero {
  background: var(--ink);
  border-radius: var(--radius-xl);
  padding: 26px; color: var(--white);
  position: relative; overflow: hidden;
  margin-bottom: 16px;
  box-shadow: var(--shadow-lg);
}
.kc-earnings-hero::before {
  content: ""; position: absolute; right: -40px; top: -40px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(212,160,58,0.22) 0%, transparent 65%);
  pointer-events: none;
}
.kc-earnings-hero::after {
  content: ""; position: absolute; left: -60px; bottom: -60px;
  width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(81,71,194,0.22) 0%, transparent 65%);
  pointer-events: none;
}
.kc-earnings-label {
  font-size: 11px; color: rgba(255,255,255,0.6);
  text-transform: uppercase; letter-spacing: 0.12em;
  font-weight: 700; margin-bottom: 4px; position: relative; z-index: 1;
}
.kc-earnings-amount {
  font-family: 'Fraunces', serif; font-size: 48px;
  font-weight: 500; letter-spacing: -0.03em; margin-bottom: 12px;
  position: relative; z-index: 1; line-height: 1;
}
.kc-earnings-stats {
  display: flex; gap: 24px; font-size: 12px;
  color: rgba(255,255,255,0.55); position: relative; z-index: 1;
}
.kc-earnings-stats strong {
  color: var(--white); display: block;
  font-size: 18px; font-weight: 700; margin-bottom: 2px;
}

/* Ride request card */
.kc-ride-request {
  background: var(--white); border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-xl); padding: 20px;
  position: relative; margin-bottom: 14px;
  box-shadow: var(--shadow-sm); transition: all 0.2s var(--ease-smooth);
}
.kc-ride-request:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.kc-ride-req-badge {
  position: absolute; top: -11px; left: 20px;
  background: var(--ink);
  color: var(--white);
  font-size: 10px; font-weight: 800; padding: 4px 14px;
  border-radius: var(--radius-full);
  text-transform: uppercase; letter-spacing: 0.1em;
}
.kc-req-rider { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.kc-req-avatar {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--gray-100); color: var(--gray-700);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px; flex-shrink: 0;
}
.kc-req-rider-name { font-size: 15px; font-weight: 700; color: var(--ink); }
.kc-req-rider-meta { font-size: 11px; color: var(--gray-500); margin-top: 2px; }
.kc-req-fare {
  font-family: 'Fraunces', serif; font-size: 24px;
  font-weight: 600; color: var(--ink); margin-left: auto;
  letter-spacing: -0.025em;
}
.kc-req-route {
  padding: 12px 14px;
  background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  margin-bottom: 12px; font-size: 12px; color: var(--gray-600); line-height: 1.7;
}
.kc-req-route strong { color: var(--ink); }
.kc-req-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.kc-req-tag {
  background: var(--gold-50); color: var(--gold-700);
  font-size: 11px; padding: 3px 10px; border-radius: var(--radius-full);
  font-weight: 600; border: 1px solid var(--gold-100);
}
.kc-req-actions { display: flex; gap: 10px; margin-top: 4px; }
.kc-req-decline {
  flex: 1; padding: 13px; background: var(--gray-100);
  border: none; border-radius: var(--radius-full);
  font-weight: 700; color: var(--gray-700); cursor: pointer;
  font-family: inherit; font-size: 13px; transition: all 0.15s;
}
.kc-req-decline:hover { background: var(--danger-bg); color: var(--danger); }
.kc-req-accept {
  flex: 2; padding: 13px;
  background: var(--ink);
  border: none; border-radius: var(--radius-full);
  color: var(--white); font-weight: 700; cursor: pointer;
  font-family: inherit; font-size: 13px;
  transition: all 0.15s;
}
.kc-req-accept:hover { background: var(--gray-800); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,0.2); }

/* Active ride card */
.kc-active-ride-card {
  background: var(--gray-50); border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg); padding: 20px; margin-bottom: 14px;
  box-shadow: var(--shadow-xs);
}
.kc-active-ride-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.kc-active-ride-head h3 { font-family: 'Fraunces', serif; font-size: 18px; font-weight: 500; color: var(--ink); letter-spacing: -0.025em; }

/* Stat cards */
.kc-driver-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.kc-stat-card {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm); padding: 16px;
  box-shadow: var(--shadow-xs); transition: all 0.15s;
}
.kc-stat-card:hover { box-shadow: var(--shadow-sm); }
.kc-stat-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gray-500); font-weight: 700; margin-bottom: 6px; }
.kc-stat-val { font-family: 'Fraunces', serif; font-size: 26px; font-weight: 500; color: var(--ink); letter-spacing: -0.025em; }
.kc-stat-sub { font-size: 11px; color: var(--success); margin-top: 3px; font-weight: 600; }

/* Empty state */
.kc-empty {
  text-align: center; padding: 48px 24px;
  background: var(--gray-50); border: 1.5px solid var(--gray-100);
  border-radius: var(--radius-lg); margin-top: 4px;
}
.kc-empty-icon { font-size: 40px; margin-bottom: 14px; opacity: 0.5; display: block; }
.kc-empty p { font-size: 14px; color: var(--gray-500); line-height: 1.6; }

/* ── ADMIN LAYOUT ────────────────────────────────────────── */
#admin-view { min-height: 100vh; background: var(--gray-50); }
.kc-admin-wrap {
  display: grid; grid-template-columns: 244px 1fr; min-height: 100vh;
}
.kc-admin-side {
  background: var(--ink);
  padding: 24px 12px;
  color: var(--white); position: sticky; top: 0;
  height: 100vh; overflow-y: auto; flex-shrink: 0;
  border-right: 1px solid rgba(255,255,255,0.05);
}
.kc-admin-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 8px; margin-bottom: 32px;
}
.kc-admin-brand-mark {
  width: 48px; height: 48px;
  background: transparent;
  border-radius: 0; display: flex; align-items: center; justify-content: center;
  box-shadow: none;
}
.kc-admin-brand-name { font-family: 'Fraunces', serif; font-weight: 600; font-size: 16px; }
.kc-admin-nav-label {
  font-size: 9px; text-transform: uppercase; letter-spacing: 0.14em;
  color: rgba(255,255,255,0.28); padding: 16px 10px 6px; font-weight: 700;
}
.kc-admin-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-xs); font-size: 13px;
  color: rgba(255,255,255,0.55); cursor: pointer; margin-bottom: 2px;
  border: none; background: transparent; width: 100%; font-family: inherit;
  text-align: left; transition: all 0.15s; font-weight: 500;
}
.kc-admin-nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.kc-admin-nav-item:hover { background: rgba(255,255,255,0.07); color: var(--white); }
.kc-admin-nav-item.active {
  background: rgba(255,255,255,0.10);
  color: var(--white);
  border-left: 3px solid var(--gold-400);
}

.kc-admin-main { padding: 36px; overflow-y: auto; }
.kc-admin-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 32px; gap: 16px; flex-wrap: wrap;
}
.kc-admin-title {
  font-family: 'Fraunces', serif; font-size: 30px;
  font-weight: 500; color: var(--ink); letter-spacing: -0.03em;
}
.kc-admin-sub { font-size: 13px; color: var(--gray-500); margin-top: 5px; }

.kc-admin-tab-content { display: none; }
.kc-admin-tab-content.active { display: block; animation: kc-fade-in 0.2s var(--ease-out); }

/* KPI cards */
.kc-kpi-grid {
  display: grid; grid-template-columns: repeat(4,1fr);
  gap: 16px; margin-bottom: 32px;
}
.kc-kpi {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius-md); padding: 22px;
  box-shadow: var(--shadow-xs); position: relative; overflow: hidden;
  transition: all 0.18s var(--ease-smooth);
}
.kc-kpi:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.kc-kpi::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--purple-700), var(--purple-500));
}
.kc-kpi-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--gray-500); font-weight: 700; margin-bottom: 10px;
}
.kc-kpi-val {
  font-family: 'Fraunces', serif; font-size: 34px;
  font-weight: 500; color: var(--ink); letter-spacing: -0.03em;
}
.kc-kpi-delta { font-size: 11px; margin-top: 6px; font-weight: 700; }
.kc-kpi-delta.up   { color: var(--success); }
.kc-kpi-delta.down { color: var(--danger); }

.kc-admin-split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; }

.kc-admin-card {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius-md); overflow: hidden; margin-bottom: 20px;
  box-shadow: var(--shadow-xs);
}
.kc-admin-card-head {
  padding: 16px 20px; border-bottom: 1px solid var(--gray-100);
  display: flex; justify-content: space-between; align-items: center;
  background: var(--white);
}
.kc-admin-card-title { font-family: 'Fraunces', serif; font-size: 17px; font-weight: 600; color: var(--ink); letter-spacing: -0.025em; }
.kc-admin-link { font-size: 12px; color: var(--purple-700); font-weight: 700; cursor: pointer; }

.kc-filter-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.kc-select {
  padding: 8px 12px; border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-xs); background: var(--white); color: var(--ink-soft);
  font-size: 13px; font-family: inherit; outline: none; cursor: pointer;
  transition: border-color 0.15s; font-weight: 500;
}
.kc-select:focus { border-color: var(--purple-600); box-shadow: 0 0 0 3px rgba(81,71,194,0.08); }

/* Admin table */
.kc-table { width: 100%; border-collapse: collapse; }
.kc-table th {
  text-align: left; padding: 10px 20px;
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--gray-500); font-weight: 700; background: var(--gray-50);
}
.kc-table td {
  padding: 14px 20px; font-size: 13px; color: var(--ink);
  border-bottom: 1px solid var(--gray-100);
}
.kc-table tr:last-child td { border-bottom: none; }
.kc-table tr:hover td { background: var(--gray-50); }

.kc-status-pill {
  font-size: 10px; padding: 3px 10px; border-radius: var(--radius-full);
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  display: inline-block;
}
.pill-requested  { background: var(--purple-100); color: var(--purple-800); }
.pill-accepted   { background: var(--gold-100);   color: var(--gold-700);   }
.pill-inprogress { background: var(--info-bg);    color: var(--info);       }
.pill-completed  { background: var(--success-bg); color: var(--success);    }
.pill-cancelled  { background: var(--danger-bg);  color: var(--danger);     }
.pill-customer   { background: var(--purple-100); color: var(--purple-800); }
.pill-driver     { background: var(--gold-100);   color: var(--gold-700);   }
.pill-admin      { background: var(--success-bg); color: var(--success);    }

.kc-user-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 20px; border-bottom: 1px solid var(--gray-100);
}
.kc-user-row:last-child { border-bottom: none; }
.kc-user-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--gray-100); color: var(--gray-700);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.kc-user-name  { font-size: 14px; font-weight: 600; color: var(--ink); }
.kc-user-email { font-size: 12px; color: var(--gray-500); margin-top: 1px; }

.kc-assign-row { display: flex; gap: 6px; align-items: center; margin-top: 6px; }
.kc-assign-row select {
  flex: 1; font-size: 12px; padding: 6px 8px;
  border: 1px solid var(--gray-200); border-radius: var(--radius-xs);
  background: var(--white); color: var(--ink); font-family: inherit;
}
.kc-assign-btn {
  padding: 6px 14px; font-size: 12px;
  background: var(--ink); color: var(--white); border: none;
  border-radius: var(--radius-xs); cursor: pointer; font-family: inherit; font-weight: 700;
}

/* ── TOAST ───────────────────────────────────────────────── */
#kc-toast {
  position: fixed; bottom: 28px; right: 24px;
  background: var(--gray-900);
  color: var(--white);
  padding: 14px 20px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 9999; max-width: 340px;
  border-left: 3px solid var(--gold-500);
  animation: kc-slide-up 0.22s var(--ease-spring);
  backdrop-filter: blur(8px);
}
#kc-toast.toast-success { border-left-color: var(--success); }
#kc-toast.toast-danger  { border-left-color: var(--danger); }

/* ── KPI GRID — 5 columns ────────────────────────────────── */
.kc-kpi-grid { grid-template-columns: repeat(5,1fr) !important; }
@media (max-width: 1200px) { .kc-kpi-grid { grid-template-columns: repeat(3,1fr) !important; } }

/* ── DRIVER STATUS PILLS ─────────────────────────────────── */
.kc-pill-pending  { background: #FFF3CD; color: #7A5C00; }
.kc-pill-active   { background: var(--success-bg); color: var(--success); }
.kc-pill-rejected { background: var(--danger-bg);  color: var(--danger);  }

/* ── MODALS ──────────────────────────────────────────────── */
#assign-modal {
  position: fixed; inset: 0; z-index: 8000;
  background: rgba(0,0,0,0.55); backdrop-filter: blur(6px);
  display: flex; align-items: flex-end; justify-content: center;
}
@media (min-width: 480px) { #assign-modal { align-items: center; } }
.kc-modal-box {
  background: var(--white);
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
  padding: 32px 28px 40px;
  width: 100%; max-width: 480px;
  box-shadow: var(--shadow-xl);
  animation: kc-slide-up 0.28s var(--ease-spring);
}
@media (min-width: 480px) {
  .kc-modal-box { border-radius: var(--radius-xl); padding: 32px; }
}
.kc-modal-title {
  font-family: 'Fraunces', serif; font-size: 22px;
  font-weight: 600; color: var(--ink); margin-bottom: 6px;
  letter-spacing: -0.025em;
}
.kc-modal-sub { font-size: 14px; color: var(--gray-500); margin-bottom: 24px; line-height: 1.5; }
.kc-modal-actions { display: flex; gap: 10px; margin-top: 24px; }
.kc-modal-cancel {
  flex: 1; padding: 14px; background: var(--gray-100);
  border: none; border-radius: var(--radius-full);
  font-size: 14px; font-weight: 700; color: var(--gray-700);
  cursor: pointer; font-family: inherit; transition: all 0.15s;
}
.kc-modal-cancel:hover { background: var(--gray-200); }
.kc-modal-confirm {
  flex: 2; padding: 14px;
  background: var(--ink);
  border: none; border-radius: var(--radius-full);
  color: var(--white); font-size: 14px; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: all 0.15s;
}
.kc-modal-confirm:hover { background: var(--gray-800); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,0.2); }
.kc-modal-confirm:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }

/* ── PENDING DRIVER SCREEN ───────────────────────────────── */
.kc-pending-wrap {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 48px 28px; text-align: center;
}
.kc-pending-icon {
  width: 88px; height: 88px;
  background: var(--gold-50);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 38px; margin: 0 auto 26px;
  border: 3px solid var(--gold-100);
  box-shadow: var(--shadow-gold);
}
.kc-pending-title {
  font-family: 'Fraunces', serif; font-size: 24px;
  font-weight: 500; color: var(--ink);
  margin-bottom: 12px; letter-spacing: -0.03em;
}
.kc-pending-body { font-size: 14px; color: var(--gray-500); line-height: 1.7; max-width: 300px; margin: 0 auto 28px; }
.kc-pending-steps { width: 100%; text-align: left; margin-bottom: 24px; }
.kc-pending-step {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px; border-radius: var(--radius-sm); margin-bottom: 8px;
  background: var(--gray-50); border: 1px solid var(--gray-200);
}
.kc-pending-step-num {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--ink); color: white;
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
}
.kc-pending-step-text { font-size: 13px; color: var(--gray-600); line-height: 1.5; }
.kc-pending-step-text strong { color: var(--ink); display: block; margin-bottom: 2px; }

/* ── APPLICATIONS TAB CARDS ──────────────────────────────── */
.kc-app-card {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px; border-bottom: 1px solid var(--gray-100);
  transition: background 0.15s;
}
.kc-app-card:last-child { border-bottom: none; }
.kc-app-card:hover { background: var(--gray-50); }
.kc-app-avatar {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--gold-50); color: var(--gold-700);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fraunces', serif; font-weight: 600;
  font-size: 16px; flex-shrink: 0;
  border: 2px solid var(--gold-100);
}
.kc-app-info { flex: 1; min-width: 0; }
.kc-app-name  { font-size: 14px; font-weight: 700; color: var(--ink); }
.kc-app-email { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.kc-app-date  { font-size: 11px; color: var(--gray-400); margin-top: 3px; }
.kc-app-actions { display: flex; gap: 8px; flex-shrink: 0; }
.kc-app-approve {
  padding: 7px 14px; background: var(--success-bg); color: var(--success);
  border: 1.5px solid rgba(26,122,82,0.18); border-radius: var(--radius-full);
  font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit;
  transition: all 0.15s;
}
.kc-app-approve:hover { background: var(--success); color: white; }
.kc-app-reject {
  padding: 7px 14px; background: var(--danger-bg); color: var(--danger);
  border: 1.5px solid rgba(192,57,43,0.18); border-radius: var(--radius-full);
  font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit;
  transition: all 0.15s;
}
.kc-app-reject:hover { background: var(--danger); color: white; }

/* ── SIDEBAR BADGE ───────────────────────────────────────── */
.kc-nav-badge {
  margin-left: auto;
  background: var(--gold-500); color: var(--white);
  font-size: 10px; font-weight: 800;
  padding: 2px 8px; border-radius: var(--radius-full);
  min-width: 20px; text-align: center;
}

/* ── RECENT RIDE ROWS ────────────────────────────────────── */
.kc-ride-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid var(--gray-100);
  cursor: pointer; transition: all 0.15s; border-radius: var(--radius-xs);
}
.kc-ride-row:last-child { border-bottom: none; }
.kc-ride-row:hover { background: var(--gray-50); padding: 14px 10px; margin: 0 -10px; }
.kc-ride-row-icon { font-size: 20px; flex-shrink: 0; }

/* ── ADMIN TABLE ACTION BUTTONS ──────────────────────────── */
.kc-admin-action-btn {
  padding: 5px 12px; font-size: 11px; font-weight: 700;
  border: none; border-radius: var(--radius-full);
  cursor: pointer; font-family: inherit; margin-right: 4px;
  background: var(--gray-100); color: var(--gray-700);
  transition: all 0.15s;
}
.kc-admin-action-btn:hover  { background: var(--gray-200); }
.kc-admin-action-btn.danger { background: var(--danger-bg);  color: var(--danger); }
.kc-admin-action-btn.danger:hover { background: var(--danger); color: white; }
.kc-admin-action-btn.gold   { background: var(--gold-50);    color: var(--gold-700); border: 1px solid var(--gold-100); }
.kc-admin-action-btn.gold:hover { background: var(--gold-500); color: white; }

/* ── AUTH ROLE PICKER ─────────────────────────────────────── */
.kc-auth-picker-title {
  font-family: 'Fraunces', serif;
  font-size: 26px; font-weight: 500;
  color: var(--white); margin-bottom: 8px;
  letter-spacing: -0.03em;
}
.kc-auth-picker-sub { font-size: 14px; color: rgba(255,255,255,0.6); }

.kc-role-picker-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.kc-role-picker-card {
  display: flex; flex-direction: column; align-items: center;
  gap: 10px; padding: 24px 12px;
  background: rgba(255,255,255,0.06);
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-xl); cursor: pointer;
  font-family: inherit; transition: all 0.2s var(--ease-smooth); text-align: center;
  backdrop-filter: blur(8px);
}
.kc-role-picker-card:hover {
  border-color: rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.12);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.28);
}
.kc-role-picker-card:active { transform: scale(0.97); }
.kc-role-picker-icon { font-size: 34px; line-height: 1; }
.kc-role-picker-name { font-size: 14px; font-weight: 700; color: var(--white); }
.kc-role-picker-desc { font-size: 11px; color: rgba(255,255,255,0.5); font-weight: 400; }

.kc-role-ctx-banner {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-sm); margin-bottom: 12px;
  font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.9);
  backdrop-filter: blur(4px);
}

.kc-back-to-roles {
  display: flex; align-items: center; gap: 6px;
  background: transparent; border: none;
  font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.55);
  cursor: pointer; font-family: inherit;
  padding: 4px 0; margin-bottom: 12px;
  transition: color 0.15s;
}
.kc-back-to-roles:hover { color: var(--white); }

/* ── TIP MODAL ────────────────────────────────────────────── */
#tip-modal {
  position: fixed; inset: 0; z-index: 8100;
  background: rgba(0,0,0,0.55); backdrop-filter: blur(8px);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 20px;
}
.kc-tip-amounts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 4px; }
.kc-tip-btn {
  padding: 16px 8px;
  background: var(--gray-100);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 17px; font-weight: 700;
  color: var(--ink); cursor: pointer;
  font-family: 'Fraunces', serif;
  transition: all 0.18s var(--ease-smooth);
}
.kc-tip-btn:hover, .kc-tip-btn.selected {
  background: var(--ink); color: var(--white); border-color: transparent;
  box-shadow: 0 4px 14px rgba(0,0,0,0.2); transform: translateY(-1px);
}

/* ── PAYMENT NOTICE ─────────────────────────────────────── */
.kc-payment-notice {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: var(--success-bg);
  border: 1px solid rgba(26,122,82,0.15);
  border-radius: var(--radius-sm); margin: 16px 0;
}
.kc-payment-notice-icon { font-size: 20px; flex-shrink: 0; }
.kc-payment-notice-title { font-size: 13px; font-weight: 700; color: var(--success); }
.kc-payment-notice-sub { font-size: 11px; color: var(--gray-500); margin-top: 1px; }

/* ── POST-RIDE MODAL ─────────────────────────────────────── */
#post-ride-modal {
  position: fixed; inset: 0; z-index: 8100;
  background: rgba(0,0,0,0.55); backdrop-filter: blur(8px);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 20px;
}
.kc-stars { display: flex; justify-content: center; gap: 8px; }
.kc-star {
  font-size: 40px; background: none; border: none; cursor: pointer;
  color: var(--gray-200); line-height: 1;
  transition: transform 0.15s var(--ease-spring), color 0.15s;
  padding: 0 2px;
}
.kc-star:hover, .kc-star.filled { color: var(--gold-500); transform: scale(1.25); }
.kc-tip-btn-sm {
  padding: 13px 8px;
  background: var(--gray-100); border: 2px solid transparent;
  border-radius: var(--radius-sm); font-size: 16px; font-weight: 700;
  color: var(--ink); cursor: pointer; font-family: 'Fraunces', serif;
  transition: all 0.18s;
}
.kc-tip-btn-sm:hover, .kc-tip-btn-sm.selected {
  background: var(--ink); color: var(--white); border-color: transparent;
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}

/* ── CHAT OVERLAY ────────────────────────────────────────── */
.kc-chat-overlay {
  position: fixed; inset: 0; z-index: 8200;
  background: var(--white); display: flex; flex-direction: column;
}
.kc-chat-header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px; background: var(--white);
  border-bottom: 1px solid var(--gray-100); flex-shrink: 0;
}
.kc-chat-close {
  width: 38px; height: 38px;
  background: var(--gray-100); border: none;
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--gray-800); flex-shrink: 0;
  transition: background 0.15s;
}
.kc-chat-close:hover { background: var(--gray-200); }
.kc-chat-title { font-size: 16px; font-weight: 700; color: var(--ink); }
.kc-chat-messages {
  flex: 1; overflow-y: auto;
  padding: 16px 20px;
  display: flex; flex-direction: column; gap: 10px;
  background: var(--gray-50);
}
.kc-chat-loading, .kc-chat-empty { text-align: center; color: var(--gray-400); font-size: 13px; padding: 24px 0; }
/* layout overridden by full chat rules at bottom of file */
.kc-chat-msg { display: flex; flex-direction: row; align-items: flex-end; gap: 8px; max-width: 82%; align-self: flex-start; }
.kc-chat-msg.mine { align-self: flex-end; align-items: flex-end; flex-direction: row-reverse; }
.kc-chat-msg.theirs { align-self: flex-start; align-items: flex-end; }
.kc-chat-sender { font-size: 11px; color: var(--gray-400); font-weight: 600; margin-bottom: 3px; }
.kc-chat-bubble {
  padding: 11px 15px;
  border-radius: 20px; font-size: 14px; line-height: 1.45;
  word-break: break-word;
}
.kc-chat-msg.mine .kc-chat-bubble {
  background: var(--ink); color: var(--white);
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.kc-chat-msg.theirs .kc-chat-bubble {
  background: var(--white); color: var(--ink);
  border: 1.5px solid var(--gray-200);
  border-bottom-left-radius: 4px;
  box-shadow: var(--shadow-xs);
}
.kc-chat-time { font-size: 10px; color: var(--gray-400); margin-top: 3px; }
.kc-chat-input-row {
  display: flex; gap: 10px; align-items: center;
  padding: 12px 16px; background: var(--white);
  border-top: 1px solid var(--gray-100); flex-shrink: 0;
}
.kc-chat-input {
  flex: 1; padding: 12px 18px;
  border: 1.5px solid var(--gray-200); border-radius: var(--radius-full);
  font-size: 14px; font-family: inherit; color: var(--ink);
  background: var(--gray-50); outline: none; transition: all 0.15s;
}
.kc-chat-input:focus { border-color: var(--gray-400); background: var(--white); }
.kc-chat-send {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--ink); border: none; color: var(--white);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; transition: all 0.15s;
}
.kc-chat-send:hover { transform: scale(1.06); background: var(--gray-800); }
.kc-chat-fab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 20px;
  background: var(--ink); color: var(--white); border: none;
  border-radius: var(--radius-full); font-size: 14px; font-weight: 700;
  cursor: pointer; font-family: inherit; margin-top: 12px;
  transition: all 0.15s;
}
.kc-chat-fab:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,0,0,0.22); }

/* ── NOTIFICATION BELL ───────────────────────────────────── */
.kc-notif-bell {
  position: relative; width: 40px; height: 40px;
  background: var(--gray-100); border: none;
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--gray-800); transition: all 0.15s;
}
.kc-notif-bell:hover { background: var(--gray-200); transform: scale(1.05); }
.kc-notif-bell-badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 18px; height: 18px;
  background: var(--danger); color: var(--white);
  border-radius: 9px; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px; border: 2px solid var(--white);
}

/* ── NOTIFICATION PANEL ──────────────────────────────────── */
#notif-panel { position: fixed; inset: 0; z-index: 7500; }
.kc-notif-panel-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.20); backdrop-filter: blur(2px);
}
.kc-notif-panel-box {
  position: absolute; top: 68px; right: 16px;
  width: 320px; background: var(--white);
  border: 1px solid var(--gray-200); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl); overflow: hidden;
  animation: kc-slide-up 0.2s var(--ease-out);
}
.kc-notif-item {
  padding: 14px 20px; border-bottom: 1px solid var(--gray-100);
}
.kc-notif-item:last-child { border-bottom: none; }
.kc-notif-item-title { font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 3px; }
.kc-notif-item-body { font-size: 12px; color: var(--gray-600); line-height: 1.4; }
.kc-notif-item-time { font-size: 10px; color: var(--gray-400); margin-top: 5px; }
.kc-notif-empty { padding: 28px 20px; text-align: center; font-size: 13px; color: var(--gray-400); }

/* ── FEATURED PLACES ─────────────────────────────────────── */
.kc-featured-scroll {
  display: flex; gap: 12px; overflow-x: auto;
  padding-bottom: 8px; -webkit-overflow-scrolling: touch;
}
.kc-featured-scroll::-webkit-scrollbar { display: none; }
.kc-featured-tile {
  flex-shrink: 0; width: 160px;
  background: var(--white); border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md); padding: 16px 14px;
  cursor: pointer; text-align: left;
  transition: all 0.2s var(--ease-smooth); font-family: inherit;
  box-shadow: var(--shadow-xs);
}
.kc-featured-tile:hover {
  border-color: var(--purple-200); box-shadow: var(--shadow-sm);
  transform: translateY(-3px);
}
.kc-featured-icon { font-size: 28px; margin-bottom: 8px; }
.kc-featured-name {
  font-size: 13px; font-weight: 700; color: var(--ink);
  margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kc-featured-addr {
  font-size: 11px; color: var(--gray-500); line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.kc-featured-code {
  display: inline-block; margin-top: 6px;
  font-size: 10px; font-weight: 700; color: var(--gold-700);
  background: var(--gold-50); border-radius: var(--radius-xs); padding: 2px 7px;
}

/* ── FREQUENT PLACES ─────────────────────────────────────── */
.kc-frequent-list { display: flex; flex-direction: column; gap: 8px; }
.kc-frequent-chip {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 16px; background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm); cursor: pointer; font-family: inherit;
  transition: all 0.15s; text-align: left;
  box-shadow: var(--shadow-xs); font-size: 13px; font-weight: 500; color: var(--ink);
}
.kc-frequent-chip:hover { border-color: var(--purple-200); background: var(--purple-50); transform: translateX(2px); }
.kc-frequent-chip-name { font-size: 13px; font-weight: 500; color: var(--ink); }
.kc-frequent-count {
  font-size: 11px; color: var(--gray-500);
  background: var(--gray-100); border-radius: var(--radius-xs);
  padding: 3px 8px; flex-shrink: 0; margin-left: 8px; font-weight: 600;
}

/* ── CUSTOMER PROFILE SCREEN ─────────────────────────────── */
.kc-profile-section {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); padding: 22px;
  margin-bottom: 16px; box-shadow: var(--shadow-xs);
}
.kc-referral-card {
  background: var(--ink);
  border-radius: var(--radius-xl); padding: 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-lg);
  position: relative; overflow: hidden;
}
.kc-referral-card::before {
  content: ''; position: absolute; right: -40px; top: -40px;
  width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(212,160,58,0.2) 0%, transparent 65%);
  pointer-events: none;
}
.kc-referral-card .kc-section-label { color: rgba(255,255,255,0.5); }
.kc-referral-card p { color: rgba(255,255,255,0.65); }
.kc-referral-code-box {
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(255,255,255,0.08); border-radius: var(--radius-sm);
  padding: 16px; margin-bottom: 16px;
  border: 1px solid rgba(255,255,255,0.12);
}
.kc-referral-code {
  font-family: 'Fraunces', serif;
  font-size: 28px; font-weight: 600; color: var(--gold-400);
  letter-spacing: 0.08em;
}
.kc-cta-inline-sm {
  padding: 10px 18px;
  background: linear-gradient(145deg, var(--gold-400) 0%, var(--gold-500) 100%);
  border: none; border-radius: var(--radius-full);
  font-size: 13px; font-weight: 700; color: var(--purple-950);
  cursor: pointer; font-family: inherit; transition: all 0.18s;
}
.kc-cta-inline-sm:hover { transform: translateY(-1px); box-shadow: var(--shadow-gold); }
.kc-referral-row { display: flex; gap: 24px; }
.kc-referral-row div { display: flex; flex-direction: column; gap: 2px; }
.kc-referral-row strong {
  font-size: 24px; font-weight: 700; color: var(--white);
  font-family: 'Fraunces', serif;
}
.kc-referral-row span { font-size: 11px; color: rgba(255,255,255,0.55); }

/* ── PARTNER CARDS ───────────────────────────────────────── */
.kc-partner-card {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 16px 0; border-bottom: 1px solid var(--gray-100); gap: 12px;
}
.kc-partner-card:last-child { border-bottom: none; }
.kc-partner-inactive { opacity: 0.4; }
.kc-partner-left { flex: 1; min-width: 0; }
.kc-partner-name { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 3px; }
.kc-partner-cat {
  display: inline-block; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--purple-700); background: var(--purple-50);
  border-radius: var(--radius-xs); padding: 2px 7px; margin-bottom: 5px;
}
.kc-partner-code {
  font-size: 12px; color: var(--gold-700); font-weight: 700;
  background: var(--gold-50); border-radius: var(--radius-xs); padding: 2px 7px;
  margin-left: 4px;
}
.kc-partner-desc { font-size: 12px; color: var(--gray-500); margin-top: 3px; }
.kc-partner-link { font-size: 11px; color: var(--purple-700); margin-top: 3px; }
.kc-partner-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ── ADMIN RIDER PROFILE MODAL ───────────────────────────── */
.kc-profile-modal-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--gray-100);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; margin: 0 auto 16px; color: var(--gray-600);
}
.kc-profile-modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.kc-profile-field label {
  display: block; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--gray-400); margin-bottom: 3px;
}
.kc-profile-field span { font-size: 13px; color: var(--ink); font-weight: 500; }

/* ── TOGGLE LABEL ────────────────────────────────────────── */
.kc-toggle-label { font-size: 13px; color: var(--gray-700); cursor: pointer; }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .kc-kpi-grid    { grid-template-columns: repeat(2,1fr); }
  .kc-admin-split { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .kc-admin-wrap  { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .kc-auth-card { padding: 28px 20px; }
  .kc-form-row  { grid-template-columns: 1fr; }
  .kc-kpi-grid  { grid-template-columns: 1fr 1fr; }
  .kc-admin-main { padding: 20px 16px; }
  #kc-toast { bottom: 16px; right: 16px; left: 16px; max-width: none; }
  .kc-role-picker-grid { grid-template-columns: 1fr; gap: 10px; }
  .kc-role-picker-card { flex-direction: row; padding: 16px; justify-content: flex-start; gap: 16px; }
  .kc-role-picker-icon { font-size: 28px; }
  .kc-tip-amounts { grid-template-columns: repeat(2, 1fr); }
  .kc-notif-panel-box { right: 8px; left: 8px; width: auto; top: 56px; }
  .kc-profile-modal-grid { grid-template-columns: 1fr; }
  .kc-referral-code { font-size: 22px; }
}

/* ── DRIVER PHOTO & VEHICLE INFO ────────────────────────── */
.kc-driver-photo {
  width: 52px; height: 52px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  border: 2px solid var(--gray-200);
}
.kc-vehicle-info { font-size: 12px; color: var(--gray-500); margin-top: 3px; }
.kc-vehicle-badge {
  display: inline-block; margin-top: 5px;
  background: var(--ink); color: var(--white);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; padding: 3px 10px;
  border-radius: var(--radius-xs);
}

/* ── FEATURED TILE WITH IMAGE ────────────────────────────── */
.kc-featured-tile-img { position: relative; overflow: hidden; min-height: 140px; }
.kc-featured-tile-overlay {
  position: relative; z-index: 1;
  background: rgba(0,0,0,0.55);
  border-radius: 12px;
  padding: 12px 10px; text-align: left; height: 100%;
}
.kc-featured-tile-img .kc-featured-name { color: var(--white); }
.kc-featured-tile-img .kc-featured-addr { color: rgba(255,255,255,0.7); }
.kc-featured-tile:not(.kc-featured-tile-img) .kc-featured-tile-overlay { background: none; padding: 0; }

/* ── CLICKABLE NAME LINK ─────────────────────────────────── */
.kc-name-link {
  background: none; border: none; padding: 0;
  font-size: 14px; font-weight: 700; color: var(--purple-700);
  cursor: pointer; font-family: inherit;
  text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: transparent; transition: text-decoration-color 0.15s;
}
.kc-name-link:hover { text-decoration-color: var(--purple-500); }

/* ── PENDING NOTICE BANNER ───────────────────────────────── */
.kc-pending-notice {
  background: var(--gold-50); border: 1.5px solid var(--gold-100);
  border-radius: var(--radius-sm);
  padding: 13px 16px; font-size: 13px; font-weight: 600; color: var(--gold-700);
  margin-bottom: 16px; display: flex; align-items: center; gap: 10px;
}
.kc-pending-notice::before { content: '⏳'; font-size: 16px; }

/* ── VEHICLE FORM ────────────────────────────────────────── */
.kc-vehicle-form {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); padding: 22px;
  margin-bottom: 16px; box-shadow: var(--shadow-xs);
}

/* ── PROFILE REQUEST CARDS ──────────────────────────────── */
.kc-profile-req-card {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 20px; border-bottom: 1px solid var(--gray-100);
}
.kc-profile-req-card:last-child { border-bottom: none; }
.kc-profile-req-left { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.kc-profile-req-photo {
  width: 48px; height: 48px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0; border: 2px solid var(--gray-200);
}

/* ── FARE SETTINGS ───────────────────────────────────────── */
#fare-fields .kc-form-label { margin-top: 0; }

/* ── ACTION BUTTON ───────────────────────────────────────── */
.kc-action-btn {
  padding: 7px 15px; background: var(--gray-100);
  border: none; border-radius: var(--radius-full);
  font-size: 12px; font-weight: 700; color: var(--gray-700);
  cursor: pointer; font-family: inherit; transition: all 0.15s;
}
.kc-action-btn:hover { background: var(--ink); color: var(--white); box-shadow: 0 4px 12px rgba(0,0,0,0.18); }

/* ── RESPONSIVE additions ────────────────────────────────── */
@media (max-width: 600px) {
  #fare-fields { grid-template-columns: 1fr; }
  .kc-profile-req-card { flex-direction: column; align-items: flex-start; gap: 12px; }
  .kc-profile-req-card > div:last-child { align-self: flex-end; }
}

/* ── HELLO TEXT (driver) ─────────────────────────────────── */
.kc-hello-text {
  font-family: 'Fraunces', serif;
  font-size: 23px; font-weight: 500;
  color: var(--ink); letter-spacing: -0.03em;
}

/* ── FULL PROFILE MODAL ──────────────────────────────────── */
.kc-profile-full-modal {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.55); display: flex;
  align-items: flex-end; justify-content: center;
}
.kc-profile-full-modal.hidden { display: none; }
.kc-profile-full-sheet {
  background: var(--white); border-radius: 20px 20px 0 0;
  width: 100%; max-width: 600px; max-height: 92dvh;
  display: flex; flex-direction: column; overflow: hidden;
}
.kc-profile-modal-header {
  display: flex; align-items: center; gap: 14px;
  padding: 20px 20px 0; flex-shrink: 0;
}
.kc-profile-modal-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  object-fit: cover; border: 3px solid var(--gray-100);
  background: var(--gray-100); flex-shrink: 0;
}
.kc-profile-modal-name { font-size: 18px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.kc-profile-modal-role { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.kc-profile-modal-close {
  margin-left: auto; background: var(--gray-100); border: none;
  border-radius: 50%; width: 36px; height: 36px;
  font-size: 18px; cursor: pointer; color: var(--gray-600);
  display: flex; align-items: center; justify-content: center;
}

/* Tabs */
.kc-profile-tabs {
  display: flex; gap: 0; padding: 16px 20px 0;
  border-bottom: 1px solid var(--gray-100); flex-shrink: 0;
}
.kc-profile-tab {
  padding: 8px 16px; font-size: 13px; font-weight: 600;
  color: var(--gray-500); border: none; background: none;
  cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -1px; font-family: inherit;
  transition: color 0.15s, border-color 0.15s;
}
.kc-profile-tab.active { color: var(--purple-600); border-bottom-color: var(--purple-600); }
.kc-profile-tab-panel { display: none; }
.kc-profile-tab-panel.active { display: block; }
.kc-profile-modal-body { flex: 1; overflow-y: auto; padding: 20px; }

/* Info rows */
.kc-info-row {
  display: flex; align-items: baseline; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid var(--gray-100);
  font-size: 14px;
}
.kc-info-row:last-child { border-bottom: none; }
.kc-info-label { color: var(--gray-500); font-size: 12px; font-weight: 600; min-width: 130px; flex-shrink: 0; }
.kc-info-value { color: var(--ink); font-weight: 500; flex: 1; word-break: break-word; }

/* Stat chips row */
.kc-stat-chips { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.kc-stat-chip {
  background: var(--gray-50); border-radius: 12px;
  padding: 10px 16px; text-align: center; flex: 1; min-width: 80px;
}
.kc-stat-chip-val { font-size: 20px; font-weight: 800; color: var(--ink); }
.kc-stat-chip-label { font-size: 10px; font-weight: 600; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 2px; }

/* Compliance badges */
.kc-compliance-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 700; letter-spacing: 0.03em;
}
.kc-badge-approved { background: #dcfce7; color: #15803d; }
.kc-badge-pending { background: #fef9c3; color: #854d0e; }
.kc-badge-expiring { background: #ffedd5; color: #c2410c; }
.kc-badge-expired { background: #fee2e2; color: #b91c1c; }
.kc-badge-suspended { background: #fee2e2; color: #b91c1c; }
.kc-badge-active { background: #dcfce7; color: #15803d; }
.kc-badge-flagged { background: #fef9c3; color: #854d0e; }
.kc-badge-offline { background: var(--gray-100); color: var(--gray-600); }

/* Onboarding tracker */
.kc-onboarding-tracker { display: flex; flex-direction: column; gap: 1px; margin: 12px 0; }
.kc-onboarding-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; background: var(--gray-50);
  border-radius: 10px; margin-bottom: 6px;
}
.kc-onboarding-icon {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.kc-onboarding-status-approved .kc-onboarding-icon { background: #dcfce7; }
.kc-onboarding-status-submitted .kc-onboarding-icon { background: #dbeafe; }
.kc-onboarding-status-pending .kc-onboarding-icon { background: var(--gray-100); }
.kc-onboarding-status-rejected .kc-onboarding-icon { background: #fee2e2; }
.kc-onboarding-label { font-size: 13px; font-weight: 600; color: var(--ink); flex: 1; }
.kc-onboarding-sub { font-size: 11px; color: var(--gray-500); margin-top: 2px; }
.kc-onboarding-badge {
  font-size: 10px; font-weight: 700; padding: 3px 9px;
  border-radius: var(--radius-full);
}
.kc-onboarding-status-approved .kc-onboarding-badge { background: #dcfce7; color: #15803d; }
.kc-onboarding-status-submitted .kc-onboarding-badge { background: #dbeafe; color: #1d4ed8; }
.kc-onboarding-status-pending .kc-onboarding-badge { background: var(--gray-100); color: var(--gray-600); }
.kc-onboarding-status-rejected .kc-onboarding-badge { background: #fee2e2; color: #b91c1c; }

/* Progress bar */
.kc-progress-bar-wrap { background: var(--gray-100); border-radius: var(--radius-full); height: 6px; margin: 8px 0 4px; overflow: hidden; }
.kc-progress-bar { height: 100%; border-radius: var(--radius-full); background: var(--purple-600); transition: width 0.4s ease; }

/* Compliance alert banner */
.kc-compliance-alert {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: 12px; margin-bottom: 10px;
  font-size: 13px; font-weight: 600;
}
.kc-compliance-alert-warn { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.kc-compliance-alert-crit { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

/* Ride history mini cards */
.kc-ride-mini {
  padding: 12px 0; border-bottom: 1px solid var(--gray-100);
  font-size: 13px;
}
.kc-ride-mini:last-child { border-bottom: none; }
.kc-ride-mini-route { font-weight: 600; color: var(--ink); margin-bottom: 3px; }
.kc-ride-mini-meta { color: var(--gray-500); font-size: 12px; display: flex; gap: 10px; flex-wrap: wrap; }

/* Doc cards (admin onboarding editor) */
.kc-doc-card {
  background: var(--gray-50); border-radius: 12px;
  padding: 14px 16px; margin-bottom: 10px;
}
.kc-doc-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.kc-doc-card-title { font-size: 13px; font-weight: 700; color: var(--ink); }
.kc-doc-card select, .kc-doc-card input {
  width: 100%; padding: 8px 10px; border: 1px solid var(--gray-200);
  border-radius: 8px; font-size: 13px; font-family: inherit;
  background: var(--white); color: var(--ink); margin-top: 6px;
}
.kc-doc-save-btn {
  margin-top: 10px; padding: 8px 18px;
  background: var(--purple-600); color: var(--white);
  border: none; border-radius: var(--radius-full);
  font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit;
}
.kc-doc-save-btn:hover { opacity: 0.9; }

/* Notes textarea */
.kc-admin-notes-area {
  width: 100%; padding: 10px 12px; border: 1px solid var(--gray-200);
  border-radius: 10px; font-size: 13px; font-family: inherit;
  resize: vertical; min-height: 80px; color: var(--ink);
}
.kc-save-notes-btn {
  margin-top: 8px; padding: 8px 18px;
  background: var(--ink); color: var(--white);
  border: none; border-radius: var(--radius-full);
  font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit;
}

/* Suspend/unsuspend button */
.kc-suspend-btn {
  width: 100%; padding: 12px; margin-top: 10px;
  border: none; border-radius: 12px; font-size: 14px;
  font-weight: 700; cursor: pointer; font-family: inherit;
  transition: opacity 0.15s;
}
.kc-suspend-btn.is-suspended { background: #dcfce7; color: #15803d; }
.kc-suspend-btn.is-active { background: #fee2e2; color: #b91c1c; }
.kc-suspend-btn:hover { opacity: 0.85; }

/* Driver onboarding widget (driver vehicle screen) */
.kc-driver-onboarding-widget {
  background: var(--white); border-radius: 16px;
  padding: 16px 18px; margin-bottom: 14px;
  border: 1px solid var(--gray-100);
}
.kc-driver-onboarding-widget h3 { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 10px; }

/* ── FINANCIAL DASHBOARD ─────────────────────────────────── */

/* Metric cards grid */
.kc-fin-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px; margin-bottom: 20px;
}
.kc-fin-card {
  background: var(--white); border-radius: 16px;
  padding: 16px 18px; border: 1px solid var(--gray-100);
  position: relative; overflow: hidden;
}
.kc-fin-card::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 4px; height: 100%; border-radius: 16px 0 0 16px;
  background: var(--gray-200);
}
.kc-fin-card.green::before  { background: #22c55e; }
.kc-fin-card.blue::before   { background: #3b82f6; }
.kc-fin-card.gold::before   { background: var(--gold-500); }
.kc-fin-card.purple::before { background: var(--purple-600); }
.kc-fin-card.red::before    { background: #ef4444; }
.kc-fin-card.orange::before { background: #f97316; }
.kc-fin-card-label { font-size: 11px; font-weight: 700; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }
.kc-fin-card-val   { font-size: 22px; font-weight: 800; color: var(--ink); letter-spacing: -0.03em; line-height: 1; }
.kc-fin-card-sub   { font-size: 11px; color: var(--gray-500); margin-top: 4px; }

/* Transaction/payout table */
.kc-fin-table-wrap { overflow-x: auto; }
.kc-fin-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.kc-fin-table th {
  text-align: left; padding: 10px 14px;
  font-size: 11px; font-weight: 700; color: var(--gray-500);
  text-transform: uppercase; letter-spacing: 0.04em;
  border-bottom: 2px solid var(--gray-100); white-space: nowrap;
}
.kc-fin-table td {
  padding: 11px 14px; border-bottom: 1px solid var(--gray-100);
  vertical-align: middle; color: var(--ink);
}
.kc-fin-table tr:last-child td { border-bottom: none; }
.kc-fin-table tr:hover td { background: var(--gray-50); }
.kc-fin-table .mono { font-family: 'SF Mono', 'Fira Code', monospace; font-size: 12px; }
.kc-fin-table .amount { font-weight: 700; }
.kc-fin-table .muted  { color: var(--gray-500); }

/* Payment status badges */
.kc-pay-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 700; letter-spacing: 0.02em; white-space: nowrap;
}
.kc-pay-paid       { background: #dcfce7; color: #15803d; }
.kc-pay-pending    { background: #fef9c3; color: #854d0e; }
.kc-pay-processing { background: #dbeafe; color: #1d4ed8; }
.kc-pay-failed     { background: #fee2e2; color: #b91c1c; }
.kc-pay-refunded   { background: #f3e8ff; color: #7c3aed; }
.kc-pay-disputed   { background: #ffedd5; color: #c2410c; }
.kc-pay-paused     { background: var(--gray-100); color: var(--gray-600); }

/* Filter toolbar */
.kc-fin-filters {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 14px 20px; border-bottom: 1px solid var(--gray-100);
  align-items: center;
}
.kc-fin-filter-select {
  padding: 7px 10px; border: 1px solid var(--gray-200);
  border-radius: 8px; font-size: 12px; font-weight: 600;
  font-family: inherit; color: var(--ink); background: var(--white);
  cursor: pointer;
}
.kc-fin-filter-input {
  padding: 7px 12px; border: 1px solid var(--gray-200);
  border-radius: 8px; font-size: 12px; font-family: inherit;
  color: var(--ink); background: var(--white); min-width: 140px;
}
.kc-fin-filter-btn {
  padding: 7px 14px; background: var(--ink); color: var(--white);
  border: none; border-radius: 8px; font-size: 12px;
  font-weight: 700; cursor: pointer; font-family: inherit;
}
.kc-fin-export-btn {
  padding: 7px 14px; background: var(--gray-100); color: var(--gray-700);
  border: none; border-radius: 8px; font-size: 12px;
  font-weight: 700; cursor: pointer; font-family: inherit; margin-left: auto;
}
.kc-fin-export-btn:hover { background: var(--gray-200); }

/* Dashboard filter bar */
.kc-dash-filter-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 0; margin-bottom: 16px;
}
.kc-dash-presets { display: flex; gap: 6px; flex-wrap: wrap; }
.dash-preset-btn {
  padding: 6px 14px; background: var(--white); color: var(--gray-600);
  border: 1.5px solid var(--gray-200); border-radius: 20px;
  font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit;
  transition: all 0.15s;
}
.dash-preset-btn:hover { border-color: var(--ink); color: var(--ink); }
.dash-preset-btn.active { background: var(--ink); color: var(--white); border-color: var(--ink); }
.kc-dash-custom { display: flex; gap: 8px; align-items: center; }
.kc-dash-exports { display: flex; gap: 8px; margin-left: auto; }
.kc-hours-bar-wrap { padding: 8px 20px 16px; }

/* Trend chart (SVG sparkline) */
.kc-trend-chart {
  width: 100%; height: 80px; overflow: visible;
}
.kc-trend-area { fill: url(#trendGrad); opacity: 0.18; }
.kc-trend-line { fill: none; stroke: var(--purple-600); stroke-width: 2; }
.kc-trend-dot  { fill: var(--purple-600); }

/* Revenue chart container */
.kc-chart-wrap {
  padding: 16px 20px;
}
.kc-chart-labels {
  display: flex; justify-content: space-between;
  font-size: 10px; color: var(--gray-400); margin-top: 4px;
}

/* Driver finance widget (driver screen) */
.kc-driver-finance-widget {
  background: var(--white); border-radius: 16px;
  padding: 16px 18px; margin-bottom: 14px;
  border: 1px solid var(--gray-100);
}
.kc-driver-finance-widget h3 { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 12px; }
.kc-balance-row {
  display: flex; justify-content: space-between;
  align-items: baseline; padding: 8px 0;
  border-bottom: 1px solid var(--gray-100); font-size: 13px;
}
.kc-balance-row:last-child { border-bottom: none; }
.kc-balance-label { color: var(--gray-500); font-size: 12px; font-weight: 600; }
.kc-balance-val   { font-weight: 700; color: var(--ink); }
.kc-balance-pending { color: #854d0e; }

/* Payout method form */
.kc-payout-method-form {
  background: var(--gray-50); border-radius: 12px;
  padding: 14px 16px; margin-top: 12px;
}
.kc-payout-method-form label { font-size: 11px; font-weight: 700; color: var(--gray-500); display: block; margin: 10px 0 4px; }
.kc-payout-method-form label:first-child { margin-top: 0; }
.kc-payout-method-form input,
.kc-payout-method-form select {
  width: 100%; padding: 9px 12px; border: 1px solid var(--gray-200);
  border-radius: 8px; font-size: 13px; font-family: inherit;
  background: var(--white); color: var(--ink);
}
.kc-payout-save-btn {
  margin-top: 12px; padding: 10px 20px; background: var(--purple-600);
  color: var(--white); border: none; border-radius: var(--radius-full);
  font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit; width: 100%;
}

/* Financial settings grid */
.kc-fin-settings-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 20px;
}
@media (max-width: 600px) {
  .kc-fin-metrics { grid-template-columns: 1fr 1fr; }
  .kc-fin-settings-grid { grid-template-columns: 1fr; }
  .kc-fin-filters { flex-direction: column; align-items: stretch; }
  .kc-fin-export-btn { margin-left: 0; }
}

/* ── STRIPE PAYMENT MODAL ────────────────────────────────── */
.kc-payment-modal {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,0.6);
  display: flex; align-items: flex-end; justify-content: center;
}
.kc-payment-modal.hidden { display: none; }
.kc-payment-sheet {
  background: var(--white); border-radius: 24px 24px 0 0;
  width: 100%; max-width: 480px; overflow: hidden;
  animation: slideUpSheet 0.3s cubic-bezier(0.32,0.72,0,1);
}
@keyframes slideUpSheet {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.kc-payment-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 0; font-size: 14px; font-weight: 700; color: var(--ink);
}
.kc-payment-brand {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 800; color: var(--ink);
}
.kc-payment-skip {
  background: var(--gray-100); border: none; border-radius: var(--radius-full);
  padding: 6px 14px; font-size: 12px; font-weight: 700;
  color: var(--gray-600); cursor: pointer; font-family: inherit;
}
.kc-payment-skip:hover { background: var(--gray-200); }

.kc-payment-amount-wrap {
  text-align: center; padding: 28px 24px 20px;
  border-bottom: 1px solid var(--gray-100);
}
.kc-payment-label { font-size: 12px; font-weight: 600; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.kc-payment-amount { font-size: 42px; font-weight: 800; color: var(--ink); letter-spacing: -0.04em; line-height: 1; }
.kc-payment-ride-info { font-size: 12px; color: var(--gray-500); margin-top: 6px; }

.kc-payment-section-label { font-size: 11px; font-weight: 700; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.05em; padding: 20px 24px 10px; }

/* Stripe Elements container */
.kc-stripe-element {
  margin: 0 24px;
  padding: 14px 16px;
  border: 1.5px solid var(--gray-200);
  border-radius: 12px;
  background: var(--gray-50);
  transition: border-color 0.15s;
}
.kc-stripe-element.StripeElement--focus { border-color: var(--purple-600); background: var(--white); }
.kc-stripe-element.StripeElement--invalid { border-color: #ef4444; }

.kc-stripe-errors {
  margin: 8px 24px 0;
  padding: 10px 14px;
  background: #fef2f2;
  border-radius: 8px;
  font-size: 13px; font-weight: 600; color: #b91c1c;
}

.kc-payment-test-hint {
  display: flex; align-items: center; gap: 6px;
  margin: 14px 24px 0;
  padding: 10px 14px;
  background: #f0fdf4; border-radius: 8px;
  font-size: 12px; color: #15803d;
}

.kc-payment-btn {
  display: block; width: calc(100% - 48px); margin: 20px 24px;
  padding: 16px; background: var(--ink); color: var(--white);
  border: none; border-radius: 14px; font-size: 16px; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: opacity 0.15s;
}
.kc-payment-btn:hover { opacity: 0.9; }
.kc-payment-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Processing state */
.kc-payment-processing { text-align: center; padding: 40px 24px 48px; }
.kc-payment-spinner {
  width: 40px; height: 40px; margin: 0 auto 16px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--purple-600);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.kc-payment-processing-text { font-size: 15px; font-weight: 600; color: var(--gray-600); }

/* Success / failed result states */
.kc-payment-result { text-align: center; padding: 32px 24px 40px; }
.kc-payment-result-icon {
  width: 64px; height: 64px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 700; margin: 0 auto 16px;
}
.kc-payment-success .kc-payment-result-icon { background: #dcfce7; color: #15803d; }
.kc-payment-failed  .kc-payment-result-icon { background: #fee2e2; color: #b91c1c; }
.kc-payment-result-title { font-size: 22px; font-weight: 800; color: var(--ink); margin-bottom: 6px; }
.kc-payment-result-sub   { font-size: 14px; color: var(--gray-500); margin-bottom: 24px; }
.kc-payment-skip-link {
  display: block; margin-top: 12px; background: none; border: none;
  font-size: 13px; color: var(--gray-500); cursor: pointer; font-family: inherit;
  text-decoration: underline; text-underline-offset: 2px;
}

/* Stripe Connect button */
.kc-stripe-connect-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; margin-top: 10px; padding: 13px 18px;
  background: #635bff; color: white;
  border: none; border-radius: 12px; font-size: 14px; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: opacity 0.15s;
}
.kc-stripe-connect-btn:hover { opacity: 0.9; }
.kc-stripe-connect-btn.connected { background: #dcfce7; color: #15803d; }
.kc-stripe-connect-btn.connected svg { stroke: #15803d; }

/* ── Vehicle Type Picker ────────────────────────────────────────────────────── */
.kc-vehicle-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 10px;
  margin-bottom: 4px;
}
.kc-vt-card {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px; padding: 12px 8px 10px;
  background: var(--gray-50); border: 2px solid var(--gray-200);
  border-radius: 14px; cursor: pointer; font-family: inherit;
  transition: border-color 0.15s, background 0.15s;
  text-align: center;
}
.kc-vt-card:hover { border-color: var(--purple-300); background: var(--purple-50); }
.kc-vt-card.selected { border-color: var(--purple-600); background: var(--purple-50); }
.kc-vt-icon  { font-size: 26px; line-height: 1; }
.kc-vt-name  { font-size: 11px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.kc-vt-cap   { font-size: 10px; color: var(--gray-500); }
.kc-vt-mult  { font-size: 10px; color: var(--purple-700); font-weight: 600; }

/* ── Scheduled Ride Card (customer) ─────────────────────────────────────────── */
.kc-scheduled-card {
  display: flex; align-items: center; gap: 12px;
  background: #fefce8; border: 1.5px solid #fef08a;
  border-radius: 14px; padding: 12px 14px; margin-bottom: 10px;
}
.kc-scheduled-icon { font-size: 22px; flex-shrink: 0; }

/* ── Photo Upload Button ─────────────────────────────────────────────────────── */
.kc-upload-photo-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; background: var(--purple-50);
  border: 1.5px solid var(--purple-200); border-radius: 10px;
  font-size: 13px; font-weight: 600; color: var(--purple-700);
  cursor: pointer; font-family: inherit; transition: background 0.15s;
}
.kc-upload-photo-btn:hover { background: var(--purple-100); }

/* ── Navigation Overlays ─────────────────────────────────────────────────────── */

/* Turn instruction card */
.kc-nav-card {
  position: absolute; top: 16px; left: 12px; right: 12px;
  background: rgba(20, 16, 60, 0.92); backdrop-filter: blur(8px);
  border-radius: 18px; padding: 14px 16px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
  z-index: 20;
}
.kc-nav-arrow-wrap {
  flex-shrink: 0; width: 48px; height: 48px;
  background: rgba(255,255,255,0.12); border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.kc-nav-arrow-wrap svg { width: 32px; height: 32px; }
.kc-nav-turn-info, .kc-nav-card-text { flex: 1; min-width: 0; }
.kc-nav-turn-dist {
  font-size: 13px; font-weight: 700; color: #a5b4fc; letter-spacing: 0.02em; line-height: 1;
}
.kc-nav-turn-text {
  font-size: 15px; font-weight: 700; color: #fff;
  margin-top: 3px; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.kc-nav-voice-btn {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,0.12); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #fff; transition: background 0.15s;
}
.kc-nav-voice-btn:hover { background: rgba(255,255,255,0.22); }
.kc-nav-voice-btn.kc-nav-voice-off { background: rgba(255,80,80,0.25); color: #f87171; }

/* ETA bar */
.kc-nav-eta-bar {
  position: absolute; top: 102px; left: 12px; right: 12px;
  background: rgba(255,255,255,0.95); backdrop-filter: blur(6px);
  border-radius: 12px; padding: 8px 16px;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
  z-index: 20;
}
.kc-nav-eta-item, .kc-nav-eta-cell { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.kc-nav-eta-val { font-size: 15px; font-weight: 800; color: var(--ink); line-height: 1; }
.kc-nav-eta-lbl { font-size: 10px; color: var(--gray-500); font-weight: 500; }
.kc-nav-eta-sep, .kc-nav-eta-divider { width: 1px; height: 28px; background: var(--gray-200); }
.kc-nav-phase-cell { flex-direction: row; align-items: center; gap: 5px; }

/* Phase label inside ETA bar */
.kc-nav-phase-wrap { display: flex; align-items: center; gap: 5px; }
.kc-nav-phase-dot  { width: 8px; height: 8px; border-radius: 50%; }
.kc-nav-phase-lbl  { font-size: 11px; font-weight: 700; color: var(--ink-mute); }

/* Sheet handle pill */
.kc-nav-sheet-handle {
  width: 36px; height: 4px; border-radius: 2px;
  background: var(--gray-200); margin: 0 auto 12px;
}
/* Rider avatar circle */
.kc-nav-rider-avatar {
  width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--gray-200);
  background: var(--gray-100); display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0; margin-right: 12px; overflow: hidden;
}

/* Bottom action sheet */
.kc-nav-bottom-sheet {
  position: absolute; bottom: 64px; left: 0; right: 0;
  background: #fff; border-radius: 20px 20px 0 0;
  padding: 16px 16px 12px;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.15);
  z-index: 20;
}
.kc-nav-rider-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.kc-nav-rider-name { font-size: 16px; font-weight: 800; color: var(--ink); }
.kc-nav-route-text {
  font-size: 12px; color: var(--gray-500); margin-bottom: 10px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.kc-nav-special-needs {
  font-size: 12px; color: #b45309; background: #fef3c7;
  border-radius: 6px; padding: 4px 8px; margin-bottom: 10px;
}
.kc-nav-action-row { display: flex; flex-direction: column; gap: 8px; }

/* Nav action buttons */
.kc-nav-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 16px; border-radius: 14px; border: none; cursor: pointer;
  font-family: inherit; font-size: 14px; font-weight: 700;
  transition: opacity 0.15s, transform 0.1s;
}
.kc-nav-btn:active { transform: scale(0.97); }
.kc-nav-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.kc-nav-btn-arrived  { background: #2A2466; color: #fff; }
.kc-nav-btn-arrived:hover  { background: #1e1a50; }
.kc-nav-btn-start    { background: #4f46e5; color: #fff; }
.kc-nav-btn-start:hover    { background: #4338ca; }
.kc-nav-btn-complete { background: #10b981; color: #fff; }
.kc-nav-btn-complete:hover { background: #059669; }
.kc-nav-btn-chat     { background: var(--gray-100); color: var(--ink); }
.kc-nav-btn-chat:hover     { background: var(--gray-200); }

/* Driver dot (moving marker on nav map) */
.kc-nav-driver-dot {
  width: 20px; height: 20px; border-radius: 50%;
  background: #4f46e5;
  border: 3px solid #fff;
  box-shadow: 0 0 0 3px rgba(79,70,229,0.4), 0 2px 8px rgba(0,0,0,0.3);
}

/* Pickup / drop markers */
.kc-nav-pickup-marker,
.kc-nav-drop-marker {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.kc-nav-pickup-marker { background: #f59e0b; }
.kc-nav-drop-marker   { background: #4f46e5; }

/* GPS error banner */
.kc-nav-gps-err {
  position: absolute; top: 0; left: 0; right: 0;
  background: #dc2626; color: #fff;
  padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  z-index: 30;
  font-size: 13px; font-weight: 600;
}
.kc-nav-gps-err-btn {
  background: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.4);
  color: #fff; border-radius: 8px; padding: 6px 12px;
  font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit;
  white-space: nowrap;
}

/* Rerouting banner */
.kc-nav-rerouting {
  position: absolute; top: 0; left: 0; right: 0;
  background: #2A2466; color: #fff;
  padding: 12px 16px;
  display: flex; align-items: center; gap: 10px;
  z-index: 29; font-size: 13px; font-weight: 600;
}
.kc-nav-rerouting-spinner {
  width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff; border-radius: 50%;
  animation: kc-spin 0.7s linear infinite; flex-shrink: 0;
}
@keyframes kc-spin { to { transform: rotate(360deg); } }

/* Recenter button */
.kc-nav-recenter-btn {
  position: absolute; right: 14px; bottom: 220px;
  width: 44px; height: 44px; border-radius: 50%;
  background: #fff; border: none; cursor: pointer;
  box-shadow: 0 2px 12px rgba(0,0,0,0.22);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; transition: transform 0.15s;
  z-index: 22;
}
.kc-nav-recenter-btn:active { transform: scale(0.92); }

/* No-ride empty state */
.kc-nav-no-ride {
  position: absolute; inset: 0; bottom: 64px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; z-index: 15; pointer-events: none;
}
.kc-nav-no-ride-card {
  background: rgba(255,255,255,0.92); backdrop-filter: blur(8px);
  border-radius: 20px; padding: 28px 32px;
  text-align: center; box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.kc-nav-no-ride-icon  { font-size: 48px; margin-bottom: 8px; }
.kc-nav-no-ride-title { font-size: 16px; font-weight: 800; color: var(--ink); }
.kc-nav-no-ride-sub   { font-size: 13px; color: var(--gray-500); margin-top: 4px; }

/* ============================================================
   MOBILE RESPONSIVE — Safe Areas, Touch, Responsive Layout
   ============================================================ */

/* ── VIEWPORT & BASE FIXES ───────────────────────────────── */
html {
  height: -webkit-fill-available;
  scroll-behavior: smooth;
}
body {
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}
.view { min-height: 100dvh; }
.kc-app-shell {
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  max-width: 480px;
}

/* ── SAFE AREA: AUTH VIEW ────────────────────────────────── */
#auth-view {
  padding-top: max(32px, env(safe-area-inset-top, 32px));
  padding-bottom: max(32px, env(safe-area-inset-bottom, 32px));
  padding-left: max(20px, env(safe-area-inset-left, 20px));
  padding-right: max(20px, env(safe-area-inset-right, 20px));
}

/* ── SAFE AREA: TABBAR (iPhone home indicator / Dynamic Island) */
.kc-tabbar {
  padding-bottom: max(20px, calc(6px + env(safe-area-inset-bottom, 20px)));
}

/* ── SAFE AREA: SCROLL CONTENT BOTTOM ───────────────────── */
.kc-screen-scroll {
  padding-bottom: max(108px, calc(80px + env(safe-area-inset-bottom, 28px)));
  -webkit-overflow-scrolling: touch;
}
.kc-trip-sheet {
  padding-bottom: max(100px, calc(72px + env(safe-area-inset-bottom, 28px)));
  -webkit-overflow-scrolling: touch;
}
.kc-driver-home-wrap {
  padding-bottom: max(108px, calc(80px + env(safe-area-inset-bottom, 28px)));
}

/* ── SAFE AREA: TOAST ────────────────────────────────────── */
#kc-toast {
  left: max(16px, env(safe-area-inset-left, 16px));
  right: max(16px, env(safe-area-inset-right, 16px));
  bottom: max(24px, calc(8px + env(safe-area-inset-bottom, 16px)));
  max-width: calc(100vw - 32px);
  width: auto;
}

/* ── SAFE AREA: NAVIGATION OVERLAYS ─────────────────────── */
.kc-nav-card {
  top: max(16px, calc(env(safe-area-inset-top, 0px) + 10px));
  left: max(12px, calc(env(safe-area-inset-left, 0px) + 8px));
  right: max(12px, calc(env(safe-area-inset-right, 0px) + 8px));
}
.kc-nav-eta-bar {
  top: max(102px, calc(env(safe-area-inset-top, 0px) + 86px));
  left: max(12px, calc(env(safe-area-inset-left, 0px) + 8px));
  right: max(12px, calc(env(safe-area-inset-right, 0px) + 8px));
}
.kc-nav-gps-err {
  padding-top: max(14px, calc(env(safe-area-inset-top, 0px) + 6px));
}
.kc-nav-rerouting {
  padding-top: max(12px, calc(env(safe-area-inset-top, 0px) + 4px));
}
.kc-nav-bottom-sheet {
  bottom: max(64px, calc(60px + env(safe-area-inset-bottom, 4px)));
  padding-bottom: max(12px, calc(6px + env(safe-area-inset-bottom, 6px)));
}
.kc-nav-recenter-btn {
  right: max(14px, calc(env(safe-area-inset-right, 0px) + 10px));
  bottom: max(220px, calc(210px + env(safe-area-inset-bottom, 10px)));
}
#d-drive-map {
  bottom: max(64px, calc(60px + env(safe-area-inset-bottom, 4px))) !important;
}
.kc-nav-no-ride {
  bottom: max(64px, calc(60px + env(safe-area-inset-bottom, 4px)));
}

/* ── PREVENT iOS INPUT ZOOM (inputs must be ≥ 16px) ─────── */
.kc-input, select, input[type="text"], input[type="email"],
input[type="password"], input[type="tel"], input[type="number"],
input[type="time"], input[type="datetime-local"], textarea {
  font-size: 16px !important;
}
/* Keep labels at their existing smaller size */
.kc-form-label { font-size: 11px !important; }

/* ── TOUCH TARGETS: minimum 44×44px ─────────────────────── */
.kc-tab          { min-height: 44px; padding: 8px 4px; }
.kc-back-btn     { min-width: 44px; min-height: 44px; }
.kc-notif-bell   { min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; }
.kc-cta          { min-height: 52px; }
.kc-req-accept   { min-height: 50px; padding: 14px; }
.kc-req-decline  { min-height: 50px; padding: 14px; }
.kc-nav-btn      { min-height: 52px; padding: 14px 18px; }
.kc-online-toggle { min-height: 44px; padding: 10px 20px; }
.kc-need-chip    { min-height: 40px; padding: 10px 16px; display: inline-flex; align-items: center; }
.kc-purpose      { min-height: 72px; padding: 14px 6px; }
.kc-nav-voice-btn { min-width: 44px; min-height: 44px; }
.kc-upcoming-btn { min-height: 40px; padding: 10px 18px; }

/* ── SMOOTH SCROLLING CONTAINERS ─────────────────────────── */
.kc-admin-side, .kc-admin-main, .kc-featured-scroll {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.kc-admin-side::-webkit-scrollbar,
.kc-admin-main::-webkit-scrollbar,
.kc-featured-scroll::-webkit-scrollbar { display: none; }

/* ── PREVENT HORIZONTAL OVERFLOW ON MOBILE ───────────────── */
.kc-app-shell, .kc-screen-full, .kc-screen-scroll { max-width: 100%; overflow-x: hidden; }
.kc-form-row { gap: 10px; }

/* ── ADMIN: MOBILE HAMBURGER TOPBAR ─────────────────────── */
.kc-admin-mobile-topbar {
  display: none;
  align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
  position: sticky; top: 0; z-index: 50;
  padding-top: max(12px, calc(env(safe-area-inset-top, 0px) + 12px));
}
.kc-admin-hamburger {
  display: flex; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer;
  padding: 8px; min-width: 44px; min-height: 44px; justify-content: center; align-items: center;
}
.kc-admin-hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--ink); border-radius: 2px; transition: all 0.2s;
}
.kc-admin-close-btn { display: none; }
.kc-admin-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  z-index: 199; backdrop-filter: blur(2px);
}
.kc-admin-refresh-desktop { display: inline-flex; }

/* ── ADMIN: RESPONSIVE LAYOUT ────────────────────────────── */
@media (max-width: 768px) {
  .kc-admin-wrap { grid-template-columns: 1fr; }
  .kc-admin-side {
    position: fixed; top: 0; left: -260px; bottom: 0;
    width: 260px; z-index: 200;
    height: 100dvh; overflow-y: auto;
    transition: left 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    padding-top: max(24px, calc(env(safe-area-inset-top, 0px) + 16px));
    padding-bottom: max(24px, calc(env(safe-area-inset-bottom, 0px) + 16px));
  }
  .kc-admin-side.open { left: 0; }
  .kc-admin-close-btn {
    display: flex; align-items: center; justify-content: center;
    margin-left: auto; background: rgba(255,255,255,0.12);
    border: none; color: rgba(255,255,255,0.7);
    font-size: 16px; cursor: pointer;
    width: 32px; height: 32px; border-radius: 50%;
    font-family: inherit; flex-shrink: 0;
  }
  .kc-admin-mobile-topbar { display: flex; }
  .kc-admin-refresh-desktop { display: none; }
  .kc-admin-main { padding: 20px 16px 40px; }
  .kc-admin-header { flex-direction: column; gap: 10px; margin-bottom: 20px; }
  .kc-admin-title { font-size: 24px; }
  .kc-kpi-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; margin-bottom: 20px; }
  .kc-admin-split { grid-template-columns: 1fr; gap: 16px; }
  .kc-admin-card { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .kc-table { min-width: 640px; }
  .kc-kpi-val { font-size: 26px; }
  .kc-kpi { padding: 16px; }
  .kc-admin-brand { flex-wrap: nowrap; }
}

/* ── ROLE PICKER: RESPONSIVE ─────────────────────────────── */
@media (max-width: 380px) {
  .kc-role-picker-grid { grid-template-columns: 1fr; gap: 8px; }
  .kc-role-picker-card { flex-direction: row; padding: 14px 16px; gap: 14px; text-align: left; }
  .kc-auth-card { padding: 24px 18px; }
  .kc-auth-card h2 { font-size: 22px; }
}

/* ── BOOKING SCREEN: RESPONSIVE ──────────────────────────── */
@media (max-width: 380px) {
  .kc-purpose-grid { grid-template-columns: repeat(2, 1fr); }
  .kc-vehicle-type-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .kc-form-row { grid-template-columns: 1fr; }
  .kc-price-amount { font-size: 22px; }
}

/* ── MAP HEIGHTS: RESPONSIVE ─────────────────────────────── */
@media (max-height: 680px) {
  .kc-map-area { height: 200px; }
}
@media (min-height: 800px) {
  .kc-map-area { height: 300px; }
}

/* ── DRIVER HOME: SMALL SCREENS ──────────────────────────── */
@media (max-width: 360px) {
  .kc-driver-home-wrap { padding-left: 14px; padding-right: 14px; }
  .kc-earnings-amount { font-size: 38px; }
  .kc-earnings-hero { padding: 20px; }
  .kc-driver-stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .kc-stat-val { font-size: 20px; }
}

/* ── TABLET BREAKPOINT ───────────────────────────────────── */
@media (min-width: 600px) and (max-width: 899px) {
  .kc-app-shell { max-width: 540px; }
}
@media (min-width: 900px) {
  .kc-app-shell { max-width: 480px; }
  .kc-admin-side { left: 0; }
}

/* ── LANDSCAPE: DRIVER NAV SCREEN ────────────────────────── */
@media (max-height: 500px) and (orientation: landscape) {
  .kc-nav-bottom-sheet { bottom: max(56px, calc(52px + env(safe-area-inset-bottom, 4px))); }
  .kc-nav-card { top: max(8px, calc(env(safe-area-inset-top, 0px) + 4px)); }
  .kc-nav-eta-bar { top: max(78px, calc(env(safe-area-inset-top, 0px) + 72px)); }
  .kc-nav-card .kc-nav-turn-text { font-size: 13px; }
  .kc-nav-rider-name { font-size: 14px; }
}

/* ── ACTIVE TRIP MAP RESPONSIVE ──────────────────────────── */
#c-map { min-height: 220px; }

/* ── MODAL SAFE AREA ─────────────────────────────────────── */
.kc-modal-box {
  padding-bottom: max(40px, calc(24px + env(safe-area-inset-bottom, 16px)));
}

/* ── SECTION LABEL SPACING TIGHTENING ON SMALL SCREENS ──── */
@media (max-width: 380px) {
  .kc-section-label { margin: 16px 0 10px; }
  .kc-tile { padding: 12px; }
  .kc-tile-icon { width: 36px; height: 36px; margin-bottom: 8px; }
}

/* ── REDUCE HORIZONTAL PADDING ON VERY SMALL SCREENS ─────── */
@media (max-width: 360px) {
  .kc-screen-scroll { padding-left: 14px; padding-right: 14px; }
  .kc-screen-header { padding: 14px 16px; }
  .kc-app-header { padding: 14px 16px 12px; }
  .kc-earnings-stats { gap: 16px; }
}

/* ── GREET NAME RESPONSIVE ───────────────────────────────── */
@media (max-width: 360px) {
  .kc-greet-name { font-size: 20px; }
}

/* ── SEARCH TRIGGER RESPONSIVE ───────────────────────────── */
@media (max-width: 360px) {
  .kc-search-trigger { padding: 14px 16px; }
  .kc-search-field { font-size: 13px; }
}

/* ── BOTTOM SHEET: NAV SHEET HANDLE TOP SPACING ─────────── */
#kc-nav-bottom-sheet .kc-nav-sheet-handle { margin-bottom: 10px; }

/* ── PENDING DRIVER SCREEN SAFE AREA ─────────────────────── */
.kc-pending-wrap {
  padding-top: max(48px, calc(env(safe-area-inset-top, 0px) + 32px));
  padding-bottom: max(48px, calc(env(safe-area-inset-bottom, 0px) + 32px));
}

/* ── APPLICATION CARDS RESPONSIVE ───────────────────────── */
@media (max-width: 480px) {
  .kc-app-card { flex-wrap: wrap; gap: 10px; }
  .kc-app-actions { width: 100%; justify-content: flex-end; }
}

/* ── ADMIN TABLE: HORIZONTAL SCROLL WRAPPER ──────────────── */
.kc-table-scroll {
  width: 100%; overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

/* ── DRIVER STATS GRID TABLET ────────────────────────────── */
@media (min-width: 480px) and (max-width: 899px) {
  .kc-driver-stats-grid { grid-template-columns: repeat(4, 1fr); }
  .kc-kpi-grid { grid-template-columns: repeat(3, 1fr) !important; }
}

/* ── PREVENT text-decoration tap flicker on iOS ─────────── */
a, button { -webkit-user-select: none; user-select: none; }
input, textarea, select { -webkit-user-select: text; user-select: text; }

/* ── NOTIF PANEL SAFE AREA ───────────────────────────────── */
#kc-notif-panel {
  padding-top: max(0px, env(safe-area-inset-top, 0px));
}

/* ── DRIVER ONLINE TOGGLE RESPONSIVE ────────────────────── */
@media (max-width: 360px) {
  .kc-online-toggle { font-size: 11px; padding: 8px 14px; }
  .kc-driver-hello { gap: 8px; }
}

/* ════════════════════════════════════════════════════════════
   CHAT SYSTEM — full redesign styles
   ════════════════════════════════════════════════════════════ */

/* ── Chat header: avatar + info + ride chip ──────────────── */
.kc-chat-header-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--gray-200); display: flex;
  align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0; overflow: hidden;
}
.kc-chat-header-avatar img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
}
.kc-chat-header-info {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.kc-chat-header-sub {
  font-size: 11px; color: var(--gray-500); font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kc-chat-header-ride {
  flex-shrink: 0; margin-left: auto;
}
.kc-chat-ride-chip {
  display: inline-block;
  padding: 4px 10px; border-radius: var(--radius-full);
  background: var(--gray-100); color: var(--gray-600);
  font-size: 11px; font-weight: 700; letter-spacing: 0.02em;
}

/* ── Chat loading spinner ────────────────────────────────── */
.kc-chat-spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2.5px solid var(--gray-200);
  border-top-color: var(--gray-500);
  animation: kc-spin 0.7s linear infinite;
  display: inline-block; vertical-align: middle; margin-right: 6px;
}

/* ── Chat message layout — bubble wrap ───────────────────── */
.kc-chat-msg {
  display: flex; flex-direction: row; align-items: flex-end;
  gap: 8px; max-width: 82%; align-self: flex-start;
}
.kc-chat-msg.mine {
  align-self: flex-end; flex-direction: row-reverse;
}
.kc-chat-bubble-wrap {
  display: flex; flex-direction: column;
  gap: 3px; min-width: 0;
}
.kc-chat-msg.mine .kc-chat-bubble-wrap { align-items: flex-end; }
.kc-chat-msg.theirs .kc-chat-bubble-wrap { align-items: flex-start; }

/* ── Chat avatar (left side for others) ─────────────────── */
.kc-chat-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  flex-shrink: 0; overflow: hidden;
  background: var(--gray-200);
  display: flex; align-items: center; justify-content: center;
}
.kc-chat-avatar-img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
}
.kc-chat-avatar-init {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--gray-300); color: var(--gray-700);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}

/* ── Chat meta row (time + receipt) ─────────────────────── */
.kc-chat-meta {
  display: flex; align-items: center; gap: 5px;
  font-size: 10px; color: var(--gray-400);
}
.kc-chat-msg.mine .kc-chat-meta { justify-content: flex-end; }

/* ── Read receipt ticks ──────────────────────────────────── */
.kc-chat-receipt {
  display: inline-flex; align-items: center;
  line-height: 1;
}
.kc-chat-receipt svg { display: block; }
.kc-chat-receipt.delivered { color: var(--gray-400); }
.kc-chat-receipt.read      { color: #4ade80; }

/* ── Date separator ─────────────────────────────────────── */
.kc-chat-date-sep {
  display: flex; align-items: center;
  gap: 10px; margin: 8px 0;
  color: var(--gray-400); font-size: 11px;
}
.kc-chat-date-sep::before,
.kc-chat-date-sep::after {
  content: ''; flex: 1;
  height: 1px; background: var(--gray-200);
}
.kc-chat-date-sep span {
  background: var(--gray-50);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--gray-200);
  white-space: nowrap;
  font-weight: 600;
}

/* ── Typing indicator bar ────────────────────────────────── */
.kc-chat-typing-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 20px; background: var(--white);
  border-top: 1px solid var(--gray-100);
  font-size: 12px; color: var(--gray-500);
  flex-shrink: 0;
}
.kc-chat-typing-bar.hidden { display: none; }
.kc-chat-typing-dots {
  display: inline-flex; align-items: center; gap: 3px;
}
.kc-chat-typing-dots span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gray-400);
  animation: kc-typing-bounce 1.1s ease-in-out infinite;
}
.kc-chat-typing-dots span:nth-child(2) { animation-delay: 0.18s; }
.kc-chat-typing-dots span:nth-child(3) { animation-delay: 0.36s; }
@keyframes kc-typing-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40%            { transform: translateY(-5px); opacity: 1; }
}

/* ── Closed ride bar ─────────────────────────────────────── */
.kc-chat-closed-bar {
  display: flex; align-items: center; justify-content: center;
  padding: 14px 20px; background: var(--gray-50);
  border-top: 1px solid var(--gray-200);
  color: var(--gray-500); font-size: 13px; font-weight: 600;
  gap: 6px; flex-shrink: 0;
  padding-bottom: max(14px, calc(env(safe-area-inset-bottom, 0px) + 14px));
}
.kc-chat-closed-bar.hidden { display: none; }

/* ── Chat input safe-area + textarea fixes ───────────────── */
.kc-chat-input-row {
  padding-bottom: max(12px, calc(env(safe-area-inset-bottom, 0px) + 8px));
  align-items: flex-end; /* keep send button at bottom as textarea grows */
}
.kc-chat-input {
  resize: none;
  max-height: 120px;
  overflow-y: auto;
  line-height: 1.5;
  border-radius: 18px; /* override pill radius — better for multiline */
}


/* ── Chat overlay safe-area top ──────────────────────────── */
.kc-chat-header {
  padding-top: max(16px, calc(env(safe-area-inset-top, 0px) + 12px));
}

/* ════════════════════════════════════════════════════════════
   ADMIN MESSAGES — two-pane layout
   ════════════════════════════════════════════════════════════ */

.kc-admin-msg-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 0;
  height: calc(100vh - 200px);
  min-height: 400px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--white);
}

/* ── Sidebar ─────────────────────────────────────────────── */
.kc-admin-msg-sidebar {
  display: flex; flex-direction: column;
  border-right: 1px solid var(--gray-200);
  background: var(--gray-50);
  overflow: hidden;
}
.kc-admin-msg-search-wrap {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--gray-200);
  background: var(--white);
}
.kc-admin-msg-search-wrap svg { flex-shrink: 0; color: var(--gray-400); }
.kc-admin-msg-search {
  flex: 1; border: none; outline: none;
  font-size: 13px; font-family: inherit; color: var(--ink);
  background: transparent;
}
.kc-admin-msg-filters {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding: 10px 14px;
  border-bottom: 1px solid var(--gray-200);
  background: var(--white);
}
.kc-admin-msg-list {
  flex: 1; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ── Conversation item ───────────────────────────────────── */
.kc-admin-msg-convo {
  width: 100%; text-align: left;
  padding: 12px 14px;
  background: transparent; border: none;
  border-bottom: 1px solid var(--gray-200);
  cursor: pointer; font-family: inherit;
  transition: background 0.12s;
  display: flex; flex-direction: column; gap: 4px;
}
.kc-admin-msg-convo:hover   { background: var(--gray-100); }
.kc-admin-msg-convo.active  { background: var(--gray-200); }
.kc-admin-msg-convo-header {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.kc-admin-msg-convo-names {
  font-size: 12px; font-weight: 700; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kc-admin-msg-convo-preview {
  font-size: 12px; color: var(--gray-600);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kc-admin-msg-convo-meta {
  font-size: 10px; color: var(--gray-400);
}

/* ── Detail pane ─────────────────────────────────────────── */
.kc-admin-msg-detail {
  display: flex; flex-direction: column;
  overflow: hidden; background: var(--white);
}
.kc-admin-msg-empty {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 32px; text-align: center;
  color: var(--gray-500);
}

/* ── Admin chat view ─────────────────────────────────────── */
.kc-admin-chat-view {
  display: flex; flex-direction: column;
  height: 100%; overflow: hidden;
}
.kc-admin-chat-view-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--gray-200);
  background: var(--white);
  flex-shrink: 0;
}
.kc-admin-chat-msgs {
  flex: 1; overflow-y: auto;
  padding: 16px 20px;
  display: flex; flex-direction: column; gap: 10px;
  background: var(--gray-50);
  -webkit-overflow-scrolling: touch;
}
.kc-admin-chat-readonly {
  padding: 10px 20px;
  background: var(--gray-100);
  border-top: 1px solid var(--gray-200);
  font-size: 12px; color: var(--gray-500);
  text-align: center; flex-shrink: 0;
}

/* ── Admin messages responsive (below 768px stack vertically) */
@media (max-width: 768px) {
  .kc-admin-msg-layout {
    grid-template-columns: 1fr;
    height: auto;
    min-height: unset;
  }
  .kc-admin-msg-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--gray-200);
    max-height: 280px;
  }
  .kc-admin-msg-detail {
    min-height: 320px;
  }
  .kc-admin-chat-view { min-height: 320px; }
}

/* ── AI ASSISTANT CHAT ───────────────────────────────────────────────────── */
.kc-ai-wrap {
  max-width: 780px; margin: 0 auto;
  display: flex; flex-direction: column;
  height: calc(100vh - 132px);
}
.kc-ai-header {
  display: flex; align-items: center; gap: 16px;
  padding: 20px 0 16px; border-bottom: 1px solid var(--gray-100); margin-bottom: 16px;
}
.kc-ai-avatar {
  width: 48px; height: 48px; background: var(--ink); color: var(--white);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.kc-ai-title  { font-size: 18px; font-weight: 800; color: var(--ink); }
.kc-ai-sub    { font-size: 12px; color: var(--ink-mute); margin-top: 2px; }
.kc-ai-clear-btn {
  margin-left: auto; padding: 6px 14px; background: var(--gray-100);
  color: var(--gray-600); border: none; border-radius: 8px;
  font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.kc-ai-clear-btn:hover { background: var(--gray-200); }
.kc-ai-suggestions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.kc-ai-suggestion {
  padding: 7px 14px; background: var(--gray-50); border: 1.5px solid var(--gray-200);
  border-radius: 20px; font-size: 12px; color: var(--gray-700);
  cursor: pointer; font-family: inherit; transition: all 0.15s;
}
.kc-ai-suggestion:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.kc-ai-messages {
  flex: 1; overflow-y: auto; padding: 4px 0;
  display: flex; flex-direction: column; gap: 10px; min-height: 120px;
}
.kc-ai-bubble {
  max-width: 78%; padding: 12px 16px; border-radius: 16px;
  font-size: 14px; line-height: 1.65; white-space: pre-wrap; word-break: break-word;
}
.kc-ai-bubble.user      { background: var(--ink); color: var(--white); border-bottom-right-radius: 4px; align-self: flex-end; }
.kc-ai-bubble.assistant { background: var(--gray-50); border: 1px solid var(--gray-100); color: var(--ink); border-bottom-left-radius: 4px; align-self: flex-start; }
.kc-ai-bubble.typing    { color: var(--ink-mute); font-style: italic; }
.kc-ai-input-row {
  display: flex; gap: 10px; padding: 14px 0 4px;
  border-top: 1px solid var(--gray-100); margin-top: auto;
}
.kc-ai-input {
  flex: 1; padding: 12px 16px; border: 1.5px solid var(--gray-200);
  border-radius: 10px; font-size: 14px; font-family: inherit;
  background: var(--white); outline: none; transition: border-color 0.15s;
}
.kc-ai-input:focus { border-color: var(--ink); }
.kc-ai-send-btn {
  padding: 12px 22px; background: var(--ink); color: var(--white);
  border: none; border-radius: 10px; font-size: 14px;
  font-weight: 700; cursor: pointer; font-family: inherit; transition: opacity 0.15s;
}
.kc-ai-send-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── PRINT (PDF export via window.print()) ──────────────────────────────── */
@media print {
  @page { margin: 18mm 14mm; size: A4; }

  body * { visibility: hidden; }

  /* Show whichever tab is currently active (dashboard or finance) */
  #tab-dashboard, #tab-dashboard *,
  #tab-finance, #tab-finance * { visibility: visible; }

  #tab-dashboard, #tab-finance {
    position: absolute; top: 0; left: 0; width: 100%;
    padding: 0; background: white; color: #111;
  }

  /* Print header with brand + date */
  #tab-dashboard::before,
  #tab-finance::before {
    content: "Kingdom Cares — Admin Report";
    display: block;
    font-size: 18px;
    font-weight: 800;
    color: #2A2466;
    margin-bottom: 4px;
    visibility: visible;
  }
  #tab-dashboard::after,
  #tab-finance::after {
    content: attr(data-print-date);
    display: block;
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 20px;
    visibility: visible;
  }

  /* Hide all interactive / navigation chrome */
  .kc-admin-nav, .kc-admin-card-head button,
  #admin-status-filter, .dash-preset-btn,
  .kc-dash-exports, .kc-dash-custom,
  .kc-cta, .kc-admin-action-btn,
  button, select, input { display: none !important; }

  /* Force single-column layout */
  .kc-admin-split { display: block !important; }
  .kc-admin-split > * { margin-bottom: 20px; break-inside: avoid; }
  .kc-kpi-grid { grid-template-columns: repeat(3, 1fr) !important; }

  /* Cards: white bg, solid border */
  .kc-admin-card, .kc-metric-card {
    background: white !important;
    border: 1px solid #d1d5db !important;
    box-shadow: none !important;
    break-inside: avoid;
    margin-bottom: 16px;
  }

  /* Tables */
  table { border-collapse: collapse; width: 100%; font-size: 11px; }
  th { background: #f3f4f6 !important; color: #374151 !important; font-weight: 700; padding: 6px 8px; border: 1px solid #e5e7eb; }
  td { padding: 5px 8px; border: 1px solid #e5e7eb; color: #111 !important; }

  /* Ensure text is readable */
  * { color: #111 !important; }
  .kc-pill { border: 1px solid currentColor !important; background: transparent !important; }
}
