.home-boton {
  border: 1px solid var(--border); border-radius: 16px; padding: 24px 20px;
  margin-bottom: 14px; cursor: pointer; transition: all 0.3s var(--ease-sheet);
  text-align: center; background: var(--surface-2);
}
.home-boton:hover { transform: translateY(-4px); box-shadow: 0 10px 24px var(--black-sm); border-color: var(--border-mid); }
.home-boton.principal { border-color: var(--brand); background: var(--brand-lighter); }
.home-boton.principal:hover { background: var(--brand-warm-3); border-color: var(--brand-dk); transform: translateY(-4px); }
.home-boton .hb-icon { font-size: 2.2rem; margin-bottom: 10px; transition: transform 0.3s; }
.home-boton:hover .hb-icon { transform: scale(1.1); }
.home-boton .hb-titulo { font-weight: 800; font-size: 1.05rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.home-boton.principal .hb-titulo { color: var(--brand); }
.home-boton .hb-sub { font-size: 0.85rem; color: var(--neutral-gray); line-height: 1.4; }

.btn-accion-home {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 10px; border: 1px solid var(--border-light); border-radius: 14px;
  background: var(--surface-light); cursor: pointer; font-family: inherit;
  font-size: 0.75rem; font-weight: 700; color: var(--neutral-dark);
  text-transform: uppercase; letter-spacing: 0.5px;
  transition: all 0.3s var(--ease-sheet);
}
.btn-accion-home:hover { transform: translateY(-3px); box-shadow: 0 6px 16px var(--black-md); border-color: var(--brand); background: var(--brand-warm); }
.btn-accion-home:active { transform: translateY(0) scale(0.97); }

.btn-home-sub {
  flex: 1; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: 10px;
  background: transparent; color: var(--muted); font-size: 0.78rem; font-weight: 700;
  cursor: pointer; transition: all 0.3s ease; font-family: inherit; text-align: center;
}
.btn-home-sub:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); background: var(--brand-warm); }
.btn-home-sub:disabled { opacity: 0.32; cursor: not-allowed; }

.res-card-home {
  border: 1px solid var(--border); border-radius: 14px; padding: 6px 0px;
  margin-bottom: 10px; background: var(--surface-2); text-align: left;
  animation: smoothSlideUp 0.4s var(--ease-sheet) both;
}
.res-card-home.vigente       { border-color: var(--success-bdr); background: var(--success-bg); }
.res-card-home.vencimiento   { border-color: var(--warning-bdr); background: var(--warning-bg); }
.res-card-home.vencida       { border-color: var(--danger-bdr); background: var(--danger-bg); }
.res-card-home.futura        { border-color: var(--border); background: var(--surface-3); opacity: 0.7; }
.res-card-home.pendiente-mens{ border-color: var(--warning-bdr); background: var(--warning-bg); }
.res-card-home.confirmada-clase { border-color:var(--border-light); background:var(--surface-2); }
.res-card-home.pendiente-clase  { border-color:var(--border-light); background:var(--surface-2); }
.res-card-home.reagendar-clase  { border-color:var(--border-light); background:var(--surface-2); }
.res-card-equip { color: var(--neutral-mid); }

.home-top-mobile { display: none; }
.home-emoji-desktop { display: block; }
.home-mobile-actions { display: none; }
.hmr { display: flex; align-items: center; justify-content: space-between; padding: 14px 4px; border-bottom: 1px solid var(--gray-divider); }
.hmr-texto { text-align: left; }
.hmr-texto .hmr-titulo { font-size: 0.8rem; font-weight: 800; color: var(--brand); text-transform: uppercase; letter-spacing: 0.7px; margin-bottom: 3px; }
.hmr-texto .hmr-sub { font-size: 0.77rem; color: var(--muted); }
.hmr-btn-round { width: 44px; height: 44px; flex-shrink: 0; background: var(--brand-light); border: none; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; font-family: inherit; }
.hmr-btn-round .material-symbols-outlined { font-size: 1.2rem; color: var(--brand); }
.btn-logout-mobile { background: var(--brand-light); border: 0px solid var(--brand-glow); cursor: pointer; color: var(--brand); padding: 8px; border-radius: 10px; font-family: inherit; line-height: 1; }
.btn-logout-mobile .material-symbols-outlined { font-size: 1.5rem; vertical-align: middle; }
#btn-logout-desktop { display: block; }

