* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Core palette: dominant white, moove (indigo) accent, and orange touch */
  --bg: #ffffff;                /* dominant white */
  --white: #ffffff;
  --moove: #4f46e5;             /* "moove" accent (indigo) */
  --moove-dark: #ec1ec0;
  --orange: #ff8a00;            /* small touch of orange */
  --muted: #6b7280;
  --border-color: #e6e6e6;
  --text-color: #111827;
  --light-color: #f8fafc;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --border-radius: 8px;
  --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);

  /* aliases for older variable names used across files so rules keep working */
  --primary-color: var(--moove);
  --primary-medium: var(--moove-dark);
  --primary-dark: var(--moove-dark);
  --primary-light: var(--light-color);
  --accent-yellow: var(--orange);
  --secondary-color: var(--muted);
  --info-color: #60a5fa;
  --warning-color: var(--orange);
  --dark-color: #0f172a;
}
*** End Patch

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  background-color: var(--primary-light);
  color: var(--text-color);
  transition: background-color 0.3s ease;
  width: 100%;
  padding: 0;
  margin: 0;
  overflow-x: hidden;
}

.page-with-bg {
  background-image: url(../assets/images/back.jpg);
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
  color: #fff;
}

.page-with-bg-overlay {
  position: relative;
}

.page-with-bg-overlay::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgb(0 0 0 / .4);
  z-index: 1;
}

.page-with-bg-overlay .container {
  position: relative;
  z-index: 2;
}

.nav-swiftase {
  background-color: var(--primary-dark);
  padding: 1rem 2rem;
  box-shadow: 0 2px 10px var(--primary-color);
}

.nav-brand {
  font-weight: 700;
  color: var(--accent-yellow) !important;
  font-size: 1.5rem;
}

.btn-swiftase {
  background-color: var(--accent-yellow);
  color: var(--primary-dark);
  padding: .75rem 1.5rem;
  border-radius: .375rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-swiftase:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgb(250 204 21 / .3);
}

.swiftase-card {
  background-color: var(--primary-medium);
  border-radius: 1rem;
  color: #fff;
  box-shadow: 0 4px 6px rgb(0 0 0 / .1);
  transition: transform 0.3s ease;
}

.swiftase-card:hover {
  transform: translateY(-5px);
}

.swiftase-form {
  background-color: rgb(255 255 255 / .95);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 4px 6px rgb(0 0 0 / .1);
}

.form-label {
  color: var(--primary-medium);
  font-weight: 500;
}

.form-control:focus {
  border-color: var(--accent-yellow);
  box-shadow: 0 0 0 .25rem rgb(250 204 21 / .25);
}

.swiftase-alert {
  border-radius: .75rem;
  border: none;
}

.alert-info {
  background-color: var(--primary-light);
  color: var(--primary-dark);
}

.alert-success {
  background-color: var(--success-color);
  color: #fff;
}

.alert-danger {
  background-color: var(--danger-color);
  color: #fff;
}

@media (max-width: 768px) {
  .nav-swiftase {
    padding: 1rem;
  }
  .swiftase-card {
    margin: 1rem;
  }
  h1 {
    font-size: 2rem;
  }
}

.page-with-bg {
  background-image: url(assets/images/back.jpg);
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
  color: #fff;
}

.dropdown-menu {
  min-width: 100%;
  padding: .5rem;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgb(0 0 0 / .1);
}

.rider-stats-dropdown {
  min-width: 800px;
  max-width: 90vw;
}

.delivery-type-toggle {
  margin-bottom: 30px;
  text-align: center;
}
.toggle-container {
  display: inline-flex;
  background: var(--light-color);
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgb(0 0 0 / .1);
}

.toggle-option {
  padding: 10px 25px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-weight: 600;
  color: var(--primary-dark);
  transition: all 0.3s ease;
}

.toggle-option.active {
  background: var(--primary-color);
  color: #f30ec1;
  border-radius: 30px;
}

.toggle-option:hover, .toggle-option:focus {
  background: var(--primary-medium);
  color: #1f1919;
}
.receiver-form {
  background: var(--light-color);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid var(--primary-light);
  position: relative;
}

.receiver-form h4 {
  margin-bottom: 20px;
  color: var(--primary-color);
}

.remove-receiver-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--danger-color);
  color: #fff;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.add-receiver-btn {
  margin-bottom: 20px;
}

@media (min-width: 992px) {
  .dropdown:hover .dropdown-menu {
    display: block;
  }
}

.card-body {
  background-color: var(--light-color);
  border-radius: 5px;
  padding: 1.25rem;
}

.card-title {
  font-weight: 700;
  color: var(--dark-color);
}

.err_icon,
.valid_icon,
.icon {
  width: 25px;
}

.icon--wht {
  fill: #fff;
}

.container-fluid {
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
}

.table-responsive {
  overflow-x: auto;
}

.btn i {
  margin-right: 3px;
}

