/* ═══════════════════════════════════════════════
   BahasaLogistics Mobile App — Exact design match
   ═══════════════════════════════════════════════ */

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

:root {
  --green-dark:   #1b4332;
  --green-main:   #2d6a4f;
  --green-mid:    #40916c;
  --green-light:  #52b788;
  --green-pale:   #b7e4c7;
  --green-bg:     #d8f3dc;
  --orange:       #f4845f;
  --purple:       #9b72cf;
  --blue:         #4dabf7;
  --yellow:       #ffd43b;
  --white:        #ffffff;
  --gray-100:     #f8f9fa;
  --gray-200:     #e9ecef;
  --gray-400:     #ced4da;
  --gray-500:     #adb5bd;
  --gray-700:     #495057;
  --gray-900:     #212529;
  --radius-sm:    10px;
  --radius-md:    16px;
  --radius-lg:    24px;
  --radius-xl:    32px;
  --shadow-sm:    0 2px 8px rgba(0,0,0,.08);
  --shadow-md:    0 4px 20px rgba(0,0,0,.12);
  --shadow-green: 0 8px 24px rgba(45,106,79,.3);
}

html, body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--gray-100);
  color: var(--gray-900);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  max-width: 430px;
  margin: 0 auto;
  position: relative;
  overflow-x: hidden;
}

/* ── Screen Shell ── */
.screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--white);
}

/* ── Status Bar Spacer ── */
.status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-900);
}
.status-bar .time { font-size: 15px; font-weight: 700; }
.status-bar .icons { display: flex; gap: 6px; align-items: center; }

/* ── Top Navigation ── */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 10px;
}
.header-user { display: flex; align-items: center; gap: 12px; }
.header-avatar {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--green-pale);
}
.header-avatar-placeholder {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--green-mid), var(--green-light));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 16px; flex-shrink: 0;
}
.header-greeting { font-size: 12px; color: var(--gray-500); }
.header-name     { font-size: 15px; font-weight: 700; color: var(--gray-900); margin-top: 1px; }
.header-icons    { display: flex; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; background: var(--gray-100);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  border: none; color: var(--gray-700); flex-shrink: 0;
  transition: background .15s;
}
.icon-btn:hover { background: var(--gray-200); }

/* ── Balance Card ── */
.balance-card {
  margin: 6px 20px 16px;
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-main) 60%, var(--green-mid) 100%);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-green);
  position: relative;
  overflow: hidden;
}
.balance-card::after {
  content: '';
  position: absolute; right: -20px; top: -20px;
  width: 120px; height: 120px; border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.balance-card::before {
  content: '';
  position: absolute; right: 40px; bottom: -30px;
  width: 90px; height: 90px; border-radius: 50%;
  background: rgba(255,255,255,.06);
}
.balance-label { font-size: 12px; opacity: .8; }
.balance-amount { font-size: 26px; font-weight: 800; margin-top: 2px; }
.balance-sub    { font-size: 11px; opacity: .7; margin-top: 2px; }
.balance-icon {
  width: 50px; height: 50px; border-radius: 14px;
  background: rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; position: relative; z-index: 1;
  backdrop-filter: blur(6px);
}

/* ── Section Header ── */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 20px 12px;
}
.section-title { font-size: 16px; font-weight: 700; color: var(--gray-900); }
.section-link  { font-size: 13px; color: var(--green-mid); font-weight: 600; text-decoration: none; }

