/* ===== Masjid Digital Dashboard - Design System ===== */

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

/* ===== CSS Custom Properties ===== */
:root {
  /* Primary Palette - Sapphire Blue Theme */
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-200: #bfdbfe;
  --primary-300: #93c5fd;
  --primary-400: #60a5fa;
  --primary-500: #2563eb;
  --primary-600: #1d4ed8;
  --primary-700: #1e40af;
  --primary-800: #1e3a8a;
  --primary-900: #172554;

  /* Neutral / Dark Theme values */
  --dark-50: #f8fafc;
  --dark-100: #f1f5f9;
  --dark-200: #e2e8f0;
  --dark-300: #cbd5e1;
  --dark-400: #94a3b8;
  --dark-500: #64748b;
  --dark-600: #475569;
  --dark-700: #334155;
  --dark-800: #1e293b;
  --dark-900: #0f172a;
  --dark-950: #020617;

  /* Accent Colors */
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --red-400: #f87171;
  --red-500: #ef4444;
  --green-400: #4ade80;
  --green-500: #22c55e;
  --blue-400: #60a5fa;
  --blue-500: #3b82f6;

  /* Default Light Mode Surfaces */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(255, 255, 255, 0.95);
  --bg-input: #ffffff;
  --bg-sidebar: #0b0f19;

  /* Borders */
  --border-color: rgba(226, 232, 240, 0.9);
  --border-glow: rgba(37, 99, 235, 0.2);

  /* Text */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
  --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.05);

  /* Typography */
  --font-primary: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Spacing */
  --sidebar-width: 260px;
}

body.dark-theme {
  --bg-primary: #020617;
  --bg-secondary: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.8);
  --bg-card-hover: rgba(30, 41, 59, 0.9);
  --bg-input: rgba(15, 23, 42, 0.6);
  --bg-sidebar: rgba(2, 6, 23, 0.95);

  --border-color: rgba(51, 65, 85, 0.5);
  --border-glow: rgba(37, 99, 235, 0.3);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.15);
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--dark-600);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--dark-500);
}

/* ===== Layout ===== */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform var(--transition-base);
  backdrop-filter: blur(20px);
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-logo {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
}

.sidebar-brand {
  display: flex;
  flex-direction: column;
}

.sidebar-brand-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.sidebar-brand-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.sidebar-nav {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
}

.nav-section {
  margin-bottom: 8px;
}

.nav-section-title {
  padding: 8px 12px 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: all var(--transition-fast);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.nav-item:hover {
  background: rgba(51, 65, 85, 0.4);
  color: var(--text-primary);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.15), rgba(13, 148, 136, 0.1));
  color: var(--primary-400);
  border: 1px solid rgba(20, 184, 166, 0.2);
}

.nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.7;
}

.nav-item.active svg {
  opacity: 1;
}

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--border-color);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(51, 65, 85, 0.2);
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary-600), var(--primary-800));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

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

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 11px;
  color: var(--text-muted);
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
}

.page-header {
  padding: 12px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--bg-secondary);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.page-body {
  padding: 28px 32px;
}

/* ===== Cards ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  transition: all var(--transition-base);
}

.card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
}

.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.card-body {
  padding: 22px;
}

.card-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* Stat Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  backdrop-filter: blur(12px);
  transition: all var(--transition-base);
}

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

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 14px;
}

.stat-icon.teal {
  background: rgba(20, 184, 166, 0.15);
  color: var(--primary-400);
}

.stat-icon.amber {
  background: rgba(251, 191, 36, 0.15);
  color: var(--amber-400);
}

.stat-icon.blue {
  background: rgba(96, 165, 250, 0.15);
  color: var(--blue-400);
}

.stat-icon.green {
  background: rgba(74, 222, 128, 0.15);
  color: var(--green-400);
}

.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-family: var(--font-primary);
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  text-decoration: none;
  line-height: 1.4;
}

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

.btn svg {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  color: white;
  border-color: var(--primary-600);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
  box-shadow: 0 0 20px rgba(20, 184, 166, 0.3);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--dark-700);
  color: var(--text-primary);
  border-color: var(--dark-600);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--dark-600);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red-400);
  border-color: rgba(239, 68, 68, 0.3);
}

.btn-danger:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.25);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(51, 65, 85, 0.4);
  color: var(--text-primary);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-lg {
  padding: 12px 24px;
  font-size: 15px;
}

/* ===== Forms ===== */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-primary);
  font-size: 14px;
  transition: all var(--transition-fast);
  outline: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
}

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

.form-textarea {
  min-height: 80px;
  resize: vertical;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary-500);
}

/* ===== Tables ===== */
.table-wrapper {
  overflow-x: auto;
}

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

.data-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.data-table td {
  padding: 14px 16px;
  font-size: 13.5px;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(51, 65, 85, 0.2);
}

