:root {
    --brand: #0066cc;
    --bg: #f7f9fb;
    --text: #222;
    --muted: #6b7280;
    --card: #fff;
    --gap: 16px;
    --shadow: 0 2px 8px rgba(0, 0, 0, .08);
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Segoe UI, system-ui, -apple-system, sans-serif
}

a {
    text-decoration: none;
    color: inherit;
}

.site-header {
    background: #fff;
    color: #006cb5;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.title {
    display: flex;
    align-items: center;
}

.title span {
    font-weight: 400;
}

.title h2 {
    display: inline-block;
    text-wrap-mode: nowrap;
    flex: 1 1;
    font-size: 14px;
    font-weight: 500;
    padding: 0 0 0 10px;
    line-height: 1.3;
    text-transform: uppercase;
}

.title img {
    width: 40px;
}

.header-actions {
    display: flex;
    gap: 8px
}

.btn {
    border: 0;
    border-radius: 10px;
    padding: 8px 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn.primary {
    background: #fff;
    color: var(--brand)
}

.btn.ghost {
    background: #eaf3ff;
    color: #0f54a3
}

.container {
    max-width: 1000px;
    margin: 24px auto;
    padding: 0 16px
}

.group {
    margin: 22px 0
}

.group h2 {
    margin: 0 0 10px;
    color: var(--brand);
    border-bottom: 2px solid var(--brand);
    padding-bottom: 6px;
    font-size: 18px
}

.tiles-grid {
    display: grid;
    grid-template-columns: repeat(auto(minmax(250px)), 1fr);
}

/* bạn đã có .tile, chỉ cần đảm bảo icon ảnh fit đẹp */

.tile {
    border: 1px solid #111827;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    transition: transform .15s ease, box-shadow .2s;
    width: max-content;
    max-width: 250px;
}

.tile:hover {
    transform: translateY(-3px);
    color:#0066cc;
}



.tile .icon {
    font-size: 13px;
    margin-bottom: 1.5px
}

.tile .title {
    font-size: 13px;
    width: fit-content;
    margin: auto;
    font-weight: 700;
}

.tile .desc {
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px
}

.empty {
    margin: 24px 0;
    text-align: center
}

.muted {
    color: var(--muted)
}

.site-footer {
    padding: 16px;
    text-align: center;
    color: #666;
    font-size: 13px
}

.tile-icon-img {
    width: 54x;
    height: 54px;
    object-fit: cover;
    display: inline-block;
    vertical-align: middle;
    border-radius: 100%;
}

.tile:hover .tile-icon-img {
     background-color: #ffffff;
    border-color: #3b82f6; /* Viền xanh khi active */
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1); /* Hào quang xanh nhạt */
}

.tile .icon img.tile-icon-img {
    margin: 0 auto 4px;
}

.group-block {
    margin-bottom: 32px;
    border: 1px solid #0f54a3;
}

.group-header {
    color: #fff;
    background-color: #0f54a3;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding: 5px 10px;
}

.group-icon {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .04);
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 22px;
}

.group-icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.group-info .group-title {

    margin: 0;
    font-size: 18px;
}

.group-info .group-desc {
    margin: 2px 0 0;
    font-size: 14px;
    color: var(--muted, #6b7280);
}

/* =========================================
   PROFESSIONAL TOOLTIP (HINT) STYLES
   ========================================= */

.tile.has-hint {
    position: relative;
    /* Làm mốc toạ độ */
}

/* 1. Phần hộp nội dung (Body) */
.tile.has-hint::after {
    content: attr(data-hint);

    /* Vị trí & Kích thước */
    position: absolute;
    bottom: 100%;
    /* Nằm phía trên */
    left: 50%;
    /* Căn giữa */
    transform: translateX(-50%) translateY(10px);
    /* Vị trí khởi đầu (thấp hơn 1 chút để trượt lên) */
    margin-bottom: 12px;
    /* Cách ô tile một khoảng để chứa mũi tên */

    /* Giao diện Pro */
    background-color: #1f2937;
    /* Màu đen xanh than (Dark Slate) - sang hơn đen tuyền */
    color: #f9fafb;
    /* Màu trắng kem */
    padding: 8px 12px;
    /* Khoảng cách đệm vừa vặn */
    border-radius: 6px;
    /* Bo góc mềm mại */
    font-size: 13px;
    font-weight: 500;
    /* Chữ hơi đậm nhẹ cho dễ đọc */
    line-height: 1.4;

    /* Xử lý văn bản dài */
    white-space: normal;
    /* Cho phép xuống dòng nếu dài */
    width: max-content;
  max-width:450px;
    /* Giới hạn chiều rộng, không bị dài ngoằng */
    text-align: center;

    /* Hiệu ứng chiều sâu (Shadow) */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3),
        0 4px 6px -2px rgba(0, 0, 0, 0.1);

    /* Trạng thái ẩn */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    /* Không chặn chuột */
    z-index: 1000;

    /* Animation mượt mà */
    transition: opacity 0.2s ease-out, transform 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* 2. Phần mũi tên (Arrow) */
.tile.has-hint::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    /* Đồng bộ animation với hộp */
    margin-bottom: 6px;
    /* Căn chỉnh để dính vào đáy hộp */

    /* Vẽ tam giác bằng border */
    border-width: 6px;
    border-style: solid;
    border-color: #1f2937 transparent transparent transparent;
    /* Màu mũi tên trùng màu hộp */
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
    transition: opacity 0.2s ease-out, transform 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* 3. Trạng thái HOVER: Kích hoạt hiển thị */
.tile.has-hint:hover::after,
.tile.has-hint:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    /* Trượt lên vị trí chuẩn */
}

