/* ============================================================
   Panel del club: capa de compatibilidad sobre Bootstrap 5.
   Los botones usan siempre las clases de Bootstrap (.btn con .btn-primary, .btn-outline-secondary...).
   Las plantillas usan clases propias (.card, .badge.ok, .toolbar,
   .table-wrap, .stat, .grid, .muted...) y aquí se definen apoyándose en las variables
   de Bootstrap, así el modo claro/oscuro funciona solo.
   Los colores de marca (--brand, --brand-dark...) los inyecta clubconfig/_branding_vars.html.
   ============================================================ */
:root {
  --brand: #E3262E; --brand-rgb: 227, 38, 46; --brand-contrast: #fff; --brand-dark: #141414;
  --sidebar-w: 260px;
  --muted: var(--bs-secondary-color);
  --ok: var(--bs-success-text-emphasis);
  --warn: var(--bs-warning-text-emphasis);
  --bad: var(--bs-danger-text-emphasis);
  --line: var(--bs-border-color);
}
[data-bs-theme="dark"] { --ok: #4ade80; --warn: #fbbf24; --bad: #f87171; }
[data-bs-theme="light"] { --ok: #1a7f4b; --warn: #b45309; --bad: #b42318; }

body { font-size: .95rem; background: var(--bs-tertiary-bg); }

/* ---------- Estructura ---------- */
.app-shell { display: flex; min-height: 100vh; }
.app-main { flex: 1; min-width: 0; }
.app-main > main { max-width: 1200px; margin: 0 auto; padding: 1.25rem 1rem 2rem; }
@media (min-width: 992px) { .app-main > main { padding: 1.75rem 2rem 2.5rem; } }
.topbar { display: flex; align-items: center; gap: .75rem; padding: .6rem 1rem; background: var(--brand-dark); color: #fff; position: sticky; top: 0; z-index: 1020; }
.auth-wrap { max-width: 440px; margin: 0 auto; padding: 2.5rem 1rem; }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: .6rem; font-size: 1.3rem; margin-bottom: 1.25rem; }
.auth-brand img { height: 44px; }

/* ---------- Barra lateral ---------- */
.sidebar { background: var(--brand-dark); color: #dee2e6; }
.sidebar-inner { --bs-offcanvas-width: 280px; --bs-offcanvas-bg: var(--brand-dark); --bs-offcanvas-color: #dee2e6;
                 display: flex; flex-direction: column; }
@media (min-width: 992px) {
  .sidebar { width: var(--sidebar-w); flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
  .sidebar-inner { flex: 1; min-height: 0; }
}
.sidebar-brand { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.1rem .8rem; }
.sidebar-brand a { display: flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.1rem; line-height: 1.2; }
.sidebar-brand img { height: 36px; max-width: 120px; object-fit: contain; }
.sidebar-brand .bi { color: var(--brand); font-size: 1.4rem; }
.sidebar-nav { display: flex; flex-direction: column; gap: .15rem; padding: .5rem .75rem; flex: 1; overflow-y: auto; }
.sidebar-nav a { display: flex; align-items: center; gap: .7rem; padding: .55rem .75rem; border-radius: .5rem; color: rgba(255,255,255,.72); text-decoration: none; font-weight: 500; }
.sidebar-nav a .bi { font-size: 1.1rem; width: 1.25rem; text-align: center; }
.sidebar-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-nav a.active { background: rgba(255,255,255,.12); color: #fff; box-shadow: inset 3px 0 0 var(--brand); }
.sidebar-heading { margin: 1rem .75rem .25rem; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.4); }
.sidebar-user { padding: .9rem 1.1rem 1.1rem; border-top: 1px solid rgba(255,255,255,.1); }
.sidebar-user-name { margin-bottom: .6rem; font-size: .9rem; color: rgba(255,255,255,.8); }
.sidebar-user button, .topbar button { --bs-btn-color: #fff; --bs-btn-bg: transparent; --bs-btn-border-color: rgba(255,255,255,.35);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: rgba(255,255,255,.12); --bs-btn-hover-border-color: rgba(255,255,255,.5);
  display: inline-block; padding: .35rem .7rem; font: inherit; border: 1px solid var(--bs-btn-border-color); border-radius: .5rem;
  color: var(--bs-btn-color); background: var(--bs-btn-bg); cursor: pointer; }
.sidebar-user button:hover, .topbar button:hover { background: var(--bs-btn-hover-bg); border-color: var(--bs-btn-hover-border-color); }

/* ---------- Títulos ---------- */
main h1 { margin: .2rem 0 1rem; font-size: 1.6rem; font-weight: 700; }
main h2 { margin: 1.5rem 0 .75rem; font-size: 1.2rem; font-weight: 600; }
main h3 { font-size: 1.05rem; }
.muted { color: var(--muted); }

/* ---------- Tarjetas y rejillas ---------- */
.card { padding: 1rem 1.25rem; margin-bottom: 1rem; border-radius: .75rem; background: var(--bs-body-bg); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.grid > .card { margin-bottom: 0; }
.stat strong { display: block; font-size: 1.8rem; line-height: 1.2; }
.toolbar { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; align-items: center; }

/* ---------- Formularios ---------- */
main input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=color]):not([type=submit]),
main select, main textarea {
  font: inherit; padding: .45rem .6rem; max-width: 100%; color: var(--bs-body-color); background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color); border-radius: .5rem;
}
main textarea { display: block; width: 100%; max-width: 48rem; }
main input[type=color] { width: 3.2rem; height: 2.4rem; padding: .15rem; border: 1px solid var(--bs-border-color); border-radius: .5rem; background: var(--bs-body-bg); }
main input:focus, main select:focus, main textarea:focus { outline: 2px solid rgba(var(--brand-rgb), .35); border-color: var(--brand); }
form p { margin: .6rem 0; }
form label { display: block; font-weight: 600; font-size: .9rem; }
.helptext { display: block; margin-top: .35rem; font-size: .85rem; font-weight: 400; color: var(--muted); }
.errorlist { color: var(--bad); list-style: none; padding: 0; margin: .2rem 0; }

/* ---------- Tablas ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--bs-body-bg); border: 1px solid var(--bs-border-color); }
th, td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--bs-border-color); vertical-align: middle; }
th { font-size: .85rem; color: var(--muted); font-weight: 600; }

/* ---------- Varios ---------- */
.badge { padding: .1rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 400; color: var(--muted); background: transparent; border: 1px solid currentColor; }
.badge.ok { color: var(--ok); } .badge.warn { color: var(--warn); } .badge.bad { color: var(--bad); }
.messages { list-style: none; padding: 0; }
.messages li { padding: .6rem .9rem; border-radius: .5rem; margin-bottom: .5rem; background: var(--bs-body-bg); border: 1px solid var(--bs-border-color); }
.messages .success { border-color: var(--ok); } .messages .error { border-color: var(--bad); } .messages .warning { border-color: var(--warn); }
dl { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1.2rem; margin: 0; }
dt { color: var(--muted); }
.pagination { display: flex; gap: 1rem; margin-top: 1rem; align-items: center; }

/* ---------- Ajustes ---------- */
.settings-card { display: flex; flex-direction: row; gap: 1rem; align-items: flex-start; height: 100%; color: inherit; text-decoration: none; transition: border-color .15s, transform .15s; }
a.settings-card:hover { border-color: var(--brand); transform: translateY(-2px); color: inherit; }
.settings-card .icon { flex: none; width: 2.8rem; height: 2.8rem; display: grid; place-items: center; border-radius: .7rem; font-size: 1.4rem;
                       background: rgba(var(--brand-rgb), .12); color: var(--brand); }
.settings-card.disabled { opacity: .55; }
.brand-preview { border: 1px solid var(--bs-border-color); border-radius: .75rem; overflow: hidden; background: var(--bs-body-bg); }
.brand-preview .bar { display: flex; align-items: center; gap: .6rem; padding: .8rem 1rem; color: #fff; font-weight: 700; }
.brand-preview .bar img { height: 28px; }
.brand-preview .body { padding: 1rem; }
.card > h2:first-child, .card > form > h2:first-child { margin-top: 0; }


/* =========================================================
   MYCLUB — SISTEMA VISUAL UNIFICADO DEL PANEL
   Solo afecta al panel autenticado y a la pantalla de acceso.
   ========================================================= */

:root {
    --panel-radius: 16px;
    --panel-shadow: 0 4px 20px rgba(20, 25, 35, .055);
    --panel-shadow-hover: 0 10px 28px rgba(20, 25, 35, .10);
    --panel-transition: .2s ease;
}

[data-bs-theme="dark"] {
    --panel-shadow: 0 4px 20px rgba(0, 0, 0, .15);
    --panel-shadow-hover: 0 10px 28px rgba(0, 0, 0, .25);
}

/* Fondo y tipografía */

.app-shell,
.auth-wrap {
    font-size: .94rem;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

.app-shell {
    background: var(--bs-tertiary-bg);
}

.app-main {
    min-width: 0;
}

.app-main > main {
    width: 100%;
    max-width: 1500px;
    padding: 1.5rem 1rem 3rem;
}

@media (min-width: 768px) {
    .app-main > main {
        padding: 2rem 1.75rem 3rem;
    }
}

@media (min-width: 1200px) {
    .app-main > main {
        padding: 2.25rem 2.5rem 3.5rem;
    }
}

/* Títulos */

.app-shell main h1 {
    font-size: clamp(1.5rem, 2.2vw, 2rem);
    font-weight: 750;
    line-height: 1.2;
    letter-spacing: -.035em;
    margin: .2rem 0 1.25rem;
}

.app-shell main h2 {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -.015em;
    margin: 1.6rem 0 .85rem;
}

.app-shell main h3 {
    font-size: 1.02rem;
    font-weight: 700;
}

/* Tarjetas */

.app-shell main .card {
    border: 1px solid var(--bs-border-color);
    border-radius: var(--panel-radius);
    background: var(--bs-body-bg);
    box-shadow: var(--panel-shadow);
    transition: box-shadow var(--panel-transition),
                border-color var(--panel-transition);
}

.app-shell main .card:hover {
    border-color: var(--bs-border-color);
}

.app-shell main .grid {
    gap: 1rem;
}

.app-shell main .grid > .card {
    margin-bottom: 0;
}

.app-shell main .stat {
    position: relative;
    overflow: hidden;
}

.app-shell main .stat strong {
    font-size: clamp(1.65rem, 2.5vw, 2.15rem);
    font-weight: 750;
    letter-spacing: -.04em;
    line-height: 1.2;
    margin: .35rem 0;
}

/* Tarjetas de configuración */

.app-shell main a.settings-card {
    border: 1px solid var(--bs-border-color);
    border-radius: var(--panel-radius);
    box-shadow: var(--panel-shadow);
    transition: transform var(--panel-transition),
                box-shadow var(--panel-transition),
                border-color var(--panel-transition);
}

.app-shell main a.settings-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--panel-shadow-hover);
    border-color: var(--brand);
}

.app-shell main .settings-card .icon {
    border-radius: 12px;
}

/* Botones */

.app-shell main .btn {
    border-radius: 9px;
    font-weight: 600;
    transition: background-color var(--panel-transition),
                border-color var(--panel-transition),
                box-shadow var(--panel-transition);
}

.app-shell main .btn:focus-visible {
    outline: 3px solid rgba(var(--brand-rgb), .25);
    outline-offset: 2px;
}

.app-shell main .toolbar {
    gap: .65rem;
    margin-bottom: 1.25rem;
}

/* Formularios */

.app-shell main input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="color"]):not([type="submit"]),
.app-shell main select,
.app-shell main textarea {
    border: 1px solid var(--bs-border-color);
    border-radius: 9px;
    font: inherit;
    color: var(--bs-body-color);
    background-color: var(--bs-body-bg);
    transition: border-color var(--panel-transition),
                box-shadow var(--panel-transition);
}

