﻿/* ===== CSS VARIABLES ===== */
:root {
    --bg-gradient: linear-gradient(to right, #0d47a1, #1565c0);
    /* Deep Blue Government Theme */
    --text-color: #333;
    --box-bg: rgba(0, 0, 0, 0.8);
    --box-text: #fff;
    --footer-bg: linear-gradient(to right, #0d47a1, #1565c0);
    --highlight-color: #FFD700;
    /* Gold */
    --user-bg: #002171;
    /* Darker blue */
    --logout-bg: #d32f2f;
    /* Red for logout */
    --logout-hover: #b71c1c;
    --select-bg: #fff;
    --select-text: #333;
    --gmail-btn-bg: #4285f4;
    --gmail-btn-hover: #3367d6;
    --transition-speed: 0.3s;
    --border-radius: 5px;
    --box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    --header-height: 56px;
    --footer-height: 170px;
    --content-padding: 10px;
    --modal-bg: rgba(0, 0, 0, 0.7);
    --modal-border: #FFD700;
    --notification-bg: #f8f9fa;
    /* Soft light gray background */
    --notification-text: #333333;
    --menu-bg: rgba(255, 255, 255, 0.05);
    --menu-hover: rgba(255, 255, 255, 0.1);
    --menu-active: rgba(255, 215, 0, 0.2);
    --popup-close-bg: #C84C3C;
    --popup-close-border: #b03a2e;
    --accordion-bg: rgba(0, 0, 0, 0.7);
    --accordion-hover: rgba(0, 0, 0, 0.8);
    --accordion-text: #fff;
    --accordion-icon-color: #FFD700;
    --accordion-border: #FFD700;
}

body.dark-mode {
    --bg-gradient: linear-gradient(to right, #121212, #333333);
    --text-color: #ddd;
    --box-bg: rgba(255, 255, 255, 0.1);
    --box-text: #ddd;
    --footer-bg: linear-gradient(to right, #121212, #333333);
    --highlight-color: #FFD700;
    --user-bg: #DAA520;
    --logout-bg: #a52a2a;
    --logout-hover: #8b1a1a;
    --select-bg: #333;
    --select-text: #ddd;
    --modal-bg: rgba(0, 0, 0, 0.8);
    --notification-bg: #0047AB;
    --notification-text: #FFFFFF;
    --menu-bg: rgba(255, 255, 255, 0.05);
    --menu-hover: rgba(255, 255, 255, 0.1);
    --menu-active: rgba(255, 215, 0, 0.2);
    --accordion-bg: rgba(255, 255, 255, 0.1);
    --accordion-hover: rgba(255, 255, 255, 0.2);
    --accordion-text: #ddd;
    --accordion-icon-color: #FFD700;
    --accordion-border: #FFD700;
}

/* ===== GLOBAL STYLES ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Times New Roman", serif;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    background: var(--bg-gradient);
    color: var(--text-color);
    transition: background var(--transition-speed);
}

/* ===== LOADING INDICATOR ===== */
.loading-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    display: none;
}

.loading-spinner {
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 5px solid var(--highlight-color);
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ===== LOGIN CONTAINER ===== */
.login-container {
    display: none;
    align-items: center;
    justify-content: center;
    height: 100vh;
    width: 100vw;
    background-image: url('../images/loginimage.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: fixed;
    top: 0;
    left: 0;
    padding: 20px;
    max-width: none;
    margin: 0;
}


.intro-video-btn {
    position: absolute;
    top: -50px;
    right: 0px;
    background: linear-gradient(135deg, rgba(200, 76, 60, 1), rgba(176, 58, 46, 1));
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 5000;
    /* Extremely high z-index */
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    white-space: nowrap;
}

.intro-video-btn:hover {
    transform: translateY(-3px) scale(1.02);
    background: linear-gradient(135deg, #C84C3C, #b03a2e);
    box-shadow: 0 8px 25px rgba(200, 76, 60, 0.5);
    border-color: rgba(255, 255, 255, 0.4);
}

.intro-video-btn:active {
    transform: translateY(-1px);
}

.intro-video-btn i {
    font-size: 1.2rem;
    color: #FFD700;
    /* Gold icon */
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.4));
}

@media (max-width: 768px) {
    .intro-video-btn {
        top: -50px;
        right: 15px;
        padding: 8px 16px;
        font-size: 0.85rem;
    }
}

.login-box {
    position: relative;
    /* Anchor for intro-video-btn */
    background: rgba(30, 30, 30, 0.65);
    padding: 28px 35px;
    border-radius: 12px;
    text-align: center;
    color: #ffffff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    width: 100%;
    max-width: 580px;
    animation: fadeIn 0.5s ease;
    backdrop-filter: blur(6px);
}

/* Login Header với logo và tiêu đề */
.login-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.login-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 8px;
    flex-shrink: 0;
}

.login-title {
    text-align: center;
}

.login-title h2 {
    margin: 0;
    font-size: 1.15rem;
    color: #ffffff;
    line-height: 1.35;
    text-align: center;
}

.login-subtitle {
    color: #FFD700;
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 8px;
}

.login-box h2 {
    margin-bottom: 12px;
    font-size: 1.4rem;
    color: #ffffff;
}

/* Responsive cho login box */
@media (max-width: 768px) {
    .login-box {
        width: 95%;
        max-width: 600px;
        /* Tăng thêm cho tablet */
        min-width: 320px;
        padding: 25px 18px;
    }

    .login-header {
        flex-direction: column;
        gap: 10px;
    }

    .login-logo {
        width: 60px;
        height: 60px;
    }

    .login-title h2 {
        font-size: 0.95rem;
        line-height: 1.3;
    }

    .login-subtitle {
        font-size: 0.95rem;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Cấu trúc cho input group */
.input-group {
    position: relative;
    margin: 12px 0;
    width: 75%;
    margin-left: auto;
    margin-right: auto;
}

/* Icon bên trái (cho ID và Mật khẩu) */
.input-icon {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    z-index: 1;
}

/* Icon mắt bên phải (chỉ cho mật khẩu) */
.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    cursor: pointer;
    z-index: 1;
}

/* Style chung cho các ô input */
.login-box input {
    width: 100%;
    padding: 12px 35px 12px 35px;
    margin: 0.25px auto;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--border-radius);
    font-size: 16px;
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    transition: all var(--transition-speed);
    display: block;
}

.login-box input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.login-box input:focus {
    outline: none;
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.login-box button:not(.google-signin-btn) {
    padding: 12px 10px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 13px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: #fff;
    cursor: pointer;
    transition: all var(--transition-speed);
    margin-top: 8px;
    width: 46%;
    margin-left: auto;
    margin-right: auto;
    display: block;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    white-space: nowrap;
}

.login-box button:not(.google-signin-btn):hover {
    background: linear-gradient(135deg, #45a049, #3d8b40);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.divider {
    display: flex;
    align-items: center;
    margin: 15px 0;
    width: 46%;
    margin-left: auto;
    margin-right: auto;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.divider span {
    padding: 0 10px;
    color: var(--box-text);
}

.google-signin-btn {
    width: 46%;
    padding: 12px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    background-color: transparent;
    color: #fff;
    cursor: pointer;
    transition: all var(--transition-speed);
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
}

.google-signin-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.google-icon {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    filter: brightness(0) invert(1);
}

/* Mobile responsive for Google button */
@media (max-width: 768px) {
    .google-signin-btn {
        width: 75%;
        max-width: 260px;
        font-size: 10px;
        padding: 10px 4px;
        white-space: nowrap;
        margin-left: auto;
        margin-right: auto;
    }

    .google-icon {
        width: 13px;
        height: 13px;
        margin-right: 3px;
    }
}

/* PWA Standalone Mode - Extra conservative */
@media (display-mode: standalone) and (max-width: 768px) {
    .login-box {
        width: 88%;
        max-width: 360px;
        min-width: 310px;
        padding: 20px 15px;
    }

    .google-signin-btn {
        width: 75%;
        max-width: 260px;
        font-size: 10px;
        padding: 10px 4px;
    }

    .google-icon {
        width: 13px;
        height: 13px;
        margin-right: 3px;
    }
}



.remember-me-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-top: 10px;
    white-space: nowrap;
    width: 46%;
    margin-left: auto;
    margin-right: auto;
}

.remember-me-container input {
    width: auto;
    margin-right: 5px;
}

.remember-me-container label {
    color: var(--box-text);
}

.login-message {
    color: #ff6b6b;
    font-size: 14px;
    margin-top: 10px;
    padding: 8px;
    border-radius: var(--border-radius);
    background-color: rgba(255, 107, 107, 0.1);
}

/* ===== CHECKBOX STYLES FOR LOGIN FORM ===== */
.checkbox-container {
    display: flex;
    flex-direction: row;
    gap: 15px;
    margin-bottom: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.checkbox-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
}

.checkbox-item input[type="checkbox"] {
    margin: 0;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    order: 0;
    cursor: pointer;
}

.checkbox-item label {
    margin: 0;
    font-size: 13px;
    cursor: pointer;
    order: 1;
}

@media (max-width: 480px) {
    .checkbox-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding-left: 15%;
    }

    .checkbox-item {
        gap: 8px;
    }

    .checkbox-item input[type="checkbox"] {
        width: 18px;
        height: 18px;
    }
}

/* ===== PROTECTED CONTENT ===== */
.protected-content {
    display: none;
    flex-direction: column;
    height: 100vh;
    background: var(--bg-gradient);
    padding: var(--content-padding);
    position: relative;
}

/* ===== HEADER ===== */
.header {
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    margin-bottom: 5px;
    margin-top: 0;
}

h1 {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--highlight-color);
    text-align: left;
    margin-top: 0;
    padding-top: 0;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-info {
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    background-color: var(--user-bg);
    padding: 8px 15px;
    border: 2px solid #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ===== UNIFIED HEADER BUTTON STYLES ===== */
.logout-button,
.admin-button,
.profile-button {
    background-color: var(--logout-bg);
    color: #fff;
    padding: 8px 15px;
    border: 2px solid #fff;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all var(--transition-speed);
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: center;
    gap: 5px;
}

.logout-button:hover,
.admin-button:hover,
.profile-button:hover {
    background-color: var(--logout-hover);
    transform: translateY(-2px);
}

/* ===== SPECIFIC OVERRIDES FOR HEADER BUTTONS ===== */
.admin-button {
    background-color: #6c757d;
    display: none;
}

/* ===== HEADER CONTROLS (OTHER ELEMENTS) ===== */
.theme-toggle,
.notification-container {
    cursor: pointer;
    font-size: 20px;
    color: var(--box-text);
    padding: 8px;
    border-radius: 50%;
    transition: all var(--transition-speed);
    position: relative;
}

.theme-toggle:hover,
.notification-container:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: red;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
    min-width: 18px;
    text-align: center;
}

/* ===== MAIN CONTENT ===== */
.content-container {
    display: flex;
    flex: 1;
    overflow: hidden;
    margin-bottom: 5px;
    gap: 10px;
}

.left-menu,
.right-menu {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    /* tăng không gian cho nội dung chính trên desktop */
    height: calc(100vh - var(--header-height) - var(--footer-height) - 40px);
}

.menu-wrapper {
    background-color: var(--box-bg);
    color: var(--box-text);
    border-radius: var(--border-radius);
    padding: 10px;
    box-shadow: var(--box-shadow);
    height: 100%;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--highlight-color) var(--box-bg);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.right-menu .menu-wrapper {
    animation-delay: 0.2s;
}

/* Custom scrollbar for webkit browsers */
.menu-wrapper::-webkit-scrollbar {
    width: 6px;
}

.menu-wrapper::-webkit-scrollbar-track {
    background: var(--box-bg);
}

.menu-wrapper::-webkit-scrollbar-thumb {
    background-color: var(--highlight-color);
    border-radius: 3px;
}

.menu-wrapper::-webkit-scrollbar-thumb:hover {
    background-color: #FFC107;
}

/* ===== ACCORDION MENU STYLES ===== */
.menu-section {
    margin-bottom: 10px;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--accordion-bg);
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    animation: menuSlideIn 0.5s ease forwards;
    opacity: 0;
    border-left: 3px solid transparent;
}

.menu-section:nth-child(1) {
    animation-delay: 0.1s;
}

.menu-section:nth-child(2) {
    animation-delay: 0.2s;
}

.menu-section:nth-child(3) {
    animation-delay: 0.3s;
}

.menu-section:nth-child(4) {
    animation-delay: 0.4s;
}

.menu-section:nth-child(5) {
    animation-delay: 0.5s;
}

.menu-section:nth-child(6) {
    animation-delay: 0.6s;
}

@keyframes menuSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.menu-section:hover {
    background: var(--accordion-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border-left-color: var(--accordion-border);
}

.menu-header {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.menu-header:hover {
    background: var(--accordion-hover);
    border-left-color: var(--accordion-border);
}

.menu-icon {
    margin-right: 10px;
    color: var(--accordion-icon-color);
    font-size: 18px;
}

.menu-title {
    flex: 1;
    font-weight: bold;
    color: var(--accordion-text);
}

.menu-arrow {
    transition: transform 0.3s ease;
    color: var(--accordion-text);
}

.menu-section.active .menu-arrow {
    transform: rotate(180deg);
}

.menu-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(0, 0, 0, 0.1);
}

.menu-section.active .menu-content {
    max-height: 500px;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 10px 15px 10px 35px;
    color: var(--accordion-text);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    position: relative;
    overflow: hidden;
}

.menu-item:hover {
    background: var(--accordion-hover);
    border-left-color: var(--accordion-border);
    transform: translateX(5px);
}

.menu-item i {
    margin-right: 10px;
    font-size: 16px;
    color: var(--accordion-icon-color);
}

/* ===== MICRO-INTERACTIONS ===== */
.menu-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--accordion-border);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.menu-item:hover::before {
    transform: scaleY(1);
}

/* Ripple effect */
.menu-item::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.menu-item:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }

    20% {
        transform: scale(25, 25);
        opacity: 0.3;
    }

    100% {
        opacity: 0;
        transform: scale(40, 40);
    }
}

/* Loading effect for menu items */
.menu-item.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* ===== FOOTER ===== */
.footer {
    width: 100%;
    height: var(--footer-height);
    display: flex;
    overflow: hidden;
}

.footer-image {
    width: calc(100% - 200px);
    overflow: hidden;
    margin-left: 10px;
}

.footer-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-scroll-container {
    width: 200px;
    height: 100%;
    background: var(--footer-bg);
    color: var(--box-text);
    overflow: hidden;
    position: relative;
}

.user-scroll-title {
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    margin: 5px 0;
    color: var(--highlight-color);
}

.user-scroll {
    position: absolute;
    bottom: 0;
    width: 100%;
    animation: scrollUp 20s linear infinite;
}

.user-scroll p {
    margin: 10px;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

.user-scroll p.fade-out {
    opacity: 0;
}

@keyframes scrollUp {
    0% {
        transform: translateY(100%);
    }

    80% {
        transform: translateY(10%);
        opacity: 1;
    }

    100% {
        transform: translateY(0);
        opacity: 0;
    }
}

/* ===== FULL SCREEN POPUP ===== */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 2000;
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(8px);
    /* Modern glass effect */
    -webkit-backdrop-filter: blur(8px);
}

.popup {
    position: fixed;
    top: 0;
    left: 0;
    transform: none;
    width: 100%;
    /* Responsive width */
    max-width: 100%;
    /* Max width */
    height: 100vh;
    /* Full height */
    background: transparent;
    z-index: 1001;
    overflow: hidden;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    animation: zoomIn 0.3s ease;
    box-shadow: none;
    /* transition: height 0.3s ease; REMOVED transition */
}

@keyframes zoomIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.popup-close {
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;
    height: 40px;
    font-size: 20px;
    font-weight: normal;
    background: var(--popup-close-bg);
    border: none;
    color: white;
    z-index: 1002;
    transition: all var(--transition-speed);
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-close:hover {
    transform: scale(1.1);
    background-color: #b03a2e;
}

/* ===== BACK BUTTON FOR POPUP ===== */
.popup-back-button {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--highlight-color);
    color: var(--box-bg);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    z-index: 1002;
    transition: all var(--transition-speed);
    display: none;
    align-items: center;
    justify-content: center;
}

.popup-back-button:hover {
    transform: scale(1.1);
    background-color: #FFC107;
}

.popup-content {
    flex: 1;
    overflow: auto;
    padding: 0;
    /* padding: 12px 16px; - kept 0 to avoid double padding */
    height: 100%;
    background-color: #ffffff;
    border: 1px solid #ccc;
}

.popup iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    display: block;
    /* Remove inline-block gaps */
}

