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

    --nav-h: 60px;
    --footer-h: 44px;

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

    --sidebar-w: 280px;
    --sidebar-pad: 12px;

    --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;
    overflow: hidden;
}

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

.container{
    max-width: 980px;
    margin: 0 auto;
    padding: 20px;
    min-width: 0;
}

.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;
}

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

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

.input{
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    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;
    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;
    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:8px;
    align-items:center;
}

.nav-right .muted{
    margin:0;
    white-space:nowrap;
}

.nav-notif{
    position:relative;
    display:flex;
    align-items:center;
    margin-right:2px;
}

.nav-burger{
    display:none;
    font-size:18px;
    line-height:1;
}

/* =========================
   Admin/User shell
   ========================= */

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;
    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: 10px;
    background: transparent;
    border-right: 1px solid rgba(255,255,255,.04);
    overflow: auto;
    border-radius: 0;
    min-height: 0;
}

.sidebar-top{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    margin-bottom:10px;
    padding:10px 12px;
    background: var(--panel);
    border:1px solid var(--border);
    border-radius:14px;
}

.sidebar-nav{
    display:flex;
    flex-direction:column;
    gap:6px;
    padding:8px;
    background: var(--panel);
    border:1px solid var(--border);
    border-radius:14px;
}

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

.sidebar-close{ display:none; }

.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;
}

.sidebar-details > summary{
    cursor:pointer;
    list-style:none;
    display:flex;
    align-items:center;
    justify-content:flex-start;
    gap:10px;
    width:100%;
    text-align:left;
    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; }

.sidebar-details > summary::after{
    margin-left:auto;
    content:"▸";
    opacity:.8;
    transform: rotate(0deg);
    transition: transform .18s ease;
}

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

.sidebar-subnav{
    padding: 6px 0 10px 14px;
    display: none;
}

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

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

.sidebar-overlay{ display:none; }

/* =========================
   Content area + watermark
   ========================= */

.page-content{
    position: relative;
    overflow: auto;
    min-width:0;
    min-height: 0;
    height: 100%;
    padding: 2px 2px;
    background: transparent;
}

.page-content-inner{
    position: relative;
    z-index: 1;
    min-height: 100%;
    background: transparent;
}

/* si usás páginas wide */
.page-content.is-wide > *{
    max-width: none;
}

.org-watermark-layer{
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: min(42vw, 420px);
    opacity: .12 !important;
    filter: grayscale(100%);
}

.page-content > .org-watermark-layer{
    inset: 12px 12px 16px 12px;
}

.page-content > .org-watermark-layer{
    inset: 12px 12px 16px 12px;
}

