/* 
   SISTEMA WEB "EVENTOS CAROLINA MEJÍA C28"
   DISEÑO GRÁFICO PREMIUM - LÍNEA GRÁFICA CAROLINA C28
*/

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

:root {
  --primary-color: #1a237e;      /* Azul Añil (Indigo Profundo) */
  --primary-hover: #121856;
  --secondary-color: #3f51b5;    /* Azul Añil Medio */
  --accent-color: #304ffe;       /* Añil Eléctrico */
  --accent-hover: #1a237e;
  --gold-accent: #ffc107;        /* Dorado de realce */
  --dark-bg: #0f172a;
  --light-bg: #f8fafc;           /* Blanco Puro / Slate suave */
  --card-bg: rgba(255, 255, 255, 0.96); /* Blanco Premium */
  --sidebar-width: 280px;
  --text-dark: #0f172a;          /* Slate Oscuro */
  --text-muted: #475569;
  --border-radius: 16px;
  --transition-speed: 0.3s;
  --box-shadow: 0 10px 30px rgba(26, 35, 126, 0.04);
  --glass-blur: blur(8px);
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--light-bg);
  color: var(--text-dark);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .brand-font {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
}

/* GRADIENT TEXTS & BACKGROUNDS */
.bg-c28-gradient {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
}

.text-c28-gradient {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* AUTH / LOGIN PAGE */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #090b20 0%, #1a237e 100%);
  position: relative;
  padding: 20px;
}

.auth-wrapper::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(48, 79, 254, 0.15) 0%, transparent 70%);
  top: 10%;
  left: 10%;
  z-index: 1;
}

.auth-wrapper::after {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(63, 81, 181, 0.15) 0%, transparent 70%);
  bottom: 10%;
  right: 10%;
  z-index: 1;
}

.auth-card {
  width: 100%;
  max-width: 480px;
  background: #ffffff;
  border: 1px solid rgba(26, 35, 126, 0.08);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.25);
  color: var(--text-dark);
  z-index: 10;
  position: relative;
}

.auth-card .form-control {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: var(--text-dark);
  border-radius: 12px;
  padding: 12px 16px;
  transition: all var(--transition-speed);
}

.auth-card .form-control:focus {
  background: #ffffff;
  border-color: var(--primary-color);
  color: var(--text-dark);
  box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.15);
}

.auth-logo {
  text-align: center;
  margin-bottom: 30px;
}

.auth-logo img {
  max-width: 130px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
}

.btn-c28-primary {
  background: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-color) 100%);
  color: white;
  border: none;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 12px;
  transition: all var(--transition-speed);
  box-shadow: 0 4px 15px rgba(26, 35, 126, 0.2);
}

.btn-c28-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26, 35, 126, 0.35);
  color: white;
  opacity: 0.95;
}

.btn-c28-secondary {
  background: white;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  font-weight: 600;
  padding: 10px 24px;
  border-radius: 12px;
  transition: all var(--transition-speed);
}

.btn-c28-secondary:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

/* SIDEBAR LAYOUT */
.wrapper {
  display: flex;
  align-items: stretch;
  min-height: 100vh;
}

#sidebar {
  min-width: var(--sidebar-width);
  max-width: var(--sidebar-width);
  background: linear-gradient(180deg, #121856 0%, #0a0d31 100%);
  color: #fff;
  transition: all var(--transition-speed);
  position: fixed;
  height: 100vh;
  z-index: 999;
  box-shadow: 5px 0 25px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
}

#sidebar.active {
  margin-left: calc(-1 * var(--sidebar-width));
}

.sidebar-header {
  padding: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.sidebar-header img {
  max-width: 140px;
}

.sidebar-logo-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 0;
}

.sidebar-logo-img {
  width: 100%;
  max-width: 190px;
  height: auto;
  border-radius: 12px;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.25));
  transition: transform 0.3s;
}

.sidebar-logo-img:hover {
  transform: scale(1.03);
}

/* COORDINACIÓN DE ORGANIZACIÓN BADGE */
.sidebar-coord-badge {
  margin: 12px 0 0 0;
  background: linear-gradient(135deg, rgba(230, 59, 15, 0.20) 0%, rgba(230, 59, 15, 0.08) 100%);
  border: 1px solid rgba(230, 59, 15, 0.40);
  border-radius: 10px;
  padding: 8px 12px;
  color: #ff8a65;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-align: center;
}