/* ── Services Grid ── */
.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 20px 16px;
}
.service-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 16px 14px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  text-decoration: none;
  color: inherit;
  transition: transform .15s, box-shadow .15s;
  display: block;
}
.service-card:hover  { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.service-card:active { transform: scale(.97); }
.service-icon {
  width: 46px; height: 46px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 10px;
}
.service-icon.green  { background: #d8f3dc; }
.service-icon.orange { background: #ffe8e0; }
.service-icon.blue   { background: #d0ebff; }
.service-icon.purple { background: #ede7f6; }
.service-label { font-size: 13px; font-weight: 600; color: var(--gray-900); }
.service-sub   { font-size: 11px; color: var(--gray-500); margin-top: 2px; }

/* ── Category Chips ── */
.category-row {
  display: flex; gap: 10px; padding: 0 20px 16px; overflow-x: auto;
  scrollbar-width: none;
}
.category-row::-webkit-scrollbar { display: none; }
.category-chip {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  flex-shrink: 0; cursor: pointer; text-decoration: none;
}
.category-chip-icon {
  width: 52px; height: 52px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center; font-size: 24px;
  background: var(--gray-100); transition: background .15s;
}
.category-chip:hover .category-chip-icon { background: var(--green-bg); }
.category-chip span { font-size: 11px; color: var(--gray-700); font-weight: 500; text-align: center; }

.see-all-btn {
  display: block; margin: 0 20px 100px;
  background: var(--green-bg); color: var(--green-dark);
  border-radius: var(--radius-md); padding: 14px;
  text-align: center; font-weight: 700; font-size: 14px;
  text-decoration: none; border: none; cursor: pointer; width: calc(100% - 40px);
  transition: background .15s;
}
.see-all-btn:hover { background: var(--green-pale); }

/* ── Bottom Nav ── */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 430px;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  display: flex; align-items: center; justify-content: space-around;
  padding: 8px 0 20px;
  z-index: 100;
  box-shadow: 0 -4px 20px rgba(0,0,0,.06);
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  text-decoration: none; color: var(--gray-500); cursor: pointer;
  min-width: 60px; border: none; background: none;
}
.nav-item span { font-size: 10.5px; font-weight: 500; }
.nav-item svg  { transition: color .15s; }
.nav-item.active     { color: var(--green-main); }
.nav-item.active svg { color: var(--green-main); }
.nav-fab {
  width: 54px; height: 54px; border-radius: 50%;
  background: linear-gradient(135deg, var(--green-mid), var(--green-dark));
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-green); margin-top: -20px; border: 3px solid var(--white);
  cursor: pointer; text-decoration: none;
}

/* ── Splash Screen ── */
.splash-screen {
  min-height: 100vh;
  background: linear-gradient(180deg, #f0fdf4 0%, #d8f3dc 40%, var(--white) 100%);
  display: flex; flex-direction: column;
}
.splash-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 50px 28px 0;
}
.splash-logo-icon {
  width: 42px; height: 42px; background: var(--green-main);
  border-radius: 12px; display: flex; align-items: center; justify-content: center;
}
.splash-logo-text  { font-size: 18px; font-weight: 800; color: var(--green-dark); }
.splash-logo-sub   { font-size: 11px; color: var(--green-mid); font-weight: 500; }
.splash-illustration {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 20px 0;
}
.splash-bottom {
  padding: 0 28px 48px;
  background: var(--white);
  border-radius: 32px 32px 0 0;
  padding-top: 28px;
}
.splash-title    { font-size: 28px; font-weight: 800; color: var(--gray-900); line-height: 1.2; margin-bottom: 12px; }
.splash-title span { color: var(--green-main); }
.splash-subtitle { font-size: 14px; color: var(--gray-500); line-height: 1.6; margin-bottom: 28px; }
.splash-dots { display: flex; gap: 6px; margin-bottom: 24px; }
.splash-dot  { width: 8px; height: 8px; border-radius: 4px; background: var(--gray-300); transition: all .3s; }
.splash-dot.active { width: 24px; background: var(--green-main); }
.splash-actions { display: flex; gap: 12px; align-items: center; }

/* ── Buttons ── */
.btn-primary-app {
  background: linear-gradient(135deg, var(--green-mid), var(--green-dark));
  color: #fff; border: none; border-radius: var(--radius-md);
  padding: 15px 28px; font-size: 15px; font-weight: 700;
  cursor: pointer; flex: 1; text-align: center; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-green); transition: opacity .15s;
}
.btn-primary-app:hover { opacity: .92; }
.btn-ghost {
  color: var(--green-main); font-weight: 600; font-size: 14px;
  border: none; background: none; cursor: pointer; text-decoration: none;
  display: flex; align-items: center; gap: 4px; white-space: nowrap;
}

/* ── Auth Screens ── */
.auth-screen {
  min-height: 100vh;
  background: linear-gradient(180deg, #d8f3dc 0%, var(--white) 35%);
  display: flex; flex-direction: column;
}
.auth-header {
  padding: 50px 28px 30px; text-align: center;
}
.auth-logo-wrap {
  width: 70px; height: 70px; background: var(--white);
  border-radius: 22px; margin: 0 auto 18px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
}
.auth-title    { font-size: 24px; font-weight: 800; color: var(--gray-900); }
.auth-subtitle { font-size: 14px; color: var(--gray-500); margin-top: 6px; }
.auth-card {
  flex: 1; background: var(--white);
  border-radius: 28px 28px 0 0;
  padding: 28px 24px 40px;
  box-shadow: 0 -4px 20px rgba(0,0,0,.06);
}
.app-input-group { margin-bottom: 16px; }
.app-input-label { font-size: 13px; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; display: block; }
.app-input {
  width: 100%; padding: 14px 16px;
  border: 1.5px solid var(--gray-200); border-radius: var(--radius-sm);
  font-size: 15px; color: var(--gray-900); background: var(--gray-100);
  outline: none; transition: border-color .15s, background .15s;
  font-family: inherit;
}
.app-input:focus { border-color: var(--green-mid); background: var(--white); }
.app-input.has-icon { padding-left: 46px; }
.input-wrap { position: relative; }
.input-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--gray-500);
}
.auth-divider {
  display: flex; align-items: center; gap: 12px; margin: 20px 0;
}
.auth-divider hr { flex: 1; border: none; border-top: 1px solid var(--gray-200); }
.auth-divider span { font-size: 13px; color: var(--gray-400); }
.auth-link { color: var(--green-mid); font-weight: 600; text-decoration: none; }
.auth-bottom-text { text-align: center; font-size: 14px; color: var(--gray-500); margin-top: 20px; }

/* ── Profile Screen ── */
.profile-header {
  height: 200px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--green-dark), var(--green-mid));
}
.profile-header-blur {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #1b4332cc, #2d6a4fcc);
  backdrop-filter: blur(8px);
}
.profile-header-content {
  position: relative; z-index: 1; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding-bottom: 20px;
}
.profile-avatar-wrap { position: relative; }
.profile-avatar {
  width: 80px; height: 80px; border-radius: 50%; border: 3px solid rgba(255,255,255,.6);
  object-fit: cover; margin-bottom: 10px; display: block;
}
.profile-avatar-placeholder {
  width: 80px; height: 80px; border-radius: 50%;
  background: rgba(255,255,255,.25); border: 3px solid rgba(255,255,255,.6);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 800; color: #fff; margin-bottom: 10px;
}
.profile-name     { font-size: 18px; font-weight: 800; color: #fff; }
.profile-handle   { font-size: 13px; color: rgba(255,255,255,.75); margin-top: 2px; }
.profile-menu     { flex: 1; background: var(--white); border-radius: 24px 24px 0 0; margin-top: -20px; padding: 8px 0 100px; }
.profile-menu-item {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 24px; text-decoration: none; color: var(--gray-900);
  border-bottom: 1px solid var(--gray-100); transition: background .12s;
}
.profile-menu-item:hover { background: var(--gray-100); }
.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; flex-shrink: 0;
}
.profile-menu-text { font-size: 14.5px; font-weight: 500; flex: 1; }
.profile-menu-arrow { color: var(--gray-400); }