.mt-4 {
  margin-top: 1.5rem !important;
}

.card {
  border: none;
  border-radius: .35rem;
  box-shadow: 0 .15rem 1.75rem 0 rgb(58 59 69 / .15);
}

.card-header {
  background-color: var(--light-color);
  border-bottom: 1px solid var(--primary-light);
}

.status-indicator {
  height: 1rem;
  width: 1rem;
  border-radius: 50%;
  display: inline-block;
  margin-right: .5rem;
}

.dashboard-card {
  transition: transform 0.2s;
}

.dashboard-card:hover {
  transform: translateY(-5px);
}

.stat-card {
  border-left: .25rem solid;
  border-radius: .35rem;
}

.stat-card.primary {
  border-left-color: var(--primary-color);
}

.stat-card.success {
  border-left-color: var(--success-color);
}

.stat-card.info {
  border-left-color: var(--info-color);
}

.stat-card.warning {
  border-left-color: var(--warning-color);
}

.stat-card.danger {
  border-left-color: var(--danger-color);
}

.stat-icon {
  font-size: 2rem;
  opacity: .3;
}

.table th {
  background-color: var(--light-color);
  white-space: nowrap;
}

.status-badge {
  font-size: .85rem;
  padding: .35rem .5rem;
  border-radius: .25rem;
}

.calendar-container {
  height: 500px;
  margin-bottom: 2rem;
}

#calendar {
  height: 100%;
}

.rider-profile {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}

.rider-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  font-size: 2rem;
  color: var(--primary-color);
}

.rider-info {
  flex: 1;
}

.rider-name {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: .25rem;
}

.rider-status {
  display: inline-block;
  padding: .25rem .5rem;
  border-radius: .25rem;
  font-size: .875rem;
  font-weight: 600;
  color: #fff;
}

.order-actions {
  white-space: nowrap;
}

.tab-content {
  padding: 1.5rem;
  background-color: #fff;
  border: 1px solid var(--primary-light);
  border-top: none;
  border-radius: 0 0 .25rem .25rem;
}

.nav-tabs .nav-link {
  font-weight: 600;
  color: var(--secondary-color);
}

.nav-tabs .nav-link.active {
  color: var(--primary-color);
  border-color: var(--primary-light) var(--primary-light) #fff;
}

#notification-area {
  background-color: var(--success-color);
  color: #fff;
  padding: 15px;
  border: 1px solid var(--success-color);
  border-radius: 5px;
  margin-top: 10px;
}

@media print {
  body * {
    visibility: hidden;
    margin: 0 !important;
    padding: 0 !important;
  }
  .print-section,
  .print-section * {
    visibility: visible;
  }
  .print-section {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
  }
  table {
    width: 100% !important;
    border-collapse: collapse !important;
  }
  th,
  td {
    border: 1px solid #000 !important;
    padding: 4px !important;
  }
  .no-print {
    display: none !important;
  }
}

/* PWA install button styling (used by index.html, main.html, new_index.html) */
#pwa-install-btn {
  display: none; /* shown by JS when beforeinstallprompt fires */
  background: linear-gradient(90deg, var(--accent-yellow), #ff6b00);
  color: var(--dark-color);
  border: none;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(255, 140, 0, 0.18);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  align-items: center;
  gap: 8px;
}

#pwa-install-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(255, 140, 0, 0.2);
}

/* small emoji icon before the label for browsers that don't load icons */
#pwa-install-btn::before {
  content: "📥";
  display: inline-block;
  margin-right: 8px;
}

@media (max-width: 768px) {
  /* full-width, full-bleed button on small screens for easier tapping */
  #pwa-install-btn {
    display: block !important;
    width: 100%;
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 1rem;
    margin-top: 10px;
  }
}

/* Nav install button (small pill in navbar) */
.nav-install-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
}

.nav-install-btn img, .nav-install-btn svg {
  width: 18px;
  height: 18px;
}

/* Floating FAB install button */
.fab-install {
  position: fixed;
  right: 20px;
  bottom: 80px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #fff 0%, #fff 100%);
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  z-index: 1200;
  cursor: pointer;
}

.fab-install img, .fab-install svg {
  width: 26px;
  height: 26px;
}

/* iOS install modal (instructions for Add to Home Screen) */
.ios-install-modal {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.6);
  display: none; /* shown via JS when iOS detected */
  z-index: 1300;
  align-items: flex-end;
  justify-content: center;
}

.ios-install-modal .ios-card {
  background: #fff;
  padding: 16px;
  border-radius: 12px 12px 0 0;
  width: 100%;
  max-width: 720px;
}

.ios-install-modal .ios-card h4 {
  margin: 0 0 8px 0;
}

.ios-install-modal .ios-steps {
  display: flex;
  gap: 12px;
  align-items: center;
}

.ios-install-modal .ios-steps img { width: 28px; }

.ios-install-close {
  background: transparent;
  border: none;
  font-size: 18px;
  float: right;
}