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

:root {
  --primary: #e94560;
  --primary-hover: #d63851;
  --primary-light: rgba(233, 69, 96, 0.12);
  --primary-glow: rgba(233, 69, 96, 0.25);
  --success: #10b981;
  --success-light: rgba(16, 185, 129, 0.12);
  --danger: #ef4444;
  --danger-light: rgba(239, 68, 68, 0.12);
  --warning: #f59e0b;
  --warning-light: rgba(245, 158, 11, 0.12);
  --info: #38bdf8;
  --info-light: rgba(56, 189, 248, 0.12);

  --bg-body: #0f0f1a;
  --bg-elevated: #1a1a2e;
  --surface: #16213e;
  --surface-hover: #1c2a4a;
  --sidebar-bg: #0d0d1a;
  --sidebar-border: rgba(255, 255, 255, 0.06);
  --sidebar-hover: rgba(255, 255, 255, 0.05);
  --sidebar-text: #64748b;
  --sidebar-active-text: #ffffff;

  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-heading: #f1f5f9;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.04);

  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);

  --sidebar-width-collapsed: 72px;
  --sidebar-width-expanded: 260px;
  --header-height: 60px;

  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --bg-body: #f4f6f9;
  --bg-elevated: #ffffff;
  --surface: #ffffff;
  --surface-hover: #f8fafc;
  --sidebar-bg: #0d0d1a;
  --sidebar-border: rgba(255, 255, 255, 0.06);
  --sidebar-hover: rgba(255, 255, 255, 0.05);
  --sidebar-text: #94a3b8;
  --sidebar-active-text: #ffffff;

  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-heading: #0f172a;
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 24px rgba(0, 0, 0, 0.1);

  --primary-light: rgba(233, 69, 96, 0.08);
  --success-light: rgba(16, 185, 129, 0.08);
  --danger-light: rgba(239, 68, 68, 0.08);
  --warning-light: rgba(245, 158, 11, 0.08);
  --info-light: rgba(56, 189, 248, 0.08);
}

*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-primary);
  font-size: 0.875rem;
  line-height: 1.6;
  min-height: 100vh;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--primary);
  color: #fff;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }
[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); }

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

/* ===== SIDEBAR: Collapsed Icon + Hover Expand ===== */
.app-sidebar {
  width: var(--sidebar-width-collapsed);
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  transition: width var(--transition-normal);
  z-index: 1045;
  border-right: 1px solid var(--sidebar-border);
  overflow: hidden;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
}

.app-sidebar:hover {
  width: var(--sidebar-width-expanded);
}

.app-sidebar:hover .nav-label,
.app-sidebar:hover .sidebar-section-title,
.app-sidebar:hover .brand-text,
.app-sidebar:hover .sidebar-footer-box {
  opacity: 1;
  visibility: visible;
}

.sidebar-brand {
  height: var(--header-height);
  padding: 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--sidebar-border);
  flex-shrink: 0;
  overflow: hidden;
  white-space: nowrap;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary), #c2185b);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  flex-shrink: 0;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-md);
  object-fit: cover;
}

.brand-text {
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
  white-space: nowrap;
  overflow: hidden;
}

.brand-text .brand-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  display: block;
  line-height: 1.2;
}

.brand-text .brand-version {
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.sidebar-nav {
  padding: 0.75rem 0;
  flex: 1;
  list-style: none;
  margin: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-section-title {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 700;
  padding: 0.75rem 1.25rem 0.375rem;
  margin-top: 0.375rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
  white-space: nowrap;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.6rem 1.25rem;
  color: var(--sidebar-text);
  font-weight: 500;
  font-size: 0.8rem;
  border-radius: 0;
  margin: 1px 0;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
}

.sidebar-nav .nav-link:hover {
  color: var(--sidebar-active-text);
  background: var(--sidebar-hover);
}

.sidebar-nav .nav-link.active {
  color: #fff;
  background: linear-gradient(90deg, var(--primary), var(--primary-hover));
}

.sidebar-nav .nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #fff;
  border-radius: 0 2px 2px 0;
}

.sidebar-nav .nav-link i {
  font-size: 1.1rem;
  width: 1.25rem;
  text-align: center;
  flex-shrink: 0;
}

.nav-label {
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
  overflow: hidden;
}

.sidebar-footer-box {
  padding: 0.75rem 1rem;
  margin: 0 0.75rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--sidebar-border);
  background: rgba(255, 255, 255, 0.03);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1040;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.sidebar-backdrop.show {
  opacity: 1;
  visibility: visible;
}

/* ===== MAIN CONTENT ===== */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin-left: var(--sidebar-width-collapsed);
  transition: margin-left var(--transition-normal);
}

.app-header {
  height: var(--header-height);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-color);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.app-body {
  padding: 1.5rem;
  flex: 1;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}

