/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black:   #0d0d0d;
  --white:   #ffffff;
  --gray-50: #f7f7f5;
  --gray-100:#efefec;
  --gray-200:#ddddd8;
  --gray-400:#a0a09a;
  --gray-500:#8a8a84;
  --gray-600:#666660;
  --gray-800:#333330;
  --accent:  #e8251a;

  --suc-01: #185FA5;
  --suc-05: #0F6E56;
  --suc-09: #B45309;
  --suc-10: #9B2563;
  --suc-12: #534AB7;
  --suc-14: #3B6D11;

  --suc-01-light: #E6F1FB;
  --suc-05-light: #E1F5EE;
  --suc-09-light: #FEF3C7;
  --suc-10-light: #FCE7F3;
  --suc-12-light: #EEEDFE;
  --suc-14-light: #EAF3DE;

  --font-display: 'Bebas Neue', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
}

html { font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--gray-50);
  color: var(--black);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ===== SPLASH SCREEN ===== */
#splashScreen {
  position: fixed;
  inset: 0;
  background: #0d0d0d;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  z-index: 99999;
  transition: opacity .6s ease;
}
#splashScreen.splash-hide {
  opacity: 0;
  pointer-events: none;
}
#splashLogo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  animation: splashLogoIn .7s cubic-bezier(0.390, 0.575, 0.565, 1.000) both;
}
#splashText {
  font-family: var(--font-display);
  font-size: 36px;
  letter-spacing: 6px;
  color: #fff;
  animation: splashLogoIn .7s .15s cubic-bezier(0.390, 0.575, 0.565, 1.000) both;
}
@keyframes splashLogoIn {
  0%   { opacity: 0; transform: scale(.85); }
  100% { opacity: 1; transform: scale(1); }
}

/* ===== TOPBAR ===== */
.topbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0 2rem; height: 56px;
  background: var(--black);
  border-bottom: 1px solid #222;
}

.brand { display: flex; align-items: baseline; gap: 8px; }
.brand-logo {
  font-family: var(--font-display);
  font-size: 22px; letter-spacing: 2px;
  color: var(--white);
}
.brand-divider { color: var(--gray-600); font-size: 14px; }
.brand-section {
  font-size: 11px; font-weight: 500; letter-spacing: 3px;
  color: var(--gray-400); text-transform: uppercase;
}

.top-nav { display: flex; gap: 2px; margin-left: 1rem; }
.nav-btn {
  padding: 6px 14px; border: none; background: transparent;
  color: var(--gray-400); font-family: var(--font-body);
  font-size: 13px; font-weight: 400; cursor: pointer;
  border-radius: var(--radius-sm); transition: all 0.15s;
  letter-spacing: 0.3px;
}
.nav-btn:hover { color: var(--white); background: rgba(255,255,255,0.08); }
.nav-btn.active { color: var(--white); background: rgba(255,255,255,0.12); font-weight: 500; }

.top-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.btn-icon {
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  border: 1px solid #333; border-radius: var(--radius-sm);
  background: transparent; color: var(--gray-400); cursor: pointer; transition: all 0.15s;
}
.btn-icon:hover { color: var(--white); border-color: #555; }

.connection-status {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 20px;
  background: rgba(255,255,255,0.06); border: 1px solid #333;
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gray-600); transition: background 0.3s;
}
.connection-status.connected .status-dot { background: #22c55e; box-shadow: 0 0 6px #22c55e88; }
.status-label { font-size: 12px; color: var(--gray-400); }

/* ===== SETUP SCREEN ===== */
/* ══════════════════════════════════════════════
   SETUP / LOGIN — Layout dividido
══════════════════════════════════════════════ */
.setup-screen {
  min-height: calc(100vh - 56px);
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* ── Panel izquierdo (oscuro) ──────────────── */
.setup-left {
  background: #0d0d0d;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
}
.setup-left::before {
  content: '';
  position: absolute;
  bottom: -120px;
  left: -80px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,37,26,.28) 0%, transparent 70%);
  pointer-events: none;
}
.setup-left::after {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,37,26,.12) 0%, transparent 70%);
  pointer-events: none;
}
.setup-left-inner {
  position: relative;
  z-index: 1;
  max-width: 380px;
  width: 100%;
}
.setup-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 2rem;
}
.setup-tridente {
  height: 52px;
  width: auto;
  filter: brightness(0) invert(1);
  flex-shrink: 0;
}
.setup-brand-wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.setup-brand-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 48px;
  letter-spacing: 4px;
  color: #fff;
}
.setup-brand-sub {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 18px;
  letter-spacing: 6px;
  color: rgba(255,255,255,.4);
  margin-top: -4px;
}
.setup-tagline {
  font-size: 14px;
  color: rgba(255,255,255,.55);
  line-height: 1.6;
  margin-bottom: 2.5rem;
  max-width: 320px;
}
.setup-suc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.setup-suc-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  color: rgba(255,255,255,.5);
  text-transform: uppercase;
}
.setup-suc-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  opacity: .8;
}

