@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --gold:         #D4AF37;
    --gold-light:   #F5C842;
    --gold-dark:    #A8870C;
    --gold-glow:    rgba(212,175,55,0.25);
    --gold-border:  rgba(212,175,55,0.35);
    --dark-bg:      #0A0A0A;
    --dark-card:    #111111;
    --dark-card2:   #181818;
    --dark-border:  #222222;
    --dark-input:   #141414;
    --text-white:   #FFFFFF;
    --text-light:   #E0E0E0;
    --text-muted:   #888888;
    --text-dim:     #555555;
    --green:        #22C55E;
    --green-dim:    rgba(34,197,94,0.15);
    --red:          #EF4444;
    --nav-height:   70px;
    --radius:       14px;
    --radius-sm:    8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    background: var(--dark-bg);
    color: var(--text-light);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ─── SCROLLBAR ───────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--dark-bg); }
::-webkit-scrollbar-thumb { background: var(--gold-dark); border-radius: 2px; }

/* ─── LAYOUT ──────────────────────────────── */
.app-wrapper {
    max-width: 430px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    background: var(--dark-bg);
    padding-bottom: calc(var(--nav-height) + 10px);
}

.page-content { padding: 16px; }

/* ─── TOP BAR ─────────────────────────────── */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 10px;
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--dark-bg);
}
.top-bar .dgra-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}
.top-bar .dgra-logo img { height: 36px; }
.top-bar .logo-text {
    font-family: 'Cinzel', serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 1px;
    line-height: 1;
}
.top-bar .logo-sub {
    font-size: 8px;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.top-bar .back-btn {
    color: var(--gold);
    font-size: 20px;
    text-decoration: none;
    padding: 4px 8px;
}
.top-bar .page-title {
    font-family: 'Cinzel', serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--gold);
    letter-spacing: 1px;
    text-transform: uppercase;
}
.notif-btn {
    position: relative;
    color: var(--text-light);
    font-size: 20px;
    text-decoration: none;
    padding: 4px;
}
.notif-btn .dot {
    position: absolute;
    top: 4px; right: 4px;
    width: 8px; height: 8px;
    background: var(--gold);
    border-radius: 50%;
    border: 1.5px solid var(--dark-bg);
}

/* ─── BOTTOM NAV ──────────────────────────── */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    height: var(--nav-height);
    background: #0E0E0E;
    border-top: 1px solid var(--dark-border);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 200;
    padding: 0 4px;
}
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    text-decoration: none;
    color: var(--text-dim);
    font-size: 10px;
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    transition: color 0.2s;
    min-width: 48px;
}
.nav-item i { font-size: 18px; }
.nav-item.active { color: var(--gold); }
.nav-item span { font-size: 10px; font-weight: 500; }

/* SCAN button (centre) */
.nav-scan {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    text-decoration: none;
    color: var(--dark-bg);
    font-size: 10px;
    margin-top: -20px;
}
.nav-scan .scan-ring {
    width: 54px; height: 54px;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 0 20px var(--gold-glow), 0 4px 16px rgba(0,0,0,0.4);
    border: 3px solid var(--dark-bg);
}
.nav-scan span { color: var(--text-dim); font-size: 10px; }
.nav-scan.active .scan-ring { box-shadow: 0 0 30px var(--gold-glow); }
.nav-scan.active span { color: var(--gold); }

/* ─── CARDS ───────────────────────────────── */
.dgra-card {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
}
.dgra-card.gold-border {
    border-color: var(--gold-border);
}
.dgra-card.gold-glow {
    box-shadow: 0 0 20px var(--gold-glow);
}

