/* Global Styles - Navigation & Footer */

:root {
    --primary-color: #4361ee;
    --primary-light: #e0e7ff;
    --primary-dark: #3730a3;
    --secondary-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --dark: #1e293b;
    --gray-700: #334155;
    --gray-600: #475569;
    --gray-500: #64748b;
    --gray-400: #94a3b8;
    --gray-300: #cbd5e1;
    --gray-200: #e2e8f0;
    --gray-100: #f1f5f9;
    --gray-50: #f8fafc;
    --white: #ffffff;
    --box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    --box-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);

    /* merged from auth :root */
    --primary: #4361ee;
    --secondary: #10b981;
    --danger: #dc2626;
    --warning: #f59e0b;
    --shadow-sm: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}

/* Modern Navigation Bar */
.app-navbar {
    background: var(--white);
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--gray-200);
}

.nav-container-fluid {
    max-width: 100%;
    margin: 0;
    padding: .75rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-main {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.2;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
    border-bottom: 2px solid transparent;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* User Menu */
.nav-user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.notification-badge {
    position: relative;
    cursor: pointer;
}

.notification-badge .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger-color);
    color: white;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.user-dropdown {
    position: relative;
}

.user-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.user-dropdown-toggle:hover {
    background: var(--gray-100);
}

.user-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    color: var(--primary-color);
    font-size: 1.5rem;
}

.user-avatar-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-name-small {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-700);
}

.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    width: 200px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--box-shadow-lg);
    border: 1px solid var(--gray-200);
    padding: 0.5rem 0;
    display: none;
    z-index: 1000;
}

.user-dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--gray-700);
    text-decoration: none;
    transition: background 0.2s ease;
    width: 100%;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.9rem;
    text-align: left;
}

.dropdown-item:hover {
    background: var(--gray-100);
}

.dropdown-divider {
    height: 1px;
    background: var(--gray-200);
    margin: 0.5rem 0;
}

/* Profile Summary */
.profile-summary-container {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.profile-summary {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.75rem 2rem;
    cursor: pointer;
}

.profile-summary-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.profile-avatar-medium {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.2);
    font-size: 2rem;
}

.profile-avatar-medium img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info-compact {
    flex: 1;
}

.profile-name {
    font-weight: 600;
    display: block;
    margin-bottom: 0.2rem;
}

.balance-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.balance-amount {
    font-weight: 600;
}

.balance-toggle {
    background: none;
    border: none;
    color: rgba(255,255,255,0.8);
    cursor: pointer;
    padding: 0.2rem;
}

.balance-toggle:hover {
    color: white;
}

.profile-expand-icon {
    color: rgba(255,255,255,0.8);
}

.profile-summary-content {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.profile-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
}

.stat-item {
    text-align: center;
}

.stat-label {
    font-size: 0.8rem;
    opacity: 0.8;
    display: block;
    margin-bottom: 0.2rem;
}

.stat-value {
    font-weight: 700;
    font-size: 1.2rem;
}

.profile-actions {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.profile-action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.2);
    border-radius: 8px;
    color: white;
    text-decoration: none;
    font-size: 0.85rem;
    transition: background 0.2s ease;
}

.profile-action-btn:hover {
    background: rgba(255,255,255,0.3);
}

.recent-transactions {
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 1rem;
}

.recent-transactions h4 {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.transaction-list {
    max-height: 200px;
    overflow-y: auto;
}

.transaction-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

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

.transaction-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.2);
}

.transaction-icon.green {
    color: #4ade80;
}

.transaction-icon.red {
    color: #f87171;
}

.transaction-details {
    flex: 1;
}

.transaction-desc {
    font-size: 0.9rem;
    display: block;
}

.transaction-time {
    font-size: 0.7rem;
    opacity: 0.7;
}

.transaction-amount {
    font-weight: 600;
}

.transaction-amount.green {
    color: #4ade80;
}

.transaction-amount.red {
    color: #f87171;
}

.view-all-link {
    display: block;
    text-align: center;
    margin-top: 0.5rem;
    color: white;
    text-decoration: none;
    font-size: 0.8rem;
    opacity: 0.8;
}

.view-all-link:hover {
    opacity: 1;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.menu-toggle .bar {
    width: 25px;
    height: 2px;
    background: var(--gray-600);
    margin: 3px 0;
    transition: all 0.3s ease;
}

/* App Content */
.app-content {
    min-height: calc(100vh - 300px);
    background: var(--gray-50);
}

/* Footer */
.footer-modern {
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    padding: 3rem 0 1.5rem;
}

.footer-container-fluid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark);
}

.footer-logo i {
    color: var(--primary-color);
}

.footer-description {
    color: var(--gray-600);
    font-size: 0.9rem;
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 36px;
    height: 36px;
    background: var(--gray-100);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-600);
    text-decoration: none;
    transition: all 0.2s ease;
}

