.customer-auth-modal{
    position:fixed;
    inset:0;
    z-index:10020;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:24px;
    background:rgba(15,23,42,.54);
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transition:opacity .2s ease, visibility .2s ease;
}

.customer-auth-modal.active{
    opacity:1;
    visibility:visible;
    pointer-events:auto;
}

.customer-auth-panel{
    width:min(100%, 560px);
    max-height:calc(100vh - 48px);
    overflow:auto;
    background:#fff;
    border:1px solid rgba(6,41,139,.1);
    border-radius:8px;
    box-shadow:0 26px 70px rgba(6,41,139,.22);
    transform:translateY(12px);
    transition:transform .2s ease;
}

.customer-auth-modal.active .customer-auth-panel{
    transform:translateY(0);
}

.customer-auth-head{
    display:flex;
    justify-content:space-between;
    gap:18px;
    padding:26px 28px 18px;
    border-bottom:1px solid #e2e8f0;
}

.customer-auth-head span,
.customer-panel-head span,
.customer-account-hero small,
.customer-stats span,
.customer-loyalty-copy span{
    display:block;
    color:#5c6f91;
    font-size:12px;
    font-weight:800;
    letter-spacing:.08em;
    text-transform:uppercase;
}

.customer-auth-head h2{
    margin-top:4px;
    color:#06298b;
    font-size:34px;
    line-height:1;
}

.customer-auth-close,
.customer-logout{
    border:0;
    cursor:pointer;
    font:inherit;
}

.customer-auth-close{
    flex:0 0 auto;
    width:40px;
    height:40px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    background:#f1f5f9;
    color:#0f172a;
    border-radius:8px;
}

.customer-auth-close svg{
    width:20px;
    height:20px;
}

.customer-auth-tabs{
    display:grid;
    grid-template-columns:repeat(3, 1fr);
    gap:8px;
    padding:18px 28px 0;
}

.customer-auth-tabs button{
    min-height:46px;
    border:1px solid #dbe4f0;
    border-radius:8px;
    background:#f8fafc;
    color:#334155;
    font-weight:800;
    cursor:pointer;
}

.customer-auth-tabs button.active{
    background:#06298b;
    border-color:#06298b;
    color:#fff;
}

.customer-auth-body{
    padding:22px 28px 28px;
}

.customer-auth-form{
    display:none;
    gap:14px;
}

.customer-auth-form.active{
    display:grid;
}

.customer-auth-form[hidden]{
    display:none !important;
}

.customer-profile-form{
    display:grid;
    gap:14px;
}

.customer-auth-grid,
.customer-form-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:14px;
}

.customer-auth-form label,
.customer-profile-form label{
    display:grid;
    gap:7px;
    color:#334155;
    font-weight:800;
    font-size:13px;
}

.customer-auth-form input,
.customer-profile-form input{
    width:100%;
    min-height:48px;
    border:1px solid #dbe4f0;
    border-radius:8px;
    padding:0 14px;
    color:#0f172a;
    font:inherit;
    font-weight:600;
    outline:none;
}

.customer-auth-form input:focus,
.customer-profile-form input:focus{
    border-color:#06298b;
    box-shadow:0 0 0 3px rgba(6,41,139,.1);
}

.customer-auth-check{
    display:flex !important;
    grid-template-columns:none;
    grid-auto-flow:column;
    align-items:flex-start;
    justify-content:flex-start;
    gap:10px !important;
    font-weight:700 !important;
}

.customer-auth-check input{
    width:18px;
    min-height:18px;
    margin-top:2px;
    flex:0 0 auto;
}

.customer-auth-check a{
    color:#06298b;
    text-decoration:underline;
}

.customer-auth-link{
    width:max-content;
    border:0;
    background:transparent;
    color:#06298b;
    padding:0;
    font:inherit;
    font-size:14px;
    font-weight:900;
    text-decoration:underline;
    cursor:pointer;
}

