/* assets/styles/monday_admins.css */

/* === Shell global === */
html { overflow-y: scroll; }
body { overflow-x: visible; }

:root{
    --m-bg: #f6f7fb;
    --m-card: #ffffff;
    --m-border: rgba(0,0,0,.06);
    --m-shadow: 0 18px 40px rgba(0, 0, 0, .06);
    --m-text: rgba(0,0,0,.86);
    --m-muted: rgba(0,0,0,.60);
    --m-accent: #361af8;
    --m-accent2: #2121fd;
    --m-accent-soft: rgba(80,55,255,.10);
    --m-accent-soft2: rgba(80,55,255,.06);
}

body { background: var(--m-bg); color: var(--m-text); }

.admin-shell{
    min-height: 100vh;
    display: grid;
    grid-template-columns: 260px 1fr;
}

/* === Sidebar (comme ton screen) === */
.admin-sidebar{
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 18px 14px;
    border-right: 1px solid var(--m-border);
    background: rgba(255,255,255,.55);
    backdrop-filter: blur(10px);
}

.admin-logo{
    display:flex;
    align-items:center;
    gap: 10px;
    padding: 10px 10px;
    border-radius: 14px;
}

.admin-logo-badge{
    width: 80px; height: 80px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--m-border);
    box-shadow: 0 10px 24px rgba(0,0,0,.06);
    display:flex; align-items:center; justify-content:center;
    overflow: hidden;
}
.admin-logo-badge img{ width: 100%; height: 100%; object-fit: contain; padding: 6px; }

.admin-logo-title{
    font-weight: 900;
    letter-spacing: -.4px;
    line-height: 1;
}
.admin-logo-sub{
    color: var(--m-muted);
    font-size: 12px;
    font-weight: 600;
}

.admin-nav{
    margin-top: 14px;
    background: var(--m-card);
    border: 1px solid var(--m-border);
    border-radius: 16px;
    box-shadow: var(--m-shadow);
    padding: 10px;
}

.admin-nav a{
    display:flex;
    align-items:center;
    gap: 10px;
    padding: 8px 14px;
    border-radius: 12px;
    text-decoration:none;
    color: rgba(0,0,0,.72);
    font-weight: 700;
}
.admin-nav a:hover{ background: var(--m-accent-soft2); }
.admin-nav a.active{
    background: var(--m-accent-soft);
    color: rgba(0,0,0,.86);
}

.admin-nav .nav-icon{
    width: 22px; height: 22px;
    display:inline-flex;
    align-items:center; justify-content:center;
    border-radius: 8px;
    background: rgba(0,0,0,.04);
}

/* === Content === */
.admin-main{
    padding: 22px;
}

/* Variante full-width pour les pages avec tableaux larges */
.admin-main--wide{
    max-width: 100%;
    padding: 22px 32px;     /* un peu plus d'air sur les côtés */
}

.admin-topbar{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap: 10px;
    margin-bottom: 18px;
}

.admin-user{
    color: var(--m-muted);
    font-weight: 600;
    font-size: 13px;
}

/* Cards Monday */
.m-card{
    background: var(--m-card);
    border: 1px solid var(--m-border);
    border-radius: 16px;
    box-shadow: var(--m-shadow);
    max-width: 100%;           /* 🔥 s'adapte à la largeur dispo */
}
.m-card-body{ padding: 18px; }

.m-title{
    font-weight: 900;
    letter-spacing: -.6px;
    line-height: 1.05;
}
.m-section-title{
    font-weight: 900;
    font-size: 12px;
    letter-spacing: .6px;
    color: rgba(55, 32, 216, 0.85);
}

/* Buttons Monday */
.btn-monday{
    text-decoration: none;
    border-radius: 10px;
    padding: 8px 14px;
    border: 0;
    background: linear-gradient(90deg, var(--m-accent2), var(--m-accent));
    box-shadow: 0 10px 18px rgba(80, 55, 255, .18);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
}
.btn-monday:hover{ filter: brightness(0.98); transform: translateY(-1px); }
.btn-monday:active{ transform: translateY(0); }

