/* =====================================================
   ExaCnnu System — Theme Club Deportivo
   Paleta: Navy #0F2537 | Blue #2A75D3 | Gold #E5A93C | Surface #F8FAFC
   ===================================================== */

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

/* === VARIABLES === */
:root {
  --primary-navy: #0F2537;
  --primary-navy-light: #1a3a52;
  --primary-navy-dark: #091a27;
  --secondary-blue: #2A75D3;
  --secondary-blue-light: #4a8fe8;
  --secondary-blue-dark: #1a5bb5;
  --gold-accent: #E5A93C;
  --gold-light: #f0be6a;
  --gold-dark: #c8881a;
  --bg-surface: #F8FAFC;
  --bg-card: #ffffff;
  --bg-sidebar: #0F2537;
  --text-main: #1E293B;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  --border-color: #E2E8F0;
  --success-entry: #16A34A;
  --success-light: #dcfce7;
  --error-entry: #DC2626;
  --error-light: #fee2e2;
  --warning-color: #D97706;
  --warning-light: #fef3c7;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(15,37,55,0.12);
  --shadow-lg: 0 8px 32px rgba(15,37,55,0.18);
  --shadow-xl: 0 20px 60px rgba(15,37,55,0.25);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --sidebar-width: 260px;
}

/* === RESET & SCROLL NATURAL === */
*, *::before, *::after { box-sizing: border-box; }
html, body {
  min-height: 100%;
  height: auto;
  overflow-x: hidden;
  overflow-y: auto !important; /* Permitir scroll vertical natural */
  margin: 0;
  padding: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-surface);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
html { scroll-behavior: smooth; font-size: 16px; }

/* === TIPOGRAFÍA === */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', 'Inter', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--primary-navy);
}
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

/* === LAYOUT PRINCIPAL === */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* === LAYOUT FULL WIDTH & TOP NAVBAR === */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
}

.top-navbar {
  background-color: var(--primary-navy, #0F2537);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 1030;
  width: 100%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  box-sizing: border-box;
}

.top-navbar .nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #ffffff;
  flex-shrink: 0;
}

.top-navbar .nav-brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--gold-accent), var(--gold-dark));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 4px 10px rgba(229,169,60,0.35);
}

.top-navbar .nav-brand-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 1.15rem;
  color: #ffffff;
  letter-spacing: 0.5px;
  line-height: 1.1;
}

.top-navbar .nav-brand-sub {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
.top-navbar .navbar-header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.top-navbar .navbar-toggler {
  display: none;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.top-navbar .navbar-toggler:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: var(--gold-accent);
}

.top-navbar .navbar-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.top-navbar .nav-link {
  color: #e2e8f0;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: transparent;
  font-family: inherit;
  white-space: nowrap;
}

.top-navbar .nav-link:hover,
.top-navbar .nav-link.active {
  background-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.top-navbar .nav-link.active {
  color: var(--gold-accent);
  background: rgba(229, 169, 60, 0.15);
}

/* Dropdowns */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

.nav-dropdown .dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background-color: #0F2537;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0.5rem 0;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  z-index: 1050;
  margin-top: 4px;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  display: block;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.dropdown-item:hover,
.dropdown-item.active {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.dropdown-item.active {
  color: var(--gold-accent);
}

.top-navbar .nav-right {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
}

.top-navbar .user-badge {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.35rem 0.75rem;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.top-navbar .user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--secondary-blue), var(--secondary-blue-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: white;
  font-weight: 700;
  flex-shrink: 0;
}

.top-navbar .user-email {
  font-size: 0.8rem;
  font-weight: 600;
  color: #ffffff;
}

.top-navbar .user-role {
  font-size: 0.65rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: rgba(229, 169, 60, 0.2);
  color: var(--gold-accent);
  font-weight: 700;
  text-transform: uppercase;
}

/* Área principal despejada al 100% con scroll natural */
.main-content {
  flex: 1 0 auto;
  width: 100%;
  padding: 1.5rem 2rem;
  box-sizing: border-box;
  overflow: visible; /* Asegurar que no corte tablas extensas */
  background-color: var(--bg-surface, #F8FAFC);
}

/* Contenedor de la tabla responsiva */
.table-responsive {
  overflow-x: auto;
  overflow-y: visible;
  margin-bottom: 2rem;
}

/* === ÁREA DE PÁGINA === */
.page-area {
  padding: 2rem 1.75rem;
  flex: 1;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary-navy);
}

.page-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* === CARDS === */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-navy);
}

.card-body {
  padding: 1.5rem;
}

/* === STAT CARDS === */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  display: block;
  color: inherit;
}

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

