/* ============================================================
   BỘ STYLE GIAO DIỆN SỔ TAY ĐIỆN TỬ ĐHTTTQ LẦN X - 2026
   Thiết kế hiện đại, thể thao, tương thích mọi thiết bị (Responsive)
   Hỗ trợ Dark Mode & In ấn chuyên nghiệp
   ============================================================ */

/* NHÚNG PHÔNG CHỮ MONTSERRAT CHUẨN */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,600;1,700&display=swap');

:root {
    /* Bảng màu chủ đạo (Giao diện Sáng) */
    --primary: #0b4f9c;          /* Xanh dương thể thao truyền thống */
    --primary-light: #e6f0fa;
    --primary-dark: #07356a;
    --accent: #d90429;           /* Đỏ nhiệt huyết thể thao */
    --accent-light: #ffebee;
    --gold: #f59e0b;             /* Vàng huy chương danh giá */
    --gold-light: #fef3c7;
    --cyan: #0284c7;
    --cyan-light: #e0f2fe;
    
    --bg-main: transparent;
    --bg-card: rgba(255, 255, 255, 0.93);
    --bg-card-hover: rgba(248, 250, 252, 0.98);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: rgba(226, 232, 240, 0.85);
    --border-focus: #0b4f9c;
    
    --shadow-sm: 0 2px 6px rgba(0,0,0,0.08);
    --shadow-md: 0 6px 16px rgba(0,0,0,0.12);
    --shadow-lg: 0 12px 28px rgba(0,0,0,0.18);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    
    --font-sans: 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Bảng màu Giao diện Tối (Dark Theme) */
[data-theme="dark"] {
    --primary: #38bdf8;
    --primary-light: rgba(56, 189, 248, 0.15);
    --primary-dark: #0284c7;
    --accent: #f87171;
    --accent-light: rgba(248, 113, 113, 0.15);
    --gold: #fbbf24;
    --gold-light: rgba(251, 191, 36, 0.15);
    --cyan: #38bdf8;
    --cyan-light: rgba(56, 189, 248, 0.15);
    
    --bg-main: transparent;
    --bg-card: rgba(15, 23, 42, 0.86);
    --bg-card-hover: rgba(30, 41, 59, 0.92);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: rgba(51, 65, 85, 0.75);
    --border-focus: #38bdf8;
    
    --shadow-sm: 0 2px 6px rgba(0,0,0,0.4);
    --shadow-md: 0 6px 16px rgba(0,0,0,0.5);
    --shadow-lg: 0 12px 28px rgba(0,0,0,0.6);
}

/* RESET CƠ BẢN */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ÁP DỤNG PHÔNG CHỮ MONTSERRAT TOÀN DIỆN */
body, button, input, select, textarea, h1, h2, h3, h4, h5, h6, p, a, label {
    font-family: var(--font-sans);
}

/* ĐẢM BẢO FONT AWESOME ICONS HIỂN THỊ CHUẨN XÁC TUYỆT ĐỐI */
.fa, .fa-solid, .fa-regular, .fa-brands, [class*="fa-"] {
    font-family: "Font Awesome 6 Free" !important;
}

.fa-brands {
    font-family: "Font Awesome 6 Brands" !important;
}

body {
    overflow-x: hidden;
    width: 100%;
    background-color: #061329;
    background-image: 
        linear-gradient(180deg, rgba(6, 19, 41, 0.12) 0%, rgba(6, 19, 41, 0.45) 280px, rgba(6, 19, 41, 0.85) 100%),
        url('bg-thethao.webp');
    background-attachment: fixed;
    background-position: center top;
    background-repeat: no-repeat;
    background-size: cover;
    color: var(--text-main);
    line-height: 1.6;
    transition: color var(--transition);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* THANH HEADER CHÍNH (TRONG SUỐT VÀ MỜ - FROSTED GLASSMORPHISM) */
.main-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(7, 24, 60, 0.32);
    backdrop-filter: blur(14px) saturate(180%);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: background-color var(--transition), border-color var(--transition);
}

[data-theme="dark"] .main-header {
    background: rgba(4, 16, 42, 0.42);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.header-container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0.6rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    text-decoration: none;
    user-select: none;
    flex-shrink: 0;
}

.brand-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}

.brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.brand-title {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.15;
    color: #ffffff !important;
    letter-spacing: -0.3px;
    white-space: nowrap;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
    margin: 0;
}

.brand-meta-strip {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
    margin-top: 0.2rem;
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.brand-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.brand-meta-sep {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 300;
    font-size: 0.72rem;
}

.text-desktop {
    display: inline;
}

.text-mobile {
    display: none;
}

[data-theme="dark"] .brand-title {
    color: #ffffff;
}

/* MENU ĐIỀU HƯỚNG CHÍNH */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: nowrap;
}

.nav-item {
    background: none;
    border: 1px solid transparent;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    position: relative;
    white-space: nowrap;
    flex-shrink: 0;
    transition: var(--transition);
}

.nav-item span {
    white-space: nowrap;
}

.nav-item:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.25);
}

.nav-item.active {
    color: #ffffff;
    background: rgba(245, 158, 11, 0.28);
    border-color: rgba(245, 158, 11, 0.7);
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .nav-item.active {
    color: #ffffff;
    background: rgba(56, 189, 248, 0.25);
    border-color: rgba(56, 189, 248, 0.6);
}

.badge {
    background-color: var(--accent);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    margin-left: 0.2rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-icon {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: var(--transition);
}

.btn-icon:hover {
    background-color: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.45);
}

.mobile-only {
    display: none;
}

/* NỘI DUNG CHÍNH (MAIN CONTENT) */
.main-content {
    flex: 1;
    max-width: 1300px;
    width: 100%;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 3rem;
    box-sizing: border-box;
    overflow-x: hidden;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* HERO CARD TẠI TRANG CHỦ */
.hero-card {
    position: relative;
    background: linear-gradient(135deg, rgba(8, 38, 92, 0.85) 0%, rgba(11, 55, 128, 0.78) 60%, rgba(2, 132, 199, 0.72) 100%);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #ffffff;
    border-radius: var(--radius-lg);
    padding: 2.75rem 2.25rem;
    margin-bottom: 2rem;
    overflow: hidden;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.25), transparent 70%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 850px;
}

.hero-meta-strip {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.65rem;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.45rem 1rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #ffffff;
    backdrop-filter: blur(6px);
}

.hero-meta-strip i {
    color: var(--gold);
    margin-right: 0.25rem;
}

.meta-dot {
    opacity: 0.5;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: rgba(255, 255, 255, 0.15);
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    backdrop-filter: blur(5px);
}

.hero-title {
    font-size: 2.3rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 0.85rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.hero-desc {
    font-size: 1.05rem;
    opacity: 0.95;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* ĐỒNG HỒ ĐẾM NGƯỢC (COUNTDOWN) */
.countdown-wrapper {
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1.75rem;
    display: inline-block;
}

.countdown-label {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
    color: var(--gold);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.countdown-grid {
    display: flex;
    gap: 0.75rem;
}

.countdown-box {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 0.6rem 1rem;
    border-radius: var(--radius-sm);
    min-width: 72px;
    text-align: center;
}

.countdown-num {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
    color: #ffffff;
    font-variant-numeric: tabular-nums;
}

.countdown-text {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    opacity: 0.8;
    margin-top: 0.35rem;
}

.hero-cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
}

/* NÚT BẤM (BUTTONS) */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--gold);
    color: #1e293b;
    font-weight: 700;
}
.btn-primary:hover {
    background-color: #eab308;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-accent {
    background-color: var(--accent);
    color: #ffffff;
}
.btn-accent:hover {
    background-color: #b91c1c;
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #ffffff;
}
.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: #ffffff;
}

.tab-pane .btn-outline {
    border-color: var(--border-color);
    color: var(--text-main);
}
.tab-pane .btn-outline:hover {
    background-color: var(--bg-card-hover);
    color: var(--primary);
    border-color: var(--primary);
}

