/* style.css — FoodRunner v2 Shared Styles (refreshed)
   ─────────────────────────────────────────────────────────────
   Every original class is preserved (pages depend on them).
   Design tokens sharpened + new shared "FR toolkit" classes
   prefixed with fr- (collision-safe; page-local styles win on
   equal specificity, so existing pages are untouched).
   ───────────────────────────────────────────────────────────── */

/* ── CSS Variables ── */
:root {
  --orange: #f7941d;
  --orange-dark: #e67e00;
  --orange-light: #fff3e0;
  --orange-soft: #fff8ee;
  --navy: #0f1724;
  --navy-light: #1e293b;
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --success: #22c55e;
  --success-light: #dcfce7;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --info: #3b82f6;
  --info-light: #dbeafe;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 36, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 23, 36, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 36, 0.12);
  --shadow-xl: 0 24px 48px rgba(15, 23, 36, 0.18);
  --shadow-orange: 0 4px 16px rgba(247, 148, 29, 0.28);

  --font-body: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Sora', system-ui, sans-serif;

  /* status palette (used by fr- toolkit + badges) */
  --st-pending-bg: #fef3c7;  --st-pending-tx: #92400e;
  --st-active-bg: #dbeafe;   --st-active-tx: #1e40af;
  --st-prep-bg: #fce7f3;     --st-prep-tx: #9d174d;
  --st-ready-bg: #e0e7ff;    --st-ready-tx: #3730a3;
  --st-go-bg: #c7f2d0;       --st-go-tx: #166534;
  --st-done-bg: #dcfce7;     --st-done-tx: #15803d;
  --st-bad-bg: #fee2e2;      --st-bad-tx: #991b1b;
}

/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--gray-50);
  color: var(--navy);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--orange);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--orange-dark);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--navy);
}

h1 { font-size: 2rem; letter-spacing: -0.5px; }
h2 { font-size: 1.5rem; letter-spacing: -0.3px; }
h3 { font-size: 1.25rem; }

p {
  color: var(--gray-600);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  border: none;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: var(--white);
  box-shadow: var(--shadow-orange);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(247, 148, 29, 0.4);
  color: var(--white);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

.btn-secondary {
  background: var(--white);
  color: var(--navy);
  border: 2px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  border-color: var(--orange);
  color: var(--orange);
  box-shadow: var(--shadow-md);
}

.btn-secondary:active {
  transform: scale(0.98);
}

.btn-outline {
  background: transparent;
  color: var(--orange);
  border: 2px solid var(--orange);
}

.btn-outline:hover {
  background: var(--orange);
  color: var(--white);
  box-shadow: var(--shadow-orange);
}

.btn-outline:active {
  transform: scale(0.98);
}

/* status-flavoured buttons (new, no collisions) */
.btn-success {
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.3);
}
.btn-success:hover { transform: translateY(-2px); color: var(--white); }
.btn-success:active { transform: scale(0.98); }

.btn-danger {
  background: linear-gradient(135deg, #f87171, #dc2626);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}
.btn-danger:hover { transform: translateY(-2px); color: var(--white); }
.btn-danger:active { transform: scale(0.98); }

.btn-sm {
  padding: 10px 18px;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 18px 36px;
  font-size: 1.125rem;
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none;
}

/* ── Forms ── */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--navy);
  background: var(--white);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
  border-color: var(--gray-300);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(247, 148, 29, 0.12);
}

.form-input::placeholder {
  color: var(--gray-400);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 44px;
}

.form-error {
  font-size: 0.8125rem;
  color: var(--danger);
  margin-top: 6px;
  display: none;
}

.form-error.visible {
  display: block;
}

/* ── Cards ── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-100);
  overflow: hidden;
}

.card-body {
  padding: 24px;
}

.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--navy);
}

/* ── Layout Utilities ── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.container-sm {
  max-width: 480px;
}

.container-md {
  max-width: 720px;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }

.text-center { text-align: center; }
.text-left { text-align: left; }

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }

.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }

.w-full { width: 100%; }

/* ── Spacing ── */
.section {
  padding: 64px 0;
}

.section-sm {
  padding: 40px 0;
}

