/* ===================================================
   ANPE CONGRESO — Sistema de Gestión
   Hoja de Estilos Global v2.0
   Colores corporativos ANPE
   =================================================== */

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

/* ===== VARIABLES ===== */
:root {
  --anpe-blue:       #009FE3;
  --anpe-blue-dark:  #007BB5;
  --anpe-green:      #009F40;
  --anpe-green-dark: #007A30;
  --anpe-white:      #FFFFFF;
  --anpe-light:      #EEF2F7;
  --anpe-dark:       #005A8A;
  --anpe-gradient:   linear-gradient(160deg, #003F6B 0%, #006FB0 60%, #009FE3 100%);
  --sidebar-bg-top:  #0088C8;
  --sidebar-bg-bot:  #004E7A;
  --danger:          #D32F2F;
  --danger-dark:     #B71C1C;
  --warning:         #F57C00;
  --warning-light:   #FFF8E1;
  --gray-100:        #F2F5F8;
  --gray-200:        #E4E9EF;
  --gray-300:        #C8D0DA;
  --gray-500:        #8A95A3;
  --gray-700:        #4A5568;
  --gray-900:        #383E41;
  --sidebar-width:   272px;
  --header-height:   62px;
  --shadow-sm:       0 2px 6px rgba(0,0,0,0.06);
  --shadow-md:       6px 6px 18px rgba(0,0,0,0.10);
  --shadow-lg:       12px 12px 40px rgba(0,0,0,0.16);
  --shadow-hover:    0 16px 40px rgba(0,159,227,0.22);
  --shadow-card:     0 4px 20px rgba(0,0,0,0.08);
  --radius-sm:       6px;
  --radius-md:       10px;
  --radius-lg:       16px;
  --radius-xl:       22px;
  --radius-pill:     9999px;
  --transition:      all 0.22s ease;
}

/* ===== RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--anpe-light);
  color: var(--gray-900);
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--anpe-blue); text-decoration: none; }
a:hover { color: var(--anpe-blue-dark); }
img { max-width: 100%; }

/* ===== ADMIN LAYOUT ===== */

.sidebar {
  position: fixed;
  left: 0; top: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: linear-gradient(175deg, var(--sidebar-bg-top) 0%, var(--sidebar-bg-bot) 100%);
  display: flex;
  flex-direction: column;
  z-index: 200;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform 0.3s ease;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  flex-shrink: 0;
  background: rgba(0,0,0,0.12);
}

.sidebar-logo {
  height: 38px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
  flex-shrink: 0;
}

.sidebar-logo-fallback {
  width: 38px;
  height: 38px;
  background: var(--anpe-blue);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
}

.sidebar-titles { min-width: 0; }
.sidebar-brand {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--anpe-white);
  line-height: 1.2;
}
.sidebar-subtitle {
  display: block;
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  margin-top: 1px;
}

.sidebar-session {
  margin: 10px 12px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  flex-shrink: 0;
}
.session-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.6);
  font-weight: 600;
  margin-bottom: 3px;
}
.session-name {
  color: white;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.session-type {
  color: rgba(255,255,255,0.45);
  font-size: 11px;
  margin-top: 2px;
}

.sidebar-nav {
  flex: 1;
  padding: 6px 0;
  overflow-y: auto;
}

.nav-group { margin-bottom: 4px; padding: 0 10px; }
.nav-group-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.5);
  font-weight: 600;
  padding: 10px 10px 5px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  margin-bottom: 1px;
  line-height: 1;
}
.nav-item svg { width: 15px; height: 15px; flex-shrink: 0; stroke-width: 2; }
.nav-item:hover { background: rgba(255,255,255,0.12); color: white; }
.nav-item.active { background: rgba(255,255,255,0.22); color: white; font-weight: 600; }
.nav-item.active:hover { background: rgba(255,255,255,0.28); }

