@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --primary-red: #e51b24;
  --primary-red-hover: #c9121a;
  --primary-red-light: #fff1f1;
  --primary-red-border: #ffd5d5;
  --sidebar-header-bg: #e51b24;
  --body-bg: #f8fafd;
  --card-bg: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border-color: #eef2f6;
  --input-border: #e2e8f0;
  
  --badge-active-bg: #e6f9f0;
  --badge-active-text: #10b981;
  --badge-pending-bg: #fff8e6;
  --badge-pending-text: #f59e0b;
  --badge-inactive-bg: #fee2e2;
  --badge-inactive-text: #ef4444;

  --font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html {
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  font-family: var(--font-family);
  background-color: var(--body-bg);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  max-width: 100vw;
  overflow-x: hidden;
  position: relative;
}

/* ==========================================================
   LOGIN PAGE SPECIFIC STYLES
   ========================================================== */
.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle at 10% 20%, #ffebeb 0%, #ffffff 50%),
              radial-gradient(circle at 90% 85%, #fff0ea 0%, #ffffff 55%);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.login-bg-decor-1 {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(254, 226, 226, 0.45) 0%, rgba(255, 255, 255, 0) 70%);
  top: -100px;
  right: -100px;
  pointer-events: none;
}

.login-bg-decor-2 {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 237, 213, 0.5) 0%, rgba(255, 255, 255, 0) 70%);
  bottom: -150px;
  left: -150px;
  pointer-events: none;
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.05), 0 4px 14px -3px rgba(229, 27, 36, 0.06);
  border: 1px solid #fcecee;
  padding: 36px 30px 30px;
  text-align: center;
  position: relative;
  z-index: 10;
}

.login-logo {
  height: 68px;
  width: auto;
  max-width: 190px;
  object-fit: contain;
  margin-bottom: 8px;
}

.login-title {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 2px;
}

.login-subtitle {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 3px;
}

.login-desc {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 22px;
}