/* ── Status Badges (original set kept intact) ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-pending { background: var(--st-pending-bg); color: var(--st-pending-tx); }
.badge-confirmed { background: var(--st-active-bg); color: var(--st-active-tx); }
.badge-preparing { background: var(--st-prep-bg); color: var(--st-prep-tx); }
.badge-ready { background: var(--st-ready-bg); color: var(--st-ready-tx); }
.badge-delivering { background: var(--st-go-bg); color: var(--st-go-tx); }
.badge-delivered { background: var(--st-done-bg); color: var(--st-done-tx); }
.badge-cancelled { background: var(--st-bad-bg); color: var(--st-bad-tx); }

/* ── Loading Spinner ── */
.spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Toast Notifications ── */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 14px 20px 14px 16px;
  border-radius: var(--radius-md);
  color: var(--white);
  font-weight: 500;
  font-size: 0.875rem;
  box-shadow: var(--shadow-lg);
  animation: slideInRight 0.3s ease, fadeOut 0.3s ease 3.7s forwards;
  max-width: 360px;
  border-left: 5px solid rgba(255, 255, 255, 0.35);
}

.toast-success { background: #16a34a; border-left-color: #bbf7d0; }
.toast-error { background: #dc2626; border-left-color: #fecaca; }
.toast-info { background: #2563eb; border-left-color: #bfdbfe; }

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
  to { opacity: 0; transform: translateX(100%); }
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 36, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95);
  transition: transform 0.2s ease;
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--gray-100);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--gray-400);
  cursor: pointer;
  line-height: 1;
  transition: color 0.15s ease;
}

.modal-close:hover {
  color: var(--navy);
}

/* ── Divider ── */
.divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  color: var(--gray-400);
  font-size: 0.875rem;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

/* ── Google Sign-In Button ── */
.btn-google {
  background: var(--white);
  color: var(--gray-700);
  border: 2px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  font-weight: 500;
}

.btn-google:hover {
  border-color: var(--gray-300);
  box-shadow: var(--shadow-md);
  color: var(--gray-700);
}

.btn-google svg {
  width: 20px;
  height: 20px;
}

/* ── Auth Pages Shared ── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background:
    radial-gradient(800px 400px at 110% -10%, rgba(247, 148, 29, 0.14), transparent 60%),
    radial-gradient(600px 300px at -10% 110%, rgba(247, 148, 29, 0.10), transparent 60%),
    linear-gradient(135deg, var(--gray-50) 0%, var(--orange-light) 100%);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: 40px 32px;
  border: 1px solid rgba(247, 148, 29, 0.12);
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
}

.auth-logo img {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

.auth-logo-text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.5px;
}

.auth-subtitle {
  text-align: center;
  color: var(--gray-500);
  font-size: 0.9375rem;
  margin-bottom: 32px;
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.875rem;
  color: var(--gray-500);
}

/* ── Navbar (shared) ── */
.navbar {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gray-100);
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.navbar-brand img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

.navbar-brand-text {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--navy);
}

.navbar-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-600);
  transition: all 0.15s ease;
}

.nav-link:hover {
  background: var(--gray-100);
  color: var(--navy);
}

.nav-link.active {
  background: var(--orange-light);
  color: var(--orange);
}

/* ── Bottom Navigation (mobile) ── */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--gray-200);
  padding: 8px 0 12px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 50;
  box-shadow: 0 -4px 16px rgba(15, 23, 36, 0.06);
}

.bottom-nav-inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.bottom-nav-item {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 2px;
  color: var(--gray-400);
  font-size: 0.6875rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav-item svg {
  width: 24px;
  height: 24px;
}

.bottom-nav-item.active,
.bottom-nav-item:hover {
  color: var(--orange);
}

/* ════════════════════════════════════════════════════════════
   FR TOOLKIT — new shared components (fr- prefixed, collision-safe)
   ════════════════════════════════════════════════════════════ */

/* ── Chips (filter pills) ── */
.fr-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-600);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}

.fr-chip:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.fr-chip.active {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--white);
  box-shadow: var(--shadow-orange);
}

.fr-chip .fr-chip-count {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 0.6875rem;
}

.fr-chip:not(.active) .fr-chip-count {
  background: var(--gray-100);
  color: var(--gray-500);
}

/* ── Chip row (horizontal scroll on mobile) ── */
.fr-chip-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.fr-chip-row.fr-scrollable {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 6px;
  scrollbar-width: none;
}

.fr-chip-row.fr-scrollable::-webkit-scrollbar {
  display: none;
}

/* ── Stat cards (dashboards) ── */
.fr-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.fr-stat-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 14px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.fr-stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.fr-stat-icon {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--orange-light);
  color: var(--orange-dark);
}

.fr-stat-icon svg {
  width: 22px;
  height: 22px;
}