.stat-card.blue::before { background: var(--secondary-blue); }
.stat-card.gold::before { background: var(--gold-accent); }
.stat-card.navy::before { background: var(--primary-navy); }
.stat-card.green::before { background: var(--success-entry); }

.stat-card:hover {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
  transform: translateY(-3px);
  border-color: rgba(42, 117, 211, 0.35);
}

.stat-card:active {
  transform: translateY(-1px);
}

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

.stat-icon.blue { background: rgba(42,117,211,0.12); color: var(--secondary-blue); }
.stat-icon.gold { background: rgba(229,169,60,0.12); color: var(--gold-dark); }
.stat-icon.navy { background: rgba(15,37,55,0.08); color: var(--primary-navy); }
.stat-icon.green { background: rgba(22,163,74,0.12); color: var(--success-entry); }

.stat-value {
  font-family: 'Outfit', sans-serif;
  font-size: 2rem;
  font-weight: 900;
  color: var(--primary-navy);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* === BOTONES === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--secondary-blue), var(--secondary-blue-dark));
  color: white;
  box-shadow: 0 2px 8px rgba(42,117,211,0.3);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(42,117,211,0.4);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold-accent), var(--gold-dark));
  color: var(--primary-navy-dark);
  box-shadow: 0 2px 8px rgba(229,169,60,0.3);
}

.btn-gold:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(229,169,60,0.4);
}