.login-form-box {
  border: 1px solid #eef2f6;
  background: #ffffff;
  border-radius: 14px;
  padding: 20px 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  text-align: left;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #4b5563;
  margin-bottom: 6px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-field {
  width: 100%;
  padding: 11px 14px;
  font-size: 14px;
  font-family: inherit;
  color: #1e293b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  outline: none;
  transition: all 0.2s ease;
}

.input-field:focus {
  background: #ffffff;
  border-color: var(--primary-red);
  box-shadow: 0 0 0 3px rgba(229, 27, 36, 0.1);
}

.password-toggle-btn {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.password-toggle-btn:hover {
  color: #1e293b;
}

.login-row-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: #4b5563;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  accent-color: var(--primary-red);
  width: 16px;
  height: 16px;
  cursor: pointer;
  border-radius: 4px;
}

.forgot-link {
  font-size: 12px;
  color: #3b82f6;
  text-decoration: none;
  font-weight: 500;
}

.forgot-link:hover {
  text-decoration: underline;
}

.btn-login {
  width: 100%;
  height: 44px;
  background: linear-gradient(180deg, #eb2227 0%, #df191e 100%);
  color: #ffffff;
  border: none;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 12px rgba(229, 27, 36, 0.28);
}

.btn-login:hover {
  background: #cc141c;
  box-shadow: 0 6px 16px rgba(229, 27, 36, 0.35);
  transform: translateY(-1px);
}

.btn-login:active {
  transform: translateY(0);
}

.login-footer-tagline {
  margin-top: 24px;
  font-size: 12.5px;
  color: #475569;
  font-weight: 500;
  z-index: 10;
}

.login-footer-tagline span.sep {
  color: var(--primary-red);
  margin: 0 6px;
  font-weight: 600;
}

/* ==========================================================
   ADMIN LAYOUT & SIDEBAR
   ========================================================== */
.admin-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
  background-color: var(--body-bg);
}

.sidebar {
  width: 220px;
  min-width: 220px;
  background: #ffffff;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  overflow-y: auto;
}

.sidebar-brand {
  height: 64px;
  background: linear-gradient(180deg, #eb1c24 0%, #d3141b 100%);
  display: flex;
  align-items: center;
  padding: 0 18px;
  gap: 12px;
  border-bottom-right-radius: 18px;
  box-shadow: 0 3px 10px rgba(229, 27, 36, 0.2);
}

.sidebar-brand-logo {
  height: 38px;
  width: auto;
}

.sidebar-menu {
  list-style: none;
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sidebar-menu-item {
  position: relative;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 500;
  color: #64748b;
  text-decoration: none;
  transition: all 0.15s ease;
  border-left: 3px solid transparent;
}

.sidebar-link svg {
  width: 18px;
  height: 18px;
  stroke: #64748b;
  transition: stroke 0.15s ease;
  flex-shrink: 0;
}

.sidebar-link:hover {
  color: #0f172a;
  background-color: #f8fafc;
}

.sidebar-link:hover svg {
  stroke: #0f172a;
}

.sidebar-menu-item.active .sidebar-link {
  color: #e51b24;
  background-color: #fef2f2;
  font-weight: 600;
  border-left-color: #e51b24;
  border-radius: 0 8px 8px 0;
  margin-right: 8px;
}

.sidebar-menu-item.active .sidebar-link svg {
  stroke: #e51b24;
  fill: none;
}

/* ==========================================================
   MAIN CONTENT AREA
   ========================================================== */
.main-content {
  margin-left: 220px;
  flex: 1;
  padding: 24px 32px 48px;
  max-width: 1600px;
  width: calc(100% - 220px);
}

.page-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.page-title-box h1 {
  font-size: 22px;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.3px;
}

.page-title-box p.subtitle {
  font-size: 13.5px;
  color: #64748b;
  margin-top: 2px;
}

.btn-primary-add {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--primary-red);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(229, 27, 36, 0.25);
}

.btn-primary-add:hover {
  background-color: var(--primary-red-hover);
  box-shadow: 0 4px 12px rgba(229, 27, 36, 0.35);
  transform: translateY(-1px);
}

/* ==========================================================
   DYNAMIC DATE RANGE PICKER COMPONENT
   ========================================================== */
.date-range-picker-wrapper {
  position: relative;
  display: inline-block;
}

.date-range-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  transition: all 0.15s ease;
  user-select: none;
}

.date-range-badge:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
}

.date-range-badge.open,
.date-range-badge.active-filter {
  border-color: #e51b24;
  box-shadow: 0 0 0 3px rgba(229, 27, 36, 0.08);
  color: #0f172a;
}

.date-range-badge svg {
  width: 15px;
  height: 15px;
  stroke: #64748b;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.date-range-badge.open svg.caret-icon {
  transform: rotate(180deg);
}

/* Floating Date Range Popover */
.date-range-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.12), 0 2px 8px rgba(0, 0, 0, 0.04);
  z-index: 1050;
  min-width: 440px;
  overflow: hidden;
  animation: popoverFadeIn 0.18s ease-out;
}

@keyframes popoverFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.date-popover-content {
  display: grid;
  grid-template-columns: 140px 1fr;
  min-height: 240px;
}

/* Left: Presets Column */
.date-presets-col {
  background: #f8fafc;
  border-right: 1px solid #f1f5f9;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.date-presets-heading {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.5px;
  padding: 0 8px 6px;
  border-bottom: 1px solid #eef2f6;
  margin-bottom: 4px;
}

.preset-btn {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #475569;
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.preset-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.preset-btn.active {
  background: #fee2e2;
  color: #e51b24;
  font-weight: 700;
}

/* Right: Custom Date Range Inputs */
.date-inputs-col {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.date-inputs-heading {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 14px;
}

.date-input-group {
  margin-bottom: 12px;
}

.date-input-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 5px;
}

.date-picker-field {
  width: 100%;
  height: 38px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 13px;
  color: #0f172a;
  background: #ffffff;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.date-picker-field:focus {
  border-color: #e51b24;
  box-shadow: 0 0 0 3px rgba(229, 27, 36, 0.08);
}

.date-popover-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

.btn-date-cancel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #64748b;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-date-cancel:hover {
  background: #f8fafc;
  color: #0f172a;
}

