/* ====================================================================
   CALENDARIO CTO 2026 L1 - ESTILOS OFICIALES PARA IPHONE (PWA)
   ==================================================================== */

:root {
  --primary: #0284C7;
  --primary-hover: #0369A1;
  --primary-light: rgba(2, 132, 199, 0.12);
  --primary-container: #E0F2FE;
  --on-primary-container: #0369A1;

  --surface: #FFFFFF;
  --surface-dim: #F8FAFC;
  --surface-variant: #F1F5F9;
  --surface-card: #FFFFFF;
  --border: #E2E8F0;
  --border-subtle: #F1F5F9;

  --text-main: #0F172A;
  --text-muted: #64748B;
  --text-subtle: #94A3B8;

  --metro-red: #DC2626;
  --metro-yellow: #D97706;
  --metro-green: #16A34A;
  --metro-night: #7C3AED;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.12);

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--surface-dim);
  color: var(--text-main);
  min-height: 100vh;
  min-height: -webkit-fill-available;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  user-select: none;
  -webkit-user-select: none;
}

/* ================= CONTENEDOR PRINCIPAL ================= */
.app-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
  background-color: var(--surface);
  min-height: 100vh;
  box-shadow: 0 0 30px rgba(0,0,0,0.04);
  position: relative;
}

/* ================= VISTAS / PANTALLAS ================= */
.screen {
  display: none;
  flex-direction: column;
  flex: 1;
  animation: fadeIn 0.25s ease-out;
}

.screen.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ================= PANTALLA LOGIN ================= */
.login-screen {
  padding: calc(var(--safe-top) + 32px) 24px calc(var(--safe-bottom) + 32px);
  justify-content: center;
  align-items: center;
  text-align: center;
  background: linear-gradient(180deg, #F0F9FF 0%, #FFFFFF 60%);
  min-height: 100vh;
}

.logo-badge {
  width: 84px;
  height: 84px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  margin-bottom: 20px;
  position: relative;
}

.logo-badge svg {
  width: 48px;
  height: 48px;
  fill: #FFFFFF;
}

.logo-l1 {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--metro-red);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  border: 2px solid #FFFFFF;
}

.login-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.login-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.form-group {
  width: 100%;
  margin-bottom: 18px;
  text-align: left;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  height: 52px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  padding: 0 16px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-main);
  background-color: #FFFFFF;
  transition: all 0.2s ease;
  outline: none;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
}

.btn-primary {
  width: 100%;
  height: 52px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.btn-primary:active {
  transform: scale(0.98);
}

/* ================= PANTALLA SHAREPOINT SETUP ================= */
.sharepoint-screen {
  padding: calc(var(--safe-top) + 24px) 20px calc(var(--safe-bottom) + 24px);
  text-align: center;
}

.setup-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  text-align: left;
}

.setup-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ================= TOP APP BAR ================= */
.top-bar {
  padding: calc(var(--safe-top) + 12px) 16px 12px;
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 40;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar,
.user-avatar-metro {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #D1E4FF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.user-avatar-metro svg {
  width: 20px;
  height: 20px;
  fill: #0061A4;
}

.user-avatar:active,
.user-avatar-metro:active {
  transform: scale(0.95);
}

.top-bar-title h1 {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.3px;
}

.top-bar-title p {
  font-size: 12px;
  color: var(--text-muted);
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface-variant);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  cursor: pointer;
  transition: background 0.15s ease;
}

.icon-btn:active {
  background: var(--border);
}

/* ================= SELECTOR DE FECHAS (ESTILO ANDROID DateSelectorBar) ================= */
.date-selector-card {
  margin: 8px 16px;
  background: rgba(223, 226, 235, 0.5);
  border-radius: 20px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.date-selector-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.date-circle-nav-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #FFFFFF;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0061A4;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: transform 0.12s ease;
}

.date-circle-nav-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.date-circle-nav-btn:active {
  transform: scale(0.92);
}

.date-display-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  cursor: pointer;
  padding: 2px 8px;
}

.date-dia-semana {
  font-size: 16px;
  font-weight: 700;
  color: #0061A4;
  text-transform: capitalize;
  line-height: 1.2;
}

.date-dia-mes-ano {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
  margin-top: 2px;
  line-height: 1.2;
}

.date-selector-bottom-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-chip-today {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  border-radius: 12px;
  background: #D1E4FF;
  color: #001D36;
  border: none;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.12s;
  flex-shrink: 0;
}

.btn-chip-today svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.btn-chip-today.is-today {
  background: #0061A4;
  color: #FFFFFF;
}

.btn-chip-today:active {
  transform: scale(0.95);
}

.capsule-eventos {
  flex: 1;
  height: 34px;
  border-radius: 12px;
  background: rgba(230, 235, 243, 0.6);
  border: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  min-width: 0;
}

.capsule-eventos:active {
  transform: scale(0.98);
}

.capsule-evento-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.capsule-evento-icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

#label-evento-dia {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
  font-size: 11.5px;
}

