/* Fénix FS · Gestión del club · estilos (tema claro: blanco y grises, rojo del club como acento) */
:root {
  --bg: #f6f7f9; --panel: #ffffff; --panel-2: #f1f3f6; --line: #e3e6eb; --line-2: #cfd4dc;
  --text: #1a1d23; --text-2: #5b6271; --muted: #8a92a1;
  --red: #e2001a; --red-dark: #b00014; --red-soft: #fdecee; --gold: #b8860b; --gold-soft: #fbf3dd;
  --green: #1f9d55; --green-soft: #e6f6ec; --grey-soft: #eef0f3;
  /* alias que usa el código para textos secundarios */
  --grey: var(--text-2); --grey-dark: var(--muted); --white: var(--text);
  --font-display: "Bebas Neue", Impact, sans-serif; --font-body: "Inter", system-ui, sans-serif; --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 20px 50px rgba(16, 24, 40, 0.18);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); line-height: 1.5; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; letter-spacing: 0.04em; margin: 0; color: var(--text); }
h1 { font-size: 2.6rem; line-height: 1; } h2 { font-size: 2.1rem; line-height: 1; } h3 { font-size: 1.25rem; color: var(--text-2); margin-bottom: 0.8rem; letter-spacing: 0.08em; }
.muted { color: var(--text-2); font-size: 0.92rem; margin: 0.3rem 0 0; }
.kicker { font-size: 0.72rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--red); font-weight: 700; margin: 0 0 0.4rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; padding: 0.7rem 1.3rem; font-family: var(--font-display); font-size: 1.1rem; letter-spacing: 0.08em; border-radius: 999px; border: 1.5px solid transparent; cursor: pointer; background: transparent; color: var(--text); transition: transform 0.15s, background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.6; cursor: wait; transform: none; }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 2px 8px rgba(226,0,26,0.25); } .btn-primary:hover { background: var(--red-dark); }
.btn-outline { border-color: var(--text); } .btn-outline:hover { background: var(--text); color: #fff; }
.btn-ghost { border-color: var(--line-2); color: var(--text-2); background: #fff; } .btn-ghost:hover { color: var(--text); border-color: var(--text-2); }
.btn-small { padding: 0.42rem 0.9rem; font-size: 0.95rem; }
.btn-block { width: 100%; }
.btn-danger { border-color: #f3c2c7; color: #c4001a; background: #fff; } .btn-danger:hover { background: var(--red); color: #fff; border-color: var(--red); }

/* Acceso */
.login { min-height: 100svh; display: grid; place-items: center; padding: 1.5rem; background: radial-gradient(ellipse at top, rgba(226,0,26,0.07), transparent 55%), var(--bg); }
.login-box { width: min(100%, 420px); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 2rem; text-align: center; box-shadow: var(--shadow-lg); }
.login-box img { margin: 0 auto 1rem; display: block; }
.login-box form { margin-top: 1.4rem; text-align: left; }
.login-box .back { display: inline-block; margin-top: 1.4rem; color: var(--text-2); font-size: 0.85rem; }
label { display: block; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-2); font-weight: 600; margin: 0 0 0.3rem; }
input, select, textarea { width: 100%; padding: 0.65rem 0.8rem; font: inherit; color: var(--text); background: #fff; border: 1px solid var(--line-2); border-radius: 8px; margin-bottom: 0.9rem; color-scheme: light; }
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(226,0,26,0.12); }
.status { min-height: 1.2em; font-size: 0.9rem; margin: 0.2rem 0 0; } .status.ok { color: var(--green); } .status.error { color: var(--red-dark); }

/* Barra superior */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 1.5rem; padding: 0.6rem 1.2rem; background: rgba(255,255,255,0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-display); font-size: 1.3rem; letter-spacing: 0.08em; }
.brand em { font-style: normal; color: var(--red); }
.tabs { display: flex; gap: 0.3rem; flex: 1; overflow-x: auto; }
.tab { position: relative; padding: 0.55rem 0.9rem; border: 0; border-radius: 999px; background: transparent; color: var(--text-2); font: inherit; font-weight: 600; font-size: 0.9rem; cursor: pointer; white-space: nowrap; }
.tab:hover { color: var(--text); background: var(--grey-soft); } .tab.active { background: var(--red); color: #fff; }
.badge { display: inline-grid; place-items: center; min-width: 1.3rem; height: 1.3rem; padding: 0 0.3rem; margin-left: 0.3rem; border-radius: 999px; background: var(--gold); color: #fff; font-size: 0.7rem; font-style: normal; }
.user { display: flex; align-items: center; gap: 0.6rem; font-size: 0.8rem; color: var(--text-2); }
.content { width: min(100% - 2rem, 1200px); margin: 1.6rem auto 4rem; }
.view { display: none; } .view.active { display: block; }
.view-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }
.toolbar { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.toolbar input, .toolbar select { width: auto; margin: 0; padding: 0.5rem 0.75rem; }
.toolbar input[type="search"] { min-width: 240px; }

/* Resumen */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.8rem; margin-bottom: 1.6rem; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; text-align: center; box-shadow: var(--shadow); }
.tile strong { display: block; font-family: var(--font-display); font-size: 2.4rem; line-height: 1; color: var(--text); }
.tile span { font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-2); }
.tile.ok { border-top: 3px solid var(--green); } .tile.warn { border-top: 3px solid var(--gold); } .tile.money { border-top: 3px solid var(--red); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow); }
.mini { list-style: none; margin: 0; padding: 0; }
.mini li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.45rem 0; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.mini li:last-child { border-bottom: 0; } .mini small { color: var(--text-2); }

