/**
 * ==========================================================
 * LQW NEXUS ERP
 * CLIENT PORTAL UI v3.1
 * ==========================================================
 */


/* ==========================================================
   DESIGN TOKENS
   ========================================================== */

:root{

    --phl-primary:#2563eb;
    --phl-primary-dark:#1d4ed8;

    --phl-bg:#f5f7fb;
    --phl-surface:#ffffff;

    --phl-border:#e5eaf2;

    --phl-text:#17233c;
    --phl-text-light:#64748b;

    --phl-radius:18px;

    --phl-shadow:
        0 10px 30px rgba(15,23,42,.06);

    --phl-transition:.25s ease;

}


/* ==========================================================
   BASE
   ========================================================== */

.phl-client-workspace,
.phl-client-workspace *,
.phl-client-workspace *::before,
.phl-client-workspace *::after{

    box-sizing:border-box;

}


/* ==========================================================
   WORKSPACE
   ========================================================== */

.phl-client-workspace{

    display:grid;

    grid-template-columns:280px minmax(0,1fr);

    gap:28px;

    align-items:start;

    width:100%;

}


/* ==========================================================
   MAIN
   ========================================================== */

.phl-client-main{

    min-width:0;

    display:flex;

    flex-direction:column;

    gap:24px;

}


/* ==========================================================
   TYPOGRAPHY
   ========================================================== */

.phl-client-main h1{

    margin:0;

    font-size:34px;

    font-weight:700;

    color:var(--phl-text);

    line-height:1.2;

}

.phl-client-main h2{

    margin:0;

    font-size:28px;

    font-weight:700;

    color:var(--phl-text);

    line-height:1.3;

}

.phl-client-main h3{

    margin:0;

    font-size:20px;

    font-weight:600;

    color:var(--phl-text);

    line-height:1.4;

}

.phl-client-main p{

    margin:0;

    color:var(--phl-text-light);

    line-height:1.7;

}


/* ==========================================================
   CLIENT SIDEBAR
   ========================================================== */

.phl-client-sidebar{

    position:sticky;

    top:16px;

    height:calc(100vh - 32px);

    min-height:0;

    display:flex;

    flex-direction:column;

    background:#ffffff;

    border:1px solid var(--phl-border);

    border-radius:18px;

    box-shadow:var(--phl-shadow);

    overflow:hidden;

}


/* ==========================================================
   SIDEBAR BRAND
   ========================================================== */

.phl-sidebar-brand{

    flex-shrink:0;

    padding:18px 20px;

    border-bottom:1px solid var(--phl-border);

}

.phl-sidebar-brand h2{

    margin:0;

    padding:0;

    font-size:19px;

    font-weight:700;

    line-height:1.25;

    color:var(--phl-text);

}

.phl-sidebar-brand small{

    display:block;

    margin-top:4px;

    font-size:12px;

    line-height:1.3;

    color:var(--phl-text-light);

}


/* ==========================================================
   SIDEBAR NAVIGATION
   ========================================================== */

.phl-sidebar-nav{

    flex:1;

    min-height:0;

    display:flex;

    flex-direction:column;

    gap:4px;

    padding:12px;

    overflow-y:auto;

}

.phl-sidebar-nav a{

    display:flex;

    align-items:center;

    gap:12px;

    min-height:42px;

    padding:10px 12px;

    border-radius:10px;

    color:var(--phl-text-light);

    text-decoration:none;

    font-size:14px;

    font-weight:500;

    line-height:1.3;

    transition:

        background .2s ease,

        color .2s ease;

}

.phl-sidebar-nav a:hover{

    background:#f1f5f9;

    color:var(--phl-text);

}

.phl-sidebar-nav a.is-active{

    background:#eef4ff;

    color:var(--phl-primary);

    font-weight:600;

}

.phl-sidebar-nav .dashicons{

    flex-shrink:0;

    width:20px;

    height:20px;

    font-size:20px;

    line-height:20px;

}


/* ==========================================================
   SIDEBAR FOOTER
   ========================================================== */

.phl-sidebar-footer{

    flex-shrink:0;

    padding:12px;

    border-top:1px solid var(--phl-border);

    background:#ffffff;

}

.phl-sidebar-footer-link{

    display:flex;

    align-items:center;

    gap:12px;

    min-height:40px;

    padding:9px 12px;

    border-radius:10px;

    color:var(--phl-text-light);

    text-decoration:none;

    font-size:14px;

    font-weight:500;

    line-height:1.3;

    transition:

        background .2s ease,

        color .2s ease;

}

.phl-sidebar-footer-link:hover{

    background:#f1f5f9;

    color:var(--phl-primary);

}

.phl-sidebar-footer-link .dashicons{

    flex-shrink:0;

    width:20px;

    height:20px;

    font-size:20px;

    line-height:20px;

}