.nav-session-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 12px;
  border-radius: var(--radius-md);
  font-size: 12.5px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 1px;
  background: rgba(255,255,255,0.06);
  gap: 6px;
}
.nav-session-item.active-session {
  border-left: 3px solid var(--anpe-green);
  color: rgba(255,255,255,0.8);
  padding-left: 10px;
}
.nav-session-name { flex: 1; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-session-actions { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.nav-session-actions a,
.nav-session-actions .btn-icon {
  color: rgba(255,255,255,0.35);
  background: none;
  border: none;
  cursor: pointer;
  padding: 3px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  transition: var(--transition);
  line-height: 1;
}
.nav-session-actions a:hover,
.nav-session-actions .btn-icon:hover { color: white; background: rgba(255,255,255,0.1); }
.nav-session-actions svg { width: 13px; height: 13px; }

.sidebar-footer {
  padding: 10px 10px;
  border-top: 1px solid rgba(255,255,255,0.15);
  flex-shrink: 0;
  background: rgba(0,0,0,0.1);
}
.nav-logout { color: rgba(255,255,255,0.55); }
.nav-logout:hover { color: #FFB3B3; background: rgba(211,47,47,0.18); }

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 199;
}

/* Main layout */
.admin-layout {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top bar */
.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: white;
  border-bottom: 1px solid var(--gray-200);
  border-top: 3px solid var(--anpe-blue);
  height: var(--header-height);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 14px;
  box-shadow: var(--shadow-sm);
}
.topbar-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-700);
  padding: 4px;
  border-radius: var(--radius-sm);
  align-items: center;
}
.topbar-hamburger svg { width: 20px; height: 20px; }

.topbar-logo {
  display: none;
  align-items: center;
  background: linear-gradient(135deg, var(--anpe-blue), var(--anpe-blue-dark));
  border-radius: var(--radius-md);
  padding: 5px 12px;
  flex-shrink: 0;
  text-decoration: none;
}
.topbar-logo img {
  height: 24px;
  object-fit: contain;
  max-width: 90px;
  display: block;
}
.topbar-title { font-size: 17px; font-weight: 600; color: var(--gray-900); }
.topbar-spacer { flex: 1; }
.topbar-session {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--gray-500);
}
.topbar-session-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--anpe-green);
  animation: pulse 2s infinite;
}
.topbar-session strong { color: var(--anpe-blue); font-weight: 600; }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

.page-content { padding: 24px 28px 48px; flex: 1; }

/* Page heading */
.page-heading {
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.page-heading h1 { font-size: 22px; font-weight: 700; color: var(--gray-900); }
.page-heading p { font-size: 14px; color: var(--gray-500); margin-top: 2px; }

/* ===== GLOBAL HEADER (checkin / portero) ===== */
.site-header {
  background: var(--anpe-blue);
  color: white;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 10px rgba(0,159,227,0.35);
}
.site-header-logo { display: flex; align-items: center; gap: 10px; }
.site-header-logo img {
  height: 36px; width: auto;
  object-fit: contain;
}
.site-header-logo span { font-size: 18px; font-weight: 700; }
.site-header-subtitle { font-size: 13px; opacity: 0.8; }

/* ===== KPI CARDS ===== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(195px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}
.kpi-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 22px 24px;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  gap: 18px;
  transition: var(--transition);
  animation: fadeInUp 0.4s ease both;
  border-bottom: 4px solid transparent;
}
.kpi-card:nth-child(1) { animation-delay: 0.05s; border-bottom-color: var(--anpe-blue); }
.kpi-card:nth-child(2) { animation-delay: 0.10s; border-bottom-color: var(--anpe-green); }
.kpi-card:nth-child(3) { animation-delay: 0.15s; border-bottom-color: var(--warning); }
.kpi-card:nth-child(4) { animation-delay: 0.20s; border-bottom-color: var(--anpe-dark); }
.kpi-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.kpi-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.kpi-icon svg { width: 24px; height: 24px; color: white; }
.kpi-icon.blue   { background: linear-gradient(135deg, var(--anpe-blue), var(--anpe-blue-dark)); }
.kpi-icon.green  { background: linear-gradient(135deg, var(--anpe-green), var(--anpe-green-dark)); }
.kpi-icon.orange { background: linear-gradient(135deg, #FF9800, #E65100); }
.kpi-icon.dark   { background: linear-gradient(135deg, var(--anpe-dark), #003A5C); }

.kpi-value {
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  color: var(--gray-900);
}
.kpi-label {
  font-size: 12.5px;
  color: var(--gray-500);
  margin-top: 3px;
  font-weight: 500;
}

/* ===== PROGRESS BAR ===== */
.progress-section {
  background: white;
  border-radius: var(--radius-xl);
  padding: 20px 24px;
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
  animation: fadeInUp 0.4s ease 0.25s both;
}
.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.progress-label { font-size: 13px; font-weight: 600; color: var(--gray-700); }
.progress-pct   { font-size: 13px; font-weight: 700; color: var(--anpe-green); }
.progress-bar {
  height: 8px;
  background: var(--gray-200);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--anpe-green), #00c853);
  border-radius: 999px;
  width: 0%;
  transition: width 1.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== CARDS ===== */
.card {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: var(--transition);
  animation: fadeInUp 0.4s ease both;
  margin-bottom: 22px;
}
.card:hover { box-shadow: var(--shadow-md); }
.card-lift:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }

.card-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-900);
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-title svg { color: var(--anpe-blue); width: 16px; height: 16px; }
.card-body { padding: 24px; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 22px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  user-select: none;
  line-height: 1;
  letter-spacing: 0.1px;
}
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }

.btn-primary { background: var(--anpe-blue); color: white; }
.btn-primary:hover { background: var(--anpe-blue-dark); color: white; transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,159,227,0.4); }

.btn-success { background: var(--anpe-green); color: white; }
.btn-success:hover { background: var(--anpe-green-dark); color: white; transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,159,64,0.4); }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: var(--danger-dark); color: white; transform: translateY(-2px); box-shadow: 0 6px 18px rgba(211,47,47,0.35); }

.btn-warning { background: var(--warning); color: white; }
.btn-warning:hover { filter: brightness(0.9); color: white; transform: translateY(-2px); box-shadow: 0 6px 18px rgba(245,124,0,0.35); }

.btn-secondary { background: var(--gray-200); color: var(--gray-700); }
.btn-secondary:hover { background: var(--gray-300); color: var(--gray-900); transform: translateY(-2px); box-shadow: var(--shadow-sm); }

.btn-outline { background: transparent; color: var(--anpe-blue); border: 2px solid var(--anpe-blue); }
.btn-outline:hover { background: var(--anpe-blue); color: white; transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,159,227,0.3); }

.btn-dark { background: var(--anpe-dark); color: white; }
.btn-dark:hover { filter: brightness(1.2); color: white; transform: translateY(-2px); box-shadow: var(--shadow-md); }

.btn-sm { padding: 6px 15px; font-size: 12px; }
.btn-sm svg { width: 13px; height: 13px; }
.btn-lg { padding: 14px 32px; font-size: 15px; }
.btn-block { width: 100%; }

/* Ripple */
.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  transform: scale(0);
  animation: ripple 0.55s linear;
  pointer-events: none;
}
@keyframes ripple {
  to { transform: scale(4); opacity: 0; }
}

/* ===== FORMS ===== */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-500);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.form-control {
  width: 100%;
  padding: 11px 16px;
  border: 1.5px solid #E2E8F0;
  border-radius: var(--radius-lg);
  font-family: inherit;
  font-size: 15px;
  color: var(--gray-900);
  background: #FAFBFC;
  transition: var(--transition);
  outline: none;
  box-shadow: none;
}
.form-control:focus { border-color: var(--anpe-blue); background: white; box-shadow: 0 0 0 3px rgba(0,111,176,0.12); }
.form-control.valid { border-color: var(--anpe-green); box-shadow: 0 0 0 4px rgba(0,159,64,0.14); }
.form-control.invalid { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(211,47,47,0.14); }
.form-control::placeholder { color: var(--gray-300); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.form-hint { font-size: 12px; color: var(--gray-500); margin-top: 4px; }

/* ===== TABLES ===== */
.table-wrapper {
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  background: white;
}
.table-wrapper-scroll { overflow-x: auto; }

.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }

.table thead th {
  background: linear-gradient(135deg, var(--anpe-blue) 0%, var(--anpe-blue-dark) 100%);
  color: white;
  padding: 14px 16px;
  font-weight: 600;
  font-size: 12px;
  text-align: left;
  white-space: nowrap;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-200);
  color: var(--gray-700);
  vertical-align: middle;
}
.table tbody tr:nth-child(even) td { background: var(--gray-100); }
.table tbody tr:hover td { background: rgba(0,159,227,0.05); }
.table tbody tr:last-child td { border-bottom: none; }
.table-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-500);
  font-size: 14px;
}
.table-empty svg { width: 40px; height: 40px; color: var(--gray-300); margin-bottom: 12px; display: block; margin-inline: auto; }