.app-shell main input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="color"]):not([type="submit"]),
.app-shell main select {
    min-height: 42px;
}

.app-shell main textarea {
    padding: .7rem .8rem;
}

.app-shell main input:focus,
.app-shell main select:focus,
.app-shell main textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .12);
}

.app-shell main form label {
    font-size: .88rem;
    font-weight: 650;
    margin-bottom: .4rem;
}

.app-shell main .helptext,
.app-shell main .form-text {
    display: block;
    margin-top: .35rem;
    color: var(--bs-secondary-color);
    font-size: .82rem;
}

.app-shell main .errorlist {
    margin: .35rem 0;
    padding: 0;
    list-style: none;
    color: var(--bs-danger-text-emphasis);
}

/* Tablas */

.app-shell main .table-wrap {
    overflow-x: auto;
    border: 1px solid var(--bs-border-color);
    border-radius: 12px;
    background: var(--bs-body-bg);
}

.app-shell main table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--bs-body-bg);
}

.app-shell main th {
    padding: .85rem .9rem;
    background: var(--bs-tertiary-bg);
    color: var(--bs-secondary-color);
    font-size: .76rem;
    font-weight: 750;
    letter-spacing: .045em;
    text-transform: uppercase;
    white-space: nowrap;
}

.app-shell main td {
    padding: .8rem .9rem;
    border-bottom: 1px solid var(--bs-border-color);
    vertical-align: middle;
}

