/* ==========================================================================
   My Spray App - Professional CSS Framework
   Modern, Clean, Enterprise-Grade Design
   ========================================================================== */

/* ==========================================================================
   CSS Custom Properties (Variables)
   ========================================================================== */
:root {
  /* Color Palette */
  --primary-50: #f0f9ff;
  --primary-100: #e0f2fe;
  --primary-200: #bae6fd;
  --primary-300: #7dd3fc;
  --primary-400: #38bdf8;
  --primary-500: #0ea5e9;
  --primary-600: #0284c7;
  --primary-700: #0369a1;
  --primary-800: #075985;
  --primary-900: #0c4a6e;

  --secondary-50: #f8fafc;
  --secondary-100: #f1f5f9;
  --secondary-200: #e2e8f0;
  --secondary-300: #cbd5e1;
  --secondary-400: #94a3b8;
  --secondary-500: #64748b;
  --secondary-600: #475569;
  --secondary-700: #334155;
  --secondary-800: #1e293b;
  --secondary-900: #0f172a;

  --success-50: #f0fdf4;
  --success-500: #22c55e;
  --success-600: #16a34a;
  --success-700: #15803d;

  --warning-50: #fffbeb;
  --warning-500: #f59e0b;
  --warning-600: #d97706;

  --error-50: #fef2f2;
  --error-500: #ef4444;
  --error-600: #dc2626;

  /* Typography */
  --font-family-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-family-mono: 'JetBrains Mono', Consolas, 'Liberation Mono', Menlo, monospace;

  /* Font Sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Base Styles & Reset
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  font-family: var(--font-family-sans);
}

body {
  margin: 0;
  font-family: var(--font-family-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--secondary-800);
  background-color: var(--secondary-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: 80px;
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 600;
  line-height: 1.25;
  color: var(--secondary-900);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
  margin: 0 0 var(--space-4) 0;
}

a {
  color: var(--primary-600);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-700);
}

/* ==========================================================================
   Mobile-First Responsive Layout System
   ========================================================================== */

/* Mobile Base Styles (320px and up) */
.container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 var(--space-3);
}

.container-fluid {
  width: 100%;
  padding: 0 var(--space-3);
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 calc(-1 * var(--space-2));
}

/* Mobile-first column system - Default 100% width */
[class*="col-"] {
  flex: 0 0 100%;
  max-width: 100%;
  padding: 0 var(--space-2);
}

/* Mobile column variations */
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-12 { flex: 0 0 100%; max-width: 100%; }

/* Small devices (576px and up) */
@media (min-width: 576px) {
  .container {
    max-width: 540px;
    padding: 0 var(--space-4);
  }
  
  .row {
    margin: 0 calc(-1 * var(--space-3));
  }
  
  [class*="col-"] {
    padding: 0 var(--space-3);
  }
  
  .col-sm-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
  .col-sm-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
  .col-sm-3 { flex: 0 0 25%; max-width: 25%; }
  .col-sm-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
  .col-sm-6 { flex: 0 0 50%; max-width: 50%; }
  .col-sm-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
  .col-sm-9 { flex: 0 0 75%; max-width: 75%; }
  .col-sm-12 { flex: 0 0 100%; max-width: 100%; }
}

/* Medium devices (768px and up) */
@media (min-width: 768px) {
  .container {
    max-width: 720px;
  }
  
  .col-md-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
  .col-md-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
  .col-md-3 { flex: 0 0 25%; max-width: 25%; }
  .col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
  .col-md-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
  .col-md-6 { flex: 0 0 50%; max-width: 50%; }
  .col-md-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
  .col-md-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
  .col-md-9 { flex: 0 0 75%; max-width: 75%; }
  .col-md-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
  .col-md-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
  .col-md-12 { flex: 0 0 100%; max-width: 100%; }
}

/* Large devices (992px and up) */
@media (min-width: 992px) {
  .container {
    max-width: 960px;
  }
  
  .col-lg-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
  .col-lg-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
  .col-lg-3 { flex: 0 0 25%; max-width: 25%; }
  .col-lg-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
  .col-lg-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
  .col-lg-6 { flex: 0 0 50%; max-width: 50%; }
  .col-lg-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
  .col-lg-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
  .col-lg-9 { flex: 0 0 75%; max-width: 75%; }
  .col-lg-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
  .col-lg-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
  .col-lg-12 { flex: 0 0 100%; max-width: 100%; }
}

/* Extra large devices (1200px and up) */
@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }
  
  .col-xl-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
  .col-xl-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
  .col-xl-3 { flex: 0 0 25%; max-width: 25%; }
  .col-xl-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
  .col-xl-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
  .col-xl-6 { flex: 0 0 50%; max-width: 50%; }
  .col-xl-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
  .col-xl-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
  .col-xl-9 { flex: 0 0 75%; max-width: 75%; }
  .col-xl-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
  .col-xl-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
  .col-xl-12 { flex: 0 0 100%; max-width: 100%; }
}

/* XXL devices (1400px and up) */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
}

/* Flex Utilities */
.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.ms-auto { margin-left: auto; }
.me-2 { margin-right: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mt-4 { margin-top: var(--space-4); }
.pt-4 { padding-top: var(--space-4); }

/* ==========================================================================
   Mobile-First Authentication Pages
   ========================================================================== */
.auth-body {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-800) 100%);
  display: flex;
  align-items: center;
  padding: var(--space-4);
}

.auth-container {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: var(--space-6);
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.auth-header {
  text-align: center;
  margin-bottom: var(--space-6);
}

.auth-header i {
  font-size: 2rem;
  color: var(--primary-600);
  margin-bottom: var(--space-3);
  display: block;
}

/* Auth Logo Styling */
.auth-logo {
  height: 48px;
  width: auto;
  margin-bottom: var(--space-4);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  transition: all var(--transition-normal);
}

.auth-header:hover .auth-logo {
  transform: scale(1.05);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

.auth-header h2 {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--secondary-900);
  margin-bottom: var(--space-2);
}

.auth-header p {
  color: var(--secondary-500);
  font-size: var(--text-sm);
  margin: 0;
}

/* Small devices (576px and up) */
@media (min-width: 576px) {
  .auth-body {
    padding: var(--space-6);
  }
  
  .auth-container {
    padding: var(--space-8);
    border-radius: var(--radius-xl);
    max-width: 450px;
  }
  
  .auth-header {
    margin-bottom: var(--space-8);
  }
  
  .auth-header i {
    font-size: 2.5rem;
  }
  
  .auth-header h2 {
    font-size: var(--text-2xl);
  }
  
  .auth-header p {
    font-size: var(--text-base);
  }
}

/* Medium devices (768px and up) */
@media (min-width: 768px) {
  .auth-body {
    padding: var(--space-8);
  }
  
  .auth-container {
    padding: var(--space-10);
    border-radius: var(--radius-2xl);
    max-width: 500px;
    box-shadow: var(--shadow-2xl);
  }
  
  .auth-header {
    margin-bottom: var(--space-10);
  }
  
  .auth-header i {
    font-size: 3rem;
  }
  
  .auth-header h2 {
    font-size: var(--text-3xl);
  }
  
  .auth-header p {
    font-size: var(--text-lg);
  }
}

/* Large devices (992px and up) */
@media (min-width: 992px) {
  .auth-container {
    padding: var(--space-12);
    max-width: 550px;
  }
}

/* ==========================================================================
   Mobile-First Forms
   ========================================================================== */
.form-control {
  display: block;
  width: 100%;
  padding: var(--space-3);
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--secondary-800);
  background-color: white;
  border: 2px solid var(--secondary-200);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  appearance: none;
  min-height: 44px; /* Touch-friendly minimum */
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgb(14 165 233 / 0.1);
}

.form-control::placeholder {
  color: var(--secondary-400);
  font-size: var(--text-sm);
}

.input-group {
  position: relative;
  display: flex;
}

.input-group-text {
  display: flex;
  align-items: center;
  padding: var(--space-3);
  background-color: var(--secondary-50);
  border: 2px solid var(--secondary-200);
  border-right: none;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  color: var(--secondary-500);
  min-width: 44px;
  justify-content: center;
  font-size: var(--text-sm);
}

.input-group .form-control {
  border-left: none;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.input-group:focus-within .input-group-text {
  border-color: var(--primary-500);
  background-color: var(--primary-50);
  color: var(--primary-600);
}

.form-check {
  display: flex;
  align-items: center;
  margin-bottom: var(--space-4);
  cursor: pointer;
  padding: var(--space-2) 0;
}

.form-check input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-right: var(--space-4);
  accent-color: var(--primary-600);
  cursor: pointer;
  flex-shrink: 0;
}

.form-check span {
  color: var(--secondary-700);
  font-size: var(--text-sm);
  line-height: 1.4;
}

/* Small devices (576px and up) */
@media (min-width: 576px) {
  .form-control {
    padding: var(--space-4);
    font-size: var(--text-base);
  }
  
  .form-control::placeholder {
    font-size: var(--text-base);
  }
  
  .input-group {
    margin-bottom: var(--space-5);
  }
  
  .input-group-text {
    padding: var(--space-4);
    min-width: 50px;
    font-size: var(--text-base);
  }
}

/* Medium devices (768px and up) */
@media (min-width: 768px) {
  .form-control {
    border-radius: var(--radius-lg);
  }
  
  .input-group {
    margin-bottom: var(--space-6);
  }
  
  .input-group-text {
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  }
  
  .input-group .form-control {
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  }
}

/* ==========================================================================
   Mobile-First Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  min-height: 44px; /* Touch-friendly minimum */
  min-width: 44px;
  white-space: nowrap;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgb(14 165 233 / 0.2);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background-color: var(--primary-600);
  color: white;
  border-color: var(--primary-600);
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--primary-700);
  border-color: var(--primary-700);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: var(--secondary-600);
  color: white;
  border-color: var(--secondary-600);
}

.btn-secondary:hover:not(:disabled) {
  background-color: var(--secondary-700);
  border-color: var(--secondary-700);
}

.btn-success {
  background-color: var(--success-600);
  color: white;
  border-color: var(--success-600);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-xs);
  min-height: 36px;
}

.btn-danger {
  background-color: var(--error-600);
  color: white;
  border-color: var(--error-600);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-xs);
  min-height: 36px;
}

.btn-warning {
  background-color: var(--warning-500);
  color: white;
  border-color: var(--warning-500);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-xs);
  min-height: 36px;
}

.btn-outline-primary {
  background-color: transparent;
  color: var(--primary-600);
  border-color: var(--primary-600);
}

.btn-outline-primary:hover:not(:disabled) {
  background-color: var(--primary-600);
  color: white;
}

.btn-outline-success {
  background-color: transparent;
  color: var(--success-600);
  border-color: var(--success-600);
}

.btn-outline-info {
  background-color: transparent;
  color: var(--primary-500);
  border-color: var(--primary-500);
}

.btn-sm {
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-xs);
  min-height: 36px;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: var(--space-4) var(--space-6);
  font-size: var(--text-base);
  min-height: 52px;
  border-radius: var(--radius-lg);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  pointer-events: none;
}

.btn-close {
  background: none;
  border: none;
  font-size: var(--text-lg);
  color: var(--secondary-500);
  cursor: pointer;
  padding: var(--space-2);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-close:hover {
  background-color: var(--secondary-100);
  color: var(--secondary-700);
}

.d-grid {
  display: grid;
}

/* Small devices (576px and up) */
@media (min-width: 576px) {
  .btn {
    padding: var(--space-3) var(--space-5);
    font-size: var(--text-base);
  }
  
  .btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-lg);
  }
}

/* Medium devices (768px and up) */
@media (min-width: 768px) {
  .btn {
    border-radius: var(--radius-lg);
  }
  
  .btn-sm {
    border-radius: var(--radius-md);
  }
  
  .btn-lg {
    border-radius: var(--radius-xl);
  }
}

/* ==========================================================================
   Loading States
   ========================================================================== */
.loading-spinner {
  display: none;
}

.btn:disabled .loading-spinner {
  display: inline;
}

.btn:disabled .btn-text {
  display: none;
}

/* ==========================================================================
   Alerts
   ========================================================================== */
.alert {
  padding: var(--space-4);
  margin-bottom: var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  display: flex;
  align-items: center;
}