.btn-secondary {
    background-color: var(--border-color);
    color: var(--text-main);
}
.btn-secondary:hover {
    background-color: #cbd5e1;
}

.btn-danger {
    background-color: var(--accent-light);
    color: var(--accent);
    border: 1px solid var(--accent);
}
.btn-danger:hover {
    background-color: var(--accent);
    color: #ffffff;
}

.btn-sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.85rem;
}

.btn-block {
    width: 100%;
}

/* THỐNG KÊ (STATS GRID) */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
    width: 100%;
    box-sizing: border-box;
}

.stat-card {
    background-color: var(--bg-card);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: var(--transition);
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.info-card,
.sport-card,
.delegation-card,
.venue-card,
.timeline-content,
.brand-item-card,
.note-form-card,
.note-card,
.contact-card,
.guide-box,
.modal-dialog {
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.icon-blue { background-color: var(--primary-light); color: var(--primary); }
.icon-gold { background-color: var(--gold-light); color: var(--gold); }
.icon-red { background-color: var(--accent-light); color: var(--accent); }
.icon-cyan { background-color: var(--cyan-light); color: var(--cyan); }

.stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-main);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.stat-title {
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.25;
    color: var(--text-main);
    margin-bottom: 0.2rem;
    transition: var(--transition);
}

.stat-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.2;
}

.stat-card:hover .stat-title {
    color: var(--primary);
}

[data-theme="dark"] .stat-card:hover .stat-title {
    color: var(--gold);
}

/* CÁC SECTION TRANG CHỦ */
.home-sections-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.info-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.info-card-header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.info-card-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
}

.info-card-body {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.info-card-body p {
    margin-bottom: 0.65rem;
    color: var(--text-main);
    word-break: break-word;
}

.mascot-preview-body {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.mascot-img-wrap {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    background-color: var(--bg-card-hover);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
}

.mascot-info-wrap {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.mascot-thumb {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* SECTION HEADER CHUNG (KHUNG TIÊU ĐỀ NỔI BẬT NỀN KÍNH) */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(90deg, rgba(8, 28, 70, 0.65) 0%, rgba(12, 42, 100, 0.55) 100%);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

.section-title {
    font-size: 1.7rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: #ffffff !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    letter-spacing: -0.2px;
}

.section-subtitle {
    font-size: 0.95rem;
    color: #e2e8f0 !important;
    margin-top: 0.35rem;
    font-weight: 500;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.section-actions .btn-outline {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    backdrop-filter: blur(6px);
}

.section-actions .btn-outline:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: #ffffff;
    color: var(--gold);
}

.subsection-title {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 1.15rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: #ffffff !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    background: rgba(8, 28, 70, 0.45);
    padding: 0.65rem 1.15rem;
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--gold);
    backdrop-filter: blur(10px);
}

.subsection-title i {
    color: var(--gold) !important;
}

[data-theme="dark"] .subsection-title {
    color: #ffffff !important;
}

/* THANH TÌM KIẾM & BỘ LỌC (FILTER BAR) */
.filter-bar {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.search-box {
    position: relative;
    max-width: 100%;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.3);
    background-color: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(8px);
    color: #0f172a;
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.search-box input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.3);
    background-color: #ffffff;
}

.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pill {
    background-color: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: #0f172a;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.pill:hover {
    border-color: var(--gold);
    color: var(--primary);
    background-color: #ffffff;
    transform: translateY(-1px);
}

.pill.active {
    background: linear-gradient(135deg, #f59e0b 0%, #eab308 100%);
    color: #0f172a;
    border-color: #f59e0b;
    font-weight: 700;
}

/* LƯỚI THẺ MÔN THI ĐẤU (SPORTS GRID) */
.sports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 1.25rem;
}

.sport-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
    position: relative;
}

.sport-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.sport-card-top {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.sport-icon-wrap {
    width: 60px;
    height: 60px;
    background-color: var(--bg-card-hover);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
    padding: 6px;
}

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

.sport-header-meta {
    flex: 1;
}

.sport-name {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-main);
    margin-bottom: 0.35rem;
}

.sport-cat-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background-color: var(--primary-light);
    color: var(--primary);
}

.sport-fav-btn {
    background: none;
    border: none;
    color: #cbd5e1;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    padding: 0.2rem;
}

.sport-fav-btn.active {
    color: var(--gold);
}

.sport-fav-btn:hover {
    transform: scale(1.15);
}

.sport-details {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.sport-details i {
    width: 16px;
    text-align: center;
    color: var(--primary);
    margin-right: 0.25rem;
}

/* LIÊN KẾT BẢN ĐỒ GOOGLE MAPS */
.venue-map-link {
    color: #0284c7;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border-bottom: 1px dotted rgba(2, 132, 199, 0.45);
    padding-bottom: 1px;
    display: inline;
}

.venue-map-link:hover {
    color: #e11d48 !important;
    border-bottom: 1px solid #e11d48;
    text-decoration: none;
}

.venue-map-link i.fa-arrow-up-right-from-square {
    font-size: 0.72rem;
    margin-left: 3px;
    opacity: 0.85;
    vertical-align: 1px;
}

[data-theme="dark"] .venue-map-link {
    color: #38bdf8;
    border-bottom-color: rgba(56, 189, 248, 0.45);
}

[data-theme="dark"] .venue-map-link:hover {
    color: #fb7185 !important;
    border-bottom-color: #fb7185;
}

.sport-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
}

