/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: #f8fafc;
    color: #334155;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 {
    font-weight: 600;
    color: #0f172a;
    line-height: 1.3;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

p {
    margin-bottom: 1rem;
    color: #64748b;
}

.highlight {
    color: #4f46e5;
    font-weight: 600;
}

.subtitle {
    font-size: 1.1rem;
    color: #64748b;
    margin-bottom: 2rem;
}

/* ===== NAVIGATION ===== */
.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.8rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #4f46e5;
    text-decoration: none;
}

.nav-brand i {
    font-size: 1.8rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: #4f46e5;
    background: #f1f5f9;
}

.nav-link.active {
    color: #4f46e5;
    background: #eef2ff;
    font-weight: 600;
}

/* ===== USER MENU ===== */
.user-menu {
    position: relative;
}

.user-name {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.5rem 1rem;
    background: #f8fafc;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 500;
    color: #0f172a;
    transition: all 0.3s;
}

.user-name:hover {
    background: #f1f5f9;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 100;
}

.user-menu.show .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.75rem 1rem;
    color: #64748b;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
}

.user-dropdown a:hover {
    background: #f1f5f9;
    color: #4f46e5;
}

/* ===== CARDS ===== */
.stat-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.balance-card .stat-icon {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
}

.account-card .stat-icon {
    background: linear-gradient(135deg, #0ea5e9, #3b82f6);
    color: white;
}

.card-card .stat-icon {
    background: linear-gradient(135deg, #10b981, #34d399);
    color: white;
}

.stat-content {
    flex: 1;
}

.stat-amount {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0.25rem 0;
}

.stat-detail {
    font-size: 0.875rem;
    color: #94a3b8;
    margin: 0;
}

.stat-trend {
    color: #10b981;
    font-weight: 600;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-status.active {
    color: #10b981;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.stat-action .copy-btn {
    background: #eef2ff;
    color: #4f46e5;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.stat-action .copy-btn:hover {
    background: #4f46e5;
    color: white;
}

/* ===== GRID LAYOUTS ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.action-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    border-color: #eef2ff;
}

.action-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.action-icon.deposit {
    background: linear-gradient(135deg, #8b5cf6, #a78bfa);
    color: white;
}

.action-icon.transfer {
    background: linear-gradient(135deg, #0ea5e9, #38bdf8);
    color: white;
}

.action-icon.history {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: white;
}

.action-icon.card {
    background: linear-gradient(135deg, #10b981, #34d399);
    color: white;
}

/* ===== SECTION HEADERS ===== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 3rem 0 1.5rem;
}

.header-actions {
    display: flex;
    gap: 1rem;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.action-btn.primary {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
}

.action-btn.secondary {
    background: #eef2ff;
    color: #4f46e5;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
}

.view-all {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.view-all:hover {
    text-decoration: underline;
}

/* ===== TRANSACTIONS ===== */
.transactions-table {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.transaction-row {
    display: flex;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.3s;
}

.transaction-row:hover {
    background: #f8fafc;
}

.transaction-row:last-child {
    border-bottom: none;
}

.transaction-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-right: 1rem;
}

.deposit-icon {
    background: #dcfce7;
    color: #16a34a;
}

.withdrawal-icon {
    background: #fee2e2;
    color: #dc2626;
}

.transfer-icon {
    background: #dbeafe;
    color: #2563eb;
}

.transaction-details {
    flex: 1;
}

.transaction-details h4 {
    margin: 0 0 0.25rem;
    font-weight: 500;
}

.transaction-date {
    font-size: 0.875rem;
    color: #94a3b8;
    margin: 0;
}

.transaction-amount {
    font-weight: 600;
    font-size: 1.125rem;
}

.transaction-amount.positive {
    color: #16a34a;
}

.transaction-amount.negative {
    color: #dc2626;
}

.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #94a3b8;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* ===== SECURITY CARD ===== */
.security-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    margin-top: 2rem;
}

.security-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.5rem;
    color: #0ea5e9;
}

.security-status {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.security-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 10px;
}

.security-item i.secure {
    color: #10b981;
}

.status-badge {
    margin-left: auto;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge.enabled {
    background: #dcfce7;
    color: #166534;
}

.status-text {
    margin-left: auto;
    color: #64748b;
    font-size: 0.875rem;
}

/* ===== DEPOSIT/TRANSFER PAGES ===== */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    margin: 1.5rem 0;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s;
}

.back-btn:hover {
    background: #f1f5f9;
    color: #4f46e5;
}

.page-header {
    margin-bottom: 2rem;
}

.balance-card-large {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.balance-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.balance-header h3 {
    color: white;
    margin: 0;
}

.balance-header i {
    font-size: 2rem;
    opacity: 0.8;
}

.balance-amount {
    font-size: 3rem;
    font-weight: 700;
    margin: 0;
}

.balance-subtext {
    opacity: 0.9;
    margin: 0;
}

.deposit-container,
.transfer-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .deposit-container,
    .transfer-container {
        grid-template-columns: 1fr 2fr 1fr;
    }
}

.form-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.form-card h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.5rem;
    color: #4f46e5;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #334155;
}

.amount-input {
    position: relative;
}

.currency {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 600;
    color: #64748b;
}

.form-group input {
    width: 100%;
    padding: 1rem 1rem 1rem 2.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-hint {
    font-size: 0.875rem;
    color: #94a3b8;
    margin: 0.5rem 0 0;
}

.quick-amounts {
    margin: 1.5rem 0;
}

.section-label {
    margin-bottom: 0.75rem;
    font-weight: 500;
    color: #64748b;
}

.amount-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.amount-btn {
    padding: 0.75rem 1.5rem;
    background: #f1f5f9;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s;
}

.amount-btn:hover,
.amount-btn.active {
    background: #4f46e5;
    color: white;
    border-color: #4f46e5;
}

.method-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.method-option {
    display: block;
}

.method-option input {
    display: none;
}

.method-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.method-option input:checked + .method-content {
    border-color: #4f46e5;
    background: #eef2ff;
}

.method-content i {
    font-size: 1.5rem;
    color: #4f46e5;
}

.method-content h4 {
    margin: 0 0 0.25rem;
}

.method-content p {
    margin: 0;
    font-size: 0.875rem;
    color: #64748b;
}

.security-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #f0f9ff;
    padding: 1rem;
    border-radius: 12px;
    margin: 1.5rem 0;
    color: #0369a1;
}

.security-note i {
    margin-top: 2px;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.3);
}

/* ===== ALERTS ===== */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.alert.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert.error {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert i {
    font-size: 1.25rem;
}

/* ===== FOOTER ===== */
.footer {
    margin-top: 4rem;
    padding: 2rem 0;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: #64748b;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #4f46e5;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .nav-links {
        gap: 0.5rem;
    }
    
    .nav-link span:not(.user-name span) {
        display: none;
    }
    
    .stats-grid,
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .header-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .balance-amount {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .nav-brand span {
        display: none;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
}

/* ===== UTILITY CLASSES ===== */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.hidden { display: none; }