/* Hacer el contenido principal menos opaco para que se vea el watermark */
.page-content .card,
.page-content .table-card,
.page-content .panel,
.page-content .content-card,
.page-content .widget,
.page-content .metric-card,
.page-content .form-card,
.page-content .section-card,
.page-content .table-wrap,
.page-content .table-responsive,
.page-content .list-card,
.page-content .data-card,
.page-content .coaches-toolbar,
.page-content .coaches-list-card,
.page-content .auth-card{
    background: rgba(15, 22, 33, 0.82) !important;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

/* wrappers frecuentes */
.page-content .table-scroll{
    background: rgba(0,0,0,.14);
}

/* inputs menos pesados dentro del contenido */
.page-content input,
.page-content select,
.page-content textarea{
    background: rgba(11,17,26,.78);
}

/* sidebar y footer siguen sólidos */
.sidebar .card,
.sidebar-top,
.sidebar-nav{
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* =========================
   Mobile drawer
   ========================= */

@media (max-width: 900px){

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

    main.admin-shell{
        grid-template-columns: 1fr;
        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;
    }

    .org-watermark-layer{
        background-size: min(92vw, 560px);
        background-position: center 52%;
        opacity: .10;
    }

    .page-content .card,
    .page-content .table-card,
    .page-content .panel,
    .page-content .content-card,
    .page-content .widget,
    .page-content .metric-card,
    .page-content .form-card,
    .page-content .section-card,
    .page-content .table-wrap,
    .page-content .table-responsive,
    .page-content .list-card,
    .page-content .data-card,
    .page-content .coaches-toolbar,
    .page-content .coaches-list-card,
    .page-content .auth-card{
        background: rgba(15, 22, 33, 0.88) !important;
    }
}

/* =========================
   Footer interno app
   ========================= */

:root{
    --footer-h: 34px;
}

.app-footer{
    flex: 0 0 var(--footer-h);
    height: var(--footer-h);
    border-top: 1px solid rgba(255,255,255,.06);
    background: transparent;
    margin-top: 0;
}

.app-footer-inner{
    height: 100%;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    max-width: 100%;
}

.app-footer-left,
.app-footer-right{
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
}

.app-footer-logo{
    width: 13px;
    height: 13px;
    object-fit: contain;
    opacity: .9;
}

.app-footer-brand{
    font-size: 11.5px;
    font-weight: 600;
    color: rgba(255,255,255,.84);
}

.app-footer-text,
.app-footer-right span,
.app-footer-right a{
    font-size: 11.5px;
    color: rgba(255,255,255,.56);
    text-decoration: none;
    line-height: 1;
}

.app-footer-right a:hover{
    color: rgba(255,255,255,.86);
}

@media (max-width: 900px){
    :root{
        --footer-h: auto;
    }

    .app-footer{
        height: auto;
        flex: 0 0 auto;
    }

    .app-footer-inner{
        padding: 8px 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}

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

.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;
}

body.auth-body{
    overflow: auto;
    height: auto;
}

body.auth-body .auth-page{
    min-height: calc(100vh - var(--nav-h, 60px));
}

/* =========================
   Auth watermark
   ========================= */

.auth-layout-shell{
    position: relative;
    min-height: 100vh;
    background: transparent;
}

.auth-layout-content{
    position: relative;
    z-index: 1;
    min-height: 100vh;
    background: transparent;
}

.auth-layout-shell .org-watermark-layer{
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-repeat: no-repeat;
    background-position: center 52%;
    background-size: min(72vw, 760px);
    opacity: .14;
    filter: none;
}

.auth-layout-shell .auth-card{
    background: rgba(15, 22, 33, 0.84) !important;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

@media (max-width: 900px){
    .auth-layout-shell .org-watermark-layer{
        background-size: min(88vw, 520px);
        background-position: center 50%;
        opacity: .12 !important;
    }

    .auth-layout-shell .auth-card{
        background: rgba(15, 22, 33, 0.90) !important;
    }
}

/* =========================
   Login overlay
   ========================= */

.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; } }

/* =========================
   Coaches page
   ========================= */

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

.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;
}

.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;
}

.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-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;
}

.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; }

.actions{
    display:flex;
    justify-content:flex-end;
    gap:8px;
    flex-wrap: wrap;
}

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

.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;
}

.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;
}

.btn.disabled,
.page-btn.disabled{
    opacity: .45;
    pointer-events: none;
    cursor: default;
}

@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;
}

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

.fee-ok    { border-left-color: #22c55e; }
.fee-warn  { border-left-color: #f59e0b; }
.fee-danger{ border-left-color: #ef4444; }

.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); }

.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);
}

.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;
    pointer-events: auto;
}

.sidebar-subgroup-body{
    display: none;
    margin-left: 10px;
    margin-top: 6px;
}

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

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

.products-table td.td-right,
.products-table td.td-center{
    font-variant-numeric: tabular-nums;
}

/* =========================
   Products table
   ========================= */

.products-table{
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    min-width: 760px;
}

.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;
}

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

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

.products-table td.td-right,
.products-table td.td-center{
    font-variant-numeric: tabular-nums;
}

/* =========================
   Plan badge
   ========================= */

.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);
}

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

.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;
}

.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
   ========================= */

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

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

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

.ap-cal-wrap .fc .fc-toolbar-title{
    color: var(--text) !important;
}

.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;
}

