/* ============================================================
   DRIVER.CSS — Diekstrak dari driver.html (identik prototype)
   ============================================================ */

/* Header (sama dengan customer/mitra) */
.header { position: sticky; top: 0; z-index: 100; background: var(--surface);
  padding: calc(12px + var(--safe-top)) 16px 12px; border-bottom: 1px solid var(--border); backdrop-filter: blur(20px); }
.header-row { display: flex; align-items: center; gap: 12px; }
.header-greet { flex: 1; min-width: 0; }
.header-hi { font-size: 12px; color: var(--text-3); }
.header-name { font-size: 15px; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-actions { display: flex; gap: 8px; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; position: relative; transition: all .2s; }
.icon-btn:hover { background: var(--border); }
.icon-btn svg { width: 20px; height: 20px; color: var(--text); }
.icon-btn .badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; background: var(--red); color: #fff; border-radius: 9px; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 2px solid var(--surface); }

.main { padding: 16px; max-width: 720px; margin: 0 auto; }
.section { margin-bottom: 24px; animation: fadeUp .5s ease; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.section-title h2 { font-size: 16px; font-weight: 700; color: var(--text); }
.section-title .link { font-size: 12px; color: var(--electric); font-weight: 600; background: none; border: 0; cursor: pointer; }

/* KPI */
.kpi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
.kpi-card { background: var(--surface); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); border: 1px solid var(--border); transition: transform .2s; }
.kpi-card:hover { transform: translateY(-2px); }
.kpi-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--grad-card); display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.kpi-icon svg { width: 18px; height: 18px; color: var(--electric); }
.kpi-val { font-size: 22px; font-weight: 800; color: var(--text); line-height: 1; }
.kpi-lbl { font-size: 11px; color: var(--text-3); margin-top: 4px; }

/* Address group */
.address-group { margin-bottom: 20px; }
.address-header { font-size: 13px; font-weight: 700; color: var(--electric); margin-bottom: 10px; display: flex; align-items: center; gap: 6px; padding: 0 4px; }
.address-header svg { width: 16px; height: 16px; }

/* Order card */
.order-card { background: var(--surface); border-radius: var(--radius); padding: 14px; margin-bottom: 10px; box-shadow: var(--shadow); border: 1px solid var(--border); transition: all .2s; }
.order-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.order-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.order-id { font-size: 13px; font-weight: 700; color: var(--text); }
.order-date { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.order-body { display: flex; gap: 10px; margin-bottom: 10px; }
.order-thumb { width: 56px; height: 56px; border-radius: 10px; background: var(--surface-2); flex-shrink: 0; overflow: hidden; }
.order-thumb img { width: 100%; height: 100%; object-fit: cover; }
.order-info { flex: 1; min-width: 0; }
.order-title { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.order-meta { font-size: 11px; color: var(--text-3); margin-bottom: 2px; display: flex; align-items: center; gap: 4px; }
.order-foot { display: flex; justify-content: space-between; align-items: center; padding-top: 10px; border-top: 1px solid var(--border); }

/* Status pill driver (5 status kanonis) */
.status-pill { padding: 4px 10px; border-radius: 20px; font-size: 10px; font-weight: 700; white-space: nowrap; display: inline-block; }
.status-available { background: rgba(59,130,246,.15); color: var(--electric); }
.status-claimed { background: rgba(245,158,11,.15); color: var(--orange); }
.status-in_delivery { background: rgba(34,211,238,.15); color: var(--cyan); }
.status-driver_completed { background: rgba(34,197,94,.15); color: var(--green); }
.status-customer_confirmed { background: rgba(139,92,246,.15); color: var(--purple); }

/* Photo preview */
.photo-preview { width: 100%; aspect-ratio: 16/9; background: var(--surface-2); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; overflow: hidden; margin-bottom: 12px; border: 2px dashed var(--border); }
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-preview.has-image { border-style: solid; border-color: var(--electric); }

/* Profile (reuse customer.css) */
.profile-header { background: var(--grad-dark); border-radius: var(--radius-lg); padding: 24px; color: #fff; text-align: center; margin-bottom: 16px; position: relative; overflow: hidden; }
.profile-avatar { width: 80px; height: 80px; border-radius: 50%; background: var(--grad-primary); margin: 0 auto 12px; display: flex; align-items: center; justify-content: center; font-size: 32px; font-weight: 800; border: 3px solid rgba(255,255,255,.3); position: relative; overflow: hidden; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-name { font-size: 18px; font-weight: 800; margin-bottom: 4px; position: relative; }
.profile-email { font-size: 12px; opacity: .8; position: relative; }
.profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; position: relative; }
.profile-stat { background: rgba(255,255,255,.1); padding: 10px; border-radius: 12px; backdrop-filter: blur(10px); }
.profile-stat-val { font-size: 18px; font-weight: 800; }
.profile-stat-lbl { font-size: 10px; opacity: .8; }

.profile-menu { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); margin-bottom: 12px; }
.profile-menu-title { padding: 12px 16px; font-size: 12px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .5px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.profile-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background .2s; }
.profile-item:last-child { border-bottom: 0; }
.profile-item:hover { background: var(--surface-2); }
.profile-item-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--grad-card); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.profile-item-icon svg { width: 18px; height: 18px; color: var(--electric); }
.profile-item-text { flex: 1; min-width: 0; }
.profile-item-title { font-size: 13px; font-weight: 600; color: var(--text); }
.profile-item-sub { font-size: 11px; color: var(--text-3); }
.profile-item svg.chev { width: 16px; height: 16px; color: var(--text-3); flex-shrink: 0; }
.btn-logout { width: 100%; margin-top: 16px; padding: 14px; background: rgba(239,68,68,.1); color: var(--red); border-radius: var(--radius); font-weight: 700; font-size: 14px; transition: all .2s; }
.btn-logout:hover { background: rgba(239,68,68,.2); }

/* Bottom nav driver (4 item) */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 90; background: var(--surface); border-top: 1px solid var(--border); padding: 8px 0 calc(8px + var(--safe-bottom)); display: grid; grid-template-columns: repeat(4, 1fr); backdrop-filter: blur(20px); }
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 4px; color: var(--text-3); transition: color .2s; position: relative; }
.nav-item.active { color: var(--electric); }
.nav-item.active::before { content: ""; position: absolute; top: -8px; left: 50%; transform: translateX(-50%); width: 24px; height: 3px; background: var(--grad-primary); border-radius: 0 0 3px 3px; }
.nav-item svg { width: 22px; height: 22px; }
.nav-item span { font-size: 10px; font-weight: 600; }

@media (min-width: 768px) {
  .kpi-grid { grid-template-columns: repeat(4, 1fr); }
}