.app-shell main tbody tr:last-child td {
    border-bottom: 0;
}

.app-shell main tbody tr:hover td {
    background: rgba(var(--brand-rgb), .025);
}

/* Estados */

.app-shell main .badge {
    padding: .3rem .6rem;
    border-radius: 999px;
    font-size: .76rem;
    font-weight: 650;
}

/* Mensajes */

.app-shell main .messages {
    margin: 0 0 1.25rem;
    padding: 0;
    list-style: none;
}

.app-shell main .messages li {
    border-radius: 10px;
    padding: .8rem 1rem;
}

/* Navegación lateral */

.app-shell .sidebar {
    box-shadow: 4px 0 24px rgba(0, 0, 0, .06);
}

.app-shell .sidebar-nav {
    gap: .25rem;
}

.app-shell .sidebar-nav a {
    padding: .7rem .8rem;
    border-radius: 9px;
    transition: background var(--panel-transition),
                color var(--panel-transition);
}

.app-shell .sidebar-nav a.active {
    font-weight: 650;
}

.app-shell .sidebar-brand {
    border-bottom: 1px solid rgba(255, 255, 255, .09);
}

.app-shell .sidebar-user {
    margin-top: auto;
}

/* Accesibilidad y adaptación móvil */

.app-shell img {
    max-width: 100%;
}

