/* ============================================
   SISTEMA DE CONTROL DE ASISTENCIAS
   Iglesia Ebenezer - Glassmorphism Theme
   ============================================ */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap");

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
  --primary-dark: #0a1628;
  --primary-mid: #0f2847;
  --primary-blue: #1a3a6b;
  --accent-blue: #3b82f6;
  --accent-cyan: #06b6d4;
  --accent-purple: #06b6d4;
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-bg-strong: rgba(255, 255, 255, 0.12);
  --glass-border: rgba(255, 255, 255, 0.15);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.37);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.75);
  --text-muted: rgba(255, 255, 255, 0.45);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   RESET & BASE
   ============================================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  min-height: 100vh;
  background: linear-gradient(
    135deg,
    #0a1628 0%,
    #0f2847 25%,
    #1a3a6b 50%,
    #0f2847 75%,
    #0a1628 100%
  );
  color: var(--text-primary);
  overflow-x: hidden;
  position: relative;
}

/* Fondo animado con orbes */
body::before {
  content: "";
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(
      circle at 20% 50%,
      rgba(59, 130, 246, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(6, 182, 212, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 40% 80%,
      rgba(6, 182, 212, 0.1) 0%,
      transparent 50%
    );
  animation: orbFloat 20s ease-in-out infinite;
  z-index: 0;
  pointer-events: none;
}

@keyframes orbFloat {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(2%, -2%) rotate(120deg);
  }
  66% {
    transform: translate(-1%, 1%) rotate(240deg);
  }
}

/* ============================================
   PARTÍCULAS FLOTANTES
   ============================================ */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(59, 130, 246, 0.4);
  border-radius: 50%;
  animation: floatUp linear infinite;
}

.particle:nth-child(1) {
  left: 10%;
  animation-duration: 12s;
  animation-delay: 0s;
  width: 3px;
  height: 3px;
}
.particle:nth-child(2) {
  left: 25%;
  animation-duration: 15s;
  animation-delay: 2s;
  width: 5px;
  height: 5px;
  background: rgba(139, 92, 246, 0.3);
}
.particle:nth-child(3) {
  left: 40%;
  animation-duration: 10s;
  animation-delay: 4s;
}
.particle:nth-child(4) {
  left: 55%;
  animation-duration: 18s;
  animation-delay: 1s;
  width: 6px;
  height: 6px;
  background: rgba(6, 182, 212, 0.3);
}
.particle:nth-child(5) {
  left: 70%;
  animation-duration: 14s;
  animation-delay: 3s;
}
.particle:nth-child(6) {
  left: 85%;
  animation-duration: 11s;
  animation-delay: 5s;
  width: 3px;
  height: 3px;
  background: rgba(139, 92, 246, 0.4);
}
.particle:nth-child(7) {
  left: 15%;
  animation-duration: 16s;
  animation-delay: 6s;
  width: 4px;
  height: 4px;
}
.particle:nth-child(8) {
  left: 60%;
  animation-duration: 13s;
  animation-delay: 7s;
  width: 5px;
  height: 5px;
  background: rgba(6, 182, 212, 0.4);
}

@keyframes floatUp {
  0% {
    transform: translateY(100vh) scale(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-10vh) scale(1);
    opacity: 0;
  }
}

/* ============================================
   GLASSMORPHISM CARD
   ============================================ */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
}

.glass-strong {
  background: var(--glass-bg-strong);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  box-shadow:
    var(--glass-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  position: relative;
  z-index: 1;
}

.login-card {
  width: 100%;
  max-width: 440px;
  padding: 48px 40px;
  text-align: center;
  animation: slideUp 0.6s ease-out;
}

.login-card .logo-icon {
  width: 180px;
  height: auto;
  max-height: 140px;
  margin: 0 auto 24px;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
  }
  50% {
    box-shadow: 0 8px 40px rgba(59, 130, 246, 0.5);
  }
}

.login-card h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #fff, rgba(255, 255, 255, 0.8));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-card .subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 36px;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   FORMULARIOS
   ============================================ */
.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.form-control {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 15px;
  font-family: inherit;
  transition: var(--transition);
  outline: none;
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-control:focus {
  border-color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.08);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

select.form-control {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='rgba(255,255,255,0.6)' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

select.form-control option {
  background: #1a2744;
  color: #fff;
}

/* ============================================
   BOTONES
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  letter-spacing: 0.3px;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  transition:
    width 0.4s,
    height 0.4s;
  transform: translate(-50%, -50%);
}

.btn:active::after {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-blue), #2563eb);
  color: white;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(59, 130, 246, 0.5);
}

.btn-success {
  background: linear-gradient(135deg, var(--success), #059669);
  color: white;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(16, 185, 129, 0.5);
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger), #dc2626);
  color: white;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.35);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(239, 68, 68, 0.5);
}

.btn-warning {
  background: linear-gradient(135deg, var(--warning), #d97706);
  color: white;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);
}

.btn-warning:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(245, 158, 11, 0.5);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 16px;
  border-radius: var(--radius);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 12px;
}

.btn-block {
  width: 100%;
}

.btn-icon {
  width: 38px;
  height: 38px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);
}

/* ============================================
   LAYOUT DASHBOARD
   ============================================ */
.app-layout {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* SIDEBAR */
.sidebar {
  width: 270px;
  min-height: 100vh;
  padding: 24px 16px;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 100;
  background: rgba(10, 22, 40, 0.85);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  margin-bottom: 32px;
}

.sidebar-brand .brand-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: contain;
  flex-shrink: 0;
}

.sidebar-brand .brand-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.sidebar-brand .brand-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
}

.sidebar-nav {
  flex: 1;
  list-style: none;
}

.nav-section {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0 12px;
  margin: 20px 0 10px;
}

.nav-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  margin-bottom: 2px;
}