.fr-stat-icon.fr-ic-green { background: var(--success-light); color: #15803d; }
.fr-stat-icon.fr-ic-blue { background: var(--info-light); color: #1d4ed8; }
.fr-stat-icon.fr-ic-red { background: var(--danger-light); color: #b91c1c; }
.fr-stat-icon.fr-ic-amber { background: var(--warning-light); color: #b45309; }
.fr-stat-icon.fr-ic-navy { background: #e2e8f0; color: var(--navy); }

.fr-stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--gray-500);
}

.fr-stat-value {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.1;
}

.fr-stat-trend {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--gray-400);
  margin-top: 2px;
}

.fr-stat-trend.up { color: var(--success); }
.fr-stat-trend.down { color: var(--danger); }

/* ── Section titles ── */
.fr-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 28px 0 14px;
}

.fr-section-title h2,
.fr-section-title h3 {
  font-size: 1.125rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fr-section-title .fr-title-bar {
  display: inline-block;
  width: 4px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--orange), var(--orange-dark));
}

/* ── Order card (unified across flows) ── */
.fr-order-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.fr-order-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--gray-200);
}

.fr-order-card.fr-attention {
  border-color: rgba(247, 148, 29, 0.5);
  box-shadow: 0 0 0 3px rgba(247, 148, 29, 0.12), var(--shadow-sm);
}

.fr-order-card.fr-urgent {
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.08), var(--shadow-sm);
}

.fr-order-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.fr-order-id {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--navy);
}

.fr-order-time {
  font-size: 0.75rem;
  color: var(--gray-400);
}

.fr-order-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.fr-order-meta {
  font-size: 0.8125rem;
  color: var(--gray-600);
  line-height: 1.7;
}

.fr-order-meta strong { color: var(--navy); }

.fr-order-money {
  text-align: right;
  flex-shrink: 0;
}

.fr-order-money .fr-amount {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.0625rem;
  color: var(--navy);
  white-space: nowrap;
}

.fr-order-money .fr-sub {
  font-size: 0.6875rem;
  color: var(--gray-400);
  font-weight: 600;
}

.fr-order-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.fr-order-actions .btn { flex: 1 1 auto; }

/* ── Money display ── */
.fr-money {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}

.fr-money.fr-money-lg {
  font-size: 1.75rem;
  letter-spacing: -0.5px;
}

.fr-money.fr-money-xl {
  font-size: 2.25rem;
  letter-spacing: -0.75px;
}

.fr-money.fr-money-green { color: #15803d; }
.fr-money.fr-money-orange { color: var(--orange-dark); }

/* ── Timeline (tracking / active order) ── */
.fr-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 4px 0;
}

.fr-timeline-step {
  display: flex;
  gap: 14px;
  position: relative;
  padding-bottom: 22px;
}

.fr-timeline-step:last-child {
  padding-bottom: 4px;
}

.fr-timeline-step::before {
  content: '';
  position: absolute;
  left: 13px;
  top: 28px;
  bottom: 0;
  width: 2px;
  background: var(--gray-200);
}

.fr-timeline-step:last-child::before {
  display: none;
}

.fr-timeline-step.done::before {
  background: var(--success);
}

.fr-timeline-step.current::before {
  background: linear-gradient(180deg, var(--orange), var(--gray-200));
}

.fr-tl-dot {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--gray-200);
  color: var(--gray-300);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  z-index: 1;
}

.fr-timeline-step.done .fr-tl-dot {
  background: var(--success);
  border-color: var(--success);
  color: var(--white);
}

.fr-timeline-step.current .fr-tl-dot {
  background: var(--white);
  border-color: var(--orange);
  color: var(--orange);
  box-shadow: 0 0 0 5px rgba(247, 148, 29, 0.18);
  animation: fr-pulse 2s ease-in-out infinite;
}

.fr-tl-content {
  padding-top: 3px;
}

.fr-tl-title {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--gray-400);
}

.fr-timeline-step.done .fr-tl-title,
.fr-timeline-step.current .fr-tl-title {
  color: var(--navy);
}

.fr-tl-time {
  font-size: 0.75rem;
  color: var(--gray-400);
}

@keyframes fr-pulse {
  0%, 100% { box-shadow: 0 0 0 5px rgba(247, 148, 29, 0.18); }
  50% { box-shadow: 0 0 0 8px rgba(247, 148, 29, 0.08); }
}

