/* ============================================================
   GUREA · CSS base limpio
   Paleta: #F7F0BA, #E0DBA4, #A9CBA6, #7EBEA3, #53A08E
   ============================================================ */

/* ---------- Reset suave ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Poppins", sans-serif;
  background: #ebf7eb;
  background: linear-gradient(180deg,rgba(235, 247, 235, 1) 16%, rgba(169, 203, 166, 1) 50%, rgba(126, 190, 163, 1) 100%);
  color: #163237;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

/* Quitar highlight azul en móviles */
* {
  -webkit-tap-highlight-color: transparent;
}
*:focus {
  outline: none !important;
}
:focus:not(:focus-visible) {
  outline: none !important;
}


/* Quitar estilos feos por defecto */
button,
input,
select,
textarea {
  font-family: inherit;
  font-size: 100%;
}

/* Accesible: texto solo para lectores de pantalla */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* ============================================================
   Variables Gurea
   ============================================================ */

:root {
  --gurea-cream: #F7F0BA;
  --gurea-sand:  #E0DBA4;
  --gurea-soft:  #A9CBA6;
  --gurea-mint:  #7EBEA3;
  --gurea-teal:  #53A08E;

  --bg-app:      #f5f6f4;
  --bg-panel:    #ffffff;
  --text-main:   #163237;
  --text-muted:  #66737a;

  --radius-lg:   24px;
  --radius-md:   18px;
  --radius-pill: 999px;

  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.06);
  --shadow-fab:  0 18px 40px rgba(0, 0, 0, 0.18);

 
  /* categorías (colores MÁS vistosos) */
  --cat-cita:          #7EBEA3;      
  --cat-tarea:         #f97316;     
  --cat-entrenamiento: #22c55e;      
  --cat-partido:       #6366f1;      
  --cat-evento:        #0ea5e9; 
  --cat-trabajo:       #9ca3af;     
  --cat-vacaciones:    #f87171;


    /* FAB */
  --fab-size: 48px;
  --fab-gap:  64px;
}

/* ============================================================
   Layout general
   ============================================================ */

body {
  display: flex;
  flex-direction: column;
}

/* Cualquier panel con atributo hidden debe estar realmente oculto */
[data-panel][hidden] {
  display: none !important;
}

.size-titulos{
  padding: 0 1rem 0.5rem 1.3rem ;
  /*
  padding-left: 1.3rem;
  padding-bottom: .5rem;
  */
}
/* Marca Gurea */
.brand {
  display: flex;
  align-items: center;
}
#titulo-semana{
  display: flex !important;
  align-items:end !important;
}
#titulo-semana h2{
  margin-right: 10px;
}

.brand__title {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gurea-teal);
  margin: 0;
}

#icon-titulo {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  object-fit: cover;
}
#gurea-logo{
  width: 160px;
  height: 100%;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.9rem 1.7rem;
}
.toolbar2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.7rem;
}

.toolbar__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.toolbar__group {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.toolbar__label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-main);
}

.toolbar__addevent {
  border-radius: 999px;
  padding: 0.35rem 0.95rem;
  font-size: 0.82rem;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
}

@media (max-width: 640px) {
  .toolbar {
    align-items: flex-start;
    padding: 1rem 1.7rem;
  }
  .toolbar2{
    padding: 0rem 1.7rem 1.5rem 1.7rem;
  }
}

/* Contenedor principal de paneles */
main.grid {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 0 1.7rem 1.5rem;
}

/* Panel genérico */
.panel {
  background: rgba(255, 255, 255, 0.97);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 1rem 1.15rem 1.1rem;
}


/* Paneles home: Día / Semana / Mes */
.home-section {
  border-radius: var(--radius-lg);
}

.home-section__controls {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.home-section__month-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-main);
}


/* Header interior de cada panel */
.panel__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
  padding: 0 1rem 0.5rem 1.3rem;

}

/* Títulos dentro de panel */
.panel__title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.panel__subtitle {
  display: block;
  font-size: 0.8rem;
  color: var(--text-main);
}

