/* ==========================================================================
   Local Rewards SaaS & Loyalty Platform - Modern Responsive Design System
   Mobile-First, Tablet & Desktop Optimized
   ========================================================================== */

:root {
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  
  /* Brand Palette */
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  --primary-dark: #3730a3;
  
  --secondary: #0ea5e9;
  --secondary-hover: #0284c7;
  
  --accent: #f59e0b;
  --accent-light: #fef3c7;
  
  --success: #10b981;
  --success-light: #ecfdf5;
  --danger: #ef4444;
  --danger-light: #fef2f2;
  --warning: #f59e0b;
  --info: #3b82f6;

  /* Surfaces & Neutrals */
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-sidebar: #0f172a;
  --sidebar-text: #94a3b8;
  --sidebar-hover: #1e293b;
  
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  --border-color: #e2e8f0;
  --border-focus: #818cf8;

  /* Radii & Shadows */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--primary-hover);
}

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

/* ==========================================================================
   Dashboard & Portal Layout (Admin / Merchant)
   ========================================================================== */

.app-wrapper {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* Sidebar Navigation - Fixed & Non-Stretching */
.sidebar {
  width: 260px;
  background-color: var(--bg-sidebar);
  color: #fff;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  align-self: flex-start;
  transition: transform var(--transition-normal);
  z-index: 50;
}

.sidebar-header {
  padding: 1.25rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

.sidebar-brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: bold;
}

.sidebar-nav {
  padding: 1rem 0.75rem;
  list-style: none;
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.sidebar-nav::-webkit-scrollbar {
  width: 5px;
}
.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.sidebar-nav-item {
  margin-bottom: 0.25rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-md);
  color: var(--sidebar-text);
  font-weight: 500;
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

.sidebar-link:hover {
  background-color: var(--sidebar-hover);
  color: #fff;
}

.sidebar-link.active {
  background-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

.sidebar-link .icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--sidebar-text);
  flex-shrink: 0;
  transition: color var(--transition-fast);
}

.sidebar-link:hover .icon,
.sidebar-link.active .icon {
  color: #ffffff;
}

.sidebar-link .icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-footer {
  padding: 1.15rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
  flex-shrink: 0;
  background-color: rgba(15, 23, 42, 0.5);
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #fff;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: #fff;
}

/* Main Content Area */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background-color: var(--bg-main);
}

/* Top App Header */
.top-header {
  height: 64px;
  background-color: #fff;
  border-bottom: 1px solid var(--border-color);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-left, .header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.menu-toggle-btn {
  display: none;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-main);
  cursor: pointer;
  padding: 0.25rem;
}

.portal-switch-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #f1f5f9;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.page-container {
  padding: 1.5rem;
  flex: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
}

.page-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ==========================================================================
   Responsive Grid System
   ========================================================================== */

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.grid-1 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   Cards, Metric Panels & Badges
   ========================================================================== */

.card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
  position: relative;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
}

