/* --- Variables & Reset --- */
:root {
    --hr-primary: #2c3e50;
    --hr-secondary: #34495e;
    --hr-accent: #3498db;
    --hr-text: #333;
    --hr-bg: #f4f6f9;
    --hr-white: #fff;
    --hr-border: #e1e4e8;
    --sidebar-width: 260px;
}

.hr-dashboard-wrapper {
    display: flex;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background-color: var(--hr-bg);
    color: var(--hr-text);
}

/* --- Sidebar --- */
.hr-sidebar {
    width: var(--sidebar-width);
    background-color: var(--hr-primary);
    color: var(--hr-white);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.hr-profile-brief {
    padding: 30px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.hr-profile-brief .avatar-circle img {
    border-radius: 50%;
    border: 3px solid var(--hr-accent);
    margin-bottom: 10px;
}

.hr-profile-brief h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--hr-white);
}

.hr-profile-brief .badge {
    background: var(--hr-accent);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-top: 5px;
    display: inline-block;
}

.hr-nav ul {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.hr-nav li a {
    display: block;
    padding: 12px 20px;
    color: #b8c7ce;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.hr-nav li a:hover, .hr-nav li.active a {
    background-color: var(--hr-secondary);
    color: var(--hr-white);
    border-left-color: var(--hr-accent);
}

/* --- Main Content --- */
.hr-main-content {
    flex: 1;
    margin-left: var(--sidebar-width); /* Chừa chỗ cho sidebar */
    padding: 30px;
    transition: margin-left 0.3s ease;
}

/* Tab Content Logic */
.hr-tab-content {
    display: none; /* Ẩn tất cả tab mặc định */
    animation: fadeIn 0.3s ease-in-out;
}

.hr-tab-content.active {
    display: block; /* Hiện tab đang active */
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Cards & Dashboard Widgets --- */
.hr-card {
    background: var(--hr-white);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 25px;
    margin-bottom: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-box {
    background: var(--hr-white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border-left: 4px solid var(--hr-accent);
}

.stat-box h4 { margin: 0 0 5px 0; font-size: 0.9rem; color: #888; }
.stat-box .number { font-size: 1.8rem; font-weight: bold; color: var(--hr-primary); }

/* --- Mobile Header & Toggle --- */
.hr-header-mobile {
    display: none; /* Ẩn trên desktop */
    background: var(--hr-white);
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.toggle-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--hr-primary);
}

/* --- Responsive Mobile --- */
@media (max-width: 768px) {
    .hr-sidebar {
        transform: translateX(-100%); /* Giấu sidebar sang trái */
    }

    .hr-sidebar.open {
        transform: translateX(0); /* Hiện lại khi có class open */
        box-shadow: 5px 0 15px rgba(0,0,0,0.2);
    }

    .hr-main-content {
        margin-left: 0; /* Full màn hình */
        padding: 15px;
    }

    .hr-header-mobile {
        display: flex; /* Hiện thanh header mobile */
    }

    /* Overlay khi mở menu */
    .hr-overlay {
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
        display: none;
    }
    .hr-overlay.active { display: block; }
}