.app-shell main a:focus-visible {
    outline: 3px solid rgba(var(--brand-rgb), .3);
    outline-offset: 3px;
}

@media (max-width: 575.98px) {
    .app-main > main {
        padding: 1.1rem .75rem 2rem;
    }

    .app-shell main .card {
        border-radius: 12px;
    }

    .app-shell main .toolbar {
        align-items: stretch;
    }

    .app-shell main .toolbar > input,
    .app-shell main .toolbar > select {
        width: 100%;
        max-width: 100%;
    }

    .app-shell main th,
    .app-shell main td {
        padding: .65rem .7rem;
    }

    .app-shell main .table-wrap {
        max-width: 100%;
    }
}

/* Dashboard: indicadores compactos */
.app-shell .grid {
    grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
    gap: 12px;
}

.app-shell .grid > .card.stat {
    padding: 12px 15px;
    margin-bottom: 0;
    border-radius: 10px;
}

.app-shell .stat strong {
    font-size: 1.55rem;
    line-height: 1.15;
    margin: 5px 0;
}

.app-shell .stat .muted {
    font-size: 0.8rem;
    line-height: 1.3;
}

.app-shell .stat a {
    font-size: 0.82rem;
}

@media (max-width: 576px) {
    .app-shell .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .app-shell .grid > .card.stat {
        padding: 10px;
    }

    .app-shell .stat strong {
        font-size: 1.35rem;
    }
}


