:root{
    font-family: system-ui, Arial, sans-serif;

    --nav-h: 60px;              /* altura navbar */
    --footer-h: 44px;           /* ✅ NUEVO: altura footer (ajustá si tu footer es más alto) */

    --bg: #0b0f14;
    --panel: #0f1621;
    --border: #1d2a3a;
    --border2: #24344a;
    --text: #e8eef7;
    --muted: #9fb2c8;

    /* Sidebar */
    --sidebar-w: 280px;
    --sidebar-pad: 12px;

    /* Feel Facebook-ish */
    --hover: rgba(255,255,255,.06);
    --active: rgba(43,108,176,.18);
    --active-bar: #2b6cb0;
}

*,
*::before,
*::after{ box-sizing: border-box; }

html, body{ height: 100%; }

body{
    margin:0;
    background: var(--bg);
    color: var(--text);

    min-height: 100vh;
    display: flex;
    flex-direction: column;

    /* ✅ FIX: el body NO scrollea (scrollea .page-content) */
    overflow: hidden;
}

/* =========================
   Base layout / components
   ========================= */

.container{
    max-width: 980px;
    margin: 0 auto;
    padding: 20px;
    min-width: 0;                 /* ✅ FIX: evita overflow en grids */
}

.muted{ color: var(--muted); }
.small{ font-size: 12px; }

.card{
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 8px;
    min-width: 0;                 /* ✅ FIX */
}

.h1{
    margin: 0 0 8px 0;
    font-size: 26px;
}

.label{
    font-size: 13px;
    color: #b8c7da;
}

.input{
    width: 100%;
    min-width: 0;                 /* ✅ FIX */
    box-sizing: border-box;       /* ✅ FIX */

    padding:10px 12px;
    border-radius:12px;
    border:1px solid var(--border2);
    background:#0b111a;
    color: var(--text);
    height: 42px;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease, filter .15s ease;
}

textarea.input{
    height: auto;                 /* ✅ FIX */
    min-height: 100px;
}

.input:focus{
    border-color: #2b6cb0;
    box-shadow: 0 0 0 3px rgba(43,108,176,.25);
    filter: brightness(1.02);
}

select.input{
    appearance: none;
}

.btn{
    padding:10px 12px;
    border-radius:10px;
    border:1px solid var(--border2);
    background:#0b111a;
    color: var(--text);
    cursor:pointer;
    text-decoration:none;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
}

.btn:hover{ filter: brightness(1.1); }

.btn-primary{
    border-color:#2b6cb0;
    background:#123155;
    font-weight:700;
}

.btn-ghost{
    border-color:transparent;
    background:transparent;
}

.btn-block{
    width: 100%;
    margin-top: 8px;
    height: 44px;
    font-weight: 700;
}

.alert{
    padding:10px 12px;
    border-radius:10px;
    margin-top: 12px;
    display:flex;
    gap:10px;
    align-items:center;
}

.alert::before{
    content: "•";
    font-size: 20px;
    line-height: 1;
    opacity: .9;
}

