/* =========================================================
   P2 FITNESS SOLUTIONS — DASHBOARD
   Complete replacement for:
   /wp-content/plugins/p2-dashboard/assets/css/dashboard.css
   ========================================================= */

#p2-dashboard,
#p2-dashboard *,
#p2-dashboard *::before,
#p2-dashboard *::after{
    box-sizing:border-box;
}

#p2-dashboard{
    --p2-blue:#003b82;
    --p2-blue-dark:#00295c;
    --p2-blue-light:#eaf2fb;
    --p2-accent:#006d73;
    --p2-text:#12345a;
    --p2-muted:#66758a;
    --p2-border:#dbe4ee;
    --p2-bg:#f5f8fc;
    --p2-white:#ffffff;

    width:100%;
    max-width:100%;
    margin:0;
    padding:0;
    display:flex;
    min-height:100vh;
    background:var(--p2-bg);
    color:var(--p2-text);
    font-family:Arial,Helvetica,sans-serif;
    font-size:15px;
    line-height:1.5;
    overflow:visible;
}

#p2-dashboard h1,
#p2-dashboard h2,
#p2-dashboard h3,
#p2-dashboard p{
    margin-top:0;
}

#p2-dashboard button,
#p2-dashboard input,
#p2-dashboard select,
#p2-dashboard textarea{
    font:inherit;
}

/* Allow the dashboard page to scroll normally */
html, body{
    overflow-x:hidden;
}

#p2-dashboard{
    overflow:visible !important;
    height:auto !important;
}

/* =========================================================
   SIDEBAR
   ========================================================= */

#p2-dashboard .p2-sidebar{
    width:310px;
    min-width:310px;
    min-height:100vh;
    background:linear-gradient(180deg,#eef5fc 0%,#f8fbff 58%,#e8f2fc 100%);
    border-right:1px solid #d9e3ef;
    position:relative;
    overflow:hidden;
}

#p2-dashboard .p2-sidebar::after{
    content:"";
    position:absolute;
    width:360px;
    height:360px;
    left:-150px;
    bottom:-100px;
    border:45px solid rgba(0,59,130,.05);
    border-radius:50%;
    pointer-events:none;
}

#p2-dashboard .p2-sidebar-inner{
    min-height:100vh;
    padding:30px 28px 24px;
    display:flex;
    flex-direction:column;
    position:relative;
    z-index:2;
}

#p2-dashboard .p2-logo{
    width:100%;
    min-height:92px;
    display:flex;
    align-items:center;
    justify-content:flex-start;
    padding-bottom:24px;
    border-bottom:1px solid rgba(0,59,130,.12);
}

#p2-dashboard .p2-logo img{
    display:block;
    width:auto;
    max-width:225px;
    max-height:78px;
    object-fit:contain;
}

#p2-dashboard .p2-logo span{
    color:var(--p2-blue);
    font-size:25px;
    font-weight:900;
    letter-spacing:-1px;
}

#p2-dashboard .p2-sidebar-copy{
    padding-top:42px;
}

#p2-dashboard .p2-eyebrow{
    display:block;
    color:var(--p2-blue);
    font-size:11px;
    font-weight:800;
    letter-spacing:1.2px;
    text-transform:uppercase;
}

#p2-dashboard .p2-sidebar-copy h2{
    margin:10px 0 20px;
    color:var(--p2-blue);
    font-size:44px;
    line-height:.96;
    font-weight:900;
    letter-spacing:-2px;
}

#p2-dashboard .p2-sidebar-copy h2 strong{
    font-weight:900;
}

#p2-dashboard .p2-sidebar-copy h3{
    margin:0 0 20px;
    color:var(--p2-blue);
    font-size:18px;
    line-height:1.2;
    font-weight:900;
    letter-spacing:.2px;
}

#p2-dashboard .p2-sidebar-copy p{
    margin:0 0 20px;
    color:#183b60;
    font-size:14px;
    line-height:1.9;
}

