/* ==============================================
   TypeZen User Center Styles
   ============================================== */

/* ==============================================
   Layout Configuration
   ============================================== */

/* 
   Layout Compliance: 
   1. Reset Body Padding: FastAdmin default user.css adds 50px top padding. We must remove it.
   2. Main Padding: Add extra padding to User Center Main Column to Match CMS Homepage Tabs offset.
      22px (Base) + 14px (Compensation) = 36px 
*/
body {
    padding-top: 0 !important;
}

/* 
   Smart Layout Alignment (Modern Standard)
   Logic: If the page does NOT have tab navigation, increase padding to 38px to align with sidebars.
   This automatically fixes User Center, VIP, Recharge, and any future pages without tabs.
*/
.m-main:not(:has(.m-sub-channels)):not(:has(.m-tabs)) {
    padding-top: 38px;
    padding-bottom: 24px;
}

/* 
   Smart Right Sidebar Alignment
   Logic: If the page context (Wrapper) does NOT contain tabs, 
   assume it's a Member layout and set right sidebar padding to 24px 
   to physically align with user cards/buttons.
*/
.m-main-wrapper:not(:has(.m-sub-channels)):not(:has(.m-tabs)) .m-sidebar-right {
    padding-top: 24px;
}

/* ==============================================
   User Center Components
   ============================================== */

.user-profile-card {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

/* ==============================================
   Header Section
   ============================================== */
.user-profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 44px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--m-gray-200);
    padding-bottom: 0;
    gap: 24px;
    flex-wrap: wrap;
}

.user-profile-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--m-black);
    margin: 0;
    line-height: 1.2;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* ==============================================
   Lists (Common Styles)
   ============================================== */
.m-orders-list,
.m-comment-list,
.m-archives-list,
.m-collections-list {
    display: flex;
    flex-direction: column;
}

.m-order-item,
.m-comment-item,
.m-archive-item,
.m-collection-item {
    display: flex;
    gap: 24px;
    padding: 24px 0;
    border-bottom: 1px solid var(--m-gray-100);
}

.m-order-item:last-child,
.m-comment-item:last-child,
.m-archive-item:last-child,
.m-collection-item:last-child {
    border-bottom: none;
}

/* Thumbnails */
.m-archive-thumb {
    width: 160px;
    flex-shrink: 0;
}

.m-archive-thumb img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 4px;
}

.m-order-thumb {
    width: 120px;
    flex-shrink: 0;
}

.m-order-thumb img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 4px;
}

.m-collection-thumb {
    width: 140px;
    flex-shrink: 0;
}

.m-collection-thumb img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 4px;
    background: var(--m-gray-100);
}

/* Custom Comment Style for Profile */
.m-profile-content .m-comment-item {
    flex-direction: column !important;
    /* Stack vertically for profile comments */
    gap: 12px;
    padding: 20px 0;
}

.m-comment-item-header {
    font-size: 14px;
    color: var(--m-gray-500);
}

.m-comment-item-header a {
    color: var(--m-black);
    font-weight: 500;
    text-decoration: none;
}

.m-profile-content .m-comment-content {
    font-size: 15px;
    color: var(--m-gray-800);
    line-height: 1.6;
    background: var(--m-gray-50);
    padding: 12px 16px;
    border-radius: 8px;
    margin: 4px 0;
}

.m-comment-meta {
    font-size: 12px;
    color: var(--m-gray-400);
}

/* Content */
.m-archive-content,
.m-order-content,
.m-collection-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.m-archive-title,
.m-order-title,
.m-collection-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.m-archive-title a,
.m-order-title a,
.m-collection-title a {
    color: var(--m-black);
    text-decoration: none;
    transition: color 0.2s;
}

.m-archive-title a:hover {
    color: var(--m-primary, #0056b3);
}

.m-archive-meta,
.m-order-meta,
.m-collection-meta {
    display: flex;
    gap: 16px;
    color: var(--m-gray-500);
    font-size: 13px;
    align-items: center;
}

/* Actions */
.m-archive-actions {
    margin-top: 12px;
}

/* ==============================================
   Forms
   ============================================== */
.user-profile-form .form-section {
    margin-bottom: 32px;
}

.user-profile-form .form-item {
    margin-bottom: 24px;
}

.user-profile-form .form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--m-black);
}

