/*
 * TradeSure Wallet — Frontend Fintech Styles
 * Dark theme transactions, #109b61 hero, expandable cards
 * @author Darshan
 */

.tsw-app { max-width: 600px; font-family: -apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif; }

/* ===== BALANCE HERO ===== */
.tsw-hero { background: linear-gradient(135deg, #0a7a4a 0%, #109b61 50%, #0d8654 100%); border-radius: 20px; padding: 32px 28px 24px; margin-bottom: 24px; color: #fff; position: relative; overflow: hidden; }
.tsw-hero::after { content:''; position: absolute; top: -40%; right: -20%; width: 200px; height: 200px; background: rgba(255,255,255,0.07); border-radius: 50%; }
.tsw-hero-status { font-size: 13px; margin-bottom: 8px; }
.tsw-hero-locked { color: #f87171; font-weight: 700; }
.tsw-hero-label { font-size: 12px; text-transform: uppercase; letter-spacing: 2px; color: #94a3b8; font-weight: 700; }
.tsw-hero-amount { font-size: 42px; font-weight: 900; letter-spacing: -1px; margin: 4px 0 20px; font-family: -apple-system,BlinkMacSystemFont,'SF Mono',monospace; }
.tsw-hero-stats { display: flex; gap: 24px; }
.tsw-hero-stat { display: flex; align-items: center; gap: 10px; }
.tsw-hero-stat-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 900; }
.tsw-icon-in { background: #fff; color: #109b61; }
.tsw-icon-out { background: #fff; color: #dc2626; }
.tsw-hero-stat-label { font-size: 11px; color: #fff; text-transform: uppercase; font-weight: 600; letter-spacing: 0.5px; }
.tsw-hero-stat-value { font-size: 16px; font-weight: 800; color: #e2e8f0; font-family: monospace; }

/* ===== SECTIONS ===== */
.tsw-section { margin-bottom: 28px; }
.tsw-section-title { font-size: 18px; font-weight: 800; color: #fff; margin: 0 0 16px 0; }

/* ===== FILTER BAR (Dark) ===== */
.tsw-filter { background: #111; border: 1px solid #1a1a1a; border-radius: 16px; padding: 14px; margin-bottom: 16px; }
.tsw-filter-pills { display: flex; gap: 6px; margin-bottom: 10px; }
.tsw-fpill { flex: 1; text-align: center; padding: 10px 12px; border-radius: 12px; font-size: 13px; font-weight: 800; text-decoration: none; border: 1px solid #222; color: #888; background: #0a0a0a; transition: all 0.2s; white-space: nowrap; text-transform: uppercase; letter-spacing: 0.5px; }
.tsw-fpill:hover { border-color: #444; color: #ccc; text-decoration: none; }
.tsw-fpill-active { background: #fff; color: #000 !important; border-color: #fff; }
.tsw-fpill-credit.tsw-fpill-active { background: #16a34a; color: #fff !important; border-color: #16a34a; }
.tsw-fpill-debit.tsw-fpill-active { background: #dc2626; color: #fff !important; border-color: #dc2626; }
.tsw-filter-search { display: flex; gap: 8px; }
.tsw-finput { flex: 1; padding: 10px 14px; border: 1px solid #222; border-radius: 12px; font-size: 13px; color: #fff; background: #0a0a0a; outline: none; transition: border 0.2s; font-weight: 600; min-width: 0; }
.tsw-finput::placeholder { color: #555; }
.tsw-finput:focus { border-color: #109b61; box-shadow: 0 0 0 2px rgba(16,155,97,0.15); }
.tsw-fbtn { padding: 10px 18px; border-radius: 12px; font-size: 13px; font-weight: 800; border: 1px solid #109b61; background: #109b61; color: #fff; cursor: pointer; transition: all 0.15s; white-space: nowrap; text-decoration: none; text-transform: uppercase; letter-spacing: 0.5px; flex-shrink: 0; }
.tsw-fbtn:hover { background: #0d8654; }
.tsw-fbtn-reset { background: transparent; color: #888; border-color: #333; padding: 10px 12px; }
.tsw-fbtn-reset:hover { background: #1a1a1a; color: #fff; text-decoration: none; }

/* ===== RECHARGE PLANS — Option B ===== */
.tsw-plans-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.tsw-plan { background: #111; border-radius: 18px; overflow: hidden; position: relative; transition: all 0.25s; border: 1px solid #1a1a1a; }
.tsw-plan:hover { transform: translateY(-3px); box-shadow: 0 12px 40px rgba(0,0,0,0.5); }
.tsw-plan-stripe { height: 4px; background: #333; }
.tsw-plan-discount .tsw-plan-stripe { background: linear-gradient(90deg, #22c55e, #059669); }
.tsw-plan-body { padding: 20px 18px; text-align: center; }
.tsw-plan-badge-save { font-size: 10px; font-weight: 800; padding: 3px 10px; border-radius: 6px; text-transform: uppercase; letter-spacing: 0.5px; background: #052e16; color: #4ade80; border: 1px solid #166534; display: inline-block; margin-bottom: 8px; white-space: nowrap; }
.tsw-plan-label { font-size: 11px; color: #888; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.tsw-plan-pay-label { font-size: 14px; color: #fff; font-weight: 600; }
.tsw-plan-pay { font-size: 16px; font-weight: 900; color: #fff; font-family: -apple-system,'SF Mono',monospace; }
.tsw-plan-gst { font-size: 9px; color: #c2c2c2; font-weight: 600; margin-bottom: 0; }
.tsw-plan-divider { height: 1px; background: linear-gradient(90deg, transparent, #333, transparent); margin: 14px 0; }
.tsw-plan-get-label { font-size: 16px; color: #4ade80; font-weight: 600; }
.tsw-plan-credit { font-size: 25px; font-weight: 900; color: #4ade80; letter-spacing: -0.5px; font-family: -apple-system,'SF Mono',monospace; }
.tsw-plan-sub { font-size: 14px; color: #c2c2c2; font-weight: 600; margin-bottom: 6px; }
.tsw-plan-extra-badge { font-size: 10px; font-weight: 800; padding: 4px 10px; border-radius: 8px; background: rgba(74,222,128,0.1); color: #4ade80; border: 1px dashed #166534; display: inline-block; margin-bottom: 4px; white-space: nowrap; letter-spacing: 0.3px; }
.tsw-plan-btn { display: block; margin-top: 14px; padding: 12px; text-align: center; border-radius: 12px; font-size: 13px; font-weight: 800; text-decoration: none; text-transform: uppercase; letter-spacing: 0.5px; transition: all 0.2s; background: #16a34a; color: #fff; border: 1px solid #16a34a; }
.tsw-plan-btn:hover { background: #15803d; color: #fff; border-color: #15803d; text-decoration: none; }
.tsw-plan-btn-loading { background: #333 !important; color: #666 !important; pointer-events: none; border-color: #333 !important; }

/* ===== TRANSACTION LIST — Dark Expandable Cards ===== */
.tsw-txn-list { display: flex; flex-direction: column; gap: 8px; }
.tsw-txn { border-radius: 14px; transition: all 0.15s; cursor: pointer; overflow: hidden; }
.tsw-txn-summary { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; }

.tsw-txn-in { background: #121214; border: 1px solid #1e1e22; }
.tsw-txn-in .tsw-txn-icon { background: #1a3a1a; color: #4ade80; }
.tsw-txn-in .tsw-txn-amount { color: #4ade80; }

.tsw-txn-out { background: #121214; border: 1px solid #1e1e22; }
.tsw-txn-out .tsw-txn-icon { background: #3a1a1a; color: #f87171; }
.tsw-txn-out .tsw-txn-amount { color: #f87171; }

.tsw-txn-left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.tsw-txn-icon { width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 900; flex-shrink: 0; }
.tsw-txn-info { min-width: 0; flex: 1; }
.tsw-txn-reason { font-size: 14px; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tsw-txn-date { font-size: 11px; color: #aaa; font-weight: 600; margin-top: 2px; }

.tsw-txn-right { text-align: right; flex-shrink: 0; padding-left: 12px; display: flex; align-items: center; gap: 8px; }
.tsw-txn-amount { font-size: 16px; font-weight: 900; font-family: -apple-system,monospace; }
.tsw-txn-chevron { font-size: 12px; color: #555; transition: transform 0.2s; }
.tsw-txn.tsw-txn-open .tsw-txn-chevron { transform: rotate(180deg); }

/* Expanded details */
.tsw-txn-expand { display: none; padding: 0 16px 14px; }
.tsw-txn.tsw-txn-open .tsw-txn-expand { display: block; }
.tsw-txn-expand-inner { padding: 12px 14px; border-radius: 10px; font-size: 12px; }
.tsw-txn-in .tsw-txn-expand-inner { background: #1a1a1e; }
.tsw-txn-out .tsw-txn-expand-inner { background: #1a1a1e; }
.tsw-txn-row { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.tsw-txn-row:last-child { border-bottom: none; }
.tsw-txn-row-label { color: #888; font-weight: 600; text-transform: uppercase; font-size: 10px; letter-spacing: 0.5px; }
.tsw-txn-row-value { color: #fff; font-weight: 700; text-align: right; max-width: 60%; word-break: break-word; }
.tsw-txn-attach { font-size: 12px; color: #4ade80; text-decoration: none; font-weight: 700; display: inline-block; margin-top: 6px; }
.tsw-txn-attach:hover { text-decoration: underline; }

/* ===== PAGINATION ===== */
.tsw-pager { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.1); }
.tsw-pager-btn { padding: 8px 18px; background: #111; border: 1px solid #222; border-radius: 10px; font-size: 13px; font-weight: 700; color: #fff; text-decoration: none; transition: all 0.15s; }
.tsw-pager-btn:hover { background: #109b61; color: #fff; border-color: #109b61; text-decoration: none; }
.tsw-pager-info { font-size: 13px; color: #94a3b8; font-weight: 600; }

/* ===== EMPTY STATE ===== */
.tsw-empty-state { text-align: center; padding: 40px 16px; color: #94a3b8; }
.tsw-empty-icon { font-size: 40px; margin-bottom: 8px; }
.tsw-empty-state p { font-size: 14px; margin: 0; }

/* ===== INLINE SHORTCODES ===== */
.tsw-balance-inline { font-weight: 800; color: #109b61; font-family: monospace; }
.tsw-status-inline { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border-radius: 12px; font-size: 13px; font-weight: 700; }
.tsw-status-inline.tsw-status-active { background: #dcfce7; color: #16a34a; }
.tsw-status-inline.tsw-status-locked { background: #fee2e2; color: #dc2626; }
.tsw-error { color: #dc2626; }

/* ===== RESPONSIVE ===== */
@media(min-width:640px){
    .tsw-plans-grid { grid-template-columns: repeat(3, 1fr); }
}
@media(max-width:480px){
    .tsw-hero { padding: 24px 20px 20px; border-radius: 16px; }
    .tsw-hero-amount { font-size: 34px; }
    .tsw-hero-stats { gap: 16px; }
    .tsw-hero-stat-value { font-size: 14px; }
    .tsw-txn-summary { padding: 12px 14px; }
    .tsw-txn-icon { width: 34px; height: 34px; font-size: 16px; }
    .tsw-txn-reason { font-size: 13px; }
    .tsw-txn-amount { font-size: 14px; }
    .tsw-plans-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .tsw-plan-body { padding: 16px 14px; }
    .tsw-plan-credit { font-size: 26px; }
    .tsw-plan-pay { font-size: 15px; }
    .tsw-plan-price-box { padding: 10px 12px; }
    .tsw-plan-btn { padding: 10px; font-size: 12px; }
}

/* ===== RECHARGE PLANS — Line Layout (Rows with Top Badge) ===== */
.tsw-line-list { display: flex; flex-direction: column; gap: 8px; }
.tsw-line-wrap { position: relative; }
.tsw-line-badge { position: absolute; top: -9px; left: 16px; font-size: 9px; font-weight: 800; color: #fff; background: #109b61; padding: 2px 10px; border-radius: 4px; text-transform: uppercase; letter-spacing: .5px; z-index: 1; }
.tsw-line-row { display: flex; align-items: center; justify-content: space-between; background: #111; border: 1px solid #1a1a1a; border-radius: 14px; padding: 16px 18px; transition: all .2s; }
.tsw-line-row:hover { border-color: #222; background: #131315; }
.tsw-line-has-save .tsw-line-row { border-color: #0d3a20; }
.tsw-line-left { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.tsw-line-icon { width: 42px; height: 42px; border-radius: 12px; background: #1a1a1a; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 900; color: #109b61; flex-shrink: 0; }
.tsw-line-has-save .tsw-line-icon { background: #0a2a1a; }
.tsw-line-get-label { font-size: 9px; color: #4ade80; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.tsw-line-credit { font-size: 20px; font-weight: 900; color: #fff; font-family: -apple-system,monospace; }
.tsw-line-name { font-size: 10px; color: #555; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; margin-top: 1px; }
.tsw-line-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.tsw-line-pay-block { text-align: right; }
.tsw-line-pay-label { font-size: 9px; color: #888; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.tsw-line-pay { font-size: 14px; font-weight: 800; color: #aaa; font-family: monospace; }
.tsw-line-gst { font-size: 8px; color: #444; font-weight: 600; text-transform: uppercase; }
.tsw-line-btn { padding: 10px 16px; border-radius: 10px; background: #109b61; color: #fff; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; border: none; cursor: pointer; transition: all .15s; white-space: nowrap; text-decoration: none; display: inline-block; }
.tsw-line-btn:hover { background: #0d8654; color: #fff; text-decoration: none; }

@media(max-width:420px){
    .tsw-line-credit { font-size: 17px; }
    .tsw-line-icon { width: 36px; height: 36px; font-size: 14px; }
    .tsw-line-btn { padding: 8px 12px; font-size: 10px; }
    .tsw-line-pay { font-size: 13px; }
    .tsw-line-row { padding: 14px 14px; }
}

/* ===== REDEMPTION UI ===== */
.tsw-rdm { max-width: 440px; font-family: -apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif; }
.tsw-rdm-balance { background: #121214; border-radius: 16px; padding: 24px; margin-bottom: 20px; text-align: center; }
.tsw-rdm-bal-label { font-size: 12px; color: #888; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; }
.tsw-rdm-bal-amount { font-size: 36px; font-weight: 900; color: #fff; font-family: -apple-system,monospace; margin: 4px 0; }
.tsw-rdm-held { font-size: 12px; color: #f59e0b; font-weight: 700; }

.tsw-rdm-form { background: #121214; border-radius: 16px; padding: 24px; margin-bottom: 20px; }
.tsw-rdm-form-label { font-size: 16px; font-weight: 800; color: #fff; margin-bottom: 4px; }
.tsw-rdm-note { font-size: 12px; color: #666; margin-bottom: 16px; }
.tsw-rdm-input { width: 100%; padding: 14px 16px; background: #0a0a0a; border: 1px solid #222; border-radius: 12px; color: #fff; caret-color: #4ade80; font-size: 18px; font-weight: 800; font-family: -apple-system,monospace; outline: none; margin-bottom: 14px; box-sizing: border-box; -webkit-appearance: none; -moz-appearance: textfield; appearance: none; }
.tsw-rdm-input:focus { border-color: #109b61; box-shadow: 0 0 0 2px rgba(16,155,97,.15); background: #111; }
.tsw-rdm-input-code { font-size: 28px; text-align: center; letter-spacing: 6px; -moz-appearance: textfield; }
.tsw-rdm-input::-webkit-outer-spin-button, .tsw-rdm-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tsw-rdm-btn { display: block; width: 100%; padding: 14px; border: none; border-radius: 12px; font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; cursor: pointer; transition: all .2s; margin-bottom: 8px; }
.tsw-rdm-btn:disabled { opacity: .4; cursor: not-allowed; }
.tsw-rdm-btn-generate, .tsw-rdm-btn-verify, .tsw-rdm-btn-confirm { background: #109b61; color: #fff; }
.tsw-rdm-btn-generate:hover, .tsw-rdm-btn-verify:hover, .tsw-rdm-btn-confirm:hover { background: #0d8654; }
.tsw-rdm-btn-cancel { background: #1a1a1a; color: #888; border: 1px solid #333; }
.tsw-rdm-btn-cancel:hover { background: #222; color: #fff; }
.tsw-rdm-error-msg { color: #f87171; font-size: 12px; font-weight: 700; margin-top: 8px; }

/* Active code display */
.tsw-rdm-active { background: #121214; border-radius: 16px; padding: 28px; text-align: center; margin-bottom: 20px; border: 1px solid #1a3a1a; }
.tsw-rdm-status-label { font-size: 12px; color: #888; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; margin-bottom: 12px; }
.tsw-rdm-code { font-size: 40px; font-weight: 900; color: #4ade80; font-family: -apple-system,monospace; letter-spacing: 6px; margin-bottom: 4px; }
.tsw-rdm-code-amount { font-size: 18px; font-weight: 800; color: #fff; margin-bottom: 12px; }
.tsw-rdm-timer { font-size: 14px; font-weight: 700; color: #f59e0b; margin-bottom: 12px; padding: 8px; background: rgba(245,158,11,.1); border-radius: 8px; }
.tsw-rdm-timer.tsw-rdm-timer-expired { color: #f87171; background: rgba(248,113,113,.1); }
.tsw-rdm-instructions { font-size: 13px; color: #888; margin-bottom: 16px; }
.tsw-rdm-actions { display: flex; gap: 8px; }
.tsw-rdm-actions .tsw-rdm-btn { flex: 1; }

/* Verify result */
.tsw-rdm-verify-result { background: #121214; border-radius: 16px; padding: 24px; margin-bottom: 20px; }
.tsw-rdm-verify-details, .tsw-rdm-success-details { margin: 16px 0; }
.tsw-rdm-detail-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #1e1e22; }
.tsw-rdm-detail-row:last-child { border-bottom: none; }
.tsw-rdm-detail-label { font-size: 13px; color: #888; font-weight: 600; }
.tsw-rdm-detail-value { font-size: 14px; color: #fff; font-weight: 700; }
.tsw-rdm-bonus-value { color: #4ade80; }
.tsw-rdm-total-value { color: #4ade80; font-size: 18px; font-weight: 900; }
.tsw-rdm-detail-total { border-top: 1px solid #333; padding-top: 12px; margin-top: 4px; }
.tsw-rdm-detail-bonus .tsw-rdm-detail-label::before { content: '+ '; color: #4ade80; }
.tsw-rdm-detail-cash { background: #1a1a1e; border-radius: 10px; padding: 14px 12px !important; margin: 4px 0; border: none !important; }
.tsw-rdm-cash-value { color: #fff; font-size: 20px !important; font-weight: 900 !important; font-family: -apple-system,monospace; }
.tsw-rdm-detail-cash .tsw-rdm-detail-label { font-size: 14px; font-weight: 700; color: #fff; }
.tsw-rdm-divider { height: 1px; background: linear-gradient(90deg, transparent, #333, transparent); margin: 12px 0; }
.tsw-rdm-verify-actions { display: flex; gap: 8px; margin-top: 16px; }
.tsw-rdm-verify-actions .tsw-rdm-btn { flex: 1; }

/* Success */
.tsw-rdm-success { background: #121214; border: 2px solid #16a34a; border-radius: 16px; padding: 32px; text-align: center; margin-bottom: 20px; }
.tsw-rdm-success-icon { width: 64px; height: 64px; background: #16a34a; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 32px; color: #fff; margin: 0 auto 16px; font-weight: 900; }
.tsw-rdm-success-text { font-size: 18px; font-weight: 800; color: #4ade80; }

.tsw-rdm-msg { font-size: 13px; font-weight: 700; margin-top: 10px; text-align: center; min-height: 20px; }
.tsw-rdm-msg.tsw-rdm-msg-error { color: #f87171; }
.tsw-rdm-msg.tsw-rdm-msg-success { color: #4ade80; }