* {
    box-sizing: border-box;
}

body {
    font-family: Poppins, sans-serif;
    color: #172033;
    background: #f4f6fb;
}

.navbar {
    background: #1a237e;
}

.gold {
    color: #ffd700;
}

.btn-gold {
    background: #ffd700;
    color: #111;
    border: 0;
    font-weight: 600;
}

.btn-gold:hover {
    background: #e6c200;
    color: #111;
}

.btn-primary {
    background: #1a237e;
    border-color: #1a237e;
}

.hero {
    background: linear-gradient(135deg, #10185c, #1a237e);
    color: #fff;
}

.hero h1 {
    font-size: clamp(2.3rem, 6vw, 4.5rem);
    font-weight: 700;
}

.hero-badge {
    background: rgba(255, 215, 0, .12);
    color: #ffd700;
}

.hero-card {
    background: rgba(255, 255, 255, .09);
    border: 1px solid rgba(255, 255, 255, .15);
    padding: 30px;
    border-radius: 20px;
}

.small-box {
    background: #f6f7fb;
    border: 1px solid #e5e7eb;
    padding: 12px;
    border-radius: 10px;
    color: #172033;
    word-break: break-all;
}

.stat {
    padding: 18px;
}

.stat strong {
    display: block;
    font-size: 25px;
    color: #1a237e;
}

.stat span {
    font-size: 12px;
    color: #6b7280;
}

.feature,
.testimonial,
.card-box {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(20, 30, 70, .04);
}

.feature {
    height: 100%;
}

.icon {
    width: 50px;
    height: 50px;
    border-radius: 13px;
    background: #eef0ff;
    color: #1a237e;
    display: grid;
    place-items: center;
    font-size: 20px;
    margin-bottom: 15px;
}

.testimonial strong {
    display: block;
    margin-top: 12px;
    color: #1a237e;
}

.footer {
    background: #10185c;
    color: #fff;
}

.auth-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #10185c, #1a237e);
    padding-top: 20px;
}

.auth-card {
    max-width: 520px;
    background: #fff;
    border-radius: 18px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .2);
    margin-top: 20px;
}

.brand-link {
    color: #fff;
    text-decoration: none;
    font-size: 25px;
    font-weight: 700;
}

.brand-link span {
    color: #ffd700;
}

.auth-card label {
    font-weight: 500;
    font-size: 13px;
    margin-bottom: 6px;
}

.mpesa-icon {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: #dff7e5;
    color: #16823b;
    display: grid;
    place-items: center;
    font-size: 25px;
    font-weight: 700;
    margin: 0 auto 15px;
}

.stat-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px;
    height: 100%;
}

.stat-card span {
    display: block;
    color: #6b7280;
    font-size: 12px;
}

.stat-card strong {
    display: block;
    font-size: 24px;
    margin-top: 8px;
    color: #1a237e;
}


/* =========================================================
   EARNSMART MOBILE OPTIMISATION
   Desktop layout above remains unchanged.
   ========================================================= */

