/* Extensiones de estilo para la parte con acceso (login, formularios,
   gestión de usuarios, ficha de jugador...). Reutiliza los tokens de
   estilos.css. */

/* Cabecera de marca del club — igual que club.css .site-topbar, para que
   se vea la misma barra negra con el escudo en toda la plataforma. */
.site-topbar{
  background:#0c0c0c; color:#fff;
  padding:14px clamp(16px,4vw,40px); display:flex; align-items:center; justify-content:space-between; gap:18px; flex-wrap:wrap;
  border-bottom:3px solid var(--blue);
}
.site-brand{ display:flex; align-items:center; gap:14px; text-decoration:none; color:inherit; }
.site-brand img{ width:52px; height:52px; border-radius:50%; flex:none; background:#fff; }
.site-brand-text h1{
  font-family:'Oswald',var(--font-display),sans-serif; text-transform:uppercase; letter-spacing:.02em;
  font-size:19px; font-weight:600; color:#fff; line-height:1.15; margin:0;
}
.site-brand-text p{ font-size:12px; color:#b3b3b3; margin-top:2px; letter-spacing:.03em; }
.site-nav{
  display:flex; gap:4px; overflow-x:auto; background:#f7f7f7;
  padding:0 clamp(16px,4vw,40px); border-bottom:1px solid rgba(17,17,17,.12); scrollbar-width:thin;
}
.site-nav a{
  flex:none; text-decoration:none; cursor:pointer;
  padding:12px 16px; font-family:'Oswald',var(--font-display),sans-serif; font-size:13px; font-weight:500; letter-spacing:.04em;
  text-transform:uppercase; color:#4d4d4d; white-space:nowrap; display:flex; align-items:center; gap:7px;
  border-bottom:3px solid transparent; transition:color .12s, border-color .12s;
}
.site-nav a:hover{ color:#d97e0a; }
.site-nav a.active{ color:#111111; border-bottom-color:var(--blue); }
.site-nav a:focus-visible{ outline:2px solid var(--cyan); outline-offset:-2px; }

/* Submenú "Asistencias" (Registro / Control), con <details> nativo: se abre
   al pulsar/tocar, sin depender de JS ni de :hover (funciona igual en
   móvil). */
.nav-dropdown{ position:relative; flex:none; }
.nav-dropdown summary{
  list-style:none; cursor:pointer;
  flex:none; padding:12px 16px; font-family:'Oswald',var(--font-display),sans-serif; font-size:13px; font-weight:500; letter-spacing:.04em;
  text-transform:uppercase; color:#4d4d4d; white-space:nowrap; display:flex; align-items:center; gap:6px;
  border-bottom:3px solid transparent; transition:color .12s, border-color .12s;
}
.nav-dropdown summary::-webkit-details-marker{ display:none; }
.nav-dropdown summary::after{ content:'▾'; font-size:9px; }
.nav-dropdown summary:hover{ color:#d97e0a; }
.nav-dropdown summary.active, .nav-dropdown[open] summary{ color:#111111; border-bottom-color:var(--blue); }
.nav-dropdown-menu{
  position:absolute; top:100%; left:0; margin-top:1px; background:#fff; border:1px solid var(--border);
  border-radius:var(--radius-sm); box-shadow:var(--shadow); min-width:220px; z-index:40; padding:6px;
  display:flex; flex-direction:column; gap:2px;
}
.nav-dropdown-menu a{
  text-decoration:none; padding:9px 12px; border-radius:6px; font-size:13px; color:var(--text-primary);
  font-family:var(--font-body,inherit); text-transform:none; letter-spacing:0; font-weight:500; white-space:nowrap;
}
.nav-dropdown-menu a:hover{ background:var(--surface-2); }
.nav-dropdown-menu a.active{ background:var(--blue-soft); color:var(--blue); font-weight:700; }

.alert{ border-radius:var(--radius-sm); padding:12px 16px; font-size:13.5px; margin-bottom:2px; }
.alert-ok{ background:var(--green-soft); color:var(--green-text); border:1px solid var(--green); }
.alert-error{ background:var(--red-soft); color:var(--red-text); border:1px solid var(--red); }
.alert-info{ background:var(--blue-soft); color:var(--text-primary); border:1px solid var(--blue); }

.role-chip{
  display:inline-flex; align-items:center; padding:4px 11px; border-radius:999px; font-size:11.5px; font-weight:700;
  text-transform:uppercase; letter-spacing:.03em; background:rgba(255,255,255,.10); color:#fff;
  border:1px solid rgba(255,255,255,.22);
}
.role-super_admin{ background:rgba(255,152,21,.30); border-color:rgba(255,152,21,.65); font-weight:800; }
.role-admin{ background:rgba(255,255,255,.22); border-color:rgba(255,255,255,.42); }
.role-delegado{ background:rgba(255,255,255,.12); border-color:rgba(255,255,255,.28); }
.role-entrenador{ background:rgba(255,255,255,.08); border-color:rgba(255,255,255,.24); border-style:dashed; }
.role-padre{ background:rgba(34,165,101,.22); border-color:rgba(34,165,101,.5); }
.user-name{ color:#b8b8b8; font-size:13px; }
.btn-ghost-light-alt{ background:rgba(255,255,255,.06); border-color:rgba(255,255,255,.18); color:#b8b8b8; }
.btn-ghost-light-alt:hover{ background:rgba(255,255,255,.14); color:#fff; }

/* Auth pages (login / forgot / install) */
.auth-wrap{ min-height:100vh; display:flex; align-items:center; justify-content:center; padding:24px; background:var(--bg); }
.auth-card{
  width:100%; max-width:380px; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius);
  padding:clamp(24px,5vw,34px); box-shadow:var(--shadow);
}
.auth-crest{ display:block; margin:0 auto 14px; width:64px; height:64px; border-radius:50%; background:#fff; box-shadow:0 0 0 4px rgba(255,152,21,.18), var(--shadow); }
.auth-card h1{ font-size:19px; text-align:center; margin-bottom:4px; }
.auth-card .sub{ text-align:center; color:var(--text-muted); font-size:13px; margin-bottom:20px; }
.auth-links{ display:flex; justify-content:space-between; margin-top:14px; font-size:12.5px; }
.auth-links a{ color:var(--blue); text-decoration:none; }
.auth-links a:hover{ text-decoration:underline; }

/* Forms */
.form-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:14px 18px; }
.form-field{ display:flex; flex-direction:column; gap:6px; }
.form-field.span-2{ grid-column:span 2; }
.form-field label{ font-size:12px; font-weight:600; color:var(--text-secondary); }
.form-field .hint{ font-size:11.5px; color:var(--text-muted); }
.form-field input[type=text], .form-field input[type=email], .form-field input[type=password],
.form-field input[type=number], .form-field input[type=date], .form-field input[type=tel],
.form-field select, .form-field textarea{
  border:1px solid var(--border-strong); background:var(--surface-2); color:var(--text-primary);
  border-radius:9px; padding:9px 12px; font-size:14px; font-family:inherit; width:100%;
}
.form-field input:focus-visible, .form-field select:focus-visible, .form-field textarea:focus-visible{
  outline:2px solid var(--cyan); outline-offset:1px;
}
.form-actions{ display:flex; gap:10px; margin-top:18px; flex-wrap:wrap; }
.form-card{ background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:20px clamp(18px,4vw,26px); box-shadow:var(--shadow); }
.checkbox-field{ display:flex; align-items:center; gap:8px; font-size:13.5px; color:var(--text-secondary); }

.btn-danger{ background:var(--red); border-color:var(--red); color:#fff; }
.btn-danger-outline{ background:transparent; border:1px solid var(--red); color:var(--red-text); }
.btn-ok{ background:var(--green); border-color:var(--green); color:#fff; }

code{ background:var(--surface-2); padding:2px 6px; border-radius:4px; font-family:var(--font-mono); font-size:.95em; }
.ok{ color:var(--green-text); font-weight:600; }
.err{ color:var(--red-text); font-weight:600; }

/* Section headers within the app */
.section-head{ display:flex; justify-content:space-between; align-items:flex-end; gap:14px; flex-wrap:wrap; }
.section-head h2{ font-size:18px; }
.section-head p{ color:var(--text-muted); font-size:12.5px; margin-top:2px; }

/* Users table & category list actions */
.actions-cell{ display:flex; gap:6px; flex-wrap:wrap; }
.actions-cell form{ display:inline; }
.badge{ display:inline-flex; align-items:center; padding:3px 9px; border-radius:999px; font-size:11px; font-weight:700; }
.badge-on{ background:var(--green-soft); color:var(--green-text); }
.badge-off{ background:var(--red-soft); color:var(--red-text); }

/* RFEDH embed card reused inside categoria.php */
.rfedh-card{ background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--shadow); overflow:hidden; }
.rfedh-card .rfedh-head{ display:flex; justify-content:space-between; align-items:center; gap:10px; padding:14px 18px; border-bottom:1px solid var(--border); flex-wrap:wrap; }
.rfedh-card iframe{ width:100%; border:0; display:block; background:#fff; }
.tabs-row{ display:flex; gap:8px; }
.tab-btn{
  appearance:none; border:1px solid var(--border-strong); background:var(--surface); color:var(--text-secondary);
  font-family:var(--font-display); text-transform:uppercase; letter-spacing:.03em; font-size:12px; font-weight:600;
  padding:8px 14px; border-radius:999px; cursor:pointer;
}
.tab-btn.active{ background:var(--blue); border-color:var(--blue); color:#fff; }

.hijo-card{ background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:20px; box-shadow:var(--shadow); }
.hijo-card h3{ font-size:17px; margin-bottom:8px; }
.hijo-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:10px 16px; margin-top:10px; }
.hijo-field{ font-size:13px; }
.hijo-field .k{ color:var(--text-muted); font-size:11px; text-transform:uppercase; letter-spacing:.04em; display:block; }
.hijo-field .v{ color:var(--text-primary); font-weight:600; }

/* Observaciones (roster table): texto largo truncado con "..." — el título
   completo aparece al pasar el ratón por encima. */
.obs-cell{ max-width:220px; }
.obs-text{ display:inline-block; max-width:180px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; vertical-align:middle; }

/* Control de asistencias: detalle día a día (verde presente / rojo ausente). */
table.asist-detalle{ min-width:520px; }
table.asist-detalle th.num-cell, table.asist-detalle td.num-cell{ text-align:center; }
.asist-dot{
  display:inline-flex; align-items:center; justify-content:center; width:22px; height:22px; border-radius:50%;
  font-size:12px; font-weight:700; line-height:1;
}
.asist-si{ background:var(--green-soft); color:var(--green-text); }
.asist-no{ background:var(--red-soft); color:var(--red-text); }
.asist-none{ background:transparent; color:var(--text-muted); }
