/* ======================================================================================
                            THÀNH PHẦN QUẢN LÝ THANH ĐIỀU HƯỚNG
   ====================================================================================== */


/* -------------------------------------------------------------------------------------- */

.top-bar {
    background-color: var(--bg-dark);
    color: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 5%;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 0.5px;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 1000 !important;
    box-sizing: border-box;
}

.top-links span {
    color: var(--warning-yellow);
}

/* ------------------------------------------------------------------------------------ */

.nav-bar {
    background-color: rgba(0, 51, 161, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    padding: 0 5%;
    position: fixed;
    top: 40px;
    width: 100% !important;
    z-index: 1050 !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    left: 0 !important;
}

.nav-links {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.nav-links li a.dropbtn,
.nav-links li > a {
    color: var(--white);
    padding: 20px 10px;
    display: block;
    font-size: 12px;
    font-weight: 700;
    transition: background-color 0.3 ease;
    white-space: nowrap;
}

.nav-links li:hover .dropbtn,
.nav-links li > a:hover {
    background-color: var(--secondary-blue);
}

/* -------------------------------------------------------------------------------- */

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--white);
    min-width: 280px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1060 !important;
    border-top: 3px solid var(--warning-yellow);
    border-radius: 0 0 5px 5px;
}

.dropdown-content a {
    color: var(--text-main) !important;
    padding: 14px 20px;
    display: block;
    font-size: 13px;
    font-weight: normal;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.dropdown-content a:hover {
    background-color: var(--bg-light);
    color: var(--primary-blue) !important;
    padding-left: 25px;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* ---------------------------------------------------------------------------- */

.side-nav-drawer {
    position: fixed;
    top: 85px; 
    left: -300px; 
    width: 300px; 
    height: calc(100vh - 85px);
    
    background-color: rgba(0, 51, 161, 0.95); 
    backdrop-filter: blur(5px);
    z-index: 900; 
    
    transition: 0.4s ease-in-out;
    overflow-y: auto;
    box-shadow: 4px 0 10px rgba(0,0,0,0.2);
}

.side-nav-drawer.open {
    left: 0;
}

.side-nav-content {
    display: flex;
    flex-direction: column;
    justify-content: left;
    min-height: 100%;
    padding-top: 30px;
}

.side-nav-content a {
    color: white !important;
    font-size: 17px !important;
    padding: 12px 10px o !important;
    margin-bottom: 8px;
    text-decoration: none;
    display: block;
    transition: 0.2s;
}

.side-nav-content a:hover {
    background-color: rgba(255,255,255, 0.15);
    border-left: 4px solid white;
    padding-left: 16px !important;
}
.side-nav-content h3 {
    color: #e0e0e0;
    font-size: 15px !important;
    padding-left: 20px !important;
    margin-bottom: 25px !important;
}
.side-nav-drawer .close-btn {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 30px;
    color: #8b949e;
    border: none;
    text-decoration: none;
}

.side-nav-drawer .close-btn:hover {
    background: rgba(255, 60, 60, 0.8);
}

.side-nav-drawer a {
    padding: 12px 20px;
    margin: 4px 10px;
    color: #c9d1d9;
    text-decoration: none;
    display: block;
    border-radius: 6px;
    font-size: 14px;
}

.side-nav-drawer a:hover {
    background-color: #161b22;
    color: #58a6ff;
}

/* --------------------------------------------------------------------------- */

.sidebar-toggle-btn {
    position: fixed;
    top: 60px;
    left: 10px;
    z-index: 990;
    background-color: var(--primary-blue, #0033a1);
    color: white;
    border: none;
    padding: 10px 15px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    transition: 0,3s;
}

.sidebar-toggle-btn:hover {
    background-color: var(--primary-blue) !important;
    color: white !important;
}

.sidebar-backdrop {
    display: none !important;
}

.sidebar-backdrop.open {
    display: block;
}

.sidebar-local-loader {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.85); /* Nền trắng mờ */
    backdrop-filter: blur(4px); /* Làm mờ nhẹ phần khung lưới bên dưới */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 50;
    border-radius: 8px; /* Bo góc cho khớp với khung biểu đồ */
}

/* Vòng xoay phong cách Modern (Hiện đại) */
.modern-spinner {
    width: 45px;
    height: 45px;
    border: 4px solid rgba(0, 51, 161, 0.1); /* Viền xanh xám mờ nhạt */
    border-left-color: #0033a1; /* Nét xoay màu xanh chủ đạo của xưởng */
    border-radius: 50%;
    animation: modern-spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes modern-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Hiệu ứng nhấp nháy chữ mượt mà */
.loader-text {
    color: #0033a1;
    font-weight: bold;
    font-size: 14px;
    letter-spacing: 1px;
    animation: text-pulse 1.5s ease-in-out infinite;
}

@keyframes text-pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}