.alert-success {
  background-color: var(--success-50);
  border-color: var(--success-500);
  color: var(--success-700);
}

.alert-danger {
  background-color: var(--error-50);
  border-color: var(--error-500);
  color: var(--error-700);
}

.alert-info {
  background-color: var(--primary-50);
  border-color: var(--primary-500);
  color: var(--primary-700);
}

/* ==========================================================================
   Dashboard Specific Styles
   ========================================================================== */
.dashboard-body {
  background-color: var(--secondary-50);
}

/* ==========================================================================
   Mobile-First Professional Navigation Bar
   ========================================================================== */
.navbar {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  border: none;
  padding: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.navbar .container {
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 100%;
  margin: 0 auto;
}

.navbar-brand {
  font-size: var(--text-lg);
  font-weight: 800;
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  transition: all var(--transition-normal);
}

.navbar-brand:hover {
  color: var(--primary-300);
  text-decoration: none;
  transform: translateX(2px);
}

.navbar-brand i {
  background: linear-gradient(135deg, var(--primary-400), var(--primary-600));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: var(--text-lg);
  filter: drop-shadow(0 1px 2px rgba(59, 130, 246, 0.3));
}

/* Navbar Logo Styling */
.navbar-logo {
  height: 32px;
  width: auto;
  margin-right: var(--space-3);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
  transition: all var(--transition-normal);
  border-radius: 5px;
}

.navbar-brand:hover .navbar-logo {
  transform: scale(1.05);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Mobile-first Navbar Logo Responsive */
@media (max-width: 480px) {
  .navbar-logo {
    height: 40px;
    margin-right: var(--space-2);
  }
  
  .navbar-brand {
    font-size: var(--text-base);
  }
  
  /* Mobile Modal Form Improvements */
  .modal-body form .row {
    margin-bottom: var(--space-3);
  }
  
  .modal-body .input-group {
    margin-bottom: var(--space-2);
  }
  
  .modal-body .text-end {
    margin-top: var(--space-4);
    padding-top: var(--space-3);
  }
  
  .modal-body .alert {
    margin-top: var(--space-2);
    margin-bottom: var(--space-3);
    padding: var(--space-3);
    font-size: var(--text-sm);
  }
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Mobile notification bell */
.notification-bell {
  position: relative;
  cursor: pointer;
  padding: var(--space-2);
  border-radius: var(--radius-md);
  color: white;
  transition: all var(--transition-normal);
  backdrop-filter: blur(10px);
  min-height: 44px;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notification-bell i {
  font-size: var(--text-lg);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.notification-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: linear-gradient(135deg, var(--error-500), var(--error-600));
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
  animation: pulse 2s infinite;
}

/* Mobile logout button */
.logout-bottom {
  position: fixed;
  bottom: var(--space-4);
  right: var(--space-4);
  z-index: 1000;
}

.logout-bottom .btn-logout {
  background-color: var(--error-600);
  color: white;
  border: none;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-xl);
  font-size: var(--text-xs);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
  transition: all var(--transition-normal);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 44px;
}

.logout-bottom .btn-logout:hover {
  background-color: var(--error-700);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
  color: white;
  text-decoration: none;
}

.logout-bottom .btn-logout:active {
  transform: translateY(0);
}

/* Small devices (576px and up) */
@media (min-width: 576px) {
  .navbar .container {
    padding: var(--space-4) var(--space-5);
  }
  
  .navbar-brand {
    font-size: var(--text-xl);
    gap: var(--space-4);
  }
  
  .navbar-brand i {
    font-size: var(--text-xl);
  }
  
  /* Responsive Navbar Logo */
  .navbar-logo {
    height: 36px;
    margin-right: var(--space-4);
  }
  
  .navbar-nav {
    gap: var(--space-4);
  }
  
  .notification-bell {
    padding: var(--space-3);
  }
  
  .notification-bell i {
    font-size: var(--text-xl);
  }
  
  .notification-badge {
    width: 20px;
    height: 20px;
    font-size: 11px;
    top: 2px;
    right: 2px;
  }
  
  .logout-bottom {
    bottom: var(--space-5);
    right: var(--space-5);
  }
  
  .logout-bottom .btn-logout {
    padding: var(--space-3) var(--space-5);
    font-size: var(--text-sm);
    gap: var(--space-3);
  }
}

/* Medium devices (768px and up) */
@media (min-width: 768px) {
  .navbar {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  }
  
  .navbar .container {
    padding: var(--space-4) var(--space-6);
    max-width: 720px;
  }
  
  .navbar-brand {
    font-size: var(--text-2xl);
    gap: var(--space-4);
  }
  
  .navbar-brand i {
    font-size: var(--text-2xl);
  }
  
  /* Responsive Navbar Logo - Medium */
  .navbar-logo {
    height: 40px;
  }
  
  .navbar-nav {
    gap: var(--space-6);
  }
  
  .notification-bell {
    padding: var(--space-4);
    border-radius: var(--radius-lg);
  }
  
  .notification-bell i {
    font-size: var(--text-2xl);
  }
  
  .notification-badge {
    width: 22px;
    height: 22px;
    font-size: 12px;
    top: -2px;
    right: 0px;
  }
  
  .logout-bottom {
    bottom: var(--space-6);
    right: var(--space-6);
  }
  
  .logout-bottom .btn-logout {
    border-radius: 50px;
    padding: var(--space-3) var(--space-6);
    font-size: var(--text-sm);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    gap: var(--space-3);
  }
}

/* Large devices (992px and up) */
@media (min-width: 992px) {
  .navbar .container {
    max-width: 960px;
  }
  
  /* Responsive Navbar Logo - Large */
  .navbar-logo {
    height: 44px;
  }
}

/* Extra large devices (1200px and up) */
@media (min-width: 1200px) {
  .navbar .container {
    max-width: 1140px;
  }
  
  /* Responsive Navbar Logo - Extra Large */
  .navbar-logo {
    height: 48px;
  }
}

/* =========================================================================
   Mobile-First Dashboard
   ========================================================================== */
.dashboard-header {
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-800) 100%);
  color: white;
  padding: var(--space-8) 0;
  margin-bottom: var(--space-6);
  text-align: center;
}

.dashboard-title {
  font-size: var(--text-2xl);
  font-weight: 800;
  margin-bottom: var(--space-2);
}

.user-info {
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  backdrop-filter: blur(10px);
  margin-top: var(--space-4);
  text-align: center;
}

.badge-status {
  background-color: var(--success-500);
  color: white;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-xl);
  font-size: var(--text-xs);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

.admin-section {
  background: linear-gradient(135deg, var(--error-500) 0%, var(--error-700) 100%);
  color: white;
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
  box-shadow: var(--shadow-md);
}

.welcome-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--secondary-200);
}

/* Mobile stat cards */
.stat-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--secondary-200);
  transition: all var(--transition-normal);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-200);
}

/* Top section with icon and value horizontally aligned */
.stat-card-content {
  display: flex;
  align-items: center;
  margin-bottom: var(--space-2);
  gap: var(--space-3);
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-lg);
  flex-shrink: 0;
}

.stat-icon.primary {
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-700) 100%);
  color: white;
}

.stat-icon.success {
  background: linear-gradient(135deg, var(--success-500) 0%, var(--success-700) 100%);
  color: white;
}

.stat-icon.info {
  background: linear-gradient(135deg, var(--primary-400) 0%, var(--primary-600) 100%);
  color: white;
}

.stat-icon.warning {
  background: linear-gradient(135deg, var(--warning-500) 0%, var(--warning-600) 100%);
  color: white;
}

.stat-title {
  font-size: 11px;
  color: var(--secondary-500);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-1);
  order: 2;
}

.stat-value {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--secondary-900);
  margin: 0;
  flex: 1;
}

.stat-card small {
  font-size: 10px;
  color: var(--secondary-500);
}

/* Total Amount Card - Mobile First Design */
.total-amount-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  color: var(--secondary-900);
  padding: var(--space-2);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--secondary-200);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  margin-bottom: var(--space-4);
}

.total-amount-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-500), var(--primary-600), var(--success-500));
}

/* Mobile: Stack vertically for better space usage */
.total-amount-card .d-flex {
    align-items: center;
    text-align: center;
    display: flex;
    justify-content: space-between;
}

.stat-icon.total {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
  color: white;
  font-size: var(--text-lg);
  border-radius: var(--radius-lg);
  box-shadow: 0 3px 8px rgba(2, 132, 199, 0.25);
  margin-bottom: 0;
}

.total-amount-card .stat-title {
  color: var(--secondary-600);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-1);
}

.total-amount-card .stat-value.total-amount {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--secondary-900);
  text-shadow: none;
  background: linear-gradient(135deg, var(--primary-600), var(--success-600));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

/* Tablet and up: horizontal layout */
@media (min-width: 768px) {
  .total-amount-card {
    padding: var(--space-5);
    border-radius: var(--radius-xl);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  }
  
  .total-amount-card::before {
    height: 4px;
  }
  
  .stat-icon.total {
    width: 56px;
    height: 56px;
    font-size: var(--text-xl);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
  }
  
  .total-amount-card .stat-title {
    font-size: var(--text-sm);
    margin-bottom: var(--space-2);
  }
  
  .total-amount-card .stat-value.total-amount {
    font-size: 2.25rem;
  }
}

/* Desktop and up: enhanced styling */
@media (min-width: 1024px) {
  .total-amount-card {
    padding: var(--space-6);
  }
  
  .total-amount-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-300);
  }
  
  .total-amount-card .stat-value.total-amount {
    font-size: 2.5rem;
  }
}

/* Small devices (576px and up) */
@media (min-width: 576px) {
  .dashboard-header {
    padding: var(--space-12) 0;
  }
  
  .dashboard-title {
    font-size: var(--text-3xl);
  }
  
  .user-info {
    padding: var(--space-5);
    border-radius: var(--radius-xl);
    margin-top: var(--space-6);
  }
  
  .badge-status {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
  }
  
  .admin-section {
    padding: var(--space-7);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-7);
  }
  
  .welcome-card {
    padding: var(--space-7);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-7);
  }
  
  .stat-card {
    padding: var(--space-7);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-6);
  }
  
  .stat-icon {
    width: 55px;
    height: 55px;
    font-size: var(--text-xl);
    margin-bottom: var(--space-5);
  }
  
  .stat-title {
    font-size: var(--text-xs);
    margin-bottom: var(--space-2);
  }
  
  .stat-value {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-2);
  }
  
  .stat-card small {
    font-size: var(--text-xs);
  }
}

/* Medium devices (768px and up) */
@media (min-width: 768px) {
  .dashboard-header {
    padding: var(--space-16) 0;
    text-align: left;
  }
  
  .dashboard-title {
    font-size: var(--text-4xl);
  }
  
  .user-info {
    text-align: left;
  }
  
  .admin-section {
    padding: var(--space-8);
    margin-bottom: var(--space-8);
  }
  
  .welcome-card {
    padding: var(--space-8);
    margin-bottom: var(--space-8);
  }
  
  .stat-card {
    padding: var(--space-8);
    margin-bottom: 0;
  }
  
  .stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
  }
  
  .stat-icon {
    width: 60px;
    height: 60px;
    font-size: var(--text-2xl);
    margin-bottom: var(--space-6);
    border-radius: var(--radius-xl);
  }
  
  .stat-title {
    font-size: var(--text-sm);
  }
  
  .stat-value {
    font-size: var(--text-3xl);
  }
  
  .stat-card small {
    font-size: var(--text-sm);
  }
}

/* Large devices (992px and up) */
@media (min-width: 992px) {
  .dashboard-header {
    padding: var(--space-20) 0;
  }
}





/* ==========================================================================
   Professional Chart & Container Components - Mobile First
   ========================================================================== */

/* Chart Container - Base Mobile Styles */
.chart-container {
  background: white;
  border-radius: var(--radius-md);
  padding: var(--space-3);
  margin-bottom: var(--space-4);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--secondary-100);
  transition: all var(--transition-normal);
}

.chart-container:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: var(--primary-200);
}

/* Chart Header - Mobile First */
.chart-header {
  margin-bottom: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.chart-title-section {
  text-align: left;
}

.chart-title-section h3 {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--secondary-800);
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  line-height: 1.4;
}

