﻿:root {
    --primary-color: #005f69;
    --primary-hover: #004a52;
    --secondary-color: #f26f33;
    --secondary-hover: #d85c25;
    --text-white: #ffffff;
    --bg-light: #f8f9fa;
    --card-shadow: 0 4px 15px rgba(0, 95, 105, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--bg-light);
    color: #333;
    margin-bottom: 0 !important;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* ── Tiện ích màu sắc ───────────────────────────────── */
.brand-primary-text {
    color: var(--primary-color) !important;
}

.brand-secondary-text {
    color: var(--secondary-color) !important;
}

/* ── Header & Navbar ───────────────────────────────── */
.main-navbar {
    background-color: #ffffff !important;
    padding: 0.75rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid #e2e8f0;
}

    .main-navbar .navbar-brand img {
        height: 65px;
    }

    .main-navbar .navbar-nav {
        gap: 0.5rem;
    }

    /* Chuẩn hóa Nav-link */
    .main-navbar .nav-link {
        position: relative;
        color: #475569 !important; /* Muted text light (slate-600) */
        font-weight: 500;
        transition: color 0.2s ease;
        padding: 0.5rem 0 !important;
        margin: 0 1rem;
        background-color: transparent !important;
        border-radius: 0;
        display: inline-flex !important;
        align-items: center;
        gap: 0.3rem;
    }

        /* Khi Hover, Active, hoặc Mở menu (class .show của Bootstrap) */
        .main-navbar .nav-link:hover,
        .main-navbar .nav-link.active,
        .main-navbar .nav-link.show {
            color: #0f172a !important; /* Text contrast light (slate-900) */
        }

        /* Underline animation mặc định ẩn đi */
        .main-navbar .nav-link::after {
            content: '';
            position: absolute;
            width: 0;
            height: 2px;
            bottom: -2px;
            left: 0;
            background-color: var(--secondary-color); /* Gạch chân cam */
            transition: width 0.3s ease-in-out;
            border-radius: 2px;
        }

        /* Gạch chân chạy ra khi tương tác */
        .main-navbar .nav-link:hover::after,
        .main-navbar .nav-link.active::after,
        .main-navbar .nav-link.show::after {
            width: 100%;
        }

        /* Đảm bảo icon dropdown đổi màu cùng chữ */
        .main-navbar .nav-link:hover .nav-caret,
        .main-navbar .nav-link.active .nav-caret,
        .main-navbar .nav-link.show .nav-caret {
            color: #0f172a;
        }

        /* Tắt caret mặc định Bootstrap */
        .main-navbar .nav-link.dropdown-toggle::after {
            display: none !important;
        }

        /* Icon caret FA */
        .main-navbar .nav-link .nav-caret {
            font-size: 0.6rem;
            flex-shrink: 0;
            transition: transform 0.25s ease, color 0.2s ease;
            will-change: transform;
            color: #475569;
        }

        .main-navbar .nav-link[aria-expanded="true"] .nav-caret {
            transform: rotate(180deg);
        }

    .main-navbar .navbar-toggler {
        border-color: #e2e8f0;
        padding: 0.5rem;
    }

    .main-navbar .navbar-toggler-icon {
        filter: none;
    }

/* Brand Logo (Header) */
.header-brand-container {
    display: flex;
    align-items: center;
}

.header-brand-divider {
    width: 2px;
    height: 25px;
    background-color: var(--secondary-color);
    margin: 0 5px;
}

.header-brand-text {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    white-space: nowrap;
    color: var(--primary-color);
    line-height: 1;
    display: flex;
    align-items: center;
    text-transform: uppercase;
}

.text-ueh-green {
    color: var(--primary-color) !important;
}

/* ── Dropdown Menus (Chung) ──────────────────────────── */
.dropdown-menu {
    border-radius: 12px;
    padding: 0.5rem;
    animation: dropdownFadeIn 0.2s ease;
}

.dropdown-item {
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
    color: #495057;
}

    .dropdown-item:hover {
        background-color: rgba(0, 95, 105, 0.1);
        color: var(--primary-color);
    }

/* ── Multilevel Dropdowns ────────────────────────────── */
.dropdown-submenu {
    position: relative;
}

    .dropdown-submenu > .dropdown-menu {
        top: 0;
        left: 100%;
        margin-top: -5px;
        margin-left: 2px;
        display: none;
    }

    .dropdown-submenu:hover > .dropdown-menu {
        display: block;
        animation: dropdownFadeIn 0.2s ease;
    }

    .dropdown-submenu > a::after {
        display: none !important;
    }

/* ── Language Switcher ───────────────────────────────── */
.lang-switcher-wrapper {
    background-color: #ffffff;
    border-radius: 20px;
    padding: 4px;
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.lang-btn {
    background: transparent;
    border: none;
    border-radius: 16px;
    padding: 4px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1.6;
}

    .lang-btn.lang-active {
        background-color: var(--secondary-color);
        color: #ffffff;
        box-shadow: 0 2px 6px rgba(242, 111, 51, 0.4);
    }

    .lang-btn:not(.lang-active):hover {
        background-color: rgba(0, 95, 105, 0.08);
    }

/* ── Footer Section ──────────────────────────────────── */
.footer-section {
    background-color: var(--primary-color) !important;
    color: var(--text-white) !important;
}

    .footer-section img.footer-logo {
        height: 75px;
        margin-bottom: 0.5rem;
    }

.footer-link {
    text-decoration: none;
    transition: color 0.3s ease;
    color: #ffffff;
    opacity: 0.75;
}

    .footer-link:hover {
        opacity: 1;
        text-decoration: underline;
    }

/* ── User Dropdown & Login Button ────────────────────── */
.user-dropdown-btn {
    background: #f1f5f9;
    border: 1.5px solid #e2e8f0;
    border-radius: 50px;
    padding: 6px 16px 6px 6px;
    color: #0f172a;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
}

    .user-dropdown-btn:hover,
    .user-dropdown-btn:focus,
    .user-dropdown-btn.show {
        background: #e2e8f0;
        border-color: #cbd5e1;
        color: #0f172a;
        box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.05);
    }

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--secondary-color);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: 0.5px;
}

