/* =========================================================
   RK DREAM CASH FLOW — client app styles
   ========================================================= */

:root {
    --bg: #05080d;
    --bg-2: #0a111a;
    --panel: #0e1a27;
    --panel-2: #101f2e;
    --line: rgba(212, 164, 55, 0.18);
    --line-soft: rgba(255, 255, 255, 0.07);
    --gold: #d9a93a;
    --gold-2: #f6d78b;
    --gold-3: #b07d18;
    --text: #e9eef5;
    --muted: #8b9cb1;
    --green: #33d17a;
    --red: #ff6b6b;
    --radius: 16px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body.app-body {
    font-family: "Segoe UI", system-ui, -apple-system, "Noto Sans", Arial, sans-serif;
    background:
        radial-gradient(900px 480px at 50% -140px, rgba(217, 169, 58, 0.16), transparent 70%),
        radial-gradient(600px 400px at 100% 100%, rgba(30, 63, 102, 0.28), transparent 70%),
        var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--gold-2); text-decoration: none; }
img { max-width: 100%; display: block; }

.app-shell {
    max-width: 460px;
    margin: 0 auto;
    min-height: 100vh;
    background: linear-gradient(180deg, rgba(9, 15, 23, 0.94), rgba(5, 8, 13, 0.98));
    position: relative;
    padding-bottom: 84px;
    border-left: 1px solid rgba(255, 255, 255, 0.04);
    border-right: 1px solid rgba(255, 255, 255, 0.04);
    overflow-x: hidden;
}

/* ---------------- Top bar ---------------- */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px 12px;
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(6, 10, 16, 0.86);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line-soft);
}

.brand img { height: 38px; width: auto; }

.topbar-inner { padding-top: 12px; }

.topbar-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    flex: 1;
    letter-spacing: 0.2px;
}

.icon-btn {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid var(--line-soft);
    background: rgba(16, 31, 46, 0.7);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    cursor: pointer;
}

.icon-btn:hover { border-color: var(--line); color: var(--gold-2); }

.bell-dot {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    background: var(--gold);
    color: #16110a;
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ---------------- Layout ---------------- */
.content { padding: 16px 18px 24px; }

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 22px 2px 10px;
}

.section-head h2 {
    font-size: 14px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0;
    font-weight: 600;
}

.section-head a { font-size: 12px; color: var(--gold); }

/* ---------------- Greeting ---------------- */
.greet {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.greet-text small { color: var(--muted); font-size: 12px; }
.greet-text strong { display: block; font-size: 18px; margin-top: 2px; }

.avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(140deg, var(--gold-2), var(--gold-3));
    color: #171207;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex: 0 0 auto;
    font-size: 15px;
}

.avatar.lg { width: 64px; height: 64px; font-size: 20px; }

/* ---------------- Balance card ---------------- */
.balance-card {
    position: relative;
    border-radius: 20px;
    padding: 18px;
    background:
        radial-gradient(300px 160px at 100% 0%, rgba(217, 169, 58, 0.2), transparent 65%),
        linear-gradient(150deg, #16273a, #0b141e);
    border: 1px solid rgba(217, 169, 58, 0.34);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
    overflow: hidden;
}

.balance-card::after {
    content: "";
    position: absolute;
    inset: auto -40px -70px auto;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 1px solid rgba(217, 169, 58, 0.16);
}

.balance-head {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gold-2);
    font-size: 12px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.balance-head .icon { color: var(--gold); }

.balance-amount {
    font-size: 34px;
    font-weight: 700;
    letter-spacing: 0.4px;
    margin: 6px 0 2px;
    color: #fff5dd;
    text-shadow: 0 2px 18px rgba(217, 169, 58, 0.28);
}

.balance-inr { font-size: 13px; color: var(--muted); }
.balance-inr strong { color: var(--gold-2); font-weight: 600; }

.mini-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 16px;
}

.mini-stat {
    background: rgba(6, 11, 17, 0.55);
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    padding: 10px 12px;
}

.mini-stat span { display: block; font-size: 11px; color: var(--muted); }
.mini-stat strong { display: block; font-size: 16px; margin-top: 3px; color: var(--text); }
.mini-stat strong.gold { color: var(--gold-2); }