.chart-title-section h3 i {
  font-size: 0.9em;
  opacity: 0.8;
}

/* Chart Controls - Mobile Optimized */
.chart-controls .btn-group {
  display: flex;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.chart-controls .period-btn {
  flex: 1;
  border: 1px solid var(--primary-200);
  border-radius: 0;
  padding: var(--space-2);
  font-size: 11px;
  font-weight: 500;
  transition: all var(--transition-fast);
  color: var(--primary-600);
  background: white;
  cursor: pointer;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.chart-controls .period-btn:not(:first-child) {
  border-left: none;
}

.chart-controls .period-btn:hover {
  background-color: var(--primary-25);
  color: var(--primary-700);
}

.chart-controls .period-btn.active {
  background-color: var(--primary-600);
  color: white;
  border-color: var(--primary-600);
  font-weight: 600;
}

.chart-controls .period-btn i {
  font-size: 10px;
}

/* Chart Wrapper - Responsive Heights */
.chart-wrapper {
  position: relative;
  height: 250px;
  width: 100%;
  padding: var(--space-1);
  background: var(--secondary-25);
  border-radius: var(--radius-sm);
}

.chart-wrapper canvas {
  width: 100% !important;
  height: 100% !important;
  border-radius: var(--radius-sm);
}

/* Chart No Data Message */
#chartNoDataMessage {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  text-align: center;
  z-index: 10;
}

#chartNoDataMessage i {
  opacity: 0.6;
  margin-bottom: var(--space-3);
}

#chartNoDataMessage p {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--secondary-600);
  margin-bottom: var(--space-2);
}

#chartNoDataMessage small {
  font-size: var(--text-sm);
  color: var(--secondary-500);
  opacity: 0.8;
}

/* Action Buttons in Chart Headers */
.chart-controls .btn-primary {
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-xs);
  border-radius: var(--radius-md);
  font-weight: 500;
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

/* Tablet Styles (576px+) */
@media (min-width: 576px) {
  .chart-container {
    padding: var(--space-4);
    margin-bottom: var(--space-5);
    border-radius: var(--radius-lg);
  }
  
  .chart-header {
    margin-bottom: var(--space-4);
    gap: var(--space-3);
  }
  
  .chart-title-section h3 {
    font-size: var(--text-lg);
    gap: var(--space-2);
  }
  
  .chart-controls .period-btn {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-xs);
    min-height: 38px;
    gap: 6px;
  }
  
  .chart-controls .period-btn i {
    font-size: 11px;
  }
  
  .chart-wrapper {
    height: 300px;
    padding: var(--space-2);
  }
  
  .chart-controls .btn-primary {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    min-height: 38px;
  }
}

/* Desktop Styles (768px+) */
@media (min-width: 768px) {
  .chart-container {
    padding: var(--space-5);
    margin-bottom: var(--space-6);
    border-radius: var(--radius-xl);
  }
  
  .chart-header {
    margin-bottom: var(--space-5);
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-4);
  }
  
  .chart-title-section h3 {
    font-size: var(--text-xl);
    gap: var(--space-3);
  }
  
  .chart-controls .btn-group {
    width: auto;
    min-width: 240px;
  }
  
  .chart-controls .period-btn {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    min-height: 40px;
    gap: var(--space-1);
  }
  
  .chart-controls .period-btn i {
    font-size: 12px;
  }
  
  .chart-wrapper {
    height: 350px;
    padding: var(--space-3);
  }
  
  .chart-controls .btn-primary {
    padding: var(--space-3) var(--space-5);
    font-size: var(--text-sm);
    min-height: 40px;
    gap: var(--space-2);
  }
}

/* Large Desktop Styles (1024px+) */
@media (min-width: 1024px) {
  .chart-container {
    padding: var(--space-6);
  }
  
  .chart-title-section h3 {
    font-size: var(--text-2xl);
  }
  
  .chart-wrapper {
    height: 400px;
  }
  
  .chart-controls .period-btn {
    padding: var(--space-3) var(--space-5);
  }
}

/* ==========================================================================
   Mobile-First Modal
   ========================================================================== */
.modal {
  display: none;
  position: fixed;
  z-index: 1050;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  padding: var(--space-4);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-dialog {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: var(--space-4) auto;
  padding: 0;
  pointer-events: none;
}

.modal-content {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  width: 100%;
  pointer-events: auto;
  position: relative;
}

.modal-header {
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-800) 100%);
  color: white;
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin: 0;
}

.modal-body {
  padding: var(--space-5);
}

/* Professional Modal Form Styling */
.modal-body form .row {
  margin-bottom: var(--space-4);
}

.modal-body form .row:last-child {
  margin-bottom: var(--space-3);
}

.modal-body .input-group {
  margin-bottom: var(--space-3);
}

.modal-body .alert {
  margin-top: var(--space-3);
  margin-bottom: var(--space-4);
}

.modal-body .text-end {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--secondary-200);
}

/* Modal Form Buttons */
.modal-body .btn {
  font-weight: 600;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.modal-body .btn {
  font-weight: 600;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.modal-body .user-btn .btn{
  width: 120px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  flex-wrap: nowrap;
  text-align: center;
  vertical-align: middle;
  line-height: 1.4;
}

.modal-body .user-btn .btn i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.modal-body .user-btn .btn span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: var(--space-1);
}

/* Enhanced button group alignment */
.btn-group .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  line-height: 1.4;
}

.btn-group .btn i {
  display: inline-flex;
  align-items: center;
}

.btn-group .btn span {
  display: inline-flex;
  align-items: center;
}

/* .modal-body .row:last-child {
  margin-bottom: 0;
} */

/* Small devices (576px and up) */
@media (min-width: 576px) {
  .modal {
    padding: var(--space-6);
  }
  
  .modal-dialog {
    margin: var(--space-6) auto;
    max-width: 500px;
  }
  
  .modal-content {
    border-radius: var(--radius-xl);
  }
  
  .modal-header {
    padding: var(--space-5) var(--space-6);
  }
  
  .modal-title {
    font-size: var(--text-xl);
  }
  
  .modal-body {
    padding: var(--space-6);
  }
  
  /* Professional form spacing for tablets */
  .modal-body form .row {
    margin-bottom: var(--space-5);
  }
  
  .modal-body .input-group {
    margin-bottom: var(--space-4);
  }
}

/* Medium devices (768px and up) */
@media (min-width: 768px) {
  .modal {
    padding: var(--space-6);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
  }
  
  .modal-dialog {
    margin: 0 auto;
    max-width: 600px;
    width: 100%;
    position: relative;
    transform: none;
  }
  
  .modal-content {
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-2xl);
    max-height: 90vh;
    overflow-y: auto;
  }
  
  .modal-header {
    padding: var(--space-6) var(--space-8);
    position: sticky;
    top: 0;
    z-index: 10;
  }
  
  .modal-body {
    padding: var(--space-8);
    max-height: calc(90vh - 120px);
    overflow-y: auto;
  }
  
  .modal-footer {
    padding: var(--space-6) var(--space-8);
    position: sticky;
    bottom: 0;
    background: white;
    border-top: 1px solid var(--secondary-200);
  }
}

/* Large devices (992px and up) */
@media (min-width: 992px) {
  .modal {
    padding: var(--space-8);
  }
  
  .modal-dialog {
    max-width: 700px;
  }
  
  .modal-header {
    padding: var(--space-8) var(--space-10);
  }
  
  .modal-body {
    padding: var(--space-10);
  }
  
  .modal-footer {
    padding: var(--space-8) var(--space-10);
  }
}

/* Extra large devices (1200px and up) */
@media (min-width: 1200px) {
  .modal-dialog {
    max-width: 800px;
  }
  
  .modal-header {
    padding: var(--space-10) var(--space-12);
  }
  
  .modal-body {
    padding: var(--space-12);
  }
  
  .modal-footer {
    padding: var(--space-10) var(--space-12);
  }
}

/* ==========================================================================
   Mobile-First Tables
   ========================================================================== */
.table {
  width: 100%;
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  font-size: var(--text-sm);
}

.table thead th {
  background-color: var(--secondary-50);
  padding: var(--space-2) var(--space-3);
  font-weight: 600;
  color: var(--secondary-700);
  text-align: left;
  border-bottom: 1px solid var(--secondary-200);
  font-size: var(--text-xs);
  white-space: nowrap;
}

.table tbody td {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--secondary-100);
  vertical-align: middle;
  font-size: var(--text-xs);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  max-width: 200px;
}

.table tbody tr:hover {
  background-color: var(--secondary-50);
}

/* Pending Bills Table Professional Styling */
#sprayTable .table tbody td {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

#sprayTable .table tbody td:first-child {
  font-weight: 500;
}

#sprayTable .table tbody td:nth-child(2),
#sprayTable .table tbody td:nth-child(3),
#sprayTable .table tbody td:nth-child(4) {
  text-align: right;
  font-weight: 600;
  font-family: monospace;
}

#sprayTable .table tbody td:nth-child(5) {
  max-width: 120px;
}

#sprayTable .table tbody td:nth-child(6) {
  max-width: 100px;
  font-size: var(--text-xs);
}

#sprayTable .table tbody td:last-child {
  max-width: 100px;
  text-align: center;
}

/* Mobile editable fields */
.editable-field {
  cursor: pointer;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  display: inline-block;
  min-width: 80px;
  border: 1px solid transparent;
  font-size: var(--text-xs);
  word-break: break-word;
}

.editable-field:hover {
  background-color: var(--primary-50);
  border-color: var(--primary-200);
  color: var(--primary-700);
}

.editable-field input.form-control {
  padding: var(--space-1);
  font-size: var(--text-xs);
  border: 1px solid var(--primary-500);
  border-radius: var(--radius-sm);
  min-width: 80px;
}

/* Mobile status buttons */
.status-btn {
  min-width: 60px;
  transition: all var(--transition-fast);
  padding: var(--space-1) var(--space-2);
  font-size: 10px;
}

.status-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* Action Buttons Flex Container */
.table tbody td {
  vertical-align: middle;
}

.table tbody td:last-child {
  padding: var(--space-1) var(--space-2);
}

.action-buttons {
  display: flex;
  gap: 0.25rem;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  min-width: fit-content;
}

.action-buttons .btn {
  flex-shrink: 0;
  min-width: auto;
  padding: 0.375rem 0.5rem;
  font-size: 0.75rem;
  line-height: 1;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.action-buttons .btn-sm {
  padding: 0.25rem 0.375rem;
  font-size: 0.7rem;
}

.action-buttons .btn i {
  font-size: 0.8rem;
}

/* Ensure action buttons stay together on mobile */
@media (max-width: 768px) {
  .action-buttons {
    gap: 0.125rem;
  }
  
  .action-buttons .btn {
    padding: 0.25rem 0.375rem;
    font-size: 0.65rem;
    min-width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .action-buttons .btn i {
    font-size: 0.7rem;
  }
}

/* Table responsive wrapper */
.table-responsive {
  border-radius: var(--radius-lg);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

/* Mobile table scroll hint */
.table-responsive::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 20px;
  background: linear-gradient(to left, rgba(255,255,255,0.8), transparent);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.table-responsive:hover::after {
  opacity: 1;
}

/* Loading and empty states */
.spinner-border {
  width: 1.5rem;
  height: 1.5rem;
  border: 0.2em solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
  to { transform: rotate(360deg); }
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Pending Bills No Data Message */
#noDataMessage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  padding: var(--space-6) var(--space-4);
  background: var(--secondary-25);
  border-radius: var(--radius-lg);
  margin: var(--space-4) 0;
}

#noDataMessage i {
  opacity: 0.7;
  margin-bottom: var(--space-4);
  color: var(--warning-500);
}

#noDataMessage p {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--secondary-600);
  text-align: center;
  margin: 0 auto;
  line-height: 1.5;
  max-width: 300px;
  width: 100%;
  display: block;
}

/* Loading Spinner Container */
#loadingSpinner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  padding: var(--space-4);
}

