/* ============================================================
   CONFIRMAR ASISTENCIA · ESTRUCTURA DE PÁGINA
   ============================================================ */

.cf-week-page-root{
  height:100dvh;
  min-height:100dvh;
  max-height:100dvh;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}

.cf-week-page-inner{
  flex:1 1 auto;
  min-height:0;
  height:100%;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  zoom:.90;
  padding-bottom:12px;
  box-sizing:border-box;
}

/* ============================================================
   TOPBAR RESUMEN
   ============================================================ */

.cf-week-page-header{
  width:100%;
  margin-bottom:18px;
  flex:0 0 auto;
}

.cf-week-topbar{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:10px 12px;
  border-radius:14px;
  background:
    linear-gradient(180deg, rgba(10,18,20,.92), rgba(12,18,20,.96));
  border:1px solid rgba(255,255,255,.07);
  box-shadow:
    0 8px 22px rgba(0,0,0,.18),
    inset 0 1px 0 rgba(255,255,255,.03);
  backdrop-filter:blur(6px);
  flex-wrap:nowrap;
  overflow:hidden;
  box-sizing:border-box;
}

.cf-week-topbar-left{
  min-width:0;
  flex:1 1 auto;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  overflow:hidden;
}

.cf-week-topbar-stats{
  display:inline-flex;
  align-items:stretch;
  justify-content:flex-start;
  gap:8px;
  flex:1 1 auto;
  min-width:0;
  flex-wrap:nowrap;
  overflow:hidden;
}

.cf-week-topstat-card{
  min-width:110px;
  display:inline-flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  gap:3px;
  padding:8px 10px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.07);
  box-shadow:
    0 4px 12px rgba(0,0,0,.14),
    inset 0 1px 0 rgba(255,255,255,.03);
  background:rgba(255,255,255,.025);
  flex:0 0 auto;
  box-sizing:border-box;
}

.cf-week-topstat-card.is-highlight{
  border-color:rgba(41,217,163,.28);
  background:
    linear-gradient(180deg, rgba(8,29,24,.80), rgba(9,20,18,.88)),
    linear-gradient(90deg, rgba(6,190,132,.12), rgba(6,190,132,.05));
}

.cf-week-topstat-value{
  color:#f3fff8;
  font-size:.98rem;
  font-weight:900;
  line-height:1;
  white-space:nowrap;
}

.cf-week-topstat-label{
  color:#b6ffd0;
  font-size:.70rem;
  font-weight:800;
  line-height:1;
  letter-spacing:.01em;
  white-space:nowrap;
  opacity:.9;
}

.cf-week-topbar-actions{
  display:inline-flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex:0 0 auto;
  white-space:nowrap;
}

/* ============================================================
   BOTONES DE ACCIÓN
   ============================================================ */

.cf-week-action-btn{
  min-height:38px;
  height:38px;
  padding:0 12px !important;
  border-radius:11px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  font-weight:900 !important;
  font-size:.85rem !important;
  letter-spacing:.01em;
  border:1px solid transparent !important;
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    border-color .18s ease,
    background .18s ease,
    opacity .18s ease,
    color .18s ease !important;
  white-space:nowrap;
  flex:0 0 auto;
}

.cf-week-save-btn{
  background:
    linear-gradient(180deg, rgba(9,76,52,.96), rgba(5,52,36,.98)) !important;
  border-color:rgba(76,255,160,.30) !important;
  color:#effff6 !important;
  box-shadow:
    0 6px 14px rgba(0,0,0,.18),
    inset 0 1px 0 rgba(255,255,255,.05);
}

.cf-week-save-btn.is-enabled{
  background:
    linear-gradient(180deg, rgba(14,138,88,.98), rgba(6,92,59,.99)) !important;
  border-color:rgba(126,255,191,.58) !important;
  color:#f7fff9 !important;
  box-shadow:
    0 0 8px rgba(57,255,20,.14),
    0 6px 16px rgba(0,0,0,.20),
    inset 0 1px 0 rgba(255,255,255,.10);
}

.cf-week-save-btn.is-enabled:hover{
  transform:translateY(-1px);
}

.cf-week-reset-btn{
  background:
    linear-gradient(180deg, rgba(72,78,88,.95), rgba(50,56,63,.98)) !important;
  border-color:rgba(158,168,180,.22) !important;
  color:#eef3f6 !important;
  box-shadow:
    0 6px 14px rgba(0,0,0,.16),
    inset 0 1px 0 rgba(255,255,255,.05);
}