/* ---------------- Quick actions ---------------- */
.action-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 16px;
}

.action {
    background: linear-gradient(160deg, rgba(18, 33, 48, 0.95), rgba(10, 18, 27, 0.95));
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    padding: 12px 6px 10px;
    text-align: center;
    color: var(--text);
    font-size: 11.5px;
    line-height: 1.35;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.action:hover { border-color: var(--line); transform: translateY(-1px); }

.action .a-ico {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(217, 169, 58, 0.1);
    border: 1px solid rgba(217, 169, 58, 0.28);
    color: var(--gold-2);
}

.action small { color: var(--green); font-size: 10px; }

/* ---------------- Cards & rows ---------------- */
.card {
    background: linear-gradient(165deg, rgba(16, 29, 43, 0.95), rgba(9, 15, 22, 0.95));
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
}

.card-title {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.4px;
    margin: 0 0 10px;
    color: var(--text);
}

.card p { color: var(--muted); font-size: 13px; line-height: 1.6; margin: 6px 0; }

.tx-list { display: flex; flex-direction: column; }

.tx-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px dashed var(--line-soft);
}

.tx-row:last-child { border-bottom: 0; padding-bottom: 2px; }
.tx-row:first-child { padding-top: 2px; }

.tx-ico {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: rgba(51, 209, 122, 0.12);
    color: var(--green);
}

.tx-ico.out { background: rgba(255, 107, 107, 0.12); color: var(--red); }
.tx-ico.gold { background: rgba(217, 169, 58, 0.12); color: var(--gold-2); }
.tx-ico.muted { background: rgba(139, 156, 177, 0.12); color: var(--muted); }

.tx-body { flex: 1; min-width: 0; }
.tx-body strong { display: block; font-size: 13.5px; font-weight: 600; }
.tx-body span { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }

.tx-amt { text-align: right; flex: 0 0 auto; }
.tx-amt strong { display: block; font-size: 14px; }
.tx-amt strong.in { color: var(--green); }
.tx-amt strong.out { color: var(--red); }
.tx-amt span { display: block; font-size: 10.5px; color: var(--muted); margin-top: 2px; }

/* ---------------- Badges / alerts ---------------- */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    border: 1px solid transparent;
    vertical-align: middle;
}

.badge-success { background: rgba(51, 209, 122, 0.12); color: var(--green); border-color: rgba(51, 209, 122, 0.35); }
.badge-warning { background: rgba(217, 169, 58, 0.14); color: var(--gold-2); border-color: rgba(217, 169, 58, 0.4); }
.badge-danger  { background: rgba(255, 107, 107, 0.12); color: var(--red); border-color: rgba(255, 107, 107, 0.35); }
.badge-muted   { background: rgba(139, 156, 177, 0.12); color: var(--muted); border-color: rgba(139, 156, 177, 0.3); }

.alert {
    border-radius: 12px;
    padding: 11px 14px;
    font-size: 12.5px;
    margin-bottom: 14px;
    border: 1px solid;
    line-height: 1.5;
}

