/* ================================
   THE SQUAD ZONE – FINAL THEME
   Applied to Existing UI
   + DEVELOPER DASHBOARD STYLES
================================ */

/* ---------- THEME VARIABLES ---------- */
:root {
  --bg-main: #0b0f14;
  --bg-panel: #141a23;
  --bg-panel-soft: rgba(20, 26, 35, 0.88);

  --accent: #ff751f;
  --accent-dark: #e55f00;
  --accent-glow: rgba(255, 117, 31, 0.35);

  --text-main: #e5e7eb;
  --text-muted: #9ca3af;

  --border-soft: rgba(255, 255, 255, 0.08);

  --danger: #ef4444;
  --success: #22c55e;
  --warning: #f59e0b;
  
  /* Developer Dashboard Colors */
  --dev-bg-dark: #111827;
  --dev-bg-light: #1f2937;
  --dev-border: #374151;
  --dev-text-light: #f3f4f6;
  --dev-text-muted: #9ca3af;
}

img {
  max-width: unset !important;
  height: unset !important;
}

/* ---------- BASE ---------- */
* {
  -webkit-tap-highlight-color: transparent;
}

body {
  background: radial-gradient(circle at top, #141a23 0%, var(--bg-main) 60%);
  min-height: 100vh;
  color: var(--text-main);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Ubuntu, sans-serif;
}

/* ================================
   DEVELOPER DASHBOARD STYLES
================================ */

/* ---------- DEVELOPER PAGE BODY ---------- */
body.developer-page {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  min-height: 100vh;
}

/* ---------- DEVELOPER NAVIGATION ---------- */
.developer-nav {
  background: linear-gradient(135deg, #111827, #1f2937);
  border-bottom: 1px solid var(--dev-border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* ---------- DEVELOPER STATS CARDS ---------- */
.dev-stat-card {
  background: linear-gradient(135deg, #1f2937, #111827);
  border: 1px solid var(--dev-border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.dev-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.dev-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dev-stat-icon.blue {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.dev-stat-icon.green {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

.dev-stat-icon.yellow {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.dev-stat-icon.red {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

/* ---------- DEVELOPER BUTTONS ---------- */
.dev-btn {
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.dev-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

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

.dev-btn-primary {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
}

.dev-btn-success {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
}

.dev-btn-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

.dev-btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
}

.dev-btn-secondary {
  background: linear-gradient(135deg, #6b7280, #4b5563);
  color: white;
}

.dev-btn-purple {
  background: linear-gradient(135deg, #a855f7, #9333ea);
  color: white;
}

/* ---------- DEVELOPER TABLE ---------- */
.dev-table {
  background: var(--dev-bg-light);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.dev-table table {
  width: 100%;
  border-collapse: collapse;
}

.dev-table thead {
  background: var(--dev-bg-dark);
  border-bottom: 2px solid var(--dev-border);
}

.dev-table thead th {
  padding: 1rem 1.5rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--dev-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dev-table tbody tr {
  border-bottom: 1px solid var(--dev-border);
  transition: background 0.2s ease;
}

.dev-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.dev-table tbody td {
  padding: 1.25rem 1.5rem;
  color: var(--dev-text-light);
}

/* ---------- DEVELOPER BADGES ---------- */
.dev-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.025em;
}

.dev-badge-success {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.dev-badge-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.dev-badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.dev-badge-info {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.dev-badge-gray {
  background: rgba(107, 114, 128, 0.15);
  color: #9ca3af;
  border: 1px solid rgba(107, 114, 128, 0.3);
}

.dev-badge-purple {
  background: rgba(168, 85, 247, 0.15);
  color: #a855f7;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

/* ---------- DEVELOPER MODAL ---------- */
.dev-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
}

.dev-modal-content {
  background: linear-gradient(135deg, #1f2937, #111827);
  border: 1px solid var(--dev-border);
  border-radius: 16px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  max-height: 90vh;
  overflow-y: auto;
  width: 100%;
  animation: modalSlideIn 0.3s ease;
}

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

.dev-modal-header {
  padding: 2rem 2rem 1rem;
  border-bottom: 1px solid var(--dev-border);
}

.dev-modal-body {
  padding: 2rem;
}

.dev-modal-footer {
  padding: 1rem 2rem 2rem;
  border-top: 1px solid var(--dev-border);
}

/* ---------- DEVELOPER LOGIN PAGE ---------- */
.dev-login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  padding: 1rem;
}

.dev-login-card {
  background: linear-gradient(135deg, #1f2937, #111827);
  border: 1px solid var(--dev-border);
  border-radius: 20px;
  padding: 3rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.dev-login-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, #ff751f, #e55f00);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  box-shadow: 0 10px 30px rgba(255, 117, 31, 0.3);
}

.dev-login-title {
  text-align: center;
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--dev-text-light);
  margin-bottom: 0.5rem;
}

.dev-login-subtitle {
  text-align: center;
  color: var(--dev-text-muted);
  margin-bottom: 2rem;
}

.dev-input-group {
  margin-bottom: 1.5rem;
}

.dev-input-label {
  display: block;
  font-weight: 600;
  color: var(--dev-text-light);
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.dev-input {
  width: 100%;
  padding: 0.875rem 1rem;
  background: rgba(0, 0, 0, 0.3) !important;
  border: 1px solid var(--dev-border) !important;
  border-radius: 10px !important;
  color: var(--dev-text-light) !important;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.dev-input:focus {
  outline: none;
  border-color: #ff751f !important;
  box-shadow: 0 0 0 3px rgba(255, 117, 31, 0.2);
}

.dev-input::placeholder {
  color: var(--dev-text-muted);
}

/* ---------- DEVELOPER FORM ELEMENTS ---------- */
.dev-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

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

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

.dev-select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.3) !important;
  border: 1px solid var(--dev-border) !important;
  border-radius: 8px !important;
  color: var(--dev-text-light) !important;
  cursor: pointer;
}

.dev-select option {
  background: #1f2937;
  color: var(--dev-text-light);
}

/* ---------- DEVELOPER ALERT ---------- */
.dev-alert {
  padding: 1rem 1.25rem;
  border-radius: 10px;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dev-alert-success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #22c55e;
}

.dev-alert-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.dev-alert-warning {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #f59e0b;
}

.dev-alert-info {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #3b82f6;
}

/* ---------- DEVELOPER LOADING SPINNER ---------- */
.dev-spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: #ff751f;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ---------- DEVELOPER USER MANAGEMENT ---------- */
.dev-user-row {
  transition: all 0.2s ease;
}

.dev-user-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.dev-user-row.blocked {
  background: rgba(239, 68, 68, 0.08);
}

.dev-user-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.dev-user-actions button {
  font-size: 0.75rem;
  padding: 0.5rem 0.75rem;
}

/* ---------- DEVELOPER ACTION BUTTONS ---------- */
.dev-action-btn {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.dev-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ---------- GLASS ---------- */
.glass {
  background: var(--bg-panel-soft);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border-soft);
  box-shadow:
    0 12px 35px rgba(0, 0, 0, 0.7),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  /* border-radius: 16px; */
}

/* ---------- BUTTONS ---------- */
.gradient-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.4px;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  border: none;
  box-shadow:
    0 10px 25px var(--accent-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: all 0.25s ease;
}

.gradient-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(255, 117, 31, 0.55);
}

.gradient-btn:active {
  transform: scale(0.97);
}

.gradient-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ---------- INPUTS ---------- */
input,
select,
textarea {
  background: #0f141c !important;
  border: 1px solid var(--border-soft) !important;
  color: var(--text-main) !important;
  border-radius: 12px !important;
}

input::placeholder {
  color: var(--text-muted);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(255, 117, 31, 0.25);
}

/* ---------- TABS ---------- */
.tab-btn {
  transition: all 0.25s ease;
  border-radius: 12px 12px 0 0;
  position: relative;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  flex-shrink: 0;
  box-sizing: border-box;
  min-width: fit-content;
}

.tab-btn:hover {
  background: rgba(255, 255, 255, 0.04);
}

/* Active state */
.tab-btn.active,
.tab-btn.border-b-2 {
  border-bottom-color: var(--accent) !important;
  background: linear-gradient(
    to top,
    rgba(255, 117, 31, 0.25),
    transparent
  ) !important;
  color: #fff !important;
}

/* Navigation scrollbar */
nav .container {
  overflow-x: auto;
  scrollbar-width: thin;
}

nav .container::-webkit-scrollbar {
  height: 4px;
}

nav .container::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 4px;
}

/* ---------- SCROLLBAR ---------- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent), var(--accent-dark));
  border-radius: 20px;
}

/* ---------- BOOKING SLOTS ---------- */
.booking-slot {
  cursor: pointer;
  transition: all 0.2s ease;
}

.booking-slot:hover {
  transform: translateY(-2px);
}

.booking-slot.occupied {
  background: rgba(239, 68, 68, 0.18);
  border-color: var(--danger);
}

.booking-slot.pending {
  background: rgba(245, 158, 11, 0.18);
  border-color: var(--warning);
}

.booking-slot.available {
  background: rgba(34, 197, 94, 0.18);
  border-color: var(--success);
}

/* ---------- REPORT CARDS ---------- */
.report-card {
  transition: transform 0.25s ease;
}

.report-card:hover {
  transform: translateY(-3px);
}

/* ---------- MEMBERSHIP CARD ---------- */
.membership-card {
  width: 100%;
  max-width: 360px;
  height: 220px;
  background: linear-gradient(135deg, #141a23, #1f2937);
  border-radius: 18px;
  padding: 18px;
  position: relative;
  overflow: hidden;
  color: #fff;
  border: 1px solid rgba(255, 117, 31, 0.25);
}

.membership-card::before {
  content: '';
  position: absolute;
  inset: -50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 70%);
  animation: shimmer 4s infinite linear;
}

@keyframes shimmer {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ---------- SESSION STATES ---------- */
.session-expiring {
  border: 2px solid var(--danger) !important;
  animation: urgent-pulse 1.4s infinite;
}

.session-expired {
  opacity: 0.6;
}

@keyframes urgent-pulse {
  0%,100% {
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.6);
  }
  50% {
    box-shadow: 0 0 35px rgba(239, 68, 68, 0.9);
  }
}

/* ---------- MODAL ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
}

.modal-content {
  background: var(--bg-panel);
  border-radius: 18px;
  border: 1px solid var(--border-soft);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.9);
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  width: 100%;
  max-width: 600px;
}

/* Larger modals */
.modal-content.modal-lg {
  max-width: 800px;
}

.modal-content.modal-xl {
  max-width: 1000px;
}

/* Modal header spacing */
.modal-content h2,
.modal-content h3,
.modal-content h4 {
  margin-bottom: 1.5rem;
}

/* Modal form spacing */
.modal-content form > div {
  margin-bottom: 1rem;
}

.modal-content form > div:last-child {
  margin-bottom: 0;
}

/* Booking Modal Specific Styles */
#bookingModal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
}

#bookingModal > div {
  background: var(--bg-panel);
  border-radius: 18px;
  border: 1px solid var(--border-soft);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.9);
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  width: 100%;
  max-width: 800px;
}

#bookingModal h2 {
  margin-bottom: 1.5rem;
}

#bookingModal form > div {
  margin-bottom: 1rem;
}

#bookingModal form > div:last-child {
  margin-bottom: 0;
}

/* ---------- MOBILE ---------- */
@media (max-width: 640px) {
  h1 { font-size: 1.3rem !important; }
  h2 { font-size: 1.1rem !important; }
  .tab-btn { font-size: 0.85rem; }
  
  .modal-backdrop {
    padding: 0.5rem;
  }
  
  .modal-content {
    padding: 1.25rem;
    max-height: 95vh;
  }
  
  .modal-content h2,
  .modal-content h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
  }
  
  /* Booking Modal Mobile */
  #bookingModal {
    padding: 0.5rem;
  }
  
  #bookingModal > div {
    padding: 1.25rem;
    max-height: 95vh;
  }
  
  #bookingModal h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
  }
  
  /* Developer Dashboard Mobile */
  .dev-stat-card {
    padding: 1rem;
  }
  
  .dev-login-card {
    padding: 2rem 1.5rem;
  }
  
  .dev-form-grid {
    grid-template-columns: 1fr;
  }
  
  .dev-user-actions {
    flex-direction: column;
  }
  
  .dev-modal-content {
    max-width: 95vw;
  }
}


/* ================================
   THE SQUAD ZONE – LIGHT THEME
================================ */

body.light-theme {
  /* ---------- BACKGROUNDS ---------- */
  --bg-main: #eef1f6;              /* soft off-white */
  --bg-panel: #ffffff;             /* pure white for cards */
  --bg-panel-soft: rgba(255, 255, 255, 0.95);

  /* ---------- TEXT ---------- */
  --text-main: #1a1f2e;            /* very dark for readability */
  --text-muted: #64748b;

  /* ---------- BORDERS ---------- */
  --border-soft: rgba(15, 23, 42, 0.15);

  /* ---------- ACCENT ---------- */
  --accent: #ff751f;
  --accent-dark: #e55f00;
  --accent-glow: rgba(255, 117, 31, 0.18);
  
  /* Developer Dashboard Light Colors */
  --dev-bg-dark: #f8fafc;
  --dev-bg-light: #ffffff;
  --dev-border: #e2e8f0;
  --dev-text-light: #1e293b;
  --dev-text-muted: #64748b;
}

/* ---------- BODY ---------- */
body.light-theme {
  background: radial-gradient(
    circle at top,
    #f9fafb 0%,
    #eef1f6 65%
  );
}

/* ---------- DEVELOPER LIGHT THEME ---------- */
body.light-theme.developer-page {
  background: linear-gradient(135deg, #f9fafb 0%, #e5e7eb 100%);
}

body.light-theme .developer-nav {
  background: linear-gradient(135deg, #ffffff, #f9fafb);
  border-bottom: 1px solid var(--dev-border);
}

body.light-theme .dev-stat-card {
  background: var(--dev-bg-light);
  border: 1px solid var(--dev-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body.light-theme .dev-stat-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

body.light-theme .dev-table {
  background: var(--dev-bg-light);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body.light-theme .dev-table thead {
  background: var(--dev-bg-dark);
}

body.light-theme .dev-table tbody tr:hover {
  background: rgba(0, 0, 0, 0.02);
}

body.light-theme .dev-modal-content {
  background: var(--dev-bg-light);
  border: 1px solid var(--dev-border);
}

body.light-theme .dev-login-container {
  background: linear-gradient(135deg, #f9fafb 0%, #e5e7eb 100%);
}

body.light-theme .dev-login-card {
  background: var(--dev-bg-light);
  border: 1px solid var(--dev-border);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
}

body.light-theme .dev-input,
body.light-theme .dev-select {
  background: #f8fafc !important;
  border: 1px solid var(--dev-border) !important;
  color: var(--dev-text-light) !important;
}

body.light-theme .dev-user-row.blocked {
  background: rgba(239, 68, 68, 0.05);
}

/* ---------- GLASS LIGHT THEME ---------- */
body.light-theme .glass {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow:
    0 8px 30px rgba(15, 23, 42, 0.08),
    inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}

/* ---------- INPUTS LIGHT THEME ---------- */
body.light-theme input,
body.light-theme select,
body.light-theme textarea {
  background: #fafbfc !important;
  border: 1px solid rgba(15, 23, 42, 0.18) !important;
  color: var(--text-main) !important;
}

body.light-theme input::placeholder {
  color: var(--text-muted);
}

body.light-theme input:focus,
body.light-theme select:focus,
body.light-theme textarea:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(255, 117, 31, 0.15);
}

/* ---------- MODAL LIGHT THEME ---------- */
body.light-theme .modal-content,
body.light-theme #bookingModal > div {
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.2);
}

/* ---------- BUTTONS LIGHT THEME ---------- */
body.light-theme .gradient-btn {
  box-shadow:
    0 8px 20px rgba(255, 117, 31, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

body.light-theme .gradient-btn:hover {
  box-shadow: 0 12px 30px rgba(255, 117, 31, 0.35);
}

/* ---------- TABS LIGHT THEME ---------- */
body.light-theme .tab-btn:hover {
  background: rgba(0, 0, 0, 0.04);
}

body.light-theme .tab-btn.active,
body.light-theme .tab-btn.border-b-2 {
  background: linear-gradient(
    to top,
    rgba(255, 117, 31, 0.12),
    transparent
  ) !important;
}

/* ---------- BOOKING SLOTS LIGHT THEME ---------- */
body.light-theme .booking-slot.occupied {
  background: rgba(239, 68, 68, 0.12);
  border-color: #dc2626;
  color: var(--text-main);
}

body.light-theme .booking-slot.pending {
  background: rgba(245, 158, 11, 0.12);
  border-color: #f59e0b;
  color: var(--text-main);
}

body.light-theme .booking-slot.available {
  background: rgba(34, 197, 94, 0.12);
  border-color: #16a34a;
  color: var(--text-main);
}

/* ---------- REPORT CARDS LIGHT THEME ---------- */
body.light-theme .report-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  box-shadow: 
    0 4px 16px rgba(15, 23, 42, 0.06),
    0 2px 6px rgba(15, 23, 42, 0.03);
}

/* ---------- SESSION STATES LIGHT THEME ---------- */
body.light-theme .session-expired {
  opacity: 0.5;
}

/* ---------- SCROLLBAR LIGHT THEME ---------- */
body.light-theme ::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent), var(--accent-dark));
}

body.light-theme ::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.04);
}

/* ---------- MEMBERSHIP CARD LIGHT THEME ---------- */
body.light-theme .membership-card {
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  border: 1px solid var(--border-soft);
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.12);
}

/* ================================
   LIGHT THEME TEXT COLOR FIXES
================================ */

/* ---------- TEXT COLORS (THEME SAFE) ---------- */
.text-main {
  color: var(--text-main) !important;
}

.text-muted {
  color: var(--text-muted) !important;
}

/* ---------- COMPREHENSIVE LIGHT THEME TEXT FIXES ---------- */

/* Override all text-white classes in light mode */
body.light-theme .text-white {
  color: var(--text-main) !important;
}

/* Purple text variations */
body.light-theme .text-purple-300,
body.light-theme .text-purple-200,
body.light-theme .text-purple-400 {
  color: #64748b !important; /* readable muted text */
}

/* Blue text */
body.light-theme .text-blue-300,
body.light-theme .text-blue-400 {
  color: #2563eb !important;
}

/* Red text */
body.light-theme .text-red-300,
body.light-theme .text-red-400,
body.light-theme .text-red-500 {
  color: #dc2626 !important;
}

/* Orange text */
body.light-theme .text-orange-300,
body.light-theme .text-orange-400 {
  color: var(--accent) !important;
}

/* Green text */
body.light-theme .text-green-300,
body.light-theme .text-green-400,
body.light-theme .text-green-500 {
  color: #16a34a !important;
}

/* Yellow text */
body.light-theme .text-yellow-300,
body.light-theme .text-yellow-400 {
  color: #ca8a04 !important;
}

/* Gray text variations */
body.light-theme .text-gray-300,
body.light-theme .text-gray-400 {
  color: var(--text-muted) !important;
}

body.light-theme .text-gray-500 {
  color: #64748b !important;
}

body.light-theme .text-gray-600 {
  color: #475569 !important;
}

body.light-theme .text-gray-200 {
  color: #94a3b8 !important;
}

/* ---------- BACKGROUND FIXES ---------- */

/* Fix dark backgrounds in light mode */
body.light-theme .bg-gray-800,
body.light-theme .bg-gray-900 {
  background-color: #f8fafc !important;
  color: var(--text-main) !important;
}

body.light-theme .bg-gray-700 {
  background-color: #ffffff !important;
  color: var(--text-main) !important;
}

body.light-theme .bg-gray-100 {
  background-color: #f8fafc !important;
}

body.light-theme .bg-gray-50 {
  background-color: #ffffff !important;
}

/* ---------- BORDER FIXES ---------- */
body.light-theme .border-gray-700,
body.light-theme .border-gray-600,
body.light-theme .border-gray-800 {
  border-color: var(--border-soft) !important;
}

body.light-theme .border-gray-200,
body.light-theme .border-gray-300 {
  border-color: var(--dev-border) !important;
}

/* ---------- BUTTON FIXES ---------- */
/* Make sure buttons in modals are visible */
body.light-theme button {
  color: var(--text-main);
}

body.light-theme button.gradient-btn {
  color: #ffffff !important; /* Keep white text on gradient buttons */
}

/* Glass buttons in light mode */
body.light-theme button.glass {
  background: rgba(255, 255, 255, 0.8) !important;
  color: var(--text-main) !important;
  border: 1px solid var(--border-soft) !important;
}

body.light-theme button.glass:hover {
  background: rgba(255, 255, 255, 0.95) !important;
}

/* Developer buttons in light mode */
body.light-theme .dev-btn-primary {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white !important;
}

body.light-theme .dev-btn-success {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white !important;
}

body.light-theme .dev-btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white !important;
}

body.light-theme .dev-btn-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white !important;
}