/* Mobile devices (up to 576px) */
@media (max-width: 575px) {
  /* Pending Bills Table - Mobile */
  #sprayTable .table thead th {
    font-size: var(--text-xs);
    padding: var(--space-2);
  }
  
  #sprayTable .table tbody td {
    font-size: var(--text-xs);
    padding: var(--space-2);
  }
  
  #sprayTable .table tbody td:first-child {
    max-width: 100px;
    font-size: 10px;
  }
  
  #sprayTable .table tbody td:nth-child(2),
  #sprayTable .table tbody td:nth-child(3),
  #sprayTable .table tbody td:nth-child(4) {
    max-width: 70px;
    font-size: 10px;
  }
  
  #sprayTable .table tbody td:nth-child(5) {
    max-width: 80px;
    font-size: 10px;
  }
  
  #sprayTable .table tbody td:nth-child(6) {
    max-width: 70px;
    font-size: 10px;
  }
  
  #sprayTable .table tbody td:last-child {
    max-width: 60px;
  }
  
  #noDataMessage {
    min-height: 150px;
    padding: var(--space-4) var(--space-2);
  }
  
  #noDataMessage i {
    font-size: 2.5rem;
    margin-bottom: var(--space-3);
  }
  
  #noDataMessage p {
    font-size: var(--text-sm);
    max-width: 250px;
    margin: 0 auto;
    width: 100%;
    text-align: center;
    display: block;
  }
}

/* Small devices (576px and up) */
@media (min-width: 576px) {
  .table {
    font-size: var(--text-sm);
  }
  
  .table thead th {
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-sm);
  }
  
  .table tbody td {
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-sm);
  }
  
  .editable-field {
    padding: var(--space-2) var(--space-3);
    min-width: 80px;
    font-size: var(--text-sm);
    border-radius: var(--radius-md);
  }
  
  .editable-field input.form-control {
    padding: var(--space-2);
    font-size: var(--text-sm);
    min-width: 100px;
  }
  
  .status-btn {
    min-width: 70px;
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-xs);
  }
  
  .spinner-border {
    width: 2rem;
    height: 2rem;
    border: 0.25em solid currentColor;
  }
}

/* Medium devices (768px and up) */
@media (min-width: 768px) {
  .table {
    font-size: var(--text-base);
  }
  
  .table thead th {
    padding: var(--space-4) var(--space-6);
    font-size: var(--text-base);
  }
  
  .table tbody td {
    padding: var(--space-4) var(--space-6);
    font-size: var(--text-base);
  }
  
  .editable-field {
    padding: var(--space-2) var(--space-3);
    min-width: 80px;
    font-size: var(--text-base);
    border-radius: var(--radius-md);
  }
  
  .editable-field input.form-control {
    padding: var(--space-2);
    font-size: var(--text-sm);
    border-radius: var(--radius-md);
    min-width: 120px;
  }
  
  .status-btn {
    min-width: 80px;
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-xs);
  }
  
  .table-responsive::after {
    display: none;
  }
  
  /* Pending Bills Table - Medium Screens */
  #sprayTable .table tbody td:first-child {
    max-width: 200px;
  }
  
  #sprayTable .table tbody td:nth-child(5) {
    max-width: 150px;
  }
  
  #sprayTable .table tbody td:nth-child(6) {
    max-width: 120px;
  }
  
  #noDataMessage {
    min-height: 250px;
    padding: var(--space-8) var(--space-6);
  }
  
  #noDataMessage p {
    font-size: var(--text-lg);
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
    text-align: center;
    display: block;
  }
}

/* ==========================================================================
   Animation & Transitions
   ========================================================================== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Apply animations with mobile-first approach */
.auth-container {
  animation: fadeInUp 0.6s ease-out;
}

.welcome-card,
.stat-card {
  animation: fadeIn 0.4s ease-out;
}

.chart-container {
  animation: slideInRight 0.5s ease-out;
}

/* Stagger animations for better UX */
.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }

/* Hover animations - disabled on touch devices */
@media (hover: hover) {
  .btn:hover {
    animation: none;
  }
  
  .stat-card:hover {
    animation: none;
  }
}

/* Large devices (992px and up) */
@media (min-width: 992px) {
  /* Pending Bills Table - Large Screens */
  #sprayTable .table thead th {
    font-size: var(--text-sm);
    padding: var(--space-3) var(--space-4);
  }
  
  #sprayTable .table tbody td {
    font-size: var(--text-sm);
    padding: var(--space-3) var(--space-4);
  }
  
  #sprayTable .table tbody td:first-child {
    max-width: 250px;
  }
  
  #sprayTable .table tbody td:nth-child(5) {
    max-width: 180px;
  }
  
  #sprayTable .table tbody td:nth-child(6) {
    max-width: 140px;
  }
  
  #sprayTable .table tbody td:last-child {
    max-width: 140px;
  }
  
  #noDataMessage {
    min-height: 300px;
    padding: var(--space-10) var(--space-8);
  }
  
  #noDataMessage i {
    font-size: 4rem;
  }
  
  #noDataMessage p {
    font-size: var(--text-xl);
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
    text-align: center;
    display: block;
  }
}

/* Extra large devices (1200px and up) */
@media (min-width: 1200px) {
  /* Pending Bills Table - Extra Large Screens */
  #sprayTable .table tbody td:first-child {
    max-width: 300px;
  }
  
  #sprayTable .table tbody td:nth-child(5) {
    max-width: 200px;
  }
  
  #sprayTable .table tbody td:nth-child(6) {
    max-width: 160px;
  }
  
  #sprayTable .table tbody td:last-child {
    max-width: 160px;
  }
  
  #noDataMessage {
    min-height: 350px;
  }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
  /* Hide interactive elements */
  .navbar,
  .btn,
  .modal,
  .logout-bottom,
  .notification-bell,
  .chart-controls {
    display: none !important;
  }
  
  /* Optimize for print */
  body {
    background: white !important;
    color: black !important;
    font-size: 12pt;
    line-height: 1.4;
  }
  
  .container {
    max-width: none !important;
    padding: 0 !important;
  }
  
  .dashboard-header {
    background: none !important;
    color: black !important;
    padding: 20pt 0 !important;
  }
  
  .stat-card,
  .chart-container {
    border: 1pt solid #ccc !important;
    box-shadow: none !important;
    page-break-inside: avoid;
    margin-bottom: 20pt;
  }
  
  .table {
    font-size: 10pt;
  }
  
  .table thead th {
    background: #f5f5f5 !important;
    color: black !important;
  }
  
  /* Page breaks */
  .page-break {
    page-break-before: always;
  }
  
  .no-page-break {
    page-break-inside: avoid;
  }
}

/* ==========================================================================
   Accessibility Enhancements
   ========================================================================== */

/* Focus indicators */
*:focus {
  outline: 2px solid var(--primary-500);
  outline-offset: 2px;
}

/* Screen reader only content */
.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;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .btn,
  .form-control,
  .table {
    border-width: 2px;
  }
  
  .stat-card,
  .chart-container {
    border: 2px solid var(--secondary-800);
  }
}

/* Large text support */
@media (min-resolution: 120dpi) {
  body {
    font-size: calc(var(--text-base) * 1.1);
  }
}

/* Motion preferences */
@media (prefers-reduced-motion: reduce) {
  .auth-container,
  .welcome-card,
  .stat-card,
  .chart-container {
    animation: none;
  }
  
  .btn:hover,
  .stat-card:hover {
    transform: none;
    transition: none;
  }
}

/* ==========================================================================
   Mobile-First Responsive Design - Utility Classes
   ========================================================================== */

/* Base Mobile Styles */
.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.ms-auto { margin-left: auto; }
.me-2 { margin-right: var(--space-2); }
.me-3 { margin-right: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mt-4 { margin-top: var(--space-4); }
.pt-4 { padding-top: var(--space-4); }
.text-center { text-align: center; }
.text-end { text-align: right; }
.text-muted { color: var(--secondary-500); }
.text-primary { color: var(--primary-600); }
.text-success { color: var(--success-600); }
.text-warning { color: var(--warning-600); }
.text-info { color: var(--primary-500); }
.border-top { border-top: 1px solid var(--secondary-200); }

/* Icon spacing utilities */
.icon-space-sm i + * { margin-left: var(--space-2); }
.icon-space-md i + * { margin-left: var(--space-3); }
.icon-space-lg i + * { margin-left: var(--space-4); }

/* Global icon-text spacing */
i + span,
i + .text,
i + button,
.fas + *:not(.fas),
.far + *:not(.far),
.fab + *:not(.fab) {
  margin-left: var(--space-2);
}

/* Button icon spacing */
.btn i + span,
.btn i + .btn-text,
.btn .fas + span,
.btn .far + span {
  margin-left: var(--space-3);
}

/* Navbar icon spacing */
.navbar i + span,
.navbar .fas + span {
  margin-left: var(--space-3);
}

/* Mobile spacing utilities */
.p-2 { padding: var(--space-2); }
.p-3 { padding: var(--space-3); }
.p-4 { padding: var(--space-4); }
.m-2 { margin: var(--space-2); }
.m-3 { margin: var(--space-3); }
.m-4 { margin: var(--space-4); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }

/* Mobile text sizes */
.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }

/* Feature lists */
.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-list li {
  padding: var(--space-2) 0;
  display: flex;
  align-items: center;
  color: var(--secondary-600);
  font-size: var(--text-sm);
}

.feature-list i {
  margin-right: var(--space-3);
  width: 16px;
  font-size: var(--text-sm);
  flex-shrink: 0;
}

/* Mobile-specific overrides */
@media (max-width: 575px) {
  /* Hide decorative elements on small screens */
  .d-none-mobile {
    display: none !important;
  }
  
  /* Full width on mobile */
  .w-100-mobile {
    width: 100% !important;
  }
  
  /* Stack elements vertically on mobile */
  .flex-column-mobile {
    flex-direction: column !important;
  }
  
  /* Reduce padding on mobile */
  .p-mobile-2 {
    padding: var(--space-2) !important;
  }
  
  /* Smaller text on mobile */
  .text-mobile-sm {
    font-size: var(--text-sm) !important;
  }
}

/* Small devices (576px and up) */
@media (min-width: 576px) {
  .feature-list li {
    padding: var(--space-3) 0;
    font-size: var(--text-base);
  }
  
  .feature-list i {
    margin-right: var(--space-4);
    width: 18px;
    font-size: var(--text-base);
    flex-shrink: 0;
  }
  
  /* Enhanced icon spacing on larger screens */
  .btn i + span,
  .btn i + .btn-text,
  .btn .fas + span,
  .btn .far + span {
    margin-left: var(--space-4);
  }
  
  .navbar i + span,
  .navbar .fas + span {
    margin-left: var(--space-4);
  }
  
  /* Show elements hidden on mobile */
  .d-sm-block {
    display: block !important;
  }
  
  .d-sm-flex {
    display: flex !important;
  }
}

/* Medium devices (768px and up) */
@media (min-width: 768px) {
  .feature-list li {
    font-size: var(--text-lg);
  }
  
  .feature-list i {
    width: 20px;
    font-size: var(--text-lg);
    margin-right: var(--space-4);
    flex-shrink: 0;
  }
  
  /* Desktop-specific utilities */
  .flex-row-md {
    flex-direction: row !important;
  }
  
  .text-md-left {
    text-align: left !important;
  }
}