.social-link:hover {
    background: var(--primary-color);
    color: var(--white);
}

.footer-title {
    color: var(--dark);
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--gray-600);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.contact-info {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-info li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--gray-600);
    font-size: 0.9rem;
}

.contact-info i {
    color: var(--primary-color);
    width: 18px;
}

.footer-bottom {
    border-top: 1px solid var(--gray-200);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--gray-500);
    font-size: 0.85rem;
}

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

.footer-bottom-links a {
    color: var(--gray-500);
    text-decoration: none;
}

.footer-bottom-links a:hover {
    color: var(--primary-color);
}

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 2rem;
        transform: translateY(-150%);
        transition: transform 0.3s ease;
        opacity: 0;
        visibility: hidden;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-links {
        flex-direction: column;
        width: 100%;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-stats {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .profile-actions {
        flex-wrap: wrap;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}



/* Navigation Auth Buttons */
.nav-auth-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 20px;
}

.btn-login-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 28px;
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(67, 97, 238, 0.1);
}

.btn-register-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 28px;
    background: var(--primary);
    color: white;
    border: 2px solid var(--primary);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(67, 97, 238, 0.3);
}

.btn-login-nav:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(67, 97, 238, 0.3);
}

.btn-register-nav:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(67, 97, 238, 0.4);
}

.btn-login-nav i, .btn-register-nav i {
    font-size: 1rem;
}

/* Auth Main Container */
.auth-main {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    background: linear-gradient(135deg, #f5f7ff 0%, #ffffff 100%);
}

.auth-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

/* Auth Card */
.auth-card {
    background: white;
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
}

.auth-card:hover {
    transform: translateY(-5px);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h2 {
    color: var(--dark);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-header p {
    color: var(--gray-500);
    font-size: 1rem;
}

/* Form Styles */
.auth-form {
    margin: 2rem 0;
}

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

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.5rem;
    color: var(--gray-700);
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group label i {
    color: var(--primary);
    font-size: 1rem;
}

.form-group input {
    width: 100%;
    padding: 1rem 1.2rem;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--white);
    box-sizing: border-box; /* This prevents overflow */
}

.form-group input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.1);
}

.form-group input::placeholder {
    color: var(--gray-400);
}

/* Password Input */
.password-input {
    position: relative;
    width: 100%;
}

.password-input input {
    width: 100%;
    padding-right: 50px;
    box-sizing: border-box;
}

.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-500);
    cursor: pointer;
    padding: 4px;
    font-size: 18px;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: var(--primary);
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2rem 0;
    flex-wrap: wrap;
    gap: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-600);
    cursor: pointer;
    font-size: 0.95rem;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.forgot-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Submit Button */
button[type="submit"] {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(67, 97, 238, 0.3);
}

button[type="submit"]:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(67, 97, 238, 0.4);
}

button[type="submit"]:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-loader {
    display: none;
}

.btn-loader i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error Message */
.error-message {
    background: #fee2e2;
    color: var(--danger);
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    border-left: 4px solid var(--danger);
    display: none;
}

/* Success Message */
.success-message {
    background: #e7f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    display: none;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-200);
    color: var(--gray-600);
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-auth-buttons {
        flex-direction: column;
        width: 100%;
        margin-left: 0;
    }

    .btn-login-nav, .btn-register-nav {
        width: 100%;
        text-align: center;
    }

    .auth-main {
        padding: 2rem 1rem;
    }

    .auth-card {
        padding: 2rem;
    }

    .auth-header h2 {
        font-size: 1.75rem;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 1.5rem;
    }
}

/* ===== AUTHENTICATED NAVIGATION STYLES ===== */
.nav-user-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-left: 2rem;
}

.notification-badge {
    position: relative;
    cursor: pointer;
    color: #64748b;
    font-size: 1.2rem;
}

.notification-badge .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc2626;
    color: white;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.user-dropdown {
    position: relative;
}

.user-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background 0.2s;
    color: #1e293b;
}

.user-dropdown-toggle:hover {
    background: #f1f5f9;
}

.user-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e0e7ff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4361ee;
    font-weight: 600;
    font-size: 1rem;
}

.user-name-small {
    font-size: 0.9rem;
    font-weight: 500;
}

.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    width: 200px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    border: 1px solid #e2e8f0;
    padding: 0.5rem 0;
    display: none;
    z-index: 1000;
}

.user-dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #1e293b;
    text-decoration: none;
    transition: background 0.2s;
    width: 100%;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.9rem;
    text-align: left;
}

.dropdown-item:hover {
    background: #f1f5f9;
}

.dropdown-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 0.5rem 0;
}

