/* ============================================================
   NAVIGATOR ReachID — styles.css
   Brand: Nunito Sans, --ignite #FF8400, --base-zero #0C0829
   ============================================================ */

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

:root {
  --ignite:          #FF8400;
  --ignite-light:    #FFB366;
  --ignite-dark:     #CC6A00;
  --northfade:       #8FA0D8;
  --driftlight:      #F9DFC6;
  --base-zero:       #0C0829;
  --text-dark:       #0C0829;
  --text-medium:     #4A4A4A;
  --text-light:      #7A7A7A;
  --border-color:    #E5E5E5;
  --bg-light:        #FAFAFA;
  --flag-color:      #c0392b;
  --flag-bg:         #fff5f0;
}

body {
  font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, var(--northfade) 0%, var(--ignite) 100%);
  min-height: 100vh;
  padding: 20px;
  color: var(--text-dark);
}

.container { max-width: 1100px; margin: 0 auto; }
.section { animation: fadeIn .5s ease-in; }

@keyframes fadeIn {
  from { opacity:0; transform:translateY(20px); }
  to   { opacity:1; transform:translateY(0); }
}

.hidden { display: none !important; }

/* ── CARDS ───────────────────────────────────────────────── */
.card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(12,8,41,.15);
  margin-bottom: 16px;
  overflow: hidden;
}

.step-header {
  padding: 24px 32px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--ignite) 0%, var(--ignite-dark) 100%);
  color: white;
  transition: all .3s;
  user-select: none;
}
.step-header:hover { background: linear-gradient(135deg, var(--ignite-dark) 0%, var(--ignite) 100%); }
.step-header h2 {
  margin:0; color:white;
  display:flex; align-items:center; justify-content:space-between;
  font-size:20px;
}
.step-number {
  background:white; color:var(--ignite);
  width:36px; height:36px; border-radius:50%;
  display:inline-flex; align-items:center; justify-content:center;
  font-weight:800; margin-right:12px; font-size:18px; flex-shrink:0;
}
.toggle-icon { font-size:20px; transition:transform .3s; }
.toggle-icon.collapsed { transform:rotate(-90deg); }

.step-content { padding:32px; animation:slideDown .3s ease-out; }
.step-content.collapsed { display:none; }
.step-content.no-pad { padding:0; }

@keyframes slideDown {
  from { opacity:0; max-height:0; }
  to   { opacity:1; max-height:4000px; }
}

/* ── HEADER ──────────────────────────────────────────────── */
/* Override card overflow for sticky header to work */
.sticky-header.card, .sticky-header { overflow: visible !important; }

.header {
  display:flex; justify-content:space-between; align-items:center;
  background:white; border-radius:0; padding:16px 28px; margin-bottom:0;
}
.sticky-header {
  position:sticky; top:0; z-index:1000;
  will-change: transform;
  background:rgba(255,255,255,.95);
  backdrop-filter:blur(20px);
  border-radius:16px; margin-bottom:16px;
  box-shadow:0 4px 20px rgba(12,8,41,.08);
  border:1px solid rgba(12,8,41,.06);
}
.header-left { display:flex; flex-direction:column; align-items:flex-start; gap:4px; }
.header-logo-link { display:inline-block; transition:opacity .2s; text-decoration:none; }
.header-logo-link:hover { opacity:.75; }
.header-logo-img { max-width:200px; height:auto; }
.header-tagline {
  font-size:10px; color:var(--text-light); font-weight:600;
  letter-spacing:.8px; text-transform:uppercase;
}
.user-info { display:flex; align-items:center; gap:16px; }
.client-info { display:flex; flex-direction:column; align-items:flex-end; gap:4px; }
.header-client-logo { max-height:36px; width:auto; object-fit:contain; }
.client-name { color:var(--base-zero); font-weight:700; font-size:16px; }
.usage-badge {
  background:var(--driftlight); padding:3px 12px; border-radius:12px;
  font-size:12px; font-weight:600; color:var(--ignite-dark);
}