/* Footer panel (leyendas, etc.) */
.panel__foot {
  margin-top: 0.6rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ============================================================
   Botones
   ============================================================ */

.btn,
.tab {
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 500;
  background: #ffffff;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.1s ease,
    border-color 0.15s ease;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
#btnGenCode{
  border: 1px solid var(--text-muted);
}

.btn--primary {
  background: var(--gurea-teal);
  color: #ffffff;
}

.btn--primary:hover {
  background: #4b9984;
}

.btn--ghost {
  background: rgba(166, 197, 167, 0.15);
  border-color: rgba(166, 197, 167, 0.0);
  color: var(--text-main);
}

.btn--ghost:hover {
  background: rgba(166, 197, 167, 0.3);
}

.tab-btn {
  background: rgba(233, 238, 222, 0.8);
  border-color: transparent;
  color: var(--text-muted);
}

.tab-btn.is-active {
  background: #ffffff;
  color: var(--gurea-teal);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.09);
}

#btnHome {
  cursor: pointer;
  display: flex;
  align-items: center;
}

#btnHome:active {
  opacity: 0.7;
  transform: scale(0.97);
}

/* feedback tap */
.btn:active,
.tab:active {
  transform: scale(0.97);
}

/* Botones redondos del menú principal (header) */
.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--gurea-teal);
  cursor: pointer;
  transition:
    background 0.15s ease,
    transform 0.1s ease,
    box-shadow 0.15s ease;
}

.icon-btn:hover {
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.icon-btn:active {
  transform: scale(0.94);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

/* Botón principal (+ evento) un poco más protagonista */
.icon-btn--primary {
  background: var(--gurea-teal);
  color: #ffffff;
  box-shadow: 0 16px 32px rgba(83, 160, 142, 0.4);
}

.icon-btn--primary:hover {
  background: #4b9984;
}

/* Botón de cierre universal para sheets / modales */
/* Botón cierre de overlays (ajustes, etc.) sigue flotando arriba */
.overlay__closebtn {
  position: absolute;
  top: .75rem;
  right: .75rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.15);
  background: #fff;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.overlay__closebtn:hover {
  background: rgba(14, 165, 165, 0.10);
  border-color: var(--accent, #0ea5a5);
  transform: scale(1.05);
}

.overlay__closebtn:active {
  transform: scale(0.95);
}



/* ============================================================
   Listas y texto
   ============================================================ */

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.list--events {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* Texto general */
.muted,
small {
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* ============================
   Menú flotante (FAB) esquina
   ============================ */

/* Cabecera: ancla para el menú */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.7rem 0.9rem;
  gap: 1.5rem;
  position: relative; /* importante para posicionar .app-actions */
}

/* Contenedor del menú flotante */
.app-actions {
  position: absolute;
  top: 80%;
  right: 70%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  z-index: 30; /* para que quede por encima de la grid */
}

/* móvil: un pelín más dentro si quieres */
@media (max-width: 768px) {
  .app-actions {
    top: 85%;
    right: 20%;
  }
}

/* Caja del menú (el reloj) */
.fab-menu {
  position: relative;
  width: var(--fab-size);
  height: var(--fab-size);
}

/* checkbox oculto (ya no lo usamos, pero lo dejamos por si acaso) */
.fab-toggle {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  margin: 0%;
  padding: 0%;
}
#img_icon_menu{
  width: 48px;
  height: 48px;
  padding: 0%;
  margin: 0%;
  border-radius: 50%;
}

/* Botón central "+" */
.fab-button {
  width: 48px;
  height: 48px;
  
 border-radius: 50%;
  border: none;
  background: var(--accent, #2f8f80);
  color: #fff;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.35);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.fab-button:hover {
  background: #1f6f61;
}

/* items secundarios (los iconitos) SIEMPRE visibles */
.fab-item {
  position: absolute;

  /* ORIGEN EN EL CENTRO DEL FAB */
  top: 50%;
  left: 50%;
  right: auto;
  bottom: auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.28);
  cursor: pointer;
  font-size: 1.25rem;

  opacity: 1;                 /* 👈 siempre visibles */
  pointer-events: auto;       /* 👈 clicables */
  transform: translate(-50%, -50%) scale(1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 31;
}
/* === CÍRCULO DE 6 BOTONES — RADIO LEVEMENTE MÁS AMPLIO === */
/* (Separados ~6px más para compensar el logo central) */

/* 1 – arriba */
.fab-item-1 {
  transform: translate(-50%, -50%) translate(0, -62px) scale(1);
}

/* 2 – arriba-derecha */
.fab-item-2 {
  transform: translate(-50%, -50%) translate(52px, -31px) scale(1);
}

/* 3 – abajo-derecha */
.fab-item-3 {
  transform: translate(-50%, -50%) translate(52px, 31px) scale(1);
}

/* 4 – abajo */
.fab-item-4 {
  transform: translate(-50%, -50%) translate(0, 62px) scale(1);
}

/* 5 – abajo-izquierda */
.fab-item-5 {
  transform: translate(-50%, -50%) translate(-52px, 31px) scale(1);
}

/* 6 – arriba-izquierda */
.fab-item-6 {
  transform: translate(-50%, -50%) translate(-52px, -31px) scale(1);
}


/* ============================
   Día actual destacado
   ============================ */
.is-today {
  position: relative;
  border: 2px solid var(--accent, #0ea5a5) !important;
  border-radius: 10px;
  background: rgba(14,165,165,0.07);
}

/* En el mes queda mejor redondeado */
.month__cell.is-today span {
  font-weight: 700;
  color: var(--accent, #0ea5a5);
}


/* ============================================================
   Home · Bloque Día
   ============================================================ */

.home-section--day .panel__title {
  letter-spacing: 0.16em;
}

#h-dia {
  font-size: 0.8rem;
}
#h-dia h2{
  margin: 0% !important;
}

#daySubtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Lista de eventos del día */
#dayEventsList {
  margin-top: 0.4rem;
}


/* Eventos en la vista día */
.event {
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.04);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  padding: 0.55rem 0.8rem 0.55rem 1.1rem;
  font-size: 0.82rem;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;

  /* aquí el “palito” ya es el borde */
  border-left: 4px solid transparent;
}

.event--cita {
  border-left-color: var(--cat-cita);
}

.event--tarea {
  border-left-color: var(--cat-tarea);
}

.event--entrenamiento {
  border-left-color: var(--cat-entrenamiento);
}

.event--partido {
  border-left-color: var(--cat-partido);
}

.event--evento {
  border-left-color: var(--cat-evento);
}
.event--trabajo {
  border-left-color: var(--cat-trabajo);
}
.event--vacaciones{
  border-left-color: var(--cat-vacaciones);
}


.event.is-empty {
  border-style: dashed;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: none;
  color: var(--text-muted);
}
.event.is-empty::before {
  display: none;
}

/* ============================================================
   Home · Bloque Semana
   ============================================================ */

.week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.45rem;
}