.btn-navy {
  background: linear-gradient(135deg, var(--primary-navy), var(--primary-navy-dark));
  color: white;
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover:not(:disabled) {
  border-color: var(--secondary-blue);
  color: var(--secondary-blue);
}

.btn-outline-secondary {
  background: transparent;
  border: 1.5px solid #94a3b8;
  color: #475569;
}

.btn-outline-secondary:hover:not(:disabled) {
  background: #f1f5f9;
  border-color: #64748b;
  color: #1e293b;
}

.btn-danger {
  background: linear-gradient(135deg, var(--error-entry), #b91c1c);
  color: white;
}

.btn-success {
  background: linear-gradient(135deg, var(--success-entry), #15803d);
  color: white;
}

.btn-sm {
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 0.85rem 2rem;
  font-size: 1rem;
  border-radius: var(--radius-md);
}

/* === BADGES === */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-success { background: var(--success-light); color: #15803d; }
.badge-error { background: var(--error-light); color: #b91c1c; }
.badge-warning { background: var(--warning-light); color: #92400e; }
.badge-blue { background: rgba(42,117,211,0.12); color: var(--secondary-blue-dark); }
.badge-navy { background: rgba(15,37,55,0.1); color: var(--primary-navy); }
.badge-gold {
  background: rgba(229,169,60,0.15);
  color: var(--gold-dark);
  border: 1px solid rgba(229,169,60,0.3);
}

/* === TABLA === */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

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

.table thead {
  background: var(--bg-surface);
  border-bottom: 2px solid var(--border-color);
}

.table th {
  padding: 0.85rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  white-space: nowrap;
}

.table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  vertical-align: middle;
}

.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: rgba(42,117,211,0.03); }

/* === FORMULARIOS === */
.form-group { margin-bottom: 1.25rem; }

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

.form-control {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-family: 'Inter', sans-serif;
  color: var(--text-main);
  background: var(--bg-card);
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--secondary-blue);
  box-shadow: 0 0 0 3px rgba(42,117,211,0.1);
}

.form-control.is-invalid { border-color: var(--error-entry); }

select.form-control { cursor: pointer; }

/* === MODALES === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,37,55,0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: none !important;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-overlay.active,
.modal-overlay.open,
.modal-overlay.show {
  display: flex !important;
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 520px;
  transform: scale(0.95);
  transition: var(--transition);
}

.modal-overlay.active .modal,
.modal-overlay.open .modal,
.modal-overlay.show .modal {
  transform: scale(1);
}

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

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.modal-close:hover { background: var(--bg-surface); color: var(--text-main); }
.modal-body { padding: 1.5rem; }
.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* === ALERTAS === */
.alert {
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.alert-success { background: var(--success-light); color: #14532d; border-left: 4px solid var(--success-entry); }
.alert-error { background: var(--error-light); color: #7f1d1d; border-left: 4px solid var(--error-entry); }
.alert-warning { background: var(--warning-light); color: #78350f; border-left: 4px solid var(--warning-color); }
.alert-info { background: rgba(42,117,211,0.08); color: var(--secondary-blue-dark); border-left: 4px solid var(--secondary-blue); }

/* === BUSCADOR === */
.search-bar {
  position: relative;
  max-width: 320px;
}

.search-bar-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.search-bar input {
  padding-left: 2.25rem;
}

/* === QR CARD === */
.qr-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 2px dashed var(--border-color);
  text-align: center;
}

.qr-display img {
  width: 200px;
  height: 200px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  margin-bottom: 1rem;
}

/* === SCANNER FULLSCREEN (Portería) === */
.scanner-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: background 0.4s ease;
}

.scanner-overlay.resultado-ok {
  background: var(--success-entry);
}

.scanner-overlay.resultado-error {
  background: var(--error-entry);
}

.scanner-resultado-icon {
  font-size: 6rem;
  margin-bottom: 1rem;
  animation: bounce-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.scanner-resultado-nombre {
  font-family: 'Outfit', sans-serif;
  font-size: 2rem;
  font-weight: 900;
  color: white;
  margin-bottom: 0.5rem;
  text-align: center;
}

.scanner-resultado-info {
  font-size: 1rem;
  color: rgba(255,255,255,0.85);
  text-align: center;
}

.scanner-resultado-mensaje {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.95);
  margin-top: 0.5rem;
  font-weight: 600;
  text-align: center;
  padding: 0 1.5rem;
}

@keyframes bounce-in {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

/* === EMPTY STATE === */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  opacity: 0.4;
}

.empty-state h3 {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

/* === PAGINATION === */
.pagination {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.page-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-color);
  background: var(--bg-card);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-main);
  transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
}

.page-btn:hover { border-color: var(--secondary-blue); color: var(--secondary-blue); }
.page-btn.active { background: var(--secondary-blue); border-color: var(--secondary-blue); color: white; }

/* === RESPONSIVE GLOBAL (MOBILE & DESKTOP) === */
@media (max-width: 992px) {
  .top-navbar {
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1rem;
  }

  .top-navbar .navbar-header-main {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .top-navbar .navbar-toggler {
    display: flex;
  }

  .top-navbar .navbar-nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    gap: 0.25rem;
  }

  .top-navbar .navbar-nav.show {
    display: flex;
  }

  .top-navbar .nav-link {
    padding: 0.65rem 0.85rem;
    width: 100%;
    justify-content: flex-start;
  }

  .nav-dropdown {
    width: 100%;
  }

  .nav-dropdown .dropdown-menu {
    position: static;
    display: none;
    background: rgba(0, 0, 0, 0.25);
    border: none;
    border-radius: 6px;
    margin: 0.2rem 0 0.5rem 1rem;
    box-shadow: none;
  }

  .nav-dropdown.open .dropdown-menu {
    display: block;
  }

  .top-navbar .nav-right {
    display: none;
    width: 100%;
    justify-content: space-between;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .top-navbar .nav-right.show {
    display: flex;
  }

  .main-content {
    padding: 1rem;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  .page-area {
    padding: 1rem 0.75rem;
  }
}

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

  /* Carnet Digital Adaptado a Viewport Móvil */
  .carnet-card {
    max-width: 95vw !important;
    width: 100% !important;
    height: auto !important;
    min-height: 250px;
  }

  .carnet-body {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
    padding: 10px;
  }

  .carnet-col-foto {
    width: 80px;
    height: 95px;
  }

  .carnet-col-info {
    align-items: center;
  }

  .carnet-dato-fila {
    justify-content: center;
  }

  .carnet-col-qr {
    width: 100%;
  }

  /* Planilla Digital: Cuadrícula Táctil Compacta para Móvil */
  .planilla-incidencias-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.3rem !important;
  }
}

/* === FORM CONTROLS CORPORATIVOS GLOBALES === */
.form-control {
  display: block;
  width: 100%;
  padding: 10px 14px;
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.5;
  color: #1e293b;
  background-color: #ffffff;
  background-clip: padding-box;
  border: 1px solid #e2e8f0;
  appearance: none;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  outline: none;
  box-sizing: border-box;
  font-family: inherit;
}

.form-control:focus {
  color: #0f2537;
  background-color: #ffffff;
  border-color: #2563eb;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-control::placeholder {
  color: #94a3b8;
  opacity: 1;
}

.form-control:disabled, .form-control[readonly] {
  background-color: #f8fafc;
  color: #64748b;
  border-color: #e2e8f0;
  cursor: not-allowed;
}

/* === STATS & KPI CARDS GLOBALES === */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  display: block;
  text-decoration: none !important;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  color: inherit;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  border-color: #cbd5e1;
}

.stat-card.blue { border-left: 4px solid #2563eb; }
.stat-card.gold { border-left: 4px solid #d97706; }
.stat-card.navy { border-left: 4px solid #0f172a; }
.stat-card.green { border-left: 4px solid #16a34a; }

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 0.35rem 0 0.15rem 0;
}

.stat-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #64748b;
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.stat-icon.blue { background-color: #eff6ff; color: #2563eb; }
.stat-icon.gold { background-color: #fffbeb; color: #d97706; }
.stat-icon.navy { background-color: #f1f5f9; color: #0f172a; }
.stat-icon.green { background-color: #f0fdf4; color: #16a34a; }

/* === ICONOS MATERIAL SYMBOLS (OUTLINED & ROUNDED) === */
.material-symbols-outlined,
.material-symbols-rounded {
  font-family: 'Material Symbols Outlined', 'Material Symbols Rounded', sans-serif !important;
  font-weight: normal;
  font-style: normal;
  font-size: 1.25rem;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  vertical-align: middle;
}

/* === BOTONES SÓLIDOS MODERNOS === */
.btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.45rem !important;
  padding: 0.55rem 1.15rem !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  border: 1px solid transparent !important;
  cursor: pointer !important;
  text-decoration: none !important;
  transition: all 0.15s ease-in-out !important;
  line-height: 1.4 !important;
  white-space: nowrap !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

.btn-primary {
  background-color: #2563EB !important;
  color: #FFFFFF !important;
  border-color: #2563EB !important;
}
.btn-primary:hover {
  background-color: #1D4ED8 !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25) !important;
}

.btn-navy {
  background-color: #0F172A !important;
  color: #FFFFFF !important;
  border-color: #0F172A !important;
}
.btn-navy:hover {
  background-color: #1E293B !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25) !important;
}

.btn-outline {
  background-color: #FFFFFF !important;
  color: #334155 !important;
  border-color: #CBD5E1 !important;
}
.btn-outline:hover {
  background-color: #F8FAFC !important;
  color: #0F172A !important;
  border-color: #94A3B8 !important;
}

/* === TABLAS CORPORATIVAS (PADRÓN DE SOCIOS) === */
table.table thead th, .table thead th {
  background-color: #F1F5F9 !important; /* bg-slate-100 */
  color: #334155 !important;            /* text-slate-700 */
  font-size: 0.75rem !important;        /* text-xs */
  font-weight: 600 !important;          /* font-semibold */
  text-transform: uppercase !important; /* uppercase */
  letter-spacing: 0.05em !important;
  padding: 0.75rem 1rem !important;     /* py-3 px-4 */
  border-bottom: 1px solid #CBD5E1 !important; /* border-b border-slate-200 */
  white-space: nowrap !important;
}

table.table tbody td, .table tbody td {
  padding: 0.875rem 1rem !important;
  border-bottom: 1px solid #E2E8F0 !important; /* border-b border-slate-200 */
  vertical-align: middle !important;
  color: #1E293B !important;
}

table.table tbody tr:hover td, .table tbody tr:hover td {
  background-color: #F8FAFC !important;
}

/* === BADGES DE ESTADO (PÍLDORAS) === */
.badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.25rem !important;
  padding: 0.25rem 0.65rem !important; /* px-2 py-1 */
  border-radius: 9999px !important;    /* rounded-full */
  font-size: 0.75rem !important;        /* text-xs */
  font-weight: 500 !important;          /* font-medium */
  line-height: 1 !important;
  white-space: nowrap !important;
}

.badge-success {
  background-color: #DCFCE7 !important;
  color: #15803D !important;
}

.badge-warning {
  background-color: #FEF3C7 !important;
  color: #B45309 !important;
}

.badge-danger {
  background-color: #FEE2E2 !important;
  color: #B91C1C !important;
}

/* ============================================================
   MODALES FLOTANTES EMERGENTES EN PANTALLA COMPLETA
   ============================================================ */
.fixed {
  position: fixed !important;
}
.inset-0 {
  inset: 0 !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
}
.z-50 {
  z-index: 99999 !important;
}
.bg-slate-900\/60 {
  background-color: rgba(15, 23, 42, 0.65) !important;
}
.backdrop-blur-sm {
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
}
.overflow-y-auto {
  overflow-y: auto !important;
}
.overflow-hidden {
  overflow: hidden !important;
}
.flex {
  display: flex;
}
.items-center {
  align-items: center !important;
}
.justify-center {
  justify-content: center !important;
}
.p-4 {
  padding: 1rem !important;
}
.p-6 {
  padding: 1.5rem !important;
}
.relative {
  position: relative !important;
}
.rounded-2xl {
  border-radius: 1rem !important;
}
.shadow-2xl {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4) !important;
}
.border-slate-200 {
  border-color: #e2e8f0 !important;
}
.max-w-2xl {
  max-width: 42rem !important;
}
.max-w-md {
  max-width: 35rem !important;
}
.max-h-\[90vh\] {
  max-height: 90vh !important;
}
.w-full {
  width: 100% !important;
}
.top-4 {
  top: 1rem !important;
}
.right-4 {
  right: 1rem !important;
}
.w-6 {
  width: 1.5rem !important;
}
.h-6 {
  height: 1.5rem !important;
}
.text-slate-400 {
  color: #94a3b8 !important;
}
.text-slate-400:hover,
.hover\:text-slate-600:hover {
  color: #475569 !important;
}
.bg-white {
  background-color: #ffffff !important;
}

/* Reglas explícitas para modales emergentes flotantes */
#modalNuevoSocio,
#modalEditarSocio,
#modalCarnetSocio,
#modal-habilitar {
  position: fixed !important;
  inset: 0 !important;
  z-index: 99999 !important;
  background-color: rgba(15, 23, 42, 0.7) !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
}
#modalNuevoSocio[style*="display: none"],
#modalNuevoSocio[style*="display:none"],
#modalEditarSocio[style*="display: none"],
#modalEditarSocio[style*="display:none"],
#modalCarnetSocio[style*="display: none"],
#modalCarnetSocio[style*="display:none"],
#modal-habilitar[style*="display: none"],
#modal-habilitar[style*="display:none"] {
  display: none !important;
}