/* BẢNG TỔNG SẮP HUY CHƯƠNG & 36 ĐOÀN THỂ THAO */
.medals-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.medal-overview-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.medal-overview-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.medal-overview-card .overview-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.card-gold .overview-icon { background: rgba(234, 179, 8, 0.15); color: #d97706; }
.card-silver .overview-icon { background: rgba(148, 163, 184, 0.18); color: #64748b; }
.card-bronze .overview-icon { background: rgba(217, 119, 6, 0.15); color: #b45309; }
.card-total .overview-icon { background: var(--primary-light); color: var(--primary); }
.card-leader { cursor: pointer; border-color: rgba(234, 179, 8, 0.4); }
.card-leader .overview-icon { background: linear-gradient(135deg, rgba(234, 179, 8, 0.25), rgba(220, 38, 38, 0.18)); color: #dc2626; }

.medal-overview-card .overview-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.medal-overview-card .overview-num {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
}

.medal-overview-card .overview-num.leader-name {
    font-size: 1.05rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.medal-overview-card .overview-label {
    font-size: 0.76rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* THANH ĐIỀU KHIỂN TIÊU CHÍ XẾP HẠNG HUY CHƯƠNG */
.medal-sort-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    background: var(--bg-card-hover);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.65rem 1rem;
    margin-bottom: 1rem;
}

.sort-bar-left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sort-bar-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-right: 0.25rem;
}

.sort-mode-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.btn-sort-mode {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-sort-mode:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

.btn-sort-mode.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(11, 79, 156, 0.3);
}

.btn-sort-mode.active .medal-dot-icon {
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.8));
}

.sort-bar-right {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.sort-badge-note {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--bg-card);
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
}

/* BẢNG TỔNG SẮP HUY CHƯƠNG */
.medal-table-timestamp {
    font-size: 0.85rem;
    font-style: italic;
    font-weight: 500;
    color: var(--text-muted);
    margin: 0.15rem 0 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

[data-theme="dark"] .medal-table-timestamp {
    color: rgba(255, 255, 255, 0.72);
}

.th-text-desktop {
    display: inline;
}

.th-text-mobile {
    display: none;
}

.medal-table-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow-x: auto;
    box-shadow: var(--shadow-sm);
    margin-bottom: 0.85rem;
    -webkit-overflow-scrolling: touch;
}

.medal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    min-width: 680px;
}

.medal-table thead tr {
    background: var(--bg-card-hover);
    border-bottom: 2px solid var(--border-color);
}

.medal-table th {
    padding: 0.75rem 0.85rem;
    font-weight: 700;
    color: var(--text-main);
    text-align: center;
    white-space: nowrap;
    user-select: none;
}

.medal-table th.th-rank {
    width: 65px;
}

.medal-table th.th-delegation {
    text-align: left;
    padding-left: 1.25rem;
    min-width: 220px;
}

.medal-table th.th-medal {
    width: 85px;
    cursor: pointer;
}

.medal-th-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-gold { background: rgba(234, 179, 8, 0.18); color: #b45309; border: 1px solid rgba(234, 179, 8, 0.4); }
.badge-silver { background: rgba(148, 163, 184, 0.2); color: #475569; border: 1px solid rgba(148, 163, 184, 0.4); }
.badge-bronze { background: rgba(217, 119, 6, 0.18); color: #9a3412; border: 1px solid rgba(217, 119, 6, 0.4); }

[data-theme="dark"] .badge-gold { color: #facc15; }
[data-theme="dark"] .badge-silver { color: #cbd5e1; }
[data-theme="dark"] .badge-bronze { color: #fb923c; }

.medal-table th.th-custom-col {
    width: 155px;
    background: rgba(11, 79, 156, 0.08);
    border-left: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.medal-table th.th-custom-col:hover {
    background: rgba(11, 79, 156, 0.16);
}

.custom-col-header-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--primary);
    font-weight: 800;
}

.th-switch-icon {
    font-size: 0.75rem;
    color: var(--gold);
    transition: transform 0.25s ease;
}

.medal-table th.th-custom-col:hover .th-switch-icon {
    transform: rotate(180deg);
}

/* HÀNG VÀ CỘT DỮ LIỆU BẢNG */
.medal-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.15s ease;
}

.medal-table tbody tr:last-child {
    border-bottom: none;
}

.medal-table tbody tr:hover {
    background-color: var(--bg-card-hover);
}

.medal-table tbody tr.row-top3 {
    font-weight: 600;
}

.medal-table tbody tr.row-rank-1 {
    background-color: rgba(234, 179, 8, 0.06);
}

.medal-table tbody tr.row-rank-2 {
    background-color: rgba(148, 163, 184, 0.05);
}

.medal-table tbody tr.row-rank-3 {
    background-color: rgba(217, 119, 6, 0.04);
}

.medal-table td {
    padding: 0.65rem 0.85rem;
    text-align: center;
    vertical-align: middle;
}

/* CỘT HẠNG / STT */
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    padding: 0 0.35rem;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.82rem;
}

.rank-badge-default {
    background: var(--bg-card-hover);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.rank-badge-gold {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(217, 119, 6, 0.4);
    gap: 0.25rem;
}

.rank-badge-silver {
    background: linear-gradient(135deg, #94a3b8, #64748b);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(100, 116, 139, 0.35);
    gap: 0.25rem;
}

.rank-badge-bronze {
    background: linear-gradient(135deg, #d97706, #b45309);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(180, 83, 9, 0.35);
    gap: 0.25rem;
}

/* CỘT ĐOÀN THỂ THAO */
.td-delegation {
    text-align: left !important;
    padding-left: 1.25rem !important;
}

.delegation-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.delegation-code-pill {
    font-size: 0.68rem;
    font-weight: 800;
    padding: 0.2rem 0.45rem;
    border-radius: 4px;
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid rgba(11, 79, 156, 0.2);
    min-width: 38px;
    text-align: center;
    flex-shrink: 0;
}

.delegation-cell-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.delegation-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
}

.delegation-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

/* CÁC CỘT HUY CHƯƠNG */
.medal-count-pill {
    display: inline-block;
    min-width: 32px;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.88rem;
}

.pill-gold {
    color: #b45309;
    background: rgba(234, 179, 8, 0.14);
}

.pill-silver {
    color: #475569;
    background: rgba(148, 163, 184, 0.18);
}

.pill-bronze {
    color: #9a3412;
    background: rgba(217, 119, 6, 0.14);
}

[data-theme="dark"] .pill-gold { color: #facc15; }
[data-theme="dark"] .pill-silver { color: #cbd5e1; }
[data-theme="dark"] .pill-bronze { color: #fb923c; }

/* CỘT TÙY CHỌN XẾP HẠNG CUỐI CÙNG */
.td-custom-col {
    background: rgba(11, 79, 156, 0.03);
    border-left: 1px solid var(--border-color);
}

.custom-val-box {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    font-weight: 800;
}

.custom-val-box.val-gold {
    background: rgba(234, 179, 8, 0.18);
    color: #b45309;
    border: 1px solid rgba(234, 179, 8, 0.4);
}

.custom-val-box.val-total {
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid rgba(11, 79, 156, 0.3);
}

[data-theme="dark"] .custom-val-box.val-gold {
    color: #facc15;
}

.custom-val-num {
    font-size: 1rem;
    font-weight: 800;
}

.custom-val-unit {
    font-size: 0.68rem;
    font-weight: 700;
    opacity: 0.85;
}

/* HIỆU ỨNG NHẤP NHÁY HIGHLIGHT ĐOÀN DẪN ĐẦU */
@keyframes highlightFlash {
    0%, 100% { background-color: transparent; }
    50% { background-color: rgba(234, 179, 8, 0.35); }
}

.row-highlight-flash {
    animation: highlightFlash 0.75s ease 2;
}

.medal-table-footer-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
    padding: 0.5rem 0.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
}

/* NÚT CHUYỂN ĐỔI CHẾ ĐỘ XEM TRONG TAB LỊCH & ĐỊA ĐIỂM */
.view-switch-group {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.15);
    padding: 3px;
    border-radius: var(--radius-sm);
    gap: 4px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(8px);
}

.view-switch-btn {
    border: none;
    background: transparent;
    color: #ffffff;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.45rem 0.85rem;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-align: left;
}

.view-switch-btn i {
    font-size: 1.05rem;
    flex-shrink: 0;
}

.view-switch-text {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.25;
}

.view-switch-title {
    font-size: 0.84rem;
    font-weight: 700;
    white-space: nowrap;
}

.view-switch-count {
    font-size: 0.76rem;
    font-weight: 600;
    opacity: 0.85;
}

.view-switch-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--gold);
}

.view-switch-btn.active {
    background: #ffffff;
    color: #0b1e42;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.view-switch-btn.active .view-switch-count {
    color: var(--primary);
    opacity: 1;
}

/* ============================================================
   KHỐI BẢN ĐỒ TỔNG THỂ & 3 MINI MAP ĐỊA ĐIỂM HỖ TRỢ (TAB 2)
   ============================================================ */
.map-showcase-wrapper {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* 1. BẢN ĐỒ CHÍNH (MAIN MAP CARD) */
.main-map-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.map-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--border-color);
}

.map-header-title {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.map-icon-badge {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(11, 79, 156, 0.25);
}

.map-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.2rem;
}

.map-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.map-presets-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.45rem;
    padding: 0.35rem 0.6rem;
    background: var(--bg-card-hover);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.preset-label {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-right: 0.2rem;
    white-space: nowrap;
}

.preset-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.btn-map-preset {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.74rem;
    font-weight: 600;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.btn-map-preset:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

.btn-map-preset.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 2px 6px rgba(11, 79, 156, 0.3);
}

.color-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.15rem;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.3);
}
.dot-red { background: #e53935; }
.dot-blue { background: #1e88e5; }
.dot-yellow { background: #eab308; }

.main-map-iframe-wrap {
    position: relative;
    width: 100%;
    height: 420px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05);
}

.main-map-iframe-wrap iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* DANH SÁCH HUY HIỆU ĐỊA ĐIỂM ĐƯỢC ĐÁNH DẤU TRÊN BẢN ĐỒ CHÍNH (THU NHỎ GỌN GÀNG) */
.map-venues-legend {
    background: var(--bg-card-hover);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.35rem 0.6rem;
    margin-bottom: 0.45rem;
}

.legend-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.25rem;
}

.legend-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-main);
}

.legend-hint {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.map-venues-chips-container {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 0.25rem;
    padding: 0.1rem 0 0.3rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.map-venues-chips-container::-webkit-scrollbar {
    height: 4px;
}

.map-venues-chips-container::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.btn-venue-chip {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-venue-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
    transform: translateY(-1px);
}

.btn-venue-chip.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

/* CUSTOM LEAFLET PIN & MARKERS */
.custom-map-pin-wrap {
    background: none;
    border: none;
}

.custom-map-marker {
    width: 32px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.35));
    transition: transform 0.2s ease;
}

.custom-map-marker:hover {
    transform: scale(1.18) translateY(-3px);
    z-index: 9999 !important;
}

.custom-map-marker svg {
    width: 32px;
    height: 38px;
    display: block;
}

.custom-map-marker i {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 13px;
    color: #ffffff;
    pointer-events: none;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

/* LEAFLET POPUP CARD */
.leaflet-popup-content-wrapper {
    background: var(--bg-card) !important;
    color: var(--text-main) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-lg) !important;
    border: 1px solid var(--border-color) !important;
    padding: 0 !important;
    font-family: var(--font-sans) !important;
}

.leaflet-popup-content {
    margin: 0 !important;
    line-height: 1.4 !important;
}

.leaflet-popup-tip {
    background: var(--bg-card) !important;
}

.map-popup-card {
    padding: 0.85rem 1rem;
    min-width: 240px;
    max-width: 300px;
}

.map-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.35rem;
}