#p2-dashboard .p2-quote{
    margin-top:28px;
    padding:18px 20px;
    border-left:4px solid var(--p2-blue);
    color:var(--p2-blue);
    font-size:16px;
    line-height:1.65;
    font-style:italic;
    font-weight:700;
}

#p2-dashboard .p2-sidebar-footer{
    margin-top:auto;
    padding-top:22px;
    color:#6c7d90;
    font-size:10px;
    font-weight:800;
    letter-spacing:1.3px;
}

/* =========================================================
   MAIN AREA
   ========================================================= */

#p2-dashboard .p2-main{
    flex:1;
    min-width:0;
    padding:44px 48px 60px;
    background:#fff;
}

#p2-dashboard .p2-topbar{
    max-width:1180px;
    margin:0 auto 28px;
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:25px;
}

#p2-dashboard .p2-topbar h1{
    margin:7px 0 5px;
    color:var(--p2-blue);
    font-size:38px;
    line-height:1.1;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:.2px;
}

#p2-dashboard .p2-topbar p{
    margin:0;
    color:var(--p2-muted);
    font-size:14px;
}

#p2-dashboard .p2-user-chip{
    display:flex;
    align-items:center;
    gap:10px;
    padding:8px 12px 8px 8px;
    border:1px solid var(--p2-border);
    border-radius:30px;
    background:#fff;
    color:var(--p2-text);
    font-size:13px;
    font-weight:700;
    white-space:nowrap;
}

#p2-dashboard .p2-user-avatar{
    width:36px;
    height:36px;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    background:var(--p2-blue);
    color:#fff;
    font-size:14px;
    font-weight:900;
}

/* =========================================================
   STATUS
   ========================================================= */

#p2-dashboard .p2-status{
    max-width:1180px;
    margin:0 auto 15px;
    min-height:0;
}

#p2-dashboard .p2-status:not(:empty){
    padding:12px 15px;
    border-radius:9px;
    background:#edf8f1;
    border:1px solid #ccebd7;
    color:#17633a;
    font-weight:700;
}

/* =========================================================
   FORM / CARDS
   ========================================================= */

#p2-dashboard .p2-dashboard-form{
    max-width:1180px;
    margin:0 auto;
}

#p2-dashboard .p2-card{
    margin:0 0 20px;
    padding:0;
    background:#fff;
    border:1px solid var(--p2-border);
    border-radius:13px;
    box-shadow:0 5px 20px rgba(20,57,91,.055);
    overflow:hidden;
}

#p2-dashboard .p2-card-heading{
    min-height:82px;
    padding:19px 24px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
    border-bottom:1px solid #e6edf4;
    background:linear-gradient(180deg,#fff,#fbfdff);
}

#p2-dashboard .p2-card-heading > div{
    min-width:0;
}

#p2-dashboard .p2-section-number{
    display:inline-block;
    margin-bottom:4px;
    color:#71839a;
    font-size:10px;
    font-weight:900;
    letter-spacing:1.2px;
}

#p2-dashboard .p2-card-heading h2{
    display:block;
    margin:0;
    color:var(--p2-blue);
    font-size:18px;
    line-height:1.2;
    font-weight:900;
    text-transform:uppercase;
}

#p2-dashboard .p2-card-heading p{
    margin:4px 0 0;
    color:var(--p2-muted);
    font-size:12px;
}

#p2-dashboard .p2-unit-badge{
    padding:7px 12px;
    border-radius:20px;
    background:var(--p2-blue);
    color:#fff;
    font-size:10px;
    font-weight:900;
    letter-spacing:.8px;
    white-space:nowrap;
}

/* =========================================================
   GRIDS
   ========================================================= */

#p2-dashboard .p2-grid{
    display:grid;
    gap:18px;
    padding:24px;
}