.capsule-evento-arrow {
  width: 14px;
  height: 14px;
  fill: currentColor;
  opacity: 0.7;
  flex-shrink: 0;
}

.capsule-eventos.is-empty .capsule-evento-arrow {
  display: none;
}

/* Estados temáticos de la cápsula de evento idénticos a Android */
.capsule-eventos.has-evento-musica {
  background: rgba(234, 221, 255, 0.85);
  border-color: rgba(103, 80, 164, 0.45);
  color: #6750A4;
}

.capsule-eventos.has-evento-deporte {
  background: rgba(249, 222, 220, 0.85);
  border-color: rgba(179, 38, 30, 0.45);
  color: #B3261E;
}

.capsule-eventos.has-evento-alerta {
  background: rgba(255, 224, 178, 0.85);
  border-color: rgba(230, 81, 0, 0.45);
  color: #E65100;
}

.capsule-eventos.has-evento-general {
  background: rgba(204, 232, 222, 0.85);
  border-color: rgba(0, 108, 80, 0.45);
  color: #006C50;
}

/* ================= FRANJA TABS (ESTILO ANDROID FranjaTabBar) ================= */
.franja-tabs {
  display: flex;
  padding: 6px 16px;
  background-color: transparent;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.franja-tabs::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  padding: 7px 14px;
  border-radius: 16px;
  background: rgba(223, 226, 235, 0.5);
  border: none;
  color: #43474E;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.tab-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 12px;
  background: #FFFFFF;
  color: #43474E;
}

/* Colores de pestañas activas según franja (idéntico a FranjaTabBar.kt) */
.tab-btn[data-franja="TODAS"].active {
  background: #0061A4;
  color: #FFFFFF;
}
.tab-btn[data-franja="TODAS"].active .tab-badge {
  background: #D1E4FF;
  color: #001D36;
}

.tab-btn[data-franja="MAÑANA"].active {
  background: #D97706;
  color: #FFFFFF;
}
.tab-btn[data-franja="MAÑANA"].active .tab-badge {
  background: #FEF3C7;
  color: #92400E;
}

.tab-btn[data-franja="TARDE"].active {
  background: #0284C7;
  color: #FFFFFF;
}
.tab-btn[data-franja="TARDE"].active .tab-badge {
  background: #E0F2FE;
  color: #075985;
}

.tab-btn[data-franja="NOCHE"].active {
  background: #7C3AED;
  color: #FFFFFF;
}
.tab-btn[data-franja="NOCHE"].active .tab-badge {
  background: #EDE9FE;
  color: #4C1D95;
}

/* ================= BARRA DE BÚSQUEDA ================= */
.search-bar {
  padding: 6px 16px 10px;
}

.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: #5A6B82;
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 44px;
  border-radius: 14px;
  border: 1.5px solid rgba(223, 226, 235, 0.7);
  background: #FFFFFF;
  padding: 0 16px 0 42px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input::placeholder {
  color: #76777A;
}

.search-input:focus {
  border-color: #0061A4;
  box-shadow: 0 0 0 3px rgba(0, 97, 164, 0.15);
}