.user-profile-form .form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--m-gray-200);
    border-radius: 6px;
    transition: all 0.2s;
    font-family: var(--m-font-sans);
}

.user-profile-form .form-input:focus {
    border-color: var(--m-black);
    outline: none;
}

.user-profile-form .form-input[disabled] {
    background-color: var(--m-gray-50);
    cursor: not-allowed;
}

.input-with-action {
    display: flex;
    gap: 12px;
}

.btn-action {
    padding: 0 16px;
    background: transparent;
    border: 1px solid var(--m-gray-200);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    white-space: nowrap;
}

.form-actions {
    margin-top: 40px;
    display: flex;
    gap: 16px;
}

/* ==============================================
   Avatar Upload
   ============================================== */
.user-avatar-upload {
    display: flex;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 40px;
}

.avatar-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
}

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

.btn-upload-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--m-black);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* ==============================================
   Empty State
   ============================================== */
.empty-state {
    padding: 60px 0;
    text-align: center;
    color: var(--m-gray-400);
}

.empty-state svg {
    margin-bottom: 16px;
    color: var(--m-gray-200);
}

.empty-state p {
    margin: 0;
    font-size: 15px;
}

/* ==============================================
   Pagination
   ============================================== */
.pagination-wrapper {
    margin-top: 40px;
    text-align: center;
}

.pagination {
    display: inline-flex;
    gap: 8px;
}

.pagination>li>a,
.pagination>li>span {
    border: none;
    background: transparent;
    color: var(--m-gray-600);
    padding: 6px 12px;
    border-radius: 4px;
}

.pagination>.active>a,
.pagination>.active>span {
    background: var(--m-black);
    color: #fff;
}

/* ==============================================
   Channel Tabs (for Archives)
   ============================================== */
.channel-tabs {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--m-gray-100);
    padding-bottom: 0;
    overflow-x: auto;
    scrollbar-width: none;
    /* Firefox */
}

.channel-tabs::-webkit-scrollbar {
    display: none;
}

.channel-tab {
    padding-bottom: 12px;
    position: relative;
    white-space: nowrap;
}

.channel-tab a {
    color: var(--m-gray-500);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

.channel-tab.active a {
    color: var(--m-black);
    font-weight: 600;
}

.channel-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--m-black);
    border-radius: 2px;
}

/* ==============================================
   VIP Status & Badge
   ============================================== */
.vip-status {
    display: flex;
    align-items: center;
    gap: 16px;
}

.vip-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: linear-gradient(135deg, #FFD700 0%, #FDB931 100%);
    color: #8B4513;
    font-size: 13px;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
}

.vip-badge.vip-none {
    background: var(--m-gray-100);
    color: var(--m-gray-500);
}



.vip-expire {
    font-size: 13px;
    color: var(--m-gray-500);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ==============================================
   VIP Tabs (Custom Style)
   ============================================== */
.vip-tabs {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
    padding: 4px;
    background: var(--m-gray-50);
    border-radius: 12px;
}

.vip-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.vip-tab.active {
    background: var(--m-white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.vip-tab-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--m-gray-600);
}

.vip-tab.active .vip-tab-name {
    color: var(--m-black);
}

.vip-tab-label {
    font-size: 12px;
    color: var(--m-gray-400);
    margin-top: 2px;
}

/* ==============================================
   VIP Panels & Sections
   ============================================== */
.vip-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.vip-panel.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.vip-section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--m-black);
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title i {
    color: var(--m-gray-400);
    font-size: 16px;
}

/* ==============================================
   VIP Rights Grid
   ============================================== */
.vip-rights {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.vip-right-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--m-gray-50);
    border-radius: 12px;
    align-items: flex-start;
}

.right-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.right-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.right-content {
    flex: 1;
}