/* Tarjeta de día en Semana */
.week__cell {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 0.5rem .2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  min-height: 68px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.18rem;

  position: relative;
  overflow: hidden;
  text-align: center;
}

/* Nombre del día (lun, mar...) */
.week__day-label {
  font-size: 0.7rem;
  text-transform: lowercase;
  color: var(--text-muted);
}

/* Número del día (10, 11...) */
.week__date-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
}

/* Contenedor de puntitos de eventos */
.week__dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.18rem;
  margin-top: 0.1rem;
}

.week-dot {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--gurea-teal);
}


/* ============================
   TRABAJO · full / mañana / tarde
   ============================ */

/* FULL: día completo naranja */
.work-day.is-work-full,
.month__cell.is-work-full,
.week__cell.is-work-full {
  background: #ffe8c7;
  border-color: #f2a24a;
}
.work-btn-titulo{
  border:1px solid #f2a24a;
}

/* MAÑANA: mitad superior naranja, mitad inferior blanca */
.work-day.is-work-am,
.month__cell.is-work-am,
.week__cell.is-work-am {
  background: linear-gradient(
    to bottom,
    #ffe8c7 0%,
    #ffe8c7 50%,
    #ffffff 50%,
    #ffffff 100%
  );
  border-color: #f2a24a;
}

