/*
 * 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; }
}