/* ── Stepper (horizontal, compact — rider active delivery) ── */
.fr-stepper {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 8px 0;
}

.fr-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--gray-400);
  text-align: center;
}

.fr-step::before {
  content: '';
  position: absolute;
  top: 12px;
  left: -50%;
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: var(--gray-200);
}

.fr-step:first-child::before { display: none; }

.fr-step.done::before { background: var(--success); }

.fr-step-dot {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--gray-200);
  color: var(--gray-300);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  font-size: 0.6875rem;
}

.fr-step.done .fr-step-dot {
  background: var(--success);
  border-color: var(--success);
  color: var(--white);
}

.fr-step.current .fr-step-dot {
  border-color: var(--orange);
  color: var(--orange);
  box-shadow: 0 0 0 4px rgba(247, 148, 29, 0.18);
}

.fr-step.current { color: var(--orange-dark); }
.fr-step.done { color: var(--gray-600); }

/* ── Empty states ── */
.fr-empty {
  text-align: center;
  padding: 48px 24px;
  background: var(--white);
  border: 1.5px dashed var(--gray-200);
  border-radius: var(--radius-lg);
}

.fr-empty-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--orange-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--orange);
}

.fr-empty-icon svg {
  width: 28px;
  height: 28px;
}

.fr-empty h3 {
  font-size: 1.0625rem;
  margin-bottom: 6px;
}

.fr-empty p {
  font-size: 0.875rem;
  color: var(--gray-500);
  max-width: 320px;
  margin: 0 auto;
}

/* ── Utility visibility class ──
   Used by vendor/dashboard, vendor/orders, vendor/menu, rider/active
   (and later customer pages) to hide empty-state panels until needed.
   Previously missing — pages toggled .hidden but it was never defined. */
.hidden {
  display: none !important;
}

/* ── Skeleton loading ── */
.fr-skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
  animation: fr-shimmer 1.4s infinite linear;
  border-radius: var(--radius-sm);
  min-height: 14px;
}

.fr-skeleton.fr-sk-line { height: 14px; margin: 8px 0; }
.fr-skeleton.fr-sk-line-sm { height: 10px; width: 45%; margin: 6px 0; }
.fr-skeleton.fr-sk-line-lg { height: 20px; width: 70%; margin: 10px 0; }
.fr-skeleton.fr-sk-card { height: 92px; margin: 10px 0; border-radius: var(--radius-lg); }
.fr-skeleton.fr-sk-avatar { width: 46px; height: 46px; border-radius: 50%; min-height: 0; }

@keyframes fr-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Avatars (initials-based) ── */
.fr-avatar {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  letter-spacing: 0.5px;
}

.fr-avatar.fr-avatar-sm { width: 34px; height: 34px; flex-basis: 34px; font-size: 0.75rem; }
.fr-avatar.fr-avatar-lg { width: 56px; height: 56px; flex-basis: 56px; font-size: 1.125rem; }

.fr-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.fr-avatar .fr-avatar-status {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2.5px solid var(--white);
  background: var(--gray-300);
}

.fr-avatar .fr-avatar-status.online { background: var(--success); }
.fr-avatar .fr-avatar-status.offline { background: var(--gray-300); }
.fr-avatar .fr-avatar-status.busy { background: var(--warning); }

/* ── Status dots (open/closed, online/offline) ── */
.fr-status-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-500);
}

.fr-status-dot::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gray-300);
}

.fr-status-dot.open::before,
.fr-status-dot.online::before {
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

.fr-status-dot.closed::before,
.fr-status-dot.offline::before {
  background: var(--gray-300);
}

.fr-status-dot.busy::before {
  background: var(--warning);
}

.fr-status-dot.open,
.fr-status-dot.online { color: #15803d; }

/* ── Call / contact buttons ── */
.fr-call-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 2px solid #22c55e;
  background: var(--white);
  color: #15803d;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.fr-call-btn:hover {
  background: #22c55e;
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(34, 197, 94, 0.3);
}

.fr-call-btn svg {
  width: 17px;
  height: 17px;
}

.fr-call-btn.fr-call-danger {
  border-color: var(--danger);
  color: #b91c1c;
}

.fr-call-btn.fr-call-danger:hover {
  background: var(--danger);
  color: var(--white);
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.3);
}

/* ── Alerts / banners ── */
.fr-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
  border: 1px solid transparent;
  margin: 12px 0;
}

.fr-alert svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  margin-top: 1px;
}