/* TARDE: mitad inferior naranja, mitad superior blanca */
.work-day.is-work-pm,
.month__cell.is-work-pm,
.week__cell.is-work-pm {
  background: linear-gradient(
    to top,
    #ffe8c7 0%,
    #ffe8c7 50%,
    #ffffff 50%,
    #ffffff 100%
  );
  border-color: #f2a24a;
}


/* ============================
   VACACIONES · verde suave
   ============================ */

.work-day.is-work-vacaciones,
.month__cell.is-work-vacaciones,
.week__cell.is-work-vacaciones {
  background: rgba(167, 229, 195, 0.35);
  border-color: rgba(167, 229, 195, 0.7);
}






/* ============================================================
   Home · Bloque Mes
   ============================================================ */

.month {
  width: 100%;
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.3rem;
}

.month__weekday {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 0.25rem;
}

.month__cell {
  border-radius: var(--radius-md);
  background: #ffffff;

  /* Nuevo borde suave */
  border: 1px solid rgba(0, 0, 0, 0.06);

  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  min-height: 52px;
  padding: 0.35rem 0.25rem;
  cursor: pointer;
  position: relative;
  font-size: 0.8rem;
  color: var(--text-main);
  text-align: center;
  transition: background 0.1s ease, border-color 0.1s ease;
}

.month__cell:hover {
  background: var(--gurea-soft);
  border-color: rgba(0, 0, 0, 0.1);
}

.month__cell span {
  font-weight: 500;
}

.month__cell.is-muted {
  opacity: 0.3;
  cursor: default;
}

/* puntos de eventos en mes (JS puede añadirlos) */
/* contenedor de puntitos en mes */
.month__dots {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 6px;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.18rem; /* separación entre puntitos */
}

/* cada puntito individual */
.month__dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--gurea-teal);
}



/* leyenda inferior */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap:1rem;
  align-items: center;
}

.bullet {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-right: 5px;
}


.bullet--cita {
  background: var(--cat-cita);
}

.bullet--tarea {
  background: var(--cat-tarea);
}

.bullet--entrenamiento {
  background: var(--cat-entrenamiento);
}

.bullet--partido {
  background: var(--cat-partido);
}

.bullet--evento {
  background: var(--cat-evento);
}


/* ============================================================
   Sheets y overlays (estructuras mínimas)
   ============================================================ */

.sheet {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease-out;
}

.sheet[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}

.sheet__panel {
  width: 100%;
  max-width: 520px;
  background: #ffffff;
  border-radius: 24px 24px 0 0;
  padding: 1rem 1.1rem 1.3rem;
  box-shadow: 0 -16px 40px rgba(0, 0, 0, 0.35);
  max-height: 90vh;
  overflow-y: auto;
}


/* Header de los sheets: título + botón de cierre alineados */
.sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Cierre de sheets, integrado en el header (no flotando fuera) */
.sheet__closebtn {
  position: static;              /* nada de absolute */
  margin-left: .5rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.15);
  background: #fff;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.sheet__closebtn:hover {
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.9);
  transform: scale(1.03);
}

.sheet__closebtn:active {
  transform: scale(0.95);
}


.sheet__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
}

.sheet__content {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.sheet__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
}

/* Inputs básicos */
.input,
.select,
.textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 0.4rem 0.7rem;
  font-size: 0.85rem;
  background: #ffffff;
  color: var(--text-main);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
  margin-top: 0.5rem;
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--gurea-teal);
  box-shadow: 0 0 0 1px rgba(83, 160, 142, 0.4);
}

.textarea {
  resize: vertical;
  min-height: 90px;
}

/* ========= FORMATO FILAS EN SHEETS (evento / notas) ========= */
.row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.6rem;
}

.row--2 {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 0.7rem;
}

@media (max-width: 600px) {
  .row--2 {
    grid-template-columns: 1fr;
  }
}

/* ========= SHEET DE NOTAS ========= */

#notesInlinePanel {
  display: none;
}