.alert-success { background: rgba(51, 209, 122, 0.1); border-color: rgba(51, 209, 122, 0.3); color: #a9f0c6; }
.alert-danger  { background: rgba(255, 107, 107, 0.1); border-color: rgba(255, 107, 107, 0.3); color: #ffc0c0; }
.alert-info    { background: rgba(217, 169, 58, 0.1); border-color: rgba(217, 169, 58, 0.3); color: #f1dca8; }

/* ---------------- Forms ---------------- */
.field { margin-bottom: 14px; }

.field label {
    display: block;
    font-size: 11.5px;
    color: var(--muted);
    letter-spacing: 0.4px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--line-soft);
    background: rgba(6, 12, 18, 0.85);
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field textarea { min-height: 96px; resize: vertical; }

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: rgba(217, 169, 58, 0.55);
    box-shadow: 0 0 0 3px rgba(217, 169, 58, 0.12);
}

.field input::placeholder, .field textarea::placeholder { color: #5c6c80; }

.field .hint { font-size: 11px; color: var(--muted); margin-top: 5px; }
.field .err { font-size: 11.5px; color: var(--red); margin-top: 5px; }

.input-group { position: relative; }
.input-group .prefix {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gold-2);
    font-size: 14px;
    font-weight: 600;
}
.input-group input { padding-left: 34px; }

.input-group .suffix {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
}

.pw-toggle {
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    padding: 6px;
    display: inline-flex;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.12s ease, box-shadow 0.15s ease, opacity 0.15s;
    text-align: center;
}

.btn:active { transform: translateY(1px); }
.btn-block { width: 100%; }

.btn-gold {
    background: linear-gradient(120deg, #f6d78b, #d9a93a 55%, #b07d18);
    color: #1a1305;
    box-shadow: 0 10px 24px rgba(217, 169, 58, 0.22);
}
.btn-gold:hover { box-shadow: 0 12px 30px rgba(217, 169, 58, 0.34); }

.btn-outline {
    background: transparent;
    border-color: rgba(217, 169, 58, 0.45);
    color: var(--gold-2);
}

.btn-dark {
    background: rgba(16, 31, 46, 0.85);
    border-color: var(--line-soft);
    color: var(--text);
}

.btn-danger { background: rgba(255, 107, 107, 0.14); border-color: rgba(255, 107, 107, 0.4); color: var(--red); }
.btn-sm { padding: 8px 12px; font-size: 12px; border-radius: 10px; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

.form-foot { font-size: 11px; color: var(--muted); text-align: center; line-height: 1.6; margin-top: 12px; }

.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 1px;
    margin: 18px 0;
}
.divider::before, .divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line-soft);
}

/* ---------------- Chips ---------------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

.chip {
    padding: 7px 12px;
    border-radius: 20px;
    border: 1px solid var(--line-soft);
    background: rgba(6, 12, 18, 0.7);
    color: var(--muted);
    font-size: 12px;
    cursor: pointer;
}

.chip.active, .chip:hover { color: var(--gold-2); border-color: rgba(217, 169, 58, 0.45); }

.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip:has(input:checked) {
    color: var(--gold-2);
    border-color: rgba(217, 169, 58, 0.55);
    background: rgba(217, 169, 58, 0.1);
}

.filter-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-bottom: 12px;
    scrollbar-width: none;
}
.filter-tabs::-webkit-scrollbar { display: none; }

.filter-tabs a {
    flex: 0 0 auto;
    padding: 8px 14px;
    border-radius: 10px;
    background: rgba(16, 31, 46, 0.8);
    border: 1px solid var(--line-soft);
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.filter-tabs a.active {
    background: linear-gradient(120deg, #f6d78b, #d9a93a);
    color: #1a1305;
    border-color: transparent;
}

/* ---------------- Payment methods ---------------- */
.pay-list { display: flex; flex-direction: column; gap: 10px; }

.pay-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border-radius: 13px;
    border: 1px solid var(--line-soft);
    background: rgba(9, 16, 24, 0.9);
    cursor: pointer;
}

.pay-row input { accent-color: var(--gold); width: 16px; height: 16px; }
.pay-row .p-ico {
    width: 36px; height: 36px; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(217, 169, 58, 0.1); color: var(--gold-2);
}
.pay-row .p-body { flex: 1; }
.pay-row strong { display: block; font-size: 13.5px; }
.pay-row span { font-size: 11px; color: var(--muted); }
.pay-row:has(input:checked) { border-color: rgba(217, 169, 58, 0.6); background: rgba(217, 169, 58, 0.07); }

.rate-note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 13px;
    border-radius: 12px;
    background: rgba(217, 169, 58, 0.08);
    border: 1px dashed rgba(217, 169, 58, 0.4);
    font-size: 12px;
    color: var(--gold-2);
    margin-bottom: 14px;
}

.rate-note span { color: var(--muted); }

/* ---------------- Menu list ---------------- */
.menu-list { display: flex; flex-direction: column; }

.menu-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 2px;
    border-bottom: 1px solid var(--line-soft);
    color: var(--text);
    font-size: 13.5px;
}

.menu-row:last-child { border-bottom: 0; }
.menu-row .icon { color: var(--gold); flex: 0 0 auto; }
.menu-row .chev { margin-left: auto; color: var(--muted); display: inline-flex; }
.menu-row small { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.menu-row.danger { color: var(--red); }
.menu-row.danger .icon { color: var(--red); }

/* ---------------- KYC ---------------- */
.check-list { display: flex; flex-direction: column; gap: 10px; }

.check-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(6, 12, 18, 0.65);
    border: 1px solid var(--line-soft);
}