/* ===== VIDEO OVERLAY ===== */
.video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.intro-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ===== ASSISTANT ===== */
.assistant-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.assistant-icon {
    width: 90px;
    height: auto;
    cursor: pointer;
    animation: bounce 2s infinite;
    transition: transform var(--transition-speed);
    object-fit: contain;
}

.assistant-icon:hover {
    transform: scale(1.1);
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* ===== ERROR MESSAGE ===== */
.error-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(220, 53, 69, 0.9);
    color: white;
    padding: 15px 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    z-index: 9999;
    display: none;
    max-width: 80%;
    animation: slideDown 0.3s ease;
}

.error-title {
    font-weight: bold;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.error-message {
    margin-bottom: 10px;
}

.error-suggestion {
    font-style: italic;
    font-size: 0.9em;
}

.error-close {
    position: absolute;
    top: 5px;
    right: 10px;
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
}

/* ===== NOTIFICATION MODAL ===== */
.notification-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--modal-bg);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.notification-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    background: var(--notification-bg);
    color: var(--notification-text);
    border: 2px solid var(--modal-border);
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    overflow: hidden;
    animation: slideIn 0.3s ease;
    display: flex;
    flex-direction: column;
}

.notification-modal-header {
    padding: 15px;
    background: var(--modal-border);
    color: var(--box-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-modal-title {
    font-size: 18px;
    font-weight: bold;
}

.notification-modal-close {
    width: 30px;
    height: 30px;
    font-size: 16px;
    font-weight: normal;
    background: var(--popup-close-bg);
    border: none;
    color: white;
    z-index: 1001;
}

.notification-modal-close:hover {
    transform: scale(1.1);
    background-color: #b02a37;
}

.notification-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.notification-tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: background-color var(--transition-speed);
    border-bottom: 3px solid transparent;
}

.notification-tab.active {
    background-color: rgba(0, 0, 0, 0.05);
    border-bottom-color: #28a745;
    color: #28a745;
    font-weight: bold;
}

.notification-tab:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.notification-modal-body {
    padding: 15px;
    overflow-y: auto;
    flex: 1;
    max-height: calc(85vh - 200px);
}

.notification-tab-content {
    display: none;
}

.notification-tab-content.active {
    display: block;
}

.notification-item {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    transition: background-color var(--transition-speed);
    margin-bottom: 10px;
    border-radius: var(--border-radius);
}

.notification-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-content {
    flex: 1;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.notification-sender {
    font-weight: bold;
}

.notification-time {
    font-size: 0.8em;
    opacity: 0.7;
}

.notification-message {
    margin-bottom: 5px;
}

.notification-item.read {
    opacity: 0.6;
}

.notification-actions {
    display: flex;
    gap: 5px;
    margin-top: 10px;
}

.notification-modal-footer {
    padding: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification-form {
    display: flex;
    gap: 10px;
}

.notification-form input {
    flex: 1;
    padding: 8px;
    border: 1px solid #28a745;
    border-radius: var(--border-radius);
    background-color: #ffffff;
    color: var(--notification-text);
}

.notification-form select {
    padding: 8px;
    border: 1px solid #28a745;
    border-radius: var(--border-radius);
    background-color: #ffffff;
    color: var(--notification-text);
    width: auto;
    min-width: 120px;
}

.notification-form button {
    padding: 8px 15px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-speed);
}

.notification-form button:hover {
    background: #218838;
}

.notification-actions-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.read-button,
.delete-button,
.delete-all-button,
.edit-button {
    background: #007bff;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-speed);
}

.read-button:hover,
.delete-button:hover,
.delete-all-button:hover,
.edit-button:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

.delete-button,
.delete-all-button {
    background: #dc3545;
}

.edit-button {
    background: #ffc107;
    color: #333;
}

/* ===== NOTIFICATION TICKER ===== */
.notification-ticker-container {
    position: relative;
    width: 100%;
    height: 30px;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.5);
    margin-bottom: 5px;
    margin-top: 0;
    border-radius: var(--border-radius);
}

.notification-ticker {
    position: absolute;
    white-space: nowrap;
    animation: ticker 30s linear infinite;
    padding: 5px 0;
    width: 100%;
}

.notification-ticker-content {
    display: inline-block;
    padding-right: 100%;
    color: var(--highlight-color);
    font-weight: bold;
}

@keyframes ticker {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* ===== EDIT NOTIFICATION MODAL ===== */
.edit-notification-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--modal-bg);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.edit-notification-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
    background: var(--notification-bg);
    color: var(--notification-text);
    border: 2px solid var(--modal-border);
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    overflow: hidden;
    animation: slideIn 0.3s ease;
    display: flex;
    flex-direction: column;
}

