:root {
    --en-navy: #123B56;
    --en-navy-dark: #0C2D42;
    --en-bg: #F4F7FA;
    --en-card: #FFFFFF;
    --en-text: #1F2937;
    --en-muted: #64748B;
    --en-border: #DDE3EA;
    --en-success: #16A34A;
    --en-warning: #F59E0B;
    --en-danger: #DC2626;
    --en-info: #2563EB;
    --en-sidebar: 240px;
    --en-sidebar-collapsed: 76px;
    --en-topbar: 56px;
    --en-radius: 10px;
    --en-accent: #EC008C;
    --en-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(18, 59, 86, .06);
    --en-focus: 0 0 0 3px rgba(18, 59, 86, .18);
}
*, *::before, *::after { box-sizing: border-box; }
html, body {
    background: var(--en-bg); color: var(--en-text);
    font-family: "Be Vietnam Pro", "Segoe UI", system-ui, sans-serif;
    font-size: 14px; line-height: 1.45;
}
body.en-app-body { min-height: 100vh; }
a { color: var(--en-navy); }
.en-shell { min-height: 100vh; display: flex; }
.en-sidebar {
    width: var(--en-sidebar); background: #fff; border-right: 1px solid var(--en-border);
    display: flex; flex-direction: column; flex-shrink: 0; position: sticky; top: 0; height: 100vh; z-index: 1040;
}
.en-sidebar-brand { background: #fff; display: flex; flex-direction: column; align-items: center; padding: 12px 10px; border-bottom: 1px solid var(--en-border); min-height: 88px; }
.en-brand-full { height: 64px; width: auto; max-width: 180px; }
.en-brand-collapsed { display: none; height: 40px; width: 40px; }
.en-brand-caption { font-size: 11px; color: var(--en-muted); text-align: center; margin-top: 4px; }
.en-login-logo { max-width: 220px; max-height: 200px; margin: 0 auto; display: block; }
.en-nav { padding: 12px 10px; overflow-y: auto; flex: 1; }
.en-nav a { display: flex; align-items: center; gap: 10px; color: #475569; text-decoration: none; padding: 8px 10px; border-radius: 8px; margin-bottom: 4px; font-weight: 500; }
.en-nav a.active, .en-nav a:hover { background: rgba(18, 59, 86, .12); color: var(--en-navy); }
.en-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.en-topbar {
    height: var(--en-topbar); background: linear-gradient(90deg, var(--en-navy) 0%, var(--en-navy-dark) 100%);
    color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 16px; position: sticky; top: 0; z-index: 1030;
}
.en-topbar h1 { font-size: 16px; font-weight: 600; margin: 0; }
.en-topbar .muted { color: rgba(255,255,255,.78); font-size: 12px; }
.en-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 0; border-radius: 8px; background: rgba(255,255,255,.12); color: #fff; }
.en-user-chip { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.1); border: 0; color: #fff; border-radius: 8px; padding: 4px 10px 4px 4px; }
.en-avatar { width: 28px; height: 28px; border-radius: 50%; background: #fff; color: var(--en-navy); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; }
.en-content { padding: 16px; flex: 1; }
.en-card, .card { background: var(--en-card); border: 1px solid var(--en-border); border-radius: var(--en-radius); box-shadow: var(--en-shadow); padding: 16px; }
.btn-primary { --bs-btn-bg: var(--en-navy); --bs-btn-border-color: var(--en-navy); background: var(--en-navy); border-color: var(--en-navy); }
.en-table-wrap { overflow-x: auto; max-width: 100%; }
.en-table { width: 100%; min-width: 1280px; margin: 0; background: #fff; border-collapse: separate; border-spacing: 0; }
.en-table thead th {
    background: #f8fafc; font-size: 12px; font-weight: 600; white-space: nowrap;
    position: sticky; top: 0; z-index: 3; box-shadow: inset 0 -1px 0 var(--en-border);
}
.en-table tbody tr:hover td { background: #f8fafc; }
.en-col-nowrap, .en-name { white-space: nowrap; }
.en-col-center { text-align: center; }
.en-col-text { text-align: left; }
.en-col-access { min-width: 180px; max-width: 240px; }
.en-col-name {
    min-width: 200px; text-align: left; position: sticky; left: 0; z-index: 1;
    background: #fff; box-shadow: 8px 0 8px -8px rgba(15, 23, 42, .12);
}
.en-table thead .en-col-name, .en-table thead th:nth-child(3) { z-index: 4; background: #f8fafc; }
.en-col-actions {
    position: sticky; right: 0; z-index: 1; background: #fff;
    box-shadow: -8px 0 8px -8px rgba(15, 23, 42, .12); min-width: 72px;
}
.en-table thead th:last-child { z-index: 4; background: #f8fafc; }
.en-sort-link {
    display: inline-flex; align-items: center; gap: 4px; color: inherit; text-decoration: none;
    white-space: nowrap; border-radius: 4px;
}
.en-sort-link:hover, .en-sort-link:focus-visible { color: var(--en-navy); text-decoration: none; }
.en-sort-link.is-active { color: var(--en-navy); }
.en-sort-icon { width: 14px; height: 14px; flex: 0 0 auto; opacity: .45; }
.en-sort-link.is-active .en-sort-icon { opacity: 1; }
.en-badge { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 3px 8px; font-weight: 600; font-size: 12px; white-space: nowrap; }
.en-badge-role { background: rgba(18,59,86,.1); color: var(--en-navy); }
.en-badge-success { background: #DCFCE7; color: #166534; }
.en-badge-info { background: #DBEAFE; color: #1E40AF; }
.en-badge-warning { background: #FEF3C7; color: #92400E; }
.en-badge-danger { background: #FEE2E2; color: #991B1B; }
.en-badge-muted { background: #E5E7EB; color: #374151; }
.en-badge-neutral { background: #F1F5F9; color: #475569; }
.en-page-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 16px; }
.en-overlay { display: none; position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 1035; }
body.sidebar-open .en-overlay { display: block; }
.en-toast-stack { position: fixed; right: 16px; bottom: 16px; z-index: 1080; display: flex; flex-direction: column; gap: 8px; max-width: 360px; }
.en-toast { background: #fff; border: 1px solid var(--en-border); border-left: 4px solid var(--en-navy); border-radius: 8px; padding: 12px 14px; }
.en-toast.is-success { border-left-color: var(--en-success); }
.en-empty { text-align: center; color: var(--en-muted); padding: 40px 16px; }
.en-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat-card { border: 1px solid var(--en-border); border-radius: var(--en-radius); background: var(--en-card); padding: 12px 14px; box-shadow: var(--en-shadow); }
.stat-card .label { color: var(--en-muted); font-size: 12px; }
.stat-card .value { font-size: 20px; font-weight: 700; }
.stat-card .value-sm { font-size: 16px; }
.stat-tone-navy { border-top: 3px solid var(--en-navy); }
.stat-tone-info { border-top: 3px solid var(--en-info); }
.stat-tone-success { border-top: 3px solid var(--en-success); }
.stat-tone-accent { border-top: 3px solid var(--en-accent); }
.en-filter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.en-filter-wide { grid-column: span 2; }
.en-table a { color: inherit; text-decoration: none; }
.en-table a:hover, .en-table a:focus-visible { color: var(--en-navy); text-decoration: underline; }
.en-employee-cards { display: none; }
.en-group-summary { cursor: pointer; font-weight: 600; color: var(--en-navy); }
.en-password-field { position: relative; }
.en-password-toggle {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    border: 0; background: transparent; color: var(--en-navy); font-weight: 600; font-size: 12px;
}
.btn, .form-control, .form-select, .form-check-input { min-height: 38px; }
.form-check-input { min-height: 1.1em; }
.btn:hover { filter: brightness(.97); }
.btn-primary:hover, .btn-primary:active { background: var(--en-navy-dark); border-color: var(--en-navy-dark); }
.btn:disabled, .form-control:disabled { opacity: .6; cursor: not-allowed; }
:focus-visible { outline: none; box-shadow: var(--en-focus); }
.form-control:focus, .form-select:focus, .form-check-input:focus, .btn:focus-visible, .en-icon-btn:focus-visible {
    border-color: var(--en-navy); box-shadow: var(--en-focus);
}
.login-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--en-bg); padding: 24px; }
.login-card { width: 100%; max-width: 420px; }
body.sidebar-collapsed .en-sidebar { width: var(--en-sidebar-collapsed); }
body.sidebar-collapsed .en-brand-full, body.sidebar-collapsed .en-brand-caption, body.sidebar-collapsed .en-nav a span { display: none; }
body.sidebar-collapsed .en-brand-collapsed { display: block; }
@media (max-width: 991.98px) {
    .en-sidebar { position: fixed; transform: translateX(-105%); }
    body.sidebar-open .en-sidebar { transform: none; }
    .en-filter-grid { grid-template-columns: 1fr 1fr; }
    .en-filter-wide { grid-column: span 2; }
}
@media (max-width: 767.98px) {
    .en-table-desktop { display: none; }
    .en-employee-cards { display: grid; gap: 12px; }
}
@media (max-width: 575.98px) {
    .en-filter-grid { grid-template-columns: 1fr; }
    .en-filter-wide { grid-column: auto; }
}