.map-popup-header strong {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
}

.popup-zone-tag {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    background: var(--primary-light);
    color: var(--primary);
    white-space: nowrap;
}

.map-popup-address {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 0.45rem;
}

.map-popup-sports {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.map-popup-sports .sport-tag {
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
}

.map-popup-capacity {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
}

.map-popup-btn {
    width: 100%;
    text-align: center;
    justify-content: center;
    font-size: 0.76rem;
    padding: 0.35rem 0.5rem;
}

/* ĐỒNG NAI SUBVENUE CHIPS & MINIMAP ACTIONS */
.minimap-venues-marked-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 0.65rem;
}

.btn-subvenue-chip {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.45rem 0.65rem;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.78rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.btn-subvenue-chip:hover {
    border-color: var(--primary);
    background: var(--bg-card-hover);
    transform: translateX(3px);
}

.minimap-actions-group {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.65rem;
}

.minimap-actions-group .btn {
    flex: 1;
    text-align: center;
    justify-content: center;
    font-size: 0.76rem;
}

.map-footer-note {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 2. KHỐI 3 MINI MAP CHO CÁC ĐỊA ĐIỂM HỖ TRỢ */
.sub-minimaps-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.sub-minimaps-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.sub-minimaps-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.sub-minimaps-badge {
    font-size: 0.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 4, 41, 0.12) 100%);
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    letter-spacing: 0.3px;
}

[data-theme="dark"] .sub-minimaps-badge {
    color: #fbbf24;
}

.sub-minimaps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.15rem;
}

.minimap-card {
    background: var(--bg-card-hover);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
}

.minimap-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.minimap-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 0.85rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
}

.minimap-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.minimap-num {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 800;
}

.tag-hn .minimap-num { background: #7c3aed; }
.tag-hn { color: #7c3aed; }

.tag-dn .minimap-num { background: #059669; }
.tag-dn { color: #059669; }

.tag-dt .minimap-num { background: #db2777; }
.tag-dt { color: #db2777; }

[data-theme="dark"] .tag-hn { color: #a78bfa; }
[data-theme="dark"] .tag-dn { color: #34d399; }
[data-theme="dark"] .tag-dt { color: #f472b6; }

.minimap-venue-type {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-card-hover);
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.minimap-iframe-wrap {
    width: 100%;
    height: 180px;
    border-bottom: 1px solid var(--border-color);
    background: #e2e8f0;
}

.minimap-iframe-wrap iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.minimap-body {
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.minimap-place-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.4rem;
    line-height: 1.35;
}

.minimap-info-row {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    margin-bottom: 0.35rem;
    line-height: 1.4;
}

.minimap-info-row i {
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.minimap-sports-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.45rem;
    margin-bottom: 0.75rem;
}

.sport-tag {
    font-size: 0.72rem;
    font-weight: 600;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.minimap-btn {
    width: 100%;
    text-align: center;
    justify-content: center;
    font-size: 0.78rem;
    padding: 0.4rem 0.6rem;
}

/* THẺ LỊCH & ĐỊA ĐIỂM CHI TIẾT THEO MÔN (ĐỒNG BỘ 100% VỚI MÔN & ĐIỀU LỆ) */
.schedule-sports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.schedule-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
}

.schedule-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.schedule-dates-badge {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(234, 179, 8, 0.15) 100%);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #b45309;
    padding: 0.45rem 0.75rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.88rem;
    margin-bottom: 0.65rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

[data-theme="dark"] .schedule-dates-badge {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.2);
}

.schedule-region-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    background-color: rgba(6, 182, 212, 0.12);
    color: #0891b2;
    border: 1px solid rgba(6, 182, 212, 0.25);
    display: inline-block;
}

[data-theme="dark"] .schedule-region-badge {
    color: #22d3ee;
    background-color: rgba(6, 182, 212, 0.2);
}

/* ĐỊA ĐIỂM (VENUES GRID) */
.venues-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

.venue-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
}

.venue-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.venue-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.65rem;
}

.venue-header h4 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
}

.venue-city-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    background-color: var(--primary-light);
    color: var(--primary);
    white-space: nowrap;
}

.venue-address {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.85rem;
    line-height: 1.45;
}

.venue-sports {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.85rem;
}

.venue-sport-tag {
    font-size: 0.75rem;
    background-color: var(--bg-card-hover);
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
}

/* DÒNG THỜI GIAN (TIMELINE) */
.timeline-container {
    position: relative;
    padding-left: 2rem;
    margin-top: 1.5rem;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 5px;
    bottom: 5px;
    width: 3px;
    background-color: var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
}

.timeline-dot {
    position: absolute;
    left: -2rem;
    top: 4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: var(--primary);
    border: 3px solid var(--bg-card);
    box-shadow: 0 0 0 2px var(--primary);
}

.timeline-item.highlight .timeline-dot {
    background-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent);
}

.timeline-content {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1.15rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.timeline-item.highlight .timeline-content {
    border-color: var(--accent);
    background-color: var(--accent-light);
}

.timeline-date {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.35rem;
}

.timeline-item.highlight .timeline-date {
    color: var(--accent);
}

.timeline-content h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

/* BỘ NHẬN DIỆN (BRANDING GRID) */
.branding-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.brand-item-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.brand-item-img-wrap {
    height: 240px;
    background-color: var(--bg-card-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.brand-item-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.medals-showcase {
    height: 240px;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.medal-img {
    height: 140px;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
}

.medal-img:hover {
    transform: scale(1.1);
}

.brand-item-info {
    padding: 1.25rem;
}

.brand-item-info h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* SỔ TAY CÁ NHÂN (NOTEBOOK LAYOUT) */
.notebook-layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 1.5rem;
    align-items: flex-start;
}

.note-form-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 80px;
}

.form-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.form-group .required {
    color: var(--accent);
}

.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.9rem;
    transition: var(--transition);
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--border-focus);
    background-color: var(--bg-card);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.form-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.fav-sports-box {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.fav-sports-box h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.65rem;
}

.fav-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.fav-sport-pill {
    background-color: var(--gold-light);
    color: #92400e;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
}

/* KHU VỰC HIỂN THỊ GHI CHÚ */
.notes-display-area {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.notes-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.small-search {
    flex: 1;
    max-width: 320px;
}

.notes-stats {
    font-size: 0.95rem;
    color: #ffffff;
    font-weight: 600;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 1rem;
}

.note-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-md);
    padding: 1.15rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
}

.note-card.priority-Khẩn-cấp {
    border-left-color: var(--accent);
}

.note-card.priority-Quan-trọng {
    border-left-color: var(--gold);
}

.note-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.note-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.note-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
}

.note-badges {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    margin-bottom: 0.65rem;
}

.note-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    background-color: var(--bg-card-hover);
    color: var(--text-muted);
}