.right-title {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--m-black);
}

.right-desc {
    margin: 0;
    font-size: 13px;
    color: var(--m-gray-500);
    line-height: 1.4;
}

/* ==============================================
   VIP Price Cards
   ============================================== */
.vip-prices {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.price-card {
    border: 2px solid var(--m-gray-100);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.price-card:hover {
    border-color: var(--m-gray-300);
}

.price-card.active {
    border-color: var(--m-black);
    background: var(--m-gray-50);
}

.price-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--m-gray-600);
    margin-bottom: 12px;
}

.price-value {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    color: var(--m-black);
    line-height: 1;
    margin-bottom: 8px;
}

.price-currency {
    font-size: 16px;
    margin-top: 4px;
    font-weight: 600;
}

.price-number {
    font-size: 32px;
    font-weight: 700;
    font-family: var(--m-font-sans);
}

.price-desc {
    font-size: 13px;
    color: var(--m-gray-400);
}

@media (max-width: 768px) {
    .vip-prices {
        grid-template-columns: 1fr;
    }
}

/* ==============================================
   Payment Methods
   ============================================== */
.payment-methods {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.payment-item {
    position: relative;
    border: 1px solid var(--m-gray-200);
    border-radius: 8px;
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--m-white);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60px;
}

.payment-item img {
    height: 24px;
    width: auto;
    object-fit: contain;
}

.payment-item input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    cursor: pointer;
}

.payment-item.active {
    border-color: var(--m-black);
    background: var(--m-gray-50);
}

/* ==============================================
   VIP Records List
   ============================================== */
.vip-records {
    display: flex;
    flex-direction: column;
}

.vip-record-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    border-bottom: 1px solid var(--m-gray-100);
}

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

.record-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.record-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--m-black);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.record-title i {
    color: #FDB931;
}

.record-meta {
    font-size: 13px;
    color: var(--m-gray-400);
}

.record-status {
    font-size: 14px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 4px;
    background: var(--m-gray-100);
    color: var(--m-gray-600);
}

.record-status.success {
    background: #ecfdf5;
    color: #059669;
}

/* ==============================================
   Core Login/Register Page Overrides
   ============================================== */
/* Container & Background */
#content-container .container {
    max-width: 480px;
    padding-top: 60px;
}

.login-section {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Tabs */
.logon-tab {
    display: flex;
    justify-content: center;
    gap: 32px;
    border-bottom: none !important;
    margin-bottom: 40px;
}

.logon-tab a {
    float: none !important;
    background: transparent !important;
    border: none !important;
    font-size: 18px;
    font-weight: 500;
    color: var(--m-gray-400);
    padding: 8px 0;
    position: relative;
    transition: all 0.2s;
}

.logon-tab a.active {
    color: var(--m-black);
    font-weight: 600;
}

.logon-tab a.active:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--m-black);
    border-radius: 2px;
}

.logon-tab a:hover {
    color: var(--m-black);
}

/* Form Container */
.login-main {
    background: var(--m-white);
    padding: 0 !important;
    border: none !important;
}

/* Form Controls */
.login-main .form-group {
    margin-bottom: 24px;
}

.login-main .control-label {
    font-weight: 500;
    color: var(--m-black);
    margin-bottom: 8px;
    font-size: 14px;
}

.login-main .form-control {
    height: 48px;
    padding: 10px 16px;
    border: 1px solid var(--m-gray-200);
    border-radius: 8px !important;
    background: var(--m-gray-50);
    box-shadow: none !important;
    font-size: 15px;
    transition: all 0.2s;
}

.login-main .form-control:focus {
    background: var(--m-white);
    border-color: var(--m-black);
}

/* Buttons */
.login-main .btn-primary {
    background: var(--m-black);
    border-color: var(--m-black);
    color: #fff;
    height: 48px;
    border-radius: 24px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s;
    margin-top: 16px;
}