/* Table toolbar */
.table-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.table-search { position: relative; flex: 1; min-width: 200px; max-width: 340px; }
.table-search svg {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--gray-500); pointer-events: none;
}
.table-search input {
  width: 100%;
  padding: 9px 14px 9px 34px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 13.5px;
  transition: var(--transition);
  outline: none;
  color: var(--gray-900);
  background: white;
  box-shadow: var(--shadow-sm);
}
.table-search input:focus { border-color: var(--anpe-blue); box-shadow: 0 0 0 4px rgba(0,159,227,0.12); }

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: white;
  border-top: 1px solid var(--gray-200);
  font-size: 13px;
  flex-wrap: wrap;
  gap: 10px;
}
.pagination-info { color: var(--gray-500); }
.pagination-controls { display: flex; gap: 4px; }
.page-btn {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--gray-200);
  background: white;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  color: var(--gray-700);
  box-shadow: var(--shadow-sm);
}
.page-btn:hover { border-color: var(--anpe-blue); color: var(--anpe-blue); box-shadow: 0 4px 10px rgba(0,159,227,0.2); }
.page-btn.active { background: var(--anpe-blue); color: white; border-color: var(--anpe-blue); box-shadow: 0 4px 12px rgba(0,159,227,0.35); }
.page-btn:disabled { opacity: 0.35; cursor: default; box-shadow: none; }