.note-badge.priority-tag-Khẩn-cấp {
    background-color: var(--accent-light);
    color: var(--accent);
    font-weight: 700;
}

.note-badge.priority-tag-Quan-trọng {
    background-color: var(--gold-light);
    color: #92400e;
}

.note-body {
    font-size: 0.9rem;
    color: var(--text-main);
    white-space: pre-line;
    margin-bottom: 1rem;
    flex: 1;
}

.note-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 0.65rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.note-btns {
    display: flex;
    gap: 0.35rem;
}

.btn-note-action {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.25rem 0.45rem;
    border-radius: 4px;
    color: var(--text-muted);
    transition: var(--transition);
}

.btn-note-action:hover {
    background-color: var(--bg-card-hover);
    color: var(--primary);
}

.btn-note-action.delete:hover {
    color: var(--accent);
}

/* LIÊN HỆ & ĐƯỜNG DÂY NÓNG */
.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

.contact-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--accent-light);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.contact-info h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.contact-phone {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    display: inline-block;
    margin-bottom: 0.2rem;
}

.contact-phone:hover {
    text-decoration: underline;
}

.guide-box {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
}

.guide-box h3 {
    margin-bottom: 1rem;
}

.guide-box ul {
    padding-left: 1.5rem;
}

.guide-box li {
    margin-bottom: 0.65rem;
    font-size: 0.95rem;
}

/* MODAL XEM CHI TIẾT & PDF */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.modal.active,
.modal.show {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-dialog {
    position: relative;
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 960px;
    height: 90vh;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    animation: zoomIn 0.25s ease-out;
}

.modal-dialog.modal-sm {
    max-width: 420px;
    height: auto;
    max-height: 90vh;
}

.modal-dialog.modal-lg {
    max-width: 900px;
    height: 85vh;
    max-height: 85vh;
}

.modal-dialog.pdf-fullscreen-mode {
    max-width: 100vw !important;
    width: 100vw !important;
    height: 100vh !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    border: none !important;
}

.modal-header {
    padding: 0.85rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.modal-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.modal-close:hover {
    color: var(--accent);
    background: var(--bg-card-hover);
}

.modal-body {
    padding: 0.75rem 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.pdf-modal-info {
    margin-bottom: 0.5rem;
    padding: 0.55rem 0.85rem;
    background-color: var(--bg-card-hover);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

/* KHUNG CHỨA TRÌNH ĐỌC PDF CHUYÊN DỤNG */
.pdf-viewer-container {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background-color: #1e293b;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

/* THANH ĐIỀU HƯỚNG & PHÓNG TO PDF */
.pdf-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.45rem 0.75rem;
    background: #0f172a;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    flex-shrink: 0;
    gap: 0.5rem;
}

.pdf-toolbar-left,
.pdf-toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.btn-pdf-nav {
    background: rgba(255, 255, 255, 0.12);
    color: #f1f5f9;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    padding: 0.28rem 0.55rem;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: var(--transition);
}

.btn-pdf-nav:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.4);
}

.pdf-page-indicator {
    font-size: 0.8rem;
    font-weight: 700;
    color: #e2e8f0;
    margin: 0 0.35rem;
    white-space: nowrap;
}

/* KHUNG CUỘN CÁC TRANG VĂN BẢN ĐIỀU LỆ */
.pdf-canvas-scroll-wrap {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1rem 0.75rem;
    text-align: center;
    background: #334155;
}

.pdf-page-wrap {
    display: inline-block;
    margin: 0 auto 1.25rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
    border-radius: 4px;
    overflow: hidden;
    background: #ffffff;
    position: relative;
    max-width: 100%;
}

.pdf-page-num-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(15, 23, 42, 0.75);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    pointer-events: none;
    z-index: 2;
}

.pdf-page-canvas {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
}

.pdf-loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: #cbd5e1;
    padding: 3rem 1rem;
    font-size: 0.95rem;
}

.pdf-loading-state i {
    font-size: 2.2rem;
    color: var(--gold);
}

.pdf-fallback-notice {
    padding: 2.5rem 1rem;
    color: #e2e8f0;
    text-align: center;
}

.modal-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 0.65rem;
    flex-shrink: 0;
}

