@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #0f172a;
    --primary-gradient: linear-gradient(135deg, #0061ff 0%, #60efff 100%);
    --bg-main: #f8fafc;
    --sidebar-bg: #ffffff;
    --text-dark: #0f172a;
    --text-light: #64748b;
    --white: #ffffff;
    --radius-full: 100px;
    --radius-xl: 24px;
    --radius-lg: 18px;
    --shadow-soft: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    --shadow-premium: 0 20px 25px -5px rgba(0, 97, 255, 0.1);
	    --p-color: #4361ee;
    --s-color: #3a0ca3;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --bg-card: #ffffff;
    --radius: 20px;
    --gold-gradient: linear-gradient(135deg, #ffec61, #f321d7); /* VIP Gradient hiện đại hơn */
    --premium-v2: #2e8b57;
	    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --app-bg: #f8fafc;
    --input-bg: rgba(99, 102, 241, 0.05);
	        --noti-unread-bg: #f0f7ff;
        --noti-border-color: #f0f0f0;
		--glass-bg: rgba(255, 255, 255, 0.45);
        --glass-border: rgba(255, 255, 255, 0.6);
        --tech-blue: #3b82f6;
        --tech-gradient-1: linear-gradient(135deg, #2563eb, #1d4ed8);
        --tech-gradient-2: linear-gradient(135deg, #1e293b, #0f172a);
        --card-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.03);
        --premium-shadow: 0 25px 50px -12px rgba(37, 99, 235, 0.25);
		        --pm-primary: #2F6BFF;
        --pm-gradient: linear-gradient(135deg, #2F6BFF 0%, #1A4BCC 100%);
        --pm-text-main: #1B2559;
        --pm-text-sub: #A3AED0;
        --pm-border: #E0E5F2;
        --pm-bg-input: #FFFFFF;
		            --bg-sponsor: linear-gradient(135deg, #fff5f5 0%, #fff0f0 100%);
            --border-sponsor: #fecdd3;
            --ribbon-sponsor: #ef4444;
            --text-sponsor: #b91c1c;
            
            --bg-vip: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
            --border-vip: #fef08a;
            --ribbon-vip: #eab308;
            --text-vip: #a16207;
            
            --bg-starter: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
            --border-starter: #bbf7d0;
            --ribbon-starter: #2e8b57;
            --text-starter: #15803d;
            
            --bg-hot: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
            --border-hot: #fed7aa;
            --ribbon-hot: #f97316;
            --text-hot: #c2410c;
            
            --bg-local: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
            --border-local: #e9d5ff;
            --ribbon-local: #a855f7;
            --text-local: #6b21a8;
}
/* Đảm bảo SweetAlert2 luôn nằm trên cùng */
.swal2-container {
    z-index: 9999 !important;
}
* { box-sizing: border-box; }
body { 
    font-family: 'Plus Jakarta Sans', sans-serif; 
    background-color: var(--bg-main); 
    color: var(--text-dark); 
    margin: 0;
    overflow-x: hidden;
}
/* Áp dụng cho toàn bộ trình duyệt dùng nhân Chromium (Chrome, Edge, Brave...) */
::-webkit-scrollbar {
    width: 8px; /* Độ rộng thanh cuộn dọc */
    height: 8px; /* Độ cao thanh cuộn ngang */
}

::-webkit-scrollbar-track {
    background: #f1f5f9; /* Màu nền của đường ray thanh cuộn */
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #0f172a; /* Màu của cục cuộn */
    border-radius: 10px;
    border: 2px solid #f1f5f9; /* Tạo khoảng trống để thanh cuộn trông thanh thoát hơn */
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8; /* Màu khi di chuột vào */
}
    @keyframes pulse-red {
        0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(248, 113, 113, 0.7); }
        70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(248, 113, 113, 0); }
        100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(248, 113, 113, 0); }
    }
/* Cấu hình cho Firefox (Dùng thuộc tính chuẩn) */
* {
    scrollbar-width: thin;
    scrollbar-color: #0f172a #f1f5f9;
}
    .pka-verify-container { margin: 0 auto; }
    .pka-card { background: white; border-radius: 20px; box-shadow: 0 4px 20px rgba(0,0,0,0.05); padding: 25px; margin-bottom: 25px; border: 1px solid #e2e8f0; }
    .pka-header { font-weight: 800; color: #1e293b; margin-bottom: 15px; font-size: 18px; display: flex; align-items: center; gap: 10px; text-transform: uppercase; }
    
/* Box nhập mã */
    .input-code-box { 
        background: #f0fdf4; 
        border: 1px solid #bbf7d0; 
        padding: 15px; /* Giảm padding một chút trên mobile để rộng chỗ hơn */
        border-radius: 16px; 
        margin-bottom: 25px; 
    }

    /* Group chứa input và button - SỬA LẠI ĐỂ DÍNH LIỀN KHÔNG BỊ LỆCH */
    .input-group-pka { 
        display: flex; 
        margin-top: 10px; 
        border: 2px solid #10b981; /* Đưa viền ra ngoài group */
        border-radius: 12px; 
        overflow: hidden; /* Cắt các góc nhọn của input và button bên trong */
        background: #fff;
    }

    .input-pka { 
        flex: 1; /* Để input chiếm hết khoảng trống */
        min-width: 0; /* Quan trọng: để input có thể co lại nhỏ hơn nội dung của nó trên mobile */
        padding: 12px 15px; 
        border: none !important; /* Bỏ viền của riêng input */
        font-weight: bold; 
        font-size: 16px; 
        text-transform: uppercase; 
        outline: none; 
    }

    .btn-verify { 
        background: #10b981; 
        color: white; 
        border: none; 
        border-radius: 0; /* Bỏ bo góc riêng để khớp với group */
        font-weight: 800; 
        padding: 0 20px; 
        cursor: pointer; 
        transition: 0.3s; 
        white-space: nowrap; /* Giữ chữ XÁC NHẬN trên 1 hàng */
    }

    .btn-verify:hover { background: #059669; }
    .btn-verify:active { opacity: 0.8; }
    .btn-verify:disabled { background: #a7f3d0; cursor: not-allowed; }

    /* Responsive cho điện thoại cực nhỏ */
    @media (max-width: 375px) {
        .btn-verify { padding: 0 12px; font-size: 12px; }
        .input-pka { padding: 10px; font-size: 14px; }
    }

    /* Hướng dẫn quy trình */
    .guide-box { background: #fff7ed; border: 1px solid #ffedd5; padding: 20px; border-radius: 20px; box-shadow: inset 0 2px 4px rgba(0,0,0,0.02); }
    .guide-step { display: flex; gap: 15px; margin-bottom: 18px; }
    .step-num { width: 28px; height: 28px; background: #ea580c; color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 900; flex-shrink: 0; box-shadow: 0 2px 4px rgba(234,88,12,0.3); }
    .step-text { font-size: 13px; color: #431407; line-height: 1.6; }

    /* Badge địa điểm */
    .location-badge { display: inline-block; background: #e0f2fe; color: #0369a1; padding: 4px 12px; border-radius: 20px; font-size: 13px; font-weight: 700; margin-bottom: 15px; }
    /* Style bổ sung cho nút nâng cấp nổi bật */
    .btn-upgrade-vip {
        background: linear-gradient(45deg, #f59e0b, #ef4444);
        color: white !important;
        border: none;
        padding: 8px 16px;
        border-radius: 50px;
        font-weight: 800;
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
        transition: all 0.3s ease;
        display: inline-flex;
        align-items: center;
        cursor: pointer;
    }
    .btn-upgrade-vip:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(245, 158, 11, 0.6);
        filter: brightness(1.1);
    }
    .btn-upgrade-vip i {
        font-size: 1rem;
    }
 .sponsor-input { width: 100%; padding: 10px; margin-bottom: 10px; border: 1px solid #e2e8f0; border-radius: 8px; box-sizing: border-box; }
        .badge-status { padding: 4px 8px; border-radius: 6px; font-weight: 700; font-size: 10px; }
        .btn-action { border:none; padding:4px 8px; border-radius:6px; cursor:pointer; }
        table th { font-weight: 800; color: #64748b; }

/* ============================================================
GIAO DIỆN LOGIN FRAMELESS (KHÔNG KHUNG) - TONE #6366f1
============================================================ */


body.auth-page {
    background: var(--app-bg);
    margin: 0;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    overflow: hidden;
}

.auth-wrapper {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* Ánh sáng nền tạo điểm nhấn cho nội dung */
.bg-glow {
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(248, 250, 252, 0) 70%);
    z-index: -1;
}

/* Auth Card: Loại bỏ background trắng và border */
.auth-card {
    background: transparent; /* KHÔNG NỀN TRẮNG */
    border: none;             /* KHÔNG BORDER */
    box-shadow: none;         /* KHÔNG ĐỔ BÓNG KHUNG */
    width: 100%;
    max-width: 380px;
    padding: 20px;
    z-index: 10;
}

.text-indigo {
    color: var(--primary-color) !important;
}

/* Logo thiết kế nổi bật */
.logo-container {
    position: relative;
    display: inline-block;
}

.auth-logo {
    height: 90px;
    filter: drop-shadow(0 12px 20px rgba(99, 102, 241, 0.2));
    margin-bottom: 10px;
}

.online-dot {
    position: absolute;
    bottom: 15px;
    right: 5px;
    width: 14px;
    height: 14px;
    background: #10b981;
    border: 3px solid var(--app-bg);
    border-radius: 50%;
}

/* Nhóm Input: Thiết kế kiểu App mềm mại */
.input-auth-group {
    background: var(--input-bg);
    border-radius: 1.5rem;
    padding: 8px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1.5px solid transparent;
}

.input-auth-group:focus-within {
    background: #ffffff;
    border-color: var(--primary-color);
    box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.1);
}

.input-auth-group i {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-right: 15px;
    opacity: 0.7;
}

.input-auth-group input {
    border: none;
    background: transparent;
    padding: 12px 0;
    width: 100%;
    outline: none;
    font-size: 1rem;
    font-weight: 500;
    color: #334155;
}

/* Nút bấm Đăng nhập */
.btn-login {
    background: var(--primary-color);
    color: white !important;
    border: none;
    border-radius: 1.5rem;
    padding: 16px;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px -5px rgba(99, 102, 241, 0.4);
    transition: all 0.3s ease;
}

.btn-login:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(99, 102, 241, 0.5);
}

/* Link điều hướng */
.nav-link-custom {
    text-decoration: none;
    color: #64748b;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.nav-link-custom:hover {
    color: var(--primary-color);
}

/* Thông báo lỗi kiểu tinh tế */
.alert-custom {
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
    border-radius: 1rem;
    font-size: 0.85rem;
    padding: 12px;
    margin-bottom: 25px;
    border: none;
}

/* Footer 3D Wave */
.footer-3d-modern {
    position: fixed;
    bottom: 0;
    width: 100%;
    line-height: 0;
    z-index: 1;
}

.waves-svg {
    width: 100%;
    height: 12vh;
    min-height: 80px;
}

.wave-animation > use {
    animation: wave-move 20s cubic-bezier(0.55, 0.5, 0.45, 0.5) infinite;
}
.wave-animation > use:nth-child(1) { animation-delay: -2s; animation-duration: 7s; }
.wave-animation > use:nth-child(2) { animation-delay: -3s; animation-duration: 10s; }
.wave-animation > use:nth-child(3) { animation-delay: -4s; animation-duration: 13s; }
.wave-animation > use:nth-child(4) { animation-delay: -5s; animation-duration: 18s; }

@keyframes wave-move {
    0% { transform: translate3d(-90px, 0, 0); }
    100% { transform: translate3d(85px, 0, 0); }
}

/* Hiệu ứng rung */
.shake { animation: shake-act 0.5s ease-in-out; }
@keyframes shake-act {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

/* Mobile tối ưu */
@media (max-width: 480px) {
    .auth-card { padding: 15px; }
    .auth-logo { height: 80px; }
}


/* --- LAYOUT --- */
.app-wrapper { display: flex; min-height: 100vh; }
/* --- SIDEBAR --- */
.sidebar {
    width: 280px;
    background: var(--sidebar-bg);
    border-right: 1px solid rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    /* Sửa lỗi lệch trên Mobile: Sử dụng dvh để trừ đi thanh công cụ trình duyệt */
    height: 100vh;
    height: 100dvh; 
    position: sticky;
    top: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1100;
    /* Đảm bảo sidebar không bị vỡ bố cục khi dùng flex-direction: column */
    overflow: hidden;
}

.sidebar-logo { 
    padding: 30px 20px; 
    text-align: center; 
    position: relative; 
    flex-shrink: 0; /* Không cho logo bị nén lại */
}
.sidebar-logo img { width: 120px; }

/* Nút đóng Sidebar trên Mobile */
.close-sidebar {
    position: absolute;
    right: 15px;
    top: 15px;
    display: none;
    background: #f1f5f9;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 10px;
    color: var(--text-dark);
}

.nav-group { 
    padding: 0 15px; 
    flex-grow: 1; 
    overflow-y: auto; /* Cho phép cuộn menu nếu quá dài */
    /* Làm mượt thanh cuộn trên mobile */
    -webkit-overflow-scrolling: touch; 
}

/* Tinh chỉnh thanh cuộn cho nhỏ gọn (tùy chọn) */
.nav-group::-webkit-scrollbar { width: 4px; }
.nav-group::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 10px; }

.nav-label { 
    font-size: 11px; 
    font-weight: 800; 
    color: #94a3b8; 
    letter-spacing: 1px; 
    margin: 20px 0 10px 15px; 
    text-transform: uppercase; 
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 10px 10px;
    margin-bottom: 4px;
    border-radius: var(--radius-lg);
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
}
.nav-item i { font-size: 1.2rem; margin-right: 12px; }
.nav-item:hover { background: #f1f5f9; color: var(--primary); }
.nav-item.active { background: var(--primary); color: var(--white); box-shadow: var(--shadow-premium); }

/* Phần bao bọc nút Đăng xuất */
.p-4.mt-auto {
    flex-shrink: 0; /* Giữ cố định kích thước phần dưới cùng */
    background: var(--sidebar-bg);
}

.main-content { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* --- TOPBAR --- */
.top-nav {
    height: 70px;
    background: rgba(255, 255, 255);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    border-bottom: 1px solid rgba(0,0,0,0.03);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.search-bar {
    background: #f1f5f9;
    border-radius: var(--radius-full);
    padding: 8px 18px;
    display: flex;
    align-items: center;
    width: 300px;
}
.search-bar input { border: none; background: transparent; outline: none; margin-left: 10px; width: 100%; font-size: 14px; }

.top-actions { display: flex; align-items: center; gap: 15px; }

.noti-btn {
    position: relative;
    width: 40px;
    height: 40px;
    background: var(--white);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.noti-dot { position: absolute; top: 10px; right: 10px; width: 8px; height: 8px; background: #ef4444; border: 2px solid var(--white); border-radius: 50%; }

/* --- CONTENT --- */
.content-body { padding: 30px; }


/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1050;
    display: none;
    backdrop-filter: blur(4px);
}
.sidebar-overlay.show { display: block; }

/* --- MOBILE --- */
@media (max-width: 991px) {
    .sidebar { 
        position: fixed; 
        left: -280px; 
        top: 0;
        /* Force height cho mobile một lần nữa để tránh nhảy layout */
        height: 100dvh; 
    }
    .sidebar.show { left: 0; }
    .close-sidebar { display: block; }
    .top-nav { padding: 0 15px; }
    .search-bar { display: none; }
    .content-body { padding: 15px; }
    .banner-img { display: none; }
    .welcome-banner { padding: 25px; }
}

/* --- CATEGORY CARD FIX --- */
.category-card { 
    transition: all 0.3s; 
    cursor: pointer; 
    border: 1px solid rgba(0,0,0,0.05) !important; 
    position: relative; 
    overflow: visible !important; /* Đảm bảo dropdown thoát ra ngoài card */
    background: var(--white);
    border-radius: var(--radius-lg);
}

.category-card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 10px 25px rgba(0, 97, 255, 0.1) !important; 
    border-color: var(--primary) !important; 
    z-index: 10; /* Nổi bật card khi hover để dropdown nằm trên card kế cạnh */
}

.icon-box { 
    width: 52px; 
    height: 52px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border-radius: 14px; 
    background: #f0f7ff; 
    color: var(--primary); 
}

.fw-800 { font-weight: 800; }
/* --- DROPDOWN FIX --- */
/* Đảm bảo dropdown menu luôn nằm trên cùng của Card và Modal */
.dropdown-menu { 
    z-index: 2000 !important; 
    border: none !important;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1) !important;
    border-radius: 12px !important;
    padding: 8px !important;
}

.dropdown-item {
    border-radius: 8px !important;
    padding: 10px 15px !important;
    font-weight: 600 !important;
    transition: 0.2s;
}

.dropdown-item:hover {
    background-color: #fff1f2 !important; /* Màu nền nhẹ cho nút xóa */
}


 /* Tinh chỉnh padding cho Mobile */
        @media (max-width: 576px) {
            .auth-wrapper {
                padding: 0 0px;
            }
        }
        /* FIX: Thiết lập z-index chuẩn Bootstrap 5 để hiện lớp phủ (backdrop) */
        /* Cưỡng bức Modal và Backdrop luôn ở lớp cao nhất */
        .modal { z-index: 1060 !important; }
        .modal-backdrop { z-index: 1059 !important; background-color: rgba(0,0,0,1.5) !important; }
        
        /* Đảm bảo auth-wrapper không đè lên modal */
        .auth-wrapper { position: relative; z-index: 1; }

        /* Style cho Inline Alert hiện đại */
        #forgotAlert {
            display: none;
            margin-top: 15px;
            border: none;
            border-radius: 12px;
            font-size: 14px;
            font-weight: 500;
            padding: 12px 15px;
        }
        /* Animation slide chỉ chạy 1 lần khi hiện */
        .alert-animate {
            animation: slideUp 0.3s ease forwards;
        }
        @keyframes slideUp {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .alert-modern-success { background-color: #dcfce7; color: #166534; border-left: 4px solid #22c55e; }
        .alert-modern-error { background-color: #fee2e2; color: #991b1b; border-left: 4px solid #ef4444; }
		
		
		/* 1. Hiệu ứng Aura tỏa sáng cho Icon */
    @keyframes vipAura {
        0% { transform: scale(0.8); opacity: 0.8; }
        100% { transform: scale(2.2); opacity: 0; }
    }
    .vip-gold-aura {
        position: absolute;
        border-radius: 50%;
        animation: vipAura 2s infinite;
        z-index: 1;
    }

    /* 2. Hiệu ứng vương miện bay nhẹ */
    .vip-crown-gold {
        color: #f59e0b;
        filter: drop-shadow(0 0 5px rgba(245, 158, 11, 0.8));
        animation: crownFloat 2s ease-in-out infinite;
    }
    @keyframes crownFloat {
        0%, 100% { transform: translateY(0) rotate(0); }
        50% { transform: translateY(-3px) rotate(5deg); }
    }

    /* 3. HIỆU ỨNG ÓNG ÁNH LƯỚT SÓNG CHO BADGE HẾT HẠN */
    .expire-badge-highlight {
        font-size: 10px;
        font-weight: 800;
        padding: 3px 10px;
        border-radius: 8px;
        letter-spacing: 0.5px;
        position: relative;
        overflow: hidden; /* Cần thiết để hiệu ứng sóng không tràn ra ngoài */
        display: inline-flex;
        align-items: center;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    .expire-badge-highlight::after {
        content: "";
        position: absolute;
        top: -50%;
        left: -60%;
        width: 40%;
        height: 200%;
        background: rgba(255, 255, 255, 0.4);
        transform: rotate(30deg);
        animation: shimmer 2.5s infinite;
    }

    @keyframes shimmer {
        0% { left: -60%; }
        100% { left: 130%; }
    }

    /* Tối ưu hiển thị grid trên mobile */
    .gift-container {
        display: grid; 
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
        gap: 15px;
    }
    @media (max-width: 480px) {
        .gift-container {
            grid-template-columns: 1fr;
        }
    }
	
	
/* Banner Chào mừng - Modern Glassmorphism */
.welcome-banner {
    background: linear-gradient(110deg, #4361ee 0%, #3a0ca3 100%);
    border-radius: 28px;
    padding: 40px;
    color: white;
    position: relative;
    margin-bottom: 35px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(67, 97, 238, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.welcome-banner::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    filter: blur(50px);
}

/* Kiểu chữ tiêu đề */
.welcome-banner h2 {
    font-size: 1.8rem;
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Huy hiệu (Badges) được thiết kế lại */
.glass-badge {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
}

.vip-badge-premium {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #44340e !important;
    border: none;
    box-shadow: 0 5px 15px rgba(255, 140, 0, 0.4);
    font-weight: 800 !important;
}

.vip-badge-standard {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white !important;
    border: none;
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.4);
}

.expire-box {
    font-size: 0.7rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px 10px;
    border-radius: 8px;
    margin-top: 6px;
    display: inline-block;
    backdrop-filter: blur(5px);
}
/* Toàn bộ CSS từ đầu đến cuối */
.luxury-welcome-card {
    background: #0f172a; 
    border-radius: 30px;
    padding: 25px;
    color: #f8fafc;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.luxury-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
    position: relative;
    z-index: 5;
}

.meta-row { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }


.share-icon-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    transition: 0.3s;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.share-icon-btn:hover { background: rgba(255, 255, 255, 0.2); }

.greeting-sub { color: #94a3b8; font-size: 0.9rem; margin-bottom: 8px; margin-top: 15px;}
.greeting-main { font-size: 2.4rem; font-weight: 800; line-height: 1.2; margin: 0; }
.greeting-main span { color: #10b981; }

.btn-luxury-outline {
    display: inline-block;
    margin-top: 30px;
    padding: 12px 24px;
    border-radius: 14px;
    color: #fff;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.03);
    font-weight: 600;
    transition: 0.3s;
}
.btn-luxury-outline:hover { background: #fff; color: #000; text-decoration: none; }

/* Control Section */
.control-glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(15px);
    border-radius: 24px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    height: 100%;
}

.status-chip {
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}
.chip-online { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.chip-closed { background: rgba(148, 163, 184, 0.1); color: #94a3b8; }
.chip-rejected { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.chip-pending { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }

.pulse-dot {
    width: 8px; height: 8px; background: #34d399; border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(52, 211, 153, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.toggle-box {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px;
}
.switch-label { font-size: 0.85rem; font-weight: 600; color: #cbd5e1; }

.divider { height: 1px; background: rgba(255, 255, 255, 0.1); margin: 20px 0; }

.btn-luxury-gold {
    width: 100%;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border: none; color: #451a03; padding: 14px; border-radius: 14px;
    font-weight: 800; font-size: 0.9rem; margin-top: 15px;
    box-shadow: 0 10px 20px rgba(245, 158, 11, 0.2);
    transition: 0.3s;
    cursor: pointer;
}
.btn-luxury-gold:hover { transform: translateY(-3px); }

/* Custom Switch fix - Đảm bảo bấm được */
.custom-toggle-pro:checked {
    background-color: #10b981 !important;
    border-color: #10b981 !important;
}

/* Trang trí */
.luxury-bg-glow {
    position: absolute; top: -20%; left: -10%; width: 50%; height: 100%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, rgba(0,0,0,0) 70%);
    z-index: 1;
}

.luxury-logo-bg {
    position: absolute; right: -20px; bottom: -20px; width: 220px;
    opacity: 0.05; pointer-events: none; transform: rotate(-15deg);
}

@media (max-width: 991px) {
    .luxury-grid { grid-template-columns: 1fr; gap: 30px; }
    .greeting-main { font-size: 1.8rem; }
}
.banner-img {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    width: 140px;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.2));
    transition: 0.5s;
}

.welcome-banner:hover .banner-img {
    transform: translateY(-50%) scale(1.05) rotate(5deg);
}

/* Thẻ chỉ số nhanh */
.quick-stats {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid #e2e8f0;
    height: 100%;
    transition: 0.3s;
}
.quick-stats:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }

/* Bảng chi tiết thông tin */
.info-table-box {
    background: white;
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    border: 1px solid #e2e8f0;
}
.info-label { color: #64748b; font-size: 0.85rem; font-weight: 600; margin-bottom: 3px; text-transform: uppercase; }
.info-value { color: #1e293b; font-weight: 700; font-size: 1rem; margin-bottom: 15px; }
.info-value.empty { color: #94a3b8; font-weight: 400; font-style: italic; }
/* Container hiệu ứng card mới */
.stat-card {
    position: relative;
    background: #ffffff;
    border-radius: 20px;
    padding: 24px;
    display: flex;
    align-items: center;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.04), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: var(--bs-primary);
}

/* Icon chính */
.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 18px;
    z-index: 2;
    transition: 0.3s;
}

/* Màu sắc từng loại Card */
.card-view .stat-icon { background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%); color: white; }
.card-rating .stat-icon { background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%); color: white; }
.card-points .stat-icon { background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%); color: white; }

/* Nội dung văn bản */
.stat-content { z-index: 2; }

.stat-label {
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.stat-value {
    color: #1e293b;
    font-size: 1.75rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
}

.stat-value span {
    font-size: 0.9rem;
    color: #94a3b8;
    font-weight: 500;
}

/* Icon ẩn trang trí phía sau (Tạo nét chuyên nghiệp) */
.stat-bg-icon {
    position: absolute;
    right: -10px;
    bottom: -15px;
    font-size: 5rem;
    opacity: 0.03;
    transform: rotate(-15deg);
    z-index: 1;
    transition: 0.4s;
}

.stat-card:hover .stat-bg-icon {
    transform: rotate(0deg) scale(1.1);
    opacity: 0.06;
}

/* Responsive cho Mobile */
@media (max-width: 768px) {
    .stat-card { padding: 18px; }
    .stat-value { font-size: 1.4rem; }
    .stat-icon { width: 48px; height: 48px; font-size: 1.2rem; }
}
/* CSS CHO CÁC NÚT MỚI - TỐI ƯU PC ĐỀU NHAU, GIỮ NGUYÊN MOBILE */
.action-btn-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-premium-action {
    padding: 10px 22px;
    border-radius: 15px;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    color: white !important;
    text-decoration: none !important;
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
    white-space: nowrap;
}

/* Trạng thái trên PC: Nút co lại vừa đủ, không ép text tiêu đề */
@media (min-width: 768px) {
    .info-header-flex {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    .info-header-title {
        flex-grow: 1;
        margin-bottom: 0 !important;
    }
    .btn-premium-action {
        min-width: 160px;
        flex: 0 1 auto;
    }
}

.btn-edit-loc {
    background: linear-gradient(135deg, #4361ee, #3a0ca3);
}

.btn-pin-lock {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.btn-premium-action:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.15);
    filter: brightness(1.1);
}

.btn-premium-action:active { transform: scale(0.95); }

/* Grid Tag */
.tag-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-item { 
    padding: 5px 12px; 
    border-radius: 8px; 
    font-size: 11px; 
    font-weight: 600;
    border: 1px solid #e2e8f0;
    background: #f8f9fa;
    color: #64748b;
}
.tag-item.active { background: #dcfce7; color: #15803d; border-color: #bbf7d0; }

.activity-box { background: white; border-radius: var(--radius); padding: 25px; box-shadow: 0 4px 12px rgba(0,0,0,0.03); border: 1px solid #e2e8f0; }

/* Styles cho Gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; margin-top: 15px; }
.gallery-item { 
    aspect-ratio: 1/1; 
    border-radius: 12px; 
    overflow: hidden; 
    cursor: pointer; 
    position: relative;
    border: 2px solid transparent;
    transition: 0.3s;
}
.gallery-item:hover { border-color: var(--p-color); transform: scale(1.03); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.gallery-item .is-cover-badge {
    position: absolute;
    top: 5px;
    left: 5px;
    background: var(--danger);
    color: white;
    font-size: 8px;
    padding: 2px 6px;
    border-radius: 5px;
    font-weight: bold;
}

/* Modal Popup Ảnh - Nâng cấp chuyên nghiệp & Sửa lỗi lệch */
.photo-popup {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.photo-popup.show { opacity: 1; display: flex; }

.popup-content { 
    position: relative; 
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.popup-content img { 
    max-width: 90%; 
    max-height: 80vh; 
    object-fit: contain;
    border-radius: 8px; 
    box-shadow: 0 10px 50px rgba(0,0,0,0.8); 
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.3s ease;
    transform: scale(0.9);
    opacity: 0;
    user-select: none;
    -webkit-user-drag: none;
}
.photo-popup.show img { transform: scale(1); opacity: 1; }

.popup-close { 
    position: absolute; 
    top: 20px; 
    right: 20px; 
    color: white; 
    font-size: 15px; 
    cursor: pointer; 
    z-index: 10002;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    transition: 0.3s;
}
.popup-close:hover { background: var(--danger); transform: rotate(90deg); }

/* Sửa lỗi nút Next/Prev không thấy trên PC */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(5px);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    width: 60px;
    height: 60px;
    cursor: pointer;
    border-radius: 50%;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    z-index: 10001;
}
.nav-btn:hover { background: var(--p-color); border-color: var(--p-color); box-shadow: 0 0 20px rgba(67, 97, 238, 0.5); }
.nav-prev { left: 30px; }
.nav-next { right: 30px; }

/* Indicator phân trang ảnh */
.popup-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    background: rgba(255,255,255,0.15);
    padding: 6px 18px;
    border-radius: 30px;
    backdrop-filter: blur(5px);
}

@media (max-width: 992px) {
    .nav-btn { width: 50px; height: 50px; font-size: 20px; }
    .nav-prev { left: 15px; }
    .nav-next { right: 15px; }
    .nav-btn { background: rgba(0,0,0,0.4); }
}

@media (max-width: 768px) {
    .banner-img { display: none; }
    .welcome-banner { text-align: left; padding: 25px; }
    .popup-content img { max-width: 95%; max-height: 70vh; }
    .btn-premium-action {
        flex: 1 1 calc(50% - 5px); /* Chia đôi hàng trên mobile cho đều */
        font-size: 0.8rem;
        padding: 10px 10px;
    }
    .action-btn-group { gap: 10px; }
}


    #ios-install-guidance {
        display: block !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #ffffff;
        z-index: 9999;
        padding: 25px;
        border-radius: 30px 30px 0 0;
        box-shadow: 0 -10px 30px rgba(0,0,0,0.15);
        border-top: 1px solid rgba(0,0,0,0.05);
        transform: translateY(105%);
        transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
        visibility: hidden;
    }

    #ios-install-guidance.show {
        transform: translateY(0);
        visibility: visible;
    }
	
/* --- CSS XỬ LÝ TRẠNG THÁI ẨN FORM --- */
.auth-card.auth-hidden {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
    pointer-events: none;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.swal2-backdrop-show {
    background: rgba(15, 23, 42, 0.6) !important; 
    backdrop-filter: blur(4px) !important;
}

/* --- CSS CAO CẤP CHO POPUP THÀNH CÔNG --- */
.premium-swal-popup {
    border-radius: 24px !important;
    padding: 2rem !important;
    background: rgba(255, 255, 255, 1) !important;
    box-shadow: 0 25px 50px -12px rgba(99, 102, 241, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
    overflow: hidden !important; /* QUAN TRỌNG: Để thanh timer không lòi ra khỏi góc bo */
}

/* Sửa lỗi dấu tick bị vòng tròn trắng lệch */
.premium-swal-popup .swal2-success-circular-line-left,
.premium-swal-popup .swal2-success-circular-line-right,
.premium-swal-popup .swal2-success-fix {
    display: none !important; /* Ẩn các mảng trắng gây lệch icon */
}

.premium-swal-title {
    color: #4338ca !important;
    font-weight: 800 !important;
    letter-spacing: -0.5px;
    font-size: 1.5rem !important;
}

.premium-swal-html {
    color: #4b5563 !important;
    font-size: 1rem !important;
    line-height: 1.6 !important;
}

/* Sửa thanh progress bar không bị lệch ra ngoài */
.premium-swal-popup .swal2-timer-progress-bar {
    background: linear-gradient(to right, #6366f1, #a855f7) !important;
    height: 6px !important;
    border-bottom-left-radius: 24px !important; /* Bo góc khớp với popup */
    border-bottom-right-radius: 24px !important;
    bottom: 0 !important;
    position: absolute !important;
}

/* --- TÙY BIẾN ADMIN POPUP --- */
.admin-swal-popup {
    border-radius: 2rem !important;
    padding: 1.5rem 1.2rem !important;
    background: #ffffff !important;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1) !important;
    width: 360px !important;
    border: none !important;
}

.admin-swal-title {
    font-size: 1.2rem !important;
    font-weight: 800 !important;
    color: #1e293b !important;
    letter-spacing: 0.5px;
    margin-bottom: 0.2rem !important;
}

.swal2-html-container {
    margin: 0.5rem 0 0 0 !important;
    font-size: 0.85rem !important;
}

.admin-swal-input {
    background: #f1f5f9 !important;
    border: none !important;
    border-radius: 1rem !important;
    height: 48px !important;
    font-size: 1.1rem !important;
    text-align: center !important;
    letter-spacing: 4px !important;
    transition: all 0.3s ease !important;
    margin: 1rem auto !important;
    width: 85% !important;
}

.admin-swal-input:focus {
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
}

.admin-swal-confirm {
    background: #6366f1 !important;
    color: white !important;
    border-radius: 1rem !important;
    padding: 12px 24px !important;
    font-weight: 700 !important;
    font-size: 0.9rem !important;
    margin: 8px 4px !important;
    border: none !important;
    box-shadow: 0 8px 15px -3px rgba(99, 102, 241, 0.3) !important;
}

.admin-swal-confirm:hover {
    background: #4f46e5 !important;
    transform: translateY(-1px);
}

.admin-swal-cancel {
    background: #f8fafc !important;
    color: #94a3b8 !important;
    border-radius: 1rem !important;
    padding: 12px 18px !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    margin: 8px 4px !important;
    border: none !important;
}

.admin-swal-cancel:hover {
    background: #f1f5f9 !important;
    color: #64748b !important;
}

.swal2-validation-message {
    border: none !important;
    background: #fff1f2 !important;
    color: #e11d48 !important;
    border-radius: 0.8rem !important;
    margin: 0.5rem 1rem !important;
    padding: 0.6rem !important;
    font-size: 0.8rem !important;
}

.swal2-icon {
    margin: 1rem auto 1.5rem !important;
}

/* Hiệu ứng mờ dần toàn trang */
.page-exit-active {
    filter: blur(10px);
    opacity: 0;
    transition: filter 0.4s ease, opacity 0.4s ease;
}



















/* --- Integrated User Pill & Branch Selector --- */
.user-pill-glass {
    padding: 6px 14px 6px 6px;
    background: #ffffff;
    border-radius: 50px;
    border: 1px solid rgba(99, 102, 241, 0.15) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}

.user-pill-glass:hover {
    background: #f8faff;
    border-color: #6366F1 !important;
    transform: translateY(-1px);
}

.avatar-gradient {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366F1 0%, #EC4899 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.25);
}

.branch-label {
    display: block;
    font-size: 8px;
    font-weight: 800;
    color: #6366F1;
    letter-spacing: 0.8px;
    line-height: 1;
    margin-bottom: 2px;
}

.branch-name-current {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    display: block;
    max-width: 150px;
    line-height: 1.2;
}

/* --- Dropdown Glassmorphism --- */
.shadow-glass {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12) !important;
    min-width: 280px;
}

.dropdown-header-custom {
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 800;
    color: #94a3b8;
    letter-spacing: 1px;
}

.dropdown-item-modern {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    color: #475569;
    text-decoration: none;
    transition: all 0.2s;
}

.dropdown-item-modern:hover {
    background: #f1f5f9;
    color: #6366F1;
}

.active-branch {
    background: linear-gradient(to right, rgba(99, 102, 241, 0.08), transparent);
    color: #6366F1 !important;
    border-left: 3px solid #6366F1;
}

.branch-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}

.active-branch .branch-item-icon {
    background: #6366F1;
    color: white;
}

/* --- Notifications --- */
.noti-btn-glass {
    position: relative;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s;
}

.noti-btn-glass:hover {
    background: rgba(0, 0, 0, 0.03);
}

.noti-dot-modern {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: #EF4444;
    border: 2px solid #fff;
    border-radius: 50%;
}

/* --- Mobile Responsive --- */
@media (max-width: 575.98px) {
    .branch-name-current {
        max-width: 90px;
        font-size: 13px;
    }
    .user-pill-glass {
        padding: 4px 10px 4px 4px;
    }
    .avatar-gradient {
        width: 30px;
        height: 30px;
    }
}

/* Style cho thông báo chuyên nghiệp - Đã tối ưu Mobile */
.pka-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: rgba(0, 0, 0, 0.9); /* Tăng độ đậm để dễ đọc */
    color: #fff;
    padding: 14px 28px; /* Tăng padding một chút */
    border-radius: 50px;
    z-index: 10000; /* Ưu tiên cao nhất */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.15);
    white-space: nowrap; /* Không cho xuống dòng */
    font-weight: 500;
    font-size: 15px; /* Size chuẩn cho Mobile */
}

/* Tối ưu riêng cho Mobile */
@media (max-width: 768px) {
    .pka-toast {
        width: 85%; /* Chiếm 85% chiều ngang màn hình */
        min-width: 280px; 
        top: 30px; /* Đẩy xuống thấp hơn một chút để tránh dính tai thỏ/camera */
        font-size: 16px; /* Chữ to hơn cho dễ đọc */
        padding: 16px 20px;
    }
}

.pka-toast.show {
    transform: translateX(-50%) translateY(0);
}

.pka-toast i {
    color: #10b981;
    font-size: 1.2rem; /* Icon to hơn chút */
}

    /* Container với viền Gradient nổi bật */
    .pka-rank-container {
        background: #ffffff;
        border-radius: 24px;
        color: #334155;
        position: relative;
        padding: 2px; /* Tạo khoảng trống cho viền */
        background: linear-gradient(white, white) padding-box,
                    linear-gradient(135deg, #6366f1 0%, #3b82f6 100%) border-box;
        border: 2px solid transparent;

    }

    /* Tab styles */
    .nav-rank-pills {
        background: #f1f5f9;
        padding: 4px;
        border-radius: 12px;
    }
    .nav-rank-pills .nav-link {
        color: #64748b;
        font-weight: 700;
        border-radius: 10px;
        padding: 6px 16px;
        font-size: 13px;
        transition: 0.2s;
    }
    .nav-rank-pills .nav-link.active {
        background: #ffffff !important;
        color: #0f172a !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    /* Stats Card */
    .rank-stats-card {
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 20px;
        padding: 20px !important;
    }
    .rank-main-val {
        font-size: 28px; /* Giảm size mặc định để cân đối với text "Chưa lọt top" */
        font-weight: 800;
        color: #0f172a;
        line-height: 1.1;
    }

    /* Medal container - Đã thêm số vào giữa cúp */
    .medal-container {
        position: relative;
        width: 45px;
        height: 45px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-right: 15px;
        flex-shrink: 0;
    }
    .shine-wave {
        position: absolute;
        width: 100%;
        height: 100%;
        border-radius: 12px;
        overflow: hidden;
    }
    .shine-wave::after {
        content: "";
        position: absolute;
        top: -50%; left: -50%;
        width: 200%; height: 200%;
        background: linear-gradient(45deg, transparent, rgba(255,255,255,0.4), transparent);
        transform: rotate(45deg);
        animation: waveReflection 3s infinite;
    }
    @keyframes waveReflection {
        0% { transform: translate(-100%, -100%) rotate(45deg); }
        100% { transform: translate(100%, 100%) rotate(45deg); }
    }

    .cup-icon { 
        font-size: 26px; 
        z-index: 1; 
        position: relative;
    }
    .cup-number {
        position: absolute;
        top: 45%; /* Căn chỉnh lại để vào giữa thân cúp */
        left: 50%;
        transform: translate(-50%, -50%);
        font-size: 11px;
        font-weight: 900;
        color: #000000;
        z-index: 2;
        text-shadow: 1px 1px 2px rgba(255,255,255,0.5);
    }

  /* Gradients cho Top 3 */
.m-bg-1 { background: linear-gradient(135deg, #FFD700, #FFA500); } /* Vàng */
.m-bg-2 { background: linear-gradient(135deg, #94a3b8, #cbd5e1); } /* Bạc */
.m-bg-3 { background: linear-gradient(135deg, #f97316, #fb923c); } /* Đồng */

/* Bổ sung Top 4 và Top 5 */
.m-bg-4 { background: linear-gradient(135deg, #6366F1, #818CF8); } /* Indigo - Màu thương hiệu của bạn */
.m-bg-5 { background: linear-gradient(135deg, #2dd4bf, #5eead4); } /* Teal - Xanh ngọc năng động */

    /* Rank Item */
    .rank-item {
        background: #ffffff;
        border: 1px solid #f1f5f9;
        border-radius: 16px;
        padding: 12px 18px;
        margin-bottom: 10px;
        transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    }
    .rank-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 15px rgba(0,0,0,0.05);
    }
    .rank-item.is-me-active {
        border-color: #3b82f6;
        background: #eff6ff;
    }

    .btn-map-mini {
        background: #3b82f6;
        color: white;
        padding: 5px 12px;
        border-radius: 8px;
        font-size: 12px;
        font-weight: 700;
        text-decoration: none;
    }

    .fw-900 { font-weight: 900; }
    .fw-800 { font-weight: 800; }
    .text-address {
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-size: 11px;
    }
	
	.rank-item {
    cursor: pointer;
    border: 1px solid transparent;
}
.rank-item:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
}
/* Đảm bảo thẻ a không làm thay đổi màu chữ mặc định */
a.text-decoration-none:hover {
    text-decoration: none;
}


@keyframes badge-glow-strong {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(46, 139, 87, 0.7); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 6px rgba(46, 139, 87, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(46, 139, 87, 0); }
}

@keyframes vip-glow-strong {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.8); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 6px rgba(255, 215, 0, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 215, 0, 0); }
}

.premium-badge {
    display: inline-flex; /* Sử dụng flex để căn giữa icon và chữ */
    align-items: center;
    justify-content: center;
    font-size: 8px;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 900;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    text-transform: uppercase;
    gap: 3px; /* Khoảng cách giữa icon và chữ */
    border: 1px solid rgba(255,255,255,0.2);
}

.badge-starter {
    background-color: #2e8b57;
    color: white;
    animation: badge-glow-strong 1.5s infinite ease-in-out;
}

.badge-vip {
    background-color: #FFD700;
    color: #000;
    animation: vip-glow-strong 1.5s infinite ease-in-out;
}

.badge-wrapper {
    display: flex;
    align-items: center;
    min-height: 20px; /* Giữ chỗ để không bị nhảy dòng */
}


.reward-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.85); z-index: 99999;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(12px);
}

.reward-card {
    background: #fff; width: 95%; max-width: 420px;
    border-radius: 40px; padding: 55px 30px 40px; text-align: center;
    position: relative; 
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    animation: rewardPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    /* Viền động dựa trên biến màu chính */
    border: 2px solid var(--main-clr);
}

.reward-badge {
    position: absolute; top: -25px; left: 50%; transform: translateX(-50%);
    background: var(--bg-grad); /* Sử dụng gradient từ PHP */
    color: #fff; padding: 12px 30px; border-radius: 50px;
    font-weight: 900; font-size: 13px; letter-spacing: 1.5px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    text-transform: uppercase; white-space: nowrap;
}

.reward-points-big {
    font-size: 55px; font-weight: 950; 
    color: var(--main-clr); /* Sử dụng màu chính từ PHP */
    margin: 15px 0; line-height: 1;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}

.reward-msg { color: #1e293b; font-size: 20px; font-weight: 800; margin-bottom: 8px; line-height: 1.4; }
.reward-sub { color: #64748b; font-size: 14px; font-weight: 500; margin-bottom: 25px; }

.reward-feature-box {
    background: #f8fafc; border-radius: 28px; padding: 22px;
    margin-bottom: 25px; text-align: left; border: 1px solid #f1f5f9;
}

.reward-feature-item { 
    display: flex; align-items: flex-start; margin-bottom: 12px; 
    color: #334155; font-size: 13.5px; font-weight: 600; line-height: 1.5;
}

.reward-feature-item i { 
    color: var(--main-clr); 
    margin-right: 12px; font-size: 16px; margin-top: 2px; 
}

.reward-close-btn {
    background: var(--main-clr); /* Nút bấm sẽ luôn theo màu chính */
    color: #fff; border: none; width: 100%;
    padding: 18px; border-radius: 22px; font-weight: 800;
    font-size: 16px; cursor: pointer; transition: all 0.3s;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.reward-close-btn:hover { 
    transform: scale(1.03); 
    filter: brightness(1.1); 
}

@keyframes rewardPop {
    0% { transform: scale(0.5) translateY(50px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}


.vip-warning-box {
        background: linear-gradient(90deg, #e11d48 0%, #fb7185 100%);
        border-radius: 16px;
        padding: 15px 20px;
        margin-bottom: 15px;
        box-shadow: 0 0 20px rgba(225, 29, 72, 0.4);
        border: 2px solid #fff;
        position: relative;
        overflow: hidden;
    }

    .warning-content {
        display: flex;
        flex-direction: column; /* Mobile xếp dọc */
        gap: 15px;
        position: relative;
        z-index: 2;
    }

    .warning-main-info {
        display: flex;
        align-items: flex-start;
        gap: 12px;
    }

    .warning-icon {
        background: #fff;
        min-width: 42px;
        height: 42px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 12px;
        color: #e11d48;
        font-size: 22px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    }

    .warning-text {
        color: #fff;
    }

    .warning-title {
        display: block;
        font-weight: 900;
        font-size: 14px;
        letter-spacing: 0.5px;
        margin-bottom: 3px;
    }

    .warning-text p {
        margin: 0;
        font-size: 13px;
        font-weight: 500;
        line-height: 1.5;
        opacity: 0.95;
    }

    .days-count {
        background: #fff;
        color: #e11d48;
        padding: 1px 6px;
        border-radius: 5px;
        margin: 0 2px;
        font-weight: 800;
    }

    .warning-button-wrapper {
        width: 100%;
    }

    .btn-renew-fast {
        background: #fff;
        color: #e11d48 !important;
        text-decoration: none !important;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 12px 15px;
        border-radius: 10px;
        font-weight: 800;
        font-size: 14px;
        transition: all 0.3s;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        width: 100%;
    }

    /* Tối ưu cho Desktop (Màn hình lớn) */
    @media (min-width: 768px) {
        .warning-content {
            flex-direction: row; 
            align-items: center;
            justify-content: space-between;
        }
        .warning-button-wrapper {
            width: auto;
        }
        .btn-renew-fast {
            width: auto;
            white-space: nowrap;
            padding: 8px 20px;
        }
        .warning-main-info {
            flex: 1;
        }
    }

    .vip-warning-box::after {
        content: "";
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
        animation: light-sweep 3s infinite;
    }

    @keyframes light-sweep {
        0% { left: -100%; }
        50% { left: 100%; }
        100% { left: 100%; }
    }
	
	.chat-wrapper {
        position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    }

    /* Nút chính */
    .chat-main-btn {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    }

    .chat-main-btn:hover {
        transform: scale(1.1) rotate(5deg);
    }

    .chat-main-btn .close-icon {
        display: none;
    }

    /* Khi active (đang mở) */
    .chat-wrapper.active .chat-main-btn {
        background: #f44336;
        transform: rotate(90deg);
    }
    .chat-wrapper.active .chat-main-btn .fa-comments { display: none; }
    .chat-wrapper.active .chat-main-btn .close-icon { display: block; }

    /* Các nút con (Zalo, FB) */
    .chat-item {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        text-decoration: none;
        font-size: 22px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(20px);
        transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        box-shadow: 0 8px 15px rgba(0,0,0,0.15);
        position: relative;
    }

    .chat-item img { width: 28px; height: 28px; }

    .chat-item.facebook { background: #0084ff; transition-delay: 0.1s; }
    .chat-item.zalo { background: #0068ff; transition-delay: 0.2s; }

    /* Hiện nút con khi active */
    .chat-wrapper.active .chat-item {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    /* Label hiện ra khi hover vào nút con */
    .chat-label {
        position: absolute;
        right: 70px;
        background: #333;
        color: white;
        padding: 5px 12px;
        border-radius: 8px;
        font-size: 13px;
        font-weight: 600;
        opacity: 0;
        visibility: hidden;
        transition: 0.3s;
        white-space: nowrap;
    }

    .chat-item:hover .chat-label {
        opacity: 1;
        visibility: visible;
        right: 60px;
    }

    /* Hiệu ứng rung nhẹ nút chính để gây chú ý */
    @keyframes chat-shake {
        0% { transform: scale(1); }
        50% { transform: scale(1.05); }
        100% { transform: scale(1); }
    }
    .chat-main-btn:not(.active) {
        animation: chat-shake 3s infinite ease-in-out;
    }
	
	/* Ẩn mặc định để tránh bị giật lúc load trang */
#onesignal-bell-btn { display: none; }

/* CSS Nút gạt chuyên nghiệp */
.custom-toggle-pro {
    width: 2.4em !important;
    height: 1.2em !important;
    cursor: pointer;
    border: none !important;
    background-color: rgba(255, 255, 255, 0.2) !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='white'/%3e%3c/svg%3e") !important;
    transition: background-color 0.3s ease, box-shadow 0.3s ease !important;
}

.custom-toggle-pro:checked {
    background-color: #f43f5e !important; /* Màu hồng đỏ nổi bật khi đóng cửa */
    box-shadow: 0 0 8px rgba(244, 63, 94, 0.5) !important;
}

.custom-toggle-pro:focus {
    box-shadow: none !important;
    outline: none !important;
}

/* Hiệu ứng nháy đỏ cho cảnh báo nghiêm trọng */
@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}
.ai-score-warning {
    animation: pulse-red 2s infinite;
    border: 2px solid #fff;
}
/* Tối ưu scroll cho danh sách gợi ý nếu quá dài */
.suggestion-list {
    max-height: 250px;
    overflow-y: auto;
    padding-right: 5px;
}
.suggestion-list::-webkit-scrollbar {
    width: 4px;
}
.suggestion-list::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}




/* Reset & Base */
.row.g-4.mb-4 { align-items: stretch; }
.stat-card {
    position: relative; padding: 20px; border-radius: 16px;
    overflow: hidden; height: 100%; transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
    display: flex; align-items: center; 
}

/* Hiệu ứng làm mờ biểu đồ khi không có dữ liệu */
.chart-blurred {
    filter: blur(2px);
    opacity: 0.3;
}

/* FIX LỖI BỊ BÓP ICON TRÊN MOBILE */
.stat-icon, .reward-icon-pro {
    flex-shrink: 0 !important;
    aspect-ratio: 1 / 1 !important;
}

/* Hiệu ứng cho thông báo Chúc Mừng Siêu Nổi Bật */
.ai-congrats-title {
    background: linear-gradient(to right, #ef5350, #f48fb1, #7e57c2, #2196f3, #26c6da, #43a047, #eeff41, #f9a825, #ff5722);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 400% 400%;
    animation: rainbow-text 5s ease infinite;
    font-weight: 800;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

@keyframes rainbow-text {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Banner Đặc Quyền */
.reward-icon-pro { background: #6366f1; width: 45px; height: 45px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.banner-bg-circle { position: absolute; top: -20px; right: -20px; width: 100px; height: 100px; background: rgba(99, 102, 241, 0.1); border-radius: 50%; z-index: 1; }

/* AI Assistant */
.ai-modern-toast-v3 { background: #ffffff; border: 1px solid #eef2f6; border-radius: 18px; padding: 18px; box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.04); }
.ai-pulse { position: absolute; top: 5px; right: 0; width: 10px; height: 10px; background: #10b981; border-radius: 50%; border: 2px solid white; animation: pulse-green 2s infinite; }
.ai-avatar-v3 { position: relative; padding-top: 5px; flex-shrink: 0; }

/* Colors & Button */
.bg-indigo-light { background: #e0e7ff; }
.text-indigo { color: #4338ca; }
.bg-soft-success { background: #dcfce7; }
.btn-zalo-contact { display: inline-block; background: #0068ff; color: white; padding: 4px 12px; border-radius: 8px; text-decoration: none; font-weight: 600; margin-top: 5px; transition: 0.3s; }
.btn-zalo-contact:hover { background: #0056d6; transform: translateY(-2px); color: white; box-shadow: 0 4px 8px rgba(0,104,255,0.3); }

@keyframes pulse-green {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

#rankChart { width: 100% !important; max-height: 200px; }



 /* 1. Fix lỗi bị khuất: Ép các thẻ cha hiển thị nội dung tràn ra ngoài */
            /* Chỉ áp dụng cho màn hình lớn (PC/Laptop) */
@media (min-width: 1024px) {
    .luxury-welcome-card, 
    .luxury-grid, 
    .brand-section {
        overflow: visible !important;
    }
}

            /* 2. Wrapper nút bấm */
            .custom-dropdown-wrapper {
                display: inline-block;
                position: relative;
                z-index: 1050; /* Cao hơn các thành phần Dashboard khác */
                margin-top: 15px;
            }

            /* 3. Nút bấm chính phong cách Luxury */
            .btn-manage-luxury {
                background: rgba(255, 255, 255, 0.1);
                backdrop-filter: blur(10px);
                -webkit-backdrop-filter: blur(10px);
                border: 1px solid rgba(255, 255, 255, 0.2);
                color: #ffffff !important;
                padding: 8px 18px;
                border-radius: 12px;
                font-size: 0.85rem;
                font-weight: 500;
                transition: all 0.3s ease;
                display: flex;
                align-items: center;
                gap: 8px;
                cursor: pointer;
            }

            .btn-manage-luxury:hover, 
            .btn-manage-luxury.show {
                background: rgba(255, 255, 255, 0.2);
                border-color: rgba(255, 255, 255, 0.4);
            }

            .icon-caret {
                font-size: 0.7rem;
                opacity: 0.7;
            }

            /* Ẩn mũi tên mặc định của Bootstrap */
            .dropdown-toggle::after {
                display: none !important;
            }

            /* 4. Menu xổ xuống (Dropdown Menu) */
            .custom-dropdown-wrapper .dropdown-menu {
                position: absolute !important;
                z-index: 99999 !important; /* Đảm bảo nổi lên trên cùng màn hình */
                top: 100% !important;
                left: 0 !important;
                margin-top: 10px !important;
                background: #ffffff !important;
                border-radius: 12px !important;
                padding: 8px !important;
                min-width: 230px !important;
                box-shadow: 0 15px 35px rgba(0,0,0,0.3) !important;
                border: 1px solid rgba(0,0,0,0.05) !important;
                transform: none !important; /* Tránh lệch do Bootstrap JS */
            }

            /* 5. Style các Item trong menu */
            .custom-dropdown-wrapper .dropdown-item {
                font-size: 0.9rem;
                padding: 10px 14px;
                border-radius: 8px;
                color: #1e293b !important;
                display: flex;
                align-items: center;
                gap: 12px;
                transition: all 0.2s ease;
                background: transparent;
                border: none;
                width: 100%;
                text-align: left;
            }

            .custom-dropdown-wrapper .dropdown-item:hover {
                background: #f1f5f9 !important;
                color: #4f46e5 !important;
                transform: translateX(5px);
            }

            .custom-dropdown-wrapper .dropdown-item i {
                font-size: 1.1rem;
            }

            .custom-dropdown-wrapper .dropdown-divider {
                margin: 6px 0;
                border-top: 1px solid #f1f5f9;
                opacity: 1;
            }
			
			
			
			
			/* ==========================================================================
   1. NÚT CHUÔNG GLASSMORPHISM & TRẠNG THÁI MỞ
   ========================================================================== */
.noti-btn-glass {
    width: 40px;
    height: 40px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Icon mũi tên nhỏ đi kèm dưới chân chuông */
.noti-btn-glass::after {
    content: '\F229'; /* Bootstrap Icon Chevron Down */
    font-family: bootstrap-icons;
    font-size: 8px;
    position: absolute;
    bottom: 2px;
    opacity: 0.5;
    transition: 0.3s;
}

/* Khi dropdown đang mở (Class .show do Bootstrap tự thêm) */
.noti-btn-glass.show {
    background: #3742fa;
    border-color: #3742fa;
    box-shadow: 0 4px 12px rgba(55, 66, 250, 0.3);
}

.noti-btn-glass.show i {
    color: #fff !important;
}

.noti-btn-glass.show::after {
    transform: rotate(180deg);
    color: #fff;
    opacity: 1;
}

/* ==========================================================================
   2. BADGE SỐ THÔNG BÁO - ĐÃ FIX TRÒN TUYỆT ĐỐI & HIỆU ỨNG PULSE
   ========================================================================== */
.noti-badge-modern {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ff4757;
    color: white;
    font-size: 9px;
    font-weight: 800;
    
    /* Cố định kích thước để luôn tròn, không bị bóp méo */
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    
    border-radius: 50% !important; /* Ép tròn tuyệt đối */
    border: 2px solid #fff;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(255, 71, 87, 0.3);
    
    /* Hiệu ứng nhịp đập thu hút sự chú ý */
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 5px rgba(255, 71, 87, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 71, 87, 0); }
}

/* ==========================================================================
   3. DROPDOWN MENU - CĂN CHỈNH GIỮA MOBILE & KHUNG CUỘN (SCROLL)
   ========================================================================== */
.noti-dropdown-custom {
    padding: 0 !important;
    overflow: hidden;
    width: 320px;
    border: 1px solid rgba(0,0,0,0.1) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
    border-radius: 16px !important;
    margin-top: 10px !important;
}

/* Khung bọc danh sách để xử lý cuộn khi thông báo quá dài */
.noti-scroll-container {
    max-height: 350px; /* Giới hạn chiều cao trên Desktop */
    overflow-y: auto;  /* Hiện thanh cuộn khi nội dung vượt quá */
    background: #fff;
}

/* Fix lỗi lệch trên mobile - Luôn nằm giữa màn hình */
@media (max-width: 576px) {
    .noti-dropdown-custom {
        width: calc(100vw - 20px) !important; /* Cách 2 mép mỗi bên 10px */
        position: fixed !important;
        left: 50% !important;
        top: 70px !important;
        transform: translateX(-50%) !important; /* Căn giữa màn hình */
        max-height: 80vh;
        margin: 0 !important;
    }
    .noti-scroll-container {
        max-height: 60vh; /* Trên mobile giới hạn chiều cao cuộn ngắn hơn */
    }
}

/* ==========================================================================
   4. HEADER & FOOTER CỦA DROPDOWN
   ========================================================================== */
.dropdown-header-custom {
    padding: 12px 15px;
    background: #fff;
    border-bottom: 1px solid #f1f2f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky; /* Giữ header luôn ở trên cùng khi cuộn */
    top: 0;
    z-index: 10;
}

.mark-as-read-btn {
    font-size: 11px;
    color: #3742fa;
    font-weight: 600;
    text-decoration: none !important;
}

.noti-footer-all a {
    display: block;
    padding: 12px;
    color: #3742fa !important;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    background: #f8f9fa;
    text-decoration: none !important;
    border-top: 1px solid #f1f2f6;
    transition: 0.2s;
}

.noti-footer-all a:hover {
    background: #eceef0;
}

/* ==========================================================================
   5. TÙY CHỈNH THANH CUỘN (SCROLLBAR) CHO ĐẸP
   ========================================================================== */
.noti-scroll-container::-webkit-scrollbar {
    width: 5px;
}
.noti-scroll-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}
.noti-scroll-container::-webkit-scrollbar-thumb {
    background: #e0e0e0;
    border-radius: 10px;
}
.noti-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

/* ==========================================================================
   6. ITEM THÔNG BÁO CHI TIẾT
   ========================================================================== */
.noti-item {
    padding: 10px 12px;
    margin: 6px 10px;
    border-radius: 12px;
    transition: 0.2s;
    display: flex;
    gap: 12px;
    text-decoration: none !important;
    color: #2f3542 !important;
    background: #ffffff;
    border: 1px solid #f8f9fa;
    position: relative;
}

.noti-item:hover {
    background: #f8f9ff;
    border-color: #3742fa;
    transform: translateY(-1px);
}

/* Trạng thái chưa đọc (unread) */
.noti-item.unread {
    background: #f4f7ff;
    border-color: rgba(55, 66, 250, 0.1);
}

/* Vạch màu xanh bên trái cho thông báo chưa đọc */
.noti-item.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 25%;
    height: 50%;
    width: 4px;
    background: #3742fa;
    border-radius: 0 4px 4px 0;
}

/* Icon tròn bên trái */
.noti-icon-circle {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.noti-icon-circle i {
    font-size: 16px !important;
}

/* Văn bản nội dung */
.noti-content-text {
    font-size: 12px;
    line-height: 1.5;
    color: #4b5563;
}

/* Thời gian */
.noti-time {
    font-size: 10px;
    color: #9ca3af;
    margin-top: 4px;
    display: block;
}


    .noti-card {
        transition: all 0.2s ease;
        border: none;
        border-bottom: 1px solid var(--noti-border-color);
        border-radius: 0;
        cursor: pointer;
        position: relative;
    }
    .noti-card:last-child { border-bottom: none; }
    .noti-card:hover { background-color: #f8f9fa; }
    
    /* Trạng thái chưa đọc */
    .noti-unread { background-color: var(--noti-unread-bg) !important; }
    .noti-unread::before {
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
        background-color: var(--primary-color);
    }
    .unread-dot {
        height: 10px;
        width: 10px;
        background-color: var(--primary-color);
        border-radius: 50%;
        display: inline-block;
        margin-left: 5px;
    }

    .noti-icon {
        width: 45px;
        height: 45px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.2rem;
        flex-shrink: 0;
    }
    .icon-view { background: #e3f2fd; color: #2196f3; }
    .icon-direction { background: #fff3e0; color: #ff9800; }
    .icon-default { background: #f5f5f5; color: #616161; }

    .noti-time { font-size: 0.8rem; color: #888; }
    .noti-content { font-size: 0.95rem; color: #333; line-height: 1.5; }
    
    .filter-btn {
        border-radius: 20px;
        padding: 5px 20px;
        font-weight: 500;
        font-size: 0.9rem;
    }
    
    #noti-container {
        min-height: 400px;
        background: #fff;
        border-radius: 15px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    }
    .loading-overlay { opacity: 0.6; pointer-events: none; }
	
	.favorite-card div:hover i.bi-share {
    transform: scale(1.1);
    color: #4338ca; /* Indigo đậm hơn */
}

/* Hiệu ứng hover cho PC */
                .premium-upgrade-cta:hover {
                    transform: translateY(-2px);
                    border-color: rgba(245, 158, 11, 0.6) !important;
                    box-shadow: 0 12px 30px -5px rgba(30, 27, 75, 0.5), 0 10px 20px -6px rgba(245, 158, 11, 0.25) !important;
                }
                .premium-upgrade-cta:hover .cta-button-box {
                    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
                    transform: scale(1.02);
                }
                
                /* Animation icon sét giật nhẹ */
                @keyframes pulse-slow {
                    0%, 100% { transform: scale(1); opacity: 1; }
                    50% { transform: scale(1.12); opacity: 0.85; }
                }
                .animate-pulse-slow {
                    animation: pulse-slow 2s infinite ease-in-out;
                }

                /* HỆ THỐNG ĐIỀU CHỈNH GIAO DIỆN TRÊN MOBILE */
                @media (max-width: 767.98px) {
                    .premium-upgrade-cta {
                        flex-direction: column !important; /* Chuyển khối bố cục thành hàng dọc */
                        align-items: flex-start !important; /* Căn lề trái toàn bộ nội dung */
                        padding: 20px !important; /* Thu gọn padding cho thoáng màn hình */
                        gap: 16px !important;
                    }
                    .cta-content-box {
                        align-items: flex-start !important; /* Căn nội dung text thẳng hàng */
                    }
                    .cta-button-box {
                        width: 100% !important; /* Cho nút vàng chiếm 100% bề ngang mobile */
                        padding: 14px 20px !important; /* Nới rộng nút bấm cho dễ chạm bằng tay */
                        font-size: 14px !important;
                    }
                }
				
				
				
				 /* Thiết kế Header Profile Premium Siêu Hiện Đại */
    .profile-section-card {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.5) 100%);
        border: 1px solid var(--glass-border);
        border-radius: 30px;
        box-shadow: var(--card-shadow);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        position: relative;
        overflow: hidden;
    }
    .profile-section-card::before {
        content: '';
        position: absolute;
        top: 0; left: 0; right: 0; height: 6px;
        background: var(--tech-gradient-1);
    }

    /* Khối hiển thị điểm số VIP Glassmorphism */
    .points-box-modern {
        padding: 2.25rem 2rem;
        border-radius: 30px;
        color: #ffffff;
        position: relative;
        overflow: hidden;
        transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        border: 1px solid rgba(255, 255, 255, 0.2);
    }
    .points-box-modern:hover {
        transform: translateY(-8px);
    }
    .points-box-week {
        background: linear-gradient(135deg, #2563eb, #1d4ed8);
        box-shadow: 0 20px 35px -10px rgba(37, 99, 235, 0.35);
    }
    .points-box-week:hover {
        box-shadow: 0 25px 45px -10px rgba(37, 99, 235, 0.5);
    }
    .points-box-month {
        background: linear-gradient(135deg, #1e293b, #0f172a);
        box-shadow: 0 20px 35px -10px rgba(15, 23, 42, 0.3);
    }
    .points-box-month:hover {
        box-shadow: 0 25px 45px -10px rgba(15, 23, 42, 0.45);
    }
    .points-val-huge {
        font-size: 3.5rem;
        font-weight: 900;
        letter-spacing: -2px;
        line-height: 1;
    }
    .rank-badge-inline {
        background: rgba(255, 255, 255, 0.18);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        padding: 0.5rem 1.25rem;
        border-radius: 50px;
        font-size: 0.9rem;
        font-weight: 800;
        border: 1px solid rgba(255, 255, 255, 0.3);
        display: inline-flex;
        align-items: center;
        gap: 6px;
        letter-spacing: 0.5px;
    }
    .rank-badge-inline i {
        color: #f59e0b;
        filter: drop-shadow(0 2px 4px rgba(245,158,11,0.3));
    }
    .tracking-wider-custom {
        letter-spacing: 0.08rem;
        font-size: 0.8rem;
        font-weight: 700;
        text-transform: uppercase;
        opacity: 0.8;
    }

    /* Cấu hình Nút bấm */
    .btn-action-modern {
        background: linear-gradient(135deg, #ffffff, #f8fafc);
        color: #0f172a;
        border: 1px solid #e2e8f0;
        padding: 0.85rem 1.75rem;
        border-radius: 16px;
        font-weight: 700;
        font-size: 0.9rem;
        transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    }
    .btn-action-modern:hover {
        background: #0f172a;
        color: #ffffff;
        border-color: #0f172a;
        transform: translateY(-3px);
        box-shadow: 0 10px 20px rgba(15, 23, 42, 0.15);
    }
    
    /* Thiết kế Khu vực Bảng/Card Nhật Ký */
    .dashboard-table-card {
        border: 1px solid var(--glass-border);
        border-radius: 30px;
        background: rgba(255, 255, 255, 0.75);
        box-shadow: var(--card-shadow);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }

    .modal-content-glass {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        border: 1px solid rgba(255, 255, 255, 0.6);
        border-radius: 32px;
    }
	
	/* Hiệu ứng hover hiện đại chuẩn UI/UX cho các nút hành động */
.dropdown-menu .dropdown-item:hover {
    background: rgba(0, 0, 0, 0.04) !important;
}
.dropdown-menu .dropdown-item.text-danger:hover {
    background: rgba(220, 53, 69, 0.08) !important;
    color: #dc3545 !important;
}
/* Khoảng cách tùy biến nhỏ cho layout */
.mb-1\.5 { margin-bottom: 6px !important; }

.lucky-glass-modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.45); backdrop-filter: blur(12px) saturate(180%); -webkit-backdrop-filter: blur(12px) saturate(180%); z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 15px; }
.lucky-glass-content { background: rgba(255, 255, 255, 0.85); border: 1px solid rgba(255, 255, 255, 0.5); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); border-radius: 28px; max-width: 480px; width: 100%; padding: 30px 25px; color: #1e293b; box-sizing: border-box; }
.animate-popup { animation: luckyPopupShow 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
@keyframes luckyPopupShow { from { transform: scale(0.9) translateY(20px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }
.bg-success-gradient { background: linear-gradient(135deg, #22c55e, #16a34a); color: white; }
.bg-danger-gradient { background: linear-gradient(135deg, #ef4444, #dc2626); color: white; }
.lucky-badge-icon { width: 68px; height: 68px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto; fs-2; font-size: 28px; box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); }
.lucky-title { font-size: 20px; font-weight: 800; color: #0f172a; text-transform: uppercase; letter-spacing: -0.5px; }
.lucky-subtitle { font-size: 13px; color: #64748b; font-weight: 500; }
.score-card { background: rgba(241, 245, 249, 0.8); border: 1px solid #e2e8f0; border-radius: 18px; padding: 12px; }
.score-label { font-size: 10px; color: #64748b; font-weight: 700; letter-spacing: 0.5px; margin-bottom: 2px; }
.score-value { font-size: 20px; }
.reward-item-card { background: rgba(255, 255, 255, 0.9); border: 1px solid #e2e8f0; cursor: pointer; transition: all 0.2s ease; }
.reward-item-card:hover { border-color: #3b82f6; background: #f8fafc; }
.reward-item-card.selected-active { border-color: #22c55e; background: #f0fdf4; box-shadow: 0 4px 12px rgba(34, 197, 94, 0.12); }
.active-month-mode { border-color: #cbd5e1; background: rgba(248, 250, 252, 0.9); cursor: default; }
.active-month-mode:hover { border-color: #cbd5e1; background: rgba(248, 250, 252, 0.9); }
.top50-premium-box { background: linear-gradient(135deg, #fffbeb, #fef3c7); border-color: #fcd34d !important; }
.text-xs { font-size: 12px; }
.tracking-wider { letter-spacing: 0.05em; }
.reward-body-scroll::-webkit-scrollbar { width: 4px; }
.reward-body-scroll::-webkit-scrollbar-track { background: transparent; }
.reward-body-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
.shine-effect { position: absolute; top: 0; left: -100%; width: 50%; height: 100%; background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 100%); transform: skewX(-25deg); animation: luckyShine 3s infinite; }
@keyframes luckyShine { 0% { left: -100%; } 100% { left: 200%; } }

/* Style cho hệ thống Toast mới */
.lucky-toast-container { position: fixed; top: 20px; right: 20px; z-index: 11000; display: flex; flex-direction: column; gap: 10px; max-width: 380px; width: calc(100% - 40px); }
.lucky-toast { background: rgba(255, 255, 255, 0.85); border: 1px solid rgba(255, 255, 255, 0.4); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.15); padding: 16px; border-radius: 16px; display: flex; align-items: start; gap: 12px; color: #1e293b; transform: translateX(120%); animation: luckyToastIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
.lucky-toast.toast-fade-out { animation: luckyToastOut 0.3s ease forwards; }
.lucky-toast-icon { font-size: 20px; flex-shrink: 0; line-height: 1; padding-top: 2px; }
.lucky-toast-content { flex-grow: 1; font-size: 13.5px; font-weight: 500; line-height: 1.5; }
.lucky-toast-success { border-left: 4px solid #22c55e; }
.lucky-toast-success .lucky-toast-icon { color: #22c55e; }
.lucky-toast-warning { border-left: 4px solid #f59e0b; }
.lucky-toast-warning .lucky-toast-icon { color: #f59e0b; }
.lucky-toast-danger { border-left: 4px solid #ef4444; }
.lucky-toast-danger .lucky-toast-icon { color: #ef4444; }

@keyframes luckyToastIn { to { transform: translateX(0); } }
@keyframes luckyToastOut { to { transform: translateX(120%); opacity: 0; } }
@media (max-width: 576px) { .lucky-toast-container { top: auto; bottom: 20px; right: 20px; left: 20px; width: auto; } @keyframes luckyToastIn { to { transform: translateY(0); } } @keyframes luckyToastOut { to { transform: translateY(120%); opacity: 0; } } .lucky-toast { transform: translateY(120%); } }
.lucky-glass-modal {
        position: fixed;
        top: 0; left: 0; width: 100%; height: 100%;
        background: rgba(0, 0, 0, 0.45);
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
        display: flex; align-items: center; justify-content: center;
        padding: 15px;
    }
    .attendance-style-v2 {
        width: 100%;
        max-width: 420px; 
        background: #ffffff;
        border-radius: 30px;
        box-shadow: 0 15px 35px rgba(0,0,0,0.15);
        position: relative;
        padding: 35px 24px 24px 24px !important; 
        overflow: visible !important; 
    }
    
    .attendance-header-ribbon {
        background: linear-gradient(135deg, #198754, #146c43); 
        color: #ffffff;
        font-weight: 700;
        font-size: 13px;
        letter-spacing: 0.8px;
        padding: 8px 24px;
        border-radius: 50px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: -18px; 
        left: 50%;
        transform: translateX(-50%);
        box-shadow: 0 6px 20px rgba(19, 108, 67, 0.4); 
        z-index: 99999 !important; 
        white-space: nowrap; 
    }
    
    .p-attendance-reward-main {
        background-color: #e8f5e9 !important;
        border: 1px solid #c8e6c9 !important;
        padding: 24px 15px 16px 15px !important;
        position: relative;
        margin-top: 25px;
    }
    .attendance-reward-icon-adjust {
        width: 46px; height: 46px;
        background: linear-gradient(135deg, #198754, #146c43);
        border-radius: 50%;
        display: flex; align-items: center; justify-content: center;
        position: absolute;
        top: -23px; left: 50%;
        transform: translateX(-50%);
        box-shadow: 0 4px 12px rgba(25, 135, 84, 0.25);
    }
    .attendance-reward-icon-adjust i {
        font-size: 20px;
    }
    
    .list-item-card-wrapper {
        background: #f8f9fa;
        border-radius: 20px;
        padding: 12px;
    }
    .list-item-card {
        display: flex;
        align-items: center;
        background: #ffffff;
        padding: 10px 14px;
        border-radius: 14px;
        box-shadow: 0 2px 6px rgba(0,0,0,0.02);
    }
    .v2-icon-box {
        width: 34px; height: 34px;
        min-width: 34px; 
        background-color: #e8f5e9;
        color: #198754;
        border-radius: 50%;
        display: flex; align-items: center; justify-content: center;
        font-size: 15px;
    }
    .v2-text-content {
        font-size: 13px;
        color: #333333;
        line-height: 1.4;
        font-weight: 500;
    }
    
    .btn-attendance-v2 {
        background: linear-gradient(135deg, #198754, #146c43) !important;
        border: none !important;
        padding: 12px !important;
        font-size: 15px;
        letter-spacing: 0.5px;
        border-radius: 16px !important;
        transition: all 0.2s ease;
    }
    .btn-attendance-v2:hover {
        background: #146c43 !important;
        transform: translateY(-1px);
    }
	
	        .glass-card {
            background: var(--glass-bg);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid var(--glass-border);
            border-radius: 24px;
            box-shadow: 0 12px 40px -12px rgba(0, 0, 0, 0.05);
        }

        .tab-navigation-bar {
            background: rgba(241, 245, 249, 0.8);
            border-radius: 16px;
            padding: 6px;
            display: inline-flex;
            gap: 4px;
        }

        .nav-tab-btn {
            border: none;
            background: transparent;
            padding: 10px 20px;
            font-weight: 600;
            font-size: 14px;
            color: #64748b;
            border-radius: 12px;
            transition: all 0.25s ease;
        }

        .nav-tab-btn.active {
            color: #4f46e5;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
            background-color: #fff;
        }

        .leaderboard-table {
            width: 100%;
            border-collapse: separate;
            border-spacing: 0 10px;
        }

        .leaderboard-table th {
            color: #64748b;
            font-weight: 600;
            font-size: 13px;
            text-transform: uppercase;
            padding: 12px 20px;
            border: none;
        }

        /* ==================================================== */
        /* HỆ THỐNG ĐỒ HỌA & HIỆU ỨNG CÚP NÂNG CAO VIP BIỂU TƯỢNG */
        /* ==================================================== */
        
        /* Khung bao bọc Cup CSS chứa số ở giữa - Đã FIX CHỐNG MÉO */
        .trophy-badge {
            position: relative;
            width: 44px;
            height: 44px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto;
            border-radius: 50%;
            background: #ffffff;
            box-shadow: inset 0 2px 4px rgba(255,255,255,0.8), 0 4px 10px rgba(0,0,0,0.06);
            transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            flex-shrink: 0;
        }

        /* Hiệu ứng Floating chuyển động vô tận cho TOP 3 */
        .leaderboard-row:nth-child(1) .trophy-badge { animation: trophy-float 2.4s ease-in-out infinite; }
        .leaderboard-row:nth-child(2) .trophy-badge { animation: trophy-float 2.6s ease-in-out infinite 0.2s; }
        .leaderboard-row:nth-child(3) .trophy-badge { animation: trophy-float 2.8s ease-in-out infinite 0.4s; }

        @keyframes trophy-float {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-4px); }
        }

        /* Hover nhẹ vào hàng td sẽ kích hoạt cúp phóng to nhẹ */
        .leaderboard-row:hover .trophy-badge {
            transform: scale(1.1);
        }

        /* Thiết lập đổ màu Gradient ánh kim sinh động lên icon cúp font-bi - Đã FIX HIỂN THỊ */
        .trophy-badge i {
            font-size: 32px;
            width: 32px;
            height: 32px;
            line-height: 32px;
            text-align: center;
            background-clip: text;
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            filter: drop-shadow(0 2px 3px rgba(0,0,0,0.15));
            position: relative;
            display: block;
            z-index: 1;
        }

        /* Hiệu ứng tia lấp lánh quét qua thân cúp */
        .trophy-badge::after {
            content: '';
            position: absolute;
            top: 0; left: -100%;
            width: 50%; height: 100%;
            background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.7) 50%, rgba(255,255,255,0) 100%);
            transform: skewX(-25deg);
            transition: none;
            z-index: 3;
            border-radius: 50%;
        }
        .leaderboard-row:hover .trophy-badge::after {
            left: 150%;
            transition: left 0.6s ease-in-out;
        }

        /* Định vị trí chuẩn xác tuyệt đối cho số nằm đè lên lòng cúp */
        .trophy-badge .rank-number {
            position: absolute;
            top: 9px;
            left: 50%;
            transform: translateX(-50%);
            font-size: 11px;
            font-weight: 800;
            font-family: 'Arial', sans-serif;
            text-shadow: 0px 1px 1px rgba(0,0,0,0.3);
            z-index: 2;
            line-height: 1;
            margin: 0;
            padding: 0;
        }

        /* Định nghĩa nhóm đổ màu khối và phát sáng hào quang cho TOP 10 */
        .t-gold i   { background: linear-gradient(135deg, #ffe066 0%, #f59e0b 50%, #b45309 100%); -webkit-background-clip: text; }
        .t-gold     { box-shadow: 0 0 15px rgba(245, 158, 11, 0.3), inset 0 1px 2px #fff; border: 1px solid rgba(245, 158, 11, 0.25); }
        .t-gold .rank-number { color: #512200; text-shadow: 0 1px 0px rgba(255,255,255,0.4); font-size: 10px; top: 10px; }

        .t-silver i { background: linear-gradient(135deg, #ffffff 0%, #94a3b8 50%, #475569 100%); -webkit-background-clip: text; }
        .t-silver   { box-shadow: 0 0 15px rgba(148, 163, 184, 0.25), inset 0 1px 2px #fff; border: 1px solid rgba(148, 163, 184, 0.25); }
        .t-silver .rank-number { color: #1e293b; text-shadow: 0 1px 0px rgba(255,255,255,0.4); font-size: 10px; top: 10px; }

        .t-bronze i { background: linear-gradient(135deg, #ffedd5 0%, #ea580c 50%, #7c2d12 100%); -webkit-background-clip: text; }
        .t-bronze   { box-shadow: 0 0 15px rgba(234, 88, 12, 0.25), inset 0 1px 2px #fff; border: 1px solid rgba(234, 88, 12, 0.25); }
        .t-bronze .rank-number { color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.5); font-size: 10px; top: 10px; }

        .t-emerald i{ background: linear-gradient(135deg, #a7f3d0 0%, #10b981 50%, #047857 100%); -webkit-background-clip: text; }
        .t-emerald  { box-shadow: 0 0 12px rgba(16, 185, 129, 0.25); border: 1px solid rgba(16, 185, 129, 0.2); }

        .t-indigo i { background: linear-gradient(135deg, #c7d2fe 0%, #6366f1 50%, #4338ca 100%); -webkit-background-clip: text; }
        .t-indigo   { box-shadow: 0 0 12px rgba(99, 102, 241, 0.25); border: 1px solid rgba(99, 102, 241, 0.2); }

        .t-pink i   { background: linear-gradient(135deg, #fbcfe8 0%, #ec4899 50%, #9d174d 100%); -webkit-background-clip: text; }
        .t-pink     { box-shadow: 0 0 12px rgba(236, 72, 153, 0.25); border: 1px solid rgba(236, 72, 153, 0.2); }

        .t-cyan i   { background: linear-gradient(135deg, #cffafe 0%, #06b6d4 50%, #0e7490 100%); -webkit-background-clip: text; }
        .t-cyan     { box-shadow: 0 0 12px rgba(6, 182, 212, 0.25); border: 1px solid rgba(6, 182, 212, 0.2); }

        .t-purple i { background: linear-gradient(135deg, #e9d5ff 0%, #a855f7 50%, #6b21a8 100%); -webkit-background-clip: text; }
        .t-purple   { box-shadow: 0 0 12px rgba(168, 85, 247, 0.25); border: 1px solid rgba(168, 85, 247, 0.2); }

        .t-rose i   { background: linear-gradient(135deg, #ffe4e6 0%, #f43f5e 50%, #9f1239 100%); -webkit-background-clip: text; }
        .t-rose     { box-shadow: 0 0 12px rgba(244, 63, 94, 0.25); border: 1px solid rgba(244, 63, 94, 0.2); }

        .t-amber i  { background: linear-gradient(135deg, #fef3c7 0%, #d97706 50%, #78350f 100%); -webkit-background-clip: text; }
        .t-amber    { box-shadow: 0 0 12px rgba(217, 119, 6, 0.25); border: 1px solid rgba(217, 119, 6, 0.2); }

        .t-default i{ background: linear-gradient(135deg, #f1f5f9 0%, #cbd5e1 60%, #64748b 100%); -webkit-background-clip: text; }
        .t-default  { border: 1px solid rgba(203, 213, 225, 0.4); }
        .t-default .rank-number { color: #334155; text-shadow: 0 1px 0px rgba(255,255,255,0.6); top: 15px; font-size: 12px; }

        .point-badge {
            background: rgba(236, 253, 245, 1);
            color: #059669;
            padding: 8px 14px;
            border-radius: 12px;
            font-weight: 700;
            font-size: 16px;
            display: inline-block;
            border: 1px solid rgba(167, 243, 208, 1);
            white-space: nowrap;
        }

        .custom-pagination {
            display: flex;
            gap: 6px;
            justify-content: center;
            margin-top: 24px;
        }

        .page-btn {
            border: 1px solid var(--glass-border);
            background: rgba(255, 255, 255, 0.5);
            width: 38px;
            height: 38px;
            border-radius: 10px;
            font-weight: 600;
            font-size: 13px;
            color: #475569;
            cursor: pointer;
        }

        .page-btn.active {
            background: #4f46e5;
            color: white;
            border-color: #4f46e5;
        }

        .page-btn:disabled {
            opacity: 0.4;
            cursor: not-allowed;
        }

        .shimmer-anim {
            background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.6) 50%, rgba(255,255,255,0) 100%);
            background-size: 200% 100%;
            animation: loading-shimmer 1.5s infinite;
        }

        @keyframes loading-shimmer {
            0% { background-position: 200% 0; }
            100% { background-position: -200% 0; }
        }

        /* ---------------------------------------------------- */
        /* BIỆN PHÁP TỐI ƯU CHỐNG VỠ TRÊN MOBILE TUYỆT ĐỐI */
        /* ---------------------------------------------------- */
        @media (max-width: 767.98px) {
            .glass-card {
                padding: 16px !important;
                border-radius: 18px;
            }
            
            .leaderboard-table thead {
                display: none;
            }

            .leaderboard-table, .leaderboard-table tbody, .leaderboard-table tr {
                display: block;
                width: 100%;
            }

            .leaderboard-table tr {
                display: flex;
                align-items: center;
                background: rgba(255, 255, 255, 0.7) !important;
                border: 1px solid var(--glass-border);
                border-radius: 16px;
                padding: 12px;
                margin-bottom: 10px;
            }

            .leaderboard-table td {
                display: block;
                padding: 0 !important;
                border: none !important;
            }

            /* Cột 1: Chứa Cúp - Cố định không cho bóp méo */
            .leaderboard-table td:nth-child(1) {
                width: 50px;
                flex-shrink: 0;
                margin-right: 10px;
                display: flex;
                justify-content: center;
                align-items: center;
            }

            /* Cột 2: Chứa Tên Thổ Địa */
            .leaderboard-table td:nth-child(2) {
                flex-grow: 1;
                min-width: 0;
            }

            /* Cột 3: Chứa Email - Ẩn cấu trúc gốc trên mobile */
            .leaderboard-table td:nth-child(3) {
                display: none;
            }
            
            /* Bổ sung hiển thị email nhỏ ngay dưới tên */
            .mobile-email-hint {
                display: block !important;
                font-size: 11px;
                color: #64748b;
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
            }

            /* Cột 4: Chứa Điểm số - Đẩy sát lề phải */
            .leaderboard-table td:nth-child(4) {
                width: auto;
                text-align: right;
                flex-shrink: 0;
                margin-left: auto;
            }
            
            .point-badge {
                padding: 6px 10px;
                font-size: 16px;
            }
            
            .tab-navigation-bar {
                width: 100%;
                display: flex;
            }
            .nav-tab-btn {
                flex: 1;
                text-align: center;
                padding: 8px 0;
                font-size: 13px;
            }
        }
        
        @media (min-width: 768px) {
            .mobile-email-hint {
                display: none !important;
            }
            .leaderboard-row td {
                padding: 14px 20px;
                vertical-align: middle;
                background: rgba(255, 255, 255, 0.5);
                border-top: 1px solid var(--glass-border);
                border-bottom: 1px solid var(--glass-border);
            }
            .leaderboard-row td:first-child {
                border-left: 1px solid var(--glass-border);
                border-top-left-radius: 16px;
                border-bottom-left-radius: 16px;
                width: 90px;
            }
            .leaderboard-row td:last-child {
                border-right: 1px solid var(--glass-border);
                border-top-right-radius: 16px;
                border-bottom-right-radius: 16px;
                text-align: right;
            }
        }
		
		.pm-profile-card {
        background: #FFFFFF;
        border-radius: 20px;
        padding: 24px;
        border: 1px solid var(--pm-border);
        box-shadow: 0px 10px 30px rgba(157, 172, 201, 0.1);
        margin: 0 auto;   /* Căn giữa nếu đứng một mình */
    }

    .pm-card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 24px;
        padding-bottom: 16px;
        border-bottom: 1px solid #F4F7FE;
    }

    .pm-card-title {
        font-size: 18px;
        font-weight: 700;
        color: var(--pm-text-main);
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .pm-card-title i {
        color: var(--pm-primary);
    }

    .pm-btn-pin {
        background: #FFFFFF;
        color: var(--pm-text-main);
        border: 1px solid var(--pm-border);
        padding: 8px 16px;
        border-radius: 10px;
        font-weight: 600;
        font-size: 13px;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 6px;
        transition: all 0.2s ease;
    }

    .pm-btn-pin:hover {
        background: #F7F9FC;
        border-color: #B0BBD5;
        transform: translateY(-1px);
    }

    .pm-btn-pin i {
        color: #FFB800;
    }

    .pm-form-group {
        margin-bottom: 20px;
    }

    .pm-form-group label {
        display: block;
        font-size: 14px;
        font-weight: 600;
        color: #475467;
        margin-bottom: 8px;
    }

    .pm-input-wrapper {
        position: relative;
    }

    .pm-input-wrapper i {
        position: absolute;
        left: 16px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--pm-text-sub);
        font-size: 16px;
        transition: color 0.2s;
    }

    .pm-form-control {
        width: 100%;
        background-color: var(--pm-bg-input);
        border: 1px solid var(--pm-border);
        padding: 12px 16px 12px 46px;
        border-radius: 12px;
        font-size: 15px;
        color: var(--pm-text-main);
        font-weight: 500;
        outline: none;
        transition: all 0.2s ease;
    }

    .pm-form-control:focus {
        border-color: var(--pm-primary);
        box-shadow: 0px 0px 0px 4px rgba(47, 107, 255, 0.1);
    }

    .pm-form-control:focus + i {
        color: var(--pm-primary);
    }

    /* Vô hiệu hóa style cho input nếu không muốn cho sửa định danh gốc (ví dụ: Số điện thoại) */
    .pm-form-control:read-only {
        background-color: #F4F7FE;
        color: #707EAE;
        cursor: not-allowed;
    }

    .pm-btn-submit {
        background: var(--pm-gradient);
        color: white;
        border: none;
        width: 100%;
        padding: 14px;
        border-radius: 12px;
        font-size: 15px;
        font-weight: 600;
        cursor: pointer;
        margin-top: 10px;
        box-shadow: 0px 4px 12px rgba(47, 107, 255, 0.25);
        transition: all 0.2s ease;
    }

    .pm-btn-submit:hover {
        opacity: 0.95;
        transform: translateY(-1px);
        box-shadow: 0px 6px 16px rgba(47, 107, 255, 0.35);
    }
	
	.ms-container {
            margin: 0 auto;
            background: #ffffff;
            border-radius: 24px;
            box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
            padding: 24px;
            box-sizing: border-box;
        }

        .ms-header-title {
            font-size: 20px;
            font-weight: 700;
            color: #0f172a;
            margin-bottom: 20px;
            display: flex;
            align-items: center;
            gap: 10px;
            border-bottom: 1px solid #f1f5f9;
            padding-bottom: 16px;
        }

        .ms-search-wrapper {
            position: relative;
            margin-bottom: 24px;
        }

        .ms-search-input {
            width: 100%;
            padding: 14px 16px 14px 46px;
            font-size: 15px;
            border: 1px solid #e2e8f0;
            border-radius: 14px;
            background-color: #f8fafc;
            color: #0f172a;
            transition: all 0.2s ease;
            box-sizing: border-box;
            outline: none;
        }

        .ms-search-input:focus {
            background-color: #ffffff;
            border-color: #3b82f6;
            box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
        }

        .ms-search-icon {
            position: absolute;
            left: 16px;
            top: 50%;
            transform: translateY(-50%);
            color: #94a3b8;
            pointer-events: none;
        }

        .ms-list-wrapper {
            display: flex;
            flex-direction: column;
            gap: 16px;
            min-height: 200px;
        }

        .ms-item-card {
            position: relative;
            display: flex;
            flex-direction: column;
            border-radius: 18px;
            padding: 10px;
            text-decoration: none;
            color: inherit;
            overflow: hidden;
            border: 1px solid #e2e8f0;
            background: #ffffff;
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }

        .ms-item-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 12px 20px -8px rgba(0, 0, 0, 0.08);
        }

        .ms-item-card.tier_sponsor { background: var(--bg-sponsor); border-color: var(--border-sponsor); }
        .ms-item-card.tier_vip { background: var(--bg-vip); border-color: var(--border-vip); }
        .ms-item-card.tier_starter { background: var(--bg-starter); border-color: var(--border-starter); }
        .ms-item-card.tier_hot_week { background: var(--bg-hot); border-color: var(--border-hot); }
        .ms-item-card.tier_local { background: var(--bg-local); border-color: var(--border-local); }

        .ms-main-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding-right: 65px;
        }

        .ms-title-area {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .ms-check-icon { color: #ef4444; font-size: 15px; }
        .ms-item-card.tier_starter .ms-check-icon { color: #10b981; }
        .ms-item-card.tier_hot_week .ms-check-icon { color: #f97316; }
        .ms-item-card.tier_local .ms-check-icon { color: #a855f7; }

        .ms-location-name {
            font-size: 14px;
            font-weight: 700;
            color: #1e293b;
            line-height: 1.4;
        }

        .ms-points-badge {
            font-size: 13px;
            font-weight: 700;
            padding: 6px 12px;
            border-radius: 30px;
            white-space: nowrap;
        }
        .tier_sponsor .ms-points-badge, .tier_vip .ms-points-badge { background: #fee2e2; color: #ef4444; }
        .tier_starter .ms-points-badge { background: #dcfce7; color: #10b981; }
        .tier_hot_week .ms-points-badge { background: #ffedd5; color: #f97316; }
        .tier_local .ms-points-badge { background: #f3e8ff; color: #a855f7; }

        .ms-reward-box {
            margin-top: 14px;
            padding: 12px 14px;
            border-radius: 12px;
            background: rgba(255, 255, 255, 0.7);
            border: 1px dashed rgba(0, 0, 0, 0.06);
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 12px;
            padding-right: 65px;
        }

        .ms-reward-content {
            display: flex;
            gap: 10px;
            font-size: 13px;
            line-height: 1.5;
            color: #475569;
        }

        .ms-reward-content i { color: #334155; font-size: 14px; margin-top: 2px; }
        .ms-reward-name-text { font-weight: 700; color: #1e293b; display: block; margin-bottom: 2px; }
        .ms-reward-stock { background: #f1f5f9; color: #475569; font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: 8px; white-space: nowrap; text-align: center; }

        .ms-ribbon {
    position: absolute;
    top: 15px;
    right: -30px;
    transform: rotate(45deg);
    width: 120px;
    text-align: center;
    font-size: 8px;
    font-weight: 800;
    padding: 4px 0;
    color: #ffffff;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
        .tier_sponsor .ms-ribbon { background: var(--ribbon-sponsor); }
        .tier_vip .ms-ribbon { background: var(--ribbon-vip); }
        .tier_starter .ms-ribbon { background: var(--ribbon-starter); }
        .tier_hot_week .ms-ribbon { background: var(--ribbon-hot); }
        .tier_local .ms-ribbon { background: var(--ribbon-local); }

        .ms-pagination {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 6px;
            margin-top: 24px;
            border-top: 1px solid #f1f5f9;
            padding-top: 16px;
        }

        .ms-page-btn {
            border: 1px solid #e2e8f0;
            background: #ffffff;
            color: #475569;
            padding: 8px 14px;
            font-size: 14px;
            font-weight: 600;
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.15s ease;
        }

        .ms-page-btn:hover:not(:disabled) { background: #f8fafc; color: #0f172a; }
        .ms-page-btn:disabled { cursor: not-allowed; }
        .ms-page-btn.active {
    background: #0049c0;
    border-color: #0037bb;
    color: #ffffff;
}

        .ms-empty-state { text-align: center; padding: 40px 20px; color: #94a3b8; font-size: 14px; }
        .ms-empty-state i { font-size: 32px; margin-bottom: 12px; display: block; }

        .skeleton-card {
            height: 84px;
            background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
            background-size: 200% 100%;
            animation: loadingSkeleton 1.5s infinite;
            border-radius: 18px;
            border: 1px solid #e2e8f0;
        }
        @keyframes loadingSkeleton {
            0% { background-position: 200% 0; }
            100% { background-position: -200% 0; }
        }
		
		 .ms-event-showcase {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-bottom: 24px;
    }

    .ms-notice-card {
        display: flex;
        align-items: center;
        gap: 16px;
        padding: 16px;
        border-radius: 16px;
        position: relative;
        overflow: hidden;
        border: 1px solid transparent;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    }

    .ms-notice-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.25) 50%, rgba(255,255,255,0) 100%);
        transform: translateX(-100%);
        animation: shineEffect 3.5s infinite linear;
    }

    @keyframes shineEffect {
        100% { transform: translateX(100%); }
    }

    .ms-notice-card.notice-top-week {
        background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
        border-color: #bfdbfe;
    }

    .ms-notice-card.notice-top-50 {
        background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%);
        border-color: #fbcfe8;
    }

    .ms-notice-icon-box {
        width: 44px;
        height: 44px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
        flex-shrink: 0;
    }

    .notice-top-week .ms-notice-icon-box {
        background: #2563eb;
        color: #ffffff;
        box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
    }

    .notice-top-50 .ms-notice-icon-box {
        background: #db2777;
        color: #ffffff;
        box-shadow: 0 4px 10px rgba(219, 39, 119, 0.2);
    }

    .ms-notice-body {
        flex-grow: 1;
        padding-right: 45px;
    }

    .ms-notice-tag {
        font-size: 10px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        padding: 2px 8px;
        border-radius: 20px;
        display: inline-block;
        margin-bottom: 4px;
    }

    .notice-top-week .ms-notice-tag {
        background: rgba(37, 99, 235, 0.1);
        color: #1d4ed8;
    }

    .notice-top-50 .ms-notice-tag {
        background: rgba(219, 39, 119, 0.1);
        color: #be185d;
    }

    .ms-notice-text {
        font-size: 13.5px;
        font-weight: 500;
        line-height: 1.45;
        color: #334155;
        margin: 0;
    }

    .ms-notice-text strong {
        font-weight: 700;
    }

    .notice-top-week .ms-notice-text strong { color: #1e40af; }
    .notice-top-50 .ms-notice-text strong { color: #9d174d; }

    .ms-notice-badge-live {
        position: absolute;
        top: 14px;
        right: 14px;
        font-size: 10px;
        font-weight: 700;
        padding: 2px 6px;
        border-radius: 6px;
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .notice-top-week .ms-notice-badge-live { background: rgba(37, 99, 235, 0.12); color: #1d4ed8; }
    .notice-top-50 .ms-notice-badge-live { background: rgba(219, 39, 119, 0.12); color: #be185d; }

    .ms-notice-badge-live::before {
        content: '';
        width: 5px;
        height: 5px;
        border-radius: 50%;
        display: inline-block;
        animation: pulseDot 1.6s infinite;
    }

    .notice-top-week .ms-notice-badge-live::before { background: #2563eb; }
    .notice-top-50 .ms-notice-badge-live::before { background: #db2777; }

    @keyframes pulseDot {
        0% { transform: scale(0.8); opacity: 0.5; }
        50% { transform: scale(1.3); opacity: 1; }
        100% { transform: scale(0.8); opacity: 0.5; }
    }
	
	 .guide-container {
            width: 100%;
            background: #ffffff;
            border-radius: 24px;
            padding: 32px 24px;
            box-shadow: var(--shadow-lg);
            border: 1px solid #f1f5f9;
        }

        /* Header Guide */
        .guide-header {
            text-align: center;
            margin-bottom: 32px;
        }

        .guide-icon-wrapper {
            width: 64px;
            height: 64px;
            background: var(--primary-light);
            color: var(--primary-color);
            border-radius: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 28px;
            margin: 0 auto 16px;
            box-shadow: 0 8px 20px rgba(37, 99, 235, 0.15);
        }

        .guide-title {
            font-size: 22px;
            font-weight: 800;
            color: #0f172a;
            letter-spacing: -0.5px;
            margin-bottom: 8px;
            text-transform: uppercase;
        }

        .guide-subtitle {
            font-size: 14px;
            color: var(--text-muted);
            line-height: 1.5;
        }

        /* Steps Timeline */
        .steps-timeline {
            position: relative;
            margin-bottom: 40px;
            padding-left: 8px;
        }

        .steps-timeline::before {
            content: '';
            position: absolute;
            top: 12px;
            left: 27px;
            width: 2px;
            height: calc(100% - 48px);
            background: #e2e8f0;
            z-index: 1;
        }

        .step-item {
            position: relative;
            display: flex;
            gap: 20px;
            margin-bottom: 28px;
            z-index: 2;
        }

        .step-item:last-child {
            margin-bottom: 0;
        }

        .step-number {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: #f1f5f9;
            color: #475569;
            font-weight: 700;
            font-size: 15px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            border: 3px solid #ffffff;
            box-shadow: 0 0 0 1px #cbd5e1;
            transition: all 0.3s ease;
        }

        .step-item.active .step-number {
            background: var(--primary-color);
            color: #ffffff;
            box-shadow: 0 0 0 1px var(--primary-color), 0 4px 10px rgba(37, 99, 235, 0.3);
        }

        .step-content {
            background: #f8fafc;
            border-radius: 16px;
            padding: 16px;
            width: 100%;
            border: 1px solid #e2e8f0;
        }

        .step-content h3 {
            font-size: 15px;
            font-weight: 700;
            color: #0f172a;
            margin-bottom: 6px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .step-content p {
            font-size: 13.5px;
            color: #475569;
            line-height: 1.5;
        }

        /* Sync Notice Box */
        .sync-notice-box {
            display: flex;
            align-items: flex-start;
            gap: 12px;
            background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
            border: 1px solid #fde68a;
            padding: 12px 16px;
            border-radius: 12px;
            margin-top: 10px;
        }

        .sync-notice-box i {
            color: #d97706;
            font-size: 16px;
            margin-top: 2px;
        }

        .sync-notice-box span {
            font-size: 12.5px;
            font-weight: 500;
            color: #92400e;
            line-height: 1.4;
        }

        /* Points Section */
        .points-section-title {
            font-size: 15px;
            font-weight: 800;
            color: #0f172a;
            text-transform: uppercase;
            letter-spacing: 0.3px;
            margin-bottom: 16px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .points-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 12px;
            margin-bottom: 24px;
        }

        .point-card {
            background: #ffffff;
            border: 1px solid #e2e8f0;
            border-radius: 16px;
            padding: 16px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            box-shadow: var(--shadow-sm);
            position: relative;
            overflow: hidden;
        }

        .point-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 4px;
            height: 100%;
        }

        /* Card Custom Borders and Accents */
        .point-card.tier-vip-sponsor::before { background: linear-gradient(to bottom, #eab308, #ef4444); }
        .point-card.tier-starter::before { background: #22c55e; }
        .point-card.tier-hot-local::before { background: #f97316; }

        .card-info {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .card-labels {
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
        }

        .badge-tag {
            font-size: 10px;
            font-weight: 800;
            padding: 2px 8px;
            border-radius: 6px;
            text-transform: uppercase;
        }

        .badge-vip { background: rgba(234, 179, 8, 0.1); color: #eab308; }
        .badge-sponsor { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
        .badge-starter { background: rgba(34, 197, 94, 0.1); color: #22c55e; }
        .badge-hot { background: rgba(249, 115, 22, 0.1); color: #f97316; }
        .badge-local { background: rgba(249, 115, 22, 0.1); color: #f97316; }

        .card-desc {
            font-size: 12px;
            color: var(--text-muted);
            font-weight: 500;
        }

        .card-value {
            font-size: 18px;
            font-weight: 800;
            color: #0f172a;
            white-space: nowrap;
            background: #f8fafc;
            padding: 6px 12px;
            border-radius: 10px;
            border: 1px solid #f1f5f9;
        }

        .card-value span {
            font-size: 12px;
            font-weight: 600;
            color: var(--text-muted);
            margin-left: 2px;
        }

        /* --- 🎨 PHẦN CẬP NHẬT: BANNER KHÔNG CÒN CHÓI MẮT & NỘI DUNG HƯỚNG DẪN 10S --- */
        .app-attendance-banner {
            /* Thay đổi từ màu xanh sáng sang tone Deep Indigo mượt mà, huyền ảo và dịu mắt */
            background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #1e3a8a 100%);
            border-radius: 20px;
            padding: 24px;
            color: #ffffff;
            margin-bottom: 32px;
            position: relative;
            overflow: hidden;
            border: 1px solid rgba(255, 255, 255, 0.1);
            box-shadow: 0 12px 30px rgba(30, 27, 75, 0.2);
        }

        .app-attendance-banner::before {
            content: '';
            position: absolute;
            width: 260px;
            height: 260px;
            background: rgba(255, 255, 255, 0.04);
            border-radius: 50%;
            top: -60px;
            right: -60px;
            pointer-events: none;
        }

        .app-banner-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            flex-wrap: wrap;
            gap: 12px;
        }

        .app-banner-title {
            font-size: 16px;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            display: flex;
            align-items: center;
            gap: 8px;
            color: #f8fafc;
        }

        .badge-app-hot {
            background: #ea580c; /* Chuyển sang cam gạch trầm hơn vàng chói */
            color: #ffffff;
            font-size: 11px;
            font-weight: 800;
            padding: 5px 14px;
            border-radius: 20px;
            text-transform: uppercase;
            animation: pulse-glow-subtle 2.5s infinite;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .app-attendance-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 16px;
        }

        .app-mode-card {
            background: rgba(255, 255, 255, 0.05);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            border-radius: 16px;
            padding: 20px;
            border: 1px solid rgba(255, 255, 255, 0.08);
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            gap: 16px;
            transition: all 0.3s ease;
        }

        /* Làm nổi bật thẻ PWA App bằng viền ngọc trai nhạt mềm mại, không dùng viền vàng chói */
        .app-mode-card.premium-app-active {
            background: rgba(255, 255, 255, 0.12);
            border: 1px solid rgba(255, 255, 255, 0.25);
            box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.05);
        }

        .app-mode-info {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .app-mode-name {
            font-size: 14px;
            font-weight: 800;
            color: #ffffff;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .app-mode-desc {
            font-size: 13px;
            color: #cbd5e1;
            line-height: 1.5;
        }

        .app-mode-desc strong {
            color: #ffffff;
        }
        
        /* Highlight chữ vàng hoàng hôn dịu mắt thay vì vàng neon chói */
        .app-text-highlight {
            color: #fde047 !important;
            font-weight: 700;
        }

        .app-mode-footer {
            display: flex;
            align-items: center;
            justify-content: space-between;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            padding-top: 12px;
            margin-top: auto;
        }

        .app-mode-status {
            font-size: 11px;
            font-weight: 600;
            color: #94a3b8;
            text-transform: uppercase;
            letter-spacing: 0.3px;
        }

        .app-mode-value {
            font-size: 18px;
            font-weight: 900;
            color: #ffffff;
            background: rgba(255, 255, 255, 0.12);
            padding: 4px 14px;
            border-radius: 8px;
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        .app-mode-value span {
            font-size: 12px;
            font-weight: 600;
            color: #cbd5e1;
            margin-left: 2px;
        }

        /* Thẻ điểm thưởng PWA đặc biệt sử dụng màu nền dịu và sang */
        .premium-app-active .app-mode-value {
            background: #fde047;
            border-color: #fde047;
            color: #0f172a;
        }
        
        .premium-app-active .app-mode-value span {
            color: #334155;
        }

        /* Hiệu ứng nhấp nháy dịu nhẹ cho Badge */
        @keyframes pulse-glow-subtle {
            0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(234, 88, 12, 0.4); }
            70% { transform: scale(1.03); box-shadow: 0 0 0 8px rgba(234, 88, 12, 0); }
            100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(234, 88, 12, 0); }
        }

        /* Bottom Action / Footer Note */
        .guide-footer {
            border-top: 1px dashed #e2e8f0;
            padding-top: 20px;
            text-align: center;
        }

        .btn-start-mission {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            background: var(--primary-color);
            color: #ffffff;
            text-decoration: none;
            font-size: 14px;
            font-weight: 700;
            padding: 12px 24px;
            border-radius: 14px;
            box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
            transition: all 0.2s ease;
        }

        .btn-start-mission:hover {
            background: #1d4ed8;
            transform: translateY(-1px);
            box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
        }

        /* Responsive Layout */
        @media (max-width: 576px) {
            .points-grid, .app-attendance-grid {
                grid-template-columns: 1fr;
            }
            .guide-container {
                padding: 24px 16px;
            }
            .step-item {
                gap: 12px;
            }
            .steps-timeline::before {
                left: 19px;
            }
        }