@media (max-width: 600px) {
  .home-top-mobile { display: flex !important; position: relative; align-items: center; justify-content: center; padding: 10px 0 6px; margin-bottom: 4px; }
  .home-emoji-mobile { font-size: 2.8rem; animation: popBounce 0.6s var(--ease-sheet); }
  .home-emoji-desktop { display: none !important; }
  .home-top-acciones { position: absolute; right: 0; top: 50%; transform: translateY(-50%); display: flex; gap: 6px; }
  .btn-logout-mobile { position: static; }
  #btn-editar-desktop { display: none; }
  #btn-logout-desktop { display: none; }
  .home-mobile-actions { display: block !important; margin-top: 8px; border-top: 1px solid var(--gray-divider); }
}

@media (prefers-color-scheme: dark) {
  #btn-meses-pasados, #btn-meses-actuales { background: var(--surface-2) !important; border-color: var(--border) !important; color: var(--muted) !important; }
  #pwa-banner { background: var(--surface) !important; border-color: var(--brand) !important; }
  #pwa-banner div { color: var(--muted); }
  #pwa-banner div[style*="font-weight:800"] { color: var(--text) !important; }
  #pwa-instrucciones { background: var(--surface-2) !important; border-color: var(--border) !important; color: var(--text) !important; }
}

/* ── Profile row ─────────────────────────────────────── */
.home-profile-row { display:flex; align-items:center; gap:10px; margin-bottom:20px; }
.home-avatar { width:46px; height:46px; border-radius:50%; background:var(--brand); display:flex; align-items:center; justify-content:center; font-weight:800; font-size:17px; color:var(--white); flex-shrink:0; overflow:hidden; }
.home-avatar img { width:100%; height:100%; object-fit:cover; }
.home-profile-name { flex:1; }
.home-saludo-small { font-size:0.72rem; color:var(--muted); font-weight:500; text-align:left; margin-top: 15px; }
.home-nombre { font-size:1.05rem; font-weight:800; margin:0; line-height:1.2; text-align:left; }
.home-icon-btns { display:flex; gap:6px; }
.home-icon-btn { width:38px; height:38px; border-radius:10px; background:var(--surface-2); border:1.5px solid var(--border-light); display:flex; align-items:center; justify-content:center; cursor:pointer; color:var(--brand); transition:background 0.15s; }
.home-icon-btn:hover { background:var(--brand-lightest); }
.home-icon-btn .material-symbols-outlined { font-size:18px; }
.home-subtitulo { margin-bottom:20px; font-weight:500; font-size:0.88rem; color:var(--muted); }