/* ── Panel derecho (claro) ─────────────────── */
.setup-right {
  background: #fafaf8;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2.5rem;
  overflow-y: auto;
}
.setup-form-wrap {
  max-width: 420px;
  width: 100%;
}
.setup-form-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 32px;
  letter-spacing: 2px;
  color: #0d0d0d;
  margin: 0 0 .5rem;
}
.setup-form-desc {
  font-size: 13px;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* Instrucciones colapsables */
.setup-instructions {
  margin-bottom: 1.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.setup-instructions summary {
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}
.setup-instructions summary::-webkit-details-marker { display: none; }
.setup-instructions summary::before {
  content: '▸';
  font-size: 10px;
  color: #94a3b8;
  transition: transform .2s;
}
.setup-instructions[open] summary::before { transform: rotate(90deg); }
.setup-instructions .setup-steps {
  padding: 0 12px 12px;
  margin: 0;
}

.setup-steps { display: flex; flex-direction: column; gap: 8px; }
.setup-step {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 11px 12px; background: #f8fafc;
  border-radius: 10px; border: 1px solid #f1f5f9;
}
.step-num {
  width: 22px; height: 22px; border-radius: 50%;
  background: #0d0d0d; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; flex-shrink: 0;
}
.step-text { font-size: 12px; color: #475569; line-height: 1.5; }
.step-text strong { font-weight: 600; color: #1e293b; }
.step-text code {
  background: #e2e8f0; padding: 1px 5px;
  border-radius: 3px; font-size: 11px; font-family: monospace;
}
.step-text em { font-style: normal; color: #64748b; }

/* Formulario URLs */
.url-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 1.5rem; }
.url-row { display: flex; align-items: center; gap: 8px; }
.url-badge {
  display: flex; align-items: center; gap: 6px;
  min-width: 128px; padding: 7px 10px;
  border-radius: 8px; font-size: 11px; font-weight: 600;
}
.url-badge .dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.url-input {
  flex: 1; height: 36px; padding: 0 11px;
  border: 1px solid #e2e8f0; border-radius: 8px;
  font-family: var(--font-body); font-size: 12px; color: #0d0d0d;
  background: #fff; transition: border .15s, box-shadow .15s;
}
.url-input:focus {
  outline: none;
  border-color: #94a3b8;
  box-shadow: 0 0 0 3px rgba(100,116,139,.1);
}
.url-input::placeholder { color: #cbd5e1; }

/* Botones */
.btn-connect {
  width: 100%; padding: 13px; background: #0d0d0d; color: #fff;
  border: none; border-radius: 12px; font-family: var(--font-body);
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background .15s, transform .1s;
  margin-bottom: 10px; letter-spacing: .2px;
}
.btn-connect:hover { background: #1a1a1a; }
.btn-connect:active { transform: scale(.99); }
.btn-demo {
  width: 100%; padding: 11px; background: transparent; color: #64748b;
  border: 1px solid #e2e8f0; border-radius: 12px;
  font-family: var(--font-body); font-size: 13px; cursor: pointer;
  transition: all .15s;
}
.btn-demo:hover { background: #f1f5f9; color: #0d0d0d; border-color: #cbd5e1; }

/* Mobile: apilado */
@media (max-width: 760px) {
  .setup-screen {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  .setup-left {
    padding: 2rem 1.5rem;
    min-height: auto;
  }
  .setup-left::before { width: 200px; height: 200px; bottom: -60px; }
  .setup-left-inner { max-width: 100%; }
  .setup-brand { margin-bottom: 1rem; }
  .setup-tridente { height: 36px; }
  .setup-brand-name { font-size: 36px; }
  .setup-brand-sub { font-size: 14px; }
  .setup-tagline { margin-bottom: 1rem; font-size: 13px; }
  .setup-suc-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px 16px;
  }
  .setup-right { padding: 2rem 1.25rem; }
}

/* ===== MAIN APP ===== */
.app { padding: 1.5rem 2rem; max-width: 1400px; margin: 0 auto; }

/* ===== STATS ===== */
.stats-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 12px; margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--white); border-radius: var(--radius-md);
  border: 1px solid var(--gray-100); padding: 1.2rem 1.4rem;
  box-shadow: var(--shadow-sm);
}
.stat-card.highlight { border-color: var(--black); }
.stat-val {
  font-family: var(--font-display); font-size: 36px; letter-spacing: 1px;
  line-height: 1; color: var(--black); margin-bottom: 4px;
}
.stat-label { font-size: 12px; color: var(--gray-400); letter-spacing: 0.5px; text-transform: uppercase; }

/* ===== CONTROLS ===== */
.controls-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap;
}
.week-nav { display: flex; align-items: center; gap: 10px; }
.week-btn {
  width: 32px; height: 32px; border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm); background: var(--white);
  cursor: pointer; font-size: 14px; color: var(--gray-600);
  transition: all 0.15s; display: flex; align-items: center; justify-content: center;
}
.week-btn:hover { background: var(--black); color: var(--white); border-color: var(--black); }
.week-range {
  font-family: var(--font-display); font-size: 18px; letter-spacing: 1px;
  color: var(--black); min-width: 200px; text-align: center;
}
.filters { display: flex; gap: 8px; }
.filter-select {
  height: 34px; padding: 0 10px; font-family: var(--font-body); font-size: 13px;
  border: 1px solid var(--gray-200); border-radius: var(--radius-sm);
  background: var(--white); color: var(--black); cursor: pointer;
  transition: border 0.15s;
}
.filter-select:focus { outline: none; border-color: var(--black); }

/* ===== VIEWS ===== */
.view { display: none; }
.view.active { display: block; }

/* ===== GRILLA TURNOS ===== */
.sucursal-block { margin-bottom: 1.5rem; }
.sucursal-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 8px; padding: 0 2px;
}
.suc-stripe {
  width: 4px; height: 20px; border-radius: 2px; flex-shrink: 0;
}
.suc-nombre {
  font-family: var(--font-display); font-size: 17px; letter-spacing: 1px;
  color: var(--black);
}
.suc-badge {
  padding: 3px 10px; border-radius: 20px; font-size: 11px;
  font-weight: 500; letter-spacing: 0.3px;
}
.suc-meta { font-size: 12px; color: var(--gray-400); margin-left: auto; }

.grilla-wrap { overflow-x: auto; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.grilla {
  width: 100%; border-collapse: collapse; background: var(--white);
  border: 1px solid var(--gray-100); border-radius: var(--radius-md);
  overflow: hidden; min-width: 620px;
}
.grilla thead tr { background: var(--gray-50); }
.grilla th {
  padding: 10px 12px; font-size: 11px; font-weight: 500; letter-spacing: 0.5px;
  text-transform: uppercase; color: var(--gray-400);
  border-bottom: 1px solid var(--gray-100); text-align: center;
}
.grilla th.th-emp { text-align: left; width: 150px; }
.grilla th.hoy { color: var(--black); background: var(--gray-100); }

.grilla td {
  padding: 8px 10px; border-bottom: 1px solid var(--gray-100);
  text-align: center; vertical-align: middle; font-size: 12px;
}
.grilla td.td-emp {
  text-align: left; font-weight: 500; font-size: 13px; color: var(--black);
  white-space: nowrap; max-width: 160px;
  overflow: hidden; text-overflow: ellipsis;
}
.grilla tr:last-child td { border-bottom: none; }
.grilla tr:hover td { background: var(--gray-50); }
.grilla td.hoy { background: #fafaf8; }

.pill {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 500;
  white-space: nowrap; letter-spacing: 0.2px;
}
.pill-tm   { background: #DBEAFE; color: #1E40AF; }
.pill-tt   { background: #EDE9FE; color: #4C1D95; }
.pill-comp { background: #D1FAE5; color: #065F46; }
.pill-franco { background: var(--gray-100); color: var(--gray-400); font-weight: 400; }
.pill-falta { background: #FEE2E2; color: #991B1B; }
.empty-dash { color: var(--gray-200); font-size: 14px; }

/* ===== VISTA EMPLEADOS — ver bloque principal más abajo ===== */

/* ===== VISTA REPORTES ===== */
.reportes-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.reporte-card {
  background: var(--white); border: 1px solid var(--gray-100);
  border-radius: var(--radius-md); padding: 1.4rem;
  box-shadow: var(--shadow-sm);
}
.reporte-card.full { grid-column: 1 / -1; }
.reporte-card h3 {
  font-size: 13px; font-weight: 500; letter-spacing: 0.3px;
  color: var(--gray-800); text-transform: uppercase; margin-bottom: 1rem;
  padding-bottom: 10px; border-bottom: 1px solid var(--gray-100);
}
.reporte-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid var(--gray-100); font-size: 13px;
}
.reporte-row:last-child { border-bottom: none; }
.reporte-nombre { color: var(--black); }
.reporte-val { font-family: var(--font-display); font-size: 18px; color: var(--black); }
.reporte-bar-wrap { flex: 1; margin: 0 12px; height: 4px; background: var(--gray-100); border-radius: 2px; overflow: hidden; }
.reporte-bar { height: 100%; background: var(--black); border-radius: 2px; }
.badge-faltante {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; background: #FEF2F2;
  border: 1px solid #FECACA; border-radius: var(--radius-sm);
  font-size: 12px; color: #991B1B; margin: 4px 4px 4px 0;
}

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: 2rem; right: 2rem;
  background: var(--black); color: var(--white);
  padding: 12px 20px; border-radius: var(--radius-md);
  font-size: 13px; box-shadow: var(--shadow-md);
  opacity: 0; transform: translateY(8px);
  transition: all 0.25s; pointer-events: none; z-index: 999;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* ===== LOADING ===== */
.loading-row td { text-align: center; padding: 2rem; color: var(--gray-400); font-size: 13px; }
.spinner {
  display: inline-block; width: 16px; height: 16px;
  border: 2px solid var(--gray-200); border-top-color: var(--black);
  border-radius: 50%; animation: spin 0.7s linear infinite; margin-right: 8px;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== PRINT ===== */
@media print {
  .topbar, .controls-bar, .btn-icon, .btn-connect, .btn-demo,
  #setupScreen { display: none !important; }
  .app { padding: 0; }
  .grilla-wrap { box-shadow: none; }
  .grilla { border: 1px solid #ccc; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .topbar { padding: 0 1rem; gap: 0.5rem; }
  .app { padding: 1rem; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .reportes-grid { grid-template-columns: 1fr; }
  .reporte-card.full { grid-column: 1; }
}

@media (max-width: 700px) {
  /* Topbar compacta — todo en una línea */
  .topbar { height: 48px; padding: 0 0.75rem; gap: 0.5rem; }
  .brand-section { display: none; }
  .brand-divider { display: none; }
  .brand-logo { font-size: 18px; }
  .brand-tridente { height: 22px; }
  .top-nav { gap: 0; flex-shrink: 0; }
  .nav-btn { padding: 4px 8px; font-size: 11px; letter-spacing: 0; }
  /* Ocultar refresh/print y mostrar solo status compacto */
  .btn-icon { width: 28px; height: 28px; }
  .status-label { display: none; }
  .connection-status { padding: 4px 6px; }

  /* Controls bar apilada */
  .controls-bar { flex-direction: column; align-items: stretch; gap: 0.75rem; }
  .filters { flex-direction: column; gap: 6px; }
  .filter-select { width: 100%; }
  .week-nav { justify-content: center; }
  .week-range { font-size: 16px; min-width: 160px; }

  /* Stats 2x2 */
  .stats-row { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat-val { font-size: 28px; }
  .stat-card { padding: 0.9rem 1rem; }

  /* Calendario mobile — compacto pero con datos */
  .calendario-wrap { padding: 0.5rem; }
  .cal-grid { gap: 3px; }
  .cal-header-dias { gap: 3px; }
  .cal-dia-label { font-size: 9px; }
  .cal-celda {
    min-height: 52px; padding: 3px 4px;
    border-radius: 6px;
  }
  .cal-num { font-size: 11px; font-family: var(--font-body); font-weight: 600; }
  .cal-emps { font-size: 9px; }
  .cal-pills-mini { display: flex; gap: 1px; flex-wrap: wrap; }
  .pill-mini { font-size: 8px; padding: 1px 3px; }

  /* Nombres en tabla — no partir */
  .resumen-mes-tabla td { white-space: nowrap; }
  .resumen-mes-wrap { padding: 0.75rem; }
  .resumen-mes-tabla-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .resumen-mes-tabla { font-size: 12px; }
  .resumen-mes-tabla th { padding: 8px 8px; font-size: 10px; }
  .resumen-mes-tabla td { padding: 7px 8px; }
  .suc-badge-mini { font-size: 10px; padding: 1px 6px; }

  /* Grilla semana — scroll horizontal */
  .grilla-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Detalle panel — drawer desde abajo */
  .detalle-overlay { align-items: flex-end; padding: 0; }
  .detalle-panel {
    max-width: 100% !important; width: 100%;
    max-height: 92vh;
    border-radius: 16px 16px 0 0;
    margin-top: auto;
  }
  .detalle-stats-row { gap: 1rem; flex-wrap: wrap; }
  .detalle-stat-val { font-size: 22px; }
  .detalle-header { padding: 0; }
  .detalle-header-inner { padding: 1rem 1.2rem 0; }
  .detalle-titulo { font-size: 18px; }

  /* Empleados filtros panel */
  .emp-filtros-panel { flex-direction: column; gap: 1rem; padding: 1rem; }
  .emp-filtro-grupo { min-width: unset; }
  .emp-card { padding: 1rem; }
  .emp-stats { grid-template-columns: 1fr 1fr; }
}

/* ===== VISTA MES ===== */

/* Calendario */
.calendario-wrap { padding: 1rem 1.5rem 0; }
.cal-header-dias {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 4px; margin-bottom: 4px;
}
.cal-dia-label {
  text-align: center; font-size: 11px; font-weight: 500;
  color: var(--gray-400); text-transform: uppercase; padding: 4px 0;
  letter-spacing: 0.5px;
}
.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-celda {
  min-height: 72px; border-radius: var(--radius-md); padding: 6px 8px;
  background: var(--white); border: 1px solid var(--gray-100);
  display: flex; flex-direction: column; gap: 3px;
  transition: background 0.15s; box-shadow: var(--shadow-sm);
}
.cal-vacia {
  min-height: 40px !important;
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
.cal-celda:hover { background: var(--gray-50); }
.cal-vacia { background: transparent; border-color: transparent; box-shadow: none; }
.cal-hoy { background: #DBEAFE; border-color: #93C5FD; }
.cal-finde { background: var(--gray-50); }
.cal-num {
  font-family: var(--font-display); font-size: 16px; color: var(--black);
}
.cal-hoy .cal-num { color: #1D4ED8; }
.cal-emps { font-size: 10px; color: var(--gray-400); }
.cal-pills-mini { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 2px; }
.pill-mini {
  font-size: 9px; font-weight: 600; border-radius: 3px; padding: 1px 5px;
}
.pill-mini-tm   { background: #DBEAFE; color: #1E40AF; }
.pill-mini-tt   { background: #EDE9FE; color: #4C1D95; }
.pill-mini-comp { background: #D1FAE5; color: #065F46; }
.cal-sin-datos  { flex: 1; }

/* Resumen mes tabla */
.resumen-mes-wrap { padding: 1.5rem; }
.resumen-mes-titulo {
  font-family: var(--font-display); font-size: 18px; letter-spacing: 1px;
  color: var(--black); margin-bottom: 1rem;
}
.resumen-mes-tabla-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.resumen-mes-tabla {
  width: 100%; border-collapse: collapse; font-size: 13px;
  background: var(--white); border: 1px solid var(--gray-100);
}
.resumen-mes-tabla th {
  text-align: left; padding: 10px 14px;
  background: var(--gray-50); color: var(--gray-400);
  font-size: 11px; font-weight: 500; letter-spacing: 0.5px;
  text-transform: uppercase;
  border-bottom: 2px solid var(--gray-100);
  white-space: nowrap;
}
.resumen-mes-tabla td {
  padding: 9px 14px; border-bottom: 1px solid var(--gray-100);
  color: var(--black);
}
.resumen-mes-tabla tbody tr:hover td { background: var(--gray-50); }
.resumen-mes-tabla tr:last-child td { border-bottom: none; }
.resumen-mes-tabla tfoot td {
  padding: 10px 14px; background: var(--gray-50);
  border-top: 2px solid var(--gray-200); color: var(--black);
}
.suc-badge-mini {
  font-size: 11px; font-weight: 500; border-radius: 20px;
  padding: 2px 9px; white-space: nowrap;
}

@media (max-width: 900px) {
  .cal-celda { min-height: 56px; padding: 4px 5px; }
  .cal-num { font-size: 13px; }
  .cal-emps { display: none; }
}
@media (max-width: 600px) {
  .calendario-wrap { padding: 0.5rem; }
  .cal-celda { min-height: 44px; }
  .cal-pills-mini { display: none; }
}

/* ===== DETALLE EMPLEADO ===== */
/* ══════════════════════════════════════════════
   DETALLE EMPLEADO — modal moderno
══════════════════════════════════════════════ */
.detalle-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,.6); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.detalle-panel {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0,0,0,.22);
  width: 100%; max-width: 980px;
  max-height: 90vh;
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: scale-in-center 0.5s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
}

/* ── Header ─────────────────────────────────── */
.detalle-header {
  padding: 0;
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
  flex-shrink: 0;
}
.detalle-header-stripe {
  height: 5px;
  width: 100%;
  display: block;
  flex-shrink: 0;
}
.detalle-header-inner {
  padding: 1.25rem 1.6rem 0;
}
.detalle-header-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 1rem; gap: 1rem;
}
.detalle-titulo {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 1.5px;
  color: #0d0d0d;
  display: flex; align-items: center; gap: 10px;
  line-height: 1;
}
.detalle-num {
  font-family: var(--font-body); font-size: 12px; font-weight: 700;
  padding: 3px 10px; border-radius: 20px; letter-spacing: .04em;
}
.detalle-sub {
  font-size: 12px; font-weight: 600;
  color: #94a3b8; margin-top: 5px;
  letter-spacing: .04em; text-transform: uppercase;
}
.detalle-chips {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px;
}
.detalle-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; letter-spacing: .02em;
  padding: 3px 10px; border-radius: 20px;
  border: 1px solid var(--gray-200); background: var(--gray-50); color: var(--gray-600);
}
.detalle-chip-empresa { background: #eef2ff; border-color: #c7d2fe; color: #4338ca; }
.detalle-chip-jornada { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.detalle-close {
  width: 30px; height: 30px;
  border: 1px solid #e2e8f0; border-radius: 8px;
  background: #f8fafc; cursor: pointer;
  font-size: 13px; color: #64748b;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all .15s;
}
.detalle-close:hover { background: #0d0d0d; color: #fff; border-color: #0d0d0d; }

/* ── Stats como mini-cards ───────────────────── */
.detalle-stats-row {
  display: flex;
  gap: 8px;
  padding: 0 1.6rem 1.1rem;
  flex-wrap: wrap;
}
.detalle-stat {
  display: flex; flex-direction: column; gap: 3px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 10px;
  padding: 8px 16px;
  min-width: 70px;
  text-align: center;
}
.detalle-stat-val {
  font-family: var(--font-display);
  font-size: 26px; letter-spacing: 1px;
  color: #0d0d0d; line-height: 1;
}
.detalle-stat-lbl {
  font-size: 9px; font-weight: 700;
  color: #94a3b8; text-transform: uppercase; letter-spacing: .07em;
}

/* ── Tabs pills ──────────────────────────────── */
.detalle-tabs {
  display: flex;
  gap: 4px;
  padding: 0 1.6rem;
  background: #fff;
  border-bottom: 1px solid #f1f5f9;
  flex-shrink: 0;
}
.detalle-tab {
  padding: 8px 16px;
  border: none; background: transparent;
  font-family: var(--font-body); font-size: 13px; font-weight: 500;
  color: #94a3b8; cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all .15s;
}
.detalle-tab:hover { color: #0d0d0d; }
.detalle-tab.active { color: #0d0d0d; border-bottom-color: #0d0d0d; }

/* ── Tabla ────────────────────────────────────── */
.detalle-tabla-wrap { overflow: auto; flex: 1; }
.detalle-tabla {
  width: 100%; border-collapse: collapse; font-size: 13px; min-width: 700px;
}
.detalle-tabla th {
  position: sticky; top: 0;
  padding: 10px 14px; background: #f8fafc;
  font-size: 10px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: #94a3b8;
  border-bottom: 1px solid #e9edf2; text-align: left;
  white-space: nowrap;
}
.detalle-tabla td {
  padding: 9px 14px; border-bottom: 1px solid #f8fafc;
  color: #0d0d0d; vertical-align: middle;
}
.detalle-tabla tbody tr:hover td { background: #f8fafc; }
.detalle-tabla tfoot td {
  padding: 10px 14px; background: #f8fafc;
  border-top: 1px solid #e2e8f0; font-size: 13px; font-weight: 600;
}
.fila-sabado td { background: #FFFBEB; }
.fila-domingo td { background: #FEF2F2; }
.turno-cell { font-family: monospace; font-size: 12px; white-space: nowrap; }
.hora-reg { font-size: 12px; color: var(--gray-400); }
.hs-extra {
  background: #FEF3C7; color: #B45309;
  padding: 2px 8px; border-radius: 20px; font-size: 12px; font-weight: 600;
}
.check-sab { color: #0F6E56; font-weight: 700; }
.local-tag { font-size: 12px; font-weight: 500; }
.nota-cell { font-size: 12px; color: var(--gray-600); max-width: 200px; }

/* Tarjeta empleado — número vendedor y footer */
.emp-num-vend {
  font-family: var(--font-display); font-size: 18px; letter-spacing: 0.5px;
}
.emp-card-footer {
  border-top: 1px solid var(--gray-100); margin-top: 10px;
  padding-top: 8px; font-size: 11px; color: var(--gray-400);
  text-align: right; letter-spacing: 0.3px;
  transition: color 0.15s;
}
/* emp-card-footer, filtros, stats → ver bloque principal más abajo */

/* ===== EMPLEADO LINK EN GRILLA ===== */
.td-emp-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ===== LOGO TRIDENTE ===== */
.brand-tridente {
  height: 28px;
  width: auto;
  object-fit: contain;
  margin-right: 2px;
  filter: drop-shadow(0 0 4px rgba(232,37,26,0.4));
}

/* Celda calendario clicable */
.cal-celda-click {
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.cal-celda-click:hover {
  background: #e8f4fd;
  border-color: #93C5FD;
  transform: scale(1.02);
}

/* ===== TURNO DOBLE EN GRILLA SEMANA ===== */
.turno-doble {
  display: flex; flex-direction: column; align-items: center;
  gap: 2px; margin-bottom: 4px;
}
.turno-doble:last-child { margin-bottom: 0; }
.turno-hora {
  font-size: 9px; color: var(--gray-400); font-family: monospace;
  white-space: nowrap; letter-spacing: -0.3px;
}

/* ===== BOTONES ACCIONES DETALLE ===== */
.detalle-acciones {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.btn-detalle-accion {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: 8px;
  border: 1px solid #e2e8f0; background: #f8fafc;
  color: #475569; font-family: var(--font-body);
  font-size: 12px; font-weight: 500; cursor: pointer;
  transition: all .15s; white-space: nowrap;
}
.btn-detalle-accion:hover {
  background: #0d0d0d; color: #fff; border-color: #0d0d0d;
}
.btn-excel { color: #0F6E56; border-color: #bbf7d0; background: #f0fdf4; }
.btn-excel:hover { background: #0F6E56; color: #fff; border-color: #0F6E56; }

@media print {
  .detalle-overlay {
    position: static !important;
    background: none !important;
  }
  .detalle-panel {
    box-shadow: none !important;
    max-height: none !important;
    border-radius: 0 !important;
  }
  .detalle-acciones, .detalle-close { display: none !important; }
  .detalle-overlay ~ * { display: none !important; }
}

/* ===== REPORTES MEJORADO ===== */
.rep-filtros-panel {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  background: var(--white); border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg); padding: 1.2rem 1.5rem;
  margin-bottom: 1.5rem; box-shadow: var(--shadow-sm);
}
.rep-filtro-grupo { display: flex; flex-direction: column; gap: 5px; min-width: 200px; }
.rep-stat-resumen {
  display: flex; align-items: center; gap: 8px;
  margin-left: auto; font-size: 13px; color: var(--gray-600);
  flex-wrap: wrap;
}
.rep-stat-sep { color: var(--gray-200); }
.rep-stat-item strong { color: var(--black); }
.rep-periodo-tag {
  font-family: var(--font-body); font-size: 11px; font-weight: 400;
  color: var(--gray-400); text-transform: none; letter-spacing: 0;
  margin-left: 6px;
}
.rep-rank {
  font-size: 11px; color: var(--gray-400); min-width: 18px;
  text-align: right; flex-shrink: 0;
}
.reporte-scroll {
  max-height: 480px; overflow-y: auto;
  scrollbar-width: thin;
}

@media (max-width: 700px) {
  .rep-filtros-panel { flex-direction: column; align-items: stretch; }
  .rep-stat-resumen { margin-left: 0; }
  .rep-filtro-grupo { min-width: unset; }
}

/* ===== BÚSQUEDA RÁPIDA ===== */
.top-search {
  position: relative; display: flex; align-items: center;
  gap: 8px; background: rgba(255,255,255,0.08);
  border: 1px solid #333; border-radius: var(--radius-sm);
  padding: 0 10px; height: 32px; min-width: 200px;
  transition: border 0.15s;
}
.top-search:focus-within {
  border-color: #666; background: rgba(255,255,255,0.12);
}
.top-search svg { color: var(--gray-600); flex-shrink: 0; }
.top-search input {
  background: transparent; border: none; outline: none;
  color: var(--white); font-family: var(--font-body);
  font-size: 13px; width: 100%;
}
.top-search input::placeholder { color: var(--gray-600); }
#btnClearSearch {
  background: transparent; border: none; color: var(--gray-600);
  cursor: pointer; font-size: 12px; padding: 0; line-height: 1;
  display: flex; align-items: center;
}
#btnClearSearch:hover { color: var(--white); }

.search-dropdown {
  position: fixed;
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius-md); box-shadow: var(--shadow-md);
  z-index: 9999; overflow: hidden; min-width: 280px;
}
.search-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; cursor: pointer; transition: background 0.1s;
  border-bottom: 1px solid var(--gray-100);
}
.search-item:last-child { border-bottom: none; }
.search-item:hover { background: var(--gray-50); }
.search-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.search-nombre {
  flex: 1; font-size: 13px; color: var(--black); font-weight: 500;
}
.search-num { color: #94a3b8; font-weight: 400; font-size: 12px; }
.search-suc { font-size: 11px; color: var(--gray-400); white-space: nowrap; }
.search-empty {
  padding: 14px; font-size: 13px; color: var(--gray-400); text-align: center;
}

@media (max-width: 700px) {
  .top-search { min-width: 120px; }
  .top-search input { font-size: 12px; }
}

/* ===== COMPARAR MESES ===== */
.comp-card { margin-top: 0; }
.comp-tabla-wrap { overflow-x: auto; }
.comp-tabla {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.comp-tabla th {
  padding: 9px 12px; background: var(--gray-50);
  font-size: 11px; font-weight: 500; letter-spacing: 0.5px;
  text-transform: uppercase; color: var(--gray-400);
  border-bottom: 2px solid var(--gray-100); text-align: left;
}
.comp-tabla td {
  padding: 8px 12px; border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}
.comp-tabla tbody tr:hover td { background: var(--gray-50); }
.comp-bar-row {
  display: flex; align-items: center; gap: 8px;
}
.comp-bar {
  height: 6px; border-radius: 3px; min-width: 2px;
  flex-shrink: 0; transition: width 0.3s;
  max-width: 120px;
}
.comp-bar-2 { background: var(--gray-300) !important; }
.comp-diff {
  display: inline-block; padding: 2px 8px;
  border-radius: 20px; font-size: 12px; font-weight: 600;
}
.comp-diff-up   { background: #D1FAE5; color: #065F46; }
.comp-diff-down { background: #FEE2E2; color: #991B1B; }
.comp-diff-eq   { color: var(--gray-400); }

/* ===== TABS DETALLE ===== */
.detalle-tabs {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--gray-100);
  padding: 0 1.5rem;
  background: var(--gray-50);
}
.detalle-tab {
  padding: 10px 18px; border: none; background: transparent;
  font-family: var(--font-body); font-size: 13px; font-weight: 400;
  color: var(--gray-400); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: all 0.15s;
}
.detalle-tab:hover { color: var(--black); }
.detalle-tab.active {
  color: var(--black); font-weight: 500;
  border-bottom-color: var(--black);
}

/* ===== DRAWER MOBILE ===== */
.hamburger-btn {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  width: 36px; height: 36px; padding: 6px;
  background: transparent; border: 1px solid #333;
  border-radius: var(--radius-sm); cursor: pointer;
  flex-shrink: 0;
}
.hamburger-btn span {
  display: block; height: 2px; background: var(--white);
  border-radius: 2px; transition: all 0.25s;
}

.drawer-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.6); z-index: 200;
  backdrop-filter: blur(2px);
}
.drawer-overlay.open { display: block; }

.drawer {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: 280px; background: #111 !important; background-color: #111 !important; z-index: 201;
  display: flex; flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 4px 0 20px rgba(0,0,0,0.4);
}
.drawer * { color: inherit; }
.drawer-header { background: #111; }
.drawer-nav { background: #111; }
.drawer-footer { background: #111; }
.drawer.open { transform: translateX(0); }

.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.2rem; border-bottom: 1px solid #222;
}
.drawer-brand { display: flex; align-items: center; gap: 10px; }
.drawer-close {
  background: transparent; border: 1px solid #333;
  border-radius: var(--radius-sm); color: var(--gray-400);
  width: 30px; height: 30px; cursor: pointer; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.drawer-close:hover { background: #333; color: var(--white); }

.drawer-nav {
  flex: 1; display: flex; flex-direction: column;
  padding: 1rem 0.75rem; gap: 4px;
}
.drawer-nav-btn {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border: none; background: transparent;
  color: var(--gray-400); font-family: var(--font-body);
  font-size: 15px; font-weight: 400; cursor: pointer;
  border-radius: var(--radius-md); transition: all 0.15s;
  text-align: left; width: 100%;
}
.drawer-nav-btn:hover {
  background: rgba(255,255,255,0.06); color: var(--white);
}
.drawer-nav-btn.active {
  background: rgba(255,255,255,0.1); color: var(--white);
  font-weight: 500;
}
.drawer-nav-btn svg { flex-shrink: 0; }

.drawer-footer {
  padding: 1rem 1.2rem; border-top: 1px solid #222;
  display: flex; flex-direction: column; gap: 10px;
}
.drawer-conn {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--gray-400);
}
.drawer-conn .status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gray-600);
}
.drawer-conn.connected .status-dot { background: #22c55e; box-shadow: 0 0 6px #22c55e88; }
.drawer-conn .status-label { font-size: 12px; color: var(--gray-400); }
.drawer-action-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px; background: rgba(255,255,255,0.06);
  border: 1px solid #333; border-radius: var(--radius-sm);
  color: var(--gray-400); font-family: var(--font-body);
  font-size: 13px; cursor: pointer; transition: all 0.15s;
  width: 100%; justify-content: center;
}
.drawer-action-btn:hover { background: rgba(255,255,255,0.12); color: var(--white); }

/* Mostrar hamburguesa y ocultar nav en mobile */
@media (max-width: 700px) {
  .hamburger-btn { display: flex; }
  .top-nav { display: none; }

  /* Buscador mobile: siempre visible como ícono, se expande al tocar */
  .top-search {
    min-width: 36px; max-width: 36px;
    padding: 0 10px; overflow: hidden;
    transition: max-width 0.3s ease, padding 0.3s ease;
    position: relative; z-index: 10;
  }
  .top-search input {
    display: block; width: 0; opacity: 0;
    transition: width 0.3s ease, opacity 0.2s ease;
    pointer-events: none;
  }
  .top-search.expanded {
    max-width: 200px; padding: 0 10px;
    border-color: #666;
  }
  .top-search.expanded input {
    width: 120px; opacity: 1; pointer-events: auto;
  }
  #btnClearSearch { display: none; }
  .top-search.expanded #btnClearSearch { display: flex; }
}

/* ===== FILTROS DÍA ===== */
.filtros-dia {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 6px 12px; background: var(--white);
  border: 1px solid var(--gray-100); border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.filtro-dia-check {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--gray-600); cursor: pointer;
  user-select: none; white-space: nowrap;
}
.filtro-dia-check input[type="checkbox"] {
  width: 14px; height: 14px; accent-color: var(--black); cursor: pointer;
}
.filtro-dia-check:hover { color: var(--black); }

/* Feriado en calendario */
.cal-feriado { background: #FFF7ED; border-color: #FED7AA; }
.cal-feriado .cal-num { color: #C2410C; }
.cal-feriado-tag {
  display: inline-block; font-size: 8px; font-weight: 700;
  background: #FED7AA; color: #C2410C; padding: 0 3px;
  border-radius: 3px; margin-left: 3px; vertical-align: top;
}
.th-feriado { background: #FFF7ED !important; color: #C2410C !important; }

/* ===== BADGES EMPRESA Y CATEGORÍA ===== */
.emp-badges-row {
  display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px;
}
.emp-empresa-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
  letter-spacing: 0.2px;
}
.badge-moshe     { background: #EFF6FF; color: #1D4ED8; border: 1px solid #BFDBFE; }
.badge-cromawave { background: #FFF0F0; color: #B91C1C; border: 1px solid #FECACA; }
.emp-cat-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 20px;
  background: #f1f5f9;
  color: #475569;
  white-space: nowrap;
  border: 1px solid #e2e8f0;
}
.emp-avatar-foto { overflow: hidden; padding: 0; }

/* ===== PANEL ADMIN ===== */
.admin-overlay {
  position: fixed; inset: 0; z-index: 600;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.admin-panel {
  background: var(--white); border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.22);
  width: 100%; max-width: 900px;
  max-height: 90vh; display: flex; flex-direction: column;
  overflow: hidden;
  animation: scale-in-center 0.5s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
}
@keyframes scale-in-center {
  0%   { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.admin-panel-sm { max-width: 480px; }
.admin-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.2rem 1.5rem 1rem;
  background: var(--white); color: var(--black);
  border-bottom: 1px solid #f1f5f9;
  flex-shrink: 0;
}
.admin-titulo {
  font-family: var(--font-display); font-size: 22px; letter-spacing: 1px; color: #0d0d0d;
}

/* ── TABS como pills ───────────────────────────────── */
.admin-tabs {
  display: flex;
  gap: 4px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 4px;
  flex-shrink: 0;
  margin-bottom: 1.25rem;
  width: fit-content;
}
.admin-tab {
  padding: 7px 18px;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  border-radius: 7px;
  transition: all 0.15s;
  white-space: nowrap;
}
.admin-tab:hover { color: #1e293b; background: rgba(255,255,255,.6); }
.admin-tab.active {
  color: #0d0d0d;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.1);
}
.admin-tab-content { flex: 1; overflow: auto; }

/* ── Toolbar ────────────────────────────────────────── */
.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}
.admin-search {
  height: 38px;
  padding: 0 12px 0 36px;
  font-family: var(--font-body);
  font-size: 13px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") no-repeat 11px center;
  color: var(--black);
  min-width: 240px;
  transition: border-color .15s, box-shadow .15s;
}
.admin-search:focus {
  outline: none;
  border-color: #94a3b8;
  box-shadow: 0 0 0 3px rgba(100,116,139,.1);
}

/* ── Tabla ──────────────────────────────────────────── */
.admin-table-wrap {
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
}
.admin-tabla {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 500px;
}
.admin-tabla th {
  padding: 10px 16px;
  background: #f8fafc;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #94a3b8;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  white-space: nowrap;
  position: sticky;
  top: 0;
}
.admin-tabla th:first-child { border-radius: 12px 0 0 0; }
.admin-tabla th:last-child  { border-radius: 0 12px 0 0; }
.admin-tabla td {
  padding: 11px 16px;
  border-bottom: 1px solid #f1f5f9;
  color: var(--black);
  vertical-align: middle;
}
.admin-tabla tbody tr:last-child td { border-bottom: none; }
.admin-emp-row { cursor: pointer; transition: background 0.1s; }
.admin-emp-row:hover td { background: #f8fafc; }

/* ── Avatar ─────────────────────────────────────────── */
.admin-avatar-mini {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

/* ── Botón editar ────────────────────────────────────── */
.btn-admin-edit {
  padding: 5px 13px;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #fff;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-admin-edit:hover {
  background: #0d0d0d;
  color: #fff;
  border-color: #0d0d0d;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

/* Form Admin */
.admin-form {
  padding: 1.5rem; overflow-y: auto; max-height: calc(90vh - 120px);
}
.admin-form-grupo {
  display: flex; flex-direction: column; gap: 6px; margin-bottom: 1rem;
}
.admin-input {
  height: 40px; padding: 0 12px;
  font-family: var(--font-body); font-size: 13px;
  border: 1px solid var(--gray-200); border-radius: var(--radius-md);
  background: var(--white); color: var(--black);
  transition: border 0.15s; width: 100%;
}
.admin-input:focus { outline: none; border-color: var(--black); }
.admin-input[readonly] { background: var(--gray-50); color: var(--gray-600); }

/* Certificado: cobertura por día (rango de fechas) */
.cert-dias-cont { max-height: 240px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--gray-200); border-radius: var(--radius-md); padding: 8px; }
.cert-dias-nota { font-size: 11px; color: var(--gray-400); margin-bottom: 6px; }
.cert-dia-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 6px; border-radius: 8px; }
.cert-dia-finde { background: #fef2f2; }
.cert-dia-lbl { font-size: 13px; font-weight: 600; color: var(--black); white-space: nowrap; }
.cert-dia-finde .cert-dia-lbl { color: var(--accent); }
.cert-seg-group { display: inline-flex; border: 1px solid var(--gray-200); border-radius: 999px; overflow: hidden; background: var(--white); flex-shrink: 0; }
.cert-seg { border: none; background: transparent; padding: 5px 11px; font-family: var(--font-body); font-size: 12px; font-weight: 600; color: var(--gray-600); cursor: pointer; transition: background .12s, color .12s; }
.cert-seg + .cert-seg { border-left: 1px solid var(--gray-200); }
.cert-seg:hover { background: var(--gray-50); }
.cert-seg.active { background: var(--black); color: var(--white); }
.cert-seg.active[data-val="quitar"] { background: var(--accent); }
.cert-bulk { border: 1px solid var(--gray-200); background: var(--white); border-radius: 999px; padding: 4px 10px; font-family: var(--font-body); font-size: 11px; font-weight: 600; color: var(--gray-600); cursor: pointer; }
.cert-bulk:hover { background: var(--gray-50); border-color: var(--gray-400); }

.admin-foto-preview {
  display: flex; justify-content: center; margin-bottom: 1.5rem;
}

@media (max-width: 700px) {
  .admin-panel { max-height: 96vh; border-radius: 16px 16px 0 0; margin-top: auto; align-self: flex-end; }
  .filtros-dia { gap: 8px; }
  .filtro-dia-check span { display: none; }
}

/* ===== FERIADOS EN DETALLE ===== */
.fila-feriado td { background: #FFF7ED; }
.tag-feriado {
  display: inline-block; font-size: 10px; font-weight: 700;
  background: #FED7AA; color: #C2410C;
  padding: 1px 6px; border-radius: 20px;
  letter-spacing: 0.3px;
}
.filtro-dia-label {
  font-size: 12px; color: var(--gray-400);
  font-weight: 500; letter-spacing: 0.3px; white-space: nowrap;
}

/* filtros-dia-inline → ver bloque principal más abajo */

/* ===================================================
   OPTIMIZACIONES MOBILE ADMIN — mayo 2026
   =================================================== */

@media (max-width: 700px) {

  /* ── TOPBAR ── */
  /* Ocultar refresh y print en mobile (están en el drawer) */
  #btnRefresh, #btnPrint { display: none !important; }
  /* Chip de sesión más compacto */
  .sesion-chip { padding: 3px 6px 3px 10px; }
  .sesion-nombre { font-size: 10px; max-width: 70px; overflow: hidden; text-overflow: ellipsis; }
  .sesion-perfil { padding: 3px 7px; font-size: 10px; }
  /* Buscar más compacto */
  .top-search { max-width: 130px; }
  .top-search input { font-size: 12px; }

  /* ── FILTROS "VER SOLO" ── */
  /* Mostrar etiquetas en vertical */
  .filtros-dia {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
  }
  .filtro-dia-check {
    font-size: 13px;
    gap: 8px;
  }
  .filtro-dia-check input[type="checkbox"] {
    width: 16px; height: 16px;
  }

  /* ── VISTA SEMANA — mejor scroll ── */
  .grilla-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -1rem;
    border-radius: 0;
  }
  /* Hint de scroll */
  .grilla-wrap::after {
    content: '';
    display: block;
    height: 1px;
  }
  .grilla th, .grilla td {
    font-size: 11px;
    padding: 6px 6px;
  }
  .grilla th.th-emp, .grilla td.td-emp {
    width: 110px;
    min-width: 110px;
    font-size: 11px;
    position: sticky;
    left: 0;
    background: white;
    z-index: 2;
  }
  .grilla thead th.th-emp {
    background: var(--gray-50);
  }
  .turno-chip { font-size: 10px; padding: 2px 5px; }
  .turno-hora { font-size: 9px; }
  .grilla-suc-header { font-size: 12px; }

  /* ── TARJETAS EMPLEADOS ── */
  .emp-grid {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }
  .emp-card-head { gap: 10px; }
  .emp-nombre { font-size: 14px; }
  .emp-stats { gap: 0; }
  .emp-stat-item { padding: 8px 6px; }
  .emp-stat-val { font-size: 20px; }

  /* ── CONTROLES BAR ── */
  .mes-nav, .week-nav { width: 100%; }
  .week-range, #mesRange { text-align: center; flex: 1; }

  /* ── RESUMEN MES scroll ── */
  .resumen-mes-tabla-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -0.75rem;
  }
}

/* Hint visual de scroll horizontal en la grilla */
@media (max-width: 700px) {
  .grilla-container-wrap {
    position: relative;
  }
  .grilla-scroll-hint {
    position: absolute;
    right: 0; top: 0; bottom: 0;
    width: 24px;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.8));
    pointer-events: none;
  }
}

/* Sombra separadora para columna sticky en mobile */
@media (max-width: 700px) {
  .grilla th.th-emp,
  .grilla td.td-emp {
    box-shadow: 2px 0 4px rgba(0,0,0,0.08);
  }
}

/* ===== PANTALLA DE LOGIN — Minimalista claro ===== */
#loginScreen {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  background: #f5f4f0;
}
.login-card {
  width: 100%; max-width: 360px;
  display: flex; flex-direction: column; align-items: center;
  animation: fade-in-fwd 0.6s cubic-bezier(0.390, 0.575, 0.565, 1.000) both;
}
@keyframes fade-in-fwd {
  0%   { transform: translateZ(-80px); opacity: 0; }
  100% { transform: translateZ(0);     opacity: 1; }
}
.login-logo {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 4px;
}
.login-tridente {
  height: 36px;
  filter: none;
  opacity: 1;
}
.login-brand {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 44px; letter-spacing: 5px;
  color: #0d0d0d; line-height: 1;
}
.login-subtitle {
  font-size: 10px; font-weight: 600; letter-spacing: 6px;
  color: #94a3b8; text-transform: uppercase;
  margin-bottom: 2rem;
}
.login-form {
  width: 100%;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.07);
  display: flex; flex-direction: column; gap: 1.1rem;
}
.login-grupo { display: flex; flex-direction: column; gap: 6px; }
.login-label {
  font-size: 10px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: #94a3b8;
}
.login-input {
  height: 44px; padding: 0 14px;
  font-family: var(--font-body); font-size: 14px;
  background: #f8fafc; border: 1px solid #e2e8f0;
  border-radius: 10px; color: #0d0d0d;
  transition: border-color 0.15s, box-shadow 0.15s; width: 100%;
}
.login-input:focus {
  outline: none;
  border-color: #94a3b8;
  box-shadow: 0 0 0 3px rgba(100,116,139,0.1);
  background: #fff;
}
.login-input::placeholder { color: #cbd5e1; }
.login-pin-wrap { position: relative; display: flex; align-items: center; }
.login-pin-wrap .login-input { padding-right: 44px; }
.login-pin-toggle {
  position: absolute; right: 12px;
  background: none; border: none;
  color: #cbd5e1; cursor: pointer; padding: 4px;
  display: flex; align-items: center; transition: color 0.15s;
}
.login-pin-toggle:hover { color: #64748b; }
.login-btn {
  width: 100%; height: 46px;
  background: #0d0d0d; color: #fff;
  border: none; border-radius: 12px;
  font-family: var(--font-display); font-size: 20px;
  letter-spacing: 3px; cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  margin-top: 0.2rem;
}
.login-btn:hover { background: #1a1a1a; transform: translateY(-1px); }
.login-btn:active { transform: translateY(0); }
.login-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.login-footer {
  margin-top: 1.5rem;
  font-size: 10px; color: #cbd5e1; letter-spacing: 2px;
  text-transform: uppercase; text-align: center;
}
.login-remember-wrap {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; user-select: none;
  font-size: 12px; color: #94a3b8; letter-spacing: 0.2px;
}
.login-remember-wrap input[type="checkbox"] {
  width: 14px; height: 14px;
  accent-color: #0d0d0d;
  cursor: pointer;
  flex-shrink: 0;
}
.login-remember-wrap:hover { color: #64748b; }

/* ===== CHIP DE SESIÓN ===== */
.sesion-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 10px 5px 12px;
  background: rgba(255,255,255,0.09);
  border: 1px solid rgba(255,255,255,0.18); border-radius: 20px;
  transition: background 0.15s;
}
.sesion-nombre {
  font-size: 12px; font-weight: 600;
  color: #e8e8e2; white-space: nowrap;
  letter-spacing: 0.2px;
}
.sesion-perfil {
  display: flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 12px;
  background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.22);
  color: #c8c8c0; cursor: pointer; font-size: 11px; font-weight: 500;
  white-space: nowrap;
  transition: all 0.15s;
}
.sesion-perfil:hover { background: rgba(255,255,255,0.22); border-color: #bbb; color: var(--white); }
.sesion-logout {
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.15);
  color: #888; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.sesion-logout:hover { background: #dc2626; border-color: #dc2626; color: white; }

/* hora-reg segunda marca */
.hora-reg-2 { color: #888; font-size: 10px; }

/* ===== VISTA PERSONAL EMPLEADO ===== */
.emp-vista-personal { max-width: 1000px; margin: 0 auto; padding: 0 0 3rem 0; }
.emp-vista-header {
  background: #fff; border-radius: 14px;
  border: 1px solid #efefec; box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  padding: 1.5rem 2rem; display: flex; align-items: center; gap: 1.5rem;
  margin-bottom: 1.5rem; flex-wrap: wrap;
}
.emp-vista-avatar {
  width: 72px; height: 72px; border-radius: 18px;
  background: #efefec; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
}
.emp-vista-info { flex: 1; min-width: 0; }
.emp-vista-nombre {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px; letter-spacing: 1px; color: #0d0d0d; margin-bottom: 2px;
}
.emp-vista-suc { font-size: 13px; color: #a0a09a; margin-bottom: 6px; }
.emp-vista-stats { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.emp-vista-stat {
  display: flex; flex-direction: column; align-items: center;
  padding: 8px 16px; background: #f7f7f5;
  border-radius: 8px; border: 1px solid #efefec; min-width: 70px;
}
.emp-vista-stat-val {
  font-family: 'Bebas Neue', sans-serif; font-size: 28px;
  letter-spacing: 1px; line-height: 1; color: #0d0d0d;
}
.emp-vista-stat-lbl {
  font-size: 10px; color: #a0a09a;
  text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px; white-space: nowrap;
}
.emp-vista-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap;
}

/* Cards mobile vista empleado */
.ev-cards-mobile { display: none; }
.ev-tabla-desktop { display: block; }
@media (max-width: 680px) {
  .ev-tabla-desktop { display: none !important; }
  .ev-cards-mobile { display: flex; flex-direction: column; gap: 8px; padding: 0 0 1rem 0; }
  .emp-vista-header { flex-direction: row; align-items: flex-start; padding: 1rem; }
  .emp-vista-avatar { width: 52px; height: 52px; flex-shrink: 0; }
  .emp-vista-nombre { font-size: 20px; }
  .emp-vista-stats { gap: 6px; }
  .emp-vista-stat { padding: 6px 10px; min-width: 56px; }
  .emp-vista-stat-val { font-size: 22px; }
  .emp-vista-toolbar { flex-direction: column; align-items: flex-start; gap: 8px; }
}
.ev-card {
  background: #fff; border: 1px solid #efefec;
  border-radius: 8px; padding: 12px 14px; box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.ev-card-sabado  { border-left: 3px solid #f59e0b; }
.ev-card-feriado { border-left: 3px solid #8b5cf6; background: #faf5ff; }
.ev-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.ev-card-fecha { display: flex; flex-direction: column; gap: 1px; }
.ev-card-dia-sem { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: #a0a09a; }
.ev-card-fecha-str { font-size: 14px; font-weight: 500; color: #333330; }
.ev-card-hs { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.ev-card-hs-val { font-family: 'Bebas Neue', sans-serif; font-size: 22px; line-height: 1; color: #0d0d0d; }
.ev-card-hs-val small { font-family: 'DM Sans', sans-serif; font-size: 11px; color: #a0a09a; margin-left: 2px; }
.ev-card-turnos { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ev-card-turno { font-size: 13px; color: #666660; background: #f7f7f5; border: 1px solid #efefec; border-radius: 6px; padding: 3px 8px; }
.ev-card-hora-reg { font-size: 11px; color: #a0a09a; margin-left: auto; }
.ev-card-extra { font-size: 11px; font-weight: 600; color: #d97706; background: #fef3c7; border-radius: 10px; padding: 2px 7px; }
.ev-card-sab { font-size: 11px; font-weight: 600; color: #b45309; background: #fef3c7; border-radius: 10px; padding: 2px 7px; }
.ev-card-nota { margin-top: 6px; font-size: 12px; color: #666660; font-style: italic; padding-top: 6px; border-top: 1px solid #efefec; }
.ev-card-totales { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 14px; margin-top: 4px; background: #f7f7f5; border-radius: 8px; border: 1px solid #efefec; font-size: 13px; font-weight: 600; color: #333330; }

/* Mi Perfil overlay */
#miPerfilOverlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.7);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
#miPerfilOverlay .admin-panel { max-height: 92vh; }
#miPerfilOverlay .admin-form { max-height: calc(92vh - 70px); overflow-y: auto; }

/* WhatsApp btn */
.emp-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wa-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 20px;
  background: #dcfce7; color: #16a34a;
  font-size: 11px; font-weight: 600;
  text-decoration: none; border: 1px solid #bbf7d0;
  transition: all 0.15s; white-space: nowrap;
}
.wa-btn:hover { background: #16a34a; color: white; border-color: #16a34a; }

/* ===== FOOTER ===== */
.app-footer {
  text-align: center;
  padding: 1.5rem;
  font-size: 11px;
  color: var(--gray-400);
  letter-spacing: 1px;
  text-transform: uppercase;
  border-top: 1px solid var(--gray-100);
  margin-top: 2rem;
}

/* emp-filtros-panel → ver bloque principal más abajo */

/* ===== FILTROS EN FICHA DETALLE EMPLEADO ===== */
.detalle-filtros-bar {
  padding: 10px 16px;
  border-bottom: 1px solid var(--gray-100);
  background: var(--gray-50);
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  position: sticky;
  top: 0;
  z-index: 2;
}

/* ===== CERTIFICADOS ===== */
.fila-certificado td {
  background: #EFF6FF;
  border-bottom: 1px solid #BFDBFE;
}
.tag-cert {
  display: inline-block; font-size: 10px; font-weight: 700;
  background: #2563EB; color: white;
  padding: 1px 7px; border-radius: 20px;
  letter-spacing: 0.5px; margin-right: 4px;
}

/* ── CAMBIO DE FOTO DE EMPLEADO ─────────────────────── */
.emp-vista-avatar-wrap {
  position: relative;
  width: 72px; height: 72px;
  flex-shrink: 0;
}
.emp-vista-avatar-wrap .emp-vista-avatar {
  width: 72px; height: 72px;
}
.btn-cambiar-foto {
  position: absolute;
  bottom: 0; right: 0;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
  cursor: pointer;
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  transition: transform .15s, box-shadow .15s;
}
.btn-cambiar-foto:hover {
  transform: scale(1.15);
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}

/* ══════════════════════════════════════════════
   ADMIN INLINE (vista en panel principal)
══════════════════════════════════════════════ */
.admin-inline-wrap {
  padding: 1.75rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}
.admin-inline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  padding: 1.25rem 1.5rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
}
.admin-inline-header .admin-titulo {
  font-size: 22px;
  font-weight: 700;
  color: #0d0d0d;
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 2px;
}

/* ══════════════════════════════════════════════
   CAMPANA DE NOTIFICACIONES
══════════════════════════════════════════════ */
.bell-wrap {
  display: flex;
  align-items: center;
  position: relative;
}
.bell-badge {
  position: absolute;
  top: 2px; right: 2px;
  min-width: 16px; height: 16px;
  background: #e8251a;
  color: #fff;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  pointer-events: none;
  border: 1.5px solid #fff;
}
.btn-icon.bell-active {
  border-color: #e8251a;
  color: #e8251a;
}
.bell-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
  z-index: 9999;
  overflow: hidden;
}
.bell-dropdown-right {
  right: auto;
  left: 0;
}
.bell-dd-title {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  padding: 10px 14px 6px;
  text-transform: uppercase;
  letter-spacing: .5px;
  border-bottom: 1px solid #f1f5f9;
}
.bell-dd-loading,
.bell-dd-empty {
  padding: 1.2rem 14px;
  font-size: 13px;
  color: #94a3b8;
  text-align: center;
}
.bell-dd-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid #f8fafc;
  font-size: 13px;
}
.bell-dd-item:last-child { border-bottom: none; }
.bell-dd-more {
  text-align: center;
  padding: 8px;
  font-size: 12px;
  color: #2563eb;
  cursor: pointer;
  border-top: 1px solid #f1f5f9;
}
.bell-dd-more:hover { background: #eff6ff; }

/* ══════════════════════════════════════════════
   CALENDARIO DE VACACIONES
══════════════════════════════════════════════ */
/* ── WRAPPER DEL CALENDARIO ─────────────────────────── */
.cal-vac-wrap {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0,0,0,.05);
}

/* ── TOOLBAR DEL CALENDARIO ─────────────────────────── */
.cal-vac-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.cal-vac-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 4px 8px;
}
.cal-vac-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: #64748b;
  flex-wrap: wrap;
  margin-left: auto;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 6px 12px;
}
.cal-vac-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.cal-vac-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
  flex-shrink: 0;
}

/* ── GRILLA ─────────────────────────────────────────── */
.cal-vac-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  margin-bottom: 1.25rem;
}
.cal-vac-header {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  padding: 8px 0;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.cal-vac-cell {
  min-height: 90px;
  background: #fff;
  border: 1px solid #e9edf2;
  border-radius: 10px;
  padding: 7px 6px 6px;
  transition: box-shadow .15s, border-color .15s;
  cursor: default;
}
.cal-vac-cell:not(.cal-vac-empty):hover {
  box-shadow: 0 3px 12px rgba(0,0,0,.08);
  border-color: #cbd5e1;
}
.cal-vac-empty {
  background: transparent;
  border-color: transparent;
  pointer-events: none;
}
.cal-vac-finde {
  background: #f8f9fb;
}
.cal-vac-finde .cal-vac-num {
  color: #94a3b8;
}
.cal-vac-hoy {
  border-color: #2563eb !important;
  background: #eff6ff;
  box-shadow: 0 0 0 2px rgba(37,99,235,.15);
}
.cal-vac-hoy .cal-vac-num {
  color: #fff !important;
  background: #2563eb;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}
.cal-vac-conflicto {
  border-color: #f59e0b !important;
  background: #fffbeb;
}
.cal-vac-num {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 5px;
  line-height: 1;
  display: flex;
  align-items: center;
  gap: 3px;
}
.cal-vac-emp {
  padding: 3px 6px;
  border-radius: 5px;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
}

@media (max-width: 700px) {
  .cal-vac-cell { min-height: 52px; padding: 4px 3px; }
  .cal-vac-emp  { font-size: 9px; padding: 2px 3px; }
  .cal-vac-num  { font-size: 11px; }
  .cal-vac-legend { display: none; }
  .bell-dropdown { width: 280px; }
  .admin-inline-wrap { padding: 1rem; }
}

/* Feriados en calendario de vacaciones */
.cal-vac-feriado {
  background: #fffbeb;
}
.cal-vac-feriado .cal-vac-num {
  color: #b45309;
}
.cal-fer-dot {
  font-size: 9px;
  vertical-align: middle;
}

/* Botón Ver en calendario dentro del dropdown de campana */
.bell-dd-cal-btn {
  background: none;
  border: none;
  color: #2563eb;
  font-size: 11px;
  cursor: pointer;
  padding: 2px 0;
  margin-top: 3px;
  display: block;
  text-align: left;
}
.bell-dd-cal-btn:hover { text-decoration: underline; }


/* =====================================================
   CROMA · HORARIOS — mejora visual segura
   Solo estética/layout. No modifica lógica ni selectores JS.
   ===================================================== */
:root {
  --page-bg: #f4f4f1;
  --panel: #ffffff;
  --panel-soft: #fafaf8;
  --line: #e7e5df;
  --text-soft: #71716b;
  --shadow-card: 0 10px 30px rgba(13, 13, 13, .07);
  --shadow-hover: 0 16px 42px rgba(13, 13, 13, .12);
}

body {
  background: #f7f7f5;
}

/* TOPBAR más clara y con mejor jerarquía */
.topbar {
  height: 64px;
  padding: 0 2.25rem;
  gap: 1.25rem;
  background: rgba(13,13,13,.96);
  backdrop-filter: blur(14px);
  box-shadow: 0 6px 24px rgba(0,0,0,.20);
}
.brand { align-items: center; min-width: max-content; }
.brand-tridente { height: 26px; width: auto; display: block; }
.brand-logo { font-size: 26px; letter-spacing: 3px; line-height: 1; }
.brand-section {
  padding: 3px 9px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  color: #d6d6d2;
  letter-spacing: 2px;
}

.top-nav {
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
}
.nav-btn {
  min-height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 13px;
  color: #bfbfba;
}
.nav-btn.active {
  color: var(--black);
  background: var(--white);
  box-shadow: 0 4px 14px rgba(0,0,0,.22);
  font-weight: 600;
}
.nav-btn:hover:not(.active) { background: rgba(255,255,255,.10); }

.top-search {
  height: 38px;
  min-width: 230px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.10);
}
.top-search input { color: #fff; font-size: 13px; }
.top-search input::placeholder { color: rgba(255,255,255,.45); }
.top-search svg { color: rgba(255,255,255,.55); }

.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border-color: rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
}
.btn-icon:hover { background: rgba(255,255,255,.11); transform: translateY(-1px); }
.connection-status {
  height: 38px;
  border-color: rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
}

/* Contenedor principal */
.app {
  max-width: 1480px;
  padding: 1.25rem 2.25rem 2.5rem;
}

/* Hero superior — eliminado, estilos conservados por compatibilidad */
.dashboard-hero { display: none; }
.hero-copy, .hero-kicker, .hero-actions, .hero-chip, .hero-chip-dark { display: none; }

/* Stats más ejecutivas */
.stats-row {
  gap: 14px;
  margin-bottom: 1rem;
}
.stat-card {
  position: relative;
  overflow: hidden;
  min-height: 116px;
  padding: 1.25rem 1.35rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.86);
  box-shadow: var(--shadow-card);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.stat-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 5px;
  height: 100%;
  background: var(--black);
  opacity: .9;
}
.stat-card.highlight::before { background: var(--accent); }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.stat-card.highlight { border-color: rgba(232,37,26,.35); }
.stat-val {
  font-size: 44px;
  letter-spacing: 1.5px;
  margin-bottom: 7px;
}
.stat-label {
  font-weight: 700;
  color: var(--text-soft);
  letter-spacing: .08em;
}

/* Barra de filtros */
.controls-bar {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.86);
  box-shadow: var(--shadow-sm);
  min-height: 56px;
}
.controls-bar { margin-bottom: 1.25rem; }
/* Ocultar controls-bar si está vacía (antes de que cargue JS) */
.controls-bar:empty { display: none; }
.week-nav {
  padding: 4px;
  border: 1px solid var(--gray-100);
  border-radius: 999px;
  background: var(--panel-soft);
}
.week-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.week-range {
  min-width: 220px;
  font-size: 20px;
}
.filters { gap: 10px; flex-wrap: wrap; }
.filter-select {
  height: 38px;
  border-radius: 12px;
  border-color: var(--line);
  background: #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
}
.filter-select:focus {
  border-color: var(--black);
  box-shadow: 0 0 0 3px rgba(13,13,13,.08);
}

/* Bloques por sucursal y grillas */
.sucursal-block,
.hor-suc-block,
.reporte-card,
.admin-card,
.vac-card,
.detalle-panel {
  border-radius: 18px !important;
  border-color: var(--line) !important;
  box-shadow: var(--shadow-card) !important;
}
.sucursal-header {
  padding: 4px 4px 8px;
  margin-bottom: 6px;
}
.suc-stripe { width: 6px; height: 28px; border-radius: 999px; }
.suc-nombre { font-size: 22px; letter-spacing: 1.2px; }
.suc-badge { font-weight: 700; padding: 5px 11px; }
.suc-meta { font-size: 12px; }
.grilla-wrap {
  border-radius: 18px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--line);
  background: #fff;
}
.grilla {
  border: none;
  border-radius: 18px;
  overflow: hidden;
}
.grilla thead tr { background: #f3f3ef; }
.grilla th {
  padding: 13px 12px;
  color: #777771;
  font-weight: 800;
}
.grilla td {
  padding: 11px 12px;
  border-bottom-color: #eeeDE8;
}
.grilla td.td-emp {
  font-weight: 700;
  font-size: 13px;
}
.grilla tr:hover td { background: #fbfbf7; }
.grilla th.hoy,
.grilla td.hoy { background: #fff7ed; }

.pill {
  min-height: 24px;
  padding: 4px 10px;
  font-weight: 800;
  border-radius: 999px;
}
.turno-hora {
  display: block;
  margin-top: 4px;
  color: #777771;
  font-size: 11px;
  font-weight: 600;
}

/* Cards de empleados */
/* ══ EMPLEADOS — Sección header ═══════════════════════ */
.emp-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: .5rem;
}
.emp-section-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  letter-spacing: 2px;
  color: #0d0d0d;
}
.emp-section-count {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 3px 12px;
  letter-spacing: .04em;
}

/* ══ GRID DE CARDS ════════════════════════════════════ */
.emp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  align-items: start;
}

/* ══ CARD ═════════════════════════════════════════════ */
.emp-card {
  border-radius: 18px;
  border: 1px solid #e9edf2;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.05);
  transition: transform .16s ease, box-shadow .16s ease;
  background: #fff;
}
.emp-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0,0,0,.10);
}

/* Franja de color de sucursal arriba */
.emp-card-stripe {
  height: 4px;
  width: 100%;
  display: block;
}

.emp-card-body {
  padding: 1.1rem 1.1rem .9rem;
}

/* ══ CABECERA: AVATAR + NOMBRE ════════════════════════ */
.emp-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.emp-avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.emp-nombre {
  font-size: 15px;
  font-weight: 700;
  color: #0d0d0d;
  line-height: 1.2;
}
.emp-suc {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* ══ STATS ════════════════════════════════════════════ */
.emp-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
}
.emp-stat-item {
  text-align: center;
  padding: 8px 4px;
  border-radius: 10px;
  background: #f8fafc;
}
.emp-stat-val {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 26px;
  letter-spacing: .5px;
  line-height: 1;
  color: #0d0d0d;
}
.emp-stat-label {
  font-size: 9px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-top: 2px;
}

/* ══ FOOTER ═══════════════════════════════════════════ */
.emp-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: .75rem 1.1rem;
  border-top: 1px solid #f1f5f9;
  background: #fafbfc;
}
.emp-card-footer-link {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: .03em;
  transition: color .15s;
}
.emp-card:hover .emp-card-footer-link { color: #0d0d0d; }

/* ══ BOTÓN WHATSAPP ═══════════════════════════════════ */
.wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  background: #dcfce7;
  color: #16a34a;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid #bbf7d0;
  transition: all 0.15s;
  white-space: nowrap;
}
.wa-btn:hover { background: #16a34a; color: #fff; border-color: #16a34a; }

/* ══ TOGGLE FILTROS MOBILE ════════════════════════════ */
.emp-filtros-toggle-btn {
  display: none;
}
@media (max-width: 700px) {
  .emp-filtros-toggle-btn {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; padding: 10px 1rem;
    background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
    font-family: var(--font-body); font-size: 13px; font-weight: 600;
    color: var(--black); cursor: pointer; margin-bottom: .75rem;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
  }
  .emp-filtros-panel {
    display: none !important;
  }
  .emp-filtros-panel.mobile-open {
    display: flex !important;
    flex-direction: column;
    border-radius: 12px;
    padding: .85rem 1rem;
    gap: .65rem;
  }
  .emp-filtros-panel.mobile-open .emp-filtro-grupo {
    width: 100%;
    min-width: unset;
  }
  .emp-filtros-panel.mobile-open .emp-filtro-select {
    min-width: unset;
  }
  /* Ocultar VER SOLO en mobile — demasiado cluttered */
  .emp-filtros-panel .emp-filtro-grupo:first-child {
    display: none;
  }
}

/* ══ PANEL DE FILTROS ═════════════════════════════════ */
.emp-filtros-panel {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.25rem;
  align-items: flex-end;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
}
.emp-filtro-grupo {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 130px;
  flex: 0 0 auto;
}
.emp-filtro-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #94a3b8;
}
.emp-filtro-select {
  height: 36px;
  padding: 0 10px;
  font-family: var(--font-body);
  font-size: 13px;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #f8fafc;
  color: #0d0d0d;
  cursor: pointer;
  transition: border .15s;
  width: 100%;
  min-width: 150px;
}
.emp-filtro-select:focus { outline: none; border-color: #0d0d0d; box-shadow: 0 0 0 2px rgba(0,0,0,.06); }

/* Filtros de día: pills en lugar de checkboxes */
.filtros-dia-inline {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 2px;
}
.filtros-dia-inline .filtro-dia-check {
  display: inline-flex;
  align-items: center;
  gap: 0;
  cursor: pointer;
}
.filtros-dia-inline .filtro-dia-check input[type="checkbox"] {
  display: none;
}
.filtros-dia-inline .filtro-dia-check span {
  padding: 4px 11px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  transition: all .15s;
  cursor: pointer;
  user-select: none;
}
.filtros-dia-inline .filtro-dia-check input:checked + span {
  background: #0d0d0d;
  color: #fff;
  border-color: #0d0d0d;
}
.filtros-dia-inline .filtro-dia-check span:hover {
  border-color: #94a3b8;
  color: #0d0d0d;
}

/* Mobile */
@media (max-width: 760px) {
  .emp-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; align-items: start; }
  .emp-card-body { padding: .85rem .85rem .7rem; }
  .emp-avatar { width: 42px; height: 42px; border-radius: 11px; font-size: 13px; }
  .emp-nombre { font-size: 13px; }
  .emp-stat-val { font-size: 22px; }
  .emp-stat-label { font-size: 8px; }
  .emp-filtros-panel { gap: .5rem .75rem; padding: .85rem 1rem; }
  .emp-filtro-grupo { min-width: 100px; }
}
@media (max-width: 480px) {
  .emp-grid { grid-template-columns: 1fr; }
}

/* (setup-card legacy removido — nuevo layout en .setup-left/.setup-right) */

/* Footer */
.app-footer {
  color: #9a9a94;
  font-size: 12px;
  padding: 1rem 2rem 2rem;
}

/* Responsive */
@media (max-width: 1100px) {
  .topbar { padding: 0 1rem; }
  .top-search { display: none; }
  .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .topbar { height: 56px; padding: 0 .85rem; gap: .6rem; }
  .brand-section, .brand-divider { display: none; }
  .brand-logo { font-size: 22px; }
  .top-actions .connection-status { display: none; }
  .btn-icon { width: 34px; height: 34px; }

  .app { padding: .85rem; }

  /* Stats 2 columnas */
  .stats-row { grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: .75rem; }
  .stat-card { min-height: 84px; padding: .85rem 1rem; border-radius: 14px; }
  .stat-val { font-size: 30px; margin-bottom: 3px; }
  .stat-label { font-size: 10px; }

  /* Barra de filtros: apilada */
  .controls-bar {
    flex-direction: column;
    align-items: stretch;
    gap: .6rem;
    padding: 10px;
    border-radius: 14px;
    margin-bottom: .85rem;
  }
  .week-nav { width: 100%; justify-content: space-between; padding: 3px; }
  .week-range { min-width: 0; flex: 1; font-size: 16px; text-align: center; }
  .week-btn { width: 32px; height: 32px; }
  .filters { flex-direction: column; gap: 6px; }
  .filter-select { width: 100%; height: 38px; border-radius: 10px; }

  /* Grilla y empleados */
  .emp-grid { grid-template-columns: 1fr; }

  /* Admin inline */
  .admin-inline-wrap { padding: .85rem; }
  .admin-inline-header { padding: 1rem; flex-wrap: wrap; gap: .5rem; }
  .admin-tabs { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .admin-tab { padding: 7px 14px; font-size: 12px; white-space: nowrap; }
  .admin-search { min-width: 0; width: 100%; }
  .admin-tabla { font-size: 12px; }
  .admin-tabla th, .admin-tabla td { padding: 8px 10px; }

  /* Calendario vacaciones */
  .cal-vac-wrap { padding: 1rem; border-radius: 12px; }
  .cal-vac-toolbar { gap: 8px; }
  .cal-vac-nav { padding: 3px 6px; }
  .cal-vac-grid { gap: 3px; }
  .cal-vac-cell { min-height: 52px; padding: 4px 3px; }
  .cal-vac-num { font-size: 11px; }
  .cal-vac-emp { font-size: 9px; padding: 2px 3px; }
  .cal-vac-hoy .cal-vac-num { width: 18px; height: 18px; font-size: 10px; }
}

@media (max-width: 480px) {
  .stats-row { grid-template-columns: 1fr 1fr; gap: 6px; }
  .stat-card { min-height: 76px; padding: .75rem; }
  .stat-val { font-size: 26px; }
  .brand-logo { font-size: 20px; }

  /* Sucursal header en grilla de turnos */
  .sucursal-header { gap: 6px; }

  /* Admin tabs scroll horizontal */
  .admin-tabs { border-radius: 8px; }
}

/* =====================================================
   PORTAL EMPLEADO — Mobile first v2
   ===================================================== */
.emp-portal-mobilefirst {
  max-width: 1120px;
  padding-bottom: 3rem;
}
.portal-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--gray-400);
}
.portal-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr);
  gap: 14px;
  margin-bottom: 14px;
}
.portal-profile-card,
.portal-next-card,
.portal-section,
.portal-summary-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .06);
}
.portal-profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border-left: none;
  border-top: 5px solid var(--portal-color, var(--accent));
}
.portal-profile-card .emp-vista-avatar {
  width: 72px;
  height: 72px;
  border-radius: 18px;
}
.portal-profile-info {
  min-width: 0;
  overflow: hidden;
}
.portal-profile-info h1,
.portal-greeting {
  font-family: var(--font-display);
  font-size: clamp(20px, 5vw, 36px);
  letter-spacing: 1px;
  line-height: 1;
  color: var(--black);
  margin: 3px 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.portal-greeting-emoji {
  font-style: normal;
  font-size: 0.75em;
}
.portal-profile-info p {
  font-size: 14px;
  color: var(--gray-600);
  margin-bottom: 8px;
}
.portal-next-card {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  border-top: 5px solid var(--portal-color, var(--accent));
}
.portal-next-card strong {
  font-family: var(--font-display);
  font-size: 34px;
  letter-spacing: 1px;
  line-height: 1;
  color: var(--black);
}
.portal-next-card small,
.portal-next-date,
.portal-next-empty {
  font-size: 13px;
  color: var(--gray-600);
}
.portal-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.portal-summary-card {
  padding: 14px 16px;
}
.portal-summary-card span {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--gray-400);
  margin-bottom: 4px;
}
.portal-summary-card strong {
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 1;
  letter-spacing: 1px;
  color: var(--black);
}
.portal-section {
  padding: 16px;
  margin-bottom: 14px;
}
.portal-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.portal-section-head h2 {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 1px;
  color: var(--black);
  line-height: 1;
  margin-top: 3px;
}
.emp-semana-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  background: #fff;
  color: var(--black);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.emp-semana-nav-btn:hover {
  background: var(--gray-100);
  border-color: var(--gray-300);
}
.emp-semana-nav-hoy {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .3px;
}
.portal-week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(105px, 1fr));
  gap: 8px;
  overflow-x: auto;
}
.portal-week-card {
  border: 1px solid var(--gray-100);
  border-radius: 14px;
  padding: 11px;
  background: #fff;
  min-height: 112px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.portal-week-card.is-today {
  border-color: var(--portal-color, var(--black));
  border-width: 1.5px;
}
.portal-week-day {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 6px;
}
.portal-week-day-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-500);
}
.is-today .portal-week-day-num {
  background: var(--portal-color, var(--black));
  color: #fff;
}
.portal-week-card.is-free {
  background: #f8fafc;
  border-color: var(--gray-100);
}
/* Tipos de turno */
.portal-week-card.turno-corrido {
  background: #eff6ff;
  border-color: #bfdbfe;
}
.portal-week-card.turno-corrido .portal-week-shift {
  background: #dbeafe;
  color: #1d4ed8;
}
.portal-week-card.turno-corrido .portal-week-day-num { color: #1d4ed8; }
.portal-week-card.turno-corrido.is-today .portal-week-day-num { background: #1d4ed8; color: #fff; }

.portal-week-card.turno-cortado {
  background: #fefce8;
  border-color: #fde68a;
}
.portal-week-card.turno-cortado .portal-week-shift {
  background: #fef08a;
  color: #854d0e;
}
.portal-week-card.turno-cortado .portal-week-day-num { color: #854d0e; }
.portal-week-card.turno-cortado.is-today .portal-week-day-num { background: #ca8a04; color: #fff; }

.portal-week-card.turno-media {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.portal-week-card.turno-media .portal-week-shift {
  background: #bbf7d0;
  color: #15803d;
}
.portal-week-card.turno-media .portal-week-day-num { color: #15803d; }
.portal-week-card.turno-media.is-today .portal-week-day-num { background: #16a34a; color: #fff; }

/* .portal-week-day → ver bloque principal más arriba */
.portal-week-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: flex-start;
}
.portal-week-shift {
  display: inline-flex;
  width: 100%;
  justify-content: center;
  padding: 6px 8px;
  border-radius: 10px;
  background: var(--portal-soft, var(--gray-50));
  color: var(--portal-color, var(--black));
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.portal-week-free {
  display: inline-flex;
  justify-content: center;
  width: 100%;
  padding: 7px 10px;
  border-radius: 999px;
  background: #dcfce7;
  color: #15803d;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.portal-week-body small {
  font-size: 11px;
  color: var(--gray-500);
}
.emp-portal-mobilefirst .detalle-tabs {
  background: var(--white);
  border: 1px solid var(--gray-100) !important;
  border-radius: 16px 16px 0 0;
  padding: 6px;
  margin-top: 14px !important;
}
.emp-portal-mobilefirst #evTabJornada,
.emp-portal-mobilefirst #evTabVacaciones {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-top: none;
  border-radius: 0 0 16px 16px;
}
.emp-portal-mobilefirst .emp-vista-toolbar {
  margin: 0;
  border-radius: 0;
  border-left: none;
  border-right: none;
}

@media (max-width: 920px) {
  .portal-hero { grid-template-columns: 1fr; }
  .portal-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portal-week-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .app { padding: .85rem; }
  .emp-portal-mobilefirst { padding-bottom: 2rem; }
  .portal-profile-card,
  .portal-next-card {
    border-radius: 16px;
  }
  .portal-profile-card {
    padding: 14px;
  }
  .portal-next-card {
    padding: 13px 14px;
  }
  .portal-profile-info p {
    font-size: 13px;
  }
  .portal-next-card strong {
    font-size: 30px;
  }
  .portal-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .portal-summary-card {
    padding: 12px;
    border-radius: 14px;
  }
  .portal-summary-card strong {
    font-size: 30px;
  }
  .portal-section {
    padding: 13px;
    border-radius: 16px;
  }
  .portal-week-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .portal-week-card {
    min-height: auto;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 12px;
  }
  .portal-week-day {
    width: 95px;
    flex-shrink: 0;
  }
  .portal-week-day span {
    font-size: 14px;
  }
  .portal-week-body {
    flex: 1;
    align-items: stretch;
  }
  .portal-week-shift,
  .portal-week-free {
    min-height: 38px;
    align-items: center;
    font-size: 13px;
  }
  .emp-portal-mobilefirst .detalle-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  .emp-portal-mobilefirst .detalle-tab {
    min-height: 42px;
    white-space: nowrap;
  }
  .emp-portal-mobilefirst .emp-vista-toolbar {
    padding: 12px;
  }
  .emp-portal-mobilefirst .emp-vista-toolbar > div:last-child {
    width: 100%;
  }
  .emp-portal-mobilefirst .btn-detalle-accion {
    min-height: 42px;
  }
}

/* ===== FIX MOBILE · PORTAL EMPLEADO ===== */
.portal-profile-card {
  overflow: visible;
}
.portal-profile-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
@media (max-width: 640px) {
  .portal-profile-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    overflow: visible;
  }
  .portal-profile-info {
    width: 100%;
    min-width: 0;
    overflow: visible;
  }
  .portal-profile-info .emp-badges-row {
    margin-bottom: 8px;
  }
}


/* ── AJUSTE FOTO PORTAL EMPLEADO ───────────────────────
   Mejora la presentación de la foto en el portal del empleado
   sin tocar la lógica ni el panel administrador.
*/
.portal-profile-card .emp-vista-avatar-wrap {
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portal-profile-card .emp-vista-avatar,
.portal-profile-card .emp-vista-avatar-wrap .emp-vista-avatar {
  width: 90px !important;
  height: 90px !important;
  border-radius: 24px !important;
  overflow: hidden !important;
  background: var(--white);
  border: 4px solid var(--white);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .18);
}

.portal-profile-card .emp-vista-avatar img,
.portal-profile-card .emp-vista-avatar.emp-avatar-foto img {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  object-fit: cover !important;
  object-position: center center !important;
  border-radius: 20px !important;
}

.portal-profile-card .btn-cambiar-foto {
  right: -4px;
  bottom: -4px;
  width: 30px;
  height: 30px;
  border: 2px solid var(--white);
  box-shadow: 0 6px 14px rgba(15, 23, 42, .18);
}

@media (max-width: 700px) {
  .portal-profile-card {
    gap: 16px;
  }

  .portal-profile-card .emp-vista-avatar-wrap {
    width: 92px;
    height: 92px;
  }

  .portal-profile-card .emp-vista-avatar,
  .portal-profile-card .emp-vista-avatar-wrap .emp-vista-avatar {
    width: 86px !important;
    height: 86px !important;
    border-radius: 22px !important;
    border-width: 4px;
  }

  .portal-profile-card .emp-vista-avatar img,
  .portal-profile-card .emp-vista-avatar.emp-avatar-foto img {
    border-radius: 18px !important;
  }

  .portal-profile-card .btn-cambiar-foto {
    width: 28px;
    height: 28px;
    right: -3px;
    bottom: -3px;
  }
}
@media (max-width: 480px) {
  .login-brand { font-size: 38px; }
  .login-form { padding: 1.5rem; }
}

/* ══════════════════════════════════════════════
   POPOVER NUEVO EVENTO (calendario)
══════════════════════════════════════════════ */
.evento-popover {
  position: fixed;
  z-index: 900;
  width: 270px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,.18);
  overflow: hidden;
  animation: scale-in-center 0.5s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
}
.evento-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 8px;
  border-bottom: 1px solid #f1f5f9;
}
.evento-popover-fecha {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 1px;
  color: #0d0d0d;
}
.evento-popover-close {
  width: 24px; height: 24px;
  border: 1px solid #e2e8f0; border-radius: 6px;
  background: #f8fafc; cursor: pointer;
  font-size: 11px; color: #94a3b8;
  display: flex; align-items: center; justify-content: center;
}
.evento-popover-close:hover { background: #0d0d0d; color: #fff; border-color: #0d0d0d; }
.evento-popover-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.evento-popover-input {
  width: 100%; height: 36px;
  padding: 0 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 12px;
  color: #0d0d0d;
  background: #f8fafc;
  transition: border-color .15s;
}
.evento-popover-input:focus {
  outline: none;
  border-color: #94a3b8;
  background: #fff;
}
.evento-popover-input::placeholder { color: #cbd5e1; }
/* Campos Desde / Hasta */
.ep-fechas-wrap {
  display: flex;
  gap: 8px;
}
.ep-fecha-campo {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ep-fecha-label {
  font-size: 10px;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.ep-date {
  height: 34px;
  padding: 0 8px;
  font-size: 11px;
}
/* Selector destino evento */
.ep-dest-wrap {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}
.ep-radio-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  font-size: 12px;
  color: #374151;
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid #f1f5f9;
}
.ep-radio-opt:last-child { border-bottom: none; }
.ep-radio-opt input[type="radio"] {
  width: 14px; height: 14px;
  accent-color: #0d0d0d;
  flex-shrink: 0;
  cursor: pointer;
}
.ep-suc-list {
  padding: 4px 10px 6px 28px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #f8fafc;
  border-bottom: 1px solid #f1f5f9;
}
.ep-suc-check {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: #374151;
  cursor: pointer;
  user-select: none;
  line-height: 1.8;
}
.ep-suc-check input[type="checkbox"] {
  width: 13px; height: 13px;
  accent-color: #0d0d0d;
  flex-shrink: 0;
  cursor: pointer;
}
.evento-popover-btn {
  width: 100%; height: 36px;
  background: #0d0d0d; color: #fff;
  border: none; border-radius: 8px;
  font-family: var(--font-body);
  font-size: 12px; font-weight: 600;
  cursor: pointer;
  transition: background .15s;
  margin-top: 2px;
}
.evento-popover-btn:hover { background: #1a1a1a; }
.evento-popover-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ══════════════════════════════════════════════
   ANUNCIOS — Admin y Vista Empleado
══════════════════════════════════════════════ */

/* ── Admin: lista de anuncios ── */
.anuncio-admin-item {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #f1f5f9;
  transition: background .1s;
}
.anuncio-admin-item:hover { background: #f8fafc; }
.anuncio-admin-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.anuncio-admin-fecha {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
}
.anuncio-admin-dest {
  font-size: 11px;
  color: #64748b;
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 20px;
}
.anuncio-admin-titulo {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 4px;
}
.anuncio-admin-msg {
  font-size: 13px;
  color: #475569;
  white-space: pre-wrap;
}

/* ── Admin: selector de destinatarios ── */
.anuncio-dest-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #374151;
  cursor: pointer;
  padding: 4px 0;
}
.anuncio-dest-check input[type="checkbox"] {
  width: 15px; height: 15px;
  accent-color: #1e293b;
  cursor: pointer;
}

/* ── Empleado: banner de anuncios ── */
.anuncios-banner-wrap {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: min(420px, calc(100vw - 24px));
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
  pointer-events: none;
}
.anuncio-banner-card {
  background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
  color: #fff;
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: 0 8px 32px rgba(0,0,0,.22), 0 2px 8px rgba(37,99,235,.25);
  transition: opacity .25s ease, transform .25s ease;
  animation: anuncioBounceIn .45s cubic-bezier(.34,1.56,.64,1) both,
             anuncioShimmer 1.1s .45s ease-out both;
  pointer-events: all;
  overflow: hidden;
  position: relative;
}
.anuncio-banner-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg,
    transparent 30%,
    rgba(255,255,255,.28) 50%,
    transparent 70%);
  transform: translateX(-120%);
  animation: anuncioSweep 1.1s .45s ease-out both;
  pointer-events: none;
}
@keyframes anuncioBounceIn {
  from { opacity:0; transform: translateY(20px) scale(.95); }
  to   { opacity:1; transform: translateY(0) scale(1); }
}
@keyframes anuncioSweep {
  from { transform: translateX(-120%); }
  to   { transform: translateX(120%); }
}
.anuncio-banner-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.anuncio-banner-icono {
  font-size: 20px;
  flex-shrink: 0;
}
.anuncio-banner-titulo {
  flex: 1;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .2px;
}
.anuncio-banner-close {
  background: rgba(255,255,255,.15);
  border: none;
  color: #fff;
  width: 28px; height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background .15s;
}
.anuncio-banner-close:hover { background: rgba(255,255,255,.3); }
.anuncio-banner-msg {
  font-size: 13px;
  line-height: 1.6;
  opacity: .92;
  white-space: pre-wrap;
  margin-bottom: 8px;
}
.anuncio-banner-fecha {
  font-size: 10px;
  opacity: .55;
  text-align: right;
  letter-spacing: .3px;
}

@media (max-width: 700px) {
  .anuncios-banner-wrap { bottom: 16px; }
  .anuncio-banner-card { border-radius: 14px; padding: 14px 16px; }
  .anuncio-banner-titulo { font-size: 14px; }
  .anuncio-admin-item { padding: .75rem 1rem; }
}

/* ── WhatsApp toggle en selector de destinatarios ── */
.anuncio-dest-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
}
.anuncio-wa-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  background: #f1f5f9;
  border: 1.5px solid #e2e8f0;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
  flex-shrink: 0;
  user-select: none;
}
.anuncio-wa-toggle:hover {
  background: #dcfce7;
  color: #16a34a;
  border-color: #86efac;
}
.anuncio-wa-toggle.anuncio-wa-activo {
  background: #25D366;
  color: #fff;
  border-color: #25D366;
  box-shadow: 0 2px 8px rgba(37,211,102,.3);
}

/* ══════════════════════════════════════════════
   ANUNCIOS — Sección historial en vista empleado
══════════════════════════════════════════════ */
.portal-anuncios-section {
  margin-bottom: 0;
}
#anunciosSectionWrap {
  margin-bottom: 14px;
}
.anuncio-seccion-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px; height: 16px;
  background: #2563eb;
  color: #fff;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  padding: 0 4px;
  vertical-align: middle;
  margin-left: 4px;
  position: relative;
  top: -1px;
}
.anuncio-hist-item {
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 8px;
  transition: box-shadow .15s;
}
.anuncio-hist-nuevo {
  background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
  color: #fff;
  box-shadow: 0 3px 12px rgba(37,99,235,.2);
}
.anuncio-hist-leido {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #374151;
}
.anuncio-hist-top {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.anuncio-hist-icono { font-size: 15px; flex-shrink: 0; }
.anuncio-hist-titulo {
  font-size: 13px;
  font-weight: 700;
  flex: 1;
}
.anuncio-hist-nuevo .anuncio-hist-titulo { color: #fff; }
.anuncio-hist-leido .anuncio-hist-titulo  { color: #1e293b; }
.anuncio-hist-badge {
  font-size: 10px;
  font-weight: 700;
  background: #fff;
  color: #2563eb;
  padding: 1px 7px;
  border-radius: 20px;
  letter-spacing: .3px;
  flex-shrink: 0;
}
.anuncio-hist-fecha {
  font-size: 10px;
  opacity: .6;
  flex-shrink: 0;
}
.anuncio-hist-msg {
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
}
.anuncio-hist-nuevo .anuncio-hist-msg { opacity: .92; }
.anuncio-hist-leido .anuncio-hist-msg  { color: #475569; }

@media (max-width: 700px) {
  .anuncio-hist-item { padding: 10px 12px; }
}

/* ── EVENTOS DEL CALENDARIO ─────────────────────────── */
.cal-vac-evento {
  display: flex;
  align-items: center;
  gap: 3px;
  background: #ede9fe;
  border-left: 3px solid #7c3aed;
  border-radius: 5px;
  padding: 3px 5px;
  margin-top: 3px;
  max-width: 100%;
  overflow: hidden;
  transition: background .15s;
  font-size: 10px;
  font-weight: 500;
}
.cal-vac-evento:hover { background: #ddd6fe; }
.cal-vac-evento-vencido { background: #f1f5f9; border-left-color: #cbd5e1; opacity: .75; }
.cal-vac-evento-vencido:hover { background: #e2e8f0; }

/* ── EVENTOS EN MI SEMANA DEL EMPLEADO ──────────────── */
.evento-semana-chip {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  background: #ede9fe;
  border-left: 3px solid #7c3aed;
  border-radius: 6px;
  padding: 6px 10px;
  margin-top: 8px;
}
.evento-semana-chip-vencido { background: #f1f5f9; border-left-color: #cbd5e1; opacity: .75; }
.evento-semana-icono {
  font-size: 13px;
  flex-shrink: 0;
  margin-top: 1px;
}
.evento-semana-titulo {
  font-size: 12px;
  font-weight: 600;
  color: #5b21b6;
  line-height: 1.3;
}
.evento-semana-desc {
  font-size: 11px;
  color: #7c3aed;
  margin-top: 2px;
  opacity: .8;
  line-height: 1.3;
}
/* LOCAL CERRADO */
.portal-week-cerrado {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #dc2626;
  letter-spacing: .3px;
}
.portal-week-card.is-cerrado {
  background: #fff5f5;
  border-top-color: #dc2626;
}
.portal-week-card.is-cerrado .portal-week-day {
  color: #dc2626;
}
/* Botón .ics */
.evento-ics-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  padding: 0 2px;
  flex-shrink: 0;
  opacity: .7;
  transition: opacity .15s;
  align-self: center;
}
.evento-ics-btn:hover { opacity: 1; }