.notes-sep {
  margin: 0.9rem 0 0.7rem;
  border: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.notes-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.notes-search {
  flex: 1;
  border-radius: 999px;
}

/* Lista principal de notas en el sheet */
.notes-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* Tarjeta de nota */
.note-item {
  border-radius: 18px;
  border: 1px solid var(--cat-cita);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
  padding: 0.7rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.83rem;
  background-color:var(--bg-panel);
}

/* Cabecera de la nota (quién / fecha + botón borrar) */
.note-item__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.6rem;
}

.note-item__titlewrap {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
}

.note-item__title {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--gurea-teal);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.note-item__meta {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Texto de la nota */
.note-item__text {
  font-size: 0.83rem;
  color: var(--text-main);
  line-height: 1.4;
  white-space: pre-wrap;
}

/* Botón de borrar nota */
.btn-note-del {
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  border-radius: 999px;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn-note-del:hover {
  background: rgba(148, 163, 184, 0.12);
  color: #475569;
}

/* Estados vacíos / cargando */
.note-empty,
#notesList .note-item:only-child:empty {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Lista inline (panel pequeño de notas) */
.notes-inline__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.notes-inline__item {
  position: relative;
  background: rgba(255, 255, 255, 0.78);
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  padding: 0.45rem 0.6rem;
  font-size: 0.8rem;
  color: var(--text-main);
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.notes-inline__item:hover {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.15);
}

/* Nota importante en inline */
.notes-inline__item.is-important {
  border-color: var(--gurea-teal);
}

/* Badge "Importante" */
.notes-inline__badge {
  display: inline-block;
  margin-bottom: 0.1rem;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(83, 160, 142, 0.09);
  color: var(--gurea-teal);
}

.notes-inline__title {
  display: block;
  font-weight: 600;
  margin-top: 0.05rem;
}

.notes-inline__snippet {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.05rem;
}

.notes-inline__empty {
  font-size: 0.78rem;
  color: var(--text-muted);
}



/* Lista de notas en el sheet flotante */
.notes-important__hint {
  font-size: .8rem;
  color: var(--text-muted);
  margin: 0 0 .5rem;
}

.notes-important__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.notes-important__item {
  padding: .45rem .6rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, .25);
  font-size: .8rem;
  margin: 10px 0px
}

.notes-important__item.is-important {
  border-color: rgba(220, 38, 38, .4);
  box-shadow: 0 4px 10px rgba(220, 38, 38, .12);
}

.notes-important__title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .15rem;
}

.notes-important__badge {
  font-size: .7rem;
  padding: .1rem .45rem;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
}

.notes-important__who {
  font-weight: 600;
}

.notes-important__when {
  font-size: .7rem;
  color: #94a3b8;
}

.notes-important__text {
  font-size: .8rem;
  color: #0f172a;
}

.notes-important__empty {
  font-size: .8rem;
  color: var(--text-muted);
}

.toolbar__notes-alert {
  font-size: .80rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
  border: none;
  box-shadow: 0 2px 4px rgba(148, 27, 27, 0.25);
}

.toolbar__notes-alert[hidden] {
  display: none;
}



/* ============================================================
   Panel TRABAJO
   ============================================================ */

.work-panel {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Cabecera mes en trabajo */
.work__monthnav {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.work__month-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-main);
}

/* Texto explicativo */
.work__hint {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Selector de modo de jornada */
.work__toolbar {
  margin-top: 0.15rem;
}

.work__modes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.work-mode-btn {
  border-radius: 999px;
  border: 1px solid #e66e6e;
  padding: 0.25rem 0.8rem;
  font-size: 0.78rem;
  background: rgba(255, 255, 255, 0.85);
  color: var(--text-main);
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.08s ease;
}

.work-mode-btn:hover {
  background: #ffffff;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.18);
}

.work-mode-btn:active {
  transform: scale(0.96);
}

/* Estado activo (cuando el JS añada .is-active) */
.work-mode-btn.is-active {
  background: var(--gurea-teal);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 10px 20px rgba(83, 160, 142, 0.4);
}

/* Botón "Quitar" un poco más suave */
.work-mode-btn--muted {
  background:#fee2e2 ;
  color: black;
 border: none;
}
.work-day-btn-vacation{
  border: none;
  color: black;
  background-color: rgba(167, 229, 195, 0.85);
}

.work-mode-btn--muted.is-active {
  background: #e5e7eb;
  color: #111827;
}

/* Leyenda inferior */
.work__legend {
  margin-top: 0.4rem;
  display: block;
}

/* botón peligro (Quitar) */
.work-mode-btn--danger {
  border-color: rgba(248, 113, 113, 0.7);
  color: #b91c1c;
}

.work-mode-btn--danger.is-active,
.work-mode-btn--danger:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
}

