/* TTF SMM Panel - Public Styles */
:root {
    --ttf-primary: #6c5ce7;
    --ttf-primary-dark: #5a4bd1;
    --ttf-secondary: #00b894;
    --ttf-danger: #e74c3c;
    --ttf-warning: #f39c12;
    --ttf-dark: #1a1a2e;
    --ttf-darker: #16213e;
    --ttf-card-bg: #1e2a3a;
    --ttf-text: #e0e0e0;
    --ttf-text-muted: #8e9aaf;
    --ttf-border: #2d3748;
    --ttf-input-bg: #0f1923;
    --ttf-radius: 10px;
    --ttf-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.ttf-panel {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--ttf-text);
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.ttf-panel * { box-sizing: border-box; }

/* Cards */
.ttf-card {
    background: var(--ttf-card-bg);
    border-radius: var(--ttf-radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--ttf-shadow);
}
.ttf-card h3 { margin: 0 0 20px; color: #fff; font-size: 1.2em; }

/* Stats */
.ttf-stats-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--ttf-card-bg);
    padding: 16px 24px;
    border-radius: var(--ttf-radius);
    margin-bottom: 20px;
}
.ttf-stat-label { display: block; font-size: 0.85em; color: var(--ttf-text-muted); }
.ttf-stat-value { font-size: 1.4em; font-weight: 700; color: var(--ttf-secondary); }

.ttf-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.ttf-stat-card {
    background: var(--ttf-card-bg);
    border-radius: var(--ttf-radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--ttf-shadow);
}
.ttf-stat-icon { font-size: 2em; }

/* Forms */
.ttf-form-group { margin-bottom: 16px; }
.ttf-form-group label { display: block; margin-bottom: 6px; font-weight: 500; font-size: 0.9em; color: var(--ttf-text-muted); }
.ttf-form-row { display: flex; gap: 16px; }
.ttf-half { flex: 1; }

.ttf-input, .ttf-select, .ttf-textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--ttf-input-bg);
    border: 1px solid var(--ttf-border);
    border-radius: 8px;
    color: var(--ttf-text);
    font-size: 0.95em;
    transition: border-color 0.2s;
}
.ttf-input:focus, .ttf-select:focus, .ttf-textarea:focus {
    outline: none;
    border-color: var(--ttf-primary);
}
.ttf-select { cursor: pointer; }
.ttf-textarea { resize: vertical; min-height: 80px; }
.ttf-input-sm { padding: 6px 10px; font-size: 0.85em; width: auto; }
.ttf-select-sm { padding: 6px 10px; font-size: 0.85em; width: auto; }
.ttf-help { display: block; font-size: 0.8em; color: var(--ttf-text-muted); margin-top: 4px; }