/* Touch-friendly interactions */
@media (hover: none) and (pointer: coarse) {
  /* Touch device styles */
  .btn, .form-control, .editable-field {
    min-height: 35px;
  }
  
  /* Remove hover effects on touch devices */
  .btn:hover,
  .editable-field:hover,
  .notification-bell:hover {
    transform: none;
  }
  
  /* Larger tap targets */
  .table tbody td {
    padding: var(--space-3) var(--space-2);
  }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* Crisp borders and shadows */
  .btn, .form-control, .modal-content, .chart-container {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  /* Optional: Add dark mode styles if needed */
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   Animation & Transitions
   ========================================================================== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.auth-container,
.welcome-card,
.stat-card {
  animation: fadeIn 0.6s ease-out;
}

/* ==========================================================================
   Mobile Responsive Styles
   ========================================================================== */
@media (max-width: 767px) {
  /* Mobile Navbar */
  .navbar .container {
    padding: var(--space-3) var(--space-4);
  }
  
  .navbar-brand {
    font-size: var(--text-lg);
  }
  
  .navbar-brand i {
    font-size: var(--text-lg);
  }
  
  .navbar-nav {
    gap: var(--space-3);
  }
  
  .notification-bell {
    padding: var(--space-2);
  }
  
  .notification-badge {
    width: 18px;
    height: 18px;
    font-size: 10px;
  }

  /* Mobile Chart Responsive */
  .chart-header {
    justify-content: space-between;
    align-items: center;
    align-content: center;
    flex-direction: row;
  }
  
  .chart-controls .btn-group {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
  }
  
  .chart-controls .period-btn {
    border-radius: 0 !important;
    border-left: 1px solid var(--primary-600) !important;
  }
  
  .chart-controls .period-btn:first-child {
    border-top-left-radius: var(--radius-lg) !important;
    border-bottom-left-radius: var(--radius-lg) !important;
  }
  
  .chart-controls .period-btn:last-child {
    border-top-right-radius: var(--radius-lg) !important;
    border-bottom-right-radius: var(--radius-lg) !important;
  }
  
  .chart-wrapper {
    height: 300px;
  }
  
  .chart-container {
    padding: var(--space-4);
  }

  /* Mobile Logout Button */
  .logout-bottom {
    bottom: var(--space-4);
    right: var(--space-4);
  }
  
  .logout-bottom .btn-logout {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-xs);
  }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
  .navbar,
  .btn,
  .modal {
    display: none !important;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
}

/* ==========================================================================
   Badge Styles for User Status
   ========================================================================== */
.badge {
  display: inline-block;
  padding: 0.35em 0.65em;
  font-size: 0.75em;
  font-weight: 600;
  line-height: 1;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 0.375rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.bg-success {
  background-color: var(--success-500) !important;
}

.bg-warning {
  background-color: var(--warning-500) !important;
  color: #000 !important;
}

.bg-danger {
  background-color: var(--error-500) !important;
}

.bg-secondary {
  background-color: var(--secondary-500) !important;
}

/* Modal Large Size */
.modal-lg {
  max-width: 800px;
}

/* Ensure modal displays properly */
.modal.show {
  display: block !important;
}

/* Fix modal z-index conflicts */
.modal {
  z-index: 1050;
}

/* Ensure modal content is centered */
.modal-dialog {
  display: flex;
  align-items: center;
  min-height: calc(100% - 1rem);
}

/* Modal backdrop */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
}

/* Close button styling */
.btn-close {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
}

.btn-close:hover {
  color: #ccc;
}

/* Table responsive wrapper */
.table-responsive {
  overflow-y: auto;
  border: 1px solid var(--secondary-200);
  border-radius: 0.375rem;
}

/* Button group spacing */
/* .btn-group .btn {
  margin-right: 0;
} */

/* .btn-group .btn:not(:first-child) {
  border-left-width: 0;
} */

.btn-group .btn:first-child {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.btn-group .btn:last-child {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.btn-group .btn:not(:first-child):not(:last-child) {
  border-radius: 0;
}

/* Users Table Responsive Styling */
#usersTable th {
  background-color: var(--secondary-50);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--secondary-700);
  border-bottom: 2px solid var(--secondary-200);
}

#usersTable tbody tr:hover {
  background-color: var(--primary-50);
}

/* Filter Buttons Styling */
.users-filter-btn.active {
  color: #fff !important;
  border-color: transparent !important;
}

.users-filter-btn.active[data-filter="pending"] {
  background-color: var(--warning-500) !important;
  color: #000 !important;
}

.users-filter-btn.active[data-filter="approved"] {
  background-color: var(--success-500) !important;
}

.users-filter-btn.active[data-filter="all"] {
  background-color: var(--primary-500) !important;
}

/* Action Buttons in Table */
.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  border-radius: 0.25rem;
  min-width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.25rem;
}

.btn-sm:last-child {
  margin-right: 0;
}

/* Action buttons container */
td .btn-sm {
  white-space: nowrap;
}

/* Responsive action buttons */
@media (max-width: 768px) {
  .btn-sm {
    min-width: 28px;
    height: 28px;
    padding: 0.2rem 0.4rem;
    font-size: 0.75rem;
    margin-right: 0.125rem;
  }
  
  .btn-sm .fas {
    font-size: 0.7rem;
  }
}

.btn-success {
  background-color: var(--success-500);
  border-color: var(--success-500);
  color: white;
}

.btn-success:hover {
  background-color: var(--success-600);
  border-color: var(--success-600);
}

.btn-danger {
  background-color: var(--error-500);
  border-color: var(--error-500);
  color: white;
}

.btn-danger:hover {
  background-color: var(--error-600);
  border-color: var(--error-600);
}

.btn-warning {
  background-color: var(--warning-500);
  border-color: var(--warning-500);
  color: #000;
}

.btn-warning:hover {
  background-color: var(--warning-600);
  border-color: var(--warning-600);
  color: #000;
}

@media (max-width: 768px) {
  .modal-lg {
    max-width: 95%;
    margin: 0.5rem auto;
  }
  
  .modal-dialog {
    margin: 1rem;
  }
  
  #usersTable {
    font-size: 0.8rem;
  }
  
  #usersTable th,
  #usersTable td {
    padding: 0.5rem 0.25rem;
  }
  
  /* Actions column should be wider on mobile */
  #usersTable th:last-child,
  #usersTable td:last-child {
    min-width: 120px;
    text-align: center;
  }
  
  .btn-sm {
    min-width: 28px;
    height: 28px;
    padding: 0.2rem 0.4rem;
    font-size: 0.75rem;
  }
  
  #userSearchInput {
    font-size: 0.9rem;
  }
  
  .btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
  }
  
  .btn-group .btn {
    flex: 1;
    min-width: auto;
  }
  
  .modal-body {
    padding: 1rem;
  }
  
  .modal-header {
    padding: 1rem;
  }
}

/* Search Box Styling */
#userSearchInput {
  border-radius: 0.375rem 0 0 0.375rem;
  border-right: 0;
}

#userSearchInput:focus {
  box-shadow: 0 0 0 0.2rem rgba(2, 132, 199, 0.25);
  border-color: var(--primary-500);
}

#clearSearchBtn {
  border-radius: 0 0.375rem 0.375rem 0;
  border-left: 0;
  padding: 0.5rem 0.75rem;
}

#clearSearchBtn:hover {
  background-color: var(--secondary-100);
  border-color: var(--secondary-300);
}

.input-group-text {
  background-color: var(--secondary-50);
  border-color: var(--secondary-300);
  color: var(--secondary-600);
}

/* Additional form controls styling */
.form-control {
  border: 1px solid var(--secondary-300);
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--secondary-900);
  background-color: #fff;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
  border-color: var(--primary-500);
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(2, 132, 199, 0.25);
}

/* Spinner styling */
.spinner-border {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  vertical-align: text-bottom;
  border: 0.25em solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spinner-border 0.75s linear infinite;
}

.spinner-border.text-primary {
  color: var(--primary-500) !important;
}

@keyframes spinner-border {
  to {
    transform: rotate(360deg);
  }
}

/* Visually hidden class */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Input group styling */
.input-group {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  width: 100%;
}

.input-group > .form-control,
.input-group > .form-control:not(:first-child) {
  flex: 1 1 auto;
  width: 1%;
  min-width: 0;
}

.input-group > .form-control:not(:last-child) {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.input-group > .form-control:not(:first-child) {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.input-group-text {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
  white-space: nowrap;
  border: 1px solid var(--secondary-300);
}

.input-group > .input-group-text {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

/* Button outline styles */
.btn-outline-warning:hover {
  color: #000;
  background-color: var(--warning-500);
  border-color: var(--warning-500);
}

.btn-outline-success:hover {
  color: #fff;
  background-color: var(--success-500);
  border-color: var(--success-500);
}

.btn-outline-info:hover {
  color: #fff;
  background-color: var(--primary-500);
  border-color: var(--primary-500);
}

.btn-outline-secondary:hover {
  color: #fff;
  background-color: var(--secondary-500);
  border-color: var(--secondary-500);
}

.btn-outline-danger {
  color: var(--error-500);
  border-color: var(--error-500);
  background-color: transparent;
}

.btn-outline-danger:hover {
  color: #fff;
  background-color: var(--error-500);
  border-color: var(--error-500);
}

/* Mobile button stacking for very small screens */
@media (max-width: 480px) {
  .btn-group .btn {
    display: block;
    width: 100%;
    margin-bottom: 2px;
  }
  
}

/* ==========================================================================
   Professional Profile Page Styles
   ========================================================================== */

/* Navigation Profile Link */
.profile-link {
  color: white;
  padding: var(--space-2);
  border-radius: var(--radius-xl);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 48px;
  min-width: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  margin-left: var(--space-3);
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.profile-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-link::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.profile-link:hover::before {
  left: 100%;
}

.profile-link:hover::after {
  opacity: 1;
}

.profile-link:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #f0f9ff;
  text-decoration: none;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.25),
    0 4px 16px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.25);
}

.profile-link:active {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.2),
    0 2px 8px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.profile-link i {
  font-size: 1.5rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
}

.profile-link:hover i {
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
  transform: scale(1.1);
}

/* Professional User Avatar Enhancement */
.profile-link.user-avatar {
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
  border: 2px solid rgba(255, 255, 255, 0.2);
  width: 44px;
  height: 44px;
  position: relative;
}

.profile-link.user-avatar::before {
  border-radius: 50%;
}

.profile-link.user-avatar::after {
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
}

.profile-link.user-avatar:hover {
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px) scale(1.08);
}

.profile-link.user-avatar i {
  font-size: 1.8rem;
  background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.profile-link.user-avatar:hover i {
  background: linear-gradient(135deg, #ffffff 0%, #e0f2fe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

/* Profile Card Container */
.profile-card {
  background: white;
  border-radius: 24px;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.08),
    0 8px 25px rgba(0, 0, 0, 0.06),
    0 3px 10px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  margin-bottom: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(20px);
  position: relative;
}

.profile-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
}

/* Profile Header */
.profile-header {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 25%, #0369a1 50%, #075985 75%, #0c4a6e 100%);
  color: white;
  padding: 3rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.profile-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

.profile-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
}

/* Profile Avatar */
.profile-avatar {
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 2;
}

.profile-image {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.9);
  box-shadow: 
    0 16px 40px rgba(0, 0, 0, 0.2),
    0 8px 20px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
}

.profile-image:hover {
  transform: scale(1.05);
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.25),
    0 12px 30px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* Profile Info */
.profile-name {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  letter-spacing: -0.02em;
  position: relative;
  z-index: 2;
}

.profile-role {
  font-size: 1rem;
  opacity: 0.95;
  margin: 0;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 2;
}

/* Profile Details */
.profile-details {
  padding: 2rem;
  background: linear-gradient(to bottom, #fafafa 0%, #ffffff 100%);
}

.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: all 0.2s ease;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  position: relative;
}

.detail-item:hover {
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.02) 0%, rgba(14, 165, 233, 0.05) 100%);
  transform: translateX(4px);
  padding-left: 1rem;
  padding-right: 1rem;
}