.phl-sidebar-version{

    padding:7px 12px 2px;

    text-align:center;

    font-size:10px;

    line-height:1.3;

    color:#94a3b8;

}


/* ==========================================================
   MODULE HEADER
   ========================================================== */

.phl-module-header{

    margin-bottom:10px;

}

.phl-module-header h1{

    margin:0 0 8px;

}

.phl-module-header p{

    margin:0;

    font-size:15px;

}


/* ==========================================================
   TOP HEADER
   ========================================================== */

.phl-client-header{

    display:flex;

    justify-content:space-between;

    align-items:center;

    padding:18px 26px;

    background:var(--phl-surface);

    border:1px solid var(--phl-border);

    border-radius:20px;

    box-shadow:var(--phl-shadow);

}

.phl-header-left{

    display:flex;

    flex-direction:column;

    gap:4px;

}

.phl-header-left h2{

    margin:0;

    font-size:24px;

    font-weight:700;

    color:var(--phl-text);

}

.phl-header-left small{

    color:var(--phl-text-light);

    font-size:13px;

}

.phl-header-right{

    display:flex;

    align-items:center;

    gap:14px;

}

.phl-header-icon{

    width:46px;

    height:46px;

    border:none;

    border-radius:14px;

    background:#f8fafc;

    cursor:pointer;

    transition:var(--phl-transition);

}

.phl-header-icon:hover{

    background:var(--phl-primary);

    color:#fff;

}

.phl-user-chip{

    display:flex;

    align-items:center;

    gap:10px;

    padding:10px 18px;

    border:1px solid var(--phl-border);

    border-radius:14px;

    background:#fff;

    font-weight:600;

    color:var(--phl-text);

}


/* ==========================================================
   DASHBOARD
   ========================================================== */

.phl-dashboard{

    display:flex;

    flex-direction:column;

    gap:24px;

}

.phl-dashboard-layout{

    display:grid;

    grid-template-columns:repeat(12,minmax(0,1fr));

    gap:24px;

}

.phl-dashboard-primary{

    grid-column:span 8;

    display:grid;

    gap:24px;

}

.phl-dashboard-secondary{

    grid-column:span 4;

    display:grid;

    gap:24px;

}


/* ==========================================================
   DASHBOARD WIDGET
   ========================================================== */

.phl-dashboard-widget{

    display:flex;

    flex-direction:column;

    gap:18px;

    background:var(--phl-surface);

    border:1px solid var(--phl-border);

    border-radius:20px;

    padding:22px;

    box-shadow:var(--phl-shadow);

    transition:var(--phl-transition);

}

.phl-dashboard-widget:hover{

    transform:translateY(-2px);

    box-shadow:
        0 18px 36px rgba(15,23,42,.08);

}


/* ==========================================================
   WIDGET HEADER
   ========================================================== */

.phl-widget-header{

    display:flex;

    align-items:center;

    justify-content:space-between;

    padding-bottom:14px;

    border-bottom:1px solid var(--phl-border);

}

.phl-widget-header h3{

    margin:0;

    font-size:18px;

    font-weight:600;

    color:var(--phl-text);

}


/* ==========================================================
   DASHBOARD HERO
   ========================================================== */

.phl-dashboard-hero{

    background:linear-gradient(
        135deg,
        #1e40af 0%,
        #2563eb 100%
    );

    color:#ffffff;

    border-radius:24px;

    padding:32px;

    box-shadow:
        0 18px 40px rgba(37,99,235,.18);

}

.phl-dashboard-hero h2{

    margin:0 0 8px;

    font-size:32px;

    font-weight:700;

    line-height:1.25;

    color:#ffffff;

}

.phl-dashboard-hero p{

    margin:0;

    color:rgba(255,255,255,.85);

    font-size:15px;

    line-height:1.6;

}


/* ==========================================================
   HERO STATS
   ========================================================== */

.phl-hero-stats{

    display:grid;

    grid-template-columns:repeat(4,minmax(0,1fr));

    gap:16px;

    margin-top:28px;

}

.phl-hero-stat{

    background:rgba(255,255,255,.12);

    border:1px solid rgba(255,255,255,.15);

    border-radius:16px;

    padding:18px;

    backdrop-filter:blur(8px);

}

.phl-hero-stat span{

    display:block;

    font-size:11px;

    text-transform:uppercase;

    letter-spacing:.08em;

    color:rgba(255,255,255,.75);

}

.phl-hero-stat strong{

    display:block;

    margin-top:8px;

    font-size:18px;

    font-weight:700;

    color:#ffffff;

    line-height:1.4;

}


/* ==========================================================
   SUMMARY
   ========================================================== */

.phl-summary-grid{

    display:flex;

    flex-direction:column;

    gap:18px;

}

.phl-summary-item{

    display:flex;

    flex-direction:column;

    gap:6px;

}

.phl-summary-item span{

    font-size:11px;

    text-transform:uppercase;

    letter-spacing:.08em;

    color:#94a3b8;

    font-weight:600;

}