/* Profile Summary */
.profile-summary-container {
    background: linear-gradient(135deg, #4361ee, #3730a3);
    color: white;
}

.profile-summary {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.75rem 2rem;
    cursor: pointer;
}

.profile-summary-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.profile-avatar-medium {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.2);
    font-size: 2rem;
}

.profile-avatar-medium img,
.profile-avatar-medium i {
    width: 100%;
    height: 100%;
    object-fit: cover;
    color: white;
}

.profile-info-compact {
    flex: 1;
}

.profile-name {
    font-weight: 600;
    display: block;
    margin-bottom: 0.2rem;
}

.balance-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.balance-amount {
    font-weight: 600;
}

.balance-toggle {
    background: none;
    border: none;
    color: rgba(255,255,255,0.8);
    cursor: pointer;
    padding: 0.2rem;
}

.balance-toggle:hover {
    color: white;
}

.profile-expand-icon {
    color: rgba(255,255,255,0.8);
}

.profile-summary-content {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.profile-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
}

.stat-item {
    text-align: center;
}

.stat-label {
    font-size: 0.8rem;
    opacity: 0.8;
    display: block;
    margin-bottom: 0.2rem;
}

.stat-value {
    font-weight: 700;
    font-size: 1.2rem;
}

.profile-actions {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.profile-action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.2);
    border-radius: 8px;
    color: white;
    text-decoration: none;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.profile-action-btn:hover {
    background: rgba(255,255,255,0.3);
}

.recent-transactions {
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 1rem;
}

.recent-transactions h4 {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.transaction-list {
    max-height: 200px;
    overflow-y: auto;
}

.transaction-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

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

.transaction-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.2);
}

.transaction-icon.green {
    color: #4ade80;
}

.transaction-icon.red {
    color: #f87171;
}

.transaction-details {
    flex: 1;
}

.transaction-desc {
    font-size: 0.9rem;
    display: block;
}

.transaction-time {
    font-size: 0.7rem;
    opacity: 0.7;
}

.transaction-amount {
    font-weight: 600;
}

.transaction-amount.green {
    color: #4ade80;
}

.transaction-amount.red {
    color: #f87171;
}

.view-all-link {
    display: block;
    text-align: center;
    margin-top: 0.5rem;
    color: white;
    text-decoration: none;
    font-size: 0.8rem;
    opacity: 0.8;
}

.view-all-link:hover {
    opacity: 1;
}

/* ===== UPDATED NAVIGATION STYLES ===== */
.user-info-display {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: #f8fafc;
    border-radius: 30px;
    border: 1px solid #e2e8f0;
    margin-left: 1rem;
}

.user-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4361ee, #3730a3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1rem;
}

.user-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: #1e293b;
}

.logout-btn {
    color: #dc2626 !important;
}

.logout-btn:hover {
    color: #b91c1c !important;
    background: #fee2e2 !important;
}

@media (max-width: 768px) {
    .user-info-display {
        margin-left: 0;
        margin-top: 1rem;
        width: 100%;
        justify-content: center;
    }
    
    .nav-links {
        width: 100%;
    }
    
    .nav-link {
        justify-content: center;
    }
}

/* ===== LOGOUT BUTTON STYLES (matching login button) ===== */
.btn-logout-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 28px;
    background: transparent;
    color: #dc2626;
    border: 2px solid #dc2626;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-left: 10px;
}

.btn-logout-nav:hover {
    background: #dc2626;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.3);
}

/* User name display */
.user-name-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #f8fafc;
    border-radius: 30px;
    border: 1px solid #e2e8f0;
    margin-left: 1rem;
}

.welcome-text {
    color: #64748b;
    font-size: 0.9rem;
}

.user-name-bold {
    font-weight: 700;
    color: #4361ee;
    font-size: 1rem;
}

@media (max-width: 768px) {
    .user-name-display {
        margin-left: 0;
        margin-top: 1rem;
        width: 100%;
        justify-content: center;
    }
    
    .btn-logout-nav {
        margin-left: 0;
        margin-top: 0.5rem;
        width: 100%;
    }
}