.detail-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.detail-label {
  font-weight: 600;
  color: #374151;
  display: flex;
  align-items: center;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

.detail-label i {
  margin-right: 0.75rem;
  width: 20px;
  font-size: 1.1rem;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.detail-value {
  color: #1f2937;
  font-weight: 600;
  font-size: 0.95rem;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Badge Styling */
.badge {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: none;
  position: relative;
  overflow: hidden;
}

.bg-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.bg-success::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.bg-success:hover::before {
  left: 100%;
}

/* Profile Actions */
.profile-actions {
  padding: 0 2rem 2rem;
  text-align: center;
  background: white;
}

.profile-actions .btn {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  border: none;
  padding: 0.875rem 2rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: none;
  letter-spacing: -0.01em;
  box-shadow: 
    0 8px 20px rgba(14, 165, 233, 0.3),
    0 3px 8px rgba(14, 165, 233, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.profile-actions .btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.profile-actions .btn:hover::before {
  left: 100%;
}

.profile-actions .btn:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 12px 30px rgba(14, 165, 233, 0.4),
    0 6px 15px rgba(14, 165, 233, 0.3);
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
}

.profile-actions .btn:active {
  transform: translateY(0);
  box-shadow: 
    0 4px 12px rgba(14, 165, 233, 0.3),
    0 2px 6px rgba(14, 165, 233, 0.2);
}

/* Enhanced Modal Styling */
.modal {
  backdrop-filter: blur(12px);
  background-color: rgba(0, 0, 0, 0.6);
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 1055 !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 1rem !important;
}

.modal.show {
  display: flex !important;
}

.modal-dialog {
  position: relative !important;
  width: auto !important;
  max-width: 98% !important;
  /* margin: 0 !important; */
  pointer-events: none !important;
}

.modal-content {
  border-radius: 20px;
  border: none;
  box-shadow: 
    0 25px 80px rgba(0, 0, 0, 0.15),
    0 15px 40px rgba(0, 0, 0, 0.1),
    0 8px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  background: white;
  position: relative !important;
  pointer-events: auto !important;
  width: 100% !important;
  max-height: calc(100vh - 2rem) !important;
  overflow-y: auto !important;
}

.modal-header {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  color: white;
  padding: 1.5rem 2rem;
  border-bottom: none;
  position: relative;
}

.modal-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
}

.modal-title {
  font-weight: 700;
  font-size: 1.25rem;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.modal-body {
  padding: 2rem;
  background: linear-gradient(to bottom, #fafafa 0%, #ffffff 100%);
}

.input-group {
  position: relative;
}

.input-group-text {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 2px solid #e2e8f0;
  border-right: none;
  color: #64748b;
  font-weight: 600;
  padding: 0.875rem 1rem;
  border-radius: 12px 0 0 12px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.form-control {
  border: 2px solid #e2e8f0;
  border-left: none;
  padding: 0.875rem 1rem;
  border-radius: 0 12px 12px 0;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: white;
}

.form-control:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
  transform: translateY(-1px);
}

.input-group:focus-within .input-group-text {
  border-color: #0ea5e9;
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: #0369a1;
}

/* Button Enhancements */
.btn-secondary {
  background: linear-gradient(135deg, #64748b 0%, #475569 100%);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(100, 116, 139, 0.3);
}

.btn-secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(100, 116, 139, 0.4);
  background: linear-gradient(135deg, #475569 0%, #334155 100%);
}

.btn-primary {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(14, 165, 233, 0.4);
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
}

/* Mobile Responsive Enhancements */
@media (max-width: 768px) {
  .profile-header {
    padding: 2rem 1.5rem;
  }
  
  .profile-image {
    width: 120px;
    height: 120px;
  }
  
  .profile-name {
    font-size: 1.75rem;
  }
  
  .profile-details {
    padding: 1.5rem;
  }
  
  .detail-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 0;
  }
  
  .detail-item:hover {
    transform: none;
    padding-left: 0;
    padding-right: 0;
  }
  
  .detail-value {
    width: 100%;
    text-align: center;
  }
  
  .profile-actions {
    padding: 0 1.5rem 1.5rem;
  }
  
  .modal-body {
    padding: 1.5rem;
  }
  
  .modal-header {
    padding: 1.25rem 1.5rem;
  }
  
  .modal {
    padding: 0.5rem !important;
  }
}

/* Modal Fix - Override Bootstrap defaults */
.modal-backdrop {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  z-index: 1040 !important;
  width: 100vw !important;
  height: 100vh !important;
  background-color: #000 !important;
}

.modal-backdrop.show {
  opacity: 0.5 !important;
}

/* Prevent body scroll when modal is open */
body.modal-open {
  overflow: hidden !important;
  padding-right: 0 !important;
}

/* Close button styling */
.btn-close {
  background: none !important;
  border: none !important;
  font-size: 1.5rem !important;
  color: white !important;
  opacity: 0.8 !important;
  transition: opacity 0.3s ease !important;
}

.btn-close:hover {
  opacity: 1 !important;
  transform: scale(1.1) !important;
}

/* Advanced Animation Classes */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.profile-card {
  animation: slideInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.detail-item {
  animation: fadeInScale 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.detail-item:nth-child(1) { animation-delay: 0.1s; }
.detail-item:nth-child(2) { animation-delay: 0.2s; }
.detail-item:nth-child(3) { animation-delay: 0.3s; }
.detail-item:nth-child(4) { animation-delay: 0.4s; }

/* ==========================================================================
   Profile Page Responsive Styles - Mobile First
   ========================================================================== */

/* Mobile devices (up to 575px) */
@media (max-width: 575px) {
  /* Mobile Profile Link */
  .profile-link {
    min-height: 40px;
    min-width: 40px;
    padding: var(--space-1);
    margin-left: var(--space-2);
  }
  
  .profile-link.user-avatar {
    width: 38px;
    height: 38px;
    border-width: 1.5px;
  }
  
  .profile-link i {
    font-size: 1.3rem;
  }
  
  .profile-link.user-avatar i {
    font-size: 1.5rem;
  }
  
  .profile-card {
    margin: var(--space-3) var(--space-2);
    border-radius: 16px;
  }
  
  .profile-header {
    padding: var(--space-6) var(--space-3);
  }
  
  .profile-image {
    width: 100px;
    height: 100px;
    border-width: 3px;
  }
  
  .profile-name {
    font-size: var(--text-xl);
    line-height: 1.2;
  }
  
  .profile-role {
    font-size: var(--text-sm);
  }
  
  .profile-details {
    padding: var(--space-4) var(--space-3);
  }
  
  .detail-item {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
    padding: var(--space-3) 0;
  }
  
  .detail-label {
    font-size: var(--text-sm);
    width: 100%;
  }
  
  .detail-value {
    width: 100%;
    font-size: var(--text-sm);
    padding: var(--space-2) var(--space-3);
  }
  
  .profile-actions {
    padding: 0 var(--space-3) var(--space-4);
  }
  
  .profile-actions .btn {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-sm);
  }
  
  .modal-dialog {
    max-width: 95% !important;
    margin: var(--space-2) auto !important;
  }
  
  .modal-header {
    padding: var(--space-4) var(--space-3);
  }
  
  .modal-title {
    font-size: var(--text-lg);
  }
  
  .modal-body {
    padding: var(--space-4) var(--space-3);
  }
  
  .input-group {
    margin-bottom: var(--space-3);
  }
}

/* Small devices (576px and up) */
@media (min-width: 576px) {
  /* Small Device Profile Link */
  .profile-link {
    min-height: 44px;
    min-width: 44px;
    padding: var(--space-2);
    margin-left: var(--space-3);
  }
  
  .profile-link.user-avatar {
    width: 42px;
    height: 42px;
    border-width: 2px;
  }
  
  .profile-link i {
    font-size: 1.4rem;
  }
  
  .profile-link.user-avatar i {
    font-size: 1.7rem;
  }
  
  .profile-card {
    margin: var(--space-4) auto;
    max-width: 540px;
    border-radius: 20px;
  }
  
  .profile-header {
    padding: var(--space-8) var(--space-4);
  }
  
  .profile-image {
    width: 120px;
    height: 120px;
  }
  
  .profile-name {
    font-size: var(--text-2xl);
  }
  
  .profile-role {
    font-size: var(--text-base);
  }
  
  .profile-details {
    padding: var(--space-6) var(--space-4);
  }
  
  .detail-item {
    padding: var(--space-4) 0;
  }
  
  .detail-item:hover {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }
  
  .profile-actions {
    padding: 0 var(--space-4) var(--space-6);
  }
  
  .profile-actions .btn {
    min-width: 200px;
  }
  
  .modal-dialog {
    max-width: 500px !important;
  }
}

/* Medium devices (768px and up) */
@media (min-width: 768px) {
  /* Medium Device Profile Link */
  .profile-link {
    min-height: 48px;
    min-width: 48px;
    padding: var(--space-2);
    margin-left: var(--space-4);
  }
  
  .profile-link.user-avatar {
    width: 46px;
    height: 46px;
    border-width: 2px;
  }
  
  .profile-link i {
    font-size: 1.5rem;
  }
  
  .profile-link.user-avatar i {
    font-size: 1.8rem;
  }
  
  .profile-card {
    max-width: 600px;
    border-radius: 24px;
  }
  
  .profile-header {
    padding: var(--space-10) var(--space-6);
  }
  
  .profile-image {
    width: 140px;
    height: 140px;
  }
  
  .profile-name {
    font-size: var(--text-3xl);
    letter-spacing: -0.02em;
  }
  
  .profile-role {
    font-size: var(--text-lg);
  }
  
  .profile-details {
    padding: var(--space-8) var(--space-6);
  }
  
  .detail-item {
    padding: var(--space-5) 0;
    border-radius: 12px;
  }
  
  .detail-item:hover {
    padding-left: var(--space-6);
    padding-right: var(--space-6);
    transform: translateX(8px);
  }
  
  .detail-label {
    font-size: var(--text-base);
  }
  
  .detail-value {
    font-size: var(--text-base);
    padding: var(--space-3) var(--space-4);
    border-radius: 10px;
  }
  
  .profile-actions {
    padding: 0 var(--space-6) var(--space-8);
  }
  
  .profile-actions .btn {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-base);
    border-radius: 14px;
  }
  
  .modal-dialog {
    max-width: 600px !important;
  }
  
  .modal-header {
    padding: var(--space-6) var(--space-8);
  }
  
  .modal-body {
    padding: var(--space-8) var(--space-8);
  }
}

/* Large devices (992px and up) */
@media (min-width: 992px) {
  /* Large Device Profile Link */
  .profile-link {
    min-height: 52px;
    min-width: 52px;
    padding: var(--space-3);
    margin-left: var(--space-4);
  }
  
  .profile-link.user-avatar {
    width: 50px;
    height: 50px;
    border-width: 2.5px;
  }
  
  .profile-link i {
    font-size: 1.6rem;
  }
  
  .profile-link.user-avatar i {
    font-size: 1.9rem;
  }
  
  .profile-card {
    max-width: 700px;
    border-radius: 28px;
  }
  
  .profile-header {
    padding: var(--space-12) var(--space-8);
  }
  
  .profile-image {
    width: 160px;
    height: 160px;
    border-width: 5px;
  }
  
  .profile-name {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-3);
  }
  
  .profile-role {
    font-size: var(--text-xl);
  }
  
  .profile-details {
    padding: var(--space-10) var(--space-8);
  }
  
  .detail-item {
    padding: var(--space-6) 0;
    border-radius: 16px;
  }
  
  .detail-item:hover {
    padding-left: var(--space-8);
    padding-right: var(--space-8);
    transform: translateX(12px);
  }
  
  .detail-label {
    font-size: var(--text-lg);
  }
  
  .detail-label i {
    margin-right: var(--space-4);
    width: 24px;
    font-size: 1.3rem;
  }
  
  .detail-value {
    font-size: var(--text-lg);
    padding: var(--space-4) var(--space-6);
    border-radius: 12px;
  }
  
  .profile-actions {
    padding: 0 var(--space-8) var(--space-10);
  }
  
  .profile-actions .btn {
    padding: var(--space-5) var(--space-10);
    font-size: var(--text-lg);
    border-radius: 16px;
    min-width: 240px;
  }
  
  .modal-dialog {
    max-width: 700px !important;
  }
  
  .modal-header {
    padding: var(--space-8) var(--space-10);
  }
  
  .modal-title {
    font-size: var(--text-2xl);
  }
  
  .modal-body {
    padding: var(--space-10) var(--space-10);
  }
}

/* Extra large devices (1200px and up) */
@media (min-width: 1200px) {
  /* Extra Large Device Profile Link */
  .profile-link {
    min-height: 56px;
    min-width: 56px;
    padding: var(--space-3);
    margin-left: var(--space-5);
  }
  
  .profile-link.user-avatar {
    width: 54px;
    height: 54px;
    border-width: 3px;
  }
  
  .profile-link i {
    font-size: 1.8rem;
  }
  
  .profile-link.user-avatar i {
    font-size: 2.1rem;
  }
  
  .profile-card {
    max-width: 800px;
    border-radius: 32px;
  }
  
  .profile-header {
    padding: var(--space-16) var(--space-10);
  }
  
  .profile-image {
    width: 180px;
    height: 180px;
    border-width: 6px;
  }
  
  .profile-name {
    font-size: 3rem;
    margin-bottom: var(--space-4);
  }
  
  .profile-role {
    font-size: var(--text-2xl);
  }
  
  .profile-details {
    padding: var(--space-12) var(--space-10);
  }
  
  .detail-item {
    padding: var(--space-8) 0;
    border-radius: 20px;
  }
  
  .detail-item:hover {
    padding-left: var(--space-10);
    padding-right: var(--space-10);
    transform: translateX(16px);
  }
  
  .detail-label {
    font-size: var(--text-xl);
  }
  
  .detail-label i {
    margin-right: var(--space-5);
    width: 28px;
    font-size: 1.5rem;
  }
  
  .detail-value {
    font-size: var(--text-xl);
    padding: var(--space-5) var(--space-8);
    border-radius: 16px;
  }
  
  .profile-actions {
    padding: 0 var(--space-10) var(--space-12);
  }
  
  .profile-actions .btn {
    padding: var(--space-6) var(--space-12);
    font-size: var(--text-xl);
    border-radius: 20px;
    min-width: 280px;
  }
  
  .modal-dialog {
    max-width: 800px !important;
  }
  
  .modal-header {
    padding: var(--space-10) var(--space-12);
  }
  
  .modal-title {
    font-size: var(--text-3xl);
  }
  
  .modal-body {
    padding: var(--space-12) var(--space-12);
  }
}

/* ==========================================================================
   Spray History Modal & Fixed Bottom Button
   ========================================================================== */

/* Fixed Bottom Button */
.fixed-bottom-btn {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  animation: slideInUp 0.6s ease-out;
}

.fixed-bottom-btn .btn {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  border: none;
  border-radius: 50px;
  padding: 1rem 2rem;
  font-weight: 600;
  font-size: 1rem;
  color: white;
  box-shadow: 
    0 8px 25px rgba(14, 165, 233, 0.4),
    0 4px 12px rgba(14, 165, 233, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  min-width: 200px;
}

.fixed-bottom-btn .btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.fixed-bottom-btn .btn:hover::before {
  left: 100%;
}

.fixed-bottom-btn .btn:hover {
  transform: translateY(-3px);
  box-shadow: 
    0 12px 35px rgba(14, 165, 233, 0.5),
    0 6px 18px rgba(14, 165, 233, 0.4);
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
}

.fixed-bottom-btn .btn:active {
  transform: translateY(-1px);
}

/* Year Summary Cards */
.summary-card {
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(14, 165, 233, 0.15);
  border-color: #0ea5e9;
}

.summary-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.summary-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0369a1;
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Monthly Tables Container */
.month-table-container {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.month-table-container:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  border-color: #0ea5e9;
}

.month-header {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #0ea5e9;
}

.month-header h5 {
  color: #0369a1;
  font-weight: 700;
  margin: 0;
  font-size: 1.125rem;
}

.month-summary {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.month-summary .badge {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Monthly Tables */
.month-table-container .table {
  margin-bottom: 0;
  font-size: 0.875rem;
}

.month-table-container .table thead th {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  color: #374151;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.75rem 1rem;
  border: none;
}

.month-table-container .table tbody td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.month-table-container .table tbody tr:hover {
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.02) 0%, rgba(14, 165, 233, 0.05) 100%);
}

.month-table-container .table tfoot th {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: #0369a1;
  font-weight: 700;
  padding: 1rem;
  border: none;
  font-size: 0.875rem;
}

.month-table-container .table-sm td,
.month-table-container .table-sm th {
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
}

/* Status badges in history */
.month-table-container .badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.3rem 0.6rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* Extra Large Modal */
.modal-xl {
  max-width: 1200px;
}

/* History Modal Body */
#sprayHistoryModal .modal-body {
  max-height: 70vh;
  overflow-y: auto;
  padding: 1.5rem 2rem;
}

#sprayHistoryModal .modal-content {
  max-height: 90vh;
}

/* Year Select Styling */
#yearSelect {
  border: 2px solid #e2e8f0;
  padding: 0.75rem 1rem;
  font-weight: 600;
  color: #374151;
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  transition: all 0.3s ease;
}

#yearSelect:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
  outline: none;
}

/* Mobile Responsive for Spray History */
@media (max-width: 768px) {
  .fixed-bottom-btn {
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    transform: none;
  }
  
  .fixed-bottom-btn .btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 0.9rem;
    min-width: auto;
  }
  
  .modal-xl {
    max-width: 95%;
  }
  
  #sprayHistoryModal .modal-body {
    padding: 1rem;
    max-height: 75vh;
  }
  
  .month-header {
    padding: 0.75rem 1rem;
    flex-wrap: nowrap;
  }
  
  .month-header h5 {
    font-size: 0.9rem;
    flex-shrink: 0;
  }
  
  .month-summary {
    gap: 0.375rem;
    flex-shrink: 0;
  }
  
  .month-summary .badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
  }
  
  .summary-card {
    padding: 0.75rem;
  }
  
  .summary-title {
    font-size: 0.7rem;
    margin-bottom: 0.25rem;
  }
  
  .summary-value {
    font-size: 1.25rem;
  }
  
  .month-table-container .table-sm td,
  .month-table-container .table-sm th {
    padding: 0.375rem 0.5rem;
    font-size: 0.75rem;
  }
  
  .month-table-container .badge {
    font-size: 0.65rem;
    padding: 0.2rem 0.4rem;
  }
  
  /* Stack year selection and summary cards on mobile */
  .row.align-items-center {
    flex-direction: column;
    align-items: stretch !important;
    gap: 1rem;
  }
  
  .row.align-items-center .col-md-6 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* Small tablets */
