*{box-sizing:border-box}

:root{
    --coffee:#211710;
    --coffee-2:#3a281d;
    --cream:#f7f3ed;
    --cream-2:#eee7dc;
    --card:#ffffff;
    --text:#201a16;
    --muted:#756c64;
    --line:#e8e1d8;
    --gold:#b78a4a;
    --green:#287a4b;
    --green-bg:#e9f5ed;
    --red:#a94b43;
    --red-bg:#f9e9e7;
    --shadow:0 8px 30px rgba(40,25,15,.07);
    --radius:18px;
}

html{
    scroll-behavior:smooth;
}

body{
    margin:0;
    background:var(--cream);
    color:var(--text);
    font-family:Arial,Helvetica,sans-serif;
    font-size:15px;
    line-height:1.55;
}

header{
    background:var(--coffee);
    color:#fff;
    padding:18px 28px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:24px;
    flex-wrap:wrap;
    box-shadow:0 3px 15px rgba(0,0,0,.15);
}

.brand{
    font-weight:800;
    font-size:21px;
    letter-spacing:.2px;
}

.brand span{
    font-weight:400;
    font-size:13px;
    margin-left:7px;
    color:#d8c7b4;
    letter-spacing:.5px;
}

nav{
    display:flex;
    gap:6px;
    flex-wrap:wrap;
    align-items:center;
}

nav a{
    color:#fff;
    text-decoration:none;
    font-size:13px;
    padding:8px 11px;
    border-radius:8px;
    transition:.18s ease;
}

nav a:hover{
    background:rgba(255,255,255,.12);
}

main{
    max-width:1150px;
    margin:0 auto;
    padding:42px 24px 70px;
}

h1{
    font-size:32px;
    line-height:1.15;
    margin:0 0 24px;
    letter-spacing:-.5px;
}

h2{
    font-size:21px;
    line-height:1.25;
    margin:0 0 12px;
}

h3{
    font-size:16px;
}

p{
    margin:8px 0;
}

.muted{
    color:var(--muted);
}

.card{
    background:var(--card);
    border:1px solid rgba(70,50,35,.06);
    border-radius:var(--radius);
    padding:25px;
    margin:0 0 18px;
    box-shadow:var(--shadow);
}

.card.narrow{
    max-width:520px;
    margin:50px auto;
}

.grid{
    display:grid;
    gap:18px;
}

.two{
    grid-template-columns:repeat(2,minmax(0,1fr));
}

.stats{
    grid-template-columns:repeat(4,minmax(0,1fr));
}

.stats .card{
    min-height:125px;
}

.stats b{
    display:block;
    color:var(--muted);
    font-size:13px;
    font-weight:600;
}

.stats strong{
    display:block;
    font-size:28px;
    margin-top:10px;
    letter-spacing:-.5px;
}

.row{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:20px;
}

.search{
    display:flex;
    gap:10px;
    align-items:center;
}

.search input{
    flex:1;
}

label{
    display:block;
    font-weight:600;
    font-size:14px;
    margin:0 0 15px;
}

input,
select,
textarea{
    display:block;
    width:100%;
    margin-top:7px;
    padding:12px 13px;
    border:1px solid #d9d0c6;
    border-radius:10px;
    font:inherit;
    background:#fff;
    color:var(--text);
    outline:none;
    transition:.15s ease;
}

input:focus,
select:focus,
textarea:focus{
    border-color:var(--gold);
    box-shadow:0 0 0 3px rgba(183,138,74,.12);
}

textarea{
    min-height:100px;
    resize:vertical;
}

.button{
    display:inline-block;
    border:0;
    border-radius:10px;
    padding:11px 17px;
    background:var(--coffee);
    color:#fff;
    text-decoration:none;
    cursor:pointer;
    font:inherit;
    font-weight:700;
    transition:.18s ease;
}

.button:hover{
    background:var(--coffee-2);
    transform:translateY(-1px);
}