.check-item .c-ico {
    width: 30px; height: 30px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(51, 209, 122, 0.12); color: var(--green); flex: 0 0 auto;
}
.check-item.pending .c-ico { background: rgba(217, 169, 58, 0.12); color: var(--gold); }
.check-item strong { display: block; font-size: 13px; }
.check-item span { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ---------------- Auth screens ---------------- */
.auth-body { background: radial-gradient(700px 500px at 50% -10%, rgba(217, 169, 58, 0.18), transparent 70%), #05080d; }

.auth-shell { padding-bottom: 24px; }

.auth-content { padding: 30px 24px 28px; }

.auth-brand { display: flex; justify-content: center; margin-bottom: 18px; }
.auth-brand img {
    width: 210px;
    height: auto;
    border-radius: 50%;
    box-shadow: 0 20px 60px rgba(217, 169, 58, 0.2);
}

.auth-title { text-align: center; font-size: 20px; margin: 6px 0 4px; }
.auth-sub { text-align: center; color: var(--muted); font-size: 12.5px; margin: 0 0 20px; }

.auth-foot {
    text-align: center;
    font-size: 12px;
    color: var(--gold-2);
    margin-top: 26px;
    line-height: 1.7;
}
.auth-foot span { color: var(--muted); font-size: 11px; }

.splash-tag {
    text-align: center;
    font-size: 18px;
    font-style: italic;
    color: var(--gold-2);
    line-height: 1.6;
    margin: 26px 0 8px;
}

/* ---------------- Bottom nav ---------------- */
.tabbar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 460px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: rgba(7, 12, 18, 0.96);
    border-top: 1px solid var(--line-soft);
    backdrop-filter: blur(12px);
    padding: 8px 6px 10px;
    z-index: 40;
}

.tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: var(--muted);
    font-size: 10.5px;
    padding: 4px 0;
    border-radius: 10px;
}

.tab.active { color: var(--gold-2); }
.tab.active .icon { filter: drop-shadow(0 0 8px rgba(217, 169, 58, 0.5)); }

/* ---------------- Misc ---------------- */
.flex { display: flex; align-items: center; gap: 10px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

.empty {
    text-align: center;
    color: var(--muted);
    font-size: 12.5px;
    padding: 26px 10px;
    line-height: 1.6;
}

.empty .icon { color: var(--gold); margin-bottom: 8px; }

.muted { color: var(--muted); }
.gold { color: var(--gold-2); }
.green { color: var(--green); }
.red { color: var(--red); }
.small { font-size: 11.5px; }
.mono { font-family: Consolas, "Courier New", monospace; }
.center { text-align: center; }

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

.stat {
    background: rgba(10, 18, 27, 0.9);
    border: 1px solid var(--line-soft);
    border-radius: 13px;
    padding: 12px;
}
.stat span { display: block; font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.stat strong { display: block; font-size: 16px; margin-top: 4px; }

.kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line-soft); font-size: 13px; }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--muted); }
.kv strong { font-weight: 600; text-align: right; }

.legal h2 { font-size: 15px; margin: 20px 0 8px; color: var(--gold-2); }
.legal h3 { font-size: 13.5px; margin: 16px 0 6px; }
.legal p, .legal li { font-size: 12.5px; color: #b8c6d6; line-height: 1.75; }
.legal ul, .legal ol { padding-left: 20px; margin: 6px 0; }

details.faq {
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    background: rgba(9, 16, 24, 0.85);
    padding: 12px 14px;
    margin-bottom: 10px;
}
details.faq summary { font-size: 13px; cursor: pointer; color: var(--text); font-weight: 600; }
details.faq p { font-size: 12.5px; color: var(--muted); line-height: 1.7; margin: 10px 0 2px; }

.upload-preview {
    margin-top: 8px;
    font-size: 11.5px;
    color: var(--green);
}

@media (min-width: 700px) {
    .app-shell { margin: 24px auto; min-height: calc(100vh - 48px); border-radius: 22px; overflow: hidden; }
    .tabbar { bottom: 24px; border-radius: 0 0 22px 22px; }
}