/* ============================================================
   Grid de trabajo (reutiliza el patrón visual del mes)
   ============================================================ */

.work-grid {
  margin-top: 0.35rem;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.35rem;
  text-align: center;
}
.work-grid > * {
  text-align: center;
}

/* Suponemos que el JS genera botones en #workGrid */
.work-grid button {
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #ffffff;
  min-height: 52px;
  padding: 0.3rem 0.25rem;
  font-size: 0.8rem;
  color: var(--text-main);
  cursor: pointer;
  position: relative;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition:
    background 0.12s ease,
    border-color 0.12s ease,
    box-shadow 0.12s ease,
    transform 0.08s ease;
}

.work-grid button:hover {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.16);
}

.work-grid button:active {
  transform: scale(0.97);
}

/* ==========================================
   TRABAJO (calendario interno) – colores claros
   ========================================== */

/* FULL */
.work-grid .work-day.is-work-full {
  background: #f7c88a;
  border-color: #f2a24a;
}

/* MAÑANA – mitad superior naranja */
.work-grid .work-day.is-work-am {
  background: linear-gradient(
    to bottom,
    #f7c88a 0%,
    #f7c88a 50%,
    #ffffff 50%,
    #ffffff 100%
  );
  border-color: #f2a24a;
}

/* TARDE – mitad inferior naranja */
.work-grid .work-day.is-work-pm {
  background: linear-gradient(
    to top,
    #f7c88a 0%,
    #f7c88a 50%,
    #ffffff 50%,
    #ffffff 100%
  );
  border-color: #f2a24a;
}

/* VACACIONES – verde suave sólido */
.work-grid .work-day.is-work-vacaciones {
  background: rgba(167, 229, 195, 0.85);
  border-color: rgba(94, 186, 141, 0.9);
}





/* ============================================================
   Panel ENTRENAMIENTO
   ============================================================ */

.training-panel {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

/* Nav de mes en entreno */
.training__monthnav {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
#header-entrenamiento{
  padding: 0.5rem !important;
}

.training__month-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-main);
}

/* Botones principales de acción */
.training__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.training__actions .btn {
  font-size: 0.8rem;
}

/* Resumen del mes */
.training__summary {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.05);
  padding: 0.7rem 0.85rem;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  font-size: 0.82rem;
  margin: 15px 0px 15px 0px;
}

