:root {
  --primary: #0ea5e9;
  --primary-dark: #0284c7;
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --danger: #ef4444;
  --success: #22c55e;
}

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

body {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: #1e293b;
  -webkit-tap-highlight-color: transparent;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Login */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f3b57 0%, #1a5276 50%, #0c2d44 100%);
  padding: 1rem;
}
.login-card {
  background: #fff;
  border-radius: 1rem;
  padding: 2rem;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.login-card .logo {
  text-align: center;
  margin-bottom: 1.5rem;
}
.login-card .logo i {
  font-size: 2.5rem;
  color: var(--primary);
}
.login-card h2 {
  text-align: center;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.login-card .subtitle {
  text-align: center;
  color: #64748b;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1rem;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: #334155;
}
.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 0.6rem;
  font-size: 1rem;
  transition: border 0.15s;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.6rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  width: 100%;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:active {
  background: var(--primary-dark);
}
.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-outline {
  background: #fff;
  color: var(--primary);
  border: 2px solid var(--primary);
}

/* Dashboard */
.app-header {
  background: var(--primary);
  color: #fff;
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.app-header h1 {
  font-size: 1.1rem;
  font-weight: 600;
}
.app-header .logout-btn {
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  padding: 0.4rem 0.8rem;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  cursor: pointer;
}

.app-content {
  padding: 1rem;
  max-width: 500px;
  margin: 0 auto;
}

/* Info bar */
.info-bar {
  background: #fff;
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.info-bar .driver-name {
  font-weight: 600;
}
.info-bar .client-name {
  color: #64748b;
  font-size: 0.85rem;
}

/* Action cards */
.action-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.action-card {
  background: #fff;
  border-radius: 0.75rem;
  padding: 1.5rem 1rem;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
  border: 2px solid transparent;
}
.action-card:active {
  transform: scale(0.97);
}
.action-card.selected {
  border-color: var(--primary);
  background: #f0f9ff;
}
.action-card i {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
  display: block;
}
.action-card .card-label {
  font-weight: 600;
  font-size: 0.9rem;
}

/* Vehicle lookup */
.vehicle-result {
  background: #f0fdf4;
  border: 2px solid var(--success);
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 1rem;
}
.vehicle-result .reg {
  font-size: 1.2rem;
  font-weight: 700;
}
.vehicle-result .detail {
  color: #64748b;
  font-size: 0.9rem;
}

/* Provider cards */
.provider-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.provider-card {
  background: #fff;
  border-radius: 0.75rem;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  cursor: pointer;
  border: 2px solid transparent;
}
.provider-card.selected {
  border-color: var(--primary);
  background: #f0f9ff;
}
.provider-card .name {
  font-weight: 600;
}
.provider-card .meta {
  color: #64748b;
  font-size: 0.85rem;
}
.provider-card .price {
  font-weight: 700;
  color: var(--primary);
  font-size: 1.1rem;
}

/* Status badge */
.badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-completed { background: #d1fae5; color: #065f46; }
.badge-progress { background: #dbeafe; color: #1e40af; }
.badge-cancelled { background: #fee2e2; color: #991b1b; }

/* Toast */
.toast {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  font-weight: 500;
  z-index: 9999;
  animation: slideUp 0.3s ease;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
@keyframes slideUp {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ── Fix iOS/Apple native dropdown picker ────────────────────── */
select,
.vehicle-select {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.6rem;
    font-size: 16px !important;   /* prevents iOS auto-zoom */
    background: #fff;
    color: #1e293b;
    -webkit-appearance: auto;
    appearance: auto;
    cursor: pointer;
}

select:focus,
.vehicle-select:focus {
    outline: none;
    border-color: #0ea5e9;
}

select option,
.vehicle-select option {
    font-size: 16px;
    color: #1e293b;
    background: #fff;
}

select.form-control {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 2px solid #44403c;
    border-radius: 0.5rem;
    font-size: 16px;
    background: #1c1917;
    color: #fafaf9;
    margin-bottom: 0.5rem;
    -webkit-appearance: auto;
    appearance: auto;
}
select.form-control option {
    background: #fff;
    color: #1e293b;
    font-size: 16px;
}