.customer-auth-submit,
.customer-save,
.checkout-account-strip button,
.customer-panel-head a,
.customer-empty a{
    min-height:48px;
    border:0;
    border-radius:8px;
    background:#06298b;
    color:#fff;
    padding:0 18px;
    font:inherit;
    font-weight:900;
    cursor:pointer;
    text-decoration:none;
    display:inline-flex;
    align-items:center;
    justify-content:center;
}

.customer-auth-errors,
.customer-alert{
    display:grid;
    gap:6px;
    padding:12px 14px;
    border-radius:8px;
    font-size:14px;
    font-weight:800;
}

.customer-auth-errors,
.customer-alert.danger{
    background:#fef2f2;
    color:#b91c1c;
}

.customer-alert.success{
    background:#ecfdf5;
    color:#047857;
}

.customer-alert.compact{
    margin-bottom:18px;
}

.checkout-account-strip{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
    margin:0 0 24px;
    padding:18px 20px;
    background:#fff;
    border:1px solid #dbe4f0;
    border-radius:8px;
    box-shadow:0 8px 22px rgba(6,41,139,.06);
}

.checkout-account-strip span{
    display:block;
    color:#64748b;
    font-size:13px;
    font-weight:800;
}

.checkout-account-strip strong{
    display:block;
    color:#0f172a;
    margin-top:2px;
}

.checkout-account-strip small{
    display:block;
    margin-top:4px;
    color:#64748b;
    font-size:13px;
    font-weight:800;
    line-height:1.45;
}

.checkout-account-strip a{
    color:#06298b;
    font-weight:900;
}

.customer-account-page{
    padding:150px 0 90px;
    background:#f8fafc;
}

.customer-page .header{
    background:rgba(255,255,255,.95);
    backdrop-filter:blur(12px);
    box-shadow:0 4px 20px rgba(0,0,0,.08);
}

.customer-page .header .menu a,
.customer-page .header .icon-button{
    color:#06298b;
}

.customer-page .header .icons svg,
.customer-page .header .search-box svg{
    stroke:#06298b;
}

.customer-account-hero{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:22px;
    margin-bottom:24px;
}

.customer-account-hero h1{
    color:#06298b;
    font-size:58px;
    line-height:1;
    margin-top:6px;
}

.customer-account-hero p{
    color:#64748b;
    margin-top:8px;
    font-weight:700;
}

.customer-logout{
    min-height:46px;
    display:inline-flex;
    align-items:center;
    gap:9px;
    padding:0 16px;
    border-radius:8px;
    background:#fff;
    color:#0f172a;
    border:1px solid #dbe4f0;
    font-weight:900;
}

.customer-logout svg{
    width:18px;
    height:18px;
}

.customer-stats{
    display:grid;
    grid-template-columns:repeat(4, 1fr);
    gap:14px;
    margin-bottom:26px;
}

.customer-stats div,
.customer-panel,
.customer-order-card,
.customer-empty,
.customer-loyalty-panel{
    background:#fff;
    border:1px solid #dbe4f0;
    border-radius:8px;
    box-shadow:0 8px 22px rgba(6,41,139,.05);
}

.customer-stats div{
    padding:20px;
}

.customer-stats strong{
    display:block;
    margin-top:7px;
    color:#0f172a;
    font-size:24px;
}

.customer-account-grid{
    display:grid;
    grid-template-columns:minmax(0, .95fr) minmax(0, 1.35fr);
    gap:24px;
    align-items:start;
}

.customer-profile-panel,
.customer-password-panel{
    grid-column:1;
}

.customer-orders-panel{
    grid-column:2;
    grid-row:1 / span 2;
}

.customer-loyalty-panel{
    display:grid;
    grid-template-columns:minmax(0, 1fr) 320px;
    gap:24px;
    align-items:center;
    margin-bottom:26px;
    padding:24px;
}

.customer-loyalty-copy h2{
    margin-top:4px;
    color:#06298b;
    font-size:34px;
    line-height:1.05;
}

.customer-loyalty-copy p{
    margin-top:10px;
    color:#475569;
    line-height:1.6;
}

.customer-loyalty-copy p strong{
    color:#0f172a;
}

.customer-loyalty-side{
    display:grid;
    gap:12px;
}

.customer-loyalty-progress{
    height:12px;
    overflow:hidden;
    border-radius:999px;
    background:#e2e8f0;
}

