


:root{
    --green:#1f9d68;
    --green2:#dff7eb;
    --ink:#12241a;
    --muted:#718078;
    --bg:#f5f8f6;
    --card:#fff;
    --line:#e5ece8;
    --danger:#b42318;
    --amber:#9a6700;

    --blue:#4c68ff;
    --blue2:#eaf0ff;
    --purple:#8c63e7;
    --purple2:#f2edff;
    --red:#e35d73;
    --red2:#fff0f3;
    --yellow:#e9ab31;
    --yellow2:#fff6df;

    --shadow:0 14px 35px rgba(22,47,35,.075);
    --shadow-sm:0 7px 21px rgba(22,47,35,.055);
}

*{box-sizing:border-box}

html{scroll-behavior:smooth}

body{
    margin:0;
    min-width:320px;
    background:
        radial-gradient(circle at 0 0,rgba(76,104,255,.075),transparent 24rem),
        radial-gradient(circle at 100% 18%,rgba(31,157,104,.075),transparent 23rem),
        var(--bg);
    color:var(--ink);
    font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
    -webkit-font-smoothing:antialiased;
}

button,input,select,textarea{font:inherit}
button,a{-webkit-tap-highlight-color:transparent}

.app-shell{
    width:min(760px,100%);
    margin:auto;
    padding-bottom:92px;
}

.page{padding:16px}

.topbar{
    padding:20px 16px 8px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
}

.topbar h1{
    font-size:23px;
    line-height:1.05;
    letter-spacing:-.04em;
    margin:5px 0 0;
}

.eyebrow{
    font-size:10px;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.13em;
    color:var(--green);
}

.icon-btn{
    width:42px;
    height:42px;
    border-radius:14px;
    background:rgba(255,255,255,.9);
    border:1px solid var(--line);
    display:grid;
    place-items:center;
    color:var(--ink);
    text-decoration:none;
    box-shadow:var(--shadow-sm);
}

/* Reusable surfaces */
.card,
.stat-card{
    background:rgba(255,255,255,.94);
    border:1px solid var(--line);
    border-radius:18px;
    box-shadow:var(--shadow-sm);
}

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

/* Colorful accent utility */
.card-blue{border-top:3px solid var(--blue)}
.card-green{border-top:3px solid var(--green)}
.card-yellow{border-top:3px solid var(--yellow)}
.card-red{border-top:3px solid var(--red)}
.card-purple{border-top:3px solid var(--purple)}

.balance-card{
    position:relative;
    overflow:hidden;
    background:
        radial-gradient(circle at 88% 8%,rgba(255,255,255,.13),transparent 8rem),
        linear-gradient(135deg,#173f2f,#2aa86f);
    color:#fff;
    border-radius:24px;
    padding:23px;
    box-shadow:0 15px 36px rgba(23,63,47,.18);
}

.balance-card:after{
    position:absolute;
    width:170px;
    height:170px;
    right:-90px;
    bottom:-110px;
    border:24px solid rgba(255,255,255,.08);
    border-radius:50%;
    content:"";
}

.balance-card>*{position:relative;z-index:1}

.balance-card .muted{color:rgba(255,255,255,.75)}

.balance{
    font-size:40px;
    line-height:1;
    font-weight:800;
    letter-spacing:-.055em;
    margin:7px 0;
}

.secondary{
    color:rgba(255,255,255,.76);
    font-size:13px;
}

/* Buttons */
.btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    border:0;
    text-decoration:none;
    padding:11px 15px;
    border-radius:12px;
    font-weight:800;
    font-size:12px;
    cursor:pointer;
    transition:transform .18s ease,box-shadow .18s ease,background .18s ease;
}

.btn:hover{
    transform:translateY(-1px);
}

.btn.primary{
    background:var(--green);
    color:white;
    box-shadow:0 8px 16px rgba(31,157,104,.16);
}

.btn.secondary{
    background:#edf5f0;
    color:#1c6044;
}

.btn.blue{
    background:var(--blue);
    color:white;
    box-shadow:0 8px 16px rgba(76,104,255,.16);
}

.btn.yellow{
    background:var(--yellow2);
    color:#8b650f;
}