#p2-dashboard .p2-grid-2{
    grid-template-columns:repeat(2,minmax(0,1fr));
}

#p2-dashboard .p2-grid-3{
    grid-template-columns:repeat(3,minmax(0,1fr));
}

/* =========================================================
   FIELDS
   ========================================================= */

#p2-dashboard .p2-field{
    min-width:0;
}

#p2-dashboard .p2-field label,
#p2-dashboard .p2-measure-field label{
    display:block;
    margin:0 0 7px;
    color:#163c68;
    font-size:11px;
    line-height:1.3;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:.35px;
}

#p2-dashboard .p2-field input,
#p2-dashboard .p2-field select,
#p2-dashboard .p2-field textarea,
#p2-dashboard .p2-measure-field input{
    width:100%;
    margin:0;
    padding:12px 13px;
    border:1px solid #cfdbe7;
    border-radius:7px;
    outline:none;
    background:#fff;
    color:#173a5e;
    font-size:14px;
    transition:border-color .2s,box-shadow .2s,background .2s;
}

#p2-dashboard .p2-field input,
#p2-dashboard .p2-field select{
    min-height:45px;
}

#p2-dashboard .p2-field textarea{
    min-height:130px;
    resize:vertical;
}

#p2-dashboard .p2-field input:focus,
#p2-dashboard .p2-field select:focus,
#p2-dashboard .p2-field textarea:focus,
#p2-dashboard .p2-measure-field input:focus{
    border-color:#3e78b8;
    box-shadow:0 0 0 3px rgba(0,59,130,.08);
}

#p2-dashboard .p2-field input[readonly]{
    background:#f4f7fa;
    color:#6c7c8d;
}

/* =========================================================
   STATS
   ========================================================= */

#p2-dashboard .p2-stat-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:15px;
    padding:24px;
}

#p2-dashboard .p2-stat-card{
    position:relative;
    padding:18px;
    min-height:125px;
    border:1px solid #dce5ee;
    border-radius:10px;
    background:#fbfdff;
}

#p2-dashboard .p2-stat-card > span{
    display:block;
    margin-bottom:10px;
    color:#49627c;
    font-size:11px;
    font-weight:800;
    text-transform:uppercase;
}

#p2-dashboard .p2-stat-card input{
    width:calc(100% - 34px);
    height:45px;
    padding:8px 5px;
    border:0;
    border-bottom:2px solid #cbd9e7;
    outline:none;
    background:transparent;
    color:var(--p2-blue);
    font-size:24px;
    font-weight:900;
}

#p2-dashboard .p2-stat-card input:focus{
    border-bottom-color:var(--p2-blue);
}

#p2-dashboard .p2-stat-card small{
    position:absolute;
    right:17px;
    bottom:28px;
    color:#6c7e91;
    font-size:11px;
    font-weight:800;
}

/* =========================================================
   MEASUREMENTS
   ========================================================= */

#p2-dashboard .p2-measure-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:14px;
    padding:24px;
}

#p2-dashboard .p2-measure-field{
    padding:14px;
    border:1px solid #e0e7ef;
    border-radius:9px;
    background:#fbfdff;
}

#p2-dashboard .p2-input-unit{
    position:relative;
}

#p2-dashboard .p2-input-unit input{
    padding-right:40px;
}

#p2-dashboard .p2-input-unit span{
    position:absolute;
    right:12px;
    top:50%;
    transform:translateY(-50%);
    color:#7b8b9d;
    font-size:11px;
    font-weight:800;
}

/* =========================================================
   SUMMARY
   ========================================================= */

#p2-dashboard .p2-summary-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:14px;
    padding:24px;
}

#p2-dashboard .p2-summary-box{
    padding:20px;
    min-height:130px;
    border:1px solid #dce5ee;
    border-radius:10px;
    background:linear-gradient(180deg,#fafdff,#f4f8fc);
}