.button.secondary{
    background:#e9e1d7;
    color:var(--coffee);
}

.button.small{
    padding:7px 11px;
    font-size:12px;
}

table{
    width:100%;
    border-collapse:separate;
    border-spacing:0;
    overflow:hidden;
}

th{
    text-align:left;
    padding:13px 10px;
    color:#6d635a;
    font-size:12px;
    text-transform:uppercase;
    letter-spacing:.5px;
    border-bottom:1px solid var(--line);
}

td{
    padding:13px 10px;
    border-bottom:1px solid #eee9e2;
    vertical-align:middle;
}

tr:last-child td{
    border-bottom:0;
}

.flash{
    padding:13px 16px;
    border-radius:11px;
    margin:0 0 18px;
    font-weight:600;
}

.flash.success{
    background:var(--green-bg);
    color:var(--green);
}

.flash.error{
    background:var(--red-bg);
    color:var(--red);
}

.badge{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:6px 10px;
    border-radius:999px;
    font-size:11px;
    font-weight:800;
    letter-spacing:.4px;
    white-space:nowrap;
}

.badge.ok{
    background:var(--green-bg);
    color:var(--green);
}

.badge.bad{
    background:var(--red-bg);
    color:var(--red);
}

.qty{
    width:65px;
}

.bill{
    width:120px;
}

.inline{
    display:flex;
    gap:7px;
    align-items:center;
    flex-wrap:wrap;
}

footer{
    text-align:center;
    color:#8b8178;
    padding:35px 20px 50px;
    font-size:13px;
}

/* =========================
   CUSTOMER PORTAL
   ========================= */

.customer-portal{
    background:
        radial-gradient(circle at 10% 0%,rgba(183,138,74,.10),transparent 28%),
        var(--cream);
}

.customer-portal main{
    max-width:900px;
    padding-top:35px;
}

.portal-hero{
    position:relative;
    overflow:hidden;
    background:linear-gradient(135deg,#211710,#3b281c);
    color:#fff;
    border-radius:24px;
    padding:30px;
    margin-bottom:20px;
    box-shadow:0 12px 35px rgba(33,23,16,.18);
}

.portal-hero:after{
    content:"";
    position:absolute;
    width:220px;
    height:220px;
    border-radius:50%;
    border:1px solid rgba(255,255,255,.08);
    right:-70px;
    top:-90px;
}

.portal-eyebrow{
    color:#d7b982;
    text-transform:uppercase;
    font-size:11px;
    font-weight:800;
    letter-spacing:1.5px;
    margin-bottom:8px;
}

.portal-hero h1{
    color:#fff;
    margin:0 0 5px;
    font-size:32px;
}

.portal-hero .muted{
    color:#cbbfb4;
}

.membership-card{
    position:relative;
    overflow:hidden;
}

.membership-card.active-card{
    border-top:4px solid var(--gold);
}

.membership-header{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:20px;
    margin-bottom:22px;
}

.membership-name{
    font-size:25px;
    font-weight:800;
    letter-spacing:-.4px;
}

.validity{
    color:var(--muted);
    font-size:13px;
    margin-top:5px;
}

.benefit-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:14px;
}

.benefit-card{
    border:1px solid var(--line);
    border-radius:15px;
    padding:18px;
    background:#fcfaf7;
}

.benefit-name{
    font-weight:700;
    font-size:15px;
    margin-bottom:12px;
}

.benefit-number{
    font-size:30px;
    font-weight:800;
    line-height:1;
    letter-spacing:-1px;
}

.benefit-number span{
    font-size:13px;
    color:var(--muted);
    font-weight:500;
    letter-spacing:0;
}

.benefit-meta{
    color:var(--muted);
    font-size:12px;
    margin-top:7px;
}

.progress{
    height:7px;
    border-radius:99px;
    background:#e6ded4;
    overflow:hidden;
    margin-top:14px;
}

.progress-bar{
    height:100%;
    background:var(--gold);
    border-radius:99px;
}

