:root{
    --cp-green:#123f33;
    --cp-green-2:#1c5b49;
    --cp-green-soft:#e9f4ef;
    --cp-bg:#f3f6f5;
    --cp-surface:#ffffff;
    --cp-text:#13231e;
    --cp-muted:#68756f;
    --cp-border:#dbe5e0;
    --cp-danger:#9f2723;
    --cp-danger-soft:#fff1f0;
    --cp-success:#08783f;
    --cp-success-soft:#e9f7ef;
    --cp-shadow:0 14px 40px rgba(18,63,51,.08);
    --cp-shadow-soft:0 5px 18px rgba(18,63,51,.06);
    --cp-radius:22px;
    --cp-radius-sm:14px;
}

*{
    box-sizing:border-box;
}

body.customer-portal-page{
    margin:0;
    min-height:100vh;
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    background:
        radial-gradient(circle at top right,rgba(28,91,73,.08),transparent 28rem),
        var(--cp-bg);
    color:var(--cp-text);
    -webkit-font-smoothing:antialiased;
}

.customer-portal-page a{
    color:var(--cp-green-2);
}

.customer-portal-page .topbar{
    position:sticky;
    top:0;
    z-index:100;
    min-height:72px;
    height:auto;
    padding:14px clamp(16px,4vw,34px);
    background:rgba(255,255,255,.94);
    color:var(--cp-text);
    border-bottom:1px solid rgba(219,229,224,.9);
    backdrop-filter:blur(16px);
    box-shadow:0 2px 16px rgba(18,63,51,.04);
}

.customer-portal-page .topbar strong{
    font-size:20px;
    letter-spacing:-.02em;
}

.customer-portal-page .topbar .badge{
    background:var(--cp-green-soft);
    color:var(--cp-green);
    border:1px solid #d7e9e1;
    font-weight:700;
}

.customer-portal-page .topbar nav{
    display:flex;
    gap:8px;
    align-items:center;
    flex-wrap:wrap;
}

.customer-portal-page .topbar nav a{
    margin:0;
    padding:9px 12px;
    color:var(--cp-green);
    background:#f6f9f8;
    border:1px solid var(--cp-border);
    border-radius:999px;
    text-decoration:none;
    font-size:13px;
    font-weight:700;
}

.customer-portal-page .topbar nav a:hover{
    background:var(--cp-green-soft);
}

.customer-portal-page .content,
.customer-portal-page .page{
    width:min(1180px,calc(100% - 30px));
    margin:0 auto;
    padding:28px 0 48px;
}

.customer-portal-page .page > a:first-child{
    display:inline-flex;
    align-items:center;
    gap:6px;
    margin:0 0 14px;
    padding:8px 11px;
    background:rgba(255,255,255,.86);
    border:1px solid var(--cp-border);
    border-radius:999px;
    text-decoration:none;
    font-size:13px;
    font-weight:700;
    box-shadow:var(--cp-shadow-soft);
}

.customer-portal-page h1{
    margin:0 0 8px;
    font-size:clamp(28px,4vw,40px);
    line-height:1.08;
    letter-spacing:-.035em;
}

.customer-portal-page h2{
    margin:0 0 14px;
    font-size:20px;
    letter-spacing:-.02em;
}

.customer-portal-page p{
    line-height:1.55;
}

.customer-portal-page .muted,
.customer-portal-page small{
    color:var(--cp-muted);
}

.customer-portal-page .panel,
.customer-portal-page .portal-card{
    background:rgba(255,255,255,.98);
    border:1px solid var(--cp-border);
    border-radius:var(--cp-radius);
    box-shadow:var(--cp-shadow);
}

.customer-portal-page .panel{
    padding:clamp(18px,3vw,28px);
    margin:0 0 18px;
}

.customer-portal-page .cards{
    gap:18px !important;
}

.customer-portal-page .portal-card{
    padding:22px !important;
    transition:
        transform .16s ease,
        box-shadow .16s ease;
}

.customer-portal-page .portal-card:hover{
    transform:translateY(-2px);
    box-shadow:0 18px 44px rgba(18,63,51,.11);
}

.customer-portal-page .item{
    margin:0 -4px;
    padding:14px 4px !important;
    border-bottom:1px solid #edf2ef !important;
    line-height:1.45;
}

.customer-portal-page .item strong{
    color:var(--cp-text);
}

.customer-portal-page .item a{
    display:inline-flex;
    margin-top:7px;
    font-size:13px;
    font-weight:800;
    text-decoration:none;
}

.customer-portal-page label{
    display:block;
    margin:0 0 15px;
    color:#263a32;
    font-size:13px;
    font-weight:750;
}