/* ── Cards rediseñadas ───────────────────────────────── */
.res-card-nueva { background:var(--surface-2); border:1.5px solid var(--border-light); border-radius:14px; margin-bottom:10px; overflow:hidden; }
.res-card-nueva .rn-header { padding:13px 14px 11px; display:flex; flex-direction:column; align-items:flex-start; gap:6px; }
.res-card-nueva .rn-top { width:100%; }
.res-card-nueva .rn-header .fi-pills { margin:0; }
.res-card-nueva .rn-equip-estado { width:100%; margin:0; }
.res-card-nueva .rn-top { display:flex; align-items:flex-start; justify-content:space-between; margin-bottom:5px; }
.res-card-nueva .rn-date { font-size:0.9rem; font-weight:800; }
.badge-pendiente { font-size:0.71rem; font-weight:600; padding:4px 9px; border-radius:20px; display:inline-flex; align-items:center; gap:4px; background:var(--warning-bg); color:var(--amber-dark); border:1px solid var(--amber); white-space:nowrap; }
.badge-confirmada { font-size:0.71rem; font-weight:600; padding:4px 9px; border-radius:20px; display:inline-flex; align-items:center; gap:4px; background:var(--green-light); color:var(--green-dark); border:1px solid var(--success); white-space:nowrap; }
.badge-reagendar { font-size:0.71rem; font-weight:600; padding:4px 9px; border-radius:20px; display:inline-flex; align-items:center; gap:4px; background:var(--purple-lightest); color:var(--dk-purple-mid); border:1px solid var(--purple-border-soft); white-space:nowrap; }
.badge-cancelada { font-size:0.71rem; font-weight:600; padding:4px 9px; border-radius:20px; display:inline-flex; align-items:center; gap:4px; background:var(--danger-bg); color:var(--danger); border:1px solid var(--danger); white-space:nowrap; }
.badge .material-symbols-outlined { font-size:13px; }
.res-card-nueva .rn-divider { height:1px; background:var(--border-light); }
.res-card-nueva .rn-mas-info { display:flex; align-items:center; justify-content:space-between; padding:9px 14px; cursor:pointer; color:var(--muted); font-size:0.77rem; font-weight:600; user-select:none; transition:color 0.15s; }
.res-card-nueva .rn-mas-info:hover { color:var(--brand); }
.res-card-nueva .rn-mas-info .rn-chevron { font-size:16px; transition:transform 0.3s; }
.res-card-nueva .rn-mas-info.open .rn-chevron { transform:rotate(180deg); }
.res-card-nueva .rn-body { max-height:0; overflow:hidden; transition:max-height 0.5s var(--ease-sheet); background:transparent; }
.res-card-nueva .rn-body.open { max-height:600px; }
.res-card-nueva .rn-body-inner { padding:12px 14px 14px; font-size:0.77rem; color:var(--muted); line-height:1.65; }
.res-card-nueva .rn-body-inner .fi-pills { margin-top:10px; display:flex; flex-wrap:wrap; gap:6px; }
.res-card-nueva .rn-body-inner .fi-pill { font-size:0.71rem; font-weight:600; padding:4px 9px; border-radius:20px; display:inline-flex; align-items:center; gap:4px; background:var(--surface-2); color:var(--muted); border:1px solid var(--border-light); }
.res-card-nueva .rn-body-inner .fi-pill-maps { color:var(--brand); border-color:var(--brand); background:var(--brand-lightest); }
.res-card-nueva .rn-cancel-wrap { text-align:center; padding: 8px 14px 8px; }
.btn-cancel-text { background:none; border:none; color:var(--danger); font-size:0.74rem; font-weight:600; cursor:pointer; font-family:inherit; text-decoration:underline; text-underline-offset:3px; }
.btn-cancel-text:hover { opacity:0.8; }