/* ─── GOLD BUTTONS ────────────────────────── */
.btn-gold {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #C8960C, var(--gold-light) 60%, #C8960C);
    color: #000;
    font-weight: 700;
    font-size: 14px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: opacity 0.2s, box-shadow 0.2s;
    letter-spacing: 0.3px;
}
.btn-gold:hover { opacity: 0.9; box-shadow: 0 4px 20px var(--gold-glow); color: #000; }

.btn-outline-gold {
    width: 100%;
    padding: 12px;
    background: transparent;
    color: var(--gold);
    font-weight: 600;
    font-size: 13px;
    border: 1px solid var(--gold-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    transition: background 0.2s;
}
.btn-outline-gold:hover { background: var(--gold-glow); color: var(--gold); }

.btn-outline-light {
    padding: 10px 14px;
    background: transparent;
    color: var(--text-light);
    font-weight: 500;
    font-size: 12px;
    border: 1px solid #333;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    transition: background 0.2s;
    white-space: nowrap;
}
.btn-outline-light:hover { background: #1e1e1e; color: var(--text-light); }

.btn-outline-green {
    padding: 10px 14px;
    background: transparent;
    color: var(--green);
    font-weight: 600;
    font-size: 12px;
    border: 1px solid rgba(34,197,94,0.4);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    transition: background 0.2s;
    white-space: nowrap;
}
.btn-outline-green:hover { background: var(--green-dim); color: var(--green); }

/* Compact vault action buttons row */
.vault-actions { display: flex; gap: 8px; margin-top: 12px; }
.vault-actions .btn-outline-light { flex: 1; }

/* ─── TYPOGRAPHY ──────────────────────────── */
.text-gold { color: var(--gold) !important; }
.text-gold-light { color: var(--gold-light) !important; }
.text-green { color: var(--green) !important; }
.text-red { color: var(--red) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-white { color: #fff !important; }

.label-xs {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 600;
}
.val-lg {
    font-size: 26px;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: -0.5px;
    line-height: 1.1;
}
.val-md {
    font-size: 18px;
    font-weight: 700;
    color: var(--gold);
}
.val-sm {
    font-size: 13px;
    color: var(--text-muted);
}
.section-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 12px;
}
.page-heading {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 2px;
}
.page-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* ─── GREETING ────────────────────────────── */
.greeting { padding: 8px 16px 0; }
.greeting .hello { font-size: 13px; color: var(--text-muted); }
.greeting .name  { font-size: 22px; font-weight: 700; color: var(--gold); }

/* ─── QUICK BUTTONS (top 3) ───────────────── */
.quick-btns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 16px;
}
.quick-btn {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius);
    padding: 16px 8px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-light);
    font-size: 12px;
    font-weight: 500;
    transition: border-color 0.2s, background 0.2s;
    cursor: pointer;
}
.quick-btn:hover { border-color: var(--gold-border); background: var(--dark-card2); color: var(--text-light); }
.quick-btn i { font-size: 24px; color: var(--gold); }

/* ─── BALANCE RING ────────────────────────── */
.balance-ring-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 16px 16px;
}
.balance-ring {
    position: relative;
    width: 210px;
    height: 210px;
}
.balance-ring svg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    transform: rotate(-90deg);
}
.ring-track { fill: none; stroke: #222; stroke-width: 12; }
.ring-fill {
    fill: none;
    stroke: url(#goldGrad);
    stroke-width: 12;
    stroke-linecap: round;
    stroke-dasharray: 580;
    stroke-dashoffset: 145;
    filter: drop-shadow(0 0 8px rgba(212,175,55,0.5));
}
.ring-center {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}
.ring-center .label { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.ring-center .amount {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -1px;
    line-height: 1;
}
.ring-center .currency { font-size: 13px; color: var(--gold); font-weight: 600; margin-top: 4px; }

/* GRA Lite progress */
.gra-progress { padding: 0 16px 8px; }
.gra-progress .gra-label { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.gra-progress .gra-val { font-size: 15px; font-weight: 700; color: var(--gold); margin-bottom: 6px; }
.progress-bar-wrap {
    background: #1e1e1e;
    border-radius: 4px;
    height: 6px;
    overflow: hidden;
    margin-bottom: 6px;
}
.progress-bar-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold-light));
}
.gra-ready {
    font-size: 11px;
    color: var(--green);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ─── SHORTCUT GRID ───────────────────────── */
.shortcut-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius);
    overflow: hidden;
    margin: 0 16px 16px;
    background: var(--dark-card);
}
.shortcut-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 8px;
    text-decoration: none;
    color: var(--text-light);
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    border-right: 1px solid var(--dark-border);
    border-bottom: 1px solid var(--dark-border);
    transition: background 0.2s;
}
.shortcut-item:nth-child(3n) { border-right: none; }
.shortcut-item:nth-last-child(-n+3) { border-bottom: none; }
.shortcut-item:hover { background: var(--dark-card2); }
.shortcut-item i { font-size: 22px; color: var(--gold); }
.shortcut-item.highlight i { color: var(--gold-light); }
.shortcut-item.highlight span { color: var(--gold); }

