/* ═══════════════════════════════════════════════════════════════════════════
   CRUISER+ ADMIN PORTAL — Global Styles
   Identidade Visual: Dark Mode + Gradientes Roxo/Magenta/Azul
═══════════════════════════════════════════════════════════════════════════ */

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

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

:root {
  /* Brand Colors */
  --purple-900: #1a0533;
  --purple-800: #2d0a52;
  --purple-700: #4a0e82;
  --purple-600: #6b1faa;
  --purple-500: #8b2fc9;
  --purple-400: #a855f7;
  --purple-300: #c084fc;
  --purple-200: #e9d5ff;

  --magenta-600: #c026d3;
  --magenta-500: #d946ef;
  --magenta-400: #e879f9;
  --magenta-300: #f0abfc;

  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --blue-400: #60a5fa;
  --electric-blue: #00d4ff;
  --electric-blue-dim: rgba(0, 212, 255, 0.15);

  --rose-500: #f43f5e;
  --rose-400: #fb7185;
  --amber-400: #fbbf24;
  --amber-300: #fcd34d;
  --teal-400: #2dd4bf;
  --green-400: #4ade80;
  --green-500: #22c55e;
  --red-500: #ef4444;
  --orange-400: #fb923c;

  /* Surface Colors */
  --bg-primary: #0d0a1a;
  --bg-secondary: #120d22;
  --bg-card: #1a1130;
  --bg-card-hover: #221540;
  --bg-elevated: #261840;
  --bg-input: #1e1538;
  --bg-overlay: rgba(13, 10, 26, 0.92);

  /* Border Colors */
  --border-subtle: rgba(139, 47, 201, 0.2);
  --border-medium: rgba(139, 47, 201, 0.4);
  --border-strong: rgba(168, 85, 247, 0.6);

  /* Text Colors */
  --text-primary: #f0e8ff;
  --text-secondary: #c4b5d8;
  --text-muted: #8873a8;
  --text-dim: #5a4a72;

  /* Gradients */
  --grad-brand: linear-gradient(135deg, #8b2fc9 0%, #d946ef 50%, #3b82f6 100%);
  --grad-brand-subtle: linear-gradient(135deg, rgba(139,47,201,0.15) 0%, rgba(217,70,239,0.15) 100%);
  --grad-card: linear-gradient(145deg, #1a1130 0%, #1e1538 100%);
  --grad-purple: linear-gradient(135deg, #6b1faa 0%, #8b2fc9 100%);
  --grad-magenta: linear-gradient(135deg, #8b2fc9 0%, #d946ef 100%);
  --grad-blue: linear-gradient(135deg, #3b82f6 0%, #00d4ff 100%);
  --grad-rose: linear-gradient(135deg, #f43f5e 0%, #fb923c 100%);
  --grad-teal: linear-gradient(135deg, #2dd4bf 0%, #3b82f6 100%);
  --grad-gold: linear-gradient(135deg, #fbbf24 0%, #f97316 100%);
  --grad-glow: radial-gradient(ellipse at center, rgba(139,47,201,0.3) 0%, transparent 70%);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.5);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.6);
  --shadow-glow-purple: 0 0 20px rgba(139,47,201,0.4);
  --shadow-glow-magenta: 0 0 20px rgba(217,70,239,0.4);
  --shadow-glow-blue: 0 0 20px rgba(59,130,246,0.4);

  /* Spacing */
  --nav-width: 260px;
  --header-height: 64px;

  /* 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: 400ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
}

html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ─── Scrollbar ─────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--purple-700); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--purple-500); }

/* ─── Typography ────────────────────────────────────────────────────────────── */
.font-display { font-family: 'Space Grotesk', sans-serif; }
h1, h2, h3, h4, h5, h6 { font-family: 'Space Grotesk', sans-serif; font-weight: 600; line-height: 1.3; }

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

.sidebar {
  width: var(--nav-width);
  min-height: 100vh;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  z-index: 100;
  transition: transform var(--transition-base);
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 200px;
  background: var(--grad-glow);
  pointer-events: none;
}

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

.logo-icon {
  width: 40px; height: 40px;
  background: var(--grad-brand);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: var(--shadow-glow-purple);
  flex-shrink: 0;
}

.logo-text {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 20px;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.logo-badge {
  font-size: 10px;
  font-weight: 600;
  background: var(--grad-magenta);
  color: white;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
}

.sidebar-section {
  padding: 16px 12px 8px;
}

.sidebar-section-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-dim);
  padding: 0 8px;
  margin-bottom: 6px;
}

.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: 14px;
  font-weight: 500;
  transition: all var(--transition-fast);
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  position: relative;
  overflow: hidden;
}

.nav-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad-brand-subtle);
  opacity: 0;
  transition: opacity var(--transition-fast);
  border-radius: var(--radius-md);
}

.nav-item:hover { color: var(--text-primary); }
.nav-item:hover::before { opacity: 1; }

.nav-item.active {
  color: white;
  background: var(--grad-brand-subtle);
  border: 1px solid var(--border-medium);
}

.nav-item.active::after {
  content: '';
  position: absolute;
  left: 0; top: 25%; bottom: 25%;
  width: 3px;
  background: var(--grad-brand);
  border-radius: 0 2px 2px 0;
}

.nav-icon {
  width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.nav-label { flex: 1; position: relative; z-index: 1; }

.nav-badge {
  font-size: 10px;
  font-weight: 700;
  background: var(--grad-rose);
  color: white;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  min-width: 18px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.sidebar-footer {
  margin-top: auto;
  padding: 16px 12px;
  border-top: 1px solid var(--border-subtle);
}

.admin-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.admin-avatar {
  width: 32px; height: 32px;
  border-radius: var(--radius-full);
  background: var(--grad-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.admin-info { flex: 1; min-width: 0; }
.admin-name { font-size: 13px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-role { font-size: 11px; color: var(--text-muted); }

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

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

.topbar-left { display: flex; align-items: center; gap: 16px; }
.page-title { font-size: 18px; font-weight: 700; font-family: 'Space Grotesk', sans-serif; }
.page-subtitle { font-size: 13px; color: var(--text-muted); }

.topbar-right { display: flex; align-items: center; gap: 12px; }

.topbar-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all var(--transition-fast);
  position: relative;
}

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

.notif-dot {
  position: absolute;
  top: 5px; right: 5px;
  width: 8px; height: 8px;
  background: var(--magenta-500);
  border-radius: 50%;
  border: 2px solid var(--bg-secondary);
}

.page-content {
  flex: 1;
  padding: 28px;
  overflow-y: auto;
}

/* ─── Cards ─────────────────────────────────────────────────────────────────── */
.card {
  background: var(--grad-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
  overflow: hidden;
}

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

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

.card-title {
  font-size: 15px;
  font-weight: 600;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-body { padding: 20px 24px; }
.card-footer { padding: 14px 24px; border-top: 1px solid var(--border-subtle); }

/* ─── Stat Cards ────────────────────────────────────────────────────────────── */
.stat-card {
  background: var(--grad-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-base);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 80px; height: 80px;
  border-radius: 50%;
  filter: blur(30px);
  opacity: 0.4;
}

.stat-card.purple::before { background: var(--purple-500); }
.stat-card.magenta::before { background: var(--magenta-500); }
.stat-card.blue::before { background: var(--blue-500); }
.stat-card.teal::before { background: var(--teal-400); }
.stat-card.rose::before { background: var(--rose-500); }
.stat-card.amber::before { background: var(--amber-400); }

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

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

.stat-icon.purple { background: linear-gradient(135deg, rgba(107,31,170,0.3), rgba(139,47,201,0.2)); border: 1px solid rgba(139,47,201,0.3); }
.stat-icon.magenta { background: linear-gradient(135deg, rgba(192,38,211,0.3), rgba(217,70,239,0.2)); border: 1px solid rgba(217,70,239,0.3); }
.stat-icon.blue { background: linear-gradient(135deg, rgba(37,99,235,0.3), rgba(59,130,246,0.2)); border: 1px solid rgba(59,130,246,0.3); }
.stat-icon.teal { background: linear-gradient(135deg, rgba(20,184,166,0.3), rgba(45,212,191,0.2)); border: 1px solid rgba(45,212,191,0.3); }
.stat-icon.rose { background: linear-gradient(135deg, rgba(225,29,72,0.3), rgba(244,63,94,0.2)); border: 1px solid rgba(244,63,94,0.3); }
.stat-icon.amber { background: linear-gradient(135deg, rgba(180,83,9,0.3), rgba(251,191,36,0.2)); border: 1px solid rgba(251,191,36,0.3); }

.stat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label { font-size: 13px; color: var(--text-muted); font-weight: 500; margin-bottom: 10px; }

.stat-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.stat-change.positive { background: rgba(34,197,94,0.15); color: var(--green-400); }
.stat-change.negative { background: rgba(239,68,68,0.15); color: var(--red-500); }
.stat-change.neutral { background: rgba(251,191,36,0.15); color: var(--amber-400); }

/* ─── Grid ──────────────────────────────────────────────────────────────────── */
.grid-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-12 { display: grid; grid-template-columns: 1fr 2fr; gap: 20px; }
.grid-21 { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }

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

table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead th {
  padding: 10px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition-fast);
}

tbody tr:hover { background: rgba(139,47,201,0.05); }
tbody tr:last-child { border-bottom: none; }

tbody td {
  padding: 12px 16px;
  color: var(--text-secondary);
  vertical-align: middle;
}

/* ─── Avatar ─────────────────────────────────────────────────────────────────── */
.avatar {
  width: 36px; height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.avatar.lg { width: 48px; height: 48px; font-size: 16px; }
.avatar.xl { width: 64px; height: 64px; font-size: 22px; }

.avatar-ring {
  padding: 2px;
  background: var(--grad-brand);
  border-radius: var(--radius-full);
}

/* ─── Badges / Pills ────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.3px;
}

.badge-voyeur { background: rgba(88,88,120,0.3); color: #a0a0c0; border: 1px solid rgba(88,88,120,0.4); }
.badge-cruiser { background: rgba(59,130,246,0.15); color: var(--blue-400); border: 1px solid rgba(59,130,246,0.3); }
.badge-ilimitado { background: linear-gradient(135deg, rgba(139,47,201,0.2), rgba(217,70,239,0.2)); color: var(--magenta-400); border: 1px solid rgba(217,70,239,0.35); }
.badge-active { background: rgba(34,197,94,0.12); color: var(--green-400); border: 1px solid rgba(34,197,94,0.25); }
.badge-suspended { background: rgba(251,191,36,0.12); color: var(--amber-400); border: 1px solid rgba(251,191,36,0.25); }
.badge-banned { background: rgba(239,68,68,0.12); color: var(--red-500); border: 1px solid rgba(239,68,68,0.25); }
.badge-expired { background: rgba(100,100,100,0.15); color: #888; border: 1px solid rgba(100,100,100,0.25); }
.badge-trial { background: rgba(45,212,191,0.12); color: var(--teal-400); border: 1px solid rgba(45,212,191,0.25); }
.badge-cancelled { background: rgba(239,68,68,0.12); color: var(--red-500); border: 1px solid rgba(239,68,68,0.25); }

/* ─── Buttons ────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  text-decoration: none;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
}

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

.btn-primary {
  background: var(--grad-brand);
  color: white;
  box-shadow: 0 4px 12px rgba(139,47,201,0.35);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(139,47,201,0.5); }

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
}
.btn-secondary:hover { background: var(--bg-card-hover); border-color: var(--border-strong); }

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

.btn-success {
  background: rgba(34,197,94,0.12);
  color: var(--green-400);
  border: 1px solid rgba(34,197,94,0.3);
}
.btn-success:hover { background: rgba(34,197,94,0.25); }

.btn-warning {
  background: rgba(251,191,36,0.12);
  color: var(--amber-400);
  border: 1px solid rgba(251,191,36,0.3);
}
.btn-warning:hover { background: rgba(251,191,36,0.25); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
}
.btn-ghost:hover { background: var(--bg-elevated); color: var(--text-primary); border-color: var(--border-subtle); }

.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: var(--radius-sm); }
.btn-icon { width: 32px; height: 32px; padding: 0; justify-content: center; border-radius: var(--radius-md); }

/* ─── Forms ─────────────────────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 12px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }

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

.form-input::placeholder, .form-textarea::placeholder { color: var(--text-dim); }
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--purple-400);
  box-shadow: 0 0 0 3px rgba(139,47,201,0.15);
  background: var(--bg-elevated);
}

.form-select { appearance: none; cursor: pointer; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238873a8' d='M6 8L0 0h12z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }

.search-wrapper { position: relative; }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-dim); font-size: 14px; pointer-events: none; }
.search-input { padding-left: 36px; }

/* ─── Chart Bars ────────────────────────────────────────────────────────────── */
.chart-bar-wrapper { display: flex; flex-direction: column; gap: 8px; }
.chart-bar-row { display: flex; align-items: center; gap: 12px; }
.chart-bar-label { font-size: 12px; color: var(--text-muted); width: 80px; flex-shrink: 0; text-align: right; }
.chart-bar-track { flex: 1; height: 8px; background: rgba(255,255,255,0.05); border-radius: 4px; overflow: hidden; }
.chart-bar-fill { height: 100%; border-radius: 4px; transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1); }
.chart-bar-value { font-size: 12px; font-weight: 600; color: var(--text-secondary); width: 40px; flex-shrink: 0; }

/* ─── Mini Chart ────────────────────────────────────────────────────────────── */
.sparkline-wrapper { display: flex; align-items: flex-end; gap: 3px; height: 40px; }
.sparkline-bar { flex: 1; border-radius: 2px 2px 0 0; min-height: 4px; transition: height 0.6s cubic-bezier(0.4, 0, 0.2, 1); }

/* ─── Progress Ring ─────────────────────────────────────────────────────────── */
.progress-ring-container { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.progress-ring-label { position: absolute; text-align: center; }

/* ─── Heatmap ────────────────────────────────────────────────────────────────── */
.heatmap-container {
  position: relative;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  overflow: hidden;
  min-height: 420px;
}

.heatmap-svg { width: 100%; height: 420px; }

.heatmap-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0 0;
}

.heatmap-gradient-bar {
  height: 8px;
  flex: 1;
  border-radius: 4px;
  background: linear-gradient(to right, rgba(59,130,246,0.5), rgba(34,197,94,0.5), rgba(251,191,36,0.8), rgba(239,68,68,0.9), #ff0040);
}

/* ─── Status Indicator ──────────────────────────────────────────────────────── */
.status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.status-dot.online { background: var(--green-400); box-shadow: 0 0 6px var(--green-400); animation: pulse-green 2s infinite; }
.status-dot.away { background: var(--amber-400); }
.status-dot.offline { background: var(--text-dim); }

@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 4px var(--green-400); }
  50% { box-shadow: 0 0 10px var(--green-400), 0 0 20px rgba(74,222,128,0.3); }
}

/* ─── Toast / Alert ─────────────────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid;
}

.alert-info { background: rgba(59,130,246,0.1); border-color: rgba(59,130,246,0.25); color: var(--blue-400); }
.alert-success { background: rgba(34,197,94,0.1); border-color: rgba(34,197,94,0.25); color: var(--green-400); }
.alert-warning { background: rgba(251,191,36,0.1); border-color: rgba(251,191,36,0.25); color: var(--amber-400); }
.alert-danger { background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.25); color: var(--red-500); }

/* ─── Modal ─────────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

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

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95) translateY(20px);
  transition: transform var(--transition-base);
  box-shadow: var(--shadow-lg), var(--shadow-glow-purple);
}

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

.modal-header {
  padding: 24px 28px 18px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.modal-title { font-size: 18px; font-weight: 700; font-family: 'Space Grotesk', sans-serif; }
.modal-body { padding: 24px 28px; }
.modal-footer { padding: 18px 28px; border-top: 1px solid var(--border-subtle); display: flex; justify-content: flex-end; gap: 10px; }

/* ─── Tabs ──────────────────────────────────────────────────────────────────── */
.tabs-nav {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  width: fit-content;
}

.tab-btn {
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  background: transparent;
  transition: all var(--transition-fast);
  font-family: 'Inter', sans-serif;
}

.tab-btn:hover { color: var(--text-primary); background: var(--bg-elevated); }
.tab-btn.active { background: var(--grad-brand); color: white; box-shadow: 0 2px 8px rgba(139,47,201,0.4); }

/* ─── Subscription Tiers ────────────────────────────────────────────────────── */
.tier-voyeur { color: #a0a0c0; }
.tier-cruiser { color: var(--blue-400); }
.tier-ilimitado { background: var(--grad-magenta); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; font-weight: 700; }

/* ─── Metric Row ────────────────────────────────────────────────────────────── */
.metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.metric-row:last-child { border-bottom: none; }
.metric-label { font-size: 13px; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }
.metric-value { font-size: 14px; font-weight: 600; color: var(--text-primary); }

/* ─── Timeline ──────────────────────────────────────────────────────────────── */
.timeline { display: flex; flex-direction: column; gap: 0; position: relative; }
.timeline::before { content: ''; position: absolute; left: 16px; top: 16px; bottom: 16px; width: 1px; background: var(--border-subtle); }
.timeline-item { display: flex; gap: 16px; padding: 8px 0; position: relative; }
.timeline-dot { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 13px; position: relative; z-index: 1; }
.timeline-content { flex: 1; padding-top: 4px; }
.timeline-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.timeline-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.timeline-time { font-size: 11px; color: var(--text-dim); margin-top: 4px; }

/* ─── User Profile Card ─────────────────────────────────────────────────────── */
.profile-card {
  background: var(--grad-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.profile-header {
  padding: 24px;
  background: linear-gradient(135deg, rgba(107,31,170,0.2), rgba(217,70,239,0.1));
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile-info h3 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.profile-info .username { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }

/* ─── Misc Utilities ────────────────────────────────────────────────────────── */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.flex-1 { flex: 1; }
.min-w-0 { min-width: 0; }
.overflow-hidden { overflow: hidden; }
.text-truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.text-muted { color: var(--text-muted); }
.text-primary-color { color: var(--text-primary); }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mt-4 { margin-top: 16px; }
.mt-auto { margin-top: auto; }
.p-4 { padding: 16px; }
.p-6 { padding: 24px; }
.pt-4 { padding-top: 16px; }
.pb-4 { padding-bottom: 16px; }
.w-full { width: 100%; }
.opacity-50 { opacity: 0.5; }
.relative { position: relative; }
.cursor-pointer { cursor: pointer; }
.select-none { user-select: none; }

.divider { height: 1px; background: var(--border-subtle); margin: 16px 0; }

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: var(--text-dim);
}
.empty-state-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.4; }
.empty-state-text { font-size: 14px; }

/* ─── Pagination ────────────────────────────────────────────────────────────── */
.pagination { display: flex; align-items: center; gap: 4px; }
.page-btn { width: 32px; height: 32px; border-radius: var(--radius-md); border: 1px solid var(--border-subtle); background: var(--bg-card); color: var(--text-secondary); font-size: 13px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all var(--transition-fast); }
.page-btn:hover, .page-btn.active { background: var(--grad-brand); color: white; border-color: transparent; }

/* ─── Loading ─────────────────────────────────────────────────────────────────── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border-subtle);
  border-top-color: var(--purple-400);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Gradient Text ──────────────────────────────────────────────────────────── */
.text-gradient { background: var(--grad-brand); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.text-gradient-purple { background: var(--grad-purple); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.text-gradient-magenta { background: var(--grad-magenta); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* ─── 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-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
}

.login-card {
  width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-lg), var(--shadow-glow-purple);
  position: relative;
  z-index: 1;
}

/* ─── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 1280px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1024px) {
  .grid-2, .grid-12, .grid-21 { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .grid-stats { grid-template-columns: 1fr 1fr; }
  .page-content { padding: 16px; }
}
@media (max-width: 480px) {
  .grid-stats { grid-template-columns: 1fr; }
}

/* ─── Animations ─────────────────────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.animate-in { animation: fadeInUp 0.4s ease-out forwards; }
.animate-in-delay-1 { animation: fadeInUp 0.4s ease-out 0.1s both; }
.animate-in-delay-2 { animation: fadeInUp 0.4s ease-out 0.2s both; }
.animate-in-delay-3 { animation: fadeInUp 0.4s ease-out 0.3s both; }
.animate-in-delay-4 { animation: fadeInUp 0.4s ease-out 0.4s both; }
.animate-in-delay-5 { animation: fadeInUp 0.4s ease-out 0.5s both; }

/* ─── Notification Toast ────────────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
  animation: fadeInUp 0.3s ease-out;
  min-width: 280px;
  max-width: 380px;
}

.toast.success { border-color: rgba(34,197,94,0.3); }
.toast.error { border-color: rgba(239,68,68,0.3); }
.toast.warning { border-color: rgba(251,191,36,0.3); }

/* ─── Section Titles ────────────────────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 700;
}
.section-desc { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* ─── Novos Estilos v2.0 ────────────────────────────────────────────────────── */
.sidebar-plan-pill {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  margin-bottom: 4px;
}

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

/* Toggle switch */
.tog-off {
  background: rgba(255,255,255,0.1) !important;
}
.tog-off div {
  left: 2px !important;
}

/* Sidebar plan pills spacing */
.sidebar-section + .sidebar-section {
  padding-top: 8px;
}

/* Animated gradient border on login card */
.login-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: calc(var(--radius-xl) + 1px);
  background: var(--grad-brand);
  z-index: -1;
  opacity: 0.4;
}

/* Gráfico bar hover */
.chart-bar-fill { transition: width 0.7s cubic-bezier(0.4,0,0.2,1); }

/* Active sidebar nav glow */
.nav-item.active {
  box-shadow: inset 0 0 20px rgba(139,47,201,0.1);
}

/* Page content fade */
#page-content > * {
  animation: fadeInUp 0.35s ease-out both;
}

/* Notif panel */
#notif-panel { animation: fadeInUp 0.2s ease-out; }

/* Live pulse ring on check-in simulation */
@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(217,70,239,0.4); }
  70% { box-shadow: 0 0 0 8px rgba(217,70,239,0); }
  100% { box-shadow: 0 0 0 0 rgba(217,70,239,0); }
}

/* Table sticky header */
thead th { position: sticky; top: 0; z-index: 2; }

/* Sub-badge spacing fix */
.badge + .badge { margin-left: 4px; }

/* Settings card */
.card input[type="number"] { max-width: 100%; }