/* ── Pantalla gestionar ──────────────────────────────── */
.sg-toggle-row { display:flex; gap:8px; margin-bottom:16px; }
.sg-toggle-opt { flex:1; padding:9px; border-radius:10px; border:1.5px solid var(--border-light); background:var(--surface-2); color:var(--muted); font-size:0.77rem; font-weight:700; cursor:pointer; font-family:inherit; text-align:center; transition:all 0.15s; }
.sg-toggle-opt.active { border-color:var(--brand); color:var(--brand); background:var(--brand-lightest); }
.sg-fecha-item { background:var(--surface-2); border:1.5px solid var(--border-light); border-radius:12px; margin-bottom:8px; overflow:hidden; cursor:pointer; transition:border-color 0.15s; }
.sg-fecha-item:hover { border-color:var(--brand); }
.sg-fecha-item.sel { border-color:var(--brand); background:var(--brand-lightest); }
.sg-fecha-item .sfi-header { display:flex; align-items:center; justify-content:space-between; padding:11px 13px; }
.sg-fecha-item .sfi-title { font-size:0.88rem; font-weight:700; margin-bottom:6px; }
.sg-fecha-item .sfi-circle { width:24px; height:24px; border-radius:50%; border:2px solid var(--border-light); display:flex; align-items:center; justify-content:center; flex-shrink:0; transition:all 0.15s; }
.sg-fecha-item .sfi-circle .material-symbols-outlined { font-size:14px; color:transparent; }
.sg-fecha-item.sel .sfi-circle { background:var(--brand); border-color:var(--brand); }
.sg-fecha-item.sel .sfi-circle .material-symbols-outlined { color:var(--white); }
.sg-no-fechas { background:var(--surface-2); border:1.5px solid var(--border-light); border-radius:12px; padding:16px; text-align:center; font-size:0.8rem; color:var(--muted); line-height:1.6; }
.sg-no-fechas .material-symbols-outlined { font-size:2rem; display:block; margin-bottom:8px; color:var(--brand); }
.rn-equip-estado { display:flex; align-items:center; justify-content:space-between; margin-top:8px; }
.rn-estado-txt { font-size:0.71rem; font-weight:600; display:inline-flex; align-items:center; gap:3px; }
/* ── Status bar ──────────────────────────────────────── */
.rn-status-bar { display:flex; align-items:center; gap:8px; padding:16px 14px; font-size:0.78rem; font-weight:700; cursor:pointer; margin-top: -8px; }
.rn-status-bar .material-symbols-outlined { font-size:15px; flex-shrink:0; }
.rn-status-link { margin-left:auto; font-size:0.7rem; font-weight:600; text-decoration:underline; text-underline-offset:2px; opacity:0.85; white-space:nowrap; }
.rn-status-pendiente { background:var(--amber-dark,#b45309); color:var(--white); }
.rn-status-confirmada { background:var(--success-dark); color:var(--white); }
.rn-status-cancelada { background:var(--danger); color:var(--white); }
.rn-status-reagendar { background:var(--dk-purple-mid,#7c3aed); color:var(--white); }
.fi-pill-lugar-fusionado { text-decoration:none; }
.fi-pill-fusionado-sep { width:1px; height:12px; background:currentColor; opacity:0.3; margin:0 4px; flex-shrink:0; }


/* ── Empty state home ────────────────────────────────── */
.empty-state-home { display:flex; flex-direction:column; min-height:80vh; }
.empty-state-topbar { display:flex; align-items:center; justify-content:space-between; padding:4px 0 16px; }
.empty-state-avatar { width:40px; height:40px; border-radius:50%; background:var(--brand); display:flex; align-items:center; justify-content:center; font-weight:800; font-size:15px; color:var(--white); overflow:hidden; border:1.5px solid var(--border-light); cursor:pointer; flex-shrink:0; }
.empty-state-contacto { display:flex; align-items:center; gap:5px; padding:7px 12px; background:var(--surface-2); border:1.5px solid var(--border-light); border-radius:20px; cursor:pointer; color:var(--muted); font-size:0.7rem; font-weight:700; font-family:inherit; transition:all 0.15s; }
.empty-state-contacto:hover { border-color:var(--brand); color:var(--brand); }
.empty-state-contacto .material-symbols-outlined { font-size:14px; }
.empty-state-body { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; padding:0 12px 32px; }
.empty-state-icon { width:96px; height:96px; border-radius:28px; background:var(--surface-2); border:1.5px solid var(--border-light); display:flex; align-items:center; justify-content:center; margin:0 auto 22px; }
.empty-state-icon .material-symbols-outlined { font-size:3rem; color:var(--brand); }
.empty-state-saludo { font-size:1rem; font-weight:800; color:var(--text); margin-bottom:6px; }
.empty-state-msg { font-size:0.82rem; color:var(--muted); line-height:1.65; margin-bottom:28px; }
.empty-state-links { display:flex; flex-direction:column; align-items:center; gap:10px; }
.empty-state-link { font-size:0.76rem; color:var(--muted); text-decoration:underline; text-underline-offset:3px; cursor:pointer; font-weight:600; }
.empty-state-link:hover { color:var(--brand); }

#historial-pills-mes::-webkit-scrollbar { display:none; }
.historial-pill-mes { flex-shrink:0; padding:8px 16px; border-radius:99px; border:1.5px solid var(--border); background:transparent; color:var(--muted); font-size:0.82rem; font-weight:700; cursor:pointer; transition:all 0.2s; white-space:nowrap; font-family:inherit; }
.historial-pill-mes.activa { background:var(--brand); border-color:var(--brand); color:var(--white); } 