.btn-date-apply {
  background: var(--primary-red);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 7px 16px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-date-apply:hover {
  background: #c9121a;
}

@media (max-width: 576px) {
  .date-range-popover {
    position: fixed !important;
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    min-width: 100% !important;
    width: 100% !important;
    border-radius: 18px 18px 0 0 !important;
    max-height: 85vh !important;
    overflow-y: auto !important;
  }

  .date-popover-content {
    grid-template-columns: 1fr !important;
  }

  .date-presets-col {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
    border-right: none !important;
    border-bottom: 1px solid #eef2f6 !important;
    padding: 12px !important;
  }

  .date-presets-heading {
    grid-column: 1 / -1;
  }

  .preset-btn {
    text-align: center !important;
    justify-content: center !important;
    padding: 6px 8px !important;
    font-size: 11.5px !important;
  }

  .date-inputs-col {
    padding: 14px 16px !important;
  }
}

/* ==========================================================
   PAGE TABS (USERS PAGE)
   ========================================================== */
.tabs-navigation {
  display: flex;
  align-items: center;
  gap: 28px;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 20px;
}

.tab-link {
  padding-bottom: 12px;
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
  text-decoration: none;
  position: relative;
  cursor: pointer;
  transition: color 0.15s ease;
}

.tab-link:hover {
  color: var(--text-main);
}

.tab-link.active {
  color: var(--primary-red);
  font-weight: 600;
}

.tab-link.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--primary-red);
  border-radius: 2px 2px 0 0;
}

/* ==========================================================
   FILTER / SEARCH BAR
   ========================================================== */
.filter-search-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.search-input-box {
  position: relative;
  flex: 1;
  max-width: 480px;
}

.search-input-box svg.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  stroke: #94a3b8;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
  border-color: #cbd5e1;
  box-shadow: 0 0 0 3px rgba(229, 27, 36, 0.05);
}

.filters-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.select-dropdown {
  padding: 9px 32px 9px 14px;
  font-size: 13px;
  font-family: inherit;
  color: #334155;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
}

/* ==========================================================
   DATA TABLES
   ========================================================== */
.table-card {
  background: #ffffff;
  border: 1px solid #eef2f6;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
}

.custom-table thead th {
  background-color: #ffffff;
  color: #64748b;
  font-weight: 600;
  font-size: 13px;
  padding: 14px 20px;
  border-bottom: 1px solid #f1f5f9;
}

.custom-table tbody tr {
  border-bottom: 1px solid #f8fafc;
  transition: background-color 0.15s ease;
}

.custom-table tbody tr:last-child {
  border-bottom: none;
}

.custom-table tbody tr:hover {
  background-color: #fafbfd;
}

.custom-table td {
  padding: 16px 20px;
  color: #1e293b;
  vertical-align: middle;
}

.td-id {
  color: #64748b;
  font-weight: 500;
  width: 60px;
}

.td-name {
  font-weight: 600;
  color: #0f172a;
}

/* Status Badges */
.badge-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}

.badge-active {
  background-color: var(--badge-active-bg);
  color: var(--badge-active-text);
}

.badge-pending {
  background-color: var(--badge-pending-bg);
  color: var(--badge-pending-text);
}

.badge-inactive {
  background-color: var(--badge-inactive-bg);
  color: var(--badge-inactive-text);
}

/* Action button */
.btn-action-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 28px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.btn-action-more:hover {
  border-color: #cbd5e1;
  color: #0f172a;
  background: #f8fafc;
}

.btn-action-more svg {
  width: 16px;
  height: 16px;
}

/* Dropdown Menu for Action */
.action-dropdown-menu {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 4px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  min-width: 140px;
  z-index: 100;
  display: none;
  flex-direction: column;
  padding: 4px 0;
}

.action-dropdown-menu.show {
  display: flex;
}