/* Tablas */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); }
.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 720px; }
.table th { text-align: left; font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-2); padding: 0.75rem 0.8rem; border-bottom: 1px solid var(--line); background: var(--panel-2); }
.table td { padding: 0.65rem 0.8rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: #fafbfc; }
.table .num { font-family: var(--font-display); font-size: 1.1rem; color: var(--red); }
.table .acciones { text-align: right; white-space: nowrap; }
.table .acciones .btn { margin-left: 0.3rem; }
.table small { display: block; color: var(--text-2); font-size: 0.78rem; }
.table a { color: var(--red-dark); }
.pill { display: inline-block; padding: 0.15rem 0.6rem; border-radius: 999px; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.pill-activo, .pill-pagado, .pill-aceptada { background: var(--green-soft); color: var(--green); }
.pill-pendiente, .pill-nueva { background: var(--gold-soft); color: var(--gold); }
.pill-baja, .pill-devuelto, .pill-descartada { background: var(--grey-soft); color: var(--text-2); }
.money-ok { color: var(--green); font-weight: 600; } .money-due { color: var(--gold); font-weight: 600; }

/* Ventana */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 1rem; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(26,29,35,0.45); backdrop-filter: blur(3px); }
.modal-panel { position: relative; width: min(100%, 640px); max-height: calc(100svh - 2rem); overflow-y: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 1.8rem; box-shadow: var(--shadow-lg); }
.modal-close { position: absolute; top: 0.8rem; right: 0.8rem; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-2); background: #fff; color: var(--text); font-size: 1.4rem; cursor: pointer; }
.modal-close:hover { background: var(--grey-soft); }
.modal-panel h2 { margin-bottom: 1rem; padding-right: 2.5rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: flex-end; margin-top: 0.4rem; }
.form-actions .left { margin-right: auto; }
.hist { margin: 1rem 0 0; padding-top: 1rem; border-top: 1px solid var(--line); }

.toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); z-index: 60; background: var(--text); color: #fff; padding: 0.7rem 1.1rem; border-radius: 10px; font-weight: 600; font-size: 0.9rem; box-shadow: var(--shadow-lg); }
.toast.error { background: var(--red-dark); color: #fff; }

/* Jugadores: periodos de cuota y justificantes */
.periodos { display: inline-flex; flex-wrap: wrap; gap: 0.3rem; max-width: 300px; }
.periodo { display: inline-grid; place-items: center; min-width: 2.1rem; height: 1.5rem; padding: 0 0.4rem; border-radius: 6px; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em; background: var(--grey-soft); color: var(--muted); border: 1px solid var(--line); }
.periodo.ok { background: var(--green-soft); color: var(--green); border-color: #bfe6cc; }
.periodo.parcial { background: var(--gold-soft); color: var(--gold); border-color: #ecd9a0; }
.inline-plan { width: auto; margin: 0; padding: 0.35rem 1.6rem 0.35rem 0.6rem; font-size: 0.85rem; }
.file-row { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.file-row input[type="file"] { width: auto; padding: 0.4rem; margin: 0; }
.file-note { font-size: 0.78rem; color: var(--text-2); }
.btn-link { background: none; border: 0; color: var(--red-dark); font: inherit; font-size: 0.85rem; cursor: pointer; padding: 0; text-decoration: underline; }
.thumb { max-width: 100%; max-height: 70vh; border-radius: 8px; display: block; margin: 0 auto; }
.import-list { max-height: 50vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 0.4rem 0.8rem; margin-bottom: 1rem; background: #fff; }
.import-list label { display: flex; gap: 0.5rem; align-items: center; text-transform: none; letter-spacing: 0; font-size: 0.9rem; font-weight: 500; color: var(--text); padding: 0.3rem 0; margin: 0; }
.import-list input { width: auto; margin: 0; }

@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; gap: 0.6rem; } .user { margin-left: auto; } .user span { display: none; }
  .two { grid-template-columns: 1fr; } .form-grid { grid-template-columns: 1fr; }
  .toolbar input[type="search"] { min-width: 0; width: 100%; }
  h2 { font-size: 1.8rem; }
}

/* Jugadores: color de toda la fila según el cobro, y exentos */
.table tr.row-ok td { background: var(--green-soft); }
.table tr.row-parcial td { background: var(--gold-soft); }
.table tr.row-exento td { background: #eef3fb; }
.table tr.row-ok:hover td { background: #d9f0e2; }
.table tr.row-parcial:hover td { background: #f6e9c4; }
.table tr.row-exento:hover td { background: #e2eaf8; }
.pill-exento { background: #e2eaf8; color: #2f5fa3; }
.inline-exento { display: flex; align-items: center; gap: 0.35rem; margin: 0.35rem 0 0; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; text-transform: none; color: var(--text-2); cursor: pointer; }
.inline-exento input { width: auto; margin: 0; }
label.check { display: flex; align-items: center; gap: 0.5rem; text-transform: none; letter-spacing: 0; font-size: 0.9rem; font-weight: 500; color: var(--text); margin: 0.2rem 0 1rem; }
label.check input { width: auto; margin: 0; }

/* Usuarios: formulario de invitación */
.invite-form { display: grid; grid-template-columns: 1.4fr 1fr 1.4fr auto; gap: 0 0.8rem; align-items: end; }
.invite-form input, .invite-form select { margin-bottom: 0; }
.invite-actions { padding-bottom: 0.1rem; }
@media (max-width: 760px) { .invite-form { grid-template-columns: 1fr; gap: 0.6rem; } }

/* Acceso con usuario y contraseña, creación de usuarios */
.link-toggle { background: none; border: 0; color: var(--text-2); font: inherit; font-size: 0.85rem; text-decoration: underline; cursor: pointer; margin-top: 1rem; padding: 0; }
.link-toggle:hover { color: var(--text); }
.login-box .link-toggle { display: block; margin: 1rem auto 0; }
.login-box .back { display: block; margin-top: 0.6rem; }
.pass-row { display: flex; gap: 0.4rem; align-items: center; } .pass-row input { margin: 0; }
.invite-form { grid-template-columns: 1fr 1fr 1.3fr 1.3fr auto; }
@media (max-width: 760px) { .invite-form { grid-template-columns: 1fr; } }
details.panel summary { cursor: pointer; font-weight: 600; color: var(--text-2); list-style: none; }
details.panel summary::-webkit-details-marker { display: none; }
details.panel summary::before { content: "▸ "; } details.panel[open] summary::before { content: "▾ "; }
details.panel[open] summary { margin-bottom: 0.8rem; }
.cred { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; margin: 1rem 0; }
.cred div { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 0.8rem 1rem; }
.cred span { display: block; font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-2); }
.cred strong { font-size: 1.3rem; font-family: ui-monospace, Consolas, monospace; letter-spacing: 0.04em; user-select: all; }
@media (max-width: 760px) { .cred { grid-template-columns: 1fr; } }

/* Selección múltiple de jugadores */
.col-check { width: 2.2rem; text-align: center; } .col-check input { width: 1.05rem; height: 1.05rem; margin: 0; accent-color: var(--red); cursor: pointer; }
.table tr.seleccionada td { background: var(--red-soft); }
.bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.2rem; margin-bottom: 0.9rem; padding: 0.7rem 1rem; background: #fff; border: 1px solid var(--red); border-radius: var(--radius); box-shadow: var(--shadow); }
.bulk-group { display: inline-flex; align-items: center; gap: 0.4rem; } .bulk-group label { margin: 0; } .bulk-group select, .bulk-group input { width: auto; margin: 0; padding: 0.4rem 0.6rem; } .bulk-group input { max-width: 7rem; }

/* Partidos por fin de semana */
.semana { margin-bottom: 1.2rem; }
.semana-actual { border-color: var(--red); }
.semana-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.8rem; }
.semana-head h3 { margin: 0; color: var(--text); }
.tabla-semana { min-width: 560px; }
.tabla-semana td { vertical-align: top; }
.row-libre td { color: var(--muted); }
.pares { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.9rem; }
.par { display: inline-grid; gap: 0.1rem; padding: 0.4rem 0.7rem; border-radius: 8px; font-size: 0.8rem; font-weight: 700; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); }
.par small { font-weight: 500; font-size: 0.7rem; color: var(--text-2); }
.par-ok { background: var(--green-soft); border-color: #bfe6cc; } .par-ok small { color: var(--green); }
.par-ajustado { background: var(--gold-soft); border-color: #ecd9a0; } .par-ajustado small { color: var(--gold); }
.par-mal { background: var(--red-soft); border-color: #f3c2c7; } .par-mal small { color: var(--red-dark); }
.par-libre { opacity: 0.7; }

/* Contabilidad: plan mes a mes y movimientos */
.plan-wrap { max-height: 70vh; overflow: auto; }
.tabla-plan { min-width: 1100px; font-size: 0.84rem; }
.tabla-plan th, .tabla-plan td { padding: 0.3rem 0.4rem; }
.tabla-plan thead th { position: sticky; top: 0; z-index: 2; text-align: right; }
.tabla-plan thead th:first-child { text-align: left; left: 0; z-index: 3; }
.tabla-plan th[scope="row"] { text-align: left; font-size: 0.84rem; text-transform: none; letter-spacing: 0; color: var(--text); background: #fff; position: sticky; left: 0; z-index: 1; min-width: 200px; max-width: 260px; }
.tabla-plan th[scope="row"] small { font-weight: 500; }
.tabla-plan .mes-actual { background: var(--red-soft) !important; }
.tabla-plan thead .mes-actual { color: var(--red-dark); }
.tabla-plan td.celda { text-align: right; vertical-align: top; min-width: 78px; }
.celda-in { width: 100%; max-width: 92px; margin: 0; padding: 0.28rem 0.35rem; text-align: right; border-color: transparent; background: transparent; border-radius: 6px; font-size: 0.84rem; font-weight: 600; -moz-appearance: textfield; }
.celda-in::-webkit-outer-spin-button, .celda-in::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.celda-in:hover { border-color: var(--line-2); background: #fff; } .celda-in:focus { background: #fff; }
.celda small.real { display: block; font-size: 0.7rem; font-weight: 600; text-align: right; padding-right: 0.45rem; line-height: 1.2; }
.real.mejor { color: var(--green); } .real.peor { color: var(--red-dark); }
.tabla-plan td.total { text-align: right; font-weight: 700; }
.tabla-plan .fila-seccion th { background: var(--panel-2) !important; color: var(--text); font-family: var(--font-display); font-size: 1.05rem; letter-spacing: 0.08em; padding-top: 0.5rem; }
.tabla-plan .fila-total th, .tabla-plan .fila-total td { font-weight: 700; border-top: 2px solid var(--line-2); text-align: right; }
.tabla-plan .fila-total th { text-align: left; }
.tabla-plan .fila-real th, .tabla-plan .fila-real td { color: var(--text-2); font-size: 0.78rem; text-align: right; font-weight: 500; }
.tabla-plan .fila-real th { text-align: left; }
.tabla-plan .fila-saldo th, .tabla-plan .fila-saldo td { font-weight: 700; text-align: right; background: var(--panel-2); }
.tabla-plan .fila-saldo th { text-align: left; background: var(--panel-2); }
.tabla-plan tr:hover td { background: inherit; }
.neg { color: var(--red-dark); } .pos { color: var(--green); }
.tile.neg strong { color: var(--red-dark); } .tile.pos.money strong { color: var(--text); }
.nombre-partida { text-decoration: none; color: var(--text); font-weight: 600; font-size: 0.86rem; text-align: left; white-space: normal; }
.nombre-partida:hover { text-decoration: underline; color: var(--red-dark); }
.pill-ingreso { background: var(--green-soft); color: var(--green); } .pill-gasto { background: var(--red-soft); color: var(--red-dark); } .pill-auto { background: #e2eaf8; color: #2f5fa3; }
.table tr.mov-auto td { color: var(--text-2); }

/* Contabilidad: resultado real mes a mes */
.tabla-meses { min-width: 980px; }
.tabla-meses td, .tabla-meses thead th { text-align: right; }
.tabla-meses th[scope="row"] { min-width: 170px; }
.tabla-meses td.futuro, .tabla-meses th.futuro { background: var(--panel-2) !important; color: var(--muted); }
.tabla-meses .fila-resultado td, .tabla-meses .fila-resultado th { font-weight: 700; font-size: 0.95rem; border-top: 2px solid var(--line-2); }
.tabla-meses .fila-acum td, .tabla-meses .fila-acum th { background: var(--panel-2); font-weight: 600; }
.mes-ver { color: inherit; text-decoration: none; font: inherit; letter-spacing: inherit; text-transform: inherit; }
.mes-ver:hover { color: var(--red-dark); text-decoration: underline; }

/* Contabilidad: líneas de cuotas automáticas (sin casillas) */
.celda-fija { display: block; padding: 0.28rem 0.35rem; text-align: right; font-weight: 600; font-size: 0.84rem; color: var(--text-2); }
.tabla-plan .fila-auto th[scope="row"] .pill { vertical-align: middle; margin-left: 0.2rem; }
.tabla-plan .fila-auto th[scope="row"] strong { font-weight: 600; font-size: 0.86rem; }

/* Partidos: el día manda */
.celda-dia { white-space: nowrap; }
.dia-pill { display: inline-block; padding: 0.12rem 0.55rem; border-radius: 999px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 0.15rem; background: var(--grey-soft); color: var(--text-2); }
.dia-pill.dia-6 { background: #e2eaf8; color: #2f5fa3; }          /* sábado */
.dia-pill.dia-0 { background: var(--gold-soft); color: var(--gold); } /* domingo */
.dia-pill.dia-5 { background: #ece6f7; color: #6b3fa0; }          /* viernes */
.tabla-semana tr.dia-6 td:first-child, .tabla-semana tr.dia-6 .celda-dia { box-shadow: inset 3px 0 0 #2f5fa3; }
.tabla-semana tr.dia-0 td:first-child, .tabla-semana tr.dia-0 .celda-dia { box-shadow: inset 3px 0 0 var(--gold); }
.tabla-semana tr.dia-5 td:first-child, .tabla-semana tr.dia-5 .celda-dia { box-shadow: inset 3px 0 0 #6b3fa0; }
.celda-dia strong { display: block; font-size: 1rem; }

/* ===== Menú lateral (escritorio) ===== */
.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100svh; }
.sidebar { position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column; gap: 1rem; padding: 1.1rem 0.85rem; background: linear-gradient(180deg, #1c1f26 0%, #121419 100%); color: #fff; border-right: 1px solid rgba(255,255,255,0.06); }
.sidebar .brand { color: #fff; padding: 0.2rem 0.4rem; }
.side-user { display: flex; align-items: center; gap: 0.7rem; padding: 0.75rem 0.8rem; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; }
.side-user > div { min-width: 0; }
.avatar { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--red); color: #fff; font-family: var(--font-display); font-size: 1.15rem; letter-spacing: 0.05em; box-shadow: 0 4px 14px rgba(226,0,26,0.35); }
.side-user > div strong { display: block; font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user > div span { display: block; font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.55); }
.sidebar .tabs { flex-direction: column; gap: 0.15rem; overflow: visible; flex: 0 0 auto; }
.sidebar .tab { display: flex; align-items: center; gap: 0.7rem; width: 100%; text-align: left; padding: 0.68rem 0.85rem; border-radius: 10px; color: rgba(255,255,255,0.72); font-weight: 600; }
.sidebar .tab svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: 0.9; }
.sidebar .tab:hover { background: rgba(255,255,255,0.08); color: #fff; }
.sidebar .tab.active { background: var(--red); color: #fff; box-shadow: 0 8px 20px rgba(226,0,26,0.35); }
.side-foot { margin-top: auto; display: flex; flex-wrap: wrap; gap: 0.4rem; padding-top: 0.8rem; border-top: 1px solid rgba(255,255,255,0.08); }
.side-foot .btn-ghost { background: transparent; color: rgba(255,255,255,0.85); border-color: rgba(255,255,255,0.22); }
.side-foot .btn-ghost:hover { color: #fff; border-color: #fff; }
.side-web { width: 100%; font-size: 0.78rem; color: rgba(255,255,255,0.5); margin-top: 0.3rem; }
.side-web:hover { color: #fff; }
.content { width: auto; max-width: 1280px; margin: 0; padding: 1.5rem 2rem 4rem; min-width: 0; }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.8rem; padding: 0.6rem 0.8rem; z-index: 20; }
  .side-user { display: none; }
  .sidebar .tabs { flex-direction: row; overflow-x: auto; flex: 1 1 100%; order: 3; gap: 0.3rem; }
  .sidebar .tab { width: auto; padding: 0.5rem 0.8rem; white-space: nowrap; }
  .sidebar .tab svg { display: none; }
  .side-foot { margin: 0 0 0 auto; padding: 0; border: 0; }
  .side-web { display: none; }
  .content { padding: 1.1rem 1rem 3rem; }
}

/* ===== Inicio ===== */
.tiles-inicio { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.tile-dark { background: linear-gradient(135deg, #1c1f26, #2a2f3a); border-color: #1c1f26; }
.tile-dark strong, .tile-dark span { color: #fff; } .tile-dark span { color: rgba(255,255,255,0.7); }
.tile-dark.neg strong { color: #ff8a95; }
.equipos-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0.8rem; }
.eq-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 0.9rem 1rem; background: var(--panel-2); display: grid; gap: 0.45rem; }
.eq-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.eq-head strong { font-family: var(--font-display); font-size: 1.35rem; letter-spacing: 0.04em; }
.eq-head small { color: var(--text-2); font-size: 0.72rem; text-align: right; }
.eq-pos { display: flex; align-items: center; gap: 0.6rem; }
.eq-pos b { font-family: var(--font-display); font-size: 2.2rem; line-height: 1; padding: 0.15rem 0.6rem; border-radius: 10px; background: #fff; border: 1px solid var(--line-2); }
.eq-pos b.arriba { background: var(--green-soft); color: var(--green); border-color: #bfe6cc; }
.eq-pos b.abajo { background: var(--red-soft); color: var(--red-dark); border-color: #f3c2c7; }
.eq-pos small { color: var(--text-2); line-height: 1.3; }
.eq-bal { font-size: 0.8rem; color: var(--text-2); }
.forma { display: flex; align-items: center; gap: 0.3rem; }
.forma i { display: inline-grid; place-items: center; width: 1.45rem; height: 1.45rem; border-radius: 50%; font-style: normal; font-size: 0.68rem; font-weight: 800; color: #fff; background: var(--muted); }
.forma i.G { background: var(--green); } .forma i.P { background: var(--red); } .forma i.E { background: #8a92a1; }
.forma small { color: var(--text-2); font-size: 0.72rem; margin-left: 0.2rem; }
.eq-next { font-size: 0.8rem; color: var(--text); border-top: 1px dashed var(--line-2); padding-top: 0.45rem; }
.eq-next .dia-pill { margin-right: 0.4rem; }
.eq-next strong { margin-right: 0.4rem; }
.eq-next small { display: block; margin-top: 0.15rem; }
.inicio-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.inicio-grid .span2 { grid-column: span 2; }
@media (max-width: 1100px) { .inicio-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px) { .inicio-grid { grid-template-columns: 1fr; } .inicio-grid .span2 { grid-column: auto; } }
/* barras: ingresos (rojo del club) y gastos (oscuro); el texto siempre en tinta, nunca del color de la serie */
.barras { display: grid; grid-template-columns: repeat(10, 1fr); gap: 0.35rem; align-items: end; height: 150px; padding: 0 0.2rem; border-bottom: 1px solid var(--line-2); }
.barra-mes { display: grid; grid-template-rows: 1fr auto; height: 100%; align-items: end; }
.barra-par { display: flex; align-items: flex-end; justify-content: center; gap: 2px; height: 100%; }
.barra { display: block; width: 38%; max-width: 16px; min-height: 2px; border-radius: 4px 4px 0 0; }
.barra.ing { background: var(--red); } .barra.gas { background: #2a2f3a; }
.barra-mes.futuro .barra { opacity: 0.18; }
.barra-mes small { display: block; text-align: center; font-size: 0.68rem; color: var(--text-2); margin-top: 0.3rem; font-weight: 600; }
.barra-mes.actual small { color: var(--red-dark); }
.leyenda { display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem; margin-top: 0.7rem; font-size: 0.82rem; color: var(--text-2); }
.leyenda i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 0.35rem; vertical-align: -1px; }
.leyenda i.ing { background: var(--red); } .leyenda i.gas { background: #2a2f3a; }
.leyenda strong { color: var(--text); }
/* anillo de cuotas */
.donut-wrap { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.donut { position: relative; width: 132px; height: 132px; border-radius: 50%; flex: none; }
.donut::after { content: ""; position: absolute; inset: 16px; border-radius: 50%; background: var(--panel); }
.donut b { position: absolute; inset: 0; display: grid; place-items: center; z-index: 1; font-family: var(--font-display); font-size: 1.9rem; }
.donut b small { display: block; font-family: var(--font-body); font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-2); text-align: center; margin-top: -0.2rem; }
.donut-leyenda { list-style: none; margin: 0; padding: 0; font-size: 0.84rem; display: grid; gap: 0.25rem; }
.donut-leyenda i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 0.45rem; vertical-align: -1px; }
.donut-leyenda strong { margin-left: 0.3rem; }
/* este fin de semana */
.finde-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.finde-list li { display: grid; grid-template-columns: auto 1fr; gap: 0.6rem; align-items: center; padding: 0.45rem 0.6rem; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); font-size: 0.84rem; }
.finde-list li strong { display: block; }
.finde-list li small { color: var(--text-2); display: block; }
.finde-resumen { margin: 0.6rem 0 0; }

/* Acceso: contraseña olvidada */
.olvido { text-align: left; margin-top: 0.8rem; padding: 0.9rem 1rem; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; font-size: 0.88rem; }
.olvido p { margin: 0 0 0.5rem; } .olvido .file-note { margin: 0.4rem 0 0; }
.olvido-acciones { display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* Bóveda de contraseñas */
.boveda-caja { max-width: 480px; }
.boveda-caja form { margin-top: 0.4rem; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 0.88rem; letter-spacing: 0.02em; user-select: all; }
#boveda-tabla td { vertical-align: top; }
#boveda-tabla .btn-link { font-size: 0.78rem; margin-left: 0.2rem; }

/* Partidos: equipaciones del rival y sugerencia de color */
.celda-kit { white-space: nowrap; }
.kits { display: inline-flex; gap: 0.6rem; align-items: flex-end; vertical-align: middle; }
.kit { display: inline-grid; justify-items: center; gap: 0.1rem; }
.kit svg { display: block; filter: drop-shadow(0 1px 1px rgba(0,0,0,0.15)); }
.kit small { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); }
.pill.sug { display: inline-block; margin-top: 0.35rem; text-transform: none; letter-spacing: 0.02em; font-size: 0.72rem; }
.sug-blanco { background: #fff; color: #1a1d23; border: 1px solid var(--line-2); }
.sug-negro { background: #1a1d23; color: #fff; border: 1px solid #1a1d23; }
.sug-txt { font-weight: 700; } .sug-txt.sug-blanco { color: var(--text); background: transparent; border: 0; } .sug-txt.sug-negro { color: #fff; background: #1a1d23; padding: 0 0.35rem; border-radius: 4px; }
.finde-list li.con-kit { grid-template-columns: auto 1fr auto; }
.finde-list .kit svg { width: 22px; height: 32px; } .finde-list .kit small { display: none; }
.sug-cualquiera { background: linear-gradient(90deg, #fff 50%, #1a1d23 50%); color: #1a1d23; border: 1px solid var(--line-2); text-shadow: 0 0 2px #fff; }
.sug-txt.sug-cualquiera { background: transparent; color: var(--text); text-shadow: none; }
.kit em { font-style: normal; font-size: 0.66rem; color: var(--text-2); max-width: 5.5rem; text-align: center; line-height: 1.15; }
.finde-list .kit em { display: none; }
.finde-list .kits { gap: 0.3rem; }
/* Equipaciones: dos columnas iguales, dibujo centrado y nombre del color debajo sin solaparse */
.celda-kit { white-space: normal; min-width: 12.5rem; vertical-align: top; }
.celda-kit .kits { display: grid; grid-template-columns: repeat(2, 5.6rem); gap: 0.5rem; align-items: start; }
.celda-kit .kit { width: 100%; display: grid; justify-items: center; align-content: start; gap: 0.15rem; }
.celda-kit .kit svg { width: 30px; height: 44px; }
.celda-kit .kit small { line-height: 1; }
.celda-kit .kit em { display: block; width: 100%; max-width: none; text-align: center; font-size: 0.66rem; line-height: 1.2; overflow-wrap: anywhere; }
.finde-list .kits { display: inline-flex; }
.pill-sub23 { background: #e6f1fb; color: #1d5fa8; vertical-align: middle; margin-left: 0.3rem; }
.inline-exento + .inline-exento { margin-top: 0.2rem; }

/* Partidos: jugadores sub-23 de cada equipo */
.celda-sub23 { vertical-align: top; min-width: 11rem; white-space: normal; }
.sub23-list { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.chip-sub23 { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.2rem 0.55rem; border-radius: 999px; border: 1px solid #bcd3ee; background: #e6f1fb; color: #1d5fa8; font: inherit; font-size: 0.78rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.chip-sub23:hover { background: #d4e6f8; }
.chip-sub23 small { font-weight: 500; color: #4d79ad; font-size: 0.7rem; }
.tabla-semana { min-width: 760px; }
.celda-sub23 { min-width: 13rem; }

/* Community manager: nada de dinero ni de edición */
body.sin-dinero .col-dinero, body.sin-dinero .solo-dinero, body.sin-dinero .solo-gestion, body.sin-dinero #jug-bulk { display: none !important; }
body.sin-dinero .chip-sub23 { cursor: default; }

/* Verificación en dos pasos */
.mfa-qr { display: grid; justify-items: center; gap: 0.5rem; margin: 0 0 1rem; padding: 1rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; text-align: center; }
.mfa-qr img { image-rendering: pixelated; }
.mfa-qr small { color: var(--text-2); font-size: 0.78rem; } .mfa-qr code { display: inline-block; margin-top: 0.3rem; font-size: 0.8rem; letter-spacing: 0.08em; user-select: all; }
#mfa-codigo, #mfa-alta-codigo { font-size: 1.4rem; letter-spacing: 0.35em; text-align: center; font-family: ui-monospace, Consolas, monospace; }

/* Ropa e inscripciones */
.ropa-estado-form { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem 1.2rem; margin-bottom: 1rem; }
.ropa-estado-form .enlace { font-size: 0.85rem; color: var(--text-2); word-break: break-all; }
.interruptor { display: inline-flex; align-items: center; gap: 0.5rem; cursor: pointer; font-weight: 600; font-size: 0.9rem; margin: 0; text-transform: none; letter-spacing: 0; color: var(--text); }
.interruptor input { width: 2.6rem; height: 1.4rem; margin: 0; appearance: none; background: var(--line-2); border-radius: 999px; position: relative; cursor: pointer; transition: background 0.2s; }
.interruptor input::after { content: ""; position: absolute; top: 0.15rem; left: 0.15rem; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: #fff; transition: left 0.2s; }
.interruptor input:checked { background: var(--green); } .interruptor input:checked::after { left: 1.35rem; }
.tabla-prov { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.tabla-prov th, .tabla-prov td { padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--line); text-align: right; }
.tabla-prov th:first-child, .tabla-prov td:first-child { text-align: left; }
.tabla-prov thead th { font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-2); }
.tabla-prov td.cero { color: var(--muted); } .tabla-prov td.total, .tabla-prov tr.total td { font-weight: 700; }
.serigrafia h4 { margin: 0.6rem 0 0.3rem; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-2); }
.serigrafia ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.3rem; }
.serigrafia li { padding: 0.15rem 0.55rem; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line); font-size: 0.8rem; font-family: ui-monospace, Consolas, monospace; }
.serigrafia li b { color: var(--red-dark); }
.pill-nuevo { background: var(--gold-soft); color: var(--gold); } .pill-confirmado { background: #e2eaf8; color: #2f5fa3; } .pill-pedido { background: #ece6f7; color: #6b3fa0; } .pill-entregado { background: var(--green-soft); color: var(--green); } .pill-cancelado { background: var(--grey-soft); color: var(--text-2); }
.conflicto { color: var(--red-dark); font-weight: 600; }

/* Aviso de pedidos nuevos en el menú */
.tab .aviso { margin-left: auto; min-width: 1.35rem; height: 1.35rem; padding: 0 0.35rem; border-radius: 999px; background: var(--gold); color: #fff; font-size: 0.7rem; font-weight: 800; display: inline-grid; place-items: center; }
.tab.active .aviso { background: #fff; color: var(--red); }
.prod-fila { display: grid; grid-template-columns: 1fr 5.5rem auto; gap: 0.5rem; align-items: center; padding: 0.4rem 0; border-bottom: 1px solid var(--line); }
.prod-fila:last-child { border-bottom: 0; }
.prod-fila input[type=text] { margin: 0; padding: 0.35rem 0.5rem; font-size: 0.86rem; }
.prod-fila input[type=number] { margin: 0; padding: 0.35rem 0.5rem; font-size: 0.86rem; text-align: right; }
.prod-fila .inline-exento { margin: 0; }
.pill-preparado { background: #e2eaf8; color: #2f5fa3; }