.data-table tr:hover td {
  background: rgba(51, 65, 85, 0.15);
  color: var(--text-primary);
}

/* ===== Badge ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-success {
  background: rgba(74, 222, 128, 0.15);
  color: var(--green-400);
}

.badge-danger {
  background: rgba(248, 113, 113, 0.15);
  color: var(--red-400);
}

.badge-warning {
  background: rgba(251, 191, 36, 0.15);
  color: var(--amber-400);
}

.badge-info {
  background: rgba(96, 165, 250, 0.15);
  color: var(--blue-400);
}

.badge-neutral {
  background: rgba(148, 163, 184, 0.15);
  color: var(--dark-400);
}

/* Status dot */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  display: inline-block;
}

.status-dot.online {
  background: var(--green-400);
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.6);
  animation: pulse-green 2s ease-in-out infinite;
}

.status-dot.offline {
  background: var(--dark-500);
}

@keyframes pulse-green {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  width: 90%;
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
  transform: translateY(20px) scale(0.95);
  transition: transform var(--transition-base);
}

.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 17px;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--bg-primary);
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ===== Toast / Notification ===== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--dark-800);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 300px;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.3s ease-out;
  font-size: 13.5px;
}

.toast.success {
  border-left: 3px solid var(--green-400);
}

.toast.error {
  border-left: 3px solid var(--red-400);
}

.toast.info {
  border-left: 3px solid var(--blue-400);
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ===== Login Page ===== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  position: relative;
  overflow: hidden;
}

.login-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(20, 184, 166, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(13, 148, 136, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(15, 118, 110, 0.04) 0%, transparent 50%);
}

.login-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  padding: 40px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(20px);
}

.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 32px;
}

.login-logo-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  color: white;
}

.login-logo-text {
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-300), var(--primary-500));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-title {
  text-align: center;
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

/* ===== Empty State ===== */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.empty-state-text {
  font-size: 13px;
  margin-bottom: 20px;
}

/* ===== Pairing Code Display ===== */
.pairing-code {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 4px;
  color: var(--primary-400);
  text-align: center;
  padding: 20px;
  background: rgba(20, 184, 166, 0.08);
  border: 2px dashed rgba(20, 184, 166, 0.3);
  border-radius: var(--radius-lg);
}

/* ===== Grid Layouts ===== */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* ===== Actions ===== */
.action-group {
  display: flex;
  gap: 6px;
}

/* ===== Loading ===== */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-top-color: var(--primary-500);
  border-radius: var(--radius-full);
  animation: spin 0.6s linear infinite;
}

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

.loading-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

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

  .main-content {
    margin-left: 0;
  }

  .page-header {
    padding: 10px 16px;
  }

  .page-body {
    padding: 20px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ===== Animations ===== */
.fade-in {
  animation: fadeIn 0.4s ease-out;
}

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

/* ===== Hamburger for mobile ===== */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 8px;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
}

/* ===== Tab Navigation ===== */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
}

.tab {
  padding: 10px 18px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
}

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

.tab.active {
  color: var(--primary-400);
  border-bottom-color: var(--primary-500);
}

/* ===== Sidebar overlay for mobile ===== */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 90;
}

@media (max-width: 768px) {
  .sidebar.open ~ .sidebar-overlay {
    display: block;
  }
}

/* Utility */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.gap-2 { gap: 8px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* Sidebar dark mode override to keep sidebar high-contrast and beautiful in light mode */
.sidebar {
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-color: rgba(51, 65, 85, 0.4);
  background: var(--bg-sidebar) !important;
}
.sidebar .nav-item {
  color: #94a3b8 !important;
}
.sidebar .nav-item:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}
.sidebar .nav-item.active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(37, 99, 235, 0.1)) !important;
  color: #60a5fa !important;
  border: 1px solid rgba(37, 99, 235, 0.3) !important;
}

/* Mobile Bottom Navigation Footer Menu */
.mobile-footer-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 64px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
  z-index: 999;
  align-items: center;
  justify-content: space-around;
  padding: 0 12px;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  transition: all 0.2s;
  flex: 1;
  height: 100%;
}

.mobile-nav-item svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
  stroke: currentColor;
}

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

/* Media queries for responsive layouts */
@media (max-width: 768px) {
  .sidebar {
    display: none !important; /* Hide sidebar entirely on mobile in favor of bottom bar */
  }
  .main-content {
    margin-left: 0 !important;
    padding-bottom: 80px !important; /* Space for the bottom footer nav */
  }
  .mobile-footer-nav {
    display: flex !important;
  }
  .header-left #menuToggle {
    display: none !important; /* Hide hamburger menu since we have bottom bar navigation */
  }
}

/* Bolder Typography Adjustments */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.page-title {
  font-size: 24px;
  font-weight: 800;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
}

/* Theme Toggle Button style in dashboard */
.theme-toggle-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
}