/* ---------- TABLE FIXES ---------- */
body.light-theme table {
  color: var(--text-main);
}

body.light-theme thead {
  background: rgba(0, 0, 0, 0.02);
}

body.light-theme th {
  color: var(--text-main) !important;
}

body.light-theme td {
  color: var(--text-main);
}

body.light-theme tr:hover {
  background: rgba(0, 0, 0, 0.02);
}

/* ---------- DROPDOWN/SELECT FIXES ---------- */
body.light-theme select option {
  background: #ffffff;
  color: var(--text-main);
}

/* ---------- LABEL FIXES ---------- */
body.light-theme label {
  color: var(--text-main) !important;
}

/* ---------- HEADING FIXES ---------- */
body.light-theme h1,
body.light-theme h2,
body.light-theme h3,
body.light-theme h4,
body.light-theme h5,
body.light-theme h6 {
  color: var(--text-main) !important;
}

/* ---------- LINK FIXES ---------- */
body.light-theme a {
  color: #2563eb;
}

body.light-theme a:hover {
  color: #1d4ed8;
}

/* ---------- ALERT/NOTIFICATION FIXES ---------- */
body.light-theme .bg-red-900 {
  background-color: #fee2e2 !important;
  color: #991b1b !important;
}

body.light-theme .bg-green-900 {
  background-color: #dcfce7 !important;
  color: #166534 !important;
}