.action-dropdown-item {
  padding: 8px 14px;
  font-size: 13px;
  color: #334155;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.action-dropdown-item:hover {
  background: #f8fafc;
  color: var(--primary-red);
}

/* ==========================================================
   PAGINATION
   ========================================================== */
.pagination-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 6px;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}

.page-btn:hover {
  border-color: #cbd5e1;
  color: var(--text-main);
}

.page-btn.active {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.page-dots {
  color: #94a3b8;
  font-size: 13px;
  padding: 0 4px;
}

/* ==========================================================
   DASHBOARD STAT CARDS GRID
   ========================================================== */
.dashboard-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: #ffffff;
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
}

.stat-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon-circle svg {
  width: 20px;
  height: 20px;
}

.stat-icon-blue {
  background-color: #e0f2fe;
  color: #0284c7;
}

.stat-icon-orange {
  background-color: #ffedd5;
  color: #ea580c;
}

.stat-icon-pink {
  background-color: #fce7f3;
  color: #db2777;
}

.stat-icon-green {
  background-color: #dcfce7;
  color: #16a34a;
}

.stat-icon-purple {
  background-color: #ede9fe;
  color: #8b5cf6;
}

.stat-icon-gold {
  background-color: #fef9c3;
  color: #ca8a04;
}

.stat-icon-rose {
  background-color: #ffe4e6;
  color: #e11d48;
}

.stat-icon-indigo {
  background-color: #e0e7ff;
  color: #4f46e5;
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.3px;
}

.stat-label {
  font-size: 12.5px;
  color: #64748b;
  font-weight: 500;
  margin-top: 2px;
}

/* ==========================================================
   DASHBOARD CHARTS
   ========================================================== */
.dashboard-charts-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
}

.chart-card {
  background: #ffffff;
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  padding: 22px 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.chart-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: #475569;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.dot-orange {
  background-color: #f97316;
}

.dot-magenta {
  background-color: #ec4899;
}

.chart-container-trend {
  height: 240px;
  position: relative;
  width: 100%;
}

.donut-chart-container {
  height: 210px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.donut-legend-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 14px;
  font-size: 12.5px;
  color: #475569;
}

/* ==========================================================
   MODALS FOR ADDING RECORDS
   ========================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background: #ffffff;
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 17px;
  font-weight: 700;
  color: #111827;
}

.modal-close-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: #94a3b8;
  font-size: 20px;
}

.modal-tabs-header {
  display: flex !important;
  gap: 8px !important;
  overflow-x: auto !important;
  white-space: nowrap !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: none !important;
}

.modal-tabs-header::-webkit-scrollbar {
  display: none !important;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  background: #f8fafc;
  border-top: 1px solid #f1f5f9;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.btn-secondary {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #475569;
  border-radius: 8px;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
}

.btn-submit {
  background: var(--primary-red);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 8px 18px;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
}

/* Toast Notification */
.toast-msg {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 13.5px;
  display: none;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  z-index: 2000;
}
.toast-msg.show {
  display: flex;
  animation: slideUp 0.3s ease;
}
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ==========================================================
   ADVANCED DASHBOARD & ATTRACTIVE ENHANCEMENTS
   ========================================================== */
.live-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #d1fae5;
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 600;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseGreen 1.8s infinite;
}

@keyframes pulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.stat-growth {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 700;
  color: #10b981;
  background: #f0fdf4;
  padding: 2px 6px;
  border-radius: 6px;
  margin-top: 4px;
}

.dashboard-sections-wrap {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 24px;
}