/* =========================================
   DROPDOWN MENU STYLES (Cho header-actions)
   ========================================= */

/* 1. Cấu trúc vị trí */
.header-actions .dropdown {
    position: relative;
    display: inline-block;
}

/* 2. Style cho nút Admin (thẻ span .dropdown-toggle) */
.header-actions .dropdown-toggle {
    display: inline-flex;       /* Để căn giữa icon và chữ */
    align-items: center;
    gap: 8px;                   /* Khoảng cách giữa icon và tên */
    
    /* Màu sắc giống hình mẫu */
    background-color: #eff6ff;  /* Nền xanh nhạt */
    color: #1e3a8a;             /* Chữ xanh đậm */
    
    padding: 8px 16px;
    border-radius: 8px;         /* Bo góc */
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;            /* Biến con trỏ chuột thành hình bàn tay */
    transition: all 0.2s ease;
    border: 1px solid transparent; /* Tránh giật layout khi hover */
}

/* Hiệu ứng khi di chuột vào nút Admin */
.header-actions .dropdown-toggle:hover {
    background-color: #dbeafe;  /* Đậm hơn một chút */
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* 3. Style cho Menu thả xuống */
.header-actions .dropdown-menu {
    display: none;              /* Mặc định ẩn */
    position: absolute;
    right: 0;                   /* Căn phải thẳng hàng với nút */
    top: 100%;                  /* Nằm ngay dưới nút */
    margin-top: 10px;           /* Cách nút ra một chút */
    
    background-color: #ffffff;
    min-width: 200px;
    padding: 8px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1); /* Đổ bóng mịn */
    border: 1px solid #f3f4f6;
    z-index: 1000;
}

/* Lớp "Cầu nối" trong suốt (Quan trọng) */
/* Giúp chuột không bị mất khi di chuyển từ nút xuống menu */
.header-actions .dropdown-menu::before {
    content: "";
    position: absolute;
    top: -15px; 
    left: 0;
    width: 100%;
    height: 20px;
}

/* Hiển thị menu khi hover vào toàn bộ khối .dropdown */
.header-actions .dropdown:hover .dropdown-menu {
    display: block;
    animation: fadeInUp 0.2s ease-out forwards;
}

/* 4. Các mục bên trong menu */
.header-actions .dropdown-item {
    display: block;
    padding: 10px 12px;
    color: #4b5563;             /* Màu chữ xám đậm */
    text-decoration: none;
    font-size: 14px;
    border-radius: 6px;
    transition: background 0.2s;
    margin-bottom: 2px;
}

.header-actions .dropdown-item:hover {
    background-color: #f3f4f6;
    color: #111827;
}

/* 5. Đường kẻ ngang */
.header-actions .dropdown-divider {
    height: 1px;
    background-color: #e5e7eb;
    margin: 6px 0;
}

/* 6. Style riêng cho nút Đăng xuất (màu đỏ) */
.header-actions .dropdown-item.text-danger {
    color: #dc2626;
}

.header-actions .dropdown-item.text-danger:hover {
    background-color: #fef2f2;
    color: #b91c1c;
}

/* Animation xuất hiện */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   HERO SEARCH SECTION (Cách B)
   ========================================= */

/* 1. Khung bao ngoài */
.hero-search-section {
    display: flex;
    justify-content: center;
    border-bottom: 1px solid #eaeaea; /* Đường kẻ mờ ngăn cách với nội dung dưới */
    margin-bottom: 30px;      /* Đẩy phần Mạng xã hội xuống xa một chút */
}

/* Container giới hạn độ rộng */
.hero-search-section .container {
    width: 100%;
    max-width: 700px; /* Giới hạn chiều rộng thanh tìm kiếm (giống Google) */
}

/* 2. Form và Input Group */
.hero-search-form .input-group {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

/* 3. Ô nhập liệu (Input) */
.hero-search-form .search-input {
    width: 100%;
    padding: 15px 140px 15px 50px; /* Padding trái cho icon, phải cho nút */
    font-size: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 50px; /* Bo tròn hoàn toàn */
    background-color: #f8fafc;
    transition: all 0.3s ease;
    outline: none;
    color: #334155;
}

/* Hiệu ứng khi bấm vào ô tìm kiếm */
.hero-search-form .search-input:focus {
    background-color: #ffffff;
    border-color: #3b82f6; /* Viền xanh khi active */
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1); /* Hào quang xanh nhạt */
}

/* 4. Icon Kính lúp (Trang trí) */
.hero-search-form .search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-45%); /* Căn giữa theo chiều dọc */
    color: #94a3b8;
    pointer-events: none; /* Để bấm xuyên qua icon được */
}

/* 5. Nút bấm "Tìm kiếm" */
.hero-search-form .search-btn {
    position: absolute;
    right: 6px;
    top: 6px;
    bottom: 6px;
    padding: 0 25px;
    background-color: #3b82f6; /* Màu xanh chủ đạo */
    color: #ffffff;
    border: none;
    border-radius: 40px; /* Bo tròn theo input */
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 14px;
}

.hero-search-form .search-btn:hover {
    background-color: #2563eb; /* Đậm hơn khi hover */
}