* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 50%, #1d4ed8 100%);
    min-height: 100vh;
    color: #1e293b;
    animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background: linear-gradient(135deg, #2563eb 0%, #1e40af 50%, #1d4ed8 100%); }
    50% { background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 50%, #3b82f6 100%); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Form Styles */
.form-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(37, 99, 235, 0.15);
    max-width: 450px;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: containerFloat 4s ease-in-out infinite alternate;
}

@keyframes containerFloat {
    0% { transform: translateY(0px) rotate(0deg); }
    100% { transform: translateY(-3px) rotate(0.5deg); }
}

.form-container h1 {
    text-align: center;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 30px;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.5px;
    animation: pulse 2s ease-in-out infinite alternate;
}

@keyframes pulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

input, select {
    width: 100%;
    padding: 16px 20px;
    margin: 10px 0;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    background: #ffffff;
    transition: all 0.3s ease;
    outline: none;
}

input:focus, select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    transform: translateY(-2px);
    animation: focusGlow 0.3s ease;
}

@keyframes focusGlow {
    0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.3); }
    100% { box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15); }
}

button {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    margin-top: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.3);
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

button:hover::before {
    left: 100%;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.4);
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
}

button:active {
    transform: translateY(0);
}

.error {
    color: #ef4444;
    margin: 15px 0;
    padding: 12px 16px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 8px;
    border-left: 4px solid #ef4444;
    font-size: 14px;
}

.success {
    color: #10b981;
    margin: 15px 0;
    padding: 12px 16px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 8px;
    border-left: 4px solid #10b981;
    font-size: 14px;
}

/* Dashboard Styles */
.dashboard, .admin-dashboard {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 30px;
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(37, 99, 235, 0.12);
    width: 100%;
    max-width: 900px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: dashboardEntrance 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes dashboardEntrance {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f1f5f9;
}

.header h1, .header h2 {
    color: #1e293b;
    font-weight: 700;
    font-size: 28px;
    letter-spacing: -0.5px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Profile Dropdown */
.profile-dropdown {
    position: relative;
    display: inline-block;
}

.profile-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    background: rgba(37, 99, 235, 0.1);
    border: 2px solid rgba(37, 99, 235, 0.2);
    border-radius: 30px;
    color: #2563eb;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: auto;
    margin: 0;
    backdrop-filter: blur(10px);
}

.profile-btn:hover {
    background: rgba(37, 99, 235, 0.2);
    border-color: rgba(37, 99, 235, 0.4);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2);
}

.profile-dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: white;
    min-width: 200px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    z-index: 1000;
    border: 1px solid rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.profile-dropdown-content.show {
    display: block;
    animation: dropdownSlide 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-dropdown-content a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f3f4f6;
}

.profile-dropdown-content a:last-child {
    border-bottom: none;
}

.profile-dropdown-content a:hover {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    color: #2563eb;
    transform: translateX(5px);
    padding-left: 20px;
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-15px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Balance Card */
.balance-card {
    background: linear-gradient(135deg, #2563eb, #1d4ed8, #1e40af);
    color: white;
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 15px 40px rgba(37, 99, 235, 0.4);
    position: relative;
    overflow: hidden;
    animation: cardFloat 3s ease-in-out infinite alternate;
}

@keyframes cardFloat {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-5px); }
}

.balance-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    pointer-events: none;
    animation: shimmer 4s ease infinite;
}

@keyframes shimmer {
    0%, 100% { transform: rotate(0deg); opacity: 0.3; }
    50% { transform: rotate(180deg); opacity: 0.6; }
}

.balance-card .label {
    font-size: 16px;
    opacity: 0.9;
    font-weight: 500;
    margin-bottom: 8px;
}

.balance-card h1 {
    font-size: 42px;
    font-weight: 700;
    letter-spacing: -1px;
    margin: 0;
}

/* Sections */
.transfer-section, .transactions-section, .create-manager-section, .add-balance-section, .create-admin-section, .theme-section, .bulk-register-section, .password-section {
    background: #ffffff;
    padding: 25px;
    border-radius: 16px;
    margin: 20px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
}

.transfer-section h3, .transactions-section h3, .create-manager-section h3, .add-balance-section h3, .create-admin-section h3, .theme-section h3, .bulk-register-section h3, .password-section h3 {
    color: #1e293b;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 600;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stat-card {
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    padding: 25px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 40px rgba(37, 99, 235, 0.15);
    border-color: rgba(37, 99, 235, 0.2);
}

.stat-card.clickable {
    cursor: pointer;
}

.stat-card h3 {
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card div {
    font-size: 32px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    letter-spacing: -0.5px;
    animation: numberPulse 2s ease-in-out infinite;
}

@keyframes numberPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Amount Input */
.amount-input {
    position: relative;
    margin: 10px 0;
}

.amount-input .currency {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-weight: 600;
    z-index: 1;
}

.amount-input input {
    padding-left: 50px;
}

/* Transaction Styles */
.transaction-item {
    padding: 20px 15px;
    border-bottom: 1px solid rgba(37, 99, 235, 0.1);
    border-radius: 10px;
    margin: 5px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    background: linear-gradient(135deg, transparent, rgba(37, 99, 235, 0.02));
}

.transaction-item:hover {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(37, 99, 235, 0.08));
    transform: translateX(5px) scale(1.01);
    border-color: rgba(37, 99, 235, 0.2);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.1);
}