.fr-alert.success { background: var(--success-light); color: #14532d; border-color: #bbf7d0; }
.fr-alert.warning { background: var(--warning-light); color: #78350f; border-color: #fde68a; }
.fr-alert.danger  { background: var(--danger-light); color: #7f1d1d; border-color: #fecaca; }
.fr-alert.info    { background: var(--info-light); color: #1e3a8a; border-color: #bfdbfe; }

/* ── Progress bar ── */
.fr-progress {
  height: 8px;
  border-radius: 999px;
  background: var(--gray-100);
  overflow: hidden;
}

.fr-progress-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--orange), var(--orange-dark));
  transition: width 0.4s ease;
}

.fr-progress-bar.fr-pg-green { background: linear-gradient(90deg, #22c55e, #16a34a); }
.fr-progress-bar.fr-pg-blue { background: linear-gradient(90deg, #3b82f6, #2563eb); }

/* ── Key–value info grid ── */
.fr-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px 20px;
}

.fr-info-item .fr-info-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--gray-400);
}

.fr-info-item .fr-info-value {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--navy);
  word-break: break-word;
}

/* ── PIN box (delivery confirmation — UI ready, backend later) ── */
.fr-pin-box {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 12px 0;
}

.fr-pin-digit {
  width: 52px;
  height: 60px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  background: var(--white);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--navy);
  text-align: center;
  outline: none;
  transition: all 0.15s ease;
  -moz-appearance: textfield;
  appearance: textfield;
}

.fr-pin-digit::-webkit-outer-spin-button,
.fr-pin-digit::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.fr-pin-digit:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(247, 148, 29, 0.14);
  transform: translateY(-2px);
}

.fr-pin-digit.filled {
  border-color: var(--orange);
  background: var(--orange-soft);
}

.fr-pin-digit.fr-pin-error {
  border-color: var(--danger);
  background: #fef2f2;
  animation: fr-shake 0.35s ease;
}

@keyframes fr-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* ── Icon button (navbar / toolbars) ── */
.fr-icon-btn {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-600);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.fr-icon-btn:hover {
  border-color: var(--orange);
  color: var(--orange);
  background: var(--orange-soft);
}

.fr-icon-btn svg {
  width: 20px;
  height: 20px;
}

.fr-icon-btn .fr-badge-num {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--danger);
  color: var(--white);
  font-size: 0.6875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--white);
}

/* ── Attention pulse (new order for vendors) ── */
.fr-attention-pulse {
  animation: fr-attention 1.6s ease-in-out infinite;
}

@keyframes fr-attention {
  0%, 100% { box-shadow: 0 0 0 0 rgba(247, 148, 29, 0.45); }
  50% { box-shadow: 0 0 0 12px rgba(247, 148, 29, 0); }
}

/* ── Subtle tap feedback ── */
.fr-tap {
  transition: transform 0.1s ease;
  -webkit-tap-highlight-color: transparent;
}

.fr-tap:active {
  transform: scale(0.97);
}

/* ── Page header (inner pages) ── */
.fr-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 24px 0 18px;
}

.fr-page-head h1 {
  font-size: 1.5rem;
}

.fr-page-head p {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-top: 2px;
}

/* ── Lists (clean dividers) ── */
.fr-list {
  display: flex;
  flex-direction: column;
}

.fr-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--gray-100);
}

.fr-list-item:last-child {
  border-bottom: none;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.375rem; }

  .section { padding: 40px 0; }

  .auth-card {
    padding: 32px 24px;
    border-radius: var(--radius-lg);
  }

  .navbar-menu {
    display: none;
  }

  .bottom-nav {
    display: block;
  }

  body {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }

  .fr-pin-digit {
    width: 46px;
    height: 54px;
    font-size: 1.375rem;
  }

  .fr-stepper .fr-step-label {
    font-size: 0.625rem;
  }

  .fr-stats {
    gap: 12px;
  }

  .fr-stat-card {
    padding: 14px 16px;
  }

  .fr-page-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin: 18px 0 14px;
  }
}

@media (max-width: 480px) {
  .btn-lg {
    padding: 16px 24px;
    font-size: 1rem;
  }

  .auth-card {
    padding: 28px 20px;
  }

  .fr-pin-digit {
    width: 42px;
    height: 50px;
    font-size: 1.25rem;
  }

  .fr-order-actions .btn {
    flex: 1 1 100%;
  }
}

/* ── Accessibility ── */
:focus-visible {
  outline: 3px solid rgba(247, 148, 29, 0.3);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
