/* Delivery Boy Mobile UI - Global Styles */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #f5f7fb;
  color: #111827;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f5f7fb;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #111827;
  color: #f9fafb;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.35);
}

.app-header-title {
  font-size: 1.05rem;
  font-weight: 600;
}

.app-header-subtitle {
  font-size: 0.7rem;
  color: #9ca3af;
}

.app-header-right {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.app-header-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 600;
}

.app-content {
  flex: 1;
  padding: 0.75rem 0.75rem 3.75rem;
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
}

.app-footer {
  text-align: center;
  font-size: 0.7rem;
  color: #9ca3af;
  padding: 0.5rem 1rem 0.75rem;
}

/* Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 30;
  background: #111827;
  box-shadow: 0 -2px 10px rgba(15, 23, 42, 0.4);
}

.bottom-nav-inner {
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  justify-content: space-around;
  padding: 0.35rem 0.75rem 0.55rem;
}

.bottom-nav-link {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  color: #9ca3af;
  font-size: 0.65rem;
}

.bottom-nav-link span.icon {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.bottom-nav-link.active {
  color: #f9fafb;
}

.bottom-nav-link.active span.icon {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

/* Utility spacing & layout */
.mb-xs { margin-bottom: 0.35rem; }
.mb-sm { margin-bottom: 0.6rem; }
.mb-md { margin-bottom: 0.9rem; }
.mb-lg { margin-bottom: 1.25rem; }

.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.gap-xs { gap: 0.25rem; }
.gap-sm { gap: 0.5rem; }
.gap-md { gap: 0.75rem; }

.text-muted { color: #6b7280; }
.text-xs { font-size: 0.7rem; }
.text-sm { font-size: 0.8rem; }
.text-right { text-align: right; }

.badge-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 500;
}

.badge-pill.success {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
}

.badge-pill.info {
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
}

.badge-pill.warning {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
}

.badge-pill.danger {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

/* Cards */
.card {
  background: #ffffff;
  border-radius: 0.9rem;
  padding: 0.85rem 0.9rem;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.card + .card {
  margin-top: 0.75rem;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}

.card-title {
  font-size: 0.9rem;
  font-weight: 600;
}

.card-subtitle {
  font-size: 0.7rem;
  color: #6b7280;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 700;
}

.stat-label {
  font-size: 0.7rem;
  color: #6b7280;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.08rem 0.4rem;
  font-size: 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  color: #6b7280;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: none;
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.2s ease;
  outline: none;
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn-primary {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #f9fafb;
  box-shadow: 0 7px 16px rgba(22, 163, 74, 0.55);
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.9);
  color: #111827;
}

.btn-ghost {
  background: transparent;
  color: #111827;
}

.btn-sm {
  padding: 0.35rem 0.7rem;
  font-size: 0.75rem;
}

.btn-full {
  width: 100%;
}

.btn-icon {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  padding: 0;
}

.btn-danger {
  background: #ef4444;
  color: #fef2f2;
}

/* Forms */
.form-field {
  margin-bottom: 0.75rem;
}

.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  color: #4b5563;
}

.form-control {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  padding: 0.55rem 0.75rem;
  font-size: 0.85rem;
  outline: none;
  background-color: #f9fafb;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.form-control:focus {
  border-color: #22c55e;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.25);
  background-color: #ffffff;
}

.form-hint {
  font-size: 0.7rem;
  color: #9ca3af;
  margin-top: 0.2rem;
}

.form-row-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
}

.toggle {
  position: relative;
  width: 38px;
  height: 20px;
  border-radius: 999px;
  background: #e5e7eb;
  transition: background 0.15s ease;
}

.toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.4);
  transition: transform 0.15s ease;
}

.toggle.on {
  background: #22c55e;
}

.toggle.on .toggle-thumb {
  transform: translateX(18px);
}

/* Lists & order cards */
.list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.order-card {
  background: #ffffff;
  border-radius: 0.9rem;
  padding: 0.8rem 0.85rem;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.order-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.order-code {
  font-size: 0.8rem;
  font-weight: 600;
}

.order-meta {
  font-size: 0.72rem;
  color: #6b7280;
}

.order-locations {
  font-size: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.order-locations span {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.order-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.3rem;
}

.order-actions {
  display: flex;
  gap: 0.35rem;
}

/* Timeline */
.timeline {
  position: relative;
  margin-top: 0.25rem;
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.timeline-item + .timeline-item {
  margin-top: 0.4rem;
}

.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #d1d5db;
  margin-top: 0.15rem;
}

.timeline-dot.active {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.35);
}

.timeline-content {
  flex: 1;
}

.timeline-title {
  font-size: 0.78rem;
  font-weight: 600;
}

.timeline-time {
  font-size: 0.7rem;
  color: #9ca3af;
}

/* Alert & notification */
.alert {
  padding: 0.65rem 0.8rem;
  border-radius: 0.75rem;
  font-size: 0.75rem;
  display: flex;
  gap: 0.45rem;
  align-items: flex-start;
}

.alert.info {
  background: rgba(59, 130, 246, 0.08);
  color: #1d4ed8;
}

.alert.success {
  background: rgba(34, 197, 94, 0.08);
  color: #15803d;
}

.alert.warning {
  background: rgba(245, 158, 11, 0.08);
  color: #b45309;
}

.alert-icon {
  font-size: 1rem;
}

.notification-item {
  background: #ffffff;
  padding: 0.75rem 0.8rem;
  border-radius: 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.05);
}

.notification-item.unread {
  border-left: 3px solid #22c55e;
}

.notification-text {
  font-size: 0.78rem;
}

.notification-time {
  font-size: 0.7rem;
  color: #9ca3af;
}

/* Map */
.map-card iframe {
  width: 100%;
  height: 230px;
  border: 0;
  border-radius: 0.75rem;
}

.map-meta {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  display: flex;
  justify-content: space-between;
}

/* Simple table-like list for commission page */
.commission-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  padding: 0.45rem 0;
}

.commission-row-header {
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 0.2rem;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 40;
}

.modal {
  width: 92%;
  max-width: 420px;
  background: #ffffff;
  border-radius: 1rem;
  padding: 0.9rem 0.95rem 0.85rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.6);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.modal-title {
  font-size: 0.9rem;
  font-weight: 600;
}

.modal-close {
  border: none;
  background: transparent;
  font-size: 1rem;
  cursor: pointer;
}

.modal-body {
  font-size: 0.78rem;
  margin-bottom: 0.6rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
}

.modal-backdrop.show {
  display: flex;
}

/* Login specific */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.75rem 1.25rem 1.5rem;
  max-width: 480px;
  margin: 0 auto;
}

.auth-logo {
  width: 54px;
  height: 54px;
  border-radius: 1.2rem;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f9fafb;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
}

.auth-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.auth-subtitle {
  font-size: 0.8rem;
  color: #6b7280;
  margin-bottom: 1.4rem;
}

.auth-footer-text {
  font-size: 0.7rem;
  color: #9ca3af;
  margin-top: 1.1rem;
  text-align: center;
}

/* Profile */
.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f9fafb;
  font-size: 1.7rem;
  font-weight: 700;
  margin: 0 auto 0.5rem;
}

.profile-name {
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
}

.profile-meta {
  text-align: center;
  font-size: 0.8rem;
  color: #6b7280;
  margin-bottom: 0.9rem;
}

.profile-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  padding: 0.35rem 0;
}

.profile-field-label {
  color: #6b7280;
}

.profile-field-value {
  font-weight: 500;
}

/* Small screens tweaks */
@media (min-width: 640px) {
  .app-content {
    padding-bottom: 4rem;
  }
}


