/* Enterprise HRMS Corporate Theme */
:root {
    --primary-color: #1e3a8a;
    --primary-hover: #1e40af;
    --accent-color: #0284c7;
    --sidebar-bg: #0f172a;
    --sidebar-hover: #1e293b;
    --bg-main: #f8fafc;
}

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-main);
    color: #1e293b;
}

.page {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

/* ĐIỂM QUAN TRỌNG NHẤT: Bắt buộc main phải co lại theo phần còn lại của màn hình */
.page > main {
    min-width: 0 !important;
    width: calc(100vw - 260px) !important;
    max-width: calc(100vw - 260px) !important;
    overflow-x: hidden !important;
}

    /* Đảm bảo vùng table-responsive bên trong là nơi duy nhất được cuộn ngang */
    .page > main .table-responsive {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
    }

.sidebar {
    background-color: var(--sidebar-bg) !important;
}

.sidebar .nav-link {
    color: #94a3b8 !important;
    border-radius: 6px;
    padding: 9px 14px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.sidebar .nav-link:hover {
    color: #ffffff !important;
    background-color: var(--sidebar-hover);
}

.sidebar .nav-link.active {
    color: #ffffff !important;
    background-color: #2563eb !important;
    font-weight: 600;
}

.nav-heading {
    letter-spacing: 0.05em;
    font-size: 0.75rem !important;
    color: #64748b !important;
}

.card {
    border-radius: 8px;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.card-header {
    background-color: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    font-weight: 600;
}

/* Dense Data Tables for Payroll and Timesheet */
.table-dense th, .table-dense td {
    padding: 0.45rem 0.6rem;
    font-size: 0.85rem;
    vertical-align: middle;
}

.table-payroll {
    white-space: nowrap;
}

.table-payroll thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background-color: #f1f5f9;
}

.table-payroll tr:hover td {
    background-color: #f8fafc;
}

.border-dashed {
    border: 2px dashed #cbd5e1 !important;
}

.cn-text {
    font-size: 0.75rem;
    color: #64748b;
    display: block;
    font-weight: normal;
}
