/* ============================================================
   Marcador HH — Design System
   Fuente: Inter (Google Fonts)
   Modos: dark (default) / light
   ============================================================ */

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

/* ============================================================
   Variables CSS — Dark Mode (default)
   ============================================================ */
:root {
  /* Backgrounds */
  --bg-base:      #080b14;
  --bg-surface:   #0f1320;
  --bg-surface2:  #161c2e;
  --bg-surface3:  #1d2540;
  --bg-overlay:   rgba(8, 11, 20, 0.85);

  /* Brand / Accent */
  --accent:       #6366f1;
  --accent-light: #818cf8;
  --accent-dark:  #4f46e5;
  --accent-glow:  rgba(99, 102, 241, 0.35);

  /* Semantic colors */
  --success:      #10b981;
  --success-glow: rgba(16, 185, 129, 0.35);
  --danger:       #ef4444;
  --danger-glow:  rgba(239, 68, 68, 0.35);
  --warning:      #f59e0b;
  --info:         #38bdf8;

  /* Text */
  --text:         #f1f5f9;
  --text-muted:   #94a3b8;
  --text-subtle:  #475569;

  /* Borders */
  --border:       rgba(255, 255, 255, 0.07);
  --border-hover: rgba(255, 255, 255, 0.15);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.4);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.6);

  /* Radius */
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  28px;
  --radius-full: 9999px;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur:  0.22s;
}

/* ============================================================
   Light Mode
   ============================================================ */
[data-theme="light"] {
  --bg-base:     #f0f4ff;
  --bg-surface:  #ffffff;
  --bg-surface2: #f5f7ff;
  --bg-surface3: #eaedfc;
  --bg-overlay:  rgba(240, 244, 255, 0.9);

  --accent:       #4f46e5;
  --accent-light: #6366f1;
  --accent-dark:  #3730a3;
  --accent-glow:  rgba(79, 70, 229, 0.2);

  --success-glow: rgba(16, 185, 129, 0.2);
  --danger-glow:  rgba(239, 68, 68, 0.2);

  --text:         #0f172a;
  --text-muted:   #475569;
  --text-subtle:  #94a3b8;

  --border:       rgba(0, 0, 0, 0.07);
  --border-hover: rgba(0, 0, 0, 0.15);

  --shadow-sm: 0 2px 8px rgba(79,70,229,0.08);
  --shadow-md: 0 8px 32px rgba(79,70,229,0.12);
  --shadow-lg: 0 20px 60px rgba(79,70,229,0.15);
}

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

html { font-size: 16px; height: 100%; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background-color: var(--bg-base);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

/* Background mesh gradient */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 20%, rgba(99,102,241,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(16,185,129,0.08) 0%, transparent 60%);
  pointer-events: none;
}

/* ============================================================
   Views
   ============================================================ */
.view { position: relative; z-index: 1; display: none; min-height: 100vh; }
.view.active { display: flex; }

/* ============================================================
   LOGIN VIEW
   ============================================================ */
#view-login {
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px);
  animation: slideUp 0.5s var(--ease);
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo-icon {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 16px;
  box-shadow: 0 8px 24px var(--accent-glow);
}

.login-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--text), var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  outline: none;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  letter-spacing: 0.05em;
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-input::placeholder { color: var(--text-subtle); font-weight: 400; }

/* PIN input — centrado, mayor tamaño */
.pin-input {
  text-align: center;
  font-size: 1.5rem;
  letter-spacing: 0.3em;
  font-weight: 700;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-dark), var(--accent), var(--accent-light));
  background-size: 200% 200%;
  color: #fff;
  width: 100%;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
  background-position: 100% 100%;
  box-shadow: 0 6px 28px var(--accent-glow);
  transform: translateY(-1px);
}

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

.btn-secondary {
  background: var(--bg-surface2);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-surface3);
  border-color: var(--border-hover);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

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

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

.btn-success:hover { background: rgba(16, 185, 129, 0.2); }

.btn-sm { padding: 7px 14px; font-size: 0.82rem; border-radius: var(--radius-sm); }

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-sm);
}

.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; }

/* ============================================================
   ANALYST VIEW
   ============================================================ */
#view-analyst { flex-direction: column; }

/* Header */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.header-brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

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

.user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--bg-surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
}