.zero-benefit{
    opacity:.65;
}

.portal-history{
    overflow:hidden;
}

.portal-history table{
    font-size:13px;
}

.portal-history th{
    font-size:11px;
}

.portal-note{
    text-align:center;
    background:#f1ebe3;
    color:#6e635a;
    box-shadow:none;
    border:0;
}

.login-card{
    max-width:460px !important;
    text-align:left;
}

.login-brand{
    text-align:center;
    margin-bottom:28px;
}

.login-brand .coffee-mark{
    width:58px;
    height:58px;
    border-radius:18px;
    background:var(--coffee);
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    margin:0 auto 16px;
    font-size:24px;
}

.login-brand h1{
    margin-bottom:5px;
}

.login-brand p{
    color:var(--muted);
}

@media(max-width:800px){
    .stats{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }

    header{
        align-items:flex-start;
        flex-direction:column;
    }

    nav{
        width:100%;
    }

    nav a{
        background:rgba(255,255,255,.07);
    }
}

@media(max-width:600px){
    body{
        font-size:14px;
    }

    main{
        padding:25px 14px 50px;
    }

    h1{
        font-size:27px;
    }

    .card{
        padding:19px;
        border-radius:15px;
    }

    .two,
    .stats,
    .benefit-grid{
        grid-template-columns:1fr;
    }

    .search{
        flex-direction:column;
        align-items:stretch;
    }

    .search .button{
        width:100%;
    }

    .row,
    .membership-header{
        align-items:flex-start;
        flex-direction:column;
    }

    .portal-hero{
        padding:24px 20px;
        border-radius:20px;
    }

    .portal-hero h1{
        font-size:27px;
    }

    .membership-name{
        font-size:22px;
    }

    .benefit-number{
        font-size:28px;
    }

    table{
        min-width:600px;
    }

    .portal-history{
        overflow-x:auto;
    }

    .portal-history table{
        min-width:560px;
    }
}

/* =========================================================
   COFFEE ByUs — VISUAL UPGRADE
   ========================================================= */

:root{
    --coffee:#24150e;
    --coffee-2:#3a2418;
    --cream:#f5f1eb;
    --cream-2:#ebe3d8;
    --card:#ffffff;
    --text:#211914;
    --muted:#756b63;
    --line:#e8e0d6;
    --gold:#b88945;
    --gold-light:#ead9bb;
    --green:#26734a;
    --green-bg:#e7f4eb;
    --red:#a94d45;
    --red-bg:#f8e8e6;
    --shadow:0 10px 35px rgba(43,27,17,.07);
    --radius:18px;
}

body{
    background:
        radial-gradient(circle at 50% -10%,rgba(184,137,69,.08),transparent 35%),
        var(--cream);
    color:var(--text);
    font-family:Arial,Helvetica,sans-serif;
}

/* -------------------------
   STAFF HEADER
   ------------------------- */

