/* REUSE YOUR INDEX.PHP NEOMORPHIC VARIABLES */
:root {
    --primary-color: #6366f1;
    --primary-gradient: linear-gradient(135deg, #6366f1, #8b5cf6);
    --secondary-color: #f59e0b;
    --secondary-gradient: linear-gradient(135deg, #f59e0b, #f97316);
    --accent-color: #10b981;
    --accent-gradient: linear-gradient(135deg, #10b981, #34d399);
    --warning-color: #ef4444;
    --warning-gradient: linear-gradient(135deg, #ef4444, #f87171);
    --dark-color: #1f2937;
    --light-color: #f9fafb;
    --gray-light: #e5e7eb;
    --gray-medium: #9ca3af;
    --gray-dark: #4b5563;

    --bg-primary: #f0f2f5;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --border-light: rgba(255, 255, 255, 0.2);
    --shadow-soft: 8px 8px 20px #d1d9e6, -8px -8px 20px #ffffff;
    --shadow-hard: 4px 4px 10px #d1d9e6, -4px -4px 10px #ffffff;
    --shadow-inset: inset 3px 3px 8px #d1d9e6, inset -3px -3px 8px #ffffff;
    --shadow-hover: 10px 10px 25px #c9d1de, -10px -10px 25px #ffffff;
    --shadow-glow: 0 6px 20px rgba(99, 102, 241, 0.12);
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --radius-xs: 5px;
    --radius-round: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-primary);
    font-family: 'Poppins', 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--dark-color);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 15px;
}

/* Account Page Header */
.account-header {
    margin-bottom: 25px;
}

.account-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 6px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.account-subtitle {
    font-size: 0.95rem;
    color: var(--gray-dark);
    font-weight: 400;
}

/* ULTRA COMPACT ACCOUNT LAYOUT */
.account-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 992px) {
    .account-layout {
        grid-template-columns: 0.9fr 2.1fr;
        gap: 30px;
    }
}

/* Sidebar Navigation - MOBILE FRIENDLY */
.account-sidebar {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-soft);
    height: fit-content;
}

.user-profile {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--bg-primary);
}

.avatar-container {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--primary-gradient);
    margin: 0 auto 15px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-hard);
    border: 4px solid var(--bg-card);
}

.avatar-icon {
    font-size: 2.5rem;
    color: white;
}

.user-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 4px;
}

.user-email {
    font-size: 0.85rem;
    color: var(--gray-medium);
    word-break: break-all;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    text-decoration: none;
    border-radius: var(--radius-md);
    color: var(--gray-dark);
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    background: var(--bg-card);
    box-shadow: var(--shadow-hard);
}

.nav-link:hover {
    transform: translateX(5px);
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-glow);
}

.nav-link.active {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-glow);
}

.nav-icon {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.nav-link.logout {
    color: var(--warning-color);
}

.nav-link.logout:hover {
    background: var(--warning-gradient);
    color: white;
}

/* Main Content Card */
.account-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 25px;
    box-shadow: var(--shadow-soft);
}

.card-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--bg-primary);
}

/* Alert Messages */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-hard);
}

.alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.2));
    color: var(--accent-color);
    border-left: 4px solid var(--accent-color);
}

.alert-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.2));
    color: var(--warning-color);
    border-left: 4px solid var(--warning-color);
}

/* Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    margin-bottom: 25px;
}

@media (min-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
}

.form-group {
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--gray-dark);
    font-size: 13px;
    margin-left: 5px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-primary);
    border: none;
    border-radius: var(--radius-md);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: var(--dark-color);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-inset);
}

.form-input:focus {
    outline: none;
    box-shadow: var(--shadow-glow), inset 0 0 0 2px var(--primary-color);
}

.form-input:read-only {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Password Section */
.password-section {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid var(--bg-primary);
}

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-subtitle {
    font-size: 0.85rem;
    color: var(--gray-medium);
    margin-bottom: 20px;
    margin-left: 5px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    border: none;
    font-family: 'Inter', sans-serif;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-hard);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover), var(--shadow-glow);
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 15px;
    text-align: center;
    box-shadow: var(--shadow-hard);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px auto;
    color: white;
    font-size: 18px;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 11px;
    color: var(--gray-medium);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .container {
        padding: 15px 10px;
    }

    .account-title {
        font-size: 1.7rem;
    }

    .account-subtitle {
        font-size: 0.9rem;
    }

    .account-card {
        padding: 20px;
    }

    .card-title {
        font-size: 1.2rem;
    }

    .avatar-container {
        width: 70px;
        height: 70px;
    }

    .avatar-icon {
        font-size: 2rem;
    }

    .user-name {
        font-size: 1.1rem;
    }

    .btn {
        width: 100%;
        padding: 12px 20px;
    }

    .nav-link {
        padding: 12px 15px;
        font-size: 13px;
    }
}

@media (max-width: 576px) {
    .account-title {
        font-size: 1.5rem;
    }

    .account-sidebar,
    .account-card {
        padding: 15px;
    }

    .form-input {
        padding: 12px 14px;
        font-size: 13px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .stat-card {
        padding: 12px;
    }

    .stat-number {
        font-size: 1.3rem;
    }
}

/* Animation */
.animate-fade-in {
    animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading Indicator */
.loading-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Professional Tabbed Interface for Mobile */
.mobile-nav-wrapper {
    display: none;
}

@media (max-width: 991px) {
    .account-sidebar {
        display: none;
        /* Hide sidebar completely on mobile */
    }

    .mobile-nav-wrapper {
        display: flex;
        align-items: center;
        background: var(--bg-card);
        border-radius: var(--radius-md);
        padding: 5px;
        margin-bottom: 25px;
        box-shadow: var(--shadow-soft);
        position: relative;
    }

    .mobile-tabs-scroll {
        display: flex;
        overflow-x: auto;
        gap: 10px;
        padding: 5px;
        scrollbar-width: none;
        /* Firefox */
        -ms-overflow-style: none;
        /* IE 10+ */
        flex-grow: 1;
        scroll-behavior: smooth;
    }

    .mobile-tabs-scroll::-webkit-scrollbar {
        display: none;
        /* Chrome/Safari */
    }

    .mobile-tab {
        flex: 0 0 auto;
        padding: 10px 20px;
        text-align: center;
        font-size: 13px;
        font-weight: 600;
        color: var(--gray-dark);
        border-radius: var(--radius-sm);
        cursor: pointer;
        white-space: nowrap;
        transition: all 0.3s ease;
        background: transparent;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .mobile-tab i {
        font-size: 14px;
    }

    .mobile-tab:hover {
        background: var(--bg-primary);
        color: var(--primary-color);
    }

    .mobile-tab.active {
        background: var(--primary-gradient);
        color: white;
        box-shadow: var(--shadow-glow);
    }

    .scroll-btn {
        background: var(--bg-primary);
        border: none;
        width: 30px;
        height: 30px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        color: var(--gray-dark);
        font-size: 12px;
        box-shadow: var(--shadow-hard);
        z-index: 2;
        flex-shrink: 0;
        transition: all 0.2s;
    }

    .scroll-btn:hover {
        background: var(--primary-color);
        color: white;
    }

    .scroll-btn.hidden {
        opacity: 0;
        pointer-events: none;
    }
}

/* Security Tips */
.security-tips {
    margin-top: 30px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05));
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary-color);
}

.tips-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tips-list {
    list-style: none;
    padding-left: 0;
}

.tips-list li {
    font-size: 0.85rem;
    color: var(--gray-dark);
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.tips-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
}