/* Responsive */
@media (max-width: 992px){
    .admin-shell{ grid-template-columns: 1fr; }
    .admin-sidebar{ position: relative; height: auto; }
}

.admin-table thead th{
    font-size: 12px;
    letter-spacing: .4px;
    color: rgba(0,0,0,.65);
    text-transform: uppercase;
}
.admin-table tbody tr:hover{
    background: rgba(80,55,255,.04);
}

.payment-chips { min-height: 28px; }

/* KPI : mêmes hauteurs, même en responsive */
.kpi-row > div { display: flex; }
.kpi-card { width: 100%; }

.btn.btn-outline-secondary.btn-sm{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Filters layout (clean + aligned) */
.filter-grid{
    display: grid;
    grid-template-columns: 2fr 1fr 1.2fr 1fr auto;
    gap: 10px;
    align-items: end;
}

.filter-item{ min-width: 0; } /* évite les débordements */
.filter-item--search{ min-width: 220px; }
.filter-item--btn{ width: 86px; }

.filter-label{
    display: block;
    height: 18px;              /* ✅ clé : même hauteur de label */
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--m-muted);
    letter-spacing: .2px;
}

/* Mobile */
@media (max-width: 992px){
    .filter-grid{
        grid-template-columns: 1fr 1fr;
    }
    .filter-item--search{ grid-column: 1 / -1; }
    .filter-item--btn{ width: auto; }
}
@media (max-width: 576px){
    .filter-grid{ grid-template-columns: 1fr; }
    .filter-item--search{ grid-column: auto; }
}

.admin-nav-sep{
    height: 1px;
    background: var(--m-border);
    margin: .75rem 0;
}

.admin-nav-group{
    margin-top: .15rem;
}

.admin-nav-group-title{
    display:flex;
    align-items:center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 12px;
    color: var(--m-muted);
    font-weight: 900;
    font-size: 11px;
    letter-spacing: .6px;
    text-transform: uppercase;
    background: rgba(0,0,0,.02);
}

.admin-nav-sub{
    display:flex;
    flex-direction: column;
    gap: 4px;
    padding: 6px 0 0;
}

.admin-nav-sub a{
    padding-left: 28px;
    position: relative;
}

.admin-nav-sub a:before{
    content:"";
    position:absolute;
    left: 14px;
    top: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,.18);
}

.admin-nav-sub a.active:before{
    background: var(--m-accent);
}

/* === Badges (Monday style) ============================================= */
.badge{
    font-weight: 900;
    letter-spacing: .2px;
    border-radius: 999px;
    padding: .42rem .62rem;
    line-height: 1;
    border: 1px solid transparent;
    box-shadow: 0 8px 18px rgba(0,0,0,.05);
    transform: translateZ(0); /* perf */
}

/* Subtle badges : on leur donne un vrai look "pills" */
.badge.text-bg-primary-subtle{
    color: rgba(0,0,0,.82) !important;
    background: linear-gradient(90deg, rgba(80,55,255,.14), rgba(80,55,255,.08)) !important;
    border-color: rgba(80,55,255,.22) !important;
}

.badge.text-bg-success-subtle{
    color: rgba(0,0,0,.78) !important;
    background: linear-gradient(90deg, rgba(18,183,106,.16), rgba(18,183,106,.08)) !important;
    border-color: rgba(18,183,106,.22) !important;
}

.badge.text-bg-secondary-subtle{
    color: rgba(0,0,0,.70) !important;
    background: linear-gradient(90deg, rgba(0,0,0,.08), rgba(0,0,0,.04)) !important;
    border-color: rgba(0,0,0,.14) !important;
}

.badge.text-bg-danger-subtle{
    color: rgba(0,0,0,.78) !important;
    background: linear-gradient(90deg, rgba(244,63,94,.16), rgba(244,63,94,.08)) !important;
    border-color: rgba(244,63,94,.22) !important;
}

