body:not(.signed-in) { --sidebar: 0px; }
.gate { max-width: 460px; margin: 9dvh auto 0; padding: 30px; background: var(--white); border: 1px solid var(--rule); border-radius: 14px; }
.gate img { margin-bottom: 20px; }
.gate h1 { font-size: 2.65rem; margin-bottom: 12px; }
.gate p { line-height: 1.5; margin-bottom: 16px; }
.signout { border: 1px solid transparent; border-radius: 7px; padding: 9px; background: transparent; }
.signout:hover { background: #eee5d4; }
.button.primary { background: var(--yellow); border-color: #e6b93a; }
.button.primary:hover { background: #f6c736; }
.action-list { display: grid; gap: 7px; }
.action-list button { text-align: left; }
.data-list { list-style: none; padding: 0; }
.data-list > li { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.data-list strong, .data-list small { display: block; }
.data-list small { margin-top: 4px; color: var(--muted); }
.filters { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.filters label, .field { display: grid; gap: 4px; font-weight: 650; }
.filters input, .form-preview textarea, .invite-url {
  min-height: 42px; padding: 8px 10px; border: 1px solid #a99d8f; border-radius: 7px; background: var(--white);
  font: inherit; color: var(--ink);
}
.form-preview textarea { min-height: 70px; resize: vertical; }
.form-preview label.check { display: flex; align-items: center; gap: 7px; }
.form-preview .check input { width: auto; min-height: auto; }
.form-preview .button { justify-self: start; }
.section-block { margin-top: 27px; }
.form-alert, .error-text { color: #8b291d; line-height: 1.4; }
.form-alert.active { display: block; margin-bottom: 12px; padding: 9px 12px; background: #fdf2f2; border: 1px solid #f8b4b4; border-radius: 6px; font-weight: 550; }
.auth-divider { display: flex; align-items: center; text-align: center; margin: 18px 0 14px; color: var(--muted); font-size: 0.85rem; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; border-bottom: 1px solid var(--rule); }
.auth-divider span { padding: 0 10px; }
.auth-card-info { background: #f4efe6; border: 1px solid var(--rule); border-radius: 8px; padding: 12px 14px; margin-bottom: 16px; }
.auth-hint { font-size: 0.78rem; color: var(--muted); margin-top: -2px; margin-bottom: 12px; }
.auth-subtitle { font-size: 0.92rem; margin-bottom: 12px; }
.auth-info-p { margin-bottom: 4px; }
.auth-email-p { margin-bottom: 4px; font-size: 1.05rem; color: var(--ink); }
.auth-role-small { color: var(--muted); }
.full-btn { width: 100%; justify-content: center; }
.full-btn-spaced { width: 100%; justify-content: center; margin-bottom: 6px; }
.sync-note { padding: 9px 12px; margin-bottom: 14px; border-radius: 7px; background: #fff1c3; color: #584009; }
#feedback { position: fixed; z-index: 7; right: 18px; bottom: 18px; max-width: min(400px, calc(100vw - 36px)); padding: 11px 14px; color: var(--ink); background: var(--yellow); border-radius: 9px; box-shadow: 0 4px 20px #261d2028; }
#pending-list .notice-link + .notice-link { margin-top: 6px; }
.notice-link { color: var(--ink); }
.event.external-block { border: 1px dashed #8c76b3; }
.event.status-propuesta { border: 1.5px dotted #d97706; background: #fffbeb; }
.event.status-pendiente_confirmacion { border: 1.5px dashed #2563eb; background: #eff6ff; }
.invite-url { width: 100%; margin-block: 9px; }

/* Selector visual de los 3 salones y Todos */
.room-selector-tabs { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding-block: 4px 14px; }
.room-tab {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--rule); background: var(--white); font-size: 0.88rem; font-weight: 550;
  color: var(--muted); cursor: pointer; transition: all var(--ease);
}
.room-tab:hover { border-color: #a99d8f; color: var(--ink); }
.room-tab.active, .room-tab[aria-pressed="true"] {
  background: var(--room-fill, var(--yellow)); color: var(--room-ink, var(--ink));
  border-color: var(--room-dot, #d4a520); font-weight: 700;
}
.room-tab::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--room-dot, #8a7f72); }
.room-tab[data-room=""]::before { background: #8a7f72; }

/* Timeline: columnas dedicadas cuando se filtra un solo salón */
.track.single-room { grid-template-columns: 1fr !important; }
.track.single-room :is(.event, .operating-hours) { grid-column: 1 !important; }

/* Huecos disponibles interactivos en la línea de tiempo */
.event.slot-available {
  border: 1.5px dashed var(--room-dot, #3148c4); background: var(--white);
  color: var(--room-ink, var(--ink)); cursor: pointer; transition: all var(--ease);
  box-shadow: 0 1px 3px #0000000a;
}
.event.slot-available:hover {
  background: var(--room-fill, #f0f3ff); border-style: solid;
  transform: translateY(-1px); box-shadow: 0 2px 6px #00000015;
}

/* Modal interactivo unificado de Inscripción y Clase Muestra */
dialog:has(.unified-booking-container) { width: min(720px, calc(100vw - 24px)); }
.unified-booking-container { display: flex; flex-direction: column; gap: 14px; }
.booking-mode-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: #ede6d9;
  padding: 4px; border-radius: 9px; margin-bottom: 2px;
}
.mode-tab {
  border: 0; padding: 9px 12px; border-radius: 7px; background: transparent;
  font-weight: 650; color: var(--muted); text-align: center; cursor: pointer;
  transition: all var(--ease);
}
.mode-tab.active { background: var(--white); color: var(--ink); box-shadow: 0 2px 6px #00000012; }
.booking-personal-fields { display: grid; gap: 10px; }
.booking-course-row { margin-bottom: 8px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.booking-teacher-room { font-size: 0.88rem; color: var(--muted); font-weight: 600; padding: 4px 8px; background: #f0f2f5; border-radius: 6px; }
.inquiry-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.room-teacher-subtitle { color: var(--muted); font-size: 0.9rem; margin-top: 2px; }
.hours-nav { margin-left: auto; }
.hours-week-label { font-weight: 600; padding: 0 4px; }
.hours-picker-card { margin-top: 14px; background: var(--white); }
.hours-picker-header { margin-bottom: 8px; }
.hours-hint { margin: 0; font-size: 0.88rem; color: var(--muted); }

/* Selector de disponibilidad y horarios interactivo */
.schedule-picker-section {
  border: 1px solid var(--rule); border-radius: 11px; padding: 14px;
  background: var(--paper); display: flex; flex-direction: column; gap: 12px;
}
.picker-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.picker-header h4 { margin: 0; font-family: Bricolage, sans-serif; font-size: 1.05rem; }
.week-nav { display: flex; align-items: center; gap: 6px; font-size: 0.88rem; font-weight: 600; }
.week-nav .icon-button { width: 32px; height: 32px; border: 1px solid var(--rule); background: var(--white); border-radius: 6px; }

.picker-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.picker-day-col {
  background: var(--white); border: 1px solid var(--rule); border-radius: 8px;
  padding: 8px; display: flex; flex-direction: column; gap: 6px;
}
.picker-day-col.closed { background: #f6f1e8; border-style: dashed; }
.picker-day-title {
  font-weight: 700; font-size: 0.82rem; text-align: center; padding-bottom: 4px;
  border-bottom: 1px solid var(--rule); color: var(--ink);
}
.picker-day-closed { font-size: 0.75rem; color: var(--muted); text-align: center; padding: 12px 4px; }
.picker-group-section, .picker-slots-section { display: flex; flex-direction: column; gap: 5px; }

.slot-btn {
  display: flex; flex-direction: column; align-items: flex-start; width: 100%;
  padding: 6px 8px; border-radius: 6px; border: 1px solid var(--rule);
  background: var(--white); font-size: 0.78rem; text-align: left; line-height: 1.15;
  transition: all var(--ease); cursor: pointer;
}
.slot-btn:hover:not(:disabled) { border-color: var(--blue); background: #f0f3ff; }
.slot-btn.selected { border-color: var(--blue); background: #e5ebff; outline: 2px solid var(--blue); }
.slot-btn.star-slot { border-color: #e5a700; background: #fff8e2; }
.slot-btn.star-slot:hover { background: #ffefa8; }
.slot-btn.star-slot.selected { outline: 2px solid #b8860b; background: #ffe694; }
.slot-btn .star-icon { color: #b8860b; font-weight: bold; margin-right: 2px; }
.slot-btn.disabled { opacity: 0.55; cursor: not-allowed; background: #f7f4ee; border-color: #e9e3d8; color: var(--muted); }
.slot-btn.slot-occupied {
  background: #fdf3e7;
  border-color: #f0cca4;
  color: #7c4308;
  cursor: pointer;
}
.slot-btn.slot-occupied:hover {
  background: #fde8d0;
  border-color: #e09855;
}
.slot-btn.slot-outside {
  background: #f8f6f0;
  border-color: #e6e2d6;
  color: var(--muted);
  cursor: pointer;
}
.slot-btn.slot-outside:hover {
  background: #efebe0;
}
.slot-subtext { font-size: 0.68rem; color: var(--muted); margin-top: 2px; }

/* Tabla y tarjetas de Directorio de Alumnos y Prospectos */
.directory-filter-bar {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px;
}
.directory-filter-bar label {
  display: flex; flex-direction: column; gap: 4px; font-size: 0.82rem; font-weight: 600; color: var(--ink);
}
.directory-filter-bar input, .directory-filter-bar select {
  padding: 8px 10px; border: 1px solid var(--rule); border-radius: 6px; font-size: 0.86rem; background: var(--white);
}
.directory-table-wrapper {
  overflow-x: auto; background: var(--white); border: 1px solid var(--rule); border-radius: 9px;
}
.directory-table {
  width: 100%; border-collapse: collapse; font-size: 0.84rem; text-align: left;
}
.directory-table th {
  background: #faf7f2; padding: 10px 12px; font-weight: 700; color: var(--ink); border-bottom: 1px solid var(--rule); white-space: nowrap;
}
.directory-table td {
  padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; color: var(--ink);
}
.directory-table tr:hover td {
  background: #faf9f6;
}
.badge-type {
  display: inline-block; padding: 2px 7px; border-radius: 4px; font-size: 0.74rem; font-weight: 700; white-space: nowrap;
}
.badge-student { background: #e0f2fe; color: #0369a1; }
.badge-prospect { background: #fef3c7; color: #92400e; }
.badge-status {
  display: inline-block; padding: 2px 7px; border-radius: 4px; font-size: 0.74rem; font-weight: 600; white-space: nowrap;
}
.badge-status-activo { background: #dcfce7; color: #15803d; }
.badge-status-muestra_agendada { background: #fef08a; color: #854d0e; }
.badge-status-nuevo { background: #e0e7ff; color: #3730a3; }
.badge-status-en_seguimiento { background: #ffedd5; color: #9a3412; }
.badge-status-inscrito { background: #d1fae5; color: #065f46; }
.badge-status-descartado, .badge-status-baja { background: #fee2e2; color: #991b1b; }
.cell-note {
  max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted);
}
.cell-actions {
  display: flex; gap: 6px; flex-wrap: wrap; white-space: nowrap;
}
.cell-actions .button {
  padding: 4px 8px; font-size: 0.78rem;
}

/* Ficha de detalle de horario ocupado */
.slot-detail-card {
  display: flex; flex-direction: column; gap: 12px; font-size: 0.9rem;
}
.slot-detail-header {
  border-bottom: 1px solid var(--rule); padding-bottom: 8px;
}
.slot-detail-header h3 { margin: 0 0 4px; font-size: 1.15rem; }
.slot-detail-header p { margin: 0; color: var(--muted); }
.slot-detail-section {
  display: flex; flex-direction: column; gap: 6px;
}
.slot-detail-section h4 { margin: 0; font-size: 0.95rem; font-family: Bricolage, sans-serif; color: var(--ink); }
.slot-banner-warning {
  background: #fff8e6; border: 1px solid #ffd685; padding: 10px 12px; border-radius: 6px; color: #734500; font-size: 0.88rem;
}
.slot-banner-alert {
  background: #fee; border: 1px solid #fcc; padding: 10px 12px; border-radius: 6px; color: #900; font-size: 0.88rem;
}
.participant-item {
  background: #fdfbf7; border: 1px solid var(--rule); border-radius: 6px; padding: 8px 10px;
  display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap;
}
.dossier-section {
  border: 1px solid var(--rule); border-radius: 8px; padding: 12px; background: var(--white);
  display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px;
}
.dossier-section h4 {
  margin: 0; font-size: 0.95rem; font-family: Bricolage, sans-serif; border-bottom: 1px solid var(--rule);
  padding-bottom: 4px; color: var(--ink);
}
.dossier-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; font-size: 0.86rem;
}
.dossier-field {
  display: flex; flex-direction: column; gap: 2px;
}
.dossier-field-label {
  font-size: 0.74rem; font-weight: 700; color: var(--muted); text-transform: uppercase;
}
.dossier-field-value {
  color: var(--ink); font-weight: 500;
}
.dossier-notes-text {
  background: #faf8f5; border: 1px solid var(--rule); border-radius: 6px; padding: 8px 10px;
  white-space: pre-wrap; font-family: inherit; font-size: 0.85rem; margin: 4px 0 0; color: var(--ink);
}

.selected-slot-banner {
  padding: 10px 12px; border-radius: 8px; background: #fff3ce; border: 1px solid #ebd38f;
  font-size: 0.88rem; color: #4f3b04; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.selected-slot-banner strong { color: #382902; }

/* Tarjeta de Administración de Google Calendar */
.calendar-admin-card {
  background: var(--white); border: 1px solid var(--rule); border-radius: 9px;
  padding: 16px; display: flex; flex-direction: column; gap: 10px;
}
.status-badge { display: inline-block; padding: 3px 8px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; }
.status-badge.success { background: #e3f7e6; color: #176829; }
.status-badge.warning { background: #fef1d2; color: #8c5b00; }

@media (max-width: 699px) {
  .topbar-end { gap: 5px; }
  .notifications { right: 12px; }
  .gate { margin-top: 28px; padding: 22px; }
  .directory-filter-bar { flex-direction: column; align-items: stretch; }
  .directory-table th, .directory-table td { padding: 8px 6px; font-size: 0.78rem; }
}
