/* ── VARIABLES ─────────────────────────────────────────────────────────── */
:root {
  --primary:       #3949AB;
  --primary-dark:  #283593;
  --primary-light: #E8EAF6;
  --danger:        #D32F2F;
  --danger-light:  #FFEBEE;
  --success:       #388E3C;
  --bg:            #F4F5FA;
  --surface:       #FFFFFF;
  --text:          #1A1A2E;
  --text-secondary:#6B6B80;
  --border:        #E2E2EF;
  --shadow-sm:     0 1px 4px rgba(57,73,171,0.08);
  --shadow-md:     0 4px 16px rgba(57,73,171,0.15);
  --radius:        14px;
  --radius-sm:     9px;
  --header-h:      56px;
}

/* ── RESET ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
}

button { font-family: inherit; cursor: pointer; }
input  { font-family: inherit; }

/* ── APP SHELL ──────────────────────────────────────────────────────────── */
#app {
  height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: 480px;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
}

/* ── HEADER ─────────────────────────────────────────────────────────────── */
.header {
  height: var(--header-h);
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.22);
  position: relative;
  z-index: 10;
}

.header-back {
  background: none;
  border: none;
  color: #fff;
  padding: 8px;
  margin: -8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.header-back:hover { background: rgba(255,255,255,0.18); }

.header-title {
  font-size: 18px;
  font-weight: 600;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-action {
  background: rgba(255,255,255,0.18);
  border: none;
  color: #fff;
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s;
  white-space: nowrap;
}
.header-action:hover { background: rgba(255,255,255,0.30); }

/* ── SCROLLABLE CONTENT ─────────────────────────────────────────────────── */
.screen-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ── HOME SCREEN CONTAINER ──────────────────────────────────────────────── */
.home-screen {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #EDEEF8;
}

/* ── HOME HERO ──────────────────────────────────────────────────────────── */
.home-hero {
  background: linear-gradient(135deg, #007BFF 0%, #8A2BE2 100%);
  padding: calc(env(safe-area-inset-top, 0px) + 32px) 24px 36px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.home-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(255,255,255,0.12) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 70%, rgba(255,255,255,0.07) 0%, transparent 50%);
  pointer-events: none;
}

.home-hero-icon {
  width: 76px;
  height: 76px;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 34px;
  box-shadow:
    0 8px 28px rgba(0,0,0,0.22),
    0 0 0 8px rgba(255,255,255,0.07);
  position: relative;
}

.home-hero h1 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 5px;
  letter-spacing: -0.4px;
  position: relative;
}
.home-hero p {
  font-size: 13px;
  opacity: 0.82;
  font-weight: 400;
  position: relative;
}

/* ── HOME MENU CARDS ────────────────────────────────────────────────────── */
.home-menu {
  padding: 20px 16px 32px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

/* Animación de entrada escalonada */
@keyframes cardFadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.menu-card {
  background: rgba(255,255,255,0.93);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.85);
  box-shadow: 0 2px 14px rgba(80,60,160,0.08), 0 1px 3px rgba(0,0,0,0.05);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  width: 100%;
  cursor: pointer;
  user-select: none;
  opacity: 0;
  animation: cardFadeUp 0.38s cubic-bezier(0.22,1,0.36,1) forwards;
  -webkit-tap-highlight-color: transparent;
}
.menu-card:nth-child(1) { animation-delay: 0.04s; }
.menu-card:nth-child(2) { animation-delay: 0.09s; }
.menu-card:nth-child(3) { animation-delay: 0.14s; }
.menu-card:nth-child(4) { animation-delay: 0.19s; }
.menu-card:nth-child(5) { animation-delay: 0.24s; }

.menu-card:active {
  transform: scale(0.972) translateY(1px);
  box-shadow: 0 1px 6px rgba(80,60,160,0.12);
  background: rgba(255,255,255,0.98);
}
.menu-card.disabled { opacity: 0.4; cursor: default; }
.menu-card.disabled:active { transform: none; }

.menu-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
/* Acomodadores — Verde Esmeralda */
.menu-card-icon.blue {
  background: rgba(46,204,113,0.13);
  box-shadow: 0 0 0 1px rgba(46,204,113,0.28), 0 4px 14px rgba(46,204,113,0.22);
}
/* No puede cumplir — Rojo Coral */
.menu-card-icon.red {
  background: rgba(231,76,60,0.11);
  box-shadow: 0 0 0 1px rgba(231,76,60,0.26), 0 4px 14px rgba(231,76,60,0.18);
}
/* Cargar PDF — Naranja Ámbar */
.menu-card-icon.orange {
  background: rgba(243,156,18,0.12);
  box-shadow: 0 0 0 1px rgba(243,156,18,0.28), 0 4px 14px rgba(243,156,18,0.20);
}
/* Seleccionar Mes — Azul Cielo */
.menu-card-icon.green {
  background: rgba(52,152,219,0.12);
  box-shadow: 0 0 0 1px rgba(52,152,219,0.28), 0 4px 14px rgba(52,152,219,0.20);
}
/* Selectivo Domingo — Púrpura */
.menu-card-icon.purple {
  background: rgba(142,68,173,0.11);
  box-shadow: 0 0 0 1px rgba(142,68,173,0.26), 0 4px 14px rgba(142,68,173,0.18);
}

.menu-card-text { flex: 1; min-width: 0; }
.menu-card-text h3 { font-size: 15px; font-weight: 700; color: #1A1A2E; margin-bottom: 2px; }
.menu-card-text p  { font-size: 12px; color: #9B9BB5; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-card-arrow   { margin-left: auto; color: #C8C8DE; flex-shrink: 0; }

/* ── BUTTONS ────────────────────────────────────────────────────────────── */
.btn {
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.15s, transform 0.1s;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn:active { transform: scale(0.96); }

.btn-primary   { background: var(--primary);  color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--bg); color: var(--text-secondary); border: 1.5px solid var(--border); }
.btn-danger    { background: var(--danger); color: #fff; }
.btn-success   { background: var(--success); color: #fff; }

/* ── ADD FORM ───────────────────────────────────────────────────────────── */
.add-form {
  margin: 14px 16px 0;
  background: var(--surface);
  border-radius: var(--radius);
  border: 2px solid var(--primary);
  padding: 14px 14px 14px 16px;
  box-shadow: var(--shadow-md);
}

.add-form-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 10px;
}

.add-form-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ── TEXT INPUT ─────────────────────────────────────────────────────────── */
.input-text {
  flex: 1;
  min-width: 0;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input-text:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.input-text.error { border-color: var(--danger); animation: shake 0.3s; }

@keyframes shake {
  0%,100% { transform: translateX(0); }
  25%      { transform: translateX(-5px); }
  75%      { transform: translateX(5px); }
}

/* ── LIST ───────────────────────────────────────────────────────────────── */
.list-section {
  padding: 14px 16px 28px;
}

.list-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  padding-left: 2px;
}

.list-item {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  margin-bottom: 8px;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.list-item:last-child { margin-bottom: 0; }
.list-item.editing { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }

.list-item-row {
  display: flex;
  align-items: center;
  padding: 13px 12px 13px 16px;
  gap: 8px;
}

.list-item-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--bg);
  border-radius: 20px;
  padding: 2px 8px;
  flex-shrink: 0;
  min-width: 28px;
  text-align: center;
}

.list-item-name {
  flex: 1;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  word-break: break-word;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.badge-npc {
  font-size: 10px;
  background: var(--danger-light);
  color: var(--danger);
  border-radius: 20px;
  padding: 2px 8px;
  font-weight: 700;
  white-space: nowrap;
}

/* ── ICON BUTTONS ───────────────────────────────────────────────────────── */
.icon-btn {
  background: none;
  border: none;
  padding: 8px;
  border-radius: 8px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, color 0.12s;
  flex-shrink: 0;
}
.icon-btn:hover           { background: var(--bg); }
.icon-btn.danger:hover    { background: var(--danger-light); color: var(--danger); }
.icon-btn.primary:hover   { background: var(--primary-light); color: var(--primary); }

/* ── INLINE EDIT ROW ────────────────────────────────────────────────────── */
.edit-inline-row {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  background: var(--primary-light);
  border-top: 1px solid var(--border);
  align-items: center;
}

/* ── DELETE CONFIRM ROW ─────────────────────────────────────────────────── */
.delete-confirm-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--danger-light);
  border-top: 1px solid #FFCDD2;
  flex-wrap: wrap;
}

.delete-confirm-text {
  flex: 1;
  font-size: 13px;
  color: var(--danger);
  font-weight: 500;
  min-width: 120px;
}

/* ── EMPTY STATE ────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 32px;
  color: var(--text-secondary);
}
.empty-state-icon { font-size: 52px; margin-bottom: 16px; opacity: 0.45; }
.empty-state h3   { font-size: 16px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.empty-state p    { font-size: 13px; line-height: 1.7; }

/* ── NPC SCREEN ─────────────────────────────────────────────────────────── */
.screen-subtitle {
  padding: 14px 16px 8px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.npc-counter {
  margin: 0 16px 10px;
  background: var(--primary-light);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.npc-counter.has-selected {
  background: var(--danger-light);
  color: var(--danger);
}

.npc-item {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  padding: 12px 16px;
  gap: 12px;
  transition: border-color 0.15s, background 0.15s;
  user-select: none;
}
.npc-item:last-child { margin-bottom: 0; }
.npc-item.selected   { border-color: var(--danger); background: var(--danger-light); }

.npc-checkbox {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
  color: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.npc-item.selected .npc-checkbox {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.npc-name {
  font-size: 15px;
  font-weight: 500;
  flex: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  padding: 4px 0;
}
.npc-item.selected .npc-name { color: var(--danger); font-weight: 600; }

/* Badge año de congregación */
.npc-year-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 44px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}
.npc-year-badge:active { background: var(--primary-light); }
.nyb-year {
  font-size: 10px;
  color: var(--text-secondary);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.3px;
}
.nyb-count {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-secondary);
  line-height: 1.2;
}
.npc-year-badge.has-count .nyb-year  { color: var(--danger); }
.npc-year-badge.has-count .nyb-count { color: var(--danger); }

/* Pantalla ficha NPC */
.npc-ficha-form {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  padding: 16px;
  margin: 12px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.npc-ficha-form-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.npc-fecha-input { margin-top: 2px; }
.npc-ficha-form-btns {
  display: flex;
  gap: 8px;
}

/* Grupos de año en ficha */
.npc-year-group {
  margin: 8px 16px 4px;
}
.npc-year-group-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 6px 0 6px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.npc-registro-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.npc-registro-item:last-child { border-bottom: none; }
.npc-registro-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.npc-registro-fecha {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}
.npc-registro-motivo {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}

.npc-save-bar {
  padding: 14px 16px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* ── TOAST ──────────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #1A1A2E;
  color: #fff;
  padding: 11px 20px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 20px rgba(0,0,0,0.28);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 9999;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ── SAFE AREA (iOS notch) ──────────────────────────────────────────────── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .npc-save-bar        { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .asig-action-bar     { padding-bottom: calc(8px  + env(safe-area-inset-bottom)); }
  .asig-download-bar   { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
}

/* ── BADGE FECHA (última participación) ─────────────────────────────────── */
.badge-fecha {
  font-size: 10px;
  background: #E8F5E9;
  color: var(--success);
  border-radius: 20px;
  padding: 2px 8px;
  font-weight: 600;
  white-space: nowrap;
}

/* ── SELECCIONAR MES ────────────────────────────────────────────────────── */
.mes-section {
  padding: 16px 16px 4px;
}

.mes-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.mes-input {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
  background: var(--surface);
  outline: none;
  transition: border-color 0.15s;
}
.mes-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }

.mes-info {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 6px;
}

/* ── MODO TOGGLE ────────────────────────────────────────────────────────── */
.modo-section {
  padding: 14px 16px 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.modo-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.modo-toggle {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.modo-btn {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.15s;
}
.modo-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.modo-btn:hover:not(.active) { border-color: var(--primary); color: var(--primary); }

/* ── TABLA DE ASIGNACIONES ──────────────────────────────────────────────── */
.asig-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

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

.asig-th {
  background: var(--primary-light);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 10px 14px;
  text-align: left;
  white-space: nowrap;
}

.asig-table tbody tr { border-top: 1px solid var(--border); }
.asig-table tbody tr:hover { background: var(--bg); }

.asig-fecha  { padding: 11px 14px; white-space: nowrap; }
.asig-nombre { padding: 11px 14px; font-weight: 500; }

.dia-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}
.dia-jueves  { background: #E8EAF6; color: var(--primary); }
.dia-domingo { background: #FFF3E0; color: #E65100; }

.asig-vacio { color: var(--text-secondary); font-weight: 400; font-style: italic; }
.asig-conflicto { font-size: 0.72rem; color: #E65100; font-weight: 400; margin-top: 3px; }

/* ── BARRA DE ACCIONES ASIGNACIÓN ───────────────────────────────────────── */
.asig-action-bar {
  display: flex;
  gap: 10px;
  padding: 14px 16px 8px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.asig-download-bar {
  display: flex;
  gap: 10px;
  padding: 0 16px 14px;
  background: var(--surface);
  flex-shrink: 0;
}

.btn-download-pdf {
  flex: 1;
  justify-content: center;
  background: #C62828;
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  padding: 11px 10px;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-download-pdf:active { background: #B71C1C; }

.btn-download-xls {
  flex: 1;
  justify-content: center;
  background: #2E7D32;
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  padding: 11px 10px;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-download-xls:active { background: #1B5E20; }

/* ── PDF INLINE (en Seleccionar Mes) ────────────────────────────────────── */
.pdf-inline-section {
  margin: 12px 16px 4px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  background: var(--surface);
  overflow: hidden;
}
.pdf-inline-section.open {
  border-color: #FFD54F;
  background: #FFFDE7;
}
.pdf-inline-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
}
.pdf-inline-title {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.pdf-inline-load-btn {
  font-size: 12px;
  padding: 5px 12px;
  white-space: nowrap;
}
.pdf-saved-compact {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--success);
}

/* ── AVISOS ─────────────────────────────────────────────────────────────── */
.warn-banner {
  margin: 0 16px 8px;
  background: #FFF8E1;
  border: 1.5px solid #FFD54F;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  color: #E65100;
  font-weight: 500;
}

.saved-badge {
  margin: 0 16px 8px;
  background: var(--success-light, #E8F5E9);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--success);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── EXCLUSIONES INFO (Seleccionar Mes) ─────────────────────────────────── */
.excl-info {
  margin: 0 16px 8px;
  background: #F3E5F5;
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #6A1B9A;
}

/* ── PDF BADGE (lista Acomodadores) ─────────────────────────────────────── */
.badge-pdf-small {
  font-size: 10px;
  background: #FFF3E0;
  color: #E65100;
  border-radius: 20px;
  padding: 2px 8px;
  font-weight: 700;
  white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════
   PANTALLA: CARGAR PDF
══════════════════════════════════════════════════════════ */

/* Zona de carga inicial */
.pdf-drop-area {
  margin: 20px 16px;
  background: var(--surface);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.pdf-drop-icon {
  width: 56px;
  height: 56px;
  background: #FFF3E0;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #E65100;
  margin-bottom: 4px;
}

.pdf-drop-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.pdf-drop-sub {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.pdf-select-btn {
  margin-top: 6px;
  cursor: pointer;
}

/* Loading */
.pdf-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 24px;
  gap: 16px;
}

.pdf-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--primary-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.pdf-loading-text {
  font-size: 15px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Info bar tras carga */
.pdf-info-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #FFF3E0;
  border-bottom: 1px solid #FFE0B2;
  flex-wrap: wrap;
}

.pdf-filename {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: #E65100;
  display: flex;
  align-items: center;
  gap: 6px;
  word-break: break-all;
}

.pdf-pages {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* Sumario de detección */
.pdf-sumario {
  margin: 12px 16px 4px;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 500;
}
.pdf-sumario.detectado { background: #E8F5E9; color: var(--success); }
.pdf-sumario.vacio     { background: #E3F2FD; color: #1565C0; }

/* Badge "Detectado" en la lista de resultados */
.badge-pdf {
  font-size: 10px;
  background: #FFF3E0;
  color: #E65100;
  border-radius: 20px;
  padding: 2px 9px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── SELECTIVO DOMINGO ───────────────────────────────────────────────────── */
.sd-header {
  background: #5E35B1;
}

.sd-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.sd-item:last-child { border-bottom: none; }
.sd-item.selected { background: #EDE7F6; }
.sd-item:active { background: #EDE7F6; }

.sd-checkbox {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #5E35B1;
  transition: border-color 0.15s, background 0.15s;
}
.sd-item.selected .sd-checkbox {
  border-color: #5E35B1;
  background: #EDE7F6;
}

.sd-name {
  flex: 1;
  font-size: 15px;
  font-weight: 500;
}

.sd-badge {
  font-size: 10px;
  background: #EDE7F6;
  color: #5E35B1;
  border-radius: 20px;
  padding: 2px 9px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Badge en lista de acomodadores */
.badge-sd {
  font-size: 10px;
  background: #EDE7F6;
  color: #5E35B1;
  border-radius: 20px;
  padding: 2px 9px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.sd-counter {
  padding: 8px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.sd-counter.active {
  color: #5E35B1;
  font-weight: 600;
  background: #EDE7F6;
}

.sd-save-btn {
  background: #5E35B1;
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  padding: 13px 18px;
  width: 100%;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}
.sd-save-btn:active { background: #4527A0; }