body.light-theme .bg-yellow-900 {
  background-color: #fef3c7 !important;
  color: #854d0e !important;
}

body.light-theme .bg-blue-900 {
  background-color: #dbeafe !important;
  color: #1e40af !important;
}

/* ---------- BADGE/TAG FIXES ---------- */
body.light-theme .bg-purple-600,
body.light-theme .bg-purple-500 {
  background-color: #9333ea !important;
  color: #ffffff !important;
}

body.light-theme .bg-blue-600,
body.light-theme .bg-blue-500 {
  background-color: #2563eb !important;
  color: #ffffff !important;
}

body.light-theme .bg-green-600,
body.light-theme .bg-green-500 {
  background-color: #16a34a !important;
  color: #ffffff !important;
}

body.light-theme .bg-red-600,
body.light-theme .bg-red-500 {
  background-color: #dc2626 !important;
  color: #ffffff !important;
}

body.light-theme .bg-yellow-600,
body.light-theme .bg-yellow-500 {
  background-color: #f59e0b !important;
  color: #ffffff !important;
}

/* ---------- SHADOW ADJUSTMENTS ---------- */
body.light-theme .shadow-lg {
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.1);
}

body.light-theme .shadow-xl {
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
}

body.light-theme .shadow-md {
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}

/* ---------- DIVIDER FIXES ---------- */
body.light-theme .border-t,
body.light-theme .border-b,
body.light-theme .border-l,
body.light-theme .border-r {
  border-color: var(--border-soft) !important;
}