/* Avisos: formularios y contenido */
.app-shell form.card input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.app-shell form.card select,
.app-shell form.card textarea {
    max-width: 100%;
}

.app-shell form.card input:not([type="checkbox"]):not([type="radio"]),
.app-shell form.card select,
.app-shell form.card textarea {
    border-radius: 8px;
}

.app-shell form.card textarea {
    min-height: 120px;
    resize: vertical;
}

.app-shell .announcement-body {
    overflow-wrap: anywhere;
    line-height: 1.75;
}

.app-shell .nav-pills .nav-link {
    border-radius: 9px;
    font-weight: 500;
}

.app-shell .nav-pills .nav-link:not(.active) {
    color: var(--bs-body-color);
}

.app-shell .nav-pills .nav-link:not(.active):hover {
    background: var(--bs-tertiary-bg);
}

.app-shell .table td,
.app-shell .table th {
    vertical-align: middle;
}

.app-shell .table img {
    display: block;
    max-width: 100%;
}

/* ---------- Perfil compacto en el menú lateral ---------- */

.sidebar-profile {
    padding: .35rem .75rem;
    border-bottom: 1px solid rgba(255, 255, 255, .09);
}

.sidebar-profile-link {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: #fff;
    text-decoration: none;
    padding: .3rem .4rem;
    border-radius: .5rem;
    transition: background .2s ease;
    min-width: 0;
}

.sidebar-profile-link:hover {
    background: rgba(255, 255, 255, .09);
    color: #fff;
}

.sidebar-profile-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    font-size: .85rem;
}