/* Stat Cards */
.stat-card {
  background-color: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

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

.stat-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stat-value {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 0.35rem;
}

.stat-subtext {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.stat-icon.primary { background-color: var(--primary-light); color: var(--primary); }
.stat-icon.success { background-color: var(--success-light); color: var(--success); }
.stat-icon.accent  { background-color: var(--accent-light);  color: var(--accent); }
.stat-icon.danger  { background-color: var(--danger-light);  color: var(--danger); }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}

.badge-success { background-color: var(--success-light); color: var(--success); }
.badge-warning { background-color: var(--accent-light); color: #d97706; }
.badge-danger  { background-color: var(--danger-light); color: var(--danger); }
.badge-primary { background-color: var(--primary-light); color: var(--primary); }
.badge-secondary { background-color: #f1f5f9; color: var(--text-muted); }

/* ==========================================================================
   Buttons & Interactive Elements
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.15rem;
  font-size: 0.925rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  line-height: 1.25;
}

.btn-primary {
  background-color: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background-color: var(--primary-hover);
  color: #fff;
}

.btn-secondary {
  background-color: #fff;
  border-color: var(--border-color);
  color: var(--text-main);
}
.btn-secondary:hover {
  background-color: #f8fafc;
  border-color: #cbd5e1;
}

.btn-success {
  background-color: var(--success);
  color: #fff;
}
.btn-success:hover {
  background-color: #059669;
  color: #fff;
}

.btn-danger {
  background-color: var(--danger);
  color: #fff;
}
.btn-danger:hover {
  background-color: #dc2626;
  color: #fff;
}

.btn-lg {
  padding: 0.85rem 1.5rem;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

.btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn-block {
  width: 100%;
}

/* ==========================================================================
   Forms, Inputs, & Loyalty Type Selector
   ========================================================================== */

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-size: 0.95rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background-color: #fff;
  color: var(--text-main);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}

.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

/* Loyalty Mode Card Selector (Radio Cards) */
.loyalty-type-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.loyalty-type-option {
  position: relative;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  background: #fff;
}

.loyalty-type-option input[type="radio"] {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.loyalty-type-option:hover {
  border-color: #cbd5e1;
}

.loyalty-type-option.selected, 
.loyalty-type-option:has(input[type="radio"]:checked) {
  border-color: var(--primary);
  background-color: var(--primary-light);
}

.loyalty-type-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.loyalty-type-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Responsive Tables
   ========================================================================== */

.table-responsive {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: #fff;
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.table th {
  background-color: #f8fafc;
  color: var(--text-muted);
  font-weight: 600;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  vertical-align: middle;
}

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

.table tr:hover td {
  background-color: #f8fafc;
}

/* ==========================================================================
   Interactive Stamp Card & Points Meter (Mobile Customer & PWA)
   ========================================================================== */

.stamp-card-container {
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  color: #fff;
  border-radius: var(--radius-xl);
  padding: 1.75rem 1.5rem;
  box-shadow: 0 10px 25px -5px rgba(49, 46, 129, 0.4);
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}

.stamp-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.stamp-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.stamp-card-meta {
  font-size: 0.85rem;
  opacity: 0.8;
}

.stamp-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.stamp-slot {
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.6);
  position: relative;
  transition: all var(--transition-normal);
}

.stamp-slot.filled {
  background: radial-gradient(circle, #f59e0b, #d97706);
  border: 2px solid #fbbf24;
  color: #fff;
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.5);
  transform: scale(1.02);
}

.stamp-slot.reward-target {
  border-color: #ec4899;
}

.stamp-slot.reward-target.filled {
  background: radial-gradient(circle, #ec4899, #be185d);
  box-shadow: 0 4px 10px rgba(236, 72, 153, 0.5);
}

/* Points Wallet Meter */
.points-wallet-card {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #fff;
  border-radius: var(--radius-xl);
  padding: 1.75rem 1.5rem;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.4);
  margin-bottom: 1.5rem;
  text-align: center;
}

.points-coin-val {
  font-size: 3rem;
  font-weight: 800;
  color: #fbbf24;
  line-height: 1;
  margin: 0.5rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.points-dollar-val {
  font-size: 1rem;
  color: #94a3b8;
  font-weight: 500;
}

/* Progress bar */
.progress-track {
  width: 100%;
  height: 10px;
  background-color: #334155;
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 1rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #a855f7);
  border-radius: var(--radius-full);
  transition: width 0.5s ease-in-out;
}

/* Digital Customer QR Code Box */
.qr-box {
  background: #fff;
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  display: inline-block;
  box-shadow: var(--shadow-sm);
  margin: 1rem auto;
}

/* ==========================================================================
   Cashier Terminal (PWA) Numeric Keypad
   ========================================================================== */

.keypad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  max-width: 380px;
  margin: 1rem auto;
}

.keypad-btn {
  height: 60px;
  font-size: 1.5rem;
  font-weight: 700;
  background-color: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  color: var(--text-main);
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.keypad-btn:active {
  background-color: #e2e8f0;
  transform: scale(0.96);
}

/* ==========================================================================
   Mobile Bottom Navigation Bar (PWA & Customer Views)
   ========================================================================== */

.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #fff;
  border-top: 1px solid var(--border-color);
  height: 60px;
  z-index: 100;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.mobile-nav-items {
  display: flex;
  height: 100%;
  justify-content: space-around;
  align-items: center;
  list-style: none;
}

.mobile-nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.25rem 0.75rem;
}

.mobile-nav-link.active {
  color: var(--primary);
}

.mobile-nav-icon {
  font-size: 1.3rem;
}

/* ==========================================================================
   Alerts & Notifications
   ========================================================================== */

.alert {
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  font-size: 0.925rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert-success { background-color: var(--success-light); color: #065f46; border: 1px solid #a7f3d0; }
.alert-error   { background-color: var(--danger-light); color: #991b1b; border: 1px solid #fecaca; }
.alert-info    { background-color: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* ==========================================================================
   Tab Navigation System (Settings & Multi-Pane Views)
   ========================================================================== */

.tabs-nav {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.tabs-nav::-webkit-scrollbar {
  height: 4px;
}
.tabs-nav::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-full);
}

.tab-nav-btn {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.65rem 1.15rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all var(--transition-fast);
  text-decoration: none;
  flex-shrink: 0;
}

.tab-nav-btn:hover {
  color: var(--primary);
  border-color: #cbd5e1;
  background-color: #f8fafc;
}

.tab-nav-btn.active {
  background-color: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.25);
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: tabFadeIn 0.2s ease-in-out;
}

@keyframes tabFadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Responsive Breakpoints & Media Queries
   ========================================================================== */

/* Tablets and Desktops below 1024px */
@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .top-header {
    padding: 0 1.25rem;
  }
}

/* Mobile Screens (Tablets Portrait & Mobile Phones up to 768px) */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.25);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(2px);
    z-index: 45;
  }

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

  .menu-toggle-btn {
    display: block;
  }

  .page-container {
    padding: 1rem;
    padding-bottom: 85px; /* Space for bottom nav on mobile */
  }

  .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
  }

  .page-header > div:last-child {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .grid-4, .grid-3, .grid-2 {
    grid-template-columns: 1fr;
  }

  .loyalty-type-selector {
    grid-template-columns: 1fr;
  }

  .mobile-bottom-nav {
    display: block;
  }

  .top-header {
    padding: 0 1rem;
    height: 58px;
  }

  .card {
    padding: 1rem;
  }

  .stat-card {
    padding: 1rem;
  }

  .stat-value {
    font-size: 1.65rem;
  }

  .table th, .table td {
    padding: 0.7rem 0.85rem;
    font-size: 0.85rem;
  }

  .stamp-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.65rem;
  }
}

/* Small Mobile Phones below 480px */
@media (max-width: 480px) {
  .page-container {
    padding: 0.75rem;
    padding-bottom: 80px;
  }

  .page-title {
    font-size: 1.25rem;
  }

  .page-subtitle {
    font-size: 0.8rem;
  }

  .portal-switch-pill {
    display: none;
  }

  .stat-value {
    font-size: 1.45rem;
  }

  .stat-label {
    font-size: 0.78rem;
  }

  .stat-subtext {
    font-size: 0.72rem;
  }

  .table th, .table td {
    padding: 0.55rem 0.65rem;
    font-size: 0.8rem;
  }

  .btn-lg {
    padding: 0.75rem 1.2rem;
    font-size: 0.95rem;
    width: 100%;
  }

  .tabs-nav {
    gap: 0.35rem;
  }

  .tab-nav-btn {
    padding: 0.5rem 0.85rem;
    font-size: 0.8rem;
  }
}