.edit-notification-header {
    padding: 15px;
    background: var(--modal-border);
    color: var(--box-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.edit-notification-title {
    font-size: 18px;
    font-weight: bold;
}

.edit-notification-close {
    width: 30px;
    height: 30px;
    font-size: 16px;
    font-weight: normal;
    background: var(--popup-close-bg);
    border: none;
    color: white;
    z-index: 1001;
    transition: all var(--transition-speed);
    display: flex;
    align-items: center;
    justify-content: center;
}

.edit-notification-close:hover {
    transform: scale(1.1);
    background-color: #b02a37;
}

.edit-notification-body {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.edit-notification-body textarea {
    width: 100%;
    min-height: 100px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--notification-text);
    resize: vertical;
}

.edit-notification-footer {
    padding: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.save-button,
.cancel-button {
    padding: 8px 15px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-speed);
}

.save-button {
    background: #28a745;
    color: white;
}

.save-button:hover {
    background: #218838;
}

.cancel-button {
    background: #6c757d;
    color: white;
}

.cancel-button:hover {
    background: #5a6268;
}

/* ===== NOTIFICATION TOAST ===== */
.notification-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
}

.notification-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.notification-success {
    background-color: rgba(40, 167, 69, 0.9);
}

.notification-error {
    background-color: rgba(220, 53, 69, 0.9);
}

.notification-warning {
    background-color: rgba(255, 193, 7, 0.9);
}

.notification-info {
    background-color: rgba(23, 162, 184, 0.9);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .notification-modal {
        width: 95%;
        max-width: none;
    }

    /* ===== MOBILE HEADER LAYOUT ===== */
    /* Header fixed ở trên cùng */
    .header {
        position: fixed !important;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        display: flex !important;
        flex-direction: row !important;
        align-items: center;
        justify-content: space-between;
        padding: 0 10px;
        height: 55px;
        background: var(--header-bg, #5D4E37);
    }

    /* Hamburger menu - sát mép trái */
    .mobile-menu-toggle {
        display: flex !important;
        order: 1;
        flex-shrink: 0;
        background: none;
        border: none;
        color: #fff;
        font-size: 22px;
        cursor: pointer;
        padding: 8px;
    }

    /* Logo + tiêu đề - căn giữa */
    .header-title {
        order: 2;
        flex: 1;
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    .header-title .header-logo {
        height: 35px;
        width: auto;
    }

    .header-title h1,
    .header h1 {
        font-size: 11px !important;
        line-height: 1.3;
        text-align: center;
        margin: 0;
        padding: 0;
        max-width: 160px;
        color: #fff;
    }

    /* Controls - bên phải */
    .header-controls {
        order: 3;
        display: flex !important;
        flex-direction: row !important;
        align-items: center;
        gap: 5px;
        flex-shrink: 0;
        width: auto !important;
    }

    /* Ẩn nút fullscreen trên mobile */
    .btn-fullscreen,
    .header-btn.btn-fullscreen,
    #fullscreenToggle {
        display: none !important;
    }

    /* Hiển thị theme toggle và notification */
    .btn-theme,
    .btn-notification {
        display: flex !important;
        padding: 6px 8px;
    }

    /* Ẩn text trong các nút, chỉ hiển icon */
    .header-btn span {
        display: none;
    }

    /* Ẩn user info trên mobile */
    .user-info {
        display: none !important;
    }

    /* Fix nội dung bị che bởi header fixed - không còn khoảng trống */
    .protected-content {
        padding-top: 0 !important;
    }

    .main-content {
        margin-top: 0;
        padding-top: 55px;
    }

    .notification-ticker-container {
        margin-top: 0;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 50px;
        --footer-height: 60px;
        --content-padding: 10px;
    }

    /* Header nhỏ hơn trên tablet */
    .header {
        height: 50px !important;
    }

    .header-title h1,
    .header h1 {
        font-size: 10px !important;
        max-width: 140px;
    }

    .header-title .header-logo {
        height: 30px;
    }

    .header-controls {
        gap: 4px;
    }

    .header-btn {
        padding: 5px 7px;
        font-size: 12px;
    }

    .user-info,
    .logout-button,
    .admin-button,
    .profile-button {
        font-size: 12px;
        padding: 5px 8px;
    }

    .theme-toggle,
    .notification-container {
        font-size: 16px;
    }

    /* Fix padding cho nội dung */
    .protected-content {
        padding-top: 0 !important;
    }

    .main-content {
        padding-top: 50px;
    }

    .content-container {
        flex-direction: column;
        gap: 5px;
    }

    .left-menu,
    .right-menu {
        height: 300px;
    }

    .menu-wrapper {
        padding: 8px;
    }

    .menu-header {
        padding: 10px;
    }

    .menu-item {
        padding: 8px 10px 8px 25px;
    }

    .menu-icon {
        font-size: 16px;
    }

    .menu-title {
        font-size: 14px;
    }

    .footer {
        flex-direction: column;
        height: auto;
    }

    .footer-image {
        width: 100%;
        height: 120px;
        margin-left: 0;
    }

    .user-scroll-container {
        width: 100%;
        height: 60px;
    }

    .user-scroll {
        animation: none;
        position: relative;
        overflow-y: auto;
        height: 100%;
    }

    .notification-modal {
        width: 95%;
        max-height: 90vh;
    }

    .notification-form {
        flex-direction: column;
    }

    .assistant-container {
        bottom: 10px;
        right: 10px;
    }

    .assistant-icon {
        width: 50px;
        height: 50px;
    }

    .popup-content {
        padding: 0;
    }

    .popup-close {
        top: 0;
        right: 0;
        width: 35px;
        height: 35px;
        font-size: 18px;
    }

    .video-overlay {
        display: none;
    }

    .notification-ticker-container {
        height: 25px;
    }

    .notification-ticker-content {
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {

    /* Header nhỏ nhất trên điện thoại */
    .header {
        height: 48px !important;
        padding: 0 8px;
    }

    .header-title h1,
    .header h1 {
        font-size: 9px !important;
        max-width: 110px;
        line-height: 1.2;
    }

    .header-title .header-logo {
        height: 26px;
    }

    .mobile-menu-toggle {
        font-size: 20px;
        padding: 6px;
    }

    .header-controls {
        gap: 3px;
    }

    .header-btn {
        padding: 4px 6px;
        font-size: 11px;
    }

    .btn-theme,
    .btn-notification {
        padding: 5px 6px;
    }

    .btn-theme i,
    .btn-notification i {
        font-size: 14px;
    }

    /* Ẩn nút admin và logout text */
    .btn-admin,
    .btn-logout {
        padding: 4px 6px;
    }

    /* Fix padding */
    .protected-content {
        padding-top: 0 !important;
    }

    .main-content {
        padding-top: 48px;
    }

    .notification-modal {
        width: 98%;
    }

    .login-box {
        max-width: 95%;
    }

    .notification-tabs {
        font-size: 0.9em;
    }

    .notification-tab {
        padding: 8px 5px;
    }
}

/* ===== TOUCH GESTURES ===== */
.touch-enabled {
    touch-action: pan-y;
}

.swipe-hint {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: var(--border-radius);
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.swipe-hint.show {
    opacity: 1;
}

/* Thêm vào file styles.css */
.notification-item.read {
    opacity: 0.7;
    background-color: #f9f9f9;
}

.notification-item.read .notification-message {
    color: #666;
}

.priority-high {
    color: #ff5722;
    font-weight: bold;
}

.priority-normal {
    color: #4CAF50;
}

/* ===== ACCORDION ANIMATIONS ===== */
.accordion-animation {
    animation: accordionSlideIn 0.5s ease forwards;
}

@keyframes accordionSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== DARK MODE ACCORDION ===== */
body.dark-mode .menu-section {
    background: var(--accordion-bg);
}

body.dark-mode .menu-section:hover {
    background: var(--accordion-hover);
}

body.dark-mode .menu-header:hover {
    background: var(--accordion-hover);
}

body.dark-mode .menu-item {
    color: var(--accordion-text);
}

body.dark-mode .menu-item:hover {
    background: var(--accordion-hover);
}

body.dark-mode .menu-item i {
    color: var(--accordion-icon-color);
}

body.dark-mode .menu-title {
    color: var(--accordion-text);
}

body.dark-mode .menu-arrow {
    color: var(--accordion-text);
}

/* ===== MODERN TAB SYSTEM ===== */
.main-tabs-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 8px 12px;
    /* Giảm mạnh từ 12px 16px xuống 8px 12px */
    margin-bottom: 6px;
    /* Giảm từ 10px xuống 6px */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    overflow: visible;
    /* Không tạo scrollbar */
}

.main-tabs-nav {
    display: flex;
    gap: 10px;
    /* Giảm từ 12px xuống 10px */
    margin-bottom: 8px;
    /* Giảm từ 12px xuống 8px */
    background: linear-gradient(135deg, rgba(50, 50, 50, 0.4) 0%, rgba(30, 30, 30, 0.4) 100%);
    padding: 6px;
    /* Giảm từ 8px xuống 6px */
    border-radius: 10px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.2);
}

.main-tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    /* Giảm từ 8px xuống 6px */
    padding: 10px 16px;
    /* Giảm từ 12px 20px xuống 10px 16px */
    /* Tab chưa chọn - Màu xám đậm */
    background: linear-gradient(135deg, #6B7280 0%, #4B5563 100%);
    border: 2px solid #9CA3AF;
    border-radius: 8px;
    color: #E5E7EB;
    font-size: 14px;
    /* Giảm từ 16px xuống 14px */
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.main-tab-btn i {
    font-size: 16px;
    /* Giảm từ 20px xuống 16px */
    transition: transform 0.3s ease;
}

.main-tab-btn span:not(.tab-badge) {
    white-space: nowrap;
    font-weight: 700;
}

.main-tab-btn:hover {
    background: linear-gradient(135deg, #7C8A99 0%, #5B6875 100%);
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.main-tab-btn:hover i {
    transform: scale(1.15);
}

/* Tab đang chọn - Màu vàng sáng rõ ràng */
.main-tab-btn.active {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #1E3A8A;
    border-color: #FFD700;
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
    transform: translateY(-3px);
}

.main-tab-btn.active::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    /* Giảm từ 4px xuống 3px */
    background: linear-gradient(90deg, transparent, #1E3A8A, transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.tab-badge {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    color: white;
    padding: 2px 8px;
    /* Giảm từ 3px 10px xuống 2px 8px */
    border-radius: 12px;
    font-size: 11px;
    /* Giảm từ 12px xuống 11px */
    font-weight: 800;
    min-width: 20px;
    /* Giảm từ 24px xuống 20px */
    text-align: center;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

.main-tab-btn.active .tab-badge {
    background: linear-gradient(135deg, #1E3A8A 0%, #1E40AF 100%);
    color: #FFFFFF;
}

.main-tabs-content {
    position: relative;
    min-height: auto;
    /* Không giới hạn chiều cao */
    overflow: visible;
    /* Không tạo scrollbar */
}

.main-tab-panel {
    display: none;
    animation: fadeInTab 0.4s ease;
}

.main-tab-panel.active {
    display: block;
}

@keyframes fadeInTab {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tab-panel-header {
    margin-bottom: 8px;
    /* Giảm từ 12px xuống 8px */
    padding-bottom: 6px;
    /* Giảm từ 8px xuống 6px */
    border-bottom: 2px solid rgba(0, 188, 212, 0.5);
    /* Cyan border */
}

.tab-panel-title {
    color: #00BCD4;
    /* Cyan - Xanh nước biển */
    font-size: 1.2rem;
    /* Giảm từ 1.5rem xuống 1.2rem */
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    /* Giảm từ 10px xuống 8px */
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.tab-panel-title i {
    font-size: 1.1rem;
    /* Giảm từ 1.4rem xuống 1.1rem */
    color: #00BCD4;
    /* Cyan icon */
}

/* Giảm khoảng cách giữa các hàng trong tab */
.main-tab-panel .stats-row {
    gap: 6px;
    /* Giảm từ 8px xuống 6px */
    margin-bottom: 6px;
    /* Giảm từ 8px xuống 6px */
}

.main-tab-panel .quick-access-grid {
    gap: 8px;
    /* Giảm từ 10px xuống 8px */
    margin-bottom: 6px;
    /* Giảm từ 8px xuống 6px */
}

/* Tăng kích cỡ các stat cards - ICON TOP-LEFT */
.main-tab-panel .stats-row .stat-card {
    min-height: 100px;
    padding: 12px;
    /* Layout với icon ở góc trên trái */
    position: relative;
    /* Để icon có thể absolute position */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 4px;
    /* Khoảng cách giữa số và text */
}

.main-tab-panel .stats-row .stat-card .stat-icon {
    /* Icon nhỏ ở góc trên trái */
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 18px;
    /* Thu nhỏ từ 32px xuống 18px */
    width: 32px;
    /* Thu nhỏ từ 50px xuống 32px */
    height: 32px;
    margin: 0;
}

.main-tab-panel .stats-row .stat-card .stat-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    /* Khoảng cách nhỏ giữa số và text */
    width: 100%;
    margin-top: 8px;
    /* Đẩy xuống một chút để tránh icon */
}

.main-tab-panel .stats-row .stat-card .stat-info h3 {
    font-size: 1.8rem;
    /* Tăng từ 1.6rem lên 1.8rem vì có nhiều không gian hơn */
    font-weight: 800;
    margin: 0;
    line-height: 1;
}

.main-tab-panel .stats-row .stat-card .stat-info p {
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.2;
}

/* Tăng kích cỡ quick cards */
.quick-access-grid .quick-card {
    min-height: 110px;
    /* Giảm mạnh từ 145px xuống 110px */
    padding: 12px;
    /* Giảm từ 16px xuống 12px */
}

.quick-access-grid .quick-card-icon {
    font-size: 24px;
    /* Giảm từ 30px xuống 24px */
}

.quick-access-grid .quick-card-title {
    font-size: 0.95rem;
    /* Giảm từ 1.05rem xuống 0.95rem */
    font-weight: 700;
    line-height: 1.2;
    /* Giảm từ 1.3 xuống 1.2 */
}

.quick-access-grid .quick-card-desc {
    font-size: 0.8rem;
    /* Giảm từ 0.9rem xuống 0.8rem */
    line-height: 1.3;
    /* Giảm từ 1.5 xuống 1.3 */
}

/* AI Icon - Beautiful Gradient */
.quick-card-icon.ai-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%) !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    animation: ai-glow 3s ease-in-out infinite;
}

.quick-card-icon.ai-icon i {
    color: #ffffff;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

@keyframes ai-glow {

    0%,
    100% {
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    }

    50% {
        box-shadow: 0 4px 20px rgba(118, 75, 162, 0.6);
    }
}

/* Override brown background - Ensure proper colors for quick card icons in tabs */
.main-tab-panel .quick-card.type-1 .quick-card-icon {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 50%, #0D47A1 100%) !important;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4), inset 0 -2px 6px rgba(0, 0, 0, 0.2);
}

.main-tab-panel .quick-card.type-2 .quick-card-icon {
    background: linear-gradient(135deg, #4CAF50 0%, #388E3C 50%, #1B5E20 100%) !important;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4), inset 0 -2px 6px rgba(0, 0, 0, 0.2);
}

.main-tab-panel .quick-card.type-3 .quick-card-icon {
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 50%, #E65100 100%) !important;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.4), inset 0 -2px 6px rgba(0, 0, 0, 0.2);
}

.main-tab-panel .quick-card.type-4 .quick-card-icon {
    background: linear-gradient(135deg, #9C27B0 0%, #7B1FA2 50%, #4A148C 100%) !important;
    box-shadow: 0 4px 12px rgba(156, 39, 176, 0.4), inset 0 -2px 6px rgba(0, 0, 0, 0.2);
}

.main-tab-panel .quick-card.type-5 .quick-card-icon {
    background: linear-gradient(135deg, #F44336 0%, #D32F2F 50%, #B71C1C 100%) !important;
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4), inset 0 -2px 6px rgba(0, 0, 0, 0.2);
}

.main-tab-panel .quick-card.type-6 .quick-card-icon {
    background: linear-gradient(135deg, #00BCD4 0%, #0097A7 50%, #006064 100%) !important;
    box-shadow: 0 4px 12px rgba(0, 188, 212, 0.4), inset 0 -2px 6px rgba(0, 0, 0, 0.2);
}

.main-tab-panel .quick-card.type-7 .quick-card-icon {
    background: linear-gradient(135deg, #FF5722 0%, #E64A19 50%, #BF360C 100%) !important;
    box-shadow: 0 4px 12px rgba(255, 87, 34, 0.4), inset 0 -2px 6px rgba(0, 0, 0, 0.2);
}

/* Ensure white icon color with 3D effect */
.main-tab-panel .quick-card-icon i {
    color: #ffffff !important;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.3));
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* Dark mode support */
body.dark-mode .main-tabs-container {
    background: rgba(255, 255, 255, 0.08);
}

body.dark-mode .main-tabs-nav {
    background: linear-gradient(135deg, rgba(60, 60, 60, 0.5) 0%, rgba(40, 40, 40, 0.5) 100%);
}

body.dark-mode .main-tab-btn {
    background: linear-gradient(135deg, #4B5563 0%, #374151 100%);
    border-color: #6B7280;
    color: #D1D5DB;
}

body.dark-mode .main-tab-btn:hover {
    background: linear-gradient(135deg, #5B6875 0%, #475569 100%);
    color: #F3F4F6;
}

body.dark-mode .main-tab-btn.active {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #1E3A8A;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .main-tabs-nav {
        flex-direction: column;
        gap: 10px;
    }

    .main-tab-btn {
        padding: 14px 18px;
        font-size: 15px;
    }

    .main-tab-btn i {
        font-size: 18px;
    }

    .tab-panel-title {
        font-size: 1.3rem;
    }

    .main-tabs-container {
        padding: 15px;
    }

    /* Giảm kích cỡ trên mobile */
    .stats-row .stat-card {
        min-height: 120px;
        padding: 16px;
    }

    .quick-access-grid .quick-card {
        min-height: 140px;
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .main-tab-btn span:not(.tab-badge) {
        font-size: 14px;
    }

    .tab-badge {
        font-size: 11px;
        padding: 2px 8px;
    }
}

/* ===== SPECIAL EFFECT FOR IMPORTANT CARDS ===== */
.quick-card.special-highlight {
    position: relative;
    border: 2px solid #FFD700 !important;
    /* Gold border */
    overflow: visible;
    /* To show the badge outside */
    animation: highlight-pulse 2s infinite ease-in-out;
    background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(255, 248, 220, 1) 100%);
    z-index: 1;
    /* Ensure it stays above others slightly */
}

/* Dark mode adjustment */
body.dark-mode .quick-card.special-highlight {
    background: linear-gradient(135deg, rgba(50, 50, 50, 1) 0%, rgba(60, 60, 40, 1) 100%);
}

.quick-card.special-highlight .quick-card-icon {
    animation: icon-bounce 2s infinite ease;
    background: #FFD700 !important;
    /* Gold background for icon */
    color: #333 !important;
}

.quick-card.special-highlight::before {
    content: "Thực hiện ngay";
    position: absolute;
    top: -12px;
    right: 10px;
    background: linear-gradient(45deg, #FF0000, #FF4500);
    color: white;
    font-size: 10px;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: bold;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
    border: 1px solid #fff;
    z-index: 10;
    animation: badge-bob 2s infinite ease-in-out;
}

/* Animations */
@keyframes highlight-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(255, 215, 0, 0);
        transform: scale(1.03);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0);
        transform: scale(1);
    }
}

@keyframes icon-bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    10%,
    30%,
    50%,
    70% {
        transform: translateY(-2px);
    }

    20%,
    40%,
    60% {
        transform: translateY(2px);
    }

    80% {
        transform: translateY(0);
    }
}

@keyframes badge-bob {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}


/* Override for Result Badge */
.quick-card.special-highlight.result-badge::before {
    content: "Kết quả";
    background: linear-gradient(45deg, #4CAF50, #2E7D32);
    /* Green gradient for Result */
}

/* Override for Leader Evaluation Badge - Blue Background */
.quick-card.special-highlight.leader-eval-badge::before {
    content: "Thực hiện ngay";
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: #ffffff;
    border: 1px solid #ffffff;
}