/* ============================================================
   RYVO — booking + admin components (layers on top of style.css)
   ============================================================ */

/* ---- shared helpers ---- */
.app-section{ padding:48px 0 72px; }
.app-narrow{ max-width:760px; margin:0 auto; }
.muted{ color:var(--text-mid); }
.center{ text-align:center; }
.hide{ display:none !important; }

.alert{ padding:12px 16px; border-radius:var(--r-sm); font-size:.92rem; margin:14px 0;
  border:1px solid var(--line-2); background:var(--surface-2); color:var(--text); }
.alert.err{ background:#FDECEC; border-color:#F3C2C2; color:#9B1C1C; }
.alert.ok{ background:#E7F7F1; border-color:#B7E6D4; color:#0C6B4F; }

.pill{ display:inline-flex; align-items:center; gap:6px; padding:3px 11px; border-radius:var(--r-pill);
  font-size:.74rem; font-weight:700; letter-spacing:.04em; text-transform:uppercase; }
.pill.pending{ background:#FFF3E0; color:#B26A00; }
.pill.confirmed{ background:#E7F7F1; color:#0C6B4F; }
.pill.rejected{ background:#FDECEC; color:#9B1C1C; }
.pill.cancelled{ background:var(--surface-2); color:var(--text-dim); }

/* ---- auth banner (customer Google sign-in) ---- */
.auth-banner{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; justify-content:space-between;
  background:var(--surface-2); border:1px solid var(--line-2); border-radius:var(--r);
  padding:12px 16px; margin:0 0 22px; font-size:.92rem; color:var(--text-mid); }
.auth-banner b{ color:var(--text); }
.btn-google{ display:inline-flex; align-items:center; gap:9px; background:#fff; color:#3c4043;
  border:1.5px solid var(--line-2); border-radius:var(--r-pill); padding:9px 18px; font-family:'Sora',sans-serif;
  font-weight:600; font-size:.9rem; cursor:pointer; }
.btn-google:hover{ border-color:var(--line-2); box-shadow:var(--sh-sm); }
.btn-google .g{ width:17px; height:17px; display:inline-grid; place-items:center; border-radius:50%;
  background:conic-gradient(#EA4335 0 25%,#FBBC05 0 50%,#34A853 0 75%,#4285F4 0); color:#fff;
  font-weight:800; font-size:11px; }
.btn-google .g::after{ content:"G"; }

/* ---- stepper (customer booking) ---- */
.stepper{ display:flex; gap:10px; justify-content:center; margin:0 0 30px; flex-wrap:wrap; }
.stepper .step{ display:flex; align-items:center; gap:8px; font-size:.86rem; font-weight:600;
  color:var(--text-dim); }
.stepper .step b{ width:26px; height:26px; border-radius:50%; display:grid; place-items:center;
  background:var(--surface-2); color:var(--text-dim); font-size:.8rem; border:1px solid var(--line-2); }
.stepper .step.on{ color:var(--text); }
.stepper .step.on b{ background:var(--blue); color:#fff; border-color:var(--blue); }
.stepper .step.done b{ background:var(--ok); color:#fff; border-color:var(--ok); }

/* ---- trip-type choice ---- */
.triptype{ display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.triptype label{ cursor:pointer; border:1.5px solid var(--line-2); border-radius:var(--r);
  padding:18px; background:var(--surface); transition:.18s; display:block; }
.triptype label:hover{ border-color:var(--blue); }
.triptype input{ position:absolute; opacity:0; }
.triptype input:checked + label,
.triptype label.sel{ border-color:var(--blue); background:var(--mist); box-shadow:var(--sh-sm); }
.triptype strong{ display:block; font-size:1.05rem; margin-bottom:4px; }
.triptype span{ font-size:.88rem; color:var(--text-mid); }

/* ---- stops repeater ---- */
.stops-list{ display:flex; flex-direction:column; gap:10px; }
.stop-row{ display:flex; gap:8px; align-items:center; }
.stop-row input{ flex:1; }
.btn-ghost{ background:none; border:1px solid var(--line-2); color:var(--text-mid);
  border-radius:var(--r-sm); padding:9px 12px; cursor:pointer; font:inherit; }
.btn-ghost:hover{ border-color:var(--blue); color:var(--blue-700); }

/* ---- address autocomplete dropdown ---- */
.ac-list{ position:absolute; top:100%; left:0; right:0; z-index:60; background:var(--surface);
  border:1px solid var(--line-2); border-top:0; border-radius:0 0 var(--r-sm) var(--r-sm);
  box-shadow:var(--sh); max-height:260px; overflow:auto; }
.ac-list > div[data-i]{ padding:10px 13px; font-size:.9rem; cursor:pointer; border-bottom:1px solid var(--line); }
.ac-list > div[data-i]:hover, .ac-list > div[data-i].active{ background:var(--mist); }
.ac-pow{ font-size:.68rem; color:var(--text-dim); padding:6px 13px; text-align:right; }

/* ---- vehicle cards ---- */
.veh-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:18px; }
.veh-card{ border:1.5px solid var(--line); border-radius:var(--r); overflow:hidden;
  background:var(--surface); box-shadow:var(--sh-sm); transition:.18s; cursor:pointer; }
.veh-card:hover{ box-shadow:var(--sh); transform:translateY(-2px); }
.veh-card.sel{ border-color:var(--blue); box-shadow:var(--sh-blue); }
.veh-card .ph{ aspect-ratio:16/10; background:var(--surface-2); overflow:hidden; }
.veh-card .ph img{ width:100%; height:100%; object-fit:cover; display:block; }
.veh-card .body{ padding:13px 15px 16px; }
.veh-card h4{ margin:0 0 2px; font-size:1.02rem; }
.veh-card .yr{ color:var(--text-dim); font-size:.84rem; }
.veh-card .rates{ margin-top:10px; font-size:.84rem; color:var(--text-mid); display:flex;
  flex-direction:column; gap:3px; }
.veh-card .rates b{ color:var(--text); }

/* ---- route map ---- */
.route-map{ height:300px; border-radius:var(--r); overflow:hidden; border:1px solid var(--line-2);
  margin-top:12px; background:var(--surface-2); }
.route-map:empty{ display:none; }
.route-info{ font-size:.92rem; color:var(--text-mid); margin-top:14px; }
.route-info b{ color:var(--text); }
.route-info .err{ color:#9B1C1C; }
.maplibregl-ctrl-attrib{ font-size:10px; }

/* ---- fare box ---- */
.fare-box{ border:1.5px dashed var(--line-2); border-radius:var(--r); padding:18px 20px;
  background:var(--surface-2); margin-top:6px; }
.fare-box .row{ display:flex; justify-content:space-between; font-size:.92rem; padding:4px 0;
  color:var(--text-mid); }
.fare-box .total{ border-top:1px solid var(--line-2); margin-top:8px; padding-top:10px;
  font-size:1.25rem; font-weight:800; color:var(--text); }
.fare-box .total span:last-child{ color:var(--blue-700); }
.fare-note{ font-size:.8rem; color:var(--text-dim); margin-top:8px; }

/* ============================================================
   ADMIN
   ============================================================ */
.admin-login{ max-width:400px; margin:70px auto; }
.admin-topbar{ display:flex; justify-content:space-between; align-items:center; gap:16px;
  flex-wrap:wrap; margin-bottom:8px; }
.tabs{ display:flex; gap:4px; border-bottom:1px solid var(--line); margin:18px 0 26px; flex-wrap:wrap; }
.tabs button{ background:none; border:0; border-bottom:2px solid transparent; padding:11px 16px;
  font:inherit; font-weight:600; color:var(--text-mid); cursor:pointer; }
.tabs button.on{ color:var(--blue-700); border-bottom-color:var(--blue); }
.count-chip{ background:var(--blue); color:#fff; border-radius:var(--r-pill); font-size:.72rem;
  padding:1px 8px; margin-left:6px; font-weight:700; }

.data-table{ width:100%; border-collapse:collapse; font-size:.9rem; }
.data-table th{ text-align:left; font-size:.72rem; letter-spacing:.05em; text-transform:uppercase;
  color:var(--text-dim); padding:10px 12px; border-bottom:1px solid var(--line); }
.data-table td{ padding:12px; border-bottom:1px solid var(--line); vertical-align:top; }
.data-table tr:hover td{ background:var(--surface-2); }
.data-table .thumb{ width:62px; height:42px; border-radius:8px; object-fit:cover; background:var(--surface-2); }

.booking-card{ border:1px solid var(--line); border-radius:var(--r); padding:18px 20px;
  margin-bottom:14px; background:var(--surface); box-shadow:var(--sh-sm); }
.booking-card .top{ display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap;
  align-items:flex-start; }
.booking-card h4{ margin:0 0 2px; }
.booking-card .meta{ font-size:.85rem; color:var(--text-mid); line-height:1.7; margin-top:8px; }
.booking-card .meta b{ color:var(--text); font-weight:600; }
.booking-card .actions{ display:flex; gap:8px; margin-top:14px; flex-wrap:wrap; align-items:center; }

/* ---- calendar ---- */
.cal-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; }
.cal-grid{ display:grid; grid-template-columns:repeat(7,1fr); gap:6px; }
.cal-grid .dow{ text-align:center; font-size:.72rem; font-weight:700; color:var(--text-dim);
  text-transform:uppercase; letter-spacing:.05em; padding-bottom:4px; }
.cal-cell{ aspect-ratio:1/1; border:1px solid var(--line); border-radius:10px; padding:7px 8px;
  font-size:.82rem; display:flex; flex-direction:column; justify-content:space-between;
  background:var(--surface); }
.cal-cell.empty{ border:0; background:none; }
.cal-cell.past{ color:var(--text-dim); background:var(--surface-2); opacity:.6; }
.cal-cell .n{ font-weight:700; }
.cal-cell .tag{ font-size:.66rem; font-weight:700; text-transform:uppercase; letter-spacing:.03em; }
.cal-cell.free .tag{ color:var(--ok); }
.cal-cell.partial{ background:#FFF3E0; border-color:#F3D9A8; }
.cal-cell.partial .tag{ color:#B26A00; }
.cal-cell.full{ background:#FDECEC; border-color:#F3C2C2; }
.cal-cell.full .tag{ color:#9B1C1C; }
.cal-legend{ display:flex; gap:16px; flex-wrap:wrap; margin-top:14px; font-size:.82rem;
  color:var(--text-mid); }
.cal-legend span{ display:inline-flex; align-items:center; gap:6px; }
.cal-legend i{ width:13px; height:13px; border-radius:4px; display:inline-block; border:1px solid var(--line-2); }

/* ---- modal ---- */
.modal-bg{ position:fixed; inset:0; background:rgba(14,19,32,.55); display:grid; place-items:center;
  padding:20px; z-index:200; }
.modal{ background:var(--surface); border-radius:var(--r-lg); box-shadow:var(--sh-lg); width:100%;
  max-width:520px; max-height:90vh; overflow:auto; padding:26px 28px; }
.modal h3{ margin:0 0 18px; }
.modal .row2{ display:grid; grid-template-columns:1fr 1fr; gap:14px; }

@media (max-width:640px){
  .triptype{ grid-template-columns:1fr; }
  .modal .row2{ grid-template-columns:1fr; }
  .data-table .hide-sm{ display:none; }
}