.cf-week-reset-btn.is-enabled{
  background:
    linear-gradient(180deg, rgba(108,118,130,.98), rgba(73,81,90,.99)) !important;
  border-color:rgba(201,211,223,.34) !important;
  color:#ffffff !important;
  box-shadow:
    0 6px 16px rgba(0,0,0,.18),
    inset 0 1px 0 rgba(255,255,255,.10);
}

.cf-week-reset-btn.is-enabled:hover{
  transform:translateY(-1px);
}

.cf-week-action-btn.is-disabled,
.cf-week-action-btn:disabled{
  opacity:.46 !important;
  cursor:not-allowed !important;
  box-shadow:
    0 4px 10px rgba(0,0,0,.12),
    inset 0 1px 0 rgba(255,255,255,.03) !important;
  filter:saturate(.72);
}

.cf-week-action-btn.is-disabled:hover,
.cf-week-action-btn:disabled:hover{
  transform:none !important;
}

.cf-week-action-btn img{
  display:block;
  flex:0 0 auto;
}

/* ============================================================
   BOARD DE DÍAS
   ============================================================ */

.cf-week-board-shell{
  background:transparent !important;
  padding:0 !important;
  border:none !important;
  border-radius:0 !important;
  box-shadow:none !important;
  box-sizing:border-box;
  width:100%;
  max-width:100%;
  opacity:1;
  flex:1 1 auto;
  min-height:0;
  height:100%;
  overflow-x:auto;
  overflow-y:hidden;
}

.cf-week-days-row{
  display:flex;
  gap:16px;
  align-items:stretch;
  width:100%;
  min-width:1380px;
  height:100%;
  min-height:0;
  box-sizing:border-box;
}

/* ============================================================
   TARJETAS DE DÍA
   ============================================================ */

.cf-week-day-card{
  flex:1 1 0;
  min-width:185px;
  height:100%;
  min-height:0;
  background:rgba(20,26,28,.72) !important;
  border:1px solid rgba(255,255,255,.08) !important;
  border-radius:16px !important;
  box-shadow:0 8px 24px rgba(0,0,0,.24) !important;
  overflow:hidden;
  backdrop-filter:blur(6px);
  box-sizing:border-box;
}

.cf-week-day-card-body{
  position:relative;
  background:transparent !important;
  width:100%;
  height:100%;
  min-height:0;
  padding:14px 12px !important;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  box-sizing:border-box;
}

/* ============================================================
   DÍAS VACÍOS
   ============================================================ */

.cf-week-day-card.is-empty-day{
  flex:0 0 86px;
  min-width:86px;
  max-width:86px;
  height:100%;
  min-height:0;
  overflow:hidden;
  background:
    linear-gradient(180deg, rgba(20,26,28,.38), rgba(20,26,28,.28)) !important;
  border:1px solid rgba(255,255,255,.06) !important;
}

.cf-week-day-card-body.is-empty-day-body{
  height:100%;
  min-height:0;
  padding:10px 8px !important;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  text-align:center;
  overflow:hidden;
  box-sizing:border-box;
}

/* ============================================================
   HEADER FIJO / BODY SCROLL
   ============================================================ */

.cf-week-day-header{
  position:relative;
  flex:0 0 auto;
  padding-bottom:10px;
}

.cf-week-day-card-body > .cf-week-day-header-btn{
  flex:0 0 auto;
  margin-bottom:10px;
}

.cf-week-day-scroll{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  padding-top:16px;
  padding-right:10px;
  padding-bottom:18px;
  padding-left:14px;
  margin-top:2px;
  box-sizing:border-box;
}

.cf-week-day-scroll-empty{
  flex:1 1 auto;
  min-height:0;
}

/* ============================================================
   HEADER DE CADA DÍA
   ============================================================ */

.cf-week-day-head{
  width:100%;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:8px;
  margin-bottom:0;
  min-width:0;
  box-sizing:border-box;
}

.cf-week-day-head-left{
  min-width:0;
  flex:1 1 auto;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  overflow:hidden;
}

.cf-week-day-name{
  font-weight:900;
  color:#d9fff0;
  font-size:15px;
  line-height:1.15;
  margin:0;
}

.cf-week-day-date{
  opacity:.9;
  color:#E9EEF1;
  font-size:13px;
  margin-top:4px;
  margin-bottom:0;
  line-height:1.1;
}