body.light-theme hr {
  border-color: var(--border-soft) !important;
}

/* ---------- ICON COLOR FIXES ---------- */
body.light-theme svg {
  color: inherit;
}

/* ---------- FIXED/STICKY ELEMENTS ---------- */
body.light-theme .fixed,
body.light-theme .sticky {
  background-color: var(--bg-main);
}

/* ---------- RESPONSIVE CONTAINER WIDTH ---------- */
@media (min-width: 1536px) {
    .container {
        max-width: 1570px !important;
    }
}

/* ---------- ENSURE PROPER CONTRAST ---------- */
body.light-theme .text-xs,
body.light-theme .text-sm,
body.light-theme small {
  color: var(--text-muted);
}

/* Strong/bold text should be darker */
body.light-theme strong,
body.light-theme b {
  color: var(--text-main);
  font-weight: 600;
}

/* ---------- QR CODE & CANVAS ELEMENTS ---------- */
body.light-theme canvas {
  background: #ffffff;
  border-radius: 8px;
}

/* ---------- TOOLTIP FIXES ---------- */
body.light-theme [title]:hover::after {
  background: var(--text-main);
  color: #ffffff;
}

/* ---------- PLACEHOLDER VISIBILITY ---------- */
body.light-theme ::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

body.light-theme ::-webkit-input-placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