.login-main .btn-primary:hover {
    background: #333;
    border-color: #333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Secondary Button (Register on Login page) */
.login-main .btn-default {
    background: transparent;
    border: 1px solid var(--m-gray-200);
    color: var(--m-gray-600);
    height: 48px;
    border-radius: 24px;
    font-size: 15px;
    margin-top: 16px;
}

.login-main .btn-default:hover {
    border-color: var(--m-black);
    color: var(--m-black);
    background: transparent;
}

/* Checkbox & Forgot Password */
.login-main .checkbox label {
    padding-left: 24px;
    color: var(--m-gray-600);
}

.login-main .btn-forgot {
    color: var(--m-gray-500);
    font-size: 14px;
}

.login-main .btn-forgot:hover {
    color: var(--m-black);
    text-decoration: underline;
}

/* Footer Copyright Hide (Optional for layout clean-up) */
footer.footer {
    border-top: none;
    background: transparent;
    padding: 40px 0;
    color: var(--m-gray-400);
}

/* ==============================================
   Deep Login Optimization (Action-Specific)
   ============================================== */

/* 1. Hide Navbar & Footer */
body.action-login .navbar,
body.action-login footer.footer,
body.action-register .navbar,
body.action-register footer.footer {
    display: none !important;
}

/* 2. Hide Tabs */
body.action-login .logon-tab,
body.action-register .logon-tab {
    display: none !important;
}

/* 3. Global Layout Centering */
body.action-login #content-container .container,
body.action-register #content-container .container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 0;
}

/* 4. Add Logo (Moved to HTML for clickability) */
body.action-login .login-header-logo,
body.action-register .login-header-logo {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 40px;
}

body.action-login .login-header-logo img,
body.action-register .login-header-logo img {
    height: 48px;
    width: auto;
    object-fit: contain;
}

/* 5. Flexbox Order Reordering for Social Login */
body.action-login #login-form,
body.action-register #register-form {
    display: flex;
    flex-direction: column;
}

/* Social Login Parent */
body.action-login #login-form .social-login,
body.action-register #register-form .social-login {
    order: -1;
    /* Move to Top */
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px !important;
}

/* Social Login Buttons Base */
body.action-login .social-login a,
body.action-register .social-login a {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    height: 60px !important;
    min-height: 60px !important;
    border-radius: 30px !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: none !important;
    box-shadow: none !important;
    line-height: 60px !important;
    /* Fallback */
}

body.action-login #login-form .social-login a:hover,
body.action-register #register-form .social-login a:hover {
    transform: translateY(-2px);
}

/* Social Icons Spacing */
.social-login a i {
    margin-right: 12px;
    /* Increased from 8px */
    font-size: 20px;
    /* Increased from 18px */
}

/* 1. WeChat (Green) */
body.action-login .social-login .btn-success,
body.action-register .social-login .btn-success {
    background-color: rgba(7, 193, 96, 0.12);
    color: #07c160;
    box-shadow: none;
    border: 1px solid rgba(7, 193, 96, 0.1);
}

body.action-login .social-login .btn-success:hover,
body.action-register .social-login .btn-success:hover {
    background-color: rgba(7, 193, 96, 0.18);
    box-shadow: none;
    transform: translateY(-1px);
}

/* 2. QQ (Blue) */
body.action-login .social-login .btn-info,
body.action-register .social-login .btn-info {
    background-color: rgba(0, 153, 255, 0.12);
    color: #0099ff;
    box-shadow: none;
    border: 1px solid rgba(0, 153, 255, 0.1);
}

body.action-login .social-login .btn-info:hover,
body.action-register .social-login .btn-info:hover {
    background-color: rgba(0, 153, 255, 0.18);
    box-shadow: none;
    transform: translateY(-1px);
}

/* 3. Weibo (Red) */
body.action-login .social-login .btn-danger,
body.action-register .social-login .btn-danger {
    background-color: rgba(255, 90, 95, 0.12);
    color: #ff5a5f;
    box-shadow: none;
    border: 1px solid rgba(255, 90, 95, 0.1);
}

