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

/* ============ RESET & BASE ============ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Hide number input spinners/arrows */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
}

:root {
  --bg-base: #030712;
  --bg-surface: rgba(15, 23, 42, 0.5);
  --bg-elevated: rgba(15, 23, 42, 0.7);
  --bg-hover: rgba(99, 102, 241, 0.06);
  --border: rgba(99, 102, 241, 0.08);
  --border-hover: rgba(99, 102, 241, 0.2);
  --border-active: rgba(99, 102, 241, 0.35);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #475569;
  --accent: #818cf8;
  --accent-dim: #6366f1;
  --accent-glow: rgba(99, 102, 241, 0.35);
  --cyan: #22d3ee;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #f87171;
  --pink: #f472b6;
  --radius: 16px;
  --radius-sm: 10px;
  --blur: blur(20px);
}

body {
  font-family: 'Fira Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at 20% -5%, rgba(99, 102, 241, 0.10) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(34, 211, 238, 0.04) 0%, transparent 40%);
}

.hidden { display: none !important; }

/* ============ LOADING SCREEN ============ */
#loadingScreen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg-base);
}
.loading-spinner {
  text-align: center;
}
.loading-spinner p {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 16px;
  letter-spacing: 0.5px;
}
.spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============ LOGIN ============ */
.screen { width: 100%; }

#loginScreen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(99, 102, 241, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 80%, rgba(34, 211, 238, 0.06) 0%, transparent 45%),
    var(--bg-base);
}

.login-card {
  background: var(--bg-elevated);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border-hover);
  border-radius: 24px;
  padding: 56px 48px;
  text-align: center;
  max-width: 420px;
  width: 90%;
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.5),
    0 0 60px rgba(99, 102, 241, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.login-card h1 {
  font-size: 32px;
  font-weight: 800;
  background: linear-gradient(135deg, #a5b4fc, #22d3ee);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.login-card p {
  color: var(--text-muted);
  margin-bottom: 32px;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.3px;
}

.error {
  color: var(--red);
  font-size: 13px;
  margin-top: 12px;
}

/* ============ BUTTONS ============ */
.btn {
  padding: 11px 22px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  transition: all 0.2s ease;
  letter-spacing: 0.2px;
}

.btn-primary {
  background: linear-gradient(135deg, #6366f1, #8b5cf6, #a78bfa);
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow), 0 0 50px rgba(99, 102, 241, 0.1);
}

.btn-success {
  background: linear-gradient(135deg, #22c55e, #10b981);
  color: #fff;
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.25);
}
.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(34, 197, 94, 0.3);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.25);
}
.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(239, 68, 68, 0.3);
}

.btn-small {
  padding: 8px 16px;
  font-size: 12px;
  background: var(--bg-surface);
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 8px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.btn-small:hover {
  background: var(--bg-hover);
  border-color: var(--border-active);
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.08);
}

/* ============ HEADER ============ */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 32px;
  background: var(--bg-surface);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-left h1 {
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(135deg, #a5b4fc, #22d3ee);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.3px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

#adminEmail {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 400;
}

/* ============ TABS ============ */
.tab-bar {
  display: flex;
  gap: 0;
  background: var(--bg-surface);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  position: sticky;
  top: 58px;
  z-index: 40;
}

.tab {
  padding: 14px 28px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.2s;
  position: relative;
  letter-spacing: 0.3px;
}

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

.tab.active { color: var(--accent); }

.tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  border-radius: 1px;
  box-shadow: 0 0 14px var(--accent-glow), 0 0 6px var(--accent-glow);
}

.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.3s ease; }

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

/* ============ STATS BAR ============ */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 24px 32px 8px;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.3), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.stat-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2), 0 0 30px rgba(99, 102, 241, 0.05);
}

.stat-card:hover::before { opacity: 1; }

.stat-value {
  font-family: 'Fira Code', 'JetBrains Mono', monospace;
  font-size: 30px;
  font-weight: 700;
  background: linear-gradient(135deg, #e0e7ff, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ============ SECTION TITLE ============ */
.section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 28px 32px 12px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

/* ============ CHARTS ============ */
.charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 16px 32px 0;
}

.charts-row:has(.chart-card-small) {
  grid-template-columns: 1fr;
  max-width: 480px;
}

.chart-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
  height: 280px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.2s;
}

.chart-card:hover { border-color: var(--border-hover); }

.chart-card-small { height: 300px; }

.chart-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

/* ============ TOOLBAR ============ */
.toolbar {
  display: flex;
  gap: 12px;
  padding: 20px 32px;
}

.toolbar input,
.toolbar select {
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.2s;
}

