/**
 * OrangeFiles - Luxurious 320px Account Styles
 */

#accountSection.active {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 20px !important;
    padding-bottom: 100px !important;
    pointer-events: none;
    min-height: 100vh;
}

#accountSection .section-content {
    pointer-events: auto;
    width: 90% !important;
    /* Reverted to 90% as requested */
    max-width: 600px !important;
    /* Cap for PC cleanliness */
    max-height: 94vh !important;
    overflow-y: auto !important;
    margin: 0 auto !important;
    padding: 12px 20px !important;
    /* Reduced top padding further */
    background: #ffffff !important;
    border-radius: 32px !important;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.18) !important;
    display: block !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    scrollbar-width: none;
}

#accountSection .section-content::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar Chrome/Safari */
}

.user-card {
    width: 100% !important;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    text-align: center;
    position: relative;
    /* Restored for logout positioning */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.user-avatar {
    width: 68px;
    height: 68px;
    background: #fff5f2;
    color: #FF512F;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px auto !important;
    position: relative;
    /* Border removed in v=9.1 to give way to Luxury Frames */
    box-shadow: 0 8px 20px rgba(255, 81, 47, 0.15);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    z-index: 2;
    position: relative;
    border: 2px solid white;
}

/* Luxury Ornate Frames System v=10.0 - "The Engraved Series" */
.user-avatar {
    width: 68px;
    height: 68px;
    margin: 0 auto 12px auto !important;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.avatar-frame-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 1;
}

/* Base Ornate Logic */
.avatar-frame-wrapper::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    padding: 3px;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask-composite: xor;
    z-index: -1;
}