/* Live Feed Section */
.feed-card {
  background: #ffffff;
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  padding: 20px 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.feed-tabs-toggle {
  display: flex;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 8px;
  gap: 2px;
}

.feed-tab-btn {
  background: transparent;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.feed-tab-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Grid for Leaderboard & Fleet */
.dual-insights-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.insight-card {
  background: #ffffff;
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  padding: 22px 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.insight-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.insight-card-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #f8fafc;
}

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

.item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.item-avatar-badge {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #fff1f1;
  color: #e51b24;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
}

.item-avatar-parlour {
  background: #fdf2f8;
  color: #db2777;
}

.item-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #1e293b;
}

.item-meta {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

.item-rating {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 600;
  color: #d97706;
  background: #fef3c7;
  padding: 2px 7px;
  border-radius: 6px;
}

/* Fleet Metrics 4-Box Grid */
.fleet-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.fleet-box {
  background: #f8fafc;
  border: 1px solid #eef2f6;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}

.fleet-val {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
}

.fleet-lbl {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
  margin-top: 4px;
}

/* ==========================================================
   EXACT CLONE UI COMPONENTS (ORDERS, REPORTS, BANNERS, SETTINGS)
   ========================================================== */

/* Sub-navigation Tabs with Red Bottom Underline */
.nav-subtabs {
  display: flex;
  align-items: center;
  gap: 28px;
  border-bottom: 1px solid #eef2f6;
  margin-bottom: 24px;
  padding-bottom: 0;
}

.nav-subtab {
  text-decoration: none;
  color: #64748b;
  font-size: 14.5px;
  font-weight: 500;
  padding: 8px 4px 12px;
  position: relative;
  display: inline-block;
  cursor: pointer;
  transition: color 0.15s ease;
}

.nav-subtab:hover {
  color: #1e293b;
}

.nav-subtab.active {
  color: #e51b24;
  font-weight: 600;
}

.nav-subtab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 3px;
  background-color: #e51b24;
  border-radius: 4px 4px 0 0;
}

/* Filter Toolbar (Search & Dropdowns) */
.filter-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.search-bar-wrap {
  position: relative;
  flex: 1;
  max-width: 480px;
}

.search-bar-wrap input {
  width: 100%;
  height: 42px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  padding: 0 16px 0 42px;
  font-size: 13.5px;
  color: #1e293b;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  font-family: inherit;
}

.search-bar-wrap input:focus {
  border-color: #e51b24;
  box-shadow: 0 0 0 3px rgba(229, 27, 36, 0.08);
}

.search-bar-wrap svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  stroke: #94a3b8;
  pointer-events: none;
}

.filter-select-pill {
  height: 42px;
  padding: 0 36px 0 16px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") no-repeat right 12px center / 16px;
  font-size: 13.5px;
  color: #475569;
  appearance: none;
  cursor: pointer;
  font-weight: 500;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s ease;
}

.filter-select-pill:focus {
  border-color: #e51b24;
}

/* Status Pill Badges */
.pill-delivered {
  background: #dcfce7;
  color: #15803d;
  padding: 5px 16px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  display: inline-block;
}

.pill-preparing {
  background: #fef3c7;
  color: #b45309;
  padding: 5px 16px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  display: inline-block;
}

.pill-out-for-delivery {
  background: #dbeafe;
  color: #1d4ed8;
  padding: 5px 16px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  display: inline-block;
}

.pill-cancelled {
  background: #fee2e2;
  color: #b91c1c;
  padding: 5px 16px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  display: inline-block;
}

.pill-active {
  background: #dcfce7;
  color: #15803d;
  padding: 5px 16px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  display: inline-block;
}

.pill-inactive {
  background: #fee2e2;
  color: #b91c1c;
  padding: 5px 16px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  display: inline-block;
}

/* Action Dots Button & Menu */
.btn-dots {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.btn-dots:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
}

/* Pagination Row */
.pagination-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}

.page-btn:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
}

.page-btn.active {
  border-color: #e51b24;
  color: #e51b24;
  font-weight: 700;
  background: #fff8f8;
}

/* Reports Specific Components */
.report-top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-date-picker {
  height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
}