.toolbar input:focus,
.toolbar select:focus {
  outline: none;
  border-color: var(--border-active);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1), 0 0 16px rgba(99, 102, 241, 0.06);
}

.toolbar input { flex: 1; }
.toolbar input::placeholder { color: var(--text-muted); }

/* ============ TABLE ============ */
.table-container {
  padding: 0 32px 32px;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

thead th {
  padding: 14px 16px;
  text-align: left;
  background: rgba(99, 102, 241, 0.05);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}

tbody td {
  padding: 13px 16px;
  border-top: 1px solid rgba(99, 102, 241, 0.04);
  font-size: 13px;
  white-space: nowrap;
}

tbody tr { transition: background 0.15s; }
tbody tr:hover { background: var(--bg-hover); }

.loading {
  text-align: center;
  padding: 48px;
  color: var(--text-muted);
  font-style: italic;
}

/* ============ STATUS BADGES ============ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.badge-active {
  background: rgba(34, 197, 94, 0.10);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.15);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.08);
}
.badge-trial {
  background: rgba(251, 191, 36, 0.10);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.15);
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.08);
}
.badge-expired {
  background: rgba(239, 68, 68, 0.10);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.15);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.08);
}
.badge-inactive {
  background: rgba(100, 116, 139, 0.10);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.15);
}
.badge-flagged {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.2);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.1);
}
.badge-free {
  background: rgba(34, 211, 238, 0.10);
  color: #67e8f9;
  border: 1px solid rgba(34, 211, 238, 0.15);
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.08);
}
.badge-paused {
  background: rgba(251, 146, 60, 0.10);
  color: #fb923c;
  border: 1px solid rgba(251, 146, 60, 0.15);
  box-shadow: 0 0 8px rgba(251, 146, 60, 0.08);
}

/* ============ PROVIDER DOTS ============ */
.provider-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 8px;
  box-shadow: 0 0 8px currentColor;
}