/* ─── DASHBOARD CARDS ─────────────────────── */
.balance-card {
    background: var(--dark-card);
    border: 1px solid var(--gold-border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
}
.balance-card::before {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 120px; height: 120px;
    background: radial-gradient(circle, var(--gold-glow), transparent 70%);
    pointer-events: none;
}
.balance-card .card-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
}
.balance-card .card-icon {
    width: 44px; height: 44px;
    background: var(--dark-card2);
    border: 1px solid var(--gold-border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--gold);
}
.balance-card .medal-icon {
    width: 44px; height: 44px;
}
.vault-card {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
}
.vault-card .vh-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.vault-card .vault-icon {
    width: 38px; height: 38px;
    background: var(--dark-card2);
    border: 1px solid var(--gold-border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--gold);
    flex-shrink: 0;
}
.vault-card .vault-title { font-size: 13px; font-weight: 700; color: var(--gold); }
.vault-card .vault-sub   { font-size: 11px; color: var(--text-muted); }
.vault-card .vault-bal   { font-size: 20px; font-weight: 700; color: var(--text-white); }
.vault-card .vault-bal-xaum { font-size: 12px; color: var(--text-muted); }

/* ─── REBATE CARD ─────────────────────────── */
.rebate-cols {
    display: grid;
    grid-template-columns: 1fr 1px 1fr;
    gap: 0;
    margin: 10px 0;
}
.rebate-col { padding: 4px 8px; }
.rebate-col:first-child { padding-left: 0; }
.rebate-divider { background: var(--dark-border); }

/* ─── PLAN TOGGLE ─────────────────────────── */
.plan-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: var(--dark-card2);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-sm);
    padding: 4px;
    margin-bottom: 16px;
}
.plan-btn {
    padding: 10px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.plan-btn.active {
    background: linear-gradient(135deg, #C8960C, var(--gold-light));
    color: #000;
}

/* ─── INPUTS ──────────────────────────────── */
.dgra-input-wrap {
    background: var(--dark-input);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-bottom: 8px;
    transition: border-color 0.2s;
}
.dgra-input-wrap:focus-within { border-color: var(--gold-border); }
.dgra-input-wrap label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 4px;
}
.dgra-input-wrap input, .dgra-input-wrap select {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-white);
    font-size: 18px;
    font-weight: 700;
    width: 100%;
    font-family: 'Inter', sans-serif;
}
.dgra-input-wrap .input-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.dgra-input-wrap .input-suffix {
    color: var(--gold);
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.max-btn {
    background: var(--gold-glow);
    color: var(--gold);
    border: 1px solid var(--gold-border);
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}
.hint-text { font-size: 11px; color: var(--text-dim); margin-top: 4px; }

/* ─── SUMMARY ROWS ────────────────────────── */
.summary-box {
    background: var(--dark-card2);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-bottom: 12px;
}
.summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 0;
    border-bottom: 1px solid #1a1a1a;
    font-size: 13px;
}
.summary-row:last-child { border-bottom: none; }
.summary-row .s-label { color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.summary-row .s-val { font-weight: 600; color: var(--text-white); }
.summary-row .s-val.gold { color: var(--gold); }
.summary-row .s-val.green { color: var(--green); }

/* ─── INFO / WARNING BOXES ────────────────── */
.info-box {
    background: rgba(212,175,55,0.07);
    border: 1px solid rgba(212,175,55,0.2);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-bottom: 12px;
}
.info-box i { color: var(--gold); flex-shrink: 0; margin-top: 1px; }
.warn-box {
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.2);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-size: 12px;
    color: #f87171;
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-bottom: 12px;
}
.warn-box i { color: var(--red); flex-shrink: 0; }