@media (max-width: 992px) and (min-width: 769px) {
  .modal-xl {
    max-width: 90%;
  }
  
  .month-header {
    padding: 1.25rem;
  }
  
  .month-table-container .table tbody td,
  .month-table-container .table thead th {
    padding: 0.625rem 0.875rem;
  }
}

/* Animation for month tables */
.month-table-container {
  animation: fadeInUp 0.5s ease-out;
}

.month-table-container:nth-child(1) { animation-delay: 0.1s; }
.month-table-container:nth-child(2) { animation-delay: 0.2s; }
.month-table-container:nth-child(3) { animation-delay: 0.3s; }
.month-table-container:nth-child(4) { animation-delay: 0.4s; }

/* No history message styling */
#noHistoryMessage {
  padding: 3rem 2rem;
  text-align: center;
}

#noHistoryMessage i {
  color: #94a3b8;
  margin-bottom: 1rem;
}

#noHistoryMessage p {
  color: #64748b;
  font-size: 1.1rem;
  margin: 0;
}

/* ==========================================================================
   Success Toast Notification
   ========================================================================== */
.success-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
  transform: translateX(400px);
  opacity: 0;
  transition: all 0.3s ease-in-out;
  max-width: 350px;
  min-width: 300px;
}

.success-toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast-content {
  padding: var(--space-4) var(--space-6);
  font-weight: 500;
  font-size: var(--text-sm);
  display: flex;
  align-items: center;
}

.toast-content i {
  font-size: var(--text-lg);
  margin-right: var(--space-3);
}

/* ==========================================================================
   Subscription Cards & Payment Styles
   ========================================================================== */
.subscription-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 2px solid transparent;
  transition: all var(--transition-normal);
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.subscription-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-color: var(--primary-200);
}

.subscription-card.recommended {
  border-color: var(--primary-500);
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.recommended-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
  color: white;
  padding: 0.5rem 1.5rem;
  border-radius: 20px;
  font-size: var(--text-sm);
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.package-header {
  text-align: center;
  margin-bottom: 2rem;
}

.package-header h4 {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--secondary-900);
  margin-bottom: 1rem;
}

.package-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.package-price .currency {
  font-size: var(--text-lg);
  color: var(--secondary-600);
  margin-right: 0.25rem;
}

.package-price .amount {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary-600);
  line-height: 1;
}

.package-price .period {
  font-size: var(--text-base);
  color: var(--secondary-500);
  margin-left: 0.25rem;
}

.package-per-month {
  font-size: var(--text-sm);
  color: var(--secondary-500);
  text-align: center;
}

.package-features {
  flex-grow: 1;
  margin-bottom: 2rem;
}

.package-features ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.package-features li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--secondary-100);
  display: flex;
  align-items: center;
  font-size: var(--text-sm);
}

.package-features li:last-child {
  border-bottom: none;
}

.package-features i {
  margin-right: 0.75rem;
  font-size: var(--text-base);
}

.package-action {
  margin-top: auto;
}

.feature-item {
  text-align: center;
  padding: 1.5rem 1rem;
}

.feature-item i {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}

.feature-item h5 {
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--secondary-900);
}

.feature-item p {
  font-size: var(--text-sm);
  color: var(--secondary-600);
  margin: 0;
  line-height: 1.5;
}

/* Alert styles for subscription status */
.alert {
  padding: 1rem 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  font-size: var(--text-sm);
}

.alert-success {
  background-color: #d1fae5;
  border-color: #10b981;
  color: #047857;
}

.alert-warning {
  background-color: #fef3c7;
  border-color: #f59e0b;
  color: #92400e;
}

/* Responsive adjustments for subscription cards */
@media (max-width: 768px) {
  .subscription-card {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .package-price .amount {
    font-size: 2rem;
  }
  
  .feature-item {
    padding: 1rem 0.5rem;
  }
  
  .feature-item i {
    font-size: 2rem;
  }
}

/* ==========================================================================
   Professional Approval Page Styles - All Screen Sizes
   ========================================================================== */

/* Approval Page Navigation */
.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.nav-logo {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
}

.nav-title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.nav-user {
  color: white;
  font-size: var(--text-sm);
  font-weight: 500;
  opacity: 0.9;
}

.nav-logout {
  color: white;
  padding: var(--space-2);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
}

.nav-logout:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  text-decoration: none;
  transform: translateY(-1px);
}

/* Approval Container */
.approval-container {
  max-width: 1200px;
  margin: var(--space-20) auto var(--space-10);
  padding: var(--space-8);
  background: white;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-2xl);
  position: relative;
}

.approval-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
}

.approval-container h1 {
  text-align: center;
  color: var(--secondary-800);
  margin-bottom: var(--space-8);
  font-size: var(--text-3xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  position: relative;
}

.approval-container h1 i {
  margin-right: var(--space-3);
  color: var(--primary-600);
  filter: drop-shadow(0 2px 4px rgba(14, 165, 233, 0.2));
}

/* Approval Message */
.approval-message {
  text-align: center;
  margin-bottom: var(--space-10);
  padding: var(--space-6);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.08) 0%, rgba(14, 165, 233, 0.03) 100%);
  border-radius: var(--radius-xl);
  border-left: 4px solid var(--primary-500);
  position: relative;
  overflow: hidden;
}

.approval-message::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 50%, rgba(14, 165, 233, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.approval-message p {
  color: var(--secondary-700);
  font-size: var(--text-lg);
  font-weight: 500;
  margin: 0;
  line-height: 1.6;
  position: relative;
  z-index: 2;
}

/* Subscription Packages Grid */
.subscription-packages {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-8);
  margin-bottom: var(--space-10);
}

/* Package Card */
.package-card {
  background: white;
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  box-shadow: 
    0 10px 40px rgba(0, 0, 0, 0.06),
    0 4px 20px rgba(0, 0, 0, 0.04),
    0 2px 10px rgba(0, 0, 0, 0.02);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--secondary-100);
}

.package-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
}

.package-card:hover {
  transform: translateY(-8px);
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.1),
    0 8px 30px rgba(0, 0, 0, 0.08),
    0 4px 15px rgba(0, 0, 0, 0.06);
  border-color: var(--primary-200);
}

/* Popular Package Styling */
.package-card:nth-child(2) {
  border: 2px solid var(--primary-500);
  position: relative;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.02) 0%, white 100%);
}

.package-card:nth-child(2)::after {
  content: 'Most Popular';
  position: absolute;
  top: -2px;
  right: var(--space-4);
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
  color: white;
  padding: var(--space-2) var(--space-4);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

/* Package Header */
.package-header {
  text-align: center;
  margin-bottom: var(--space-8);
  position: relative;
}

.package-header h3 {
  color: var(--secondary-800);
  margin-bottom: var(--space-4);
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.package-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: var(--space-1);
}

.currency {
  font-size: var(--text-xl);
  color: var(--secondary-500);
  font-weight: 500;
}

.amount {
  font-size: 3rem;
  font-weight: 900;
  color: var(--primary-600);
  letter-spacing: -0.02em;
  text-shadow: 0 2px 4px rgba(14, 165, 233, 0.1);
}

/* Package Features */
.package-features {
  margin-bottom: var(--space-8);
}

.package-features ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.package-features li {
  padding: var(--space-3) 0;
  color: var(--secondary-700);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-base);
  font-weight: 500;
  border-bottom: 1px solid var(--secondary-100);
  transition: all var(--transition-fast);
}