.customer-portal-page input:not([type="checkbox"]):not([type="radio"]),
.customer-portal-page select,
.customer-portal-page textarea{
    width:100%;
    margin:7px 0 0;
    padding:12px 13px;
    min-height:46px;
    border:1px solid #cbd8d2;
    border-radius:13px;
    outline:none;
    background:#fbfdfc;
    color:var(--cp-text);
    font:inherit;
    transition:
        border-color .15s ease,
        box-shadow .15s ease,
        background .15s ease;
}

.customer-portal-page textarea{
    min-height:110px;
    resize:vertical;
}

.customer-portal-page input:focus,
.customer-portal-page select:focus,
.customer-portal-page textarea:focus{
    background:#fff;
    border-color:#6b9a87;
    box-shadow:0 0 0 4px rgba(28,91,73,.09);
}

.customer-portal-page input[type="checkbox"],
.customer-portal-page input[type="radio"]{
    width:18px;
    height:18px;
    margin:0 8px 0 0;
    accent-color:var(--cp-green);
    vertical-align:-3px;
}

.customer-portal-page button,
.customer-portal-page .button{
    display:inline-flex;
    justify-content:center;
    align-items:center;
    min-height:44px;
    padding:11px 16px;
    border:1px solid transparent;
    border-radius:13px;
    background:var(--cp-green);
    color:#fff;
    text-decoration:none;
    font:inherit;
    font-size:14px;
    font-weight:800;
    cursor:pointer;
    box-shadow:0 6px 16px rgba(18,63,51,.15);
    transition:
        transform .12s ease,
        background .12s ease,
        box-shadow .12s ease;
}

.customer-portal-page button:hover,
.customer-portal-page .button:hover{
    background:var(--cp-green-2);
    transform:translateY(-1px);
    box-shadow:0 9px 20px rgba(18,63,51,.18);
}

.customer-portal-page button:active,
.customer-portal-page .button:active{
    transform:translateY(0);
}

.customer-portal-page .alert{
    margin:0 0 16px;
    padding:13px 15px;
    border:1px solid #f1cecb;
    border-radius:14px;
    background:var(--cp-danger-soft);
    color:var(--cp-danger);
    font-weight:650;
}

.customer-portal-page .success{
    margin:0 0 16px;
    padding:13px 15px;
    border:1px solid #cbe6d7;
    border-radius:14px;
    background:var(--cp-success-soft);
    color:var(--cp-success);
    font-weight:700;
}

.customer-portal-page table{
    width:100%;
    border-collapse:separate !important;
    border-spacing:0;
    overflow:hidden;
    background:#fff;
    border:1px solid var(--cp-border);
    border-radius:16px;
}

.customer-portal-page th{
    padding:12px 13px !important;
    background:#f5f8f7;
    color:#53645d;
    font-size:12px;
    text-transform:uppercase;
    letter-spacing:.04em;
    border-bottom:1px solid var(--cp-border) !important;
}

.customer-portal-page td{
    padding:13px !important;
    border-bottom:1px solid #edf2ef !important;
    vertical-align:middle;
}

.customer-portal-page tr:last-child td{
    border-bottom:0 !important;
}

.customer-portal-page td a{
    font-weight:800;
    text-decoration:none;
}

.customer-portal-page .money{
    color:var(--cp-green) !important;
    letter-spacing:-.035em;
}

.customer-portal-page .pill{
    display:inline-flex;
    align-items:center;
    padding:5px 9px;
    border-radius:999px;
    background:var(--cp-green-soft);
    color:var(--cp-green);
    font-size:12px;
    font-weight:800;
}

.customer-portal-page form + p{
    margin-top:16px;
}

@media(max-width:760px){
    body.customer-portal-page{
        background:var(--cp-bg);
    }

    .customer-portal-page .topbar{
        align-items:flex-start;
        gap:10px;
        flex-direction:column;
        padding:12px 15px;
    }

    .customer-portal-page .topbar nav{
        width:100%;
        overflow:auto;
        flex-wrap:nowrap;
        padding-bottom:2px;
    }

    .customer-portal-page .topbar nav a{
        white-space:nowrap;
    }

    .customer-portal-page .content,
    .customer-portal-page .page{
        width:min(100% - 20px,1180px);
        padding-top:18px;
        padding-bottom:32px;
    }

    .customer-portal-page .panel,
    .customer-portal-page .portal-card{
        border-radius:18px;
    }

    .customer-portal-page .panel{
        padding:18px;
    }

    .customer-portal-page h1{
        font-size:29px;
    }

    .customer-portal-page table{
        display:block;
        overflow-x:auto;
        white-space:nowrap;
    }

    .customer-portal-page button,
    .customer-portal-page .button{
        min-height:46px;
    }
}