/* ─── PAYMENT METHOD ──────────────────────── */
.pay-method-card {
    background: var(--dark-card2);
    border: 1px solid var(--gold-border);
    border-radius: var(--radius-sm);
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.pay-method-card .pm-icon {
    width: 36px; height: 36px;
    background: var(--dark-card);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--gold);
    flex-shrink: 0;
}
.pay-method-card .pm-info { flex: 1; }
.pay-method-card .pm-name { font-size: 13px; font-weight: 600; color: var(--text-white); }
.pay-method-card .pm-addr { font-size: 11px; color: var(--text-muted); font-family: monospace; }
.pay-method-card .pm-connected {
    font-size: 10px; color: var(--green);
    background: var(--green-dim);
    padding: 2px 8px; border-radius: 20px;
    font-weight: 600;
}
.pay-method-card .pm-bal { font-size: 12px; color: var(--gold); font-weight: 600; text-align: right; }

/* ─── BADGES ──────────────────────────────── */
.badge-active  { background: rgba(34,197,94,0.15); color: var(--green); padding: 2px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.badge-done    { background: rgba(100,100,100,0.2); color: #aaa; padding: 2px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.badge-dgra    { background: rgba(212,175,55,0.15); color: var(--gold); padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 700; }
.badge-gralite { background: rgba(34,197,94,0.1); color: var(--green); padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 700; border: 1px solid rgba(34,197,94,0.3); }

/* ─── PORTFOLIO HOLDING CARD ──────────────── */
.holding-card {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 10px;
}
.holding-card .hc-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.holding-card .hc-id { display: flex; align-items: center; gap: 8px; }
.holding-card .hc-id-badge {
    background: var(--gold);
    color: #000;
    padding: 2px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    font-family: 'Cinzel', serif;
}
.holding-card .hc-days {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}
.holding-card .hc-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.holding-card .hc-left .hc-amount { font-size: 16px; font-weight: 700; color: var(--gold); }
.holding-card .hc-right {
    background: var(--dark-card2);
    border: 1px solid var(--dark-border);
    border-radius: 8px;
    padding: 10px;
}
.holding-card .hc-right .plan-name { font-size: 12px; font-weight: 700; color: var(--text-white); margin-bottom: 4px; }
.holding-card .hc-right .rebate-val { font-size: 18px; font-weight: 800; color: var(--gold); }
.holding-card .hc-right .rebate-sub { font-size: 10px; color: var(--text-muted); }
.holding-card .hc-detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    padding: 3px 0;
}
.holding-card .hc-detail-row span:last-child { color: var(--text-light); }
.holding-card .progress-wrap { margin: 10px 0 6px; }
.holding-card .progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.holding-card .view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    border-top: 1px solid var(--dark-border);
    margin-top: 12px;
    color: var(--gold);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

/* ─── TABS ────────────────────────────────── */
.dgra-tabs {
    display: flex;
    background: var(--dark-card2);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-sm);
    padding: 4px;
    margin-bottom: 16px;
    gap: 4px;
}
.dgra-tab {
    flex: 1;
    padding: 9px;
    text-align: center;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border: none;
    background: transparent;
    transition: all 0.2s;
    text-decoration: none;
}
.dgra-tab.active {
    background: linear-gradient(135deg, #C8960C, var(--gold-light));
    color: #000;
}

/* ─── SUCCESS SCREEN ──────────────────────── */
.success-screen {
    text-align: center;
    padding: 40px 16px 20px;
}
.success-icon {
    width: 80px; height: 80px;
    background: rgba(34,197,94,0.1);
    border: 2px solid var(--green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: var(--green);
    margin: 0 auto 20px;
    animation: pulse 1s ease;
}
@keyframes pulse {
    0% { transform: scale(0.8); opacity: 0; }
    60% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}
.success-title { font-size: 20px; font-weight: 800; color: var(--green); margin-bottom: 6px; }
.success-sub { font-size: 13px; color: var(--text-muted); }

/* ─── REFERRAL ────────────────────────────── */
.ref-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.ref-avatar {
    width: 52px; height: 52px;
    background: var(--dark-card2);
    border: 2px solid var(--gold-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
    color: var(--gold);
    font-family: 'Cinzel', serif;
}
.ref-link-row {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}
.ref-link-input {
    flex: 1;
    background: var(--dark-input);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    color: var(--text-muted);
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: flex;
    align-items: center;
}
.ref-share-btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}
.ref-share-btn {
    background: var(--dark-card2);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-sm);
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
    cursor: pointer;
    text-decoration: none;
}
.network-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--dark-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 12px;
}
.network-stat {
    background: var(--dark-card2);
    padding: 12px 8px;
    text-align: center;
}
.network-stat .ns-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); }
.network-stat .ns-val   { font-size: 20px; font-weight: 800; color: var(--gold); margin: 2px 0; }
.network-stat .ns-sub   { font-size: 10px; color: var(--text-dim); }