.nav-item a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.nav-item a.active {
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.2),
    rgba(139, 92, 246, 0.15)
  );
  color: var(--text-primary);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.nav-item a .nav-icon {
  width: 20px;
  text-align: center;
  font-size: 16px;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: auto;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-user .user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
}

.sidebar-user .user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user .user-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user .user-role {
  font-size: 11px;
  color: var(--text-muted);
}

/* MAIN CONTENT */
.main-content {
  flex: 1;
  margin-left: 270px;
  padding: 24px 32px;
  min-height: 100vh;
}

/* TOP BAR */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.top-bar h2 {
  font-size: 26px;
  font-weight: 700;
  background: linear-gradient(135deg, #fff, rgba(255, 255, 255, 0.7));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.top-bar .breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.top-bar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* ============================================
   STAT CARDS
   ============================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.25);
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--stat-color, rgba(59, 130, 246, 0.15));
  filter: blur(30px);
  transform: translate(30%, -30%);
}

.stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
  background: var(--stat-color, rgba(59, 130, 246, 0.15));
}

.stat-card .stat-value {
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 6px;
}

.stat-card .stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.stat-blue {
  --stat-color: rgba(59, 130, 246, 0.2);
}
.stat-purple {
  --stat-color: rgba(6, 182, 212, 0.2);
}
.stat-green {
  --stat-color: rgba(16, 185, 129, 0.2);
}
.stat-orange {
  --stat-color: rgba(245, 158, 11, 0.2);
}

/* ============================================
   TABLES
   ============================================ */
.table-container {
  padding: 24px;
  margin-bottom: 24px;
  overflow-x: auto;
}

