@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #6366f1;
    --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);
}
/* Đả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: ##6366f1; /* 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: #6366f1 #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: 12px 18px;
    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);
}

.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; }

/* 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;
}
