/* ================================================================
   WITHDRAW & TRANSACTIONS MODALS
   ================================================================ */

/* ── SHARED MODAL BASE ── */
.withdraw-overlay,
.transactions-overlay {
    display: none;
    position: fixed; inset: 0; z-index: 300;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    animation: overlay-fade 0.2s ease;
}
.withdraw-overlay.active,
.transactions-overlay.active { display: block; }

@keyframes overlay-fade {
    from { opacity: 0; } to { opacity: 1; }
}

.withdraw-modal,
.transactions-modal {
    display: none;
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -48%) scale(0.96);
    z-index: 310;
    background: #12132a;
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 18px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.75), 0 0 0 1px rgba(255,255,255,0.04);
    overflow: hidden;
    animation: modal-pop 0.25s cubic-bezier(0.34,1.56,0.64,1) forwards;
    max-height: 90vh;
    overflow-y: auto;
}
.withdraw-modal.active,
.transactions-modal.active { display: block; }

@keyframes modal-pop {
    from { transform: translate(-50%, -48%) scale(0.96); opacity: 0; }
    to   { transform: translate(-50%, -50%) scale(1);    opacity: 1; }
}

.withdraw-modal { width: 420px; max-width: 95vw; }
.transactions-modal { width: 680px; max-width: 97vw; }

/* scrollbar inside modals */
.withdraw-modal::-webkit-scrollbar,
.transactions-modal::-webkit-scrollbar { width: 3px; }
.withdraw-modal::-webkit-scrollbar-thumb,
.transactions-modal::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }

/* ── HEADERS ── */
.withdraw-header,
.transactions-header {
    display: flex; align-items: center; gap: 10px;
    padding: 18px 20px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    background: linear-gradient(135deg, #14152e 0%, #10111f 100%);
    position: sticky; top: 0; z-index: 1;
}
.withdraw-header h3,
.transactions-header h3 {
    font-size: 16px; font-weight: 800;
    display: flex; align-items: center; gap: 9px;
    flex: 1;
}
.withdraw-header h3 i { color: #f97316; }
.transactions-header h3 i { color: #60a5fa; }

.withdraw-close-btn,
.transactions-close-btn {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.55);
    width: 30px; height: 30px; border-radius: 8px;
    cursor: pointer; display: flex; align-items: center;
    justify-content: center; font-size: 13px;
    transition: all 0.2s; flex-shrink: 0;
}
.withdraw-close-btn:hover,
.transactions-close-btn:hover {
    background: rgba(239,68,68,0.15);
    border-color: rgba(239,68,68,0.3);
    color: #ef4444;
}

/* ── WITHDRAW BODY ── */
.withdraw-body { padding: 20px; }

.withdraw-balance-card {
    display: flex; align-items: center; gap: 14px;
    background: rgba(249,115,22,0.07);
    border: 1px solid rgba(249,115,22,0.18);
    border-radius: 12px; padding: 14px 16px; margin-bottom: 20px;
}
.withdraw-balance-icon {
    width: 42px; height: 42px; border-radius: 10px;
    background: rgba(249,115,22,0.15);
    display: flex; align-items: center; justify-content: center;
    color: #f97316; font-size: 18px; flex-shrink: 0;
}
.withdraw-balance-info { flex: 1; }
.withdraw-balance-label { font-size: 11px; color: rgba(255,255,255,0.45); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.withdraw-balance-value { font-size: 22px; font-weight: 900; color: #fff; font-family: 'Roboto Mono', monospace; margin-top: 2px; }
.withdraw-balance-value span { color: rgba(255,255,255,0.4); font-size: 14px; font-weight: 600; }

/* ── FORM GROUPS (shared with deposit style) ── */
.withdraw-form .form-group { margin-bottom: 16px; }
.withdraw-form label {
    display: block; font-size: 12px; font-weight: 700;
    color: rgba(255,255,255,0.55); text-transform: uppercase;
    letter-spacing: 0.5px; margin-bottom: 7px;
}
.withdraw-form .input-wrapper {
    position: relative; display: flex; align-items: center;
}
.withdraw-form .input-icon {
    position: absolute; left: 13px; color: rgba(255,255,255,0.3); font-size: 14px; pointer-events: none;
}
.withdraw-form input {
    width: 100%; background: rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.1); border-radius: 10px;
    color: #fff; padding: 12px 14px 12px 38px;
    font-size: 15px; font-weight: 600; font-family: 'Roboto Mono', monospace;
    outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.withdraw-form input:focus {
    border-color: rgba(249,115,22,0.5);
    box-shadow: 0 0 0 3px rgba(249,115,22,0.12);
}
.withdraw-form input::placeholder { color: rgba(255,255,255,0.2); font-weight: 400; }
.withdraw-form .input-hint { font-size: 11px; color: rgba(255,255,255,0.3); margin-top: 5px; padding-left: 2px; }

/* ── QUICK AMOUNTS (withdraw) ── */
.withdraw-quick {
    margin-bottom: 18px;
}
.withdraw-quick-label { font-size: 11px; font-weight: 700; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.withdraw-quick-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.withdraw-quick-btn {
    background: rgba(249,115,22,0.08);
    border: 1px solid rgba(249,115,22,0.2);
    color: #f97316; padding: 6px 13px;
    border-radius: 7px; font-size: 12px; font-weight: 700;
    cursor: pointer; font-family: 'Montserrat', sans-serif;
    transition: all 0.18s;
}
.withdraw-quick-btn:hover { background: rgba(249,115,22,0.18); border-color: rgba(249,115,22,0.45); }

/* ── WITHDRAW INFO BOX ── */
.withdraw-info-box {
    background: rgba(96,165,250,0.06);
    border: 1px solid rgba(96,165,250,0.15);
    border-radius: 10px; padding: 12px 14px;
    margin-bottom: 18px;
}
.withdraw-info-item {
    display: flex; align-items: flex-start; gap: 9px;
    font-size: 12px; color: rgba(255,255,255,0.6); font-weight: 500;
    padding: 3px 0;
}
.withdraw-info-item i { color: #60a5fa; font-size: 13px; margin-top: 1px; flex-shrink: 0; }

/* ── WITHDRAW SUBMIT BUTTON ── */
.withdraw-submit-btn {
    width: 100%; padding: 14px;
    background: linear-gradient(135deg, #f97316, #ea580c);
    border: none; border-radius: 12px;
    color: #fff; font-size: 15px; font-weight: 800;
    cursor: pointer; font-family: 'Montserrat', sans-serif;
    display: flex; align-items: center; justify-content: center; gap: 9px;
    box-shadow: 0 6px 24px rgba(249,115,22,0.35);
    transition: all 0.2s;
}
.withdraw-submit-btn:hover:not(:disabled) {
    box-shadow: 0 8px 32px rgba(249,115,22,0.5);
    transform: translateY(-1px);
}
.withdraw-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ── WITHDRAW FOOTER ── */
.withdraw-footer {
    padding: 12px 20px; border-top: 1px solid rgba(255,255,255,0.06);
    font-size: 11px; color: rgba(255,255,255,0.28);
    display: flex; align-items: center; gap: 7px;
    background: rgba(0,0,0,0.2);
}
.withdraw-footer i { color: rgba(249,115,22,0.5); }

/* ════════════════════════════════════════════════
   TRANSACTIONS MODAL
   ════════════════════════════════════════════════ */
.transactions-body { padding: 0; }

/* ── TABS ── */
.txn-tabs {
    display: flex; gap: 0;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    background: rgba(0,0,0,0.2);
}
.txn-tab {
    flex: 1; background: transparent; border: none;
    color: rgba(255,255,255,0.4); padding: 13px;
    cursor: pointer; font-size: 13px; font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    display: flex; align-items: center; justify-content: center; gap: 7px;
    border-bottom: 2px solid transparent; transition: all 0.2s;
}
.txn-tab.active { color: #fff; border-bottom-color: #60a5fa; background: rgba(255,255,255,0.03); }
.txn-tab i { font-size: 14px; }
.txn-tab-count {
    background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.6);
    padding: 1px 7px; border-radius: 20px; font-size: 11px; font-weight: 700;
}
.txn-tab.active .txn-tab-count { background: rgba(96,165,250,0.2); color: #60a5fa; }

/* ── SUMMARY STRIP ── */
.txn-summary {
    display: flex; gap: 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: rgba(0,0,0,0.15);
}
.txn-stat {
    flex: 1; padding: 12px 16px;
    border-right: 1px solid rgba(255,255,255,0.05);
    text-align: center;
}
.txn-stat:last-child { border-right: none; }
.txn-stat-label { font-size: 10px; color: rgba(255,255,255,0.35); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.txn-stat-value { font-size: 18px; font-weight: 900; font-family: 'Roboto Mono', monospace; margin-top: 2px; }
.txn-stat-value.deposits { color: #4ade80; }
.txn-stat-value.withdrawals { color: #f97316; }
.txn-stat-value.pending { color: #fbbf24; }

/* ── FILTER BAR ── */
.txn-filter-bar {
    display: flex; gap: 8px; align-items: center;
    padding: 10px 16px; border-bottom: 1px solid rgba(255,255,255,0.05);
}
.txn-filter-select {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7); padding: 7px 11px;
    border-radius: 8px; font-size: 12px; font-weight: 600;
    font-family: 'Montserrat', sans-serif; cursor: pointer; outline: none;
    transition: border-color 0.2s;
}
.txn-filter-select:focus { border-color: rgba(96,165,250,0.4); }
.txn-filter-select option { background: #12132a; }
.txn-refresh-btn {
    margin-left: auto; background: rgba(96,165,250,0.1);
    border: 1px solid rgba(96,165,250,0.2); color: #60a5fa;
    padding: 7px 12px; border-radius: 8px; font-size: 12px; font-weight: 700;
    cursor: pointer; font-family: 'Montserrat', sans-serif;
    display: flex; align-items: center; gap: 6px; transition: all 0.2s;
}
.txn-refresh-btn:hover { background: rgba(96,165,250,0.18); border-color: rgba(96,165,250,0.4); }

/* ── TABLE ── */
.txn-table-wrap {
    max-height: 340px; overflow-y: auto; padding: 6px 0;
}
.txn-table-wrap::-webkit-scrollbar { width: 3px; }
.txn-table-wrap::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }

.txn-table { width: 100%; border-collapse: collapse; }
.txn-table thead tr {
    background: rgba(0,0,0,0.25);
    border-bottom: 1px solid rgba(255,255,255,0.07);
}
.txn-table th {
    padding: 9px 16px; text-align: left;
    font-size: 10px; font-weight: 700; color: rgba(255,255,255,0.35);
    text-transform: uppercase; letter-spacing: 0.6px; white-space: nowrap;
}
.txn-table td {
    padding: 11px 16px; font-size: 13px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    vertical-align: middle;
}
.txn-table tbody tr { transition: background 0.15s; }
.txn-table tbody tr:hover { background: rgba(255,255,255,0.02); }

/* Type icon */
.txn-type-cell { display: flex; align-items: center; gap: 9px; }
.txn-type-icon {
    width: 32px; height: 32px; border-radius: 9px;
    display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0;
}
.txn-type-icon.deposit   { background: rgba(34,197,94,0.12);  color: #4ade80; }
.txn-type-icon.withdraw  { background: rgba(249,115,22,0.12); color: #f97316; }
.txn-type-name { font-weight: 700; font-size: 13px; }
.txn-type-id   { font-size: 10px; color: rgba(255,255,255,0.28); font-family: 'Roboto Mono', monospace; }

/* Amount */
.txn-amount { font-weight: 800; font-size: 14px; font-family: 'Roboto Mono', monospace; white-space: nowrap; }
.txn-amount.deposit-amt  { color: #4ade80; }
.txn-amount.withdraw-amt { color: #f97316; }

/* Status badge */
.txn-status-badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px; border-radius: 20px;
    font-size: 11px; font-weight: 700; white-space: nowrap;
}
.txn-status-badge.completed { background: rgba(34,197,94,0.12);  color: #4ade80;  border: 1px solid rgba(34,197,94,0.25); }
.txn-status-badge.pending   { background: rgba(251,191,36,0.12); color: #fbbf24;  border: 1px solid rgba(251,191,36,0.25); }
.txn-status-badge.failed    { background: rgba(239,68,68,0.12);  color: #f87171;  border: 1px solid rgba(239,68,68,0.25); }
.txn-status-badge.approved  { background: rgba(34,197,94,0.12);  color: #4ade80;  border: 1px solid rgba(34,197,94,0.25); }
.txn-status-badge.rejected  { background: rgba(239,68,68,0.12);  color: #f87171;  border: 1px solid rgba(239,68,68,0.25); }
.txn-status-badge i { font-size: 9px; }

/* Phone */
.txn-phone { font-size: 12px; color: rgba(255,255,255,0.45); font-family: 'Roboto Mono', monospace; }

/* Time */
.txn-time { font-size: 11px; color: rgba(255,255,255,0.35); white-space: nowrap; }

/* Empty / loading / error rows */
.txn-empty-row td,
.txn-loading-row td,
.txn-error-row td {
    text-align: center; padding: 40px 20px !important;
    color: rgba(255,255,255,0.28); font-size: 13px;
}
.txn-empty-row td i,
.txn-loading-row td i {
    display: block; font-size: 32px; margin-bottom: 10px; opacity: 0.3;
}
.txn-error-row td { color: #f87171; }
.txn-loading-row td .fa-spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── PAGINATION ── */
.txn-pagination {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 12px 16px; border-top: 1px solid rgba(255,255,255,0.05);
    background: rgba(0,0,0,0.15);
}
.txn-page-btn {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.55); padding: 6px 12px;
    border-radius: 7px; font-size: 12px; font-weight: 700;
    cursor: pointer; font-family: 'Montserrat', sans-serif;
    display: flex; align-items: center; gap: 5px;
    transition: all 0.2s;
}
.txn-page-btn:hover:not(:disabled) { background: rgba(255,255,255,0.1); color: #fff; }
.txn-page-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.txn-page-info { font-size: 12px; color: rgba(255,255,255,0.35); font-weight: 600; }

/* ── TRANSACTIONS FOOTER ── */
.transactions-footer {
    padding: 11px 16px; border-top: 1px solid rgba(255,255,255,0.05);
    font-size: 11px; color: rgba(255,255,255,0.25);
    display: flex; align-items: center; gap: 7px;
    background: rgba(0,0,0,0.2);
}
.transactions-footer i { color: rgba(96,165,250,0.4); }

/* ── SETTINGS ROW ADDITIONS ── */
.withdraw-row, .transactions-row { cursor: pointer; }

/* ── MOBILE RESPONSIVE ── */
@media (max-width: 700px) {
    .transactions-modal { width: 97vw; }
    .txn-table th:nth-child(4),
    .txn-table td:nth-child(4) { display: none; } /* hide phone col */
    .txn-summary { flex-wrap: wrap; }
    .txn-stat { min-width: 50%; border-bottom: 1px solid rgba(255,255,255,0.05); }
}
@media (max-width: 460px) {
    .txn-table th:nth-child(5),
    .txn-table td:nth-child(5) { display: none; } /* hide time col on tiny screens */
    .txn-tabs { font-size: 11px; }
    .txn-tab { padding: 10px 8px; }
}