/* ===== BADGES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.badge svg { width: 11px; height: 11px; }

.badge-success { background: #E8F5E9; color: #2E7D32; }
.badge-warning { background: #FFF8E1; color: #BF360C; }
.badge-info    { background: #E3F2FD; color: #1565C0; }
.badge-danger  { background: #FFEBEE; color: #C62828; }
.badge-gray    { background: var(--gray-200); color: var(--gray-700); }
.badge-seat {
  background: var(--anpe-blue);
  color: white;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
}

/* ===== ALERTS ===== */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  margin-bottom: 18px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-left: 5px solid;
  box-shadow: var(--shadow-sm);
}
.alert svg { width: 17px; height: 17px; flex-shrink: 0; margin-top: 1px; }
.alert-success { background: #E8F5E9; color: #2E7D32; border-color: var(--anpe-green); }
.alert-warning { background: var(--warning-light); color: #BF360C; border-color: var(--warning); }
.alert-danger  { background: #FFEBEE; color: #C62828; border-color: var(--danger); }
.alert-info    { background: #E3F2FD; color: #1565C0; border-color: var(--anpe-blue); }

/* ===== MODALS ===== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; animation: fadeIn 0.15s ease; }

.modal {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 64px rgba(0,0,0,0.2);
  width: 100%;
  max-width: 480px;
  animation: scaleIn 0.2s ease;
}
.modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-900);
  display: flex;
  align-items: center;
  gap: 8px;
}
.modal-title svg { width: 18px; height: 18px; color: var(--anpe-blue); }
.modal-close {
  background: none; border: none; cursor: pointer;
  color: var(--gray-500); padding: 4px;
  border-radius: var(--radius-sm); transition: var(--transition);
  display: flex; align-items: center;
}
.modal-close:hover { background: var(--gray-200); color: var(--gray-900); }
.modal-close svg { width: 17px; height: 17px; }
.modal-body { padding: 22px; }
.modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--gray-200);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ===== TOASTS ===== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  border-radius: var(--radius-pill);
  background: var(--gray-900);
  color: white;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: slideInRight 0.3s ease;
  max-width: 360px;
}
.toast svg { width: 17px; height: 17px; flex-shrink: 0; }
.toast-success { background: var(--anpe-green-dark); }
.toast-danger  { background: var(--danger-dark); }
.toast-warning { background: var(--warning); }
.toast-info    { background: var(--anpe-blue-dark); }
.toast.toast-hide { animation: slideOutRight 0.3s ease forwards; }

/* ===== SPINNER ===== */
.spinner-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.8);
  z-index: 9000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  backdrop-filter: blur(2px);
}
.spinner-overlay.show { display: flex; }
.spinner {
  width: 38px; height: 38px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--anpe-blue);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
.spinner-label { font-size: 13px; color: var(--gray-700); font-weight: 500; }

/* ===== FILTERS BAR ===== */
.filters-bar {
  background: white;
  border-radius: var(--radius-xl);
  padding: 16px 20px;
  box-shadow: var(--shadow-card);
  margin-bottom: 20px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
}
.filter-group { display: flex; flex-direction: column; gap: 4px; min-width: 140px; }
.filter-label { font-size: 11px; font-weight: 600; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.5px; }
.filters-bar select.form-control { border-radius: var(--radius-lg); padding: 9px 14px; }
.filters-bar .btn { align-self: flex-end; }

/* ===== INFO BOX ===== */
.info-box {
  background: var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.info-box.blue { background: rgba(0,159,227,0.07); border-left: 4px solid var(--anpe-blue); }
.info-box.green { background: rgba(0,159,64,0.07); border-left: 4px solid var(--anpe-green); }

/* ===== SEAT CARD ===== */
.seat-card {
  background: linear-gradient(135deg, var(--anpe-blue), var(--anpe-blue-dark));
  color: white;
  border-radius: var(--radius-xl);
  padding: 22px 18px;
  text-align: center;
  margin-bottom: 18px;
  box-shadow: 0 8px 24px rgba(0,159,227,0.3);
}
.seat-grid {
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin-top: 10px;
}
.seat-number { font-size: 44px; font-weight: 700; line-height: 1; }
.seat-sub { font-size: 11px; opacity: 0.75; text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; }
.seat-divider { width: 1px; height: 56px; background: rgba(255,255,255,0.25); }
.seat-card-label { font-size: 11px; opacity: 0.7; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }

/* ===== QR SECTION ===== */
.qr-section {
  text-align: center;
  padding: 20px 0;
  border-top: 2px dashed var(--gray-200);
  margin-top: 20px;
}
.qr-image {
  width: 180px; height: 180px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  margin: 14px auto;
  display: block;
}

/* ===== UPLOAD AREA ===== */
.upload-area {
  border: 2px dashed var(--anpe-blue);
  border-radius: var(--radius-xl);
  padding: 52px 28px;
  text-align: center;
  background: rgba(0,159,227,0.03);
  transition: var(--transition);
  cursor: pointer;
}
.upload-area:hover { background: rgba(0,159,227,0.07); border-color: var(--anpe-blue-dark); }
.upload-icon { width: 52px; height: 52px; color: var(--anpe-blue); margin: 0 auto 14px; }

/* ===== CHECKIN PAGE ===== */
.checkin-page {
  min-height: 100vh;
  background: var(--anpe-gradient);
  display: flex;
  flex-direction: column;
}
.checkin-header {
  background: rgba(0,0,0,0.12);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
}
.checkin-header img { height: 42px; object-fit: contain; max-width: 160px; }
.checkin-header span { font-size: 15px; font-weight: 600; }
.checkin-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.checkin-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 38px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.22);
  animation: scaleIn 0.3s ease;
}
.checkin-logo { text-align: center; margin-bottom: 26px; }
.checkin-logo img { height: 52px; margin-bottom: 10px; }
.checkin-logo h1 { font-size: 19px; font-weight: 700; color: var(--gray-900); }
.checkin-logo p { font-size: 13px; color: var(--gray-500); margin-top: 3px; }

.checkin-footer {
  background: var(--anpe-dark);
  color: rgba(255,255,255,0.5);
  text-align: center;
  padding: 14px;
  font-size: 12px;
}

/* Confirm page */
.confirm-page { min-height: 100vh; background: var(--anpe-light); }
.confirm-header {
  background: linear-gradient(135deg, var(--anpe-blue), var(--anpe-blue-dark));
  color: white;
  padding: 36px 24px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,159,227,0.3);
}
.confirm-success-icon {
  width: 68px; height: 68px;
  background: rgba(255,255,255,0.22);
  border: 3px solid rgba(255,255,255,0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 0 30px rgba(255,255,255,0.12);
}
.confirm-success-icon svg { width: 32px; height: 32px; color: white; }
.confirm-card {
  max-width: 520px;
  margin: 24px auto;
  padding: 0 16px;
}

/* ===== PORTERO (DARK THEME) ===== */
body.portero-body { background: #002D4A; color: white; }

.portero-login-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--anpe-gradient);
}
.portero-login-card {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius-xl);
  padding: 36px 30px;
  width: 100%;
  max-width: 360px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.4);
}
.portero-login-logo { text-align: center; margin-bottom: 24px; }
.portero-login-logo img { height: 52px; object-fit: contain; }
.portero-login-card h1 { font-size: 20px; font-weight: 700; text-align: center; color: white; margin-bottom: 4px; }
.portero-login-card p { text-align: center; color: rgba(255,255,255,0.45); font-size: 13px; margin-bottom: 24px; }
.portero-error { background: rgba(211,47,47,0.15); color: #EF9A9A; padding: 10px 14px; border-radius: var(--radius-md); font-size: 13px; margin-bottom: 14px; }

.portero-input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255,255,255,0.07);
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-lg);
  color: white;
  font-family: inherit;
  font-size: 14.5px;
  margin-bottom: 10px;
  transition: var(--transition);
  outline: none;
}
.portero-input::placeholder { color: rgba(255,255,255,0.3); }
.portero-input:focus { border-color: var(--anpe-blue); box-shadow: 0 0 0 3px rgba(0,159,227,0.18); }
.portero-input-pw { letter-spacing: 4px; font-size: 18px; }

.portero-app { display: flex; flex-direction: column; height: 100vh; }

.portero-header {
  background: rgba(0,0,0,0.3);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}