/* ================= SERVICIO CARD (RÉPLICA EXACTA DE ANDROID ServicioCard.kt) ================= */
.services-list {
  flex: 1;
  padding: 6px 16px calc(var(--safe-bottom) + 24px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.service-card {
  background: #FFFFFF;
  border-radius: 18px;
  border: 1px solid rgba(223, 226, 235, 0.7);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.service-card:active {
  transform: scale(0.985);
}

/* Si el servicio tiene nota: remarcado en dorado ámbar (#F6C768) */
.service-card.has-note {
  border: 1.5px solid #F6C768;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.12);
}

.service-card.is-refuerzo {
  background: #FAF5FF;
  border-color: rgba(168, 85, 247, 0.4);
}

.service-card-left {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}

/* 1. Recuadro de Servicio (Izquierda) */
.service-badge-outer {
  border-radius: 14px;
  padding: 3px;
  border-width: 1.5px;
  border-style: solid;
  margin-right: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.service-badge-inner {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.3px;
  box-sizing: border-box;
  overflow: hidden;
}

/* 2. Información Central (Empleado y Matrícula + Turno) */
.service-card-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  min-width: 0;
}

.service-card-nombre {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.service-card-meta {
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.service-card-matricula {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: #5A6B82;
  white-space: nowrap;
}

.icon-badge {
  width: 15px;
  height: 15px;
  fill: #5A6B82;
  flex-shrink: 0;
}

.service-chip-letra {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: #FFFFFF;
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 7px;
  line-height: 1.2;
  flex-shrink: 0;
}

.service-chip-refuerzo {
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  background-color: #7C3AED;
  color: #FFFFFF;
  font-size: 10.5px;
  font-weight: 700;
  padding: 1.5px 6px;
  line-height: 1.2;
  white-space: nowrap;
}

.service-chip-linea {
  display: inline-flex;
  align-items: center;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 800;
  padding: 1.5px 5px;
  line-height: 1.2;
  flex-shrink: 0;
}

.service-chip-linea-externa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
  padding: 1.5px 8px;
  line-height: 1.2;
  flex-shrink: 0;
}

.service-chip-ext {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background-color: #64748B;
  color: #FFFFFF;
  font-size: 10.5px;
  font-weight: 700;
  padding: 1.5px 5px;
  line-height: 1.2;
  flex-shrink: 0;
}

.service-chip-cubre-noche {
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  background: rgba(124, 58, 237, 0.12);
  color: #7C3AED;
  border: 1px solid rgba(124, 58, 237, 0.35);
  font-size: 11px;
  font-weight: 700;
  padding: 1.5px 7px;
  line-height: 1.2;
  white-space: nowrap;
}

/* 3. Indicador de Nota con (i) a la derecha */
.service-card-nota-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #FDEFD5;
  border: 1px solid rgba(246, 199, 104, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: 8px;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.service-card-nota-btn svg {
  width: 22px;
  height: 22px;
  fill: #E67E22;
}

.service-card-nota-btn:active {
  transform: scale(0.92);
}

/* ================= MODAL BOTTOM SHEET ================= */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 100;
  display: none;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.2s ease-out;
}

.modal-overlay.active {
  display: flex;
}

.bottom-sheet {
  background: var(--surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%;
  max-width: 600px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  padding: 12px 20px calc(var(--safe-bottom) + 20px);
  animation: slideUp 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-lg);
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.sheet-drag-handle {
  width: 44px;
  height: 4px;
  border-radius: var(--radius-full);
  background: var(--border);
  margin: 0 auto 16px;
}

.sheet-header-card {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.12) 0%, rgba(3, 105, 161, 0.05) 100%);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.diff-card {
  background: var(--surface-variant);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 10px;
}

.diff-card-header {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.diff-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.diff-pill-prev {
  flex: 1;
  padding: 8px;
  border-radius: var(--radius-sm);
  background: #FFFFFF;
  border: 1px solid var(--border);
  text-align: center;
  text-decoration: line-through;
  font-weight: 700;
  color: var(--text-muted);
}

.diff-arrow {
  font-size: 18px;
  color: var(--primary);
  font-weight: 900;
}

.diff-pill-new {
  flex: 1.3;
  padding: 8px;
  border-radius: var(--radius-sm);
  text-align: center;
  font-weight: 900;
}

/* ================= BANNER IPHONE INSTALL ================= */
.iphone-install-banner {
  background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
  color: #FFFFFF;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  margin: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: var(--shadow-md);
}

.iphone-install-banner p {
  font-size: 13px;
  font-weight: 600;
}

.btn-install-tip {
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

/* ================= MENÚ DESPLEGABLE TOPBAR ================= */
.dropdown-menu {
  position: absolute;
  top: 40px;
  right: 0;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 240px;
  padding: 6px 0;
  z-index: 100;
  animation: fadeIn 0.15s ease-out;
}

.dropdown-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: none;
  border: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease;
}

.dropdown-item:hover, .dropdown-item:active {
  background: var(--surface-variant);
}

.dropdown-item svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex-shrink: 0;
  color: var(--text-muted);
}

/* ================= PANTALLA DE GESTIÓN DE PERSONAL (ESTILO ANDROID) ================= */
.empleados-screen {
  background: #F8F9FA;
  flex: 1;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  display: none;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.empleados-screen.active {
  display: flex;
}

.empleados-screen .top-bar {
  padding: calc(var(--safe-top) + 10px) 16px 10px;
  background-color: #FFFFFF;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 40;
}

.empleados-screen .top-bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.empleados-screen .top-bar .icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1C1B1F;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.empleados-screen .top-bar .icon-btn:active {
  background: rgba(0, 0, 0, 0.06);
}

.empleados-screen .top-bar-left .icon-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.empleados-screen .top-bar-title-clean {
  font-size: 19px;
  font-weight: 800;
  color: #1C1B1F;
  letter-spacing: -0.3px;
  margin: 0;
}

.empleados-screen .top-bar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.empleados-screen .top-bar-actions .icon-btn {
  color: var(--primary, #0284C7);
}

.empleados-screen .top-bar-actions .icon-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* Buscador de Empleados estilo Android OutlinedTextField */
.search-container-clean {
  padding: 8px 16px 8px;
}

.search-bar-clean {
  display: flex;
  align-items: center;
  background: #FFFFFF;
  border: 1px solid rgba(121, 116, 126, 0.4);
  border-radius: 14px;
  padding: 0 14px;
  height: 50px;
  box-shadow: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-bar-clean:focus-within {
  border-color: var(--primary, #0284C7);
  border-width: 2px;
  padding: 0 13px;
}

.search-icon-clean {
  width: 22px;
  height: 22px;
  color: #79747E;
  margin-right: 12px;
  flex-shrink: 0;
}

.search-input-clean {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 15.5px;
  color: #1C1B1F;
  outline: none;
  font-family: inherit;
}

.search-input-clean::placeholder {
  color: #79747E;
}

.search-clear-btn {
  background: transparent;
  border: none;
  color: #79747E;
  padding: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-clear-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Contenedor fijado para la ficha del empleado registrado (parte superior inmóvil) */
.empleado-fijado-wrapper {
  padding: 0 16px 8px;
  flex-shrink: 0;
  z-index: 25;
  background-color: #F8F9FA;
}

/* Lista de Empleados idéntica a LazyColumn de Android */
.empleados-list-cards {
  padding: 8px 16px 85px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Tarjeta individual de empleado idéntica a EmpleadoSwipeItem de Android */
.emp-card-android {
  background: #FFFFFF;
  border-radius: 16px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.04);
  cursor: pointer;
  transition: transform 0.12s ease, background-color 0.12s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Ficha del empleado registrado con color ligero distintivo */
.emp-card-android.emp-card-registrado {
  background: linear-gradient(135deg, #F0F7FF 0%, #E0F2FE 100%) !important;
  border: 1.5px solid #BAE6FD !important;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.15) !important;
}

.emp-card-android.emp-card-registrado:active {
  background: #E0F2FE !important;
}

.emp-card-android.emp-card-registrado .emp-card-nombre {
  color: #0369A1;
  font-weight: 700;
}

.emp-card-android:active {
  transform: scale(0.985);
  background-color: #F4F6F9;
}

.emp-card-left {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  gap: 14px;
}

/* Badge cuadrado de 48px con esquinas de 12px idéntico a Android Surface */
.emp-card-badge,
.emp-badge-square {
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  max-width: 48px !important;
  min-height: 48px !important;
  max-height: 48px !important;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  flex-shrink: 0 !important;
}

.badge-turno-noche {
  background-color: #FFD8E4 !important;
  color: #630B33 !important;
}

.badge-turno-tarde {
  background-color: #D1E4FF !important;
  color: #00325B !important;
}

.badge-turno-manana {
  background-color: #E8DEF8 !important;
  color: #381E72 !important;
}

.badge-turno-default {
  background-color: #E0E2EC !important;
  color: #44474F !important;
}

.emp-card-content,
.emp-card-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.emp-card-nombre,
.emp-card-name {
  font-size: 15.5px;
  font-weight: 600;
  color: #1C1B1F;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.emp-card-meta,
.emp-card-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  font-size: 12.5px;
}

.emp-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #49454F;
  font-weight: 500;
}

.emp-meta-item svg {
  width: 13px !important;
  height: 13px !important;
  min-width: 13px !important;
  min-height: 13px !important;
  fill: currentColor;
  flex-shrink: 0 !important;
  color: #49454F;
}

.emp-meta-item.meta-phone,
.emp-meta-item.is-phone {
  color: var(--primary, #0284C7);
  font-weight: 600;
}

.emp-meta-item.meta-phone svg,
.emp-meta-item.is-phone svg {
  width: 12px !important;
  height: 12px !important;
  min-width: 12px !important;
  min-height: 12px !important;
  color: var(--primary, #0284C7);
}

/* Indicador de flecha chevron idéntico a Android ArrowForwardIos (estricto 14px) */
.emp-card-chevron,
.emp-chevron-arrow {
  width: 14px !important;
  height: 14px !important;
  min-width: 14px !important;
  max-width: 14px !important;
  min-height: 14px !important;
  max-height: 14px !important;
  color: rgba(121, 116, 126, 0.45) !important;
  flex-shrink: 0 !important;
  margin-left: 8px;
}

/* Floating Action Button (FAB) azul idéntico a Android FloatingActionButton */
.fab-btn {
  position: fixed;
  bottom: 24px;
  right: max(20px, calc(50% - 280px));
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background-color: var(--primary, #005FB8);
  color: #FFFFFF;
  border: none;
  box-shadow: 0 4px 14px rgba(0, 95, 184, 0.35);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 30;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.empleados-screen.active ~ .fab-btn,
.empleados-screen.active .fab-btn {
  display: flex;
}

.fab-btn:active {
  transform: scale(0.92);
}

.fab-btn svg {
  width: 24px !important;
  height: 24px !important;
  fill: currentColor;
}

/* ================= MODAL DETALLE DE EVENTOS DEL DÍA (ESTILO ANDROID) ================= */
.evento-sheet {
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  padding: 12px 20px 24px;
  border-radius: 28px 28px 0 0;
}

.evento-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.evento-sheet-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.evento-sheet-icon-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.evento-sheet-icon-circle svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.evento-sheet-title {
  font-size: 17px;
  font-weight: 800;
  color: #1C1B1F;
  margin: 0;
}

.evento-sheet-date {
  font-size: 12px;
  color: #79747E;
  margin: 2px 0 0;
}

.evento-sheet-body {
  padding: 14px 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 55vh;
}

.evento-card-block {
  background: rgba(230, 235, 243, 0.5);
  border-radius: 14px;
  padding: 14px;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.evento-chips-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.evento-chip-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(0, 95, 184, 0.12);
  color: var(--primary);
  font-size: 11.5px;
  font-weight: 700;
}

.evento-chip-pill svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

.evento-card-text {
  font-size: 14px;
  line-height: 1.45;
  color: #1C1B1F;
  white-space: pre-line;
}

.evento-sheet-footer {
  padding-top: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.evento-sheet-fuente {
  font-size: 11.5px;
  color: #79747E;
  text-align: center;
  margin: 0;
}

/* ================= MODAL DETALLE DE EMPLEADO (IDÉNTICO A EmpleadoDetailSheet) ================= */
.employee-sheet-android {
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  padding: 8px 16px 24px;
  border-radius: 28px 28px 0 0;
}

.emp-view-container {
  display: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.emp-view-container.active {
  display: block;
}

/* Hero Bar con Calculadora, Avatar central con badge y Calendario */
.emp-hero-bar {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 8px 0 12px;
}

.emp-hero-icon-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  cursor: pointer;
  transition: background 0.15s ease;
}

.emp-hero-icon-btn:active {
  background: rgba(0, 95, 184, 0.08);
}

.emp-hero-icon-btn svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.emp-avatar-wrapper {
  position: relative;
  width: 92px;
  height: 92px;
}

.emp-avatar-circle {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #E8DEF8;
  font-size: 30px;
  font-weight: 800;
  color: #381E72;
}

.emp-avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.emp-avatar-badge-circle {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: #FFFFFF;
  border: 2px solid #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.emp-detail-name {
  font-size: 21px;
  font-weight: 800;
  color: #1C1B1F;
  text-align: center;
  margin: 4px 0 0;
  letter-spacing: -0.2px;
}

.emp-chip-wrap {
  display: flex;
  justify-content: center;
  margin: 6px 0 16px;
}

.emp-turno-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
}

.emp-train-icon {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

/* Tarjeta redondeada con 3 Filas de contacto (Huella, Teléfono, Email) */
.emp-info-card {
  background: rgba(227, 230, 236, 0.5);
  border-radius: 18px;
  padding: 14px 16px;
  margin-bottom: 16px;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.emp-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
}

.emp-info-row-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.emp-info-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #D1E4FF;
  color: #00325B;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.emp-info-icon-box svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.emp-info-label {
  font-size: 11px;
  color: #79747E;
  margin-bottom: 2px;
}

.emp-info-value {
  font-size: 15px;
  font-weight: 800;
  color: #1C1B1F;
}

.emp-info-action-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  cursor: pointer;
  text-decoration: none;
}

.emp-info-action-btn:active {
  background: rgba(0, 95, 184, 0.1);
}

.emp-info-action-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.emp-info-actions-right {
  display: flex;
  align-items: center;
  gap: 2px;
}

.emp-info-divider {
  height: 1px;
  background: rgba(0, 0, 0, 0.06);
  margin: 10px 0;
}

/* Sección Desplegable Cómputo Anual */
.emp-computo-collapse {
  margin-bottom: 16px;
  animation: fadeIn 0.2s ease-out;
}

.emp-computo-card {
  background: rgba(227, 230, 236, 0.5);
  border-radius: 18px;
  padding: 14px 16px;
}

.emp-computo-header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-size: 13.5px;
  font-weight: 800;
  margin-bottom: 12px;
}

.emp-computo-header svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.emp-computo-items {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.emp-computo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.08);
}

.emp-computo-row:last-child {
  border-bottom: none;
}

.emp-computo-row-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.emp-computo-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  width: 38px;
  height: 20px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
  flex-shrink: 0;
  box-sizing: border-box;
}

.emp-computo-badge-empty {
  min-width: 38px;
  width: 38px;
  height: 20px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
  box-sizing: border-box;
}

.emp-computo-nombre {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-main, #1C1B1F);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.emp-computo-valor-destacado {
  background: rgba(103, 80, 164, 0.12);
  color: #21005D;
  font-size: 13px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  min-width: 24px;
  text-align: center;
}

.emp-computo-valor-muted {
  background: rgba(0, 0, 0, 0.05);
  color: #79747E;
  font-size: 13px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  min-width: 24px;
  text-align: center;
}


/* Botones de Acción Inferiores: Eliminar y Editar */
.emp-footer-actions {
  display: flex;
  gap: 12px;
  margin-top: 6px;
}

.btn-emp-delete {
  flex: 1;
  height: 44px;
  border-radius: 12px;
  border: 1px solid #B3261E;
  background: #FFFFFF;
  color: #B3261E;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-emp-delete:active {
  background: rgba(179, 38, 30, 0.08);
}

.btn-emp-delete svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.btn-emp-edit {
  flex: 1;
  height: 44px;
  border-radius: 12px;
  border: none;
  background: var(--primary);
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-emp-edit:active {
  transform: scale(0.98);
  opacity: 0.9;
}

.btn-emp-edit svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* ================= VISTA CALENDARIO PERSONAL (IDÉNTICO A EmpleadoCalendarioView) ================= */
.cal-personal-view {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.cal-top-bar-android {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 0 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  margin-bottom: 8px;
}

.cal-back-btn {
  background: transparent;
  border: none;
  color: #0284C7;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease;
}

.cal-back-btn:hover {
  background: rgba(2, 132, 199, 0.08);
}

.cal-back-btn svg {
  width: 22px;
  height: 22px;
}

.cal-topbar-title {
  font-size: 16px;
  font-weight: 700;
  color: #0F172A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.cal-personal-scroll-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 24px;
}

/* 1. Hero: Año y Badge de Turno */
.cal-header-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 2px;
}

.cal-hero-year-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cal-hero-calendar-icon {
  width: 24px;
  height: 24px;
  color: #0284C7;
}

.cal-hero-year {
  font-size: 26px;
  font-weight: 900;
  color: #0F172A;
  letter-spacing: 0.5px;
  line-height: 1;
}

.cal-hero-subtitle {
  font-size: 11.5px;
  color: #64748B;
  font-weight: 500;
  margin-top: 2px;
}

.cal-turno-pill {
  background: #E0F2FE;
  border-radius: 12px;
  padding: 5px 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.cal-turno-pill-label {
  font-size: 12px;
  color: #0369A1;
  font-weight: 500;
}

.cal-turno-pill-val {
  font-size: 14.5px;
  font-weight: 800;
  color: #0369A1;
}

/* 2. Chips Horizontales de Meses */
.cal-month-chips-scroll {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 0 6px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.cal-month-chips-scroll::-webkit-scrollbar {
  display: none;
}

.cal-month-chip {
  flex: 0 0 auto;
  height: 32px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid #CBD5E1;
  background: #FFFFFF;
  color: #334155;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  user-select: none;
}

.cal-month-chip.active {
  background: #0284C7;
  color: #FFFFFF;
  font-weight: 700;
  border-color: #0284C7;
  box-shadow: 0 2px 4px rgba(2, 132, 199, 0.25);
}

/* 3. Barra de Navegación del Mes Activo */
.cal-nav-card {
  background: rgba(241, 245, 249, 0.85);
  border-radius: 14px;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #E2E8F0;
}

.cal-nav-arrow-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #334155;
  cursor: pointer;
  transition: background 0.15s ease;
}

.cal-nav-arrow-btn:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.05);
}

.cal-nav-arrow-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

.cal-nav-arrow-btn svg {
  width: 22px;
  height: 22px;
}

.cal-nav-title {
  font-size: 14.5px;
  font-weight: 800;
  color: #334155;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* 4. Tarjeta Cuadrada del Mes (MesCuadradoCard) */
.mes-cuadrado-card {
  background: #FFFFFF;
  border-radius: 12px;
  border: 1px solid rgba(30, 41, 59, 0.35);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.mes-card-header {
  background-color: #BAC8D3;
  padding: 7px 0;
  text-align: center;
}

.mes-card-header span {
  font-size: 14.5px;
  font-weight: 900;
  color: #1A202C;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  display: block;
}

.mes-dias-semana-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background-color: #F1F5F9;
  border-top: 1px solid rgba(30, 41, 59, 0.2);
  border-bottom: 1px solid rgba(30, 41, 59, 0.2);
  text-align: center;
  padding: 4px 0;
}

.mes-dias-semana-row span {
  font-size: 11px;
  font-weight: 700;
  color: #334155;
}

.mes-grid-celdas {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background-color: #FFFFFF;
}

.mes-celda {
  height: 52px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  border-right: 0.5px solid #CBD5E1;
  border-bottom: 0.5px solid #CBD5E1;
  position: relative;
  background: #FFFFFF;
  user-select: none;
  transition: box-shadow 0.1s ease;
}

.mes-celda:nth-child(7n) {
  border-right: none;
}

.mes-celda.is-outside {
  background-color: #F8FAFC;
  cursor: default;
}

.mes-celda.is-day {
  cursor: pointer;
}

.mes-celda.is-today {
  box-shadow: inset 0 0 0 1.5px rgba(2, 132, 199, 0.85);
  z-index: 1;
}

.mes-celda.is-selected {
  box-shadow: inset 0 0 0 2px #0284C7 !important;
  z-index: 2;
}

.mes-dia-num-box {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  width: 100%;
  padding-top: 2px;
  box-sizing: border-box;
}

.mes-dia-num {
  font-size: 11px;
  font-weight: 600;
  color: #1E293B;
  line-height: 1;
}

.mes-dia-num-today {
  background: #0284C7;
  color: #FFFFFF;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.mes-dia-srv-box {
  width: 100%;
  height: 26px;
  line-height: 26px;
  text-align: center;
  font-size: 10.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  box-sizing: border-box;
}

/* 5. Banner / Detalle del Día Seleccionado */
.cal-dia-detalle-wrapper {
  margin-top: 2px;
}

.cal-dia-detalle-card {
  background: #FFFFFF;
  border-radius: 16px;
  padding: 14px;
  border: 1px solid #E2E8F0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  gap: 12px;
}

.cal-dia-badge-srv {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  box-sizing: border-box;
}

.cal-dia-info-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.cal-dia-fecha-txt {
  font-size: 13.5px;
  font-weight: 700;
  color: #0F172A;
}

.cal-dia-desc-txt {
  font-size: 12.5px;
  font-weight: 600;
  color: #0284C7;
}

.cal-dia-franja-row {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #64748B;
  margin-top: 1px;
}

.cal-dia-franja-row svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.cal-dia-nota-txt {
  font-size: 11.5px;
  color: #475569;
  font-weight: 500;
  margin-top: 2px;
  word-break: break-word;
}

/* 6. Leyenda de Servicios */
.cal-leyenda-card {
  background: #FFFFFF;
  border-radius: 14px;
  padding: 12px;
  border: 1px solid #E2E8F0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  margin-top: 2px;
}

.cal-leyenda-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #0284C7;
  margin-bottom: 8px;
}

.cal-leyenda-header svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.cal-leyenda-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.cal-leyenda-col {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.cal-leyenda-item {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.cal-leyenda-badge {
  width: 28px;
  height: 18px;
  min-width: 28px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
  box-sizing: border-box;
  text-align: center;
}

.cal-leyenda-desc {
  font-size: 11px;
  color: #475569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Modal Edición de Empleado */
.emp-edit-sheet {
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 28px 28px 0 0;
}

.form-group {
  margin-bottom: 12px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #49454F;
  margin-bottom: 4px;
}

.form-input {
  width: 100%;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  padding: 0 12px;
  font-size: 14px;
  color: #1C1B1F;
  background: #FFFFFF;
  outline: none;
  box-sizing: border-box;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(0, 95, 184, 0.15);
}

/* ====================================================================
   PANTALLA DE ACCESO SHAREPOINT TMB (RÉPLICA EXACTA ANDROID)
   ==================================================================== */

.sharepoint-screen {
  min-height: 100vh;
  display: none;
  flex-direction: column;
  background-color: var(--surface-dim);
  position: relative;
}

.sharepoint-screen.active {
  display: flex;
}

/* 1. Top AppBar */
.sp-top-appbar {
  display: flex;
  align-items: center;
  padding: calc(var(--safe-top) + 10px) 16px 12px;
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.sp-top-titles {
  flex: 1;
}

.sp-top-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
  line-height: 1.2;
}

.sp-top-subtitle {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  margin: 2px 0 0;
}

/* 2. Barra de URL editable para Administrador */
.sp-admin-url-bar {
  background: rgba(241, 245, 249, 0.95);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.sp-admin-url-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sp-admin-input-wrapper {
  position: relative;
  flex: 1;
}

.sp-admin-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 3px;
  display: block;
}

.sp-admin-input {
  width: 100%;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 0 32px 0 10px;
  font-size: 12px;
  background: #FFFFFF;
  color: var(--text-main);
  outline: none;
  box-sizing: border-box;
}

.sp-admin-input:focus {
  border-color: var(--primary);
}

.sp-admin-clear-btn {
  position: absolute;
  right: 6px;
  top: 18px;
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--text-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sp-admin-go-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary);
  color: #FFFFFF;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-top: 14px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease;
}

.sp-admin-go-btn:active {
  transform: scale(0.92);
}

.sp-admin-actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
}

.sp-link-btn {
  background: transparent;
  border: none;
  color: var(--primary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 2px;
}

.sp-link-btn svg {
  width: 14px;
  height: 14px;
}

.sp-link-danger {
  color: var(--metro-red);
}

/* 3. Banner de Estado de Autenticación / Credenciales */
.sp-auth-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.sp-auth-banner-unverified {
  background-color: #FEF3C7;
  color: #92400E;
}

.sp-auth-banner-verified {
  background-color: #D1FAE5;
  color: #065F46;
}

.sp-auth-banner-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.sp-auth-banner-icon {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sp-auth-banner-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.sp-auth-title {
  font-size: 12px;
  font-weight: 750;
  line-height: 1.25;
}

.sp-auth-sub {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.9;
  margin-top: 2px;
}

.sp-btn-sync {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #059669;
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
  transition: transform 0.15s ease, opacity 0.2s;
}

.sp-btn-sync:active {
  transform: scale(0.94);
}

.sp-btn-sync:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.sp-btn-sync svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

/* 4. Indicador de Progreso Dinámico y Parseo */
.sp-progress-card {
  margin: 12px 16px;
  padding: 12px 14px;
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.sp-progress-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.sp-sync-spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

.sp-progress-status-text {
  flex: 1;
}

.sp-status-main {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
}

.sp-status-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.sp-percent-chip {
  font-size: 11px;
  font-weight: 800;
  color: var(--primary);
  background: var(--primary-container);
  padding: 3px 8px;
  border-radius: 12px;
}

.sp-progress-bar-track {
  width: 100%;
  height: 6px;
  background: var(--surface-variant);
  border-radius: 999px;
  overflow: hidden;
}

.sp-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, #10B981 100%);
  border-radius: 999px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 5. Contenedor de Visor Web Interactivo */
.sp-webview-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin: 0 16px 16px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  min-height: 380px;
}

.sp-browser-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #F8FAFC;
  border-bottom: 1px solid var(--border);
  gap: 10px;
}

.sp-browser-dots {
  display: flex;
  gap: 5px;
}

.sp-browser-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.sp-browser-dots span:nth-child(1) { background: #EF4444; }
.sp-browser-dots span:nth-child(2) { background: #F59E0B; }
.sp-browser-dots span:nth-child(3) { background: #10B981; }

.sp-browser-url-pill {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 11px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sp-browser-url-pill svg {
  width: 12px;
  height: 12px;
  fill: #10B981;
  flex-shrink: 0;
}

.sp-browser-action {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.sp-browser-action:active {
  background: rgba(0, 0, 0, 0.05);
}

.sp-iframe-wrapper {
  position: relative;
  flex: 1;
  width: 100%;
  min-height: 340px;
  display: flex;
}

.sp-webview-iframe {
  width: 100%;
  height: 100%;
  min-height: 340px;
  border: none;
  background: #FFFFFF;
  flex: 1;
}

.sp-iframe-fallback {
  display: none;
  position: absolute;
  inset: 0;
  background: #FFFFFF;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  z-index: 5;
}

.sp-portal-badge {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: #0078D4;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}

.sp-portal-badge svg {
  width: 32px;
  height: 32px;
  fill: #FFFFFF;
}

.sp-iframe-fallback h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
}

.sp-iframe-fallback p {
  font-size: 12px;
  color: var(--text-muted);
  max-width: 340px;
  line-height: 1.4;
}

/* 6. Presentación Corporativa Continua (Seamless Splash) */
.sp-seamless-splash {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: linear-gradient(180deg, #FFFFFF 0%, #F0F9FF 50%, #FFFFFF 100%);
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.5s ease;
}

.sp-seamless-splash.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.sp-splash-halo-box {
  position: relative;
  width: 130px;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
}

.sp-splash-glow {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.2;
  animation: spPulseHalo 1.8s ease-in-out infinite alternate;
}

.sp-splash-icon-card {
  width: 90px;
  height: 90px;
  border-radius: 24px;
  background: linear-gradient(135deg, #1565C0 0%, #0D47A1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 28px rgba(21, 101, 192, 0.35);
  position: relative;
  color: #FFFFFF;
}

.sp-splash-icon-card svg {
  width: 52px;
  height: 52px;
  fill: #FFFFFF;
}

.sp-splash-badge-l1 {
  position: absolute;
  bottom: 6px;
  right: 8px;
  background: var(--metro-red);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 900;
  border-radius: 6px;
  padding: 1px 5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}

.sp-splash-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
  letter-spacing: -0.2px;
}

.sp-splash-linea-pill {
  background: rgba(220, 38, 38, 0.1);
  color: var(--metro-red);
  border: 1px solid rgba(220, 38, 38, 0.25);
  font-size: 11px;
  font-weight: 800;
  border-radius: 12px;
  padding: 2px 10px;
  margin-bottom: 18px;
}

.sp-splash-msg {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
  text-align: center;
}

.sp-splash-submsg {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 22px;
  text-align: center;
}

.sp-splash-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(2, 132, 199, 0.15);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spPulseHalo {
  0% {
    transform: scale(0.94);
    opacity: 0.14;
  }
  100% {
    transform: scale(1.12);
    opacity: 0.32;
  }
}

/* ================= DIÁLOGO MODAL MATERIAL 3 (ACERCA DE...) ================= */
.modal-dialog-android {
  background: #FFFFFF;
  border-radius: 28px;
  width: 88%;
  max-width: 340px;
  margin: auto;
  padding: 24px 20px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
  animation: modalScaleIn 0.2s cubic-bezier(0.2, 0, 0, 1);
}

@keyframes modalScaleIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.acerca-app-icon {
  width: 76px;
  height: 76px;
  background: #D32F2F;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  box-shadow: 0 6px 16px rgba(211, 47, 47, 0.35);
  margin-bottom: 16px;
}

.acerca-app-icon svg {
  width: 44px;
  height: 44px;
}

.acerca-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 6px;
}

.acerca-version-chip {
  display: inline-flex;
  padding: 4px 14px;
  background: rgba(0, 95, 184, 0.12);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 14px;
}

.acerca-divider {
  width: 80%;
  height: 1px;
  background: var(--border);
  margin: 0 auto 14px;
}

.acerca-copyright {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin: 0 0 20px;
}

.acerca-btn-cerrar {
  width: 100%;
  height: 44px;
  border-radius: 22px;
  font-size: 14px;
  font-weight: 700;
}