body.light-theme :-ms-input-placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

/* ---------- DISABLED STATES ---------- */
body.light-theme button:disabled,
body.light-theme input:disabled,
body.light-theme select:disabled,
body.light-theme textarea:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  color: var(--text-muted) !important;
}

/* ---------- FOCUS STATES ---------- */
body.light-theme *:focus {
  outline-color: var(--accent);
}

body.light-theme *:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- DEVELOPER BADGE LIGHT THEME ---------- */
body.light-theme .dev-badge-success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

body.light-theme .dev-badge-danger {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

body.light-theme .dev-badge-warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

body.light-theme .dev-badge-info {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

body.light-theme .dev-badge-gray {
  background: rgba(107, 114, 128, 0.1);
  border: 1px solid rgba(107, 114, 128, 0.2);
}

body.light-theme .dev-badge-purple {
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.2);
}

/* ---------- DEVELOPER ALERT LIGHT THEME ---------- */
body.light-theme .dev-alert-success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

body.light-theme .dev-alert-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

body.light-theme .dev-alert-warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

body.light-theme .dev-alert-info {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

/* ================================
   MOBILE-OPTIMIZED HEADER & NAVIGATION
   Professional, Clean, Polished Design
================================ */

/* ---------- CSS CUSTOM PROPERTIES FOR MOBILE ---------- */
:root {
  --mobile-header-height: 64px;
  --mobile-drawer-width: 300px;
  --mobile-transition: cubic-bezier(0.4, 0, 0.2, 1);
  --mobile-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.08);
  --mobile-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
  --mobile-shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.2), 0 4px 16px rgba(0, 0, 0, 0.1);
  --mobile-shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.3);
  --glass-bg: rgba(15, 15, 20, 0.92);
  --glass-bg-solid: #111116;
  --glass-border: rgba(255, 255, 255, 0.06);
  --hover-bg: rgba(255, 255, 255, 0.04);
  --active-bg: rgba(255, 117, 31, 0.08);
  --active-border: rgba(255, 117, 31, 0.6);
  --divider: rgba(255, 255, 255, 0.06);
  --text-primary: #f0f0f5;
  --text-secondary: rgba(255, 255, 255, 0.55);
  --text-tertiary: rgba(255, 255, 255, 0.35);
  --accent-gradient: linear-gradient(135deg, #ff7b2e 0%, #ff5722 100%);
  --accent-glow-soft: rgba(255, 117, 31, 0.15);
}