.portero-header-left h1 { font-size: 16px; font-weight: 600; color: white; }
.portero-header-left p { font-size: 12px; color: var(--anpe-blue); margin-top: 1px; }
.portero-logout { color: rgba(255,255,255,0.45); font-size: 12px; text-decoration: none; border: 1px solid rgba(255,255,255,0.15); padding: 6px 14px; border-radius: var(--radius-pill); transition: var(--transition); display: inline-flex; align-items: center; gap: 5px; }
.portero-logout:hover { color: white; border-color: rgba(255,255,255,0.35); }

.portero-stats {
  display: flex;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.portero-stat {
  flex: 1;
  text-align: center;
  padding: 10px;
  border-right: 1px solid rgba(255,255,255,0.06);
}
.portero-stat:last-child { border-right: none; }
.portero-stat-num { font-size: 26px; font-weight: 700; color: var(--anpe-blue); display: block; line-height: 1.2; }
.portero-stat-num.green { color: var(--anpe-green); }
.portero-stat-label { font-size: 10.5px; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 0.5px; }

.mode-selector {
  display: flex;
  gap: 8px;
  padding: 10px;
  background: rgba(0,0,0,0.25);
  flex-shrink: 0;
}
.mode-btn {
  flex: 1;
  padding: 12px;
  border: 2px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 600;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: transparent;
  font-family: inherit;
}
.mode-btn svg { width: 16px; height: 16px; }
.mode-btn:hover { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.75); }
.mode-btn.entrada.active { border-color: var(--anpe-green); background: rgba(0,159,64,0.18); color: var(--anpe-green); box-shadow: 0 4px 12px rgba(0,159,64,0.25); }
.mode-btn.salida.active  { border-color: var(--warning); background: rgba(245,124,0,0.18); color: var(--warning); box-shadow: 0 4px 12px rgba(245,124,0,0.25); }

.scan-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  position: relative;
  overflow: hidden;
}

#reader {
  width: 100% !important;
  max-width: min(300px, calc(100vw - 48px));
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
}

.scan-frame-wrapper {
  position: relative;
  max-width: min(300px, calc(100vw - 48px));
  width: 100%;
}

.scan-line {
  position: absolute;
  left: 8%;
  right: 8%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--anpe-blue), transparent);
  border-radius: 2px;
  z-index: 20;
  animation: scanLine 2.5s ease-in-out infinite;
  pointer-events: none;
}

.scan-manual-btn {
  margin-top: 14px;
  padding: 9px 20px;
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}
.scan-manual-btn svg { width: 14px; height: 14px; }
.scan-manual-btn:hover { background: rgba(255,255,255,0.12); color: white; }

/* Portero result overlay */
.portero-result {
  position: fixed;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 500;
  text-align: center;
  padding: 24px;
  animation: fadeIn 0.2s ease;
}
.portero-result.show { display: flex; }
.portero-result.ok   { background: linear-gradient(135deg, var(--anpe-green-dark), #005A20); }
.portero-result.err  { background: linear-gradient(135deg, var(--danger-dark), #7F0000); }
.portero-result.warn { background: linear-gradient(135deg, #E65100, #BF360C); }

.result-icon {
  width: 82px; height: 82px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: 3px solid rgba(255,255,255,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 0 40px rgba(255,255,255,0.1);
}
.result-icon svg { width: 36px; height: 36px; color: white; }
.result-title { font-size: 26px; font-weight: 700; color: white; margin-bottom: 10px; }
.result-name  { font-size: 17px; color: rgba(255,255,255,0.9); }
.result-detail { font-size: 13px; color: rgba(255,255,255,0.65); margin-top: 5px; }

/* Portero modal */
.portero-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.portero-modal.open { display: flex; }
.portero-modal-card {
  background: #1C2333;
  border: 1px solid rgba(255,255,255,0.1);
  padding: 28px 24px;
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 340px;
}
.portero-modal-card h3 { color: white; font-size: 16px; margin-bottom: 18px; text-align: center; }
.portero-modal-card input {
  width: 100%;
  padding: 13px 16px;
  background: rgba(255,255,255,0.07);
  border: 1.5px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-lg);
  color: white;
  font-family: inherit;
  font-size: 15px;
  text-align: center;
  margin-bottom: 12px;
  outline: none;
}
.portero-modal-card input:focus { border-color: var(--anpe-blue); }
.portero-modal-card input::placeholder { color: rgba(255,255,255,0.3); }

/* Portero buttons */
.portero-btn-primary {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--anpe-blue), var(--anpe-blue-dark));
  color: white;
  border: none;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(0,159,227,0.35);
}
.portero-btn-primary:hover { box-shadow: 0 6px 20px rgba(0,159,227,0.5); transform: translateY(-1px); }
.portero-btn-cancel {
  width: 100%;
  padding: 11px;
  background: transparent;
  color: rgba(255,255,255,0.5);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
}
.portero-btn-cancel:hover { color: white; border-color: rgba(255,255,255,0.3); }

/* Portero loading result */
.portero-result.loading { background: #1C2333; }

/* Portero movement list */
.portero-movement-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius-md);
  margin-bottom: 6px;
  animation: slideInDown 0.25s ease;
  border: 1px solid rgba(255,255,255,0.07);
}
.portero-movement-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 4px;
  flex-shrink: 0;
  letter-spacing: 0.5px;
}
.portero-movement-badge.entrada { background: rgba(0,159,64,0.2); color: var(--anpe-green); }
.portero-movement-badge.salida  { background: rgba(245,124,0,0.2); color: var(--warning); }
.portero-movement-name { flex: 1; font-size: 13px; color: rgba(255,255,255,0.85); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.portero-movement-seat { font-size: 11px; color: rgba(255,255,255,0.4); flex-shrink: 0; }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--anpe-dark);
  color: rgba(255,255,255,0.45);
  text-align: center;
  padding: 14px 24px;
  font-size: 12.5px;
}
.site-footer strong { color: rgba(255,255,255,0.75); }

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.93); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(110%); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideOutRight {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(110%); }
}
@keyframes slideInDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes scanLine {
  0%   { top: 8%; }
  50%  { top: 88%; }
  100% { top: 8%; }
}

