/* ============================================
   DASHBOARD SPECIFIC STYLES
   ============================================ */

/* Dashboard Layout */
.dashboard-layout {
    display: flex;
    min-height: calc(100vh - 72px);
}

.dashboard-sidebar {
    width: 260px;
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border);
    padding: 24px 0;
}

.dashboard-main {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
}

/* Sidebar Navigation */
.sidebar-nav {
    padding: 0 16px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    margin-bottom: 4px;
}

.sidebar-link i {
    width: 20px;
    font-size: 1.1rem;
}

.sidebar-link:hover {
    background-color: var(--bg-tertiary);
    color: var(--accent-primary);
}

.sidebar-link.active {
    background-color: var(--accent-primary);
    color: white;
}

.sidebar-link.active i {
    color: white;
}

/* Stat Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.stat-icon {
    width: 48px;
    height: 48px;
    background-color: var(--accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.stat-info h3 {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.stat-info .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.section-header h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.section-header h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
}

/* Cards */
.dashboard-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Pending Badge */
.pending-badge {
    background-color: var(--warning);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-left: 8px;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-pending {
    background-color: rgba(183, 110, 0, 0.1);
    color: var(--warning);
}

.status-approved {
    background-color: rgba(11, 126, 67, 0.1);
    color: var(--success);
}

.status-rejected {
    background-color: rgba(217, 43, 43, 0.1);
    color: var(--error);
}

/* Transaction Items */
.transaction-item,
.pending-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

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

.transaction-info h4 {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.transaction-meta {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.transaction-amount {
    font-weight: 600;
    text-align: right;
}

.amount-sent {
    color: var(--error);
}

.amount-received {
    color: var(--success);
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-secondary);
}

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

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 12px;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

.mobile-menu-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    background-color: var(--card-bg);
    border-left: 1px solid var(--border);
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 2001;
    overflow-y: auto;
}

.mobile-menu-overlay.active .mobile-menu-panel {
    right: 0;
}

.mobile-menu-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-menu-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.mobile-menu-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    line-height: 1;
}

.mobile-menu-close:hover {
    background-color: var(--bg-tertiary);
    color: var(--error);
}

.mobile-menu-items {
    padding: 16px;
}

.mobile-menu-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    margin-bottom: 4px;
}

.mobile-menu-item i {
    width: 24px;
    color: var(--accent-primary);
    font-size: 1.2rem;
}

.mobile-menu-item:hover,
.mobile-menu-item.active {
    background-color: var(--bg-tertiary);
    color: var(--accent-primary);
}

.mobile-menu-item.active i {
    color: var(--accent-primary);
}

.mobile-menu-divider {
    height: 1px;
    background-color: var(--border);
    margin: 16px 0;
}

.mobile-menu-section {
    margin-bottom: 24px;
}

.mobile-menu-section-title {
    padding: 8px 16px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.mobile-menu-language {
    padding: 8px 16px 16px;
}

.mobile-menu-language select {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
    cursor: pointer;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
}

.mobile-menu-toggle:hover {
    background-color: var(--bg-tertiary);
}

/* Investment Calculator */
.roi-display {
    margin-top: 16px;
    padding: 12px;
    background-color: var(--bg-tertiary);
    border-radius: 8px;
    color: var(--success);
    font-weight: 500;
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 24px;
    display: none;
    z-index: 9999;
    box-shadow: var(--shadow);
    color: white;
}

.toast-success {
    background-color: var(--success);
}

.toast-error {
    background-color: var(--error);
}

.toast-info {
    background-color: var(--accent-primary);
}

/* PIN Input */
.pin-input {
    font-size: 1.5rem;
    letter-spacing: 8px;
    text-align: center;
    font-weight: 600;
}

/* Modal Form Styles */
.modal-form .form-group {
    margin-bottom: 20px;
}

.modal-form .form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.modal-form .form-input,
.modal-form .form-select {
    width: 100%;
    padding: 12px;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.modal-form .form-input:focus,
.modal-form .form-select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

/* Welcome Header */
.welcome-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.welcome-header h1 {
    font-size: 1.75rem;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.account-type {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ============================================
   RESPONSIVE DESIGN - FIXED
   ============================================ */

@media (max-width: 992px) {
    .dashboard-sidebar {
        width: 220px;
    }
}

@media (max-width: 768px) {
    /* Remove the display: none from nav-actions */
    .nav-actions {
        display: flex !important; /* Keep showing the nav actions */
        gap: 8px;
    }
    
    /* Adjust the user menu button for mobile */
    .dropdown .btn-small {
        padding: 8px 12px;
    }
    
    /* Hide the username text on mobile, keep only icon and chevron */
    .dropdown .btn-small span:not(.fa-icon) {
        display: none;
    }
    
    /* Make the settings icon smaller if needed */
    .icon-button {
        padding: 8px;
        font-size: 1.1rem;
    }
    
    /* Adjust theme toggle size */
    .theme-toggle {
        padding: 8px;
        font-size: 1.1rem;
    }
    
    /* Show mobile menu toggle */
    .mobile-menu-toggle {
        display: block;
    }
    
    /* Dashboard layout adjustments */
    .dashboard-layout {
        flex-direction: column;
    }
    
    .dashboard-sidebar {
        display: none; /* Hide sidebar on mobile, using mobile menu instead */
        width: 100%;
        padding: 16px;
    }
    
    .dashboard-main {
        padding: 16px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .action-buttons {
        width: 100%;
    }
    
    .action-buttons .btn {
        flex: 1;
    }
    
    /* Welcome header adjustments */
    .welcome-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .welcome-header h1 {
        font-size: 1.5rem;
    }
    
    /* Modal adjustments for mobile */
    .modal {
        width: 90%;
        margin: 20px;
        max-height: 90vh;
    }
    
    /* Transaction items adjustments */
    .transaction-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .transaction-amount {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    /* Section header adjustments */
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .section-header .btn {
        width: 100%;
    }
    
    /* Card header adjustments */
    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    /* Even smaller screens */
    .nav-container {
        padding: 12px 16px;
    }
    
    .logo span {
        display: none; /* Hide logo text on very small screens, keep only icon */
    }
    
    .logo-img {
        height: 32px !important;
        width: 32px !important;
        margin-right: 0 !important;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .stat-info .stat-value {
        font-size: 1.25rem;
    }
    
    .empty-state {
        padding: 32px 16px;
    }
    
    .empty-state i {
        font-size: 2.5rem;
    }
}

/* Fix for the nav-links if they exist in your main.css */
/* If you have nav-links in your main navigation, make sure they're hidden on mobile */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* Hide navigation links on mobile */
    }
}

/* Optional: Make the settings icon look better */
.icon-button {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-button:hover {
    background-color: var(--bg-tertiary);
    color: var(--accent-primary);
}

/* Better dropdown styling for mobile */
@media (max-width: 768px) {
    .dropdown-menu.right {
        right: -10px;
        min-width: 180px;
    }
    
    .dropdown-item {
        padding: 12px 16px;
    }
}