/* Buttons */
.ttf-btn {
    display: inline-block;
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    text-align: center;
}
.ttf-btn-primary { background: var(--ttf-primary); color: #fff; }
.ttf-btn-primary:hover { background: var(--ttf-primary-dark); color: #fff; }
.ttf-btn-secondary { background: var(--ttf-secondary); color: #fff; }
.ttf-btn-outline { background: transparent; border: 1px solid var(--ttf-border); color: var(--ttf-text); }
.ttf-btn-outline:hover { border-color: var(--ttf-primary); color: var(--ttf-primary); }
.ttf-btn-danger { background: var(--ttf-danger); color: #fff; }
.ttf-btn-lg { padding: 14px 32px; font-size: 1.05em; width: 100%; }
.ttf-btn-sm { padding: 6px 12px; font-size: 0.8em; }
.ttf-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Tables */
.ttf-table-wrap { overflow-x: auto; }
.ttf-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}
.ttf-table th {
    text-align: left;
    padding: 12px;
    background: var(--ttf-darker);
    color: var(--ttf-text-muted);
    font-weight: 600;
    font-size: 0.85em;
    text-transform: uppercase;
    white-space: nowrap;
}
.ttf-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--ttf-border);
}
.ttf-table tbody tr:hover { background: rgba(108,92,231,0.05); }
.ttf-category-row td {
    background: var(--ttf-primary) !important;
    color: #fff !important;
    font-weight: 700;
    font-size: 0.95em;
}

/* Status badges */
.ttf-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: capitalize;
}
.ttf-status-pending { background: rgba(243,156,18,0.15); color: var(--ttf-warning); }
.ttf-status-processing, .ttf-status-in_progress { background: rgba(52,152,219,0.15); color: #3498db; }
.ttf-status-completed { background: rgba(0,184,148,0.15); color: var(--ttf-secondary); }
.ttf-status-partial { background: rgba(241,196,15,0.15); color: #f1c40f; }
.ttf-status-cancelled, .ttf-status-refunded { background: rgba(231,76,60,0.15); color: var(--ttf-danger); }
.ttf-status-open { background: rgba(52,152,219,0.15); color: #3498db; }
.ttf-status-answered { background: rgba(0,184,148,0.15); color: var(--ttf-secondary); }
.ttf-status-closed { background: rgba(149,165,166,0.15); color: #95a5a6; }

.ttf-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 600;
}
.ttf-badge-deposit { background: rgba(0,184,148,0.15); color: var(--ttf-secondary); }
.ttf-badge-order { background: rgba(108,92,231,0.15); color: var(--ttf-primary); }
.ttf-badge-refund { background: rgba(243,156,18,0.15); color: var(--ttf-warning); }
.ttf-badge-affiliate { background: rgba(52,152,219,0.15); color: #3498db; }
.ttf-badge-admin { background: rgba(231,76,60,0.15); color: var(--ttf-danger); }

.ttf-positive { color: var(--ttf-secondary) !important; }
.ttf-negative { color: var(--ttf-danger) !important; }

/* Description box */
.ttf-description {
    background: var(--ttf-input-bg);
    padding: 12px;
    border-radius: 8px;
    font-size: 0.9em;
    line-height: 1.5;
    border-left: 3px solid var(--ttf-primary);
}

/* Charge display */
.ttf-charge-display {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--ttf-secondary);
    padding: 8px 0;
}

/* Steps */
.ttf-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.ttf-step { text-align: center; padding: 20px; }
.ttf-step-num {
    width: 40px; height: 40px; line-height: 40px;
    border-radius: 50%;
    background: var(--ttf-primary);
    color: #fff;
    font-weight: 700;
    margin: 0 auto 12px;
}
.ttf-step h4 { margin: 0 0 8px; color: #fff; }
.ttf-step p { margin: 0; font-size: 0.85em; color: var(--ttf-text-muted); }

/* Tickets */
.ttf-ticket-messages { margin-bottom: 24px; }
.ttf-message { padding: 16px; border-radius: var(--ttf-radius); margin-bottom: 12px; }
.ttf-message-user { background: var(--ttf-input-bg); border-left: 3px solid var(--ttf-primary); }
.ttf-message-admin { background: rgba(0,184,148,0.08); border-left: 3px solid var(--ttf-secondary); }
.ttf-message-header { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 0.85em; }
.ttf-message-time { color: var(--ttf-text-muted); }

/* Payment */
.ttf-payment-grid { display: grid; gap: 10px; }
.ttf-payment-option {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px;
    background: var(--ttf-input-bg);
    border: 1px solid var(--ttf-border);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s;
}
.ttf-payment-option:has(input:checked) { border-color: var(--ttf-primary); }

/* Referral */
.ttf-referral-link-wrap { display: flex; gap: 10px; margin-bottom: 8px; }
.ttf-referral-link-wrap .ttf-input { flex: 1; }

/* Quick links */
.ttf-quick-links { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }

/* Auth */
.ttf-auth-page { display: flex; justify-content: center; padding: 40px 20px; }
.ttf-auth-card { background: var(--ttf-card-bg); padding: 40px; border-radius: var(--ttf-radius); width: 100%; max-width: 400px; box-shadow: var(--ttf-shadow); }
.ttf-auth-card h2 { text-align: center; margin-bottom: 24px; color: #fff; }
.ttf-auth-links { text-align: center; margin-top: 16px; }
.ttf-auth-links a { color: var(--ttf-primary); font-size: 0.9em; margin: 0 8px; }

/* Page header */
.ttf-page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.ttf-page-header h2 { margin: 0; color: #fff; }

/* Filters */
.ttf-filters { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }

/* Utility */
.ttf-link-truncate { color: var(--ttf-primary); text-decoration: none; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; }
.ttf-empty { text-align: center; color: var(--ttf-text-muted); padding: 40px !important; }
.ttf-mt-2 { margin-top: 16px; }
.ttf-balance-large { font-size: 1.8em; }

/* Toast notifications */
.ttf-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 14px 24px;
    border-radius: 8px;
    color: #fff;
    font-weight: 600;
    z-index: 99999;
    animation: ttf-slide-in 0.3s ease;
}
.ttf-toast-success { background: var(--ttf-secondary); }
.ttf-toast-error { background: var(--ttf-danger); }
@keyframes ttf-slide-in {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Checkbox */
.ttf-checkbox-label { display: flex; align-items: center; gap: 8px; cursor: pointer; }

/* Loading spinner */
.ttf-loading { opacity: 0.5; pointer-events: none; }

/* Responsive */
@media (max-width: 768px) {
    .ttf-stats-bar { flex-direction: column; gap: 12px; text-align: center; }
    .ttf-form-row { flex-direction: column; }
    .ttf-page-header { flex-direction: column; gap: 12px; }
    .ttf-quick-links { flex-direction: column; }
    .ttf-quick-links .ttf-btn { width: 100%; }
    .ttf-steps { grid-template-columns: 1fr 1fr; }
    .ttf-filters { flex-direction: column; }
    .ttf-filters .ttf-select-sm, .ttf-filters .ttf-input-sm { width: 100%; }
}

/* Payment form additions */
.ttf-quarter { flex: 0 0 120px; }
.ttf-alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-weight: 500; }
.ttf-alert-success { background: rgba(34,197,94,0.15); color: #16a34a; border: 1px solid rgba(34,197,94,0.3); }
.ttf-alert-error { background: rgba(239,68,68,0.15); color: #dc2626; border: 1px solid rgba(239,68,68,0.3); }
#ttf-cardinity-form .ttf-form-group { margin-bottom: 16px; }
#ttf-3ds-container { text-align: center; padding: 40px; }
#ttf-svea-checkout { min-height: 300px; }

/* ============================================
   ADD FUNDS — Modern Payment View
   ============================================ */

.ttf-add-funds-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px;
}

.ttf-funds-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    align-items: flex-start;
}

@media (max-width: 980px) {
    .ttf-funds-grid { grid-template-columns: 1fr; }
}

.ttf-funds-card {
    background: linear-gradient(180deg, rgba(30,34,50,0.9), rgba(22,25,38,0.9));
    border: 1px solid rgba(139, 120, 255, 0.12);
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25), 0 1px 0 rgba(255,255,255,0.03) inset;
    margin-bottom: 20px;
    backdrop-filter: blur(8px);
}

.ttf-funds-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(139, 120, 255, 0.1);
}

.ttf-funds-header h2 {
    margin: 0 0 4px 0;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
}

.ttf-funds-header p {
    margin: 0;
    font-size: 13px;
    color: #8b91a8;
}

.ttf-funds-header-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #7c5cff 0%, #5b3dff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 6px 20px rgba(124, 92, 255, 0.4);
    flex-shrink: 0;
}

/* ------- Form ------- */
.ttf-funds-form .ttf-field {
    margin-bottom: 24px;
}

.ttf-field-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #b8bdd1;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ------- Amount input ------- */
.ttf-amount-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(10, 12, 22, 0.6);
    border: 2px solid rgba(139, 120, 255, 0.15);
    border-radius: 14px;
    padding: 4px 20px;
    transition: all 0.2s;
}

.ttf-amount-input-wrap:focus-within {
    border-color: #7c5cff;
    box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.15);
}