body.light-theme {
  --glass-bg: rgba(255, 255, 255, 0.95);
  --glass-bg-solid: #ffffff;
  --glass-border: rgba(0, 0, 0, 0.08);
  --hover-bg: rgba(0, 0, 0, 0.03);
  --active-bg: rgba(255, 117, 31, 0.06);
  --active-border: rgba(255, 117, 31, 0.7);
  --divider: rgba(0, 0, 0, 0.06);
  --text-primary: #1a1a2e;
  --text-secondary: rgba(0, 0, 0, 0.5);
  --text-tertiary: rgba(0, 0, 0, 0.3);
  --mobile-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --mobile-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
  --mobile-shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.1), 0 4px 16px rgba(0, 0, 0, 0.06);
  --mobile-shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.15);
  --accent-glow-soft: rgba(255, 117, 31, 0.1);
}

/* ---------- HIDE DEFAULT NAV ON MOBILE ---------- */
@media (max-width: 767px) {
  nav .container > .flex,
  header.glass,
  nav.glass {
    display: none !important;
  }

  main.container {
    padding-top: calc(var(--mobile-header-height) + 16px) !important;
  }
}

/* ---------- MOBILE HEADER BAR ---------- */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--mobile-header-height);
  background: var(--glass-bg-solid);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--mobile-shadow-sm);
  -webkit-user-select: none;
  user-select: none;
}

@media (max-width: 767px) {
  .mobile-header {
    display: flex;
    align-items: center;
  }
}

.mobile-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  padding: 0 12px 0 8px;
  gap: 8px;
}

/* --- Left: Hamburger --- */
.m-hamburger {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 12px;
  transition: background 0.2s var(--mobile-transition);
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}

.m-hamburger:active {
  background: var(--hover-bg);
}

