﻿
/* =========================================================
   PRE-LAUNCH E
   Teacher Portal Polish + Payslip UX Finalization
   ========================================================= */

body.teachers-payslip-site{
    --tf-primary:#266652;
    --tf-primary-dark:#1f5948;
    --tf-text:#173f35;
    --tf-muted:#71817a;
    --tf-border:#dfe7e4;
    --tf-soft:#f5f9f7;
    --tf-gold:#d1b675;
    --tf-warning:#8a6818;
    --tf-warning-bg:#fff7dd;
    --tf-success:#176d4b;
    --tf-success-bg:#eaf7f0;
    --tf-info:#345f85;
    --tf-info-bg:#eef5fb;
}

/* ---------- Portal compact header ---------- */
body.teachers-payslip-site .tf-portal-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    width:min(1180px,calc(100% - 28px));
    margin:14px auto 10px;
    padding:14px 16px;
    border:1px solid var(--tf-border);
    border-radius:16px;
    background:#fff;
    box-shadow:0 8px 22px rgba(20,61,50,.055);
}

.tf-portal-person{
    min-width:0;
}

.tf-portal-person small{
    display:block;
    margin-bottom:2px;
    color:#81918a;
    font-size:.7rem;
    font-weight:800;
}

.tf-portal-person strong{
    display:block;
    color:var(--tf-text);
    font-size:.98rem;
    font-weight:950;
    line-height:1.4;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.tf-portal-header-actions{
    display:flex;
    align-items:center;
    gap:7px;
    flex-wrap:wrap;
}

.tf-portal-header-actions a,
.tf-portal-header-actions button{
    min-height:38px;
    padding:7px 10px;
    border:1px solid #d8e3df;
    border-radius:9px;
    background:#fff;
    color:#355a4f;
    font-size:.76rem;
    font-weight:850;
    text-decoration:none;
    cursor:pointer;
}

.tf-portal-header-actions .tf-primary{
    border-color:var(--tf-primary);
    background:var(--tf-primary);
    color:#fff;
}

/* ---------- Breadcrumb ---------- */
.tf-breadcrumb{
    display:flex;
    align-items:center;
    gap:6px;
    flex-wrap:wrap;
    width:min(1180px,calc(100% - 28px));
    margin:0 auto 10px;
    color:#7d8c86;
    font-size:.74rem;
}

.tf-breadcrumb a{
    color:#48695f;
    text-decoration:none;
    font-weight:800;
}

.tf-breadcrumb span[aria-current="page"]{
    color:#8d9995;
}

/* ---------- Empty states ---------- */
.tf-empty-state{
    display:grid;
    place-items:center;
    gap:5px;
    min-height:150px;
    padding:24px 18px;
    border:1px dashed #cedbd6;
    border-radius:14px;
    background:#fafcfb;
    text-align:center;
    color:#6f817a;
}

.tf-empty-state-icon{
    display:grid;
    place-items:center;
    width:42px;
    height:42px;
    border-radius:12px;
    background:#edf5f2;
    color:#39705d;
    font-size:1.05rem;
    font-weight:950;
}

.tf-empty-state strong{
    color:#36584e;
    font-size:.87rem;
    font-weight:900;
}

.tf-empty-state span{
    max-width:420px;
    font-size:.78rem;
    line-height:1.7;
}

/* ---------- Print / PDF ---------- */
.tf-print-bar{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:7px;
    margin:0 0 12px;
}

.tf-print-button{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:6px;
    min-height:40px;
    padding:8px 12px;
    border:1px solid #cfdcd7;
    border-radius:10px;
    background:#fff;
    color:#31584c;
    font-size:.78rem;
    font-weight:900;
    cursor:pointer;
}

.tf-print-button:hover{
    background:#f7faf9;
}

/* ---------- Review Timeline ---------- */
.tf-review-timeline{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:0;
    margin:12px 0 4px;
    padding:13px;
    border:1px solid var(--tf-border);
    border-radius:14px;
    background:#fbfdfc;
}

.tf-review-step{
    position:relative;
    display:grid;
    justify-items:center;
    gap:6px;
    min-width:0;
    text-align:center;
}

.tf-review-step:not(:last-child)::after{
    content:"";
    position:absolute;
    top:15px;
    left:-50%;
    width:100%;
    height:2px;
    background:#dde7e3;
    z-index:0;
}

.tf-review-dot{
    position:relative;
    z-index:1;
    display:grid;
    place-items:center;
    width:31px;
    height:31px;
    border:2px solid #d9e3df;
    border-radius:50%;
    background:#fff;
    color:#9aa7a2;
    font-size:.72rem;
    font-weight:950;
}

.tf-review-step.is-done .tf-review-dot,
.tf-review-step.is-current .tf-review-dot{
    border-color:#70ad97;
    background:#eaf6f0;
    color:#1e7153;
}

.tf-review-step.is-current .tf-review-dot{
    box-shadow:0 0 0 4px rgba(38,102,82,.08);
}

.tf-review-step strong{
    color:#536b62;
    font-size:.73rem;
    font-weight:850;
    line-height:1.45;
}

.tf-review-step.is-current strong{
    color:#245f4d;
}

/* ---------- Payslip status explanation ---------- */
.tf-status-guide{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:8px;
    margin:12px 0 14px;
}

.tf-status-guide-card{
    display:grid;
    gap:4px;
    padding:11px 12px;
    border:1px solid var(--tf-border);
    border-radius:12px;
    background:#fff;
}

.tf-status-guide-card strong{
    font-size:.78rem;
    font-weight:950;
}

.tf-status-guide-card span{
    color:#70827b;
    font-size:.72rem;
    line-height:1.6;
}

.tf-status-guide-card.is-estimated{
    border-color:#eadcaa;
    background:#fffdf5;
}

.tf-status-guide-card.is-estimated strong{
    color:#806313;
}

.tf-status-guide-card.is-approved{
    border-color:#cbe0d6;
    background:#f6fbf8;
}

.tf-status-guide-card.is-approved strong{
    color:#28634f;
}

.tf-status-guide-card.is-transferred{
    border-color:#acd8c5;
    background:#eef9f3;
}

.tf-status-guide-card.is-transferred strong{
    color:#126d4b;
}

.tf-transfer-note{
    display:flex;
    align-items:flex-start;
    gap:8px;
    margin:0 0 14px;
    padding:10px 12px;
    border:1px solid #b8dccd;
    border-radius:11px;
    background:#f2faf6;
    color:#315e4f;
    font-size:.77rem;
    line-height:1.65;
}

.tf-transfer-note::before{
    content:"✓";
    display:grid;
    place-items:center;
    flex:none;
    width:23px;
    height:23px;
    border-radius:7px;
    background:#dff1e8;
    color:#176d4b;
    font-weight:950;
}

/* ---------- Status chips ---------- */
body.teachers-payslip-site .teachers-payslip-status,
body.teachers-payslip-site .tf-status-chip{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    min-height:30px!important;
    padding:5px 10px!important;
    border-radius:999px!important;
    font-size:.74rem!important;
    font-weight:950!important;
    line-height:1.3!important;
}

body.teachers-payslip-site .is-estimated{
    background:var(--tf-warning-bg)!important;
    color:var(--tf-warning)!important;
}

body.teachers-payslip-site .is-approved{
    background:#eef7f3!important;
    color:#25634f!important;
}

body.teachers-payslip-site .is-transferred{
    background:var(--tf-success-bg)!important;
    color:var(--tf-success)!important;
    box-shadow:inset 0 0 0 1px #b9dfce!important;
}

/* ---------- Statement print canvas ---------- */
.tf-statement-print-root{
    background:#fff;
}

@media(max-width:760px){
    .tf-portal-header{
        width:calc(100% - 16px)!important;
        align-items:stretch!important;
        flex-direction:column!important;
        gap:9px!important;
        margin-top:9px!important;
        padding:12px!important;
    }

    .tf-portal-person strong{
        font-size:.92rem;
    }

    .tf-portal-header-actions{
        display:grid!important;
        grid-template-columns:1fr 1fr!important;
        width:100%;
    }

    .tf-portal-header-actions a,
    .tf-portal-header-actions button{
        width:100%;
    }

    .tf-breadcrumb{
        width:calc(100% - 16px)!important;
        margin-bottom:8px!important;
        font-size:.69rem!important;
    }

    .tf-status-guide{
        grid-template-columns:1fr!important;
        gap:6px!important;
    }

    .tf-review-timeline{
        padding:11px 6px!important;
    }

    .tf-review-step strong{
        font-size:.66rem!important;
    }

    .tf-review-dot{
        width:28px!important;
        height:28px!important;
    }

    .tf-review-step:not(:last-child)::after{
        top:14px!important;
    }

    .tf-print-bar{
        justify-content:stretch!important;
    }

    .tf-print-button{
        width:100%!important;
        min-height:44px!important;
    }
}

/* ---------- Print ---------- */
@media print{
    header,
    footer,
    nav,
    .tf-breadcrumb,
    .tf-portal-header,
    .tf-print-bar,
    .tp-entry-card,
    .teachers-public-bottom-cta,
    .mobile-bottom-cta,
    .bottom-cta,
    .mobile-sticky-actions,
    .sticky-mobile-actions,
    .fixed-mobile-actions{
        display:none!important;
    }

    html,body{
        background:#fff!important;
    }

    body.teachers-payslip-site{
        color:#000!important;
    }

    body.teachers-payslip-site main,
    .teachers-payslip-canvas,
    .tf-statement-print-root{
        width:100%!important;
        max-width:none!important;
        margin:0!important;
        padding:0!important;
        box-shadow:none!important;
    }

    .teachers-payslip-card,
    .teachers-payslip-section{
        break-inside:avoid;
        box-shadow:none!important;
        border-color:#bbb!important;
    }

    @page{
        size:A4;
        margin:12mm;
    }
}