.sidebar-profile-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.sidebar-profile-info strong {
    font-size: .76rem;
    font-weight: 500;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-profile-link:hover .sidebar-profile-info strong {
    color: #fff;
}

/* ---------- Estructura común de las páginas ---------- */

/* Algunas páginas envuelven su contenido: no debe desplazarlas respecto a las demás. */
.app-main > main > .container-fluid {
    padding: 0 !important;
}

/* El relleno lo pone .card-body: si lo pusiera también .card, se sumarían. */
.app-shell main .card:has(> .card-body, > .card-header) {
    padding: 0;
}

/* ---------- Utilidades (sustituyen a los estilos en línea) ---------- */

.box-38 { width: 38px; height: 38px; }
.box-42 { width: 42px; height: 42px; }
.box-44 { width: 44px; height: 44px; }
.box-48 { width: 48px; height: 48px; }
.box-64 { width: 64px; height: 64px; }
.box-76 { width: 76px; height: 76px; }
.cursor-pointer { cursor: pointer; }
.mw-form { max-width: 760px; }
.mh-220 { max-height: 220px; }
.mh-400 { max-height: 400px; }
.mh-520 { max-height: 520px; }
.minw-66 { min-width: 66px; }
.check-lg { width: 1.25rem; height: 1.25rem; }
.table-fixed-720 { table-layout: fixed; min-width: 720px; }
.thumb-100 { width: 100px; height: 64px; object-fit: cover; border-radius: 8px; }
.logo-preview { max-width: 150px; max-height: 70px; object-fit: contain; }
.logo-preview-sm { max-width: 42px; max-height: 32px; object-fit: contain; }
.pre-wrap-text { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; }

/* ---------- Gráfico mensual de contabilidad ---------- */

.viz-monthly {
    --viz-income: #2a78d6;
    --viz-expense: #eb6834;
    --viz-grid: var(--bs-border-color);
    margin: 0;
}

[data-bs-theme="dark"] .viz-monthly {
    --viz-income: #3987e5;
    --viz-expense: #d95926;
}

.viz-legend {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem 1.5rem;
    margin-bottom: 1rem;
    font-size: .85rem;
    color: var(--bs-secondary-color);
}

.viz-legend strong { color: var(--bs-body-color); }

.viz-key {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: .4rem;
    border-radius: 2px;
}

.viz-key.income { background: var(--viz-income); }
.viz-key.expense { background: var(--viz-expense); }

.viz-frame { display: flex; gap: .5rem; }

.viz-ticks {
    position: relative;
    flex: 0 0 auto;
    min-width: 2.2rem;
    height: 220px;
    color: var(--bs-secondary-color);
    font-size: .72rem;
    text-align: right;
}

.viz-ticks span {
    display: block;
    position: absolute;
    right: 0;
    transform: translateY(50%);
}

.viz-plot { position: relative; flex: 1; min-width: 0; }

.viz-gridline {
    position: absolute;
    left: 0;
    right: 0;
    border-top: 1px solid var(--viz-grid);
}

.viz-months {
    position: relative;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.viz-month {
    position: relative;
    display: flex;
    flex-direction: column;
    outline-offset: -2px;
    border-radius: 6px;
}

.viz-month:hover,
.viz-month:focus-visible { background: rgba(127, 127, 127, .1); }

.viz-bars {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
    height: 220px;
    padding: 0 3px;
}

.viz-bar {
    flex: 1 1 0;
    max-width: 24px;
    border-radius: 4px 4px 0 0;
}

.viz-bar.income { background: var(--viz-income); }
.viz-bar.expense { background: var(--viz-expense); }

.viz-label {
    padding-top: .35rem;
    color: var(--bs-secondary-color);
    font-size: .72rem;
    text-align: center;
}

.viz-tip {
    display: none;
    position: absolute;
    bottom: calc(100% - 1.5rem);
    left: 50%;
    z-index: 5;
    min-width: 9.5rem;
    padding: .5rem .7rem;
    transform: translateX(-50%);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    background: var(--bs-body-bg);
    box-shadow: var(--panel-shadow-hover);
    font-size: .8rem;
    white-space: nowrap;
}

.viz-month.start .viz-tip { left: 0; transform: none; }
.viz-month.end .viz-tip { right: 0; left: auto; transform: none; }
.viz-month:hover .viz-tip,
.viz-month:focus-visible .viz-tip { display: block; }

.viz-tip div { display: flex; align-items: center; gap: .4rem; }
.viz-tip strong { margin-left: auto; padding-left: .75rem; }
.viz-tip-title { margin-bottom: .2rem; font-weight: 700; }
.viz-tip .line { width: 12px; height: 2px; }
.viz-tip .line.income { background: var(--viz-income); }
.viz-tip .line.expense { background: var(--viz-expense); }

/* Los títulos de una cabecera de tarjeta no llevan el margen superior de sección. */
.app-shell main .card-header :is(h2, h3) {
    margin-top: 0;
}

/* Modo oscuro: los grises y colores de estado de Bootstrap pierden contraste sobre el fondo. */
[data-bs-theme="dark"] .btn-outline-secondary {
    --bs-btn-color: var(--bs-body-color);
    --bs-btn-border-color: var(--bs-secondary-color);
}

[data-bs-theme="dark"] .text-success { color: var(--ok) !important; }
[data-bs-theme="dark"] .text-danger { color: var(--bad) !important; }

/* ---------- Ficha del socio ---------- */

.profile-data {
    gap: .35rem 1rem;
}

.profile-data dd {
    margin: 0;
    min-width: 0;
}

/* Campo trampa de la solicitud de alta: fuera de la vista, sin revelarlo a los robots con display:none. */
.signup-extra {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ---------- Informes impresos: solo el contenido ---------- */
@media print {
    .sidebar,
    .topbar,
    .messages {
        display: none !important;
    }

    .app-shell main .card {
        box-shadow: none;
        break-inside: avoid-page;
    }
}

/* Pantallas sin sesión con formularios largos (solicitud de alta): más anchas que el login. */
.auth-wrap.auth-wrap-wide { max-width: 1140px; }
.signup-section { border-top: 1px solid var(--bs-border-color); padding-top: 1.25rem; margin-top: 1.5rem; }
.signup-choices .form-check { margin-bottom: .2rem; }
