/* --- 1. LOGIN STYLES --- */
.auth-section {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--secondary);
}

.login-card {
    background: var(--bg-card);
    width: 100%; max-width: 420px;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.08);
    border: 1px solid var(--border-color);
    text-align: center;
    animation: fadeIn 0.5s ease-out;
}

.login-header { margin-bottom: 30px; }
.login-header h2 { font-size: 1.8rem; color: var(--text-main); margin-bottom: 5px; }
.login-header p { color: var(--text-muted); font-size: 0.95rem; }

.input-group { margin-bottom: 20px; text-align: left; }
.input-group label { display: block; font-size: 0.9rem; font-weight: 600; color: var(--text-main); margin-bottom: 8px; }

.input-wrapper { position: relative; }
.input-wrapper i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }

.input-wrapper input {
    width: 100%; padding: 12px 45px; 
    border: 1px solid var(--border-color); border-radius: 8px;
    font-size: 1rem; background: var(--bg-body); color: var(--text-main);
    outline: none; transition: 0.3s;
}
.input-wrapper input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0, 112, 186, 0.1); }

.toggle-pass {
    position: absolute; right: 15px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; color: var(--text-muted);
}

.btn-full-submit {
    width: 100%; background: var(--primary); color: white;
    border: none; padding: 14px; border-radius: 8px;
    font-size: 1rem; font-weight: 700; cursor: pointer; transition: 0.2s;
}
.btn-full-submit:hover { background: var(--primary-dark); transform: translateY(-2px); }
.btn-full-submit:disabled { background: #ccc; cursor: not-allowed; transform: none; }

.error-banner {
    background: rgba(255, 71, 87, 0.1); color: #ff4757;
    border: 1px solid rgba(255, 71, 87, 0.2);
    padding: 12px; border-radius: 8px; font-size: 0.9rem; font-weight: 600;
    margin-bottom: 25px; display: flex; align-items: center; justify-content: center; gap: 8px;
}

.login-link { margin-top: 20px; font-size: 0.9rem; color: var(--text-muted); }
.login-link a { color: var(--primary); font-weight: 700; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.shake { animation: shake 0.3s ease-in-out; }


/* --- 2. DASHBOARD STYLES --- */
.wallet-header {
    background: radial-gradient(circle at center, #005bea 0%, #002244 100%);
    padding: 40px 20px 80px; text-align: center; color: white;
}

.balance-card h1 { font-size: 3rem; font-weight: 800; margin-bottom: 5px; }
.balance-top { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 0.9rem; opacity: 0.8; margin-bottom: 5px; }
.eye-btn { background: none; border: none; color: white; cursor: pointer; font-size: 1rem; opacity: 0.7; }
.trend { font-size: 0.9rem; font-weight: 600; margin-bottom: 30px; display: inline-block; padding: 4px 12px; border-radius: 20px; background: rgba(255,255,255,0.1); }
.trend.positive { color: #00c851; }

.action-row { display: flex; justify-content: center; gap: 30px; }
.action-btn { background: none; border: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px; color: white; transition: 0.2s; }
.action-btn:hover { transform: translateY(-5px); }
.icon-circle { width: 50px; height: 50px; background: rgba(255,255,255,0.15); backdrop-filter: blur(5px); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; border: 1px solid rgba(255,255,255,0.1); transition: 0.2s; }
.action-btn:hover .icon-circle { background: white; color: var(--primary); }
.action-btn span { font-size: 0.85rem; font-weight: 500; }

.dashboard-section { padding: 0 20px 60px; margin-top: -40px; }
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.panel-box { background: var(--bg-card); border-radius: 16px; border: 1px solid var(--border-color); padding: 25px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.panel-box.full-width { grid-column: 1 / -1; }

.panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid var(--border-color); }
.panel-header h3 { font-size: 1.1rem; margin: 0; color: var(--text-main); display: flex; align-items: center; gap: 10px; }
.panel-header h3 i { color: var(--primary); }
.badge-blue { background: rgba(0, 112, 186, 0.1); color: var(--primary); font-size: 0.75rem; padding: 2px 8px; border-radius: 10px; font-weight: 700; text-transform: uppercase; }
.btn-text { background: none; border: none; color: var(--primary); font-weight: 600; cursor: pointer; font-size: 0.9rem; }

/* Rate Table */
.rate-table { display: flex; flex-direction: column; gap: 10px; }
.rate-row { display: flex; justify-content: space-between; padding: 12px 15px; background: var(--bg-body); border-radius: 8px; border: 1px solid var(--border-color); align-items: center; }
.rate-range { font-size: 0.9rem; color: var(--text-muted); font-weight: 500; }
.rate-earn { font-weight: 800; color: var(--text-main); }
.rate-row.highlight { border-color: var(--primary); background: rgba(0, 112, 186, 0.05); }
.rate-row.premium { border-color: #ffd700; background: rgba(255, 215, 0, 0.05); }
.rate-row.premium .rate-earn { color: #d4af37; }

/* Code Generator */
.generator-box { margin-bottom: 20px; }
.generator-box p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 10px; }
.generator-box small { font-size: 0.75rem; color: var(--text-muted); display: block; margin-top: 5px; }
.input-group-row { display: flex; gap: 10px; }
.input-group-row input { flex: 1; padding: 10px; border: 1px solid var(--border-color); border-radius: 6px; background: var(--bg-body); color: var(--text-main); font-family: monospace; text-transform: uppercase; }
.btn-generate { background: var(--primary); color: white; border: none; padding: 0 20px; border-radius: 6px; font-weight: 600; cursor: pointer; }
.active-codes-list { max-height: 200px; overflow-y: auto; }
.code-item { display: flex; justify-content: space-between; align-items: center; padding: 10px; border-bottom: 1px solid var(--border-color); }
.code-text { font-family: monospace; font-weight: 700; color: var(--text-main); letter-spacing: 1px; }
.code-stats { font-size: 0.8rem; color: var(--text-muted); }
.btn-copy-code { background: none; border: none; color: var(--primary); cursor: pointer; }

/* History */
.tx-list { display: flex; flex-direction: column; }
.tx-item { display: flex; align-items: center; justify-content: space-between; padding: 15px 0; border-bottom: 1px solid var(--border-color); }
.tx-item:last-child { border-bottom: none; }
.tx-left { display: flex; align-items: center; gap: 15px; }
.tx-icon { width: 40px; height: 40px; background: var(--bg-body); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1rem; color: var(--text-muted); border: 1px solid var(--border-color); }
.tx-icon.in { color: #00c851; background: rgba(0, 200, 81, 0.1); border-color: transparent; }
.tx-icon.out { color: #ff9f43; background: rgba(255, 159, 67, 0.1); border-color: transparent; }
.tx-info h4 { margin: 0; font-size: 0.95rem; color: var(--text-main); }
.tx-info span { font-size: 0.8rem; color: var(--text-muted); }
.tx-amount { font-weight: 700; font-size: 0.95rem; }
.tx-amount.in { color: #00c851; }
.tx-amount.out { color: var(--text-muted); }

/* Modals */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 5000; display: none; align-items: center; justify-content: center; backdrop-filter: blur(5px); }
.modal-box { background: var(--bg-card); width: 90%; max-width: 400px; padding: 25px; border-radius: 16px; box-shadow: 0 20px 50px rgba(0,0,0,0.2); animation: slideUp 0.3s; color: var(--text-main); }
.modal-header { display: flex; justify-content: space-between; margin-bottom: 20px; border-bottom: 1px solid var(--border-color); padding-bottom: 10px; }
.modal-header button { background: none; border: none; font-size: 1.2rem; cursor: pointer; color: var(--text-muted); }
.modal-input { width: 100%; padding: 12px; margin-bottom: 15px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-body); color: var(--text-main); }
.payment-grid-simple { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
.pay-option { border: 1px solid var(--border-color); padding: 15px; text-align: center; border-radius: 8px; cursor: pointer; font-weight: 600; color: var(--text-muted); transition: 0.2s; }
.pay-option:hover { background: var(--bg-body); }
.pay-option.selected { border-color: var(--primary); color: var(--primary); background: rgba(0, 112, 186, 0.05); }

@keyframes slideUp { from { transform: translateY(50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

@media (max-width: 768px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .wallet-header { padding-bottom: 60px; }
    .balance-card h1 { font-size: 2.2rem; }
}
body.dark-mode .wallet-header { background: radial-gradient(circle at center, #0f172a 0%, #020617 100%); }