/* ===== CARDS ===== */
.card-pro {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.card-pro:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="light"] .card-pro:hover {
  border-color: #cbd5e1;
}

.card-header {
  background: transparent !important;
  border-bottom: 1px solid var(--border-color) !important;
}

/* ===== STAT CARDS ===== */
.stat-card {
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  transition: transform var(--transition-fast);
}

.stat-card:hover .stat-icon {
  transform: scale(1.05);
}

.stat-icon-indigo { background: var(--primary-light); color: var(--primary); }
.stat-icon-emerald { background: var(--success-light); color: var(--success); }
.stat-icon-rose { background: var(--danger-light); color: var(--danger); }
.stat-icon-amber { background: var(--warning-light); color: var(--warning); }
.stat-icon-sky { background: var(--info-light); color: var(--info); }

.stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-heading);
  letter-spacing: -0.03em;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.06em;
}

/* ===== HERO CARD ===== */
.hero-card {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
}

[data-theme="light"] .hero-card {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4338ca 100%);
}

/* ===== BADGES ===== */
.badge {
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.3em 0.6em;
  border-radius: 9999px;
  font-size: 0.7rem;
}

.badge-active {
  background: var(--success-light);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-unsubscribed, .badge-bounced {
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.badge-warning-custom {
  background: var(--warning-light);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

/* ===== PULSE INDICATOR ===== */
.pulse-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
  animation: pulse-green 2s infinite;
}

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

/* ===== FORMS ===== */
.form-control, .form-select {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  color: var(--text-primary);
  background-color: var(--bg-elevated);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  outline: none;
  background-color: var(--bg-elevated);
  color: var(--text-primary);
}

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

.form-label {
  color: var(--text-secondary);
}

.form-check-input {
  background-color: var(--bg-elevated);
  border-color: var(--border-color);
}

.form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

.input-group-text {
  background: var(--bg-elevated);
  border-color: var(--border-color);
  color: var(--text-muted);
}

/* ===== BUTTONS ===== */
.btn {
  font-weight: 600;
  border-radius: var(--radius-md);
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid transparent;
}

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

.btn-primary:hover, .btn-primary:focus {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  box-shadow: 0 4px 16px var(--primary-glow);
  color: #fff;
}

.btn-outline-primary {
  color: var(--primary);
  border-color: rgba(233, 69, 96, 0.3);
  background: transparent;
}

.btn-outline-primary:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

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

.btn-outline-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--text-muted);
  color: var(--text-primary);
}

[data-theme="light"] .btn-outline-secondary:hover {
  background: #f1f5f9;
}

.btn-outline-info {
  color: var(--info);
  border-color: rgba(56, 189, 248, 0.3);
  background: transparent;
}

.btn-outline-info:hover {
  background: var(--info-light);
  border-color: var(--info);
  color: var(--info);
}

.btn-outline-warning {
  color: var(--warning);
  border-color: rgba(245, 158, 11, 0.3);
  background: transparent;
}

.btn-outline-warning:hover {
  background: var(--warning-light);
  border-color: var(--warning);
  color: var(--warning);
}

.btn-outline-danger {
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.3);
  background: transparent;
}

.btn-outline-danger:hover {
  background: var(--danger-light);
  border-color: var(--danger);
  color: var(--danger);
}

.btn-outline-success {
  color: var(--success);
  border-color: rgba(16, 185, 129, 0.3);
  background: transparent;
}

.btn-outline-success:hover {
  background: var(--success-light);
  border-color: var(--success);
  color: var(--success);
}

.btn-light {
  background: var(--bg-elevated);
  border-color: var(--border-color);
  color: var(--text-primary);
}

.btn-light:hover {
  background: var(--surface-hover);
  color: var(--text-heading);
}

.btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

[data-theme="light"] .btn-close {
  filter: none;
}

/* ===== TABLES ===== */
.table {
  color: var(--text-primary);
  --bs-table-bg: transparent;
  --bs-table-hover-bg: rgba(255, 255, 255, 0.03);
  margin-bottom: 0;
}

[data-theme="light"] .table {
  --bs-table-hover-bg: #f8fafc;
}

.table thead th {
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  border-top: none;
}

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

.table-hover tbody tr:hover td {
  background: var(--bs-table-hover-bg);
}