/* ===== RESPONSIVE ===== */

/* ── 1100px: compress sidebar ── */
@media (max-width: 1100px) {
  :root { --sidebar-width: 240px; }
  .page-content { padding: 20px 22px 48px; }
}

/* ── 900px: sidebar becomes drawer ── */
@media (max-width: 900px) {
  :root { --sidebar-width: 268px; }
  .sidebar { transform: translateX(-100%); box-shadow: none; }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .sidebar-overlay.show { display: block; }
  .admin-layout { margin-left: 0; }
  .topbar-hamburger { display: flex; }
  .topbar-logo { display: inline-flex; }
  .page-content { padding: 16px 16px 48px; }

  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .kpi-card { padding: 16px 18px; gap: 14px; }
  .kpi-value { font-size: 26px; }
  .kpi-icon { width: 44px; height: 44px; }
  .kpi-icon svg { width: 20px; height: 20px; }

  .page-heading { flex-direction: column; align-items: flex-start; gap: 12px; }
  .page-heading .d-flex { flex-wrap: wrap; width: 100%; }
  .page-heading .btn { flex: 1; justify-content: center; min-width: 140px; }

  .card-header { flex-wrap: wrap; gap: 10px; }
  .card-header .d-flex { flex-wrap: wrap; gap: 8px; }

  .topbar-session { display: none; }

  .admin-topbar { padding: 0 16px; }
  .topbar-title { font-size: 15px; }

  .table { font-size: 13px; }
  .table thead th { padding: 11px 12px; font-size: 11px; }
  .table tbody td { padding: 10px 12px; }

  .progress-section { padding: 16px 18px; }
  .filters-bar { padding: 14px 16px; }

  .modal { max-width: calc(100vw - 32px); }
}