/* ── LOGIN ───────────────────────────────────────────────── */
.login-card {
  max-width:560px; margin:40px auto;
  text-align:center; padding:40px 40px 32px;
}
.top-logo-link { display:inline-block; margin-bottom:12px; transition:opacity .2s; text-decoration:none; }
.top-logo-link:hover { opacity:.8; }
.login-brand-logo { max-width:380px; height:auto; }
.reachid-badge {
  display:inline-block; background:var(--driftlight); color:var(--ignite-dark);
  font-size:11px; font-weight:700; letter-spacing:.12em; text-transform:uppercase;
  padding:4px 12px; border-radius:99px; margin-bottom:8px;
}
.subtitle { color:var(--text-light); font-size:14px; margin-bottom:24px; }
.client-logo-wrap { margin:16px 0; }
.client-logo-login { max-height:56px; width:auto; object-fit:contain; }
.welcome-text { font-size:24px; font-weight:700; color:var(--base-zero); margin-bottom:20px; }
.login-form { max-width:380px; margin:0 auto; }
.password-wrapper { position:relative; margin-bottom:12px; }
.password-wrapper input {
  width:100%; padding:14px 48px 14px 14px; text-align:center;
  font-size:16px; border:2px solid var(--border-color); border-radius:8px;
  font-family:'Nunito Sans',sans-serif; transition:border-color .3s;
}
.password-wrapper input:focus { outline:none; border-color:var(--ignite); }
.password-toggle {
  position:absolute; right:12px; top:50%; transform:translateY(-50%);
  background:none; border:none; cursor:pointer; padding:8px;
  color:var(--text-medium); transition:color .3s;
  display:flex; align-items:center; justify-content:center;
}
.password-toggle:hover { color:var(--ignite); }
.login-error {
  color:var(--flag-color); font-size:13px; font-weight:600; margin-bottom:10px;
}
.error-box {
  background:#fff5f0; border:2px solid #ffcdb3; border-radius:8px;
  padding:16px; color:var(--flag-color); font-weight:600; margin:16px 0;
}
.helper-text { color:var(--text-light); font-size:14px; margin-bottom:16px; }
.connect-link { color:var(--ignite); font-weight:600; text-decoration:none; }
.connect-link:hover { text-decoration:underline; }