@media (max-width: 640px) {
  .training__summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Lista de entrenos */
.training__listbox {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.training__list-title {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.training__list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Tarjeta de entreno individual (nueva) */
.training-card {
  border-radius: 14px;
  padding: .6rem .75rem;
  background: #fff;
  box-shadow: 0 1px 0 rgba(15,23,42,.03);
  margin-bottom: .45rem;
  font-size: .8rem;
}

.training-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .25rem;
}

.training-card__date {
  font-weight: 600;
}

.training-card__actions {
  display: flex;
  gap: .25rem;
}

.training-card__btn {
  border-radius: 999px;
  border: none;
  padding: .15rem .5rem;
  font-size: .65rem;
  cursor: pointer;
}

.training-card__btn--edit {
  background: #e0f2fe;
  color: #0369a1;
}

.training-card__btn--delete {
  background: #fee2e2;
  color: #b91c1c;
}

.training-card__metric {
  display: flex;
  flex-wrap: wrap;       /* para que en móvil no se rompa */
  gap: .75rem;
  font-size: .75rem;
  color: #475569;
}

.training-card__notes {
  margin-top: .25rem;
  font-size: .75rem;
}

/* Gráfica */
.training__chartpanel {
  margin-top: 0.3rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(0, 0, 0, 0.05);
  padding: 0.75rem 0.9rem 0.9rem;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.training__chart-title {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}


/* ==============================
   AGENDA
   ============================== */

.agenda__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.6rem;
}

.agenda__toolbar .input {
  flex: 1 1 180px;
}

.agenda__toolbar .select {
  flex: 0 0 150px;
}
.agenda__type-row {
  margin-top: 0.1rem;
  margin-bottom: 0.05rem;
}


/* Lista principal */
.agenda__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

/* Encabezados: HOY / ESTA SEMANA / ESTE MES, etc. */
.agenda__section-title {
  font-size: 0.8rem;              /* un pelín más grande */
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-main);        /* más contraste */
  font-weight: 600;               /* algo más de peso */
  margin-top: 0.9rem;
  margin-bottom: 0.2rem;
}

/* Tarjeta de evento */
.agenda__item {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 0.55rem 0.75rem;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.16rem;
}

/* línea fecha/hora */
.agenda__when {
  font-size: 0.74rem;
  color: var(--text-muted);
}

/* título + badge de categoría en una línea */
.agenda__title-row {
  margin-top: 0.05rem;
}


.agenda__title {
  font-weight: 600;
  color: var(--text-main);
}

/* descripción/notas */
.agenda__note {
  font-size: 0.78rem;
  color: var(--text-main);
}

/* Badge de categoría */
.agenda__badge {
  font-size: 0.68rem;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(83, 160, 142, 0.1);
  color: var(--gurea-teal);
}

/* Colores por categoría (mismo sistema que el resto) */
.agenda__badge--cita {
  background: rgba(247, 240, 186, 0.9);
  color: #6b5b00;
}

.agenda__badge--tarea {
  background: rgba(224, 219, 164, 0.95);
  color: #5f4f00;
}

.agenda__badge--evento {
  background: rgba(167, 203, 166, 0.95);
  color: #134e4a;
}

.agenda__badge--partido {
  background: rgba(126, 190, 163, 0.95);
  color: #14532d;
}

/* Estado vacío */
.agenda__empty {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Ocultar la lista antigua si sigue en el DOM */
section[data-panel="agenda"] > .list--events {
  display: none;
}



/* ============================================================
   Overlay AJUSTES / CÓDIGO COMPARTIDO
   ============================================================ */

.overlay[hidden] {
  display: none;
}

.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(4px);
  z-index: 9999;
}

.overlay__card {
  width: min(420px, 100%);
  background: #ffffff;
  border-radius: 20px;
  padding: 1.1rem 1.25rem 1.2rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.2);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.overlay__card h2 {
  margin: 0;
  font-size: 1.1rem;
}

.overlay__card p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

#formCoupleCode {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

#formCoupleCode .row {
  display: flex;
  gap: 0.5rem;
}

@media (max-width: 480px) {
  #formCoupleCode .row {
    flex-direction: column;
  }
}

#inpCoupleCode {
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: center;
  font-weight: 600;
}

/* Botón Cerrar abajo del todo */
#btnCloseSettings {
  font-size: 0.8rem;
  background-color: #ffacac;
}

/* ============================================================
   PLANES / BUCKET LIST
   ============================================================ */

/* Cabecera del sheet de planes */
.plans-header {
  align-items: flex-start;
}

.plans-header__text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.plans-header__subtitle {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.plans-header__star {
  font-size: 0.85rem;
}

/* grid de tarjetas */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
  margin-top: 0.75rem;
}

/* tarjeta principal */
.plan-card {
  position: relative;
  overflow: hidden; /* 👈 para que la barra respete el borde redondeado */
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  padding: 0.8rem 0.9rem 0.6rem 0.95rem;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

/* barra de color pegada al borde, recortada por el border-radius */
.plan-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 6px;
  background: rgba(83, 160, 142, 0.45);
}


/* fondos suaves por categoría */

.plan-card[data-category="lugares"]::before {
  background: rgba(56, 189, 148, 0.6);
}

.plan-card[data-category="restaurantes"]::before {
  background: rgba(248, 171, 88, 0.6);
}

.plan-card[data-category="pelis"]::before {
  background: rgba(129, 140, 248, 0.6);
}