.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;
}
.ap-cal-wrap .fc .fc-daygrid-day-number{
    color: rgba(255,255,255,.88) !important;
}
.ap-cal-wrap .fc .fc-timegrid-slot-label,
.ap-cal-wrap .fc .fc-timegrid-axis-cushion{
    color: rgba(255,255,255,.78) !important;
}
.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;
}
.ap-cal-wrap .fc .fc-timegrid-body,
.ap-cal-wrap .fc .fc-daygrid-body{
    background: rgba(255,255,255,.02) !important;
}
.ap-cal-wrap .fc .fc-timegrid-now-indicator-line{
    border-color: rgba(239,68,68,.9) !important;
    opacity: 1 !important;
}

.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;
    border-color: rgba(255,255,255,.10) !important;
}

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

.ap-cal-wrap .fc .fc-col-header-cell-cushion:hover {
    color: rgba(255,255,255,.92) !important;
    text-decoration: none !important;
}

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

.ap-cal-wrap .fc .fc-timegrid-body,
.ap-cal-wrap .fc .fc-daygrid-body {
    background: rgba(255,255,255,.03) !important;
}


/* =========================================================
   OVERRIDE FINAL WATERMARK ORG
   PEGAR AL FINAL DEL app.css
   ========================================================= */

/* wrappers raíz transparentes */
.clients-shell,
.coaches-shell,
.kiosk-page,
.page-shell-transparent {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

/* área general del contenido */
.page-content {
    background: transparent !important;
}

.page-content-inner {
    position: relative !important;
    z-index: 1 !important;
    background: transparent !important;
    min-height: 100% !important;
}

/* watermark MUCHO más visible */
.org-watermark-layer{
    position: absolute !important;
    inset: 0 !important;
    pointer-events: none !important;
    z-index: 0 !important;

    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-size: 980px auto !important;

    opacity: .18 !important;
    filter: none !important;
}

/* que ocupe toda el área útil */
.page-content > .org-watermark-layer{
    inset: 0 !important;
}

/* cards del contenido un poco más translúcidas */
.page-content .card,
.page-content .table-card,
.page-content .panel,
.page-content .content-card,
.page-content .widget,
.page-content .metric-card,
.page-content .form-card,
.page-content .section-card,
.page-content .table-wrap,
.page-content .table-responsive,
.page-content .list-card,
.page-content .data-card,
.page-content .coaches-toolbar,
.page-content .coaches-list-card,
.page-content .clients-list-card,
.page-content .auth-card{
    background: rgba(15, 22, 33, 0.72) !important;
    backdrop-filter: blur(1.5px) !important;
    -webkit-backdrop-filter: blur(1.5px) !important;
}

/* tablas y wrappers */
.page-content .table-scroll{
    background: rgba(0,0,0,.08) !important;
}

/* inputs siguen legibles */
.page-content input,
.page-content select,
.page-content textarea{
    background: rgba(11,17,26,.82) !important;
}

/* auth también */
.auth-layout-shell .org-watermark-layer{
    inset: 0 !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-size: 820px auto !important;
    opacity: .18 !important;
    filter: none !important;
}

.auth-layout-shell .auth-card{
    background: rgba(15, 22, 33, 0.76) !important;
}

/* mobile */
@media (max-width: 900px){
    .org-watermark-layer{
        background-size: 78vw auto !important;
        background-position: center center !important;
        opacity: .14 !important;
    }

    .auth-layout-shell .org-watermark-layer{
        background-size: 82vw auto !important;
        opacity: .14 !important;
    }

    .page-content .card,
    .page-content .table-card,
    .page-content .panel,
    .page-content .content-card,
    .page-content .widget,
    .page-content .metric-card,
    .page-content .form-card,
    .page-content .section-card,
    .page-content .table-wrap,
    .page-content .table-responsive,
    .page-content .list-card,
    .page-content .data-card,
    .page-content .coaches-toolbar,
    .page-content .coaches-list-card,
    .page-content .clients-list-card,
    .page-content .auth-card{
        background: rgba(15, 22, 33, 0.80) !important;
    }
}