/* =============================================
   Travel Planner – Mobile App Design System
   ============================================= */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --primary-soft: #eff6ff;
  --secondary: #8b5cf6;
  --success: #16a34a;
  --success-light: #dcfce7;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --danger: #ef4444;
  --danger-light: #fee2e2;

  --bg: #e9eefb;
  --bg-grad: linear-gradient(180deg, #eef2fc 0%, #e6ecfa 100%);
  --card: #ffffff;
  --text: #1e293b;
  --text-muted: #94a3b8;
  --text-soft: #64748b;
  --border: #eef1f6;

  --radius-xl: 24px;
  --radius-lg: 20px;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow-sm: 0 2px 8px rgba(30,41,59,.05);
  --shadow: 0 6px 20px rgba(30,41,59,.07);
  --shadow-lg: 0 12px 32px rgba(30,41,59,.12);
  --shadow-blue: 0 8px 24px rgba(37,99,235,.35);

  --app-w: 480px;
  --font: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; -webkit-tap-highlight-color: transparent; }
body {
  font-family: var(--font);
  background: var(--bg-grad);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, select, textarea { font-family: inherit; }
img { max-width: 100%; display: block; }
.hidden { display: none !important; }
::-webkit-scrollbar { width: 0; height: 0; }

/* =============================================
   App Container – centered phone column
   ============================================= */
.app-mobile {
  max-width: var(--app-w);
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg-grad);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 60px rgba(30,41,59,.08);
}

/* =============================================
   App Header
   ============================================= */
.app-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 22px 20px 10px;
  position: sticky;
  top: 0;
  z-index: 40;
  background: #eef2fc;
}
.header-logo {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 13px; flex-shrink: 0; margin-top: 2px;
  background: var(--card); box-shadow: var(--shadow-sm);
  overflow: hidden; font-size: 16px; color: var(--text);
}
.header-logo img { width: 30px; height: 30px; }
.header-logo.back { background: var(--card); }
.header-logo:active { transform: scale(.94); }
/* Logo brand tanpa kotak/outline putih */
.header-logo.brand { background: transparent; box-shadow: none; color: var(--primary); font-size: 26px; width: auto; }
.brand-title { font-size: 19px; font-weight: 800; letter-spacing: -.3px; color: var(--text); }
.header-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  flex-shrink: 0; background: linear-gradient(135deg, var(--primary), var(--secondary));
  background-size: cover; background-position: center;
  color: #fff; font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm); border: 2px solid #fff;
}
.header-avatar:active { transform: scale(.94); }
.header-greeting { flex: 1; min-width: 0; }
.header-greeting h1 { font-size: 22px; font-weight: 800; letter-spacing: -.5px; line-height: 1.1; }
.header-greeting p { font-size: 13.5px; color: var(--text-soft); margin-top: 3px; }
.header-bell {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; color: var(--text);
  background: var(--card);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  position: relative;
  flex-shrink: 0;
}
.header-bell .bell-dot {
  position: absolute; top: 11px; right: 12px;
  width: 9px; height: 9px;
  background: var(--danger);
  border: 2px solid var(--card);
  border-radius: 50%;
}

/* =============================================
   Scroll Area
   ============================================= */
.app-scroll {
  flex: 1;
  padding: 6px 20px 100px;
  overflow-y: auto;
}
.page-title-row {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px;
}
.page-title-row h2 { font-size: 20px; font-weight: 800; letter-spacing: -.4px; flex: 1; }
.back-btn {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: var(--card); border-radius: 12px;
  font-size: 15px; color: var(--text);
  box-shadow: var(--shadow-sm);
}

/* =============================================
   Hero Trip Card
   ============================================= */
.hero-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px;
  color: #fff;
  box-shadow: var(--shadow-lg);
  margin-bottom: 18px;
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
}
.hero-bg {
  position: absolute; inset: 0;
  object-fit: cover;
  width: 100%; height: 100%;
  z-index: 0;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,23,42,.15) 0%, rgba(15,23,42,.05) 40%, rgba(15,23,42,.55) 100%);
  z-index: 1;
}
.hero-content { position: relative; z-index: 2; }

/* ===== Animasi cuaca dramatis di kartu hero ===== */
.hero-fx { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; border-radius: inherit; }
.hero-card.hero-night .hero-fx { background: linear-gradient(180deg, rgba(2,6,23,.5), rgba(2,6,23,.3)); }
.hero-card.wx-cloud .hero-fx { background: rgba(30,41,59,.16); }
.hero-card.wx-rain  .hero-fx { background: rgba(15,23,42,.34); }
.hero-card.wx-storm .hero-fx { background: rgba(10,14,30,.46); }
.hero-card.wx-fog   .hero-fx { background: rgba(226,232,240,.18); }
.hero-card.wx-rain .hero-content, .hero-card.wx-storm .hero-content, .hero-card.hero-night .hero-content { text-shadow: 0 1px 6px rgba(0,0,0,.55); }

/* Matahari: glow + sinar berputar */
.hero-sun { position: absolute; top: -50px; right: -30px; width: 170px; height: 170px; border-radius: 50%; mix-blend-mode: screen; background: radial-gradient(circle, rgba(255,241,170,.95), rgba(255,205,90,.35) 45%, transparent 70%); animation: heroSunPulse 4s ease-in-out infinite; }
.hero-rays { position: absolute; top: -110px; right: -90px; width: 320px; height: 320px; border-radius: 50%; mix-blend-mode: screen; opacity: .8; background: repeating-conic-gradient(from 0deg, rgba(255,238,150,.28) 0deg 6deg, transparent 6deg 26deg); animation: heroSpin 24s linear infinite; }
@keyframes heroSunPulse { 0%,100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.08); opacity: 1; } }
@keyframes heroSpin { to { transform: rotate(360deg); } }

/* Awan melayang */
.hero-cloud { position: absolute; border-radius: 50%; filter: blur(6px); opacity: .55; will-change: transform; background: radial-gradient(circle at 50% 60%, rgba(255,255,255,.85), rgba(255,255,255,.35) 60%, transparent 75%); }
.hero-cloud.c1 { width: 180px; height: 70px; top: 14%; animation: heroCloud 26s linear infinite; }
.hero-cloud.c2 { width: 240px; height: 90px; top: 4%; opacity: .4; animation: heroCloud 38s linear infinite; animation-delay: -10s; }
.hero-cloud.c3 { width: 140px; height: 56px; top: 28%; opacity: .5; animation: heroCloud 30s linear infinite; animation-delay: -18s; }
.hero-card.wx-cloud .hero-cloud, .hero-card.wx-rain .hero-cloud, .hero-card.wx-storm .hero-cloud { opacity: .72; }
@keyframes heroCloud { from { transform: translateX(-60%); } to { transform: translateX(440px); } }

/* Hujan */
.hero-rainwrap { position: absolute; inset: -10% -5%; transform: rotate(12deg); }
.hero-drop { position: absolute; top: -24px; width: 1.6px; border-radius: 2px; background: linear-gradient(transparent, rgba(255,255,255,.85)); will-change: transform; animation-name: heroDrop; animation-timing-function: linear; animation-iteration-count: infinite; }
@keyframes heroDrop { from { transform: translateY(-24px); } to { transform: translateY(400px); } }