body.action-login .social-login .btn-danger:hover,
body.action-register .social-login .btn-danger:hover {
    background-color: rgba(255, 90, 95, 0.18);
    box-shadow: none;
    transform: translateY(-1px);
}

/* Add Separation Divider visual */
body.action-login #login-form .social-login::after,
body.action-register #register-form .social-login::after {
    content: '或使用账号登录';
    display: block;
    text-align: center;
    font-size: 13px;
    color: var(--m-gray-400);
    margin-top: 24px;
    position: relative;
    width: 100%;
}

/* Hide Default Register Button Link helper in form group if visually redundant? No keep it */

/* ==============================================
   Pixel-Level Refinements (TypeZen)
   ============================================== */

/* Soften Labels */
.login-main .control-label {
    color: var(--m-gray-500);
}

/* Input Focus Ring */
.login-main .form-control:focus {
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05) !important;
}

/* Secondary Button (Ghost Style) */
.login-main .btn-default.no-border {
    border: none !important;
    background: transparent !important;
    color: var(--m-gray-600);
    box-shadow: none;
    font-weight: normal;
}

.login-main .btn-default.no-border:hover {
    background: var(--m-gray-50) !important;
    color: var(--m-black);
}



/* Ensure consistent spacing for social login divider */
body.action-login .social-login::after,
body.action-register .social-login::after {
    margin-top: 32px;
    margin-bottom: 8px;
}

/* Login Announcement */
.login-alert {
    background: #fff9e6;
    /* Soft amber */
    color: #bfa15f;
    /* Darker amber text */
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    line-height: 1.4;
    text-align: center;
}


/* Captcha Input Group Fix */
.login-main .input-group .form-control {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    height: 48px;
}

.login-main .input-group-btn .btn {
    height: 48px;
    line-height: normal;
    display: flex;
    /* Ensure vertical centering */
    align-items: center;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-top-right-radius: 8px !important;
    border-bottom-right-radius: 8px !important;
    margin: 0;
    background: var(--m-gray-100);
    border: 1px solid var(--m-gray-200);
    border-left: none;
    color: var(--m-gray-600);
    box-shadow: none !important;
    padding: 0 16px;
    font-size: 14px;
}

.login-main .input-group-btn .btn:hover {
    background: var(--m-gray-200);
    color: var(--m-black);
}

/* ==============================================
   TypeZen Public Profile Styles
   ============================================== */
.m-profile-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 64px 24px;
}

.m-profile-header {
    text-align: center;
    margin-bottom: 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.m-profile-avatar {
    margin-bottom: 24px;
    position: relative;
    display: inline-block;
}

.m-profile-avatar img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.m-profile-name {
    font-size: 28px;
    font-weight: 700;
    color: var(--m-black);
    margin: 0 0 12px;
    letter-spacing: -0.5px;
}

.m-profile-bio {
    font-size: 15px;
    color: var(--m-gray-500);
    max-width: 500px;
    margin: 0 auto 32px;
    line-height: 1.6;
}

.m-profile-stats {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    background: var(--m-white);
    padding: 12px 24px;
    border-radius: 100px;
    border: 1px solid var(--m-gray-100);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.m-stat-item {
    padding: 0 24px;
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
    font-size: 12px;
    color: var(--m-gray-400);
    font-weight: 500;
}

.m-stat-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 16px;
    width: 1px;
    background: var(--m-gray-200);
}

.m-stat-item span {
    font-size: 18px;
    font-weight: 700;
    color: var(--m-black);
    display: block;
    margin-bottom: 6px;
    font-family: var(--m-font-sans);
}

/* Tabs */
.m-tabs-wrapper {
    margin-bottom: 40px;
    border-bottom: 1px solid var(--m-gray-100);
    display: flex;
    justify-content: center;
}

.m-profile-tabs {
    display: flex;
    gap: 40px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.m-profile-tabs li {
    margin: 0;
    padding: 0;
}

.m-profile-tab {
    display: block;
    padding: 16px 0;
    font-size: 15px;
    color: var(--m-gray-500);
    font-weight: 500;
    position: relative;
    transition: all 0.2s;
    text-decoration: none;
    background: transparent !important;
}

.m-profile-tab:hover {
    color: var(--m-black);
}

.m-profile-tab.active {
    color: var(--m-black);
    font-weight: 600;
}

.m-profile-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    /* Small active indicator line */
    height: 3px;
    background: var(--m-black);
    border-radius: 3px;
}

/* Profile Content */
.m-profile-content {
    animation: fadeIn 0.4s ease;
}

.m-empty-state {
    padding: 80px 0;
    text-align: center;
}

.m-empty-icon {
    font-size: 48px;
    color: var(--m-gray-200);
    margin-bottom: 16px;
}

.m-empty-state p {
    color: var(--m-gray-400);
    font-size: 15px;
}

/* ==============================================
   Navigation Divider
   ============================================== */
.m-nav-divider {
    height: 1px;
    background-color: var(--m-gray-100);
    /* Match global border color */
    margin: 8px 16px;
}

/* ==============================================
   Right Sidebar: User Console
   ============================================== */
.m-card-user {
    background: var(--m-white);
    border: none;
    /* Removed border */
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    margin-bottom: 24px;
}

.m-card-user-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin-bottom: 12px;
    object-fit: cover;
}