/* ─── MERCHANT LIST ───────────────────────── */
.merchant-card {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 10px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.merchant-logo {
    width: 54px; height: 54px;
    background: var(--dark-card2);
    border: 1px solid var(--dark-border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--gold);
    font-family: 'Cinzel', serif;
    font-weight: 800;
    flex-shrink: 0;
}
.merchant-info { flex: 1; }
.merchant-name { font-size: 14px; font-weight: 700; color: var(--text-white); }
.merchant-loc  { font-size: 11px; color: var(--text-muted); margin: 2px 0 8px; }
.gold-prices {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 8px;
}
.gold-price-item .gp-label { font-size: 10px; color: var(--gold); text-transform: uppercase; }
.gold-price-item .gp-val   { font-size: 14px; font-weight: 700; color: var(--text-white); }
.gold-price-item .gp-xaum  { font-size: 10px; color: var(--text-muted); }
.item-badges { display: flex; gap: 6px; }
.item-badge {
    font-size: 10px;
    display: flex;
    align-items: center;
    gap: 3px;
    color: var(--text-muted);
}
.item-badge .check-y { color: var(--green); }
.item-badge .check-n { color: var(--red); }

/* ─── ACCOUNT PAGE ────────────────────────── */
.profile-completion {
    margin-bottom: 12px;
}
.completion-steps {
    display: flex;
    gap: 4px;
    margin-top: 8px;
}
.step-dot {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: var(--dark-border);
}
.step-dot.done { background: var(--gold); }
.step-dot.partial { background: var(--gold-dark); }
.menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--dark-border);
    text-decoration: none;
    cursor: pointer;
}
.menu-item:last-child { border-bottom: none; }
.menu-item .mi-left { display: flex; align-items: center; gap: 12px; }
.menu-item .mi-icon {
    width: 36px; height: 36px;
    background: var(--dark-card2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--gold);
}
.menu-item .mi-title { font-size: 14px; font-weight: 600; color: var(--text-white); }
.menu-item .mi-sub   { font-size: 11px; color: var(--text-muted); }
.menu-item .mi-right { color: var(--text-dim); display: flex; align-items: center; gap: 6px; }
.menu-item .req-badge {
    font-size: 10px;
    color: var(--gold);
    background: rgba(212,175,55,0.1);
    padding: 2px 8px;
    border-radius: 20px;
}

/* ─── SECURITY ITEMS ──────────────────────── */
.security-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #1a1a1a;
}
.security-item:last-child { border-bottom: none; }
.security-item .si-left { display: flex; align-items: center; gap: 10px; }
.security-item .si-icon { color: var(--gold); font-size: 18px; }
.security-item .si-title { font-size: 13px; font-weight: 600; color: var(--text-white); }
.security-item .si-sub   { font-size: 11px; color: var(--text-muted); }
.enabled-badge { font-size: 11px; color: var(--green); font-weight: 600; }
.setup-badge   { font-size: 11px; color: var(--gold); font-weight: 600; }