.ttf-amount-currency {
    font-size: 32px;
    font-weight: 700;
    color: #8b91a8;
    margin-right: 8px;
}

.ttf-amount-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 36px;
    font-weight: 700;
    color: #fff;
    padding: 16px 0;
    width: 100%;
    font-family: inherit;
}

.ttf-amount-input::placeholder {
    color: #4a4d63;
}

.ttf-amount-input::-webkit-outer-spin-button,
.ttf-amount-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.ttf-preset-amounts {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin-top: 12px;
}

@media (max-width: 560px) {
    .ttf-preset-amounts { grid-template-columns: repeat(3, 1fr); }
}

.ttf-preset {
    background: rgba(139, 120, 255, 0.08);
    border: 1px solid rgba(139, 120, 255, 0.15);
    color: #b8bdd1;
    padding: 10px 0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.ttf-preset:hover {
    background: rgba(139, 120, 255, 0.18);
    border-color: rgba(139, 120, 255, 0.35);
    color: #fff;
    transform: translateY(-1px);
}

.ttf-preset-active {
    background: linear-gradient(135deg, #7c5cff, #5b3dff);
    border-color: transparent;
    color: #fff;
}

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

.ttf-pay-method {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    background: rgba(10, 12, 22, 0.5);
    border: 2px solid rgba(139, 120, 255, 0.12);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.ttf-pay-method:hover {
    border-color: rgba(139, 120, 255, 0.3);
    background: rgba(20, 22, 38, 0.7);
}

.ttf-pay-method input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ttf-pay-method-selected {
    border-color: #7c5cff !important;
    background: linear-gradient(135deg, rgba(124, 92, 255, 0.12), rgba(91, 61, 255, 0.05)) !important;
    box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.12);
}

.ttf-pay-method-body {
    flex: 1;
    min-width: 0;
}

.ttf-pay-method-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.ttf-pay-method-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

.ttf-pay-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(139, 120, 255, 0.15);
    color: #7c5cff;
    flex-shrink: 0;
}

.ttf-pay-method-selected .ttf-pay-icon {
    background: linear-gradient(135deg, #7c5cff, #5b3dff);
    color: #fff;
}

.ttf-pay-method-sub {
    font-size: 13px;
    color: #8b91a8;
    margin-left: 52px;
    margin-bottom: 10px;
}

.ttf-pay-method-brands {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 52px;
    flex-wrap: wrap;
}

.ttf-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: #fff;
    min-width: 36px;
}

.ttf-brand-visa { background: linear-gradient(135deg, #1a1f71, #2b3da0); }
.ttf-brand-mc { background: linear-gradient(135deg, #eb001b, #f79e1b); }
.ttf-brand-amex { background: linear-gradient(135deg, #006fcf, #0094e0); }

.ttf-brand-3ds {
    font-size: 10px;
    color: #22c55e;
    font-weight: 700;
    padding: 3px 8px;
    background: rgba(34, 197, 94, 0.12);
    border-radius: 5px;
    letter-spacing: 0.03em;
}

.ttf-bonus-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #fff;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.4);
    white-space: nowrap;
    flex-shrink: 0;
}

.ttf-pay-method-check {
    color: #4a4d63;
    transition: color 0.2s;
    flex-shrink: 0;
}

.ttf-pay-method-selected .ttf-pay-method-check {
    color: #7c5cff;
}

/* ------- Submit button ------- */
.ttf-pay-submit {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px;
    background: linear-gradient(135deg, #7c5cff 0%, #5b3dff 100%);
    border: none;
    border-radius: 14px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 10px 30px rgba(124, 92, 255, 0.35);
    letter-spacing: 0.02em;
}

.ttf-pay-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 14px 40px rgba(124, 92, 255, 0.5);
}

.ttf-pay-submit:active:not(:disabled) {
    transform: translateY(0);
}

.ttf-pay-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ttf-btn-ghost {
    background: transparent;
    border: 1px solid rgba(139, 120, 255, 0.25);
    color: #b8bdd1;
    padding: 14px 22px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.ttf-btn-ghost:hover {
    background: rgba(139, 120, 255, 0.08);
    color: #fff;
}

/* ------- Right sidebar ------- */
.ttf-balance-card {
    background: linear-gradient(135deg, rgba(124, 92, 255, 0.15) 0%, rgba(91, 61, 255, 0.05) 100%);
    border: 1px solid rgba(139, 120, 255, 0.25);
}

.ttf-balance-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #8b91a8;
    font-weight: 600;
}

.ttf-balance-big {
    font-size: 42px;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    margin-top: 6px;
    margin-bottom: 20px;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #fff 0%, #b8a8ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ttf-balance-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(139, 120, 255, 0.3), transparent);
    margin: 16px 0;
}

.ttf-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 14px;
    color: #b8bdd1;
}

.ttf-summary-row strong {
    color: #fff;
    font-weight: 700;
}

.ttf-summary-bonus {
    color: #22c55e !important;
}

.ttf-summary-bonus strong {
    color: #22c55e !important;
}

.ttf-summary-total {
    border-top: 1px solid rgba(139, 120, 255, 0.2);
    margin-top: 6px;
    padding-top: 16px;
    font-size: 15px;
}

.ttf-summary-total strong {
    font-size: 20px;
    background: linear-gradient(135deg, #7c5cff 0%, #b8a8ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ttf-security-card {
    padding: 20px 24px;
}

.ttf-security-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    font-size: 13px;
    color: #b8bdd1;
}

.ttf-security-item svg {
    color: #22c55e;
    flex-shrink: 0;
}

/* ------- Alerts ------- */
.ttf-alert {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 20px;
    border-radius: 14px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.ttf-alert svg {
    flex-shrink: 0;
    margin-top: 1px;
}

.ttf-alert-success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(22, 163, 74, 0.08));
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.ttf-alert-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(220, 38, 38, 0.08));
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ------- Card form (step 2) ------- */
.ttf-card-form-card {
    max-width: 600px;
    margin: 0 auto 20px;
}

.ttf-input-lg {
    width: 100%;
    padding: 16px 18px;
    background: rgba(10, 12, 22, 0.6);
    border: 2px solid rgba(139, 120, 255, 0.15);
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    font-family: inherit;
    outline: none;
    transition: all 0.2s;
    letter-spacing: 0.02em;
}

.ttf-input-lg:focus {
    border-color: #7c5cff;
    box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.15);
}

.ttf-input-lg::placeholder {
    color: #4a4d63;
}

.ttf-card-number-wrap {
    position: relative;
}

.ttf-card-brand-detect {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 800;
    font-size: 13px;
    color: #7c5cff;
    pointer-events: none;
}

.ttf-card-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 14px;
}

.ttf-expiry-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.ttf-card-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.ttf-card-actions .ttf-pay-submit {
    flex: 1;
}

/* ------- History table ------- */
.ttf-history-card {
    margin-top: 24px;
}

/* ------- Hide old stats bar on this page ------- */
.ttf-add-funds-page > .ttf-stats-bar,
.ttf-add-funds-page > .ttf-payment-methods { display: none; }

.ttf-field-hint { font-size: 12px; color: #8b91a8; margin-bottom: 10px; margin-top: -4px; }

/* Payment method logos */
.ttf-pay-logo {
    height: 16px;
    max-width: 38px;
    width: auto;
    object-fit: contain;
    background: #fff;
    padding: 2px 4px;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.25);
    transition: transform 0.15s;
    display: inline-block;
    vertical-align: middle;
}
.ttf-pay-method:hover .ttf-pay-logo { transform: translateY(-1px); }
.ttf-pay-method-brands { align-items: center; gap: 6px; }

/* === ORDER PAGE === */
.ttf-order-page { max-width: 1200px; margin: 0 auto; padding: 24px 16px; }
.ttf-order-page select.ttf-input-lg { cursor: pointer; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b91a8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 42px; }
.ttf-service-desc-box { padding: 14px 16px; background: rgba(124, 92, 255, 0.08); border-left: 3px solid #7c5cff; border-radius: 8px; color: #b8bdd1; font-size: 13px; line-height: 1.6; }

.ttf-drip-toggle { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: rgba(10, 12, 22, 0.5); border: 2px solid rgba(139, 120, 255, 0.15); border-radius: 12px; cursor: pointer; }
.ttf-drip-toggle input { position: absolute; opacity: 0; }
.ttf-drip-slider { position: relative; width: 42px; height: 24px; background: rgba(139, 120, 255, 0.2); border-radius: 12px; flex-shrink: 0; transition: 0.2s; }
.ttf-drip-slider::before { content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; background: #8b91a8; border-radius: 50%; transition: 0.2s; }
.ttf-drip-toggle input:checked + .ttf-drip-slider { background: #7c5cff; }
.ttf-drip-toggle input:checked + .ttf-drip-slider::before { transform: translateX(18px); background: #fff; }
.ttf-drip-text { flex: 1; }
.ttf-drip-text strong { display: block; color: #fff; font-size: 14px; margin-bottom: 2px; }
.ttf-drip-text small { color: #8b91a8; font-size: 12px; }

.ttf-addfunds-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; background: rgba(34, 197, 94, 0.15); border: 1px solid rgba(34, 197, 94, 0.35); color: #4ade80; font-size: 13px; font-weight: 700; border-radius: 10px; text-decoration: none; transition: all 0.15s; margin-bottom: 4px; }
.ttf-addfunds-btn:hover { background: rgba(34, 197, 94, 0.25); transform: translateY(-1px); }

/* ======================================================
   MOBILE RESPONSIVE — entire site
   ====================================================== */

/* === Panel sidebar → slide-in on mobile === */
@media (max-width: 900px) {
    body { overflow-x: hidden; }

    #ttf-sidebar {
        position: fixed !important;
        top: 0;
        left: 0;
        height: 100vh;
        width: 260px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 9999;
        overflow-y: auto;
        box-shadow: 4px 0 20px rgba(0,0,0,0.5);
    }
    #ttf-sidebar.open { transform: translateX(0); }

    /* Main content full width on mobile */
    .ttf-main, main.main { margin-left: 0 !important; padding: 12px !important; width: 100% !important; }
}

/* === Add Funds page mobile === */
@media (max-width: 900px) {
    .ttf-add-funds-page { padding: 16px 10px; }
    .ttf-funds-grid { grid-template-columns: 1fr !important; gap: 16px; }
    .ttf-funds-card { padding: 18px 16px; border-radius: 14px; }
    .ttf-funds-header { gap: 12px; padding-bottom: 14px; margin-bottom: 16px; }
    .ttf-funds-header-icon { width: 40px; height: 40px; }
    .ttf-funds-header h2 { font-size: 17px; }
    .ttf-funds-header p { font-size: 12px; }
    .ttf-amount-input { font-size: 28px; padding: 12px 0; }
    .ttf-amount-currency { font-size: 26px; }
    .ttf-amount-input-wrap { padding: 4px 14px; }
    .ttf-preset-amounts { grid-template-columns: repeat(3, 1fr); }
    .ttf-pay-method { padding: 14px 14px; }
    .ttf-pay-method-title { font-size: 14px; gap: 10px; }
    .ttf-pay-icon { width: 36px; height: 36px; }
    .ttf-pay-method-sub { margin-left: 0; font-size: 12px; }
    .ttf-pay-method-brands { margin-left: 0; }
    .ttf-pay-logo { height: 14px; max-width: 34px; padding: 2px 3px; }
    .ttf-pay-method-head { flex-wrap: wrap; }
    .ttf-bonus-badge { padding: 4px 8px; font-size: 9px; }
    .ttf-pay-submit { padding: 16px; font-size: 15px; }
    .ttf-balance-big { font-size: 36px; }
    .ttf-card-row { grid-template-columns: 1fr; }
    .ttf-expiry-wrap { grid-template-columns: 1fr 1fr; }
    .ttf-input-lg { padding: 14px 16px; font-size: 15px; }
    .ttf-card-actions { flex-direction: column; }
    .ttf-card-actions .ttf-pay-submit { width: 100%; }
    .ttf-btn-ghost { width: 100%; padding: 12px; }
    .ttf-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .ttf-table { min-width: 640px; font-size: 12px; }
    .ttf-table th, .ttf-table td { padding: 8px 6px; }
}

/* === Order page mobile === */
@media (max-width: 900px) {
    .ttf-order-page { padding: 16px 10px; }
    .ttf-drip-toggle { padding: 14px 14px; gap: 12px; }
    .ttf-drip-slider { width: 38px; height: 22px; }
    .ttf-drip-slider::before { width: 18px; height: 18px; }
    .ttf-drip-toggle input:checked + .ttf-drip-slider::before { transform: translateX(16px); }
}

/* === Dashboard / Orders list === */
@media (max-width: 900px) {
    .ttf-dashboard, .ttf-orders-wrap, .ttf-tickets-wrap { padding: 16px 10px; }
    .ttf-stats-bar { flex-direction: column; gap: 10px; }
    .ttf-stats-bar .ttf-stat { width: 100%; }
    .ttf-card { padding: 16px; }
    .ttf-card h3 { font-size: 16px; }

    /* Stat cards grid */
    .ttf-stats-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }

    /* Hide less important columns in tables on mobile */
    .ttf-orders-user-table thead { display: none; }
    .ttf-orders-user-table tbody tr {
        display: block;
        background: rgba(20,22,38,0.7);
        border: 1px solid rgba(139,120,255,0.12);
        border-radius: 12px;
        padding: 12px 14px;
        margin-bottom: 10px;
    }
    .ttf-orders-user-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border: none;
        padding: 6px 0;
        font-size: 13px;
    }
    .ttf-orders-user-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #8b91a8;
        margin-right: 10px;
        font-size: 12px;
    }
}

/* === Login/Register pages === */
@media (max-width: 900px) {
    .ttf-auth-wrap, .auth-container, .login-box {
        padding: 24px 16px !important;
        max-width: 100% !important;
        margin: 20px 10px !important;
    }
}

/* === Services list (public) === */
@media (max-width: 900px) {
    .ttf-services-list { grid-template-columns: 1fr !important; }
    .ttf-service-card { padding: 14px; }
}

/* === Tickets === */
@media (max-width: 900px) {
    .ttf-ticket-thread { padding: 14px; }
    .ttf-ticket-message { padding: 12px; }
}

/* === Toast notifications (mobile bottom) === */
@media (max-width: 600px) {
    .ttf-toast {
        left: 16px !important;
        right: 16px !important;
        top: auto !important;
        bottom: 16px !important;
        max-width: none !important;
    }
}

/* === WP Admin Users/Orders/Payments tables === */
@media (max-width: 900px) {
    .ttf-admin .wp-list-table {
        border: 0;
    }
    .ttf-admin .wp-list-table thead { display: none; }
    .ttf-admin .wp-list-table tbody tr {
        display: block;
        background: #fff;
        border: 1px solid #e1e1e1;
        border-radius: 8px;
        padding: 12px 14px;
        margin-bottom: 12px;
    }
    .ttf-admin .wp-list-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        border: 0;
        padding: 6px 0 !important;
        text-align: right;
        font-size: 13px;
    }
    .ttf-admin .wp-list-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #666;
        text-align: left;
        margin-right: 12px;
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }
    .ttf-admin .wp-list-table tbody td.check-column { display: none; }
    .ttf-admin-stats { grid-template-columns: repeat(2, 1fr); }
    .ttf-admin h1 { font-size: 22px; flex-direction: column; align-items: flex-start; }
    .ttf-admin .tablenav.top { display: flex; flex-direction: column; gap: 10px; }
    .ttf-admin .tablenav.top form { width: 100%; }
    .ttf-admin .tablenav.top .regular-text { width: 100%; max-width: 100%; }
    .ttf-admin .tablenav.top .button { float: none !important; }
    .ttf-admin .subsubsub { padding: 0; overflow-x: auto; white-space: nowrap; }
}

/* === Actions dropdown (admin users) === */
.ttf-actions-dropdown { position: relative; display: inline-block; }
.ttf-actions-menu {
    position: absolute;
    right: 0;
    top: 100%;
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    min-width: 180px;
    z-index: 100;
    padding: 6px 0;
}
.ttf-actions-menu a {
    display: block;
    padding: 8px 14px;
    color: #2271b1;
    text-decoration: none;
    font-size: 13px;
    border-bottom: 1px solid #f0f0f0;
}
.ttf-actions-menu a:last-child { border-bottom: none; }
.ttf-actions-menu a:hover { background: #f0f6fc; }

/* === Sortable column arrows (admin) === */
.wp-list-table thead a { position: relative; }

/* === NUCLEAR MOBILE OVERRIDES === */
html, body { max-width: 100vw; overflow-x: hidden; }

@media (max-width: 900px) {
    /* Force layout to 1-column */
    .ttf-layout { display: block !important; }
    .ttf-sidebar { position: fixed !important; top: 0; left: 0; height: 100vh; width: 260px !important; transform: translateX(-100%); transition: transform 0.3s ease; z-index: 9999; overflow-y: auto; }
    .ttf-sidebar.open { transform: translateX(0); }
    .ttf-main-wrapper { margin-left: 0 !important; width: 100% !important; min-width: 0 !important; }
    .ttf-main { padding: 14px 10px !important; width: 100% !important; max-width: 100vw !important; box-sizing: border-box; }

    .ttf-topbar { padding: 12px 14px !important; position: sticky; top: 0; z-index: 100; }
    .ttf-topbar-right { gap: 8px !important; flex-wrap: wrap; justify-content: flex-end; }
    .ttf-topbar-balance { font-size: 13px !important; padding: 6px 10px !important; }
    .ttf-topbar-add-funds { font-size: 12px !important; padding: 6px 10px !important; }

    /* Promo bar smaller */
    .ttf-promo-bar { font-size: 11px !important; padding: 8px 12px !important; }

    /* Force cards/panel content to respect viewport */
    .ttf-panel, .ttf-funds-card, .ttf-card, .ttf-admin-stats, .ttf-stats-grid {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    .ttf-panel * { max-width: 100%; box-sizing: border-box; }

    /* Tables always scrollable */
    .ttf-table-wrap, .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .ttf-panel table { min-width: 0; width: 100%; font-size: 12px; }

    /* Inputs don't overflow */
    .ttf-panel input, .ttf-panel select, .ttf-panel textarea { max-width: 100%; width: 100%; box-sizing: border-box; }

    /* Headings smaller */
    .ttf-main h2 { font-size: 1.2rem !important; }
    .ttf-main h3 { font-size: 1rem !important; }
    .ttf-funds-header h2 { font-size: 16px !important; }

    /* Payment method cards compact */
    .ttf-pay-method { padding: 12px !important; gap: 10px; }
    .ttf-pay-method-sub { display: none; }
    .ttf-pay-method-title { font-size: 13px !important; }
    .ttf-pay-method-brands { gap: 4px !important; }
    .ttf-pay-logo { height: 13px !important; max-width: 30px !important; padding: 2px 3px !important; }
    .ttf-pay-icon { width: 32px !important; height: 32px !important; }

    /* Amount input */
    .ttf-amount-input { font-size: 24px !important; padding: 10px 0 !important; }
    .ttf-amount-currency { font-size: 22px !important; }

    /* Balance card */
    .ttf-balance-big { font-size: 32px !important; }

    /* Security items */
    .ttf-security-card { padding: 14px !important; }
    .ttf-security-item { font-size: 12px !important; }

    /* Stats bar */
    .ttf-stats-bar { padding: 12px !important; }
    .ttf-stat-value { font-size: 1.2rem !important; }
}

@media (max-width: 500px) {
    /* Extra small screens */
    .ttf-main { padding: 10px 8px !important; }
    .ttf-funds-card { padding: 14px 12px !important; border-radius: 12px !important; }
    .ttf-funds-header { margin-bottom: 14px !important; padding-bottom: 12px !important; }
    .ttf-preset-amounts { grid-template-columns: repeat(3, 1fr) !important; gap: 6px !important; }
    .ttf-preset { padding: 8px 0 !important; font-size: 13px !important; }
    .ttf-amount-input { font-size: 22px !important; }
    .ttf-balance-big { font-size: 28px !important; }
    .ttf-pay-method-head { flex-direction: column; align-items: flex-start; gap: 6px; }
    .ttf-bonus-badge { align-self: flex-start; }
    .ttf-pay-method-check { display: none; }
    .ttf-pay-submit { padding: 14px !important; font-size: 14px !important; }
}