@media (max-width: 768px) {

    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    body {
        font-size: 14px;
    }

    /* Member page content */
    .es-content {
        padding-left: 12px !important;
        padding-right: 12px !important;
        padding-top: 18px !important;
    }

    /* Main page headings */
    .es-content > h3 {
        font-size: 1.35rem;
        line-height: 1.25;
        margin-bottom: 4px !important;
    }

    .es-content > p {
        font-size: 13px;
        margin-bottom: 16px;
    }

    /* Dashboard summary cards */
    .es-stat {
        padding: 14px !important;
        min-height: 92px;
        border-radius: 14px !important;
    }

    .es-stat small {
        display: block;
        font-size: 11px;
        line-height: 1.2;
    }

    .es-stat strong {
        font-size: 18px !important;
        line-height: 1.25;
        margin-top: 7px !important;
        overflow-wrap: anywhere;
    }

    /* General member cards */
    .es-card {
        border-radius: 14px !important;
    }

    .es-card.p-4 {
        padding: 17px !important;
    }

    .es-card h5 {
        font-size: 1rem;
    }

    /* Level 1 / Level 2 cards */
    .es-card .d-flex.justify-content-between {
        gap: 10px;
        flex-wrap: wrap;
    }

    .level-pill {
        font-size: 10px !important;
        padding: 5px 8px !important;
        white-space: nowrap;
    }

    /* Referral link */
    #invite .input-group {
        display: block;
    }

    #invite .input-group > .form-control {
        width: 100%;
        display: block;
        border-radius: 9px !important;
        margin-bottom: 8px;
        font-size: 12px;
        min-height: 44px;
    }

    #invite .input-group > .btn {
        width: 100%;
        display: block;
        border-radius: 9px !important;
        min-height: 44px;
    }

    /* WhatsApp / Telegram buttons */
    #invite .mt-3.d-flex {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

    #invite .mt-3 .btn {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Tables */
    .table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        font-size: 12px;
    }

    .table th,
    .table td {
        padding: 10px 8px;
        vertical-align: middle;
    }

    .table th {
        white-space: nowrap;
        font-size: 11px;
    }

    .table td {
        line-height: 1.35;
    }

    /* Buttons should be easy to tap */
    .btn {
        min-height: 40px;
    }

    .btn-sm {
        min-height: 34px;
    }

    /* Prevent long links/email addresses breaking layout */
    input,
    td,
    .small-box {
        max-width: 100%;
    }

    /* Login / registration */
    .auth-page {
        padding: 12px;
        padding-top: 12px;
    }

    .auth-card {
        padding: 20px;
        margin-top: 10px;
        border-radius: 15px;
    }

    .brand-link {
        font-size: 21px;
    }

    /* Public homepage */
    .hero-card {
        padding: 20px;
    }

    .feature,
    .testimonial,
    .card-box {
        padding: 20px;
    }

    .stat-card {
        padding: 16px;
    }
}