#p2-dashboard .p2-summary-label{
    display:block;
    margin-bottom:8px;
    color:#60748a;
    font-size:10px;
    font-weight:900;
    letter-spacing:.7px;
    text-transform:uppercase;
}

#p2-dashboard .p2-summary-box strong{
    display:block;
    color:var(--p2-blue);
    font-size:25px;
    line-height:1.2;
    font-weight:900;
}

#p2-dashboard .p2-summary-box small{
    display:block;
    margin-top:8px;
    color:#7b8998;
    font-size:11px;
}

/* =========================================================
   SAVE BAR
   ========================================================= */

#p2-dashboard .p2-action-bar{
    max-width:1180px;
    margin:4px auto 0;
    padding:18px 0 8px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
}

#p2-dashboard .p2-save-note{
    color:#738397;
    font-size:12px;
}

#p2-dashboard .p2-save-btn{
    min-width:190px;
    min-height:49px;
    padding:12px 22px;
    border:0;
    border-radius:7px;
    background:var(--p2-blue);
    color:#fff;
    cursor:pointer;
    font-size:12px;
    font-weight:900;
    letter-spacing:.6px;
    transition:transform .2s,background .2s,box-shadow .2s;
    box-shadow:0 8px 18px rgba(0,59,130,.18);
}

#p2-dashboard .p2-save-btn:hover{
    background:var(--p2-blue-dark);
    transform:translateY(-1px);
}

#p2-dashboard .p2-save-btn:disabled{
    opacity:.65;
    cursor:wait;
    transform:none;
}

#p2-dashboard .p2-save-loading{
    display:none;
}

#p2-dashboard .p2-save-btn.is-loading .p2-save-text{
    display:none;
}

#p2-dashboard .p2-save-btn.is-loading .p2-save-loading{
    display:inline;
}

/* =========================================================
   ELEMENTOR / ASTRA ISOLATION
   ========================================================= */

.elementor #p2-dashboard{
    width:100%;
}

.elementor #p2-dashboard .p2-card h2,
.elementor #p2-dashboard .p2-sidebar-copy h2,
.elementor #p2-dashboard .p2-sidebar-copy h3,
.elementor #p2-dashboard .p2-topbar h1{
    padding:0;
}

