/* Transfer Specific Styles */
.transfer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--dark);
}

.transfer-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 992px) {
    .transfer-container {
        grid-template-columns: 1fr;
    }
}

.transfer-form-container {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.transfer-form-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--dark);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-light);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 75, 140, 0.1);
}

.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.account-option {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.account-option-info {
    flex: 1;
}

.account-option-name {
    font-weight: 500;
}

.account-option-number {
    font-size: 0.85rem;
    color: var(--gray);
}

.account-option-balance {
    font-weight: 600;
    color: var(--dark);
}

.transfer-summary {
    background: var(--light);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.transfer-summary-title {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--dark);
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.summary-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.summary-label {
    color: var(--gray);
}

.summary-value {
    font-weight: 500;
}

.transfer-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    flex: 1;
}

.btn-success {
    background-color: var(--success);
    color: white;
}

.btn-success:hover {
    background-color: #218838;
}

.btn-disabled {
    background-color: var(--gray-light);
    color: var(--gray);
    cursor: not-allowed;
    opacity: 0.6;
}

.recent-transfers {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--dark);
}

.transfer-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-light);
}

.transfer-item:last-child {
    border-bottom: none;
}

.transfer-info {
    flex: 1;
}

.transfer-description {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.transfer-meta {
    font-size: 0.85rem;
    color: var(--gray);
}

.transfer-amount {
    font-weight: 600;
    font-size: 1.1rem;
}

.transfer-credit {
    color: var(--success);
}

.transfer-debit {
    color: var(--danger);
}

.no-data {
    text-align: center;
    padding: 3rem;
    color: var(--gray);
}

.no-data i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.2);
    color: var(--success);
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.2);
    color: var(--danger);
}

/* External Account Styles */
.external-account-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid var(--gray-light);
    border-radius: var(--border-radius);
    margin-bottom: 0.75rem;
    background: var(--light);
}

.external-account-info {
    flex: 1;
}

.external-account-name {
    font-weight: 500;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.external-account-details {
    font-size: 0.85rem;
    color: var(--gray);
}

.external-account-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

.add-external-account {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border: 2px dashed var(--gray-light);
    border-radius: var(--border-radius);
    color: var(--gray);
    text-decoration: none;
    transition: var(--transition);
    margin-top: 1rem;
    cursor: pointer;
    background: white;
}

.add-external-account:hover {
    border-color: var(--primary);
    color: var(--primary);
    background-color: rgba(26, 75, 140, 0.05);
}

/* Modal improvements */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark);
}

.close {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray);
    transition: var(--transition);
    background: none;
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close:hover {
    color: var(--dark);
    background-color: var(--gray-light);
    border-radius: 50%;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-light);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    position: sticky;
    bottom: 0;
    background: white;
}

/* External Account Form Styles */
.external-account-form {
    display: grid;
    gap: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.region-info {
    background: var(--light);
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.region-info h4 {
    margin-bottom: 0.5rem;
    color: var(--primary);
}

/* ===== PROFILE PICTURE STYLES FOR TRANSFER PAGE ===== */
.user-avatar {
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

/* Default size for most avatars */
.user-avatar {
    width: 50px;
    height: 50px;
    font-size: 1rem;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

/* Mobile header avatar */
.mobile-header .user-avatar {
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
    margin-right: 0;
}

.mobile-header .user-avatar img {
    border: 2px solid rgba(255, 255, 255, 0.4);
}

/* Main header avatar */
.header .user-avatar {
    width: 60px;
    height: 60px;
    font-size: 1.2rem;
    margin-right: 1rem;
}

.header .user-avatar img {
    border: 2px solid rgba(255, 255, 255, 0.2);
}

/* Ensure user info displays properly */
.user-info {
    display: flex;
    align-items: center;
}

.user-info .user-avatar {
    flex-shrink: 0;
}

/* Mobile styles for transfer page */
@media (max-width: 768px) {
    .transfer-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .transfer-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .transfer-form-container,
    .recent-transfers {
        padding: 1.5rem;
    }
    
    .transfer-actions {
        flex-direction: column;
    }
    
    .external-account-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .external-account-actions {
        align-self: flex-end;
    }
    
    /* Ensure sidebar is properly positioned on mobile */
    .sidebar {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        z-index: 1001;
        width: 280px;
    }
    
    .mobile-header {
        z-index: 1002;
    }
    
    /* Mobile profile picture adjustments */
    .user-avatar {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .mobile-header .user-avatar {
        width: 38px;
        height: 38px;
        font-size: 0.85rem;
    }
    
    .header .user-avatar {
        width: 52px;
        height: 52px;
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    /* Extra small screen profile pictures */
    .user-avatar {
        width: 42px;
        height: 42px;
        font-size: 0.95rem;
    }
    
    .mobile-header .user-avatar {
        width: 36px;
        height: 36px;
        font-size: 0.8rem;
    }
    
    .header .user-avatar {
        width: 46px;
        height: 46px;
        font-size: 1rem;
    }
}

/* Animation for avatar loading */
@keyframes avatarFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.user-avatar img {
    animation: avatarFadeIn 0.3s ease-out;
}

/* Focus states for accessibility */
.user-avatar:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .user-avatar {
        border: 2px solid currentColor;
    }
    
    .user-avatar img {
        border: 2px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .user-avatar img {
        animation: none;
    }
}
/* Mobile sidebar styles - Ensure this is in all CSS files */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%) !important;
        transition: transform 0.3s ease !important;
        width: 280px !important;
        display: block !important;
        position: fixed !important;
        height: 100vh !important;
        z-index: 1000 !important;
        top: 0 !important;
        left: 0 !important;
    }
    
    .sidebar.active {
        transform: translateX(0) !important;
        box-shadow: 2px 0 15px rgba(0, 0, 0, 0.3) !important;
    }
    
    .mobile-header {
        display: flex !important;
        position: sticky;
        top: 0;
        z-index: 1001;
    }
    
    .mobile-menu-btn {
        background: none;
        border: none;
        color: white;
        font-size: 1.5rem;
        cursor: pointer;
        padding: 0.5rem;
        z-index: 1002;
    }
    
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }
}

/* Overlay styles */
#sidebarOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

/* TEMPORARY DEBUG STYLES - REMOVE AFTER FIX */
#sidebar {
    border: 3px solid red !important;
}

#mobileMenuBtn {
    border: 3px solid blue !important;
}

@media (max-width: 768px) {
    #sidebar {
        border: 3px solid green !important;
        background: red !important;
    }
    
    #sidebar.active {
        border: 3px solid yellow !important;
        background: green !important;
    }
}

/* MOBILE MENU FIXED STYLES */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%) !important;
        transition: transform 0.3s ease-in-out !important;
        width: 280px !important;
        position: fixed !important;
        height: 100vh !important;
        z-index: 1000 !important;
        top: 0 !important;
        left: 0 !important;
        background: linear-gradient(180deg, var(--primary) 0%, var(--primary-light) 100%) !important;
        display: block !important;
    }
    
    .sidebar.active {
        transform: translateX(0) !important;
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.3) !important;
    }
    
    .mobile-header {
        display: flex !important;
        position: relative;
        z-index: 1001;
    }
    
    .mobile-menu-btn {
        background: none !important;
        border: none !important;
        color: white !important;
        font-size: 1.5rem !important;
        cursor: pointer !important;
        padding: 0.5rem !important;
        z-index: 1002 !important;
    }
    
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }
}

/* Overlay */
#mobileOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}