.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.table-header h3 {
  font-size: 18px;
  font-weight: 700;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.data-table thead th {
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.data-table tbody tr {
  transition: var(--transition);
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

.data-table tbody td {
  padding: 14px 16px;
  font-size: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
}

.data-table tbody td:first-child {
  color: var(--text-primary);
  font-weight: 500;
}

/* ============================================
   BADGES
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-blue {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}
.badge-green {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}
.badge-red {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}
.badge-purple {
  background: rgba(6, 182, 212, 0.2);
  color: #22d3ee;
}
.badge-orange {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}
.badge-cyan {
  background: rgba(6, 182, 212, 0.2);
  color: #22d3ee;
}

.badge-device {
  padding: 3px 10px;
  font-size: 11px;
}

/* ============================================
   CARDS GRID
   ============================================ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.content-card {
  padding: 24px;
}

.content-card .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.content-card .card-header h3 {
  font-size: 16px;
  font-weight: 700;
}

/* ============================================
   FLASH MESSAGES
   ============================================ */
.flash-message {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 500;
  animation: slideDown 0.4s ease-out;
  backdrop-filter: blur(10px);
}

.flash-success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.flash-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.flash-warning {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

.flash-info {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #60a5fa;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  width: 100%;
  max-width: 500px;
  padding: 32px;
  animation: modalIn 0.3s ease-out;
}

.modal-content h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 24px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ============================================
   REGISTRO PÚBLICO
   ============================================ */
.public-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  position: relative;
  z-index: 1;
}

.register-card {
  width: 100%;
  max-width: 500px;
  padding: 48px 40px;
  text-align: center;
  animation: slideUp 0.6s ease-out;
}

.register-card .church-logo {
  width: 160px;
  height: auto;
  max-height: 120px;
  margin: 0 auto 20px;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}

.register-card h1 {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #fff, rgba(255, 255, 255, 0.85));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.register-card .desc {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 32px;
  line-height: 1.5;
}

.success-animation {
  display: none;
  text-align: center;
  padding: 24px;
  animation: slideUp 0.4s ease-out;
}

.success-animation .check-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--success), #059669);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  margin: 0 auto 20px;
  animation: popIn 0.5s ease-out;
}

@keyframes popIn {
  0% {
    transform: scale(0);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

.success-animation h2 {
  font-size: 22px;
  margin-bottom: 8px;
  color: #34d399;
}

.success-animation p {
  color: var(--text-secondary);
}

/* QR Scanner Area */
.qr-scanner-area {
  margin: 20px 0;
  padding: 20px;
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  text-align: center;
}

.qr-scanner-area video {
  width: 100%;
  max-width: 300px;
  border-radius: var(--radius-sm);
}

.qr-scanner-area .scan-text {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 10px;
}

/* Toggle switch for QR/Manual */
.toggle-method {
  display: flex;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.toggle-method button {
  flex: 1;
  padding: 10px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius-xs);
  transition: var(--transition);
}

.toggle-method button.active {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  color: white;
  box-shadow: 0 2px 10px rgba(59, 130, 246, 0.3);
}

/* ============================================
   REPORTE / FILTERS
   ============================================ */
.filter-bar {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding: 20px;
}

.filter-bar .form-group {
  margin-bottom: 0;
  min-width: 180px;
}

.filter-bar .form-group label {
  font-size: 11px;
}

/* ============================================
   QR CODE DISPLAY
   ============================================ */
.qr-display {
  text-align: center;
  padding: 20px;
}

.qr-display img {
  border-radius: var(--radius-sm);
  background: white;
  padding: 12px;
  max-width: 200px;
}

.qr-display .qr-code-text {
  margin-top: 10px;
  font-family: monospace;
  font-size: 14px;
  color: var(--text-muted);
}

/* ============================================
   COLOR PICKER / GROUP COLOR
   ============================================ */
.color-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
  vertical-align: middle;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

input[type="color"] {
  width: 50px;
  height: 40px;
  border: none;
  border-radius: var(--radius-xs);
  cursor: pointer;
  background: transparent;
}

/* ============================================
   CHARTS PLACEHOLDER
   ============================================ */
.chart-container {
  padding: 20px;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mini bar chart */
.mini-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 120px;
  padding: 10px 0;
}

.mini-chart .bar {
  flex: 1;
  min-width: 30px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, var(--accent-blue), var(--accent-purple));
  transition: var(--transition);
  position: relative;
  cursor: pointer;
}

.mini-chart .bar:hover {
  opacity: 0.8;
}

.mini-chart .bar-label {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
}

.mini-chart .bar-value {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 13px;
}

/* ============================================
   DEVICE INDICATOR
   ============================================ */
.device-info {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 12px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-xs);
}

/* ============================================
   EXPORT BUTTONS
   ============================================ */
.export-actions {
  display: flex;
  gap: 8px;
}

.btn-export {
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-xs);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-excel {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.btn-excel:hover {
  background: rgba(16, 185, 129, 0.25);
}

.btn-pdf {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-pdf:hover {
  background: rgba(239, 68, 68, 0.25);
}

/* ============================================
   CONFIGURACIÓN
   ============================================ */
.config-section {
  margin-bottom: 24px;
}

.config-section h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
  display: flex;
  gap: 4px;
  align-items: center;
  justify-content: center;
  margin-top: 24px;
}

.pagination a,
.pagination span {
  padding: 8px 14px;
  border-radius: var(--radius-xs);
  font-size: 13px;
  text-decoration: none;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid transparent;
  transition: var(--transition);
}

.pagination a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.pagination .active {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  color: white;
  border-color: transparent;
}

/* ============================================
   RESPONSIVE
   ============================================ */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 200;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
    padding: 16px;
  }

  .mobile-menu-btn {
    display: block;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .stat-card {
    padding: 16px;
  }

  .stat-card .stat-value {
    font-size: 24px;
  }

  .filter-bar {
    flex-direction: column;
  }

  .filter-bar .form-group {
    width: 100%;
    min-width: 100%;
  }

  .top-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .login-card,
  .register-card {
    padding: 32px 24px;
  }

  .table-container {
    padding: 16px;
  }

  .data-table {
    font-size: 12px;
  }

  .modal-content {
    padding: 24px;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  body {
    font-size: 14px;
  }
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center {
  text-align: center;
}
.text-right {
  text-align: right;
}
.text-muted {
  color: var(--text-muted);
}
.text-success {
  color: var(--success);
}
.text-danger {
  color: var(--danger);
}
.text-warning {
  color: var(--warning);
}
.mt-1 {
  margin-top: 8px;
}
.mt-2 {
  margin-top: 16px;
}
.mt-3 {
  margin-top: 24px;
}
.mb-1 {
  margin-bottom: 8px;
}
.mb-2 {
  margin-bottom: 16px;
}
.mb-3 {
  margin-bottom: 24px;
}
.d-flex {
  display: flex;
}
.gap-1 {
  gap: 8px;
}
.gap-2 {
  gap: 16px;
}
.align-center {
  align-items: center;
}
.justify-between {
  justify-content: space-between;
}
.w-100 {
  width: 100%;
}

/* Group color tag */
.group-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Tabs */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.tab-btn {
  padding: 10px 20px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius-xs);
  transition: var(--transition);
}

.tab-btn:hover {
  color: var(--text-secondary);
}

.tab-btn.active {
  background: rgba(59, 130, 246, 0.2);
  color: var(--accent-blue);
}

/* Loading spinner */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Overlay for sidebar on mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 150;
}

.sidebar-overlay.active {
  display: block;
}