.badge.text-bg-warning-subtle{
    color: rgba(0,0,0,.78) !important;
    background: linear-gradient(90deg, rgba(245,158,11,.18), rgba(245,158,11,.10)) !important;
    border-color: rgba(245,158,11,.25) !important;
}

.badge.text-bg-dark-subtle{
    color: rgba(0,0,0,.82) !important;
    background: linear-gradient(90deg, rgba(12,19,79,.14), rgba(12,19,79,.06)) !important;
    border-color: rgba(12,19,79,.22) !important;
}

/* Optionnel: un mini "point" à gauche (style chip) */
.badge.m-badge-dot{
    position: relative;
    padding-left: .52rem;
}
.badge.m-badge-dot::before{
    content:"";
    display:inline-block;
    width: 7px; height: 7px;
    border-radius: 999px;
    margin-right: .42rem;
    background: currentColor;
    opacity: .45;
    transform: translateY(-1px);
}

/* Hover discret */
.badge:hover{ filter: brightness(.99); }

/* === Badges maison ====================================================== */
.m-badge{
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    font-weight: 900;
    font-size: 12px;
    letter-spacing: .2px;
    padding: .42rem .62rem;
    border-radius: 999px;
    border: 1px solid transparent;
    box-shadow: 0 8px 18px rgba(0,0,0,.05);
    line-height: 1;
}

.m-badge--primary{
    color: rgba(0,0,0,.82);
    background: linear-gradient(90deg, rgba(80,55,255,.14), rgba(80,55,255,.08));
    border-color: rgba(80,55,255,.22);
}
.m-badge--success{
    color: rgba(0,0,0,.78);
    background: linear-gradient(90deg, rgba(18,183,106,.16), rgba(18,183,106,.08));
    border-color: rgba(18,183,106,.22);
}
.m-badge--muted{
    color: rgba(0,0,0,.70);
    background: linear-gradient(90deg, rgba(0,0,0,.08), rgba(0,0,0,.04));
    border-color: rgba(0,0,0,.14);
}

.m-badge .dot{
    width: 7px; height: 7px;
    border-radius: 999px;
    background: currentColor;
    opacity: .45;
}

/* =========================
   Wizard Offering Tables - FIXED
   ========================= */

/* Wrapper responsive avec scroll horizontal */
.table-responsive{
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* 🔥 SOLUTION : auto layout pour répartition naturelle */
.offering-table{
    width: 100%;
    min-width: 1000px;      /* 🔥 réduit légèrement pour moins de scroll */
    table-layout: auto;     /* auto au lieu de fixed */
}

/* Headers propres */
.offering-table thead th{
    font-size: 12px;
    letter-spacing: .4px;
    text-transform: uppercase;
    white-space: nowrap;
    vertical-align: middle;
    padding: .75rem;        /* padding cohérent */
}

/* Cells */
.offering-table td{
    vertical-align: middle;
    padding: .75rem;        /* padding cohérent */
}

/* Colonne label (Assurance/Option) : wrap autorisé + largeur min */
.offering-table td:nth-child(2){
    white-space: normal;
    min-width: 200px;       /* garantit une largeur min confortable */
}
.offering-table td:nth-child(2) .small{
    white-space: normal;
    line-height: 1.2;
}

/* Inputs : largeur contrôlée selon la colonne */
.offering-table .form-control-sm,
.offering-table .form-select-sm{
    width: 100%;
    min-height: 32px;
    box-sizing: border-box; /* 🔥 important pour éviter débordements */
}

/* Largeurs suggérées pour colonnes spécifiques */
.offering-table th:nth-child(1), /* Activer */
.offering-table td:nth-child(1) {
    width: 90px;
    min-width: 90px;
}

.offering-table th:nth-child(3), /* Obligatoire */
.offering-table td:nth-child(3),
.offering-table th:nth-child(4), /* Pré-cochée */
.offering-table td:nth-child(4) {
    width: 130px;
    min-width: 130px;
}

.offering-table th:nth-child(5), /* Prix spécifique */
.offering-table td:nth-child(5) {
    width: 220px;
    min-width: 180px;
}

.offering-table th:nth-child(6), /* Par membre / Quantité */
.offering-table td:nth-child(6) {
    width: 210px;
    min-width: 180px;
}

/* Pour la table Options avec colonnes supplémentaires */
.offering-table--opt th:nth-child(7), /* Min */
.offering-table--opt td:nth-child(7),
.offering-table--opt th:nth-child(8), /* Max */
.offering-table--opt td:nth-child(8) {
    width: 110px;
    min-width: 100px;
}

/* Checkboxes : centrage fiable */
.offering-table .cell-center{
    text-align: center;
    vertical-align: middle;
}
.offering-table .cell-center > .form-check-input{
    margin: 0 auto;         /* centrage parfait */
    float: none;
    display: block;
}

/* Padding optimisé pour colonnes checkbox */
.offering-table th.cell-center,
.offering-table td.cell-center{
    padding-left: .5rem;
    padding-right: .5rem;
}

/* ==========================================================
   MEMBER PASSWORD
   ========================================================== */

.member-password-page{
    display: grid;
    gap: 18px;
}

.member-password-hero{
    padding: 24px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.92));
}

