/* ── ORLUX TRIP PORTAL — STYLES ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --purple:    #6B46C1;
  --purple-dk: #553799;
  --purple-lt: #f0ebff;
  --dark:      #111111;
  --gray:      #6b6b6b;
  --gray-lt:   #f5f5f7;
  --border:    #e8e8e8;
  --white:     #ffffff;
  --green:     #16a34a;
  --green-lt:  #dcfce7;
  --radius:    16px;
  --pill:      50px;
}

body { font-family: 'Poppins', sans-serif; background: #ededf0; color: var(--dark); min-height: 100vh; -webkit-font-smoothing: antialiased; }

/* -- BRAND HEADER -- */
.otm-topbar { position: sticky; top: 0; z-index: 100; background: #fff; border-bottom: 1px solid #e8e8e8; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.otm-topbar-inner { max-width: 600px; margin: 0 auto; height: 64px; padding: 0 18px; display: flex; align-items: center; justify-content: center; }
.otm-brand { display: inline-flex; align-items: center; }
.otm-brand img { height: 42px; width: auto; display: block; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ── HERO ─────────────────────────────────────────────────────────── */
.hero { background: linear-gradient(150deg, #0e0422 0%, #1e0a48 50%, #0e0422 100%); padding: 44px 24px 38px; text-align: center; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 70% 50% at 50% 110%, rgba(107,70,193,0.22) 0%, transparent 65%); pointer-events: none; }

.status-pill { display: inline-flex; align-items: center; gap: 7px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.13em; padding: 6px 15px; border-radius: 50px; margin-bottom: 20px; background: var(--green-lt); color: var(--green); position: relative; z-index: 1; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: blink 2.2s ease-in-out infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.25} }

.hero-greeting { font-size: clamp(22px, 5vw, 28px); font-weight: 800; color: #fff; letter-spacing: -0.01em; margin-bottom: 8px; position: relative; z-index: 1; line-height: 1.2; }
.hero-date { font-size: 13.5px; color: rgba(255,255,255,0.45); font-weight: 400; position: relative; z-index: 1; }

.conf-badge { display: inline-block; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.11); border-radius: 12px; padding: 12px 28px; margin-top: 22px; position: relative; z-index: 1; }
.conf-badge-label { font-size: 9px; font-weight: 600; color: rgba(255,255,255,0.35); text-transform: uppercase; letter-spacing: 0.14em; margin-bottom: 3px; }
.conf-badge-number { font-size: 22px; font-weight: 800; color: #fff; letter-spacing: 0.07em; }

/* ── LAYOUT ──────────────────────────────────────────────────────── */
.main { max-width: 600px; margin: 0 auto; padding: 22px 14px 56px; }
.sec-label { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.15em; color: #b0b0b0; margin: 24px 4px 10px; }

/* ── CARD ────────────────────────────────────────────────────────── */
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.card-head { padding: 14px 20px 13px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.card-icon { width: 30px; height: 30px; border-radius: 9px; background: var(--purple-lt); color: var(--purple); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.card-icon svg { width: 15px; height: 15px; }
.card-title { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.11em; color: var(--gray); flex: 1; }
.duration-pill { display: inline-flex; align-items: center; gap: 5px; background: var(--gray-lt); border: 1px solid var(--border); border-radius: 50px; padding: 4px 11px; font-size: 11px; font-weight: 600; color: var(--gray); }
.duration-pill svg { width: 12px; height: 12px; }
.card-body { padding: 20px 22px; }

/* ── ROUTE ───────────────────────────────────────────────────────── */
.route-wrap { display: flex; flex-direction: column; }
.route-row { display: flex; gap: 14px; }
.route-spine { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; width: 28px; }
.r-marker { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 13px; font-weight: 800; line-height: 1; margin-top: -2px; }
.r-marker svg { width: 15px; height: 15px; }
.r-marker.start { background: var(--purple); color: #fff; box-shadow: 0 0 0 4px var(--purple-lt); }
.r-marker.stop  { background: #fff; color: var(--purple); border: 2px solid var(--purple); box-shadow: 0 0 0 3px var(--purple-lt); }
.r-marker.end   { background: var(--dark); color: #fff; box-shadow: 0 0 0 4px #ebebeb; }
.r-line { width: 2px; flex: 1; min-height: 26px; margin: 6px 0; background: repeating-linear-gradient(to bottom, #ccc 0, #ccc 5px, transparent 5px, transparent 9px); }
.route-content { padding-bottom: 20px; flex: 1; }
.route-content:last-child { padding-bottom: 0; }
.r-tag { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.13em; color: var(--purple); margin-bottom: 4px; }
.r-tag.stop-tag { color: #9ca3af; }
.r-tag.end { color: var(--dark); }
.r-place { font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--dark); }
.r-time  { font-size: 12.5px; color: var(--gray); margin-top: 4px; }

/* ── MAPS EMBED ─────────────────────────────────────────────────── */
.maps-embed-wrap { margin: 18px 0 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.maps-embed { width: 100%; height: 240px; border: none; display: block; }

/* ── MAPS BUTTON ────────────────────────────────────────────────── */
.maps-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 10px; padding: 11px 18px; border-radius: var(--pill); border: 1.5px solid var(--border); background: var(--gray-lt); font-family: 'Poppins', sans-serif; font-size: 13px; font-weight: 600; color: var(--dark); text-decoration: none; transition: all .2s; }
.maps-btn:hover { border-color: #4285f4; color: #4285f4; background: #f0f4ff; }
.maps-btn svg { width: 16px; height: 16px; }
.maps-pin { color: #ea4335; }

/* ── INFO GRID ──────────────────────────────────────────────────── */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.info-full { grid-column: 1 / -1; }
.info-label { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.13em; color: #b5b5b5; margin-bottom: 5px; }
.info-val { font-size: 15px; font-weight: 600; color: var(--dark); line-height: 1.3; }
.info-val.notes { font-size: 13.5px; font-weight: 400; color: var(--gray); line-height: 1.6; }
.info-time { font-size: 13px; font-weight: 500; color: var(--purple); margin-top: 3px; }
.flight-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.flight-airline { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--purple); }
.flight-num { font-size: 22px; font-weight: 800; color: var(--dark); letter-spacing: 0.04em; margin-top: 2px; }
.flight-arr { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--gray); margin-top: 6px; }
.flight-arr svg { width: 13px; height: 13px; flex-shrink: 0; }
.flight-track-btn { display: inline-flex; align-items: center; gap: 7px; background: var(--purple); color: #fff; font-size: 13px; font-weight: 600; padding: 10px 18px; border-radius: var(--pill); text-decoration: none; transition: all .2s; white-space: nowrap; flex-shrink: 0; }
.flight-track-btn svg { width: 15px; height: 15px; }
.flight-track-btn:hover { background: var(--purple-dk); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(107,70,193,0.3); }
.flight-note { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--green); background: var(--green-lt); border-radius: 10px; padding: 9px 12px; margin-top: 14px; }
.flight-note svg { width: 14px; height: 14px; flex-shrink: 0; }
.inv-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.inv-amt-label { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.13em; color: #b5b5b5; }
.inv-amt { font-size: 28px; font-weight: 800; color: var(--dark); letter-spacing: -0.01em; margin-top: 3px; }
.inv-status { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 6px 13px; border-radius: var(--pill); white-space: nowrap; }
.inv-status.inv-unpaid { background: #fef3c7; color: #b45309; }
.inv-status.inv-deposit { background: #dbeafe; color: #2563eb; }
.inv-status.inv-paid { background: var(--green-lt); color: #166534; }
.inv-status.inv-refunded { background: #f3f4f6; color: #6b7280; }
.inv-confirmed { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--green); margin-bottom: 12px; }
.inv-confirmed svg { width: 15px; height: 15px; flex-shrink: 0; }
.inv-confirm-hint { font-size: 12px; color: var(--gray); text-align: center; margin-top: 10px; }
.inv-note { font-size: 13px; color: var(--gray); text-align: center; padding: 6px 4px; line-height: 1.5; }
.inv-note.paid { color: var(--green); font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 7px; }
.inv-note svg { width: 15px; height: 15px; flex-shrink: 0; }
.inv-err { font-size: 12px; color: #dc2626; text-align: center; margin-top: 8px; }
.cal-menu { display: flex; flex-direction: row; gap: 8px; }
.cal-opt { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 12px 6px; border-radius: 14px; border: 1.5px solid var(--border); background: #fff; font-family: 'Poppins', sans-serif; font-size: 11.5px; font-weight: 600; color: var(--dark); text-decoration: none; cursor: pointer; transition: all .2s; }
.cal-opt svg { width: 19px; height: 19px; flex-shrink: 0; }
.cal-opt:hover { border-color: var(--purple); color: var(--purple); }

/* ── VEHICLE ────────────────────────────────────────────────────── */
.vehicle-row { display: flex; align-items: center; gap: 18px; }
.v-img-box { width: 120px; height: 88px; background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; flex-shrink: 0; display: flex; align-items: center; justify-content: center; padding: 8px; }
.v-img-box img { width: 100%; height: 100%; object-fit: contain; }
.v-name  { font-size: 16px; font-weight: 700; line-height: 1.25; }
.v-desc  { font-size: 12.5px; color: var(--gray); margin-top: 5px; }
.v-badge { display: inline-block; background: var(--purple-lt); color: var(--purple); font-size: 9.5px; font-weight: 700; padding: 3px 10px; border-radius: 5px; text-transform: uppercase; letter-spacing: 0.08em; margin-top: 8px; }
.v-features { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.v-features-label { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.13em; color: #b5b5b5; margin-bottom: 10px; }
.v-features-grid { display: flex; flex-wrap: wrap; gap: 7px; }
.v-chip { display: inline-flex; align-items: center; gap: 5px; background: var(--gray-lt); border: 1px solid var(--border); border-radius: 50px; padding: 5px 11px; font-size: 11.5px; font-weight: 500; color: var(--dark); }
.v-chip svg { width: 12px; height: 12px; color: var(--purple); flex-shrink: 0; }

/* ── DRIVER ─────────────────────────────────────────────────────── */
.driver-row { display: flex; align-items: center; gap: 16px; }
.driver-av { width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg, #e9e0ff, #d1beff); color: var(--purple); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.driver-av svg { width: 24px; height: 24px; }
.driver-name { font-size: 16px; font-weight: 700; }
.driver-sub  { font-size: 10.5px; color: var(--gray); margin-top: 2px; text-transform: uppercase; letter-spacing: 0.09em; }
.driver-phone { display: inline-flex; align-items: center; gap: 6px; margin-top: 7px; font-size: 15px; font-weight: 700; color: var(--purple); text-decoration: none; }
.driver-phone svg { width: 14px; height: 14px; }
.driver-actions { display: flex; gap: 8px; margin-top: 12px; }
.driver-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: var(--pill); font-family: 'Poppins', sans-serif; font-size: 12.5px; font-weight: 600; text-decoration: none; border: 1.5px solid var(--border); color: var(--dark); background: #fff; transition: all .2s; }
.driver-btn svg { width: 13px; height: 13px; }
.driver-btn.call:hover { border-color: var(--purple); color: var(--purple); }
.driver-btn.sms:hover  { border-color: var(--green);  color: var(--green); }
.pending-box { background: var(--gray-lt); border-radius: 12px; padding: 22px 18px; text-align: center; color: var(--gray); }
.pending-box svg { width: 28px; height: 28px; margin-bottom: 10px; opacity: 0.5; }
.pending-title { font-size: 14px; font-weight: 600; color: #444; margin-bottom: 5px; }
.pending-sub { font-size: 12.5px; color: var(--gray); line-height: 1.55; }

/* ── NEXT STEPS ─────────────────────────────────────────────────── */
.steps-card { display: none; }
.steps-card.visible { display: block; }
.steps-list { display: flex; flex-direction: column; gap: 16px; }
.step-row { display: flex; gap: 14px; align-items: flex-start; }
.step-num { width: 26px; height: 26px; border-radius: 50%; background: var(--purple-lt); color: var(--purple); font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; }
.step-title { font-size: 13.5px; font-weight: 600; color: var(--dark); margin-bottom: 2px; }
.step-desc  { font-size: 12px; color: var(--gray); line-height: 1.55; }

/* ── BUTTONS ────────────────────────────────────────────────────── */
.action-wrap { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.btn { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; padding: 16px 28px; border-radius: var(--pill); font-family: 'Poppins', sans-serif; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; border: none; transition: all 0.2s; letter-spacing: 0.02em; }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-purple  { background: var(--purple); color: #fff; }
.btn-purple:hover  { background: var(--purple-dk); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(107,70,193,0.3); }
.btn-dark    { background: var(--dark); color: #fff; }
.btn-dark:hover    { background: #2a2a2a; transform: translateY(-1px); }
.btn-outline { background: #fff; color: var(--dark); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--purple); color: var(--purple); }

/* ── FOOTER ─────────────────────────────────────────────────────── */
.footer { text-align: center; padding: 28px 0 12px; }
.footer-label { font-size: 12.5px; color: #bbb; margin-bottom: 14px; }
.footer-links { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.footer-link { display: inline-flex; align-items: center; gap: 7px; background: #fff; border: 1.5px solid var(--border); border-radius: 50px; padding: 9px 18px; font-size: 12.5px; font-weight: 600; color: var(--dark); text-decoration: none; transition: all .2s; }
.footer-link:hover { border-color: var(--purple); color: var(--purple); }
.footer-link svg { width: 15px; height: 15px; flex-shrink: 0; }
.footer-copy { text-align: center; color: #9ca3af; font-size: 11.5px; margin-top: 14px; line-height: 1.5; }

.trip-tabs { display: flex; gap: 8px; margin: 0 0 6px; overflow-x: auto; padding: 2px 0; -webkit-overflow-scrolling: touch; }
.trip-tab { flex-shrink: 0; padding: 9px 20px; border-radius: var(--pill); border: 1.5px solid var(--border); background: #fff; font-family: 'Poppins', sans-serif; font-size: 13px; font-weight: 600; color: var(--gray); cursor: pointer; transition: all .2s; white-space: nowrap; }
.trip-tab.active { background: var(--purple); color: #fff; border-color: var(--purple); }
.trip-tab:hover:not(.active) { border-color: var(--purple); color: var(--purple); }

/* ===== v1.4.2: customer change-request list ===== */
.cr-list { display: flex; flex-direction: column; gap: 12px; }
.cr-item { border: 1px solid #eee; border-radius: 12px; padding: 12px 14px; background: #fafafa; }
.cr-item-top { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.cr-status { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 3px 10px; border-radius: 50px; }
.cr-pending { background: #fef3c7; color: #b45309; }
.cr-resolved { background: #dcfce7; color: #16a34a; }
.cr-date { font-size: 12px; color: #9ca3af; }
.cr-item-msg { font-size: 13.5px; color: #333; line-height: 1.5; word-break: break-word; }

/* ===== v1.4.8: gold review stars ===== */
.review-stars { display: flex; justify-content: center; gap: 4px; margin: 0 0 12px; }
.review-stars svg { width: 24px; height: 24px; display: block; }

/* gratuity note in invoice card (v1.10.0) */
.inv-grat{display:flex;align-items:center;gap:9px;margin:2px 0 18px;padding:12px 14px;border-radius:12px;background:#f3fbf6;border:1px solid #cdeedd;color:#15803d;font-size:12.5px;font-weight:600;line-height:1.45}
.inv-grat.sep{background:#fdfaf1;border-color:#f0e4c2;color:#946008}
.inv-grat-dot{width:7px;height:7px;border-radius:50%;background:currentColor;flex-shrink:0}

/* ===== v1.10.1: premium polish + transitions ===== */
/* cards: softer elevation + larger radius */
.card{border-radius:18px;box-shadow:0 2px 14px rgba(17,17,30,.06),0 1px 3px rgba(17,17,30,.04);transition:box-shadow .25s ease}
.card-icon{transition:transform .2s ease}

/* crisper pills (defined edges) */
.inv-status.inv-unpaid{border:1px solid #f6e0a6}
.inv-status.inv-deposit{border:1px solid #c1d9fc}
.inv-status.inv-paid{border:1px solid #bbf7d0}
.inv-status.inv-refunded{border:1px solid #e0e4ea}
.cr-pending{border:1px solid #f6e0a6}
.cr-resolved{border:1px solid #bbf7d0}

/* premium primary CTA with resting depth + tactile press */
.btn-purple{box-shadow:0 4px 16px rgba(107,70,193,.24)}
.btn,.trip-tab,.cal-opt,.footer-link,.driver-btn,.maps-btn,.flight-track-btn,.v-chip{transition:all .2s cubic-bezier(.22,1,.36,1)}
.btn:active,.trip-tab:active,.cal-opt:active,.footer-link:active,.driver-btn:active,.maps-btn:active,.flight-track-btn:active{transform:scale(.97)}

/* content reveal + section rise */
#otm-portal-content{animation:otmFadeIn .4s ease both}
.hero,.main>*{animation:otmRise .45s cubic-bezier(.22,1,.36,1) both}
@keyframes otmFadeIn{from{opacity:0}to{opacity:1}}
@keyframes otmRise{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}

/* trip-panel fades when a tab is selected */
.trip-panel{animation:otmRise .4s cubic-bezier(.22,1,.36,1) both}

/* change-request modal: overlay fade + sheet slide-up */
#otm-modal-overlay{animation:otmOverlayIn .2s ease both}
#otm-modal{animation:otmModalUp .32s cubic-bezier(.22,1,.36,1) both}
@keyframes otmOverlayIn{from{opacity:0}to{opacity:1}}
@keyframes otmModalUp{from{transform:translateY(100%)}to{transform:translateY(0)}}

/* respect reduced motion */
@media (prefers-reduced-motion:reduce){
  #otm-portal-content,.hero,.main>*,.trip-panel,#otm-modal,#otm-modal-overlay{animation:none}
  *{transition-duration:.01ms !important}
}

/* v1.13.1: hide the trip-tabs scrollbar (keep horizontal scroll) */
.trip-tabs{scrollbar-width:none;-ms-overflow-style:none}
.trip-tabs::-webkit-scrollbar{display:none;width:0;height:0}