.sidebar-user {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.sidebar-user .user-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-color) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
  color: white;
  margin-right: 15px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

#sidebar ul.components {
  padding: 20px 0;
}

#sidebar ul li a {
  padding: 14px 24px;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
  border-left: 4px solid transparent;
}

#sidebar ul li a i {
  margin-right: 15px;
  font-size: 1.2rem;
  width: 24px;
  text-align: center;
}

#sidebar ul li a:hover, #sidebar ul li.active > a {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-left-color: var(--accent-color);
}

/* MAIN CONTENT */
#content {
  width: 100%;
  padding: 40px;
  min-height: 100vh;
  margin-left: var(--sidebar-width);
  transition: all var(--transition-speed);
}

#content.active {
  margin-left: 0;
}

/* GLASS CARD STYLING */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 30px;
  margin-bottom: 30px;
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.glass-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px rgba(0, 56, 168, 0.08);
}

.glass-card .card-title {
  color: var(--primary-color);
  font-weight: 700;
  margin-bottom: 20px;
  border-bottom: 2px solid rgba(0, 56, 168, 0.1);
  padding-bottom: 10px;
}

/* METRIC CARDS */
.metric-card {
  border-radius: var(--border-radius);
  padding: 24px;
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  transition: all var(--transition-speed);
  border: none;
}

.metric-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.metric-card i {
  position: absolute;
  right: 20px;
  bottom: 20px;
  font-size: 4.5rem;
  opacity: 0.15;
}

.metric-card .metric-value {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  font-family: 'Outfit', sans-serif;
}

.metric-card .metric-label {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.9;
  font-weight: 600;
}