/* Kilat */
.hero-flash { position: absolute; inset: 0; opacity: 0; background: radial-gradient(circle at 70% 18%, rgba(255,255,255,.9), rgba(255,255,255,.3) 40%, transparent 72%); animation: heroFlash 7s linear infinite; }
@keyframes heroFlash { 0%,89% { opacity: 0; } 90.5% { opacity: .85; } 92% { opacity: .12; } 93.5% { opacity: .7; } 96% { opacity: 0; } 100% { opacity: 0; } }
.hero-bolt { position: absolute; top: 10%; left: 58%; width: 26px; height: 64px; opacity: 0; background: #fff; box-shadow: 0 0 10px #fff, 0 0 22px #bfdbfe; clip-path: polygon(45% 0, 100% 0, 58% 42%, 92% 42%, 18% 100%, 52% 50%, 8% 50%); animation: heroBolt 7s linear infinite; }
@keyframes heroBolt { 0%,89% { opacity: 0; } 90.5% { opacity: 1; } 92% { opacity: .15; } 93.5% { opacity: 1; } 96% { opacity: 0; } 100% { opacity: 0; } }

/* Kabut */
.hero-fog { position: absolute; left: -20%; right: -20%; height: 34%; filter: blur(4px); background: linear-gradient(180deg, transparent, rgba(226,232,240,.55), transparent); animation: heroFog 14s ease-in-out infinite; }
.hero-fog.f1 { top: 18%; } .hero-fog.f2 { top: 44%; opacity: .8; animation-delay: -5s; } .hero-fog.f3 { top: 68%; opacity: .6; animation-delay: -9s; }
@keyframes heroFog { 0%,100% { transform: translateX(-8%); } 50% { transform: translateX(8%); } }

/* Salju */
.hero-flake { position: absolute; top: -10px; border-radius: 50%; background: #fff; opacity: .9; box-shadow: 0 0 4px rgba(255,255,255,.8); animation-name: heroFlake; animation-timing-function: linear; animation-iteration-count: infinite; }
@keyframes heroFlake { from { transform: translateY(-10px) translateX(0); } to { transform: translateY(400px) translateX(22px); } }

@media (prefers-reduced-motion: reduce) { .hero-sun,.hero-rays,.hero-cloud,.hero-drop,.hero-flash,.hero-bolt,.hero-fog,.hero-flake { animation: none !important; } }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px; font-weight: 600;
  box-shadow: 0 4px 12px rgba(37,99,235,.4);
  margin-bottom: 12px;
}
.hero-title { font-size: 28px; font-weight: 800; letter-spacing: -.6px; line-height: 1.1; }
.hero-date {
  display: flex; align-items: center; gap: 7px;
  font-size: 13.5px; color: rgba(255,255,255,.9);
  margin-top: 6px; font-weight: 500;
}
.hero-bottom {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 16px; gap: 12px;
}
.countdown {
  display: inline-flex; align-self: flex-start;
  background: rgba(255,255,255,.14);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 16px;
  padding: 9px 4px;
  box-shadow: 0 6px 20px rgba(0,0,0,.18);
}
.countdown-unit {
  text-align: center;
  padding: 1px 15px;
  position: relative;
}
.countdown-unit:not(:last-child)::after {
  content: ''; position: absolute; right: 0; top: 18%; bottom: 18%;
  width: 1px; background: rgba(255,255,255,.22);
}
.countdown-num { font-size: 22px; font-weight: 800; color: #fff; line-height: 1; letter-spacing: -.5px; text-shadow: 0 1px 4px rgba(0,0,0,.35); }
.countdown-label { font-size: 8.5px; font-weight: 700; color: rgba(255,255,255,.78); letter-spacing: 1.5px; margin-top: 6px; text-transform: uppercase; }
.hero-members { display: flex; align-items: center; }
.hero-members .member-av {
  width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid #fff; object-fit: cover;
  margin-left: -10px;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff;
}
.hero-members .member-av:first-child { margin-left: 0; }
.hero-members .member-more {
  width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid #fff; margin-left: -10px;
  background: #fff; color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}

/* =============================================
   Section Card (generic white rounded)
   ============================================= */
.sec-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}
.sec-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.sec-head h3 { font-size: 16px; font-weight: 700; letter-spacing: -.3px; }
.sec-link {
  font-size: 13px; font-weight: 600; color: var(--primary);
  display: inline-flex; align-items: center; gap: 4px;
}

/* =============================================
   Budget Overview
   ============================================= */
.budget-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.bh-label { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.bh-amount { font-size: 28px; font-weight: 800; letter-spacing: -1px; line-height: 1.1; margin-top: 3px; color: var(--text); }
.bh-pct { display: flex; flex-direction: column; align-items: flex-end; font-size: 22px; font-weight: 800; line-height: 1; letter-spacing: -.5px; }
.bh-pct span { font-size: 10px; font-weight: 600; color: var(--text-muted); margin-top: 3px; letter-spacing: 0; }
.pct-success { color: #16a34a; } .pct-warning { color: #ca8a04; } .pct-danger { color: #ef4444; }
.budget-bar { height: 10px; border-radius: 20px; background: #eef1f6; overflow: hidden; }
.budget-bar-fill { height: 100%; border-radius: 20px; transition: width .6s ease; }
.bf-success { background: linear-gradient(90deg, #22c55e, #16a34a); }
.bf-warning { background: linear-gradient(90deg, #fbbf24, #d97706); }
.bf-danger  { background: linear-gradient(90deg, #f87171, #dc2626); }
.budget-chips { display: flex; gap: 10px; margin-top: 14px; }
.bchip { flex: 1; display: flex; align-items: center; gap: 9px; background: #f8fafc; border-radius: 12px; padding: 9px 11px; }
.bchip-ic { width: 32px; height: 32px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; }
.bchip-l { font-size: 10.5px; color: var(--text-muted); font-weight: 500; }
.bchip-v { font-size: 13.5px; font-weight: 700; letter-spacing: -.3px; white-space: nowrap; }

/* =============================================
   Today's Plan + Weather (two cards)
   ============================================= */
.plan-row { display: grid; grid-template-columns: 1.35fr 1fr; gap: 12px; margin-bottom: 18px; }
.plan-card {
  background: var(--success-light);
  border-radius: var(--radius);
  padding: 14px;
  position: relative;
  display: flex; flex-direction: column;
}
.plan-card .plan-time {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; color: var(--success);
  margin-bottom: 8px;
}
.plan-card .plan-title { font-size: 14.5px; font-weight: 700; line-height: 1.25; }
.plan-card .plan-loc { font-size: 12px; color: var(--text-soft); margin-top: 4px; display: flex; align-items: center; gap: 4px; }
.plan-card .plan-thumb {
  position: absolute; top: 12px; right: 12px;
  width: 52px; height: 52px; border-radius: 12px; object-fit: cover;
}
/* When a destination photo is loaded as background */
.plan-card.has-img {
  background-size: cover; background-position: center;
  border: none; min-height: 116px;
}
.plan-card.has-img .plan-time { color: #fff; }
.plan-card.has-img .plan-title { color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.4); }
.plan-card.has-img .plan-loc { color: rgba(255,255,255,.92); }
.weather-card {
  background: var(--primary-soft);
  border-radius: var(--radius);
  padding: 14px;
  display: flex; flex-direction: column;
}
.weather-card .w-label { font-size: 11.5px; color: var(--text-soft); font-weight: 500; }
.weather-card .w-temp { font-size: 30px; font-weight: 800; letter-spacing: -1px; line-height: 1.1; margin-top: 2px; }
.weather-card .w-cond { font-size: 12px; color: var(--text-soft); margin-top: auto; }
.weather-card .w-icon { position: absolute; }
.weather-card .w-top { display: flex; justify-content: space-between; align-items: flex-start; }
.weather-card .w-emoji { font-size: 30px; }

/* =============================================
   Quick Grid Menu
   ============================================= */
.quick-grid {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 18px 10px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px 6px;
  margin-bottom: 18px;
}
.quick-item {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: none; border: 0; cursor: pointer;
  transition: transform .12s;
}
.quick-item:active { transform: scale(.9); }
.quick-icon {
  width: 48px; height: 48px; border-radius: 15px;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px;
}
.quick-item:hover .quick-icon { filter: brightness(.97); }
.quick-label { font-size: 11px; font-weight: 600; color: var(--text-soft); text-align: center; line-height: 1.15; }

/* Quick icon colors */
.qc-red    { background: #fee2e2; color: #ef4444; }
.qc-green  { background: #dcfce7; color: #16a34a; }
.qc-blue   { background: #dbeafe; color: #2563eb; }
.qc-orange { background: #ffedd5; color: #ea580c; }
.qc-purple { background: #ede9fe; color: #7c3aed; }
.qc-sky    { background: #e0f2fe; color: #0284c7; }
.qc-pink   { background: #fce7f3; color: #db2777; }
.qc-yellow { background: #fef9c3; color: #ca8a04; }
.qc-teal   { background: #ccfbf1; color: #0d9488; }
.qc-gray   { background: #f1f5f9; color: #64748b; }

/* =============================================
   Recent Expenses
   ============================================= */
.expense-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.expense-row:last-child { border-bottom: none; }
.expense-icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.expense-info { flex: 1; min-width: 0; }
.expense-name { font-size: 14px; font-weight: 600; }
.expense-sub { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.expense-amt { text-align: right; }
.expense-amt .amt { font-size: 14px; font-weight: 700; }
.expense-amt .when { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.sec-foot-link {
  text-align: center; padding-top: 12px;
  font-size: 13.5px; font-weight: 600; color: var(--primary);
}

/* =============================================
   Bottom Navigation
   ============================================= */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%; max-width: var(--app-w);
  background: var(--card);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 8px 12px 14px;
  z-index: 50;
  box-shadow: 0 -4px 20px rgba(30,41,59,.06);
}
.bn-item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-size: 10.5px; font-weight: 500;
  color: var(--text-muted);
  padding: 4px 0;
}
.bn-item i { font-size: 19px; }
.bn-item.active { color: var(--primary); }
.bn-fab {
  flex: 0 0 auto;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  box-shadow: var(--shadow-blue);
  margin: -28px 8px 0;
  transition: transform .15s;
}
.bn-fab:active { transform: scale(.9); }

/* =============================================
   Generic Card / List components (trip detail)
   ============================================= */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 14px;
}
.card-header {
  padding: 14px 16px;
  display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid var(--border);
}
.card-header h3 { font-size: 14px; font-weight: 700; flex: 1; }
.card-body { padding: 14px 16px; }

/* Stat cards (overview tab) */
.stat-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 12px;
}
.stat-icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.stat-icon.blue { background: var(--primary-light); color: var(--primary); }
.stat-icon.green { background: var(--success-light); color: var(--success); }
.stat-icon.yellow { background: var(--warning-light); color: #b45309; }
.stat-icon.red { background: var(--danger-light); color: var(--danger); }
.stat-icon.purple { background: #ede9fe; color: var(--secondary); }
.stat-label { font-size: 11.5px; color: var(--text-muted); font-weight: 500; margin-bottom: 2px; }
.stat-value { font-size: 18px; font-weight: 800; line-height: 1; letter-spacing: -.4px; }
.stat-sub { font-size: 11px; color: var(--text-muted); margin-top: 3px; }

/* =============================================
   Buttons
   ============================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 18px;
  border-radius: 14px;
  font-size: 14px; font-weight: 600;
  transition: all .15s;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 14px rgba(37,99,235,.3); }
.btn-primary:active { transform: scale(.97); }
.btn-secondary { background: var(--bg); color: var(--text); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-ghost { background: transparent; color: var(--text-soft); padding: 8px 10px; }
.btn-ghost:active { background: rgba(0,0,0,.04); }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 13px; font-size: 12.5px; border-radius: 11px; }
.btn-icon { padding: 9px; border-radius: 11px; }
.btn:disabled { opacity: .55; }

/* =============================================
   Forms
   ============================================= */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 13px;
  font-size: 14px;
  color: var(--text);
  background: #f8fafc;
  outline: none;
  transition: all .15s;
}
.form-control:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* =============================================
   Badges & Progress
   ============================================= */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 600;
}
.badge-primary { background: var(--primary-light); color: var(--primary-dark); }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-warning { background: var(--warning-light); color: #b45309; }
.badge-danger { background: var(--danger-light); color: #dc2626; }
.badge-gray { background: #f1f5f9; color: var(--text-soft); }

.progress { background: #eef1f6; border-radius: 20px; height: 8px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 20px; transition: width .5s ease; }
.progress-bar.primary { background: var(--primary); }
.progress-bar.success { background: var(--success); }
.progress-bar.warning { background: var(--warning); }
.progress-bar.danger { background: var(--danger); }

/* =============================================
   Grids
   ============================================= */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }

/* =============================================
   Tables
   ============================================= */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  padding: 9px 12px; background: #f8fafc; color: var(--text-muted);
  font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .5px;
  border-bottom: 1px solid var(--border); text-align: left;
}
tbody td { padding: 11px 12px; border-bottom: 1px solid var(--border); }
tbody tr:last-child td { border-bottom: none; }

/* =============================================
   Login Page
   ============================================= */
.login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: linear-gradient(160deg, #1e3a8a 0%, #2563eb 55%, #3b82f6 100%);
}
.login-card {
  background: var(--card);
  border-radius: var(--radius-xl);
  padding: 36px 28px;
  width: 100%; max-width: 420px;
  box-shadow: 0 24px 60px rgba(0,0,0,.3);
}
.login-brand { text-align: center; margin-bottom: 26px; }
.login-brand .lb-icon {
  width: 64px; height: 64px; border-radius: 20px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; color: #fff; margin: 0 auto 14px;
  box-shadow: var(--shadow-blue);
}
.login-brand h1 { font-size: 24px; font-weight: 800; letter-spacing: -.5px; }
.login-brand p { font-size: 13.5px; color: var(--text-soft); margin-top: 4px; }
.login-tabs { display: flex; background: var(--bg); border-radius: 14px; padding: 4px; margin-bottom: 20px; }
.login-tab {
  flex: 1; padding: 9px 0; text-align: center;
  font-size: 13.5px; font-weight: 600; color: var(--text-soft);
  border-radius: 11px; transition: all .15s;
}
.login-tab.active { background: var(--card); color: var(--primary); box-shadow: var(--shadow-sm); }
.login-error {
  background: var(--danger-light); color: #dc2626;
  border-radius: 12px; padding: 11px 14px; font-size: 13px; margin-bottom: 14px;
}

/* =============================================
   Trip Detail
   ============================================= */
.trip-hero-mini {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding: 18px;
  color: #fff;
  min-height: 168px;
  display: flex; flex-direction: column; justify-content: flex-end;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  box-shadow: var(--shadow);
}
.trip-hero-mini .thm-bg { position: absolute; inset: 0; object-fit: cover; width: 100%; height: 100%; }
.trip-hero-mini .thm-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,23,42,.05) 0%, rgba(15,23,42,.35) 55%, rgba(15,23,42,.8) 100%); }
.trip-hero-mini .thm-content { position: relative; z-index: 2; }
.trip-hero-mini h1 { font-size: 23px; font-weight: 800; letter-spacing: -.5px; line-height: 1.1; }
.trip-hero-mini p { font-size: 13px; color: rgba(255,255,255,.9); margin-top: 4px; display: flex; align-items: center; gap: 6px; }
.trip-hero-mini .thm-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.trip-hero-mini .thm-meta span {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,.18); backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.18);
  padding: 4px 11px; border-radius: 20px; font-size: 11.5px; font-weight: 500;
}
.thm-action {
  position: absolute; top: 14px; z-index: 3;
  width: 36px; height: 36px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: #fff;
  background: rgba(255,255,255,.18); backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.2);
}
.thm-action.edit { right: 58px; }
.thm-action.del  { right: 14px; background: rgba(239,68,68,.3); }
.thm-action:active { transform: scale(.92); }

/* Top tab bar (7 menu) */
.tab-scroll {
  display: flex; gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 6px;
  margin-bottom: 18px;
  -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent);
  mask-image: linear-gradient(90deg, #000 92%, transparent);
}
.tab-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 16px;
  background: var(--card);
  border-radius: 14px;
  font-size: 13px; font-weight: 600;
  color: var(--text-soft);
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  border: 1.5px solid transparent;
  transition: all .15s;
}
.tab-chip.active { background: var(--primary); color: #fff; box-shadow: 0 4px 14px rgba(37,99,235,.32); }
.tab-chip i { font-size: 13px; }

/* Sub-tab segmented control (Rencana / Keuangan) */
.subtab-bar {
  display: flex; gap: 4px;
  background: #e8edf6; border-radius: 14px;
  padding: 4px; margin-bottom: 18px;
}
.subtab {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 8px; border-radius: 11px;
  font-size: 13px; font-weight: 600; color: var(--text-soft);
  transition: all .15s;
}
.subtab.active { background: var(--card); color: var(--primary); box-shadow: var(--shadow-sm); }
.subtab i { font-size: 13px; }

/* =============================================
   Itinerary
   ============================================= */
.day-card { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin-bottom: 14px; }
.day-header { padding: 12px 16px; background: #f8fafc; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--border); }
.day-date { background: var(--primary); color: #fff; border-radius: 10px; padding: 4px 10px; font-size: 12px; font-weight: 700; }
.day-title { font-weight: 700; font-size: 14px; flex: 1; }
.activity-item { display: flex; align-items: flex-start; padding: 12px 16px; border-bottom: 1px solid var(--border); gap: 11px; }
.activity-item:last-child { border-bottom: none; }
.activity-time { font-size: 11.5px; color: var(--text-muted); font-weight: 600; min-width: 70px; margin-top: 1px; }
.activity-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.activity-dot.planned { background: var(--primary); }
.activity-dot.completed { background: var(--success); }
.activity-dot.in_progress { background: var(--warning); }
.activity-dot.skipped, .activity-dot.cancelled { background: #94a3b8; }
.activity-content { flex: 1; min-width: 0; }
.activity-title { font-weight: 600; font-size: 13.5px; }
.activity-meta { font-size: 11.5px; color: var(--text-muted); display: flex; gap: 8px; margin-top: 4px; flex-wrap: wrap; align-items: center; }

/* Budget bars */
.budget-category { display: flex; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--border); gap: 12px; }
.budget-category:last-child { border-bottom: none; }
.budget-cat-label { width: 96px; font-size: 12.5px; font-weight: 600; flex-shrink: 0; text-transform: capitalize; }
.budget-cat-bar { flex: 1; }
.budget-cat-bar .progress { margin-bottom: 5px; }
.budget-cat-amounts { font-size: 11px; color: var(--text-muted); }
.budget-cat-pct { width: 38px; text-align: right; font-size: 12px; font-weight: 700; }

/* Packing */
.packing-item { display: flex; align-items: center; padding: 11px 14px; border-bottom: 1px solid var(--border); gap: 12px; }
.packing-item:last-child { border-bottom: none; }
.packing-checkbox {
  width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 11px; flex-shrink: 0; transition: all .15s;
}
.packing-checkbox.checked { background: var(--success); border-color: var(--success); }
.packing-item-name { flex: 1; font-size: 13.5px; }
.packing-item-name.packed { text-decoration: line-through; color: var(--text-muted); }
.packing-item-qty { font-size: 12px; color: var(--text-muted); }

/* Documents */
.doc-item { display: flex; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); gap: 12px; }
.doc-item:last-child { border-bottom: none; }
.doc-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--primary-light); display: flex; align-items: center; justify-content: center; color: var(--primary); font-size: 17px; flex-shrink: 0; }
.doc-info { flex: 1; min-width: 0; }
.doc-title { font-weight: 600; font-size: 13.5px; }
.doc-meta { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.doc-expiry-warn { color: var(--warning); font-size: 11px; display: flex; align-items: center; gap: 4px; margin-top: 3px; }
.doc-expiry-danger { color: var(--danger); }

/* Journal */
.journal-card { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin-bottom: 14px; }
.journal-photo { height: 170px; object-fit: cover; width: 100%; }
.journal-body { padding: 14px 16px; }
.journal-meta { font-size: 11.5px; color: var(--text-muted); display: flex; gap: 12px; margin-bottom: 7px; flex-wrap: wrap; }
.journal-title { font-size: 16px; font-weight: 700; margin-bottom: 5px; }
.journal-content { font-size: 13px; color: var(--text-soft); line-height: 1.6; }

/* =============================================
   AI Chat
   ============================================= */
.chat-container { display: flex; flex-direction: column; height: calc(100vh - 230px); min-height: 360px; }
.chat-messages {
  flex: 1; overflow-y: auto; padding: 4px;
  display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px;
}
.chat-msg { display: flex; gap: 9px; align-items: flex-start; max-width: 85%; }
.chat-msg.user { align-self: flex-end; flex-direction: row-reverse; }
.chat-bubble { padding: 11px 14px; border-radius: 16px; font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; }
.chat-msg.ai .chat-bubble { background: var(--card); box-shadow: var(--shadow-sm); border-top-left-radius: 5px; }
.chat-msg.user .chat-bubble { background: var(--primary); color: #fff; border-bottom-right-radius: 5px; }
.chat-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; flex-shrink: 0; }
.chat-avatar.ai { background: linear-gradient(135deg, var(--secondary), var(--primary)); }
.chat-input-area { display: flex; gap: 8px; }
.chat-input-area .form-control { flex: 1; border-radius: 22px; }
.chat-send { border-radius: 50%; width: 46px; height: 46px; flex-shrink: 0; padding: 0; }
.quick-prompts { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 12px; }
.quick-prompt-btn { background: var(--card); border-radius: 20px; padding: 7px 13px; font-size: 12px; box-shadow: var(--shadow-sm); color: var(--text-soft); }
.quick-prompt-btn:active { background: var(--primary-light); color: var(--primary); }
.cursor-blink { animation: blink 1s steps(2) infinite; color: var(--primary); font-weight: 400; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* =============================================
   Notifications
   ============================================= */
.notif-item { display: flex; align-items: flex-start; padding: 14px 16px; border-bottom: 1px solid var(--border); gap: 12px; }
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { background: var(--primary-soft); }
.notif-icon { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.notif-body { flex: 1; min-width: 0; }
.notif-title { font-weight: 600; font-size: 13.5px; }
.notif-text { font-size: 12.5px; color: var(--text-soft); margin-top: 2px; }
.notif-time { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); flex-shrink: 0; margin-top: 6px; }

/* =============================================
   Profile
   ============================================= */
.profile-head { text-align: center; padding: 20px 0 24px; }
.profile-avatar {
  width: 88px; height: 88px; border-radius: 50%;
  margin: 0 auto 14px; object-fit: cover;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 700; color: #fff;
  box-shadow: var(--shadow);
  border: 4px solid #fff;
}
.profile-name { font-size: 20px; font-weight: 800; }
.profile-email { font-size: 13.5px; color: var(--text-soft); margin-top: 3px; }
.profile-menu-item {
  display: flex; align-items: center; gap: 14px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--border);
}
.profile-menu-item:last-child { border-bottom: none; }
.profile-menu-icon {
  width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.profile-menu-label { flex: 1; font-size: 14px; font-weight: 500; }
.profile-menu-item .chev { color: var(--text-muted); font-size: 13px; }

/* =============================================
   Trip Card (trips list)
   ============================================= */
.trip-card { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin-bottom: 14px; }
.trip-card-cover {
  height: 130px; position: relative;
  background: linear-gradient(135deg, #2563eb, #8b5cf6);
  display: flex; align-items: center; justify-content: center;
  font-size: 42px; color: rgba(255,255,255,.7);
}
.trip-card-cover img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.trip-card-cover .tc-status { position: absolute; top: 12px; left: 12px; z-index: 2; }
.trip-card-body { padding: 14px 16px; }
.trip-card-title { font-weight: 700; font-size: 16px; }
.trip-card-meta { font-size: 12.5px; color: var(--text-soft); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 5px; }
.trip-card-budget { margin-top: 12px; }

/* =============================================
   Modal (bottom sheet on mobile)
   ============================================= */
#modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.5);
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 1000;
}
#modal {
  background: var(--card);
  border-radius: 24px 24px 0 0;
  width: 100%; max-width: var(--app-w);
  max-height: 92vh; overflow-y: auto;
  animation: sheetUp .25s ease;
}
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-header { padding: 18px 20px 12px; display: flex; align-items: center; position: sticky; top: 0; background: var(--card); }
.modal-header::before {
  content: ''; position: absolute; top: 7px; left: 50%; transform: translateX(-50%);
  width: 40px; height: 4px; background: var(--border); border-radius: 4px;
}
.modal-header h3 { flex: 1; font-size: 17px; font-weight: 700; margin-top: 6px; }
.modal-close { color: var(--text-muted); font-size: 18px; padding: 4px 8px; margin-top: 6px; }
#modal-body { padding: 8px 20px 28px; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.modal-actions .btn { flex: 1; }

/* =============================================
   Toast
   ============================================= */
#toast-container {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 8px; z-index: 9999;
  width: 100%; max-width: 340px; padding: 0 16px;
}
.toast {
  background: #1e293b; color: #fff;
  padding: 13px 18px; border-radius: 14px;
  font-size: 13.5px; font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 10px;
  animation: toastIn .25s ease;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.warning { background: #d97706; }
@keyframes toastIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* =============================================
   Empty & Loading
   ============================================= */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.empty-state i { font-size: 38px; opacity: .35; margin-bottom: 12px; display: block; }
.empty-state h3 { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.empty-state p { font-size: 13px; }
.empty-state .btn { margin-top: 16px; }
.loading { text-align: center; padding: 40px; color: var(--text-muted); }
.loading i { font-size: 26px; }
.spinner { display: inline-block; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* =============================================
   Utilities
   ============================================= */
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.text-muted { color: var(--text-muted); }
.text-soft { color: var(--text-soft); }
.text-sm { font-size: 12px; }
.font-bold { font-weight: 700; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.section-title { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 10px; }

/* =============================================
   Map (Leaflet + CARTO)
   ============================================= */
.map-wrap { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin-bottom: 14px; }
#leaflet-map { width: 100%; height: 58vh; min-height: 320px; background: #e9eefb; z-index: 1; }
.map-wrap.map-fullscreen { position: fixed; inset: 0; max-width: var(--app-w); margin: 0 auto; border-radius: 0; z-index: 2000; margin-bottom: 0; }
.map-wrap.map-fullscreen #leaflet-map { height: 100vh; }
/* Tombol-tool peta (stack vertikal kanan-atas): fullscreen / traffic / lokasi */
.map-tool-btn {
  position: absolute; right: 12px; z-index: 1000;
  width: 40px; height: 40px; border-radius: 11px;
  background: #fff; color: var(--text); font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow); border: 0; cursor: pointer;
  transition: background .15s, color .15s;
}
.map-fs-btn      { top: 12px; }
.map-traffic-btn { top: 60px; }
.map-loc-btn     { top: 108px; }
.map-days-btn    { top: 156px; }
.map-tool-btn.active { background: var(--primary); color: #fff; }
.map-wrap.map-fullscreen .map-fs-btn { display: none; } /* exit ada di overlay atas */
/* Tombol 📅 Hari + panel-nya tetap aktif di fullscreen (gantikan pill hari bawah) */
.map-wrap.map-fullscreen .map-ov.map-ov-days { display: none; }
.map-wrap.map-fullscreen .map-days-panel { top: 60px; z-index: 1200; }

/* Badge nomor hari aktif di tombol Hari */
.map-days-badge {
  position: absolute; top: -5px; right: -5px;
  min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: var(--danger, #ef4444); color: #fff;
  font-size: 10px; font-weight: 800; line-height: 17px; text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,.35);
}
.map-days-badge:empty { display: none; }

/* Panel pemilih hari + ringkasan rute (muncul di kiri tombol) */
.map-days-panel {
  position: absolute; top: 12px; right: 60px; z-index: 1100;
  width: 244px; max-width: calc(100% - 84px);
  max-height: calc(58vh - 24px); overflow-y: auto;
  background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 10px;
}
.mdp-head { display: flex; align-items: center; justify-content: space-between; font-weight: 800; font-size: 13.5px; margin-bottom: 8px; padding: 0 2px; }
.mdp-close { background: transparent; border: 0; color: var(--muted, #64748b); font-size: 15px; cursor: pointer; }
.mdp-list { display: flex; flex-direction: column; gap: 6px; }
.mdp-item { text-align: left; background: #f8fafc; border: 1.5px solid transparent; border-radius: 10px; padding: 8px 10px; cursor: pointer; transition: border-color .15s, background .15s; }
.mdp-item.active { border-color: var(--primary); background: var(--primary-soft, #eff4ff); }
.mdp-item-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mdp-day { font-weight: 800; font-size: 13px; color: var(--text); }
.mdp-date { font-size: 11px; color: var(--muted, #64748b); }
.mdp-sum { font-size: 11.5px; color: var(--muted, #64748b); margin-top: 3px; }
.mdp-sum i, .mdp-total i { color: var(--primary); }
.mdp-total { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border, #e2e8f0); font-size: 12px; font-weight: 700; color: var(--text); }
.mdp-total-sub { font-weight: 500; color: var(--muted, #64748b); }

/* Map picker + autocomplete koordinat di form destinasi */
.dst-map { height: 200px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.geo-list { position: absolute; left: 0; right: 0; top: 100%; z-index: 50; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); max-height: 210px; overflow-y: auto; margin-top: 4px; }
.geo-opt { display: flex; gap: 9px; align-items: flex-start; padding: 9px 12px; cursor: pointer; border-bottom: 1px solid var(--border); }
.geo-opt:last-child { border-bottom: none; }
.geo-opt:hover { background: var(--primary-light); }
.geo-opt > i { color: var(--primary); margin-top: 2px; flex-shrink: 0; width: 15px; text-align: center; }
.geo-opt-txt { min-width: 0; }
.geo-opt-name { font-size: 12.5px; font-weight: 600; color: var(--text); }
.geo-opt-addr { font-size: 10.5px; color: var(--text-muted); line-height: 1.25; margin-top: 1px; }

/* Map picker fullscreen di form destinasi */
.dst-map-wrap { position: relative; }
.dst-map-fs-btn { position: absolute; top: 8px; right: 8px; z-index: 500; width: 34px; height: 34px; border-radius: 9px; background: #fff; box-shadow: var(--shadow); border: 0; display: flex; align-items: center; justify-content: center; color: var(--text); cursor: pointer; }
.dst-map-wrap.fs { position: fixed; inset: 0; z-index: 3000; background: #fff; }
.dst-map-wrap.fs .dst-map { height: 100%; border-radius: 0; }

/* Cropper foto profil */
.ep-crop { width: 100%; height: 240px; background: #0f172a; border-radius: 10px; overflow: hidden; }
.ep-crop img { display: block; max-width: 100%; }
.ep-crop .cropper-view-box, .ep-crop .cropper-face { border-radius: 50%; }

/* Titik "lokasi saya" (live) — biru berdenyut ala Google Maps */
.me-icon { background: transparent !important; border: 0 !important; }
.me-dot { position: relative; width: 22px; height: 22px; }
.me-core, .me-pulse {
  position: absolute; left: 50%; top: 50%; border-radius: 50%;
  width: 14px; height: 14px; margin: -7px 0 0 -7px;
}
.me-core { background: #1a73e8; border: 2.5px solid #fff; box-shadow: 0 0 4px rgba(0,0,0,.35); }
.me-pulse { background: rgba(26,115,232,.45); animation: mePulse 1.8s ease-out infinite; }
@keyframes mePulse { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(3.4); opacity: 0; } }

/* Fullscreen overlays (hidden in normal mode) */
.map-ov { display: none; position: absolute; z-index: 1100; left: 0; right: 0; }
.map-wrap.map-fullscreen .map-ov { display: flex; }
.map-ov-top {
  top: 0; padding: 12px;
  align-items: center; gap: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,0));
}
.map-ov-exit {
  display: flex; align-items: center; gap: 6px;
  background: #fff; color: var(--text);
  padding: 9px 14px; border-radius: 12px;
  font-size: 13px; font-weight: 600;
  box-shadow: var(--shadow); flex-shrink: 0;
}
.map-ov-info {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border-radius: 12px;
  padding: 9px 14px; box-shadow: var(--shadow);
  font-size: 12.5px; overflow-x: auto;
}
.map-ov-info .ovi-day { font-weight: 700; color: var(--primary); }
.map-ov-info .ovi-stat { display: flex; align-items: center; gap: 4px; color: var(--text-soft); font-weight: 600; white-space: nowrap; }
.map-ov-info .ovi-stat i { color: var(--text-muted); font-size: 11px; }
.map-ov-days {
  bottom: 0; padding: 14px 12px 18px;
  gap: 8px; overflow-x: auto;
  background: linear-gradient(0deg, rgba(255,255,255,.96), rgba(255,255,255,0));
}
.day-pill-sm { min-width: 70px; padding: 8px 10px; background: #fff; box-shadow: var(--shadow-sm); }
.day-pill-sm .dp-day { font-size: 12.5px; }
.day-pill-sm .dp-sub { font-size: 9.5px; }

/* Leaflet control polish + reposition (hindari tabrakan dgn tombol overlay) */
.leaflet-control-zoom { border: none !important; box-shadow: var(--shadow) !important; border-radius: 11px !important; overflow: hidden; }
.leaflet-control-zoom a { width: 34px !important; height: 34px !important; line-height: 34px !important; color: var(--text) !important; font-size: 17px !important; }
.leaflet-control-zoom a:first-child { border-bottom: 1px solid var(--border) !important; }
.leaflet-control-attribution { font-size: 9px !important; background: rgba(255,255,255,.7) !important; border-radius: 8px 0 0 0; }
/* Normal: zoom di kiri-bawah agar pojok atas bersih (expand di kanan-atas) */
.map-wrap .leaflet-top.leaflet-left { top: auto; bottom: 12px; left: 12px; }
.map-wrap .leaflet-top.leaflet-left .leaflet-control { margin-top: 0; margin-bottom: 0; }
/* Fullscreen: geser ke kanan-tengah, jauh dari Keluar (kiri-atas), info (kanan-atas) & day pills (bawah) */
.map-wrap.map-fullscreen .leaflet-top.leaflet-left { top: 50%; transform: translateY(-50%); bottom: auto; left: auto; right: 12px; }
.map-marker-num {
  width: 30px; height: 30px; border-radius: 50% 50% 50% 0;
  background: var(--primary); color: #fff;
  transform: rotate(-45deg);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
  border: 2px solid #fff;
}
.map-marker-num span { transform: rotate(45deg); font-size: 13px; font-weight: 700; }
.map-marker-num.start { background: var(--success); }
.map-marker-num.end { background: var(--danger); }
.leaflet-popup-content { font-family: var(--font); font-size: 13px; margin: 10px 12px; }
.leaflet-popup-content b { font-size: 13.5px; }

.route-summary {
  display: flex; gap: 10px; margin-bottom: 12px;
}
.route-stat {
  flex: 1; background: var(--card); border-radius: var(--radius-sm);
  padding: 12px; text-align: center; box-shadow: var(--shadow-sm);
}
.route-stat .rs-val { font-size: 18px; font-weight: 800; letter-spacing: -.4px; }
.route-stat .rs-label { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.route-warn { background: var(--warning-light); color: #b45309; border-left: 3px solid #f59e0b; border-radius: 9px; padding: 8px 11px; font-size: 12px; line-height: 1.35; margin-bottom: 10px; display: flex; align-items: flex-start; gap: 8px; }
.route-warn i { margin-top: 1px; flex-shrink: 0; }
.route-warn.warn-rain { background: #e0f2fe; color: #0369a1; border-left-color: #0ea5e9; }

.map-day-card { padding: 14px; }
.map-day-head { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 12px; }
.map-day-head i { color: var(--primary); }
.day-pills { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.day-pill {
  flex-shrink: 0; min-width: 88px; padding: 10px 12px; border-radius: 14px;
  background: #f1f5f9; border: 2px solid transparent;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  transition: all .15s;
}
.day-pill.active { background: var(--primary); border-color: var(--primary); box-shadow: 0 4px 12px rgba(37,99,235,.3); }
.day-pill .dp-day { font-size: 13.5px; font-weight: 700; color: var(--text); }
.day-pill .dp-date { font-size: 11px; color: var(--text-soft); font-weight: 600; }
.day-pill .dp-sub { font-size: 10px; color: var(--text-muted); }
.day-pill.active .dp-day { color: #fff; }
.day-pill.active .dp-date, .day-pill.active .dp-sub { color: rgba(255,255,255,.85); }

.route-title { font-size: 14px; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.route-title i { color: var(--primary); }
.route-title .rt-sub { font-size: 12px; font-weight: 500; color: var(--text-muted); }

/* Day selector ramping (satu baris chip) */
.day-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 8px; }
.day-chip {
  flex-shrink: 0; padding: 8px 14px; border-radius: 13px;
  background: var(--card); box-shadow: var(--shadow-sm);
  display: flex; align-items: baseline; gap: 6px;
  border: 1.5px solid transparent; transition: all .15s; white-space: nowrap;
}
.day-chip.active { background: var(--primary); border-color: var(--primary); box-shadow: 0 4px 12px rgba(37,99,235,.3); }
.day-chip .dc-day { font-size: 13px; font-weight: 700; color: var(--text); }
.day-chip .dc-date { font-size: 11px; font-weight: 600; color: var(--text-muted); }
.day-chip.active .dc-day { color: #fff; }
.day-chip.active .dc-date { color: rgba(255,255,255,.85); }

/* Ringkasan rute: pill ringkas overlay di bawah peta */
.route-pill {
  position: absolute; left: 12px; bottom: 12px; z-index: 600;
  display: inline-flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,.96); backdrop-filter: blur(4px);
  border-radius: 12px; padding: 8px 14px; box-shadow: var(--shadow);
  font-size: 12.5px; font-weight: 700; color: var(--text);
}
.route-pill span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.route-pill i { color: var(--primary); font-size: 12px; }
.map-wrap.map-fullscreen .route-pill { display: none; } /* fullscreen pakai info bar atas */

/* Caption tipis di bawah peta + tombol optimasi */
/* Header rute ringkas: judul hari kiri + tombol optimasi kanan */
.route-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 12px 0 8px; }
.rh-title { font-size: 13.5px; font-weight: 800; color: var(--text); display: flex; align-items: center; gap: 7px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rh-title i { color: var(--primary); }
.rh-opt { flex-shrink: 0; display: inline-flex; align-items: center; gap: 5px; color: var(--primary); background: var(--primary-light); border: 0; border-radius: 9px; padding: 6px 10px; font-size: 12px; font-weight: 700; cursor: pointer; }
.rh-opt:active { transform: scale(.96); }
/* Legenda traffic ringkas (dot kecil) */
.rc-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; font-size: 11px; color: var(--text-muted); margin-bottom: 10px; }
.rc-legend span { display: inline-flex; align-items: center; gap: 4px; }
.rc-legend .lg { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.lg-g { background: #22c55e; } .lg-o { background: #f97316; } .lg-r { background: #ef4444; }
.rc-delay { color: var(--danger, #ef4444) !important; font-weight: 700; }

.stop-item { position: relative; display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-bottom: 1px solid var(--border); }
.stop-item:last-child { border-bottom: none; }
/* Timeline: garis penghubung vertikal di tengah nomor */
.stop-tl .stop-item::before { content: ''; position: absolute; left: 25px; top: 0; bottom: 0; width: 2px; background: var(--border); z-index: 0; }
.stop-tl .stop-item:first-child::before { top: 50%; }
.stop-tl .stop-item:last-child::before { bottom: 50%; }
.stop-num { position: relative; z-index: 1; width: 26px; height: 26px; border-radius: 50%; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; box-shadow: 0 0 0 2px var(--card); }
.stop-info { flex: 1; min-width: 0; }
.stop-name { font-size: 13px; font-weight: 700; }
.stop-meta { font-size: 11px; color: var(--text-muted); }

/* =============================================
   Weather live page
   ============================================= */
.weather-now {
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  border-radius: var(--radius-lg); padding: 20px; color: #fff;
  margin-bottom: 14px; box-shadow: var(--shadow);
}
.weather-now .wn-top { display: flex; justify-content: space-between; align-items: flex-start; }
.weather-now .wn-loc { font-size: 14px; font-weight: 600; }
.weather-now .wn-src { font-size: 10.5px; background: rgba(255,255,255,.2); padding: 3px 9px; border-radius: 20px; }
.weather-now .wn-temp { font-size: 46px; font-weight: 800; letter-spacing: -2px; line-height: 1; margin: 8px 0 2px; }
.weather-now .wn-cond { font-size: 14px; opacity: .95; }
.weather-now .wn-meta { display: flex; gap: 16px; margin-top: 14px; font-size: 12.5px; }
.weather-now .wn-emoji { font-size: 48px; }
.hourly-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.hour-cell {
  flex-shrink: 0; background: var(--card); border-radius: 14px;
  padding: 12px 10px; text-align: center; min-width: 64px; box-shadow: var(--shadow-sm);
}
.hour-cell.rain { background: #e0f2fe; }
.hour-cell .hc-time { font-size: 11px; color: var(--text-muted); }
.hour-cell .hc-emoji { font-size: 20px; margin: 5px 0; }
.hour-cell .hc-temp { font-size: 13px; font-weight: 700; }
.hour-cell .hc-rain { font-size: 10px; color: #0284c7; margin-top: 2px; }
.hour-cell.now { background: var(--primary); }
.hour-cell.now .hc-time, .hour-cell.now .hc-temp { color: #fff; font-weight: 700; }
.hour-cell.now .hc-rain { color: rgba(255,255,255,.9); }

/* =============================================
   Animated weather icons
   ============================================= */
.wx { position: relative; width: 62px; height: 58px; flex-shrink: 0; }
.wx > * { position: absolute; }
.wx-rays {
  width: 56px; height: 56px; left: 3px; top: 1px;
  background: repeating-conic-gradient(#fde68a 0deg 2.5deg, transparent 2.5deg 45deg);
  -webkit-mask: radial-gradient(transparent 55%, #000 57%);
  mask: radial-gradient(transparent 55%, #000 57%);
  animation: wx-spin 11s linear infinite;
}
.wx-sun-core {
  width: 30px; height: 30px; left: 16px; top: 14px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fde047, #f59e0b);
  box-shadow: 0 0 16px rgba(245,158,11,.75);
  animation: wx-pulse 2.6s ease-in-out infinite;
}
.wx-cloud-shape {
  width: 42px; height: 15px; left: 9px; top: 28px;
  background: #cbd5e1; border-radius: 16px; box-shadow: 0 3px 7px rgba(15,23,42,.18);
}
.wx-cloud-shape::before { content:''; position:absolute; width:17px; height:17px; border-radius:50%; background:#cbd5e1; top:-8px; left:6px; }
.wx-cloud-shape::after  { content:''; position:absolute; width:23px; height:23px; border-radius:50%; background:#dbe2ea; top:-13px; left:15px; }
/* Di blok cuaca berlatar biru, awan tetap putih agar kontras */
.weather-now .wx-cloud-shape, .weather-now .wx-cloud-shape::before { background: #fff; }
.weather-now .wx-cloud-shape::after { background: #f1f5f9; }
.wx-cloud .wx-cloud-shape, .wx-rain .wx-cloud-shape, .wx-storm .wx-cloud-shape, .wx-snow .wx-cloud-shape { animation: wx-bob 4s ease-in-out infinite; }
.wx-partly .wx-sun-core { width: 24px; height: 24px; left: 3px; top: 3px; }
.wx-partly .wx-cloud-shape { top: 26px; left: 16px; width: 38px; }
.wx-drop { width: 3px; height: 9px; border-radius: 3px; background: #60a5fa; top: 42px; opacity: 0; animation: wx-drop 1.1s linear infinite; }
.wx-drop.d1 { left: 19px; animation-delay: 0s; }
.wx-drop.d2 { left: 29px; animation-delay: .36s; }
.wx-drop.d3 { left: 39px; animation-delay: .72s; }
.wx-bolt {
  width: 15px; height: 22px; left: 24px; top: 36px; background: #fde047;
  clip-path: polygon(58% 0, 8% 56%, 44% 56%, 26% 100%, 92% 38%, 50% 38%);
  filter: drop-shadow(0 0 7px rgba(253,224,71,.95));
  animation: wx-flash 2.4s steps(1) infinite;
}
.wx-flake { width: 6px; height: 6px; border-radius: 50%; background: #7dd3fc; top: 42px; opacity: 0; box-shadow: 0 0 4px rgba(56,189,248,.6); animation: wx-fall 2.6s linear infinite; }
.weather-now .wx-flake { background: #fff; box-shadow: 0 0 4px rgba(255,255,255,.8); }
.wx-flake.f1 { left: 19px; animation-delay: 0s; }
.wx-flake.f2 { left: 30px; animation-delay: .85s; }
.wx-flake.f3 { left: 41px; animation-delay: 1.7s; }
.wx-fog-bar { height: 4px; border-radius: 4px; background: #94a3b8; left: 9px; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.weather-now .wx-fog-bar { background: #e2e8f0; }
.wx-fog .b1 { width: 44px; top: 18px; animation: wx-fog 3.2s ease-in-out infinite; }
.wx-fog .b2 { width: 34px; top: 29px; animation: wx-fog 3.2s ease-in-out .6s infinite reverse; }
.wx-fog .b3 { width: 42px; top: 40px; animation: wx-fog 3.2s ease-in-out 1.1s infinite; }

@keyframes wx-spin { to { transform: rotate(360deg); } }
@keyframes wx-pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.09); } }
@keyframes wx-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes wx-drop { 0% { transform: translateY(-4px); opacity:0; } 25% { opacity:1; } 100% { transform: translateY(15px); opacity:0; } }
@keyframes wx-fall { 0% { transform: translateY(-4px) translateX(0); opacity:0; } 25% { opacity:1; } 100% { transform: translateY(17px) translateX(5px); opacity:0; } }
@keyframes wx-flash { 0%,44%,53%,100% { opacity:.12; } 46%,51% { opacity:1; } }
@keyframes wx-fog { 0%,100% { transform: translateX(0); } 50% { transform: translateX(7px); } }

/* =============================================
   Cuaca Sepanjang Rute (di peta)
   ============================================= */
.wx-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 0 8px; }
.wx-toggle { display: flex; background: #e8edf6; border-radius: 11px; padding: 3px; }
.wx-toggle button { padding: 6px 11px; border-radius: 8px; font-size: 11.5px; font-weight: 600; color: var(--text-soft); border: 0; background: transparent; cursor: pointer; }
.wx-toggle button.active { background: var(--card); color: var(--primary); box-shadow: var(--shadow-sm); }
.wx-refresh { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-soft); font-weight: 600; background: transparent; border: 0; cursor: pointer; white-space: nowrap; }
.wx-refresh i { color: var(--primary); }

.wx-strip { gap: 8px; }
.wx-card {
  flex-shrink: 0; width: 80px; padding: 9px 6px 8px; border-radius: 14px;
  background: var(--card); box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; align-items: center; text-align: center;
  border: 1.5px solid transparent;
}
.wx-card.change { border-color: var(--warning-light); background: #fffdf5; }
.wx-card-top { font-size: 10px; font-weight: 700; color: var(--text-soft); display: flex; align-items: center; gap: 3px; margin-bottom: 1px; }
.wx-seq { width: 15px; height: 15px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 9.5px; display: inline-flex; align-items: center; justify-content: center; }
.wx-card-icon { height: 42px; display: flex; align-items: center; justify-content: center; }
.wx-card-icon .wx { transform: scale(.7); }
.wx-card-temp { font-size: 16px; font-weight: 800; letter-spacing: -.5px; }
.wx-card-rain { font-size: 10px; color: #0284c7; margin-top: 1px; }
.wx-card-name { font-size: 9.5px; color: var(--text-muted); margin-top: 2px; line-height: 1.1; }

/* Marker cuaca animasi (titik perubahan) di peta — tanpa background, kontras tinggi */
.wx-marker {
  width: 50px; height: 48px; background: none; border: none; box-shadow: none; overflow: visible;
  display: flex; align-items: center; justify-content: center;
  /* outline gelap tipis → awan putih natural tetap tegas di atas peta terang */
  filter: drop-shadow(0 0 1.6px rgba(15,23,42,.55)) drop-shadow(0 2px 2px rgba(0,0,0,.3));
}
.wx-marker .wx { transform: scale(.68); }
/* Awan natural (putih lembut) — kontras dijamin oleh outline gelap di atas */
.wx-marker .wx-cloud-shape,
.wx-marker .wx-cloud-shape::before { background: #f1f5f9; }
.wx-marker .wx-cloud-shape::after { background: #ffffff; }
.wx-marker .wx-fog-bar { background: #cbd5e1; }
.wx-marker .wx-sun-core { box-shadow: 0 0 10px rgba(245,158,11,.9); }

/* =============================================
   Toggle switch
   ============================================= */
.toggle-switch { width: 46px; height: 26px; border-radius: 20px; background: var(--border); position: relative; transition: background .2s; flex-shrink: 0; }
.toggle-switch.on { background: var(--primary); }
.toggle-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.toggle-switch.on::after { transform: translateX(20px); }

/* Budget masked */
.budget-masked { letter-spacing: 2px; }

/* =============================================
   Desktop
   ============================================= */
@media (min-width: 600px) {
  body { padding: 0; }
  .app-mobile { margin: 0 auto; border-radius: 0; }
}
