/* --- BIẾN CSS (Dễ dàng thay đổi màu sắc sau này) --- */
:root {
    --bg-main: #0f182c;       /* Nền trang web Xanh Đen */
    --bg-card: rgba(21, 26, 35, 0.7); /* Nền kính mờ */
    --bg-card-hover: rgba(28, 34, 45, 0.9);
    --bg-input: #11151c;      /* Nền cho input tìm kiếm */
    --text-main: #ffffff;
    --text-muted: #8b949e;    /* Xám sáng, dễ đọc trên nền xanh */
    --accent-blue: #2f81f7;
    --accent-blue-rgb: 47, 129, 247;
    --border-light: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(255, 255, 255, 0.1);
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 85px;
    --topbar-height: 80px;
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.2); /* Đổ bóng đen mờ nổi bật */
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Màu Neon / Gradient */
    --neon-green: #00ffaa;
    --neon-blue: #00e5ff;
    --neon-purple: #b300ff;
    --neon-indigo: #4a00e0;
    --neon-orange: #ffaa00;
    --neon-pink: #ff0077;
    --gradient-blue: linear-gradient(135deg, #2f81f7 0%, #00e5ff 100%);
    --gradient-orange: linear-gradient(135deg, #f7812f 0%, #ffaa00 100%);
    --gradient-purple: linear-gradient(135deg, #a371f7 0%, #b300ff 100%);
    --gradient-cyan: linear-gradient(135deg, #2ff7f7 0%, #00ffaa 100%);
    --gradient-pink: linear-gradient(135deg, #ff4081 0%, #ff0077 100%);
    --gradient-indigo: linear-gradient(135deg, #8a2be2 0%, #4a00e0 100%);
}

/* --- GIAO DIỆN LIGHT MODE (GHI ĐÈ BIẾN CSS) --- */
body.light-theme {
    --bg-main: #f3f4f6;
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-card-hover: #ffffff;
    --bg-input: #e5e7eb;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border-light: rgba(0, 0, 0, 0.08);
}

/* --- RESET CSS CƠ BẢN --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    /* Thay đổi con trỏ chuột mặc định thành mũi tên Xanh dương */
    cursor: url("data:image/svg+xml,%3Csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 2l6 16 3-6 5 5 2-2-5-5 6-3L4 2z' fill='%232f81f7' stroke='%23ffffff' stroke-width='1.5'/%3E%3C/svg%3E"), auto;
}

/* Các phần tử Clickable chuyển sang con trỏ Xanh lá Neon */
a, button, .menu-item, .tool-icon, .tool-avatar, .service-card, .hamburger, .floating-support-btn, .submenu li, .search-box {
    cursor: url("data:image/svg+xml,%3Csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 2l6 16 3-6 5 5 2-2-5-5 6-3L4 2z' fill='%2300ffaa' stroke='%23ffffff' stroke-width='1.5'/%3E%3C/svg%3E"), pointer !important;
}

/* Trả lại con trỏ hình chữ I (text) khi người dùng rê chuột vào ô nhập liệu */
input, textarea {
    cursor: text !important;
}

/* --- PRELOADER (MÀN HÌNH CHỜ) --- */
#preloader {
    position: fixed;
    inset: 0; /* Tương đương top:0, left:0, right:0, bottom:0 */
    background-color: var(--bg-main);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.preloader__spinner {
    width: 45px;
    height: 45px;
    animation: spin 1s linear infinite;
}

.preloader__text {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 4px;
    text-transform: uppercase;
}

/* --- BỐ CỤC CHÍNH (LAYOUT) --- */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* --- KỊCH BẢN ANIMATION (KEYFRAMES) --- */
@keyframes fadeSlideRight {
    0% { opacity: 0; transform: translateX(-30px); }
    100% { opacity: 1; transform: translateX(0); }
}

@keyframes fadeSlideDown {
    0% { opacity: 0; transform: translateY(-20px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeSlideUp {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(var(--accent-blue-rgb), 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(var(--accent-blue-rgb), 0); }
    100% { box-shadow: 0 0 0 0 rgba(var(--accent-blue-rgb), 0); }
}

@keyframes pulseNeonWrapper {
    0% { box-shadow: 0 0 0 0 rgba(47, 129, 247, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(47, 129, 247, 0); }
    100% { box-shadow: 0 0 0 0 rgba(47, 129, 247, 0); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes float-y {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0px); }
}

.spin-effect {
    animation: spin 0.6s linear infinite;
}

/* --- OVERLAY CHO MOBILE --- */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    z-index: 90;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
body.sidebar-open .sidebar-overlay {
    opacity: 1;
    visibility: visible;
}

/* --- SIDEBAR --- */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-card);
    border-right: 1px solid var(--border-light);
    position: fixed;
    height: 100vh;
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: fadeSlideRight 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    backdrop-filter: blur(10px);
    z-index: 100;
    transition: all 0.3s ease;
}

/* Nút Close trên Mobile */
.sidebar__close-btn {
    display: none;
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    transition: var(--transition);
    z-index: 101;
}
.sidebar__close-btn:hover { color: var(--neon-pink); transform: scale(1.1); }

/* Tùy chỉnh thanh cuộn Sidebar */
.sidebar__body {
    flex: 1;
    min-height: 0; /* FIX LỖI TRÀN MÀN HÌNH: Ép thẻ body phải cuộn thay vì phình to */
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    scrollbar-width: none; /* Ẩn scrollbar trên Firefox */
}
.sidebar__body::-webkit-scrollbar { display: none; } /* Ẩn scrollbar trên Chrome, Safari, Edge */

.sidebar__header {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 20px;
    margin-bottom: 10px;
}

.sidebar__logo h2 {
    font-size: 24px;
    color: var(--text-main);
    letter-spacing: 0.5px;
    font-weight: 800;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(255,255,255,0.2);
}
.sidebar__logo span { color: #f7552f; }

.sidebar__socials {
    display: flex;
    gap: 10px;
}

.social-icon {
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-input);
    color: var(--text-muted);
    font-size: 14px;
    transition: var(--transition);
    border: 1px solid var(--border-light);
}
.social-icon:hover { color: var(--text-main); border-color: var(--accent-blue); box-shadow: 0 0 10px rgba(var(--accent-blue-rgb), 0.5); transform: translateY(-2px); }
.social-icon.fb:hover { background: #1877F2; border-color: #1877F2; box-shadow: 0 0 10px #1877F2; }
.social-icon.tg:hover { background: #2AABEE; border-color: #2AABEE; box-shadow: 0 0 10px #2AABEE; }
.social-icon.tk:hover { background: #ff0050; border-color: #00f2fe; box-shadow: 0 0 10px #ff0050; }

.menu-title {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 10px;
    margin-bottom: 5px;
    font-weight: 600;
    letter-spacing: 1px;
}

.menu-list { list-style: none; display: flex; flex-direction: column; gap: 5px; }

.menu-item {
    padding: 12px 15px;
    border-radius: 12px;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    font-weight: 500;
    border: 1px solid transparent;
}

.menu-item:hover {
    background-color: rgba(255,255,255,0.03);
    color: var(--text-main);
    border-color: var(--border-light);
}

.menu-item__icon {
    width: 30px; height: 30px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    background: rgba(255,255,255,0.05);
}

/* Gradient Menu Icons */
.icon-green { color: var(--neon-green); background: rgba(0, 255, 170, 0.1); }
.icon-blue { color: var(--neon-blue); background: rgba(0, 229, 255, 0.1); }
.icon-purple { color: var(--neon-purple); background: rgba(179, 0, 255, 0.1); }
.icon-orange { color: var(--neon-orange); background: rgba(255, 170, 0, 0.1); }
.icon-pink { color: var(--neon-pink); background: rgba(255, 0, 119, 0.1); }
.icon-indigo { color: var(--neon-indigo); background: rgba(74, 0, 224, 0.1); }

.menu-item:hover .menu-item__icon {
    transform: scale(1.1);
    box-shadow: 0 0 10px currentColor;
}

.menu-item.active {
    background: linear-gradient(90deg, rgba(var(--accent-blue-rgb), 0.15) 0%, transparent 100%);
    color: var(--text-main);
    border-left: 1px solid var(--accent-blue);
}

.menu-item.active .menu-item__icon {
    background: var(--gradient-blue);
    color: white;
    box-shadow: 0 0 15px rgba(var(--accent-blue-rgb), 0.6);
}

.menu-item.active::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    height: 60%;
    width: 4px;
    background-color: var(--accent-blue);
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 10px var(--accent-blue);
}

.menu-item .chevron {
    margin-left: auto;
    font-size: 12px;
    transition: var(--transition);
}

.menu-item.dropdown-open .chevron { transform: rotate(180deg); }
.submenu { display: none; padding-left: 45px; list-style: none; margin-top: -5px; margin-bottom: 5px; }
.submenu.open { display: flex; flex-direction: column; gap: 8px; animation: fadeSlideDown 0.3s ease; }
.submenu li { color: var(--text-muted); font-size: 13px; cursor: pointer; transition: var(--transition); }
.submenu li:hover { color: var(--neon-blue); text-shadow: 0 0 8px rgba(0,229,255,0.5); }

.sidebar__bottom {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
    padding-bottom: 5px; /* Căn ngang hàng chính xác với nút Liên hệ Hỗ trợ (25px + 5px = 30px) */
}

.btn-glow {
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    border: none;
    background: var(--gradient-blue);
    color: white;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 20px rgba(var(--accent-blue-rgb), 0.4);
    transition: var(--transition);
    animation: pulseNeonWrapper 3s infinite;
}
.btn-glow:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(var(--accent-blue-rgb), 0.7);
}

/* --- DESKTOP COLLAPSED STATE --- */
@media (min-width: 1025px) {
    body.sidebar-collapsed .sidebar {
        width: var(--sidebar-collapsed-width);
        padding: 25px 15px;
    }
    body.sidebar-collapsed .main-content {
        margin-left: var(--sidebar-collapsed-width);
        width: calc(100% - var(--sidebar-collapsed-width));
    }
    body.sidebar-collapsed .sidebar__logo h2 span,
    body.sidebar-collapsed .menu-title,
    body.sidebar-collapsed .menu-text,
    body.sidebar-collapsed .menu-item .chevron {
        display: none;
    }
    body.sidebar-collapsed .sidebar__logo h2 { font-size: 14px; }
    body.sidebar-collapsed .sidebar__socials { flex-direction: column; align-items: center; }
    body.sidebar-collapsed .menu-item { padding: 12px 0; justify-content: center; }
    body.sidebar-collapsed .menu-item__icon { margin: 0; }
    body.sidebar-collapsed .menu-item.active::before { left: -15px; }
    body.sidebar-collapsed .btn-glow { padding: 15px 0; display: flex; justify-content: center; }
    body.sidebar-collapsed .btn-glow .login-icon { display: block !important; font-size: 18px; }
}

/* --- MAIN CONTENT --- */
/* ... Giữ nguyên phần cuộn mượt ... */

.main-content {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease, margin-left 0.3s ease;
}

/* --- TOPBAR --- */
.topbar {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    padding: 0 40px;
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 10;
    animation: fadeSlideDown 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    gap: 20px;
    backdrop-filter: blur(20px);
    background-color: rgba(11, 14, 20, 0.8); /* Đồng bộ nền Topbar với nền chính */
}

.hamburger {
    font-size: 24px;
    color: var(--text-main);
    cursor: pointer;
    background: var(--bg-card);
    width: 45px; height: 45px;
    border-radius: 12px;
    display: flex; /* Hiển thị nút 3 gạch trên cả PC và Mobile */
    align-items: center; justify-content: center;
    border: 1px solid var(--border-light);
}

.topbar__search-group {
    display: flex;
    gap: 15px;
    flex: 1;
}

.search-box {
    background-color: var(--bg-input);
    padding: 0 15px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border-light);
    transition: var(--transition);
    max-width: 260px;
    width: 100%;
}

.search-box:focus-within {
    border-color: var(--accent-blue);
    box-shadow: 0 0 15px rgba(var(--accent-blue-rgb), 0.2);
}

.search-box i { color: var(--text-muted); }

.search-box input {
    background: transparent;
    border: none;
    color: white;
    outline: none;
    width: 100%;
    font-size: 13px;
}

.search-box .shortcut {
    background: rgba(255,255,255,0.1);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
}

.topbar__tools {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-left: auto; /* Đẩy toàn bộ cụm chức năng sát về mép phải */
}

.tool-balance {
    background: rgba(47, 129, 247, 0.1);
    border: 1px solid rgba(47, 129, 247, 0.3);
    padding: 6px 6px 6px 15px;
    border-radius: 30px;
    display: flex; align-items: center; gap: 10px;
    color: var(--neon-blue);
    font-weight: 700;
    font-size: 14px;
}

.tool-balance i { font-size: 16px; }
.tool-balance .add-btn {
    background: var(--gradient-blue);
    border: none; width: 28px; height: 28px; border-radius: 50%;
    color: white; font-weight: bold; cursor: pointer;
    box-shadow: 0 0 10px rgba(var(--accent-blue-rgb), 0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; padding-bottom: 2px;
}
.tool-balance .add-btn:hover {
    transform: scale(1.15) rotate(90deg);
    box-shadow: 0 0 15px rgba(var(--accent-blue-rgb), 0.8);
}

.tool-icon {
    background-color: var(--bg-card);
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 12px;
    font-size: 16px;
    color: var(--text-muted);
    border: 1px solid var(--border-light);
    cursor: pointer;
    transition: var(--transition);
}
.tool-icon:hover { color: var(--text-main); border-color: var(--border-glow); box-shadow: 0 0 15px rgba(255,255,255,0.1); transform: translateY(-2px); }

.tool-avatar {
    width: 45px; height: 45px;
    border-radius: 12px;
    background: var(--gradient-purple);
    display: flex; align-items: center; justify-content: center;
    font-weight: bold; color: white; cursor: pointer;
    border: 2px solid var(--bg-main);
    box-shadow: 0 0 15px rgba(179, 0, 255, 0.4);
}

/* =========================================
   AVATAR DROPDOWN MENU
========================================= */
.avatar-dropdown-wrapper {
    position: relative;
}

.avatar-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 15px;
    width: 270px;
    background-color: #1b294b; /* Nền Dark Navy */
    border: 1px solid var(--border-light);
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(255,255,255,0.02);
    z-index: 50;
    overflow: hidden;
    transform-origin: top right;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

/* Trạng thái Ẩn */
.avatar-dropdown-menu.hidden {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.95);
    pointer-events: none;
}

/* KHU VỰC 1: User Info */
.dd-user-info {
    padding: 20px;
    border-bottom: 1px solid var(--border-light);
    background: rgba(0, 0, 0, 0.15);
}
.dd-signed-in {
    font-size: 10px; color: var(--text-muted); text-transform: uppercase;
    font-weight: 700; letter-spacing: 1px; margin-bottom: 8px;
}
.dd-user-name-row { display: flex; justify-content: space-between; align-items: center; }
.dd-username { color: var(--accent-blue); font-size: 16px; font-weight: 800; }
.dd-user-icon {
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(47, 129, 247, 0.15); color: var(--accent-blue);
    display: flex; align-items: center; justify-content: center; font-size: 14px;
    border: 1px solid rgba(47, 129, 247, 0.3);
}

/* KHU VỰC 2: Menu Items */
.dd-menu-items { padding: 15px; display: flex; flex-direction: column; gap: 5px; }
.dd-balance {
    font-size: 13px; color: var(--text-muted); font-weight: 600;
    padding: 8px 12px; margin-bottom: 5px; display: flex; justify-content: space-between;
}
.dd-balance .val { color: var(--neon-blue); font-weight: 800; }

.dd-item {
    display: flex; align-items: center; gap: 12px; padding: 12px;
    color: #cbd5e1; text-decoration: none; font-size: 12px; font-weight: 700;
    text-transform: uppercase; border-radius: 10px; transition: var(--transition);
}
.dd-item i { font-size: 16px; color: var(--text-muted); width: 20px; text-align: center; transition: var(--transition); }
.dd-item:hover { background-color: rgba(255, 255, 255, 0.05); color: white; }
.dd-item:hover i { color: var(--accent-blue); }

/* KHU VỰC 3: Đăng Xuất */
.dd-logout-section { padding: 0 15px 15px 15px; }
.dd-logout-btn {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; padding: 12px;
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444; text-decoration: none; font-size: 13px; font-weight: 800;
    text-transform: uppercase; border-radius: 10px;
    border: 1px solid rgba(239, 68, 68, 0.2); transition: var(--transition);
}
.dd-logout-btn:hover {
    background-color: rgba(239, 68, 68, 0.2);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
}

/* --- DASHBOARD CONTAINER --- */
.dashboard-container {
    padding: 40px;
}

.overview-section {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 20px;
}

/* --- CARDS & BANNER --- */
.welcome-banner {
    background: linear-gradient(135deg, rgba(21, 26, 35, 0.9) 0%, rgba(10, 25, 47, 0.8) 100%);
    padding: 30px 40px;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(47, 129, 247, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(47, 129, 247, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    opacity: 0;
    animation: fadeSlideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.badge {
    background-color: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    display: inline-block;
    width: fit-content;
}

.badge.member {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    text-shadow: 0 0 10px rgba(255,255,255,0.8);
    box-shadow: 0 0 15px rgba(255,255,255,0.2);
}

.welcome-banner__content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    max-width: 60%;
}

.welcome-banner__badge {
    background-color: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
    padding: 6px 15px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.welcome-banner__title {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 0;
}

.welcome-banner__greeting {
    font-size: 16px;
    color: var(--neon-blue);
    font-weight: 600;
    letter-spacing: 2px;
}

.welcome-banner__user {
    font-size: 36px;
    font-weight: 800;
    color: var(--text-main);
    text-shadow: 0 0 20px rgba(255,255,255,0.3);
}

.welcome-banner__desc {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 5px;
}

.welcome-banner__desc .highlight {
    color: var(--accent-blue);
    font-weight: 800;
    font-size: 20px;
    letter-spacing: 1px;
}

.welcome-banner__btn {
    background: var(--gradient-blue);
    color: var(--text-main);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 0 20px rgba(var(--accent-blue-rgb), 0.6);
    transition: var(--transition);
}

.welcome-banner__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(var(--accent-blue-rgb), 0.9);
}

.welcome-banner__illustration {
    width: 180px;
    height: 160px;
    /* Sử dụng hình ảnh minh họa vector mẫu */
    background: url('https://illustrations.popsy.co/blue/freelancer.svg') no-repeat center center / contain;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.stat-card {
    background-color: var(--bg-card);
    padding: 20px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid var(--border-light);
    transition: var(--transition);
    box-shadow: var(--shadow-card);
    height: 195.44px;
    opacity: 0;
    animation: fadeSlideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Delay lần lượt cho từng ô stat-card để tạo hiệu ứng nối tiếp */
.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border-color: var(--border-glow);
}

.stat-card p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 10px;
    font-weight: 500;
}

.stat-card h3 {
    font-size: 28px;
    font-weight: 700;
}

/* Utility Classes cho Text Thống kê */
.text-neon-green { color: var(--neon-green); text-shadow: 0 0 15px rgba(0, 255, 170, 0.4); }
.text-neon-orange { color: var(--neon-orange); text-shadow: 0 0 15px rgba(255, 170, 0, 0.4); }
.text-white-glow { color: #fff; text-shadow: 0 0 15px rgba(255,255,255,0.5); }

/* --- NEWS TICKER (THANH THÔNG BÁO TIN TỨC) --- */
.news-ticker-container {
    grid-column: 1 / -1; /* Ép chiếm toàn bộ chiều rộng của overview-section */
    display: flex;
    align-items: center;
    height: 46px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(10px);
    opacity: 0;
    animation: fadeSlideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 0.4s;
}

.news-ticker-label {
    background: var(--gradient-blue);
    color: white;
    font-weight: 800;
    font-size: 13px;
    padding: 0 35px 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 2;
    white-space: nowrap;
    clip-path: polygon(0 0, 100% 0, 85% 100%, 0% 100%); /* Cắt vát chéo cạnh phải */
    box-shadow: 5px 0 15px rgba(0,0,0,0.4);
    flex-shrink: 0;
}

.news-ticker-marquee {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.news-ticker-content {
    display: flex;
    align-items: center;
    width: max-content;
    white-space: nowrap; /* Bắt buộc toàn bộ nội dung nằm trên 1 dòng */
    animation: marquee-scroll 25s linear infinite; /* Chạy đều 25 giây/vòng */
}

.news-ticker-marquee:hover .news-ticker-content {
    animation-play-state: paused; /* Tạm dừng khi rê chuột vào */
}

.ticker-group { display: flex; align-items: center; white-space: nowrap; }
.ticker-item { font-size: 14px; font-weight: 500; color: var(--text-main); white-space: nowrap; }
.ticker-separator { color: var(--accent-blue); font-weight: bold; margin: 0 20px; }

@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* --- SERVICES SECTION --- */
.services-section {
    margin-top: 40px;
    opacity: 0;
    animation: fadeSlideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 0.5s; /* Chờ phần tổng quan xuất hiện trước */
}

.section-header {
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 15px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
}

.section-header h2 {
    font-size: 18px;
    color: var(--text-main);
    letter-spacing: 1px;
    font-weight: 600;
    margin: 0; /* Xóa margin mặc định gây lệch */
    display: flex;
    align-items: center;
    gap: 10px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.service-card {
    background: linear-gradient(180deg, var(--bg-card) 0%, rgba(10, 15, 20, 0.9) 100%);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 30px 25px;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
}

.service-card__bg-number {
    position: absolute;
    top: -5px;
    right: 5px;
    font-size: 80px;
    font-style: italic;
    font-weight: 900;
    color: #ffffff;
    opacity: 0.02; /* Tăng độ đậm số mờ background lên một chút để dễ nhìn hơn */
    line-height: 1;
    pointer-events: none; /* Không che khuất sự kiện click */
    user-select: none;
}

.service-card__icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 20px;
    color: white;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

/* Gradient Background cho Icon */
.bg-gradient-blue { background: var(--gradient-blue); }
.bg-gradient-orange { background: var(--gradient-orange); }
.bg-gradient-purple { background: var(--gradient-purple); }
.bg-gradient-cyan { background: var(--gradient-cyan); }
.bg-gradient-green { background: linear-gradient(135deg, #00ffaa 0%, #00b377 100%); }
.bg-gradient-pink { background: var(--gradient-pink); }
.bg-gradient-indigo { background: var(--gradient-indigo); }

/* Hover Effect: Neon Border dựa trên màu Icon */
.service-card:hover { transform: translateY(-5px); z-index: 2; }
.service-card.hover-neon-blue:hover { border-color: var(--neon-blue); box-shadow: 0 0 30px rgba(0, 229, 255, 0.2), inset 0 0 20px rgba(0, 229, 255, 0.05); }
.service-card.hover-neon-orange:hover { border-color: var(--neon-orange); box-shadow: 0 0 30px rgba(255, 170, 0, 0.2), inset 0 0 20px rgba(255, 170, 0, 0.05); }
.service-card.hover-neon-purple:hover { border-color: var(--neon-purple); box-shadow: 0 0 30px rgba(179, 0, 255, 0.2), inset 0 0 20px rgba(179, 0, 255, 0.05); }
.service-card.hover-neon-cyan:hover { border-color: var(--neon-green); box-shadow: 0 0 30px rgba(0, 255, 170, 0.2), inset 0 0 20px rgba(0, 255, 170, 0.05); }
.service-card.hover-neon-green:hover { border-color: var(--neon-green); box-shadow: 0 0 30px rgba(0, 255, 170, 0.2), inset 0 0 20px rgba(0, 255, 170, 0.05); }
.service-card.hover-neon-pink:hover { border-color: var(--neon-pink); box-shadow: 0 0 30px rgba(255, 0, 119, 0.2), inset 0 0 20px rgba(255, 0, 119, 0.05); }
.service-card.hover-neon-indigo:hover { border-color: var(--neon-indigo); box-shadow: 0 0 30px rgba(74, 0, 224, 0.2), inset 0 0 20px rgba(74, 0, 224, 0.05); }

.service-card__title {
    font-size: 16px;
    color: var(--text-main);
    text-transform: uppercase;
    margin-bottom: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.service-card__desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* --- HIỆU ỨNG TEXT "KHÁM PHÁ NGAY" KHI HOVER --- */
.service-card__explore {
    margin-top: auto; /* Đẩy text xuống dưới cùng của thẻ */
    padding-top: 15px;
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-blue); /* Màu mặc định */
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transform: translateY(10px); /* Ẩn và đẩy nhẹ xuống dưới */
    transition: all 0.3s ease;
}

/* Đổi màu text trùng với màu theme của từng card */
.service-card.hover-neon-blue .service-card__explore { color: var(--neon-blue); }
.service-card.hover-neon-orange .service-card__explore { color: var(--neon-orange); }
.service-card.hover-neon-purple .service-card__explore { color: var(--neon-purple); }
.service-card.hover-neon-cyan .service-card__explore { color: var(--neon-green); }
.service-card.hover-neon-green .service-card__explore { color: var(--neon-green); }
.service-card.hover-neon-pink .service-card__explore { color: var(--neon-pink); }
.service-card.hover-neon-indigo .service-card__explore { color: var(--neon-indigo); }

.service-card:hover .service-card__explore { opacity: 1; transform: translateY(0); }
.service-card:hover .service-card__explore i { transform: translateX(5px); transition: transform 0.3s ease; }

/* --- FLOATING BUTTON --- */
.floating-support-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--gradient-blue);
    padding: 12px 24px;
    border-radius: 50px;
    display: flex; align-items: center; gap: 10px;
    color: white; font-weight: 700; font-size: 14px;
    cursor: pointer; z-index: 999;
    border: 2px solid rgba(255,255,255,0.2);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.4);
    animation: pulseNeonWrapper 2s infinite;
    transition: var(--transition);
}
.floating-support-btn i { font-size: 18px; }
.floating-support-btn:hover { transform: scale(1.05); box-shadow: 0 0 30px rgba(0, 229, 255, 0.8); }

/* --- RESPONSIVE MOBILE & TABLET --- */
@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); left: 0; top: 0; animation: none; } /* Tắt animation để lệnh transform hoạt động */
    body.sidebar-open .sidebar { transform: translateX(0); box-shadow: 10px 0 30px rgba(0,0,0,0.5); }
    .main-content { margin-left: 0; width: 100%; }
    .overview-section { grid-template-columns: 1fr; }
    /* Tablet: 2 cột cho thống kê và dịch vụ */
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .services-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
}

@media (max-width: 768px) {
    .sidebar__close-btn { display: block; }
    .dashboard-container { padding: 20px 15px; }
    .topbar { padding: 0 15px; gap: 12px; }
    
    /* Xử lý Thanh Tìm Kiếm Mobile (Chỉ hiện icon, click vào sẽ mở rộng) */
    .topbar__search-group { flex: unset; }
    .topbar__search-group .search-box:nth-child(2) { display: none; }
    .search-box { width: 45px; height: 45px; padding: 0; justify-content: center; border-radius: 50%; cursor: pointer; background: var(--bg-card); }
    .search-box i { margin: 0; font-size: 16px; }
    .search-box input, .search-box .shortcut { display: none; }
    
    /* Hiệu ứng mở rộng thanh search khi bấm vào */
    .search-box:focus-within {
        position: absolute;
        left: 70px; right: 15px;
        width: auto;
        border-radius: 12px;
        padding: 0 15px;
        justify-content: flex-start;
        background: var(--bg-input);
        z-index: 20;
    }
    .search-box:focus-within input { display: block; width: 100%; }
    
    /* Xử lý Header Tools */
    .topbar__tools { gap: 10px; }
    .tool-icon { width: 35px; height: 35px; font-size: 14px; }
    .tool-avatar { width: 35px; height: 35px; font-size: 12px; }
    .tool-balance .balance-text { display: none; }
    .tool-balance { padding: 4px 6px 4px 10px; font-size: 13px; }
    .tool-balance .add-btn { width: 24px; height: 24px; }
    
    /* Xử lý Main Content */
    .welcome-banner { flex-direction: column; text-align: center; padding: 25px 20px; }
    .welcome-banner__content { max-width: 100%; align-items: center; }
    .welcome-banner__user { font-size: 26px; }
    .welcome-banner__illustration { display: block; width: 120px; height: 100px; margin-top: 15px; }
    
    /* Grid 1 Cột cho Mobile Nhỏ */
    .stats-grid { grid-template-columns: 1fr; gap: 15px; }
    .stat-card { height: auto; padding: 20px; }
    .services-grid { grid-template-columns: 1fr; gap: 15px; }
    .service-card { padding: 25px 20px; }
    
    /* Floating Button thu nhỏ */
    .floating-support-btn { bottom: 20px; right: 20px; padding: 10px 16px; font-size: 13px; }
    .floating-support-btn i { font-size: 16px; }
}

/* =========================================
   POPUP THÔNG BÁO TRANG CHỦ
========================================= */
.welcome-popup {
    position: fixed;
    inset: 0;
    z-index: 100000; /* Đè lên toàn bộ các thành phần khác */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.welcome-popup.show {
    opacity: 1;
    visibility: visible;
}

.welcome-popup-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
}

.welcome-popup-content {
    position: relative;
    width: 100%;
    max-width: 500px;
    background: linear-gradient(145deg, #1b294b 0%, #0f182c 100%);
    border: 1px solid var(--accent-blue);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8), 0 0 30px rgba(47, 129, 247, 0.3);
    overflow: hidden;
    transform: scale(0.9);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.welcome-popup.show .welcome-popup-content {
    transform: scale(1);
}

.wp-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 25px;
    background: rgba(255,255,255,0.05);
    border-bottom: 1px solid var(--border-light);
}

.wp-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 170, 0, 0.15);
    color: var(--neon-orange);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    animation: pulseGlow 2s infinite;
}

.wp-header h3 {
    flex: 1;
    color: white;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 1px;
}

.wp-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition);
}
.wp-close:hover { color: #ef4444; transform: rotate(90deg); }

.wp-body { padding: 25px; color: #cbd5e1; font-size: 14px; line-height: 1.6; }
.wp-body p { margin-bottom: 15px; }
.wp-body ul { list-style: none; padding-left: 0; margin-bottom: 15px; display: flex; flex-direction: column; gap: 10px; }
.wp-body ul li { background: rgba(0,0,0,0.2); padding: 12px 15px; border-radius: 10px; border-left: 3px solid var(--accent-blue); }
.wp-footer-text { font-weight: 600; color: var(--neon-blue); text-align: center; font-style: italic; margin-bottom: 0 !important; }

.wp-footer { padding: 20px 25px; background: rgba(0,0,0,0.2); border-top: 1px solid var(--border-light); display: flex; justify-content: center; }
.wp-btn-accept {
    background: var(--gradient-blue);
    border: none;
    color: white;
    font-weight: 800;
    font-size: 14px;
    padding: 12px 30px;
    border-radius: 12px;
    cursor: pointer;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(47, 129, 247, 0.4);
    transition: var(--transition);
}
.wp-btn-accept:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(47, 129, 247, 0.6); }