/* ===== MOBILE RESPONSIVE STYLES ===== */
@media (max-width: 992px) {
    .nav-container-fluid {
        padding: .75rem 1rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .menu-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    /* Navigation */
    .menu-toggle {
        display: flex;
        flex-direction: column;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 2rem;
        transform: translateY(-150%);
        transition: transform 0.3s ease;
        opacity: 0;
        visibility: hidden;
        box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
        z-index: 1000;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

    .nav-link {
        padding: 1rem;
        justify-content: flex-start;
        border-bottom: 1px solid #f1f5f9;
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    .user-name-bold {
        margin: 1rem 0;
        text-align: center;
        width: 100%;
    }

    .btn-logout-nav {
        width: 100%;
        margin: 1rem 0 0 0;
    }

    /* Profile Summary */
    .profile-summary {
        padding: 0.75rem 1rem;
    }

    .profile-summary-header {
        flex-wrap: wrap;
    }

    .profile-avatar-medium {
        width: 35px;
        height: 35px;
        font-size: 1.5rem;
    }

    .profile-info-compact {
        flex: 1;
        min-width: 150px;
    }

    .profile-name {
        font-size: 0.9rem;
    }

    .balance-container {
        font-size: 0.8rem;
    }

    .profile-expand-icon {
        margin-left: auto;
    }

    /* Profile Summary Content */
    .profile-stats {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .stat-item {
        flex: 1;
        min-width: 80px;
    }

    .profile-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .profile-action-btn {
        width: 100%;
        justify-content: center;
    }

    /* Dashboard Content */
    .dashboard-content {
        padding: 1rem;
    }

    .welcome-message h3 {
        font-size: 1.3rem;
    }

    .welcome-message p {
        font-size: 0.9rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-bottom: 2rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .stat-details h3 {
        font-size: 1.5rem;
    }

    /* Menu Grid */
    .menu-title {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }

    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .menu-card {
        padding: 1rem 0.5rem;
    }

    .menu-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }

    .menu-name {
        font-size: 0.85rem;
    }

    /* Footer */
    .footer-modern {
        padding: 2rem 0 1rem;
    }

    .footer-container-fluid {
        padding: 0 1rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .footer-bottom-links {
        justify-content: center;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    /* Very small screens */
    .menu-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        flex-direction: column;
        text-align: center;
    }

    .profile-summary-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .profile-info-compact {
        width: 100%;
    }

    .balance-container {
        justify-content: space-between;
    }

    .profile-expand-icon {
        align-self: flex-end;
        margin-top: -25px;
    }

    .profile-stats {
        flex-direction: column;
        align-items: center;
    }

    .stat-item {
        width: 100%;
        text-align: center;
    }

    .transaction-item {
        flex-wrap: wrap;
    }

    .transaction-amount {
        margin-left: auto;
    }
}

/* Landscape mode for mobile */
@media (max-width: 896px) and (orientation: landscape) {
    .nav-menu.active {
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }

    .menu-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .profile-summary-content {
        max-height: 300px;
        overflow-y: auto;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .nav-link,
    .menu-card,
    .stat-card,
    .btn-logout-nav,
    .profile-action-btn {
        cursor: default;
        -webkit-tap-highlight-color: transparent;
    }

    .nav-link:active,
    .menu-card:active,
    .btn-logout-nav:active {
        opacity: 0.7;
    }
}

/* ===== LARGER PROFILE AVATAR ===== */
.profile-avatar-large {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4361ee, #3730a3);
    font-size: 2rem;
    font-weight: 600;
    color: white;
    box-shadow: 0 4px 10px rgba(67, 97, 238, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.profile-avatar-large span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-transform: uppercase;
}

/* Adjust layout for larger avatar */
.profile-summary-header {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.profile-info-compact {
    flex: 1;
}

.profile-name {
    font-size: 1.3rem;
    font-weight: 700;
    display: block;
    margin-bottom: 0.3rem;
}

.balance-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    width: fit-content;
}

.balance-amount {
    font-weight: 700;
    font-size: 1.1rem;
}

/* Mobile responsive for larger avatar */
@media (max-width: 768px) {
    .profile-avatar-large {
        width: 50px;
        height: 50px;
        font-size: 1.8rem;
        border-width: 2px;
    }
    
    .profile-summary-header {
        gap: 1rem;
    }
    
    .profile-name {
        font-size: 1.1rem;
    }
    
    .balance-container {
        font-size: 0.9rem;
        padding: 0.3rem 0.6rem;
    }
    
    .balance-amount {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .profile-avatar-large {
        width: 45px;
        height: 45px;
        font-size: 1.5rem;
    }
    
    .profile-summary-header {
        flex-wrap: wrap;
    }
    
    .profile-info-compact {
        min-width: 180px;
    }
}

/* Animation for avatar */
.profile-avatar-large {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-avatar-large:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(67, 97, 238, 0.4);
}

/* ===== BIGGER EXPANDABLE AVATAR ===== */
.profile-avatar-expandable {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4361ee, #3730a3);
    font-size: 3.5rem;
    font-weight: 600;
    color: white;
    box-shadow: 0 8px 20px rgba(67, 97, 238, 0.4);
    border: 4px solid rgba(255, 255, 255, 0.5);
    margin: 0 auto 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-avatar-expandable span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-transform: uppercase;
}

.profile-avatar-expandable:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 25px rgba(67, 97, 238, 0.5);
}

/* Update expandable section layout */
.profile-summary-content {
    padding: 1.5rem;
    text-align: center;
}

.profile-stats {
    display: flex;
    justify-content: space-around;
    gap: 1.5rem;
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
}

.profile-stats .stat-item {
    text-align: center;
    flex: 1;
}

.profile-stats .stat-label {
    font-size: 0.85rem;
    opacity: 0.8;
    display: block;
    margin-bottom: 0.3rem;
}

.profile-stats .stat-value {
    font-weight: 700;
    font-size: 1.4rem;
}

.profile-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.profile-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.profile-action-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Mobile responsive for bigger avatar */
@media (max-width: 768px) {
    .profile-avatar-expandable {
        width: 80px;
        height: 80px;
        font-size: 2.8rem;
        border-width: 3px;
    }
    
    .profile-stats {
        gap: 1rem;
        padding: 0.75rem;
    }
    
    .profile-stats .stat-value {
        font-size: 1.2rem;
    }
    
    .profile-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .profile-action-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .profile-avatar-expandable {
        width: 70px;
        height: 70px;
        font-size: 2.3rem;
        border-width: 2px;
    }
    
    .profile-stats {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* ===== IMPROVED MOBILE MENU STYLES ===== */
@media (max-width: 768px) {
    /* Navigation Container */
    .app-navbar {
        position: relative;
        width: 100%;
    }

    .nav-container-fluid {
        padding: 0.75rem 1rem;
        width: 100%;
        box-sizing: border-box;
    }

    /* Menu Toggle Button */
    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 30px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 1001;
        position: relative;
    }

    .menu-toggle .bar {
        width: 30px;
        height: 3px;
        background: #1e293b;
        border-radius: 3px;
        transition: all 0.3s ease;
    }

    .menu-toggle.active .bar:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active .bar:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    /* Navigation Menu - Full Width */
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 2rem 1.5rem;
        transform: translateY(-150%);
        transition: transform 0.3s ease, opacity 0.3s ease;
        opacity: 0;
        visibility: hidden;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        z-index: 1000;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        box-sizing: border-box;
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    /* Navigation Links */
    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
        padding: 0;
        margin: 0 0 1.5rem 0;
    }

    .nav-link {
        padding: 1rem;
        justify-content: flex-start;
        border-bottom: 1px solid #f1f5f9;
        font-size: 1.1rem;
        width: 100%;
        box-sizing: border-box;
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    .nav-link:hover {
        background: #f8fafc;
        border-radius: 8px;
    }

    /* Logout Button in Mobile Menu */
    .btn-logout-nav {
        width: 100%;
        margin: 1rem 0 0 0;
        padding: 12px 24px;
        font-size: 1.1rem;
        justify-content: center;
        box-sizing: border-box;
    }

    /* Auth Buttons for Non-authenticated Menu */
    .nav-auth-buttons {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
        margin-top: 1rem;
    }

    .btn-login-nav,
    .btn-register-nav {
        width: 100%;
        justify-content: center;
        padding: 12px 24px;
        font-size: 1.1rem;
        box-sizing: border-box;
    }

    /* Profile Summary Adjustments */
    .profile-summary-container {
        width: 100%;
    }

    .profile-summary {
        padding: 0.75rem 1rem;
        width: 100%;
        box-sizing: border-box;
    }

    .profile-summary-header {
        width: 100%;
    }

    .profile-info-compact {
        flex: 1;
        min-width: 0;
    }

    .balance-container {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .profile-summary-content {
        width: 100%;
        padding: 1rem;
        box-sizing: border-box;
    }

    .profile-stats {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem;
        width: 100%;
    }

    .stat-item {
        flex: 1;
        min-width: 80px;
        text-align: center;
    }

    .profile-actions {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }

    .profile-action-btn {
        width: 100%;
        justify-content: center;
        padding: 12px;
        box-sizing: border-box;
    }

    /* Recent Transactions */
    .recent-transactions {
        width: 100%;
        box-sizing: border-box;
    }

    .transaction-list {
        width: 100%;
    }

    .transaction-item {
        width: 100%;
        box-sizing: border-box;
        padding: 0.75rem;
    }

    .transaction-details {
        min-width: 0;
        flex: 1;
    }

    .transaction-desc {
        white-space: normal;
        word-wrap: break-word;
    }

    .view-all-link {
        width: 100%;
        text-align: center;
        padding: 0.75rem;
        box-sizing: border-box;
    }
}

/* Small Mobile Devices (≤480px) */
@media (max-width: 480px) {
    .nav-menu {
        padding: 1.5rem 1rem;
    }

    .nav-link {
        padding: 0.875rem;
        font-size: 1rem;
    }

    .btn-logout-nav {
        padding: 10px 20px;
        font-size: 1rem;
    }

    .profile-summary-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .profile-info-compact {
        width: 100%;
    }

    .balance-container {
        width: 100%;
        justify-content: space-between;
    }

    .profile-expand-icon {
        align-self: flex-end;
        margin-top: -30px;
    }

    .profile-stats {
        flex-direction: column;
        gap: 0.75rem;
    }

    .stat-item {
        width: 100%;
        text-align: left;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .stat-label {
        font-size: 0.9rem;
    }

    .stat-value {
        font-size: 1.1rem;
    }

    .transaction-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .transaction-icon {
        margin-bottom: 0.25rem;
    }

    .transaction-amount {
        align-self: flex-end;
    }
}

/* Landscape Mode */
@media (max-width: 896px) and (orientation: landscape) {
    .nav-menu.active {
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }

    .nav-links {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .nav-link {
        border-bottom: none;
        border: 1px solid #f1f5f9;
        border-radius: 8px;
        text-align: center;
    }

    .profile-stats {
        flex-direction: row;
    }

    .profile-actions {
        flex-direction: row;
    }

    .transaction-list {
        max-height: 150px;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .nav-link,
    .menu-card,
    .stat-card,
    .btn-logout-nav,
    .profile-action-btn,
    .btn-login-nav,
    .btn-register-nav {
        cursor: default;
        -webkit-tap-highlight-color: transparent;
        min-height: 44px; /* Minimum touch target size */
    }

    .nav-link:active,
    .menu-card:active,
    .btn-logout-nav:active,
    .btn-login-nav:active,
    .btn-register-nav:active {
        opacity: 0.7;
        transform: scale(0.98);
    }
}

/* ===== FIXED MOBILE MENU WIDTH ===== */
@media (max-width: 768px) {
    /* Navigation Menu - Fixed Width */
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100vw;
        background: white;
        flex-direction: column;
        padding: 1.5rem;
        transform: translateY(-150%);
        transition: transform 0.3s ease, opacity 0.3s ease;
        opacity: 0;
        visibility: hidden;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        z-index: 1000;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        box-sizing: border-box;
        margin: 0;
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    /* Navigation Links Container */
    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 0.25rem;
        padding: 0;
        margin: 0;
        list-style: none;
    }

    /* Individual Navigation Items */
    .nav-links li {
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .nav-link {
        display: block;
        width: 100%;
        padding: 1rem 1rem;
        color: #1e293b;
        text-decoration: none;
        font-size: 1.1rem;
        font-weight: 500;
        border-radius: 8px;
        transition: background-color 0.2s ease;
        box-sizing: border-box;
        text-align: left;
    }

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

    .nav-link:active {
        background-color: #e2e8f0;
    }

    /* Logout Button in Mobile Menu */
    .btn-logout-nav {
        display: block;
        width: 100%;
        margin: 1rem 0 0 0;
        padding: 1rem 1rem;
        background: transparent;
        color: #dc2626;
        border: 2px solid #dc2626;
        border-radius: 8px;
        font-weight: 600;
        font-size: 1.1rem;
        text-decoration: none;
        text-align: center;
        transition: all 0.2s ease;
        box-sizing: border-box;
        cursor: pointer;
    }

    .btn-logout-nav:hover {
        background: #dc2626;
        color: white;
    }

    .btn-logout-nav:active {
        transform: scale(0.98);
    }

    /* Ensure body doesn't scroll when menu is open */
    body.menu-open {
        overflow: hidden;
    }
}

/* Small Mobile Devices (≤480px) */
@media (max-width: 480px) {
    .nav-menu {
        padding: 1rem;
    }

    .nav-link {
        padding: 0.875rem 1rem;
        font-size: 1rem;
    }

    .btn-logout-nav {
        padding: 0.875rem 1rem;
        font-size: 1rem;
    }
}

/* Landscape Mode */
@media (max-width: 896px) and (orientation: landscape) {
    .nav-menu.active {
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }

    .nav-links {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-link {
        text-align: center;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
    }

    .btn-logout-nav {
        margin-top: 1rem;
    }
}

/* Bottom nav: mobile only */
@media (min-width: 769px) {
    .bottom-nav-container { display: none !important; }
}

.logo-icon { display: none; }
.nav-logo { gap: 4px; }

/* ===== DARK MODE ===== */
html.dark-mode { background-color: #0f172a; }
html.dark-mode body { background-color: #0f172a; color: #e2e8f0; }
html.dark-mode {
    background-color: #0f172a;
    color: #e2e8f0;
}

/* ── Page background & base text ── */
html.dark-mode .app-content { background: #0f172a; color: #e2e8f0; }
html.dark-mode h1, html.dark-mode h2, html.dark-mode h3,
html.dark-mode h4, html.dark-mode h5, html.dark-mode h6 { color: #f1f5f9; }
html.dark-mode p { color: #cbd5e1; }
html.dark-mode a { color: #818cf8; }

/* ── Navbar ── */
html.dark-mode .app-navbar { background: #1e293b; box-shadow: 0 2px 10px rgba(0,0,0,0.5); }
html.dark-mode .logo-word { color: #f1f5f9; }
html.dark-mode .logo-accent { color: #818cf8; }
html.dark-mode .menu-link { color: #cbd5e1; }
html.dark-mode .menu-link:hover { background: #334155; color: #818cf8; }
html.dark-mode .hamburger-btn { background: #334155; border-color: #475569; }
html.dark-mode .hamburger-btn span { background: #e2e8f0; }
html.dark-mode .nav-notif-btn { background: #334155; border-color: #475569; color: #e2e8f0; }
html.dark-mode .nav-notif-btn:hover { background: #4361ee; border-color: #4361ee; }
html.dark-mode .nav-search-input { background: #0f172a; border-color: #334155; color: #e2e8f0; }
html.dark-mode .nav-search-input::placeholder { color: #64748b; }
html.dark-mode .nav-search-input:focus { background: #1e293b; border-color: #4361ee; }

/* ── Mobile subbar ── */
html.dark-mode .mobile-subbar { background: #1e293b; border-top-color: #334155; box-shadow: 0 2px 8px rgba(0,0,0,0.4); }
html.dark-mode .mobile-subbar .nav-search-input { background: #0f172a; border-color: #334155; color: #e2e8f0; }

/* ── Bottom nav (mobile) ── */
html.dark-mode .bottom-nav-container { background: #1e293b; border-top-color: #334155; box-shadow: 0 -2px 10px rgba(0,0,0,0.5); }
html.dark-mode .bottom-nav-item { color: #64748b; }
html.dark-mode .bottom-nav-item:hover { background: #334155; color: #a5b4fc; }
html.dark-mode .bottom-nav-item.active { color: #818cf8; }
html.dark-mode .bottom-nav-item.active i { color: #818cf8; }

/* ── Hamburger side panel ── */
html.dark-mode .hmenu-panel { background: #1e293b; box-shadow: -8px 0 30px rgba(0,0,0,0.6); }
html.dark-mode .hmenu-divider { background: #334155; }
html.dark-mode .hmenu-item { color: #e2e8f0; border-left-color: transparent; }
html.dark-mode .hmenu-item:hover { background: #334155; color: #818cf8; border-left-color: #818cf8; }
html.dark-mode .hmenu-item-icon { background: #334155; color: #818cf8; }
html.dark-mode .hmenu-item:hover .hmenu-item-icon { background: #475569; }
html.dark-mode .hmenu-item-arrow { color: #475569; }
html.dark-mode .hmenu-lang-toggle { color: #e2e8f0; }
html.dark-mode .hmenu-lang-toggle:hover { background: #334155; color: #818cf8; }
html.dark-mode .hmenu-lang-current { color: #e2e8f0; }
html.dark-mode .hmenu-lang-chevron { color: #64748b; }
html.dark-mode .hmenu-lang-dropdown { background: #0f172a; border-color: #334155; }
html.dark-mode .hmenu-lang-option { color: #cbd5e1; border-bottom-color: #1e293b; }
html.dark-mode .hmenu-lang-option:hover { background: #334155; color: #818cf8; }
html.dark-mode .hmenu-lang-option.active { background: #1e3a8a; color: #818cf8; }
html.dark-mode .hmenu-logout { background: #2d1a1a; color: #f87171; border-color: #7f1d1d; }
html.dark-mode .hmenu-logout:hover { background: #dc2626; color: white; border-color: #dc2626; }

/* ── Cards (stat, menu, auth) ── */
html.dark-mode .stat-card,
html.dark-mode .menu-card,
html.dark-mode .auth-card { background: #1e293b; border-color: #334155; box-shadow: 0 1px 4px rgba(0,0,0,0.4); }
html.dark-mode .stat-card h3,
html.dark-mode .menu-card h3 { color: #f1f5f9; }
html.dark-mode .stat-card p,
html.dark-mode .menu-card p { color: #94a3b8; }

/* ── Generic white surfaces ── */
html.dark-mode .card,
html.dark-mode [class*="-card"],
html.dark-mode [class*="-panel"],
html.dark-mode [class*="-box"],
html.dark-mode [class*="-container"]:not(.bottom-nav-container):not(.nav-container-fluid) {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

/* ── Inputs, textareas, selects ── */
html.dark-mode input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
html.dark-mode textarea,
html.dark-mode select {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}
html.dark-mode input::placeholder,
html.dark-mode textarea::placeholder { color: #64748b; }
html.dark-mode input:focus,
html.dark-mode textarea:focus,
html.dark-mode select:focus { border-color: #4361ee; background: #1e293b; }
html.dark-mode select option { background: #1e293b; color: #e2e8f0; }

/* ── Tables ── */
html.dark-mode table { background: #1e293b; color: #e2e8f0; }
html.dark-mode th { background: #334155; color: #f1f5f9; border-color: #475569; }
html.dark-mode td { border-color: #334155; color: #cbd5e1; }
html.dark-mode tr:hover td { background: #334155; }

/* ── Modals ── */
html.dark-mode .modal,
html.dark-mode .ad-modal { background: #1e293b; border-color: #334155; }
html.dark-mode .ad-modal-body p { color: #94a3b8; }
html.dark-mode .modal-header,
html.dark-mode .modal-footer { border-color: #334155; }

/* ── Dividers & borders ── */
html.dark-mode hr { border-color: #334155; }
html.dark-mode [class*="-divider"] { background: #334155; }

/* ── Badges & tags ── */
html.dark-mode .badge,
html.dark-mode [class*="-badge"]:not(.nav-notif-badge) { background: #334155; color: #e2e8f0; }

/* ── Buttons (non-primary) ── */
html.dark-mode .btn-secondary,
html.dark-mode button:not(.btn-primary):not([class*="btn-"]):not(.settings-toggle):not(.hmenu-logout):not(.hmenu-close):not(.ad-modal-close):not(.hamburger-btn):not(.nav-notif-btn) {
    background: #334155;
    color: #e2e8f0;
    border-color: #475569;
}

/* ── Footer ── */
html.dark-mode .footer-modern,
html.dark-mode footer { background: #1e293b; border-top-color: #334155; color: #94a3b8; }
html.dark-mode footer a { color: #94a3b8; }
html.dark-mode footer a:hover { color: #818cf8; }

/* ── Ad ticker (keep dark, just adjust borders) ── */
html.dark-mode .ad-ticker-wrap { border-bottom-color: rgba(255,255,255,0.05); }

/* ── Scrollbar ── */
html.dark-mode ::-webkit-scrollbar { width: 6px; height: 6px; }
html.dark-mode ::-webkit-scrollbar-track { background: #0f172a; }
html.dark-mode ::-webkit-scrollbar-thumb { background: #334155; border-radius: 3px; }
html.dark-mode ::-webkit-scrollbar-thumb:hover { background: #475569; }

/* Toast Notifications */
.notification-container { position: fixed; top: 20px; right: 20px; z-index: 99999; display: flex; flex-direction: column; gap: 10px; }
.notification { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-radius: 10px; font-size: 0.9rem; font-weight: 500; min-width: 260px; max-width: 380px; box-shadow: 0 4px 16px rgba(0,0,0,0.12); animation: notif-in 0.3s ease; }
.notification-success { background: #ecfdf5; color: #065f46; border: 1px solid #6ee7b7; }
.notification-error { background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }
.notification-warning { background: #fffbeb; color: #92400e; border: 1px solid #fcd34d; }
.notification-info { background: #eff6ff; color: #1e40af; border: 1px solid #93c5fd; }
.notification i:first-child { font-size: 1rem; flex-shrink: 0; }
.notification span { flex: 1; }
.notification-close { background: none; border: none; cursor: pointer; color: inherit; opacity: 0.6; padding: 0; font-size: 0.85rem; }
.notification-close:hover { opacity: 1; }
@keyframes notif-in { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }

html.dark-mode .mob-search-overlay{background:#1e293b;}
html.dark-mode .mob-search-input{color:#e2e8f0;}
html.dark-mode .mob-search-input::placeholder{color:#64748b;}
html.dark-mode .mob-search-back{color:#e2e8f0;}
html.dark-mode .mob-search-btn{color:#e2e8f0;}
html.dark-mode .nav-dots-btn span{background:#e2e8f0;}
html.dark-mode .nav-dots-btn:hover{background:#334155;}
html.dark-mode .nav-dots-panel{background:#1e293b;border-color:#334155;}
html.dark-mode .ndp-item{color:#e2e8f0;}
html.dark-mode .ndp-item:hover{background:#334155;}
html.dark-mode .ndp-divider{background:#334155;}
html.dark-mode .ndp-item>i:first-child{color:#818cf8;}
html.dark-mode .ndp-logout{color:#f87171;}
html.dark-mode .ndp-logout>i:first-child{color:#f87171;}
html.dark-mode .ndp-lang-opt{color:#94a3b8;}
html.dark-mode .ndp-lang-opt:hover{background:#334155;}
html.dark-mode .mobile-subbar{background:#1e293b;}

/* ── Mobile subbar visibility fix ── */
@media(max-width:768px){
  .mobile-subbar{display:block!important;}
  .mobile-subbar-inner{display:flex!important;align-items:center;gap:.75rem;padding:.5rem 1rem;}
}
@media(min-width:769px){
  .mobile-subbar{display:none!important;}
}

/* ── Search dropdown z-index supremacy ── */
.nav-module-dropdown,
#navModuleDropdown,
#mobModuleDropdown {
  z-index: 99999 !important;
}