.btn.red{
    background:var(--red2);
    color:#a44658;
}

.btn.purple{
    background:var(--purple2);
    color:#684bb0;
}

.btn.disabled{
    background:#dfe8e3;
    color:#809087;
    cursor:not-allowed;
    box-shadow:none;
}

.btn.small{
    padding:8px 11px;
    font-size:11px;
}

.full{width:100%}

.balance-card .primary{
    margin-top:20px;
    background:#fff;
    color:#17563c;
}

/* Dashboard metrics */
.stats-grid{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:11px;
    margin:13px 0;
}

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

.stat-card:before{
    position:absolute;
    left:0;
    top:0;
    right:0;
    height:3px;
    background:var(--accent,var(--green));
    content:"";
}

.stat-card:nth-child(1){--accent:var(--blue)}
.stat-card:nth-child(2){--accent:var(--green)}
.stat-card:nth-child(3){--accent:var(--yellow)}
.stat-card:nth-child(4){--accent:var(--red)}

.stat-card span{
    display:block;
    color:var(--muted);
    font-size:11px;
}

.stat-card strong{
    display:block;
    color:var(--ink);
    font-size:20px;
    margin-top:8px;
    letter-spacing:-.025em;
}

/* Sections / rows */
.section-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
}

.section-head h2,
.card h2{
    margin:0 0 12px;
    font-size:17px;
    letter-spacing:-.025em;
}

.section-head a{
    color:var(--green);
    font-weight:800;
    font-size:11px;
    text-decoration:none;
}

.activity-row,
.history-row,
.balance-line{
    display:flex;
    justify-content:space-between;
    gap:12px;
    align-items:center;
    padding:12px 0;
    border-top:1px solid var(--line);
}

.activity-row:first-of-type,
.history-row:first-of-type{
    border-top:0;
}

.activity-row small,
.history-row small{
    display:block;
    color:var(--muted);
    font-size:10px;
    margin-top:4px;
}