/* TOAST THÔNG BÁO */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background-color: #0f172a;
    color: #ffffff;
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.95rem;
    font-weight: 600;
    z-index: 300;
    transform: translateY(120%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    border-left: 4px solid var(--gold);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-icon {
    color: var(--gold);
    font-size: 1.2rem;
}

/* FOOTER CHÂN TRANG */
.main-footer {
    background: linear-gradient(90deg, rgba(8, 35, 85, 0.92) 0%, rgba(12, 52, 122, 0.88) 50%, rgba(7, 32, 78, 0.92) 100%);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2rem 1.25rem;
    margin-top: auto;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
}

.footer-container {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-logo {
    height: 48px;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
}

.footer-brand h4 {
    font-size: 1.05rem;
    font-weight: 800;
    color: #ffffff;
}

.footer-brand p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

.footer-col.text-right {
    text-align: right;
    color: rgba(255, 255, 255, 0.75);
}

.copyright {
    font-size: 0.8rem;
    margin-top: 0.25rem;
    color: rgba(255, 255, 255, 0.6);
}

/* UTILITY CLASSES */
.text-gold { color: var(--gold) !important; }
.text-accent { color: var(--accent) !important; }
.text-primary { color: var(--primary) !important; }
.text-muted { color: var(--text-muted) !important; }
.mt-4 { margin-top: 1.5rem !important; }
.small { font-size: 0.85rem; }

/* RESPONSIVE DESIGN */
@media (max-width: 1200px) and (min-width: 769px) {
    .header-container {
        padding: 0.5rem 0.75rem;
        gap: 0.5rem;
    }
    .brand-title {
        font-size: 1.15rem;
    }
    .brand-logo {
        height: 52px;
    }
    .nav-item {
        padding: 0.42rem 0.55rem;
        font-size: 0.78rem;
        gap: 0.3rem;
    }
}

@media (max-width: 992px) {
    .notebook-layout {
        grid-template-columns: 1fr;
    }
    .note-form-card {
        position: static;
    }
    .home-sections-grid {
        grid-template-columns: 1fr;
    }
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .text-desktop {
        display: none !important;
    }
    .text-mobile {
        display: inline !important;
    }

    /* 1. THANH HEADER & NAVBAR TRÊN ĐIỆN THOẠI */
    .main-header {
        padding: 0.5rem 0.75rem;
    }

    .header-container {
        gap: 0.4rem;
        justify-content: space-between;
        align-items: center;
    }

    .brand {
        gap: 0.45rem;
        max-width: calc(100% - 85px);
        overflow: visible;
        align-items: center;
    }

    .brand-logo {
        height: 36px;
        flex-shrink: 0;
        filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    }

    .brand-text {
        min-width: 0;
        overflow: visible;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .brand-title {
        font-size: 0.84rem;
        line-height: 1.3;
        padding-top: 2px;
        white-space: nowrap;
        overflow: visible;
        letter-spacing: -0.2px;
    }

    .brand-meta-strip {
        font-size: 0.58rem;
        gap: 0.22rem;
        margin-top: 0.1rem;
        letter-spacing: -0.2px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    .brand-meta-item i {
        font-size: 0.55rem;
    }

    .brand-meta-sep {
        font-size: 0.55rem;
        opacity: 0.4;
    }

    .header-actions {
        gap: 0.3rem;
        flex-shrink: 0;
        margin-left: auto;
    }

    .btn-icon {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    /* 2. MENU THẢ XUỐNG: CANH HẾT SANG TRÁI THEO YÊU CẦU */
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(6, 26, 68, 0.98);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        border-bottom: 2px solid var(--accent);
        flex-direction: column;
        align-items: stretch; /* Dàn toàn bộ chiều rộng màn hình */
        padding: 0.65rem 0.75rem;
        gap: 0.35rem;
        box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55);
        z-index: 1000;
    }

    .nav-menu.open {
        display: flex;
    }

    .mobile-only {
        display: inline-flex;
    }

    .nav-item {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: flex-start; /* CANH HẾT NỘI DUNG SANG TRÁI */
        text-align: left;           /* CANH CHỮ SANG TRÁI */
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
        font-weight: 600;
        border-radius: var(--radius-sm);
        gap: 0.85rem;
        color: #ffffff;
        border: 1px solid rgba(255, 255, 255, 0.08);
        background: rgba(255, 255, 255, 0.05);
        transition: var(--transition);
    }

    .nav-item i {
        width: 22px;
        text-align: center;
        font-size: 1.05rem;
        color: var(--gold);
        flex-shrink: 0;
    }

    .nav-item span {
        flex: 1;
        text-align: left;
        white-space: nowrap;
    }

    .nav-item .badge {
        margin-left: auto;
        padding: 0.15rem 0.5rem;
    }

    .nav-item:hover, .nav-item:active {
        background: rgba(255, 255, 255, 0.15);
        color: #ffffff;
    }

    .nav-item.active {
        background: rgba(245, 158, 11, 0.22);
        border-left: 4px solid var(--gold);
        border-color: rgba(245, 158, 11, 0.45);
        color: #ffffff;
        font-weight: 700;
        box-shadow: inset 0 0 12px rgba(245, 158, 11, 0.1);
    }

    [data-theme="dark"] .nav-item.active {
        border-left-color: var(--accent);
        background: rgba(56, 189, 248, 0.2);
    }

    /* 3. KHỐI NỘI DUNG CHÍNH (MAIN CONTENT) */
    .main-content {
        padding: 0.85rem 0.75rem 2.5rem;
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    .section-title {
        font-size: 1.3rem;
        margin-bottom: 0.35rem;
    }

    .section-subtitle {
        font-size: 0.82rem;
        margin-bottom: 1rem;
    }

    .subsection-title {
        font-size: 1.05rem;
        margin-top: 1.25rem;
        margin-bottom: 0.75rem;
    }

    /* 4. HERO BANNER TRANG CHỦ */
    .hero-card {
        padding: 1.35rem 1rem;
        border-radius: var(--radius-md);
        margin-bottom: 1.25rem;
    }

    .hero-tag {
        font-size: 0.68rem;
        padding: 0.2rem 0.55rem;
        margin-bottom: 0.65rem;
    }

    .hero-title {
        font-size: 1.45rem;
        line-height: 1.25;
        margin-bottom: 0.5rem;
    }

    .hero-desc {
        font-size: 0.85rem;
        line-height: 1.45;
        margin-bottom: 1rem;
    }

    /* ĐỒNG HỒ ĐẾM NGƯỢC CHUẨN 4 CỘT CÂN ĐỐI TRÊN MOBILE */
    .countdown-wrapper {
        padding: 0.75rem;
        margin-bottom: 1.1rem;
        border-radius: var(--radius-sm);
    }

    .countdown-label {
        font-size: 0.75rem;
        margin-bottom: 0.5rem;
    }

    .countdown-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 0.35rem;
        width: 100%;
    }

    .countdown-box {
        min-width: unset;
        width: 100%;
        padding: 0.45rem 0.2rem;
        border-radius: var(--radius-sm);
    }

    .countdown-num {
        font-size: 1.3rem;
    }

    .countdown-text {
        font-size: 0.65rem;
        margin-top: 0.2rem;
    }

    .hero-cta-buttons {
        flex-direction: column;
        width: 100%;
        gap: 0.55rem;
    }

    .hero-cta-buttons .btn {
        width: 100%;
        justify-content: center;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    /* 5. THẺ LỐI TẮT ĐIỀU HƯỚNG TRANG CHỦ LƯỚI 2 CỘT CÂN ĐỐI 100% VỪA VẶN */
    .stats-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: 1fr;
        gap: 0.55rem;
        margin-bottom: 1.25rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .stat-card {
        padding: 0.72rem 0.55rem;
        border-radius: var(--radius-sm);
        display: flex;
        align-items: center;
        gap: 0.52rem;
        min-width: 0;
        width: 100%;
        height: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }

    .stat-icon {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
        border-radius: var(--radius-sm);
        font-size: 1.05rem;
        margin-bottom: 0;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .stat-info {
        flex: 1;
        min-width: 0;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .stat-title {
        font-size: 0.82rem;
        font-weight: 800;
        line-height: 1.22;
        color: var(--text-main);
        word-break: break-word;
        white-space: normal;
        margin-bottom: 0.15rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .stat-desc {
        font-size: 0.65rem;
        color: var(--text-muted);
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* 5B. CÂN CHỈNH 2 Ô TRANG CHỦ TRÊN MÀN HÌNH ĐIỆN THOẠI (THÔNG TIN & LINH VẬT) */
    .home-sections-grid {
        display: grid;
        grid-template-columns: 100%;
        gap: 0.85rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .info-card {
        padding: 0.95rem 0.85rem;
        border-radius: var(--radius-md);
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
        overflow: hidden;
    }

    .info-card-header {
        gap: 0.5rem;
        margin-bottom: 0.65rem;
        padding-bottom: 0.55rem;
    }

    .info-card-header h3 {
        font-size: 0.92rem;
        font-weight: 700;
        line-height: 1.35;
        word-break: break-word;
    }

    .info-card-header i {
        font-size: 1rem;
        flex-shrink: 0;
    }

    .info-card-body {
        min-width: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .info-card-body p {
        font-size: 0.82rem;
        line-height: 1.42;
        margin-bottom: 0.5rem;
        word-break: break-word;
    }

    .info-card-body p:last-child {
        margin-bottom: 0;
    }

    .mascot-preview-body {
        display: flex;
        gap: 0.75rem;
        align-items: center;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }

    .mascot-img-wrap {
        width: 76px;
        height: 76px;
        min-width: 76px;
        flex-shrink: 0;
        border-radius: var(--radius-sm);
        padding: 4px;
    }

    .mascot-info-wrap {
        flex: 1;
        min-width: 0;
        overflow: hidden;
    }

    .mascot-info-wrap h4 {
        font-size: 0.84rem;
        font-weight: 700;
        line-height: 1.25;
        margin-bottom: 0.2rem;
        word-break: break-word;
    }

    .mascot-info-wrap p {
        font-size: 0.74rem;
        line-height: 1.32;
        margin-bottom: 0.4rem;
        color: var(--text-muted);
        word-break: break-word;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .mascot-info-wrap .btn {
        padding: 0.32rem 0.6rem;
        font-size: 0.72rem;
    }

    .sport-icons-section {
        margin-top: 0.85rem;
        padding-top: 0.85rem;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }

    .sport-icons-section-title {
        font-size: 0.8rem;
    }

    .sport-icons-reel-wrapper {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
        margin-bottom: 0.45rem;
    }

    .sport-icons-reel {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
        gap: 0.45rem;
        padding: 0.2rem 0.1rem 0.45rem;
    }

    .sport-icon-chip {
        flex: 0 0 66px;
        padding: 0.35rem 0.2rem;
        box-sizing: border-box;
    }

    .sport-icon-img-box {
        width: 42px;
        height: 42px;
        padding: 3px;
    }

    .sport-icon-name {
        font-size: 0.62rem;
        max-width: 62px;
        margin-top: 0.25rem;
    }

    /* 6. TAB LỊCH & ĐỊA ĐIỂM + BẢN ĐỒ */
    .map-card {
        padding: 0.85rem 0.75rem;
        border-radius: var(--radius-md);
        margin-bottom: 1.25rem;
    }

    .map-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.65rem;
        margin-bottom: 0.75rem;
        padding-bottom: 0.65rem;
    }

    .map-header-title {
        gap: 0.6rem;
    }

    .map-icon-badge {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }

    .map-title {
        font-size: 1.05rem;
    }

    .map-subtitle {
        font-size: 0.78rem;
    }

    .map-header-actions {
        width: 100%;
    }

    .map-header-actions .btn {
        width: 100%;
        justify-content: center;
        font-size: 0.82rem;
        padding: 0.45rem 0.75rem;
    }

    .map-presets-bar {
        display: flex;
        align-items: center;
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 0.28rem 0.45rem;
        gap: 0.3rem;
        margin-bottom: 0.35rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .map-presets-bar::-webkit-scrollbar {
        display: none;
    }

    .preset-label {
        font-size: 0.72rem;
        flex-shrink: 0;
    }

    .preset-buttons {
        display: flex;
        flex-wrap: nowrap;
        gap: 0.25rem;
        flex-shrink: 0;
    }

    .btn-map-preset {
        padding: 0.2rem 0.48rem;
        font-size: 0.7rem;
        white-space: nowrap;
        flex-shrink: 0;
        width: auto;
    }

    .map-venues-legend {
        padding: 0.3rem 0.45rem;
        margin-bottom: 0.35rem;
    }

    .legend-header {
        margin-bottom: 0.2rem;
    }

    .legend-title {
        font-size: 0.72rem;
    }

    .legend-hint {
        display: none;
    }

    .map-venues-chips-container {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 0.22rem;
        padding: 0.1rem 0 0.22rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        max-height: none;
    }

    .btn-venue-chip {
        font-size: 0.68rem;
        padding: 0.16rem 0.42rem;
        flex-shrink: 0;
    }

    .main-map-iframe-wrap {
        height: 330px;
    }

    .sub-minimaps-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
        margin-bottom: 0.75rem;
        padding-bottom: 0.65rem;
    }

    .sub-minimaps-title {
        font-size: 1rem;
    }

    .sub-minimaps-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .minimap-iframe-wrap {
        height: 180px;
    }

    .minimap-body {
        padding: 0.75rem;
    }

    .minimap-place-name {
        font-size: 0.95rem;
    }

    .btn-subvenue-chip {
        padding: 0.4rem 0.55rem;
        font-size: 0.75rem;
    }

    .minimap-actions-group {
        flex-direction: column;
        gap: 0.4rem;
    }

    .minimap-actions-group .btn {
        width: 100%;
    }

    /* BỘ LỌC TÌM KIẾM TRƯỢT NGANG (HORIZONTAL SCROLL PILLS) */
    .filter-bar {
        margin-bottom: 1rem;
    }

    .search-box {
        margin-bottom: 0.65rem;
    }

    .search-box input {
        font-size: 0.85rem;
        padding: 0.65rem 0.75rem 0.65rem 2.3rem;
    }

    .category-pills {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 0.35rem;
        gap: 0.35rem;
    }

    .category-pills::-webkit-scrollbar {
        display: none;
    }

    .pill {
        white-space: nowrap;
        flex-shrink: 0;
        font-size: 0.76rem;
        padding: 0.35rem 0.75rem;
    }

    .schedule-sports-grid, .sports-grid {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .sport-card {
        padding: 1rem;
    }

    .sport-card-top {
        gap: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .sport-icon-wrap {
        width: 48px;
        height: 48px;
        padding: 4px;
    }

    .sport-name {
        font-size: 1.05rem;
    }

    .venues-grid {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .venue-card {
        padding: 1rem;
    }

    .section-actions {
        width: 100%;
        margin-top: 0.65rem;
    }

    .view-switch-group {
        display: flex;
        width: 100%;
        padding: 3px;
        gap: 5px;
        box-sizing: border-box;
    }

    .view-switch-btn {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0.5rem 0.35rem;
        gap: 0.4rem;
        text-align: center;
    }

    .view-switch-btn i {
        font-size: 1rem;
        flex-shrink: 0;
    }

    .view-switch-text {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        line-height: 1.25;
    }

    .view-switch-title {
        font-size: 0.78rem;
        font-weight: 700;
        white-space: nowrap;
        letter-spacing: -0.2px;
    }

    .view-switch-count {
        font-size: 0.74rem;
        font-weight: 700;
        margin-top: 0.12rem;
    }

    /* 7. TAB TỔNG SẮP HUY CHƯƠNG TRÊN MOBILE - TẤT CẢ CỘT VỪA KHÍT 100% MÀN HÌNH */
    .th-text-desktop {
        display: none !important;
    }

    .th-text-mobile {
        display: inline !important;
    }

    .medal-table-timestamp {
        font-size: 0.74rem;
        margin: 0.15rem 0 0.35rem;
    }

    .medal-table-wrapper {
        border-radius: var(--radius-sm);
        margin-bottom: 0.75rem;
        overflow-x: hidden; /* Không cần thanh cuộn ngang vì tất cả 6 cột đã nằm trọn vẹn trong màn hình */
        width: 100%;
    }

    .medal-table {
        width: 100% !important;
        min-width: 0 !important;
        table-layout: fixed;
        font-size: 0.74rem;
    }

    .medal-table th, .medal-table td {
        padding: 0.42rem 0.12rem;
        text-align: center;
        vertical-align: middle;
    }

    /* Phân bổ tỷ lệ độ rộng 6 cột chuẩn xác trên điện thoại (Tổng = 100%) */
    .medal-table th.th-rank, 
    .medal-table td.td-rank {
        width: 10%;
        min-width: 0;
        padding-left: 0.2rem;
        padding-right: 0.08rem;
    }

    .medal-table th.th-delegation, 
    .medal-table td.td-delegation {
        width: 40%;
        min-width: 0;
        text-align: left;
        padding-left: 0.25rem;
        padding-right: 0.15rem;
    }

    .medal-table th.th-gold, 
    .medal-table td.td-gold-count {
        width: 12%;
        min-width: 0;
    }

    .medal-table th.th-silver, 
    .medal-table td.td-silver-count {
        width: 12%;
        min-width: 0;
    }

    .medal-table th.th-bronze, 
    .medal-table td.td-bronze-count {
        width: 12%;
        min-width: 0;
    }

    .medal-table th.th-custom-col, 
    .medal-table td.td-custom-col {
        width: 14%;
        min-width: 0;
        padding-right: 0.2rem;
    }

    /* Huy hiệu thứ hạng */
    .rank-badge {
        min-width: 20px;
        width: 20px;
        height: 20px;
        font-size: 0.68rem;
        border-radius: 50%;
        margin: 0 auto;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .rank-badge i {
        display: none !important; /* Ẩn icon trên mobile để số hạng hiển thị rõ ràng nhất */
    }

    /* Tên đoàn gọn gàng, ẩn chú thích dài */
    .delegation-cell {
        display: flex;
        align-items: center;
        gap: 0.25rem;
        overflow: hidden;
    }

    .delegation-code-pill {
        font-size: 0.58rem;
        padding: 0.08rem 0.2rem;
        border-radius: 3px;
        flex-shrink: 0;
    }

    .delegation-cell-text {
        min-width: 0;
        overflow: hidden;
    }

    .delegation-name {
        font-size: 0.74rem;
        line-height: 1.15;
        font-weight: 700;
        display: block;
        word-break: break-word;
        white-space: normal;
    }

    .delegation-sub {
        display: none !important; /* Ẩn chú thích dài trên di động để tất cả các cột nằm đủ trong màn hình */
    }

    /* Các ô số lượng huy chương */
    .medal-count-pill {
        min-width: 20px;
        padding: 0.12rem 0.15rem;
        font-size: 0.72rem;
        font-weight: 700;
        border-radius: 4px;
        display: inline-block;
        text-align: center;
    }

    /* Ô cột cuối (HCV / Tổng) */
    .custom-val-box {
        padding: 0.12rem 0.2rem;
        font-size: 0.74rem;
        font-weight: 800;
        border-radius: 4px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .custom-val-num {
        font-size: 0.74rem;
    }

    .custom-val-unit {
        display: none !important; /* Ẩn chữ HCV / HC ở từng dòng để tiết kiệm diện tích */
    }

    /* Tiêu đề bảng thu gọn trên di động */
    .medal-th-badge {
        padding: 0.12rem 0.2rem;
        font-size: 0.68rem;
        gap: 0.15rem;
    }

    .custom-col-header-wrap {
        font-size: 0.68rem;
        gap: 0.15rem;
        justify-content: center;
    }

    .th-switch-icon {
        font-size: 0.62rem;
    }

    .medal-table-footer-note {
        font-size: 0.72rem;
        padding: 0.45rem 0.65rem;
    }

    /* 8. TAB SỔ TAY CÁ NHÂN */
    .notebook-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .note-form-card, .notebook-favs-card {
        padding: 1rem;
        position: static;
    }

    .notes-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .note-card {
        padding: 0.85rem;
    }

    /* 9. TAB LIÊN HỆ */
    .contacts-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .contact-card {
        padding: 1rem;
    }

    /* 10. MODAL XEM CHI TIẾT & PDF TRÊN MOBILE (TỐI ƯU 100% TOÀN MÀN HÌNH) */
    .modal {
        padding: 0;
    }

    .modal-dialog {
        height: 100dvh;
        max-height: 100dvh;
        width: 100%;
        margin: 0;
        border-radius: 0;
        border: none;
    }

    .modal-dialog.modal-sm {
        height: auto !important;
        max-height: 90vh !important;
        width: 90% !important;
        margin: auto !important;
        border-radius: var(--radius-md) !important;
        border: 1px solid var(--border-color) !important;
    }

    .modal-header {
        padding: 0.55rem 0.85rem;
    }

    .modal-title {
        font-size: 0.98rem;
    }

    .modal-close {
        font-size: 1.5rem;
    }

    .modal-body {
        padding: 0.4rem 0.5rem;
        flex: 1;
        min-height: 0;
    }

    .pdf-modal-info {
        padding: 0.4rem 0.6rem;
        font-size: 0.78rem;
        margin-bottom: 0.35rem;
    }

    .pdf-toolbar {
        padding: 0.35rem 0.5rem;
        gap: 0.3rem;
    }

    .pdf-toolbar .nav-btn-text {
        display: none;
    }

    .btn-pdf-nav {
        padding: 0.22rem 0.42rem;
        font-size: 0.74rem;
    }

    .pdf-page-indicator {
        font-size: 0.75rem;
        margin: 0 0.2rem;
    }

    .pdf-canvas-scroll-wrap {
        padding: 0.5rem 0.25rem;
    }

    .pdf-page-wrap {
        margin: 0 auto 0.75rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    }

    .modal-footer {
        padding: 0.45rem 0.65rem;
        flex-wrap: wrap;
        gap: 0.35rem;
    }

    .modal-footer .btn {
        flex: 1;
        font-size: 0.78rem;
        padding: 0.42rem 0.5rem;
        justify-content: center;
    }

    /* 11. THÔNG BÁO TOAST & NÚT CUỘN LÊN ĐẦU TRANG */
    .toast {
        left: 0.85rem;
        right: 0.85rem;
        bottom: 1.25rem;
        transform: translateY(120%);
        width: auto;
        max-width: calc(100% - 1.7rem);
    }

    .toast.show {
        transform: translateY(0);
    }

    .back-to-top {
        bottom: 1.25rem;
        right: 1.25rem;
        width: 42px;
        height: 42px;
        font-size: 1.05rem;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 1.25rem;
    }

    .footer-col.text-right {
        text-align: center;
    }
}

/* TỐI ƯU HÓA BỔ SUNG CHO MÀN HÌNH NHỎ (DƯỚI 400PX NHƯ IPHONE SE / MINI) */
@media (max-width: 400px) {
    .brand-logo {
        height: 34px;
    }

    .brand-title {
        font-size: 0.78rem;
        line-height: 1.3;
        padding-top: 2px;
    }

    .brand-meta-strip {
        font-size: 0.52rem;
        gap: 0.18rem;
    }

    .brand-meta-item i {
        font-size: 0.5rem;
    }

    .preset-buttons {
        grid-template-columns: 1fr;
    }

    .countdown-num {
        font-size: 1.15rem;
    }

    .countdown-text {
        font-size: 0.6rem;
    }

    .stats-grid {
        gap: 0.45rem;
    }

    .stat-card {
        padding: 0.65rem 0.45rem;
        gap: 0.45rem;
    }

    .stat-icon {
        width: 32px;
        height: 32px;
        min-width: 32px;
        min-height: 32px;
        font-size: 0.95rem;
    }

    .stat-title {
        font-size: 0.76rem;
    }

    .stat-desc {
        font-size: 0.6rem;
    }

    .info-card {
        padding: 0.85rem 0.72rem;
    }

    .info-card-header h3 {
        font-size: 0.88rem;
    }

    .info-card-body p {
        font-size: 0.78rem;
    }

    .mascot-img-wrap {
        width: 68px;
        height: 68px;
        min-width: 68px;
    }
}

/* ==========================================================================
   HỆ THỐNG BIỂU TRƯNG (ICON) CÁC MÔN THỂ THAO
   ========================================================================== */

/* PHẦN ICON TRONG CARD LINH VẬT & BIỂU TRƯNG TRANG CHỦ */
.sport-icons-section {
    margin-top: 1.1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--border-color);
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.sport-icons-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.65rem;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.sport-icons-section-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.btn-text-link {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.45rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    flex-shrink: 0;
}

.btn-text-link:hover {
    color: var(--gold);
    background: rgba(245, 158, 11, 0.1);
}

/* BĂNG TRƯỢT NGANG HIỂN THỊ ICON */
.sport-icons-reel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 0.6rem;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.sport-icons-reel {
    display: flex;
    gap: 0.55rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 0.35rem 0.15rem 0.6rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-light) transparent;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.sport-icons-reel::-webkit-scrollbar {
    height: 4px;
}

.sport-icons-reel::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.reel-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    opacity: 0.85;
}

.reel-nav-btn:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    opacity: 1;
}

.reel-prev { left: -8px; }
.reel-next { right: -8px; }

@media (max-width: 768px) {
    .reel-nav-btn {
        display: none;
    }
}

/* TỪNG CHIP ICON TRONG BĂNG TRƯỢT */
.sport-icon-chip {
    flex: 0 0 76px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.45rem 0.35rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.sport-icon-chip:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
    background: rgba(37, 99, 235, 0.08);
}

.sport-icon-img-box {
    width: 48px;
    height: 48px;
    background: #ffffff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

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

.sport-icon-name {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-main);
    margin-top: 0.35rem;
    line-height: 1.2;
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* THẺ TRONG TAB BỘ NHẬN DIỆN */
.sport-icons-brand-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    cursor: pointer;
}

.brand-preview-mini-icon {
    width: 44px;
    height: 44px;
    background: #ffffff;
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: var(--transition);
}

.brand-preview-mini-icon:hover {
    transform: scale(1.1);
}

/* MODAL DANH SÁCH TOÀN BỘ 57 ICON */
.sport-icons-modal-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.sport-icons-modal-controls .search-box {
    flex: 1;
}

.sport-icons-count {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--gold);
    background: var(--gold-light);
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    white-space: nowrap;
}

.sport-icons-grid-modal {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
    gap: 0.65rem;
    max-height: 60vh;
    overflow-y: auto;
    padding: 0.35rem;
}

.modal-sport-icon-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.modal-sport-icon-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
    background: var(--bg-card-hover);
}

.modal-sport-icon-box {
    width: 52px;
    height: 52px;
    background: #ffffff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.modal-sport-icon-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.modal-sport-icon-card .sport-name {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-main);
    margin-top: 0.4rem;
    line-height: 1.25;
    word-break: break-word;
}

.modal-sport-icon-card .sport-cat {
    font-size: 0.6rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
    display: block;
}

/* MODAL PHÓNG TO ICON */
.zoom-icon-img-wrap {
    width: 180px;
    height: 180px;
    background: #ffffff;
    border-radius: var(--radius-md);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-shadow: var(--shadow-md);
}

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

/* PRINT STYLES */
@media print {
    .main-header, .main-footer, .filter-bar, .note-form-card, .btn, .header-actions {
        display: none !important;
    }
    body {
        background-color: #ffffff !important;
        color: #000000 !important;
    }
    .main-content {
        padding: 0 !important;
        max-width: 100% !important;
    }
    .note-card {
        break-inside: avoid;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
    }
}