.package-features li:last-child {
  border-bottom: none;
}

.package-features li:hover {
  background: var(--secondary-25);
  margin: 0 calc(-1 * var(--space-4));
  padding-left: var(--space-4);
  padding-right: var(--space-4);
  border-radius: var(--radius-lg);
}

.package-features .fas {
  color: var(--success-600);
  width: 16px;
  font-size: var(--text-base);
  filter: drop-shadow(0 1px 2px rgba(34, 197, 94, 0.2));
}

/* Package Form & Button */
.package-form {
  position: relative;
}

.btn-package {
  width: 100%;
  padding: var(--space-4) var(--space-6);
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
  color: white;
  border: none;
  border-radius: var(--radius-xl);
  font-size: var(--text-lg);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  position: relative;
  overflow: hidden;
  box-shadow: 
    0 8px 20px rgba(14, 165, 233, 0.3),
    0 3px 8px rgba(14, 165, 233, 0.2);
}

.btn-package::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn-package:hover::before {
  left: 100%;
}

.btn-package:hover {
  background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-800) 100%);
  transform: translateY(-2px);
  box-shadow: 
    0 12px 30px rgba(14, 165, 233, 0.4),
    0 6px 15px rgba(14, 165, 233, 0.3);
}

.btn-package:active {
  transform: translateY(0);
  box-shadow: 
    0 4px 12px rgba(14, 165, 233, 0.3),
    0 2px 6px rgba(14, 165, 233, 0.2);
}

.btn-package:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
}

/* Help Section */
.help-section {
  text-align: center;
  padding: var(--space-6);
  color: var(--secondary-600);
  background: var(--secondary-25);
  border-radius: var(--radius-xl);
  border: 1px solid var(--secondary-100);
}

.help-section p {
  margin-bottom: var(--space-6);
  font-size: var(--text-base);
  font-weight: 500;
}

.help-section i {
  margin-right: var(--space-2);
  color: var(--primary-500);
}

/* Alert Styles */
.alert {
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-xl);
  border: 1px solid transparent;
  margin-bottom: var(--space-6);
  text-align: center;
  font-size: var(--text-base);
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}

.alert.success {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(34, 197, 94, 0.05) 100%);
  color: var(--success-700);
  border-color: var(--success-200);
}

.alert.error {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%);
  color: var(--error-700);
  border-color: var(--error-200);
}

/* ==========================================================================
   Approval Page Responsive Styles - Mobile First
   ========================================================================== */

/* Mobile devices (up to 575px) */
@media (max-width: 575px) {
  .nav-container {
    padding: 0 var(--space-3);
  }
  
  .nav-title {
    font-size: var(--text-lg);
  }
  
  .nav-user {
    display: none;
  }
  
  .nav-logo {
    width: 32px;
    height: 32px;
  }
  
  .approval-container {
    margin: var(--space-16) var(--space-3) var(--space-6);
    padding: var(--space-4);
  }
  
  .approval-container h1 {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-6);
  }
  
  .approval-message {
    padding: var(--space-4);
    margin-bottom: var(--space-6);
  }
  
  .approval-message p {
    font-size: var(--text-base);
  }
  
  .subscription-packages {
    grid-template-columns: 1fr;
    gap: var(--space-6);
    margin-bottom: var(--space-6);
  }
  
  .package-card {
    padding: var(--space-4);
  }
  
  .package-header h3 {
    font-size: var(--text-xl);
  }
  
  .amount {
    font-size: 2.5rem;
  }
  
  .package-features li {
    font-size: var(--text-sm);
    padding: var(--space-2) 0;
  }
  
  .btn-package {
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-base);
  }
  
  .help-section {
    padding: var(--space-4);
  }
}

/* Small devices (576px and up) */
@media (min-width: 576px) {
  .approval-container {
    margin: var(--space-20) var(--space-4) var(--space-8);
    padding: var(--space-6);
  }
  
  .subscription-packages {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  
  .package-card {
    padding: var(--space-6);
  }
}

/* Medium devices (768px and up) */
@media (min-width: 768px) {
  .nav-container {
    padding: 0 var(--space-6);
  }
  
  .nav-title {
    font-size: var(--text-2xl);
  }
  
  .nav-user {
    display: block;
    font-size: var(--text-base);
  }
  
  .nav-logo {
    width: 44px;
    height: 44px;
  }
  
  .approval-container {
    margin: var(--space-24) var(--space-6) var(--space-10);
    padding: var(--space-8);
  }
  
  .approval-container h1 {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-10);
  }
  
  .approval-message {
    padding: var(--space-8);
    margin-bottom: var(--space-12);
  }
  
  .approval-message p {
    font-size: var(--text-xl);
  }
  
  .subscription-packages {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-10);
    margin-bottom: var(--space-12);
  }
  
  .package-card {
    padding: var(--space-8);
  }
  
  .package-header h3 {
    font-size: var(--text-3xl);
  }
  
  .amount {
    font-size: 3.5rem;
  }
  
  .package-features li {
    font-size: var(--text-lg);
    padding: var(--space-4) 0;
  }
  
  .btn-package {
    padding: var(--space-5) var(--space-8);
    font-size: var(--text-xl);
  }
  
  .help-section {
    padding: var(--space-8);
  }
}

/* Large devices (992px and up) */
@media (min-width: 992px) {
  .approval-container {
    padding: var(--space-10);
  }
  
  .approval-container h1 {
    font-size: 3rem;
    margin-bottom: var(--space-12);
  }
  
  .subscription-packages {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-12);
  }
  
  .package-card {
    padding: var(--space-10);
  }
  
  .amount {
    font-size: 4rem;
  }
  
  .btn-package {
    padding: var(--space-6) var(--space-10);
  }
}

/* Extra large devices (1200px and up) */
@media (min-width: 1200px) {
  .approval-container {
    padding: var(--space-12);
  }
  
  .approval-container h1 {
    font-size: 3.5rem;
  }
  
  .package-card {
    padding: var(--space-12);
  }
  
  .amount {
    font-size: 4.5rem;
  }
}

/* ==========================================================================
   Package Selection Modal - Mobile Responsive
   ========================================================================== */

.package-card {
  border: 2px solid var(--secondary-200);
  border-radius: 12px;
  padding: var(--space-5);
  margin-bottom: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  background: var(--white);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.package-card:hover {
  border-color: var(--primary-600);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(2, 132, 199, 0.15);
}

.package-card.selected {
  border-color: var(--primary-600);
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.05), rgba(59, 130, 246, 0.05));
  box-shadow: 0 8px 25px rgba(2, 132, 199, 0.2);
}

.package-card.selected::before {
  content: '✓';
  position: absolute;
  top: 10px;
  right: 15px;
  background: var(--primary-600);
  color: var(--white);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  z-index: 10;
}

.package-title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--secondary-800);
  margin-bottom: var(--space-2);
  padding-right: var(--space-8);
}

.package-price {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--primary-600);
  margin-bottom: var(--space-2);
}

.package-duration {
  font-size: var(--text-sm);
  color: var(--secondary-500);
  margin-bottom: var(--space-3);
  font-weight: 500;
}

.package-features {
  font-size: var(--text-xs);
  color: var(--secondary-600);
  line-height: 1.6;
}

.package-features i {
  color: var(--primary-500);
  width: 16px;
}

/* Modal z-index fix */
#packageSelectionModal {
  z-index: 1060 !important;
}

#packageSelectionModal .modal-dialog {
  z-index: 1061 !important;
}

/* Mobile Responsive Package Cards */
@media (max-width: 576px) {
  .package-card {
    padding: var(--space-4);
    margin-bottom: var(--space-3);
  }
  
  .package-card.selected::before {
    top: 8px;
    right: 12px;
    width: 20px;
    height: 20px;
    font-size: 12px;
  }
  
  .package-title {
    font-size: var(--text-base);
    margin-bottom: var(--space-1);
    padding-right: var(--space-6);
  }
  
  .package-price {
    font-size: var(--text-xl);
    margin-bottom: var(--space-1);
  }
  
  .package-duration {
    font-size: var(--text-xs);
    margin-bottom: var(--space-2);
  }
  
  .package-features {
    font-size: 11px;
    line-height: 1.5;
  }
  
  .package-features i {
    width: 14px;
  }
  
  /* Modal adjustments for mobile */
  #packageSelectionModal .modal-dialog {
    margin: var(--space-2);
    max-width: calc(100% - var(--space-4));
  }
  
  #packageSelectionModal .modal-header {
    padding: var(--space-3) var(--space-4);
  }
  
  #packageSelectionModal .modal-body {
    padding: var(--space-3) var(--space-4);
  }
  
  #packageSelectionModal .modal-title {
    font-size: var(--text-base);
  }

  /* Mobile button adjustments */
  #packageSelectionModal .text-end .btn {
    margin-bottom: var(--space-2);
  }

  #packageSelectionModal .text-end .btn:last-child {
    margin-bottom: 0;
  }

  #packageSelectionModal .text-end {
    text-align: center;
  }
}

/* Tablet responsive */
@media (min-width: 577px) and (max-width: 768px) {
  .package-card {
    padding: var(--space-4);
  }
  
  .package-title {
    font-size: var(--text-base);
  }
  
  .package-price {
    font-size: var(--text-xl);
  }
  
  #packageSelectionModal .modal-dialog {
    margin: var(--space-4);
    max-width: calc(100% - var(--space-8));
  }

  /* Tablet button adjustments */
  #packageSelectionModal .text-end .btn {
    width: auto;
    margin-bottom: 0;
    margin-right: var(--space-2);
  }

  #packageSelectionModal .text-end .btn:last-child {
    margin-right: 0;
  }

  #packageSelectionModal .text-end {
    text-align: right;
  }
}

/* Desktop responsive */
@media (min-width: 769px) {
  .package-card {
    padding: var(--space-5);
  }
  
  .package-title {
    font-size: var(--text-lg);
  }
  
  .package-price {
    font-size: var(--text-2xl);
  }

  /* Desktop button adjustments */
  #packageSelectionModal .text-end .btn {
    width: auto;
    margin-bottom: 0;
    margin-right: var(--space-2);
  }

  #packageSelectionModal .text-end .btn:last-child {
    margin-right: 0;
  }

  #packageSelectionModal .text-end {
    text-align: right;
  }
}

/* Large desktop */
@media (min-width: 1200px) {
  .package-card {
    padding: var(--space-6);
  }
  
  .package-title {
    font-size: var(--text-xl);
  }
  
  .package-price {
    font-size: var(--text-3xl);
  }
}

/* Users Table Responsive Styles */
.badge.bg-info {
  background-color: var(--primary-600) !important;
  color: white !important;
  font-size: var(--text-xs);
  padding: var(--space-1) var(--space-2);
  font-weight: 600;
}

.badge.bg-info i {
  font-size: 10px;
  color: white !important;
}

/* Mobile responsive for users table */
@media (max-width: 576px) {
  #usersTable th:nth-child(3),
  #usersTable td:nth-child(3) {
    min-width: 70px;
  }
  
  #usersTable th:nth-child(5),
  #usersTable td:nth-child(5) {
    display: none;
  }
  
  .badge.bg-info {
    background-color: var(--primary-600) !important;
    color: white !important;
    font-size: 10px;
    padding: 2px 6px;
    font-weight: 600;
  }
  
  .badge.bg-info i {
    font-size: 8px;
    margin-right: 2px;
    color: white !important;
  }
}

/* Tablet responsive for users table */
@media (min-width: 577px) and (max-width: 768px) {
  #usersTable {
    font-size: var(--text-sm);
  }
  
  .badge.bg-info {
    background-color: var(--primary-600) !important;
    color: white !important;
    font-size: var(--text-xs);
    font-weight: 600;
  }
}