/* ── BUTTONS ─────────────────────────────────────────────── */
button, .btn-primary, .btn-secondary {
  padding:14px 28px; border:none; border-radius:8px;
  font-size:16px; font-weight:700; font-family:'Nunito Sans',sans-serif;
  cursor:pointer; transition:all .3s; text-decoration:none;
  display:inline-block; text-align:center;
}
.btn-primary { background:var(--ignite); color:white; }
.btn-primary:hover { background:var(--ignite-dark); transform:translateY(-2px); box-shadow:0 10px 20px rgba(255,132,0,.3); }
.btn-secondary { background:var(--driftlight); color:var(--base-zero); }
.btn-secondary:hover { background:#F5D4B3; }
.btn-large { width:100%; padding:18px 28px; font-size:18px; }
.btn-edit {
  font-size:12px; padding:6px 12px; background:var(--driftlight);
  color:var(--base-zero); border:none; border-radius:6px;
  cursor:pointer; font-family:'Nunito Sans',sans-serif; font-weight:600;
}
.btn-edit:hover { background:var(--ignite); color:white; }
.step-actions {
  padding:20px 32px; display:grid;
  grid-template-columns:2fr 1fr; gap:12px; border-top:1px solid var(--border-color);
}

/* ── FILE UPLOAD ─────────────────────────────────────────── */
.upload-section { margin:16px 0; }
#fileInput { display:none; }
.file-label {
  display:block; padding:40px; border:3px dashed var(--northfade);
  border-radius:12px; text-align:center; cursor:pointer;
  transition:all .3s; background:#FAFAFA;
}
.file-label:hover { border-color:var(--ignite); background:#FFF9F5; }
.file-label span { color:var(--text-medium); font-size:16px; font-weight:600; }

/* ── COLUMN MAPPING ──────────────────────────────────────── */
.mapping-grid {
  display:grid; grid-template-columns:repeat(auto-fit, minmax(220px,1fr));
  gap:16px; margin-bottom:20px;
}
.mapping-grid label { display:block; color:var(--text-dark); font-weight:700; margin-bottom:6px; font-size:14px; }
.mapping-grid select {
  width:100%; padding:10px 12px; border:2px solid var(--border-color);
  border-radius:8px; font-size:14px; font-family:'Nunito Sans',sans-serif;
  background:white; cursor:pointer; color:var(--text-dark);
}
.mapping-grid select:focus { outline:none; border-color:var(--ignite); }
.req-star { color:var(--ignite); }

/* ── PROGRESS ────────────────────────────────────────────── */
.spinner-wrap { text-align:center; padding:24px 0 16px; }
.spinner {
  border:4px solid var(--driftlight); border-top:4px solid var(--ignite);
  border-radius:50%; width:44px; height:44px;
  animation:spin 1s linear infinite; margin:0 auto 12px;
}
@keyframes spin { to { transform:rotate(360deg); } }
.spinner-wrap p { color:var(--text-medium); font-size:15px; font-weight:600; }
.progress-bar { width:100%; height:8px; background:var(--border-color); border-radius:4px; overflow:hidden; margin:0 0 12px; }
.progress-fill { height:100%; background:var(--ignite); width:0%; transition:width .3s; }

/* ── ADDRESS LIST ────────────────────────────────────────── */
.address-list { max-height:280px; overflow-y:auto; border:1px solid var(--border-color); border-radius:8px; padding:12px; background:var(--bg-light); }
.address-item {
  padding:10px 12px; margin-bottom:6px; background:white;
  border-radius:6px; border-left:4px solid var(--ignite);
}
.address-item.flagged { border-left-color:var(--flag-color); background:var(--flag-bg); }
.address-item strong { color:var(--base-zero); font-size:14px; }
.address-item small { color:var(--text-light); display:block; margin-top:2px; font-size:12px; }
.flag-note { color:var(--flag-color); font-size:12px; font-weight:600; }

/* ── SPLIT LAYOUT (75/25) — used in Results section ─────── */
.split-layout {
  display:flex; height:520px; border-top:1px solid var(--border-color);
}
.customer-panel {
  width:25%; min-width:220px;
  border-right:1px solid var(--border-color);
  display:flex; flex-direction:column; overflow:hidden;
  background:var(--bg-light);
}
.panel-header {
  padding:12px 14px; border-bottom:1px solid var(--border-color);
  display:flex; align-items:center; justify-content:space-between;
  flex-shrink:0; background:white;
}
.panel-title { font-size:12px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--base-zero); }
.panel-badge {
  font-size:11px; font-weight:600;
  background:var(--driftlight); color:var(--ignite-dark);
  padding:2px 8px; border-radius:99px;
}
.stop-list { overflow-y:auto; flex:1; }
.stop-row {
  padding:10px 12px; border-bottom:1px solid var(--border-color);
  cursor:pointer; transition:background .15s;
}
.stop-row:hover { background:#FFF5EB; }
.stop-row.active { background:var(--driftlight); border-left:3px solid var(--ignite); }
.stop-row.flagged { background:var(--flag-bg); border-left:3px solid var(--flag-color); }
.stop-seq { font-size:13px; font-weight:800; color:var(--ignite); margin-bottom:2px; }
.stop-name { font-size:13px; font-weight:600; color:var(--base-zero); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.stop-meta { font-size:11px; color:var(--text-light); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.stop-flag { font-size:11px; color:var(--flag-color); font-weight:600; margin-top:2px; }

/* Route order rows */
.route-row {
  padding:10px 12px; border-bottom:1px solid var(--border-color);
  cursor:pointer; transition:background .15s; display:flex; gap:8px; align-items:flex-start;
}
.route-row:hover { background:#FFF5EB; }
.route-row.active { background:var(--driftlight); border-left:3px solid var(--ignite); }
.route-num {
  background:var(--ignite); color:white;
  width:24px; height:24px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  font-size:12px; font-weight:800; flex-shrink:0; margin-top:1px;
}
.route-info { flex:1; overflow:hidden; }
.route-edit-btns { display:flex; flex-direction:column; gap:2px; }
.route-btn {
  background:var(--driftlight); border:none; border-radius:4px;
  width:26px; height:26px; cursor:pointer; font-size:13px;
  display:flex; align-items:center; justify-content:center; transition:all .2s;
}
.route-btn:hover { background:var(--ignite); color:white; }
.map-panel { flex:1; position:relative; }
.google-map-split { width:100%; height:100%; }

/* ── ROUTE SUMMARY BAR ───────────────────────────────────── */
.route-summary-bar {
  padding:12px 24px; background:var(--base-zero); color:white;
  display:flex; align-items:center; gap:8px; flex-wrap:wrap;
  font-size:15px; font-weight:700;
}
.route-summary-bar .summary-icon { font-size:16px; }
.route-summary-bar .sep { color:#666; margin:0 4px; }

/* ── OPTIMIZE OPTIONS ────────────────────────────────────── */
.selected-points-summary {
  background:var(--driftlight); padding:16px 20px; border-radius:12px;
  margin-bottom:20px; display:flex; gap:32px; justify-content:center;
}
.point-summary { display:flex; gap:8px; align-items:center; font-size:15px; }
.point-label { font-weight:700; color:var(--text-dark); }
.options-grid { margin-bottom:24px; }
.route-type-section { width:100%; }
.route-type-buttons { display:flex; gap:12px; margin-top:8px; }
.route-type-btn {
  flex:1; padding:14px 24px; font-size:15px; font-weight:600;
  font-family:'Nunito Sans',sans-serif;
  border:2px solid var(--driftlight); background:white;
  color:var(--text-medium); border-radius:8px; cursor:pointer; transition:all .3s;
}
.route-type-btn:hover { border-color:var(--ignite); background:#FFF8F0; }
.route-type-btn.active { border-color:var(--ignite); background:var(--ignite); color:white; }
#loadingIndicator { text-align:center; padding:40px; }
#loadingIndicator p { color:var(--text-medium); font-size:16px; font-weight:600; margin-top:12px; }

/* ── WHATSAPP ────────────────────────────────────────────── */
.whatsapp-share {
  background:linear-gradient(135deg,#25D366 0%,#128C7E 100%);
  padding:24px; border-radius:12px; color:white;
}
.whatsapp-share h3 { color:white; margin-bottom:8px; margin-top:0; }
.whatsapp-share .helper-text { color:rgba(255,255,255,.9); margin-bottom:16px; }
.whatsapp-input-group { display:flex; gap:12px; align-items:stretch; }
.phone-input-wrapper {
  flex:1; display:flex; background:white; border-radius:8px;
  overflow:hidden; border:2px solid rgba(255,255,255,.3);
}
.country-code {
  background:var(--driftlight); color:var(--base-zero);
  padding:14px 12px; font-weight:700; font-size:16px;
  border-right:2px solid var(--border-color);
}
.phone-input-wrapper input {
  flex:1; border:none; padding:14px; font-size:16px;
  font-family:'Nunito Sans',sans-serif; color:var(--base-zero); margin:0;
}
.phone-input-wrapper input:focus { outline:none; }
.btn-whatsapp {
  background:white; color:#128C7E; padding:14px 24px;
  border:none; border-radius:8px; font-size:16px; font-weight:700;
  font-family:'Nunito Sans',sans-serif; cursor:pointer; transition:all .3s;
  display:flex; align-items:center; gap:8px; white-space:nowrap;
}
.btn-whatsapp:hover { background:var(--driftlight); transform:translateY(-2px); box-shadow:0 5px 15px rgba(0,0,0,.2); }

/* ── LIMIT REACHED ───────────────────────────────────────── */
.limit-reached-container { min-height:80vh; display:flex; align-items:center; justify-content:center; }
.limit-reached-card {
  max-width:640px; width:100%; background:white; border-radius:16px;
  box-shadow:0 10px 40px rgba(12,8,41,.2); overflow:hidden;
}
.limit-header {
  background:linear-gradient(135deg,var(--northfade) 0%,var(--ignite) 100%);
  padding:32px; text-align:center;
}
.limit-logo { max-width:300px; margin:0 auto 16px; display:block; }
.limit-client-name { font-size:24px; color:white; margin:0; font-weight:700; }
.limit-warning-box { padding:32px; }
.warning-icon { font-size:56px; text-align:center; margin-bottom:16px; }
.warning-title { font-size:24px; color:var(--base-zero); text-align:center; margin:0 0 24px; font-weight:800; }
.limit-message { font-size:15px; color:#666; text-align:center; margin:0 0 20px; }
.usage-stats-limit { background:var(--bg-light); border-radius:12px; padding:20px; margin-bottom:24px; }
.usage-stat { display:flex; align-items:center; justify-content:space-between; padding:10px 0; border-bottom:1px solid var(--border-color); }
.usage-stat:last-child { border-bottom:none; }
.stat-label { font-size:14px; color:#666; font-weight:600; }
.stat-value { font-size:18px; font-weight:700; color:var(--ignite); }
.stat-status { font-size:12px; color:var(--ignite); font-weight:600; }
.reset-info { background:#FFF8F0; border:2px solid var(--driftlight); border-radius:12px; padding:16px; margin-bottom:24px; }
.reset-title { font-size:14px; font-weight:700; color:var(--base-zero); margin:0 0 12px; text-align:center; }
.reset-dates { display:flex; gap:16px; flex-wrap:wrap; }
.reset-item { flex:1; min-width:180px; }
.reset-label { font-size:12px; color:#666; font-weight:600; display:block; }
.reset-date { font-size:15px; font-weight:700; color:var(--base-zero); }
.upgrade-section { text-align:center; padding:20px 0 0; border-top:2px solid var(--driftlight); }
.upgrade-message { font-size:15px; font-weight:600; color:var(--base-zero); margin:0 0 16px; }
.btn-upgrade { display:inline-block; padding:14px 28px; background:var(--ignite); color:white; text-decoration:none; border-radius:8px; font-size:15px; font-weight:700; transition:all .3s; }
.btn-upgrade:hover { background:var(--ignite-dark); transform:translateY(-2px); }
.limit-actions { padding:16px 24px; background:var(--bg-light); text-align:center; }
.btn-logout-limit { padding:10px 32px; background:white; color:var(--base-zero); border:2px solid var(--border-color); border-radius:8px; font-size:14px; font-weight:600; cursor:pointer; transition:all .3s; font-family:'Nunito Sans',sans-serif; }
.btn-logout-limit:hover { border-color:var(--ignite); color:var(--ignite); }

/* ── SCROLLBAR ───────────────────────────────────────────── */
.stop-list::-webkit-scrollbar { width:4px; }
.stop-list::-webkit-scrollbar-track { background:transparent; }
.stop-list::-webkit-scrollbar-thumb { background:var(--border-color); border-radius:99px; }

/* ── INPUT TABS (Upload File / Add from Table) ───────────── */
.input-tabs {
  display: flex; margin-bottom: 24px;
  border-bottom: 2px solid var(--border-color);
}
.input-tab {
  padding: 12px 24px; background: none; border: none;
  font-size: 15px; font-weight: 600; font-family: 'Nunito Sans', sans-serif;
  color: var(--text-light); cursor: pointer;
  border-bottom: 3px solid transparent; margin-bottom: -2px;
  transition: all .2s;
}
.input-tab:hover { color: var(--ignite); }
.input-tab.active { color: var(--ignite); border-bottom-color: var(--ignite); }

/* ── TABLE PASTE AREA ────────────────────────────────────── */
.table-paste-area {
  width: 100%; min-height: 220px; padding: 16px;
  border: 2px solid var(--border-color); border-radius: 12px;
  font-family: 'Courier New', monospace; font-size: 13px;
  color: var(--text-dark); background: var(--bg-light);
  resize: vertical; line-height: 1.6; transition: border-color .3s;
}
.table-paste-area:focus { outline: none; border-color: var(--ignite); background: white; }

/* ── MAP CONTROLS BAR (above map) ────────────────────────── */
.map-controls-bar {
  display: flex; align-items: flex-start; flex-wrap: wrap; gap: 12px;
  background: var(--bg-light); border: 1px solid var(--border-color);
  border-radius: 12px; padding: 16px 20px; margin-bottom: 12px;
}
.map-control-group {
  flex: 1; min-width: 220px; display: flex; flex-direction: column;
  gap: 8px; position: relative;
}
.map-control-group.map-control-edit { flex: 0 0 auto; min-width: 200px; }
.map-control-label {
  font-size: 12px; font-weight: 700; color: var(--text-medium);
  text-transform: uppercase; letter-spacing: .05em;
}
.map-control-group select {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--border-color);
  border-radius: 8px; font-size: 14px; font-family: 'Nunito Sans', sans-serif;
  background: white; cursor: pointer; color: var(--text-dark);
}
.map-control-group select:focus { outline: none; border-color: var(--ignite); }
.location-search-input {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--border-color);
  border-radius: 8px; font-size: 14px; font-family: 'Nunito Sans', sans-serif;
  color: var(--text-dark); background: white; transition: border-color .3s;
}
.location-search-input:focus { outline: none; border-color: var(--ignite); }
.map-control-divider {
  width: 1px; background: var(--border-color); align-self: stretch;
  flex: 0 0 1px; margin: 0 4px;
}

/* ── EDIT MODE BUTTON ────────────────────────────────────── */
.btn-edit-mode {
  padding: 10px 16px; background: var(--driftlight);
  border: 2px solid var(--border-color); border-radius: 8px;
  font-size: 14px; font-weight: 700; font-family: 'Nunito Sans', sans-serif;
  cursor: pointer; color: var(--base-zero); transition: all .25s; text-align: left;
}
.btn-edit-mode:hover { border-color: var(--ignite); background: #FFF5EB; }
.btn-edit-mode.active { background: var(--ignite); color: white; border-color: var(--ignite-dark); }
.edit-mode-hint { font-size: 12px; color: var(--text-light); margin: 0; }
.edit-mode-status {
  font-size: 13px; font-weight: 600; color: var(--ignite-dark);
  background: var(--driftlight); padding: 4px 12px; border-radius: 99px;
}

/* ── MAP STOP BADGE ROW ──────────────────────────────────── */
.map-stop-badge-row { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }

/* ── FULL-WIDTH MAP ──────────────────────────────────────── */
.google-map-full { width: 100%; height: 460px; border-radius: 10px; overflow: hidden; }

/* ── STOP LIST HORIZONTAL (below map) ───────────────────── */
.stop-list-horizontal {
  display: flex; gap: 10px; overflow-x: auto; padding: 12px 0 4px;
  scrollbar-width: thin; scrollbar-color: var(--border-color) transparent;
}
.stop-list-horizontal::-webkit-scrollbar { height: 4px; }
.stop-list-horizontal::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 99px; }
.stop-card {
  flex: 0 0 140px; padding: 10px 12px; background: white;
  border: 1.5px solid var(--border-color); border-radius: 10px;
  cursor: pointer; transition: all .2s; border-top: 3px solid var(--ignite);
}
.stop-card:hover { border-color: var(--ignite); box-shadow: 0 4px 12px rgba(255,132,0,.15); }
.stop-card.active { background: var(--driftlight); border-color: var(--ignite); }
.stop-card.flagged { border-top-color: var(--flag-color); background: var(--flag-bg); }
.stop-card-seq { font-size: 18px; font-weight: 800; color: var(--ignite); line-height: 1; }
.stop-card.flagged .stop-card-seq { color: var(--flag-color); }
.stop-card-name { font-size: 12px; font-weight: 700; color: var(--base-zero); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stop-card-meta { font-size: 11px; color: var(--text-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── SEARCH DROPDOWN ─────────────────────────────────────── */
.search-dropdown {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 500;
  background: white; border: 1.5px solid var(--border-color);
  border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12);
  max-height: 200px; overflow-y: auto;
}
.search-dropdown-item {
  padding: 10px 14px; cursor: pointer; font-size: 14px;
  border-bottom: 1px solid var(--border-color); transition: background .15s;
}
.search-dropdown-item:last-child { border-bottom: none; }
.search-dropdown-item:hover { background: var(--driftlight); }

/* ── PORTAL SELECTOR (bare login.php) ───────────────────── */
.portal-selector { width: 100%; max-width: 420px; margin: 0 auto; }
.client-select-list { display: flex; flex-direction: column; gap: 12px; margin: 0 0 8px; }
.client-select-btn {
  display: flex; align-items: center; gap: 14px; padding: 16px 20px;
  background: var(--bg-light); border: 2px solid var(--border-color);
  border-radius: 12px; text-decoration: none; color: var(--text-dark);
  font-weight: 700; font-size: 16px; font-family: 'Nunito Sans', sans-serif;
  transition: all .25s;
}
.client-select-btn:hover {
  border-color: var(--ignite); background: #FFF8F0;
  transform: translateY(-2px); box-shadow: 0 6px 20px rgba(255,132,0,.15);
}
.client-select-logo { max-height: 36px; width: auto; object-fit: contain; flex-shrink: 0; }
.client-select-btn span:nth-child(2) { flex: 1; }
.client-select-arrow { color: var(--ignite); font-size: 18px; }

/* ── LANDING PAGE ────────────────────────────────────────── */
.landing-card {
  max-width: 700px; margin: 40px auto;
  background: white; border-radius: 20px;
  box-shadow: 0 20px 60px rgba(12,8,41,.15);
  padding: 48px 40px 32px; text-align: center;
}
.landing-steps {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; margin: 24px 0 32px; flex-wrap: wrap;
}
.landing-step {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 600; color: var(--text-dark);
}
.landing-arrow { color: var(--ignite); font-size: 20px; font-weight: 700; }
.landing-heading { font-size: 22px; font-weight: 800; color: var(--base-zero); margin: 0 0 8px; }
.client-cards-grid {
  display: flex; flex-wrap: wrap; gap: 16px;
  justify-content: center; margin: 24px 0 32px;
}
.client-card-link {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 24px 32px; background: var(--bg-light);
  border: 2px solid var(--border-color); border-radius: 16px;
  text-decoration: none; color: var(--text-dark); min-width: 180px; transition: all .25s;
}
.client-card-link:hover {
  border-color: var(--ignite); background: #FFF8F0;
  transform: translateY(-3px); box-shadow: 0 8px 24px rgba(255,132,0,.2);
}
.client-card-logo { max-height: 52px; width: auto; object-fit: contain; }
.client-card-name { font-size: 16px; font-weight: 700; color: var(--base-zero); }
.client-card-arrow { font-size: 20px; color: var(--ignite); font-weight: 700; }
.landing-footer { font-size: 13px; color: var(--text-light); margin-top: 8px; }


/* ── ROUTE SUMMARY ENHANCED ─────────────────────────────── */
.summary-main { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.summary-sub { font-size:13px; color:rgba(255,255,255,.85); margin-top:4px; display:flex; align-items:center; gap:8px; }
.summary-sub strong { color:white; }
.breakdown-toggle-btn {
  margin-top:10px; padding:8px 20px; background:rgba(255,255,255,.15);
  border:1px solid rgba(255,255,255,.3); border-radius:6px; color:white;
  font-size:13px; font-weight:600; font-family:"Nunito Sans",sans-serif;
  cursor:pointer; transition:all .2s; width:100%;
}
.breakdown-toggle-btn:hover { background:rgba(255,255,255,.25); }

/* ── DETAILED BREAKDOWN ──────────────────────────────────── */
#detailedBreakdown {
  margin-top:12px; background:white; border-radius:10px;
  overflow:hidden; color:var(--text-dark);
}
.breakdown-list { padding:8px 0; }
.breakdown-item {
  display:flex; gap:12px; align-items:flex-start;
  padding:12px 16px; border-bottom:1px solid var(--border-color);
}
.breakdown-item:last-child { border-bottom:none; }
.breakdown-dot {
  width:28px; height:28px; border-radius:50%; color:white;
  display:flex; align-items:center; justify-content:center;
  font-size:12px; font-weight:800; flex-shrink:0;
}
.breakdown-body { flex:1; }
.breakdown-name { font-size:14px; font-weight:700; color:var(--base-zero); margin-bottom:3px; }
.breakdown-time { font-size:13px; color:var(--text-medium); margin-bottom:2px; }
.breakdown-meta { font-size:12px; color:var(--text-light); }
.bd-tag {
  font-size:10px; font-weight:700; background:var(--driftlight);
  color:var(--ignite-dark); padding:1px 6px; border-radius:99px; margin-left:4px;
}

/* ── SERVICE TIME IN ROUTE ROW ───────────────────────────── */
.svc-time-row {
  display:flex; align-items:center; gap:6px;
  margin-top:4px; font-size:12px; color:var(--text-light);
}
.svc-label { font-weight:600; }
.svc-input {
  width:48px; padding:2px 6px; border:1.5px solid var(--border-color);
  border-radius:5px; font-size:12px; font-family:"Nunito Sans",sans-serif;
  color:var(--text-dark); text-align:center;
}
.svc-input:focus { outline:none; border-color:var(--ignite); }

/* ── REMOVE STOP BUTTON ──────────────────────────────────── */
.route-btn-remove {
  background:#fff0f0 !important; color:var(--flag-color) !important;
  border:1px solid #ffcdd2 !important; font-size:12px !important;
  font-weight:700 !important;
}
.route-btn-remove:hover { background:var(--flag-color) !important; color:white !important; }

/* ── START TIME SELECTOR ─────────────────────────────────── */
.start-time-row {
  display:flex; align-items:center; gap:12px; flex-wrap:wrap;
  background:var(--bg-light); border:1px solid var(--border-color);
  border-radius:10px; padding:12px 16px; margin-bottom:16px;
}
.start-time-label { font-size:14px; font-weight:700; color:var(--text-dark); }
.start-time-optional { font-weight:400; color:var(--text-light); font-size:12px; }
.start-time-select {
  padding:8px 12px; border:1.5px solid var(--border-color);
  border-radius:8px; font-size:14px; font-family:"Nunito Sans",sans-serif;
  background:white; cursor:pointer; color:var(--text-dark);
}
.start-time-select:focus { outline:none; border-color:var(--ignite); }
.start-time-hint { font-size:12px; color:var(--text-light); }

/* ── ROUTE ROW with edit btns always showing remove ─────── */
.route-edit-btns { display:flex; flex-direction:column; gap:3px; flex-shrink:0; }


/* ── CUSTOMER WHATSAPP BUTTON ────────────────────────────── */
.btn-wa-customer {
  padding: 2px 8px; background: #25D366; border: none; border-radius: 5px;
  color: white; font-size: 13px; cursor: pointer; transition: all .2s;
  margin-left: 4px; line-height: 1.4;
}
.btn-wa-customer:hover { background: #128C7E; transform: scale(1.05); }

.btn-notify-all {
  padding: 4px 10px; background: #25D366; border: none; border-radius: 6px;
  color: white; font-size: 11px; font-weight: 700; cursor: pointer;
  font-family: "Nunito Sans", sans-serif; transition: all .2s; white-space: nowrap;
}
.btn-notify-all:hover { background: #128C7E; }


/* ── SHOPIFY IMPORT ──────────────────────────────────────── */
.shopify-preview-wrap { margin-top: 16px; }
.shopify-preview-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; background: var(--bg-light);
  border: 1px solid var(--border-color); border-radius: 8px 8px 0 0;
  font-size: 14px;
}
.shopify-warn { color: var(--flag-color); font-weight: 600; font-size: 13px; }
.shopify-ok   { color: #27ae60; font-weight: 600; font-size: 13px; }
.shopify-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
  border: 1px solid var(--border-color); border-top: none;
}
.shopify-table th {
  background: var(--base-zero); color: white; padding: 8px 10px;
  text-align: left; font-size: 12px; font-weight: 700;
}
.shopify-table td {
  padding: 8px 10px; border-bottom: 1px solid var(--border-color);
  vertical-align: top;
}
.shopify-table tr:last-child td { border-bottom: none; }
.shopify-table tr:hover td { background: #FAFAFA; }
.shopify-row-missing td { background: var(--flag-bg); }
.shopify-rid { font-family: monospace; font-size: 12px; color: var(--base-zero); }
.shopify-missing { color: var(--flag-color); font-weight: 600; font-size: 12px; }
.shopify-no-valid { color: var(--flag-color); font-weight: 600; margin-top: 12px; }

/* ── CUSTOMER WA SECTION ─────────────────────────────────── */
.customer-wa-section {
  background: linear-gradient(135deg, #f0fff4 0%, #e8f5e9 100%);
  border: 1.5px solid #a5d6a7; border-radius: 12px; padding: 20px 24px;
}
.customer-wa-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 16px; gap: 16px;
}
.customer-wa-header h3 { margin: 0; color: var(--base-zero); font-size: 16px; }
.btn-template-toggle {
  padding: 8px 14px; background: white; border: 1.5px solid #a5d6a7;
  border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer;
  font-family: "Nunito Sans", sans-serif; white-space: nowrap; color: #2e7d32;
  transition: all .2s; flex-shrink: 0;
}
.btn-template-toggle:hover { background: #e8f5e9; border-color: #66bb6a; }

/* ── WA TEMPLATE EDITOR ──────────────────────────────────── */
.wa-template-wrap {
  background: white; border: 1.5px solid #a5d6a7; border-radius: 10px;
  overflow: hidden;
}
.wa-template-header {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 14px; background: #f1f8e9;
  border-bottom: 1px solid #c8e6c9;
}
.wa-template-label { font-size: 13px; font-weight: 700; color: var(--base-zero); }
.wa-template-placeholders { font-size: 12px; color: var(--text-light); flex: 1; }
.wa-template-placeholders code {
  background: #e8f5e9; padding: 1px 5px; border-radius: 3px;
  font-size: 11px; margin: 0 2px; color: #2e7d32;
}
.btn-reset-template {
  padding: 4px 10px; background: white; border: 1px solid #a5d6a7;
  border-radius: 5px; font-size: 12px; cursor: pointer; color: #2e7d32;
  font-family: "Nunito Sans", sans-serif;
}
.btn-reset-template:hover { background: #e8f5e9; }
.wa-template-editor {
  width: 100%; padding: 14px 16px; border: none; resize: vertical;
  font-family: "Nunito Sans", sans-serif; font-size: 13px;
  color: var(--text-dark); line-height: 1.7; min-height: 280px;
}
.wa-template-editor:focus { outline: none; }

/* ── DRIVER WA SECTION ───────────────────────────────────── */
.whatsapp-share h3 { margin-top: 0; }

/* ── STICKY HEADER FIX ───────────────────────────────────── */
.sticky-header, .sticky-header.card { overflow: visible !important; }
#mainContainer { overflow: visible !important; }

/* ── ROUTE SUMMARY ENHANCED ─────────────────────────────── */
.summary-main { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.summary-sub { font-size:13px; color:rgba(255,255,255,.85); margin-top:4px; display:flex; align-items:center; gap:8px; }
.summary-sub strong { color:white; }
.breakdown-toggle-btn {
  margin-top:10px; padding:8px 20px; background:rgba(255,255,255,.15);
  border:1px solid rgba(255,255,255,.3); border-radius:6px; color:white;
  font-size:13px; font-weight:600; font-family:"Nunito Sans",sans-serif;
  cursor:pointer; transition:all .2s; width:100%;
}
.breakdown-toggle-btn:hover { background:rgba(255,255,255,.25); }
#detailedBreakdown {
  margin-top:12px; background:white; border-radius:10px; overflow:hidden; color:var(--text-dark);
}
.breakdown-list { padding:8px 0; }
.breakdown-item { display:flex; gap:12px; align-items:flex-start; padding:12px 16px; border-bottom:1px solid var(--border-color); }
.breakdown-item:last-child { border-bottom:none; }
.breakdown-dot { width:28px; height:28px; border-radius:50%; color:white; display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:800; flex-shrink:0; }
.breakdown-body { flex:1; }
.breakdown-name { font-size:14px; font-weight:700; color:var(--base-zero); margin-bottom:3px; }
.breakdown-time { font-size:13px; color:var(--text-medium); margin-bottom:2px; }
.breakdown-meta { font-size:12px; color:var(--text-light); }
.bd-tag { font-size:10px; font-weight:700; background:var(--driftlight); color:var(--ignite-dark); padding:1px 6px; border-radius:99px; margin-left:4px; }

/* ── SERVICE TIME IN ROUTE ROW ───────────────────────────── */
.svc-time-row { display:flex; align-items:center; gap:6px; margin-top:4px; font-size:12px; color:var(--text-light); }
.svc-label { font-weight:600; }
.svc-input { width:48px; padding:2px 6px; border:1.5px solid var(--border-color); border-radius:5px; font-size:12px; font-family:"Nunito Sans",sans-serif; color:var(--text-dark); text-align:center; }
.svc-input:focus { outline:none; border-color:var(--ignite); }
.btn-wa-customer { padding:2px 8px; background:#25D366; border:none; border-radius:5px; color:white; font-size:13px; cursor:pointer; transition:all .2s; margin-left:4px; line-height:1.4; }
.btn-wa-customer:hover { background:#128C7E; transform:scale(1.05); }
.route-btn-remove { background:#fff0f0 !important; color:var(--flag-color) !important; border:1px solid #ffcdd2 !important; font-size:12px !important; font-weight:700 !important; }
.route-btn-remove:hover { background:var(--flag-color) !important; color:white !important; }

/* ── START TIME SELECTOR ─────────────────────────────────── */
.start-time-row { display:flex; align-items:center; gap:12px; flex-wrap:wrap; background:var(--bg-light); border:1px solid var(--border-color); border-radius:10px; padding:12px 16px; margin-bottom:16px; }
.start-time-label { font-size:14px; font-weight:700; color:var(--text-dark); }
.start-time-optional { font-weight:400; color:var(--text-light); font-size:12px; }
.start-time-select { padding:8px 12px; border:1.5px solid var(--border-color); border-radius:8px; font-size:14px; font-family:"Nunito Sans",sans-serif; background:white; cursor:pointer; color:var(--text-dark); }
.start-time-select:focus { outline:none; border-color:var(--ignite); }
.start-time-hint { font-size:12px; color:var(--text-light); }

/* ── NOTIFY ALL BUTTON ───────────────────────────────────── */
.btn-notify-all { padding:4px 10px; background:#25D366; border:none; border-radius:6px; color:white; font-size:11px; font-weight:700; cursor:pointer; font-family:"Nunito Sans",sans-serif; transition:all .2s; white-space:nowrap; }
.btn-notify-all:hover { background:#128C7E; }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width:768px) {
  body { padding:12px; }
  .header { flex-direction:column; gap:12px; text-align:center; }
  .client-info { align-items:center; }
  .split-layout { flex-direction:column; height:auto; }
  .customer-panel { width:100%; height:280px; border-right:none; border-bottom:1px solid var(--border-color); }
  .google-map-split { height:380px; }
  .step-actions { grid-template-columns:1fr; }
  .whatsapp-input-group { flex-direction:column; }
  .btn-whatsapp { justify-content:center; }
  .selected-points-summary { flex-direction:column; gap:8px; }
  .map-controls-bar { flex-direction:column; }
  .map-control-divider { width:100%; height:1px; margin:4px 0; }
  .google-map-full { height:320px; }
  .landing-card { padding:32px 20px 24px; }
}