/* ============================================================
   HEADER DE DÍA CON CONTENIDO · BOTÓN
   ============================================================ */

.cf-week-day-header-btn{
  width:100%;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:8px;
  padding:10px 12px;
  margin:0;
  border:none;
  outline:none;
  appearance:none;
  -webkit-appearance:none;
  background:
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015));
  border:1px solid rgba(255,255,255,.07);
  border-radius:12px;
  cursor:pointer;
  text-align:left;
  transition:
    transform .16s ease,
    box-shadow .16s ease,
    border-color .16s ease,
    background .16s ease,
    opacity .16s ease,
    filter .16s ease;
  min-width:0;
  box-sizing:border-box;
  position:relative;
  box-shadow:
    0 4px 12px rgba(0,0,0,.12),
    inset 0 1px 0 rgba(255,255,255,.03);
}

.cf-week-day-header-btn:hover{
  transform:translateY(-1px);
  border-color:rgba(6,190,132,.26);
  background:
    linear-gradient(180deg, rgba(10,52,40,.32), rgba(255,255,255,.02));
  box-shadow:
    0 8px 18px rgba(0,0,0,.18),
    0 0 0 1px rgba(6,190,132,.05) inset;
}

.cf-week-day-header-btn:active{
  transform:translateY(0);
  background:
    linear-gradient(180deg, rgba(8,40,31,.42), rgba(255,255,255,.015));
  box-shadow:
    0 4px 12px rgba(0,0,0,.16),
    inset 0 1px 0 rgba(255,255,255,.02);
}

.cf-week-day-header-btn:focus{
  outline:none;
}

.cf-week-day-header-btn:focus-visible{
  border-color:rgba(86,255,188,.52);
  box-shadow:
    0 0 0 3px rgba(6,190,132,.12),
    0 8px 18px rgba(0,0,0,.18);
}

/* ============================================================
   HEADER DE DÍA VACÍO · ESTÁTICO, NO CLICKABLE
   ============================================================ */

.cf-week-day-header-static-empty{
  width:100%;
  min-height:74px;
  padding:10px 6px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  border-radius:12px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.018));
  border:1px solid rgba(255,255,255,.07);
  box-shadow:
    0 4px 12px rgba(0,0,0,.10),
    inset 0 1px 0 rgba(255,255,255,.03);
  box-sizing:border-box;
  cursor:default;
  pointer-events:none;
}

.cf-week-day-head-left-empty{
  width:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
  text-align:center;
}

.cf-week-day-name-empty{
  font-size:24px;
  line-height:1;
  font-weight:900;
  color:#f2fff9;
  margin:0;
}

.cf-week-day-date-empty{
  font-size:11px;
  line-height:1;
  color:#dfe7ec;
  opacity:.88;
  margin:0;
}

/* ============================================================
   CONTADOR DEL DÍA
   ============================================================ */

.cf-week-day-count{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:40px;
  height:24px;
  padding:0 8px;
  border-radius:999px;
  background:rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.08);
  color:#f3fff8;
  font-size:11px;
  font-weight:900;
  line-height:1;
  white-space:nowrap;
  box-shadow:
    0 2px 8px rgba(0,0,0,.16),
    inset 0 1px 0 rgba(255,255,255,.04);
  transition:
    border-color .16s ease,
    background .16s ease,
    color .16s ease,
    box-shadow .16s ease;
}

.cf-week-day-header-btn:hover .cf-week-day-count{
  border-color:rgba(6,190,132,.22);
  background:rgba(6,190,132,.10);
  color:#effff8;
  box-shadow:
    0 4px 10px rgba(0,0,0,.16),
    inset 0 1px 0 rgba(255,255,255,.05);
}

/* ============================================================
   CONTENIDO INTERNO DEL DÍA
   ============================================================ */

.cf-week-items-col{
  display:flex;
  flex-direction:column;
  gap:18px;
  padding-left:2px;
  padding-right:2px;
}

/* ============================================================
   ITEMS
   ============================================================ */

.cf-week-item,
.cf-week-card-visual,
.cf-week-card-clickarea{
  overflow:visible;
}

.cf-week-item{
  border-radius:16px;
  padding:0;
}

.cf-week-item.is-unselected{
  opacity:.46;
}

.cf-week-item.is-selected{
  opacity:1;
}

/* ============================================================
   ESTADOS VACÍOS
   ============================================================ */

.cf-week-empty,
.cf-week-day-empty{
  color:#CFD7DE;
  opacity:.75;
  font-size:12px;
  line-height:1.25;
}