.phl-summary-item strong{

    font-size:17px;

    font-weight:600;

    color:var(--phl-text);

    line-height:1.45;

    white-space:normal;

    word-break:normal;

}


/* ==========================================================
   QUICK ACTIONS
   ========================================================== */

.phl-quick-actions{

    display:grid;

    gap:16px;

}

.phl-action-card{

    display:flex;

    flex-direction:column;

    justify-content:center;

    gap:10px;

    min-height:130px;

    padding:20px;

    border:1px solid var(--phl-border);

    border-radius:16px;

    background:#ffffff;

    text-decoration:none;

    transition:var(--phl-transition);

}

.phl-action-card:hover{

    border-color:var(--phl-primary);

    transform:translateY(-2px);

    box-shadow:
        0 14px 28px rgba(37,99,235,.10);

}

.phl-action-card .dashicons{

    width:34px;

    height:34px;

    font-size:34px;

    color:var(--phl-primary);

}

.phl-action-card h4{

    margin:0;

    font-size:16px;

    color:var(--phl-text);

}

.phl-action-card p{

    margin:0;

    font-size:14px;

    line-height:1.5;

    color:var(--phl-text-light);

}


/* ==========================================================
   TABLES
   ========================================================== */

.phl-table{

    width:100%;

    border-collapse:collapse;

}

.phl-table th{

    text-align:left;

    padding:14px;

    font-size:13px;

    text-transform:uppercase;

    color:var(--phl-text-light);

    border-bottom:1px solid var(--phl-border);

}

.phl-table td{

    padding:16px 14px;

    border-bottom:1px solid var(--phl-border);

}


/* ==========================================================
   TIMELINE
   ========================================================== */

.phl-timeline{

    list-style:none;

    margin:0;

    padding:0;

}

.phl-timeline li{

    position:relative;

    padding:0 0 24px 28px;

    border-left:2px solid #dbe4f0;

}

.phl-timeline li:last-child{

    padding-bottom:0;

}

.phl-timeline li::before{

    content:"";

    position:absolute;

    left:-7px;

    top:4px;

    width:12px;

    height:12px;

    border-radius:50%;

    background:var(--phl-primary);

}

.phl-timeline li.is-active{

    border-left-color:var(--phl-primary);

}


/* ==========================================================
   EMPTY STATES
   ========================================================== */

.phl-empty{

    text-align:center;

    padding:36px 24px;

    color:var(--phl-text-light);

}

.phl-empty h4{

    margin:0 0 10px;

    color:var(--phl-text);

}


/* ==========================================================
   RESPONSIVE — TABLET
   ========================================================== */

@media (max-width:1200px){

    .phl-client-workspace{

        grid-template-columns:1fr;

    }

    .phl-client-sidebar{

        position:relative;

        top:auto;

        height:auto;

        min-height:0;

    }

    .phl-sidebar-nav{

        overflow:visible;

    }

    .phl-dashboard-layout{

        grid-template-columns:1fr;

    }

    .phl-dashboard-primary,
    .phl-dashboard-secondary{

        grid-column:auto;

    }

    .phl-hero-stats{

        grid-template-columns:repeat(2,1fr);

    }

}


/* ==========================================================
   RESPONSIVE — MOBILE
   ========================================================== */

@media (max-width:768px){

    .phl-client-workspace{

        grid-template-columns:1fr;

        gap:18px;

        padding:18px;

    }

    .phl-client-main{

        gap:18px;

    }

    .phl-client-header{

        flex-direction:column;

        align-items:flex-start;

        gap:16px;

    }

    .phl-header-right{

        width:100%;

        justify-content:flex-start;

        flex-wrap:wrap;

    }

    .phl-dashboard-hero{

        padding:24px;

        border-radius:20px;

    }

    .phl-dashboard-hero h2{

        font-size:26px;

    }

    .phl-hero-stats{

        grid-template-columns:1fr;

    }

    .phl-dashboard-layout{

        gap:18px;

    }

    .phl-dashboard-primary,
    .phl-dashboard-secondary{

        gap:18px;

    }

    .phl-dashboard-widget{

        padding:20px;

    }

}


/* ==========================================================
   RESPONSIVE — SMALL MOBILE
   ========================================================== */

@media (max-width:480px){

    .phl-client-workspace{

        padding:12px;

    }

    .phl-client-sidebar{

        border-radius:14px;

    }

    .phl-sidebar-brand{

        padding:16px;

    }

    .phl-sidebar-nav{

        padding:10px;

    }

    .phl-sidebar-footer{

        padding:10px;

    }

    .phl-client-header{

        padding:16px;

        border-radius:16px;

    }

    .phl-dashboard-hero{

        padding:20px;

    }

    .phl-dashboard-widget{

        padding:18px;

        border-radius:16px;

    }

}