.plan-card[data-category="planes"]::before {
  background: rgba(56, 189, 248, 0.6);
}

.plan-card[data-category="ideas"]::before {
  background: rgba(244, 114, 182, 0.6);
}

/* estado expandido (cuando se ve el form) */
.plan-card.is-expanded {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
}

/* título de la tarjeta */
.plan-card__title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--gurea-teal);
  margin: 0;
}

/* lista interna */
.plan-card__list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0.2rem 0 0.35rem;
  padding: 0;
  list-style: none;
}

/* item individual */
.plan-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  padding: 0.28rem 0.5rem;
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.95);
}

.plan-item--empty {
  opacity: 0.7;
  justify-content: center;
  font-style: italic;
}

/* marcado como hecho */
.plan-item.is-done {
  opacity: 0.6;
  text-decoration: line-through;
}

/* check redondo */
.plan-item__check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid #cbd5f5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  background: #fff;
}

.plan-item.is-done .plan-item__check {
  background: var(--gurea-teal);
  color: #fff;
  border-color: var(--gurea-teal);
}

.plan-item__text {
  flex: 1;
}

/* botones editar / borrar, versión “tap-friendly” */
.plan-item__edit,
.plan-item__del {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 0.95rem;
  padding: 0;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}

.plan-item__edit {
  color: #64748b;
}

.plan-item__del {
  color: #f97373;
}

.plan-item__edit:hover,
.plan-item__del:hover {
  background: rgba(148, 163, 184, 0.12);
}

/* en móvil, un pelín más grandes */
@media (max-width: 640px) {
  .plan-item__edit,
  .plan-item__del {
    width: 30px;
    height: 30px;
    font-size: 1rem;
  }
}

/* form de añadir: solo visible al expandir */
.plan-card__form {
  display: none;
  gap: 0.4rem;
  margin-top: 0.1rem;
}

.plan-card.is-expanded .plan-card__form {
  display: flex;
}

.plan-card__form input[type="text"] {
  flex: 1;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
}

.plan-card__form .btn {
  padding-inline: 0.7rem;
  border-radius: 999px;
}



/* ==== Cierre correcto dentro del sheet de Planes ==== */

.sheet__closebtn {
  position: static;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.15);
  background: #fff;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.plan-card__form {
  display: none;
  gap: 0.4rem;
  margin-top: 0.1rem;
}

.plan-card.is-expanded .plan-card__form {
  display: flex;
}

/* botón X para cerrar el editor */
.plan-card__close {
  border: none;
  background: #fee2e2;
  color: #b91c1c;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.plan-card__close:hover {
  background: #fecaca;
}

.plan-card__close:active {
  transform: scale(0.95);
}

@media (max-width: 640px) {
  .plan-card__close {
    width: 2.3rem;
    height: 2.3rem;
  }
}





/* ============================================================
   Footer
   ============================================================ */

.app-footer {
  text-align: center;
  padding: 0.6rem 1rem 1rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.app-footer .lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.app-footer .lang-toggle {
  border: none;
  background: transparent;
  padding: 0.2rem;
  border-radius: 9999px;
  cursor: pointer;
  opacity: 0.55;
  transform: translateY(0) scale(1);
  transition:
    opacity 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.app-footer .lang-toggle img.banderas {
  display: block;
  width: 26px;
  height: 26px;
  border-radius: 9999px;
}

/* Estado activo (idioma seleccionado) */
.app-footer .lang-toggle.is-active {
  opacity: 1;
  transform: translateY(-1px) scale(1.07);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8),
              0 0 12px rgba(0, 0, 0, 0.22);
}

/* Pequeño hover para ambos */
.app-footer .lang-toggle:not(.is-active):hover {
  opacity: 0.85;
  transform: translateY(-1px) scale(1.03);
}


.banderas{
width: 30px;
height: 30px;

}


/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 900px) {
  .app-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 1.5rem 1.1rem 1rem;
    margin-top: 15px;
  }
  main.grid {
    padding: 0 1.1rem 1.4rem;
  }

  .panel {
    padding: 0.9rem 0.9rem 1rem;
  }

  .week__cell,
  .month__cell {
    min-height: 70px;
  }
}