/* ============================================================
   ICONO DE APERTURA
   ============================================================ */

.sd-cal-day-openhint{
  position:absolute;
  top:10px;
  right:12px;
  font-size:12px;
  color:rgba(255,255,255,.28);
  pointer-events:none;
  transition:
    transform .16s ease,
    color .16s ease,
    opacity .16s ease;
}

.cf-week-day-header-btn:hover .sd-cal-day-openhint{
  color:rgba(176,255,224,.82);
  transform:translateX(2px);
  opacity:1;
}

/* ============================================================
   SCROLLBAR SUAVE DEL BODY DE CADA DÍA
   ============================================================ */

.cf-week-day-scroll::-webkit-scrollbar{
  width:8px;
}

.cf-week-day-scroll::-webkit-scrollbar-track{
  background:transparent;
}

.cf-week-day-scroll::-webkit-scrollbar-thumb{
  background:rgba(255,255,255,.10);
  border-radius:999px;
}

.cf-week-day-scroll::-webkit-scrollbar-thumb:hover{
  background:rgba(255,255,255,.18);
}

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

@media (max-width: 1400px){
  .cf-week-topbar{
    gap:10px;
    padding:9px 10px;
  }

  .cf-week-topbar-stats{
    gap:7px;
  }

  .cf-week-topstat-card{
    min-width:102px;
    padding:7px 8px;
  }

  .cf-week-topstat-value{
    font-size:.92rem;
  }

  .cf-week-topstat-label{
    font-size:.66rem;
  }

  .cf-week-action-btn{
    height:36px;
    min-height:36px;
    padding:0 10px !important;
    font-size:.80rem !important;
  }

  .cf-week-days-row{
    min-width:1260px;
    gap:14px;
  }

  .cf-week-day-card{
    min-width:176px;
  }

  .cf-week-day-header-btn{
    padding:9px 11px;
  }
}

@media (max-width: 1200px){
  .cf-week-topstat-card{
    min-width:94px;
    padding:6px 7px;
  }

  .cf-week-topstat-value{
    font-size:.86rem;
  }

  .cf-week-topstat-label{
    font-size:.62rem;
  }

  .cf-week-action-btn{
    height:34px;
    min-height:34px;
    padding:0 9px !important;
    font-size:.76rem !important;
  }

  .cf-week-action-btn img{
    height:15px !important;
    width:15px !important;
    margin-right:5px !important;
  }

  .cf-week-days-row{
    min-width:1120px;
    gap:12px;
  }

  .cf-week-day-card{
    min-width:160px;
    min-height:0;
    height:100%;
  }

  .cf-week-day-card.is-empty-day{
    flex:0 0 78px;
    min-width:78px;
    max-width:78px;
    min-height:0;
    height:100%;
  }

  .cf-week-day-header-btn{
    padding:9px 10px;
  }
}

@media (max-width: 900px){
  .cf-week-days-row{
    min-width:980px;
  }

  .cf-week-day-card{
    min-width:148px;
    min-height:0;
    height:100%;
  }

  .cf-week-day-card.is-empty-day{
    flex:0 0 74px;
    min-width:74px;
    max-width:74px;
    min-height:0;
    height:100%;
  }

  .cf-week-day-header-btn{
    padding:8px 9px;
  }
}

@media (max-width: 640px){
  .cf-week-days-row{
    gap:10px;
    min-width:880px;
    min-height:0;
  }

  .cf-week-day-card{
    min-width:136px;
    min-height:0;
    height:100%;
  }

  .cf-week-day-card.is-empty-day{
    flex:0 0 68px;
    min-width:68px;
    max-width:68px;
    min-height:0;
    height:100%;
  }

  .cf-week-day-name{
    font-size:14px;
  }

  .cf-week-day-date{
    font-size:11px;
  }

  .cf-week-day-count{
    font-size:10px;
    min-width:36px;
    height:22px;
    padding:0 7px;
  }

  .cf-week-day-scroll{
    padding-top:14px;
    padding-right:8px;
    padding-bottom:16px;
    padding-left:12px;
  }

  .cf-week-items-col{
    gap:16px;
  }

  .cf-week-day-header-btn{
    padding:8px 9px;
  }

  .cf-week-day-name-empty{
    font-size:20px;
  }

  .cf-week-day-date-empty{
    font-size:10px;
  }

  .cf-week-day-header-static-empty{
    min-height:64px;
    padding:8px 4px;
  }
}