.m-hamburger-lines {
  width: 22px;
  height: 16px;
  position: relative;
}

.m-hamburger-lines span {
  position: absolute;
  left: 0;
  height: 2px;
  width: 100%;
  background: var(--text-primary);
  border-radius: 4px;
  transition: all 0.35s var(--mobile-transition);
}

.m-hamburger-lines span:nth-child(1) { top: 0; }
.m-hamburger-lines span:nth-child(2) { top: 7px; width: 16px; }
.m-hamburger-lines span:nth-child(3) { top: 14px; width: 19px; }

.m-hamburger.is-active .m-hamburger-lines span:nth-child(1) {
  top: 7px;
  transform: rotate(45deg);
}
.m-hamburger.is-active .m-hamburger-lines span:nth-child(2) {
  opacity: 0;
  transform: translateX(-8px);
}
.m-hamburger.is-active .m-hamburger-lines span:nth-child(3) {
  top: 7px;
  width: 100%;
  transform: rotate(-45deg);
}

/* --- Center: Brand --- */
.m-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  padding: 0 4px;
}

.m-brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  flex-shrink: 0;
  object-fit: contain;
  /* subtle ring */
  box-shadow: 0 0 0 1px var(--glass-border);
}

.m-brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 1px;
}

.m-brand-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.2px;
  margin: 0;
}

.m-brand-sub {
  font-size: 11px;
  color: var(--text-tertiary);
  line-height: 1.2;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  font-weight: 500;
  margin: 0;
}

/* --- Right: Actions --- */
.m-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.m-icon-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 12px;
  color: var(--text-secondary);
  transition: all 0.2s var(--mobile-transition);
  -webkit-tap-highlight-color: transparent;
  position: relative;
}

.m-icon-btn:active {
  background: var(--hover-bg);
  transform: scale(0.92);
}

.m-icon-btn svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.8;
}

/* Notification dot on refresh (optional) */
.m-icon-btn .m-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  background: #ff5722;
  border-radius: 50%;
  border: 2px solid var(--glass-bg-solid);
}

/* Avatar button */
.m-avatar-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: all 0.2s var(--mobile-transition);
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 2px 8px rgba(255, 117, 31, 0.25);
  letter-spacing: 0.5px;
}

.m-avatar-btn:active {
  transform: scale(0.9);
}

/* ---------- NAVIGATION DRAWER ---------- */
.m-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9990;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--mobile-transition), visibility 0.3s;
  -webkit-tap-highlight-color: transparent;
}

.m-drawer-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

body.light-theme .m-drawer-overlay {
  background: rgba(0, 0, 0, 0.3);
}

.m-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--mobile-drawer-width);
  max-width: 85vw;
  z-index: 9995;
  background: var(--glass-bg-solid);
  box-shadow: var(--mobile-shadow-xl);
  transform: translateX(-100%);
  transition: transform 0.35s var(--mobile-transition);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.m-drawer.is-open {
  transform: translateX(0);
}

/* Drawer Header / User Area */
.m-drawer-header {
  padding: 24px 20px 20px;
  background: linear-gradient(180deg, var(--accent-glow-soft) 0%, transparent 100%);
  border-bottom: 1px solid var(--divider);
  flex-shrink: 0;
}

.m-drawer-user {
  display: flex;
  align-items: center;
  gap: 14px;
}

.m-drawer-avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--accent-gradient);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(255, 117, 31, 0.3);
  letter-spacing: 0.5px;
}

.m-drawer-user-info {
  flex: 1;
  min-width: 0;
}

.m-drawer-username {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.2px;
}

.m-drawer-role {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #ff7b2e;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 0;
  padding: 2px 8px;
  background: rgba(255, 117, 31, 0.1);
  border-radius: 6px;
  border: 1px solid rgba(255, 117, 31, 0.15);
}

.m-drawer-close {
  position: absolute;
  top: 16px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 10px;
  color: var(--text-secondary);
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.m-drawer-close:active {
  background: var(--hover-bg);
  transform: scale(0.9);
}

.m-drawer-close svg {
  width: 20px;
  height: 20px;
}

/* Drawer Body - Scrollable Nav */
.m-drawer-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 8px 0;
  scrollbar-width: none;
}

.m-drawer-body::-webkit-scrollbar {
  display: none;
}

/* Section Label */
.m-nav-label {
  padding: 20px 20px 8px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin: 0;
}

.m-nav-label:first-child {
  padding-top: 12px;
}

/* Nav Item */
.m-nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 12px;
  margin: 2px 8px;
  height: 48px;
  border-radius: 12px;
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s var(--mobile-transition);
  -webkit-tap-highlight-color: transparent;
  border: 1px solid transparent;
  position: relative;
  font-size: 14px;
}

.m-nav-item:active {
  background: var(--hover-bg);
  transform: scale(0.98);
}

.m-nav-item.is-active {
  background: var(--active-bg);
  color: var(--text-primary);
  border-color: rgba(255, 117, 31, 0.12);
}