.alert-error{ background:#3a1212; border:1px solid #7a2424; }
.alert-ok{ background:#123a1f; border:1px solid #1f7a3a; }

.alert-error::before{ content:"⚠"; }
.alert-ok::before{ content:"✓"; }

.field-error{
    color: #ffb4b4;
    font-size: 12px;
}

/* =========================
   Navbar
   ========================= */

.navbar{
    background: var(--panel);
    border-bottom:1px solid var(--border);
    height: var(--nav-h);
    display:flex;
    align-items:center;

    /* ✅ FIX: evita que shrink rompa alturas */
    flex: 0 0 auto;
}

.nav-inner{
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;

    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    width:100%;
}

.nav-left{
    display:flex;
    align-items:center;
    gap:12px;
}

.brand{
    color:#fff;
    text-decoration:none;
    font-weight:700;
}

.nav-right{
    display:flex;
    gap:12px;
    align-items:center;
}

/* Botón burger: SOLO MOBILE */
.nav-burger{
    display:none;
    font-size:18px;
    line-height:1;
}

/* =========================
   Admin/User shell (FB style)
   ========================= */

main.admin-shell{
    flex: 1 1 auto;
    min-height: 0;

    display:grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    gap: 0;
    width:100%;
    align-items: stretch;

    /* ✅ CAMBIO CLAVE: acota el alto para que .page-content pueda scrollear */
    height: calc(100vh - var(--nav-h) - var(--footer-h));
}

/* Sidebar sticky */
.sidebar{
    position: sticky;
    top: var(--nav-h);

    height: auto;
    max-height: calc(100vh - var(--nav-h));
    width: var(--sidebar-w);

    padding: var(--sidebar-pad);
    background: var(--panel);
    border-right: 1px solid var(--border);

    overflow:auto;
    border-radius: 0;

    min-height: 0;
}

/* contenido */
.page-content{
    overflow: auto;   /* ✅ scroll principal */

    min-width:0;
    min-height: 0;

    /* ✅ CAMBIO CLAVE: ocupar el alto del shell para que aparezca el scroll */
    height: 100%;

    padding: 2px 2px;
}

/* hijos centrados */
/*.page-content > *{
    max-width: 980px;
    width: 100%;
    min-width: 0;
}*/

/* Internals sidebar */
.sidebar-top{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.sidebar-brand{
    font-weight:700;
    letter-spacing: .2px;
}

.sidebar-close{ display:none; }

.sidebar-nav{
    display:flex;
    flex-direction:column;
    gap:6px;
}

.sidebar-link{
    position:relative;
    display:flex;
    align-items:center;
    gap:10px;

    padding:10px 12px;
    border-radius: 12px;
    text-decoration:none;
    color: var(--text);

    border: 1px solid transparent;
    background: transparent;

    transition: background .12s ease, border-color .12s ease, transform .08s ease;
}

.sidebar-link:hover{
    background: var(--hover);
    border-color: rgba(255,255,255,.06);
}

.sidebar-link:active{ transform: translateY(1px); }

.sidebar-ico{
    width: 22px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    filter: saturate(.95);
    opacity: .95;
}

.sidebar-link.is-active{
    background: var(--active);
    border-color: rgba(43,108,176,.25);
}

.sidebar-link.is-active::before{
    content:"";
    position:absolute;
    left: calc(var(--sidebar-pad) * -1);
    top: 10px;
    bottom: 10px;
    width: 4px;
    border-radius: 99px;
    background: var(--active-bar);
}

.sidebar-link.is-active .sidebar-ico{
    filter: saturate(1.2);
    opacity: 1;
}

/* Details */
.sidebar-details{
    margin-top: 6px;
    border-radius: 12px;
    overflow:hidden;
}

/* ✅ FIX: el SUMMARY (botón principal) queda igual a un sidebar-link y ALINEADO A LA IZQUIERDA */
.sidebar-details > summary{
    cursor:pointer;
    list-style:none;

    display:flex;
    align-items:center;
    justify-content:flex-start;     /* ✅ izquierda */
    gap:10px;

    width:100%;
    text-align:left;               /* ✅ izquierda */

    padding:10px 12px;
    border-radius:12px;

    border: 1px solid transparent;
    background: transparent;

    color: var(--text);
    user-select:none;

    transition: background .12s ease, border-color .12s ease, transform .08s ease;
}

.sidebar-details > summary:hover{
    background: var(--hover);
    border-color: rgba(255,255,255,.06);
}

.sidebar-details > summary:active{
    transform: translateY(1px);
}

.sidebar-details > summary::-webkit-details-marker{ display:none; }

/* Flecha siempre al final (derecha) */
.sidebar-details > summary::after{
    margin-left:auto;              /* ✅ empuja la flecha al final */
    content:"▸";
    opacity:.8;
    transform: rotate(0deg);
    transition: transform .18s ease;
}

.sidebar-details[open] > summary::after{ transform: rotate(90deg); }

/* ✅ Subnav “indentado” (se ve centrado visualmente respecto del principal) */
.sidebar-subnav{
    padding: 6px 0 10px 14px;      /* ✅ indent */
    display: none;
}

.sidebar-details[open] .sidebar-subnav{
    display: block;
}

.sidebar-subnav .sidebar-link{
    padding: 9px 10px;
    border-radius: 10px;
}

/* Overlay: por defecto oculto */
.sidebar-overlay{ display:none; }

/* =========================
   Mobile drawer
   ========================= */
@media (max-width: 900px){

    .nav-burger{ display:inline-flex; }

    main.admin-shell{
        grid-template-columns: 1fr;

        /* ✅ también acotado en mobile */
        height: calc(100vh - var(--nav-h) - var(--footer-h));
    }

    .page-content{
        padding: 16px;
    }

    .sidebar{
        position: fixed;
        top: var(--nav-h);
        left: 0;
        height: calc(100vh - var(--nav-h));
        max-height: none;
        width: var(--sidebar-w);

        transform: translateX(-110%);
        transition: transform .2s ease;
        z-index: 50;

        border-right: 1px solid var(--border);
    }

    .sidebar-overlay{
        display:block;
        position: fixed;
        inset: var(--nav-h) 0 0 0;
        background: rgba(0,0,0,.45);
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s ease;
        z-index: 40;
    }

    body.sidebar-open .sidebar{ transform: translateX(0); }
    body.sidebar-open .sidebar-overlay{ opacity: 1; pointer-events: auto; }

    .sidebar-close{ display:inline-flex; }

    .sidebar-link.is-active::before{
        left: 0;
        top: 10px;
        bottom: 10px;
    }
}

/* =========================
   Footer (dashboard + general)
   ========================= */

.footer{
    flex: 0 0 auto;

    width: 100%;
    background: var(--panel);
    border-top: 1px solid var(--border);

    /* ✅ CAMBIO: altura consistente con el cálculo */
    height: var(--footer-h);
    overflow: hidden;
}

.footer .container{
    max-width: 1100px;
    padding: 10px 16px;
    margin: 0 auto;
    font-size: 12px;
    line-height: 1.2;
}

/* =========================
   Auth pages (login/register) - SCOPED
   ========================= */

.auth-page{
    min-height: calc(100vh - var(--nav-h, 60px));
    padding: 24px 16px;
    display: block;
}

.auth-page .auth-card{
    width: 100%;
    max-width: 940px;
    margin: 20px auto;
    padding: 22px;
    border-radius: 18px;
    box-shadow: 0 10px 40px rgba(0,0,0,.35);
    min-width: 0;
}

/* =========================
   Login overlay (loading)
   ========================= */

.login-overlay{
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    backdrop-filter: blur(3px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.login-overlay.is-show{
    display: flex;
    animation: fadeIn .18s ease;
}

.login-overlay-card{
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px 18px 16px;
    min-width: 280px;
    text-align: center;
    box-shadow: 0 20px 70px rgba(0,0,0,.45);
    animation: popIn .18s ease;
}

.login-overlay-title{
    margin-top: 10px;
    font-weight: 800;
    letter-spacing: .2px;
}

.login-status{
    height: 52px;
    display:flex;
    align-items:center;
    justify-content:center;
}

.spinner{
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 4px solid rgba(255,255,255,.12);
    border-top-color: #2b6cb0;
    animation: spin .8s linear infinite;
    opacity: 1;
    transform: scale(1);
    transition: opacity .18s ease, transform .18s ease;
}

.spinner.is-hide{
    opacity: 0;
    transform: scale(.85);
    animation: none;
}

.check{
    display:none;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 2px solid rgba(43,108,176,.55);
    background: rgba(43,108,176,.18);
    font-weight: 900;
    font-size: 22px;
    line-height: 44px;
    text-align:center;
    transform: scale(.92);
    opacity: 0;
}

.check.is-show{
    display:block;
    animation: checkPop .22s ease forwards;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { transform: scale(.96); opacity: .6; } to { transform: scale(1); opacity: 1; } }
@keyframes checkPop { to { transform: scale(1); opacity: 1; } }

/* Para permitir páginas "wide" como /gym/fees sin romper el resto */
.page-content.is-wide > *{
    max-width: none;
}

/* =========================
   Coaches page (scoped)
   ========================= */

.coaches-shell{
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

/* Header */
.coaches-header{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.coaches-actions{
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap: wrap;
}

/* Toolbar */
.coaches-toolbar{
    padding: 12px;
}

.toolbar-grid{
    display:grid;
    grid-template-columns: 1fr 180px auto;
    gap: 12px;
    align-items:end;
    min-width: 0;
}

.toolbar-buttons{
    display:flex;
    gap:10px;
    justify-content:flex-end;
    flex-wrap: wrap;
}

/* List card */
.coaches-list-card{
    padding: 12px;
    display:flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.coaches-list-top{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap: 10px;
    flex-wrap: wrap;
}

/* Table */
.table-scroll{
    width: 100%;
    overflow:auto;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(0,0,0,.08);
}

.table-fit{
    width: 100%;
    border-collapse: collapse;
    min-width: 720px; /* evita que "Acciones" explote en mobile; scrollea horizontal */
}

.table-fit thead th{
    position: sticky;
    top: 0;
    z-index: 1;
    background: #0b111a;
    border-bottom: 1px solid var(--border2);
    text-align:left;
    font-size: 13px;
    padding: 12px;
    white-space: nowrap;
}

.table-fit tbody td{
    padding: 12px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    vertical-align: middle;
}

.table-fit tbody tr:hover{
    background: var(--hover);
}

.td-left   { text-align: left; }
.td-center { text-align:center; }
.td-right  { text-align:right; }

/* Acciones: botones alineados y sin romperse feo */
.actions{
    display:flex;
    justify-content:flex-end;
    gap:8px;
    flex-wrap: wrap;
}

.actions .btn{
    padding: 8px 10px;
    border-radius: 10px;
}

/* Pager */
.pager{
    margin-top: 10px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.pager-left,
.pager-right{
    display:flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items:center;
}

.pager-mid{
    display:flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items:center;
    justify-content:center;
    flex: 1 1 auto;
    min-width: 220px;
}

/* Botones de página */
.page-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;

    min-width: 38px;
    height: 34px;
    padding: 0 10px;

    border-radius: 10px;
    border: 1px solid var(--border2);
    background: #0b111a;
    color: var(--text);
    text-decoration:none;

    user-select:none;
    white-space: nowrap;
}

.page-btn:hover{ filter: brightness(1.1); }

.page-btn.active{
    border-color:#2b6cb0;
    background:#123155;
    font-weight: 800;
}

/* "Disabled" para links <a> */
.btn.disabled,
.page-btn.disabled{
    opacity: .45;
    pointer-events: none;
    cursor: default;
}

/* Responsive: toolbar apila bien */
@media (max-width: 900px){
    .toolbar-grid{
        grid-template-columns: 1fr;
    }
    .toolbar-buttons{
        justify-content:flex-start;
    }
    .pager{
        justify-content:center;
    }
    .pager-left,
    .pager-right{
        justify-content:center;
    }
}

.clients-shell{
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

body.modal-open { overflow: hidden; }

#deleteModal{
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    display: none;
    pointer-events: auto;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(0,0,0,.60);
    z-index: 999999; /* por encima de sidebar y todo */
}

/* filas del lookup */
.fee-row{
    border: 1px solid rgba(255,255,255,.08);
    border-left-width: 6px;
    border-radius: 12px;
}

.fee-ok    { border-left-color: #22c55e; } /* verde */
.fee-warn  { border-left-color: #f59e0b; } /* amarillo */
.fee-danger{ border-left-color: #ef4444; } /* rojo */

/* badge */
.fee-badge{
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 999px;
    font-weight: 900;
    letter-spacing: .3px;
    border: 1px solid rgba(255,255,255,.12);
}
.fee-badge-ok    { background: rgba(34,197,94,.18); }
.fee-badge-warn  { background: rgba(245,158,11,.18); }
.fee-badge-danger{ background: rgba(239,68,68,.18); }

/* filas con color por estado */
.row-ok    { border-left: 6px solid #22c55e; }
.row-warn  { border-left: 6px solid #f59e0b; }
.row-danger{ border-left: 6px solid #ef4444; }

.table-fit tbody tr.row-ok,
.table-fit tbody tr.row-warn,
.table-fit tbody tr.row-danger{
    background: rgba(255,255,255,.02);
}

.table-fit tbody tr.row-ok:hover,
.table-fit tbody tr.row-warn:hover,
.table-fit tbody tr.row-danger:hover{
    background: rgba(255,255,255,.05);
}

/* badges */
.badge{
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 999px;
    font-weight: 900;
    border: 1px solid rgba(255,255,255,.12);
}
.badge-ok     { background: rgba(34,197,94,.18); }
.badge-warn   { background: rgba(245,158,11,.18); }
.badge-danger { background: rgba(239,68,68,.18); }

.sidebar-subgroup-toggle{
    width: 100%;
    cursor: pointer;
    border: 0;
    background: transparent;
}

/* por si algún estilo global le saca el click */
.sidebar-subgroup-toggle{
    pointer-events: auto;
}

/* Submenu interno (no heredar max-height:0 de .sidebar-subnav) */
.sidebar-subgroup-body{
    display: none;
    margin-left: 10px;
    margin-top: 6px;
}

.sidebar-subgroup-body .sidebar-link{
    padding-left: 10px;
}

/* =========================
   Tablas / helpers
   ========================= */

.td-left   { text-align:left; }
.td-center { text-align:center; }
.td-right  { text-align:right; }

/* Opcional: que los números se vean “columna” */
.products-table td.td-right,
.products-table td.td-center{
    font-variant-numeric: tabular-nums;
}

/* =========================
   Products table (buscador)
   ========================= */

/* Tu wrapper ya existe, lo usamos para que se vea bien */
.table-scroll{
    width: 100%;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(0,0,0,.08);
}

/* Asegura que ocupe todo el ancho del contenedor */
.products-table{
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed; /* clave para que no “amontone” columnas */
    min-width: 760px;    /* si no entra, scrollea horizontal prolijo */
}

/* Cabecera bien diferenciada */
.products-table thead th{
    position: sticky;
    top: 0;
    z-index: 2;
    background: #0b111a;
    border-bottom: 1px solid var(--border2);
    padding: 12px;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

/* Filas con aire */
.products-table tbody td{
    padding: 12px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    vertical-align: middle;
}

/* Hover suave */
.products-table tbody tr:hover{
    background: rgba(255,255,255,.04);
}

/* Números “columna” (se alinean visualmente mejor) */
.products-table td.td-right,
.products-table td.td-center{
    font-variant-numeric: tabular-nums;
}

/* =========================
   AUTH ONLY: habilita scroll global
   (body estaba en overflow:hidden)
   ========================= */
body.auth-body{
    overflow: auto;      /* vuelve el scroll */
    height: auto;        /* evita recortes */
}

/* por si algún wrapper limita altura */
body.auth-body .auth-page{
    min-height: calc(100vh - var(--nav-h, 60px));
}



.plan-badge{
    font-size:11px;
    padding:3px 8px;
    border-radius:999px;
    border:1px solid rgba(255,255,255,.22);
    opacity:.9;
    font-weight:600;
}
.plan-badge.plan-enterprise{
    border:1px solid rgba(255,255,255,.35);
    font-weight:700;
    opacity:1;
}
.plan-badge.plan-pro{
    border:1px solid rgba(255,255,255,.28);
    font-weight:600;
    opacity:1;
}
.plan-badge.plan-free{
    border:1px solid rgba(255,255,255,.18);
    opacity:.85;
}
.plan-badge.plan-basic{
    border:1px solid rgba(255,255,255,.22);
}



.nav-avatar{
    width:34px;
    height:34px;
    border-radius:999px;
    object-fit:cover;
}

.nav-avatar-fallback{
    width:34px;
    height:34px;
    border-radius:999px;
    background:#1e293b;
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:800;
}

/* =========================
          Avatar (estético + seguro)
          ========================= */
.nav-user{
    display:flex;
    align-items:center;
    justify-content:center;
}
.nav-avatar-btn{
    border:0;
    background:transparent;
    padding:0;
    margin:0;
    cursor:pointer;
    border-radius:999px;
    line-height:0;
    display:inline-flex;
    align-items:center;
    justify-content:center;
}
.nav-avatar{
    width:34px;
    height:34px;
    border-radius:999px;
    object-fit:cover;
    display:block;
    border:1px solid rgba(255,255,255,.14);
    background:rgba(255,255,255,.06);
}
.nav-avatar-fallback{
    width:34px;
    height:34px;
    border-radius:999px;
    border:1px solid rgba(255,255,255,.14);
    background:rgba(255,255,255,.06);
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:900;
    font-size:14px;
    letter-spacing:.5px;
    user-select:none;
}
.nav-avatar-btn:focus-visible{
    outline:2px solid rgba(59,130,246,.9);
    outline-offset:2px;
}
.nav-avatar-btn:hover .nav-avatar,
.nav-avatar-btn:hover .nav-avatar-fallback{
    box-shadow:0 0 0 3px rgba(59,130,246,.18);
    border-color:rgba(59,130,246,.55);
}

/* =========================
   Modal preview
   ========================= */
.img-modal{
    position:fixed;
    inset:0;
    z-index:9999;
    display:none;
}
.img-modal.is-open{ display:block; }

.img-modal__backdrop{
    position:absolute;
    inset:0;
    background:rgba(0,0,0,.72);
    backdrop-filter: blur(6px);
}
.img-modal__panel{
    position:relative;
    z-index:1;
    width:min(920px, calc(100vw - 28px));
    margin: max(16px, 6vh) auto 0;
    border-radius:16px;
    border:1px solid rgba(255,255,255,.14);
    background:#0b1220;
    overflow:hidden;
    box-shadow: 0 18px 60px rgba(0,0,0,.55);
}
.img-modal__top{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    padding:10px 12px;
    border-bottom:1px solid rgba(255,255,255,.10);
}
.img-modal__title{
    display:flex;
    align-items:center;
    gap:8px;
    font-weight:900;
}
.img-modal__actions{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
}
.img-modal__btn{
    padding:8px 10px;
    border-radius:12px;
    border:1px solid rgba(255,255,255,.14);
    background:transparent;
    color:#e6edf3;
    cursor:pointer;
    font-weight:800;
}
.img-modal__btn:hover{
    border-color:rgba(59,130,246,.55);
    box-shadow:0 0 0 3px rgba(59,130,246,.18);
}

.img-modal__body{
    padding:12px;
    display:flex;
    align-items:center;
    justify-content:center;
    background: radial-gradient(1200px 400px at 50% 0%, rgba(59,130,246,.12), transparent 55%);
}
.img-modal__img{
    max-width:100%;
    max-height:72vh;
    border-radius:14px;
    display:block;
    border:1px solid rgba(255,255,255,.12);
    background:rgba(255,255,255,.04);
}

@media (max-width: 520px){
    .nav-avatar, .nav-avatar-fallback{ width:32px; height:32px; }
    .img-modal__panel{ margin-top: 16px; }
    .img-modal__img{ max-height: 68vh; }
}

/* =========================
   FullCalendar - Dark readable (FitApp)
   ========================= */

.ap-cal-wrap{
    background: var(--panel) !important;
    border: 1px solid var(--border) !important;
}

/* texto base */
.ap-cal-wrap .fc{
    color: var(--text) !important;
}

/* toolbar */
.ap-cal-wrap .fc .fc-toolbar{
    background: rgba(255,255,255,.02) !important;
    border-bottom: 1px solid rgba(255,255,255,.08) !important;
}

/* título toolbar */
.ap-cal-wrap .fc .fc-toolbar-title{
    color: var(--text) !important;
}

/* botones */
.ap-cal-wrap .fc .fc-button{
    background: rgba(255,255,255,.06) !important;
    border: 1px solid rgba(255,255,255,.10) !important;
    color: var(--text) !important;
    border-radius: 10px !important;
}
.ap-cal-wrap .fc .fc-button:hover{
    background: rgba(255,255,255,.10) !important;
}
.ap-cal-wrap .fc .fc-button-primary:not(:disabled).fc-button-active{
    background: rgba(43,108,176,.28) !important;
    border-color: rgba(43,108,176,.45) !important;
}

/* ===== CABECERA DIAS (acá estaba el problema) ===== */
.ap-cal-wrap .fc .fc-col-header{
    background: rgba(255,255,255,.03) !important;
}
.ap-cal-wrap .fc .fc-col-header-cell{
    background: rgba(255,255,255,.03) !important;
    border-color: rgba(255,255,255,.10) !important;
}
.ap-cal-wrap .fc .fc-col-header-cell-cushion{
    color: var(--text) !important;
    opacity: .92;
    font-weight: 800;
    padding: 8px 0 !important;
}

/* números del mes (vista month) */
.ap-cal-wrap .fc .fc-daygrid-day-number{
    color: rgba(255,255,255,.88) !important;
}

/* labels horas */
.ap-cal-wrap .fc .fc-timegrid-slot-label,
.ap-cal-wrap .fc .fc-timegrid-axis-cushion{
    color: rgba(255,255,255,.78) !important;
}

/* grilla y bordes */
.ap-cal-wrap .fc .fc-scrollgrid,
.ap-cal-wrap .fc .fc-scrollgrid-section > td,
.ap-cal-wrap .fc td,
.ap-cal-wrap .fc th{
    border-color: rgba(255,255,255,.10) !important;
}

/* fondo del body de la grilla */
.ap-cal-wrap .fc .fc-timegrid-body,
.ap-cal-wrap .fc .fc-daygrid-body{
    background: rgba(255,255,255,.02) !important;
}

/* línea de "ahora" visible */
.ap-cal-wrap .fc .fc-timegrid-now-indicator-line{
    border-color: rgba(239,68,68,.9) !important;
    opacity: 1 !important;
}

/* La fila de encabezado (lun/mar/mié...) y sus TH */
.ap-cal-wrap .fc .fc-scrollgrid-section-header,
.ap-cal-wrap .fc .fc-scrollgrid-section-header > td,
.ap-cal-wrap .fc .fc-col-header,
.ap-cal-wrap .fc .fc-col-header-cell,
.ap-cal-wrap .fc-theme-standard th {
    background: rgba(0,0,0,.26) !important;       /* oscuro */
    border-color: rgba(255,255,255,.10) !important;
}

/* Texto del encabezado */
.ap-cal-wrap .fc .fc-col-header-cell-cushion {
    color: rgba(255,255,255,.88) !important;      /* blanco visible */
    font-weight: 800 !important;
    opacity: 1 !important;
}

/* Para que NO “herede” estilos raros */
.ap-cal-wrap .fc .fc-col-header-cell-cushion:hover {
    color: rgba(255,255,255,.92) !important;
    text-decoration: none !important;
}

/* Separador inferior del header */
.ap-cal-wrap .fc .fc-scrollgrid-section-header th {
    border-bottom: 1px solid rgba(255,255,255,.10) !important;
}

/* Fondo general del área (por si algún theme mete blanco) */
.ap-cal-wrap .fc .fc-timegrid-body,
.ap-cal-wrap .fc .fc-daygrid-body {
    background: rgba(255,255,255,.03) !important;
}