/* Small phones */
@media (max-width: 420px) {

    .es-content {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .es-stat {
        min-height: 88px;
        padding: 12px !important;
    }

    .es-stat strong {
        font-size: 16px !important;
    }

    .es-card.p-4 {
        padding: 15px !important;
    }

    .auth-card {
        padding: 18px;
    }
}
/* =========================================================
   EARNSMART PREMIUM TILE FACELIFT — presentation only
   ========================================================= */
:root{--es-ink:#081426;--es-blue:#102b54;--es-gold:#f6bd32;--es-soft:#f3f6fb}
body{font-family:Poppins,sans-serif;background:radial-gradient(circle at 90% 0,#eef4ff 0,transparent 28%),#f4f7fb}
.es-welcome{background:linear-gradient(120deg,#08172d,#102d55);color:#fff;border-radius:24px;padding:24px 26px;display:flex;align-items:center;justify-content:space-between;gap:20px;box-shadow:0 18px 45px rgba(8,23,45,.16);position:relative;overflow:hidden}
.es-welcome:after{content:"";position:absolute;width:190px;height:190px;border-radius:50%;right:-70px;top:-100px;background:rgba(246,189,50,.14)}
.es-welcome p{color:#b9c8dd}.es-eyebrow{display:block;font-size:10px;font-weight:800;letter-spacing:1.7px;color:#f6bd32;margin-bottom:7px}.es-rank-badge{position:relative;z-index:1;min-width:105px;text-align:center;padding:12px 16px;border:1px solid rgba(246,189,50,.35);background:rgba(246,189,50,.09);border-radius:17px}.es-rank-badge span{display:block;font-size:9px;letter-spacing:1.4px;color:#f6d66e}.es-rank-badge strong{display:block;margin-top:3px;font-size:15px}
.es-summary-grid .es-stat{height:100%;min-height:132px;color:#fff;position:relative;overflow:hidden;border:0;box-shadow:0 14px 32px rgba(15,31,55,.12);transition:transform .18s ease,box-shadow .18s ease}.es-summary-grid .es-stat:hover{transform:translateY(-3px);box-shadow:0 18px 38px rgba(15,31,55,.16)}.es-summary-grid .es-stat:after{content:"";position:absolute;width:100px;height:100px;border-radius:50%;right:-38px;top:-42px;background:rgba(255,255,255,.1)}.es-summary-grid .es-stat small{color:rgba(255,255,255,.78);text-transform:uppercase;letter-spacing:.8px;font-size:10px}.es-summary-grid .es-stat strong{font-size:22px;color:#fff}.es-summary-grid .es-stat>span{display:block;font-size:10px;color:rgba(255,255,255,.7);margin-top:5px}.es-stat-icon{font-size:22px;margin-bottom:8px}.es-stat-wallet{background:linear-gradient(135deg,#8a5a00,#d28b00)}.es-stat-team{background:linear-gradient(135deg,#123f91,#2563d9)}.es-stat-earn{background:linear-gradient(135deg,#08775e,#08a67e)}.es-stat-rank{background:linear-gradient(135deg,#6d24a8,#a83bc6)}
.es-section-title{display:flex;justify-content:space-between;align-items:end;margin:2px 2px 14px}.es-section-title span{font-size:10px;letter-spacing:1.6px;font-weight:800;color:#a6780d}.es-section-title h5{font-weight:800;margin:2px 0 0}.es-section-title small{color:#8a96a7}
.es-earn-tiles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.es-earn-tile{min-height:112px;border-radius:20px;padding:17px;display:flex;align-items:center;gap:13px;text-decoration:none;color:#fff;position:relative;overflow:hidden;box-shadow:0 13px 28px rgba(20,32,55,.12);transition:transform .18s ease,box-shadow .18s ease}.es-earn-tile:hover{color:#fff;transform:translateY(-3px);box-shadow:0 17px 34px rgba(20,32,55,.18)}.es-earn-tile:before{content:"";position:absolute;width:100px;height:100px;border-radius:50%;right:-38px;bottom:-50px;background:rgba(255,255,255,.11)}.es-earn-tile .tile-icon{width:52px;height:52px;flex:0 0 52px;display:grid;place-items:center;border-radius:16px;font-size:25px;background:rgba(255,255,255,.15);border:1px solid rgba(255,255,255,.13)}.es-earn-tile div{min-width:0;position:relative;z-index:1}.es-earn-tile strong{display:block;font-size:14px;line-height:1.25}.es-earn-tile small{display:block;margin-top:5px;font-size:10px;color:rgba(255,255,255,.78)}.tile-arrow{margin-left:auto;font-size:28px;opacity:.72;position:relative;z-index:1}.tile-chat{background:linear-gradient(135deg,#087b72,#0aa58c)}.tile-furaha{background:linear-gradient(135deg,#6723a8,#8f35d1)}.tile-hotel{background:linear-gradient(135deg,#b45b08,#e08a15)}.tile-survey{background:linear-gradient(135deg,#b01f62,#dc3a82)}.tile-jump{background:linear-gradient(135deg,#1742a0,#2768df)}.tile-honey{background:linear-gradient(135deg,#8c6800,#c79b09)}
.es-level-card{border:1px solid #e8edf5!important;box-shadow:0 10px 25px rgba(17,39,69,.06)!important}.es-invite-card{background:linear-gradient(135deg,#fff,#f8fbff);border:1px solid #e5ebf5!important}.es-invite-head{display:flex;justify-content:space-between;align-items:center;gap:15px}.es-invite-head p{font-size:12px;color:#7b8798}.es-invite-icon{width:54px;height:54px;display:grid;place-items:center;border-radius:17px;background:#edf3ff;font-size:23px}.es-invite-card .form-control{border-radius:12px 0 0 12px;background:#f7f9fc;border-color:#dfe6f0}.es-invite-card .btn-primary{background:#102b54;border-color:#102b54}.es-team-card{overflow:hidden;border:1px solid #e8edf5!important}
@media(max-width:991px){.es-earn-tiles{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:576px){.es-welcome{padding:19px 17px;border-radius:19px}.es-welcome h3{font-size:1.18rem}.es-welcome p{font-size:11px}.es-rank-badge{min-width:82px;padding:10px}.es-summary-grid .es-stat{min-height:118px!important;padding:14px!important}.es-summary-grid .es-stat strong{font-size:17px!important}.es-earn-tiles{gap:10px}.es-earn-tile{min-height:105px;padding:13px 11px;gap:9px;border-radius:17px}.es-earn-tile .tile-icon{width:43px;height:43px;flex-basis:43px;font-size:21px;border-radius:13px}.es-earn-tile strong{font-size:12px}.es-earn-tile small{font-size:9px}.tile-arrow{font-size:21px}.es-section-title small{display:none}}