header{
    min-height:70px;
    background:linear-gradient(135deg,#21130c,#332016);
    padding:15px 30px;
    box-shadow:0 5px 25px rgba(0,0,0,.15);
}

.brand{
    font-size:21px;
    letter-spacing:.3px;
}

.brand span{
    color:#d9b77e;
    text-transform:uppercase;
    letter-spacing:1.2px;
}

nav{
    gap:4px;
}

nav a{
    border-radius:10px;
    padding:9px 12px;
    transition:all .2s ease;
}

nav a:hover{
    background:rgba(255,255,255,.11);
    transform:translateY(-1px);
}

/* -------------------------
   MAIN CONTENT
   ------------------------- */

main{
    max-width:1180px;
    padding-top:38px;
}

h1{
    font-weight:800;
    letter-spacing:-.8px;
}

h2{
    font-weight:800;
    letter-spacing:-.35px;
}

.card{
    border:1px solid rgba(80,55,35,.07);
    box-shadow:0 8px 28px rgba(40,25,15,.055);
    transition:box-shadow .2s ease,transform .2s ease;
}

.card:hover{
    box-shadow:0 12px 35px rgba(40,25,15,.08);
}

/* -------------------------
   BUTTONS
   ------------------------- */

.button{
    border-radius:11px;
    padding:11px 18px;
    box-shadow:0 4px 12px rgba(33,23,16,.12);
}

.button:hover{
    box-shadow:0 6px 16px rgba(33,23,16,.18);
}

.button.secondary{
    background:#eee7de;
}

/* -------------------------
   TABLES
   ------------------------- */

table{
    border-radius:12px;
}

th{
    background:#faf7f3;
    color:#756a61;
    font-size:11px;
    letter-spacing:.8px;
}

td{
    padding:14px 10px;
}

tr:hover td{
    background:#fcfaf7;
}

/* =========================================================
   CUSTOMER PORTAL
   ========================================================= */

.customer-portal{
    min-height:100vh;
    background:
        radial-gradient(circle at 15% 0%,rgba(184,137,69,.13),transparent 25%),
        radial-gradient(circle at 90% 15%,rgba(54,35,23,.06),transparent 25%),
        #f5f1eb;
}

.customer-portal .portal-header{
    background:rgba(35,21,14,.97);
    backdrop-filter:blur(12px);
    padding:17px 24px;
    position:relative;
}

.customer-portal .portal-header .brand{
    max-width:900px;
    width:100%;
    margin:auto;
    font-size:20px;
}

.customer-portal main{
    max-width:900px;
    padding:32px 20px 60px;
}

/* HERO */

.portal-hero{
    position:relative;
    overflow:hidden;
    background:
        radial-gradient(circle at 100% 0%,rgba(216,183,126,.20),transparent 35%),
        linear-gradient(135deg,#24150e,#3a2418 65%,#4a2f1d);
    color:#fff;
    border-radius:24px;
    padding:34px 32px;
    margin-bottom:20px;
    box-shadow:0 15px 40px rgba(39,23,14,.20);
}

.portal-hero:before{
    content:"";
    position:absolute;
    width:240px;
    height:240px;
    right:-100px;
    bottom:-130px;
    border:1px solid rgba(255,255,255,.08);
    border-radius:50%;
}

.portal-hero:after{
    content:"";
    position:absolute;
    width:160px;
    height:160px;
    right:-55px;
    bottom:-85px;
    border:1px solid rgba(255,255,255,.07);
    border-radius:50%;
}

.portal-eyebrow{
    color:#d8b579;
    font-size:10px;
    font-weight:800;
    letter-spacing:1.8px;
    text-transform:uppercase;
    margin-bottom:9px;
}

.portal-hero h1{
    position:relative;
    z-index:1;
    color:#fff;
    font-size:34px;
    margin:0 0 5px;
    letter-spacing:-1px;
}

.portal-hero .muted{
    position:relative;
    z-index:1;
    color:#d3c6bb;
    font-size:14px;
}

/* MEMBERSHIP */

.membership-card{
    border-radius:22px;
    padding:26px;
}

.membership-card.active-card{
    border-top:4px solid var(--gold);
}

.membership-header{
    margin-bottom:24px;
}

.membership-name{
    font-size:25px;
    line-height:1.2;
    font-weight:800;
    color:#211914;
}

.validity{
    margin-top:7px;
    font-size:13px;
}

/* BENEFITS */

.benefit-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:14px;
}

.benefit-card{
    position:relative;
    overflow:hidden;
    background:linear-gradient(145deg,#fffdfb,#faf6f0);
    border:1px solid #e8ded1;
    border-radius:17px;
    padding:19px;
    transition:transform .18s ease,box-shadow .18s ease;
}

.benefit-card:hover{
    transform:translateY(-2px);
    box-shadow:0 8px 22px rgba(50,30,15,.07);
}

.benefit-card:after{
    content:"";
    position:absolute;
    width:80px;
    height:80px;
    right:-35px;
    top:-35px;
    border-radius:50%;
    background:rgba(184,137,69,.07);
}

.benefit-name{
    position:relative;
    z-index:1;
    font-size:14px;
    color:#5d5046;
    margin-bottom:15px;
}

.benefit-number{
    position:relative;
    z-index:1;
    font-size:34px;
    font-weight:900;
    letter-spacing:-1.5px;
    color:#21150e;
}

.benefit-number span{
    font-size:12px;
    color:#81766d;
    font-weight:600;
}

.benefit-meta{
    position:relative;
    z-index:1;
    margin-top:8px;
    font-size:11px;
    color:#81766d;
}

.progress{
    position:relative;
    z-index:1;
    height:6px;
    margin-top:15px;
    background:#e8dfd3;
}

.progress-bar{
    background:linear-gradient(90deg,#9d7136,#c99b55);
}

/* STATUS */

.customer-portal .badge{
    padding:7px 12px;
    font-size:10px;
    letter-spacing:.8px;
}

.customer-portal .badge.ok{
    background:#e6f4eb;
    color:#237247;
}

.customer-portal .badge.bad{
    background:#f7e7e5;
    color:#a24b43;
}

/* HISTORY */

.portal-history{
    border-radius:22px;
    padding:26px;
}

.portal-history h2{
    margin-bottom:2px;
}

.portal-history table{
    margin-top:18px;
}

.portal-history th{
    background:#faf7f3;
}

.portal-history td{
    font-size:13px;
}

.section-heading{
    display:flex;
    justify-content:space-between;
    align-items:center;
}

/* NOTE */

.portal-note{
    background:#eee7dd;
    border:1px solid #e4d9ca;
    border-radius:17px;
    box-shadow:none;
    color:#6d6259;
}

.portal-note p{
    margin:0;
    font-size:13px;
}

/* LOGIN */

.customer-portal .login-card{
    margin:55px auto;
    padding:32px;
    border-radius:24px;
    box-shadow:0 18px 45px rgba(40,25,15,.10);
}

.login-brand .coffee-mark{
    width:64px;
    height:64px;
    border-radius:20px;
    background:linear-gradient(145deg,#24150e,#4a2e1c);
    box-shadow:0 8px 20px rgba(35,20,10,.18);
    font-size:26px;
}

.login-brand h1{
    font-size:30px;
}

.customer-portal input{
    border-radius:12px;
    padding:13px 14px;
    background:#fffdfb;
}

.customer-portal .button{
    width:100%;
    margin-top:5px;
    padding:13px 18px;
    background:linear-gradient(135deg,#24150e,#422819);
}

/* FOOTER */

.customer-portal footer{
    padding:25px 20px 40px;
    color:#8a7e73;
}

/* -------------------------
   MOBILE
   ------------------------- */

@media(max-width:600px){

    header{
        padding:14px 16px;
    }

    main{
        padding:24px 14px 50px;
    }

    .customer-portal main{
        padding:20px 13px 45px;
    }

    .portal-hero{
        padding:27px 22px;
        border-radius:21px;
    }

    .portal-hero h1{
        font-size:28px;
    }

    .membership-card,
    .portal-history{
        padding:20px;
        border-radius:19px;
    }

    .benefit-grid{
        grid-template-columns:1fr 1fr;
        gap:10px;
    }

    .benefit-card{
        padding:15px;
    }

    .benefit-name{
        font-size:13px;
    }

    .benefit-number{
        font-size:29px;
    }

    .portal-history{
        overflow-x:auto;
    }

    .portal-history table{
        min-width:540px;
    }

    .customer-portal .login-card{
        margin:25px auto;
        padding:24px 20px;
    }
}

@media(max-width:430px){

    .benefit-grid{
        grid-template-columns:1fr;
    }

    .portal-hero h1{
        font-size:26px;
    }

    .membership-name{
        font-size:21px;
    }
}