#p2-dashboard a{
    text-decoration:none;
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width:1100px){

    #p2-dashboard .p2-sidebar{
        width:260px;
        min-width:260px;
    }

    #p2-dashboard .p2-sidebar-inner{
        padding:25px 22px;
    }

    #p2-dashboard .p2-sidebar-copy h2{
        font-size:37px;
    }

    #p2-dashboard .p2-main{
        padding:35px 28px 50px;
    }

    #p2-dashboard .p2-grid-3{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }

    #p2-dashboard .p2-stat-grid,
    #p2-dashboard .p2-summary-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }

    #p2-dashboard .p2-measure-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width:767px){

    #p2-dashboard{
        display:block;
        min-height:0;
        overflow:visible;
    }

    #p2-dashboard .p2-sidebar{
        width:100%;
        min-width:0;
        min-height:0;
        border-right:0;
        border-bottom:1px solid #d9e3ef;
    }

    #p2-dashboard .p2-sidebar-inner{
        min-height:0;
        padding:22px 20px 25px;
    }

    #p2-dashboard .p2-logo{
        min-height:70px;
        padding-bottom:16px;
    }

    #p2-dashboard .p2-logo img{
        max-width:190px;
        max-height:62px;
    }

    #p2-dashboard .p2-sidebar-copy{
        padding-top:24px;
    }

    #p2-dashboard .p2-sidebar-copy h2{
        margin-bottom:15px;
        font-size:36px;
    }

    #p2-dashboard .p2-sidebar-copy h3{
        font-size:16px;
        margin-bottom:13px;
    }

    #p2-dashboard .p2-sidebar-copy p{
        font-size:13px;
        line-height:1.7;
    }

    #p2-dashboard .p2-quote{
        margin-top:18px;
        padding:12px 15px;
        font-size:14px;
    }

    #p2-dashboard .p2-sidebar-footer{
        display:none;
    }

    #p2-dashboard .p2-main{
        width:100%;
        padding:27px 14px 40px;
    }

    #p2-dashboard .p2-topbar{
        display:block;
        margin-bottom:22px;
    }

    #p2-dashboard .p2-topbar h1{
        font-size:29px;
    }

    #p2-dashboard .p2-user-chip{
        display:none;
    }

    #p2-dashboard .p2-grid,
    #p2-dashboard .p2-grid-2,
    #p2-dashboard .p2-grid-3,
    #p2-dashboard .p2-measure-grid,
    #p2-dashboard .p2-stat-grid,
    #p2-dashboard .p2-summary-grid{
        grid-template-columns:1fr;
    }

    #p2-dashboard .p2-card{
        border-radius:10px;
        margin-bottom:15px;
    }

    #p2-dashboard .p2-card-heading{
        padding:16px;
        min-height:0;
    }

    #p2-dashboard .p2-card-heading h2{
        font-size:16px;
    }

    #p2-dashboard .p2-grid,
    #p2-dashboard .p2-measure-grid,
    #p2-dashboard .p2-stat-grid,
    #p2-dashboard .p2-summary-grid{
        padding:16px;
        gap:12px;
    }

    #p2-dashboard .p2-stat-card{
        min-height:112px;
    }

    #p2-dashboard .p2-summary-box{
        min-height:110px;
    }

    #p2-dashboard .p2-action-bar{
        display:block;
        padding-top:5px;
    }

    #p2-dashboard .p2-save-note{
        display:block;
        margin-bottom:10px;
    }

    #p2-dashboard .p2-save-btn{
        width:100%;
    }
}

/* =========================================================
   SMALL PHONES
   ========================================================= */

@media (max-width:400px){

    #p2-dashboard .p2-sidebar-copy h2{
        font-size:32px;
    }

    #p2-dashboard .p2-main{
        padding-left:10px;
        padding-right:10px;
    }

    #p2-dashboard .p2-topbar h1{
        font-size:26px;
    }

    #p2-dashboard .p2-card-heading h2{
        font-size:15px;
    }
}
/* =========================================================
   P2 DASHBOARD — FINAL PAGE SCROLL FIX
   Add this at the VERY END of dashboard.css
   ========================================================= */

html,
html body {
    height: auto !important;
    min-height: 100% !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

body {
    position: static !important;
}

/* WordPress / Astra page wrappers */
#page,
#content,
.site,
.site-content,
.content-area,
.site-main,
main,
.elementor,
.elementor-page,
.elementor-section-wrap,
.elementor-widget-wrap,
.elementor-widget-container {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
}

/* Elementor containers must not clip the dashboard */
.elementor-section,
.elementor-container,
.elementor-column,
.elementor-widget,
.elementor-widget-shortcode {
    max-height: none !important;
}

/* The dashboard itself */
#p2-dashboard,
.p2-dashboard {
    position: relative !important;
    display: flex !important;
    height: auto !important;
    min-height: 100vh !important;
    max-height: none !important;
    overflow: visible !important;
}

/* Make sure the main content can extend below the viewport */
.p2-content,
.p2-main {
    height: auto !important;
    min-height: 100vh !important;
    max-height: none !important;
    overflow: visible !important;
}

/* Do not let an Elementor section clip the bottom of the page */
.elementor-widget-shortcode,
.elementor-widget-shortcode .elementor-widget-container {
    overflow: visible !important;
}

/* Mobile */
@media (max-width: 768px) {
    html,
    body {
        overflow-y: auto !important;
        height: auto !important;
    }

    #p2-dashboard,
    .p2-dashboard,
    .p2-content,
    .p2-main {
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
    }
}