.btn-export-outline {
  height: 40px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-export-outline:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.reports-stat-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.rep-stat-card {
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid #f1f5f9;
}

.rep-stat-card.green-card {
  background: #f0fdf9;
  border-color: #e6f9f0;
}

.rep-stat-card.purple-card {
  background: #faf5ff;
  border-color: #f3e8ff;
}

.rep-stat-card.gold-card {
  background: #fffbeb;
  border-color: #fef3c7;
}

.rep-stat-icon-box {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.green-icon {
  background: #10b981;
  color: #ffffff;
}

.purple-icon {
  background: #9333ea;
  color: #ffffff;
}

.gold-icon {
  background: #f59e0b;
  color: #ffffff;
}

.rep-stat-val {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.rep-stat-lbl {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
  margin-top: 2px;
}

/* Revenue Overview Card */
.revenue-overview-card {
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #eef2f6;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
  margin-bottom: 24px;
}

.rev-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.rev-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.rev-card-legend {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 13px;
  font-weight: 500;
  color: #475569;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}

.legend-food {
  background: #ea580c;
}

.legend-beauty {
  background: #db2777;
}

/* Settings Form Clone Layout */
.settings-container {
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #eef2f6;
  padding: 28px 32px;
  max-width: 820px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.settings-heading {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 26px;
}

.settings-field-group {
  display: grid;
  grid-template-columns: 160px 1fr;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.settings-field-label {
  font-size: 14px;
  font-weight: 600;
  color: #475569;
}

.settings-text-input {
  width: 100%;
  height: 44px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0 16px;
  font-size: 14px;
  color: #0f172a;
  background: #ffffff;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.settings-text-input:focus {
  border-color: #e51b24;
  box-shadow: 0 0 0 3px rgba(229, 27, 36, 0.08);
}

.settings-btn-save {
  width: 100%;
  height: 48px;
  background: #e51b24;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  margin-top: 14px;
  box-shadow: 0 4px 14px rgba(229, 27, 36, 0.28);
}

.settings-btn-save:hover {
  background: #c9121a;
  transform: translateY(-1px);
}

.settings-btn-save:active {
  transform: translateY(0);
}

/* Banner Table Layout */
.banner-img-preview {
  width: 130px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  display: block;
}

/* ==========================================================
   MOBILE TOP HEADER & OFFCANVAS SIDEBAR
   ========================================================== */
.mobile-top-bar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  z-index: 99;
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.mobile-menu-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.mobile-menu-btn:hover {
  background: #f1f5f9;
}

.mobile-brand-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.mobile-logo-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 2px;
}

.mobile-logo-circle img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.mobile-brand-text {
  font-size: 19px;
  font-weight: 800;
  color: var(--primary-red);
  letter-spacing: -0.5px;
}

.sidebar-close-btn {
  display: none;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 26px;
  cursor: pointer;
  line-height: 1;
  margin-left: auto;
  padding: 4px 8px;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(2px);
  z-index: 100;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.sidebar-backdrop.active {
  display: block;
  opacity: 1;
}

/* ==========================================================
   COMPREHENSIVE RESPONSIVE SYSTEM (ALL PAGES & VIEWPORTS)
   ========================================================== */

/* Large Tablets & Medium Screens (<= 1200px) */
@media (max-width: 1200px) {
  .dashboard-stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }

  .dashboard-charts-grid {
    grid-template-columns: 1.2fr 1fr;
  }
}

/* Tablets & Mobile Devices (<= 992px) */
@media (max-width: 992px) {
  html, body {
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  .admin-wrapper {
    max-width: 100vw !important;
    overflow-x: hidden !important;
    position: relative;
  }

  .mobile-top-bar {
    display: flex !important;
  }

  .sidebar-close-btn {
    display: block !important;
  }

  .sidebar {
    transform: translateX(-100%) !important;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1) !important;
    z-index: 101 !important;
    width: 270px !important;
    box-shadow: none !important;
  }

  .sidebar.open {
    transform: translateX(0) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35) !important;
  }

  .main-content {
    margin-left: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    padding: 16px 14px 44px !important;
    margin-top: 56px !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  /* Page Headers & Action Bars */
  .page-header-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
    margin-bottom: 16px !important;
  }

  .page-header-row > div:last-child,
  .page-header-row .report-top-actions,
  .page-header-row .tracking-top-actions {
    width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .btn-primary-add {
    flex: 1 1 auto;
    min-width: 140px;
    justify-content: center;
  }

  /* Universal Table Containment (Zero horizontal page overflow) */
  .table-card,
  .table-responsive,
  #ordersStreamBox,
  #bookingsStreamBox,
  #bannersTableSection,
  .report-slice .table-card {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    display: block !important;
    box-sizing: border-box !important;
  }

  .custom-table {
    min-width: 660px !important;
    width: 100% !important;
  }

  /* Dashboard Layouts */
  .dashboard-stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
    gap: 12px !important;
  }

  .dashboard-charts-grid {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }

  .dual-insights-grid {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }

  .feed-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }

  .feed-tabs-toggle {
    width: 100% !important;
    display: flex !important;
  }

  .feed-tab-btn {
    flex: 1 !important;
    text-align: center !important;
    padding: 8px 12px !important;
  }

  /* Reports Page Layouts */
  .reports-stat-cards,
  div[style*="grid-template-columns: repeat(4, 1fr)"],
  div[style*="grid-template-columns: repeat(3, 1fr)"] {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
    gap: 12px !important;
  }

  div[style*="grid-template-columns: 2fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .report-top-actions {
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
  }

  .btn-date-picker,
  .btn-export-outline {
    width: 100% !important;
    justify-content: center !important;
  }

  /* Order Tracking Page Responsive Command Center */
  .tracking-container {
    width: 100% !important;
    max-width: 100% !important;
  }

  .tracking-grid-layout,
  div[style*="grid-template-columns: 1fr 390px"] {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  #osmMap {
    height: 330px !important;
  }

  .osm-hud-bar {
    position: static !important;
    width: 100% !important;
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    margin-bottom: 12px !important;
    padding: 12px 14px !important;
    background: #ffffff !important;
  }

  .osm-hud-divider {
    display: none !important;
  }

  .osm-controls-bar {
    top: 10px !important;
    right: 10px !important;
  }

  .tracking-top-actions {
    width: 100% !important;
  }

  .tracking-top-actions button,
  .tracking-top-actions a {
    flex: 1 1 auto;
    justify-content: center;
  }

  /* Search & Filter Bars */
  .filter-search-bar,
  .booking-filters-bar,
  .txn-filters-bar,
  .filter-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .search-input-box,
  .booking-search-box,
  .txn-search-box,
  .search-bar-wrap {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
  }

  .filters-right,
  .filter-toolbar > div:last-child,
  .booking-filters-bar > div:last-child,
  .txn-filters-bar > div:last-child {
    width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .select-dropdown,
  .booking-filter-select,
  .txn-filter-select,
  .filter-select-pill {
    flex: 1 !important;
    min-width: 130px !important;
    width: 100% !important;
  }

  /* Touch Horizontal Tabs Navigation */
  .tabs-navigation,
  .status-tabs-nav,
  .vertical-tabs-nav,
  .nav-subtabs,
  div[style*="display: flex; gap: 8px; padding: 12px 24px"],
  div[style*="display: flex; gap: 8px; padding: 12px 20px"] {
    display: flex !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    gap: 12px !important;
    padding: 8px 4px 10px 4px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .tabs-navigation::-webkit-scrollbar,
  .status-tabs-nav::-webkit-scrollbar,
  .vertical-tabs-nav::-webkit-scrollbar,
  .nav-subtabs::-webkit-scrollbar {
    display: none !important;
  }

  /* Modals */
  .modal-overlay {
    padding: 10px !important;
    align-items: center !important;
    justify-content: center !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .modal-box {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 94vh !important;
    display: flex !important;
    flex-direction: column !important;
    border-radius: 16px !important;
    margin: 0 !important;
    overflow: hidden !important;
  }

  .modal-body {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    flex: 1 1 auto !important;
    padding: 18px 16px !important;
    box-sizing: border-box !important;
  }

  .modal-header,
  .modal-footer {
    flex-shrink: 0 !important;
    padding: 14px 18px !important;
  }

  .modal-footer {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .modal-footer button,
  .modal-footer a {
    flex: 1 1 auto !important;
    min-width: 110px !important;
    justify-content: center !important;
    text-align: center !important;
  }

  /* Settings Screen */
  .settings-container {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 22px 18px !important;
  }

  .settings-field-group {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
}

/* Medium Phones & Below (<= 768px) */
@media (max-width: 768px) {
  /* Multi-column Form & Detail Grids -> Stack cleanly to 1 Column */
  div[style*="grid-template-columns: 1fr 1fr"],
  div[style*="grid-template-columns: 1fr 1fr 1fr"],
  div[style*="grid-template-columns: repeat(3, 1fr)"],
  div[style*="grid-template-columns: 1.2fr 1fr"],
  div[style*="grid-template-columns: 1.3fr 1fr"],
  .modal-box form [style*="grid-template-columns"],
  .modal-box .modal-body [style*="grid-template-columns"],
  .modal-overlay [style*="grid-template-columns"],
  div[id$="Modal"] [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .reports-stat-cards {
    grid-template-columns: 1fr !important;
  }

  .revenue-overview-card {
    padding: 16px !important;
  }

  .rev-card-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }

  .rev-card-legend {
    flex-wrap: wrap !important;
    gap: 10px !important;
  }

  .donut-legend-bottom {
    flex-direction: column !important;
    gap: 8px !important;
  }
}

/* Compact Small Phones (<= 576px) */
@media (max-width: 576px) {
  .main-content {
    padding: 12px 10px 36px !important;
  }

  .page-title-box h1 {
    font-size: 19px !important;
  }

  .page-title-box p,
  .page-title-box p.subtitle {
    font-size: 12px !important;
  }

  .btn-primary-add {
    width: 100% !important;
    justify-content: center !important;
    font-size: 13px !important;
  }

  /* 2-column Compact Stat Cards for mobile */
  .dashboard-stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  .stat-card {
    padding: 12px 10px !important;
    gap: 10px !important;
  }

  .stat-icon-circle {
    width: 36px !important;
    height: 36px !important;
  }

  .stat-icon-circle svg {
    width: 16px !important;
    height: 16px !important;
  }

  .stat-value {
    font-size: 15.5px !important;
  }

  .stat-label {
    font-size: 11px !important;
  }

  .stat-growth {
    font-size: 10px !important;
    padding: 1px 4px !important;
  }

  /* Fleet 4-box metrics */
  .fleet-metrics-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  .fleet-box {
    padding: 12px 8px !important;
  }

  .fleet-val {
    font-size: 18px !important;
  }

  .fleet-lbl {
    font-size: 11px !important;
  }

  /* Order Stepper Tracker */
  #osmMap {
    height: 270px !important;
  }

  .step-node {
    padding: 0 2px !important;
  }

  .step-icon-circle {
    width: 26px !important;
    height: 26px !important;
    font-size: 11px !important;
    margin-bottom: 4px !important;
  }

  .step-node div[style*="font-size: 13px"] {
    font-size: 11px !important;
  }

  .step-node div[style*="font-size: 11px"] {
    font-size: 9.5px !important;
  }

  .uuid-chip-box {
    max-width: 100% !important;
    font-size: 11.5px !important;
    padding: 3px 8px !important;
  }

  /* Partner Multi-step Form Tabs */
  .form-tab-btn {
    font-size: 11px !important;
    padding: 6px 9px !important;
  }

  /* Table cells on mobile */
  .custom-table td, 
  .custom-table th {
    padding: 10px 12px !important;
    font-size: 12.5px !important;
  }

  .td-id {
    width: 44px !important;
  }

  /* Pagination */
  .pagination-wrapper,
  .pagination-row {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  .page-btn {
    min-width: 30px !important;
    height: 30px !important;
    font-size: 12px !important;
  }

  /* Login page on small screen */
  .login-page {
    padding: 16px !important;
  }

  .login-card {
    width: 100% !important;
    max-width: 100% !important;
    padding: 24px 16px !important;
    margin: 0 auto !important;
  }

  .login-title {
    font-size: 22px !important;
  }

  .login-subtitle {
    font-size: 15px !important;
  }
}