.credit{color:var(--green)}
.debit{color:#a43838}

/* Promo / referral callouts */
.promo-card{
    margin-top:13px;
    background:linear-gradient(140deg,#e7f8ef,#f2fbf6);
    border:1px solid #c8ecd9;
    border-radius:19px;
    padding:18px;
    display:flex;
    justify-content:space-between;
    gap:10px;
    align-items:end;
    box-shadow:var(--shadow-sm);
}

.promo-card h2{
    margin:3px 0;
    font-size:18px;
}

.promo-card p{
    margin:6px 0;
    color:#557067;
    font-size:12px;
    line-height:1.45;
}

/* Tasks */
.task-card{
    position:relative;
    background:#fff;
    border:1px solid var(--line);
    border-radius:17px;
    padding:14px;
    display:flex;
    gap:12px;
    margin-bottom:11px;
    align-items:center;
    box-shadow:var(--shadow-sm);
}

.task-card:before{
    position:absolute;
    top:11px;
    bottom:11px;
    left:0;
    width:3px;
    border-radius:0 99px 99px 0;
    background:var(--accent,var(--green));
    content:"";
}

.task-card:nth-child(3n+1){--accent:var(--blue)}
.task-card:nth-child(3n+2){--accent:var(--green)}
.task-card:nth-child(3n+3){--accent:var(--yellow)}

.task-icon{
    width:44px;
    height:44px;
    flex:0 0 44px;
    border-radius:13px;
    background:#edf7f2;
    display:grid;
    place-items:center;
    font-size:21px;
}

.task-card:nth-child(3n+1) .task-icon{background:var(--blue2)}
.task-card:nth-child(3n+2) .task-icon{background:var(--green2)}
.task-card:nth-child(3n+3) .task-icon{background:var(--yellow2)}

.task-body{flex:1;min-width:0}
.task-body h2{
    margin:0;
    font-size:14px;
    letter-spacing:-.02em;
}
.task-body p{
    margin:5px 0 0;
    color:var(--muted);
    font-size:11px;
    line-height:1.45;
}

.task-side{text-align:right}
.task-side strong{
    display:block;
    color:var(--green);
    margin-bottom:8px;
}

/* Referral */
.code-box{
    font-size:22px;
    font-weight:800;
    letter-spacing:.08em;
    background:#f6faf7;
    border:1px dashed #b9d9c8;
    padding:16px;
    border-radius:14px;
    text-align:center;
}

.copy-row{display:flex;gap:8px}

.copy-row input,
.card input{
    width:100%;
    padding:11px 12px;
    border:1px solid var(--line);
    border-radius:12px;
    background:#fbfdfc;
    color:var(--ink);
    outline:0;
}

.copy-row input:focus,
.card input:focus{
    border-color:#cbd3ff;
    box-shadow:0 0 0 4px rgba(76,104,255,.08);
}

.card label{
    display:block;
    font-size:11px;
    font-weight:800;
    margin:14px 0 7px;
}

.conversion{
    background:linear-gradient(135deg,#f1f8f4,#eafaf3);
    border:1px solid #d6eee2;
    border-radius:13px;
    padding:12px 13px;
    margin:12px 0;
}

/* Notifications */
.notice,
.error{
    padding:12px 13px;
    border-radius:13px;
    margin-bottom:12px;
    font-size:11px;
}

.notice{
    background:#e7f8ef;
    border:1px solid #c9ecd9;
    color:#19583f;
}

.error{
    background:#fff0ef;
    border:1px solid #f0d0cc;
    color:var(--danger);
}

/* Status pills */
.status{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    font-size:10px;
    font-weight:800;
    padding:7px 9px;
    border-radius:999px;
    white-space:nowrap;
}

.status.pending{
    background:#fff5d8;
    color:var(--amber);
}

.status.approved,
.status.processing,
.status.review{
    background:#e8f0ff;
    color:#315ca8;
}

.status.paid,
.status.completed,
.status.success{
    background:#e3f7ec;
    color:#18754e;
}

.status.rejected,
.status.failed,
.status.cancelled,
.status.canceled{
    background:#ffe8e6;
    color:#b42318;
}

/* Rules */
.clean-list{
    margin:0;
    padding-left:18px;
    color:#56665e;
    font-size:12px;
    line-height:1.9;
}

.clean-list li::marker{color:var(--green)}

.muted,.empty{color:var(--muted)}

.mt{margin-top:16px}

/* Fixed navigation */
.bottom-nav{
    position:fixed;
    left:0;
    right:0;
    bottom:0;
    background:rgba(255,255,255,.96);
    backdrop-filter:blur(12px);
    border-top:1px solid var(--line);
    display:flex;
    justify-content:center;
    z-index:10;
    box-shadow:0 -8px 22px rgba(18,36,26,.045);
}

.bottom-nav a{
    max-width:240px;
    flex:1;
    text-align:center;
    padding:10px 4px 12px;
    color:#6c7972;
    text-decoration:none;
    font-size:10px;
    font-weight:800;
}

.bottom-nav a.active,
.bottom-nav a:hover{color:var(--green)}

.bottom-nav span{
    display:block;
    font-size:18px;
    line-height:1;
    margin-bottom:4px;
}

@media(min-width:760px){
    .bottom-nav{
        position:static;
        max-width:760px;
        margin:auto;
        border:0;
        background:transparent;
        box-shadow:none;
    }

    .bottom-nav a{
        border:1px solid var(--line);
        background:#fff;
        margin:8px;
        border-radius:15px;
        box-shadow:var(--shadow-sm);
    }

    .app-shell{padding-bottom:20px}
}

@media(max-width:620px){
    .app-shell{padding-bottom:92px}
    .page{padding:13px}
    .topbar{padding:16px 13px 6px}
    .topbar h1{font-size:21px}
    .balance-card{padding:20px;border-radius:20px}
    .balance{font-size:36px}
    .stats-grid{gap:8px}
    .stat-card{padding:13px}
    .promo-card{display:block}
    .promo-card .btn{width:100%;margin-top:8px}
    .task-card{padding:13px}
    .copy-row{flex-direction:column}
    .copy-row .btn{width:100%}
}

@media(max-width:390px){
    .stats-grid{grid-template-columns:1fr}
}