.transaction-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.transaction-icon {
    font-size: 16px;
    width: 20px;
    display: inline-block;
}

.transaction-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #64748b;
}

.transaction-id {
    font-weight: 500;
    color: #94a3b8;
}

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

.transaction-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.transaction-type {
    font-size: 16px;
    color: #475569;
    font-weight: 500;
}

.transaction-amount {
    font-size: 18px;
    font-weight: 700;
    margin: 2px 0;
}

.transaction-date {
    font-size: 13px;
    color: #94a3b8;
    font-weight: 500;
}

.outgoing {
    color: #ef4444;
}

.incoming {
    color: #10b981;
}

.admin-transaction {
    color: #8b5cf6;
}

/* Buttons */
.logout-btn, .back-btn {
    color: #4f7cff;
    text-decoration: none;
    font-size: 14px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    width: auto;
    margin: 0;
}

.logout-btn:hover, .back-btn:hover {
    background: rgba(79, 124, 255, 0.1);
    transform: translateY(-1px);
}

.config-button, .theme-btn, .bulk-submit-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    width: auto;
    margin: 5px;
}

.config-button:hover, .theme-btn:hover, .bulk-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.change-password-btn {
    text-decoration: none;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    margin: 5% auto;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-height: 80vh;
    overflow-y: auto;
}

.close {
    color: #94a3b8;
    float: right;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
}

.close:hover {
    color: #ef4444;
    transform: scale(1.1);
}

.user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #f1f5f9;
    border-radius: 8px;
    margin: 5px 0;
    transition: all 0.3s ease;
}

.user-item:hover {
    background: rgba(79, 124, 255, 0.05);
}

.delete-user {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
    width: auto;
    margin: 0;
}

.delete-user:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* User List Footer */
.user-list-footer {
    margin-top: 20px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border-top: 2px solid #e2e8f0;
}

.footer-stats {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.footer-stat {
    flex: 1;
    text-align: center;
    padding: 10px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #e2e8f0;
}

.footer-stat strong {
    color: #1e293b;
    font-size: 14px;
    display: block;
    margin-bottom: 4px;
}

/* Bulk Registration Styles */
.bulk-register-form {
    background: #ffffff;
    padding: 25px;
    border-radius: 16px;
    margin: 20px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
}

.user-forms {
    margin: 20px 0;
}

.user-form-item {
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    margin: 15px 0;
    border: 1px solid #e2e8f0;
}

.user-form-item h4 {
    color: #1e293b;
    margin-bottom: 15px;
    font-weight: 600;
}

.bulk-actions {
    text-align: center;
    margin-top: 20px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.theme-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.theme-status {
    margin-top: 15px;
    color: #64748b;
    font-size: 14px;
}

.loading {
    text-align: center;
    color: #64748b;
    padding: 20px;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .dashboard, .admin-dashboard {
        padding: 20px;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .bulk-actions {
        flex-direction: column;
    }
    
    .theme-options {
        justify-content: center;
    }
    
    .profile-dropdown-content {
        right: auto;
        left: 0;
    }
}

/* Theme Styles */
.bank-theme {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
}

.bank-theme .balance-card {
    background: linear-gradient(135deg, #1e40af, #1e3a8a);
}

.nubank-theme {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.nubank-theme .balance-card {
    background: linear-gradient(135deg, #7c3aed, #8b5cf6);
}

.itau-theme {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.itau-theme .balance-card {
    background: linear-gradient(135deg, #d97706, #f59e0b);
}

.mercadopago-theme {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
}

.mercadopago-theme .balance-card {
    background: linear-gradient(135deg, #0284c7, #0ea5e9);
}

.minimal-theme {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.minimal-theme .balance-card {
    background: linear-gradient(135deg, #64748b, #475569);
}

.dark-theme {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}

.dark-theme .dashboard, .dark-theme .admin-dashboard {
    background: rgba(31, 41, 55, 0.95);
    color: #f9fafb;
}

.dark-theme .balance-card {
    background: linear-gradient(135deg, #374151, #1f2937);
}

.dark-theme .transfer-section, .dark-theme .transactions-section, 
.dark-theme .create-manager-section, .dark-theme .add-balance-section, 
.dark-theme .create-admin-section, .dark-theme .theme-section, 
.dark-theme .bulk-register-section, .dark-theme .password-section {
    background: #374151;
    color: #f9fafb;
}

.dark-theme input, .dark-theme select {
    background: #4b5563;
    border-color: #6b7280;
    color: #f9fafb;
}

.green-theme {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.green-theme .balance-card {
    background: linear-gradient(135deg, #059669, #10b981);
}