/* ─── WALLET CONNECT PAGE ─────────────────── */
.connect-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(212,175,55,0.12) 0%, transparent 60%),
        var(--dark-bg);
}
.connect-hero {
    padding: 50px 24px 30px;
    text-align: center;
}
.connect-logo { margin-bottom: 30px; }
.connect-logo img { height: 60px; }
.connect-title { font-size: 28px; font-weight: 800; color: var(--text-white); line-height: 1.2; }
.connect-title .gold { color: var(--gold); }
.connect-sub { font-size: 14px; color: var(--text-muted); margin-top: 8px; }
.wallet-option {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: border-color 0.2s;
    text-decoration: none;
}
.wallet-option:hover { border-color: var(--gold-border); }
.wallet-option .wo-icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}
.wallet-option .wo-name  { font-size: 14px; font-weight: 700; color: var(--text-white); }
.wallet-option .wo-sub   { font-size: 11px; color: var(--text-muted); }
.wallet-option .wo-arrow { margin-left: auto; color: var(--gold); }
.trust-note {
    text-align: center;
    font-size: 11px;
    color: var(--text-dim);
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* ─── FILTER ROW ──────────────────────────── */
.filter-row {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}
.filter-btn {
    background: var(--dark-card2);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.filter-btn.active { background: var(--gold-glow); border-color: var(--gold-border); color: var(--gold); }

/* ─── SCAN PAGE ───────────────────────────── */
.scan-viewfinder {
    background: #000;
    border-radius: var(--radius);
    height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 12px;
    overflow: hidden;
}
.scan-corners::before, .scan-corners::after,
.scan-corners > span::before, .scan-corners > span::after {
    content: '';
    position: absolute;
    width: 24px; height: 24px;
    border-color: var(--gold);
    border-style: solid;
}
.scan-corners::before  { top: 20px; left: 20px; border-width: 3px 0 0 3px; }
.scan-corners::after   { top: 20px; right: 20px; border-width: 3px 3px 0 0; }
.scan-corners > span::before { bottom: 20px; left: 20px; border-width: 0 0 3px 3px; }
.scan-corners > span::after  { bottom: 20px; right: 20px; border-width: 0 3px 3px 0; }

/* ─── TREE VIEW ───────────────────────────── */
.tree-node {
    padding: 8px 0 8px 12px;
    border-left: 1px solid var(--dark-border);
    margin-left: 8px;
}
.tree-node-self {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
}
.tree-node-self .tn-name { font-size: 13px; font-weight: 600; color: var(--text-white); }
.tree-node-self .tn-lvl  {
    background: var(--dark-card2);
    border: 1px solid var(--dark-border);
    border-radius: 4px;
    padding: 1px 7px;
    font-size: 10px;
    color: var(--text-muted);
}
.tree-node-self .tn-xaum { font-size: 12px; color: var(--gold); margin-left: auto; }
.tree-toggle { color: var(--gold); font-size: 14px; cursor: pointer; }

/* ─── UTILITY ─────────────────────────────── */
.divider { height: 1px; background: var(--dark-border); margin: 12px 0; }
.spacer  { height: 16px; }
.text-right { text-align: right; }
.fw-700 { font-weight: 700; }
.fs-11  { font-size: 11px; }
.fs-12  { font-size: 12px; }
.fs-13  { font-size: 13px; }
.fs-14  { font-size: 14px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-center  { display: flex; align-items: center; }
.gap-6  { gap: 6px; }
.gap-8  { gap: 8px; }
.gap-10 { gap: 10px; }
.mb-4   { margin-bottom: 4px; }
.mb-8   { margin-bottom: 8px; }
.mb-12  { margin-bottom: 12px; }
.mb-16  { margin-bottom: 16px; }
.mt-8   { margin-top: 8px; }
.mt-12  { margin-top: 12px; }

/* ─── RESPONSIVE ──────────────────────────── */
@media (max-width: 430px) {
    .app-wrapper { max-width: 100%; }
    .bottom-nav  { max-width: 100%; }
}

/* ─── ANIMATIONS ──────────────────────────── */
.fade-in {
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}


/* ============================================================
   DGRA — Live Balance Flash Animation
   Add to assets/css/dgra.css
   ============================================================
   Briefly highlights the balance number when it changes, so a
   live deposit/withdrawal is visually obvious (e.g. for demo
   recordings) without a jarring page reload.
   ============================================================ */

@keyframes dgra-balance-flash {
    0%   { color: #4ade80; text-shadow: 0 0 12px rgba(74, 222, 128, 0.8); transform: scale(1.08); }
    100% { color: inherit; text-shadow: none; transform: scale(1); }
}

.dgra-balance-flash {
    animation: dgra-balance-flash 1.2s ease-out;
    display: inline-block;
}