/* ── Track Guest Screen ── */
.track-header {
  background: linear-gradient(135deg, var(--green-dark), var(--green-mid));
  padding: 50px 24px 40px;
  text-align: center; color: #fff;
}
.track-header h1 { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.track-header p  { font-size: 14px; opacity: .8; }
.track-search-box {
  background: var(--white); border-radius: 16px;
  padding: 6px 6px 6px 16px;
  display: flex; align-items: center; gap: 8px;
  box-shadow: var(--shadow-md); margin: -22px 24px 0;
}
.track-search-box input {
  flex: 1; border: none; outline: none; font-size: 14px;
  color: var(--gray-900); background: transparent; font-family: inherit;
  text-transform: uppercase;
}
.track-search-box input::placeholder { text-transform: none; color: var(--gray-400); }
.track-result  { margin: 24px 20px 0; }

/* ── Timeline ── */
.timeline { padding: 0 24px; }
.tl-item  { display: flex; gap: 14px; padding: 10px 0; position: relative; }
.tl-left  { display: flex; flex-direction: column; align-items: center; width: 12px; }
.tl-dot   { width: 12px; height: 12px; border-radius: 50%; background: var(--green-mid); flex-shrink: 0; margin-top: 3px; }
.tl-line  { width: 2px; flex: 1; background: var(--gray-200); margin: 3px 0; min-height: 20px; }
.tl-content { flex: 1; padding-bottom: 4px; }
.tl-status  { font-size: 13.5px; font-weight: 600; color: var(--gray-900); }
.tl-notes   { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.tl-time    { font-size: 11px; color: var(--gray-400); margin-top: 3px; }

/* ── Order Card ── */
.order-card {
  background: var(--white); border-radius: var(--radius-md);
  padding: 16px 18px; margin: 0 20px 12px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--gray-200);
}
.order-tracking { font-family: monospace; font-size: 13px; font-weight: 700; color: var(--green-mid); }
.order-route    { font-size: 13px; color: var(--gray-700); margin-top: 4px; }
.order-meta     { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.order-badge {
  padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600;
}

/* ── Scrollable Content ── */
.scrollable { flex: 1; overflow-y: auto; padding-bottom: 80px; }

/* ── Alert ── */
.app-alert {
  margin: 12px 20px; padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: 13.5px; display: flex; align-items: center; gap: 8px;
}
.app-alert.success { background: var(--green-bg); color: var(--green-dark); }
.app-alert.error   { background: #fee2e2; color: #991b1b; }

/* ── Responsive ── */
@media (min-width: 430px) {
  html, body { box-shadow: 0 0 40px rgba(0,0,0,.15); }
}