.user-avatar {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

/* ============================================================
   Theme Toggle
   ============================================================ */
.theme-toggle {
  width: 40px;
  height: 40px;
  background: var(--bg-surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all var(--dur) var(--ease);
}

.theme-toggle:hover { background: var(--bg-surface3); border-color: var(--border-hover); }

/* ============================================================
   PULSE BUTTON — El corazón de la app
   ============================================================ */
.analyst-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  gap: 40px;
}

.pulse-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Anillos de pulso */
.pulse-ring {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}

.pulse-ring-1 { width: 260px; height: 260px; }
.pulse-ring-2 { width: 300px; height: 300px; }

/* Estado INACTIVO: acento indigo */
.pulse-btn {
  position: relative;
  z-index: 2;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  transition: transform 0.15s var(--ease), box-shadow 0.3s var(--ease);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  background: radial-gradient(circle at 35% 35%,
    rgba(255,255,255,0.15),
    transparent 60%),
    linear-gradient(135deg, var(--accent-dark), var(--accent), var(--accent-light));
  box-shadow:
    0 0 0 4px rgba(99,102,241,0.2),
    0 20px 60px rgba(99,102,241,0.45),
    inset 0 1px 1px rgba(255,255,255,0.2);
}

.pulse-btn:hover { transform: scale(1.04); }
.pulse-btn:active { transform: scale(0.97); }

.pulse-btn.running {
  background: radial-gradient(circle at 35% 35%,
    rgba(255,255,255,0.18),
    transparent 60%),
    linear-gradient(135deg, #059669, var(--success), #34d399);
  box-shadow:
    0 0 0 4px rgba(16,185,129,0.2),
    0 20px 60px rgba(16,185,129,0.5),
    inset 0 1px 1px rgba(255,255,255,0.25);
}

.pulse-btn-icon {
  font-size: 3rem;
  line-height: 1;
}

.pulse-btn-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Anillos de pulso — estado inactivo */
.pulse-btn:not(.running) ~ .pulse-ring {
  border: 2px solid var(--accent);
}

/* Anillos de pulso — estado activo */
.pulse-btn.running ~ .pulse-ring {
  border: 2px solid var(--success);
}

/* Animación pulso lento (inactivo) */
@keyframes pulseIdle1 {
  0%   { transform: scale(0.95); opacity: 0.5; }
  70%  { transform: scale(1.2);  opacity: 0; }
  100% { transform: scale(1.2);  opacity: 0; }
}

@keyframes pulseIdle2 {
  0%   { transform: scale(0.95); opacity: 0.3; }
  70%  { transform: scale(1.3);  opacity: 0; }
  100% { transform: scale(1.3);  opacity: 0; }
}

/* Animación pulso rápido (activo) */
@keyframes pulseActive1 {
  0%   { transform: scale(0.95); opacity: 0.6; }
  50%  { transform: scale(1.15); opacity: 0; }
  100% { transform: scale(1.15); opacity: 0; }
}

@keyframes pulseActive2 {
  0%   { transform: scale(0.95); opacity: 0.4; }
  50%  { transform: scale(1.28); opacity: 0; }
  100% { transform: scale(1.28); opacity: 0; }
}

.pulse-ring-1.idle  { animation: pulseIdle1   2.5s ease-out infinite; }
.pulse-ring-2.idle  { animation: pulseIdle2   2.5s ease-out infinite 0.4s; }
.pulse-ring-1.active { animation: pulseActive1 1.2s ease-out infinite; }
.pulse-ring-2.active { animation: pulseActive2 1.2s ease-out infinite 0.2s; }

/* ============================================================
   Cronómetro
   ============================================================ */
.timer-display {
  font-size: 3.5rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, var(--success), #34d399);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.timer-display.visible { opacity: 1; transform: translateY(0); }

.timer-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-top: -8px;
}

/* Status pill */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.status-pill.idle {
  background: rgba(99,102,241,0.12);
  color: var(--accent-light);
  border: 1px solid rgba(99,102,241,0.25);
}

.status-pill.running {
  background: rgba(16,185,129,0.12);
  color: var(--success);
  border: 1px solid rgba(16,185,129,0.25);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.status-pill.running .status-dot { animation: blink 1s ease-in-out infinite; }

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

/* ============================================================
   History Panel (Analyst)
   ============================================================ */
.analyst-history {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px 40px;
}

.section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ============================================================
   MANAGER VIEW
   ============================================================ */
#view-manager { flex-direction: column; }

.manager-content {
  flex: 1;
  padding: 28px 32px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

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

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.stat-card.accent::before  { background: linear-gradient(90deg, var(--accent-dark), var(--accent-light)); }
.stat-card.green::before   { background: linear-gradient(90deg, #059669, #34d399); }
.stat-card.warning::before { background: linear-gradient(90deg, #d97706, var(--warning)); }
.stat-card.info::before    { background: linear-gradient(90deg, #0369a1, var(--info)); }

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

.stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1;
}

.stat-sub {
  font-size: 0.78rem;
  color: var(--text-subtle);
}

.stat-icon {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 24px;
  opacity: 0.25;
}

/* Chart */
.chart-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 28px;
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.chart-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.chart-wrapper { height: 240px; position: relative; }

/* Tabs */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-surface2);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
}

.tab-btn {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}

.tab-btn.active {
  background: var(--bg-surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

/* Panel card */
.panel-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* Filter bar */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 16px 20px;
  background: var(--bg-surface2);
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.filter-input {
  padding: 8px 14px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.875rem;
  outline: none;
  transition: border-color var(--dur) var(--ease);
  min-width: 0;
}

.filter-input:focus { border-color: var(--accent); }

.filter-select {
  padding: 8px 14px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.875rem;
  outline: none;
  cursor: pointer;
}

/* ============================================================
   Table
   ============================================================ */
.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

thead tr { border-bottom: 1px solid var(--border); }

th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  white-space: nowrap;
}

td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg-surface2); }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.badge-running   { background: rgba(99,102,241,0.15);  color: var(--accent-light); }
.badge-completed { background: rgba(245,158,11,0.15);  color: var(--warning); }
.badge-validated { background: rgba(16,185,129,0.15);  color: var(--success); }
.badge-manager   { background: rgba(56,189,248,0.15);  color: var(--info); }
.badge-analyst   { background: rgba(99,102,241,0.12);  color: var(--accent-light); }
.badge-active    { background: rgba(16,185,129,0.12);  color: var(--success); }
.badge-inactive  { background: rgba(239,68,68,0.12);   color: var(--danger); }

/* Actions cell */
.actions { display: flex; gap: 6px; }

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

.empty-state-icon { font-size: 3rem; margin-bottom: 12px; opacity: 0.5; }
.empty-state p { font-size: 0.9rem; }

/* ============================================================
   MODAL
   ============================================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  backdrop-filter: blur(8px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease);
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  width: 100%;
  max-width: 500px;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.25s var(--ease);
}

.modal-backdrop.open .modal { transform: translateY(0) scale(1); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.modal-close {
  width: 32px;
  height: 32px;
  background: var(--bg-surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-muted);
  transition: all var(--dur) var(--ease);
}

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

.modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
}

/* ============================================================
   Misc
   ============================================================ */
.divider {
  height: 1px;
  background: var(--border);
  margin: 24px 0;
}

.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--text-muted); font-size: 0.875rem; }

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  max-width: 320px;
  box-shadow: var(--shadow-md);
  animation: toastIn 0.3s var(--ease), toastOut 0.3s var(--ease) forwards;
  animation-delay: 0s, 3.5s;
  pointer-events: all;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast-success { background: #065f46; color: #6ee7b7; border: 1px solid rgba(16,185,129,0.3); }
.toast-error   { background: #7f1d1d; color: #fca5a5; border: 1px solid rgba(239,68,68,0.3); }
.toast-info    { background: #1e1b4b; color: #a5b4fc; border: 1px solid rgba(99,102,241,0.3); }

@keyframes toastIn  { from { opacity:0; transform:translateX(20px); } to { opacity:1; transform:none; } }
@keyframes toastOut { from { opacity:1; } to { opacity:0; transform:translateX(20px); } }

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

/* Skeleton loader */
.skeleton {
  background: linear-gradient(90deg, var(--bg-surface2) 0%, var(--bg-surface3) 50%, var(--bg-surface2) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
}

@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* Animations */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.animate-fade { animation: fadeIn 0.35s var(--ease); }

/* Responsive */
@media (max-width: 640px) {
  .manager-content { padding: 20px 16px; }
  .filter-bar { gap: 8px; }
  .filter-input, .filter-select { font-size: 0.8rem; }
  th, td { padding: 10px 12px; }
  .pulse-btn { width: 180px; height: 180px; }
  .timer-display { font-size: 2.75rem; }
  .login-card { padding: 36px 24px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 400px) {
  .stats-grid { grid-template-columns: 1fr; }
}