.member-password-hero::before{
    content: "";
    position: absolute;
    inset: 0;
    background:
            radial-gradient(circle at top right, var(--m-accent-soft), transparent 30%),
            radial-gradient(circle at bottom left, var(--m-accent-soft2), transparent 28%);
    pointer-events: none;
}

.member-password-hero__content{
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.member-password-hero__title{
    font-size: clamp(28px, 3vw, 40px);
    margin-bottom: 8px;
}

.member-password-hero__text{
    color: var(--m-muted);
    font-size: 15px;
    max-width: 720px;
}

.member-password-content{
    padding: 22px;
}

.member-password-content__head{
    margin-bottom: 18px;
}

.member-password-content__title{
    margin: 0;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -.4px;
    color: rgba(0,0,0,.88);
}

.member-password-layout{
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, .8fr);
    gap: 18px;
    align-items: start;
}

.member-password-form-card,
.member-password-tip{
    background: #fff;
    border: 1px solid var(--m-border);
    border-radius: 18px;
    padding: 20px;
    box-shadow:
            inset 0 1px 0 rgba(255,255,255,.8),
            0 10px 24px rgba(0,0,0,.03);
}

.member-password-form{
    display: grid;
    gap: 18px;
}

.member-password-form .form-label{
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .3px;
    color: rgba(0,0,0,.62);
    margin-bottom: 6px;
    text-transform: uppercase;
}

.member-password-form .form-control,
.member-password-form .form-select{
    border-radius: 14px;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid rgba(0,0,0,.10);
    background: #fff;
    box-shadow: 0 1px 0 rgba(255,255,255,.8) inset;
}

.member-password-form .form-control:focus,
.member-password-form .form-select:focus{
    border-color: rgba(80,55,255,.35);
    box-shadow: 0 0 0 .25rem rgba(80,55,255,.10);
}

.member-password-form__footer{
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(0,0,0,.06);
    flex-wrap: wrap;
}

.member-password-tip__title{
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: -.2px;
}

.member-password-tip__text{
    color: var(--m-muted);
    line-height: 1.55;
}

@media (max-width: 992px){
    .member-password-layout{
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px){
    .member-password-hero,
    .member-password-content{
        padding: 18px;
    }

    .member-password-form-card,
    .member-password-tip{
        padding: 16px;
    }

    .member-password-form__footer{
        justify-content: stretch;
    }

    .member-password-form__footer .btn,
    .member-password-form__footer .btn-monday-secondary{
        width: 100%;
        text-align: center;
    }

    #member_equestrian_hosting_hasEquestrianHosting_0 {
        margin-right: 15px !important;
    }
}