.customer-loyalty-progress span{
    display:block;
    height:100%;
    border-radius:999px;
    background:linear-gradient(90deg, #d39b24, #2f855a);
}

.customer-loyalty-side a{
    min-height:42px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:8px;
    background:#eef3fb;
    color:#06298b;
    font-weight:900;
    text-decoration:none;
}

.customer-panel{
    padding:26px;
}

.customer-panel-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:18px;
    margin-bottom:22px;
}

.customer-panel-head h2{
    margin-top:4px;
    color:#06298b;
    font-size:34px;
    line-height:1;
}

.customer-panel-head a{
    min-height:40px;
    padding:0 14px;
    white-space:nowrap;
}

.customer-order-actions{
    display:flex;
    gap:12px;
    flex-wrap:wrap;
    justify-content:flex-end;
}

.customer-order-actions .btn{
    min-height:40px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:8px;
    background:#06298b;
    color:#fff;
    padding:0 14px;
    text-decoration:none;
    font-weight:900;
}

.customer-order-actions .btn.outline{
    background:#fff;
    color:#06298b;
    border:1px solid #dbe4f0;
}

.customer-save{
    width:max-content;
    margin-top:4px;
}

.customer-orders{
    display:grid;
    gap:14px;
}

.customer-order-card{
    padding:18px;
}

.customer-order-top,
.customer-order-meta,
.customer-order-items div{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
}

.customer-order-top strong{
    color:#06298b;
    font-size:18px;
}

.customer-order-top span:not(.customer-status),
.customer-order-meta span{
    color:#64748b;
    font-size:13px;
    font-weight:800;
}

.customer-status{
    padding:6px 10px;
    border-radius:999px;
    font-size:12px;
    font-weight:900;
}

.customer-status.success{
    background:#ecfdf5;
    color:#047857;
}

.customer-status.warning{
    background:#fffbeb;
    color:#92400e;
}

.customer-status.danger{
    background:#fef2f2;
    color:#b91c1c;
}

.customer-order-meta{
    margin-top:12px;
    padding-top:12px;
    border-top:1px solid #e2e8f0;
}

.customer-order-meta strong{
    color:#0f172a;
}

.customer-order-items{
    margin-top:12px;
    color:#334155;
}

.customer-order-items summary{
    cursor:pointer;
    color:#06298b;
    font-weight:900;
}

.customer-order-items div{
    padding:9px 0 0;
    font-size:14px;
}

.customer-empty{
    display:grid;
    justify-items:center;
    gap:12px;
    padding:36px 20px;
    text-align:center;
}

.customer-empty svg{
    width:34px;
    height:34px;
    color:#06298b;
}

.customer-empty strong{
    color:#0f172a;
    font-size:18px;
}

@media(max-width:900px){
    .customer-account-grid,
    .customer-stats,
    .customer-loyalty-panel{
        grid-template-columns:1fr;
    }
}

@media(max-width:640px){
    .customer-auth-modal{
        padding:12px;
        align-items:flex-end;
    }

    .customer-auth-panel{
        max-height:calc(100vh - 24px);
    }

    .customer-auth-head,
    .customer-auth-body{
        padding-left:20px;
        padding-right:20px;
    }

    .customer-auth-tabs{
        padding-left:20px;
        padding-right:20px;
        grid-template-columns:1fr;
    }

    .customer-auth-grid,
    .customer-form-grid{
        grid-template-columns:1fr;
    }

    .checkout-account-strip,
    .customer-account-hero,
    .customer-panel-head,
    .customer-order-meta{
        align-items:stretch;
        flex-direction:column;
    }

    .checkout-account-strip button,
    .checkout-account-strip a,
    .customer-panel-head a,
    .customer-save{
        width:100%;
    }

    .customer-order-actions{
        justify-content:stretch;
    }

    .customer-order-actions .btn{
        width:100%;
    }

    .customer-account-page{
        padding:125px 0 70px;
    }

    .customer-account-hero h1{
        font-size:42px;
    }

    .customer-panel{
        padding:20px;
    }
}