.m-nav-item.is-active::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 24px;
  background: var(--accent-gradient);
  border-radius: 0 4px 4px 0;
}

.m-nav-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  font-size: 18px;
  flex-shrink: 0;
  background: var(--hover-bg);
  transition: all 0.2s;
}

.m-nav-item.is-active .m-nav-icon {
  background: rgba(255, 117, 31, 0.12);
}

.m-nav-text {
  flex: 1;
  font-weight: 500;
  letter-spacing: -0.1px;
}

.m-nav-item.is-active .m-nav-text {
  font-weight: 650;
}

.m-nav-badge {
  padding: 2px 8px;
  min-width: 22px;
  text-align: center;
  background: var(--accent-gradient);
  color: white;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
  box-shadow: 0 2px 6px rgba(255, 117, 31, 0.3);
}

/* Nav Divider */
.m-nav-divider {
  height: 1px;
  background: var(--divider);
  margin: 8px 20px;
}

/* Drawer Footer */
.m-drawer-footer {
  padding: 12px;
  border-top: 1px solid var(--divider);
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
  background: var(--glass-bg-solid);
}

.m-footer-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 13px;
  border: none;
  cursor: pointer;
  transition: all 0.2s var(--mobile-transition);
  -webkit-tap-highlight-color: transparent;
  letter-spacing: 0.2px;
  width: 100%;
}

.m-footer-btn:active {
  transform: scale(0.97);
}

.m-footer-btn.btn-theme {
  background: var(--hover-bg);
  color: var(--text-secondary);
  border: 1px solid var(--glass-border);
}

.m-footer-btn.btn-logout {
  background: rgba(239, 68, 68, 0.08);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.12);
}

.m-footer-btn.btn-logout:active {
  background: rgba(239, 68, 68, 0.15);
}

/* Version tag */
.m-drawer-version {
  text-align: center;
  font-size: 10px;
  color: var(--text-tertiary);
  padding: 4px 0 2px;
  letter-spacing: 0.5px;
}

/* ---------- USER DROPDOWN (Top Right) ---------- */
.m-user-dropdown {
  position: fixed;
  top: calc(var(--mobile-header-height) + 6px);
  right: 12px;
  width: 220px;
  background: var(--glass-bg-solid);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: var(--mobile-shadow-lg);
  z-index: 10001;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.96);
  transition: all 0.25s var(--mobile-transition);
  overflow: hidden;
}

.m-user-dropdown.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.m-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  height: 48px;
  color: var(--text-primary);
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.m-dropdown-item:active {
  background: var(--hover-bg);
}

.m-dropdown-item + .m-dropdown-item {
  border-top: 1px solid var(--divider);
}

.m-dropdown-item .m-dd-icon {
  width: 18px;
  text-align: center;
  font-size: 15px;
  flex-shrink: 0;
}

.m-dropdown-item.is-danger {
  color: #ef4444;
}

/* ---------- DESKTOP: HIDE MOBILE ---------- */
@media (min-width: 768px) {
  .mobile-header,
  .m-drawer,
  .m-drawer-overlay,
  .m-user-dropdown {
    display: none !important;
  }
}

/* ---------- EXTRA SMALL DEVICES ---------- */
@media (max-width: 374px) {
  .m-drawer {
    width: 270px;
  }

  .m-brand-name {
    font-size: 14px;
  }

  .m-brand-logo {
    width: 30px;
    height: 30px;
  }

  .m-avatar-btn {
    width: 34px;
    height: 34px;
    font-size: 13px;
  }

  .m-icon-btn {
    width: 38px;
    height: 38px;
  }

  .m-drawer-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 16px;
  }
}

/* ---------- LANDSCAPE ---------- */
@media (max-height: 500px) and (orientation: landscape) {
  .mobile-header {
    height: 52px;
  }

  .m-drawer {
    width: 260px;
  }

  .m-drawer-header {
    padding: 16px;
  }

  .m-nav-item {
    height: 42px;
  }

  .m-drawer-footer {
    padding: 8px;
  }

  .m-footer-btn {
    height: 40px;
  }

  main.container {
    padding-top: 60px !important;
  }
}

/* ---------- SAFE AREA (Notched Devices) ---------- */
@supports (padding-top: env(safe-area-inset-top)) {
  .mobile-header {
    padding-top: env(safe-area-inset-top);
    height: calc(var(--mobile-header-height) + env(safe-area-inset-top));
  }

  .m-drawer {
    padding-top: env(safe-area-inset-top);
  }

  .m-drawer-footer {
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }

  @media (max-width: 767px) {
    main.container {
      padding-top: calc(var(--mobile-header-height) + env(safe-area-inset-top) + 16px) !important;
    }
  }
}

/* ---------- SMOOTH BODY LOCK ---------- */
body.m-nav-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

/* ---------- PRINT: HIDE MOBILE NAV ---------- */
@media print {
  .mobile-header,
  .m-drawer,
  .m-drawer-overlay,
  .m-user-dropdown {
    display: none !important;
  }
}