.bg-metric-blue {
  background: linear-gradient(135deg, #1a237e 0%, #3f51b5 100%);
}

.bg-metric-pink {
  background: linear-gradient(135deg, #283593 0%, #5c6bc0 100%);
}

.bg-metric-cyan {
  background: linear-gradient(135deg, #303f9f 0%, #7986cb 100%);
}

.bg-metric-gold {
  background: linear-gradient(135deg, #3f51b5 0%, #9fa8da 100%);
}

/* DATATABLES BEAUTIFICATION */
.table-responsive {
  border-radius: 12px;
  overflow: hidden;
}

table.dataTable {
  border-collapse: collapse !important;
  margin-top: 15px !important;
  margin-bottom: 15px !important;
  background-color: white;
}

table.dataTable thead {
  background: var(--primary-color);
  color: white;
}

table.dataTable thead th {
  padding: 14px 18px !important;
  font-weight: 600;
  border-bottom: none !important;
}

table.dataTable tbody td {
  padding: 12px 18px !important;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
}

table.dataTable tbody tr:hover {
  background-color: rgba(0, 86, 179, 0.03) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current, 
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: var(--primary-color) !important;
  color: white !important;
  border: none !important;
  border-radius: 6px;
  font-weight: 600;
}

.dataTables_wrapper .dataTables_filter input {
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  padding: 6px 12px !important;
  background-color: #fff !important;
  outline: none;
}

.dataTables_wrapper .dataTables_filter input:focus {
  border-color: var(--secondary-color) !important;
  box-shadow: 0 0 5px rgba(0, 168, 232, 0.2);
}

/* FORM ELEMENTS */
.form-label {
  font-weight: 600;
  color: var(--text-dark);
}

.form-select, .form-control {
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  padding: 10px 14px;
  transition: all var(--transition-speed);
}

.form-select:focus, .form-control:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(0, 168, 232, 0.15);
}

/* ALERT STYLING */
.alert-c28 {
  border-radius: 12px;
  border: none;
  font-weight: 500;
}

/* MODAL STYLING */
.modal-content {
  border-radius: 20px;
  border: none;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.modal-header {
  background: var(--primary-color);
  color: white;
  border-bottom: none;
  padding: 20px 24px;
}

.modal-header .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

.modal-footer {
  border-top: 1px solid #f1f5f9;
  padding: 16px 24px;
}

/* LOADER / SEARCH INDICATOR */
.loading-spinner {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  vertical-align: text-bottom;
  border: .25em solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spinner-border .75s linear infinite;
  color: var(--accent-color);
}

/* FORCED CHANGE PASSWORD LOCK */
.lock-banner {
  background: linear-gradient(90deg, #ff007f 0%, #ff5c8d 100%);
  color: white;
  text-align: center;
  padding: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
}

/* UTILITY CLASSES */
.badge-role {
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.badge-super_admin { background-color: rgba(233, 30, 99, 0.15); color: var(--accent-color); }
.badge-admin { background-color: rgba(0, 56, 168, 0.1); color: var(--primary-color); }
.badge-operador { background-color: rgba(0, 168, 232, 0.15); color: #007bb3; }
.badge-consulta { background-color: rgba(100, 116, 139, 0.1); color: var(--text-muted); }

.badge-status {
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.8rem;
}
.badge-activo { background-color: rgba(46, 204, 113, 0.15); color: #27ae60; }
.badge-inactivo { background-color: rgba(231, 76, 60, 0.15); color: #c0392b; }
.badge-finalizado { background-color: rgba(127, 140, 141, 0.15); color: #7f8c8d; }
.badge-cancelado { background-color: rgba(231, 76, 60, 0.15); color: #c0392b; }

/* BRANDING & LOGOS */
.logo-c28-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.prm-logo-accent {
  max-height: 45px;
}

.c28-logo-accent {
  max-height: 45px;
}

/* RESPONSIVE MEDIA QUERIES */
@media (max-width: 991.98px) {
  #sidebar {
    margin-left: calc(-1 * var(--sidebar-width));
  }
  #sidebar.active {
    margin-left: 0;
  }
  #content {
    margin-left: 0;
    padding: 20px;
  }
  #content.active {
    margin-left: var(--sidebar-width);
  }
  .navbar-toggler-c28 {
    display: block !important;
  }
}

.navbar-toggler-c28 {
  display: none;
  background: white;
  border: 1px solid #e2e8f0;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--primary-color);
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
/* SIDEBAR LOGO - tighten padding for real logo */
.sidebar-header {
  padding: 16px 16px 14px 16px;
}

/* CLICKABLE EVENT ROWS */
.evento-row {
  transition: background-color 0.18s, transform 0.15s;
}
.evento-row:hover {
  background-color: rgba(26, 35, 126, 0.04) !important;
}
.evento-link {
  font-size: 0.95rem;
  transition: color 0.2s;
}
.evento-link:hover {
  color: var(--accent-color) !important;
}

/* EVENT PROFILE HERO CARD */
.evento-hero-card {
  position: relative;
  background: linear-gradient(135deg, #121856 0%, #1a237e 60%, #3f51b5 100%);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(26, 35, 126, 0.2);
  margin-bottom: 0;
}

.evento-hero-overlay {
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.evento-hero-content {
  position: relative;
  z-index: 2;
  padding: 36px 40px;
}

.evento-hero-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.9rem;
  color: #ffffff;
  line-height: 1.2;
  margin: 10px 0 8px 0;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.evento-hero-location {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
  margin-bottom: 6px;
  font-weight: 500;
}

.evento-hero-geo {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
}

.evento-asistencia-counter {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 20px 30px;
  backdrop-filter: blur(8px);
  min-width: 130px;
}

.counter-number {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 3rem;
  color: #ffffff;
  line-height: 1;
}

.counter-label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

/* SMALL USER AVATAR (event profile) */
.user-avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  color: white;
  flex-shrink: 0;
}

/* MODAL DATA BLOCKS (attendee detail) */
.modal-data-block {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 16px;
  height: 100%;
}

.modal-data-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: #94a3b8;
  margin-bottom: 5px;
}

.modal-data-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: #0f172a;
}


/* PRINT MEDIA CONFIGURATION (Strict A4 Layout) */
@media print {
  body {
    background-color: white !important;
    color: black !important;
    font-size: 12pt;
  }
  #sidebar, .navbar-toggler-c28, .btn, .dataTables_length, .dataTables_filter, .dataTables_info, .dataTables_paginate, .card-title::after, .filter-section {
    display: none !important;
  }
  #content {
    margin-left: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }
  .glass-card {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  table.dataTable {
    width: 100% !important;
    border: 1px solid #000 !important;
  }
  table.dataTable thead {
    background: #f1f5f9 !important;
    color: #000 !important;
  }
  table.dataTable thead th, table.dataTable tbody td {
    border: 1px solid #ccc !important;
    padding: 8px !important;
  }
}
