*{box-sizing:border-box}
:root{
    --bg:#eef5ff;
    --card:#ffffff;
    --text:#071225;
    --muted:#64748b;
    --line:#dbe4ef;
    --blue:#2563eb;
    --cyan:#06b6d4;
    --green:#16a34a;
    --yellow:#f59e0b;
    --red:#dc2626;
}
body.track-status-page{
    min-height:100vh;
    margin:0;
    color:var(--text);
    background:
        radial-gradient(circle at 10% 0%,rgba(37,99,235,.11),transparent 28%),
        radial-gradient(circle at 90% 0%,rgba(6,182,212,.10),transparent 30%),
        linear-gradient(180deg,#f7fbff,#eef5ff);
    font-family:Inter,Arial,sans-serif;
}
body.dark-theme.track-status-page{
    color:#fff;
    background:
        radial-gradient(circle at 12% 8%,rgba(37,99,235,.30),transparent 34%),
        radial-gradient(circle at 88% 18%,rgba(6,182,212,.24),transparent 32%),
        radial-gradient(circle at 50% 100%,rgba(34,197,94,.16),transparent 36%),
        linear-gradient(135deg,#07111f,#0f172a 48%,#08111f);
}
.orb{opacity:.12}
body.dark-theme .orb{opacity:.28}
.theme-toggle{
    position:fixed;
    top:18px;
    right:18px;
    z-index:99999;
    border:0;
    width:48px;
    height:48px;
    border-radius:50%;
    padding:0;
    cursor:pointer;
    color:#fff;
    font-size:22px;
    font-weight:950;
    background:linear-gradient(135deg,#2563eb,#06b6d4);
    box-shadow:0 14px 30px rgba(37,99,235,.25);
}
.track-wrap{
    width:100%;
    min-height:100vh;
    padding:28px 14px 40px;
    position:relative;
    z-index:5;
}
.track-shell{
    width:100%;
    max-width:1120px;
    margin:0 auto;
}
.hero-head{
    display:flex;
    align-items:center;
    gap:16px;
    margin-bottom:22px;
}
.hero-icon{
    width:64px;
    height:64px;
    border-radius:23px;
    display:grid;
    place-items:center;
    color:#fff;
    font-size:30px;
    background:linear-gradient(135deg,#4f7cff,#22c55e);
    box-shadow:0 16px 34px rgba(37,99,235,.22);
}
.hero-head h1{
    margin:0;
    font-size:clamp(30px,4vw,44px);
    line-height:1;
    letter-spacing:-.04em;
}
.hero-head h1 span{
    background:linear-gradient(135deg,#2563eb,#06b6d4,#16a34a);
    -webkit-background-clip:text;
    background-clip:text;
    color:transparent;
}
.hero-head p{
    margin:8px 0 0;
    color:var(--muted);
}
body.dark-theme .hero-head p{color:#b6c4d8}
.panel-card,
.search-panel,
.user-status-card,
.summary-card,
.goal-detail-card{
    background:rgba(255,255,255,.86);
    border:1px solid var(--line);
    box-shadow:0 14px 35px rgba(15,23,42,.08);
    backdrop-filter:blur(18px);
}

body.dark-theme .panel-card,
body.dark-theme .search-panel,
body.dark-theme .user-status-card,
body.dark-theme .summary-card,
body.dark-theme .goal-detail-card{
    background:linear-gradient(180deg,rgba(255,255,255,.12),rgba(255,255,255,.055));
    border-color:rgba(255,255,255,.14);
    box-shadow:0 22px 55px rgba(0,0,0,.32);
}
.search-panel{
    border-radius:22px;
    padding:16px;
    display:grid;
    grid-template-columns:1fr 1fr auto;
    gap:14px;
    margin-bottom:18px;
}
.field label{
    display:block;
    margin-bottom:8px;
    color:var(--text);
    font-size:13px;
    font-weight:900;
}
body.dark-theme .field label{color:#e2e8f0}
.field input,.field select{
    width:100%;
    height:52px;
    border-radius:14px;
    border:1px solid var(--line);
    padding:0 14px;
    background:#fff;
    color:var(--text);
    outline:none;
    font-weight:800;
    font-size:15px;
}
body.dark-theme .field input,
body.dark-theme .field select{
    background:rgba(2,6,23,.48);
    border-color:rgba(148,163,184,.24);
    color:#fff;
}
.field select option{color:#0f172a}
.track-submit-btn{
    height:52px;
    align-self:end;
    border:0;
    border-radius:14px;
    padding:0 28px;
    cursor:pointer;
    color:#fff;
    font-weight:950;
    background:linear-gradient(135deg,#4f7cff,#20c997);
    box-shadow:0 14px 28px rgba(37,99,235,.24);
}
.info-note{
    grid-column:1/-1;
    border-radius:12px;
    padding:10px 12px;
    background:#eaf2ff;
    color:#1d4ed8;
    font-size:13px;
    font-weight:700;
}
body.dark-theme .info-note{
    background:rgba(37,99,235,.15);
    color:#bfdbfe;
}
.error-msg{
    border-radius:18px;
    padding:16px;
    margin:16px 0;
    background:#fee2e2;
    border:1px solid #fecaca;
    color:#b91c1c;
    text-align:center;
    font-weight:900;
}
body.dark-theme .error-msg{
    background:rgba(239,68,68,.13);
    border-color:rgba(248,113,113,.32);
    color:#fecaca;
}
.user-status-card{
    border-radius:26px;
    padding:22px;
    position:relative;
    overflow:hidden;
}
.user-status-card::before{
    content:"";
    position:absolute;
    left:0;
    top:18px;
    bottom:18px;
    width:5px;
    border-radius:0 999px 999px 0;
    background:linear-gradient(180deg,#60a5fa,#22c55e);
    box-shadow:0 0 20px rgba(34,197,94,.45);
}
.user-status-card::after{
    content:"";
    position:absolute;
    width:160px;
    height:160px;
    right:-80px;
    top:-80px;
    border-radius:50%;
    background:rgba(37,99,235,.06);
}
body.dark-theme .user-status-card::after{background:rgba(255,255,255,.055)}
.user-top{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:14px;
    position:relative;
    z-index:2;
}
.user-main{
    display:flex;
    gap:14px;
    min-width:0;
}
.user-avatar{
    width:56px;
    height:56px;
    min-width:56px;
    border-radius:50%;
    display:grid;
    place-items:center;
    color:#2563eb;
    background:#eaf2ff;
    font-size:28px;
}
body.dark-theme .user-avatar{
    background:rgba(37,99,235,.18);
    color:#bfdbfe;
}
.user-title h2{
    margin:0 0 8px;
    font-size:22px;
    letter-spacing:-.02em;
    color:var(--text);
}
body.dark-theme .user-title h2{color:#fff}
.user-title p{
    margin:0;
    color:#52637a;
    font-size:13px;
    line-height:1.45;
}
body.dark-theme .user-title p{color:#b6c4d8}
.goal-count-pill{
    padding:10px 17px;
    border-radius:999px;
    background:#fff7db;
    color:#a15c00;
    border:1px solid #fde68a;
    font-size:13px;
    font-weight:950;
    box-shadow:0 12px 26px rgba(245,158,11,.14);
    white-space:nowrap;
}
body.dark-theme .goal-count-pill{
    background:rgba(250,204,21,.14);
    border-color:rgba(250,204,21,.32);
    color:#fde68a;
}

.goal-count-pill.complete{
    background:linear-gradient(135deg,#22c55e,#16a34a);
    color:#fff;
    border-color:#16a34a;
    box-shadow:0 12px 28px rgba(34,197,94,.32);
}

body.dark-theme .goal-count-pill.complete{
    background:linear-gradient(135deg,#22c55e,#15803d)!important;
    color:#fff!important;
    border-color:#22c55e!important;
    box-shadow:0 12px 28px rgba(34,197,94,.34);
}
.goal-progress-box{
    margin-top:18px;
    border-radius:22px;
    padding:16px;
    background:rgba(248,250,252,.82);
    border:1px solid var(--line);
    position:relative;
    z-index:2;
}
body.dark-theme .goal-progress-box{
    background:rgba(15,23,42,.34);
    border-color:rgba(255,255,255,.10);
}
.progress-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin-bottom:14px;
}
.progress-head span{
    color:#64748b;
    font-size:12px;
    font-weight:950;
    text-transform:uppercase;
    letter-spacing:.04em;
}
body.dark-theme .progress-head span{color:#b6c4d8}
.goal-track{
    display:flex;
    align-items:stretch;
    gap:10px;
    overflow-x:auto;
    padding-bottom:4px;
}
.goal-tile{
    min-width:160px;
    flex:1;
    border-radius:18px;
    padding:14px 12px;
    text-align:center;
    border:1px solid #fde68a;
    background:#fff9e8;
    position:relative;
}
.goal-tile:not(:last-child)::after{
    content:"";
    position:absolute;
    right:-11px;
    top:50%;
    width:11px;
    height:4px;
    background:linear-gradient(90deg,#20c997,#cbd5e1);
    transform:translateY(-50%);
}
.goal-tile.done{
    background:#eafbF2;
    border-color:#86efac;
}
.goal-icon{
    width:36px;
    height:36px;
    margin:0 auto 9px;
    display:grid;
    place-items:center;
    border-radius:50%;
    background:#f59e0b;
    color:#fff;
    font-weight:950;
    box-shadow:0 10px 20px rgba(245,158,11,.18);
}
.goal-tile.done .goal-icon{
    background:#16a34a;
    box-shadow:0 10px 20px rgba(22,163,74,.18);
}
.goal-tile strong{
    display:block;
    color:var(--text);
    font-size:13px;
    line-height:1.25;
    word-break:break-word;
}
body.dark-theme .goal-tile strong{color:#fff}
.goal-tile small{
    display:block;
    margin-top:8px;
    color:#0f9f50;
    font-weight:950;
}
.detail-list{
    display:grid;
    gap:10px;
    margin-top:14px;
    position:relative;
    z-index:2;
}
.goal-detail-card{
    border-radius:18px;
    padding:14px;
    display:grid;
    grid-template-columns:1.5fr 1fr 1.2fr 1.2fr auto;
    gap:14px;
    align-items:center;
    border-left:5px solid #f59e0b;
}
.goal-detail-card.done{border-left-color:#16a34a}
.detail-title{
    display:flex;
    align-items:center;
    gap:12px;
}
.detail-icon{
    width:38px;
    height:38px;
    min-width:38px;
    display:grid;
    place-items:center;
    border-radius:50%;
    color:#fff;
    background:#f59e0b;
    font-weight:950;
}
.goal-detail-card.done .detail-icon{background:#16a34a}
.detail-title b{
    display:block;
    color:var(--text);
    font-size:15px;
}
body.dark-theme .detail-title b{color:#fff}
.detail-title small,.detail-mini small{
    display:block;
    color:#64748b;
    font-size:12px;
    margin-bottom:4px;
}
body.dark-theme .detail-title small,
body.dark-theme .detail-mini small{color:#b6c4d8}
.detail-mini b{
    color:var(--text);
    font-size:14px;
    word-break:break-word;
}
body.dark-theme .detail-mini b{color:#fff}
.money{color:#0f9f50!important;font-weight:950}
.status-pill{
    justify-self:end;
    padding:9px 14px;
    border-radius:999px;
    font-weight:950;
    font-size:12px;
    white-space:nowrap;
}
.status-pill.success{background:#dcfce7;color:#15803d;border:1px solid #86efac}
.status-pill.pending{background:#fff7db;color:#a16207;border:1px solid #fde68a}
.status-pill.failed{background:#fee2e2;color:#b91c1c;border:1px solid #fecaca}
.summary-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:14px;
    margin-top:14px;
}
.summary-card{
    border-radius:18px;
    padding:18px;
    display:flex;
    align-items:center;
    gap:14px;
}
.summary-icon{
    width:52px;
    height:52px;
    min-width:52px;
    border-radius:50%;
    display:grid;
    place-items:center;
    font-size:25px;
    background:#eaf2ff;
    color:#2563eb;
}
.summary-card:nth-child(2) .summary-icon{background:#dcfce7;color:#16a34a}
.summary-card:nth-child(3) .summary-icon{background:#f3e8ff;color:#7c3aed}
.summary-card:nth-child(4) .summary-icon{background:#ffedd5;color:#ea580c}
.summary-card small{
    display:block;
    color:#64748b;
    font-size:12px;
    font-weight:950;
    text-transform:uppercase;
    margin-bottom:5px;
}
.summary-card b{
    color:var(--text);
    font-size:22px;
}
body.dark-theme .summary-card b{color:#fff}
body.dark-theme .summary-card small{color:#b6c4d8}
.back-btn{
    margin-top:18px;
    height:52px;
    display:grid;
    place-items:center;
    border-radius:16px;
    text-decoration:none;
    color:#fff!important;
    font-weight:950;
    background:linear-gradient(135deg,#2563eb,#06b6d4);
    box-shadow:0 14px 28px rgba(37,99,235,.20);
}
.active-label{
    display:inline-flex;
    align-items:center;
    gap:7px;
    margin-bottom:8px;
    padding:6px 10px;
    border-radius:999px;
    background:#dcfce7;
    border:1px solid #86efac;
    color:#15803d;
    font-size:11px;
    font-weight:950;
    letter-spacing:.07em;
}
body.dark-theme .active-label{
    background:rgba(34,197,94,.16);
    border-color:rgba(34,197,94,.42);
    color:#bbf7d0;
}
.search-panel{
    position:relative;
    overflow:hidden;
}
.search-panel::before{
    content:"";
    position:absolute;
    inset:0 0 auto 0;
    height:4px;
    background:linear-gradient(90deg,#2563eb,#06b6d4,#22c55e);
}
.field select{
    cursor:pointer;
}
.track-submit-btn{
    transition:transform .2s ease,box-shadow .2s ease,filter .2s ease;
}
.track-submit-btn:hover{
    transform:translateY(-2px);
    filter:saturate(1.12);
    box-shadow:0 18px 34px rgba(37,99,235,.30);
}
.goal-progress-box{
    box-shadow:inset 0 1px 0 rgba(255,255,255,.65);
}

@media(max-width:900px){
    .search-panel{grid-template-columns:1fr}
    .track-submit-btn{width:100%}
    .goal-detail-card{grid-template-columns:1fr}
    .status-pill{justify-self:start}
    .summary-grid{grid-template-columns:1fr 1fr}
    .user-top{display:block}
    .goal-count-pill{display:inline-flex;margin-top:12px}
}
@media(max-width:520px){
    .track-wrap{padding:18px 10px 28px}
    .hero-head{align-items:flex-start}
    .hero-icon{width:54px;height:54px;font-size:25px;border-radius:19px}
    .user-status-card{padding:16px;border-radius:22px}
    .summary-grid{grid-template-columns:1fr}
    .goal-tile{min-width:145px}
}

/* Dark theme readability + payout status */
body.dark-theme .hero-head h1,
body.dark-theme .hero-head h1 span,
body.dark-theme .user-title h2,
body.dark-theme .detail-title b,
body.dark-theme .detail-mini b,
body.dark-theme .summary-card b,
body.dark-theme .goal-tile strong{
    color:#ffffff!important;
    -webkit-text-fill-color:initial!important;
}

body.dark-theme .hero-head p,
body.dark-theme .user-title p,
body.dark-theme .progress-head span,
body.dark-theme .detail-title small,
body.dark-theme .detail-mini small,
body.dark-theme .summary-card small{
    color:#cbd5e1!important;
}

body.dark-theme .user-status-card,
body.dark-theme .goal-progress-box,
body.dark-theme .goal-detail-card,
body.dark-theme .summary-card{
    background:linear-gradient(180deg,rgba(255,255,255,.13),rgba(255,255,255,.06))!important;
    border-color:rgba(255,255,255,.16)!important;
}

body.dark-theme .goal-tile{
    background:rgba(250,204,21,.13)!important;
    border-color:rgba(250,204,21,.38)!important;
}

body.dark-theme .goal-tile.done{
    background:rgba(34,197,94,.16)!important;
    border-color:rgba(34,197,94,.45)!important;
}

body.dark-theme .goal-detail-card.pending{
    border-left-color:#f59e0b!important;
}

body.dark-theme .goal-detail-card.done{
    border-left-color:#16a34a!important;
}

body.dark-theme .summary-card:nth-child(2) .summary-icon{
    background:rgba(34,197,94,.24)!important;
    color:#86efac!important;
}

body.dark-theme .goal-count-pill,
body.dark-theme .payout-chip.pending{
    background:rgba(250,204,21,.24)!important;
    border-color:rgba(250,204,21,.62)!important;
    color:#fef3c7!important;
}

body.dark-theme .detail-mini{
    color:#fff!important;
}

.payout-chip{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:30px;
    padding:7px 12px;
    border-radius:999px;
    font-size:11px;
    font-weight:950;
    white-space:nowrap;
    text-transform:uppercase;
}

.payout-chip.success{
    background:#dcfce7;
    color:#15803d;
    border:1px solid #86efac;
}

.payout-chip.pending{
    background:#fff7db;
    color:#a16207;
    border:1px solid #fde68a;
}

.payout-chip.failed{
    background:#fee2e2;
    color:#b91c1c;
    border:1px solid #fecaca;
}

body.dark-theme .payout-chip.success{
    color:#bbf7d0!important;
    background:rgba(34,197,94,.16)!important;
    border-color:rgba(34,197,94,.42)!important;
}

body.dark-theme .payout-chip.pending{
    color:#fef3c7!important;
    background:rgba(250,204,21,.24)!important;
    border-color:rgba(250,204,21,.62)!important;
}

body.dark-theme .payout-chip.failed{
    color:#fecaca!important;
    background:rgba(239,68,68,.16)!important;
    border-color:rgba(239,68,68,.42)!important;
}

@media(max-width:900px){
    .goal-detail-card{
        grid-template-columns:1fr!important;
    }
}


/* ===== Premium JavaScript Effects ===== */
body{overflow-x:hidden}
.track-shell{animation:pageEnter .75s cubic-bezier(.2,.8,.2,1) both}
.hero-icon{animation:heroFloat 3.6s ease-in-out infinite}
.active-label{position:relative;overflow:hidden}
.active-label::after{
    content:"";
    position:absolute;inset:0;
    background:linear-gradient(90deg,transparent,rgba(255,255,255,.55),transparent);
    transform:translateX(-120%);
    animation:labelShine 3.5s ease-in-out infinite;
}
.search-panel,.user-status-card,.summary-card,.goal-detail-card{
    transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}
.track-submit-btn,.back-btn{
    position:relative;
    overflow:hidden;
}
.track-submit-btn::before,.back-btn::before{
    content:"";
    position:absolute;
    top:-30%;left:-35%;
    width:28%;height:160%;
    transform:skewX(-22deg);
    background:linear-gradient(90deg,transparent,rgba(255,255,255,.78),transparent);
    animation:buttonShine 3.2s ease-in-out infinite;
    pointer-events:none;
}
.premium-progress{
    height:12px;
    margin:-2px 0 16px;
    border-radius:999px;
    overflow:hidden;
    background:rgba(148,163,184,.20);
    box-shadow:inset 0 2px 5px rgba(15,23,42,.15);
}
.premium-progress-fill{
    width:0;
    height:100%;
    border-radius:inherit;
    background:linear-gradient(90deg,#2563eb,#06b6d4,#22c55e);
    box-shadow:0 0 20px rgba(34,197,94,.35);
    transition:width 1.25s cubic-bezier(.2,.8,.2,1);
    position:relative;
    overflow:hidden;
}
.premium-progress-fill::after{
    content:"";
    position:absolute;inset:0;
    background:linear-gradient(90deg,transparent,rgba(255,255,255,.55),transparent);
    animation:progressShine 2.2s linear infinite;
}
.goal-tile{
    opacity:0;
    transform:translateY(16px) scale(.98);
}
.goal-tile.reveal{
    opacity:1;
    transform:none;
    transition:opacity .5s ease,transform .5s cubic-bezier(.2,.8,.2,1);
}
.goal-tile.done .goal-icon{animation:successPulse 2.4s ease-in-out infinite}
.goal-tile.pending .goal-icon{animation:pendingPulse 2.1s ease-in-out infinite}
.goal-tile.locked{background:#f1f5f9;border-color:#cbd5e1;opacity:.78}
.goal-tile.locked .goal-icon{background:#64748b;box-shadow:none}
.goal-tile.locked small{color:#64748b}
.goal-detail-card.locked{border-left-color:#64748b}
.goal-detail-card.locked .detail-icon{background:#64748b}
.status-pill.locked,.payout-chip.locked{background:#f1f5f9;color:#475569;border:1px solid #cbd5e1}
body.dark-theme .goal-tile.locked{background:rgba(100,116,139,.18)!important;border-color:rgba(148,163,184,.30)!important}
body.dark-theme .goal-detail-card.locked{border-left-color:#94a3b8!important}
body.dark-theme .payout-chip.locked{background:rgba(100,116,139,.22)!important;color:#e2e8f0!important;border-color:rgba(148,163,184,.38)!important}
.goal-detail-card{
    opacity:0;
    transform:translateY(14px);
}
.goal-detail-card.reveal{
    opacity:1;
    transform:none;
    transition:opacity .5s ease,transform .5s ease;
}
.summary-card{
    opacity:0;
    transform:translateY(18px);
}
.summary-card.reveal{
    opacity:1;
    transform:none;
    transition:opacity .55s ease,transform .55s ease;
}
.live-particle{
    position:fixed;
    z-index:1;
    bottom:-60px;
    pointer-events:none;
    opacity:0;
    filter:drop-shadow(0 8px 14px rgba(0,0,0,.20));
    animation:particleFloat linear forwards;
}
.ripple-dot{
    position:absolute;
    border-radius:50%;
    transform:scale(0);
    background:rgba(255,255,255,.48);
    animation:rippleWave .65s linear;
    pointer-events:none;
}
.live-toast{
    position:fixed;
    left:50%;bottom:24px;
    transform:translate(-50%,20px);
    z-index:100000;
    min-width:240px;
    max-width:calc(100vw - 28px);
    padding:13px 18px;
    border-radius:16px;
    color:#fff;
    text-align:center;
    font-weight:900;
    background:linear-gradient(135deg,#2563eb,#06b6d4,#22c55e);
    box-shadow:0 18px 45px rgba(0,0,0,.28);
    opacity:0;
    transition:.25s ease;
}
.live-toast.show{opacity:1;transform:translate(-50%,0)}
.goal-count-pill.complete{animation:completeGlow 2.2s ease-in-out infinite}
.user-avatar{animation:avatarFloat 3s ease-in-out infinite}
@keyframes pageEnter{from{opacity:0;transform:translateY(24px) scale(.99)}to{opacity:1;transform:none}}
@keyframes heroFloat{0%,100%{transform:translateY(0) rotate(0)}50%{transform:translateY(-6px) rotate(2deg)}}
@keyframes avatarFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-4px)}}
@keyframes labelShine{0%,60%{transform:translateX(-120%)}100%{transform:translateX(120%)}}
@keyframes buttonShine{0%,55%{left:-35%}80%,100%{left:120%}}
@keyframes progressShine{from{transform:translateX(-100%)}to{transform:translateX(100%)}}
@keyframes successPulse{0%,100%{transform:scale(1)}50%{transform:scale(1.10);box-shadow:0 0 0 8px rgba(34,197,94,.10)}}
@keyframes pendingPulse{0%,100%{transform:scale(1)}50%{transform:scale(1.08);box-shadow:0 0 0 8px rgba(245,158,11,.10)}}
@keyframes completeGlow{0%,100%{box-shadow:0 12px 28px rgba(34,197,94,.32)}50%{box-shadow:0 12px 34px rgba(34,197,94,.58)}}
@keyframes particleFloat{
    0%{opacity:0;transform:translateY(0) rotate(0deg) scale(.8)}
    12%{opacity:.9}
    100%{opacity:0;transform:translateY(-115vh) rotate(420deg) scale(1.15)}
}
@keyframes rippleWave{to{transform:scale(4);opacity:0}}
@media(prefers-reduced-motion:reduce){
    *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important}
}