.provider-openai { background: #10b981; color: #10b981; }
.provider-deepseek { background: #818cf8; color: #818cf8; }
.provider-gemini { background: #f59e0b; color: #f59e0b; }
.provider-claude { background: #ec4899; color: #ec4899; }
.provider-grok { background: #ef4444; color: #ef4444; }

/* ============ SHARE BAR ============ */
.share-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.share-bar-track {
  flex: 1;
  height: 5px;
  background: rgba(99, 102, 241, 0.06);
  border-radius: 3px;
  overflow: hidden;
  max-width: 120px;
}

.share-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
}

.share-bar-fill.openai { background: linear-gradient(90deg, #10b981, #34d399); box-shadow: 0 0 6px rgba(16, 185, 129, 0.3); }
.share-bar-fill.deepseek { background: linear-gradient(90deg, #6366f1, #818cf8); box-shadow: 0 0 6px rgba(99, 102, 241, 0.3); }
.share-bar-fill.gemini { background: linear-gradient(90deg, #f59e0b, #fbbf24); box-shadow: 0 0 6px rgba(245, 158, 11, 0.3); }
.share-bar-fill.claude { background: linear-gradient(90deg, #ec4899, #f472b6); box-shadow: 0 0 6px rgba(236, 72, 153, 0.3); }
.share-bar-fill.grok { background: linear-gradient(90deg, #ef4444, #f87171); box-shadow: 0 0 6px rgba(239, 68, 68, 0.3); }

/* ============ KEY HEALTH ============ */
.status-healthy { color: var(--green); font-weight: 600; }
.status-dead { color: var(--red); font-weight: 700; }
.status-cooldown { color: var(--amber); font-weight: 600; }

/* ============ MODAL ============ */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: fadeIn 0.2s ease;
}

.modal-content {
  background: #0c1029;
  border: 1px solid var(--border-hover);
  border-radius: 20px;
  width: 620px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow:
    0 32px 100px rgba(0, 0, 0, 0.6),
    0 0 60px rgba(99, 102, 241, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

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

.modal-header h2 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  transition: all 0.15s;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}
.modal-close:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.modal-body { padding: 28px; }

.modal-body h3 {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  margin: 28px 0 14px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.detail-item { margin-bottom: 8px; }

.detail-item label {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 4px;
  font-weight: 600;
}

.detail-item span { font-size: 14px; }

.monospace {
  font-family: 'Fira Code', 'JetBrains Mono', 'SF Mono', monospace;
  font-size: 12px !important;
  word-break: break-all;
  color: #a5b4fc;
}

.action-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.action-row select,
.action-row input {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(3, 7, 18, 0.8);
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  transition: border-color 0.2s;
}

.action-row select:focus,
.action-row input:focus {
  outline: none;
  border-color: var(--border-active);
}

.action-row input[type="number"] { width: 120px; }

/* ============ AUDIT LOG ============ */
.audit-ts {
  font-family: 'Fira Code', 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-secondary);
}

.audit-details {
  font-size: 12px;
  color: var(--text-muted);
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============ BULK ACTION BAR ============ */
.bulk-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 32px;
  background: rgba(99, 102, 241, 0.05);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fadeIn 0.2s ease;
}

.bulk-bar span {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  min-width: 90px;
}

.bulk-bar select,
.bulk-bar input {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
}

.bulk-bar input[type="number"] { width: 80px; }

/* ============ CHECKBOXES ============ */
.user-cb,
#selectAllCb {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #6366f1;
}

/* ============ COST COLORS ============ */
.cost-green { color: var(--green); font-weight: 600; }
.cost-yellow { color: var(--amber); font-weight: 600; }
.cost-red { color: var(--red); font-weight: 600; }

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.12);
  border-radius: 3px;
  transition: background 0.2s;
}
::-webkit-scrollbar-thumb:hover { background: rgba(99, 102, 241, 0.3); }

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============ SETTINGS TAB ============ */
.settings-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 24px 32px;
}
.settings-container h2 {
  font-size: 20px;
  margin-bottom: 24px;
  color: var(--accent);
}
.settings-section {
  margin-bottom: 28px;
}
.settings-section h3 {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.settings-field label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.settings-field input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(3, 7, 18, 0.8);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  box-sizing: border-box;
}
.settings-field input:focus {
  outline: none;
  border-color: var(--border-active);
}
.tier-row {
  display: grid;
  grid-template-columns: 1fr 1fr 80px 80px 36px;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}
.tier-row input {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(3, 7, 18, 0.8);
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
}
.tier-row input:focus {
  outline: none;
  border-color: var(--border-active);
}
.tier-row .remove-tier-btn { width: 36px; padding: 6px; }
.save-status {
  margin-left: 12px;
  font-size: 13px;
  color: #4ade80;
}
.field-hint {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.4;
}
.tier-header {
  display: grid;
  grid-template-columns: 1fr 1fr 80px 80px 36px;
  gap: 8px;
  margin-bottom: 8px;
  padding: 0 0 6px;
  border-bottom: 1px solid var(--border);
}
.tier-header span {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding-left: 13px;
}
.tier-header span:last-child { padding-left: 0; }

/* ============ EDITABLE MODAL FIELDS ============ */
.editable-input {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(3, 7, 18, 0.8);
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
}
.editable-input:focus {
  outline: none;
  border-color: var(--border-active);
}
.editable-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.editable-usage {
  display: flex;
  align-items: center;
  gap: 8px;
}
.usage-input {
  width: 100px;
  flex-shrink: 0;
}
.usage-limit {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}
.save-user-btn {
  width: 100%;
  margin-top: 20px;
  padding: 12px;
  font-size: 14px;
}
.btn-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}
.btn-warning:hover { opacity: 0.9; }
.pause-info {
  font-size: 12px;
  color: #fb923c;
  padding: 8px 0;
}

/* ============ CUSTOM CONFIRM MODAL ============ */
.confirm-modal {
  width: 380px;
  max-height: none;
  border-radius: 16px;
  overflow: hidden;
}
.confirm-body {
  padding: 28px 28px 20px;
}
.confirm-body p {
  font-size: 15px;
  color: var(--text-primary);
  line-height: 1.5;
  text-align: center;
}
.confirm-actions {
  display: flex;
  gap: 10px;
  padding: 0 28px 24px;
  justify-content: center;
}
.confirm-actions .btn {
  min-width: 100px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  .stats-bar { grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 16px; }
  .charts-row { grid-template-columns: 1fr; padding: 12px 16px 0; }
  .toolbar { flex-wrap: wrap; padding: 12px 16px; }
  .detail-grid { grid-template-columns: 1fr; }
  .modal-content { width: 95%; margin: 10px; border-radius: var(--radius); }
  .tab-bar { overflow-x: auto; padding: 0 16px; }
  .tab { white-space: nowrap; padding: 14px 20px; }
  header { padding: 14px 16px; }
  .table-container { padding: 0 16px 16px; }
  .section-title { padding: 20px 16px 10px; }
  .bulk-bar { padding: 12px 16px; flex-wrap: wrap; }
}

@media (max-width: 480px) {
  .stats-bar { grid-template-columns: 1fr; }
  .stat-value { font-size: 24px; }
  .login-card { padding: 40px 28px; }
  .header-right { gap: 8px; }
  #adminEmail { display: none; }
}