.m-card-user-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--m-black);
}

.m-card-user-meta {
    font-size: 13px;
    color: var(--m-text-tertiary);
    margin-bottom: 20px;
}

.m-user-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.m-btn-action-row {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    border-radius: 6px;
    color: var(--m-text-secondary);
    font-size: 14px;
    background: var(--m-gray-50);
    transition: all 0.2s;
    text-decoration: none !important;
}

.m-btn-action-row:hover {
    background: var(--m-gray-100);
    color: var(--m-black);
}

.m-btn-action-row.danger {
    color: #ff4d4f;
    background: rgba(255, 77, 79, 0.05);
}

.m-btn-action-row.danger:hover {
    background: rgba(255, 77, 79, 0.1);
}

.m-btn-action-row i,
.m-btn-action-row svg {
    margin-right: 10px;
    width: 16px;
    text-align: center;
}

/* =========================================
   Legacy Layout Adapter (Fix Nested Sidebars)
   ========================================= */

/* 1. Reset Legacy Container Width */
.m-content #content-container {
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* 2. Hide Legacy Sidebar Column */
/* Target the first column if it contains the sidebar */
.m-content #content-container>.row>.col-md-3:first-child {
    display: none !important;
}

/* 3. Expand Legacy Main Column */
/* Force the content column to full width */
.m-content #content-container>.row>.col-md-9 {
    width: 100% !important;
    float: none !important;
    flex: 0 0 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* 4. TypeZen-ify Legacy Panels */
.m-content .panel {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    margin-bottom: 0 !important;
}

.m-content .panel-body {
    padding: 0 !important;
}

/* Refine Header Styling */
.m-content .page-header {
    border-bottom: 1px solid var(--m-gray-100) !important;
    padding-bottom: 16px !important;
    margin: 0 0 24px 0 !important;
    font-size: 20px !important;
    font-weight: 600 !important;
    color: var(--m-black) !important;
}

/* ==============================================
   Homepage / CMS Page Alignment Fixes
   Target: 48px Visual Baseline
   ============================================== */



/* Push Right Sidebar (CMS Title) DOWN to align with Sidebars */
/* Current Default: 38px -> New: 40px (Drop 2px) */
.m-main-wrapper:has(.m-sub-channels) .m-sidebar-right,
.m-main-wrapper:has(.m-tabs) .m-sidebar-right {
    padding-top: 40px !important;
}

/* ==============================================
   User Archives Page (Optimized)
   ============================================== */

/* Header & Search */
.m-page-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    /* Align with layout rhythm */
}

.m-page-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.2;
}

.m-search-form {
    display: flex;
    gap: 8px;
}