/* ── 640px: small tablets / large phones ── */
@media (max-width: 640px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .kpi-card { padding: 14px 14px; gap: 12px; border-bottom-width: 3px; }
  .kpi-value { font-size: 22px; }
  .kpi-label { font-size: 11.5px; }
  .kpi-icon { width: 40px; height: 40px; border-radius: var(--radius-md); }
  .kpi-icon svg { width: 18px; height: 18px; }

  .form-row { grid-template-columns: 1fr; }
  .filters-bar { flex-direction: column; gap: 10px; padding: 14px; }
  .filter-group { min-width: unset; width: 100%; }
  .filters-bar .btn { width: 100%; justify-content: center; }

  .table-toolbar { flex-direction: column; align-items: stretch; gap: 8px; }
  .table-search { max-width: 100%; }

  .pagination { flex-direction: column; align-items: center; gap: 8px; padding: 12px; }
  .pagination-info { font-size: 12px; }

  .card-body { padding: 16px; }
  .card-header { padding: 14px 16px; }

  .page-content { padding: 12px 12px 40px; }
  .page-heading h1 { font-size: 18px; }

  .checkin-card { padding: 24px 18px; }
  .checkin-logo img { height: 46px; }
  .checkin-logo h1 { font-size: 17px; }

  .confirm-header { padding: 24px 16px; }
  .confirm-card { padding: 0 12px; margin: 16px auto; }

  .seat-number { font-size: 36px; }

  .modal { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal-body { padding: 18px; }
  .modal-footer { padding: 12px 18px; }

  .btn-lg { padding: 13px 28px; font-size: 14px; }
  .btn-block-mobile { width: 100%; justify-content: center; }

  .progress-section { padding: 14px 16px; }

  .site-footer { font-size: 11.5px; padding: 12px 16px; }
}

/* ── 480px: phones ── */
@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .kpi-card { padding: 12px 12px; gap: 10px; }
  .kpi-value { font-size: 20px; }
  .kpi-label { font-size: 11px; }
  .kpi-icon { width: 36px; height: 36px; }
  .kpi-icon svg { width: 16px; height: 16px; }

  .admin-topbar { height: 54px; }
  .topbar-title { font-size: 14px; }

  .page-heading h1 { font-size: 17px; }
  .page-heading .btn { font-size: 13px; padding: 8px 16px; }

  .table { font-size: 12.5px; }
  .table thead th { padding: 10px; font-size: 10.5px; }
  .table tbody td { padding: 9px 10px; }

  .badge { font-size: 11px; padding: 2px 7px; }

  .card-body { padding: 14px; }
  .card-header { padding: 12px 14px; }
  .card-title { font-size: 14px; }

  .btn { font-size: 13px; padding: 8px 18px; }
  .btn-sm { font-size: 11.5px; padding: 5px 12px; }
  .btn-lg { padding: 12px 24px; font-size: 14px; }

  .checkin-card { padding: 22px 16px; border-radius: var(--radius-lg); }

  .modal { max-width: 100%; margin: 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .modal-overlay { align-items: flex-end; padding: 0; }

  .alert { padding: 12px 14px; font-size: 13px; }
  .alert svg { width: 15px; height: 15px; }

  .form-control { padding: 9px 13px; font-size: 14px; }
  .form-label { font-size: 11.5px; }

  .page-content { padding: 10px 10px 36px; }

  .seat-number { font-size: 32px; }
  .seat-sub { font-size: 10px; }
  .seat-divider { height: 44px; }

  /* Portero */
  .portero-login-wrap { padding: 16px; }
  .portero-login-card { padding: 28px 20px; }
  .portero-header { padding: 10px 14px; }
  .portero-stat-num { font-size: 22px; }
  .result-title { font-size: 22px; }
  .result-name  { font-size: 15px; }
}

/* ── 380px: very small phones ── */
@media (max-width: 380px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
  .kpi-card { padding: 10px 10px; }
  .kpi-value { font-size: 18px; }
  .kpi-icon { width: 32px; height: 32px; border-radius: var(--radius-sm); }
  .kpi-icon svg { width: 14px; height: 14px; }

  .page-heading .btn { font-size: 12px; padding: 7px 14px; }
  .table-toolbar .btn { font-size: 12px; }

  .checkin-card { padding: 18px 14px; }
  .card-body { padding: 12px; }

  .portero-stat-num { font-size: 20px; }
  .mode-btn { font-size: 12px; padding: 10px; }
  .mode-btn svg { width: 15px; height: 15px; }
  .portero-login-card { padding: 28px 18px; }
}

/* ===== UTILITIES ===== */
.d-flex       { display: flex; }
.d-grid       { display: grid; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-1       { flex: 1; }
.flex-wrap    { flex-wrap: wrap; }
.gap-2        { gap: 8px; }
.gap-3        { gap: 12px; }
.gap-4        { gap: 16px; }
.w-100        { width: 100%; }
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.justify-center { justify-content: center; }
.text-muted   { color: var(--gray-500); }
.text-sm      { font-size: 12.5px; }
.fw-bold      { font-weight: 700; }
.fw-semibold  { font-weight: 600; }
.hidden       { display: none !important; }
.mt-1         { margin-top: 4px; }
.mt-2         { margin-top: 8px; }
.mt-3         { margin-top: 12px; }
.mt-4         { margin-top: 16px; }
.mb-0         { margin-bottom: 0; }
.mb-1         { margin-bottom: 4px; }
.mb-2         { margin-bottom: 8px; }
.mb-3         { margin-bottom: 12px; }
.mb-4         { margin-bottom: 16px; }
.p-0          { padding: 0; }
.overflow-auto { overflow: auto; }
