/* Driver portal styles */

/* ── App Header ── */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0 12px;
  flex-wrap: wrap;
}
.app-header-info { display: flex; align-items: center; gap: 14px; }
.driver-avatar {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 8px 20px rgba(245,158,11,0.3);
}
.app-header-info h2 { margin: 0; font-size: 20px; font-weight: 700; }
.app-header-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Online toggle */
.online-toggle {
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: none;
}
.online-toggle.online {
  background: linear-gradient(135deg, #00b14f, #008a3a);
  color: #fff;
  box-shadow: 0 6px 16px rgba(0,177,79,0.35);
}
.online-toggle.offline {
  background: #e5e7eb;
  color: #6b7280;
}

/* Driver info bar */
.driver-info-bar {
  display: flex;
  gap: 12px;
  padding: 14px 20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.info-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #2d4436;
  background: #f2f6f3;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid #d3ddd7;
}

/* ── Main nav tabs ── */
.main-tabs {
  display: flex;
  gap: 4px;
  background: #f0f4f1;
  border-radius: 16px;
  padding: 5px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.main-tab {
  flex: 1;
  min-width: 110px;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  color: #4a6553;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  box-shadow: none;
}
.main-tab:hover { background: rgba(0,177,79,0.1); transform: none; }
.main-tab.active { background: #fff; color: #006e2f; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }

/* Section toolbar */
.section-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}
.section-toolbar h3 { margin: 0; font-size: 18px; font-weight: 700; color: #0a3520; }

/* Order cards */
.order-cards { display: flex; flex-direction: column; gap: 12px; }
.order-card {
  background: #fff;
  border: 1px solid #d3ddd7;
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: box-shadow 0.2s;
}
.order-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
.order-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.order-card-icon.available { background: #dcfce7; }
.order-card-icon.mine      { background: #dbeafe; }
.order-card-body { flex: 1; min-width: 0; }
.order-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}
.order-id    { font-family: monospace; font-size: 13px; color: #6b7f72; }
.order-store { font-weight: 700; font-size: 15px; color: #0a3520; }
.order-meta  { font-size: 13px; color: #6b7f72; margin-top: 4px; }
.order-items { font-size: 12px; color: #3b5249; margin-top: 4px; }
.order-card-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.status-PENDING   { background: #fef9c3; color: #854d0e; }
.status-CONFIRMED { background: #dbeafe; color: #1e40af; }
.status-PREPARING { background: #ffedd5; color: #9a3412; }
.status-PICKED_UP { background: #ede9fe; color: #5b21b6; }
.status-DELIVERED { background: #dcfce7; color: #166534; }
.status-CANCELLED { background: #fee2e2; color: #991b1b; }

.pm-badge { font-size: 11px; padding: 2px 8px; border-radius: 999px; font-weight: 700; }
.pm-SEPAY_QR { background: #e0f2fe; color: #0369a1; }
.pm-COD      { background: #fef3c7; color: #92400e; }

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: #6b7f72;
}
.empty-state .emoji { font-size: 48px; margin-bottom: 12px; }

/* ── Wallet ── */
.wallet-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
.wallet-card { padding: 24px; }
.wallet-credit {
  background: linear-gradient(135deg, #fef3c7 0%, #fffbeb 100%);
  border-color: #fcd34d;
}
.wallet-cash {
  background: linear-gradient(135deg, #dff8ea 0%, #f0faf4 100%);
  border-color: #a3e6bf;
}
.wallet-header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.wallet-icon   { font-size: 28px; }
.wallet-label  { font-weight: 700; color: #2d4436; font-size: 14px; }
.wallet-balance {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}
.wallet-credit .wallet-balance { color: #92400e; }
.wallet-cash   .wallet-balance { color: #006e2f; }
.wallet-hold   { font-size: 13px; margin-bottom: 8px; color: #4a6553; }
.wallet-note   { font-size: 12px; color: #6b7f72; background: rgba(255,255,255,0.6); padding: 8px 10px; border-radius: 8px; margin-bottom: 12px; }
.btn-topup {
  width: 100%;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 11px 16px;
  font-weight: 700;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  transition: transform 0.2s, filter 0.2s;
}
.btn-topup:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn-withdraw {
  width: 100%;
  background: linear-gradient(135deg, #00b14f, #008a3a);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 11px 16px;
  font-weight: 700;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  transition: transform 0.2s, filter 0.2s;
}
.btn-withdraw:hover { transform: translateY(-1px); filter: brightness(1.05); }

/* Form panel */
.form-panel {
  padding: 24px;
  margin-bottom: 16px;
  animation: slideDown 0.25s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.form-panel h4 { margin: 0 0 4px 0; font-size: 16px; font-weight: 700; color: #0a3520; }

/* QR code */
.qr-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px;
  background: #f8fdf9;
  border-radius: 16px;
  border: 2px dashed #a3e6bf;
  margin-top: 16px;
  gap: 8px;
}
#topup-qr-code { padding: 12px; background: #fff; border-radius: 12px; }
.qr-amount { font-size: 20px; font-weight: 800; color: #006e2f; margin: 0; }
.qr-ref { font-size: 13px; color: #4a6553; margin: 0; }

/* Btn helpers */
.btn-sm { padding: 8px 14px !important; font-size: 13px !important; }
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #00b14f, #008a3a);
  box-shadow: 0 8px 20px rgba(0,138,58,0.28);
  border: none;
  border-radius: 12px;
  padding: 11px 18px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.2s, filter 0.2s;
  font-family: inherit;
  font-size: 14px;
}
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.05); }

/* Auth */
.auth-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
  padding: 60px 0;
}
.auth-card { padding: 32px; }
.auth-card h2 { margin: 0 0 4px 0; font-size: 22px; font-weight: 800; }
.promo-icon { font-size: 52px; margin-bottom: 16px; }
.auth-promo h1 { font-size: 28px; font-weight: 800; line-height: 1.25; color: #0a3520; margin: 0 0 10px 0; }
.auth-promo p  { color: #3b5249; font-size: 15px; line-height: 1.6; }
.promo-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.promo-badge {
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.25);
  border: 1px solid rgba(0,100,50,0.15);
  font-size: 13px;
  font-weight: 600;
  color: #0a3520;
}
.tabs { display: flex; gap: 6px; }
.tab-btn { padding: 9px 18px; border-radius: 10px; font-weight: 600; color: #4a6553; background: #f2f6f3; border: 1px solid #d3ddd7; cursor: pointer; transition: all 0.2s; box-shadow: none; }
.tab-btn.active { background: var(--brand-soft); color: #006e2f; border-color: #a3e6bf; }
.tab-btn:hover  { transform: none; }
.intro { margin: 0 0 16px 0; font-size: 14px; }

/* Topup status badges */
.ts-PENDING   { background: #fef9c3; color: #854d0e; }
.ts-CONFIRMED { background: #dcfce7; color: #166534; }
.ts-EXPIRED   { background: #fee2e2; color: #991b1b; }
.ts-CANCELED  { background: #e5e7eb; color: #6b7280; }

@media (max-width: 900px) {
  .auth-layout { grid-template-columns: 1fr; padding: 32px 0; }
  .wallet-duo  { grid-template-columns: 1fr; }
  .main-tabs   { gap: 2px; }
  .main-tab    { font-size: 12px; padding: 8px 10px; }
}