.m-search-input {
    border-radius: 99px !important;
    border: 1px solid var(--m-gray-200) !important;
    padding: 2px 16px !important;
    /* Adjusted for 32px height */
    width: 220px !important;
    height: 32px !important;
    /* Fixed height for alignment */
    font-size: 13px;
    /* Slightly smaller text */
    transition: all 0.2s;
    line-height: normal;
}

.m-search-input:focus {
    border-color: var(--m-primary) !important;
    box-shadow: 0 0 0 2px var(--m-primary-light) !important;
}

/* Filter Tabs (Synced with .m-tabs style but for user center) */
.m-doc-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--m-gray-100);
    padding-bottom: 0;
}

.m-doc-filter-tab {
    color: var(--m-gray-500);
    font-size: 15px;
    padding-bottom: 12px;
    margin-bottom: -1px;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    text-decoration: none !important;
    cursor: pointer;
}

.m-doc-filter-tab:hover {
    color: var(--m-black);
}

.m-doc-filter-tab.active {
    color: var(--m-black);
    font-weight: 600;
    border-bottom-color: var(--m-black);
}

/* Archive List Item */
.m-doc-item {
    display: flex;
    gap: 24px;
    /* Increased from 20px */
    padding: 24px 0;
    border-bottom: 1px solid var(--m-gray-100);
    transition: background-color 0.2s;
}

.m-doc-thumb {
    width: 120px;
    height: 90px;
    border-radius: 4px;
    /* Pixel perfection: 4px */
    overflow: hidden;
    flex-shrink: 0;
    background: var(--m-gray-50);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.m-doc-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.m-doc-item:hover .m-doc-thumb img {
    transform: scale(1.05);
}

.m-doc-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.m-doc-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--m-black);
    margin-bottom: 8px;
    line-height: 1.4;
    display: block;
    text-decoration: none !important;
}

.m-doc-title:hover {
    color: var(--m-primary);
}

.m-doc-meta {
    font-size: 12px;
    /* Hierarchy: 12px for meta */
    color: var(--m-gray-400);
    /* Lighter gray */
    display: flex;
    align-items: center;
    gap: 12px;
    /* Tighter gap */
}

.m-doc-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Status Badges */
.m-doc-status {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--m-gray-100);
    color: var(--m-gray-600);
    font-weight: 500;
}

.m-doc-status.normal {
    background: rgba(24, 144, 255, 0.1);
    /* Blue tint */
    color: #1890ff;
}

.m-doc-status.hidden {
    background: rgba(250, 140, 22, 0.1);
    /* Orange tint */
    color: #fa8c16;
}

.m-doc-status.rejected {
    background: rgba(245, 34, 45, 0.1);
    /* Red tint */
    color: #f5222d;
}

/* Button Overrides */
.m-btn-action-sm {
    padding: 4px 12px;
    font-size: 12px;
    border-radius: 4px;
    background: var(--m-gray-100);
    color: var(--m-gray-600);
    text-decoration: none !important;
    transition: all 0.2s;
    border: none;
}

.m-btn-action-sm:hover {
    background: var(--m-gray-200);
    color: var(--m-black);
}

.m-btn-action-sm.danger:hover {
    background: #fff1f0;
    color: #f5222d;
}

/* ==============================================
   Two-Level Filter Tabs (Advanced)
   ============================================== */

/* Level 1: Primary Tabs overrides */
.m-doc-filter-tabs {
    margin-bottom: 24px;
    border-bottom: 1px solid var(--m-gray-100);
}

/* Level 2: Sub Filter (Pills) */
.m-doc-sub-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    padding: 0 0 4px 0;
    animation: fadeIn 0.3s ease;
}

.m-doc-sub-tab {
    display: inline-flex;
    align-items: center;
    padding: 4px 14px;
    height: 28px;
    border-radius: 99px;
    font-size: 13px;
    color: var(--m-gray-600);
    background: var(--m-gray-50);
    text-decoration: none !important;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.m-doc-sub-tab:hover {
    color: var(--m-black);
    background: var(--m-gray-100);
}

.m-doc-sub-tab.active {
    color: #fff;
    background: var(--m-black);
    font-weight: 500;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}