/* ===== TERMINAL ===== */
.terminal-card {
  background: #080c14;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.terminal-header {
  background: #0c1220;
  padding: 0.625rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.terminal-dots { display: flex; gap: 6px; }
.terminal-dot { width: 10px; height: 10px; border-radius: 50%; }
.terminal-dot-red { background: #ef4444; }
.terminal-dot-yellow { background: #f59e0b; }
.terminal-dot-green { background: #10b981; }

.terminal-box {
  background: #080c14;
  color: #38bdf8;
  font-family: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  height: 300px;
  overflow-y: auto;
  padding: 1rem;
  line-height: 1.6;
}

.terminal-box .log-line {
  margin-bottom: 0.25rem;
  word-break: break-all;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.terminal-box .log-time {
  color: #475569;
  font-size: 0.7rem;
  flex-shrink: 0;
  user-select: none;
}

.terminal-box .log-badge {
  font-size: 0.6rem;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  font-weight: 600;
  flex-shrink: 0;
}

.terminal-box .log-success { color: #34d399; }
.terminal-box .log-error { color: #f87171; }
.terminal-box .log-warn { color: #fbbf24; }
.terminal-box .log-info { color: #38bdf8; }

/* ===== PROGRESS ===== */
.progress {
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

[data-theme="light"] .progress {
  background: #e2e8f0;
}

.progress-bar-animated-custom {
  background-image: linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);
  background-size: 1.25rem 1.25rem;
  animation: progress-bar-stripes 1s linear infinite;
}

/* ===== MERGE TAG PILLS ===== */
.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.55rem;
  font-size: 0.72rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(233, 69, 96, 0.2);
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
  transition: all var(--transition-fast);
}

.tag-pill:hover {
  background: rgba(233, 69, 96, 0.2);
  box-shadow: 0 2px 8px var(--primary-glow);
}

/* ===== ALERTS ===== */
.alert {
  border-radius: var(--radius-md);
  border: none;
  font-size: 0.85rem;
}

.alert-success {
  background: var(--success-light);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-danger {
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ===== MODAL ===== */
.modal-content {
  background: var(--surface);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.modal-header {
  border-bottom-color: var(--border-color);
}

.modal-footer {
  border-top-color: var(--border-color);
}

.modal-title {
  color: var(--text-heading);
}

/* ===== LIST GROUP ===== */
.list-group-item {
  background: transparent;
  border-color: var(--border-light);
  color: var(--text-primary);
}

/* ===== PAGINATION ===== */
.page-link {
  background: var(--bg-elevated);
  border-color: var(--border-color);
  color: var(--text-secondary);
}

.page-link:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
  border-color: var(--border-color);
}

.page-item.active .page-link {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ===== THEME TOGGLE ===== */
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 1rem;
  padding: 0;
}

.theme-toggle:hover {
  color: var(--warning);
  border-color: rgba(245, 158, 11, 0.3);
  background: var(--warning-light);
}

/* ===== USER AVATAR ===== */
.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  border: 1px solid rgba(233, 69, 96, 0.2);
}

/* ===== SECURITY BANNER ===== */
.security-banner {
  background: var(--danger-light);
  border-bottom: 1px solid rgba(239, 68, 68, 0.2);
  color: var(--danger);
  padding: 0.5rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
}

/* ===== DARK-AWARE UTILITY OVERRIDES ===== */
.text-dark { color: var(--text-heading) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.bg-light { background: var(--bg-elevated) !important; }
.bg-white { background: var(--surface) !important; }
.border { border-color: var(--border-color) !important; }
.border-top { border-top-color: var(--border-color) !important; }
.border-bottom { border-bottom-color: var(--border-color) !important; }
.border-light { border-color: var(--border-light) !important; }
.card-footer { background: var(--bg-elevated); border-top-color: var(--border-color); }

.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-info { color: var(--info) !important; }
.bg-primary { background-color: var(--primary) !important; }

.text-white-50 { color: rgba(255, 255, 255, 0.5) !important; }

.font-monospace {
  font-family: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace !important;
}

code {
  color: var(--primary);
  background: var(--primary-light);
  padding: 0.15em 0.35em;
  border-radius: 4px;
  font-size: 0.85em;
}

/* ===== STANDALONE PAGES (Login/Unsubscribe) ===== */
.page-standalone {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: var(--bg-body);
}

.standalone-card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  max-width: 420px;
  width: 100%;
}

/* ===== METRIC BOX (Queue page) ===== */
.metric-box {
  padding: 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  text-align: center;
}

/* ===== RESPONSIVE: MOBILE ===== */
@media (max-width: 991.98px) {
  .app-sidebar {
    width: var(--sidebar-width-expanded) !important;
    transform: translateX(-100%);
    box-shadow: none;
    transition: transform var(--transition-normal);
  }

  .app-sidebar.show {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  .app-sidebar .nav-label,
  .app-sidebar .sidebar-section-title,
  .app-sidebar .brand-text,
  .app-sidebar .sidebar-footer-box {
    opacity: 1 !important;
    visibility: visible !important;
  }

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

  .app-header {
    padding: 0 1rem;
  }

  .app-body {
    padding: 1rem;
  }

  .stat-card {
    padding: 1rem;
  }

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

@media (max-width: 575.98px) {
  .btn {
    padding: 0.4rem 0.65rem;
    font-size: 0.78rem;
  }

  .table thead th, .table tbody td {
    padding: 0.65rem 0.75rem;
    font-size: 0.78rem;
  }

  .app-body {
    padding: 0.75rem;
  }
}