.user-avatar-lg {
    width: 44px;
    height: 44px;
    font-size: 1rem;
}

.user-name {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #0f172a;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-dropdown-header {
    background: #f8f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px 12px 0 0;
}

.role-badge {
    background: rgba(0, 95, 105, 0.1);
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.68rem;
    width: fit-content;
    padding: 4px 12px;
    border-radius: 20px;
}

.logout-item:hover {
    background: #fff5f5 !important;
    color: #d9534f !important;
}

    .logout-item:hover i {
        transform: translateX(3px);
    }

.logout-item i {
    transition: transform 0.2s ease;
}

/* ── Logout Confirmation Modal ───────────────────────── */
.logout-modal-content {
    border: none;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.logout-modal-body {
    padding: 2.5rem 2rem 2rem;
    text-align: center;
}

.logout-modal-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(242, 111, 51, 0.1);
    color: var(--secondary-color);
    font-size: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    animation: logoutIconPulse 2s ease-in-out infinite;
}

@keyframes logoutIconPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(242, 111, 51, 0.2);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(242, 111, 51, 0);
    }
}

.logout-modal-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 0.5rem;
}

.logout-modal-desc {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 2rem;
}

.logout-modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.logout-modal-btn-cancel {
    flex: 1;
    padding: 0.65rem 1.25rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.875rem;
    background: #f1f3f5;
    border: 1.5px solid #dee2e6;
    color: #495057;
    transition: all 0.2s ease;
}

    .logout-modal-btn-cancel:hover {
        background: #e9ecef;
        border-color: #adb5bd;
        color: #212529;
    }

.logout-modal-btn-confirm {
    flex: 1;
    padding: 0.65rem 1.25rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.875rem;
    background: var(--secondary-color);
    border: none;
    color: #ffffff;
    transition: all 0.2s ease;
    text-decoration: none;
}

    .logout-modal-btn-confirm:hover {
        background: var(--secondary-hover);
        color: #ffffff;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(242, 111, 51, 0.35);
    }

.login-dropdown-item {
    transition: all 0.2s ease;
}

.footer-copyright-border {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.required-mark::after {
    content: " *";
    color: red;
}

.required-star {
    color: red;
    font-weight: bold;
}