/* 1. Royal (Seller/Admin) - Ornate Gold & Royal Purple Engraving */
.frame-royal::before {
    background: conic-gradient(from 0deg, #fbbf24, #7c3aed, #fbbf24, #7c3aed, #fbbf24);
    animation: luxuriousRotate 3s linear infinite;
}

.frame-royal::after {
    content: '👑';
    position: absolute;
    top: -12px;
    font-size: 14px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    animation: royalFloat 2s ease-in-out infinite alternate;
}

.frame-royal {
    box-shadow:
        inset 0 0 10px rgba(124, 58, 237, 0.5),
        0 0 15px rgba(251, 191, 36, 0.4),
        0 0 0 3px #ffffff,
        0 0 0 6px rgba(251, 191, 36, 0.2);
}

/* 2. Diamond (Ultimate) - Prismatic Crystal Engraving */
.frame-diamond::before {
    background: conic-gradient(from 0deg, #06b6d4, #ffffff, #a5f3fc, #06b6d4);
    animation: luxuriousRotate 4s linear infinite;
}

.frame-diamond {
    box-shadow:
        inset 0 0 8px rgba(255, 255, 255, 0.8),
        0 0 20px rgba(6, 182, 212, 0.5),
        0 0 0 3px #ffffff,
        0 0 0 6px rgba(6, 182, 212, 0.15);
}

/* 3. Platinum (Platinum) - Engraved Blue Steel */
.frame-platinum::before {
    background: conic-gradient(from 0deg, #3b82f6, #f1f5f9, #3b82f6);
}

.frame-platinum {
    box-shadow:
        inset 0 0 5px rgba(59, 130, 246, 0.3),
        0 0 10px rgba(59, 130, 246, 0.2),
        0 0 0 3px #ffffff,
        0 0 0 5px rgba(148, 163, 184, 0.2);
}

/* 4. Gold (Gold) - Deep Carved Gold Shine */
.frame-gold::before {
    background: conic-gradient(from 0deg, #b45309, #fde047, #f59e0b, #b45309);
    animation: luxuriousRotate 5s linear infinite;
}

.frame-gold {
    box-shadow:
        inset 0 0 5px rgba(180, 83, 9, 0.3),
        0 0 0 3px #ffffff,
        0 0 0 5px rgba(245, 158, 11, 0.2);
}

/* 5. Silver (Silver) - Engraved Polished Chrome */
.frame-silver::before {
    background: conic-gradient(from 0deg, #475569, #e2e8f0, #475569);
}

.frame-silver {
    box-shadow:
        0 0 0 3px #ffffff,
        0 0 0 5px rgba(148, 163, 184, 0.15);
}

/* 6. Bronze (Basic) - Copper Inset Finish */
.frame-bronze::before {
    background: #ea580c;
}

.frame-bronze {
    box-shadow: 0 0 0 3px #ffffff, 0 0 0 5px rgba(234, 88, 12, 0.1);
}

@keyframes royalFloat {
    from {
        transform: translateY(0) scale(1);
    }

    to {
        transform: translateY(-3px) scale(1.1);
    }
}

@keyframes luxuriousRotate {
    100% {
        transform: rotate(360deg);
    }
}

.user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    z-index: 2;
    position: relative;
    border: 2px solid white;
}

@keyframes royalGlow {
    from {
        box-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
    }

    to {
        box-shadow: 0 0 25px rgba(251, 191, 36, 0.6), 0 0 40px rgba(124, 58, 237, 0.2);
    }
}

@keyframes diamondPulse {

    0%,
    100% {
        transform: scale(1);
        filter: brightness(1);
    }

    50% {
        transform: scale(1.02);
        filter: brightness(1.3);
    }
}

@keyframes platinumShimmer {
    0% {
        filter: contrast(1) brightness(1);
    }

    50% {
        filter: contrast(1.2) brightness(1.2);
    }

    100% {
        filter: contrast(1) brightness(1);
    }
}

.user-name {
    font-size: 1.15rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0 auto 4px auto !important;
    letter-spacing: -0.5px;
    width: 100%;
    text-align: center;
}

.user-role-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin: 0 auto 12px auto !important;
}

.role-seller {
    background: #fee2e2;
    color: #ef4444;
}

.role-member {
    background: #dcfce7;
    color: #166534;
}

/* Premium Containers */
.pro-report-container,
.usage-report-container {
    background: #f8fafc;
    border-radius: 20px;
    padding: 14px 14px;
    text-align: left;
    margin-bottom: 10px;
    border: 1px solid #f1f5f9;
    margin-top: 12px !important;
}

.pro-report-container {
    margin-top: 12px !important;
}

.pro-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed #e2e8f0;
}

.pro-row:last-child {
    border-bottom: none;
}

.pro-label {
    color: #94a3b8;
    font-weight: 700;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pro-value {
    color: #1e293b;
    font-weight: 800;
    font-size: 0.85rem;
}

.pro-value.highlight {
    color: #FF512F;
}

.pro-progress-track {
    height: 6px;
    background: #e2e8f0;
    border-radius: 10px;
    margin: 10px 0 6px;
    overflow: hidden;
}

.pro-progress-fill {
    height: 100%;
    background: linear-gradient(to right, #FF512F, #DD2476);
    border-radius: 10px;
    transition: width 1s ease-out;
}

.pro-status-row {
    font-size: 0.65rem;
    font-weight: 700;
    color: #64748b;
    display: flex;
    justify-content: space-between;
}

/* Upgrade Button Luxurious */
.upgrade-plan-btn {
    width: 100% !important;
    margin: 12px auto 0 !important;
    padding: 10px !important;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 14px !important;
    font-weight: 800 !important;
    font-size: 0.65rem !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.upgrade-plan-btn:active {
    transform: scale(0.96);
}

/* Stat Grid Luxury Tiles */
.stat-grid {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
}

.stat-card {
    flex: 1;
    background: white;
    border-radius: 14px;
    padding: 10px 4px;
    text-align: center;
    border: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.stat-icon {
    font-size: 0.8rem;
    margin-bottom: 4px;
    color: #64748b;
    background: #f8fafc;
    width: 24px;
    height: 24px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-value {
    font-size: 0.85rem;
    font-weight: 800;
    color: #1e293b;
}

.stat-label {
    font-size: 0.5rem;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 700;
}

#footerLogoContainer {
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px dashed #f1f5f9;
    text-align: center;
}

.footer-logo-img {
    width: 32px !important;
    max-width: 32px !important;
    height: auto !important;
    opacity: 0.6;
}

.version-text {
    font-size: 0.5rem;
    color: #cbd5e1;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 2px;
}

/* Mobile Responsive Fixes */
@media (max-width: 768px) {
    #accountSection.active {
        padding-top: 10px !important;
    }

    #accountSection .section-content {
        padding: 10px 16px !important;
        width: 94% !important;
    }

    #accountSection .user-card {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        text-align: center !important;
    }

    #accountSection .user-avatar {
        margin: 0 auto 8px auto !important;
        display: flex !important;
    }

    #accountSection .user-name {
        margin: 0 auto 5px auto !important;
        display: block !important;
        width: 100% !important;
        text-align: center !important;
    }

    #accountSection .user-role-badge {
        margin: 0 auto 12px auto !important;
        display: inline-block !important;
    }

    #accountSection .pro-report-container {
        margin-top: 0 !important;
    }

    #accountSection .usage-report-container {
        margin-top: 10px !important;
    }
}

@media (max-width: 480px) {
    #accountSection .section-content {
        padding: 8px 14px !important;
        width: 95% !important;
    }

    #accountSection .user-avatar {
        width: 62px !important;
        height: 62px !important;
        margin: 0 auto 7px auto !important;
    }

    #accountSection .user-name {
        margin: 0 auto 4px auto !important;
        font-size: 1.05rem !important;
    }

    #accountSection .user-role-badge {
        margin: 0 auto 10px auto !important;
        font-size: 0.56rem !important;
        padding: 3px 10px !important;
    }

    #accountSection .pro-report-container {
        margin-top: 0 !important;
    }
}