/* Extracted from hanh-chinh.html to keep the page lighter and cacheable. */

/* Inline style block 1 */
:root {
        --gold: #AE7C41; --gold-pale: #F5EDD8; --charcoal: #1A1A1A;
        --ivory: #FAFAF7; --white: #FFFFFF; --border: #E5DCCC; --muted: #888;
        --shadow: 0 24px 54px rgba(18,18,18,0.08); --radius-xl: 28px; --radius-lg: 22px; --radius-md: 16px;
    }

    html, body {
        min-height: 100%;
        height: 100%;
    }
    body {
        background:
            radial-gradient(circle at top right, rgba(174,124,65,0.08), transparent 24%),
            linear-gradient(180deg, #fbfaf7 0%, #f2eee7 100%);
        font-family: 'Inter', sans-serif;
        height: 100vh;
        overflow: hidden;
    }

    .badge-pending { background: #e53935; color: white; border-radius: 50%; width: 20px; height: 20px; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; margin-left: 4px; font-weight: 700; vertical-align: middle; }

    /* ===== LAYOUT ===== */
    .hc-shell {
        min-height: 100vh;
        height: 100vh;
        display: grid;
        grid-template-columns: clamp(244px, 18vw, 284px) minmax(0, 1fr);
        overflow: hidden;
    }
    .hc-sidebar {
        background: linear-gradient(180deg, #171717 0%, #1f1d1b 100%);
        color: #f6efe5;
        padding: 24px 18px;
        display: flex;
        flex-direction: column;
        gap: 18px;
        border-right: 1px solid rgba(255,255,255,0.08);
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }
    .hc-side-brand {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px;
        border-radius: 20px;
        background: rgba(255,255,255,0.05);
        border: 1px solid rgba(255,255,255,0.08);
    }
    .hc-side-mark {
        width: 54px;
        height: 54px;
        border-radius: 18px;
        background: linear-gradient(135deg, #C9973E 0%, #8F6028 100%);
        display: grid;
        place-items: center;
        color: #fff;
        font-family: 'Cormorant Garamond', serif;
        font-size: 28px;
        font-weight: 700;
        box-shadow: 0 12px 24px rgba(174,124,65,0.24);
    }
    .hc-side-meta small,
    .hc-nav-group-label,
    .hc-side-profile-label {
        text-transform: uppercase;
        letter-spacing: 1px;
    }
    .hc-side-meta small {
        display: block;
        color: rgba(246,239,229,0.66);
        font-size: 11px;
        margin-bottom: 4px;
    }
    .hc-side-meta strong {
        display: block;
        color: #fff;
        font-size: 20px;
        line-height: 1.1;
    }
    .hc-side-meta span {
        display: block;
        margin-top: 5px;
        color: rgba(246,239,229,0.72);
        font-size: 12px;
        line-height: 1.45;
    }
    .hc-sidebar-toggle {
        width: 100%;
        display: inline-flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        padding: 11px 14px;
        border-radius: 16px;
        border: 1px solid rgba(255,255,255,0.08);
        background: rgba(255,255,255,0.04);
        color: #f6efe5;
        cursor: pointer;
        font: inherit;
        font-size: 12px;
        font-weight: 700;
        transition: 0.2s ease;
    }
    .hc-sidebar-toggle:hover {
        background: rgba(255,255,255,0.08);
    }
    .hc-side-profile {
        padding: 14px;
        border-radius: 20px;
        background: rgba(255,255,255,0.04);
        border: 1px solid rgba(255,255,255,0.08);
    }
    .hc-side-profile-label {
        color: rgba(246,239,229,0.62);
        font-size: 11px;
        font-weight: 700;
        margin-bottom: 10px;
    }
    .hc-side-profile-name {
        color: #fff;
        font-size: 18px;
        font-weight: 700;
        margin-bottom: 4px;
    }
    .hc-side-profile-role {
        color: #d6b892;
        font-size: 12px;
        font-weight: 700;
        margin-bottom: 12px;
    }
    .hc-side-profile-grid {
        display: grid;
        gap: 10px;
    }
    .hc-side-profile-chip {
        padding: 11px 12px;
        border-radius: 14px;
        background: rgba(255,255,255,0.05);
        border: 1px solid rgba(255,255,255,0.06);
    }
    .hc-side-profile-chip label {
        display: block;
        color: rgba(246,239,229,0.58);
        font-size: 10px;
        margin-bottom: 4px;
        text-transform: uppercase;
        letter-spacing: 0.9px;
    }
    .hc-side-profile-chip strong {
        display: block;
        color: #fff;
        font-size: 12px;
        line-height: 1.4;
        word-break: break-word;
    }
    .hc-sidebar-group {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    .hc-nav-group-label {
        color: rgba(246,239,229,0.46);
        font-size: 11px;
        margin: 0 10px;
    }
    .hc-main-nav {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }
    .hc-main-nav-link {
        width: 100%;
        border: 0;
        border-radius: 16px;
        background: transparent;
        color: rgba(246,239,229,0.86);
        padding: 12px 14px;
        display: flex;
        align-items: center;
        gap: 10px;
        text-align: left;
        cursor: pointer;
        font: inherit;
        text-decoration: none;
        transition: background 0.2s ease, transform 0.2s ease;
    }
    .hc-main-nav-link:hover {
        background: rgba(255,255,255,0.06);
    }
    .hc-main-nav-link.active {
        background: linear-gradient(135deg, rgba(174,124,65,0.28), rgba(174,124,65,0.1));
        box-shadow: inset 0 0 0 1px rgba(214,184,146,0.22);
    }
    .hc-main-nav-link .material-icons {
        font-size: 20px;
        color: #d6b892;
    }
    .hc-main-nav-text {
        flex: 1;
        min-width: 0;
    }
    .hc-main-nav-title {
        display: block;
        font-size: 13px;
        font-weight: 700;
        color: #fff;
    }
    .hc-main-nav-sub {
        display: block;
        margin-top: 2px;
        color: rgba(246,239,229,0.52);
        font-size: 11px;
    }
    .hc-main {
        min-width: 0;
        height: 100%;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }
    .hc-page {
        width: min(100%, 1540px);
        max-width: 1540px;
        margin: 0 auto;
        padding: 24px 24px 40px;
        display:flex;
        flex-direction:column;
        gap:22px;
    }
    .hc-main-topbar {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 18px;
        margin-bottom: 2px;
    }
    .hc-topbar-title small {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        color: var(--gold);
        font-size: 12px;
        font-weight: 700;
        margin-bottom: 8px;
        text-transform: uppercase;
        letter-spacing: 1px;
    }
    .hc-topbar-title h1 {
        font-family: 'Cormorant Garamond', serif;
        font-size: 31px;
        line-height: 1;
        color: var(--charcoal);
        margin-bottom: 8px;
    }
    .hc-topbar-title p {
        color: #6f685e;
        font-size: 13px;
        line-height: 1.55;
        max-width: 760px;
    }
    .hc-topbar-title p:empty {
        display: none;
    }
    .hc-topbar-actions {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    .hc-topbar-primary,
    .hc-topbar-secondary {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
    }
    .hc-topbar-secondary {
        justify-content: flex-end;
    }
    .hc-topbar-btn {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 12px 16px;
        border-radius: 16px;
        border: 1px solid var(--border);
        background: rgba(255,255,255,0.92);
        color: var(--charcoal);
        font: inherit;
        font-size: 13px;
        font-weight: 700;
        text-decoration: none;
        cursor: pointer;
        transition: 0.2s ease;
    }
    .hc-topbar-btn:hover {
        transform: translateY(-1px);
        border-color: #d9c29a;
    }
    .hc-topbar-btn.danger {
        background: var(--charcoal);
        color: #fff;
        border-color: var(--charcoal);
    }
    .sidebar-collapsed .hc-shell {
        grid-template-columns: 88px minmax(0, 1fr);
    }
    .sidebar-collapsed .hc-sidebar {
        padding: 24px 12px;
    }
    .sidebar-collapsed .hc-side-brand,
    .sidebar-collapsed .hc-main-nav-link {
        justify-content: center;
    }
    .sidebar-collapsed .hc-side-meta,
    .sidebar-collapsed .hc-side-profile,
    .sidebar-collapsed .hc-nav-group-label,
    .sidebar-collapsed .hc-main-nav-text,
    .sidebar-collapsed .hc-sidebar-toggle span {
        display: none !important;
    }
    .sidebar-collapsed .hc-main-nav-link {
        padding: 12px;
    }
    .sidebar-collapsed .hc-sidebar-toggle {
        justify-content: center;
    }
    .module-workspace {
        display:grid;
        grid-template-columns:minmax(320px, 0.68fr) minmax(0, 1.32fr);
        gap:22px;
        align-items:start;
    }
    .module-workspace-left {
        display:flex;
        flex-direction:column;
        gap:16px;
        position:sticky;
        top:24px;
    }
    .module-workspace-right {
        min-width:0;
    }
    #moduleAttendanceManager .module-workspace {
        align-items: stretch;
    }
    #moduleAttendanceManager .module-workspace-left {
        position: static;
        top: auto;
        height: 100%;
    }
    #moduleAttendanceManager .module-workspace-right {
        display: contents;
        min-width: 0;
    }
    .workspace-main-card,
    .attendance-board-card,
    .attendance-sync-card,
    .attendance-summary-card,
    .attendance-reconciliation-card,
    .work-assignment-panel,
    .work-assignment-hero-main,
    .work-assignment-stat,
    .attendance-manager-review,
    .hub-card,
    .req-card {
        min-width: 0;
    }
    .workspace-side-panel {
        background: rgba(255,255,255,0.96);
        border:1px solid var(--border);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow);
        padding:20px 22px;
    }
    .workspace-side-panel.tools-only {
        padding: 18px;
    }
    .workspace-pane-title {
        font-family:'Cormorant Garamond', serif;
        font-size:26px;
        color:var(--charcoal);
        margin-bottom:8px;
    }
    .workspace-pane-note {
        margin:0 0 16px;
        color:#6f685e;
        font-size:13px;
        line-height:1.65;
    }
    .workspace-side-panel.tools-only .workspace-pane-title,
    .workspace-side-panel.tools-only .workspace-pane-note {
        display: none;
    }
    .workspace-quick-pills {
        display:flex;
        flex-direction:column;
        align-items:stretch;
        gap:14px;
        width:100%;
        max-width:420px;
        margin:0 auto;
    }
    .workspace-side-panel.tools-only .workspace-quick-pills {
        max-width: none;
        margin: 0;
        gap: 10px;
    }
    .workspace-quick-pill {
        width:100%;
        min-height:72px;
        display:inline-flex;
        align-items:center;
        justify-content:center;
        gap:10px;
        padding:18px 24px;
        border-radius:22px;
        border:2px solid #dec5a0;
        background:linear-gradient(180deg, #fffdfa 0%, #f8f1e6 100%);
        color:#8b6b3f;
        font-size:16px;
        font-weight:700;
        cursor:pointer;
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.75);
        transition:0.2s ease;
    }
    .workspace-side-panel.tools-only .workspace-quick-pill {
        min-height: 58px;
        padding: 14px 18px;
        border-radius: 18px;
        font-size: 14px;
        justify-content: flex-start;
    }
    .workspace-quick-pill:hover {
        transform:translateY(-1px);
        border-color:#c79b62;
        background:linear-gradient(180deg, #fff9f1 0%, #f6ebdb 100%);
        box-shadow:0 10px 22px rgba(174,124,65,0.08);
    }
    .workspace-quick-pill.active {
        background:linear-gradient(135deg, rgba(174,124,65,0.22), rgba(174,124,65,0.1));
        border-color:#b78343;
        color:#9a6c35;
        box-shadow:0 12px 24px rgba(174,124,65,0.12);
    }
    .workspace-quick-pill.overtime-request-shortcut {
        border-color:#d6b57f;
        background:linear-gradient(135deg, #fff8e8 0%, #f8ead1 100%);
        color:#8b5a20;
        text-align:left;
        line-height:1.3;
    }
    .workspace-quick-pill.overtime-request-shortcut:hover {
        border-color:#b78343;
        background:linear-gradient(135deg, #fff4d8 0%, #f4dfbd 100%);
    }
    .workspace-quick-pill.overtime-request-shortcut .material-icons {
        color:#b78343;
    }
    .overtime-composer-card { display:grid; gap:22px; }
    .overtime-composer-head { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; padding-bottom:18px; border-bottom:1px solid var(--border); }
    .overtime-composer-kicker { color:var(--gold); font-size:12px; font-weight:800; letter-spacing:.12em; text-transform:uppercase; margin-bottom:6px; }
    .overtime-composer-head h3 { margin:0; color:var(--charcoal); font-size:clamp(22px, 2vw, 30px); }
    .overtime-composer-head p { margin:7px 0 0; color:var(--muted); line-height:1.5; }
    .overtime-composer-head > .material-icons { display:grid; place-items:center; width:54px; height:54px; border-radius:16px; color:#9a641e; background:#fff5e6; font-size:30px; flex:0 0 auto; }
    .overtime-mode-grid { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:14px; }
    .overtime-mode-card { appearance:none; border:1px solid #dec7a4; background:linear-gradient(145deg, #fff, #fffaf1); border-radius:16px; padding:18px; display:grid; grid-template-columns:auto minmax(0, 1fr) auto; gap:14px; align-items:center; text-align:left; color:var(--charcoal); cursor:pointer; transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
    .overtime-mode-card:hover { transform:translateY(-2px); border-color:var(--gold); box-shadow:0 12px 28px rgba(91,58,24,.11); }
    .overtime-mode-card.active { border-color:#a86f28; background:#fff4df; box-shadow:0 0 0 2px rgba(174,124,65,.15); }
    .overtime-mode-card b, .overtime-mode-card small { display:block; }
    .overtime-mode-card b { font-size:16px; margin-bottom:5px; }
    .overtime-mode-card small { color:var(--muted); font-size:12px; line-height:1.45; }
    .overtime-mode-number { display:grid; place-items:center; width:34px; height:34px; border-radius:50%; background:#a86f28; color:#fff; font-weight:800; }
    .overtime-mode-card > .material-icons { color:#a86f28; }
    .overtime-composer-body { display:grid; gap:16px; }
    .overtime-flow-section { padding:20px; border:1px solid var(--border); border-radius:15px; background:var(--ivory); }
    .overtime-common-section { background:#fff; }
    .overtime-section-heading { display:flex; justify-content:space-between; gap:20px; align-items:flex-start; margin-bottom:16px; }
    .overtime-section-heading div > span { color:var(--gold); font-size:11px; font-weight:800; letter-spacing:.1em; text-transform:uppercase; }
    .overtime-section-heading h4 { margin:4px 0 0; font-size:19px; }
    .overtime-section-heading p { max-width:520px; margin:0; color:var(--muted); font-size:13px; line-height:1.5; text-align:right; }
    .overtime-check-row { display:grid; grid-template-columns:minmax(240px, 1fr) auto; gap:14px; align-items:end; }
    .overtime-check-btn { min-height:52px; margin-bottom:16px; }
    .overtime-device-result { min-height:52px; display:flex; align-items:center; padding:14px 16px; border-radius:12px; border:1px dashed #d9c7ac; background:#fff; color:var(--muted); line-height:1.5; }
    .overtime-device-result.success { border-style:solid; border-color:#9dd4af; background:#effbf3; color:#176535; }
    .overtime-device-result.warning { border-style:solid; border-color:#edc889; background:#fff8e9; color:#805516; }
    .overtime-device-result.error { border-style:solid; border-color:#efaaaa; background:#fff1f1; color:#9a2828; }
    .overtime-log-summary { width:100%; display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:10px; }
    .overtime-log-summary span { padding:10px 12px; border-radius:9px; background:rgba(255,255,255,.72); }
    .overtime-log-summary small, .overtime-log-summary b { display:block; }
    .overtime-log-summary small { margin-bottom:3px; opacity:.75; }
    .overtime-manual-evidence { margin-top:14px; padding-top:14px; border-top:1px solid var(--border); }
    .overtime-manual-alert { display:flex; gap:10px; align-items:flex-start; margin-bottom:14px; padding:11px 13px; border-radius:10px; background:#fff5df; color:#815817; font-size:13px; line-height:1.5; }
    .overtime-manager-card { min-height:52px; display:flex; align-items:center; padding:12px 14px; border:1px solid var(--border); border-radius:10px; background:#f8f5ef; color:var(--charcoal); font-weight:700; }
    .overtime-manager-card.error { color:#a02828; border-color:#efb1b1; background:#fff3f3; }
    .overtime-consent { display:flex; align-items:flex-start; gap:10px; padding:14px; border-radius:11px; background:#f5f9f4; border:1px solid #cfe0ca; font-weight:650; line-height:1.5; cursor:pointer; }
    .overtime-consent input { width:19px; height:19px; margin-top:2px; flex:0 0 auto; }
    .overtime-submit-row { display:flex; flex-wrap:wrap; gap:12px; margin-top:20px; }
    @media (max-width:760px) {
        .overtime-mode-grid, .overtime-log-summary, .overtime-check-row { grid-template-columns:1fr; }
        .overtime-section-heading { display:block; }
        .overtime-section-heading p { margin-top:8px; text-align:left; }
        .overtime-check-btn { margin-bottom:0; }
        .overtime-flow-section { padding:15px; }
    }
    .workspace-quick-pills .hc-tab {
        margin-bottom:0;
        border-bottom:none;
        white-space:normal;
    }
    .workspace-quick-pill .material-icons {
        font-size:24px !important;
    }
    .workspace-side-list {
        display:grid;
        gap:10px;
    }
    .workspace-side-item {
        display:flex;
        align-items:flex-start;
        gap:10px;
        padding:12px 14px;
        border-radius:18px;
        background:#fcf7ef;
        border:1px solid #eadfcd;
        color:var(--charcoal);
        font-size:13px;
        line-height:1.55;
        font-weight:600;
    }
    .workspace-side-item .material-icons {
        color:var(--gold);
        font-size:18px;
        margin-top:1px;
        flex-shrink:0;
    }
    .workspace-main-card {
        background: rgba(255,255,255,0.96);
        border: 1px solid var(--border);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow);
        padding: 20px;
    }
    .workspace-main-card.compact {
        padding: 16px 18px;
    }
    /* Layout 3 hang ngang cho khu Quan ly thong tin */
    .info-hub-columns {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
    .info-hub-column {
        display: flex;
        flex-direction: column;
        min-width: 0;
    }
    .info-hub-column .workspace-section-title {
        margin-bottom: 10px;
        font-size: 24px;
        line-height: 1.15;
    }
    .info-hub-scroll {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 10px;
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }
    .info-hub-card {
        min-width: 0;
        min-height: 100%;
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 12px 13px;
        border-radius: 14px;
        border: 1px solid var(--border);
        background: #fff;
        box-shadow: 0 6px 14px rgba(26, 26, 26, 0.035);
    }
    .info-hub-card.employee {
        background: #FFFDF7;
        border-color: #F0E4C4;
    }
    .info-hub-card.customer {
        background: #F8FBF8;
        border-color: #D6ECD9;
    }
    .info-hub-card.customer.past-birthday {
        opacity: 0.56;
        filter: saturate(0.72);
        background: #F4F5F1;
        border-color: #D7DACF;
    }
    .info-hub-card.holiday {
        border-color: #E9DCC7;
        border-left: 4px solid var(--holiday-accent, #B36B0C);
    }
    .info-hub-card-head {
        display: flex;
        align-items: flex-start;
        gap: 10px;
    }
    .info-hub-card-avatar {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        font-family: 'Cormorant Garamond', serif;
        font-size: 18px;
        flex-shrink: 0;
    }
    .info-hub-card-avatar.employee {
        background: #F5E5D6;
        color: #B36B0C;
    }
    .info-hub-card-avatar.customer {
        background: #DFF5E1;
        color: #1F6B33;
    }
    .info-hub-card-body {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 4px;
    }
    .info-hub-card-title-row {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 8px;
        flex-wrap: wrap;
    }
    .info-hub-card-title {
        color: #1A1A1A;
        font-size: 14.5px;
        font-weight: 700;
        line-height: 1.3;
        word-break: break-word;
    }
    .info-hub-card-sub {
        color: var(--muted);
        font-size: 12px;
        line-height: 1.4;
    }
    .info-hub-card-highlight {
        font-size: 12px;
        font-weight: 700;
        line-height: 1.4;
    }
    .info-hub-card-highlight.employee {
        color: #B36B0C;
    }
    .info-hub-card-highlight.customer {
        color: #1F6B33;
    }
    .info-hub-card-source {
        font-size: 11.8px;
        color: var(--muted);
        line-height: 1.4;
    }
    .info-hub-chip {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 3px 8px;
        border-radius: 999px;
        font-size: 10px;
        font-weight: 700;
        letter-spacing: 0.28px;
        text-transform: uppercase;
        white-space: nowrap;
    }
    .info-hub-chip.service-used {
        background: #EEF1FB;
        color: #3B4EA6;
    }
    .info-hub-chip.service-new {
        background: #FBF6EA;
        color: #8B6B3F;
    }
    .info-hub-chip.past-birthday {
        background: #ECEFF1;
        color: #5F6B72;
    }
    .info-hub-tag-stack {
        display: inline-flex;
        align-items: center;
        justify-content: flex-end;
        gap: 6px;
        flex-wrap: wrap;
        max-width: 100%;
    }
    .info-hub-card-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 7px;
        margin-top: auto;
    }
    .info-hub-card-actions .btn {
        justify-content: center;
        min-height: 30px;
    }
    .info-hub-holiday-head {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 10px;
    }
    .info-hub-holiday-date {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }
    .info-hub-holiday-day {
        color: var(--holiday-accent, #B36B0C);
        font-family: 'Cormorant Garamond', serif;
        font-size: 24px;
        font-weight: 800;
        line-height: 1;
    }
    .info-hub-holiday-month {
        color: var(--muted);
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.35px;
    }
    .info-hub-empty-state {
        grid-column: 1 / -1;
        padding: 14px 16px;
        border: 1px dashed #D9C8A8;
        border-radius: 14px;
        background: #FCF8F1;
        color: var(--muted);
        font-style: italic;
    }
    @media (max-width: 1680px) {
        .info-hub-scroll {
            grid-template-columns: repeat(4, minmax(0, 1fr));
        }
    }
    @media (max-width: 1380px) {
        .info-hub-scroll {
            grid-template-columns: repeat(3, minmax(0, 1fr));
        }
    }
    @media (max-width: 1100px) {
        .info-hub-scroll {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }
    }
    @media (max-width: 720px) {
        .info-hub-scroll {
            grid-template-columns: 1fr;
        }
    }
    /* Khu Thong tin nhan su */
    .personnel-card-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap:14px; }
    .personnel-card { background:#fff; border:1px solid var(--border); border-radius:14px; padding:16px 18px; display:flex; flex-direction:column; gap:10px; box-shadow:0 4px 14px rgba(0,0,0,0.03); }
    .personnel-card.resigned { opacity:0.86; }
    .personnel-card-head { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; }
    .personnel-card-name { font-family:'Cormorant Garamond',serif; font-size:19px; font-weight:700; color:#1A1A1A; line-height:1.2; }
    .personnel-card-sub { font-size:12.5px; color:var(--muted); margin-top:2px; }
    .personnel-branch-bar { display:grid; grid-template-columns:repeat(auto-fit, minmax(220px, 1fr)); gap:12px; margin:0 0 16px; }
    .personnel-branch-chip { display:flex; flex-direction:column; gap:6px; align-items:flex-start; padding:14px 16px; border-radius:16px; border:1px solid var(--border); background:#fff; color:#4A4A4A; font-family:'Inter',sans-serif; cursor:pointer; transition:all .15s ease; box-shadow:0 4px 14px rgba(0,0,0,0.03); }
    .personnel-branch-chip:hover { border-color:var(--gold); transform:translateY(-1px); }
    .personnel-branch-chip.active { background:#2F3B63; border-color:#2F3B63; color:#fff; }
    .personnel-branch-chip strong { font-size:14px; line-height:1.35; }
    .personnel-branch-chip span { font-size:12px; opacity:0.84; }
    .personnel-branch-chip .branch-count { display:inline-flex; align-items:center; gap:6px; padding:2px 8px; border-radius:999px; background:rgba(0,0,0,0.08); font-size:11px; font-weight:700; }
    .personnel-branch-chip.active .branch-count { background:rgba(255,255,255,0.2); }
    .personnel-status-badge { padding:5px 10px; border-radius:999px; font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:0.4px; white-space:nowrap; }
    .personnel-status-badge.active { background:#DFF5E1; color:#1F6B33; }
    .personnel-status-badge.pending-resignation { background:#FFF3D8; color:#9A6500; }
    .personnel-status-badge.resigned { background:#ECEFF1; color:#455A64; }
    .personnel-tag-row { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
    .personnel-tag-chip { display:inline-flex; align-items:center; gap:6px; padding:4px 10px; border-radius:999px; font-size:11px; font-weight:700; letter-spacing:0.25px; background:#EEF1FB; color:#3B4EA6; }
    .personnel-tag-chip.branch { background:#FFF3D8; color:#9A6500; }
    .personnel-tag-chip.special { background:#FDE7EF; color:#B2386B; }
    .personnel-info-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap:8px 14px; font-size:12.5px; }
    .personnel-info-grid label { display:block; color:var(--muted); font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:0.3px; margin-bottom:2px; }
    .personnel-info-grid span { color:#1A1A1A; font-weight:600; }
    .personnel-card-note { font-size:12.5px; color:#7A5C2E; background:#FFF7EC; border:1px solid #EAD9BF; border-radius:8px; padding:8px 10px; }
    .personnel-card-actions { display:flex; gap:8px; justify-content:flex-end; margin-top:4px; flex-wrap:wrap; }
    .personnel-dept-bar { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 16px; }
    .personnel-dept-chip { display:inline-flex; align-items:center; gap:6px; padding:8px 14px; border-radius:999px; border:1px solid var(--border); background:#fff; color:#4A4A4A; font-family:'Inter',sans-serif; font-size:12.5px; font-weight:700; cursor:pointer; transition:all .15s ease; }
    .personnel-dept-chip:hover { border-color:var(--gold); color:#7b613d; }
    .personnel-dept-chip.active { background:#2F3B63; border-color:#2F3B63; color:#fff; }
    .personnel-dept-chip .dept-count { background:rgba(0,0,0,0.08); border-radius:999px; padding:1px 7px; font-size:11px; }
    .personnel-dept-chip.active .dept-count { background:rgba(255,255,255,0.22); }
    .workspace-chip.clickable { cursor:pointer; transition:transform .12s ease, box-shadow .12s ease; }
    .workspace-chip.clickable:hover { transform:translateY(-1px); box-shadow:0 4px 10px rgba(0,0,0,0.08); }
    .personnel-status-dropdown { position:relative; display:inline-block; }
    .personnel-status-trigger { cursor:pointer; user-select:none; min-height:34px; }
    .personnel-status-trigger::-webkit-details-marker { display:none; }
    .personnel-status-trigger::marker { content:''; }
    .personnel-status-dropdown[open] .personnel-status-trigger { box-shadow:0 6px 16px rgba(176,141,87,0.16); border-color:#D8C29C; }
    .personnel-status-menu { position:absolute; top:calc(100% + 8px); right:0; min-width:250px; padding:8px; border-radius:16px; border:1px solid #E5D8C3; background:#fffdfa; box-shadow:0 18px 36px rgba(0,0,0,0.12); display:grid; gap:6px; z-index:20; }
    .personnel-status-option { display:flex; align-items:center; justify-content:space-between; gap:10px; width:100%; padding:10px 12px; border:none; border-radius:12px; background:#fff; color:#5F574C; font:inherit; font-size:12.5px; font-weight:700; cursor:pointer; text-align:left; }
    .personnel-status-option:hover { background:#FBF6EC; color:#7B613D; }
    .personnel-status-option.active { background:#FBF1DF; color:#7B613D; }
    .personnel-status-option-main { display:inline-flex; align-items:center; gap:8px; }
    .personnel-status-option-count { display:inline-flex; align-items:center; justify-content:center; min-width:28px; padding:2px 8px; border-radius:999px; background:rgba(0,0,0,0.08); font-size:11px; }
    .personnel-form-grid { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:12px 16px; }
    .personnel-form-grid label { display:block; }
    .personnel-form-grid span { display:block; font-size:12px; font-weight:700; letter-spacing:0.3px; text-transform:uppercase; color:var(--muted); margin-bottom:4px; }
    .personnel-form-grid input, .personnel-form-grid select, .personnel-form-grid textarea { width:100%; padding:9px 12px; border:1px solid var(--border); border-radius:10px; font-size:13.5px; font-family:'Inter',sans-serif; background:#fff; }
    .personnel-form-grid .full-row { grid-column: 1 / -1; }
    .personnel-form-section { font-family:'Cormorant Garamond',serif; font-size:16px; font-weight:700; color:#7b613d; border-top:1px solid var(--border); padding-top:12px; margin-top:4px; }
    .personnel-section-card { grid-column:1 / -1; border:1px solid var(--border); border-radius:14px; padding:16px; background:#fbf8f1; }
    .personnel-section-card h3 { margin:0 0 6px; font-family:'Cormorant Garamond',serif; font-size:21px; color:#1A1A1A; }
    .personnel-section-card p { margin:0 0 14px; color:var(--muted); font-size:13px; line-height:1.55; }
    .personnel-history-list { display:flex; flex-direction:column; gap:12px; }
    .personnel-history-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; flex-wrap:wrap; }
    .personnel-history-head strong { color:#1A1A1A; font-size:14px; }
    .personnel-history-grid { display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:10px 12px; }
    .personnel-history-grid label { display:block; }
    .personnel-history-grid span { display:block; font-size:11.5px; font-weight:700; letter-spacing:0.3px; text-transform:uppercase; color:var(--muted); margin-bottom:4px; }
    .personnel-history-grid input, .personnel-history-grid textarea { width:100%; padding:9px 12px; border:1px solid var(--border); border-radius:10px; font-size:13px; font-family:'Inter',sans-serif; background:#fff; }
    .personnel-history-empty { padding:14px; border:1px dashed #D8C5A7; border-radius:12px; background:#FFFCF7; color:var(--muted); font-size:13px; text-align:center; }
    .personnel-inline-actions { display:flex; justify-content:flex-end; margin-top:12px; }
    .personnel-card-section-title { font-size:10.5px; font-weight:800; letter-spacing:0.4px; text-transform:uppercase; color:#B8935A; margin:10px 0 4px; }
    .personnel-info-subgroup {
        grid-column:1 / -1;
        margin-top:4px;
        padding:7px 9px;
        border-left:3px solid var(--gold);
        border-radius:6px;
        background:#F8F3EA;
        color:#725731;
        font-size:10.5px;
        font-weight:800;
        letter-spacing:.35px;
        text-transform:uppercase;
    }
    .personnel-history-item { border:1px solid var(--border); border-radius:10px; padding:8px 10px; margin-bottom:8px; font-size:12px; line-height:1.6; background:#fff; }
    .personnel-history-item b { color:#1A1A1A; }
    .personnel-import-panel { display:grid; grid-template-columns:minmax(180px,.8fr) minmax(240px,1fr) auto auto; gap:12px; align-items:end; padding:16px 18px; margin:0 0 18px; border:1px solid var(--border); border-radius:18px; background:linear-gradient(180deg,#fffdfa 0%,#f7f0e5 100%); box-shadow:0 8px 20px rgba(0,0,0,0.04); }
    .personnel-import-panel label { display:block; margin-bottom:7px; color:var(--muted); font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.5px; }
    .personnel-import-panel select, .personnel-import-panel input { width:100%; padding:10px 12px; border:1px solid var(--border); border-radius:10px; font:inherit; background:#fff; color:var(--charcoal); }
    .personnel-import-status { display:none; grid-column:1 / -1; padding:12px 14px; border-radius:12px; border:1px solid #ead9bf; background:#fff7ec; color:var(--charcoal); font-size:13px; line-height:1.55; }
    .personnel-import-status.success { border-color:#C8E6C9; background:#EBFBEE; color:#1B5E20; }
    .personnel-import-status.error { border-color:#FFCDD2; background:#FFEBEE; color:#B71C1C; }
    .personnel-import-modal { position:fixed; inset:0; z-index:1200; background:rgba(29, 24, 16, 0.34); align-items:center; justify-content:center; padding:24px; }
    .modal-floating-shell { position:relative; }
    .modal-floating-shell-scroll { overflow-y:auto; }
    .modal-floating-close-anchor { position:sticky; top:12px; z-index:40; display:flex; justify-content:flex-end; height:0; pointer-events:none; }
    .modal-floating-close { pointer-events:auto; width:38px; height:38px; border:none; border-radius:999px; background:rgba(245,245,245,0.96); color:#455A64; cursor:pointer; display:flex; align-items:center; justify-content:center; box-shadow:0 10px 24px rgba(0,0,0,0.14); backdrop-filter:blur(6px); }
    .modal-floating-close:hover { background:#fff; color:#1A1A1A; }
    .personnel-import-dialog { width:min(920px, calc(100vw - 32px)); max-height:calc(100vh - 48px); overflow-y:auto; background:#fff; border:1px solid var(--border); border-radius:24px; padding:20px; box-shadow:0 28px 70px rgba(0,0,0,0.22); }
    .personnel-import-dialog-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-bottom:14px; }
    .personnel-import-dialog-title { font-family:'Cormorant Garamond',serif; font-size:30px; font-weight:700; color:#1A1A1A; line-height:1.1; }
    .personnel-import-dialog-sub { margin-top:6px; color:#6E6254; font-size:13px; line-height:1.55; }
    .personnel-import-modal .personnel-import-panel { margin:0; box-shadow:none; }
    .hr-doc-branch-toolbar { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:10px; }
    .hr-doc-matrix-btn[disabled] { opacity:0.56; cursor:not-allowed; filter:saturate(0.7); }
    .hr-doc-matrix-dialog {
        background:#fff;
        border-radius:20px;
        width:min(96vw, 1840px);
        max-height:92vh;
        overflow-y:auto;
        padding:24px;
        box-shadow:0 24px 70px rgba(0,0,0,0.28);
        border-top:4px solid var(--gold);
        display:flex;
        flex-direction:column;
        gap:16px;
        position:relative;
    }
    .hr-doc-matrix-header {
        display:flex;
        align-items:flex-start;
        justify-content:space-between;
        gap:14px;
        flex-wrap:wrap;
        padding-right:40px;
    }
    .hr-doc-matrix-header h2 {
        margin:0;
        font-family:'Cormorant Garamond',serif;
        color:#2C2C2C;
        font-size:30px;
        line-height:1.05;
    }
    .hr-doc-matrix-subtitle {
        margin-top:6px;
        color:var(--muted);
        font-size:13px;
        line-height:1.6;
    }
    .hr-doc-matrix-meta {
        display:flex;
        flex-wrap:wrap;
        gap:8px;
        margin-top:10px;
    }
    .hr-doc-matrix-meta span,
    .hr-doc-matrix-legend span {
        display:inline-flex;
        align-items:center;
        gap:6px;
        padding:6px 10px;
        border-radius:999px;
        background:#F6F0E6;
        border:1px solid #E6D8BE;
        color:#7B613D;
        font-size:11.5px;
        font-weight:700;
    }
    .hr-doc-matrix-meta-control {
        display:inline-flex;
        align-items:center;
        gap:8px;
        padding:6px 10px;
        border-radius:999px;
        background:#F6F0E6;
        border:1px solid #E6D8BE;
        color:#7B613D;
        font-size:11.5px;
        font-weight:700;
    }
    .hr-doc-matrix-meta-control select {
        border:none;
        background:transparent;
        color:#7B613D;
        font:inherit;
        font-weight:800;
        outline:none;
        cursor:pointer;
        min-width:170px;
    }
    .hr-doc-matrix-legend {
        display:flex;
        flex-wrap:wrap;
        gap:8px;
        justify-content:flex-end;
    }
    .hr-doc-matrix-legend .material-icons,
    .hr-doc-matrix-meta .material-icons {
        font-size:15px;
    }
    .hr-doc-matrix-summary {
        display:flex;
        flex-wrap:wrap;
        gap:12px;
    }
    .hr-doc-matrix-summary-card {
        flex:1;
        min-width:180px;
        padding:14px 16px;
        border-radius:16px;
        border:1px solid var(--border);
        background:linear-gradient(180deg,#fffdfa 0%,#f8f1e6 100%);
        box-shadow:0 6px 18px rgba(0,0,0,0.03);
    }
    .hr-doc-matrix-summary-card label {
        display:block;
        margin-bottom:6px;
        color:var(--muted);
        font-size:11px;
        font-weight:800;
        letter-spacing:0.45px;
        text-transform:uppercase;
    }
    .hr-doc-matrix-summary-card strong {
        font-size:26px;
        line-height:1;
        color:#2C2C2C;
    }
    .hr-doc-matrix-summary-card span {
        display:block;
        margin-top:8px;
        color:#786D60;
        font-size:12px;
        line-height:1.45;
    }
    .hr-doc-matrix-toolbar {
        display:grid;
        grid-template-columns:minmax(220px,1.35fr) minmax(220px,1.35fr) repeat(3, minmax(140px, 1fr)) minmax(150px, 1fr) auto;
        gap:10px 12px;
        align-items:end;
        padding:14px 16px;
        border:1px solid #E6D8BE;
        border-radius:18px;
        background:linear-gradient(180deg,#FFFDF9 0%,#F7F0E5 100%);
    }
    .hr-doc-matrix-filter {
        display:flex;
        flex-direction:column;
        gap:5px;
        min-width:0;
    }
    .hr-doc-matrix-filter.wide {
        grid-column:auto / span 2;
    }
    .hr-doc-matrix-filter span {
        font-size:11px;
        font-weight:800;
        letter-spacing:0.38px;
        text-transform:uppercase;
        color:var(--muted);
    }
    .hr-doc-matrix-filter input,
    .hr-doc-matrix-filter select {
        width:100%;
        min-width:0;
        padding:10px 12px;
        border:1px solid var(--border);
        border-radius:12px;
        font:inherit;
        font-size:13px;
        color:#2C2C2C;
        background:#fff;
    }
    .hr-doc-matrix-toolbar-actions {
        display:flex;
        align-items:flex-end;
        justify-content:flex-end;
        gap:8px;
        min-height:100%;
    }
    .hr-doc-matrix-toolbar-actions .btn {
        min-height:42px;
        padding:10px 14px;
        border-radius:12px;
    }
    .hr-doc-matrix-wrapper {
        border:1px solid var(--border);
        border-radius:18px;
        overflow:auto;
        max-height:calc(92vh - 265px);
        background:#fffdfa;
        -webkit-overflow-scrolling:touch;
        overscroll-behavior:contain;
        cursor:grab;
        user-select:none;
    }
    .hr-doc-matrix-wrapper.is-dragging {
        cursor:grabbing;
    }
    .hr-doc-matrix-wrapper.is-dragging * {
        cursor:grabbing !important;
    }
    .hr-doc-matrix-wrapper button,
    .hr-doc-matrix-wrapper input,
    .hr-doc-matrix-wrapper select {
        user-select:auto;
    }
    .hr-doc-matrix-table {
        width:max-content;
        min-width:100%;
        border-collapse:collapse;
        table-layout:fixed;
        font-size:12px;
        color:#2C2C2C;
    }
    .hr-doc-matrix-table th,
    .hr-doc-matrix-table td {
        border:1px solid #E5DCCC;
        padding:8px 6px;
        text-align:center;
        background:#fff;
        white-space:nowrap;
    }
    .hr-doc-matrix-table th {
        position:sticky;
        top:0;
        z-index:5;
        background:var(--charcoal);
        color:var(--gold);
        font-weight:700;
        font-size:11px;
        text-transform:uppercase;
        letter-spacing:0.32px;
        line-height:1.35;
        white-space:normal;
    }
    .hr-doc-matrix-table .sticky-left {
        position:sticky;
        left:0;
        z-index:4;
    }
    .hr-doc-matrix-table th.sticky-left {
        z-index:7;
        background:var(--charcoal);
        color:var(--gold);
    }
    .hr-doc-matrix-table .sticky-left-2 {
        position:sticky;
        left:58px;
        z-index:4;
    }
    .hr-doc-matrix-table th.sticky-left-2 {
        z-index:7;
        background:var(--charcoal);
        color:var(--gold);
    }
    .hr-doc-matrix-table .sticky-left-3 {
        position:sticky;
        left:288px;
        z-index:4;
    }
    .hr-doc-matrix-table th.sticky-left-3 {
        z-index:7;
        background:var(--charcoal);
        color:var(--gold);
    }
    .hr-doc-matrix-table .sticky-left-4 {
        position:sticky;
        left:448px;
        z-index:4;
    }
    .hr-doc-matrix-table th.sticky-left-4 {
        z-index:7;
        background:var(--charcoal);
        color:var(--gold);
    }
    .hr-doc-matrix-table .sticky-right {
        position:sticky;
        right:0;
        z-index:4;
    }
    .hr-doc-matrix-table th.sticky-right {
        z-index:7;
        background:var(--charcoal);
        color:var(--gold);
    }
    .hr-doc-matrix-table td.sticky-left,
    .hr-doc-matrix-table td.sticky-left-2,
    .hr-doc-matrix-table td.sticky-left-3,
    .hr-doc-matrix-table td.sticky-left-4,
    .hr-doc-matrix-table td.sticky-right {
        background:#fffdf9;
    }
    .hr-doc-matrix-table .hr-doc-matrix-col-stt { width:58px; min-width:58px; max-width:58px; }
    .hr-doc-matrix-table .hr-doc-matrix-col-name { width:230px; min-width:230px; max-width:230px; text-align:left; }
    .hr-doc-matrix-table .hr-doc-matrix-col-dept { width:160px; min-width:160px; max-width:160px; text-align:left; }
    .hr-doc-matrix-table .hr-doc-matrix-col-position { width:190px; min-width:190px; max-width:190px; text-align:left; }
    .hr-doc-matrix-table .hr-doc-matrix-col-gender { width:86px; min-width:86px; max-width:86px; }
    .hr-doc-matrix-table .hr-doc-matrix-col-status { width:126px; min-width:126px; max-width:126px; }
    .hr-doc-matrix-table .hr-doc-matrix-col-join { width:118px; min-width:118px; max-width:118px; }
    .hr-doc-matrix-table .hr-doc-matrix-col-resign { width:118px; min-width:118px; max-width:118px; }
    /* O NGAY NGHI phai duoc XUONG DONG.
       Luat chung o tren dat `white-space: nowrap` cho MOI o — dung cho ngay thuong
       (`29/08/2026`) nhung o nhan su SAP NGHI thi noi dung la `Du kien 29/08/2026`, dai gap
       doi ma cot chi rong 118px. `table-layout: fixed` khong cho o no ra, `nowrap` khong cho
       xuong dong, nen chu TRAN sang o ben canh va de len cot chung tu.
       Chi mo cho DUNG cot nay xuong dong; cac cot khac giu `nowrap` la co chu dich. */
    .hr-doc-matrix-table td.hr-doc-matrix-col-resign {
        white-space: normal;
        line-height: 1.28;
        overflow-wrap: anywhere;   /* phong khi dinh dang ngay doi, khong con dau cach de ngat */
    }
    .hr-doc-matrix-table .hr-doc-matrix-current-contract-cell,
    .hr-doc-matrix-table .hr-doc-matrix-current-insurance-cell,
    .hr-doc-matrix-table .hr-doc-matrix-current-cell { width:300px; min-width:300px; max-width:300px; }
    .hr-doc-matrix-table .hr-doc-matrix-dependent-cell { width:190px; min-width:190px; max-width:190px; }
    .hr-doc-matrix-table .hr-doc-matrix-doc-head,
    .hr-doc-matrix-table .hr-doc-matrix-doc-cell { width:220px; min-width:220px; max-width:220px; }
    .hr-doc-matrix-table .hr-doc-matrix-doc-head.doc-submit-short,
    .hr-doc-matrix-table .hr-doc-matrix-doc-cell.doc-submit-short { width:68px; min-width:68px; max-width:68px; }
    .hr-doc-matrix-table .hr-doc-matrix-doc-head.doc-submit-medium,
    .hr-doc-matrix-table .hr-doc-matrix-doc-cell.doc-submit-medium { width:90px; min-width:90px; max-width:90px; }
    .hr-doc-matrix-table .hr-doc-matrix-doc-head.doc-submit-wide,
    .hr-doc-matrix-table .hr-doc-matrix-doc-cell.doc-submit-wide { width:112px; min-width:112px; max-width:112px; }
    .hr-doc-matrix-table .hr-doc-matrix-doc-head.doc-submit-xwide,
    .hr-doc-matrix-table .hr-doc-matrix-doc-cell.doc-submit-xwide { width:140px; min-width:140px; max-width:140px; }
    .hr-doc-matrix-table .hr-doc-matrix-doc-head.doc-number,
    .hr-doc-matrix-table .hr-doc-matrix-doc-cell.doc-number { width:205px; min-width:205px; max-width:205px; }
    .hr-doc-matrix-table .hr-doc-matrix-doc-head.doc-number-wide,
    .hr-doc-matrix-table .hr-doc-matrix-doc-cell.doc-number-wide { width:238px; min-width:238px; max-width:238px; }
    .hr-doc-matrix-table .hr-doc-matrix-total-cell { width:90px; min-width:90px; max-width:90px; font-weight:700; background:#FBF5EA; }
    .hr-doc-matrix-table .hr-doc-matrix-progress-cell { width:94px; min-width:94px; max-width:94px; font-weight:700; }
    .hr-doc-matrix-table .hr-doc-matrix-action-cell { width:112px; min-width:112px; max-width:112px; }
    .hr-doc-matrix-group-row td {
        background:linear-gradient(180deg,#F6EBD5 0%,#F0E2C6 100%);
        color:#71572B;
        font-size:12px;
        font-weight:800;
        text-transform:uppercase;
        letter-spacing:0.35px;
        text-align:left;
        padding:10px 12px;
    }
    .hr-doc-matrix-person-btn {
        border:none;
        background:none;
        padding:0;
        color:#2C2C2C;
        font:inherit;
        font-weight:700;
        text-align:left;
        cursor:pointer;
        line-height:1.45;
    }
    .hr-doc-matrix-person-btn:hover { color:#8A6531; }
    .hr-doc-matrix-subtext {
        display:block;
        margin-top:4px;
        color:var(--muted);
        font-size:11px;
        line-height:1.45;
    }
    .hr-doc-matrix-status-badge {
        display:inline-flex;
        align-items:center;
        justify-content:center;
        padding:5px 10px;
        border-radius:999px;
        font-size:11px;
        font-weight:700;
        line-height:1.2;
    }
    .hr-doc-matrix-status-badge.active { background:#E8F5E9; color:#1F6B33; }
    .hr-doc-matrix-status-badge.pending-resignation { background:#FFF3D8; color:#9A6500; }
    .hr-doc-matrix-status-badge.resigned { background:#ECEFF1; color:#455A64; }
    .hr-doc-matrix-doc-cell {
        font-weight:700;
        line-height:1;
        vertical-align:middle;
    }
    .hr-doc-matrix-doc-cell .material-icons {
        font-size:19px;
        vertical-align:middle;
    }
    .hr-doc-matrix-doc-cell.ok { background:#EDF8EF; color:#1F7A34; }
    .hr-doc-matrix-doc-cell.missing { background:#FFF5F5; color:#C62828; }
    .hr-doc-matrix-doc-cell.na { background:#EFF2F5; color:#7D8A97; }
    .hr-doc-matrix-doc-cell.expired { background:#FFF4E5; color:#C27A00; }
    .hr-doc-matrix-doc-cell.redo { background:#F4EBFF; color:#7B3FD6; }
    .hr-doc-matrix-current-cell {
        white-space:nowrap !important;
        text-align:left !important;
        vertical-align:top;
        line-height:1.38;
        font-size:11.5px;
        overflow:hidden;
        text-overflow:ellipsis;
        padding-top:9px;
        padding-bottom:9px;
        padding-left:12px;
        padding-right:12px;
    }
    .hr-doc-matrix-current-cell span {
        display:block;
        align-items:center;
        width:100%;
        margin:1px 0;
        overflow:hidden;
        text-overflow:ellipsis;
        white-space:nowrap;
    }
    .hr-doc-matrix-fit-line.fit-long {
        font-size:10.8px;
    }
    .hr-doc-matrix-fit-line.fit-xlong {
        font-size:10px;
    }
    .hr-doc-matrix-current-cell b,
    .hr-doc-matrix-doc-detail b {
        margin-right:3px;
    }
    .hr-doc-matrix-current-cell.filled {
        background:#EEF8F0;
        color:#1F6B33;
    }
    .hr-doc-matrix-current-cell.empty {
        background:#FAF6EF;
        color:#8A8175;
        text-align:center;
        vertical-align:middle;
    }
    .hr-doc-matrix-doc-cell.has-detail {
        white-space:nowrap !important;
        text-align:left;
        vertical-align:top;
        padding:8px 7px;
        overflow:hidden;
        text-overflow:ellipsis;
    }
    .hr-doc-matrix-doc-detail {
        display:grid;
        gap:3px;
        line-height:1.3;
        font-size:10.5px;
        min-width:0;
        overflow:hidden;
        white-space:nowrap;
    }
    .hr-doc-matrix-doc-detail span {
        display:block;
        align-items:center;
        overflow:hidden;
        text-overflow:ellipsis;
        white-space:nowrap;
    }
    .hr-doc-matrix-doc-state {
        display:inline-flex !important;
        align-items:center;
        gap:3px;
        color:#1F7A34;
        font-weight:800;
    }
    .hr-doc-matrix-doc-state .material-icons {
        font-size:14px;
    }
    .hr-doc-matrix-row.resigned td { background:#FCFAF6; }
    .hr-doc-matrix-row.resigned .hr-doc-matrix-current-cell.filled { background:#EEF8F0; }
    .hr-doc-matrix-row.resigned .hr-doc-matrix-current-cell.empty { background:#FAF6EF; }
    .hr-doc-matrix-row.resigned .hr-doc-matrix-doc-cell.ok { background:#EDF8EF; }
    .hr-doc-matrix-row.resigned .hr-doc-matrix-doc-cell.missing { background:#FFF5F5; }
    .hr-doc-matrix-row.resigned .hr-doc-matrix-doc-cell.na { background:#EFF2F5; }
    .hr-doc-matrix-row.resigned .hr-doc-matrix-doc-cell.expired { background:#FFF4E5; }
    .hr-doc-matrix-row.resigned .hr-doc-matrix-doc-cell.redo { background:#F4EBFF; }
    .hr-doc-matrix-row.resigned .hr-doc-matrix-person-btn { color:#5E5A54; }
    .hr-doc-matrix-action-btn {
        border:none;
        border-radius:999px;
        padding:8px 12px;
        background:linear-gradient(135deg,#AE7C41 0%,#8C6431 100%);
        color:#fff;
        font-size:11px;
        font-weight:700;
        cursor:pointer;
        display:inline-flex;
        align-items:center;
        gap:5px;
        justify-content:center;
        box-shadow:0 6px 14px rgba(140,100,49,0.18);
    }
    .hr-doc-matrix-action-btn .material-icons { font-size:15px; }
    .hr-doc-matrix-empty {
        padding:24px;
        text-align:center;
        color:var(--muted);
        font-size:13px;
        line-height:1.65;
    }
    .hr-doc-detail-title-row {
        display:flex;
        align-items:center;
        gap:10px;
        flex-wrap:wrap;
        padding-right:36px;
    }
    .hr-doc-detail-edit-info-btn {
        background:#EEF1FB;
        color:#3B4EA6;
        border:1px solid rgba(59,78,166,0.12);
        padding:8px 12px;
        border-radius:10px;
        font-size:12px;
    }
    .hr-doc-detail-edit-info-btn.is-editing {
        background:#FFF3E0;
        color:#B36B0C;
        border-color:rgba(179,107,12,0.18);
    }
    .hr-doc-info-edit-card {
        margin-top:16px;
        padding:16px 18px;
        background:#fff;
        border:1px solid var(--border);
        border-radius:14px;
    }
    .hr-doc-info-edit-guide {
        display:flex;
        align-items:center;
        gap:8px;
        margin-bottom:10px;
        padding:10px 12px;
        border-radius:10px;
        background:#F7F3EB;
        color:#74654E;
        font-size:12.5px;
        line-height:1.45;
    }
    .hr-doc-info-edit-guide .material-icons { font-size:18px; color:var(--gold); }
    .hr-doc-edit-dropdown {
        margin-top:10px;
        border:1px solid #E7DDCC;
        border-radius:12px;
        background:#fff;
        overflow:hidden;
    }
    .hr-doc-edit-dropdown.compact { margin-top:16px; }
    .hr-doc-edit-dropdown-summary {
        list-style:none;
        display:flex;
        align-items:center;
        justify-content:space-between;
        gap:12px;
        min-height:50px;
        padding:11px 14px;
        cursor:pointer;
        user-select:none;
        background:#FBF8F1;
    }
    .hr-doc-edit-dropdown-summary::-webkit-details-marker { display:none; }
    .hr-doc-edit-dropdown-summary:hover { background:#F7F0E4; }
    .hr-doc-edit-dropdown-title,
    .hr-doc-edit-dropdown-meta {
        display:inline-flex;
        align-items:center;
        gap:8px;
    }
    .hr-doc-edit-dropdown-title {
        color:#5F4A2E;
        font-size:13.5px;
        font-weight:800;
        letter-spacing:.15px;
    }
    .hr-doc-edit-dropdown-title .material-icons { color:var(--gold); font-size:19px; }
    .hr-doc-edit-dropdown-meta {
        flex-shrink:0;
        color:#8A8175;
        font-size:11.5px;
        font-weight:700;
    }
    .hr-doc-edit-dropdown-chevron {
        font-size:20px;
        transition:transform .2s ease;
    }
    .hr-doc-edit-dropdown[open] {
        border-color:#D6BE95;
        box-shadow:0 3px 12px rgba(90,67,33,.06);
    }
    .hr-doc-edit-dropdown[open] > .hr-doc-edit-dropdown-summary {
        border-bottom:1px solid #E7DDCC;
        background:#F7F0E4;
    }
    .hr-doc-edit-dropdown[open] > .hr-doc-edit-dropdown-summary .hr-doc-edit-dropdown-chevron { transform:rotate(180deg); }
    .hr-doc-edit-dropdown-body { padding:14px; }
    .hr-doc-info-edit-grid {
        display:grid;
        grid-template-columns:repeat(auto-fit,minmax(190px,1fr));
        gap:10px 12px;
    }
    /* Thanh tieu de cum co the mang mot nut o ben phai (vi du "Điều chỉnh lương"). Dat nut o day
       thi no thuoc ve dung cum, khong troi lo lung giua hai cum. */
    .hr-doc-info-edit-subtitle.has-action {
        display:flex;
        align-items:center;
        justify-content:space-between;
        gap:12px;
        padding-top:5px;
        padding-bottom:5px;
    }
    .hr-doc-info-edit-subtitle.has-action .salary-adjust-btn {
        min-height:30px;
        padding:0 13px;
        font-size:11.5px;
        text-transform:none;
        letter-spacing:0;
    }
    .hr-doc-info-edit-subtitle {
        grid-column:1 / -1;
        margin-top:4px;
        padding:8px 10px;
        border-left:3px solid var(--gold);
        border-radius:6px;
        background:#F8F3EA;
        color:#725731;
        font-size:11.5px;
        font-weight:800;
        letter-spacing:.35px;
        text-transform:uppercase;
    }
    .hr-doc-info-edit-field {
        display:flex;
        flex-direction:column;
        gap:4px;
        min-width:0;
    }
    .hr-doc-info-edit-field.wide {
        grid-column:1 / -1;
    }
    .hr-doc-info-edit-field span {
        font-size:11.5px;
        color:var(--muted);
        font-weight:800;
        letter-spacing:0.28px;
        text-transform:uppercase;
    }
    .hr-doc-info-edit-field input,
    .hr-doc-info-edit-field select,
    .hr-doc-info-edit-field textarea {
        width:100%;
        min-width:0;
        border:1px solid var(--border);
        border-radius:10px;
        padding:9px 10px;
        font:inherit;
        font-size:13px;
        background:#fff;
        color:#2C2C2C;
    }
    .hr-doc-info-edit-field textarea {
        resize:vertical;
        min-height:70px;
    }
    .personnel-record-workbench {
        margin-top:16px;
        color:#2C2C2C;
    }
    .personnel-workbench-intro {
        display:flex;
        align-items:flex-start;
        justify-content:space-between;
        gap:18px;
        padding:18px 20px;
        border:1px solid #E8DDCC;
        border-radius:16px 16px 0 0;
        background:linear-gradient(135deg, #FFFDF9 0%, #F8F1E6 100%);
    }
    .personnel-workbench-eyebrow {
        display:block;
        margin-bottom:5px;
        color:#9A682E;
        font-size:10.5px;
        font-weight:850;
        letter-spacing:1.1px;
        text-transform:uppercase;
    }
    .personnel-workbench-intro h2 {
        margin:0;
        color:#2C2C2C;
        font-family:'Cormorant Garamond', serif;
        font-size:25px;
        line-height:1.1;
    }
    .personnel-workbench-intro p {
        margin:6px 0 0;
        color:#746D64;
        font-size:12.5px;
        line-height:1.55;
    }
    .personnel-workbench-save-note {
        display:inline-flex;
        align-items:center;
        gap:7px;
        flex:0 0 auto;
        max-width:250px;
        padding:9px 12px;
        border:1px solid #E5D4BA;
        border-radius:999px;
        background:rgba(255,255,255,.8);
        color:#765735;
        font-size:11.5px;
        font-weight:750;
        line-height:1.35;
    }
    .personnel-workbench-save-note .material-icons {
        flex:0 0 auto;
        color:var(--gold);
        font-size:17px;
    }
    .personnel-workbench-tabs {
        position:sticky;
        top:-24px;
        z-index:6;
        display:grid;
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:10px;
        padding:12px;
        border:1px solid #E8DDCC;
        background:rgba(255,255,255,.96);
        box-shadow:0 8px 18px rgba(48,38,24,.04);
        backdrop-filter:blur(10px);
    }
    .personnel-workbench-tab {
        min-width:0;
        display:flex;
        align-items:center;
        gap:11px;
        padding:13px 15px;
        border:1px solid #E4DBCE;
        border-radius:13px;
        background:#FAF8F4;
        color:#756A5C;
        font:inherit;
        text-align:left;
        cursor:pointer;
        transition:border-color .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
    }
    .personnel-workbench-tab:hover {
        border-color:#D3B98F;
        background:#FFFDF8;
    }
    .personnel-workbench-tab:focus-visible {
        outline:3px solid rgba(174,124,65,.2);
        outline-offset:2px;
    }
    .personnel-workbench-tab.active {
        border-color:#B78343;
        background:linear-gradient(135deg, #FFF8EC 0%, #F5E6CF 100%);
        color:#67461E;
        box-shadow:0 7px 18px rgba(174,124,65,.12);
    }
    .personnel-workbench-tab > .material-icons {
        flex:0 0 auto;
        width:34px;
        height:34px;
        display:grid;
        place-items:center;
        border-radius:10px;
        background:#EFE8DE;
        color:#8A7355;
        font-size:19px;
    }
    .personnel-workbench-tab.active > .material-icons {
        background:#B78343;
        color:#fff;
    }
    .personnel-workbench-tab span,
    .personnel-workbench-tab b,
    .personnel-workbench-tab small {
        display:block;
        min-width:0;
    }
    .personnel-workbench-tab b {
        color:inherit;
        font-size:13.5px;
        line-height:1.3;
    }
    .personnel-workbench-tab small {
        margin-top:3px;
        color:#8D857B;
        font-size:10.5px;
        line-height:1.35;
    }
    .personnel-workbench-pane {
        padding:14px;
        border:1px solid #E8DDCC;
        border-top:0;
        border-radius:0 0 16px 16px;
        background:#F8F6F2;
    }
    .personnel-workbench-section {
        margin-bottom:12px;
        overflow:hidden;
        border:1px solid #E5DED3;
        border-radius:14px;
        background:#fff;
        box-shadow:0 4px 14px rgba(49,39,26,.025);
    }
    .personnel-workbench-section:last-child { margin-bottom:0; }
    .personnel-workbench-section-head {
        display:flex;
        align-items:flex-start;
        justify-content:space-between;
        gap:12px;
        padding:14px 16px 11px;
        border-bottom:1px solid #EEE8DF;
    }
    .personnel-workbench-section-head h3 {
        margin:0;
        color:#4C3820;
        font-size:14px;
        font-weight:850;
    }
    .personnel-workbench-section-head p {
        margin:4px 0 0;
        color:#837A70;
        font-size:11.5px;
        line-height:1.45;
    }
    .personnel-workbench-section-body { padding:15px 16px 17px; }
    .personnel-workbench-section.documents .personnel-workbench-section-body { padding-top:5px; }
    .personnel-workbench-section.documents .hr-doc-edit-dropdown { margin-top:10px; }
    .personnel-workbench-view-grid {
        grid-template-columns:repeat(3,minmax(0,1fr));
        gap:15px 22px;
    }
    .personnel-workbench-view-grid > div {
        min-width:0;
    }
    .personnel-workbench-view-grid > div.wide { grid-column:span 2; }
    .personnel-workbench-view-grid label {
        display:block;
        margin-bottom:5px;
        color:#8A8175;
        font-size:10.5px;
        font-weight:800;
        letter-spacing:.3px;
        text-transform:uppercase;
    }
    .personnel-workbench-view-grid span {
        display:block;
        color:#292621;
        font-size:13px;
        font-weight:650;
        line-height:1.5;
        overflow-wrap:anywhere;
    }
    .personnel-workbench-view-grid span.danger { color:#B42318; }
    .personnel-workbench-embedded {
        margin-top:14px;
        padding-top:14px;
        border-top:1px dashed #DED4C6;
    }
    .personnel-workbench-compensation-head {
        display:flex;
        align-items:center;
        justify-content:space-between;
        gap:12px;
        margin:4px 0 10px;
        padding:9px 11px;
        border-left:3px solid var(--gold);
        border-radius:7px;
        background:#F8F3EA;
        color:#725731;
        font-size:12px;
    }
    .personnel-workbench-compensation-head:not(:first-child) { margin-top:17px; }
    .personnel-workbench-empty {
        padding:16px;
        border:1px dashed #D9CDBD;
        border-radius:11px;
        color:#81776A;
        font-size:12.5px;
        text-align:center;
    }
    .personnel-record-modal-actions {
        position:sticky;
        bottom:-24px;
        z-index:8;
        margin-left:-24px;
        margin-right:-24px;
        margin-bottom:-24px;
        padding:14px 24px 18px !important;
        background:rgba(255,255,255,.97);
        box-shadow:0 -10px 22px rgba(48,38,24,.07);
        backdrop-filter:blur(10px);
    }
    @media (max-width: 760px) {
        #hrDocDetailModal { padding:0 !important; }
        .personnel-record-modal-shell {
            max-height:100vh !important;
            min-height:100vh;
            border-radius:0 !important;
            padding:18px 14px !important;
        }
        .personnel-workbench-intro {
            display:block;
            padding:15px;
        }
        .personnel-workbench-save-note {
            max-width:none;
            margin-top:11px;
        }
        .personnel-workbench-tabs {
            top:-18px;
            grid-template-columns:1fr;
            gap:7px;
            padding:9px;
        }
        .personnel-workbench-tab { padding:10px 12px; }
        .personnel-workbench-tab > .material-icons {
            width:30px;
            height:30px;
        }
        .personnel-workbench-tab small { display:none; }
        .personnel-workbench-pane { padding:9px; }
        .personnel-workbench-section-head,
        .personnel-workbench-section-body { padding-left:12px; padding-right:12px; }
        .personnel-workbench-view-grid,
        .hr-doc-info-edit-grid { grid-template-columns:1fr; }
        .personnel-workbench-view-grid > div.wide,
        .hr-doc-info-edit-field.wide { grid-column:auto; }
        .personnel-record-modal-actions {
            bottom:-18px;
            margin-left:-14px;
            margin-right:-14px;
            margin-bottom:-18px;
            padding:12px 14px calc(12px + env(safe-area-inset-bottom)) !important;
        }
    }
    .personnel-date-input {
        font-variant-numeric:tabular-nums;
        letter-spacing:.2px;
    }
    .personnel-date-control {
        position:relative;
        display:block;
        width:100%;
        min-width:0;
    }
    .personnel-date-control > .personnel-date-input {
        width:100%;
        padding-right:42px !important;
    }
    .personnel-date-calendar-btn {
        position:absolute;
        z-index:2;
        top:50%;
        right:4px;
        width:34px;
        height:34px;
        padding:0;
        border:0;
        border-radius:8px;
        display:flex;
        align-items:center;
        justify-content:center;
        transform:translateY(-50%);
        line-height:1;
        color:#7A5A31;
        background:transparent;
        cursor:pointer;
    }
    .personnel-date-calendar-btn:hover,
    .personnel-date-calendar-btn:focus-visible {
        color:#9A672A;
        background:#F7ECDD;
        outline:none;
    }
    .personnel-date-calendar-btn .material-icons { font-size:19px; }
    .personnel-native-date-picker {
        position:absolute;
        right:8px;
        top:50%;
        width:1px !important;
        height:1px !important;
        min-width:0 !important;
        padding:0 !important;
        border:0 !important;
        opacity:0;
        pointer-events:none;
        transform:translateY(-50%);
    }
    .personnel-date-input::placeholder { color:#9A9388; opacity:1; }
    .personnel-date-input:invalid {
        border-color:#D44343 !important;
        background:#FFF7F7 !important;
        box-shadow:0 0 0 2px rgba(212,67,67,.08);
    }
    .hr-doc-contract-add-wrap {
        display:flex;
        align-items:center;
        justify-content:flex-end;
        gap:8px;
        flex-wrap:wrap;
        margin-bottom:10px;
    }
    .hr-doc-contract-add-wrap small { color:#8A6531; font-size:11.5px; }
    .hr-doc-contract-add-btn,
    .hr-doc-contract-apply-btn {
        min-height:34px;
        padding:6px 11px;
        border:1px solid #C89B5B;
        border-radius:9px;
        display:inline-flex;
        align-items:center;
        justify-content:center;
        gap:5px;
        background:#FFF8EC;
        color:#7A5422;
        font:inherit;
        font-size:12px;
        font-weight:800;
        cursor:pointer;
    }
    .hr-doc-contract-add-btn .material-icons,
    .hr-doc-contract-apply-btn .material-icons { font-size:17px; }
    .hr-doc-contract-add-btn:hover,
    .hr-doc-contract-apply-btn:hover { background:#F7E9D3; }
    .hr-doc-contract-add-btn:disabled,
    .hr-doc-contract-apply-btn:disabled { opacity:.55; cursor:not-allowed; }
    .hr-doc-contract-apply-btn.active {
        border-color:#4F9B61;
        background:#EAF6EC;
        color:#23743A;
    }
    .hr-doc-contract-edit-btn {
        min-height:34px;
        padding:6px 12px;
        border:1px solid #C89B5B;
        border-radius:9px;
        display:inline-flex;
        align-items:center;
        justify-content:center;
        gap:5px;
        background:#FFF8EC;
        color:#714C1D;
        font:inherit;
        font-size:12px;
        font-weight:800;
        cursor:pointer;
    }
    .hr-doc-contract-edit-btn:hover { background:#F7E9D3; }
    .hr-doc-contract-edit-btn .material-icons { font-size:17px; }
    .hr-doc-contract-modal {
        z-index:10020;
        padding:18px;
    }
    .hr-doc-contract-dialog {
        width:min(860px, 96vw);
        max-height:92vh;
        overflow-y:auto;
        border-top:4px solid var(--gold);
    }
    .hr-doc-contract-form {
        display:grid;
        grid-template-columns:repeat(3, minmax(0, 1fr));
        gap:16px;
        padding-top:6px;
    }
    .hr-doc-contract-form label:not(.hr-doc-contract-apply-choice) {
        display:flex;
        flex-direction:column;
        gap:7px;
        color:#4F4334;
        font-size:13px;
        font-weight:800;
    }
    .hr-doc-contract-form label > span strong { color:#C43D35; }
    .hr-doc-contract-form label > span em { color:#847768; font-weight:600; }
    .hr-doc-contract-standard-name {
        min-height:74px;
        padding:11px 13px;
        border:1px solid #D8CBB9;
        border-radius:11px;
        display:flex;
        flex-direction:column;
        justify-content:center;
        gap:7px;
        background:#F8F2E8;
    }
    .hr-doc-contract-standard-name span {
        color:#756755;
        font-size:12px;
        font-weight:800;
    }
    .hr-doc-contract-standard-name strong {
        color:#5C3D17;
        font-size:14px;
        line-height:1.35;
    }
    .hr-doc-contract-form input[type="text"],
    .hr-doc-contract-form input[type="date"],
    .hr-doc-contract-form select,
    .hr-doc-contract-form input[type="file"] {
        width:100%;
        min-height:48px;
        padding:11px 13px;
        border:1px solid #D8CBB9;
        border-radius:11px;
        background:#FFF;
        color:#241D17;
        font:inherit;
        font-weight:600;
        box-sizing:border-box;
    }
    .hr-doc-contract-form input:focus,
    .hr-doc-contract-form select:focus {
        outline:none;
        border-color:#B9843D;
        box-shadow:0 0 0 3px rgba(185,132,61,.13);
    }
    .hr-doc-contract-form small {
        color:#817568;
        font-size:11.5px;
        font-weight:600;
        line-height:1.45;
    }
    .hr-doc-contract-form .full-row { grid-column:1 / -1; }
    .hr-doc-contract-file-field input[type="file"] { padding:8px 10px; }
    .hr-doc-contract-apply-choice {
        min-height:54px;
        padding:13px 15px;
        border:1px solid #D9C7AC;
        border-radius:12px;
        display:flex;
        align-items:center;
        gap:11px;
        background:#FFF8EC;
        color:#62451F;
        font-size:13px;
        font-weight:800;
        cursor:pointer;
    }
    .hr-doc-contract-apply-choice input {
        width:20px;
        height:20px;
        flex:0 0 auto;
        accent-color:#9A672A;
    }
    .hr-doc-contract-message {
        display:none;
        padding:10px 12px;
        border-radius:9px;
        background:#FFF1F0;
        color:#B42318;
        font-size:12.5px;
        font-weight:700;
    }
    .hr-doc-contract-message.active { display:block; }
    .hr-doc-contract-actions {
        display:flex;
        justify-content:flex-end;
        gap:10px;
        padding-top:2px;
    }
    .hr-doc-contract-actions .btn {
        min-width:145px;
        min-height:46px;
        justify-content:center;
        font-weight:800;
    }
    .hr-doc-contract-actions .material-icons { font-size:18px; }
    @media (max-width:640px) {
        .hr-doc-contract-form { grid-template-columns:1fr; }
        .hr-doc-contract-form .full-row { grid-column:1; }
        .hr-doc-contract-actions { flex-direction:column-reverse; }
        .hr-doc-contract-actions .btn { width:100%; }
    }
    .hr-doc-meta-summary {
        width:100%;
        margin-top:8px;
        display:flex;
        align-items:baseline;
        flex-wrap:wrap;
        column-gap:8px;
        row-gap:2px;
        color:#5F574C;
        font-size:12.5px;
        line-height:1.6;
    }
    .hr-doc-meta-item {
        display:inline-flex;
        align-items:baseline;
        gap:3px;
        max-width:100%;
        white-space:nowrap;
    }
    .hr-doc-meta-item:not(:last-child)::after {
        content:'•';
        margin-left:8px;
        color:#8C826F;
        font-weight:700;
    }
    .hr-doc-contract-scan {
        margin-top:11px;
        padding:10px 12px;
        border:1px dashed #D5BE9A;
        border-radius:11px;
        display:flex;
        align-items:center;
        justify-content:space-between;
        gap:12px;
        background:#FFFBF4;
    }
    .hr-doc-contract-scan.has-file {
        border-style:solid;
        border-color:#BBD9C2;
        background:#F4FBF5;
    }
    .hr-doc-contract-scan-copy {
        min-width:0;
        display:flex;
        align-items:center;
        gap:9px;
        color:#70502A;
    }
    .hr-doc-contract-scan.has-file .hr-doc-contract-scan-copy { color:#2D6F3B; }
    .hr-doc-contract-scan-copy > .material-icons { font-size:22px; flex:0 0 auto; }
    .hr-doc-contract-scan-copy div { display:flex; flex-direction:column; gap:2px; }
    .hr-doc-contract-scan-copy strong { font-size:12.5px; }
    .hr-doc-contract-scan-copy small { color:#7D7366; font-size:11.5px; line-height:1.35; }
    .hr-doc-contract-upload-btn {
        min-height:34px;
        padding:6px 11px;
        border:1px solid #B9843D;
        border-radius:8px;
        display:inline-flex;
        align-items:center;
        justify-content:center;
        gap:5px;
        flex:0 0 auto;
        background:#B9843D;
        color:#FFF;
        font-size:12px;
        font-weight:800;
        cursor:pointer;
    }
    .hr-doc-contract-upload-btn .material-icons { font-size:16px; }
    .hr-doc-contract-upload-btn.disabled { opacity:.55; cursor:not-allowed; }
    .hr-doc-contract-files {
        display:flex;
        flex-direction:column;
        gap:6px;
        margin-top:8px;
    }
    @media (max-width: 640px) {
        .hr-doc-meta-item { white-space:normal; overflow-wrap:anywhere; }
        .hr-doc-contract-scan { align-items:stretch; flex-direction:column; }
        .hr-doc-contract-upload-btn { width:100%; }
    }
    @media (max-width: 640px) { .personnel-form-grid, .personnel-history-grid, .personnel-import-panel { grid-template-columns: 1fr; } }
    @media (max-width: 900px) {
        .hr-doc-branch-toolbar { align-items:stretch; }
        .hr-doc-matrix-dialog {
            width:100vw;
            height:100vh;
            max-height:none;
            border-radius:0;
            padding:18px 14px 16px;
        }
        .hr-doc-matrix-header {
            padding-right:34px;
            gap:10px;
        }
        .hr-doc-matrix-header h2 {
            font-size:24px;
        }
        .hr-doc-matrix-toolbar {
            grid-template-columns:repeat(2, minmax(0, 1fr));
        }
        .hr-doc-matrix-filter.wide,
        .hr-doc-matrix-toolbar-actions { grid-column:1 / -1; }
        .hr-doc-matrix-wrapper {
            max-height:calc(100vh - 280px);
            border-radius:16px;
        }
        .hr-doc-matrix-table th,
        .hr-doc-matrix-table td {
            padding:7px 5px;
            font-size:11px;
        }
        .hr-doc-matrix-table .hr-doc-matrix-col-name { width:180px; min-width:180px; max-width:180px; }
        .hr-doc-matrix-table .sticky-left-2 { left:58px; }
        .hr-doc-matrix-table .sticky-left-3 { left:238px; }
        .hr-doc-matrix-table .sticky-left-4 { left:364px; }
        .hr-doc-matrix-table .hr-doc-matrix-col-dept { width:126px; min-width:126px; max-width:126px; }
        .hr-doc-matrix-table .hr-doc-matrix-col-position { width:150px; min-width:150px; max-width:150px; }
        .hr-doc-matrix-table .hr-doc-matrix-col-gender { width:72px; min-width:72px; max-width:72px; }
        .hr-doc-matrix-table .hr-doc-matrix-col-status { width:106px; min-width:106px; max-width:106px; }
        .hr-doc-matrix-table .hr-doc-matrix-col-join { width:98px; min-width:98px; max-width:98px; }
        .hr-doc-matrix-table .hr-doc-matrix-col-resign { width:98px; min-width:98px; max-width:98px; }
        .hr-doc-matrix-table .hr-doc-matrix-current-contract-cell,
        .hr-doc-matrix-table .hr-doc-matrix-current-insurance-cell,
        .hr-doc-matrix-table .hr-doc-matrix-current-cell { width:270px; min-width:270px; max-width:270px; }
        .hr-doc-matrix-table .hr-doc-matrix-dependent-cell { width:170px; min-width:170px; max-width:170px; }
        .hr-doc-matrix-table .hr-doc-matrix-doc-head,
        .hr-doc-matrix-table .hr-doc-matrix-doc-cell { width:200px; min-width:200px; max-width:200px; }
        .hr-doc-matrix-table .hr-doc-matrix-doc-head.doc-submit-short,
        .hr-doc-matrix-table .hr-doc-matrix-doc-cell.doc-submit-short { width:62px; min-width:62px; max-width:62px; }
        .hr-doc-matrix-table .hr-doc-matrix-doc-head.doc-submit-medium,
        .hr-doc-matrix-table .hr-doc-matrix-doc-cell.doc-submit-medium { width:82px; min-width:82px; max-width:82px; }
        .hr-doc-matrix-table .hr-doc-matrix-doc-head.doc-submit-wide,
        .hr-doc-matrix-table .hr-doc-matrix-doc-cell.doc-submit-wide { width:102px; min-width:102px; max-width:102px; }
        .hr-doc-matrix-table .hr-doc-matrix-doc-head.doc-submit-xwide,
        .hr-doc-matrix-table .hr-doc-matrix-doc-cell.doc-submit-xwide { width:128px; min-width:128px; max-width:128px; }
        .hr-doc-matrix-table .hr-doc-matrix-doc-head.doc-number,
        .hr-doc-matrix-table .hr-doc-matrix-doc-cell.doc-number { width:188px; min-width:188px; max-width:188px; }
        .hr-doc-matrix-table .hr-doc-matrix-doc-head.doc-number-wide,
        .hr-doc-matrix-table .hr-doc-matrix-doc-cell.doc-number-wide { width:220px; min-width:220px; max-width:220px; }
        .hr-doc-matrix-table .hr-doc-matrix-total-cell,
        .hr-doc-matrix-table .hr-doc-matrix-progress-cell { width:78px; min-width:78px; max-width:78px; }
        .hr-doc-matrix-table .hr-doc-matrix-action-cell { width:94px; min-width:94px; max-width:94px; }
    }
    @media (max-width: 640px) {
        .hr-doc-matrix-toolbar {
            grid-template-columns:1fr;
        }
        .hr-doc-matrix-filter.wide,
        .hr-doc-matrix-toolbar-actions { grid-column:auto; }
    }
    .workspace-section-title {
        margin: 0 0 12px;
        font-family: 'Cormorant Garamond', serif;
        font-size: 26px;
        color: var(--charcoal);
    }
    .workspace-section-note {
        margin: 0 0 16px;
        font-size: 13px;
        color: #6f685e;
        line-height: 1.65;
    }
    .workspace-chip-row {
        display:flex;
        flex-wrap:wrap;
        gap:8px;
    }
    .hc-mobile-overview-note {
        display: none;
    }
    .workspace-chip {
        display:inline-flex;
        align-items:center;
        gap:6px;
        padding:8px 10px;
        border-radius:999px;
        border:1px solid #eadfcd;
        background:#fffdfa;
        color:#7b613d;
        font-size:12px;
        font-weight:700;
    }
    .hc-hero {
        display:grid;
        grid-template-columns:minmax(0, 1.18fr) minmax(300px, 0.82fr);
        gap:20px;
    }
    .hc-hero-panel,
    .hc-hero-side,
    .form-card,
    .attendance-board-card,
    .attendance-sync-card,
    .attendance-summary-card,
    .hub-card,
    .req-card,
    .flow-hint,
    .modal-box {
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow);
    }
    .hc-hero-panel {
        background: linear-gradient(135deg, #171717 0%, #1f1b16 100%);
        color:#fff;
        padding:32px 34px;
        position:relative;
        overflow:hidden;
        border:1px solid rgba(174,124,65,0.24);
    }
    .hc-hero-panel::after {
        content:'';
        position:absolute;
        width:250px;
        height:250px;
        border-radius:50%;
        right:-70px;
        bottom:-100px;
        background: radial-gradient(circle, rgba(201,151,62,0.24), transparent 68%);
        pointer-events:none;
    }
    .hc-hero-eyebrow {
        display:inline-flex;
        align-items:center;
        gap:8px;
        padding:7px 12px;
        border-radius:999px;
        background:rgba(255,255,255,0.08);
        color:#e4c79f;
        font-size:11px;
        font-weight:700;
        text-transform:uppercase;
        letter-spacing:1px;
        margin-bottom:16px;
    }
    .hc-hero-panel h1 {
        margin:0 0 12px;
        font-family:'Cormorant Garamond', serif;
        font-size:clamp(34px, 3.8vw, 46px);
        line-height:0.96;
        font-weight:600;
    }
    .hc-hero-panel p {
        margin:0;
        max-width:760px;
        color:rgba(255,255,255,0.78);
        font-size:14px;
        line-height:1.7;
    }
    .hc-hero-chips {
        display:grid;
        grid-template-columns:repeat(3, minmax(0, 1fr));
        gap:12px;
        margin-top:20px;
    }
    .hc-hero-chip {
        padding:14px 15px;
        border-radius:18px;
        background:rgba(255,255,255,0.05);
        border:1px solid rgba(255,255,255,0.08);
    }
    .hc-hero-chip span {
        display:block;
        color:rgba(255,255,255,0.58);
        font-size:10px;
        font-weight:700;
        text-transform:uppercase;
        letter-spacing:1px;
        margin-bottom:5px;
    }
    .hc-hero-chip strong {
        display:block;
        color:#fff;
        font-size:14px;
        line-height:1.45;
    }
    .hc-hero-side {
        background: linear-gradient(180deg, #fffdfa 0%, #f7f1e7 100%);
        padding:24px;
        border:1px solid var(--border);
    }
    .hc-hero-side h3 {
        margin:0 0 8px;
        font-family:'Cormorant Garamond', serif;
        font-size:28px;
        color:var(--charcoal);
    }
    .hc-hero-side p {
        margin:0 0 16px;
        color:#6f685e;
        font-size:13px;
        line-height:1.65;
    }
    .hc-hero-list { display:grid; gap:10px; }
    .hc-hero-item {
        display:flex;
        align-items:center;
        gap:10px;
        padding:12px 14px;
        border-radius:18px;
        background:rgba(255,255,255,0.92);
        border:1px solid #eee1cf;
        color:var(--charcoal);
        font-size:13px;
        font-weight:600;
    }
    .hc-hero-item .material-icons { color:var(--gold); font-size:18px; }

    /* ===== HUB BLOCKS ===== */
    .hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; margin-bottom: 32px; }
    .hub-home-layout {
        display:block;
    }
    .hub-home-panel .hub-grid {
        margin-bottom:0;
        margin-top:18px;
    }
    .hub-home-head {
        display:flex;
        flex-direction:column;
        gap:14px;
        margin-bottom:6px;
    }
    .hub-home-head.tools-only {
        gap: 0;
        margin-bottom: 0;
    }
    .hub-home-head.tools-only .workspace-section-title,
    .hub-home-head.tools-only .workspace-section-note,
    .hub-home-head.tools-only .workspace-chip-row {
        display: none;
    }
    .hub-home-side {
        position:sticky;
        top:24px;
    }
    .hub-card { background: rgba(255,255,255,0.96); border: 1px solid var(--border); border-radius: 22px; padding: 24px; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; gap: 16px; }
    .hub-card:hover { border-color: var(--gold); box-shadow: 0 4px 20px rgba(174,124,65,0.12); transform: translateY(-2px); }
    .hub-card-icon { width: 52px; height: 52px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
    .hub-card-icon.blue  { background: #E3F2FD; color: #1565C0; }
    .hub-card-icon.green { background: #E8F5E9; color: #2E7D32; }
    .hub-card-icon.orange{ background: #FFF3E0; color: #E65100; }
    .hub-card-icon.gold  { background: var(--gold-pale); color: var(--gold); }
    .hub-card-icon.red   { background: #FFF0F0; color: #C92A2A; }
    .hub-card-info h3 { margin: 0 0 4px; font-size: 16px; font-weight: 600; color: var(--charcoal); }
    .hub-card-info p  { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.4; }
    .hub-arrow { color: #bbb; margin-left: auto; flex-shrink: 0; }
    .approval-card-badge {
        margin-left:auto;
        min-width:30px;
        height:30px;
        border-radius:999px;
        display:inline-flex;
        align-items:center;
        justify-content:center;
        background:#C92A2A;
        color:#fff;
        font-size:13px;
        font-weight:800;
        padding:0 9px;
        box-shadow:0 8px 18px rgba(201,42,42,0.18);
    }
    .approval-inbox-card {
        margin-bottom:16px;
        border:1px solid #F0D0C8;
        background:linear-gradient(135deg, #fffafa 0%, #fff7ef 100%);
    }
    .approval-inbox-head {
        display:flex;
        align-items:flex-start;
        justify-content:space-between;
        gap:14px;
        margin-bottom:14px;
    }
    .approval-inbox-title {
        margin:0 0 4px;
        font-family:'Cormorant Garamond', serif;
        font-size:25px;
        color:var(--charcoal);
    }
    .approval-inbox-note {
        margin:0;
        color:#6f685e;
        font-size:13px;
        line-height:1.55;
    }
    .approval-inbox-summary {
        display:flex;
        flex-wrap:wrap;
        gap:8px;
        margin-bottom:12px;
    }
    .approval-inbox-chip {
        display:inline-flex;
        align-items:center;
        gap:6px;
        padding:7px 10px;
        border-radius:999px;
        background:#fff;
        border:1px solid #EADCCA;
        color:#8B6B3F;
        font-size:12px;
        font-weight:800;
    }
    .approval-inbox-list {
        display:grid;
        gap:10px;
    }
    .approval-inbox-item {
        width:100%;
        border:1px solid #EADCCA;
        border-radius:16px;
        background:#fff;
        padding:12px 14px;
        display:flex;
        align-items:center;
        gap:12px;
        text-align:left;
        cursor:pointer;
        transition:0.2s ease;
        font-family:'Inter', sans-serif;
    }
    .approval-inbox-item:hover {
        border-color:var(--gold);
        transform:translateY(-1px);
        box-shadow:0 10px 20px rgba(174,124,65,0.08);
    }
    .approval-inbox-item-icon {
        width:42px;
        height:42px;
        border-radius:14px;
        display:grid;
        place-items:center;
        background:#FFF0F0;
        color:#C92A2A;
        flex-shrink:0;
    }
    .approval-inbox-item-icon.attendance {
        background:#E8F5E9;
        color:#2B8A3E;
    }
    .approval-inbox-item-main {
        flex:1;
        min-width:0;
    }
    .approval-inbox-item-title {
        display:block;
        color:var(--charcoal);
        font-size:14px;
        font-weight:800;
        margin-bottom:4px;
        white-space:nowrap;
        overflow:hidden;
        text-overflow:ellipsis;
    }
    .approval-inbox-item-meta {
        display:block;
        color:#776f65;
        font-size:12px;
        line-height:1.4;
    }
    .approval-inbox-empty {
        padding:16px;
        border-radius:16px;
        background:#fff;
        border:1px dashed #EADCCA;
        color:#7a7167;
        font-size:13px;
        text-align:center;
    }

    /* ===== BACK BUTTON ===== */
    .sub-header { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
    .sub-header.tools-only {
        justify-content: space-between;
        gap: 10px;
        margin-bottom: 18px;
    }
    .sub-header.tools-only .sub-title {
        display: none;
    }
    .sub-header.tools-only .btn-back,
    .sub-header.tools-only .btn,
    .sub-header.tools-only .btn-outline,
    .sub-header.tools-only input[type="month"] {
        min-height: 46px;
        border-radius: 16px;
    }
    .sub-header.tools-only input[type="month"] {
        min-width: 180px;
        padding: 0 14px !important;
        background: #fff;
    }
    .btn-back { display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--white); cursor: pointer; font-size: 13px; font-weight: 600; color: var(--charcoal); transition: all 0.2s; }
    .btn-back:hover { border-color: var(--gold); color: var(--gold); }
    .sub-title { font-family: 'Cormorant Garamond', serif; font-size: 24px; font-weight: 600; color: var(--charcoal); margin: 0; }

    /* ===== FORM TẠO ĐƠN ===== */
    .form-card { background: rgba(255,255,255,0.96); border: 1px solid var(--border); border-radius: 22px; padding: 32px; width: 100%; box-sizing: border-box; }
    .form-section-title { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.5px; color: var(--gold); margin: 24px 0 12px; }
    .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
    @media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
    .form-group { margin-bottom: 16px; }
    .form-group label { display: block; font-size: 13px; font-weight: 500; color: var(--charcoal); margin-bottom: 6px; }
    .form-group input, .form-group select, .form-group textarea {
        width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px;
        font-size: 14px; font-family: 'Inter', sans-serif; background: var(--ivory);
        color: var(--charcoal); outline: none; transition: border 0.2s; box-sizing: border-box;
    }
    .form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--gold); background: white; }
    .form-group textarea { min-height: 100px; resize: vertical; }
    .field-note { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* Inline style block 2 */
/* ===== BUTTONS ===== */
    .btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 24px; border-radius: 6px; font-size: 14px; font-weight: 600; cursor: pointer; border: none; transition: all 0.2s; }
    .btn-primary { background: var(--gold); color: white; }
    .btn-primary:hover { background: #9a6c35; }
    .btn-outline { background: transparent; color: var(--charcoal); border: 1px solid var(--border); }
    .btn-outline:hover { border-color: var(--gold); color: var(--gold); }
    .btn-sm { padding: 7px 16px; font-size: 13px; }
    .btn-approve { background: #2B8A3E; color: white; }
    .btn-approve:hover { background: #236632; }
    .btn-reject { background: #e53935; color: white; }
    .btn-reject:hover { background: #b71c1c; }
    .btn-sign { background: var(--charcoal); color: var(--gold); border: 2px solid var(--gold); font-size: 15px; padding: 13px 28px; letter-spacing: 0.5px; }
    .btn-sign:hover { background: var(--gold); color: white; }
    .btn-push { background: var(--gold); color: white; font-size: 13px; padding: 9px 18px; border-radius: 6px; }
    .btn-push:hover { background: #9a6c35; }

    /* ===== CHỮ KÝ BLOCK ===== */
    .sig-block { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid #D5C4AA; border-radius: 4px; padding: 5px 12px; font-size: 12px; color: var(--charcoal); background: #FDFBF7; margin: 4px 4px 0 0; }
    .sig-block .sig-name { font-weight: 700; color: var(--gold); }
    .sig-block .sig-role { font-size: 11px; color: var(--muted); margin-left: 2px; }
    .sig-block-approved { border-color: #A3D9A5; background: #F0FFF2; }
    .sig-block-rejected { border-color: #FFAAAA; background: #FFF5F5; }

    .push-area { margin-top: 12px; padding: 14px; background: #FBF7EF; border: 1px dashed var(--gold); border-radius: 8px; }
    .push-area .push-label { font-size: 12px; font-weight: 600; color: var(--gold); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
    .push-area .push-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
    .push-area select { padding: 9px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; font-family: 'Inter', sans-serif; background: white; min-width: 220px; }

    .reject-box { margin-top: 12px; padding: 14px 16px; background: #FFF5F5; border: 1px solid #FFC9C9; border-left: 4px solid #e53935; border-radius: 8px; }
    .reject-box .rb-title { font-size: 13px; font-weight: 700; color: #c92a2a; display: flex; align-items: center; gap: 6px; }
    .reject-box .rb-reason { font-size: 13px; color: #842029; margin: 6px 0 10px; font-style: italic; }

    /* ===== TABS ===== */
    .hc-tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 32px; overflow-x: auto; }
    .hc-tab { padding: 12px 24px; font-size: 14px; font-weight: 500; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; white-space: nowrap; transition: all 0.2s; display: flex; align-items: center; gap: 6px; }
    .hc-tab:hover { color: var(--charcoal); }
    .hc-tab.active { color: var(--gold); border-bottom-color: var(--gold); font-weight: 600; }

    /* ===== PANELS ===== */
    .hc-panel { display: none; animation: fadeIn 0.3s ease; }
    .hc-panel.active { display: block; }
    @keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

    /* ===== DANH SÁCH ĐƠN ===== */
    .req-list { display: flex; flex-direction: column; gap: 12px; }
    .req-card { background: rgba(255,255,255,0.96); border: 1px solid var(--border); border-radius: 18px; padding: 20px 24px; display: flex; align-items: flex-start; gap: 16px; transition: all 0.2s; }
    .req-card.clickable { cursor: pointer; }
    .req-card.clickable:hover { border-color: var(--gold); box-shadow: 0 4px 16px rgba(174,124,65,0.1); }
    .req-card .req-icon { width: 44px; height: 44px; border-radius: 50%; background: var(--gold-pale); color: var(--gold); display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; }
    .req-card .req-info { flex: 1; min-width: 0; }
    .req-card .req-title { font-size: 15px; font-weight: 600; color: var(--charcoal); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .req-card .req-meta { font-size: 12px; color: var(--muted); margin-top: 3px; }
    .req-card .req-status { flex-shrink: 0; }

    /* Status badges */
    .status-badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
    .status-processing { background: #FFF8E1; color: #F59E0B; }
    .status-approved  { background: #E8F5E9; color: #2B8A3E; }
    .status-rejected  { background: #FFEBEE; color: #e53935; }
    .status-pending   { background: #E3F2FD; color: #1565C0; }

    /* ===== FLOW HINT ===== */
    .flow-hint { background: linear-gradient(180deg, #fbf4e8 0%, #f7efdf 100%); border: 1px solid var(--border); border-radius: 18px; padding: 14px 18px; margin-bottom: 24px; font-size: 13px; color: #6b5836; display: flex; align-items: center; gap: 10px; }
    .flow-hint b { color: var(--gold); }

    /* ===== MODAL ===== */
    .modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 200; align-items: center; justify-content: center; padding: 20px; }
    .modal-overlay.open { display: flex; }
    .modal-box { background: white; border-radius: 24px; width: 100%; max-width: 680px; max-height: 90vh; overflow-y: auto; position:relative; }
    .modal-header { position:sticky; top:0; z-index:15; padding: 20px 28px 12px; display: flex; align-items: flex-start; justify-content: space-between; background:#fff; border-bottom:1px solid rgba(0,0,0,0.05); }
    .modal-header h3 { font-size: 20px; font-weight: 700; margin: 0; color: var(--charcoal); }
    .modal-close { width:36px; height:36px; border:none; border-radius:999px; background:#F5F5F5; font-size:24px; cursor: pointer; color: var(--muted); line-height: 1; padding: 0; display:inline-flex; align-items:center; justify-content:center; box-shadow:0 8px 18px rgba(0,0,0,0.08); }
    .modal-body { padding: 16px 28px 28px; }

    .timeline { margin: 20px 0 0; }
    .tl-item { display: flex; gap: 14px; margin-bottom: 20px; }
    .tl-icon { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 18px; }
    .tl-icon.done    { background: #E8F5E9; color: #2B8A3E; }
    .tl-icon.pending { background: #E3F2FD; color: #1565C0; }
    .tl-icon.wait    { background: #f5f5f5; color: #aaa; }
    .tl-icon.rejected{ background: #FFEBEE; color: #e53935; }
    .tl-content { flex: 1; }
    .tl-role { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
    .tl-name { font-size: 15px; font-weight: 600; color: var(--charcoal); margin: 2px 0; }
    .tl-comment { font-size: 13px; color: #555; font-style: italic; background: var(--ivory); border-radius: 4px; padding: 6px 10px; margin-top: 4px; }
    .tl-time { font-size: 12px; color: var(--muted); margin-top: 2px; }

    .approve-box { background: var(--gold-pale); border: 1px solid #E5DCCC; border-radius: 8px; padding: 20px; margin-top: 20px; }
    .approve-box h4 { margin: 0 0 12px; font-size: 15px; font-weight: 600; }
    .approve-box textarea { width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 6px; font-family: 'Inter', sans-serif; font-size: 14px; outline: none; resize: vertical; box-sizing: border-box; }
    .approve-btns { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }

    .modal-sigs { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
    .modal-sigs-title { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); margin-bottom: 10px; }
    .modal-sigs-row { display: flex; flex-wrap: wrap; gap: 8px; }

    .empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
    .empty-state i { font-size: 48px; opacity: 0.3; display: block; margin-bottom: 12px; }

    .file-preview { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
    .file-chip { display: flex; align-items: center; gap: 6px; background: var(--gold-pale); color: var(--charcoal); border-radius: 4px; padding: 4px 10px; font-size: 12px; }
    .file-chip button { background: none; border: none; cursor: pointer; color: #999; font-size: 14px; line-height: 1; padding: 0; }

    /* ===== CHẤM CÔNG ===== */
    .smart-input-box {
        background: linear-gradient(180deg, #fffdfa 0%, #faf5ed 100%);
        border: 1px solid #E7D7C0;
        padding: 18px;
        border-radius: 22px;
        margin-bottom: 0;
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.75);
    }
    .smart-input-head {
        display:flex;
        align-items:center;
        justify-content:space-between;
        gap:12px;
        margin-bottom: 12px;
        flex-wrap: wrap;
    }
    .smart-input-box h4 {
        margin: 0;
        font-family: 'Cormorant Garamond', serif;
        font-size: 18px;
        color: var(--gold);
        display: flex;
        align-items: center;
        gap: 8px;
    }
    .smart-input-kicker {
        display:inline-flex;
        align-items:center;
        gap:6px;
        padding:7px 10px;
        border-radius:999px;
        background:#fff;
        border:1px solid #EADCCA;
        color:#8B6B3F;
        font-size:11px;
        font-weight:700;
        letter-spacing:0.3px;
        white-space: nowrap;
    }
    .smart-input-row {
        display:grid;
        grid-template-columns: 200px minmax(0, 1fr) 190px;
        gap: 14px;
        align-items: stretch;
        margin-bottom: 0;
    }
    .smart-input-row input[type="date"],
    .smart-input-row input[type="text"],
    .smart-input-row textarea {
        width: 100%;
        min-width: 0;
        padding: 12px 14px;
        border: 1px solid #E2D4C0;
        border-radius: 14px;
        font-size: 14px;
        font-family: 'Inter', sans-serif;
        background: white;
        outline: none;
        box-sizing: border-box;
    }
    .attendance-date-control {
        position: relative;
        min-width: 0;
        height: 100%;
    }
    .attendance-date-control #attendanceDate {
        height: 100%;
        padding-right: 36px;
    }
    .attendance-date-native-picker {
        position: absolute;
        width: 1px !important;
        height: 1px !important;
        padding: 0 !important;
        opacity: 0;
        pointer-events: none;
    }
    .attendance-date-picker-btn {
        position: absolute;
        top: 50%;
        right: 7px;
        width: 28px;
        height: 28px;
        padding: 0;
        border: 0;
        border-radius: 8px;
        display: grid;
        place-items: center;
        color: var(--charcoal);
        background: transparent;
        cursor: pointer;
        transform: translateY(-50%);
    }
    .attendance-date-picker-btn:hover,
    .attendance-date-picker-btn:focus-visible {
        color: #8A5A1F;
        background: rgba(174,124,65,0.1);
        outline: none;
    }
    .attendance-date-picker-btn .material-icons { font-size: 16px; }
    .smart-input-row textarea {
        resize: vertical;
        min-height: 136px;
    }
    .smart-input-row input:focus {
        border-color: var(--gold);
        box-shadow: 0 0 0 3px rgba(174,124,65,0.08);
    }
    .smart-input-row .btn {
        justify-content:center;
        min-height: 56px;
        border-radius: 14px;
        letter-spacing: 0.6px;
        align-self: stretch;
        font-size: 15px;
    }
    .smart-hint {
        display:flex;
        flex-wrap:wrap;
        gap:8px;
        margin-top: 4px;
    }
    .smart-hint-label {
        font-size: 11px;
        font-weight: 700;
        color: var(--muted);
        text-transform: uppercase;
        letter-spacing: 0.9px;
        padding-top: 6px;
    }
    .smart-hint-chips {
        display:flex;
        flex-wrap:wrap;
        gap:8px;
        flex:1;
    }
    .smart-hint-chip {
        display:inline-flex;
        align-items:center;
        padding:6px 10px;
        border-radius:999px;
        background:#fff;
        border:1px solid #EADCCA;
        color:#8B6B3F;
        font-size:12px;
        font-weight:700;
        line-height:1.2;
    }
    .attendance-confirm-list {
        display:grid;
        gap:12px;
        margin-top: 8px;
    }
    .attendance-confirm-item {
        border:1px solid #E7D7C0;
        border-radius:16px;
        padding:14px;
        background:#FCFBF8;
    }
    .attendance-confirm-item strong {
        display:block;
        color:var(--charcoal);
        font-size:14px;
        margin-bottom:6px;
    }
    .attendance-confirm-item p {
        margin:0 0 8px;
        font-size:12px;
        color:#6D665C;
        line-height:1.5;
        white-space:pre-wrap;
    }
    .attendance-confirm-item .attendance-confirm-meta {
        display:flex;
        flex-wrap:wrap;
        gap:8px;
        margin:0 0 10px;
    }
    .attendance-confirm-item .attendance-confirm-badge {
        display:inline-flex;
        align-items:center;
        gap:6px;
        padding:6px 10px;
        border-radius:999px;
        font-size:11px;
        font-weight:700;
        color:#8B6B3F;
        background:#FFF7EC;
        border:1px solid #E7D7C0;
    }
    .attendance-confirm-item select {
        width:100%;
        padding:10px 12px;
        border:1px solid var(--border);
        border-radius:12px;
        font-size:14px;
        font-family:'Inter', sans-serif;
        background:#fff;
    }
    .attendance-quick-card {
        margin-bottom: 16px;
    }
    .attendance-quick-layout {
        display:block;
    }
    .attendance-quick-card .smart-input-box {
        background: #FCFBF8;
    }
    .attendance-summary-grid {
        display:flex;
        gap:10px;
        margin: 0 0 14px;
        overflow-x:auto;
        padding-bottom: 2px;
        scrollbar-width: thin;
    }
    .attendance-summary-card {
        flex: 0 0 198px;
        min-height: 88px;
        display:flex;
        align-items:flex-start;
        gap:10px;
        background: linear-gradient(180deg, #fffdfa 0%, #f8f2e8 100%);
        border: 1px solid #E9DDCB;
        border-radius: 18px;
        padding: 12px 13px;
        box-shadow: none;
    }
    .attendance-summary-icon {
        width: 34px;
        height: 34px;
        border-radius: 12px;
        display:flex;
        align-items:center;
        justify-content:center;
        flex-shrink:0;
        background:#F4E7D2;
        color: var(--gold);
    }
    .attendance-summary-card.is-good .attendance-summary-icon {
        background:#E8F5E9;
        color:#2B8A3E;
    }
    .attendance-summary-card.is-alert .attendance-summary-icon {
        background:#FFEBEE;
        color:#C62828;
    }
    .attendance-summary-card.is-info .attendance-summary-icon {
        background:#E3F2FD;
        color:#1565C0;
    }
    .attendance-summary-body {
        min-width: 0;
        display:flex;
        flex-direction:column;
    }
    .attendance-summary-card .sum-label {
        display: block;
        font-size: 10px;
        text-transform: uppercase;
        letter-spacing: 0.9px;
        color: var(--muted);
        margin-bottom: 4px;
    }
    .attendance-summary-card .sum-value {
        font-size: 25px;
        line-height: 1;
        font-weight: 700;
        color: var(--charcoal);
        font-family: 'Cormorant Garamond', serif;
    }
    .attendance-summary-card .sum-note {
        margin-top: 6px;
        font-size: 11px;
        color: #6D665C;
        line-height: 1.38;
    }
    .attendance-summary-card.is-alert .sum-value { color: #C62828; }
    .attendance-summary-card.is-info .sum-value { color: #1565C0; }
    .attendance-summary-card.is-good .sum-value { color: #2B8A3E; }

    .attendance-board-card {
        background: rgba(255,255,255,0.96); border: 1px solid var(--border); border-radius: 22px; padding: 18px;
    }
    #moduleAttendanceManager .attendance-board-card {
        grid-column: 1 / -1;
        display: flex;
        flex-direction: column;
        min-height: 620px;
    }
    #moduleAttendanceManager .attendance-summary-grid,
    #moduleAttendanceManager .attendance-sync-note,
    #moduleAttendanceManager .attendance-board-desc,
    #moduleAttendanceManager .workspace-section-note {
        display: none !important;
    }
    .attendance-board-toolbar {
        display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 12px; flex-wrap: wrap;
    }
    .attendance-board-toolbar > * {
        min-width: 0;
    }
    .attendance-board-title { font-size: 18px; font-weight: 700; color: var(--charcoal); margin: 0; }
    .attendance-board-desc { margin: 6px 0 0; font-size: 13px; color: #6D665C; max-width: 620px; line-height: 1.55; }
    .attendance-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
    #moduleAttendanceManager .attendance-board-card:not(.matrix-fullscreen) .attendance-board-toolbar {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 14px;
    }
    #moduleAttendanceManager .attendance-board-card:not(.matrix-fullscreen) .attendance-toolbar-main,
    #moduleAttendanceManager .attendance-board-card:not(.matrix-fullscreen) .attendance-toolbar-secondary {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 8px;
        width: auto;
        max-width: 100%;
    }
    #moduleAttendanceManager .attendance-toolbar-primary-actions {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        flex-wrap: nowrap;
        gap: 8px;
        min-width: 0;
    }
    #moduleAttendanceManager .attendance-board-card:not(.matrix-fullscreen) .attendance-toolbar-main {
        gap: 12px;
    }
    #moduleAttendanceManager .attendance-board-card:not(.matrix-fullscreen) .attendance-toolbar-secondary {
        gap: 6px;
    }
    #moduleAttendanceManager .attendance-board-card:not(.matrix-fullscreen) .attendance-board-heading {
        flex: 0 0 auto;
    }
    #moduleAttendanceManager .attendance-board-card:not(.matrix-fullscreen) .attendance-board-title {
        white-space: nowrap;
        line-height: 1.25;
    }
    #moduleAttendanceManager .attendance-board-card:not(.matrix-fullscreen) #matrixMonth {
        min-height: 38px;
        width: 220px;
    }
    #moduleAttendanceManager .attendance-board-card:not(.matrix-fullscreen) #attendanceMonthCloseBadge {
        min-height: 34px;
        padding: 7px 12px;
        white-space: nowrap;
    }
    #moduleAttendanceManager .attendance-board-card:not(.matrix-fullscreen) #attendanceMatrixRefreshBtn,
    #moduleAttendanceManager .attendance-board-card:not(.matrix-fullscreen) #attendanceMatrixFullscreenBtn,
    #moduleAttendanceManager .attendance-board-card:not(.matrix-fullscreen) #attendanceMonthlyBoardBtn,
    #moduleAttendanceManager .attendance-board-card:not(.matrix-fullscreen) #attendanceMonthCloseBtn,
    #moduleAttendanceManager .attendance-board-card:not(.matrix-fullscreen) #parkingSaveBtn {
        min-height: 34px;
        padding: 7px 12px;
        border-radius: 12px;
        white-space: nowrap;
    }
    .attendance-board-card.matrix-fullscreen .attendance-toolbar-main,
    .attendance-board-card.matrix-fullscreen .attendance-toolbar-primary-actions,
    .attendance-board-card.matrix-fullscreen .attendance-toolbar-secondary {
        display: contents;
    }
    .attendance-board-card.matrix-fullscreen .attendance-board-heading { order: 1; flex: 1 1 360px; }
    .attendance-board-card.matrix-fullscreen #matrixMonth { order: 2; }
    .attendance-board-card.matrix-fullscreen #attendanceMonthCloseBadge { order: 3; }
    .attendance-board-card.matrix-fullscreen #attendanceMonthlyBoardBtn { order: 4; }
    .attendance-board-card.matrix-fullscreen #attendanceMatrixFullscreenBtn { order: 5; }
    .attendance-board-card.matrix-fullscreen #attendanceMonthCloseBtn { order: 6; }
    .attendance-board-card.matrix-fullscreen #parkingSaveBtn { order: 7; }
    .attendance-board-card.matrix-fullscreen #attendanceMatrixRefreshBtn { order: 8; }
    .attendance-month-close-badge {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 8px 12px;
        border-radius: 999px;
        border: 1px solid var(--border);
        background: #FFF8EC;
        color: #8B6B3F;
        font-size: 12px;
        font-weight: 700;
        min-height: 38px;
    }
    .attendance-month-close-badge.closed {
        background: #E8F5E9;
        border-color: #CFE7D3;
        color: #2E7D32;
    }
    .attendance-month-close-badge.open {
        background: #FFF8EC;
        border-color: #E7D8BC;
        color: #8B6B3F;
    }
    .attendance-sync-card {
        border: 1px solid #E8DCC8; border-radius: 22px; background: #FCFBF8; padding: 16px 18px; margin-bottom: 0;
        display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; flex-wrap: wrap;
    }
    #moduleAttendanceManager .attendance-sync-card {
        height: 100%;
    }
    .attendance-sync-copy { flex: 1 1 380px; }
    .attendance-sync-copy,
    .attendance-sync-actions {
        min-width: 0;
    }
    .attendance-sync-title { font-size: 15px; font-weight: 700; color: var(--charcoal); margin-bottom: 4px; }
    .attendance-sync-note { font-size: 12px; color: #6D665C; line-height: 1.55; }
    .attendance-sync-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
    .attendance-sync-badge {
        display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--border);
        background: white; font-size: 12px; color: var(--charcoal); min-height: 38px;
    }
    .attendance-sync-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
    .attendance-sync-chip {
        display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px;
        background: #fff; border: 1px solid #E8DCC8; font-size: 12px; color: var(--charcoal);
    }
    .attendance-sync-chip .dot {
        width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: #C62828;
        box-shadow: 0 0 0 4px rgba(198,40,40,0.08);
    }
    .attendance-sync-chip.online .dot { background: #2E7D32; box-shadow: 0 0 0 4px rgba(46,125,50,0.08); }
    .attendance-sync-meta { font-size: 11px; color: #7A746B; margin-top: 8px; }
    .attendance-control-card {
        display: flex;
        flex-direction: column;
        height: 100%;
        min-width: 0;
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }
    #moduleAttendanceManager .attendance-control-head,
    #moduleAttendanceManager .attendance-control-badge {
        display: none !important;
    }
    .attendance-control-head {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 14px;
        flex-wrap: wrap;
    }
    .attendance-control-head .workspace-section-title {
        margin-bottom: 4px;
    }
    .attendance-control-badge {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 8px 12px;
        border-radius: 999px;
        border: 1px solid #E8DCC8;
        background: #FFF8EC;
        color: #8B6B3F;
        font-size: 12px;
        font-weight: 700;
        white-space: nowrap;
    }
    .attendance-control-grid {
        display: grid;
        grid-template-columns: 1fr !important;
        grid-template-rows: auto minmax(0, 1fr);
        gap: 0;
        align-items: stretch;
        height: 100%;
    }
    .attendance-control-card.single-panel .attendance-control-grid {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr;
    }
    .attendance-control-section,
    .attendance-control-panel {
        min-width: 0;
    }
    .attendance-control-section {
        box-shadow: none;
    }
    .attendance-control-section:first-child {
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }
    .attendance-control-section + .attendance-control-section {
        border-top: 0;
        border-top-left-radius: 0;
        border-top-right-radius: 0;
    }
    .attendance-control-card.single-panel .attendance-control-section:first-child {
        border-radius: 22px;
    }
    .attendance-control-panel {
        border: 1px solid #E8DCC8;
        border-radius: 18px;
        background: #FCFBF8;
        padding: 16px;
    }
    .attendance-control-panel-title {
        font-size: 15px;
        font-weight: 700;
        color: var(--charcoal);
        margin-bottom: 6px;
    }
    .attendance-control-branch .workspace-section-note {
        margin-bottom: 12px;
    }
    .attendance-control-branch-bar {
        margin-top: 0 !important;
    }
    #moduleAttendanceManager .attendance-quick-card {
        margin-bottom: 0;
    }
    #moduleAttendanceManager .attendance-quick-card .attendance-quick-layout {
        display: block;
    }
    .attendance-legend {
        display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; padding: 12px; border: 1px solid #EEE4D5;
        border-radius: 12px; background: #FCFBF8;
    }
    .legend-pill {
        display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 6px 10px;
        font-size: 11px; font-weight: 700; letter-spacing: 0.3px;
    }
    .legend-pill.full { background: #E8F5E9; color: #2E7D32; }
    .legend-pill.late { background: #FFF8E1; color: #9A6500; }
    .legend-pill.half { background: #FFF3E0; color: #E65100; }
    .legend-pill.absent { background: #FFEBEE; color: #C62828; }
    .legend-pill.trip { background: #E0F7FA; color: #00838F; }
    .legend-pill.leave { background: #E8F5E9; color: #388E3C; }
    .legend-pill.pending { background: #F1F3F5; color: #667085; }
    .legend-pill.dot { background: #F8F5EF; color: #5E5341; }
    .legend-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
    .legend-dot.red { background: #e53935; }
    .legend-dot.blue { background: #1565C0; }

    /* Ma trận chấm công */
    .matrix-scroll-sync {
        position: sticky;
        top: 0;
        z-index: 6;
        width: 100%;
        height: 18px;
        overflow-x: auto;
        overflow-y: hidden;
        margin-bottom: 10px;
        border: 1px solid #EEE4D5;
        border-radius: 999px;
        background: linear-gradient(180deg, #FCFBF8 0%, #F6F0E6 100%);
        -webkit-overflow-scrolling: touch;
    }
    .matrix-scroll-sync-track {
        height: 1px;
    }
    .matrix-scroll-wrapper {
        width: 100%;
        overflow: auto;
        -webkit-overflow-scrolling: touch;
        border: 1px solid var(--border);
        border-radius: 8px;
        background: white;
        cursor: grab;
        scrollbar-gutter: stable both-edges;
        overscroll-behavior-x: contain;
        overscroll-behavior-y: auto;
        touch-action: pan-x pan-y;
        outline: none;
    }
    #moduleAttendanceManager .matrix-scroll-wrapper {
        flex: 1;
        min-height: 420px;
        max-height: min(72vh, 820px);
    }
    #moduleAttendanceManager .matrix-scroll-wrapper:focus-visible {
        border-color: rgba(174, 124, 65, 0.78);
        box-shadow: 0 0 0 3px rgba(174, 124, 65, 0.16);
    }
    #moduleAttendanceManager .attendance-board-toolbar,
    #moduleAttendanceManager .attendance-legend,
    #moduleAttendanceManager .matrix-scroll-sync {
        flex-shrink: 0;
    }
    .matrix-scroll-wrapper.dragging {
        cursor: grabbing;
        user-select: none;
    }
    .attendance-board-card.matrix-fullscreen {
        position: fixed;
        inset: 0;
        z-index: 12000;
        margin: 0 !important;
        border-radius: 0 !important;
        padding: 18px !important;
        background: #FFFEFB;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }
    body.attendance-matrix-fullscreen-active {
        overflow: hidden;
    }
    .attendance-board-card.matrix-fullscreen .attendance-board-toolbar,
    .attendance-board-card.matrix-fullscreen .attendance-legend,
    .attendance-board-card.matrix-fullscreen .matrix-scroll-sync {
        flex-shrink: 0;
    }
    .attendance-board-card.matrix-fullscreen .attendance-summary-grid {
        display: none;
    }
    .attendance-board-card.matrix-fullscreen .matrix-scroll-wrapper {
        flex: 1;
        min-height: 0;
        max-height: none;
        overflow: auto;
        border-radius: 14px;
    }
    .matrix-table { width: max-content; min-width: 100%; border-collapse: collapse; font-size: 12px; text-align: center; table-layout: fixed; }
    .matrix-table th, .matrix-table td { border: 1px solid #E5DCCC; padding: 7px 5px; min-width: 32px; position: relative; white-space: nowrap; }
    .matrix-table th { background: var(--charcoal); color: var(--gold); font-weight: 600; font-size: 11px; }
    .matrix-table thead tr:first-child th {
        position: sticky;
        top: 0;
        z-index: 7;
    }
    .matrix-table thead tr:nth-child(2) th {
        position: sticky;
        top: var(--matrix-first-header-height, 31px);
        z-index: 7;
    }
    .matrix-table .matrix-sticky-left {
        position: sticky; left: 0; z-index: 10; background: #FAF7F2;
        box-shadow: 2px 0 5px rgba(0,0,0,0.05); min-width: 130px;
        text-align: left; padding-left: 10px;
    }
    .matrix-table th.matrix-sticky-left { background: var(--charcoal); color: var(--gold); z-index: 11; text-align: center; }
    .matrix-table .matrix-sticky-right {
        position: sticky; right: 0; z-index: 9; background: #FFFDF9; min-width: 170px;
        box-shadow: -2px 0 10px rgba(26,26,26,0.06);
    }
    .matrix-table th.matrix-sticky-right { background: var(--charcoal); color: var(--gold); z-index: 11; }
    .matrix-table .matrix-day-head,
    .matrix-table .matrix-day-weekday,
    .matrix-table .matrix-day-cell {
        width: 48px;
        min-width: 48px;
        max-width: 48px;
        padding-left: 4px;
        padding-right: 4px;
    }
    .matrix-table .matrix-summary-head { min-width: 92px; }
    .matrix-table .matrix-summary-cell { min-width: 92px; white-space: normal; line-height: 1.45; }
    .matrix-table .matrix-employee-cell { width: 220px; min-width: 220px; max-width: 220px; }
    .matrix-table .matrix-export-cell { width: 190px; min-width: 190px; max-width: 190px; }
    .matrix-table .matrix-dept-row td {
        background: linear-gradient(90deg, #F5EDD8 0%, #FCFBF8 100%);
        color: #6B5836;
        font-size: 12px;
        font-weight: 800;
        letter-spacing: 0.4px;
        text-transform: uppercase;
        text-align: left;
        padding: 10px 14px;
        white-space: normal;
    }
    .matrix-table tr.matrix-manager-row td,
    .matrix-table tr.matrix-leadership-row td {
        background-image: linear-gradient(90deg, rgba(174,124,65,0.08) 0%, rgba(174,124,65,0.02) 100%);
    }
    .matrix-table tr.matrix-manager-row .matrix-day-cell,
    .matrix-table tr.matrix-manager-row .matrix-summary-cell,
    .matrix-table tr.matrix-manager-row .matrix-export-cell,
    .matrix-table tr.matrix-leadership-row .matrix-day-cell,
    .matrix-table tr.matrix-leadership-row .matrix-summary-cell,
    .matrix-table tr.matrix-leadership-row .matrix-export-cell {
        font-weight: 700;
    }
    .matrix-table .matrix-employee-name {
        display: block;
        font-size: 12px;
        font-weight: 700;
        color: var(--charcoal);
    }
    .matrix-table .matrix-employee-name.manager {
        font-weight: 900;
        color: #7C5528;
    }
    .matrix-table .matrix-employee-meta {
        display: block;
        margin-top: 2px;
    }
    .matrix-table .matrix-employee-meta.manager {
        font-weight: 800;
        color: #7C5528 !important;
    }
    .cell-full    { background: #E8F5E9 !important; color: #2E7D32; font-weight: 700; }
    .cell-half    { background: #FFF3E0 !important; color: #E65100; font-weight: 700; }
    .cell-absent  { background: #FFEBEE !important; color: #C62828; font-weight: 700; }
    .cell-cong-tac{ background: #E0F7FA !important; color: #00838F; font-weight: 700; }
    .cell-leave   { background: #E8F5E9 !important; color: #388E3C; font-weight: 700; font-style: italic; }
    .cell-holiday { background: #F3E5F5 !important; color: #7B1FA2; font-weight: 700; }
    .cell-empty   { background: #fafafa; color: #ccc; }
    .attendance-checkin-dot { color: #E53935 !important; font-size: 18px; line-height: 1; font-weight: 900; display: inline-block; }
    .attendance-cell-marker {
        position: absolute;
        right: 2px;
        bottom: 1px;
        z-index: 2;
        font-size: 8px;
        font-weight: 900;
        line-height: 1;
        letter-spacing: -0.15px;
        text-transform: uppercase;
        pointer-events: none;
    }
    .attendance-cell-marker.is-late { color: #1565C0; }
    .attendance-cell-marker.is-trip { color: #007C91; }
    .attendance-cell-marker.is-absent { color: #C62828; }
    .attendance-cell-marker.is-leave { color: #2E7D32; }
    .attendance-cell-marker.is-unpaid { color: #8E2430; }
    .attendance-cell-marker.is-off { color: #795548; }
    .attendance-cell-marker.is-leadership { color: #8A5B16; }
    .cell-popover {
        display: none; position: absolute; bottom: calc(100% + 1px); left: 50%; transform: translateX(-50%);
        background: #1A1A1A; color: white; padding: 10px 12px; border-radius: 8px;
        font-size: 11px; z-index: 999; width: 240px; max-width: min(280px, 80vw); text-align: left;
        box-shadow: 0 4px 12px rgba(0,0,0,0.3); white-space: normal; line-height: 1.5;
        pointer-events: none;
    }
    .attendance-popover-list { margin: 0; padding: 0 0 0 17px; }
    .attendance-popover-list li { padding-left: 2px; overflow-wrap: anywhere; }
    .attendance-popover-list li + li { margin-top: 4px; }
    .attendance-popover-list li.is-work-time { color: #FFE2A8; font-weight: 800; }
    td:hover .cell-popover { display: block; }
    .attendance-day-restore-btn {
        position: relative;
        width: 100%;
        margin-top: 9px;
        padding: 7px 9px;
        border: 1px solid rgba(255, 226, 168, 0.62);
        border-radius: 7px;
        background: rgba(255, 255, 255, 0.1);
        color: #FFE2A8;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        font: inherit;
        font-weight: 800;
        line-height: 1.25;
        cursor: pointer;
        pointer-events: auto;
    }
    .attendance-day-restore-btn::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        bottom: -12px;
        height: 12px;
    }
    .attendance-day-restore-btn .material-icons { font-size: 15px; }
    .attendance-day-restore-btn:hover,
    .attendance-day-restore-btn:focus-visible {
        background: #FFF4DD;
        color: #7C5528;
        outline: none;
    }
    .attendance-day-restore-btn:disabled { opacity: 0.7; cursor: wait; }
    .row-total-cell { font-weight: 700; background: var(--gold-pale) !important; color: var(--charcoal); }
    .row-export-wrap { display: flex; align-items: center; justify-content: center; }
    .row-export-note {
        display: block;
        font-size: 11px;
        line-height: 1.35;
        color: var(--muted);
        font-weight: 700;
        text-align: center;
    }
    .row-export-btn {
        border: none; background: linear-gradient(135deg, #AE7C41 0%, #8C6431 100%); color: white; border-radius: 999px;
        padding: 8px 12px; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
        box-shadow: 0 10px 18px rgba(174,124,65,0.18);
    }
    .row-export-btn:hover { transform: translateY(-1px); }

    .attendance-report-modal {
        max-width: 1180px; max-height: calc(100vh - 40px); padding: 0; overflow: hidden;
        display: flex; flex-direction: column;
    }
    .attendance-report-modal .modal-header {
        padding: 24px 28px 18px; border-bottom: 1px solid var(--border); flex-shrink: 0;
    }
    .attendance-report-modal .modal-body { padding: 0; }
    .attendance-modal-meta {
        padding: 16px 28px; display: flex; gap: 12px; flex-wrap: wrap; border-bottom: 1px solid #EFE8DD; background: #FCFBF8;
        flex-shrink: 0;
    }
    .attendance-meta-pill {
        display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; background: white; border: 1px solid var(--border);
        border-radius: 999px; font-size: 12px; color: var(--charcoal);
    }
    .attendance-preview-stage {
        background: linear-gradient(180deg, #F3EEE5 0%, #EEE4D4 100%); padding: 22px;
        flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain;
    }
    .attendance-preview-shell {
        width: min(100%, 840px); margin: 0 auto; background: white; border-radius: 14px; box-shadow: 0 18px 40px rgba(26,26,26,0.12);
        padding: 28px;
    }
    .attendance-preview-loading {
        min-height: 240px; display: flex; align-items: center; justify-content: center; color: #6D665C; font-size: 14px;
    }
    .attendance-report-actions {
        padding: 18px 28px 24px; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
        border-top: 1px solid var(--border); background: white; flex-shrink: 0;
        box-shadow: 0 -10px 24px rgba(26,26,26,0.05);
    }
    .attendance-report-actions-single { justify-content: flex-end; }
    .attendance-export-excel-btn { min-height: 46px; padding: 12px 20px; font-weight: 800; }
    .attendance-download-crm-btn {
        min-height: 46px;
        padding: 12px 20px;
        font-weight: 800;
    }
    .attendance-send-box {
        flex: 1 1 420px; border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; background: #FCFBF8;
    }
    .attendance-send-box .send-title { font-size: 14px; font-weight: 700; color: var(--charcoal); margin-bottom: 6px; }
    .attendance-send-box .send-note { font-size: 12px; color: #6D665C; margin-bottom: 12px; line-height: 1.55; }
    .attendance-send-actions { display: flex; gap: 10px; flex-wrap: wrap; }
    .attendance-report-shell { color: var(--charcoal); }
    .attendance-report-header { text-align: center; padding-bottom: 14px; border-bottom: 2px solid var(--gold); margin-bottom: 14px; }
    .attendance-report-brand {
        font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--gold); font-weight: 700; margin-bottom: 4px;
    }
    .attendance-report-header h1 {
        margin: 0; font-family: 'Cormorant Garamond', serif; font-size: 28px; font-weight: 600; color: var(--charcoal);
    }
    .attendance-report-header p { margin: 6px 0 0; color: #6D665C; font-size: 12px; line-height: 1.5; }
    .attendance-report-meta {
        display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px;
    }
    .attendance-report-meta-card, .attendance-report-stat {
        border: 1px solid var(--border); border-radius: 8px; background: #FCFBF8; padding: 9px 10px;
    }
    .attendance-report-meta-card strong, .attendance-report-stat strong {
        display: block; font-size: 14px; color: var(--charcoal); line-height: 1.3;
    }
    .meta-label {
        display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 0.7px; color: #7A746B; margin-bottom: 4px;
    }
    .attendance-report-summary {
        display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px;
    }
    .attendance-report-stat span {
        display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 0.7px; color: #7A746B; margin-bottom: 4px;
    }
    .attendance-report-table { width: 100%; border-collapse: collapse; font-size: 11px; table-layout: fixed; }
    .attendance-report-table th, .attendance-report-table td { border: 1px solid #D9D1C2; padding: 6px 5px; vertical-align: middle; text-align: center; word-break: break-word; }
    .attendance-report-table th { background: var(--charcoal); color: var(--gold-pale); font-size: 10px; text-transform: uppercase; letter-spacing: 0.4px; }
    .modal-overlay.report-fullscreen-overlay {
        padding: 0 !important;
    }
    .attendance-report-modal.report-fullscreen {
        width: 100vw !important;
        max-width: none !important;
        height: 100vh;
        max-height: none;
        border-radius: 0 !important;
        display: flex;
        flex-direction: column;
    }
    .attendance-report-modal.report-fullscreen .attendance-preview-shell {
        width: max-content;
        min-width: 100%;
        max-width: none;
        margin: 0;
    }
    .attendance-report-modal.report-fullscreen .attendance-preview-stage {
        flex: 1;
        min-height: 0;
        overflow: auto;
    }
    .attendance-report-modal.report-fullscreen .attendance-report-table {
        font-size: 12px;
    }
    .attendance-report-date-cell strong, .attendance-report-daywork-cell strong { display: block; font-size: 12px; color: var(--charcoal); }
    .attendance-report-date-cell span, .attendance-report-daywork-cell span { display: block; margin-top: 2px; color: #6D665C; font-size: 10px; line-height: 1.4; }
    .attendance-report-daywork-cell { background: #FCFBF8; }
    .attendance-report-daywork-cell strong { font-size: 14px; line-height: 1.2; }
    .daywork-label { margin-top: 4px !important; }
    .attendance-report-footer {
        display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; font-size: 10px; color: #6D665C;
    }

    /* Calendar cá nhân */
    .calendar-stage {
        background: rgba(255,255,255,0.96);
        border: 1px solid var(--border);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow);
        padding: 20px;
    }
    .attendance-focus-layout {
        display: contents;
    }
    .calendar-stage-legend {
        display:flex;
        flex-wrap:wrap;
        gap:12px;
        margin-bottom:16px;
        font-size:12px;
    }
    .stats-stage {
        margin-top:16px;
        background:var(--gold-pale);
        border:1px solid var(--border);
        border-radius:18px;
        padding:16px;
        display:none;
    }
    .attendance-month-list {
        display: grid;
        gap: 10px;
    }
    .attendance-month-card {
        width: 100%;
        box-sizing: border-box;
        border: 1px solid #E9DCC8;
        border-radius: 18px;
        background: linear-gradient(180deg, #fffdfa 0%, #f8f2e8 100%);
        padding: 14px 16px;
        text-align: left;
        cursor: pointer;
        transition: 0.2s ease;
        font: inherit;
        color: inherit;
    }
    .attendance-month-card:hover,
    .attendance-month-card.active {
        border-color: var(--gold);
        box-shadow: 0 12px 26px rgba(174,124,65,0.12);
        transform: translateY(-1px);
    }
    .attendance-month-card:focus-visible {
        outline: 3px solid rgba(174,124,65,0.25);
        outline-offset: 2px;
    }
    .attendance-month-card.state-approved {
        border-color: #9ACDA5;
        background: linear-gradient(180deg, #F6FFF8 0%, #EAF7ED 100%);
        box-shadow: inset 4px 0 0 #2E7D32;
    }
    .attendance-month-card.state-approved:hover,
    .attendance-month-card.state-approved.active {
        border-color: #2E7D32;
        box-shadow: inset 4px 0 0 #2E7D32, 0 12px 26px rgba(46,125,50,0.15);
    }
    .attendance-month-card strong {
        display: block;
        font-size: 14px;
        color: var(--charcoal);
        margin-bottom: 6px;
    }
    .attendance-month-card span {
        display: block;
        font-size: 12px;
        color: #6D665C;
        line-height: 1.55;
    }
    .attendance-month-status-line {
        display: inline-flex !important;
        align-items: center;
        gap: 6px;
        width: fit-content;
        margin-bottom: 4px;
        padding: 5px 9px;
        border-radius: 999px;
        background: #F2EEE7;
        color: #665E53 !important;
    }
    .attendance-month-status-line .material-icons {
        font-size: 16px;
    }
    .attendance-month-status-line b {
        font-size: 12px;
        line-height: 1.35;
    }
    .attendance-month-status-line.manager-reviewing {
        background: #EEF1FF;
        color: #4556A6 !important;
    }
    .attendance-month-status-line.hc-reviewing {
        background: #FFF3DF;
        color: #9A5A00 !important;
    }
    .attendance-month-status-line.appeal {
        background: #FFF0EA;
        color: #B34A24 !important;
    }
    .attendance-month-status-line.correction {
        background: #FDECEC;
        color: #B42318 !important;
    }
    .attendance-month-status-line.approved {
        background: #DDF3E2;
        color: #176B2C !important;
    }
    .attendance-month-time {
        margin-top: 2px;
    }
    .attendance-month-document-alert {
        display: flex;
        align-items: center;
        gap: 7px;
        width: 100%;
        margin: 7px 0 5px;
        padding: 8px 10px;
        border: 1px solid #F1A7A1;
        border-radius: 10px;
        background: #FFF1F0;
        color: #B42318;
        text-align: left;
        cursor: pointer;
        font: inherit;
        transition: 0.18s ease;
    }
    .attendance-month-document-alert:hover,
    .attendance-month-document-alert:focus-visible {
        border-color: #D92D20;
        background: #FFE7E5;
        outline: none;
    }
    .attendance-month-document-alert > .material-icons {
        flex: 0 0 auto;
        font-size: 18px;
    }
    .attendance-month-document-alert > span {
        display: flex;
        align-items: baseline;
        flex-wrap: wrap;
        gap: 4px;
        color: inherit;
        font-size: 12px;
        font-weight: 800;
        line-height: 1.4;
    }
    .attendance-month-document-alert small {
        font-size: 11px;
        font-weight: 600;
        color: #C43228;
    }
    .attendance-month-badge {
        display: inline-flex !important;
        align-items: center;
        gap: 6px;
        margin-top: 8px;
        padding: 5px 10px;
        border-radius: 999px;
        background: rgba(174,124,65,0.12);
        color: #8A6332;
        font-size: 11px;
        font-weight: 700;
    }
    .attendance-month-badge .material-icons {
        font-size: 14px;
    }
    .attendance-accepted-badge {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 5px 10px;
        border-radius: 999px;
        background: rgba(46,125,50,0.14);
        color: #1E6B2A;
        font-size: 12px;
        font-weight: 700;
    }
    .attendance-accepted-note {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 10px 14px;
        border-radius: 12px;
        background: #EDF7EF;
        border: 1px solid #C8E6CD;
        color: #1E6B2A;
        font-size: 13px;
        font-weight: 700;
    }
    .attendance-cta-box {
        margin-top: 16px;
        border: 1px solid #E9DCC8;
        border-radius: 20px;
        background: linear-gradient(135deg, #fffdfa 0%, #f7efe2 100%);
        padding: 18px;
        display: none;
    }
    .attendance-cta-box.active {
        display: block;
    }
    .attendance-cta-box h4 {
        margin: 0 0 8px;
        font-size: 18px;
        color: var(--charcoal);
        font-family: 'Cormorant Garamond', serif;
    }
    .attendance-cta-box p {
        margin: 0;
        font-size: 13px;
        color: #6D665C;
        line-height: 1.65;
    }
    .attendance-cta-actions {
        margin-top: 14px;
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }
    .attendance-reconciliation-card {
        margin-top: 16px;
        background: rgba(255,255,255,0.98);
        border: 1px solid var(--border);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow);
        padding: 22px;
        display: none;
    }
    .attendance-reconciliation-card.active {
        display: block;
    }
    .attendance-reconciliation-head {
        display: flex;
        justify-content: space-between;
        gap: 16px;
        align-items: flex-start;
        flex-wrap: wrap;
        margin-bottom: 16px;
    }
    .attendance-reconciliation-head h3 {
        margin: 0 0 6px;
        font-family: 'Cormorant Garamond', serif;
        font-size: 30px;
        color: var(--charcoal);
    }
    .attendance-reconciliation-head p {
        margin: 0;
        color: #6D665C;
        font-size: 13px;
        line-height: 1.6;
        max-width: 760px;
    }
    .attendance-reconciliation-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }
    .attendance-reconciliation-print-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        width: 100%;
        justify-content: flex-end;
    }
    .attendance-reconciliation-meta span {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 8px 12px;
        border: 1px solid #E9DCC8;
        border-radius: 999px;
        background: #FCFBF8;
        font-size: 12px;
        color: var(--charcoal);
    }
    .attendance-reconciliation-sheet {
        border: 1px solid #E7D9C4;
        border-radius: 22px;
        overflow: hidden;
        background: #fff;
    }
    .attendance-sheet-header {
        padding: 24px 22px 18px;
        text-align: center;
        border-bottom: 1px solid #EFE6D8;
        background: linear-gradient(180deg, #fffdfa 0%, #faf6ef 100%);
    }
    .attendance-sheet-header h4 {
        margin: 0;
        font-family: 'Cormorant Garamond', serif;
        font-size: 34px;
        color: var(--charcoal);
    }
    .attendance-sheet-header p {
        margin: 8px 0 0;
        font-size: 13px;
        color: #6D665C;
    }
    .attendance-sheet-employee {
        padding: 14px 22px;
        border-bottom: 1px solid #EFE6D8;
        font-size: 14px;
        color: var(--charcoal);
        background: #fffdfa;
    }
    .attendance-sheet-summary {
        padding: 16px 22px;
        display: grid;
        gap: 12px;
        border-bottom: 1px solid #EFE6D8;
        background: #FCFBF8;
    }
    .attendance-sheet-summary.recheck-locked {
        opacity: 0.58;
        filter: grayscale(0.15);
    }
    .attendance-sheet-summary-row {
        display: grid;
        grid-template-columns: 220px minmax(0, 1fr);
        gap: 12px;
        align-items: flex-start;
    }
    .attendance-sheet-summary-label {
        font-weight: 700;
        color: var(--charcoal);
        font-size: 13px;
    }
    .attendance-sheet-summary textarea {
        width: 100%;
        min-height: 64px;
        resize: vertical;
        border: 1px solid #DECDB4;
        border-radius: 14px;
        padding: 12px 14px;
        font: inherit;
        font-size: 13px;
        background: #fff;
        color: var(--charcoal);
        outline: none;
    }
    .attendance-sheet-summary.recheck-locked textarea {
        background: #F5F1EA;
        cursor: not-allowed;
    }
    .attendance-sheet-summary textarea:focus,
    .attendance-reconciliation-table textarea:focus {
        border-color: var(--gold);
        box-shadow: 0 0 0 3px rgba(174,124,65,0.12);
    }
    .attendance-reconciliation-scroll {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        cursor: grab;
    }
    .attendance-reconciliation-scroll.dragging {
        cursor: grabbing;
        user-select: none;
    }
    .attendance-reconciliation-scrollbar {
        overflow-x: auto;
        overflow-y: hidden;
        height: 18px;
        margin: 14px 22px 12px;
        border: 1px solid #E7D9C4;
        border-radius: 999px;
        background: linear-gradient(180deg, #FCFBF8 0%, #F2E8D9 100%);
        -webkit-overflow-scrolling: touch;
    }
    .attendance-reconciliation-scrollbar-track {
        height: 1px;
    }
    .attendance-reconciliation-table {
        width: 100%;
        min-width: 940px;
        border-collapse: collapse;
        table-layout: fixed;
    }
    .attendance-reconciliation-table col.col-order { width: 4.5%; }
    .attendance-reconciliation-table col.col-date { width: 9%; }
    .attendance-reconciliation-table col.col-credit { width: 8.5%; }
    .attendance-reconciliation-table col.col-weekday { width: 7%; }
    .attendance-reconciliation-table col.col-time { width: 7.5%; }
    .attendance-reconciliation-table col.col-note { width: 15%; }
    .attendance-reconciliation-table col.col-explanation { width: 41%; }
    .attendance-reconciliation-table th,
    .attendance-reconciliation-table td {
        border: 1px solid #E7D9C4;
        padding: 7px 6px;
        vertical-align: middle;
        text-align: center;
        font-size: 12px;
        color: var(--charcoal);
    }
    .attendance-reconciliation-table th {
        background: #1A1A1A;
        color: #F5EDD8;
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    .attendance-reconciliation-table td strong {
        font-size: inherit;
    }
    .attendance-reconciliation-table textarea {
        width: 100%;
        min-height: 58px;
        resize: vertical;
        border: 1px solid #DECDB4;
        border-radius: 10px;
        padding: 8px 10px;
        font: inherit;
        font-size: 12px;
        line-height: 1.4;
        text-align: center;
        background: #fff;
        color: var(--charcoal);
        outline: none;
    }
    .attendance-reconciliation-table tr.is-sunday td {
        background: #FBF8F1;
        color: #8A7A66;
    }
    .attendance-reconciliation-note {
        display: block;
        line-height: 1.35;
        word-break: break-word;
        text-align: center;
    }
    .reconciliation-sunday-note {
        display: inline-flex;
        align-items: center;
        padding: 4px 7px;
        border-radius: 999px;
        background: #F2E8D9;
        color: #6B5836;
        font-size: 11px;
        font-weight: 700;
    }
    .attendance-review-card-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        padding: 16px 18px 18px;
        background: #fff;
    }
    .attendance-review-card-list.hc-review-mode {
        grid-template-columns: 1fr;
    }
    .attendance-review-day-card {
        border: 1.5px solid #333;
        background: #fff;
        display: grid;
        grid-template-columns: 128px minmax(0, 1fr);
        min-height: 118px;
        color: #111;
        overflow: hidden;
    }
    /* Thu gọn 1 dòng khi HC đã bấm Đồng ý/Từ chối cho ngày đó */
    .attendance-review-day-card.collapsed-decision {
        display: flex;
        min-height: 0;
        align-items: center;
        gap: 12px;
        padding: 10px 14px;
        flex-wrap: wrap;
    }
    .attendance-review-day-card.collapsed-decision.approved {
        border-color: #1E6B2A;
        background: #F1F8F1;
    }
    .attendance-review-day-card.collapsed-decision.rejected {
        border-color: #D32F2F;
        background: #FFF3F1;
    }
    .attendance-review-collapsed-date {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        font-size: 13px;
        font-weight: 700;
        color: #1A1A1A;
        min-width: 140px;
    }
    .attendance-review-collapsed-date small {
        font-size: 11px;
        color: #6D665C;
        font-weight: 600;
    }
    .attendance-review-collapsed-state {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-size: 13px;
        font-weight: 700;
        flex: 1 1 auto;
    }
    .attendance-review-day-card.collapsed-decision.approved .attendance-review-collapsed-state { color: #1E6B2A; }
    .attendance-review-day-card.collapsed-decision.rejected .attendance-review-collapsed-state { color: #B71C1C; }
    .attendance-review-collapsed-state .material-icons { font-size: 18px; }
    .attendance-review-collapsed-hint {
        font-size: 11px;
        color: #6D665C;
        font-weight: 500;
        margin-left: 4px;
    }
    .attendance-review-collapsed-actions {
        display: inline-flex;
        gap: 8px;
    }
    .attendance-review-collapsed-actions button {
        padding: 6px 12px;
        font-size: 12px;
        border-radius: 8px;
    }
    /* Cum nut Dong y / Tu choi nho, dat inline canh dong De xuat */
    .attendance-inline-decision {
        display: inline-flex;
        gap: 6px;
        margin-left: 10px;
        align-items: center;
    }
    .attendance-inline-decision-btn {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        padding: 4px 10px;
        border-radius: 999px;
        font-size: 12px;
        font-weight: 700;
        border: 1px solid transparent;
        cursor: pointer;
        transition: transform .1s ease, filter .1s ease;
    }
    .attendance-inline-decision-btn .material-icons { font-size: 14px; }
    .attendance-inline-decision-btn.approve { background: #E7F5EA; color: #1E6B2A; border-color: #C8E6CD; }
    .attendance-inline-decision-btn.reject  { background: #FBEAEA; color: #B71C1C; border-color: #F1C1BE; }
    .attendance-inline-decision-btn:hover { filter: brightness(0.96); transform: translateY(-1px); }
    .attendance-inline-decision-btn:active { transform: translateY(0); }
    /* Trang thai da chon: to hon, dam mau hon, co bong nhe */
    .attendance-inline-decision-btn.approve.is-selected {
        background: #1E6B2A; color: #fff; border-color: #1E6B2A;
        box-shadow: 0 2px 6px rgba(30,107,42,0.35);
    }
    .attendance-inline-decision-btn.reject.is-selected {
        background: #B71C1C; color: #fff; border-color: #B71C1C;
        box-shadow: 0 2px 6px rgba(183,28,28,0.35);
    }
    .attendance-review-day-card.has-review-actions {
        grid-template-columns: 128px minmax(0, 1fr) 124px;
    }
    .attendance-review-day-card.hc-review-card {
        grid-template-columns: 150px minmax(0, 1fr);
    }
    .attendance-review-day-card.hc-review-card.has-review-actions {
        grid-template-columns: 150px minmax(0, 1fr) 154px;
    }
    .attendance-review-day-card.rejected {
        border-color: #D32F2F;
        box-shadow: inset 0 0 0 2px rgba(211,47,47,0.12);
    }
    .attendance-review-day-card.approved {
        border-color: #2B8A3E;
    }
    .attendance-review-day-card.dimmed {
        opacity: 0.34;
        filter: grayscale(0.25);
    }
    .attendance-review-day-card.recheck {
        border-color: #D32F2F;
        box-shadow: 0 0 0 3px rgba(211,47,47,0.16), inset 0 0 0 2px rgba(211,47,47,0.12);
    }
    .attendance-recheck-badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-top: 4px;
        padding: 4px 7px;
        border-radius: 999px;
        background: #FFEBEE;
        color: #B71C1C;
        font-size: 10px;
        font-weight: 900;
        text-transform: uppercase;
        letter-spacing: 0.2px;
    }
    .attendance-recheck-topup {
        margin-bottom: 7px;
        padding: 7px 9px;
        border-radius: 10px;
        background: #FFF5F5;
        border: 1px solid #F2C6C6;
        color: #B71C1C;
        font-size: 12px;
        font-weight: 900;
        line-height: 1.35;
    }
    .attendance-work-adjustment {
        margin-top: 8px;
        padding: 9px;
        border-radius: 12px;
        background: #F8F3EA;
        border: 1px solid #E7D8C2;
        display: grid;
        gap: 7px;
        font-size: 12px;
        color: #4B4033;
    }
    .attendance-work-adjustment.has-dispute {
        border-color: #D86A5A;
        box-shadow: 0 0 0 2px rgba(216,106,90,0.14);
        background: linear-gradient(135deg, #FFF8F5 0%, #FFF2EC 100%);
    }
    .attendance-work-adjustment-row {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
    }
    /* Title chiem het khong gian con lai (flex-basis nho 60px de khong bao gio
       ep dropdown xuong dong duoi). Dropdown/o-locked luon 130px ben phai,
       dam bao tren card hep vẫn cùng hàng. Cac nut Dong y/Tu choi khi hien
       (HC review) co the wrap xuong dong duoi neu that su chat. */
    .attendance-work-adjustment-row > .attendance-work-item-title {
        flex: 1 1 60px;
        min-width: 0;
    }
    .attendance-work-adjustment select,
    .attendance-work-adjustment .attendance-locked-value {
        flex: 0 0 130px;
        border-radius: 10px;
        padding: 8px 10px;
        font: inherit;
        font-size: 13px;
        font-weight: 700;
        text-align: center;
        box-sizing: border-box;
        height: 38px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .attendance-work-adjustment select {
        border: 1.5px solid #DECDB4;
        background: #fff;
        color: #1A1A1A;
        outline: none;
        cursor: pointer;
    }
    .attendance-work-adjustment [data-reconciliation-work-basis],
    .attendance-work-adjustment [data-reconciliation-trip-meal-covered] {
        flex-basis: 250px;
        text-align: left;
    }
    .attendance-work-adjustment [data-reconciliation-meal-reason],
    .attendance-work-adjustment [data-hc-final-meal-reason] {
        flex: 1 1 260px;
        min-width: 180px;
        height: 38px;
        border: 1.5px solid #DECDB4;
        border-radius: 10px;
        padding: 8px 11px;
        background: #fff;
        color: #1A1A1A;
        font: inherit;
        font-size: 13px;
        box-sizing: border-box;
        outline: none;
    }
    .attendance-work-adjustment [data-reconciliation-meal-reason]:focus,
    .attendance-work-adjustment [data-hc-final-meal-reason]:focus {
        border-color: var(--gold, #AE7C41);
        box-shadow: 0 0 0 3px rgba(174,124,65,0.15);
    }
    /* O tinh cong / tang ca da chot cung (khong cho sua) — nhin nhu dropdown
       nhung khong bam duoc, mau nhat hon de phan biet. */
    .attendance-work-adjustment .attendance-locked-value {
        border: 1.5px dashed #D8CDB4;
        background: #FAF6EF;
        color: #4B4033;
    }
    .attendance-work-adjustment select:hover {
        border-color: var(--gold, #AE7C41);
    }
    .attendance-work-adjustment select:focus {
        border-color: var(--gold, #AE7C41);
        box-shadow: 0 0 0 3px rgba(174,124,65,0.15);
    }
    .attendance-work-adjustment strong {
        color: var(--charcoal);
    }
    .attendance-work-item-title {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
        font-size: 13px;
        line-height: 1.35;
        font-weight: 900;
    }
    .attendance-work-item-requested {
        color: #4B4033;
        font-weight: 900;
    }
    .attendance-work-item-mark {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        padding: 0;
        border-radius: 0;
        background: transparent;
        border: none;
        font-size: 13px;
        font-weight: 900;
        line-height: 1.35;
    }
    .attendance-work-item-mark.approved {
        color: #1B8A3A;
    }
    .attendance-work-item-mark.rejected {
        color: #C62828;
    }
    .attendance-work-compare {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        flex-wrap: wrap;
        justify-content: flex-end;
        text-align: right;
    }
    .attendance-work-compare-old {
        color: #C14E42;
        font-weight: 800;
        text-decoration: line-through;
        text-decoration-thickness: 2px;
    }
    .attendance-work-compare-arrow {
        color: #B58645;
        font-weight: 900;
    }
    .attendance-work-compare-new {
        color: #8A5A00;
        font-weight: 900;
    }
    .attendance-work-dispute-alert {
        display: grid;
        gap: 6px;
        padding: 12px 13px;
        border-radius: 12px;
        background: linear-gradient(135deg, #FFF5F2 0%, #FFE9E2 100%);
        border: 1px solid #F0B7A8;
        color: #9D3427;
    }
    .attendance-work-dispute-alert strong {
        color: #A33A2D;
        font-size: 15px;
        line-height: 1.35;
    }
    .attendance-work-dispute-alert span {
        font-size: 14px;
        line-height: 1.55;
        color: #7A3027;
        font-weight: 800;
    }
    .attendance-work-dispute-alert span .attendance-work-compare {
        justify-content: flex-start;
        text-align: left;
        font-size: 17px;
        font-weight: 900;
    }
    .attendance-work-dispute-alert span .attendance-work-compare-old {
        font-size: 17px;
        color: #C13F31;
    }
    .attendance-work-dispute-alert span .attendance-work-compare-arrow,
    .attendance-work-dispute-alert span .attendance-work-compare-new {
        font-size: 17px;
    }
    .attendance-work-final-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        flex-wrap: wrap;
    }
    .attendance-work-final-status {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 5px 10px;
        border-radius: 999px;
        background: rgba(255,255,255,0.75);
        border: 1px solid rgba(155,92,0,0.2);
        color: #8A5A00;
        font-size: 11px;
        font-weight: 900;
        text-transform: uppercase;
        letter-spacing: 0.2px;
    }
    .attendance-work-appeal-ticket {
        display: grid;
        gap: 6px;
        padding: 10px 11px;
        border-radius: 11px;
        background: #FFF6E5;
        border: 1px solid #E9C67D;
    }
    .attendance-work-appeal-ticket strong {
        color: #8A5A00;
    }
    .attendance-work-final {
        display: grid;
        gap: 6px;
        margin-top: 2px;
        padding: 10px 11px;
        border-radius: 12px;
        background: linear-gradient(135deg, #FFF7E4 0%, #F5E6BF 100%);
        border: 1px solid #D9BE79;
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
    }
    .attendance-work-final-title {
        font-size: 10px;
        font-weight: 900;
        color: #8A5A00;
        text-transform: uppercase;
        letter-spacing: 0.4px;
    }
    .attendance-work-final-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 8px;
    }
    .attendance-work-final-box {
        position: relative;
        min-width: 0;
        padding: 8px 9px;
        border-radius: 10px;
        background: rgba(255,255,255,0.88);
        border: 1px solid rgba(138,90,0,0.2);
        text-align: center;
    }
    .attendance-work-final-box.approved {
        border-color: rgba(43,138,62,0.38);
        box-shadow: inset 0 0 0 1px rgba(43,138,62,0.08);
    }
    .attendance-work-final-box.rejected {
        border-color: rgba(198,40,40,0.36);
        box-shadow: inset 0 0 0 1px rgba(198,40,40,0.08);
    }
    .attendance-work-final-label {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        margin-bottom: 3px;
        font-size: 10px;
        font-weight: 800;
        color: #7B6745;
        text-transform: uppercase;
    }
    .attendance-work-final-label-mark {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 19px;
        height: 19px;
        border-radius: 999px;
        font-size: 15px;
        font-weight: 900;
    }
    .attendance-work-final-label-mark.approved {
        background: #E8F5E9;
        color: #1B8A3A;
    }
    .attendance-work-final-label-mark.rejected {
        background: #FFEBEE;
        color: #C62828;
    }
    .attendance-work-final-value {
        display: block;
        font-size: 18px;
        line-height: 1.1;
        font-weight: 900;
        color: #9B5C00;
    }
    .attendance-work-final-box.locked {
        background: #F7F4EE;
        border-style: dashed;
    }
    .attendance-work-final-box.locked .attendance-work-final-value {
        color: #5F574D;
    }
    .attendance-work-final-box.meal-box .attendance-work-final-value {
        font-size: 16px;
    }
    .attendance-work-status {
        display: inline-flex;
        align-items: center;
        width: fit-content;
        padding: 4px 8px;
        border-radius: 999px;
        background: #EFE6D8;
        color: #6B5836;
        font-size: 11px;
        font-weight: 900;
    }
    .attendance-work-status.deducted,
    .attendance-work-status.appeal_rejected {
        background: #FFEBEE;
        color: #B71C1C;
    }
    .attendance-work-status.appeal_pending {
        background: #FFF4D6;
        color: #8A5A00;
    }
    .attendance-work-status.approved,
    .attendance-work-status.appeal_approved {
        background: #E8F5E9;
        color: #1B5E20;
    }
    .attendance-work-adjustment.is-user-view {
        background: #FBF8F1;
    }
    .attendance-work-appeal-cta {
        margin-top: 2px;
        padding: 12px;
        border-radius: 14px;
        background: linear-gradient(135deg, #FFF1EE 0%, #FFE1DA 100%);
        border: 1px solid #F2B2A6;
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.75);
    }
    .attendance-work-appeal-button {
        width: 100%;
        min-height: 52px;
        border: none;
        border-radius: 12px;
        background: linear-gradient(135deg, #D64232 0%, #B82118 100%);
        color: #fff;
        font-size: 19px;
        font-weight: 900;
        letter-spacing: 0.1px;
        box-shadow: 0 10px 24px rgba(182,33,24,0.22);
    }
    .attendance-work-appeal-button:hover {
        filter: brightness(1.03);
    }
    .attendance-work-appeal-button:active {
        transform: translateY(1px);
    }
    .attendance-review-day-main {
        background: #f2f2f2;
        border-right: 1.5px solid #333;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        text-align: center;
        padding: 10px 8px;
    }
    .attendance-review-day-main span {
        font-size: 12px;
        font-weight: 800;
        color: #555;
    }
    .attendance-review-day-main strong {
        font-family: "Times New Roman", serif;
        font-size: 27px;
        line-height: 1;
    }
    .attendance-review-day-main b {
        font-size: 15px;
    }
    .attendance-review-credit {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 72px;
        max-width: 170px;
        padding: 5px 10px;
        border-radius: 999px;
        border: 1px solid #aaa;
        background: #fff;
        font-size: 13px;
        font-weight: 800;
        text-align: center;
        line-height: 1.28;
        white-space: normal;
    }
    .attendance-review-day-body {
        display: grid;
        grid-template-rows: auto 1fr;
        min-width: 0;
    }
    .attendance-review-day-top {
        display: grid;
        grid-template-columns: 78px 78px 68px minmax(0, 1fr);
        border-bottom: 1.5px solid #333;
    }
    .attendance-review-day-card.hc-review-card .attendance-review-day-top {
        grid-template-columns: 92px 92px 86px minmax(180px, 1fr);
    }
    .attendance-review-cell {
        padding: 7px 8px;
        text-align: center;
        border-right: 1.5px solid #333;
        min-width: 0;
    }
    .attendance-review-day-card.hc-review-card .attendance-review-cell {
        padding: 8px 10px;
    }
    .attendance-review-cell:last-child {
        border-right: 0;
    }
    .attendance-review-label {
        display: block;
        font-size: 10px;
        text-transform: uppercase;
        font-weight: 800;
        color: #555;
        margin-bottom: 3px;
    }
    .attendance-review-value {
        display: block;
        font-size: 15px;
        line-height: 1.2;
        font-weight: 700;
        word-break: break-word;
    }
    .attendance-review-day-card.hc-review-card .attendance-review-value {
        font-size: 14px;
    }
    .attendance-review-day-card.hc-review-card .attendance-review-cell:last-child .attendance-review-value {
        line-height: 1.45;
        word-break: normal;
        overflow-wrap: anywhere;
    }
    .attendance-review-note-empty {
        color: #999;
        font-style: italic;
        font-weight: 800;
    }
    .attendance-review-explanation {
        padding: 8px 10px;
        min-width: 0;
    }
    .attendance-review-day-card.hc-review-card .attendance-review-explanation {
        padding: 10px 12px;
    }
    .attendance-review-explanation textarea {
        width: 100%;
        min-height: 56px;
        border: 0;
        outline: none;
        resize: vertical;
        font: inherit;
        font-size: 14px;
        line-height: 1.35;
        font-weight: 800;
        color: #111;
        background: transparent;
        padding: 0;
    }
    .attendance-review-explanation textarea.rejected {
        border: 1.5px solid #D32F2F;
        border-radius: 10px;
        background: #FFF1F1;
        padding: 8px 10px;
        color: #B71C1C;
    }
    .attendance-review-explanation textarea:disabled {
        color: #7A746B;
        cursor: not-allowed;
    }
    .attendance-review-reject-note {
        margin-top: 6px;
        padding: 7px 9px;
        border-radius: 10px;
        background: #FFEBEE;
        color: #B71C1C;
        font-size: 12px;
        font-weight: 800;
        line-height: 1.35;
    }
    .attendance-review-reject-note span {
        display: block;
        margin-top: 3px;
        font-weight: 700;
    }
    .attendance-review-actions {
        border-left: 1.5px solid #333;
        background: #FDF7EF;
        display: grid;
        grid-template-rows: 1fr 1fr;
        min-width: 0;
    }
    .attendance-review-day-card.hc-review-card .attendance-review-actions {
        align-self: stretch;
        min-height: 100%;
        grid-template-rows: minmax(96px, 1fr) minmax(96px, 1fr);
    }
    .attendance-review-action {
        border: 0;
        border-bottom: 1.5px solid #333;
        background: #fff;
        font: inherit;
        font-size: 11px;
        font-weight: 900;
        color: #2B8A3E;
        cursor: pointer;
        padding: 9px 7px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        line-height: 1.25;
        text-transform: uppercase;
        letter-spacing: 0.2px;
    }
    .attendance-review-day-card.hc-review-card .attendance-review-action {
        font-size: 13px;
        padding: 10px 8px;
    }
    .attendance-review-action:last-child {
        border-bottom: 0;
        color: #D32F2F;
    }
    .attendance-review-action.active.approve {
        background: #E8F5E9;
        color: #1B5E20;
        box-shadow: inset 4px 0 0 #2B8A3E;
    }
    .attendance-review-action.active.reject {
        background: #FFEBEE;
        color: #B71C1C;
        box-shadow: inset 4px 0 0 #D32F2F;
    }
    .attendance-review-action:disabled {
        cursor: not-allowed;
        opacity: 0.58;
    }
    .attendance-review-actions.is-final {
        grid-template-rows: 1fr;
    }
    .attendance-review-day-card.hc-review-card .attendance-review-actions.is-final {
        display: flex;
    }
    .attendance-review-decision-state {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 7px;
        min-height: 100%;
        padding: 12px 8px;
        text-align: center;
        font-size: 12px;
        font-weight: 900;
        line-height: 1.25;
        text-transform: uppercase;
        letter-spacing: 0.2px;
    }
    .attendance-review-day-card.hc-review-card .attendance-review-decision-state {
        flex: 1;
        height: 100%;
        padding: 14px 10px;
    }
    .attendance-review-decision-state .material-icons {
        font-size: 24px;
    }
    .attendance-review-decision-state small {
        display: block;
        font-size: 10px;
        font-weight: 800;
        opacity: 0.72;
        text-transform: none;
        letter-spacing: 0;
    }
    .attendance-review-decision-state.can-change {
        cursor: pointer;
    }
    .attendance-review-decision-state.approved {
        background: #E8F5E9;
        color: #1B5E20;
        box-shadow: inset 5px 0 0 #2B8A3E;
    }
    .attendance-review-decision-state.rejected {
        background: #FFEBEE;
        color: #B71C1C;
        box-shadow: inset 5px 0 0 #D32F2F;
    }
    .attendance-line-reject-modal {
        max-width: 760px;
    }
    .attendance-line-reject-box {
        display: grid;
        gap: 12px;
    }
    .attendance-line-reject-context {
        padding: 13px 15px;
        border-radius: 16px;
        border: 1px solid #F2C6C6;
        background: #FFF5F5;
        color: #842029;
        font-size: 13px;
        line-height: 1.55;
    }
    .attendance-line-reject-box textarea {
        width: 100%;
        min-height: 190px;
        resize: vertical;
        border: 1px solid #DECDB4;
        border-radius: 16px;
        padding: 14px 16px;
        font: inherit;
        font-size: 14px;
        outline: none;
    }
    .attendance-line-reject-actions {
        display: flex;
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 10px;
    }
    .attendance-sheet-total {
        padding: 14px 22px;
        display: flex;
        justify-content: space-between;
        gap: 12px;
        align-items: center;
        background: #fffdfa;
        border-top: 1px solid #EFE6D8;
        font-size: 13px;
        color: var(--charcoal);
    }
    .attendance-sheet-signatures {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        padding: 18px 22px 22px;
        border-top: 1px solid #EFE6D8;
        background: #fff;
        text-align: center;
    }
    .attendance-signature-box {
        min-height: 108px;
        border: 1px solid #E7D9C4;
        border-radius: 16px;
        padding: 12px;
        position: relative;
        background: #fffdfa;
        color: var(--charcoal);
    }
    .attendance-signature-title {
        font-size: 13px;
        text-transform: uppercase;
        letter-spacing: 0.4px;
        font-weight: 800;
    }
    .attendance-signature-stamp {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin: 18px auto 12px;
        min-width: 128px;
        min-height: 34px;
        padding: 5px 14px;
        border: 2px solid #2B8A3E;
        border-radius: 6px;
        color: #2B8A3E;
        font-size: 12px;
        font-weight: 900;
        transform: rotate(-6deg);
        text-transform: uppercase;
        letter-spacing: 0.4px;
        background: rgba(255,255,255,0.72);
    }
    .attendance-signature-stamp.pending {
        border-color: #9C8B73;
        color: #7A6B58;
        transform: none;
    }
    .attendance-signature-stamp.reject {
        border-color: #D32F2F;
        color: #D32F2F;
    }
    .attendance-signature-image {
        display: block;
        width: 170px;
        max-width: 100%;
        height: 52px;
        margin: 9px auto 5px;
        object-fit: contain;
    }
    .attendance-signature-name {
        font-family: 'Cormorant Garamond', serif;
        font-size: 20px;
        font-weight: 700;
        color: var(--gold);
        min-height: 24px;
    }
    .attendance-signature-date {
        font-size: 12px;
        color: #6D665C;
        font-style: italic;
        margin-top: 4px;
    }
    .attendance-print-root {
        display: none;
    }
    .attendance-sheet-actions {
        padding: 18px 22px 22px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 14px;
        flex-wrap: wrap;
        background: #FCFBF8;
        border-top: 1px solid #EFE6D8;
    }
    .attendance-sheet-action-buttons {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    .attendance-manager-review {
        border: 1px solid #E9DCC8;
        border-radius: 16px;
        background: #fffdfa;
        padding: 14px;
        display: grid;
        gap: 10px;
        min-width: min(100%, 420px);
    }
    .attendance-manager-review textarea {
        width: 100%;
        min-height: 74px;
        border: 1px solid #DECDB4;
        border-radius: 12px;
        padding: 10px 12px;
        resize: vertical;
        font: inherit;
        font-size: 13px;
        outline: none;
    }
    .work-assignment-hero {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 14px;
        padding: 12px 16px;
        border: 1px solid var(--border);
        border-radius: 20px;
        background: linear-gradient(135deg, #FFFDF9 0%, #F7EFE3 100%);
        box-shadow: 0 10px 24px rgba(0,0,0,0.04);
    }
    .work-assignment-hero-main,
    .work-assignment-panel,
    .work-assignment-stat {
        border: 1px solid var(--border);
        border-radius: 22px;
        background: rgba(255,255,255,0.96);
        box-shadow: var(--shadow);
    }
    .work-assignment-hero-main {
        display: flex;
        align-items: center;
        gap: 12px;
        flex-wrap: wrap;
        padding: 0;
        background: transparent;
        color: var(--charcoal);
        overflow: visible;
        position: relative;
        border: none;
        box-shadow: none;
    }
    .work-assignment-hero-main::after {
        display: none;
    }
    .work-assignment-kicker {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        padding: 7px 11px;
        border-radius: 999px;
        background: #2B2118;
        color: #F5D9A7;
        font-size: 11px;
        font-weight: 800;
        letter-spacing: 0.9px;
        text-transform: uppercase;
        margin: 0;
    }
    .work-assignment-hero-main h3 {
        margin: 0;
        font-family: 'Cormorant Garamond', serif;
        font-size: 28px;
        line-height: 1.05;
        font-weight: 600;
    }
    .work-assignment-hero-main p {
        display: none;
    }
    .work-assignment-hero > .work-assignment-panel {
        display: none;
    }
    .work-assignment-stats {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    /* 4 o thong ke bo tri 1 hang ngang full-width (thay cho luong hero cu) */
    .work-assignment-stats-full {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        margin-bottom: 18px;
    }
    .work-assignment-stat {
        padding: 16px;
    }
    .work-assignment-stat span {
        display: block;
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.8px;
        color: #7A746B;
        font-weight: 800;
        margin-bottom: 8px;
    }
    .work-assignment-stat strong {
        display: block;
        font-family: 'Cormorant Garamond', serif;
        font-size: 30px;
        line-height: 1;
        color: var(--charcoal);
    }
    .work-assignment-board {
        display: grid;
        grid-template-columns: minmax(320px, 0.86fr) minmax(0, 1.14fr);
        gap: 18px;
        align-items: start;
    }
    .work-assignment-board.staff-only {
        grid-template-columns: minmax(0, 1fr);
    }
    .work-assignment-panel {
        padding: 18px;
        min-width: 0;
    }
    .work-assignment-panel-head {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 14px;
    }
    .work-assignment-panel-title {
        margin: 0;
        font-size: 16px;
        font-weight: 800;
        color: var(--charcoal);
    }
    .work-assignment-panel-note {
        margin: 5px 0 0;
        color: #6D665C;
        font-size: 12px;
        line-height: 1.55;
    }
    .dept-permission-summary,
    .dept-permission-groups,
    .dept-permission-group-items,
    .dept-permission-user-list {
        display: grid;
        gap: 12px;
    }
    .dept-permission-summary-head,
    .dept-permission-group-head {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
    }
    .dept-permission-summary-head strong,
    .dept-permission-group-head h4 {
        display: block;
        margin: 0;
        color: var(--charcoal);
        font-size: 15px;
        font-weight: 800;
    }
    .dept-permission-summary-head span,
    .dept-permission-group-head p {
        display: block;
        margin-top: 5px;
        color: #6D665C;
        font-size: 12px;
        line-height: 1.55;
    }
    .dept-permission-chip-row {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }
    .dept-permission-chip {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        padding: 9px 12px;
        border-radius: 999px;
        background: #F6EEDF;
        color: #805B28;
        border: 1px solid rgba(174,124,65,0.18);
        font-size: 12px;
        font-weight: 700;
    }
    .dept-permission-user-list {
        max-height: 620px;
        overflow: auto;
        padding-right: 4px;
    }
    .dept-permission-user-card {
        width: 100%;
        border: 1px solid #E8DCC8;
        border-radius: 18px;
        background: #fffdfa;
        padding: 14px 15px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        cursor: pointer;
        text-align: left;
        transition: 0.2s ease;
    }
    .dept-permission-user-card:hover {
        transform: translateY(-1px);
        border-color: #D0B083;
        box-shadow: 0 10px 18px rgba(174,124,65,0.08);
    }
    .dept-permission-user-card.active {
        border-color: #B78343;
        background: linear-gradient(135deg, #FFF9F1 0%, #F6ECDD 100%);
        box-shadow: 0 0 0 3px rgba(174,124,65,0.1);
    }
    .dept-permission-user-meta {
        min-width: 0;
        display: grid;
        gap: 5px;
    }
    .dept-permission-user-meta strong {
        color: var(--charcoal);
        font-size: 14px;
        font-weight: 800;
    }
    .dept-permission-user-meta span {
        color: #756D62;
        font-size: 12px;
        line-height: 1.5;
    }
    .dept-permission-user-count {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 60px;
        padding: 7px 10px;
        border-radius: 999px;
        background: #F3E8D4;
        color: #7A5524;
        font-size: 12px;
        font-weight: 800;
        white-space: nowrap;
    }
    .dept-permission-group {
        border: 1px solid #EEE1CD;
        border-radius: 20px;
        background: #FFFDFA;
        padding: 16px;
    }
    .dept-permission-group.is-summary {
        background: linear-gradient(180deg, #FFFDF8 0%, #FBF6EC 100%);
    }
    .dept-permission-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        border: 1px solid #EAE2D5;
        border-radius: 16px;
        padding: 14px;
        background: #fff;
    }
    .dept-permission-item.enabled {
        border-color: rgba(31,107,51,0.16);
        background: #F6FCF6;
    }
    .dept-permission-item-copy {
        min-width: 0;
        display: grid;
        gap: 5px;
    }
    .dept-permission-item-copy strong {
        color: var(--charcoal);
        font-size: 13px;
        font-weight: 800;
    }
    .dept-permission-item-copy span {
        color: #6D665C;
        font-size: 12px;
        line-height: 1.55;
    }
    .dept-permission-toggle,
    .dept-permission-state {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        min-width: 116px;
        padding: 10px 12px;
        border-radius: 14px;
        font-size: 12px;
        font-weight: 800;
        white-space: nowrap;
    }
    .dept-permission-toggle {
        border: 0;
        cursor: pointer;
        transition: 0.2s ease;
    }
    .dept-permission-toggle.enabled,
    .dept-permission-state.enabled {
        background: #1F6B33;
        color: #fff;
    }
    .dept-permission-toggle.disabled,
    .dept-permission-state.disabled {
        background: #ECEFF4;
        color: #58636E;
    }
    .dept-permission-toggle:hover {
        transform: translateY(-1px);
    }
    .dept-permission-empty {
        border: 1px dashed #D8C4A5;
        border-radius: 16px;
        padding: 16px;
        background: #FFF9F1;
        color: #7A6A54;
        font-size: 13px;
        line-height: 1.6;
    }
    .work-assignment-list {
        display: grid;
        gap: 12px;
    }
    .work-assignment-card {
        border: 1px solid #E8DCC8;
        border-radius: 18px;
        background: #fffdfa;
        padding: 14px;
        display: grid;
        gap: 12px;
        transition: 0.2s ease;
    }
    .work-assignment-card.appeal-ticket {
        border-color: #D86A5A;
        background: linear-gradient(135deg, #FFF9F8 0%, #FFF1EE 100%);
        box-shadow: 0 10px 24px rgba(216,106,90,0.08);
    }
    .work-assignment-card.highlight {
        border-color: var(--gold);
        box-shadow: 0 0 0 4px rgba(174,124,65,0.1);
    }
    .work-assignment-card.done {
        background: #F1F8F0;
        border-color: #B7DAB4;
    }
    .work-assignment-card-top {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
    }
    .work-assignment-person {
        min-width: 0;
    }
    .work-assignment-person strong {
        display: block;
        color: var(--charcoal);
        font-size: 14px;
        line-height: 1.35;
    }
    .work-assignment-person span {
        display: block;
        margin-top: 3px;
        color: #7A746B;
        font-size: 12px;
        line-height: 1.45;
    }
    .work-assignment-badge {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        padding: 6px 9px;
        border-radius: 999px;
        background: var(--gold-pale);
        color: #805A2E;
        font-size: 11px;
        font-weight: 800;
        white-space: nowrap;
    }
    .work-assignment-badge.done {
        background: #E8F5E9;
        color: #2B8A3E;
    }
    .work-assignment-badge.appeal {
        background: #FFE7E2;
        color: #B03A2E;
    }
    .work-assignment-appeal-box {
        display: grid;
        gap: 8px;
        padding: 12px;
        border-radius: 14px;
        border: 1px solid #F1C0B6;
        background: rgba(255,255,255,0.84);
    }
    .work-assignment-appeal-box strong {
        color: #8E2C20;
        font-size: 13px;
    }
    .work-assignment-appeal-lines {
        display: grid;
        gap: 7px;
    }
    .work-assignment-appeal-line {
        display: grid;
        gap: 3px;
        padding: 9px 10px;
        border-radius: 11px;
        background: #FFF7F5;
        border: 1px solid #F3D4CC;
        color: #6B4D46;
        font-size: 12px;
        line-height: 1.5;
    }
    .work-assignment-appeal-line b {
        color: #9B3A2C;
    }
    .work-assignment-actions {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
        align-items: center;
    }
    .work-assignment-actions select,
    .work-assignment-card textarea {
        border: 1px solid #DECDB4;
        border-radius: 12px;
        background: #fff;
        font: inherit;
        font-size: 13px;
        outline: none;
    }
    .work-assignment-actions select {
        min-width: 210px;
        flex: 1 1 210px;
        padding: 9px 11px;
    }
    .work-assignment-card textarea {
        width: 100%;
        min-height: 72px;
        resize: vertical;
        padding: 10px 12px;
    }
    .work-assignment-empty {
        border: 1px dashed #DECDB4;
        border-radius: 18px;
        background: #FCFBF8;
        padding: 22px;
        color: #6D665C;
        font-size: 13px;
        line-height: 1.6;
        text-align: center;
    }
    .outside-work-toolbar {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
        gap: 12px;
        align-items: end;
        padding: 16px 18px;
        margin-bottom: 18px;
        border: 1px solid var(--border);
        border-radius: 18px;
        background: rgba(255,255,255,0.96);
        box-shadow: 0 8px 20px rgba(0,0,0,0.04);
    }
    .outside-work-toolbar label {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }
    .outside-work-toolbar span {
        font-size: 12px;
        color: var(--muted);
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    .outside-work-sales-card {
        width: 100%;
        border: 1px solid #E8DCC8;
        border-radius: 18px;
        background: #fffdfa;
        padding: 14px;
        display: grid;
        gap: 10px;
        text-align: left;
        cursor: pointer;
        font: inherit;
        transition: 0.2s ease;
    }
    .outside-work-sales-card.active {
        border-color: var(--gold);
        box-shadow: 0 0 0 4px rgba(174,124,65,0.1);
        background: linear-gradient(180deg, #fffdfa 0%, #faf1e3 100%);
    }
    .outside-work-sales-card:hover {
        border-color: #D4B17A;
        transform: translateY(-1px);
    }
    .outside-work-sales-card small {
        color: #7A746B;
        font-size: 12px;
        line-height: 1.5;
    }
    .outside-work-record-grid {
        display: grid;
        grid-template-columns: 132px minmax(0, 1fr);
        gap: 14px;
        align-items: start;
    }
    .outside-work-record-media {
        border-radius: 16px;
        overflow: hidden;
        border: 1px solid #E8DCC8;
        background: #F4EFE6;
        aspect-ratio: 4 / 5;
    }
    .outside-work-record-media img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }
    .outside-work-record-body {
        display: grid;
        gap: 10px;
        min-width: 0;
    }
    .outside-work-detail-list {
        display: grid;
        gap: 7px;
        font-size: 13px;
        color: #3B342C;
        line-height: 1.55;
    }
    .outside-work-detail-list strong {
        color: var(--charcoal);
    }
    .outside-work-chip-row {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }
    .outside-work-chip {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        padding: 6px 10px;
        border-radius: 999px;
        background: #F8F2E8;
        border: 1px solid #E7D9C0;
        color: #7B6036;
        font-size: 11px;
        font-weight: 700;
        white-space: nowrap;
    }
    .outside-work-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }
    .attendance-sheet-empty {
        padding: 18px 20px;
        border-radius: 18px;
        background: #FCFBF8;
        border: 1px dashed #DECDB4;
        font-size: 13px;
        color: #6D665C;
        line-height: 1.65;
    }
    .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
    .cal-day-header { text-align: center; font-size: 11px; font-weight: 600; color: var(--muted); padding: 4px 0; }
    .cal-day { min-height: 48px; border: 1px solid var(--border); border-radius: 6px; padding: 4px 6px; font-size: 12px; position: relative; background: white; }
    .cal-day.today { border-color: var(--gold); background: var(--gold-pale); }
    .cal-day.empty { background: transparent; border: none; }
    .cal-num { font-weight: 600; font-size: 13px; }
    .cal-status { font-size: 10px; margin-top: 2px; }
    .cal-day.c-full  { border-color: #A5D6A7; background: #F1F8E9; }
    .cal-day.c-half  { border-color: #FFCC80; background: #FFF8E1; }
    .cal-day.c-absent{ border-color: #EF9A9A; background: #FFEBEE; }
    .cal-day.c-trip  { border-color: #80DEEA; background: #E0F7FA; }
    .cal-day.c-leave { border-color: #A5D6A7; background: #E8F5E9; }
    #moduleMyAttendance.reconciliation-focus .module-workspace {
        grid-template-columns: 1fr;
    }
    #moduleMyAttendance.reconciliation-focus .module-workspace-left {
        display: none;
    }
    #moduleMyAttendance.reconciliation-focus .module-workspace-right {
        grid-column: 1 / -1;
        width: 100%;
        display: grid;
        grid-template-columns: minmax(300px, 340px) minmax(0, 1fr);
        gap: 18px;
        align-items: start;
    }
    #moduleMyAttendance.reconciliation-focus .attendance-focus-layout {
        grid-column: 1;
        grid-row: 1;
        display: flex;
        flex-direction: column;
        gap: 16px;
        position: sticky;
        top: 24px;
        min-width: 0;
    }
    #moduleMyAttendance.reconciliation-focus .attendance-reconciliation-card {
        grid-column: 2;
        grid-row: 1;
        margin-top: 0;
        min-width: 0;
    }
    #moduleMyAttendance.reconciliation-focus .attendance-cta-box {
        display: none !important;
    }
    #moduleMyAttendance.reconciliation-focus .calendar-stage,
    #moduleMyAttendance.reconciliation-focus .stats-stage {
        margin-top: 0;
    }
    #moduleMyAttendance.reconciliation-focus .calendar-stage {
        padding: 14px;
        border-radius: 22px;
    }
    #moduleMyAttendance.reconciliation-focus .cal-grid {
        gap: 5px;
    }
    #moduleMyAttendance.reconciliation-focus .cal-day-header {
        font-size: 10px;
        padding: 2px 0 4px;
    }
    #moduleMyAttendance.reconciliation-focus .cal-day {
        min-height: 42px;
        border-radius: 10px;
        padding: 5px 4px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        overflow: hidden;
    }
    #moduleMyAttendance.reconciliation-focus .cal-num {
        font-size: 13px;
        line-height: 1;
    }
    #moduleMyAttendance.reconciliation-focus .cal-status {
        font-size: 10px;
        line-height: 1;
        margin-top: 0;
        font-weight: 700;
        white-space: nowrap;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    #moduleMyAttendance.reconciliation-focus .cal-flags {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 3px;
        min-height: 6px;
    }
    #moduleMyAttendance.reconciliation-focus .cal-flag {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        display: inline-block;
    }
    #moduleMyAttendance.reconciliation-focus .cal-flag.late { background: #E53935; }
    #moduleMyAttendance.reconciliation-focus .cal-flag.ot { background: #1565C0; }
    #moduleMyAttendance.reconciliation-focus .calendar-stage-legend {
        display: none;
    }
    #moduleMyAttendance.reconciliation-focus .stats-stage {
        padding: 12px;
        border-radius: 18px;
    }
    #moduleMyAttendance.reconciliation-focus #calStatsContent {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 8px !important;
        font-size: 12px !important;
    }
    #moduleMyAttendance.reconciliation-focus #calStatsContent span {
        display: block;
        padding: 8px 9px;
        border-radius: 12px;
        background: rgba(255,255,255,0.62);
        border: 1px solid rgba(174,124,65,0.16);
        line-height: 1.35;
    }

    @media (max-width: 1480px) {
        .hc-page {
            padding: 20px 20px 32px;
            gap: 18px;
        }
        .module-workspace {
            grid-template-columns: minmax(280px, 0.74fr) minmax(0, 1.26fr);
            gap: 18px;
        }
        .hc-hero {
            grid-template-columns: 1fr;
        }
        .hc-hero-chips {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }
        .hub-grid {
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        }
        .personnel-card-grid {
            grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        }
        .personnel-history-grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }
        .smart-input-row {
            grid-template-columns: 170px minmax(0, 1fr) 170px;
        }
        .work-assignment-hero,
        .work-assignment-board {
            grid-template-columns: 1fr;
        }
        .work-assignment-stats-full {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }
        .matrix-table {
            font-size: 11px;
        }
        .matrix-table th,
        .matrix-table td {
            padding: 6px 4px;
        }
        .matrix-table .matrix-day-head,
        .matrix-table .matrix-day-weekday,
        .matrix-table .matrix-day-cell {
            width: 44px;
            min-width: 44px;
            max-width: 44px;
        }
        .matrix-table .matrix-summary-head,
        .matrix-table .matrix-summary-cell {
            min-width: 80px;
        }
        .matrix-table .matrix-employee-cell {
            width: 190px;
            min-width: 190px;
            max-width: 190px;
        }
        .matrix-table .matrix-export-cell {
            width: 160px;
            min-width: 160px;
            max-width: 160px;
        }
        .attendance-sheet-summary-row {
            grid-template-columns: 180px minmax(0, 1fr);
        }
        #moduleMyAttendance.reconciliation-focus .module-workspace-right {
            grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
            gap: 14px;
        }
    }

    @media (max-width: 1360px) {
        .hc-shell {
            grid-template-columns: clamp(220px, 20vw, 258px) minmax(0, 1fr);
        }
        .hc-sidebar {
            padding: 20px 15px;
            gap: 16px;
        }
        .hc-side-brand {
            padding: 10px 11px;
            gap: 10px;
            border-radius: 18px;
        }
        .hc-side-mark {
            width: 50px;
            height: 50px;
            border-radius: 16px;
            font-size: 26px;
        }
        .hc-side-meta strong {
            font-size: 18px;
        }
        .hc-side-meta span {
            font-size: 11.5px;
        }
        .hc-sidebar-toggle {
            padding: 10px 12px;
            font-size: 11.5px;
        }
        .hc-side-profile {
            padding: 12px;
            border-radius: 18px;
        }
        .hc-side-profile-name {
            font-size: 16px;
        }
        .hc-side-profile-role {
            margin-bottom: 10px;
            font-size: 11.5px;
        }
        .hc-side-profile-grid {
            gap: 8px;
        }
        .hc-side-profile-chip {
            padding: 10px 11px;
        }
        .hc-main-nav-link {
            padding: 10px 12px;
            border-radius: 14px;
        }
        .hc-main-nav-title {
            font-size: 12.5px;
        }
        .hc-main-nav-sub {
            font-size: 10.5px;
        }
        .hc-page {
            padding: 18px 18px 30px;
            gap: 16px;
        }
        .module-workspace {
            grid-template-columns: minmax(250px, 0.72fr) minmax(0, 1.28fr);
            gap: 16px;
        }
        .module-workspace-left {
            top: 18px;
        }
        .workspace-side-panel {
            padding: 16px 18px;
        }
        .workspace-side-panel.tools-only {
            padding: 16px;
        }
        .workspace-main-card {
            padding: 18px;
        }
        .workspace-main-card.compact {
            padding: 15px 16px;
        }
        .workspace-quick-pill {
            min-height: 66px;
            padding: 16px 18px;
            font-size: 15px;
        }
        .workspace-side-panel.tools-only .workspace-quick-pill {
            min-height: 54px;
            padding: 13px 16px;
            font-size: 13.5px;
        }
    }

    @media (max-width: 1024px) {
        body {
            height: auto;
            overflow: auto;
        }
        .hc-shell {
            grid-template-columns: 1fr;
            height: auto;
            min-height: 0;
            overflow: visible;
        }
        .hc-sidebar {
            overflow: visible;
            border-right: 0;
            border-bottom: 1px solid rgba(255,255,255,0.08);
        }
        .hc-main {
            height: auto;
            overflow: visible;
        }
        .sidebar-collapsed .hc-shell {
            grid-template-columns: 1fr;
        }
        .module-workspace {
            grid-template-columns: 1fr;
        }
        .module-workspace-left,
        .hub-home-side {
            position: static;
            top: auto;
        }
        .info-hub-columns,
        .personnel-form-grid,
        .personnel-history-grid,
        .smart-input-row {
            grid-template-columns: 1fr;
        }
        .outside-work-record-grid {
            grid-template-columns: 1fr;
        }
        .attendance-board-toolbar,
        .attendance-sync-card,
        .attendance-sheet-total,
        .attendance-sheet-actions,
        .attendance-reconciliation-head {
            flex-direction: column;
            align-items: stretch;
        }
        #moduleAttendanceManager .attendance-control-grid {
            grid-template-columns: 1fr;
        }
        #moduleAttendanceManager .attendance-board-card {
            min-height: auto;
        }
        .attendance-tools,
        .attendance-sync-actions,
        .attendance-reconciliation-print-actions {
            width: 100%;
            justify-content: flex-start;
        }
        .attendance-sheet-summary-row {
            grid-template-columns: 1fr;
        }
        .attendance-review-card-list {
            grid-template-columns: 1fr;
        }
        #moduleMyAttendance.reconciliation-focus .module-workspace-right {
            grid-template-columns: 1fr;
        }
        #moduleMyAttendance.reconciliation-focus .attendance-focus-layout {
            grid-column: 1;
            grid-row: auto;
            position: static;
            top: auto;
        }
        #moduleMyAttendance.reconciliation-focus .attendance-reconciliation-card {
            grid-column: 1;
            grid-row: auto;
        }
    }

    @media (max-width: 900px) {
        .attendance-report-meta { grid-template-columns: 1fr 1fr; }
        .attendance-report-summary { grid-template-columns: 1fr 1fr; }
        .attendance-report-actions { padding: 16px 18px 20px; }
        .attendance-download-crm-btn,
        .attendance-export-excel-btn { width: 100%; justify-content: center; }
        .attendance-modal-meta { padding: 14px 18px; }
        .attendance-preview-stage { padding: 14px; }
        .attendance-preview-shell { padding: 18px; }
        .attendance-report-modal .modal-header { padding: 18px 18px 14px; }
        .attendance-review-card-list {
            grid-template-columns: 1fr;
        }
    }

    @media (max-width: 640px) {
        .hc-page { gap: 16px; }
        .module-workspace { grid-template-columns:1fr; }
        .module-workspace-left { position:static; top:auto; }
        .attendance-quick-layout { grid-template-columns: 1fr; }
        .smart-input-head { align-items:flex-start; }
        .smart-input-row { grid-template-columns: 1fr; }
        .hub-home-layout { grid-template-columns: 1fr; }
        .work-assignment-hero,
        .work-assignment-board {
            grid-template-columns: 1fr;
        }
        .work-assignment-stats,
        .work-assignment-stats-full {
            grid-template-columns: 1fr 1fr;
        }
        .work-assignment-card-top,
        .work-assignment-panel-head {
            flex-direction: column;
            align-items: stretch;
        }
        .dept-permission-summary-head,
        .dept-permission-group-head,
        .dept-permission-item {
            flex-direction: column;
            align-items: stretch;
        }
        .dept-permission-toggle,
        .dept-permission-state,
        .dept-permission-user-count {
            width: 100%;
        }
        .hub-home-side { position:static; top:auto; }
        .attendance-board-card { padding: 14px; }
        .attendance-summary-card { flex-basis: 230px; }
        .workspace-main-card { padding: 16px; }
        .attendance-report-meta, .attendance-report-summary { grid-template-columns: 1fr; }
        .attendance-report-header h1 { font-size: 27px; }
        .attendance-report-footer { flex-direction: column; }
        .attendance-report-modal { max-height: calc(100vh - 20px); }
        #moduleMyAttendance.reconciliation-focus .module-workspace-right {
            grid-template-columns: 1fr;
        }
        #moduleMyAttendance.reconciliation-focus .attendance-focus-layout {
            grid-column: 1;
            grid-row: auto;
            position: static;
        }
        #moduleMyAttendance.reconciliation-focus .attendance-reconciliation-card {
            grid-column: 1;
            grid-row: auto;
        }
        .attendance-sheet-summary-row {
            grid-template-columns: 1fr;
        }
        .attendance-review-card-list {
            padding: 12px;
        }
        .attendance-review-day-card {
            grid-template-columns: 108px minmax(0, 1fr);
        }
        .attendance-review-day-card.has-review-actions {
            grid-template-columns: 108px minmax(0, 1fr);
        }
        .attendance-review-day-main strong {
            font-size: 23px;
        }
        .attendance-review-day-top {
            grid-template-columns: 1fr 1fr;
        }
        .attendance-review-day-top .attendance-review-cell:nth-child(3),
        .attendance-review-day-top .attendance-review-cell:nth-child(4) {
            border-top: 1.5px solid #333;
        }
        .attendance-review-day-top .attendance-review-cell:nth-child(3) {
            grid-column: auto;
            border-right: 1.5px solid #333;
        }
        .attendance-review-day-top .attendance-review-cell:nth-child(4) {
            border-top: 1.5px solid #333;
            border-right: 0;
        }
        .attendance-review-actions {
            grid-column: 1 / -1;
            border-left: 0;
            border-top: 1.5px solid #333;
            grid-template-columns: 1fr 1fr;
            grid-template-rows: auto;
        }
        .attendance-review-action {
            border-bottom: 0;
            border-right: 1.5px solid #333;
        }
        .attendance-review-action:last-child {
            border-right: 0;
        }
        .attendance-sheet-total,
        .attendance-sheet-actions,
        .attendance-reconciliation-head {
            flex-direction: column;
            align-items: stretch;
        }
    }

    @media (max-width: 768px) {
        body.hc-mobile-mode {
            min-height: 100vh;
            overflow-x: hidden;
        }
        body.hc-mobile-mode .hc-sidebar {
            display: none !important;
        }
        body.hc-mobile-mode .hc-shell {
            grid-template-columns: 1fr !important;
            min-height: 100vh !important;
            height: auto !important;
            overflow: visible !important;
        }
        body.hc-mobile-mode .hc-main {
            height: auto !important;
            overflow: visible !important;
        }
        body.hc-mobile-mode .hc-page {
            padding-top: calc(12px + env(safe-area-inset-top));
        }
        body.hc-mobile-mode .hc-main-topbar {
            flex-direction: column;
            align-items: stretch;
            gap: 12px;
            margin-bottom: 12px;
        }
        body.hc-mobile-mode .hc-topbar-title p,
        body.hc-mobile-mode .hc-topbar-title small {
            display: none;
        }
        body.hc-mobile-mode .hc-topbar-title {
            min-width: 0;
        }
        body.hc-mobile-mode .hc-topbar-title h1 {
            font-size: 24px;
            line-height: 1.05;
            margin-bottom: 0;
        }
        body.hc-mobile-mode .hc-topbar-actions {
            width: 100%;
            display: grid;
            grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
            gap: 10px;
            align-items: center;
            justify-content: stretch;
        }
        body.hc-mobile-mode .hc-topbar-primary {
            display: contents;
        }
        body.hc-mobile-mode .hc-topbar-primary .hc-topbar-btn {
            min-width: 0;
        }
        body.hc-mobile-mode .hc-topbar-secondary {
            display: contents;
        }
        body.hc-mobile-mode .hc-topbar-secondary #notifMount {
            justify-self: end;
        }
        body.hc-mobile-mode .hc-topbar-secondary .hc-topbar-btn.danger {
            display: none !important;
        }
        body.hc-mobile-mode #notifMount {
            display: flex;
            align-items: center;
            justify-content: center;
        }
        body.hc-mobile-mode .hc-topbar-btn {
            min-height: 48px;
            padding: 10px 14px;
            justify-content: center;
            font-size: 12.5px;
            border-radius: 16px;
            box-shadow: 0 10px 22px rgba(30,37,50,0.06);
            white-space: nowrap;
        }
        body.hc-mobile-mode .hc-topbar-btn .material-icons {
            font-size: 18px !important;
            margin: 0;
        }
        body.hc-mobile-mode #notifMount .nb-wrap {
            display: inline-flex;
        }
        body.hc-mobile-mode #notifMount .nb-bell {
            width: 48px;
            height: 48px;
            border-radius: 16px;
            background: rgba(255,255,255,0.96);
            border: 1px solid var(--border);
            box-shadow: 0 12px 24px rgba(30,37,50,0.08);
            color: var(--gold);
        }
        body.hc-mobile-mode #notifMount .nb-bell:hover {
            background: #fff;
            transform: translateY(-1px);
        }
        body.hc-mobile-mode #notifMount .nb-bell .material-icons {
            font-size: 22px;
        }
        body.hc-mobile-mode #notifMount .nb-count {
            top: 3px;
            right: 3px;
            min-width: 18px;
            height: 18px;
            border-radius: 999px;
            font-size: 10px;
            box-shadow: 0 4px 10px rgba(229,57,53,0.30);
        }
        body.hc-mobile-mode #notifMount .nb-panel {
            top: 56px;
            right: 0;
            width: min(380px, calc(100vw - 28px));
            max-width: calc(100vw - 28px);
            border-radius: 18px;
        }
        body.hc-mobile-mode #notifMount .nb-head {
            flex-direction: column;
            align-items: stretch;
            gap: 10px;
        }
        body.hc-mobile-mode #notifMount .nb-head > div {
            width: 100%;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 10px !important;
        }
        body.hc-mobile-mode #notifMount .nb-readall {
            font-size: 12px;
        }
        body.hc-mobile-mode .hub-home-head .workspace-chip-row {
            display: none;
        }
        body.hc-mobile-mode .hub-home-panel {
            padding: 16px;
        }
        body.hc-mobile-mode .hub-grid {
            grid-template-columns: 1fr;
            gap: 12px;
        }
        body.hc-mobile-mode .hub-card {
            padding: 16px;
            border-radius: 18px;
        }
        body.hc-mobile-mode .workspace-section-note {
            display: none;
        }
        body.hc-mobile-mode .hc-mobile-overview-note {
            display: block;
            margin: 0 0 14px;
            padding: 12px 14px;
            border-radius: 16px;
            background: linear-gradient(180deg, #fff8ee 0%, #f8efe0 100%);
            border: 1px solid #ead9bf;
            color: #6b5836;
            font-size: 12.5px;
            line-height: 1.55;
        }
        body.hc-mobile-mode.hc-module-attendance-manager .hc-page {
            gap: 12px;
        }
        body.hc-mobile-mode.hc-module-attendance-manager .hc-topbar-title h1 {
            font-size: clamp(18px, 6.4vw, 22px);
            line-height: 1.08;
        }
        body.hc-mobile-mode.hc-module-attendance-manager .hc-topbar-btn {
            min-height: 44px;
            padding: 10px 12px;
            font-size: 12px;
            border-radius: 15px;
        }
        body.hc-mobile-mode.hc-module-attendance-manager .sub-header.tools-only {
            margin-bottom: 8px;
        }
        body.hc-mobile-mode.hc-module-attendance-manager .sub-header.tools-only .sub-title {
            display: none;
        }
        body.hc-mobile-mode.hc-module-attendance-manager .sub-header.tools-only .btn-back {
            width: fit-content;
            min-height: 42px;
            padding: 9px 14px;
            border-radius: 15px;
            font-size: 12.5px;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .module-workspace {
            gap: 12px;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .attendance-control-card,
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .attendance-sync-card,
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .attendance-board-card,
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .workspace-main-card.compact {
            padding: 14px;
            border-radius: 18px;
            overflow: hidden;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .attendance-control-head,
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .attendance-sync-card {
            gap: 12px;
            justify-content: flex-start;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .attendance-control-grid {
            grid-template-columns: 1fr;
            gap: 12px;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .attendance-control-panel {
            padding: 14px;
            border-radius: 16px;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .attendance-board-card {
            min-height: auto;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .attendance-sync-copy {
            flex: 0 0 auto;
            width: 100%;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .attendance-sync-title {
            font-size: 14px;
            line-height: 1.3;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .attendance-sync-note,
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .attendance-sync-meta,
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .attendance-board-desc {
            font-size: 12px;
            line-height: 1.55;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .attendance-sync-list {
            gap: 6px;
            margin-top: 8px;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .attendance-sync-chip {
            font-size: 11.5px;
            padding: 7px 10px;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .attendance-sync-actions {
            display: grid;
            grid-template-columns: minmax(0, 1fr);
            gap: 8px;
            width: 100%;
            max-width: 100%;
            align-content: start;
            overflow: hidden;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .attendance-sync-actions > * {
            min-width: 0;
            width: 100%;
            max-width: 100%;
            align-self: stretch;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .attendance-sync-actions input[type="month"],
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .attendance-sync-badge,
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .attendance-tools input[type="month"],
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .attendance-tools .attendance-month-close-badge {
            min-height: 42px;
            border-radius: 14px;
            font-size: 11.5px;
            box-sizing: border-box;
            max-width: 100%;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .attendance-sync-badge {
            display: flex;
            justify-content: center;
            padding: 8px 10px;
            line-height: 1.35;
            text-align: center;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .attendance-sync-actions input[type="month"],
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .attendance-tools input[type="month"] {
            display: block;
            width: 100% !important;
            inline-size: 100% !important;
            max-inline-size: 100% !important;
            min-width: 0 !important;
            margin: 0 !important;
            padding: 0 12px !important;
            font-size: 12px !important;
            -webkit-appearance: none;
            appearance: none;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager #attendanceSyncBtn {
            min-height: 46px;
            border-radius: 14px;
            font-size: 13px;
            letter-spacing: 0.35px;
            justify-content: center;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .workspace-section-title,
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .attendance-board-title {
            font-size: 16px;
            line-height: 1.18;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .attendance-quick-card {
            margin-bottom: 0;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .smart-input-box {
            padding: 14px;
            border-radius: 18px;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .smart-input-head {
            gap: 8px;
            margin-bottom: 10px;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .smart-input-box h4 {
            font-size: 16px;
            line-height: 1.18;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .smart-input-kicker {
            padding: 6px 9px;
            font-size: 10px;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .smart-input-row {
            gap: 10px;
            width: 100%;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .smart-input-row input[type="date"],
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .smart-input-row textarea {
            padding: 11px 12px;
            border-radius: 12px;
            font-size: 13.5px;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .smart-input-row input[type="date"] {
            display: block;
            width: 100% !important;
            inline-size: 100% !important;
            max-inline-size: 100% !important;
            min-width: 0 !important;
            margin: 0 !important;
            -webkit-appearance: none;
            appearance: none;
            box-sizing: border-box;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .smart-input-row textarea {
            min-height: 120px;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .smart-input-row .btn {
            min-height: 46px;
            border-radius: 12px;
            font-size: 13.5px;
            justify-content: center;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .attendance-board-toolbar {
            gap: 12px;
            margin-bottom: 10px;
            justify-content: flex-start;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .attendance-tools {
            display: grid;
            grid-template-columns: minmax(0, 1fr);
            gap: 8px;
            width: 100%;
            max-width: 100%;
            align-content: start;
            overflow: hidden;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .attendance-tools > * {
            min-width: 0;
            width: 100%;
            max-width: 100%;
            align-self: stretch;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .attendance-tools input[type="month"],
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .attendance-tools .attendance-month-close-badge,
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .attendance-tools .btn {
            min-height: 42px;
            border-radius: 14px;
            font-size: 12px;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .attendance-tools .btn {
            padding: 10px 12px;
            justify-content: center;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .attendance-tools .attendance-month-close-badge {
            display: flex;
            justify-content: center;
            padding: 8px 10px;
            line-height: 1.35;
            text-align: center;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .attendance-summary-grid {
            display: none !important;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .attendance-summary-card {
            flex: none;
            min-width: 0;
            min-height: 0;
            padding: 11px 10px;
            border-radius: 16px;
            gap: 8px;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .attendance-summary-icon {
            width: 30px;
            height: 30px;
            border-radius: 10px;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .attendance-summary-card .sum-label {
            font-size: 9px;
            letter-spacing: 0.6px;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .attendance-summary-card .sum-value {
            font-size: 20px;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .attendance-summary-card .sum-note {
            margin-top: 4px;
            font-size: 10.5px;
            line-height: 1.35;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .attendance-legend {
            gap: 6px;
            padding: 10px;
            margin-bottom: 12px;
            border-radius: 14px;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .legend-pill {
            padding: 6px 8px;
            font-size: 10.5px;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .matrix-scroll-sync {
            display: none !important;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .matrix-scroll-wrapper {
            max-height: 62vh;
            overflow: auto;
            border-radius: 16px;
            overscroll-behavior: contain;
            touch-action: pan-x pan-y;
            -webkit-overflow-scrolling: touch;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .matrix-table {
            font-size: 11px;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .matrix-table th,
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .matrix-table td {
            padding: 6px 4px;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .matrix-table .matrix-sticky-left {
            min-width: 148px;
            padding-left: 8px;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .matrix-table .matrix-employee-cell {
            width: 148px;
            min-width: 148px;
            max-width: 148px;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .matrix-table .matrix-export-cell,
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .matrix-table .matrix-sticky-right {
            width: 72px;
            min-width: 72px;
            max-width: 72px;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .matrix-table .matrix-summary-head,
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .matrix-table .matrix-summary-cell {
            min-width: 66px;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .matrix-table .matrix-day-head,
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .matrix-table .matrix-day-weekday,
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .matrix-table .matrix-day-cell {
            width: 38px;
            min-width: 38px;
            max-width: 38px;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .matrix-table .matrix-employee-name {
            font-size: 11.5px;
            line-height: 1.3;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .matrix-table .matrix-employee-meta {
            margin-top: 4px;
            font-size: 10px;
            line-height: 1.35;
            white-space: normal;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .matrix-table .matrix-dept-row td {
            padding: 8px 10px;
            font-size: 10.5px;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .row-export-wrap {
            padding: 2px 0;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .row-export-btn {
            width: 100%;
            max-width: 60px;
            min-height: 32px;
            padding: 6px 6px;
            border-radius: 12px;
            font-size: 9px;
            line-height: 1.2;
            gap: 2px;
            white-space: normal;
            text-align: center;
            justify-content: center;
            box-shadow: none;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .row-export-btn .material-icons {
            font-size: 11px !important;
        }
        body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .row-export-note {
            display: block;
            font-size: 8.5px;
            line-height: 1.25;
            text-align: center;
        }
    }

    @media (max-width: 768px) {
        .hc-page {
            padding: 16px 14px 28px;
        }
        .hc-sidebar {
            padding: 16px;
        }
        body:not(.hc-mobile-mode) .hc-main-topbar,
        body:not(.hc-mobile-mode) .hc-topbar-actions {
            flex-direction: column;
            align-items: stretch;
        }
    }

    @media print {
        @page {
            size: A4 portrait;
            margin: 8mm;
        }
        * {
            -webkit-print-color-adjust: exact !important;
            print-color-adjust: exact !important;
        }
        html,
        body {
            width: auto;
            height: auto;
            min-height: 0 !important;
            margin: 0 !important;
            padding: 0 !important;
            overflow: visible !important;
            background: #fff !important;
        }
        .hc-shell,
        .modal-overlay,
        #notifMount,
        #myAttendanceReconciliationCard {
            display: none !important;
        }
        .attendance-print-root {
            display: block !important;
            width: 100% !important;
            margin: 0 !important;
            padding: 0 !important;
            background: #fff !important;
            color: #111 !important;
            font-family: Arial, sans-serif !important;
            font-size: 8pt !important;
            line-height: 1.18 !important;
        }
        .attendance-print-sheet {
            width: 100% !important;
            margin: 0 !important;
            padding: 0 !important;
            background: #fff !important;
        }
        .attendance-print-header {
            text-align: center;
            border-bottom: 1px solid #222;
            padding-bottom: 1.4mm;
            margin-bottom: 1.3mm;
        }
        .attendance-print-header h1 {
            margin: 0;
            font-family: "Times New Roman", serif;
            font-size: 15pt;
            letter-spacing: 0.2px;
        }
        .attendance-print-header p {
            margin: 1.1mm 0 0;
            font-size: 7.4pt;
        }
        .attendance-print-employee,
        .attendance-print-total {
            display: flex;
            justify-content: space-between;
            gap: 8mm;
            border-bottom: 1px solid #444;
            padding: 1mm 0;
            font-size: 7pt;
        }
        .attendance-print-summary {
            display: grid;
            gap: 0.7mm;
            border-bottom: 1px solid #444;
            padding: 1mm 0;
            margin-bottom: 1.2mm;
            font-size: 6.7pt;
        }
        .attendance-print-summary-row {
            display: grid;
            grid-template-columns: 30mm 1fr;
            gap: 2mm;
            align-items: start;
        }
        .attendance-print-summary-label {
            font-weight: 700;
        }
        .attendance-print-summary-text {
            white-space: pre-wrap;
        }
        .attendance-print-day-list {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1.6mm;
            page-break-inside: auto;
            break-inside: auto;
        }
        .attendance-print-day-card {
            border: 1px solid #333;
            min-height: 22mm;
            page-break-inside: avoid;
            break-inside: avoid;
            display: grid;
            grid-template-columns: 28mm 1fr;
            background: #fff;
        }
        .attendance-print-day-main {
            border-right: 1px solid #333;
            background: #f2f2f2;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 0.8mm;
            padding: 1.2mm;
            text-align: center;
        }
        .attendance-print-day-index {
            font-size: 6.7pt;
            font-weight: 700;
            color: #555;
        }
        .attendance-print-day-date {
            font-family: "Times New Roman", serif;
            font-size: 12.4pt;
            font-weight: 800;
            line-height: 1;
        }
        .attendance-print-day-weekday {
            font-size: 8.4pt;
            font-weight: 700;
        }
        .attendance-print-day-credit {
            display: inline-flex;
            justify-content: center;
            min-width: 17mm;
            max-width: 34mm;
            padding: 0.6mm 1.4mm;
            border-radius: 99px;
            background: #fff;
            border: 1px solid #999;
            font-size: 8.4pt;
            font-weight: 800;
            text-align: center;
            line-height: 1.2;
            white-space: normal;
        }
        .attendance-print-day-body {
            display: grid;
            grid-template-columns: 24mm 24mm 33mm minmax(0, 1fr);
            grid-template-rows: auto 1fr;
            min-width: 0;
        }
        .attendance-print-field {
            border-right: 1px solid #333;
            border-bottom: 1px solid #333;
            padding: 1mm 1.2mm;
            text-align: center;
            min-width: 0;
        }
        .attendance-print-field:nth-child(3) {
            border-right: 0;
        }
        .attendance-print-field-label {
            display: block;
            font-size: 6.2pt;
            text-transform: uppercase;
            color: #555;
            font-weight: 700;
            margin-bottom: 0.4mm;
        }
        .attendance-print-field-value {
            display: block;
            font-size: 8.6pt;
            font-weight: 500;
            line-height: 1.2;
            word-break: break-word;
        }
        .attendance-print-note-value {
            font-weight: 800;
        }
        .attendance-print-explanation {
            grid-column: 1 / -1;
            padding: 1.2mm 1.6mm;
            text-align: left;
            min-height: 8.6mm;
            overflow: hidden;
        }
        .attendance-print-explanation-label {
            font-size: 6.3pt;
            text-transform: uppercase;
            color: #555;
            font-weight: 700;
            margin-bottom: 0.5mm;
        }
        .attendance-print-explanation-text {
            font-size: 8.8pt;
            font-weight: 800;
            line-height: 1.25;
            max-height: 21pt;
            overflow: hidden;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            word-break: break-word;
        }
        .attendance-print-empty {
            color: #999;
            font-style: italic;
        }
        .attendance-print-sunday-note {
            display: inline-block;
            padding: 0.5mm 1.4mm;
            border-radius: 99px;
            background: #F2E8D9;
            color: #6B5836;
            font-weight: 700;
        }
        /* Hien thi thay doi "cu -> moi" khi HC da duyet sua so cong / tang ca.
           Chu cu gach ngang do, mui ten den, chu moi xanh dam. */
        .attendance-print-old {
            text-decoration: line-through;
            color: #B71C1C;
            font-weight: 600;
            margin-right: 1mm;
        }
        .attendance-print-arrow {
            color: #4B4033;
            font-weight: 900;
            margin: 0 0.6mm;
        }
        .attendance-print-new {
            color: #1E6B2A;
            font-weight: 900;
        }
        .attendance-print-signatures {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 8mm;
            padding-top: 2mm;
            page-break-inside: avoid;
            break-inside: avoid;
            text-align: center;
        }
        .attendance-print-signature-box {
            min-height: 14mm;
            font-family: Arial, sans-serif;
        }
        .attendance-print-signature-title {
            font-size: 7pt;
            font-weight: 800;
            text-transform: uppercase;
        }
        .attendance-print-signature-stamp {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 24mm;
            min-height: 6mm;
            margin: 1mm auto 0.8mm;
            border: 1.5px solid #2B8A3E;
            border-radius: 4px;
            color: #2B8A3E;
            font-size: 6.5pt;
            font-weight: 900;
            transform: rotate(-6deg);
            text-transform: uppercase;
        }
        .attendance-print-signature-stamp.pending {
            color: #777;
            border-color: #777;
            transform: none;
        }
        .attendance-print-signature-stamp.reject {
            color: #D32F2F;
            border-color: #D32F2F;
        }
        .attendance-print-signature-image {
            display: block;
            width: 110px;
            height: 30px;
            margin: 3px auto 2px;
            object-fit: contain;
        }
        .attendance-print-signature-name {
            font-family: "Times New Roman", serif;
            font-size: 9pt;
            font-weight: 700;
        }
        .attendance-print-signature-date {
            font-size: 6.3pt;
            color: #333;
            font-style: italic;
        }
    }

/* ===== Department workspace concept sync ===== */
body:not(.hc-mobile-mode) .hc-shell {
    grid-template-columns: 302px minmax(0, 1fr);
}

/* Sinh nhat & Ngay le trong thang — giao dien porcelain, scoped de khong anh huong module khac. */
#moduleInfoHub.info-hub-v2 {
    --ih-bg: #F8F5F0;
    --ih-card: #FFFFFF;
    --ih-border: #EBDDCF;
    --ih-accent: #9C572B;
    --ih-accent-soft: #F5E7DB;
    --ih-green: #4E7A5D;
    --ih-green-soft: #E9F1EB;
    --ih-ink: #2B2927;
    --ih-muted: #746E68;
    padding: 16px;
    border-radius: 22px;
    background: var(--ih-bg);
    color: var(--ih-ink);
}
#moduleInfoHub .sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.info-hub-v2__filters,
.info-hub-v2__section-head { display:flex; align-items:flex-end; gap:12px; flex-wrap:wrap; }
.info-hub-v2__overview { display:grid; grid-template-columns:minmax(0,7fr) minmax(390px,5fr); gap:14px; align-items:stretch; }
.info-hub-v2__control-card { min-width:0; display:flex; flex-direction:column; justify-content:space-between; padding:16px 18px; border:1px solid var(--ih-border); border-radius:18px; background:var(--ih-card); box-shadow:0 5px 16px rgba(72,48,30,.035); }
.info-hub-v2__toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; padding-bottom:13px; border-bottom:1px solid #F2E9DF; }
.info-hub-v2__toolbar-primary,
.info-hub-v2__toolbar-actions { display:flex; align-items:center; gap:9px; min-width:0; }
.info-hub-v2__field { display:flex; flex-direction:column; gap:6px; min-width:150px; }
.info-hub-v2__field > span { color:var(--ih-muted); font-size:11px; font-weight:800; letter-spacing:.55px; text-transform:uppercase; }
.info-hub-v2__field input,
.info-hub-v2__field select { width:100%; min-height:36px; padding:7px 10px; border:1px solid var(--ih-border); border-radius:10px; background:#fff; color:var(--ih-ink); font:500 12.5px/1.3 'Inter',sans-serif; outline:none; }
.info-hub-v2__field input:focus,
.info-hub-v2__field select:focus { border-color:var(--ih-accent); box-shadow:0 0 0 3px rgba(156,87,43,.1); }
.info-hub-v2__month-field { min-width:0; flex-direction:row; align-items:center; gap:9px; }
.info-hub-v2__month-field > span { white-space:nowrap; }
.info-hub-v2__month-field input { width:178px; min-width:150px; background:#F8F5F0; font-weight:750; }
.info-hub-v2__button { min-height:36px; padding:8px 13px; border:1px solid var(--ih-border); border-radius:10px; background:#fff; color:var(--ih-ink); font:750 12px/1 'Inter',sans-serif; white-space:nowrap; cursor:pointer; transition:transform .14s ease,border-color .14s ease,background .14s ease; }
.info-hub-v2__button:hover { border-color:#CDAE98; transform:translateY(-1px); }
.info-hub-v2__button:disabled { opacity:.55; cursor:wait; transform:none; }
.info-hub-v2__button--primary { border-color:var(--ih-accent); background:var(--ih-accent); color:#fff; }
.info-hub-v2__button--soft { border-color:#E7CEBE; background:#F8EFEA; color:var(--ih-accent); }
.info-hub-v2__save-state { color:var(--ih-green); font-size:10.5px; font-weight:700; white-space:nowrap; }
.info-hub-v2__save-state:empty { display:none; }
.info-hub-v2__summary { display:flex; align-items:center; gap:7px; flex-wrap:wrap; margin-top:18px; }
.info-hub-v2__summary-chip { box-sizing:border-box; display:inline-flex; align-items:center; min-height:28px; padding:5px 11px; border:1px solid #E5D5C5; border-radius:999px; background:#F3ECE2; color:#786C62; font:650 11.5px/1.1 'Inter',sans-serif; white-space:nowrap; }
button.info-hub-v2__summary-chip { cursor:pointer; transition:transform .14s ease,opacity .14s ease; }
button.info-hub-v2__summary-chip:hover { opacity:.86; transform:translateY(-1px); }
.info-hub-v2__summary-chip--staff { border-color:#FDE68A; background:#FEF3C7; color:#92400E; font-weight:800; }
.info-hub-v2__summary-chip--customer { border-color:#BBF7D0; background:#DCFCE7; color:#166534; font-weight:800; }
.info-hub-v2__summary-chip--holiday { border-color:#FED7AA; background:#FFEDD5; color:#9A3412; font-weight:800; }
.info-hub-v2__summary-chip--missing { border-color:#FECACA; background:#FEE2E2; color:#991B1B; font-weight:800; }
.hc-module-info-hub .hc-main-topbar { gap:12px; }
.hc-module-info-hub .hc-topbar-title small { font-size:10.5px; line-height:1.2; text-transform:uppercase; }
.hc-module-info-hub .hc-topbar-title h1 { font-size:clamp(26px,1.7vw,30px); line-height:1.08; letter-spacing:-.025em; }
.hc-module-info-hub .hc-topbar-title p { margin-top:4px; font-size:12.5px; line-height:1.35; }
@media (min-width:1180px) {
    body:not(.hc-mobile-mode).hc-module-info-hub .hc-topbar-title h1,
    body:not(.hc-mobile-mode).hc-module-info-hub .hc-topbar-title p { white-space:nowrap; }
}
.info-hub-v2__budget { min-width:0; display:flex; flex-direction:column; justify-content:space-between; padding:15px 17px; border:2px solid #E8CEBC; border-radius:18px; background:#FAF4EE; box-shadow:0 5px 16px rgba(105,66,38,.035); }
.info-hub-v2__budget-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding-bottom:9px; border-bottom:1px solid #EBDDCF; }
.info-hub-v2__budget-copy > span { display:block; color:var(--ih-accent); font-size:10.5px; font-weight:850; letter-spacing:.55px; text-transform:uppercase; }
.info-hub-v2__budget-copy > small { display:block; margin-top:2px; color:var(--ih-muted); font-size:10.5px; }
.info-hub-v2__auto-badge { flex:0 0 auto; padding:3px 8px; border:1px solid #C8E6C9; border-radius:999px; background:#E8F5E9; color:#1E4620; font-size:9.5px; font-weight:800; text-transform:capitalize; }
.info-hub-v2__budget-breakdown { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin:10px 0; }
.info-hub-v2__budget-breakdown > div { min-width:0; padding:10px 8px; border:1px solid var(--ih-border); border-radius:12px; background:rgba(255,255,255,.8); text-align:center; }
.info-hub-v2__budget-breakdown > .info-hub-v2__budget-total { border-color:#E7CEBE; background:#F8EFEA; }
.info-hub-v2__budget-breakdown span,
.info-hub-v2__budget-breakdown small { display:block; overflow:hidden; color:var(--ih-muted); font-size:9.5px; text-overflow:ellipsis; white-space:nowrap; }
.info-hub-v2__budget-breakdown strong { display:block; margin:4px 0 2px; overflow:hidden; color:#6F371B; font-size:14px; font-variant-numeric:tabular-nums; text-overflow:ellipsis; white-space:nowrap; }
.info-hub-v2__budget-total span,
.info-hub-v2__budget-total strong,
.info-hub-v2__budget-total small { color:var(--ih-accent); font-weight:800; }
.info-hub-v2__budget-note { color:var(--ih-muted); font-size:10px; line-height:1.35; }
.info-hub-v2__budget-note strong { color:#854D0E; }
.info-hub-v2__missing { width:100%; display:flex; align-items:center; justify-content:space-between; gap:14px; margin-top:13px; padding:11px 14px; border:1px solid #F5DC9E; border-radius:13px; background:#FFF8E7; color:#786C62; font-size:11.5px; }
.info-hub-v2__missing > div:first-child > strong { color:#854D0E; }
.info-hub-v2__missing-actions { display:flex; align-items:center; gap:8px; flex:0 0 auto; }
.info-hub-v2__missing-actions button { min-height:30px; padding:6px 12px; border:0; border-radius:8px; background:var(--ih-accent); color:#fff; font:750 11px/1 'Inter',sans-serif; cursor:pointer; }
.info-hub-v2__missing-actions .info-hub-v2__missing-close { width:30px; padding:0; background:transparent; color:#A3968A; font-size:18px; font-weight:400; }
.info-hub-v2__quick-add { margin-top:13px; padding:17px; border:1px solid var(--ih-border); border-radius:17px; background:#fff; }
.info-hub-v2__quick-add[hidden] { display:none; }
.info-hub-v2__section-head { justify-content:space-between; align-items:flex-start; }
.info-hub-v2__section-head strong,
.info-hub-v2__section-head small { display:block; }
.info-hub-v2__section-head small { margin-top:3px; color:var(--ih-muted); font-size:11.5px; }
.info-hub-v2__text-button { border:0; background:transparent; color:var(--ih-accent); font-weight:750; cursor:pointer; }
.info-hub-v2__quick-grid { display:grid; grid-template-columns:140px 160px minmax(180px,1fr) minmax(180px,1fr) minmax(160px,.8fr) 150px 170px auto; gap:10px; align-items:end; margin-top:14px; }
.info-hub-v2__workspace { margin-top:14px; border:1px solid var(--ih-border); border-radius:19px; background:#fff; overflow:hidden; }
.info-hub-v2__tabs { display:flex; gap:4px; padding:10px 12px 0; overflow-x:auto; border-bottom:1px solid var(--ih-border); }
.info-hub-v2__tabs button { flex:0 0 auto; padding:10px 12px 11px; border:0; border-bottom:2px solid transparent; background:transparent; color:var(--ih-muted); font:750 12px/1.2 'Inter',sans-serif; cursor:pointer; }
.info-hub-v2__tabs button span { margin-left:4px; padding:2px 6px; border-radius:999px; background:#F2ECE6; font-size:10px; }
.info-hub-v2__tabs button.active { border-bottom-color:var(--ih-accent); color:var(--ih-accent); }
.info-hub-v2__tabs button.active span { background:var(--ih-accent-soft); }
.info-hub-v2__filters { padding:13px 15px; align-items:end; background:#FCFAF7; }
.info-hub-v2__search { flex:1 1 280px; }
.info-hub-v2__result-count { margin-left:auto; align-self:center; color:var(--ih-muted); font-size:12px; font-weight:700; }
.info-hub-v2__table-wrap { overflow-x:auto; }
.info-hub-v2__table { width:100%; min-width:1180px; border-collapse:separate; border-spacing:0; font-size:12px; }
.info-hub-v2__table th { padding:10px 12px; border-top:1px solid var(--ih-border); border-bottom:1px solid var(--ih-border); background:#F8F3ED; color:#6C625A; font-size:10.5px; letter-spacing:.45px; text-align:left; text-transform:uppercase; white-space:nowrap; }
.info-hub-v2__table td { padding:11px 12px; border-bottom:1px solid #F0E7DF; vertical-align:top; color:var(--ih-ink); }
.info-hub-v2__table tr:last-child td { border-bottom:0; }
.info-hub-v2__table tbody tr:hover td { background:#FFFCF9; }
.info-hub-v2__table th:first-child,
.info-hub-v2__table td:first-child { width:34px; padding-right:3px; }
.info-hub-v2__date { display:flex; flex-direction:column; gap:4px; min-width:78px; }
.info-hub-v2__date strong { color:var(--ih-accent); font-size:13px; }
.info-hub-v2__type,
.info-hub-v2__status { display:inline-flex; padding:3px 7px; border-radius:999px; font-size:9.5px; font-weight:850; letter-spacing:.25px; text-transform:uppercase; }
.info-hub-v2__type--customer { background:#E9F1EB; color:#356747; }
.info-hub-v2__type--employee { background:#F7EBDD; color:#8A4A24; }
.info-hub-v2__type--holiday { background:#EEEAF5; color:#65517E; }
.info-hub-v2__person strong,
.info-hub-v2__person small,
.info-hub-v2__contact span,
.info-hub-v2__contact small { display:block; }
.info-hub-v2__person strong { font-size:13px; line-height:1.35; }
.info-hub-v2__person small,
.info-hub-v2__contact small { margin-top:3px; color:var(--ih-muted); font-size:10.5px; }
.info-hub-v2__gift-input { width:100%; min-width:145px; padding:7px 8px; border:1px solid #E8D9CC; border-radius:8px; background:#FFFEFC; font:500 12px 'Inter',sans-serif; }
.info-hub-v2__cost-input { width:115px; padding:7px 8px; border:1px solid #E8D9CC; border-radius:8px; background:#FFFEFC; text-align:right; font:600 12px 'Inter',sans-serif; }
.info-hub-v2__gift-readonly { min-width:145px; color:#5C524B; line-height:1.4; }
.info-hub-v2__cost { color:#70401F; font-weight:800; white-space:nowrap; }
.info-hub-v2__status { background:#F0ECE8; color:#625B55; }
.info-hub-v2__status--today { background:#FBE3D4; color:#8C3E17; }
.info-hub-v2__status--upcoming,
.info-hub-v2__status--approved { background:#E7F0E9; color:#376648; }
.info-hub-v2__status--pending { background:#FFF1D4; color:#8D600B; }
.info-hub-v2__status--past { background:#EEECE9; color:#716C67; }
.info-hub-v2__actions { display:flex; flex-wrap:wrap; gap:5px; min-width:150px; }
.info-hub-v2__action { padding:5px 8px; border:1px solid #DFCDBC; border-radius:8px; background:#fff; color:#70401F; font:700 10.5px 'Inter',sans-serif; cursor:pointer; }
.info-hub-v2__action--green { border-color:#BFD4C5; color:#356747; }
.info-hub-v2__action--danger { border-color:#E5C6C1; color:#9B3F32; }
.info-hub-v2__action:disabled { opacity:.48; cursor:not-allowed; }
.info-hub-v2__missing-panel { padding:22px; color:var(--ih-muted); line-height:1.6; }
.info-hub-v2__reminder-modal { position:relative; width:min(540px,100%); padding:26px; border:1px solid #EBDDCF; border-radius:20px; background:#FFFDFC; box-shadow:0 30px 70px rgba(45,30,20,.24); }
.info-hub-v2__reminder-close { position:absolute; top:18px; right:20px; }
.info-hub-v2__reminder-eyebrow { color:#9C572B; font-size:10.5px; font-weight:850; letter-spacing:.7px; text-transform:uppercase; }
.info-hub-v2__reminder-modal h3 { margin:6px 0 18px; color:#2B2927; font-family:'Cormorant Garamond',serif; font-size:27px; }
.info-hub-v2__reminder-modal textarea { width:100%; padding:12px; border:1px solid #EBDDCF; border-radius:12px; resize:vertical; color:#2B2927; font:500 13px/1.55 'Inter',sans-serif; }
.info-hub-v2__reminder-note { color:#746E68; font-size:11.5px; line-height:1.55; }
.info-hub-v2__reminder-actions { display:flex; justify-content:flex-end; gap:9px; margin-top:16px; }

@media (max-width:1500px) {
    .info-hub-v2__quick-grid { grid-template-columns:repeat(4,minmax(150px,1fr)); }
}
@media (max-width:1180px) {
    .info-hub-v2__overview { grid-template-columns:1fr; }
}
@media (max-width:980px) {
    #moduleInfoHub.info-hub-v2 { padding:10px; }
    .info-hub-v2__quick-grid { grid-template-columns:repeat(2,minmax(140px,1fr)); }
}
@media (max-width:640px) {
    .info-hub-v2__toolbar,
    .info-hub-v2__toolbar-primary,
    .info-hub-v2__toolbar-actions { width:100%; align-items:stretch; flex-direction:column; }
    .info-hub-v2__toolbar-primary > *,
    .info-hub-v2__toolbar-actions > *,
    .info-hub-v2__toolbar .info-hub-v2__field { width:100%; }
    .info-hub-v2__month-field { align-items:flex-start; flex-direction:column; }
    .info-hub-v2__month-field input { width:100%; }
    .info-hub-v2__budget-breakdown,
    .info-hub-v2__quick-grid { grid-template-columns:1fr; }
    .info-hub-v2__missing { flex-direction:column; }
    .info-hub-v2__missing-actions { width:100%; justify-content:space-between; }
    .info-hub-v2__filters .info-hub-v2__field { flex:1 1 100%; }
    .info-hub-v2__result-count { width:100%; margin-left:0; }
}

body:not(.hc-mobile-mode) .hc-sidebar {
    padding: 18px;
    gap: 16px;
    background: linear-gradient(180deg, rgba(23, 22, 21, 0.98), rgba(36, 29, 22, 0.98));
}

.hc-side-brand,
.hc-side-profile,
.hc-sidebar-toggle,
.hc-main-nav-link,
.hc-topbar-btn,
#hubHome .workspace-main-card,
#hubHome .hub-card {
    border-radius: 8px;
}

.hc-side-brand {
    padding: 12px;
}

.hc-side-mark {
    width: 46px;
    height: 46px;
    border-radius: 8px;
    background: #F7DDAE;
    color: #2B2118;
    box-shadow: none;
    font-size: 26px;
    font-weight: 800;
}

.hc-side-meta strong {
    font-size: 15px;
    line-height: 1.25;
}

.hc-side-meta span {
    font-size: 12px;
    line-height: 1.35;
}

.hc-main-nav-link {
    min-height: 50px;
    padding: 10px 11px;
}

.hc-main-nav-link:hover,
.hc-main-nav-link.active {
    transform: none;
}

.hc-main-nav-link.active {
    border: 1px solid rgba(231, 197, 142, 0.34);
    background: rgba(174, 124, 65, 0.18);
    box-shadow: none;
}

body:not(.hc-mobile-mode) .hc-page {
    max-width: none;
    padding: 22px clamp(16px, 3vw, 34px) 30px;
    gap: 14px;
}

.hc-main-topbar {
    margin-bottom: 0;
}

.hc-topbar-title h1 {
    font-size: clamp(32px, 4vw, 50px);
    line-height: 0.96;
}

.hc-topbar-title small {
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.9px;
}

.hc-topbar-btn {
    min-height: 40px;
    padding: 9px 12px;
}

#hubHome .hub-home-layout {
    display: block;
}

#hubHome .hub-home-panel {
    padding: 18px;
    border-radius: 8px;
}

#hubHome .hub-home-head.tools-only {
    display: none;
}

#hubHome .hub-grid {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 8px;
    margin: 0;
}

#hubHome .hub-card {
    min-height: 70px;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    background: var(--white);
    box-shadow: none;
}

#hubHome .hub-card::after {
    content: "open_in_new";
    font-family: "Material Icons";
    color: #7E531F;
    font-size: 20px;
}

#hubHome .hub-card:hover {
    transform: none;
    border-color: #dec5a0;
    box-shadow: 0 8px 22px rgba(42, 34, 22, 0.07);
}

#hubHome .hub-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

#hubHome .hub-card-icon .material-icons {
    font-size: 20px !important;
}

#hubHome .hub-card-info {
    min-width: 0;
}

#hubHome .hub-card-info h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 800;
}

#hubHome .hub-card-info p {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.45;
}

body:not(.hc-mobile-mode).hc-sidebar-collapsed .hc-shell {
    grid-template-columns: 88px minmax(0, 1fr);
}

body:not(.hc-mobile-mode).hc-sidebar-collapsed .hc-sidebar {
    padding: 18px 12px;
}

body:not(.hc-mobile-mode).hc-sidebar-collapsed .hc-side-brand,
body:not(.hc-mobile-mode).hc-sidebar-collapsed .hc-main-nav-link {
    justify-content: center;
}

body:not(.hc-mobile-mode).hc-sidebar-collapsed .hc-side-meta,
body:not(.hc-mobile-mode).hc-sidebar-collapsed .hc-side-profile,
body:not(.hc-mobile-mode).hc-sidebar-collapsed .hc-nav-group-label,
body:not(.hc-mobile-mode).hc-sidebar-collapsed .hc-main-nav-text,
body:not(.hc-mobile-mode).hc-sidebar-collapsed .hc-sidebar-toggle span {
    display: none !important;
}

body:not(.hc-mobile-mode).hc-sidebar-collapsed .hc-main-nav-link,
body:not(.hc-mobile-mode).hc-sidebar-collapsed .hc-sidebar-toggle {
    justify-content: center;
    padding-inline: 12px;
}

/* 2026-07-17 refined command-center layout for Hanh chinh: Plus Jakarta Sans, EVER gold/cream only. */
:root {
    --hc-font: "Plus Jakarta Sans", system-ui, sans-serif;
    --hc-ink: #1D1A16;
    --hc-muted: #75695D;
    --hc-bronze: #AE7C41;
    --hc-bronze-dark: #6D4D23;
    --hc-cream: #FFFDF9;
    --hc-cream-2: #F7EFE3;
    --hc-line-soft: rgba(126, 92, 54, 0.12);
    --hc-card-shadow: 0 18px 52px rgba(84, 50, 25, 0.10);
}

html {
    -webkit-font-smoothing: antialiased;
    text-rendering: geometricPrecision;
}

body,
button,
input,
select,
textarea {
    font-family: var(--hc-font) !important;
}

body:not(.hc-mobile-mode) {
    background:
        radial-gradient(circle at 58% 0%, rgba(174,124,65,0.14), transparent 32%),
        radial-gradient(circle at 86% 12%, rgba(214,184,146,0.22), transparent 28%),
        linear-gradient(135deg, #FFFDF9 0%, #F7EFE3 56%, #F2E5D4 100%);
}

body:not(.hc-mobile-mode) .hc-shell {
    grid-template-columns: 260px minmax(0, 1fr);
}

body:not(.hc-mobile-mode) .hc-sidebar {
    padding: 30px 20px;
    gap: 18px;
    color: var(--hc-ink);
    background: rgba(255,253,249,0.90);
    border-right: 1px solid var(--hc-line-soft);
    box-shadow: 18px 0 54px rgba(72,44,20,0.08);
}

body:not(.hc-mobile-mode) .hc-sidebar::-webkit-scrollbar {
    width: 6px;
}

body:not(.hc-mobile-mode) .hc-sidebar::-webkit-scrollbar-thumb {
    background: rgba(122,73,34,0.22);
    border-radius: 999px;
}

.hc-sidebar-toggle,
.hc-side-profile,
.hc-side-brand {
    border-radius: 18px;
    border-color: rgba(126,92,54,0.14);
    background: rgba(255,255,255,0.72);
    box-shadow: 0 14px 36px rgba(94,56,26,0.07);
}

.hc-sidebar-toggle {
    min-height: 44px;
    color: var(--hc-bronze-dark);
}

.hc-sidebar-toggle:hover {
    color: #fff;
    background: linear-gradient(135deg, var(--hc-bronze), var(--hc-bronze-dark));
    box-shadow: 0 14px 28px rgba(122,85,43,0.20);
}

.hc-side-profile-label,
.hc-nav-group-label,
.hc-side-profile-role,
.hc-main-nav-sub,
.hc-side-profile-chip label {
    color: rgba(95,69,42,0.60);
}

.hc-side-profile-name,
.hc-side-profile-chip strong,
.hc-main-nav-title {
    color: var(--hc-ink);
}

.hc-side-profile-role {
    font-weight: 800;
}

.hc-side-profile-chip {
    background: rgba(255,255,255,0.58);
    border-color: rgba(126,92,54,0.12);
}

.hc-nav-group-label {
    margin-top: 12px;
    font-weight: 900;
}

.hc-main-nav-link {
    min-height: 46px;
    border-radius: 13px;
    color: #5C544C;
    background: transparent;
    gap: 9px;
    padding-inline: 11px;
}

.hc-main-nav-title {
    font-size: 13px;
    line-height: 1.25;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.hc-main-nav-link .material-icons {
    color: var(--hc-bronze);
}

.hc-main-nav-link:hover,
.hc-main-nav-link.active {
    color: #fff;
    border: 1px solid rgba(255,255,255,0.70);
    background: linear-gradient(135deg, var(--hc-bronze), var(--hc-bronze-dark));
    box-shadow: 0 14px 28px rgba(122,85,43,0.20);
}

.hc-main-nav-link:hover .material-icons,
.hc-main-nav-link.active .material-icons,
.hc-main-nav-link:hover .hc-main-nav-title,
.hc-main-nav-link.active .hc-main-nav-title {
    color: #fff;
}

.hc-main-nav-link:hover .hc-main-nav-sub,
.hc-main-nav-link.active .hc-main-nav-sub {
    color: rgba(255,255,255,0.74);
}

body:not(.hc-mobile-mode) .hc-page {
    max-width: none;
    padding: 42px clamp(22px, 3.5vw, 54px) 42px;
    gap: 22px;
}

.hc-main-topbar {
    align-items: flex-start;
    margin-bottom: 0;
}

.hc-topbar-title small {
    color: var(--hc-bronze);
    font-weight: 900;
    letter-spacing: 0.6px;
}

.hc-topbar-title h1,
.workspace-section-title,
.sub-title,
.workspace-main-card h1,
.workspace-main-card h2,
.workspace-main-card h3,
.modal-content h2,
.modal-content h3,
.personnel-card-name,
.personnel-import-dialog-title,
.attendance-print-title {
    font-family: var(--hc-font) !important;
}

.hc-topbar-title h1 {
    color: #17120F;
    font-size: clamp(34px, 3.6vw, 58px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.hc-topbar-title p {
    color: var(--hc-muted);
}

.hc-topbar-btn {
    min-height: 42px;
    border-radius: 999px;
    background: rgba(255,255,255,0.74);
    border-color: rgba(174,124,65,0.20);
    color: #3A241B;
    box-shadow: 0 12px 26px rgba(84,50,25,0.07);
}

.hc-topbar-btn.danger {
    color: #fff;
    background: linear-gradient(135deg, var(--hc-ink), #3A241B);
    border-color: var(--hc-ink);
}

body:not(.hc-mobile-mode) #hubHome .hub-home-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 22px 28px;
    align-items: start;
}

body:not(.hc-mobile-mode) #hubHome .hub-home-panel {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

body:not(.hc-mobile-mode) #hubHome .hub-home-head.tools-only {
    position: relative;
    overflow: hidden;
    min-height: 305px;
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    gap: 22px;
    padding: clamp(34px, 4.4vw, 58px);
    border: 1px solid rgba(255,255,255,0.74);
    border-radius: 34px;
    background:
        linear-gradient(105deg, rgba(255,253,249,0.98) 0%, rgba(250,241,228,0.92) 43%, rgba(224,198,161,0.58) 100%);
    box-shadow: 0 20px 58px rgba(84,50,25,0.12);
    isolation: isolate;
}

body:not(.hc-mobile-mode) #hubHome .hub-home-head.tools-only::before {
    content: "";
    position: absolute;
    width: min(50vw, 660px);
    height: min(50vw, 660px);
    right: -90px;
    top: -235px;
    z-index: -1;
    border-radius: 999px;
    background:
        radial-gradient(circle at 46% 48%, rgba(255,255,255,0.76), transparent 0 3%),
        radial-gradient(circle at 50% 52%, rgba(174,124,65,0.55), rgba(174,124,65,0.26) 38%, rgba(242,226,202,0.28) 58%, transparent 70%);
    box-shadow: inset 0 0 74px rgba(255,250,241,0.82), 0 38px 100px rgba(174,124,65,0.20);
}

body:not(.hc-mobile-mode) #hubHome .hub-home-head.tools-only::after {
    content: "";
    position: absolute;
    right: 10%;
    top: 16%;
    width: 3px;
    height: 70%;
    border-radius: 999px;
    background: linear-gradient(180deg, transparent, rgba(255,255,255,0.92), transparent);
    box-shadow: 0 0 24px rgba(255,255,255,0.92), -60px 52px 120px rgba(174,124,65,0.22);
    transform: rotate(7deg);
}

body:not(.hc-mobile-mode) #hubHome .hub-home-head.tools-only > div:first-child {
    display: block;
    position: relative;
    z-index: 1;
    max-width: 660px;
}

.hc-hero-greeting {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 8px;
    max-width: min(100%, 860px);
}

.hc-hero-greeting-title {
    margin: 0;
    color: var(--hc-ink);
    font-size: clamp(24px, 2.6vw, 34px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.026em;
}

.hc-hero-greeting-date {
    color: #7A5B32;
    font-size: clamp(13px, 1.6vw, 17px);
    font-weight: 800;
    line-height: 1.45;
    letter-spacing: 0.01em;
}

body:not(.hc-mobile-mode) #hubHome .hub-home-head.tools-only .hc-hero-greeting-title {
    width: max-content;
    max-width: 100%;
    font-size: clamp(24px, 2.05vw, 32px);
    white-space: nowrap;
}

body:not(.hc-mobile-mode) #hubHome .hub-home-head.tools-only .hc-hero-greeting-date {
    margin-top: 2px;
    font-size: clamp(15px, 1.25vw, 18px);
}

body:not(.hc-mobile-mode) #hubHome .hub-home-head.tools-only .workspace-section-title {
    color: #17120F;
    font-size: clamp(34px, 4.2vw, 60px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.035em;
}

body:not(.hc-mobile-mode) #hubHome .hub-home-head.tools-only .workspace-section-note {
    max-width: 640px;
    margin-top: 18px;
    color: #5B4B3D;
    font-size: 14px;
    line-height: 1.7;
}

body:not(.hc-mobile-mode) #hubHome .workspace-chip-row {
    position: relative;
    z-index: 1;
}

body:not(.hc-mobile-mode) #hubHome .workspace-chip {
    background: rgba(255,255,255,0.78);
    border-color: rgba(174,124,65,0.22);
    color: #6D4D23;
}

body:not(.hc-mobile-mode) #hubHome .hub-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr)) !important;
    gap: 16px;
    margin: 22px 0 0;
}

body:not(.hc-mobile-mode) #hubHome .hub-card {
    min-height: 142px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 14px;
    border-radius: 22px;
    text-align: center;
    background: rgba(255,253,249,0.82);
    border: 1px solid rgba(255,255,255,0.74);
    box-shadow: 0 12px 34px rgba(84,50,25,0.08);
    backdrop-filter: blur(14px);
}

body:not(.hc-mobile-mode) #hubHome .hub-card::after,
body:not(.hc-mobile-mode) #hubHome .hub-arrow {
    display: none;
}

body:not(.hc-mobile-mode) #hubHome .hub-card:hover {
    transform: translateY(-5px);
    border-color: rgba(174,124,65,0.24);
    box-shadow: 0 24px 60px rgba(84,50,25,0.14);
}

body:not(.hc-mobile-mode) #hubHome .hub-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    color: var(--hc-bronze) !important;
    background: linear-gradient(145deg, rgba(174,124,65,0.13), rgba(214,184,146,0.22)), #FFF9F0 !important;
    box-shadow: 0 10px 24px rgba(174,124,65,0.12);
}

body:not(.hc-mobile-mode) #hubHome .hub-card-info h3 {
    margin: 0;
    color: var(--hc-ink);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.012em;
    white-space: nowrap;
}

body:not(.hc-mobile-mode) #hubHome .hub-card-info p {
    display: -webkit-box;
    min-height: 38px;
    margin-top: 6px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: var(--hc-muted);
    font-size: 12px;
    line-height: 1.45;
}

.hc-concept-rail {
    position: sticky;
    top: 28px;
    align-self: start;
    min-height: calc(100vh - 84px);
    padding: 28px 20px;
    border-left: 1px solid rgba(126,92,54,0.10);
    background: rgba(255,253,249,0.42);
}

.hc-rail-account,
.hc-rail-group,
.hc-rail-note {
    display: grid;
    gap: 12px;
    margin-bottom: 30px;
}

.hc-rail-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--hc-ink);
    font-size: 15px;
    font-weight: 900;
}

.hc-rail-info-list {
    display: grid;
    gap: 9px;
}

.hc-rail-info-row {
    display: grid;
    grid-template-columns: 105px minmax(0, 1fr);
    gap: 10px;
    align-items: baseline;
    padding: 9px 0;
    border-bottom: 1px solid rgba(126,92,54,0.10);
}

.hc-rail-info-row span {
    color: #928579;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
}

.hc-rail-info-row strong {
    min-width: 0;
    color: #2B241E;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hc-rail-group span,
.hc-rail-note span {
    color: #928579;
    font-size: 12px;
    font-weight: 900;
}

.hc-rail-group button {
    width: 100%;
    min-height: 44px;
    border: 0;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: #4C443D;
    background: transparent;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    text-align: left;
}

.hc-rail-group button:hover {
    background: rgba(174,124,65,0.09);
}

.hc-rail-group .material-icons {
    color: #8A5A1F;
    font-size: 18px;
}

.hc-rail-note p {
    margin: 0;
    color: #786C61;
    font-size: 13px;
    line-height: 1.65;
}

body:not(.hc-mobile-mode) .workspace-main-card,
body:not(.hc-mobile-mode) .module-workspace-left,
body:not(.hc-mobile-mode) .module-workspace-right {
    border-radius: 24px;
    background: rgba(255,253,249,0.82);
    border-color: rgba(255,255,255,0.72);
    box-shadow: 0 12px 34px rgba(84,50,25,0.08);
}

body:not(.hc-mobile-mode) #moduleAssets,
body:not(.hc-mobile-mode) #moduleAssetInventory {
    box-sizing: border-box;
    padding-inline: clamp(18px, 1.35vw, 30px) clamp(12px, 1vw, 22px);
}

body:not(.hc-mobile-mode).hc-assets-full-bleed .hc-page,
body:not(.hc-mobile-mode).hc-bhxh-full-bleed .hc-page {
    width: 100%;
    max-width: none;
    padding-inline: clamp(10px, 0.9vw, 18px);
}

body:not(.hc-mobile-mode).hc-assets-full-bleed #moduleAssets,
body:not(.hc-mobile-mode).hc-assets-full-bleed #moduleAssetInventory {
    padding-inline: 0;
}

body:not(.hc-mobile-mode).hc-bhxh-full-bleed #moduleInsurance {
    box-sizing: border-box;
    padding-inline: 0;
}

#moduleAssets .asset-toolbar,
#moduleAssetInventory .asset-toolbar {
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

#moduleAssets .asset-toolbar-actions,
#moduleAssetInventory .asset-toolbar-actions {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

#moduleAssets .asset-toolbar-actions .btn,
#moduleAssetInventory .asset-toolbar-actions .btn {
    white-space: nowrap;
}

/* Compact asset workspace: keep actions near the content they affect. */
body:not(.hc-mobile-mode).hc-module-assets .hc-page {
    padding-top: 18px;
    gap: 14px;
}

body:not(.hc-mobile-mode).hc-module-assets .hc-topbar-title h1 {
    font-size: clamp(36px, 3vw, 50px);
}

#moduleAssets .asset-grid {
    gap: 10px;
    margin-bottom: 10px;
}

#moduleAssets .asset-filter-card {
    padding: 8px 12px;
}

#moduleAssets .asset-filter-card.is-collapsed {
    padding-block: 6px;
}

#moduleAssets .asset-filter-toggle-btn {
    min-height: 38px;
    padding: 7px 8px;
}

#moduleAssets .asset-filter-actions {
    flex: 0 0 auto;
    flex-wrap: nowrap;
}

#moduleAssets .asset-filter-actions .asset-command-btn {
    width: 172px;
    min-height: 38px;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 12px;
    white-space: nowrap;
}

#moduleAssets .asset-table-card {
    padding: 13px;
}

#moduleAssets .asset-table-card > .asset-panel-head {
    margin-bottom: 8px;
}

#moduleAssets .asset-table-title-row {
    width: 100%;
    gap: 8px;
}

#moduleAssets .asset-table-title-row .work-assignment-panel-title {
    margin-right: 2px;
}

#moduleAssets .asset-table-actions {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: nowrap;
}

#moduleAssets .asset-table-actions .btn {
    min-height: 30px;
    justify-content: center;
    padding: 6px 10px;
    white-space: nowrap;
}

#moduleAssets .asset-count-chip {
    min-height: 28px;
    padding: 5px 9px;
    font-size: 11px;
}

#moduleAssets .asset-table-wrap {
    max-height: min(74vh, 840px);
    border-radius: 16px;
}

#moduleAssets .asset-table th {
    padding: 9px 10px;
}

#moduleAssets .asset-table td {
    padding: 7px 10px;
}

#moduleAssets .asset-flat-row td {
    height: 38px;
    padding-top: 6px;
    padding-bottom: 6px;
}

#moduleAssets .asset-group-title {
    margin: 8px 0 4px;
    padding: 7px 10px;
    border-radius: 13px;
}

#moduleAssets .asset-group-title .material-icons {
    width: 24px;
    height: 24px;
    border-radius: 9px;
    font-size: 15px;
}

#moduleAssets .asset-table-pill {
    padding: 4px 8px;
    font-size: 11.5px;
}

#moduleAssets .asset-flat-row .asset-action-btn {
    min-height: 28px;
    padding: 5px 8px;
}

.asset-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 16px;
    align-items: stretch;
}

.asset-grid.no-import {
    grid-template-columns: 1fr;
}

.asset-stats {
    margin-bottom: 18px;
}

#moduleAssets .asset-stats {
    display: none !important;
}

#moduleAssets .asset-stats.work-assignment-stats-full {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.asset-category-stat {
    display: grid;
    align-content: start;
    gap: 8px;
    min-height: 132px;
}

.asset-category-stat span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 0;
}

.asset-category-stat span .material-icons {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    color: #8A5A1F;
    background: rgba(174,124,65,0.12);
    font-size: 15px;
}

.asset-category-stat small {
    margin-top: 0;
}

.asset-stat-breakdown {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-top: 2px;
}

.asset-stat-breakdown b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 5px 7px;
    border-radius: 999px;
    color: #6D5E4E;
    background: rgba(245,237,216,0.72);
    font-size: 10.5px;
    font-weight: 900;
    line-height: 1.2;
    text-align: center;
}

.asset-stat-card small {
    display: block;
    margin-top: 8px;
    color: #8B8074;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
}

.asset-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.asset-table-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.asset-count-chips {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.asset-count-chip {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #745024;
    background: rgba(245,237,216,0.82);
    border: 1px solid rgba(174,124,65,0.16);
    font: inherit;
    font-size: 11.5px;
    font-weight: 900;
    white-space: nowrap;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

.asset-count-chip:hover {
    transform: translateY(-1px);
    border-color: rgba(174,124,65,0.34);
    background: #FFF4DC;
}

.asset-count-chip.active {
    color: #1F6B33;
    border-color: rgba(31,107,51,0.24);
    background: #EAF7EF;
}

.asset-count-chip .material-icons {
    font-size: 15px;
}

.asset-filter-card,
.asset-import-card {
    padding: 13px 16px;
}

.asset-filter-card.is-collapsed {
    padding-block: 10px;
}

.asset-filter-card.is-collapsed .asset-filter-body {
    display: none !important;
}

.asset-filter-card.is-expanded .asset-filter-body {
    display: grid;
}

.asset-filter-card .asset-panel-head,
.asset-import-card .asset-panel-head {
    align-items: center;
    margin-bottom: 8px;
}

.asset-filter-head {
    cursor: pointer;
}

.asset-filter-card.is-collapsed .asset-panel-head {
    margin-bottom: 0;
}

.asset-filter-toggle-btn {
    flex: 1;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(174,124,65,0.18);
    border-radius: 16px;
    background: rgba(255,255,255,0.72);
    color: #2D251E;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.asset-filter-card.is-collapsed .asset-filter-toggle-btn {
    border-color: transparent;
    background: transparent;
}

.asset-filter-toggle-btn > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #2D251E;
    font-size: 13px;
    font-weight: 950;
    white-space: nowrap;
}

.asset-filter-toggle-btn > span .material-icons {
    color: #B07A35;
    font-size: 18px;
}

.asset-filter-toggle-btn small {
    min-width: 0;
    flex: 1;
    color: #7A6E60;
    font-size: 11px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.asset-filter-toggle-icon {
    color: #8A6531;
    font-size: 20px;
    transition: transform .18s ease;
}

.asset-filter-toggle-btn[aria-expanded="true"] .asset-filter-toggle-icon {
    transform: rotate(180deg);
}

.asset-filter-body {
    display: grid;
    gap: 8px;
}

.asset-filter-actions {
    cursor: default;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.asset-filter-grid {
    display: grid;
    grid-template-columns: 0.9fr 0.9fr 0.9fr 1.18fr;
    gap: 8px;
}

.asset-filter-grid label,
.asset-form-grid label {
    display: block;
    min-width: 0;
}

.asset-filter-grid span,
.asset-form-grid label > span {
    display: block;
    margin-bottom: 4px;
    color: #83776A;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.35px;
    text-transform: uppercase;
}

.asset-filter-grid input,
.asset-filter-grid select,
.asset-form-grid input,
.asset-form-grid select,
.asset-form-grid textarea {
    width: 100%;
    min-height: 36px;
    border: 1px solid rgba(174,124,65,0.20);
    border-radius: 12px;
    padding: 7px 10px;
    color: #2E271F;
    background: rgba(255,255,255,0.88);
    font-family: var(--hc-font, "Plus Jakarta Sans", sans-serif);
    font-size: 12px;
    font-weight: 650;
    outline: none;
    box-sizing: border-box;
}

.asset-form-grid input,
.asset-form-grid select,
.asset-form-grid textarea {
    min-height: 42px;
    border-radius: 14px;
    padding: 10px 12px;
    font-size: 13px;
}

.asset-form-grid label > span {
    margin-bottom: 6px;
    font-size: 11px;
}

.asset-filter-grid input:focus,
.asset-filter-grid select:focus,
.asset-form-grid input:focus,
.asset-form-grid select:focus,
.asset-form-grid textarea:focus {
    border-color: rgba(174,124,65,0.58);
    box-shadow: 0 0 0 4px rgba(174,124,65,0.10);
}

.asset-import-card {
    display: flex;
    flex-direction: column;
}

.asset-import-toggle {
    min-height: 34px;
    white-space: nowrap;
}

.asset-import-toggle.active {
    border-color: rgba(174,124,65,0.42);
    background: rgba(174,124,65,0.10);
    color: #7B501F;
}

.asset-import-dropdown {
    margin-top: 10px;
    padding: 10px;
    border: 1px solid rgba(174,124,65,0.18);
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(255,252,246,0.94), rgba(247,239,226,0.76));
}

.asset-import-dropdown[hidden] {
    display: none !important;
}

.asset-import-form {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(210px, 0.7fr) auto;
    gap: 8px;
    align-items: end;
}

.asset-import-form label {
    display: block;
    min-width: 0;
}

.asset-import-form input[type="file"] {
    min-height: 36px;
    padding-top: 8px;
    padding-bottom: 8px;
}

.asset-import-submit {
    min-height: 36px;
    white-space: nowrap;
}

.asset-import-placeholder {
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 16px;
    border: 1px dashed rgba(174,124,65,0.34);
    background: linear-gradient(145deg, rgba(255,250,241,0.86), rgba(246,236,220,0.72));
    color: #5E5042;
}

.asset-import-placeholder .material-icons {
    width: 32px;
    height: 32px;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    color: #8A5A1F;
    background: rgba(174,124,65,0.12);
}

.asset-import-placeholder strong,
.asset-import-placeholder span {
    display: block;
}

.asset-import-placeholder strong {
    margin-bottom: 0;
    color: #2C241C;
    font-size: 12px;
    font-weight: 900;
}

.asset-import-placeholder span {
    font-size: 11.5px;
    line-height: 1.55;
}

.asset-quality-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.asset-group-row td {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

.asset-group-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 14px 0 8px;
    padding: 10px 14px;
    border: 1px solid rgba(174,124,65,0.16);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255,248,237,0.96), rgba(239,226,205,0.72));
    color: #2E271F;
}

.asset-group-title span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 950;
    letter-spacing: 0.1px;
}

.asset-group-title .material-icons {
    width: 28px;
    height: 28px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #8A5A1F;
    background: rgba(174,124,65,0.12);
    font-size: 17px;
}

.asset-group-title small {
    color: #7B6D5F;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.asset-quality-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 800;
    border: 1px solid transparent;
}

.asset-quality-chip .material-icons {
    font-size: 15px;
}

.asset-quality-chip.neutral {
    color: #6A6258;
    background: rgba(245,237,216,0.72);
    border-color: rgba(174,124,65,0.14);
}

.asset-quality-chip.warning {
    color: #996000;
    background: #FFF3D8;
    border-color: #E8C783;
}

.asset-quality-chip.positive {
    color: #1F6B33;
    background: #EAF8ED;
    border-color: #C5E7CC;
}

.asset-table-card {
    overflow: hidden;
}

.asset-mode-view[hidden] {
    display: none !important;
}

.asset-inventory-control-card,
.asset-inventory-campaign-card,
.asset-inventory-table-card {
    margin-bottom: 14px;
}

.asset-inventory-table-card[hidden] {
    display: none !important;
}

.asset-inventory-head,
.asset-inventory-table-head {
    align-items: center;
    gap: 12px;
}

.asset-inventory-filter-card .asset-inventory-head > div:not(.asset-filter-actions) {
    display: none;
}

.asset-inventory-filter-card .asset-filter-actions .btn {
    flex: 0 0 auto;
    min-height: 36px;
    white-space: nowrap;
}

.asset-inventory-filter-card .asset-filter-body {
    gap: 10px;
}

.asset-inventory-campaign-list {
    display: grid;
    gap: 8px;
}

.asset-inventory-campaign-row {
    width: 100%;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid rgba(174,124,65,0.16);
    border-radius: 16px;
    background: rgba(255,255,255,0.78);
    color: #2D251E;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.asset-inventory-campaign-row:hover,
.asset-inventory-campaign-row.active {
    border-color: rgba(174,124,65,0.42);
    background: #FFFBF3;
    box-shadow: 0 10px 24px rgba(61, 43, 23, .07);
}

.asset-inventory-campaign-icon {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    color: #8A5E24;
    background: rgba(174,124,65,0.12);
}

.asset-inventory-campaign-icon .material-icons {
    font-size: 19px;
}

.asset-inventory-campaign-main,
.asset-inventory-campaign-stats {
    min-width: 0;
}

.asset-inventory-campaign-main {
    display: grid;
    gap: 5px;
}

.asset-inventory-campaign-main strong {
    color: #2D251E;
    font-size: 13px;
    font-weight: 950;
    line-height: 1.35;
}

.asset-inventory-campaign-main small,
.asset-inventory-campaign-stats {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.asset-inventory-campaign-main b,
.asset-inventory-campaign-stats b {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 8px;
    border-radius: 999px;
    color: #755F43;
    background: rgba(245,237,216,0.74);
    font-size: 10.5px;
    font-weight: 900;
}

.asset-inventory-campaign-stats {
    justify-content: flex-end;
}

.asset-inventory-table-head {
    flex-wrap: wrap;
}

.asset-inventory-title-line {
    flex: 1 1 560px;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.asset-inventory-title-line .work-assignment-panel-title {
    margin: 0;
    white-space: nowrap;
}

.asset-inventory-controls {
    display: grid;
    grid-template-columns: minmax(140px, 0.35fr) minmax(220px, 0.48fr) minmax(320px, 1fr);
    gap: 10px;
    align-items: end;
}

.asset-inventory-controls label,
.asset-inventory-filter-row {
    min-width: 0;
}

.asset-inventory-controls label > span {
    display: block;
    margin-bottom: 5px;
    color: #83776A;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.35px;
    text-transform: uppercase;
}

.asset-inventory-controls select,
.asset-inventory-filter-row select,
.asset-inventory-filter-row input,
.asset-inventory-status-select,
.asset-inventory-note-input {
    width: 100%;
    min-height: 36px;
    border: 1px solid rgba(174,124,65,0.20);
    border-radius: 12px;
    padding: 7px 10px;
    color: #2E271F;
    background: rgba(255,255,255,0.88);
    font-family: var(--hc-font, "Plus Jakarta Sans", sans-serif);
    font-size: 12px;
    font-weight: 750;
    outline: none;
    box-sizing: border-box;
}

.asset-inventory-controls select:focus,
.asset-inventory-filter-row select:focus,
.asset-inventory-filter-row input:focus,
.asset-inventory-status-select:focus,
.asset-inventory-note-input:focus {
    border-color: rgba(174,124,65,0.58);
    box-shadow: 0 0 0 4px rgba(174,124,65,0.10);
}

.asset-inventory-summary {
    flex: 1 1 420px;
    min-width: 280px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 0;
}

.asset-inventory-stat {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 6px 10px;
    border: 1px solid rgba(174,124,65,0.14);
    border-radius: 999px;
    background: linear-gradient(145deg, rgba(255,252,246,0.96), rgba(247,239,226,0.72));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.72);
    white-space: nowrap;
}

.asset-inventory-stat span {
    color: #7F7266;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.25px;
    text-transform: uppercase;
}

.asset-inventory-stat strong {
    color: #2B231B;
    font-size: 15px;
    font-weight: 950;
    letter-spacing: -0.2px;
}

.asset-inventory-stat.positive strong { color: #1F6B33; }
.asset-inventory-stat.warning strong { color: #9A6200; }
.asset-inventory-stat.danger strong { color: #B42318; }

.asset-inventory-filter-row {
    flex: 0 1 720px;
    margin-left: auto;
    display: grid;
    grid-template-columns: minmax(160px, 0.58fr) minmax(240px, 1fr) auto;
    gap: 8px;
    width: min(720px, 100%);
}

.asset-inventory-table-wrap {
    width: 100%;
    max-height: min(68vh, 760px);
    overflow: scroll;
    overscroll-behavior: contain;
    scrollbar-gutter: stable both-edges;
    border-radius: 22px;
    border: 1px solid rgba(174,124,65,0.14);
    background: rgba(255,255,255,0.72);
    cursor: grab;
    touch-action: pan-x pan-y;
}

.asset-inventory-table-wrap.is-dragging,
.asset-inventory-group-table-wrap.is-dragging,
.asset-table-wrap.is-dragging,
.asset-management-group-table-wrap.is-dragging {
    cursor: grabbing;
    user-select: none;
}

.asset-inventory-table {
    width: 100%;
    min-width: 2060px;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    color: #2D251E;
}

.asset-inv-col-stt { width: 58px; }
.asset-inv-col-code { width: 155px; }
.asset-inv-col-brand { width: 130px; }
.asset-inv-col-device { width: 300px; }
.asset-inv-col-quantity { width: 90px; }
.asset-inv-col-serial { width: 170px; }
.asset-inv-col-user { width: 190px; }
.asset-inv-col-department { width: 190px; }
.asset-inv-col-condition { width: 290px; }
.asset-inv-col-status { width: 180px; }
.asset-inv-col-note { width: 240px; }
.asset-inv-col-action { width: 124px; }

.asset-inventory-menu-cell {
    overflow: visible !important;
    padding-inline: 6px !important;
}

.asset-inventory-menu-cell-end {
    text-align: center !important;
    vertical-align: middle !important;
}

.asset-inventory-row-menu-btn {
    width: 30px;
    height: 30px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(174,124,65,0.18);
    border-radius: 10px;
    background: rgba(255,255,255,0.92);
    color: #7A5B33;
    cursor: pointer;
    transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.asset-inventory-row-menu-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    border-color: rgba(174,124,65,0.38);
    background: #FFF8ED;
}

.asset-inventory-row-menu-btn:disabled {
    opacity: .42;
    cursor: not-allowed;
}

.asset-inventory-row-menu-btn .material-icons {
    font-size: 20px;
}

.asset-inventory-floating-menu {
    position: fixed;
    z-index: 16250;
    width: 168px;
    padding: 7px;
    display: grid;
    gap: 4px;
    border: 1px solid rgba(174,124,65,0.22);
    border-radius: 14px;
    background: rgba(255,255,255,0.98);
    box-shadow: 0 18px 44px rgba(72,48,22,0.20);
    backdrop-filter: blur(16px);
}

.asset-form-modal .asset-inventory-floating-menu.is-inside-modal {
    z-index: 500;
}

.asset-inventory-floating-menu button {
    width: 100%;
    min-height: 36px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 9px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #4F4032;
    font: inherit;
    font-size: 12px;
    font-weight: 850;
    text-align: left;
    cursor: pointer;
}

.asset-inventory-floating-menu button:hover {
    background: #FFF6E8;
}

.asset-inventory-floating-menu button.danger {
    color: #B42318;
}

.asset-inventory-floating-menu button.danger:hover {
    background: #FFF0EE;
}

.asset-inventory-floating-menu .material-icons {
    font-size: 18px;
}

.asset-photo-upload[hidden] {
    display: none !important;
}

.asset-inventory-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 12px 10px;
    border-bottom: 1px solid rgba(174,124,65,0.18);
    background: rgba(252,247,239,0.96);
    color: #7A5B33;
    font-size: 10.5px;
    font-weight: 950;
    letter-spacing: 0.38px;
    text-align: center;
    text-transform: uppercase;
    white-space: nowrap;
}

.asset-inventory-table td {
    height: auto;
    min-height: 62px;
    padding: 12px 10px;
    border-bottom: 1px solid rgba(174,124,65,0.10);
    background: rgba(255,255,255,0.62);
    color: #51453A;
    font-size: 12px;
    font-weight: 780;
    line-height: 1.32;
    text-align: center;
    vertical-align: middle;
    white-space: normal;
    overflow: visible;
    overflow-wrap: anywhere;
    word-break: break-word;
    text-overflow: clip;
}

.asset-inventory-table tbody tr:hover td {
    background: rgba(255,250,241,0.98);
}

.asset-inventory-group-row td {
    height: auto;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    overflow: visible;
}

.asset-inventory-group-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 14px 0 8px;
    padding: 10px 14px;
    border: 1px solid rgba(174,124,65,0.16);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255,248,237,0.96), rgba(239,226,205,0.72));
    color: #2E271F;
}

.asset-inventory-group-title span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #2B231B;
    font-size: 13px;
    font-weight: 950;
}

.asset-inventory-group-title .material-icons {
    width: 28px;
    height: 28px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #8A5A1F;
    background: rgba(174,124,65,0.12);
    font-size: 17px;
}

.asset-inventory-group-title small {
    color: #7B6D5F;
    font-size: 11px;
    font-weight: 850;
    white-space: nowrap;
}

.asset-inventory-device {
    text-align: left !important;
}

.asset-inventory-device strong {
    display: block;
    min-width: 0;
    color: #19140F;
    font-size: 12.8px;
    font-weight: 950;
    white-space: normal;
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
}

.asset-inventory-condition .asset-table-pill {
    max-width: none;
    padding-inline: 12px;
    border-radius: 14px;
    white-space: normal;
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
}

.asset-inventory-status-select {
    min-height: 32px;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    text-align: center;
}

.asset-inventory-info-btn {
    width: 100%;
    min-width: 132px;
    min-height: 34px;
    padding: 7px 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid rgba(174,124,65,0.22);
    border-radius: 12px;
    background: #FFF8ED;
    color: #795323;
    font: inherit;
    font-size: 11px;
    font-weight: 900;
    line-height: 1.25;
    cursor: pointer;
}

.asset-inventory-info-btn .material-icons {
    font-size: 17px;
}

.asset-inventory-info-btn.keep {
    border-color: rgba(31,122,58,0.22);
    background: #EAF7EF;
    color: #1F7A3A;
}

.asset-inventory-info-btn.edit {
    border-color: rgba(180,107,0,0.24);
    background: #FFF4DD;
    color: #945E09;
}

.asset-inventory-info-btn.cancel {
    border-color: rgba(180,35,24,0.24);
    background: #FFF0EE;
    color: #B42318;
}

.asset-inventory-info-btn.extra {
    border-color: rgba(15,107,134,0.24);
    background: #E7F7FB;
    color: #0F6B86;
}

.asset-inventory-note-display {
    min-height: 44px;
    max-height: 74px;
    padding: 8px 9px;
    overflow: auto;
    border: 1px solid rgba(174,124,65,0.14);
    border-radius: 11px;
    background: rgba(255,255,255,0.72);
    color: #6D5E4E;
    font-size: 11px;
    font-weight: 750;
    line-height: 1.38;
    text-align: left;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.asset-inventory-row.is-cancelled td:nth-child(n+1):nth-child(-n+9) {
    color: #C62828 !important;
    text-decoration-line: line-through;
    text-decoration-color: #D11F1F;
    text-decoration-thickness: 2px;
}

.asset-inventory-row.is-cancelled td {
    background: rgba(255,235,235,0.82);
}

.asset-inventory-row.is-cancelled .asset-table-pill {
    color: #B42318;
    background: #FFE2DF;
}

.asset-inventory-status-select.matched,
.asset-inventory-row.matched .asset-inventory-status-select {
    color: #1F6B33;
    background: #EAF8ED;
}

.asset-inventory-status-select.unchecked,
.asset-inventory-row.unchecked .asset-inventory-status-select {
    color: #7A5B33;
    background: #F6EAD4;
}

.asset-inventory-status-select.mismatch,
.asset-inventory-status-select.missing,
.asset-inventory-status-select.damaged,
.asset-inventory-status-select.extra,
.asset-inventory-row.mismatch .asset-inventory-status-select,
.asset-inventory-row.missing .asset-inventory-status-select,
.asset-inventory-row.damaged .asset-inventory-status-select,
.asset-inventory-row.extra .asset-inventory-status-select {
    color: #B42318;
    background: #FFE6E2;
}

.asset-inventory-status-select.storage_confirmed,
.asset-inventory-row.storage_confirmed .asset-inventory-status-select {
    color: #0F6B86;
    background: #E7F7FB;
}

.asset-inventory-checked {
    display: block;
    margin-top: 4px;
    color: #918579;
    font-size: 10px;
    font-weight: 850;
    white-space: nowrap;
}

.asset-inventory-note-input {
    height: 54px;
    min-height: 54px;
    max-height: 54px;
    padding: 7px 9px;
    font-size: 11.5px;
    line-height: 1.35;
    resize: none;
    overflow-y: auto;
    white-space: pre-wrap;
}

.asset-inventory-code-detail-btn {
    padding: 6px 9px;
    border: 1px solid rgba(174,124,65,0.28);
    border-radius: 999px;
    background: #FFF7EA;
    color: #855718;
    font: inherit;
    font-size: 10.5px;
    font-weight: 950;
    line-height: 1.2;
    cursor: pointer;
}

.asset-inventory-code-detail-btn:hover {
    border-color: rgba(174,124,65,0.5);
    background: #FCEACD;
}

.asset-inventory-merged-row td {
    background: rgba(255,252,246,0.92);
}

.asset-inventory-total-quantity {
    color: #855718;
    font-size: 14px;
}

.asset-inventory-placement {
    display: block;
    white-space: normal;
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
}

.asset-inventory-aggregate-status,
.asset-inventory-aggregate-note {
    color: #796B5D;
    font-size: 11px;
    font-weight: 850;
}

.asset-inventory-group-modal {
    z-index: 10040;
}

.asset-inventory-group-dialog {
    width: min(96vw, 1540px);
    max-width: 1540px;
}

.asset-inventory-group-table-wrap {
    max-height: min(68vh, 720px);
    overflow: scroll;
    overscroll-behavior: contain;
    scrollbar-gutter: stable both-edges;
    border: 1px solid rgba(174,124,65,0.14);
    border-radius: 18px;
    cursor: grab;
    touch-action: pan-x pan-y;
}

.asset-inventory-group-table {
    min-width: 2030px;
}

.asset-inventory-group-table th:nth-child(1) { width: 155px; }
.asset-inventory-group-table th:nth-child(2) { width: 130px; }
.asset-inventory-group-table th:nth-child(3) { width: 300px; }
.asset-inventory-group-table th:nth-child(4) { width: 90px; }
.asset-inventory-group-table th:nth-child(5) { width: 170px; }
.asset-inventory-group-table th:nth-child(6) { width: 190px; }
.asset-inventory-group-table th:nth-child(7) { width: 220px; }
.asset-inventory-group-table th:nth-child(8) { width: 290px; }
.asset-inventory-group-table th:nth-child(9) { width: 180px; }
.asset-inventory-group-table th:nth-child(10) { width: 240px; }
.asset-inventory-group-table th:nth-child(11) { width: 124px; }

.asset-inventory-merged-row .asset-action-btn.detail {
    min-width: 104px;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    justify-content: center;
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
}

.asset-inventory-fullscreen-btn,
.asset-table-fullscreen-btn {
    min-height: 30px;
    padding: 6px 10px;
    white-space: nowrap;
}

body.asset-inventory-fullscreen-active {
    overflow: hidden;
}

.asset-inventory-table-card.asset-inventory-fullscreen {
    position: fixed;
    inset: 12px;
    z-index: 14030;
    display: flex;
    flex-direction: column;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 18px;
    border-radius: 22px;
    background: #FFFEFB;
    box-shadow: 0 28px 80px rgba(28, 20, 12, .28);
}

.asset-inventory-table-card.asset-inventory-fullscreen .asset-inventory-table-head {
    flex: 0 0 auto;
}

.asset-inventory-table-card.asset-inventory-fullscreen .asset-inventory-title-line {
    flex: 1 1 520px;
}

.asset-inventory-table-card.asset-inventory-fullscreen .asset-inventory-filter-row {
    flex: 0 1 760px;
    width: min(760px, 100%);
}

.asset-inventory-table-card.asset-inventory-fullscreen .asset-inventory-table-wrap {
    flex: 1;
    max-height: none;
    min-height: 0;
}

.asset-inventory-table-card.asset-inventory-fullscreen .asset-inventory-table {
    min-width: 2150px;
}

.asset-table-wrap {
    width: 100%;
    max-height: min(68vh, 760px);
    overflow: scroll;
    overscroll-behavior: contain;
    scrollbar-gutter: stable both-edges;
    border-radius: 22px;
    border: 1px solid rgba(174,124,65,0.14);
    background: rgba(255,255,255,0.72);
    cursor: grab;
    touch-action: pan-x pan-y;
}

body.asset-table-fullscreen-active {
    overflow: hidden;
}

.asset-table-card.asset-table-fullscreen {
    position: fixed;
    inset: 12px;
    z-index: 14020;
    display: flex;
    flex-direction: column;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 18px;
    border-radius: 22px;
    background: #FFFEFB;
    box-shadow: 0 28px 80px rgba(28, 20, 12, .28);
}

.asset-table-card.asset-table-fullscreen .asset-panel-head {
    flex: 0 0 auto;
}

.asset-table-card.asset-table-fullscreen .asset-table-wrap {
    flex: 1;
    max-height: none;
    min-height: 0;
}

.asset-table-card.asset-table-fullscreen .asset-table {
    min-width: 1080px;
}

.asset-table {
    width: 100%;
    min-width: 1080px;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    color: #2D251E;
}

.asset-col-stt { width: 5%; }
.asset-col-brand { width: 9%; }
.asset-col-device { width: 25%; }
.asset-col-user { width: 17%; }
.asset-col-department { width: 12%; }
.asset-col-condition { width: 17%; }
.asset-col-detail { width: 15%; }

.asset-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 13px 14px;
    border-bottom: 1px solid rgba(174,124,65,0.18);
    background: rgba(252,247,239,0.96);
    color: #7A5B33;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.5px;
    text-align: center;
    text-transform: uppercase;
    white-space: nowrap;
}

.asset-table td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(174,124,65,0.10);
    background: rgba(255,255,255,0.58);
    vertical-align: middle;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.asset-table th:first-child,
.asset-table td:first-child {
    text-align: center;
}

.asset-table th:nth-child(2),
.asset-table td:nth-child(2) {
    text-align: center;
}

.asset-table th:nth-child(3),
.asset-table td:nth-child(3) {
    text-align: left;
}

.asset-table th:nth-child(4),
.asset-table td:nth-child(4) {
    text-align: center;
}

.asset-table th:nth-child(5),
.asset-table td:nth-child(5) {
    text-align: center;
}

.asset-table th:nth-child(6),
.asset-table td:nth-child(6) {
    text-align: center;
}

.asset-table th:last-child,
.asset-table td:last-child {
    text-align: center;
}

.asset-table tbody tr:hover td {
    background: rgba(255,250,241,0.96);
}

.asset-empty-cell {
    padding: 28px !important;
    color: #7D7166;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

.asset-empty-cell.error {
    color: #B42318;
    background: #FFF3F1 !important;
}

.asset-stt-cell {
    color: #7A5B33;
    font-size: 12.5px;
    font-weight: 950;
}

.asset-title-cell,
.asset-code-cell,
.asset-owner-cell,
.asset-user-cell,
.asset-date-cell,
.asset-condition-cell,
.asset-department-cell,
.asset-action-row {
    display: grid;
    gap: 5px;
    min-width: 0;
    align-items: center;
    justify-items: center;
    text-align: center;
}

.asset-title-cell strong {
    color: #241D17;
    font-size: 13.5px;
    font-weight: 900;
    line-height: 1.35;
}

.asset-title-cell span,
.asset-title-cell small,
.asset-code-cell small,
.asset-owner-cell span,
.asset-user-cell span,
.asset-date-cell span,
.asset-department-cell,
.asset-condition,
.asset-muted {
    color: #7E7368;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.45;
}

.asset-code-cell {
    padding-left: 0;
}

.asset-date-cell b {
    color: #5F4A32;
    font-weight: 900;
}

.asset-condition-cell {
    max-width: 190px;
    color: #5F554B;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.45;
}

.asset-department-cell {
    max-width: 170px;
    color: #5F554B;
    font-size: 12px;
    font-weight: 850;
    line-height: 1.45;
}

.asset-user-cell strong {
    color: #241D17;
    font-size: 12.5px;
    font-weight: 900;
    line-height: 1.35;
}

.asset-serial-line {
    display: inline-flex !important;
    align-items: center;
    gap: 5px;
    width: fit-content;
    max-width: 100%;
    padding: 3px 8px;
    border-radius: 999px;
    color: #69513A !important;
    background: rgba(245,237,216,0.72);
    font-size: 11px !important;
    font-weight: 850 !important;
}

.asset-serial-line .material-icons {
    font-size: 14px;
    color: #8A5A1F;
}

.asset-install-pill {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: fit-content;
    max-width: 100%;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 10.8px !important;
    font-weight: 900 !important;
    line-height: 1.25;
    white-space: normal;
}

.asset-install-pill .material-icons {
    flex: 0 0 auto;
    font-size: 14px;
}

.asset-install-pill.assigned {
    color: #0F5F78 !important;
    background: #E7F7FB;
    border: 1px solid rgba(15,107,134,0.14);
}

.asset-install-pill.available {
    color: #1F6B33 !important;
    background: #EAF8ED;
    border: 1px solid #C5E7CC;
}

.asset-code-cell span {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    padding: 4px 9px;
    border-radius: 999px;
    color: #5C3D14;
    background: #FFF3D8;
    font-size: 11px;
    font-weight: 900;
}

.asset-code-cell span.missing {
    color: #8A4B00;
    background: #FBE7C6;
}

.asset-config-detail-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: fit-content;
    max-width: 100%;
    min-height: 28px;
    border: 1px solid rgba(15,107,134,0.16);
    border-radius: 999px;
    padding: 5px 10px;
    color: #0F6B86;
    background: rgba(231,247,251,0.88);
    font: inherit;
    font-size: 11px;
    font-weight: 900;
    line-height: 1.2;
    cursor: pointer;
    box-shadow: 0 8px 16px rgba(15,107,134,0.08);
}

.asset-config-detail-link .material-icons {
    font-size: 15px;
}

.asset-config-detail-link:hover {
    color: #0B5268;
    background: #DFF5FB;
}

.asset-branch-pill,
.asset-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    max-width: 100%;
    min-height: 28px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 900;
    white-space: nowrap;
}

.asset-branch-pill {
    color: #745024;
    background: rgba(245,237,216,0.88);
    border: 1px solid rgba(174,124,65,0.18);
}

.asset-branch-pill.compact {
    min-height: 24px;
    padding: 4px 8px;
    font-size: 10.5px;
}

.asset-status-pill.in_use {
    color: #1F6B33;
    background: #DFF5E1;
}

.asset-status-pill.storage {
    color: #7A5B33;
    background: #F6EAD4;
}

.asset-status-pill.repair,
.asset-status-pill.unknown {
    color: #996000;
    background: #FFF3D8;
}

.asset-status-pill.broken,
.asset-status-pill.lost,
.asset-status-pill.disposed {
    color: #B42318;
    background: #FFE6E2;
}

.asset-photo-thumb {
    position: relative;
    width: 64px;
    height: 50px;
    display: inline-flex;
    overflow: hidden;
    border-radius: 15px;
    border: 1px solid rgba(174,124,65,0.20);
    background: #F8F0E4;
    text-decoration: none;
}

.asset-photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.asset-photo-thumb span {
    position: absolute;
    right: 5px;
    bottom: 5px;
    min-width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    background: rgba(32,24,16,0.72);
    font-size: 10px;
    font-weight: 900;
}

.asset-no-photo {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #918579;
    font-size: 11.5px;
    font-weight: 800;
}

.asset-no-photo .material-icons {
    font-size: 16px;
}

.asset-action-row {
    grid-auto-flow: row;
    justify-items: center;
}

.asset-action-btn {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 0;
    border-radius: 12px;
    padding: 7px 10px;
    font: inherit;
    font-size: 11.5px;
    font-weight: 900;
    cursor: pointer;
}

.asset-action-btn .material-icons {
    font-size: 15px;
}

.asset-action-btn.edit {
    color: #3B4EA6;
    background: #EEF1FB;
}

.asset-action-btn.detail {
    color: #745024;
    background: #FFF3D8;
    border: 1px solid rgba(174,124,65,0.18);
}

.asset-action-btn.danger {
    color: #B42318;
    background: #FEEBE7;
}

.asset-action-btn.components {
    color: #0F6B86;
    background: #E7F7FB;
}

.asset-summary-row td {
    background: rgba(255,255,255,0.72);
}

.asset-summary-row:hover td {
    background: rgba(255,250,241,0.98);
}

.asset-summary-cell {
    min-height: 48px;
    display: flex;
    align-items: center;
    min-width: 0;
}

.asset-brand-cell,
.asset-user-cell,
.asset-department-cell {
    display: block;
    color: #51453A;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.45;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.asset-device-cell {
    text-align: left;
}

.asset-device-cell strong {
    display: block;
    color: #19140F;
    font-size: 14px;
    font-weight: 950;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.asset-table .asset-summary-condition {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    padding: 5px 10px;
    border-radius: 999px;
    background: #F3EFE7;
    font-size: 12px;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

.asset-table .asset-summary-condition.good { background: #EAF7EF; }
.asset-table .asset-summary-condition.issue { background: #FFF0F0; }
.asset-table .asset-summary-condition.storage { background: #FFF5E6; }
.asset-table .asset-summary-condition.neutral { background: #F3EFE7; }

.asset-summary-row td {
    height: 58px;
}

.asset-summary-row .asset-action-row {
    display: flex;
    align-items: center;
    justify-content: center;
}

.asset-summary-row .asset-action-btn {
    white-space: nowrap;
}

.asset-flat-row td {
    height: 46px;
    padding-top: 9px;
    padding-bottom: 9px;
    line-height: 1.35;
}

.asset-table-brand,
.asset-table-user,
.asset-table-department,
.asset-table-condition {
    color: #51453A;
    font-size: 13px;
    font-weight: 850;
    text-align: center;
}

.asset-table-brand,
.asset-table-device,
.asset-table-user,
.asset-table-department {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.asset-table-device {
    text-align: left;
}

.asset-table-device strong {
    display: block;
    min-width: 0;
    color: #19140F;
    font-size: 14px;
    font-weight: 950;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.asset-table-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    padding: 5px 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #F3EFE7;
    color: #6D5E4E;
    font-size: 12px;
    font-weight: 850;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.asset-table-pill.good {
    background: #EAF7EF;
    color: #1F7A3A;
}

.asset-table-pill.issue {
    background: #FFF0F0;
    color: #C62828;
}

.asset-table-pill.storage {
    background: #FFF5E6;
    color: #6F4618;
}

.asset-table-pill.neutral {
    background: #F3EFE7;
    color: #6D5E4E;
}

.asset-management-merged-row td {
    background: rgba(255,252,246,0.94);
}

.asset-management-group-count,
.asset-management-detail-code {
    display: block;
    margin-top: 4px;
    color: #8A5A1F;
    font-size: 10.5px;
    font-weight: 900;
    white-space: normal;
}

.asset-management-group-modal {
    z-index: 10040;
}

.asset-management-group-dialog {
    width: min(96vw, 1420px);
    max-width: 1420px;
}

.asset-management-group-table-wrap {
    max-height: min(68vh, 720px);
    overflow: scroll;
    overscroll-behavior: contain;
    scrollbar-gutter: stable both-edges;
    border: 1px solid rgba(174,124,65,0.14);
    border-radius: 18px;
    cursor: grab;
    touch-action: pan-x pan-y;
}

.asset-management-group-table {
    min-width: 1380px;
}

.asset-management-group-table th:nth-child(1) { width: 150px; }
.asset-management-group-table th:nth-child(2) { width: 300px; }
.asset-management-group-table th:nth-child(3) { width: 190px; }
.asset-management-group-table th:nth-child(4) { width: 260px; }
.asset-management-group-table th:nth-child(5) { width: 300px; }
.asset-management-group-table th:nth-child(6) { width: 160px; }

.asset-management-group-table td,
.asset-management-group-table .asset-table-brand,
.asset-management-group-table .asset-table-device,
.asset-management-group-table .asset-table-device strong,
.asset-management-group-table .asset-table-user,
.asset-management-group-table .asset-table-department {
    white-space: normal;
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
}

.asset-inventory-info-dialog {
    width: min(760px, calc(100vw - 28px));
}

.asset-inventory-info-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.asset-inventory-info-action {
    min-height: 96px;
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border: 1px solid rgba(174,124,65,0.18);
    border-radius: 18px;
    background: rgba(255,255,255,0.72);
    color: #493C30;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.asset-inventory-info-action:hover {
    transform: translateY(-2px);
    border-color: rgba(174,124,65,0.42);
    box-shadow: 0 12px 26px rgba(76,48,18,0.10);
}

.asset-inventory-info-action > .material-icons {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: #F2E7D6;
    color: #81571F;
    font-size: 22px;
}

.asset-inventory-info-action span,
.asset-inventory-info-action strong,
.asset-inventory-info-action small {
    display: block;
}

.asset-inventory-info-action strong {
    color: #2C241D;
    font-size: 14px;
    font-weight: 950;
}

.asset-inventory-info-action small {
    margin-top: 5px;
    color: #786C61;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.45;
}

.asset-inventory-info-action.keep > .material-icons {
    background: #E4F5E9;
    color: #1F7A3A;
}

.asset-inventory-info-action.edit > .material-icons {
    background: #FFF0D0;
    color: #9B6208;
}

.asset-inventory-info-action.cancel > .material-icons {
    background: #FFE3E0;
    color: #B42318;
}

.asset-inventory-info-action.extra > .material-icons {
    background: #E2F5FA;
    color: #0F6B86;
}

.asset-inventory-info-note {
    display: grid;
    gap: 7px;
    margin-top: 16px;
}

.asset-inventory-info-note > span {
    color: #67594C;
    font-size: 12px;
    font-weight: 900;
}

.asset-inventory-info-note textarea {
    width: 100%;
    min-height: 82px;
    padding: 11px 12px;
    resize: vertical;
    border: 1px solid rgba(174,124,65,0.24);
    border-radius: 14px;
    background: rgba(255,255,255,0.82);
    color: #302820;
    font: inherit;
    font-size: 12.5px;
    line-height: 1.45;
}

@media (max-width: 680px) {
    .asset-inventory-info-actions {
        grid-template-columns: 1fr;
    }

    .asset-inventory-info-action {
        min-height: 82px;
    }
}

.asset-flat-row .asset-action-row {
    display: flex;
    justify-content: center;
}

.asset-flat-row .asset-action-btn {
    min-height: 30px;
    padding: 6px 10px;
    white-space: nowrap;
}

.asset-summary-line {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
    color: #4C4034;
    font-size: 14px;
    font-weight: 750;
    line-height: 1.45;
}

.asset-summary-line strong {
    color: #19140F;
    font-size: 14.5px;
    font-weight: 950;
}

.asset-summary-condition {
    color: #6D5E4E;
    font-weight: 850;
    white-space: nowrap;
}

.asset-summary-condition.good {
    color: #1F7A3A;
}

.asset-summary-condition.issue {
    color: #C62828;
}

.asset-summary-condition.storage {
    color: #6F4618;
}

.asset-summary-condition.neutral {
    color: #6D5E4E;
}

.asset-summary-usage {
    color: #4F463D;
    font-weight: 750;
}

.asset-detail-dialog {
    width: min(980px, calc(100vw - 32px));
}

.asset-detail-head {
    align-items: flex-start;
}

.asset-detail-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.asset-detail-title-row h3 {
    margin: 0;
}

.asset-detail-edit-btn {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 0;
    border-radius: 999px;
    padding: 8px 13px;
    color: #fff;
    background: #AE7C41;
    font: inherit;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 12px 26px rgba(174,124,65,0.20);
}

.asset-detail-edit-btn .material-icons {
    font-size: 16px;
}

.asset-detail-edit-btn[hidden] {
    display: none !important;
}

.asset-detail-delete-btn {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid rgba(180,35,24,0.24);
    border-radius: 999px;
    padding: 8px 13px;
    color: #B42318;
    background: #FFF0EE;
    font: inherit;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 12px 26px rgba(180,35,24,0.10);
}

.asset-detail-delete-btn:hover {
    border-color: rgba(180,35,24,0.42);
    background: #FFE5E1;
}

.asset-detail-delete-btn .material-icons {
    font-size: 16px;
}

.asset-detail-delete-btn[hidden] {
    display: none !important;
}

.asset-detail-content {
    display: grid;
    gap: 16px;
    padding-top: 4px;
}

.asset-detail-hero {
    display: grid;
    gap: 8px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(174,124,65,0.16);
    background: linear-gradient(145deg, rgba(255,252,246,0.96), rgba(247,239,226,0.76));
}

.asset-detail-hero .asset-summary-line {
    flex-wrap: wrap;
}

.asset-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.asset-detail-field {
    min-height: 74px;
    display: grid;
    align-content: start;
    gap: 5px;
    padding: 12px 13px;
    border-radius: 16px;
    border: 1px solid rgba(174,124,65,0.13);
    background: rgba(255,255,255,0.74);
}

.asset-detail-field span {
    color: #887A6C;
    font-size: 10.5px;
    font-weight: 900;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.asset-detail-field strong {
    color: #241D17;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.45;
}

.asset-detail-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}

.asset-detail-photo-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.asset-detail-photo-grid .asset-photo-thumb {
    width: 96px;
    height: 72px;
}

.asset-form-modal {
    position: fixed;
    inset: 0;
    z-index: 16000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(12px, 2.4vw, 28px);
    background: rgba(27,20,14,0.42);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.asset-form-modal.asset-management-group-modal {
    z-index: 16080;
}

.asset-form-modal.asset-inventory-info-modal {
    z-index: 16120;
}

.asset-form-dialog {
    width: min(1120px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    border: 1px solid rgba(255,255,255,0.74);
    border-radius: 28px;
    background:
        radial-gradient(circle at 12% 0%, rgba(255,255,255,0.88), transparent 34%),
        linear-gradient(155deg, rgba(255,253,249,0.98), rgba(247,237,222,0.96));
    box-shadow: 0 34px 90px rgba(30,20,10,0.26);
    padding: 22px;
}

.asset-form-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.asset-form-head h3 {
    margin: 0;
    color: #211A14;
    font-size: clamp(20px, 2.2vw, 30px);
    font-weight: 900;
    letter-spacing: -0.035em;
}

.asset-form-head p {
    max-width: 720px;
    margin: 7px 0 0;
    color: #786C61;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.55;
}

.asset-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px 16px;
}

.asset-form-grid .full-row {
    grid-column: 1 / -1;
}

.asset-components-dialog {
    width: min(1380px, calc(100vw - 32px));
}

.asset-components-content {
    display: grid;
    gap: 16px;
}

.asset-components-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    color: #0F6B86;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.asset-components-eyebrow .material-icons {
    font-size: 16px;
}

.asset-components-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.asset-components-summary {
    display: none !important;
}

.asset-components-summary div {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border: 1px solid rgba(174,124,65,0.14);
    border-radius: 18px;
    background: rgba(255,255,255,0.72);
    box-shadow: 0 14px 24px rgba(56,40,23,0.06);
}

.asset-components-summary span {
    color: #7B6D5F;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.asset-components-summary strong {
    color: #241D17;
    font-size: 18px;
    font-weight: 950;
}

.asset-config-summary-shell {
    display: grid;
    gap: 14px;
}

.asset-config-summary-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 15px 18px;
    border: 1px solid rgba(174,124,65,0.14);
    border-radius: 20px;
    background: rgba(255,255,255,0.74);
}

.asset-config-summary-head div {
    display: grid;
    gap: 4px;
}

.asset-config-summary-head strong {
    color: #241D17;
    font-size: 15px;
    font-weight: 950;
}

.asset-config-summary-head span {
    color: #756A60;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.45;
}

.asset-config-summary-value {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 999px;
    color: #0F6B86 !important;
    background: #E7F7FB;
    font-size: 12px !important;
    font-weight: 950 !important;
}

.asset-config-summary-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.asset-config-summary-card {
    display: grid;
    gap: 10px;
    padding: 16px;
    border: 1px solid rgba(174,124,65,0.14);
    border-radius: 20px;
    background: rgba(255,255,255,0.82);
    box-shadow: 0 14px 28px rgba(56,40,23,0.06);
}

.asset-config-summary-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.asset-config-summary-card h4 {
    margin: 0;
    color: #211A14;
    font-size: 14px;
    font-weight: 950;
    line-height: 1.35;
}

.asset-config-summary-card p {
    margin: 0;
    color: #6D6258;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.55;
}

.asset-components-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.85fr);
    gap: 16px;
    align-items: start;
}

.asset-components-list-panel,
.asset-components-side-panel {
    display: grid;
    gap: 14px;
}

.asset-components-list {
    display: grid;
    gap: 12px;
}

.asset-components-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 4px;
}

.asset-components-section-head h4 {
    margin: 0;
    color: #241D17;
    font-size: 16px;
    font-weight: 950;
}

.asset-components-section-head span {
    color: #7B6D5F;
    font-size: 11.5px;
    font-weight: 800;
}

.asset-component-card {
    display: grid;
    gap: 10px;
    padding: 16px;
    border: 1px solid rgba(174,124,65,0.14);
    border-radius: 20px;
    background: rgba(255,255,255,0.80);
    box-shadow: 0 14px 28px rgba(56,40,23,0.06);
}

.asset-component-card.inactive {
    opacity: 0.84;
    background: rgba(248,241,233,0.76);
}

.asset-component-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.asset-component-head-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.asset-component-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    padding: 6px 10px;
    border-radius: 999px;
    color: #0F6B86;
    background: #E7F7FB;
    font-size: 11px;
    font-weight: 900;
}

.asset-component-replaced-tag {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 6px 10px;
    border: 1px solid rgba(180,35,24,0.16);
    border-radius: 999px;
    color: #B42318;
    background: #FFF0ED;
    font-size: 10.5px;
    font-weight: 950;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.asset-component-card h4 {
    margin: 0;
    color: #211A14;
    font-size: 15px;
    font-weight: 950;
}

.asset-component-replaced-line {
    margin-top: -2px;
    color: #B42318;
    font-size: 12px;
    font-style: italic;
    font-weight: 800;
    line-height: 1.45;
}

.asset-component-replaced-line em {
    font-style: italic;
    font-weight: 950;
}

.asset-component-replaced-line span {
    color: #8E2B20;
}

.asset-component-card p {
    margin: 0;
    color: #6D6258;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.55;
}

.asset-component-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.asset-component-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 8px;
    border-radius: 999px;
    color: #6D5E4E;
    background: rgba(245,237,216,0.72);
    font-size: 11px;
    font-weight: 800;
}

.asset-component-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #5F554B;
    font-size: 12px;
    font-weight: 800;
}

.asset-component-bottom strong {
    color: #241D17;
    font-size: 13px;
    font-weight: 950;
}

.asset-component-note {
    padding: 10px 12px;
    border-radius: 14px;
    color: #5A4F45;
    background: rgba(255,248,237,0.86);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
}

.asset-component-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.asset-component-actions button {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 0;
    border-radius: 999px;
    padding: 6px 10px;
    color: #4F4A44;
    background: rgba(245,237,216,0.88);
    font: inherit;
    font-size: 11px;
    font-weight: 900;
    cursor: pointer;
}

.asset-component-actions button.danger {
    color: #B42318;
    background: #FEEBE7;
}

.asset-component-actions .material-icons {
    font-size: 15px;
}

.asset-component-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
    padding: 16px;
    border: 1px solid rgba(174,124,65,0.14);
    border-radius: 20px;
    background: rgba(255,255,255,0.80);
    box-shadow: 0 14px 28px rgba(56,40,23,0.06);
}

.asset-component-form input,
.asset-component-form select,
.asset-component-form textarea {
    width: 100%;
    min-height: 38px;
    border: 1px solid rgba(174,124,65,0.20);
    border-radius: 13px;
    padding: 9px 11px;
    color: #2E271F;
    background: rgba(255,255,255,0.88);
    font-family: var(--hc-font, "Plus Jakarta Sans", sans-serif);
    font-size: 12.5px;
    font-weight: 650;
    outline: none;
    box-sizing: border-box;
}

.asset-component-form textarea {
    min-height: 72px;
    resize: vertical;
}

.asset-component-form input:focus,
.asset-component-form select:focus,
.asset-component-form textarea:focus {
    border-color: rgba(174,124,65,0.58);
    box-shadow: 0 0 0 4px rgba(174,124,65,0.10);
}

.asset-component-form-title {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.asset-component-form-title strong {
    color: #241D17;
    font-size: 14px;
    font-weight: 950;
}

.asset-component-link {
    border: 0;
    padding: 0;
    color: #0F6B86;
    background: transparent;
    font: inherit;
    font-size: 11.5px;
    font-weight: 900;
    cursor: pointer;
}

.asset-component-form label,
.asset-component-form .asset-component-active {
    display: grid;
    gap: 6px;
}

.asset-component-form label span {
    color: #6E6257;
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.asset-component-form .full-row {
    grid-column: 1 / -1;
}

.asset-component-form .asset-component-active {
    grid-column: 1 / -1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #51473E;
    font-size: 12px;
    font-weight: 800;
}

.asset-component-form .asset-component-active input {
    width: 16px;
    height: 16px;
}

.asset-component-replace-box {
    display: grid;
    gap: 12px;
}

.asset-component-replace-form.compact {
    gap: 13px;
}

.asset-component-replace-note {
    grid-column: 1 / -1;
    padding: 10px 12px;
    border-radius: 14px;
    color: #0E5D77;
    background: #EAF7FB;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.5;
}

.asset-component-replace-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 12px;
}

.asset-component-replace-column {
    min-height: 96px;
    display: grid;
    align-content: start;
    gap: 8px;
    padding: 14px;
    border: 1px solid rgba(174,124,65,0.16);
    border-radius: 18px;
    background: rgba(255,250,242,0.82);
}

.asset-component-replace-column span {
    color: #6E6257;
    font-size: 10.8px;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.asset-component-replace-column strong {
    color: #211A14;
    font-size: 18px;
    font-weight: 950;
    line-height: 1.25;
    word-break: break-word;
}

.asset-component-replace-column em {
    color: #6D6258;
    font-size: 12px;
    font-style: normal;
    font-weight: 750;
    line-height: 1.45;
}

.asset-component-replace-column.choose {
    background: rgba(255,255,255,0.86);
}

.asset-component-replace-preview {
    display: grid;
    gap: 5px;
    padding: 12px 14px;
    border: 1px solid rgba(15,107,134,0.14);
    border-radius: 16px;
    color: #0E5D77;
    background: #EAF7FB;
    font-size: 12px;
    font-weight: 760;
    line-height: 1.45;
}

.asset-component-replace-preview strong {
    color: #0D526B;
    font-size: 12.5px;
    font-weight: 950;
}

.asset-component-replace-preview span {
    color: #416A75;
    font-size: 11.5px;
    font-weight: 760;
}

.asset-component-empty {
    display: grid;
    gap: 8px;
    align-items: center;
    justify-items: center;
    padding: 18px;
    border: 1px dashed rgba(174,124,65,0.22);
    border-radius: 18px;
    color: #6F6358;
    background: rgba(255,248,237,0.72);
    text-align: center;
}

.asset-component-empty.error {
    color: #B42318;
    border-color: rgba(180,35,24,0.24);
    background: #FFF3F1;
}

.asset-component-empty.small {
    padding: 16px;
}

.asset-component-empty .material-icons {
    font-size: 24px;
    color: #0F6B86;
}

.asset-component-empty strong {
    color: #241D17;
    font-size: 13px;
    font-weight: 950;
}

.asset-component-empty span {
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.55;
}

.asset-components-history {
    display: grid;
    gap: 12px;
    margin-top: 2px;
    padding: 16px;
    border: 1px solid rgba(174,124,65,0.12);
    border-radius: 20px;
    background: rgba(255,255,255,0.64);
}

.asset-components-history ol {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.asset-components-history li {
    position: relative;
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}

.asset-component-history-dot {
    width: 10px;
    height: 10px;
    margin-top: 6px;
    border-radius: 999px;
    background: linear-gradient(135deg, #0F6B86, #62BDD2);
    box-shadow: 0 0 0 4px rgba(15,107,134,0.10);
}

.asset-components-history strong {
    color: #241D17;
    font-size: 12px;
    font-weight: 950;
}

.asset-components-history p {
    margin: 3px 0 0;
    color: #64584E;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.55;
}

.asset-components-history small {
    display: block;
    margin-top: 4px;
    color: #8C7C6D;
    font-size: 10.5px;
    font-weight: 800;
}

.asset-components-history li.asset-component-history-empty {
    display: flex;
    grid-template-columns: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 44px;
    padding: 12px 14px;
    border-radius: 15px;
    color: #85786D;
    background: rgba(255,248,237,0.74);
    font-size: 12px;
    font-weight: 850;
    line-height: 1.35;
    white-space: nowrap;
}

.asset-component-history-empty .material-icons {
    color: #A78358;
    font-size: 17px;
}

@keyframes assetSoftSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spin-soft {
    animation: assetSoftSpin 1.2s linear infinite;
}

.asset-photo-upload {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px dashed rgba(174,124,65,0.30);
    border-radius: 22px;
    background: rgba(255,250,242,0.70);
}

.asset-photo-upload strong,
.asset-photo-upload span {
    display: block;
}

.asset-photo-upload strong {
    color: #2E271F;
    font-size: 14px;
    font-weight: 900;
}

.asset-photo-upload span {
    margin-top: 4px;
    color: #786C61;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.45;
}

.asset-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.asset-photo-empty {
    padding: 12px;
    border-radius: 14px;
    color: #897D72;
    background: rgba(255,255,255,0.68);
    font-size: 12px;
    font-weight: 750;
}

.asset-existing-photo {
    position: relative;
    display: grid;
    gap: 6px;
    padding: 8px;
    border: 1px solid rgba(174,124,65,0.14);
    border-radius: 16px;
    background: rgba(255,255,255,0.74);
}

.asset-existing-photo img {
    width: 100%;
    height: 92px;
    border-radius: 12px;
    object-fit: cover;
}

.asset-existing-photo > span {
    overflow: hidden;
    color: #665A4E;
    font-size: 11px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.asset-existing-photo button {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    color: #B42318;
    background: rgba(255,255,255,0.92);
    box-shadow: 0 8px 18px rgba(0,0,0,0.12);
    cursor: pointer;
}

.asset-existing-photo button .material-icons {
    font-size: 16px;
}

.asset-selected-photo-note {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.asset-selected-photo-note span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    padding: 6px 9px;
    border-radius: 999px;
    color: #6B563D;
    background: rgba(245,237,216,0.86);
    font-size: 11px;
    font-weight: 850;
}

.asset-selected-photo-pill {
    color: #1F6B33 !important;
    background: #EAF8ED !important;
}

.asset-selected-photo-pill .material-icons {
    font-size: 15px;
}

@media (max-width: 1180px) {
    .asset-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .asset-inventory-controls,
    .asset-inventory-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .asset-inventory-filter-row {
        width: 100%;
    }

    .asset-components-summary,
    .asset-detail-grid,
    .asset-components-layout {
        grid-template-columns: 1fr;
    }

    .asset-import-form {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 768px) {
    body:not(.hc-mobile-mode) #moduleAssets,
    body:not(.hc-mobile-mode) #moduleAssetInventory {
        padding-inline: 0;
    }

    .asset-grid,
    .asset-filter-grid,
    .asset-inventory-controls,
    .asset-inventory-filter-row,
    .asset-inventory-summary,
    .asset-import-form,
    .asset-form-grid,
    .asset-detail-grid,
    .asset-components-summary,
    .asset-component-form {
        grid-template-columns: 1fr;
    }

    .asset-table {
        min-width: 620px;
    }

    .asset-inventory-head,
    .asset-inventory-table-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .asset-inventory-filter-card .asset-filter-toggle-btn,
    .asset-inventory-filter-card .asset-filter-actions,
    .asset-inventory-filter-card .asset-filter-actions .btn {
        width: 100%;
    }

    .asset-inventory-campaign-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .asset-inventory-campaign-icon {
        display: none;
    }

    .asset-inventory-campaign-stats {
        justify-content: flex-start;
    }

    .asset-inventory-table {
        min-width: 1180px;
    }

    .asset-summary-line {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }

    .asset-summary-condition {
        white-space: normal;
    }

    .asset-filter-actions,
    .asset-group-title {
        align-items: flex-start;
        flex-direction: column;
    }

    #moduleAssets .asset-filter-actions,
    #moduleAssets .asset-filter-actions .asset-command-btn {
        width: 100%;
    }

    #moduleAssets .asset-filter-actions {
        flex-wrap: wrap;
    }

    #moduleAssets .asset-filter-actions .asset-command-btn {
        min-width: 0;
    }

    #moduleAssets .asset-table-actions {
        width: 100%;
        margin-left: 0;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .asset-group-title small {
        white-space: normal;
    }

    .asset-form-dialog {
        width: calc(100vw - 20px);
        max-height: calc(100dvh - 20px);
        padding: 16px;
        border-radius: 22px;
    }

    .asset-components-dialog {
        width: calc(100vw - 20px);
    }

    .asset-form-head {
        gap: 12px;
    }

    .asset-config-summary-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .asset-component-replace-grid {
        grid-template-columns: 1fr;
    }

    .asset-stat-breakdown {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1360px) {
    body:not(.hc-mobile-mode) #hubHome .hub-home-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .hc-concept-rail {
        position: static;
        min-height: auto;
        border-left: 0;
        border-top: 1px solid rgba(126,92,54,0.10);
        border-radius: 24px;
        background: rgba(255,253,249,0.68);
    }
}

@media (max-width: 1180px) {
    body:not(.hc-mobile-mode) #hubHome .hub-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 768px) {
    body:not(.hc-mobile-mode) .hc-shell,
    body:not(.hc-mobile-mode).hc-sidebar-collapsed .hc-shell {
        grid-template-columns: 1fr;
    }

    body:not(.hc-mobile-mode) .hc-page {
        padding: 18px 14px 30px;
    }

    body:not(.hc-mobile-mode) #hubHome .hub-grid {
        grid-template-columns: 1fr !important;
    }

    body:not(.hc-mobile-mode) #hubHome .hub-home-head.tools-only {
        min-height: 250px;
        border-radius: 28px;
    }

    body:not(.hc-mobile-mode) #hubHome .hub-home-head.tools-only .workspace-section-title,
    .hc-topbar-title h1 {
        font-size: 34px;
        line-height: 1.12;
    }
}

.hc-main-nav-sub,
.hub-card-info p {
    display: none !important;
}

.hc-main-nav-link {
    min-height: 44px;
}

body:not(.hc-mobile-mode) #hubHome .hub-card {
    min-height: 110px;
    align-items: center;
}

#hubHome .hub-card {
    position: relative;
}

#hubHome .approval-card-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    margin-left: 0;
    z-index: 2;
}

.hc-concept-rail {
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.56);
    border-left: 1px solid rgba(255,255,255,0.56);
    border-radius: 30px;
    background:
        radial-gradient(circle at 18% 8%, rgba(255,255,255,0.82), rgba(255,255,255,0.24) 28%, transparent 44%),
        radial-gradient(circle at 92% 16%, rgba(214,184,146,0.38), transparent 36%),
        linear-gradient(155deg, rgba(255,255,255,0.48), rgba(255,248,236,0.28) 52%, rgba(224,198,161,0.22));
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.84),
        inset 0 -1px 0 rgba(126,92,54,0.08),
        0 24px 64px rgba(84,50,25,0.13);
    -webkit-backdrop-filter: blur(22px) saturate(145%);
    backdrop-filter: blur(22px) saturate(145%);
}

.hc-concept-rail::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background:
        linear-gradient(115deg, rgba(255,255,255,0.74), transparent 24%),
        linear-gradient(285deg, rgba(255,255,255,0.24), transparent 38%);
    mix-blend-mode: screen;
}

.hc-concept-rail::after {
    content: "";
    position: absolute;
    left: 18px;
    right: 18px;
    top: 14px;
    height: 1px;
    pointer-events: none;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.78), transparent);
}

.hc-rail-account,
.hc-rail-group {
    position: relative;
    z-index: 1;
    padding: 18px;
    border: 1px solid rgba(255,255,255,0.42);
    border-radius: 24px;
    background: rgba(255,255,255,0.20);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.46),
        0 12px 28px rgba(84,50,25,0.055);
}

.hc-rail-section-title strong {
    color: rgba(32,25,19,0.92);
    letter-spacing: -0.018em;
}

.hc-rail-info-row {
    grid-template-columns: 112px minmax(0, 1fr);
    padding: 11px 0;
    border-bottom-color: rgba(126,92,54,0.12);
}

.hc-rail-info-row span,
.hc-rail-group span {
    color: rgba(95,77,62,0.66);
}

.hc-rail-info-row strong {
    color: rgba(32,25,19,0.90);
}

.hc-rail-group {
    gap: 11px;
}

.hc-rail-group button {
    position: relative;
    min-height: 48px;
    border: 1px solid transparent;
    border-radius: 18px;
    color: rgba(48,39,31,0.86);
    background: rgba(255,255,255,0.10);
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.hc-rail-group button:hover {
    transform: translateY(-1px);
    border-color: rgba(255,255,255,0.52);
    background: rgba(255,255,255,0.32);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.62),
        0 12px 26px rgba(84,50,25,0.09);
}

.hc-rail-group .material-icons {
    width: 30px;
    height: 30px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #9A6420;
    background: rgba(255,255,255,0.28);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.58);
}

.hc-concept-rail .hc-rail-account,
.hc-concept-rail .hc-rail-group {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.hc-concept-rail .hc-rail-account {
    margin-bottom: 38px;
}

.hc-concept-rail .hc-rail-info-list {
    gap: 0;
}

.hc-concept-rail .hc-rail-info-row {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 16px;
    padding: 14px 0;
}

.hc-concept-rail .hc-rail-info-row strong {
    overflow: visible;
    text-overflow: clip;
}

#hcRailEmployeeCode,
#hcRailEmployeeName,
#hcRailDepartment {
    white-space: nowrap;
}

#hcRailPosition {
    white-space: pre-line;
    line-height: 1.36;
}

.hc-concept-rail .hc-rail-group {
    gap: 18px;
}

.hc-concept-rail .hc-rail-group button {
    min-height: 50px;
    gap: 14px;
    padding: 10px 12px;
    white-space: nowrap;
}

.hc-concept-rail .hc-rail-group button .material-icons {
    flex: 0 0 30px;
}

.hc-rail-quick-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.hc-rail-quick-head > span {
    margin: 0;
}

.hc-concept-rail .hc-rail-quick-settings-btn,
.hc-rail-quick-settings-btn {
    width: 40px;
    min-height: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(174,124,65,0.18);
    background: rgba(255,255,255,0.72);
    color: #9A6420;
    cursor: pointer;
    white-space: normal;
    box-shadow: 0 12px 26px rgba(77,55,26,0.07);
}

.hc-concept-rail .hc-rail-quick-settings-btn .material-icons,
.hc-rail-quick-settings-btn .material-icons {
    width: auto;
    height: auto;
    flex: 0 0 auto;
    background: transparent;
    box-shadow: none;
}

.hc-concept-rail .hc-rail-group .hc-rail-quick-settings-btn {
    width: 40px !important;
    min-height: 40px !important;
    height: 40px !important;
    flex: 0 0 40px !important;
    display: inline-flex !important;
    justify-content: center !important;
    gap: 0 !important;
    padding: 0 !important;
    white-space: normal !important;
}

.hc-concept-rail .hc-rail-group .hc-rail-quick-settings-btn .material-icons {
    width: auto !important;
    height: auto !important;
    flex: 0 0 auto !important;
    background: transparent !important;
    box-shadow: none !important;
}

.hc-rail-quick-grid {
    display: grid;
    gap: 12px;
}

.hc-rail-quick-card {
    width: 100%;
    text-align: left;
}

.hc-rail-quick-card b {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.35;
}

.hc-rail-quick-empty {
    min-height: 86px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    border-radius: 18px;
    border: 1px dashed rgba(174,124,65,0.30);
    color: rgba(95,77,62,0.72);
    background: rgba(255,250,242,0.54);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
    text-align: center;
}

.hc-quick-settings-modal {
    max-width: 680px;
}

.modal-note {
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.hc-rail-quick-settings-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.hc-quick-option {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: flex-start;
    min-height: 74px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(174,124,65,0.16);
    background: rgba(255,255,255,0.82);
    cursor: pointer;
}

.hc-quick-option:hover {
    border-color: rgba(174,124,65,0.36);
    background: #fffaf2;
}

.hc-quick-option input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--gold);
}

.hc-quick-option b {
    display: block;
    color: var(--charcoal);
    font-size: 13px;
    font-weight: 900;
    line-height: 1.35;
}

.hc-quick-option span span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.45;
}

.hc-quick-count {
    margin-top: 12px;
    color: var(--gold);
    font-size: 13px;
    font-weight: 900;
}

@media (max-width: 768px) {
    .hc-rail-quick-settings-list {
        grid-template-columns: 1fr;
    }
}

/* Keep the two-wing dashboard on Windows 150% scaling.
   A 1920px monitor at 150% becomes about 1280 CSS px, so it should still behave as desktop. */
@media (min-width: 769px) and (max-width: 1360px) {
    body:not(.hc-mobile-mode) .hc-shell {
        grid-template-columns: clamp(228px, 19vw, 248px) minmax(0, 1fr);
    }

    body:not(.hc-mobile-mode) .hc-page {
        padding: 28px clamp(16px, 2vw, 28px) 34px;
        gap: 18px;
    }

    body:not(.hc-mobile-mode) .hc-main-topbar {
        gap: 18px;
    }

    body:not(.hc-mobile-mode) .hc-topbar-title h1 {
        font-size: clamp(34px, 3.1vw, 44px);
        line-height: 1.08;
    }

    body:not(.hc-mobile-mode) #hubHome .hub-home-layout {
        grid-template-columns: minmax(0, 1fr) clamp(288px, 26vw, 320px) !important;
        gap: 18px !important;
        align-items: start;
    }

    body:not(.hc-mobile-mode) #hubHome .hub-home-head.tools-only {
        min-height: 250px;
        padding: clamp(26px, 3vw, 38px);
        border-radius: 30px;
    }

    body:not(.hc-mobile-mode) #hubHome .hub-home-head.tools-only .hc-hero-greeting-title {
        font-size: clamp(23px, 2.1vw, 30px);
    }

    body:not(.hc-mobile-mode) #hubHome .hub-home-head.tools-only .hc-hero-greeting-date {
        font-size: clamp(14px, 1.25vw, 17px);
    }

    body:not(.hc-mobile-mode) #hubHome .hub-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 14px;
        margin-top: 18px;
    }

    body:not(.hc-mobile-mode) #hubHome .hub-card {
        min-height: 104px;
        padding: 16px 12px;
    }

    body:not(.hc-mobile-mode) #hubHome .hub-card-info h3 {
        font-size: clamp(13px, 1.1vw, 14px);
        white-space: normal;
    }

    body:not(.hc-mobile-mode) #hubHome .hc-concept-rail {
        position: sticky !important;
        top: 22px !important;
        min-height: calc(100vh - 56px) !important;
        border-top: 1px solid rgba(255,255,255,0.56) !important;
        border-left: 1px solid rgba(255,255,255,0.56) !important;
        border-radius: 28px !important;
    }

    body:not(.hc-mobile-mode) #hubHome .hc-concept-rail .hc-rail-info-row {
        grid-template-columns: 98px minmax(0, 1fr);
        gap: 12px;
        padding: 12px 0;
    }

    body:not(.hc-mobile-mode) #hubHome .hc-concept-rail .hc-rail-group {
        gap: 14px;
    }

    body:not(.hc-mobile-mode) #hubHome .hc-concept-rail .hc-rail-group button {
        min-height: 48px;
        gap: 12px;
        padding: 10px;
    }
}

@media (min-width: 769px) and (max-width: 1040px) {
    body:not(.hc-mobile-mode) #hubHome .hub-home-layout {
        grid-template-columns: minmax(0, 1fr) 280px !important;
        gap: 14px !important;
    }

    body:not(.hc-mobile-mode) #hubHome .hub-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Embedded internal chat module for the Administration workspace. */
#moduleChat {
    min-height: 0;
}

#moduleChat .sub-header.tools-only {
    align-items: center;
}

.hc-chat-open-full {
    margin-left: auto;
    text-decoration: none;
}

.hc-chat-workspace-card {
    min-height: min(760px, calc(100vh - 168px));
    height: min(760px, calc(100vh - 168px));
    padding: 0 !important;
    overflow: hidden;
    border-radius: 28px !important;
    background: rgba(255,253,249,0.82);
}

.hc-chat-frame {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
    background: #fff;
}

body:not(.hc-mobile-mode) #moduleInfoHub,
body:not(.hc-mobile-mode) #modulePersonnel {
    box-sizing: border-box;
    padding-inline: clamp(18px, 1.35vw, 30px) clamp(12px, 1vw, 22px);
}

body:not(.hc-mobile-mode).hc-module-personnel .hc-page {
    padding-top: 18px;
    gap: 12px;
}

body:not(.hc-mobile-mode).hc-module-personnel .hc-topbar-title h1 {
    margin-bottom: 5px;
    font-size: clamp(36px, 3vw, 50px);
}

body:not(.hc-mobile-mode).hc-module-personnel.hc-personnel-leave-view .hc-page {
    width: 100%;
    max-width: none !important;
    margin: 0;
    padding: 18px clamp(12px, 1.35vw, 30px) 30px;
}

body:not(.hc-mobile-mode).hc-module-personnel.hc-personnel-leave-view .hc-main-topbar {
    width: 100%;
    max-width: none;
    margin-inline: 0;
}

body:not(.hc-mobile-mode).hc-module-personnel.hc-personnel-leave-view #modulePersonnel {
    padding-inline: 0;
}

#modulePersonnel .personnel-search-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 8px 10px;
    padding: 9px 11px;
    margin: 0 0 10px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255,255,255,0.96);
    box-shadow: 0 6px 16px rgba(0,0,0,0.035);
}

#modulePersonnel .personnel-search-field {
    flex: 0 1 520px;
    min-width: 280px;
    max-width: 620px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

#modulePersonnel .personnel-search-field > span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .35px;
    text-transform: uppercase;
}

#modulePersonnel .personnel-search-field input {
    width: 100%;
    min-height: 38px;
    box-sizing: border-box;
    padding: 0 11px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #fff;
    font: 13px 'Plus Jakarta Sans', sans-serif;
}

#modulePersonnel .personnel-search-actions {
    display: inline-flex;
    align-items: center;
    align-self: flex-end;
    gap: 8px;
    flex: 0 0 auto;
}

#modulePersonnel .personnel-search-actions .btn {
    min-height: 38px;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 10px;
    white-space: nowrap;
}

#modulePersonnel .personnel-import-toggle-btn {
    border: 1px solid #DDC7A0;
    background: #FBF6EC;
    color: #7B613D;
}

#modulePersonnel .personnel-summary {
    flex: 1 1 760px;
    min-width: 0;
    width: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

#modulePersonnel .personnel-summary .workspace-chip {
    min-height: 30px;
    padding: 5px 8px;
    font-size: 11px;
}

#modulePersonnel .personnel-status-trigger {
    min-height: 30px;
}

#modulePersonnel .personnel-branch-bar {
    gap: 8px;
    margin-bottom: 9px;
}

#modulePersonnel .personnel-branch-chip {
    gap: 3px;
    min-height: 60px;
    padding: 9px 12px;
    border-radius: 12px;
}

#modulePersonnel .personnel-branch-chip strong {
    font-size: 13px;
}

#modulePersonnel .personnel-branch-chip span {
    font-size: 11px;
}

#modulePersonnel .personnel-dept-bar {
    gap: 6px;
    margin-bottom: 9px;
}

#modulePersonnel .personnel-dept-chip {
    min-height: 30px;
    padding: 5px 10px;
    font-size: 11.5px;
}

#modulePersonnel #personnelActiveSection,
#modulePersonnel #personnelResignedSection {
    padding: 13px;
}

#modulePersonnel #personnelActiveSection {
    margin-bottom: 10px !important;
}

#modulePersonnel #personnelActiveList,
#modulePersonnel #personnelResignedList {
    margin-top: 8px !important;
}

#modulePersonnel .workspace-section-title {
    margin-bottom: 7px;
    font-size: 22px;
}

#modulePersonnel .personnel-card-grid {
    gap: 9px;
}

#modulePersonnel .personnel-card {
    gap: 7px;
    box-sizing: border-box;
    padding: 11px 12px;
    border-radius: 12px;
    content-visibility: auto;
    contain-intrinsic-size: auto 410px;
}

#modulePersonnel .personnel-search-toolbar.personnel-is-refreshing::after {
    content: 'Đang đồng bộ dữ liệu mới…';
    align-self: center;
    color: #8A6531;
    font-size: 11px;
    font-weight: 700;
}

#modulePersonnel .personnel-loading-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 9px;
}

#modulePersonnel .personnel-loading-card {
    min-height: 260px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

#modulePersonnel .personnel-loading-card span {
    display: block;
    height: 15px;
    margin-bottom: 14px;
    border-radius: 999px;
    background: linear-gradient(90deg, #F1EEE8 25%, #FAF8F4 50%, #F1EEE8 75%);
    background-size: 200% 100%;
    animation: personnelSkeletonPulse 1.2s ease-in-out infinite;
}

#modulePersonnel .personnel-loading-card span:nth-child(1) { width: 56%; height: 22px; }
#modulePersonnel .personnel-loading-card span:nth-child(2) { width: 82%; }
#modulePersonnel .personnel-loading-card span:nth-child(3) { width: 100%; height: 92px; }
#modulePersonnel .personnel-loading-card span:nth-child(4) { width: 68%; }

@keyframes personnelSkeletonPulse {
    from { background-position: 100% 0; }
    to { background-position: -100% 0; }
}

@media (prefers-reduced-motion: reduce) {
    #modulePersonnel .personnel-loading-card span { animation: none; }
}

#modulePersonnel .personnel-card-head {
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
}

#modulePersonnel .personnel-card-head > div {
    width: 100%;
    min-width: 0;
}

#modulePersonnel .personnel-card-name {
    font-size: 17px;
    box-sizing: border-box;
    padding-right: 108px;
}

#modulePersonnel .personnel-card-sub {
    font-size: 11.5px;
}

#modulePersonnel .personnel-tag-row {
    gap: 4px;
    margin-top: 5px;
}

#modulePersonnel .personnel-tag-chip {
    padding: 3px 7px;
    font-size: 10px;
}

#modulePersonnel .personnel-status-badge {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1;
    max-width: 102px;
    padding: 4px 8px;
    font-size: 9.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#modulePersonnel .personnel-card .personnel-info-grid {
    gap: 5px 12px;
    font-size: 11.5px;
}

#modulePersonnel .personnel-card .personnel-info-grid label {
    margin-bottom: 1px;
    font-size: 9.5px;
}

#modulePersonnel .personnel-doc-progress {
    margin-top: 1px;
    padding: 8px 9px;
    border: 1px solid;
    border-radius: 9px;
}

#modulePersonnel .personnel-doc-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    flex-wrap: wrap;
}

#modulePersonnel .personnel-doc-progress-head strong {
    font-size: 11.5px !important;
}

#modulePersonnel .personnel-doc-progress-head span {
    font-size: 10.5px !important;
}

#modulePersonnel .personnel-doc-progress-track {
    height: 6px;
    margin-top: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(0,0,0,0.08);
}

#modulePersonnel .personnel-doc-progress-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 6px;
}

#modulePersonnel .personnel-card-actions {
    gap: 5px;
    margin-top: 1px;
}

#modulePersonnel .personnel-card-actions .btn {
    min-height: 29px;
    padding: 5px 9px !important;
    font-size: 10.5px !important;
}

/* Administration module map */
.hc-legacy-module-nav {
    display: none !important;
}

.hc-family-nav .hc-main-nav-link {
    min-height: 54px;
}

.hc-family-nav-link.active,
.hc-family-chip.active {
    border-color: rgba(174,124,65,0.42) !important;
    background: linear-gradient(135deg, #9A6420, #AE7C41) !important;
    color: #fff !important;
    box-shadow: 0 14px 32px rgba(126,82,29,0.18);
}

.hc-family-nav-link.active .material-icons,
.hc-family-nav-link.active .hc-main-nav-title,
.hc-family-chip.active .material-icons {
    color: #fff !important;
}

button.workspace-chip {
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
    cursor: pointer;
}

.hc-family-chip {
    min-height: 34px;
}

#hubHome .hc-family-hidden {
    display: none !important;
}

#hubHome .hc-profile-only-card,
#hubHome .hc-independent-card {
    display: none !important;
}

.hc-nav-section-break {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0 2px;
    padding: 11px 10px 7px;
    border-top: 1px solid rgba(126,92,54,0.16);
    color: rgba(75,57,40,0.72);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.2;
    text-transform: uppercase;
}

.hc-nav-section-break:first-child {
    margin-top: 0;
    border-top: 0;
}

.hc-nav-section-break .material-icons {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(174,124,65,0.10);
    color: #8C5E23;
    font-size: 15px;
}

.hc-nav-section-admin { order: 0; }
.hc-sidebar .hc-main-nav-link[data-module-nav="assets"] { order: 1; }
.hc-sidebar .hc-main-nav-link[data-module-nav="work-assignment"] { order: 2; }

.hc-nav-section-people { order: 20; }
.hc-sidebar .hc-main-nav-link[data-module-nav="personnel"] { order: 21; }
.hc-sidebar .hc-main-nav-link[data-module-nav="requests"] { order: 22; }
.hc-sidebar .hc-main-nav-link[data-module-nav="my-attendance"] { order: 23; }
.hc-sidebar .hc-main-nav-link[data-module-nav="attendance-manager"] { order: 24; }
.hc-sidebar .hc-main-nav-link[data-module-nav="outside-work"] { order: 25; }

.hc-nav-section-events { order: 40; }
.hc-sidebar .hc-main-nav-link[data-module-nav="info-hub"] { order: 41; }
.hc-sidebar .hc-main-nav-link[data-module-nav="chat"] { order: 42; }

#hubHome .hub-group-break {
    grid-column: 1 / -1;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 12px 0 -2px;
    padding: 4px 2px 2px;
}

#hubHome .hub-group-index {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 30px;
    border-radius: 8px;
    background: rgba(174,124,65,0.12);
    color: #7A5427;
    font-size: 13px;
    font-weight: 800;
}

#hubHome .hub-group-break h3 {
    margin: 0 0 3px;
    color: rgba(32,25,19,0.92);
    font-size: 18px;
    font-weight: 800;
    line-height: 1.2;
}

#hubHome .hub-group-break p {
    display: none !important;
}

#hubHome .hc-hub-group-admin { order: 0; }
#cardAssets { order: 1; }
#cardWorkAssignment { order: 2; }
#hcPlannedAssetAudit { order: 3; }
#hcPlannedAdminExpenses { order: 4; }

#hubHome .hc-hub-group-people { order: 20; }
#cardHrOnboarding { order: 21; }
#cardPersonnel { order: 22; }
#cardRequests { order: 23; }
#cardMyAttendance { order: 24; }
#cardChucNangHC { order: 25; }
#cardOutsideWork { order: 26; }
#hcPlannedStaffMovement { order: 27; }
#hcPlannedInsurance { order: 28; }
#hcPlannedWelfareCosts { order: 29; }

#hubHome .hc-hub-group-events { order: 40; }
#cardInfoHub { order: 41; }
#cardChat { order: 42; }
#hcPlannedSalesEvent { order: 43; }
#hcPlannedInternalEvent { order: 44; }
#hcPlannedCustomerGifts { order: 45; }

#hubHome .hc-planned-card {
    cursor: default;
    border-style: dashed;
    border-color: rgba(126,92,54,0.26);
    background: rgba(255,253,249,0.78);
    opacity: 0.92;
}

#hubHome .hc-planned-card::after {
    content: none;
    display: none;
}

#hubHome .hc-planned-card:hover {
    transform: none;
    border-color: rgba(126,92,54,0.32);
    box-shadow: none;
}

body:not(.hc-mobile-mode) #hubHome .hc-planned-card:hover {
    transform: none;
    border-color: rgba(126,92,54,0.32);
    box-shadow: none;
}

#hubHome .hc-planned-card .hub-card-info p {
    display: none !important;
    padding-right: 0;
}

.hc-planned-pill {
    display: none !important;
}

#cardPersonnelMatrix { order: 23; }
#cardRequests { order: 24; }
#cardMyAttendance { order: 25; }
#cardChucNangHC { order: 26; }
#cardOutsideWork { order: 27; }
#hcPlannedStaffMovement { order: 28; }
#hcPlannedInsurance { order: 29; }
#hcPlannedWelfareCosts { order: 30; }

/* Quáº£n lÃ½ NhÃ¢n Sá»±: chia thÃ nh ba khu nghiá»‡p vá»¥ rá»i ráº¡c, dá»… quÃ©t. */
#hubHome .hc-people-zone {
    --people-zone-accent: #9A6420;
    --people-zone-bg: rgba(174,124,65,0.09);
    grid-column: 1 / -1;
    display: none;
    align-items: center;
    gap: 13px;
    min-width: 0;
    margin: 16px 0 0;
    padding: 12px 15px;
    border: 1px solid color-mix(in srgb, var(--people-zone-accent) 22%, transparent);
    border-radius: 15px;
    background: linear-gradient(135deg, var(--people-zone-bg), rgba(255,255,255,0.74));
}

#hubHome[data-hub-mode="family"][data-active-family="people"] .hc-people-zone {
    display: flex;
}

#hubHome .hc-people-zone-info {
    --people-zone-accent: #9A6420;
    --people-zone-bg: rgba(174,124,65,0.11);
    order: 20;
    margin-top: 0;
}

#hubHome .hc-people-zone-attendance {
    --people-zone-accent: #24734A;
    --people-zone-bg: rgba(50,143,89,0.09);
    order: 40;
}

#hubHome .hc-people-zone-movement {
    --people-zone-accent: #3B4EA6;
    --people-zone-bg: rgba(59,78,166,0.08);
    order: 60;
}

#hubHome .hc-people-zone-index {
    min-width: 52px;
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    padding: 4px 9px;
    border-radius: 9px;
    color: #fff;
    background: var(--people-zone-accent);
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
}

#hubHome .hc-people-zone > div {
    min-width: 0;
}

#hubHome .hc-people-zone h3 {
    margin: 0;
    color: var(--people-zone-accent);
    font-size: 16px;
    font-weight: 900;
    line-height: 1.25;
}

#hubHome .hc-people-zone p {
    margin: 3px 0 0;
    color: #75695E;
    font-size: 11.5px;
    font-weight: 650;
    line-height: 1.4;
}

/* Khu 1: Quáº£n lÃ½ thÃ´ng tin nhÃ¢n sá»± */
#cardPersonnelMatrix { order: 21; }
#cardPersonnel { order: 22; }
#cardInsurance { order: 23; }
#hcPlannedWelfareCosts { order: 24; }

/* Khu 2: Theo dÃµi cháº¥m cÃ´ng */
#cardChucNangHC { order: 41; }
#cardLeaveTracking { order: 42; }
#cardRequests { order: 43; }
#cardOutsideWork { order: 44; }

/* Khu 3: Biáº¿n Ä‘á»™ng nhÃ¢n sá»± */
#hcPlannedStaffMovement { order: 61; }
#cardHrOnboarding { order: 62; }

#hrDocMatrixModal {
    padding: 8px !important;
}

#hrDocMatrixModal .hr-doc-matrix-dialog {
    width: calc(100vw - 16px);
    height: calc(100vh - 16px);
    max-height: none;
    border-radius: 18px;
    padding: 12px 14px 14px;
    overflow: hidden;
    gap: 10px;
}

#hrDocMatrixModal .hr-doc-matrix-wrapper {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
}

#hrDocMatrixModal .hr-doc-matrix-header {
    align-items: center;
    gap: 10px;
    padding-right: 42px;
}

#hrDocMatrixModal .hr-doc-matrix-title-area {
    min-width: 0;
    flex: 1 1 auto;
}

#hrDocMatrixModal .hr-doc-matrix-title-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

#hrDocMatrixModal .hr-doc-matrix-header h2 {
    font-size: 28px;
    line-height: 1;
}

#hrDocMatrixModal .hr-doc-matrix-subtitle,
#hrDocMatrixActiveFilterChip,
#hrDocMatrixCountChip {
    display: none !important;
}

#hrDocMatrixModal .hr-doc-matrix-meta {
    margin-top: 0;
}

#hrDocMatrixModal .hr-doc-matrix-meta-control {
    min-height: 38px;
    padding: 7px 12px;
}

#hrDocMatrixModal .hr-doc-matrix-legend {
    gap: 6px;
}

#hrDocMatrixModal .hr-doc-matrix-legend span {
    padding: 7px 10px;
}

#hrDocMatrixModal .hr-doc-matrix-toolbar {
    padding: 10px 14px;
    border-radius: 14px;
    gap: 8px 10px;
}

#hrDocMatrixModal .hr-doc-matrix-filter {
    gap: 4px;
}

#hrDocMatrixModal .hr-doc-matrix-filter input,
#hrDocMatrixModal .hr-doc-matrix-filter select {
    padding: 9px 11px;
    border-radius: 10px;
}

#hrDocMatrixModal .hr-doc-matrix-toolbar-actions .btn {
    min-height: 40px;
}

#hrDocMatrixModal .hr-doc-matrix-wrapper {
    border-radius: 14px;
}

body:not(.hc-mobile-mode) #modulePersonnel .personnel-card-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)) !important;
    align-items: stretch;
}

body:not(.hc-mobile-mode) #modulePersonnel .personnel-card {
    min-width: 0;
    padding: clamp(11px, .8vw, 13px);
}

body:not(.hc-mobile-mode) #modulePersonnel .personnel-card .personnel-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 5px clamp(10px, .9vw, 14px);
}

body:not(.hc-mobile-mode) #modulePersonnel .personnel-card .personnel-info-grid > div {
    min-width: 0;
}

body:not(.hc-mobile-mode) #modulePersonnel .personnel-card .personnel-info-grid label,
body:not(.hc-mobile-mode) #modulePersonnel .personnel-card .personnel-info-grid span,
body:not(.hc-mobile-mode) #modulePersonnel .personnel-card-sub,
body:not(.hc-mobile-mode) #modulePersonnel .personnel-card-name {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body:not(.hc-mobile-mode) #modulePersonnel .personnel-card .personnel-info-grid label {
    letter-spacing: 0;
}

body:not(.hc-mobile-mode) #modulePersonnel .personnel-card-actions {
    flex-wrap: nowrap;
    margin-top: auto;
}

@media (max-width: 768px) {
    #modulePersonnel .personnel-search-field {
        flex: 1 1 100%;
        width: 100%;
        min-width: 0;
        max-width: none;
    }

    #modulePersonnel .personnel-search-actions,
    #modulePersonnel .personnel-summary {
        width: 100%;
        flex-basis: 100%;
    }

    #modulePersonnel .personnel-search-actions .btn {
        flex: 1 1 0;
    }

    #hubHome .hub-group-break {
        gap: 10px;
        margin-top: 10px;
    }

    #hubHome .hub-group-break h3 {
        font-size: 16px;
    }

    #hubHome .hc-planned-card .hub-card-info p {
        padding-right: 0;
    }

    .hc-planned-pill {
        position: static;
        margin-left: auto;
    }
}

@media (max-width: 768px) {
    #moduleChat .sub-header.tools-only {
        flex-wrap: wrap;
    }

    .hc-chat-open-full {
        width: 100%;
        margin-left: 0;
        justify-content: center;
    }

    .hc-chat-workspace-card {
        min-height: calc(100dvh - 190px);
        height: calc(100dvh - 190px);
        border-radius: 22px !important;
    }
}

/* 2026-07-24 home/family workspace split. */
#hubHome[data-hub-mode="home"] .hub-home-head.tools-only {
    display: flex !important;
    flex-direction: column;
}

#hubHome,
#hubHome .hub-home-layout,
#hubHome .hub-home-panel,
#hubHome .hub-home-head.tools-only,
#hubHome .hub-grid,
#hubHome .hub-card {
    min-width: 0;
}

#hubHome[data-hub-mode="family"] .hub-home-head.tools-only {
    display: block !important;
}

#hubHome[data-hub-mode="home"] .hub-grid,
#hubHome[data-hub-mode="home"] .hc-family-workspace-head {
    display: none !important;
}

#hubHome[data-hub-mode="family"] .hc-home-welcome-block,
#hubHome[data-hub-mode="family"] .hc-home-action-grid,
#hubHome[data-hub-mode="family"] .hub-group-break {
    display: none !important;
}

body:not(.hc-mobile-mode) #hubHome[data-hub-mode="family"] .hub-home-layout {
    grid-template-columns: minmax(0, 1fr) 340px !important;
}

body:not(.hc-mobile-mode) #hubHome[data-hub-mode="home"] .hub-home-layout {
    grid-template-columns: minmax(0, 1fr) 340px !important;
}

body:not(.hc-mobile-mode) #hubHome[data-hub-mode="family"] .hub-home-head.tools-only {
    display: block !important;
    min-height: auto !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
}

body:not(.hc-mobile-mode) #hubHome[data-hub-mode="family"] .hub-home-head.tools-only::before,
body:not(.hc-mobile-mode) #hubHome[data-hub-mode="family"] .hub-home-head.tools-only::after {
    content: none !important;
    display: none !important;
}

body:not(.hc-mobile-mode) #hubHome[data-hub-mode="family"] .hub-home-head.tools-only > div:first-child {
    max-width: none !important;
}

.hc-family-workspace-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 10px;
}

.hc-family-workspace-head .workspace-section-title {
    margin: 0;
    color: var(--hc-ink);
    font-size: clamp(28px, 3vw, 44px);
    font-weight: 800;
    line-height: 1.08;
}

body:not(.hc-mobile-mode) #hubHome[data-hub-mode="family"] .hc-family-workspace-head .workspace-section-title {
    font-size: clamp(30px, 3vw, 44px) !important;
    letter-spacing: -0.02em !important;
}

.hc-home-action-grid {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr));
    gap: 14px;
}

.hc-home-action-chip {
    appearance: none;
    -webkit-appearance: none;
    min-height: 134px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 20px 16px;
    border: 1px solid rgba(255,255,255,0.78);
    border-radius: 22px;
    color: var(--hc-ink);
    background: rgba(255,253,249,0.82);
    box-shadow: 0 14px 34px rgba(84,50,25,0.09);
    cursor: pointer;
    font: inherit;
    font-size: 16px;
    font-weight: 900;
    line-height: 1.25;
    text-align: center;
    min-width: 0;
    overflow-wrap: anywhere;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.hc-home-action-chip > span:last-child {
    max-width: 100%;
    overflow-wrap: break-word;
}

.hc-home-action-chip:hover {
    transform: translateY(-2px);
    border-color: rgba(174,124,65,0.34);
    background: rgba(255,255,255,0.94);
    box-shadow: 0 18px 42px rgba(84,50,25,0.13);
}

.hc-home-action-icon {
    width: 50px;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    color: var(--hc-bronze-dark);
    background: rgba(174,124,65,0.14);
}

.hc-home-action-icon .material-icons {
    font-size: 26px;
}

body:not(.hc-mobile-mode) #hubHome[data-hub-mode="family"] .hub-grid {
    margin-top: 0 !important;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)) !important;
}

body:not(.hc-mobile-mode).hc-sidebar-collapsed .hc-sidebar {
    overflow: visible;
    z-index: 50;
}

body:not(.hc-mobile-mode).hc-sidebar-collapsed .hc-main-nav-link[data-tooltip],
body:not(.hc-mobile-mode).hc-sidebar-collapsed .hc-sidebar-toggle[data-tooltip] {
    position: relative;
}

body:not(.hc-mobile-mode).hc-sidebar-collapsed .hc-main-nav-link[data-tooltip]::after,
body:not(.hc-mobile-mode).hc-sidebar-collapsed .hc-sidebar-toggle[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    z-index: 1000;
    min-width: max-content;
    max-width: 240px;
    padding: 8px 10px;
    border-radius: 10px;
    color: #fff;
    background: rgba(29,26,22,0.96);
    box-shadow: 0 14px 32px rgba(36,24,12,0.22);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%) translateX(-4px);
    transition: opacity 0.16s ease, transform 0.16s ease;
}

body:not(.hc-mobile-mode).hc-sidebar-collapsed .hc-main-nav-link[data-tooltip]:hover::after,
body:not(.hc-mobile-mode).hc-sidebar-collapsed .hc-sidebar-toggle[data-tooltip]:hover::after,
body:not(.hc-mobile-mode).hc-sidebar-collapsed .hc-main-nav-link[data-tooltip]:focus-visible::after,
body:not(.hc-mobile-mode).hc-sidebar-collapsed .hc-sidebar-toggle[data-tooltip]:focus-visible::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

@media (max-width: 1640px) and (min-width: 769px) {
    #hubHome[data-hub-mode="home"] .hc-home-action-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #hubHome[data-hub-mode="home"] .hc-home-action-chip {
        min-height: 116px;
    }
}

@media (max-width: 1240px) and (min-width: 769px) {
    body:not(.hc-mobile-mode) #hubHome[data-hub-mode="home"] .hub-home-layout,
    body:not(.hc-mobile-mode) #hubHome[data-hub-mode="family"] .hub-home-layout {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    body:not(.hc-mobile-mode) #hubHome .hc-concept-rail {
        position: static !important;
        min-height: auto !important;
    }
}

@media (max-width: 1180px) {
    .hc-home-action-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    #hubHome[data-hub-mode="family"] .hub-home-head.tools-only {
        display: block !important;
    }

    .hc-home-action-grid {
        grid-template-columns: 1fr;
    }

    .hc-home-action-chip {
        min-height: 92px;
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
    }
}

.embed-mode body {
    background: #fff;
    overflow: auto;
}

.embed-mode .hc-shell {
    display: block;
    min-height: 100vh;
    height: auto;
    overflow: visible;
}

.embed-mode .hc-sidebar,
.embed-mode .hc-main-topbar {
    display: none !important;
}

.embed-mode .hc-main {
    height: auto;
    overflow: visible;
}

.embed-mode .hc-page {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 14px !important;
    gap: 0;
}

.embed-mode #hubHome {
    display: none;
}
/* ===== Bao hiem xa hoi ===== */
.bhxh-module {
    width: 100%;
    min-width: 0;
}

body:not(.hc-mobile-mode).hc-bhxh-full-bleed .hc-page {
    padding-top: 18px;
    gap: 14px;
}

body:not(.hc-mobile-mode).hc-bhxh-full-bleed .hc-topbar-title h1 {
    font-size: clamp(36px, 3vw, 50px);
}

body:not(.hc-mobile-mode).hc-bhxh-full-bleed .hc-topbar-title h1 {
    margin-bottom: 5px;
}

.bhxh-toolbar {
    gap: 14px;
}

.bhxh-toolbar .sub-title {
    flex: 1;
}

.bhxh-toolbar-actions,
.bhxh-overview-actions,
.bhxh-section-actions,
.bhxh-form-actions,
.bhxh-document-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bhxh-toolbar-actions .material-icons,
.bhxh-overview-actions .material-icons,
.bhxh-section-actions .material-icons {
    font-size: 17px;
}

.bhxh-overview-actions {
    flex: 0 0 auto;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.bhxh-overview-actions .btn {
    min-width: 142px;
    min-height: 36px;
    justify-content: center;
    padding: 7px 12px;
    white-space: nowrap;
}

.bhxh-workspace {
    padding: 0;
    overflow: hidden;
    border-radius: 8px;
}

.bhxh-tabbar {
    display: grid;
    grid-template-columns: repeat(5, minmax(130px, 1fr));
    align-items: stretch;
    padding: 4px;
    border-bottom: 1px solid #e3e8e4;
    background: #f5f7f5;
}

.bhxh-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    gap: 7px;
    padding: 6px 9px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #5b6962;
    font: 700 12px/1.2 'Plus Jakarta Sans', sans-serif;
    cursor: pointer;
    transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}

.bhxh-tab .material-icons { font-size: 18px; }
.bhxh-tab:hover { color: #245f49; background: rgba(255, 255, 255, .72); }
.bhxh-tab.active {
    color: #1f6047;
    background: #fff;
    box-shadow: 0 2px 10px rgba(35, 65, 52, .09);
}

.bhxh-panel {
    display: none;
    min-width: 0;
    padding: 12px;
}

.bhxh-panel.active { display: block; }

.bhxh-overview-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, .85fr);
    gap: 10px;
    margin-bottom: 12px;
}

.bhxh-rate-card,
.bhxh-alert-card {
    min-width: 0;
    padding: 12px;
    border: 1px solid #e0e6e1;
    border-radius: 8px;
    background: #fff;
}

.bhxh-panel-heading,
.bhxh-section-head,
.bhxh-rate-total,
.bhxh-reconciliation-head,
.bhxh-person-cell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.bhxh-panel-heading h3,
.bhxh-section-head h3 {
    margin: 3px 0 0;
    color: #1c2923;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.35;
}

.bhxh-eyebrow {
    display: block;
    color: #76837c;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}

.bhxh-status-pill,
.bhxh-mini-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 25px;
    padding: 4px 8px;
    border: 1px solid #dce3de;
    border-radius: 999px;
    background: #f4f7f5;
    color: #526159;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}
.bhxh-status-pill + .bhxh-status-pill { margin-left: 4px; }

.bhxh-contribution-status-stack {
    display: inline-flex;
    max-width: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    vertical-align: middle;
}

.bhxh-contribution-status-stack .bhxh-status-pill + .bhxh-status-pill {
    margin-left: 0;
}

.bhxh-status-pill.success,
.bhxh-mini-pill.success { border-color: #bfe0cd; background: #edf8f1; color: #24704e; }
.bhxh-status-pill.warning,
.bhxh-mini-pill.warning { border-color: #efd4a7; background: #fff7e9; color: #8a5a13; }
.bhxh-status-pill.danger,
.bhxh-mini-pill.danger { border-color: #ebc3c8; background: #fff1f2; color: #9a3644; }
.bhxh-status-pill.info,
.bhxh-mini-pill.info { border-color: #bfd8e9; background: #eef7fc; color: #2c6992; }
.bhxh-status-pill.purple,
.bhxh-mini-pill.purple { border-color: #d7c3f0; background: #f5effd; color: #7040a3; }
.bhxh-status-pill.maternity,
.bhxh-mini-pill.maternity { border-color: #efca91; background: #fff5e5; color: #965b08; }
.bhxh-status-pill.health-only,
.bhxh-mini-pill.health-only { border-color: #7dd3fc; background: #e0f2fe; color: #075985; }

.bhxh-maternity-text {
    color: #965b08;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.bhxh-rate-content {
    margin-top: 8px;
}

.bhxh-rate-total {
    padding: 9px 11px;
    border-radius: 7px;
    background: #f2f7f3;
}

.bhxh-rate-total strong {
    color: #1d6247;
    font-size: 21px;
    font-weight: 800;
}

.bhxh-rate-split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.bhxh-rate-party {
    padding: 9px 10px;
    border: 1px solid #e3e8e4;
    border-radius: 7px;
    background: #fafbfa;
}

.bhxh-rate-party span,
.bhxh-rate-party small { display: block; color: #6d7973; font-size: 10px; line-height: 1.5; }
.bhxh-rate-party strong { display: block; margin: 2px 0; color: #1e2c25; font-size: 17px; }
.bhxh-legal-note { margin: 6px 0 0; color: #6b7770; font-size: 9px; line-height: 1.45; }

.bhxh-alert-list {
    display: grid;
    gap: 6px;
    margin-top: 8px;
}

.bhxh-alert-item {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    padding: 7px 9px;
    border: 1px solid #e4e8e5;
    border-radius: 7px;
    background: #fafbfa;
}

.bhxh-alert-item .material-icons { color: #ad7120; font-size: 20px; }
.bhxh-alert-item strong { display: block; color: #2c3933; font-size: 11px; }
.bhxh-alert-item span { color: #76817b; font-size: 10px; line-height: 1.45; }

.bhxh-section-head {
    margin: 0 0 7px;
}

.bhxh-section-head.compact { margin-top: 15px; }
.bhxh-section-head p { margin: 3px 0 0; color: #748078; font-size: 10px; line-height: 1.45; }

.bhxh-year-control,
.bhxh-filter-row label,
.bhxh-form label,
.bhxh-document-upload label {
    display: grid;
    gap: 5px;
    min-width: 0;
    color: #5c6962;
    font-size: 10px;
    font-weight: 700;
}

.bhxh-year-control { grid-template-columns: auto 96px; align-items: center; }

.bhxh-year-control select,
.bhxh-filter-row select,
.bhxh-filter-row input,
.bhxh-form input,
.bhxh-form select,
.bhxh-form textarea,
.bhxh-document-upload select,
.bhxh-document-upload input {
    width: 100%;
    min-width: 0;
    min-height: 36px;
    padding: 7px 9px;
    border: 1px solid #d9e0db;
    border-radius: 6px;
    outline: none;
    background: #fff;
    color: #26342d;
    font: 600 11px/1.35 'Plus Jakarta Sans', sans-serif;
}

.bhxh-form textarea { resize: vertical; }

.bhxh-fixed-personnel {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    border: 1px solid #d8e2dc;
    border-radius: 12px;
    background: #f6faf7;
}

.bhxh-fixed-personnel > span {
    color: #66736b;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.bhxh-fixed-personnel > strong {
    color: #1c2922;
    font-size: 16px;
}

.bhxh-conditional-date {
    padding: 12px;
    border: 1px solid #cfe2d5;
    border-radius: 12px;
    background: #f3faf5;
}

.bhxh-closure-check {
    min-height: 50px;
    display: flex;
    flex-direction: row !important;
    align-items: center;
    gap: 10px !important;
    padding: 12px 14px;
    border: 1px solid #d8e2dc;
    border-radius: 12px;
    background: #f6faf7;
    cursor: pointer;
}

.bhxh-closure-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #2f7d51;
}

.bhxh-closure-check > span {
    color: #254a36;
    font-weight: 700;
}
.bhxh-year-control select:focus,
.bhxh-filter-row select:focus,
.bhxh-filter-row input:focus,
.bhxh-form input:focus,
.bhxh-form select:focus,
.bhxh-form textarea:focus { border-color: #6a9d82; box-shadow: 0 0 0 3px rgba(73, 129, 98, .1); }

.bhxh-filter-row {
    display: grid;
    grid-template-columns: 130px 140px 180px minmax(240px, 1fr);
    align-items: end;
    gap: 10px;
    padding: 12px;
    border: 1px solid #e1e6e2;
    border-radius: 8px;
    background: #f8faf8;
}

.bhxh-filter-row.two { grid-template-columns: minmax(190px, .36fr) minmax(260px, 1fr); }

.bhxh-table-wrap {
    max-width: 100%;
    overflow: auto;
    border: 1px solid #e0e6e1;
    border-radius: 8px;
    scrollbar-width: thin;
}

.bhxh-table-tall { max-height: 62vh; }

.bhxh-table {
    width: 100%;
    min-width: 920px;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    font-size: 10px;
}

.bhxh-table th {
    position: sticky;
    z-index: 2;
    top: 0;
    padding: 8px 8px;
    border-bottom: 1px solid #dce3de;
    background: #f2f5f3;
    color: #4e5d55;
    font-weight: 800;
    text-align: center;
    white-space: nowrap;
}

.bhxh-table td {
    padding: 7px 8px;
    border-bottom: 1px solid #edf0ee;
    color: #334038;
    line-height: 1.45;
    text-align: center;
    vertical-align: middle;
}

.bhxh-table tr:last-child td { border-bottom: 0; }
.bhxh-table tbody tr:hover td { background: #fbfcfb; }
.bhxh-table td.align-left { text-align: left; }
.bhxh-table td.money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.bhxh-table td.variance-positive { color: #24704e; font-weight: 800; }
.bhxh-table td.variance-negative { color: #a03948; font-weight: 800; }
.bhxh-contribution-table { min-width: 1120px; table-layout: fixed; }
.bhxh-contribution-table th,
.bhxh-contribution-table td { padding-left: 6px; padding-right: 6px; }
.bhxh-contribution-table th:nth-child(1) { width: 40px; }
.bhxh-contribution-table th:nth-child(2) { width: 190px; }
.bhxh-contribution-table th:nth-child(3) { width: 138px; }
.bhxh-contribution-table th:nth-child(4) { width: 100px; }
.bhxh-contribution-table th:nth-child(5) { width: 140px; }
.bhxh-contribution-table th:nth-child(6) { width: 112px; }
.bhxh-contribution-table th:nth-child(7) { width: 104px; }
.bhxh-contribution-table th:nth-child(8) { width: 128px; }
.bhxh-contribution-table th:nth-child(9) { width: 112px; }
.bhxh-contribution-table th:nth-child(10) { width: 66px; }
.bhxh-contribution-table th:nth-child(11) { width: 78px; }
.bhxh-contribution-table td:nth-child(3) { white-space: normal; }
.bhxh-contribution-table td:nth-child(4),
.bhxh-contribution-table td:nth-child(5) { overflow-wrap: anywhere; }
.bhxh-table .bhxh-group-row td {
    padding: 9px 14px;
    background: linear-gradient(90deg, #f2eee6 0%, #faf8f3 100%) !important;
    border-top: 1px solid #ded4c2;
    border-bottom: 1px solid #ded4c2;
    color: #2c3f35;
    text-align: left;
}
.bhxh-table .bhxh-group-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #2c3f35;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .2px;
    text-transform: uppercase;
}
.bhxh-table .bhxh-group-label::before {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #2f7d5d;
    content: '';
}
.bhxh-empty-cell,
.bhxh-empty { padding: 26px !important; color: #7b867f !important; text-align: center !important; }

.bhxh-doc-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.bhxh-doc-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 220px;
    padding: 4px 7px;
    border: 1px solid #cfe0d7;
    border-radius: 999px;
    background: #f6fbf8;
    color: #2d6d50;
    font: inherit;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.25;
    text-decoration: none;
    text-align: left;
    cursor: pointer;
}

.bhxh-doc-link .material-icons { font-size: 14px; }

.bhxh-reconciliation-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(250px, 1fr));
    gap: 10px;
}

.bhxh-reconciliation-card {
    padding: 13px;
    border: 1px solid #dde4df;
    border-radius: 8px;
    background: #fff;
}

.bhxh-reconciliation-card.has-warning { border-color: #e9c98f; background: #fffdf8; }
.bhxh-reconciliation-head strong { color: #26362e; font-size: 13px; }

.bhxh-reconciliation-money {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin: 10px 0;
}

.bhxh-reconciliation-money div {
    padding: 8px;
    border-radius: 6px;
    background: #f4f6f4;
}

.bhxh-reconciliation-money span,
.bhxh-reconciliation-money strong { display: block; }
.bhxh-reconciliation-money span { color: #758078; font-size: 9px; }
.bhxh-reconciliation-money strong { margin-top: 3px; color: #26362e; font-size: 11px; }

.bhxh-reconciliation-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.bhxh-icon-btn,
.bhxh-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 31px;
    padding: 6px 9px;
    border: 1px solid #d8dfda;
    border-radius: 6px;
    background: #fff;
    color: #3a664f;
    font: 800 9px/1 'Plus Jakarta Sans', sans-serif;
    cursor: pointer;
}

.bhxh-icon-btn .material-icons,
.bhxh-action-btn .material-icons { font-size: 15px; }
.bhxh-icon-btn:hover,
.bhxh-action-btn:hover { border-color: #8eb39e; background: #f2f8f4; }
.bhxh-contribution-edit-btn { min-width: 58px; }

.bhxh-person-cell { justify-content: flex-start; text-align: left; }
.bhxh-person-avatar {
    display: grid;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 50%;
    background: #e9f2ed;
    color: #2d6e51;
    font-size: 10px;
    font-weight: 800;
}
.bhxh-person-cell strong,
.bhxh-person-cell small { display: block; }
.bhxh-person-cell strong { color: #26342d; font-size: 10px; }
.bhxh-person-cell small { margin-top: 2px; color: #78837c; font-size: 9px; }

.bhxh-modal { z-index: 13050 !important; }

/* Modal xem chung tu LUON duoc mo TU BEN TRONG mot modal khac (modal sua ho so, va tu 19/08
   la ca modal "Chi tiet"). Nen no phai nam tren — day khong phai so thich hien thi ma la dieu
   kien de nguoi dung nhin thay thu ho vua bam vao.

   Truoc ban nay moi `.bhxh-modal` deu chung mot tang, va thu tu chong len nhau do THU TU THE
   TRONG HTML quyet dinh. No tinh co dung suot thoi gian dai vi modal xem chung tu ngau nhien
   dung SAU modal sua ho so. Den khi them `#bhxhBenefitDocumentModal` vao ngay phia sau no,
   chung tu bam vao lien bi che khuat — khong bao loi, chi la khong thay gi.

   Mot rang buoc vo hinh nhu vay khong duoc phep ton tai: nay tang duoc noi RO. */
.bhxh-preview-modal { z-index: 13060 !important; }

/* Tong hop BHXH: hai khoi Quy luong / So tien phai nop, moi khoi la mot bang rong 16 cot. */
.bhxh-summary-block { margin-bottom: 18px; }

.bhxh-summary-block-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 8px;
}

.bhxh-summary-block-head h4 { margin: 0; color: #33413a; font-size: 12px; font-weight: 800; }
.bhxh-summary-block-head span { color: #59675f; font-size: 10px; font-weight: 700; }

/* 16 cot thi khong the de bang tu co gian — cot thang phai du hep de doc duoc ca nam. */
.bhxh-summary-table { min-width: 1180px; }
.bhxh-summary-table th, .bhxh-summary-table td { white-space: nowrap; }

/* Can le theo TUNG COT, va gan cho ca `th` lan `td` — truoc day chi gan cho o du lieu nen tieu
   de mot dang, so mot neo, nhin doc xuong thay lech het. */
.bhxh-summary-table th.col-stt,   .bhxh-summary-table td.col-stt   { text-align: center; width: 52px; }
.bhxh-summary-table th.col-rate,  .bhxh-summary-table td.col-rate  { text-align: center; width: 84px; }
.bhxh-summary-table th.col-person, .bhxh-summary-table td.col-person { text-align: left; }
.bhxh-summary-table th.col-total, .bhxh-summary-table td.col-total { text-align: right; }
/* Cot thang can GIUA — 12 cot cung do rong, doc xuong thang hang nhu bang Excel cua Hanh chinh. */
.bhxh-summary-table th.col-month, .bhxh-summary-table td.col-month { text-align: center; width: 104px; }
.bhxh-summary-table td.col-total,
.bhxh-summary-table td.col-month { font-variant-numeric: tabular-nums; }
.bhxh-summary-table td.money { font-variant-numeric: tabular-nums; }
/* Thang khong dong thi lam mo di, de mat luot qua thay ngay ai nghi giua nam. */
.bhxh-summary-table td.bhxh-zero { color: #b8c2bc; }

/* O chon nam nam ngay canh chu "Quỹ lương", khong con o dau khu vuc. */
.bhxh-summary-block-head .bhxh-year-control { margin-left: 10px; margin-right: auto; }
/* Nguoi chua co ma so BHXH: noi ro thay vi de trong. Lam mo hon ma that de nhin luot van phan
   biet duoc dong nao co ma, dong nao chua. */
.bhxh-summary-table td.col-person .bhxh-no-code { color: #b08a3e; font-style: italic; }

.bhxh-summary-total td { background: #f2faf6; font-weight: 800; }
.bhxh-summary-total.bhxh-summary-union td { background: #fbf7ee; font-weight: 700; }
.bhxh-dialog { width: min(620px, calc(100vw - 32px)); }
.bhxh-dialog-wide { width: min(840px, calc(100vw - 32px)); }

.bhxh-dialog .asset-form-head p {
    margin: 4px 0 0;
    color: #748078;
    font-size: 10px;
    line-height: 1.45;
}

.bhxh-form {
    display: grid;
    gap: 12px;
    padding: 16px;
}

.bhxh-form.two-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bhxh-form .full-row { grid-column: 1 / -1; }
.bhxh-form-actions { justify-content: flex-end; padding-top: 4px; }

.bhxh-contribution-edit-person {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(100px, .55fr) minmax(150px, .8fr);
    gap: 10px;
    padding: 12px;
    border: 1px solid #d8e3dc;
    border-radius: 8px;
    background: #f6faf7;
}

.bhxh-contribution-edit-person > div { min-width: 0; }
.bhxh-contribution-edit-person span,
.bhxh-contribution-edit-person strong { display: block; }
.bhxh-contribution-edit-person > div > span {
    margin-bottom: 5px;
    color: #6a776f;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
}
.bhxh-contribution-edit-person strong { color: #223129; font-size: 11px; line-height: 1.45; }
.bhxh-contribution-edit-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid #cfe0d6;
    border-radius: 7px;
    background: #f3f8f5;
    color: #52655b;
    font-size: 10px;
    line-height: 1.55;
}
.bhxh-contribution-edit-note .material-icons { flex: 0 0 auto; color: #2f795b; font-size: 18px; }

@media (max-width: 680px) {
    .bhxh-contribution-edit-person { grid-template-columns: 1fr; }
}

.bhxh-document-upload {
    display: grid;
    grid-template-columns: minmax(160px, .65fr) minmax(240px, 1.35fr);
    gap: 10px;
    padding: 12px;
    border: 1px dashed #cfd9d2;
    border-radius: 7px;
    background: #f8faf8;
}

.bhxh-document-manager {
    display: grid;
    gap: 9px;
    padding: 12px;
    border: 1px dashed #cfd9d2;
    border-radius: 7px;
    background: #f8faf8;
}

.bhxh-document-manager-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #31443a;
    font-size: 11px;
    font-weight: 850;
}

.bhxh-document-file {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr) !important;
    align-items: center;
    gap: 10px;
}

.bhxh-document-manager-list {
    display: grid;
    gap: 8px;
}

.bhxh-document-row {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(240px, 1.2fr) auto auto;
    align-items: end;
    gap: 8px;
    padding: 9px;
    border: 1px solid #e2e8e4;
    border-radius: 7px;
    background: #fff;
}

.bhxh-document-row label {
    display: grid;
    gap: 5px;
}

.bhxh-document-row label span,
.bhxh-document-file span {
    color: #66746d;
    font-size: 9px;
    font-weight: 850;
    text-transform: uppercase;
}

.bhxh-document-file-name {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    color: #2d3a33;
    font-size: 11px;
    font-weight: 750;
    line-height: 1.35;
    word-break: break-word;
}

.bhxh-document-file-name .material-icons { color: #2f7d5d; font-size: 16px; }
.bhxh-icon-btn.danger { color: #a03948; border-color: #efc4ca; background: #fff6f7; }

.bhxh-preview-dialog {
    width: min(1080px, calc(100vw - 32px));
    max-height: min(900px, calc(100vh - 32px));
    display: flex;
    flex-direction: column;
}

.bhxh-preview-body {
    min-height: 58vh;
    overflow: hidden;
    border: 1px solid #dfe6e1;
    border-radius: 8px;
    background: #f7f8f6;
}

.bhxh-preview-frame,
.bhxh-preview-image {
    display: block;
    width: 100%;
    height: min(70vh, 720px);
    border: 0;
}

.bhxh-preview-image {
    object-fit: contain;
    padding: 10px;
}

.bhxh-preview-empty {
    min-height: 58vh;
    display: grid;
    place-items: center;
    gap: 8px;
    color: #65726b;
    text-align: center;
}

.bhxh-preview-empty .material-icons { color: #2f7d5d; font-size: 34px; }
.bhxh-preview-empty strong,
.bhxh-preview-empty span { display: block; }
.bhxh-preview-actions { display: flex; justify-content: flex-end; padding-top: 10px; }

.bhxh-checklist {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
    padding: 11px 12px 12px;
    border: 1px solid #dce3de;
    border-radius: 7px;
}

.bhxh-checklist legend { padding: 0 5px; color: #59675f; font-size: 10px; font-weight: 800; }
.bhxh-checklist label { display: flex; grid-template-columns: none; align-items: center; gap: 7px; font-size: 10px; }
.bhxh-checklist input { width: 15px; min-height: 15px; height: 15px; }

/* Moi loai chung tu la mot khoi: o tich + o tai file rieng cua no. O tai file chi hien khi da
   tich, va khong bat buoc phai chon. */
.bhxh-checklist-item { display: flex; flex-direction: column; gap: 6px; }
.bhxh-checklist-tick { cursor: pointer; }
.bhxh-checklist-file { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding-left: 22px; }
.bhxh-checklist-file span { color: #7a8a81; font-size: 9px; font-weight: 700; }
.bhxh-checklist-file input { width: auto; height: auto; min-height: 0; font-size: 10px; }

/* Bang dau tich trong cot Chung tu: bon o co dinh, dung thu tu voi bang Excel cua Hanh chinh. */
.bhxh-tick-col { min-width: 210px; }

.bhxh-tick-table {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 3px;
}

.bhxh-tick-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: 4px 2px;
    border: 1px solid #dce3de;
    border-radius: 5px;
    background: #fbfcfb;
    line-height: 1.1;
}

.bhxh-tick-cell small { color: #111; font-size: 9px; font-weight: 900; text-align: center; }
.bhxh-tick-cell i { font-size: 14px; color: #c3ccc7; }
.bhxh-tick-cell.on { border-color: #cfe0d7; background: #f2faf6; }
.bhxh-tick-cell.on small { color: #111; }
/* Tich ma chua co file: van la thieu giay to, khong duoc trong giong nhu da du. */
.bhxh-tick-cell.on i { color: #e0a33c; }
.bhxh-tick-cell.on.has-file i { color: #2d8a5f; }

.bhxh-doc-detail {
    padding: 0;
    border: 0;
    background: none;
    color: #111;
    font: inherit;
    font-size: 10px;
    font-weight: 900;
    text-decoration: underline;
    cursor: pointer;
}

.bhxh-benefit-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 70px;
}

.bhxh-doc-detail:hover { color: #2d6d50; }

/* Khai tang BHXH — nam CUNG HANG voi "Tổng lương đóng BHXH", ben phai no.
   Luoi cha la `repeat(auto-fit, minmax(190px, 1fr))`, va `Tổng lương đóng BHXH` mo mot hang moi
   (ba o truoc do da lap day hang tren). Nen cum nay chiem hai cot con lai — khong dung `wide`
   (`grid-column: 1 / -1`) vi cai do day no xuong mot dong RIENG, chinh la cho trong xau. */
.bhxh-enrollment-field { grid-column: span 2; }

.bhxh-enrollment-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
}

.bhxh-enrollment-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex: 0 0 auto;
    cursor: pointer;
}

.bhxh-enrollment-toggle input[type="checkbox"] {
    width: 16px !important;
    min-width: 16px;
    height: 16px;
    margin: 0;
    padding: 0;
    flex: 0 0 auto;
}

.bhxh-enrollment-toggle small {
    color: #263a31;
    font-size: 13px;
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1.35;
}

.bhxh-enrollment-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.bhxh-enrollment-actions[hidden] { display: none !important; }

/* Bo tang ngay tao `.personnel-date-control` quanh input. Dat kich thuoc tren CHINH bo boc nay
   de icon lich dung gon trong vien o, thay vi bi day ra ngoai do bo boc van rong 100%. */
.bhxh-enrollment-actions .personnel-date-control {
    width: 190px;
    flex: 0 0 190px;
}

.bhxh-enrollment-actions .bhxh-enrollment-month {
    box-sizing: border-box;
    width: 100%;
    height: 48px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}
.bhxh-enrollment-actions .bhxh-enrollment-month:disabled {
    background: #f5f5f4;
    color: var(--muted);
}

.bhxh-enrollment-actions .bhxh-enrollment-date {
    box-sizing: border-box;
    width: 100% !important;
    height: 48px;
    padding: 10px 44px 10px 14px !important;
    text-align: left;
    font-size: 14px;
    font-weight: 700;
}

.bhxh-enrollment-actions .personnel-date-calendar-btn {
    right: 5px;
    width: 36px;
    height: 36px;
    border-radius: 9px;
}

.bhxh-enrollment-row .bhxh-enrollment-btn {
    flex: 0 0 auto;
    min-width: 132px;
    height: 48px;
    padding: 0 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 850;
    letter-spacing: .15px;
    white-space: nowrap;
    box-shadow: 0 7px 16px rgba(163, 110, 45, 0.2);
}

.bhxh-enrollment-row .bhxh-enrollment-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}

@media (max-width: 900px) {
    /* Man hep thi luoi chi con mot cot; cum ngay va nut co the xuong dong neu can. */
    .bhxh-enrollment-field { grid-column: 1 / -1; }
    .bhxh-enrollment-actions { flex-wrap: wrap; }
}
/* Ket qua hien ngay tai cho — mot thao tac ghi tien khong duoc im lang. */
.bhxh-enrollment-result { margin-top: 6px; color: #59675f; font-size: 10px; line-height: 1.4; }
.bhxh-enrollment-note { color: #2d6d50; font-size: 11px; font-weight: 700; }
.bhxh-enrollment-done { opacity: 1; }
.bhxh-enrollment-done .bhxh-enrollment-toggle input[type="checkbox"] {
    opacity: 1;
    accent-color: #2d6d50;
}

.bhxh-document-detail { display: flex; flex-direction: column; gap: 12px; padding: 4px 2px 2px; }
.bhxh-document-detail-group h4 { margin: 0 0 6px; color: #33413a; font-size: 11px; font-weight: 800; }
.bhxh-mini-pill.muted { opacity: 0.6; }

@media (max-width: 1280px) {
    .bhxh-reconciliation-grid { grid-template-columns: repeat(2, minmax(250px, 1fr)); }
}

@media (max-width: 900px) {
    .bhxh-toolbar { align-items: flex-start; flex-wrap: wrap; }
    .bhxh-toolbar-actions { width: 100%; }
    .bhxh-toolbar-actions .btn { flex: 1; }
    .bhxh-tabbar { display: flex; overflow-x: auto; }
    .bhxh-tab { flex: 0 0 auto; min-width: 145px; }
    .bhxh-overview-grid { grid-template-columns: 1fr; }
    .bhxh-section-head { align-items: flex-start; flex-wrap: wrap; }
    .bhxh-overview-actions { width: 100%; justify-content: flex-start; }
    .bhxh-filter-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bhxh-search-field { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
    .bhxh-panel { padding: 12px; }
    .bhxh-filter-row,
    .bhxh-filter-row.two,
    .bhxh-form.two-cols,
    .bhxh-document-upload,
    .bhxh-document-row,
    .bhxh-rate-split,
    .bhxh-reconciliation-grid { grid-template-columns: 1fr; }
    .bhxh-form .full-row,
    .bhxh-search-field { grid-column: auto; }
    .bhxh-section-head,
    .bhxh-section-actions { align-items: flex-start; flex-direction: column; }
    .bhxh-section-actions .btn { width: 100%; }
    .bhxh-overview-actions { display: grid; width: 100%; grid-template-columns: 1fr; }
    .bhxh-overview-actions .btn,
    .bhxh-overview-actions .bhxh-year-control { width: 100%; }
    .bhxh-year-control { width: 100%; grid-template-columns: auto 1fr; }
    .bhxh-checklist { grid-template-columns: 1fr; }
}

/* ===== Smart attendance: full-width collapsed workspace + denser desktop view ===== */
body:not(.hc-mobile-mode).hc-module-attendance-manager .hc-page {
    padding-top: 18px;
    padding-bottom: 24px;
    gap: 12px;
}

body:not(.hc-mobile-mode).hc-module-attendance-manager .hc-topbar-title h1 {
    margin-bottom: 4px;
    font-size: clamp(36px, 3vw, 50px);
}

body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager,
body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .module-workspace {
    width: 100%;
    max-width: none;
    min-width: 0;
}

body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .module-workspace {
    gap: 12px;
}

body:not(.hc-mobile-mode).hc-sidebar-collapsed.hc-module-attendance-manager .hc-page {
    width: 100%;
    max-width: none;
    margin: 0;
    padding-right: clamp(16px, 1.3vw, 26px);
    padding-left: clamp(18px, 1.4vw, 28px);
}

body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .attendance-sync-card {
    padding: 12px 14px;
    border-radius: 18px;
    gap: 9px;
}

body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .attendance-sync-list {
    gap: 5px;
    margin-top: 7px;
}

body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .attendance-sync-chip {
    gap: 6px;
    padding: 6px 9px;
    font-size: 11px;
}

body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .attendance-sync-meta {
    display: -webkit-box;
    margin-top: 6px;
    overflow: hidden;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .attendance-sync-actions {
    gap: 6px;
}

body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .attendance-sync-actions select,
body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .attendance-sync-actions input,
body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .attendance-sync-actions .btn,
body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .attendance-sync-badge {
    min-height: 34px;
    padding: 6px 9px !important;
}

body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .attendance-control-section {
    padding: 12px;
}

body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .workspace-section-title {
    margin-bottom: 8px;
    font-size: 19px;
    line-height: 1.2;
}

body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .personnel-branch-bar {
    gap: 8px;
    margin-bottom: 0;
}

body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .personnel-branch-chip {
    min-height: 60px;
    gap: 3px;
    padding: 9px 12px;
    border-radius: 12px;
}

body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .personnel-branch-chip strong {
    font-size: 13px;
}

body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .personnel-branch-chip span {
    font-size: 11px;
}

body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .smart-input-box {
    padding: 11px;
    border-radius: 14px;
}

body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .smart-input-head {
    gap: 8px;
    margin-bottom: 8px;
}

body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .smart-input-row {
    grid-template-columns: 170px minmax(0, 1fr) 150px;
    gap: 8px;
}

body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .smart-input-row input[type="date"],
body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .smart-input-row textarea {
    min-height: 84px;
    padding: 9px 10px;
    border-radius: 11px;
}

body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .smart-input-row textarea {
    height: 84px;
}

body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .smart-input-row .btn {
    min-height: 44px;
    border-radius: 11px;
    font-size: 13px;
}

body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .attendance-board-card {
    min-height: 520px;
    padding: 12px;
    border-radius: 18px;
}

body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .attendance-board-card:not(.matrix-fullscreen) .attendance-board-toolbar {
    gap: 7px;
    margin-bottom: 8px;
}

body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .attendance-board-card:not(.matrix-fullscreen) #matrixMonth {
    min-height: 34px;
    width: 190px;
}

body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .attendance-board-card:not(.matrix-fullscreen) #attendanceMonthCloseBadge,
body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .attendance-board-card:not(.matrix-fullscreen) #attendanceMatrixRefreshBtn,
body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .attendance-board-card:not(.matrix-fullscreen) #attendanceMatrixFullscreenBtn,
body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .attendance-board-card:not(.matrix-fullscreen) #attendanceMonthlyBoardBtn,
body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .attendance-board-card:not(.matrix-fullscreen) #attendanceMonthCloseBtn,
body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .attendance-board-card:not(.matrix-fullscreen) #parkingSaveBtn {
    min-height: 32px;
    padding: 5px 9px;
    border-radius: 10px;
}

body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .attendance-legend {
    gap: 5px;
    margin-bottom: 7px;
    padding: 7px 9px;
}

body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .legend-pill {
    padding: 4px 8px;
    font-size: 10px;
}

body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .matrix-scroll-sync {
    margin-bottom: 6px;
}

body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .matrix-scroll-wrapper {
    min-height: 380px;
}

body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .matrix-table th,
body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .matrix-table td {
    padding-top: 5px;
    padding-bottom: 5px;
    padding-left: 3px;
    padding-right: 3px;
}

body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .matrix-table .matrix-day-head,
body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .matrix-table .matrix-day-weekday,
body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .matrix-table .matrix-day-cell {
    width: 40px;
    min-width: 40px;
    max-width: 40px;
}

body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .matrix-table .matrix-sticky-left,
body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .matrix-table .matrix-employee-cell {
    width: 168px;
    min-width: 168px;
    max-width: 168px;
}

body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .matrix-table .matrix-sticky-left {
    padding-left: 8px;
}

body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .matrix-table .matrix-sticky-right,
body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .matrix-table .matrix-export-cell {
    width: 108px;
    min-width: 108px;
    max-width: 108px;
}

body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .matrix-table .matrix-summary-head,
body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .matrix-table .matrix-summary-cell {
    width: 78px;
    min-width: 78px;
    max-width: 78px;
    white-space: normal;
    line-height: 1.25;
}

body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .matrix-table .matrix-employee-name,
body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .matrix-table .matrix-employee-meta {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .matrix-table .matrix-employee-name {
    font-size: 11.5px;
}

body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .matrix-table .matrix-employee-meta {
    font-size: 9.5px !important;
}

body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .row-export-btn {
    min-width: 76px;
    padding: 6px 8px;
    font-size: 10px;
    gap: 4px;
    box-shadow: 0 6px 12px rgba(174,124,65,0.16);
}

body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .matrix-table .matrix-dept-row td {
    padding-top: 7px;
    padding-bottom: 7px;
}

@media (min-width: 1200px) {
    body:not(.hc-mobile-mode).hc-sidebar-collapsed.hc-module-attendance-manager #moduleAttendanceManager .module-workspace {
        grid-template-columns: clamp(360px, 26vw, 500px) minmax(0, 1fr);
    }

    body:not(.hc-mobile-mode).hc-sidebar-collapsed.hc-module-attendance-manager #moduleAttendanceManager .attendance-control-grid {
        grid-template-columns: minmax(230px, 0.64fr) minmax(450px, 1.36fr) !important;
        grid-template-rows: minmax(0, 1fr);
        gap: 12px;
    }

    body:not(.hc-mobile-mode).hc-sidebar-collapsed.hc-module-attendance-manager #moduleAttendanceManager .attendance-control-section,
    body:not(.hc-mobile-mode).hc-sidebar-collapsed.hc-module-attendance-manager #moduleAttendanceManager .attendance-control-section:first-child,
    body:not(.hc-mobile-mode).hc-sidebar-collapsed.hc-module-attendance-manager #moduleAttendanceManager .attendance-control-section + .attendance-control-section {
        height: 100%;
        border: 1px solid var(--border);
        border-radius: 18px;
    }

    body:not(.hc-mobile-mode).hc-sidebar-collapsed.hc-module-attendance-manager #moduleAttendanceManager .attendance-board-card:not(.matrix-fullscreen) .attendance-board-toolbar {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
    }

    body:not(.hc-mobile-mode).hc-sidebar-collapsed.hc-module-attendance-manager #moduleAttendanceManager .attendance-board-card:not(.matrix-fullscreen) .attendance-toolbar-main {
        display: contents;
    }

    body:not(.hc-mobile-mode).hc-sidebar-collapsed.hc-module-attendance-manager #moduleAttendanceManager .attendance-board-card:not(.matrix-fullscreen) .attendance-toolbar-secondary {
        display: flex;
    }

    body:not(.hc-mobile-mode).hc-sidebar-collapsed.hc-module-attendance-manager #moduleAttendanceManager .attendance-board-heading {
        margin-right: auto;
    }
}

/* Compact realtime agent strip: offline agents and job logs stay out of the way. */
#moduleAttendanceManager .attendance-sync-badge {
    display: none !important;
}

#moduleAttendanceManager .module-workspace-left,
#moduleAttendanceManager .attendance-sync-card {
    height: auto;
}

#moduleAttendanceManager .attendance-sync-card {
    align-self: start;
}

#moduleAttendanceManager .attendance-sync-copy,
#moduleAttendanceManager .attendance-sync-actions {
    width: 100%;
}

#moduleAttendanceManager .attendance-sync-copy {
    flex: 1 1 auto;
}

#moduleAttendanceManager .attendance-sync-title {
    margin-bottom: 2px;
    font-size: 14px;
}

#moduleAttendanceManager .attendance-sync-list {
    align-items: center;
}

#moduleAttendanceManager .attendance-online-agent {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

#moduleAttendanceManager .attendance-online-agent .attendance-sync-chip {
    min-height: 30px;
    padding: 5px 9px;
}

#moduleAttendanceManager .attendance-sync-empty {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 9px;
    border: 1px dashed #ddcfbb;
    border-radius: 999px;
    color: #7a746b;
    background: rgba(255,255,255,0.72);
    font-size: 11px;
}

#moduleAttendanceManager .attendance-sync-empty.error {
    border-color: #ecc5c5;
    color: #a33b3b;
    background: #fff7f7;
}

#moduleAttendanceManager .attendance-agent-log-menu {
    position: relative;
    flex: 0 0 auto;
}

#moduleAttendanceManager .attendance-agent-log-menu > summary {
    position: relative;
    display: inline-grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 1px solid #e4d6c2;
    border-radius: 10px;
    color: #74512b;
    background: #fff;
    cursor: pointer;
    list-style: none;
}

#moduleAttendanceManager .attendance-agent-log-menu > summary::-webkit-details-marker {
    display: none;
}

#moduleAttendanceManager .attendance-agent-log-menu > summary .material-icons {
    font-size: 18px;
}

#moduleAttendanceManager .attendance-agent-log-menu > summary::after {
    position: absolute;
    z-index: 45;
    right: 0;
    bottom: calc(100% + 7px);
    padding: 5px 8px;
    border-radius: 7px;
    color: #fff;
    background: #2a211b;
    content: attr(data-tooltip);
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateY(3px);
    transition: opacity .15s ease, transform .15s ease;
}

#moduleAttendanceManager .attendance-agent-log-menu > summary:hover::after,
#moduleAttendanceManager .attendance-agent-log-menu > summary:focus-visible::after {
    opacity: 1;
    transform: translateY(0);
}

#moduleAttendanceManager .attendance-agent-log-menu[open] > summary {
    border-color: #cba878;
    background: #fff7ec;
}

#moduleAttendanceManager .attendance-agent-log-popover {
    position: absolute;
    z-index: 40;
    top: calc(100% + 6px);
    right: 0;
    width: max-content;
    min-width: 156px;
    padding: 5px;
    border: 1px solid #e4d6c2;
    border-radius: 11px;
    background: #fffdfa;
    box-shadow: 0 12px 28px rgba(58,39,20,.16);
}

#moduleAttendanceManager .attendance-agent-log-popover button {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 7px;
    padding: 8px 10px;
    border: 0;
    border-radius: 8px;
    color: #493523;
    background: transparent;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

#moduleAttendanceManager .attendance-agent-log-popover button:hover {
    background: #f8eddd;
}

#moduleAttendanceManager .attendance-agent-log-popover .material-icons {
    color: #ae7c41;
    font-size: 16px;
}

#moduleAttendanceManager .attendance-sync-log-panel,
body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .attendance-sync-log-panel {
    display: none !important;
    width: 100%;
    max-height: 126px;
    margin-top: 7px;
    padding: 9px 10px;
    overflow: auto;
    border: 1px solid #e8dcc8;
    border-radius: 10px;
    color: #635b52;
    background: #fff;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 10px;
    line-height: 1.45;
    -webkit-box-orient: initial;
    -webkit-line-clamp: initial;
}

#moduleAttendanceManager .attendance-sync-log-panel.is-open,
body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .attendance-sync-log-panel.is-open {
    display: block !important;
}

/* ===== Smart department permissions + task command center ===== */
body:not(.hc-mobile-mode).hc-module-department-permissions .hc-page,
body:not(.hc-mobile-mode).hc-module-work-assignment .hc-page {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 18px clamp(18px, 1.6vw, 30px) 28px;
    gap: 12px;
}

body:not(.hc-mobile-mode).hc-module-department-permissions .hc-topbar-title h1,
body:not(.hc-mobile-mode).hc-module-work-assignment .hc-topbar-title h1 {
    margin-bottom: 4px;
    font-size: clamp(36px, 3vw, 50px);
}

.department-permission-module,
.work-command-module {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.department-permission-module[hidden],
.work-command-module[hidden] {
    display: none !important;
}

.smart-module-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 15px 17px;
    border: 1px solid #e8dcc8;
    border-radius: 18px;
    background:
        radial-gradient(circle at top right, rgba(174,124,65,.13), transparent 32%),
        rgba(255,255,255,.96);
    box-shadow: 0 9px 24px rgba(73,48,24,.06);
}

.smart-module-head > div {
    min-width: 0;
}

.smart-module-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #9a682e;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .8px;
    text-transform: uppercase;
}

.smart-module-kicker .material-icons {
    font-size: 16px;
}

.smart-module-head h2 {
    margin: 3px 0;
    color: #1f1a16;
    font-size: 24px;
    font-weight: 850;
    letter-spacing: -.025em;
}

.smart-module-head p {
    margin: 0;
    color: #75695d;
    font-size: 12px;
    line-height: 1.45;
}

.permission-current-scope {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    align-items: start;
    gap: 16px;
    padding: 13px 15px;
    border: 1px solid #e8dcc8;
    border-radius: 15px;
    background: rgba(255,253,249,.92);
}

.permission-current-scope-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 2px;
    color: #694a28;
    font-size: 12px;
    font-weight: 850;
}

.permission-current-scope-label .material-icons {
    color: #ae7c41;
    font-size: 19px;
}

.permission-current-scope .dept-permission-summary {
    gap: 9px;
}

.permission-current-scope .dept-permission-summary-head {
    align-items: center;
}

.permission-current-scope .dept-permission-summary-head strong {
    font-size: 13px;
}

.permission-current-scope .dept-permission-summary-head span {
    margin-top: 2px;
    font-size: 10.5px;
}

.permission-current-scope .dept-permission-chip-row {
    gap: 6px;
    max-height: none;
    overflow: visible;
}

.permission-current-scope .dept-permission-chip {
    padding: 5px 8px;
    font-size: 10.5px;
}

.permission-console {
    display: grid;
    grid-template-columns: clamp(300px, 24vw, 380px) minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    min-width: 0;
}

.permission-console.staff-only {
    grid-template-columns: minmax(0, 1fr);
}

.permission-roster-panel,
.permission-detail-panel {
    min-width: 0;
    padding: 13px;
    border: 1px solid #e6dac6;
    border-radius: 17px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 10px 28px rgba(74,47,21,.055);
}

.permission-roster-panel {
    position: sticky;
    top: 12px;
}

.permission-panel-head,
.work-task-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.permission-eyebrow {
    color: #9b6b35;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .7px;
    text-transform: uppercase;
}

.permission-panel-head h3,
.work-task-panel-head h3 {
    margin: 2px 0 0;
    color: #201a15;
    font-size: 16px;
    font-weight: 850;
}

.permission-search,
.work-command-search {
    display: flex;
    align-items: center;
    gap: 7px;
    border: 1px solid #e4d7c3;
    border-radius: 11px;
    background: #fff;
}

.permission-search {
    margin-bottom: 9px;
    padding: 0 9px;
}

.permission-search .material-icons,
.work-command-search .material-icons {
    flex: 0 0 auto;
    color: #a5743d;
    font-size: 18px;
}

.permission-search input,
.work-command-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    background: transparent;
    color: #28211b;
    font: inherit;
    font-size: 11.5px;
    outline: none;
}

.permission-search input {
    height: 36px;
}

.permission-roster-panel .dept-permission-user-list {
    max-height: calc(100vh - 350px);
    gap: 6px;
}

.permission-roster-panel .dept-permission-user-card {
    min-height: 58px;
    padding: 9px 10px;
    border-radius: 11px;
}

.permission-roster-panel .dept-permission-user-card.active {
    color: #fff;
    border-color: #8d642e;
    background: linear-gradient(135deg, #2f3b63, #263151);
    box-shadow: 0 8px 18px rgba(47,59,99,.16);
}

.permission-roster-panel .dept-permission-user-card.active strong,
.permission-roster-panel .dept-permission-user-card.active span {
    color: #fff;
}

.permission-roster-panel .dept-permission-user-meta {
    gap: 2px;
}

.permission-roster-panel .dept-permission-user-meta strong {
    font-size: 12.5px;
}

.permission-roster-panel .dept-permission-user-meta span {
    font-size: 10px;
    line-height: 1.35;
}

.permission-roster-panel .dept-permission-user-count {
    min-width: 36px;
    padding: 5px 7px;
    font-size: 10px;
}

.permission-detail-panel .dept-permission-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.permission-detail-panel .dept-permission-group {
    padding: 11px;
    border-radius: 13px;
}

.permission-detail-panel .dept-permission-group.is-summary {
    grid-column: 1 / -1;
}

.permission-detail-panel .dept-permission-scope-group {
    grid-column: 1 / -1;
}

.permission-detail-panel .dept-permission-group-head h4 {
    font-size: 13px;
}

.permission-detail-panel .dept-permission-group-head p {
    margin-top: 2px;
    font-size: 10px;
    line-height: 1.4;
}

.permission-detail-panel .dept-permission-chip-row {
    gap: 5px;
}

.permission-detail-panel .dept-permission-chip {
    padding: 5px 8px;
    font-size: 10px;
}

.permission-detail-panel .dept-permission-group-items {
    gap: 6px;
}

.permission-detail-panel .dept-permission-item {
    min-height: 54px;
    gap: 8px;
    padding: 8px 9px;
    border-radius: 10px;
}

.permission-detail-panel .dept-permission-item-copy {
    gap: 2px;
}

.permission-detail-panel .dept-permission-item-copy strong {
    font-size: 11.5px;
}

.permission-detail-panel .dept-permission-item-copy span {
    font-size: 9.5px;
    line-height: 1.35;
}

.permission-detail-panel .dept-permission-toggle,
.permission-detail-panel .dept-permission-state {
    min-width: 88px;
    padding: 7px 8px;
    border-radius: 9px;
    font-size: 10px;
}

.work-command-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.work-command-stat {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 2px 8px;
    min-height: 78px;
    padding: 11px 13px;
    overflow: hidden;
    border: 1px solid #e6dac6;
    border-radius: 15px;
    color: #32271f;
    background: rgba(255,255,255,.96);
    text-align: left;
    cursor: pointer;
    transition: .18s ease;
}

.work-command-stat:hover {
    border-color: #cca879;
    transform: translateY(-1px);
}

.work-command-stat.active {
    color: #fff;
    border-color: #2f3b63;
    background: linear-gradient(135deg, #2f3b63, #263151);
    box-shadow: 0 9px 20px rgba(47,59,99,.16);
}

.work-command-stat span {
    align-self: end;
    color: #75695d;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .5px;
    text-transform: uppercase;
}

.work-command-stat strong {
    align-self: start;
    font-size: 25px;
    line-height: 1;
}

.work-command-stat .material-icons {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
    color: #b6844d;
    font-size: 24px;
}

.work-command-stat.active span,
.work-command-stat.active .material-icons {
    color: rgba(255,255,255,.78);
}

.work-command-center {
    min-width: 0;
    padding: 12px;
    border: 1px solid #e6dac6;
    border-radius: 18px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 10px 28px rgba(74,47,21,.055);
}

.work-command-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 410px);
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.work-command-tabs {
    display: flex;
    gap: 5px;
    min-width: 0;
    overflow-x: auto;
}

.work-command-tabs button {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 5px;
    min-height: 36px;
    padding: 7px 10px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #6f6257;
    background: #f7f2ea;
    font: inherit;
    font-size: 10.5px;
    font-weight: 800;
    cursor: pointer;
}

.work-command-tabs button .material-icons {
    font-size: 16px;
}

.work-command-tabs button.active {
    color: #fff;
    border-color: #8e642d;
    background: #ae7c41;
}

.work-command-search {
    height: 38px;
    padding: 0 10px;
}

.work-task-panels {
    min-width: 0;
}

.work-task-panel {
    display: none;
}

.work-task-panel.active {
    display: block;
}

.work-task-panel[hidden] {
    display: none !important;
}

.work-task-panel-head {
    align-items: center;
    margin: 0 0 9px;
    padding: 9px 10px;
    border-radius: 12px;
    background: #fbf7f0;
}

.work-task-panel-head h3 {
    font-size: 14px;
}

.work-task-panel-head p {
    margin: 3px 0 0;
    color: #786e64;
    font-size: 10.5px;
}

.work-command-module .work-assignment-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.work-command-module .work-assignment-card {
    align-content: start;
    gap: 8px;
    padding: 11px;
    border-radius: 13px;
}

.work-command-module .work-assignment-card textarea {
    min-height: 58px;
}

.work-command-module .work-assignment-empty {
    grid-column: 1 / -1;
    padding: 28px 18px;
}

@media (max-width: 1380px) {
    .permission-detail-panel .dept-permission-groups,
    .work-command-module .work-assignment-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 980px) {
    .smart-module-head,
    .permission-panel-head,
    .work-task-panel-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .permission-current-scope,
    .permission-console,
    .work-command-toolbar {
        grid-template-columns: 1fr;
    }

    .permission-roster-panel {
        position: static;
    }

    .permission-roster-panel .dept-permission-user-list {
        max-height: 340px;
    }

    .work-command-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .smart-module-head {
        padding: 12px;
    }

    .smart-module-head .btn {
        width: 100%;
    }

    .permission-detail-panel .dept-permission-groups {
        grid-template-columns: 1fr;
    }

    .permission-detail-panel .dept-permission-item {
        align-items: stretch;
        flex-direction: column;
    }

    .permission-detail-panel .dept-permission-toggle,
    .permission-detail-panel .dept-permission-state {
        width: 100%;
    }

    .work-command-tabs {
        width: 100%;
    }
}

/* ===== Attendance reconciliation: full-width, compact working view ===== */
@media (min-width: 1025px) {
    body:not(.hc-mobile-mode).hc-module-my-attendance .hc-page {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 14px clamp(12px, 1vw, 20px) 22px;
        gap: 10px;
    }

    body:not(.hc-mobile-mode).hc-module-my-attendance .hc-main-topbar {
        gap: 12px;
    }

    body:not(.hc-mobile-mode).hc-module-my-attendance .hc-topbar-title small {
        margin-bottom: 4px;
    }

    body:not(.hc-mobile-mode).hc-module-my-attendance .hc-topbar-title h1 {
        margin-bottom: 3px;
        font-size: clamp(32px, 3vw, 44px);
    }

    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance,
    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance .module-workspace,
    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance .module-workspace-right {
        width: 100%;
        max-width: none;
        min-width: 0;
    }

    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance .module-workspace {
        gap: 10px;
    }

    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .attendance-reconciliation-card {
        margin: 0;
        padding: 12px;
        border-radius: 16px;
    }

    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .attendance-reconciliation-head {
        align-items: center;
        gap: 8px 12px;
        margin-bottom: 9px;
    }

    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .attendance-reconciliation-head h3 {
        margin-bottom: 2px;
        font-size: 25px;
        line-height: 1.05;
    }

    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .attendance-reconciliation-head p {
        line-height: 1.4;
    }

    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .attendance-reconciliation-meta {
        gap: 5px;
    }

    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .attendance-reconciliation-meta span {
        padding: 5px 8px;
        font-size: 11px;
    }

    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .attendance-reconciliation-print-actions {
        gap: 6px;
    }

    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .attendance-reconciliation-print-actions .btn {
        min-height: 34px;
        padding: 6px 10px;
    }

    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .attendance-reconciliation-sheet {
        border-radius: 14px;
    }

    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .attendance-sheet-header {
        padding: 12px 14px 9px;
    }

    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .attendance-sheet-header h4 {
        font-size: 26px;
        line-height: 1.05;
    }

    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .attendance-sheet-header p {
        margin-top: 4px;
    }

    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .attendance-review-card-list,
    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .attendance-review-card-list.hc-review-mode {
        gap: 6px;
        padding: 8px;
    }

    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .attendance-review-day-card {
        grid-template-columns: 112px minmax(0, 1fr);
        min-height: 88px;
    }

    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .attendance-review-day-card.has-review-actions {
        grid-template-columns: 112px minmax(0, 1fr) 120px;
    }

    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .attendance-review-day-card.hc-review-card,
    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .attendance-review-day-card.hc-review-card.has-review-actions {
        grid-template-columns: 118px minmax(0, 1fr) 126px;
    }

    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .attendance-review-day-card.hc-review-card:not(.has-review-actions) {
        grid-template-columns: 118px minmax(0, 1fr);
    }

    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .attendance-review-day-main {
        gap: 3px;
        padding: 6px;
    }

    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .attendance-review-day-main strong {
        font-size: 23px;
    }

    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .attendance-review-day-main b {
        font-size: 13px;
    }

    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .attendance-review-credit {
        min-width: 62px;
        padding: 3px 7px;
        font-size: 11px;
    }

    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .attendance-review-day-card.hc-review-card .attendance-review-day-top {
        grid-template-columns: 76px 76px 72px minmax(150px, 1fr);
    }

    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .attendance-review-cell,
    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .attendance-review-day-card.hc-review-card .attendance-review-cell {
        padding: 5px 6px;
    }

    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .attendance-review-label {
        margin-bottom: 2px;
        font-size: 9px;
    }

    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .attendance-review-value,
    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .attendance-review-day-card.hc-review-card .attendance-review-value {
        font-size: 13px;
        line-height: 1.25;
    }

    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .attendance-review-explanation,
    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .attendance-review-day-card.hc-review-card .attendance-review-explanation {
        padding: 6px 8px;
    }

    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .attendance-review-explanation textarea {
        min-height: 38px;
        font-size: 13px;
        line-height: 1.3;
    }

    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .attendance-work-adjustment {
        margin-top: 5px;
        padding: 6px;
        gap: 5px 10px;
        border-radius: 10px;
    }

    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .attendance-work-adjustment-row {
        gap: 6px;
    }

    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .attendance-work-adjustment select,
    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .attendance-work-adjustment .attendance-locked-value,
    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .attendance-work-adjustment [data-reconciliation-meal-reason],
    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .attendance-work-adjustment [data-hc-final-meal-reason] {
        min-height: 32px;
        height: 32px;
        padding: 5px 8px;
        font-size: 12px;
    }

    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .attendance-work-item-title {
        gap: 5px;
        font-size: 12px;
        line-height: 1.25;
    }

    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .attendance-inline-decision {
        gap: 4px;
        margin-left: 4px;
    }

    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .attendance-inline-decision-btn {
        padding: 3px 7px;
        font-size: 11px;
    }

    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .attendance-review-day-card.hc-review-card .attendance-review-actions {
        grid-template-rows: minmax(52px, 1fr) minmax(52px, 1fr);
    }

    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .attendance-review-day-card.hc-review-card .attendance-review-action {
        padding: 6px;
        font-size: 11px;
    }

    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .attendance-review-day-card.collapsed-decision {
        gap: 8px;
        padding: 7px 10px;
    }
}

@media (min-width: 1281px) {
    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .module-workspace-right {
        grid-template-columns: minmax(230px, 270px) minmax(0, 1fr);
        gap: 10px;
    }

    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .attendance-focus-layout {
        gap: 10px;
        top: 12px;
    }

    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .calendar-stage {
        padding: 9px;
        border-radius: 14px;
    }

    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .cal-grid {
        gap: 3px;
    }

    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .cal-day {
        min-height: 34px;
        gap: 2px;
        padding: 3px 2px;
        border-radius: 7px;
    }

    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .stats-stage {
        padding: 8px;
        border-radius: 14px;
    }

    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus #calStatsContent {
        gap: 5px !important;
        font-size: 11px !important;
    }

    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus #calStatsContent span {
        padding: 6px;
        border-radius: 8px;
    }
}

@media (min-width: 1500px) {
    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .attendance-work-adjustment {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .attendance-meal-reason-row,
    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .attendance-work-dispute-alert,
    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .attendance-work-final,
    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .attendance-work-status,
    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .attendance-work-appeal-ticket,
    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .attendance-work-appeal-cta,
    body:not(.hc-mobile-mode).hc-module-my-attendance #moduleMyAttendance.reconciliation-focus .attendance-work-adjustment-row:has(.btn) {
        grid-column: 1 / -1;
    }
}

/* ===== Leave balance & compensatory leave tracking ===== */
.leave-balance-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
}

.leave-balance-card {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 13px;
    border: 1px solid #E5D7C2;
    border-radius: 14px;
    background: rgba(255,255,255,0.92);
    box-shadow: 0 8px 24px rgba(74,52,28,0.05);
}

.leave-balance-card > .material-icons {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    flex: 0 0 36px;
    border-radius: 10px;
    background: #F5EDD8;
    color: #8A5A1F;
}

.leave-balance-card.annual > .material-icons { background: #EAF5EF; color: #26734D; }
.leave-balance-card.compensatory > .material-icons { background: #EAF1FB; color: #315D9B; }
.leave-balance-card.provisional-compensatory {
    border-color: #E8C77B;
    background: #FFF9E8;
}
.leave-balance-card.provisional-compensatory > .material-icons {
    background: #FFF0BE;
    color: #A46700;
}
.leave-balance-card.provisional-compensatory span { color: #8A5A00; }
.leave-balance-card.error { color: #B42318; border-color: #F1C5BF; }
.leave-balance-card div { min-width: 0; }
.leave-balance-card span,
.leave-balance-card strong,
.leave-balance-card small { display: block; }
.leave-balance-card span { color: #776B5E; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .35px; }
.leave-balance-card strong { margin-top: 2px; color: #1D1A16; font-size: 16px; line-height: 1.25; }
.leave-balance-card small { margin-top: 2px; color: #776B5E; font-size: 11px; line-height: 1.35; }

#moduleMyAttendance .leave-balance-panel {
    padding: 18px 20px;
}

#moduleMyAttendance .leave-balance-panel-title {
    margin-bottom: 12px;
    font-size: 24px;
}

#moduleMyAttendance .leave-balance-strip--sidebar {
    grid-template-columns: 1fr;
    gap: 10px;
}

#moduleMyAttendance .leave-balance-focus-content {
    display: none;
}

#moduleMyAttendance.reconciliation-focus .monthly-stats-content {
    display: none;
}

#moduleMyAttendance.reconciliation-focus .leave-balance-focus-content {
    display: block;
}

#moduleMyAttendance .leave-balance-focus-title {
    margin-bottom: 9px;
    color: var(--gold);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

#moduleMyAttendance .leave-balance-strip--focus {
    grid-template-columns: 1fr;
    gap: 8px;
}

#moduleMyAttendance .leave-balance-strip--sidebar .leave-balance-card,
#moduleMyAttendance .leave-balance-strip--focus .leave-balance-card {
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: 16px;
    background: #FCF8F1;
    box-shadow: none;
}

#moduleMyAttendance .leave-balance-strip--sidebar .leave-balance-card > .material-icons,
#moduleMyAttendance .leave-balance-strip--focus .leave-balance-card > .material-icons {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
    border-radius: 9px;
    font-size: 18px;
}

#moduleMyAttendance .leave-balance-strip--sidebar .leave-balance-card strong,
#moduleMyAttendance .leave-balance-strip--focus .leave-balance-card strong {
    font-size: 15px;
}

.attendance-compensatory-leave-hint {
    grid-column: 1 / -1;
    display: flex;
    align-items: flex-start;
    gap: 7px;
    padding: 7px 9px;
    border: 1px solid #C9D9EE;
    border-radius: 9px;
    background: #F3F7FC;
    color: #315D9B;
    font-size: 11px;
    line-height: 1.4;
}
.attendance-compensatory-leave-hint .material-icons { font-size: 17px; }

.attendance-work-adjustment select.attendance-provisional-basis-select {
    color: #B42318;
    border-color: #E25555;
    background: #FFF0F0;
    font-weight: 800;
}

.attendance-provisional-compensatory-note {
    grid-column: 1 / -1;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 10px 12px;
    border: 1px solid #E25555;
    border-radius: 11px;
    background: #FFF0F0;
    color: #9E1C1C;
    font-size: 12px;
    line-height: 1.45;
}

.attendance-provisional-compensatory-note .material-icons {
    flex: 0 0 auto;
    color: #D92D20;
    font-size: 18px;
}

.attendance-provisional-compensatory-note strong { color: #B42318; }
.attendance-reconciliation-meta .leave-balance-meta { background: #F4FAF6; border-color: #CFE4D6; }
.attendance-reconciliation-meta .leave-balance-meta .material-icons { color: #26734D; font-size: 16px; }

.leave-tracking-panel { display: grid; gap: 10px; }
.leave-tracking-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 15px !important;
}
.leave-tracking-toolbar p { margin: 4px 0 0; color: #746B62; font-size: 12px; line-height: 1.45; }
.leave-tracking-filterbar { justify-content: flex-end; }
.leave-tracking-filterbar .leave-tracking-actions { width: 100%; justify-content: flex-end; }
.leave-tracking-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.leave-tracking-mode-switch {
    display: inline-flex;
    padding: 3px;
    border: 1px solid #DDCDB7;
    border-radius: 10px;
    background: #F7F1E7;
}
.leave-tracking-mode-switch button {
    min-height: 32px;
    padding: 6px 13px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #756757;
    font: 800 11px 'Plus Jakarta Sans', sans-serif;
    cursor: pointer;
}
.leave-tracking-mode-switch button.active {
    background: #211D18;
    color: #fff;
    box-shadow: 0 5px 12px rgba(33,29,24,.14);
}
.leave-tracking-year-control,
.leave-tracking-branch-control {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #776B5E;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}
.leave-tracking-year-control select,
.leave-tracking-branch-control select {
    min-height: 38px;
    padding: 7px 28px 7px 10px;
    border: 1px solid #E1D4C2;
    border-radius: 10px;
    background: #fff;
    color: #2F2923;
    font: 800 12px 'Plus Jakarta Sans', sans-serif;
}
.leave-tracking-branch-control select { min-width: 210px; }
.leave-tracking-branch-control select:disabled {
    color: #51483F;
    background: #F5F1EB;
    cursor: not-allowed;
    opacity: 1;
}
.leave-tracking-authoritative-control {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 7px 11px;
    border: 1px solid #E1D4C2;
    border-radius: 10px;
    background: #FFF9EF;
    color: #5C431E;
    font: 800 12px 'Plus Jakarta Sans', sans-serif;
    white-space: nowrap;
}
.leave-tracking-actions .leave-tracking-authoritative-control input {
    width: 16px;
    min-height: 16px;
    margin: 0;
    padding: 0;
    accent-color: #A56A1F;
}
.leave-tracking-actions input {
    width: min(360px, 34vw);
    min-height: 38px;
    padding: 8px 11px;
    border: 1px solid #E1D4C2;
    border-radius: 10px;
    background: #fff;
    font: inherit;
    font-size: 12px;
}
.leave-tracking-table-card {
    min-height: 0;
    padding: 0 !important;
    overflow: hidden;
}
.leave-tracking-table-wrap {
    position: relative;
    width: 100%;
    height: calc(100vh - 245px);
    min-height: 380px;
    max-height: 720px;
    overflow-x: scroll;
    overflow-y: scroll;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    touch-action: pan-x pan-y;
    -webkit-overflow-scrolling: touch;
    background: #FFF;
    cursor: grab;
    scrollbar-width: thin;
    scrollbar-color: #9B7445 #F1E8DB;
}
.leave-tracking-table-wrap.leave-free-pan-dragging {
    cursor: grabbing;
    user-select: none;
}
.leave-tracking-table-wrap::-webkit-scrollbar { width: 12px; height: 12px; }
.leave-tracking-table-wrap::-webkit-scrollbar-track { background: #F1E8DB; }
.leave-tracking-table-wrap::-webkit-scrollbar-thumb {
    border: 2px solid #F1E8DB;
    border-radius: 999px;
    background: #9B7445;
}
.leave-tracking-table-wrap::-webkit-scrollbar-thumb:hover { background: #76522E; }
.leave-tracking-table-wrap::-webkit-scrollbar-corner { background: #F1E8DB; }
.leave-tracking-table { width: 100%; min-width: 1080px; border-collapse: collapse; background: #fff; font-size: 12px; }
.leave-tracking-table th { position: sticky; top: 0; z-index: 1; padding: 9px 10px; background: #211D18; color: #fff; text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .25px; }
.leave-tracking-table td { padding: 9px 10px; border-bottom: 1px solid #ECE3D7; color: #3C352D; vertical-align: middle; }
.leave-tracking-table tbody tr:hover { background: #FCF8F2; }
.leave-tracking-table td strong,
.leave-tracking-table td small { display: block; }
.leave-tracking-table td small { margin-top: 3px; color: #81776D; font-size: 10px; }
.leave-tracking-table .leave-number { font-size: 14px; font-weight: 900; white-space: nowrap; }
.leave-tracking-table .leave-number.annual { color: #26734D; }
.leave-tracking-table .leave-number.compensatory { color: #315D9B; }
.leave-tracking-table .leave-deficit { color: #B33A34; font-weight: 800; }
.leave-tracking-detail-table {
    width: max-content;
    min-width: 4680px;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 10px;
}
.leave-tracking-detail-table th {
    box-sizing: border-box;
    min-width: 70px;
    padding: 7px 6px;
    border-right: 1px solid rgba(255,255,255,.14);
    border-bottom: 1px solid rgba(255,255,255,.18);
    text-align: center;
    white-space: normal;
}
.leave-tracking-detail-table thead th {
    position: sticky;
    z-index: 6;
}
.leave-tracking-detail-table thead tr:first-child th { top: 0; height: 39px; }
.leave-tracking-detail-table thead tr:nth-child(2) th { top: 39px; height: 35px; background: #3A3128; }
.leave-tracking-detail-table .leave-month-group {
    min-width: 292px;
    color: #F1C98D;
    font-size: 11px;
    letter-spacing: .4px;
}
.leave-tracking-detail-table td {
    box-sizing: border-box;
    min-width: 70px;
    height: 52px;
    padding: 7px 6px;
    border-right: 1px solid #ECE3D7;
    text-align: center;
}
.leave-tracking-detail-table .leave-month-dates { width: 100px; min-width: 100px; max-width: 100px; line-height: 1.35; }
.leave-tracking-detail-table .leave-month-value { width: 64px; min-width: 64px; max-width: 64px; font-weight: 800; }
.leave-tracking-detail-table .leave-month-value.earned { border-left: 2px solid #C9AD82; color: #26734D; }
.leave-tracking-detail-table.compensatory-mode .leave-month-value.earned { color: #315D9B; }
.leave-tracking-detail-table .leave-month-value.used { color: #A6532D; }
.leave-tracking-detail-table .leave-month-value.balance { background: #FAF6EE; color: #2F2923; }
.leave-tracking-detail-table .leave-month-value small { display: inline; margin: 0 0 0 2px; font-size: 9px; }
.leave-tracking-detail-table .leave-detail-empty { color: #B6ACA0; font-weight: 500; }
.leave-tracking-detail-table .leave-use-dates { color: #635A51; cursor: help; }
.leave-tracking-detail-table .leave-total-cell { min-width: 84px; font-size: 12px; font-weight: 900; background: #F5EFE4; }
.leave-tracking-detail-table .leave-total-cell.used { color: #A6532D; }
.leave-tracking-detail-table .leave-total-cell.current { min-width: 104px; color: #26734D; }
.leave-tracking-detail-table.compensatory-mode .leave-total-cell.current { color: #315D9B; }
.leave-tracking-detail-table .leave-sticky-col {
    position: sticky;
    z-index: 4;
    background: #FFF;
    box-shadow: 1px 0 0 #E6D9C8;
}
.leave-tracking-detail-table th.leave-sticky-col { z-index: 10; background: #211D18; }
.leave-tracking-detail-table .leave-col-index { left: 0; width: 46px; min-width: 46px; max-width: 46px; }
.leave-tracking-detail-table .leave-col-person {
    left: 46px;
    width: 226px;
    min-width: 226px;
    max-width: 226px;
    text-align: left;
    box-shadow: 5px 0 8px rgba(65, 49, 31, .12);
}
.leave-tracking-detail-table .leave-col-join { width: 112px; min-width: 112px; max-width: 112px; }
.leave-tracking-detail-table .leave-col-opening { width: 108px; min-width: 108px; max-width: 108px; }
.leave-tracking-detail-table tbody tr:hover .leave-sticky-col { background: #FCF8F2; }
.leave-tracking-detail-table .leave-col-person strong { font-size: 11px; }
.leave-tracking-detail-table .leave-col-person small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leave-person-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.leave-person-line strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leave-row-edit-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    min-height: 25px;
    padding: 4px 7px;
    border: 1px solid #D8C29F;
    border-radius: 7px;
    background: #FFF9EE;
    color: #825A2A;
    font: 800 9px 'Plus Jakarta Sans', sans-serif;
    cursor: pointer;
}
.leave-row-edit-btn:hover { background: #B9823F; border-color: #B9823F; color: #fff; }
.leave-row-edit-btn .material-icons { font-size: 13px; }
.leave-inline-edit-row,
.leave-inline-edit-row .leave-sticky-col { background: #FFFDF7 !important; }
.leave-inline-edit-row td { height: 66px; }
.leave-inline-editable { padding: 5px !important; background: #FFF4D8 !important; }
.leave-inline-input {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border: 1px solid #D6B77F;
    border-radius: 6px;
    background: #fff;
    color: #2C2721;
    font: 800 10px 'Plus Jakarta Sans', sans-serif;
    text-align: center;
}
.leave-inline-input:focus { outline: 2px solid rgba(185,130,63,.25); border-color: #9A6528; }
.leave-inline-number { min-height: 35px; padding: 6px 3px; }
.leave-inline-days { min-height: 35px; padding: 6px 4px; font-weight: 700; }
.leave-inline-formula { position: relative; background: #EDF5FF !important; color: #294E79 !important; }
.leave-inline-formula::before {
    content: 'ƒx';
    position: absolute;
    top: 3px;
    left: 4px;
    color: #6283A9;
    font-size: 8px;
    font-weight: 900;
}
.leave-inline-formula > small { color: #6283A9 !important; font-size: 8px !important; }
.leave-inline-actions { display: inline-flex; align-items: center; gap: 4px; }
.leave-row-edit-btn.save { border-color: #26734D; background: #26734D; color: #fff; }
.leave-row-edit-btn.save:hover { border-color: #1D5B3C; background: #1D5B3C; }
.leave-row-edit-btn.cancel { border-color: #D9CABB; background: #fff; color: #6A5D50; }
.leave-row-edit-btn:disabled { cursor: not-allowed; opacity: .5; }
.leave-inline-invalid .leave-inline-formula { background: #FFF0F0 !important; color: #B33A34 !important; }
.leave-month-edit-modal { max-width: 680px; }
.leave-month-edit-meta { margin-top: 4px; color: #776D62; font-size: 11px; }
.leave-month-edit-notice {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-bottom: 16px;
    padding: 11px 12px;
    border: 1px solid #D9E8DD;
    border-radius: 12px;
    background: #F3FAF5;
    color: #315E42;
    font-size: 11px;
    line-height: 1.5;
}
.leave-month-edit-notice .material-icons { flex: 0 0 auto; font-size: 18px; }
.leave-month-edit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.leave-month-edit-field { display: grid; gap: 6px; }
.leave-month-edit-field.full { grid-column: 1 / -1; }
.leave-month-edit-field > span { color: #6F6255; font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .25px; }
.leave-month-edit-field input,
.leave-month-edit-field select,
.leave-month-edit-field textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #DED1C0;
    border-radius: 10px;
    background: #fff;
    color: #2C2721;
    font: 700 12px 'Plus Jakarta Sans', sans-serif;
}
.leave-month-edit-field input,
.leave-month-edit-field select { min-height: 42px; padding: 9px 11px; }
.leave-month-edit-field textarea { padding: 10px 11px; resize: vertical; }
.leave-month-edit-field input:focus,
.leave-month-edit-field select:focus,
.leave-month-edit-field textarea:focus { outline: 2px solid rgba(185,130,63,.2); border-color: #B9823F; }
.leave-month-edit-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 18px; }
@media (max-height: 720px) {
    .leave-tracking-table-wrap {
        height: calc(100vh - 205px);
        min-height: 320px;
    }
}
@media (max-width: 640px) {
    .leave-month-edit-grid { grid-template-columns: 1fr; }
    .leave-month-edit-field.full { grid-column: auto; }
}
.leave-import-preview { display: grid; gap: 12px; border: 1px solid #DFCDAF; background: #FFFCF7; }
.leave-import-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.leave-import-preview-head strong,
.leave-import-preview-head small { display: block; }
.leave-import-preview-head strong { color: #231E18; font-size: 15px; }
.leave-import-preview-head small { margin-top: 4px; color: #786D61; font-size: 11px; }
.leave-import-stat-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.leave-import-stat-grid > div { min-width: 0; padding: 10px 12px; border: 1px solid #E6D9C8; border-radius: 12px; background: #FFF; }
.leave-import-stat-grid span,
.leave-import-stat-grid strong { display: block; }
.leave-import-stat-grid span { color: #7A7065; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.leave-import-stat-grid strong { margin-top: 5px; color: #2D2822; font-size: 16px; }
.leave-import-stat-grid .ok strong { color: #26734D; }
.leave-import-stat-grid .warn strong { color: #B36B0C; }
.leave-import-review-title { color: #4B4035; font-size: 12px; font-weight: 900; text-transform: uppercase; }
.leave-import-review-list { max-height: 260px; overflow: auto; border: 1px solid #E8DDCF; border-radius: 12px; background: #FFF; }
.leave-import-review-row { display: grid; grid-template-columns: minmax(190px, 1.4fr) minmax(110px, .6fr) minmax(120px, .7fr) minmax(240px, 1.6fr); gap: 10px; align-items: center; padding: 9px 11px; border-bottom: 1px solid #F0E8DE; font-size: 11px; }
.leave-import-review-row:last-child { border-bottom: 0; }
.leave-import-review-row > div > strong,
.leave-import-review-row > div > small,
.leave-import-review-row > div > span { display: block; }
.leave-import-review-row > div > small,
.leave-import-review-row > div > span { margin-top: 2px; color: #81766A; font-size: 10px; }
.leave-import-review-row.unmatched,
.leave-import-review-row.ambiguous { background: #FFF8EA; }
.leave-import-review-row.skipped_terminated { background: #F6F4F1; opacity: .78; }
.leave-import-note { color: #9B641C; line-height: 1.35; }
.leave-import-clean { display: flex; align-items: center; gap: 7px; padding: 10px 12px; border-radius: 12px; background: #EAF6EF; color: #26734D; font-size: 12px; font-weight: 800; }
.leave-import-clean .material-icons { font-size: 18px; }
.leave-import-errors { padding: 10px 12px; border: 1px solid #F2C3C0; border-radius: 12px; background: #FFF0EF; color: #A52C27; font-size: 11px; line-height: 1.45; }
.leave-import-preview-actions { display: flex; justify-content: flex-end; gap: 8px; }

@media (max-width: 1100px) {
    .leave-balance-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .leave-tracking-toolbar { align-items: stretch; flex-direction: column; }
    .leave-tracking-actions input { width: 100%; }
    .leave-import-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .leave-import-review-row { grid-template-columns: 1fr 1fr; }
    .leave-import-note { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
    .leave-balance-strip { grid-template-columns: 1fr; }
    .leave-tracking-actions { align-items: stretch; flex-direction: column; }
    .leave-tracking-actions .btn { width: 100%; }
    .leave-import-stat-grid { grid-template-columns: 1fr; }
    .leave-import-review-row { grid-template-columns: 1fr; }
    .leave-import-preview-head,
    .leave-import-preview-actions { align-items: stretch; flex-direction: column; }
    .leave-import-preview-actions .btn { width: 100%; }
}

/* Bảng tổng hợp hồ sơ nhân sự: ưu tiên mật độ dữ liệu theo chiều ngang. */
#hrDocMatrixModal .hr-doc-matrix-table {
    font-size: 10.5px;
}
#hrDocMatrixModal .hr-doc-matrix-table th,
#hrDocMatrixModal .hr-doc-matrix-table td {
    padding: 5px 4px;
}
#hrDocMatrixModal .hr-doc-matrix-table th {
    font-size: 9.5px;
    letter-spacing: .12px;
    line-height: 1.2;
}
#hrDocMatrixModal .hr-doc-matrix-table .hr-doc-matrix-col-stt {
    width: 40px;
    min-width: 40px;
    max-width: 40px;
}
#hrDocMatrixModal .hr-doc-matrix-table .hr-doc-matrix-col-name {
    width: 150px;
    min-width: 150px;
    max-width: 150px;
}
#hrDocMatrixModal .hr-doc-matrix-table .hr-doc-matrix-col-dept {
    width: 96px;
    min-width: 96px;
    max-width: 96px;
}
#hrDocMatrixModal .hr-doc-matrix-table .hr-doc-matrix-col-position {
    width: 122px;
    min-width: 122px;
    max-width: 122px;
}
#hrDocMatrixModal .hr-doc-matrix-table .hr-doc-matrix-col-gender {
    width: 54px;
    min-width: 54px;
    max-width: 54px;
}
#hrDocMatrixModal .hr-doc-matrix-table .hr-doc-matrix-col-status {
    width: 90px;
    min-width: 90px;
    max-width: 90px;
}
#hrDocMatrixModal .hr-doc-matrix-table .hr-doc-matrix-col-join,
#hrDocMatrixModal .hr-doc-matrix-table .hr-doc-matrix-col-resign {
    width: 82px;
    min-width: 82px;
    max-width: 82px;
}
#hrDocMatrixModal .hr-doc-matrix-table .hr-doc-matrix-current-contract-cell {
    width: 210px;
    min-width: 210px;
    max-width: 210px;
}
#hrDocMatrixModal .hr-doc-matrix-table .hr-doc-matrix-current-insurance-cell {
    width: 200px;
    min-width: 200px;
    max-width: 200px;
}
#hrDocMatrixModal .hr-doc-matrix-table .hr-doc-matrix-dependent-cell {
    width: 116px;
    min-width: 116px;
    max-width: 116px;
}
#hrDocMatrixModal .hr-doc-matrix-table .hr-doc-matrix-doc-head,
#hrDocMatrixModal .hr-doc-matrix-table .hr-doc-matrix-doc-cell {
    width: 110px;
    min-width: 110px;
    max-width: 110px;
}
#hrDocMatrixModal .hr-doc-matrix-table .hr-doc-matrix-doc-head.doc-submit-short,
#hrDocMatrixModal .hr-doc-matrix-table .hr-doc-matrix-doc-cell.doc-submit-short {
    width: 42px;
    min-width: 42px;
    max-width: 42px;
}
#hrDocMatrixModal .hr-doc-matrix-table .hr-doc-matrix-doc-head.doc-submit-medium,
#hrDocMatrixModal .hr-doc-matrix-table .hr-doc-matrix-doc-cell.doc-submit-medium {
    width: 52px;
    min-width: 52px;
    max-width: 52px;
}
#hrDocMatrixModal .hr-doc-matrix-table .hr-doc-matrix-doc-head.doc-submit-wide,
#hrDocMatrixModal .hr-doc-matrix-table .hr-doc-matrix-doc-cell.doc-submit-wide {
    width: 64px;
    min-width: 64px;
    max-width: 64px;
}
#hrDocMatrixModal .hr-doc-matrix-table .hr-doc-matrix-doc-head.doc-submit-xwide,
#hrDocMatrixModal .hr-doc-matrix-table .hr-doc-matrix-doc-cell.doc-submit-xwide {
    width: 78px;
    min-width: 78px;
    max-width: 78px;
}
#hrDocMatrixModal .hr-doc-matrix-table .hr-doc-matrix-doc-head.doc-number,
#hrDocMatrixModal .hr-doc-matrix-table .hr-doc-matrix-doc-cell.doc-number {
    width: 118px;
    min-width: 118px;
    max-width: 118px;
}
#hrDocMatrixModal .hr-doc-matrix-table .hr-doc-matrix-doc-head.doc-number-wide,
#hrDocMatrixModal .hr-doc-matrix-table .hr-doc-matrix-doc-cell.doc-number-wide {
    width: 132px;
    min-width: 132px;
    max-width: 132px;
}
#hrDocMatrixModal .hr-doc-matrix-table .hr-doc-matrix-total-cell,
#hrDocMatrixModal .hr-doc-matrix-table .hr-doc-matrix-progress-cell {
    width: 60px;
    min-width: 60px;
    max-width: 60px;
}
#hrDocMatrixModal .hr-doc-matrix-table .hr-doc-matrix-action-cell {
    width: 72px;
    min-width: 72px;
    max-width: 72px;
}
#hrDocMatrixModal .hr-doc-matrix-table .sticky-left-2 { left: 40px; }
#hrDocMatrixModal .hr-doc-matrix-table .sticky-left-3 { left: 190px; }
#hrDocMatrixModal .hr-doc-matrix-table .sticky-left-4 { left: 286px; }
#hrDocMatrixModal .hr-doc-matrix-col-name,
#hrDocMatrixModal .hr-doc-matrix-col-dept,
#hrDocMatrixModal .hr-doc-matrix-col-position {
    overflow: hidden;
    text-overflow: ellipsis;
}
#hrDocMatrixModal .hr-doc-matrix-person-btn,
#hrDocMatrixModal .hr-doc-matrix-subtext {
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#hrDocMatrixModal .hr-doc-matrix-subtext {
    margin-top: 2px;
    font-size: 9.5px;
}
#hrDocMatrixModal .hr-doc-matrix-status-badge {
    padding: 4px 7px;
    font-size: 9.5px;
}
#hrDocMatrixModal .hr-doc-matrix-current-cell {
    padding: 6px !important;
    font-size: 10px;
    line-height: 1.28;
}
#hrDocMatrixModal .hr-doc-matrix-fit-line.fit-long { font-size: 9.5px; }
#hrDocMatrixModal .hr-doc-matrix-fit-line.fit-xlong { font-size: 9px; }
#hrDocMatrixModal .hr-doc-matrix-doc-cell.has-detail {
    padding: 5px 4px;
}
#hrDocMatrixModal .hr-doc-matrix-doc-detail {
    gap: 2px;
    font-size: 9.5px;
    line-height: 1.2;
}
#hrDocMatrixModal .hr-doc-matrix-action-btn {
    gap: 3px;
    padding: 6px 8px;
    font-size: 9.5px;
}
#hrDocMatrixModal .hr-doc-matrix-action-btn .material-icons { font-size: 13px; }
#hrDocMatrixModal .hr-doc-matrix-group-row td {
    padding: 7px 8px;
    font-size: 10.5px;
}

/* Thông tin hợp đồng trong ma trận chỉ mở rộng khi người dùng cần xem. */
#hrDocMatrixModal .hr-doc-matrix-current-cell:has(.hr-doc-matrix-disclosure),
#hrDocMatrixModal .hr-doc-matrix-doc-cell:has(.hr-doc-matrix-disclosure) {
    vertical-align: middle;
}
#hrDocMatrixModal .hr-doc-matrix-disclosure,
#hrDocMatrixModal .hr-doc-matrix-disclosure-static {
    display: block;
    width: 100%;
    min-width: 0;
}
#hrDocMatrixModal .hr-doc-matrix-disclosure > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    min-height: 22px;
    list-style: none;
    cursor: pointer;
    user-select: none;
}
#hrDocMatrixModal .hr-doc-matrix-disclosure > summary::-webkit-details-marker {
    display: none;
}
#hrDocMatrixModal .hr-doc-matrix-current-cell .hr-doc-matrix-disclosure-text,
#hrDocMatrixModal .hr-doc-matrix-current-cell .hr-doc-matrix-disclosure-static .hr-doc-matrix-disclosure-text {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#hrDocMatrixModal .hr-doc-matrix-disclosure-toggle {
    display: inline-flex !important;
    flex: 0 0 auto;
    align-items: center;
    gap: 2px;
    width: auto !important;
    margin: 0 !important;
    color: #825A2A;
    font-size: 9px;
    font-weight: 800;
    white-space: nowrap;
}
#hrDocMatrixModal .hr-doc-matrix-disclosure-toggle .material-icons {
    font-size: 14px;
    transition: transform .16s ease;
}
#hrDocMatrixModal .hr-doc-matrix-disclosure-toggle .when-open { display: none; }
#hrDocMatrixModal .hr-doc-matrix-disclosure[open] .hr-doc-matrix-disclosure-toggle .when-closed { display: none; }
#hrDocMatrixModal .hr-doc-matrix-disclosure[open] .hr-doc-matrix-disclosure-toggle .when-open { display: inline; }
#hrDocMatrixModal .hr-doc-matrix-disclosure[open] .hr-doc-matrix-disclosure-toggle .material-icons {
    transform: rotate(180deg);
}
#hrDocMatrixModal .hr-doc-matrix-disclosure-body {
    display: grid;
    gap: 2px;
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px dashed rgba(31, 107, 51, .24);
}
#hrDocMatrixModal .hr-doc-matrix-disclosure-body > span {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#hrDocMatrixModal .hr-doc-matrix-doc-disclosure > summary {
    min-height: 20px;
}
#hrDocMatrixModal .hr-doc-matrix-doc-disclosure .hr-doc-matrix-doc-state {
    flex: 1 1 auto;
    min-width: 0;
}

#hrDocMatrixModal .hr-doc-matrix-doc-cell.has-detail {
    text-align: center;
}
#hrDocMatrixModal .hr-doc-matrix-doc-detail {
    justify-items: center;
    text-align: center;
}
#hrDocMatrixModal .hr-doc-matrix-doc-detail > .hr-doc-matrix-doc-state {
    justify-content: center;
}
#hrDocMatrixModal .hr-doc-matrix-doc-disclosure > summary {
    position: relative;
    justify-content: center;
    padding: 0 16px;
}
#hrDocMatrixModal .hr-doc-matrix-doc-disclosure .hr-doc-matrix-doc-state {
    flex: 0 1 auto;
    justify-content: center;
    width: auto;
}
#hrDocMatrixModal .hr-doc-matrix-doc-disclosure .hr-doc-matrix-disclosure-toggle {
    position: absolute;
    right: 0;
    width: 14px !important;
}
#hrDocMatrixModal .hr-doc-matrix-doc-disclosure .hr-doc-matrix-disclosure-toggle .when-closed,
#hrDocMatrixModal .hr-doc-matrix-doc-disclosure .hr-doc-matrix-disclosure-toggle .when-open {
    display: none !important;
}
#hrDocMatrixModal .hr-doc-matrix-doc-disclosure .hr-doc-matrix-disclosure-body {
    width: 100%;
    text-align: left;
}

/* Không hiển thị các khối tổng hợp tiến độ hồ sơ; trạng thái từng hồ sơ vẫn giữ nguyên. */
.personnel-doc-progress,
.personnel-progress-summary-chip,
#hrDocDetailProgress,
#hrDocsStats,
#hrDocsBranchBar .branch-count,
.hr-doc-list-progress,
.hr-doc-list-progress-note,
.hr-doc-form-progress-summary {
    display: none !important;
}

/* Tạo danh sách nhanh từ Bảng Thông Tin Nhân Sự. */
#hrDocMatrixModal .hr-doc-matrix-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

#hrDocMatrixModal .personnel-custom-list-launch {
    min-height: 38px;
    padding: 8px 13px;
    border: 1px solid #C99A5C;
    border-radius: 11px;
    background: linear-gradient(135deg, #B67C36, #956126);
    color: #fff;
    box-shadow: 0 6px 16px rgba(126, 82, 31, .18);
    font-size: 12.5px;
    font-weight: 800;
    white-space: nowrap;
}

#hrDocMatrixModal .personnel-custom-list-launch:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(126, 82, 31, .24);
}

#hrDocMatrixModal .personnel-custom-list-launch .material-icons { font-size: 18px; }

.personnel-custom-list-modal {
    position: fixed;
    inset: 0;
    z-index: 10040;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: rgba(19, 17, 14, .68);
    backdrop-filter: blur(5px);
}

body.personnel-custom-list-open { overflow: hidden; }

/* ===== Lop XEM CHI TIET — nam TRONG hop thoai, khong phai modal thu hai =====
   `position: relative` o day la thu giu lop chi tiet nam gon trong hop thoai.
   Thieu no thi `position: absolute` ben duoi se bam vao viewport va lop chi tiet tran
   ra ngoai khung — va tu cho do lai thanh mot cuoc tranh z-index, dung thu da sinh ra
   no #93 (modal xem chung tu bi modal Chi tiet de len). */
.personnel-custom-list-detail {
    position: absolute;
    inset: 0;
    z-index: 5;                       /* chi can cao hon anh em TRONG hop thoai */
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-radius: 20px;
    background: #FCFBF8;
}
.personnel-custom-list-detail[hidden] { display: none; }
.personnel-custom-list-detail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex: 0 0 auto;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(174, 124, 65, .26);
    background: #F7F2E9;
    border-radius: 20px 20px 0 0;
}
.personnel-custom-list-detail-head strong { display: block; font-size: 17px; color: #3A2E20; }
.personnel-custom-list-detail-head span { font-size: 12px; color: #7A6A56; }
.personnel-custom-list-detail-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;                   /* cuon TRONG khung, khong day dai ca hop thoai */
    padding: 0;
}
.personnel-custom-list-detail-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.personnel-custom-list-detail-table th {
    position: sticky;                 /* cuon xuong van biet dang doc cot nao */
    top: 0;
    z-index: 2;
    padding: 10px 12px;
    background: #1C1B19;
    color: #E6BB83;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .4px;
    text-align: center;
    text-transform: uppercase;
    white-space: nowrap;
}
.personnel-custom-list-detail-table td {
    padding: 9px 12px;
    border-bottom: 1px solid #EDE6DA;
    color: #3A2E20;
    line-height: 1.35;
    vertical-align: middle;
}
.personnel-custom-list-detail-table tbody tr:nth-child(even) td { background: #FAF7F2; }
.personnel-custom-list-detail-table tbody tr:hover td { background: #F3E9D8; }

.personnel-custom-list-dialog {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(1500px, calc(100vw - 24px));
    height: min(960px, calc(100dvh - 24px));
    min-height: 0;
    overflow: hidden;
    border: 1px solid rgba(174, 124, 65, .34);
    border-radius: 20px;
    background: #FCFBF8;
    box-shadow: 0 28px 90px rgba(0, 0, 0, .34);
}

.personnel-custom-list-head {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 18px 58px 14px 22px;
    border-bottom: 1px solid #E7DECF;
    background: linear-gradient(110deg, #FFFDF9 0%, #F7EFE2 100%);
}

.personnel-custom-list-head-icon {
    display: grid;
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 14px;
    background: #1E1C19;
    color: #D3A76D;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 7px 16px rgba(31,28,24,.16);
}

.personnel-custom-list-head-icon .material-icons { font-size: 25px; }

.personnel-custom-list-head h2 {
    margin: 0;
    color: #221F1B;
    font-family: 'Cormorant Garamond', serif;
    font-size: 27px;
    line-height: 1.05;
}

.personnel-custom-list-head p {
    margin: 4px 0 0;
    color: #746B61;
    font-size: 12.5px;
    line-height: 1.45;
}

.personnel-custom-list-steps {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 20px;
    border-bottom: 1px solid #E9E1D5;
    background: #fff;
    color: #71675C;
    font-size: 11.5px;
    font-weight: 700;
    scrollbar-width: none;
}

.personnel-custom-list-steps::-webkit-scrollbar { display: none; }

.personnel-custom-list-steps span { display: inline-flex; align-items: center; gap: 6px; }
.personnel-custom-list-steps b,
.personnel-custom-list-pane .step-number,
.personnel-custom-list-preview-section .step-number {
    display: inline-grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 50%;
    background: #F0DFC8;
    color: #7E511F;
    font-size: 11px;
    font-weight: 900;
}
.personnel-custom-list-steps > .material-icons { color: #BDB4A8; font-size: 16px; }

.personnel-custom-list-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 16px 18px 22px;
    scrollbar-gutter: stable;
}

.personnel-custom-list-setup {
    display: grid;
    grid-template-columns: minmax(240px, 1.2fr) minmax(240px, 1fr) minmax(330px, auto);
    gap: 12px;
    align-items: stretch;
    margin-bottom: 14px;
}

.personnel-custom-list-field {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 6px;
    padding: 11px 12px;
    border: 1px solid #E3D9CA;
    border-radius: 13px;
    background: #fff;
}

.personnel-custom-list-field > span,
.personnel-custom-list-orientation > legend {
    color: #675C50;
    font-size: 10.5px;
    font-weight: 850;
    letter-spacing: .35px;
    text-transform: uppercase;
}

.personnel-custom-list-field em { color: #C62828; font-style: normal; }
.personnel-custom-list-field small { color: #9B9288; font-weight: 650; text-transform: none; }
.personnel-custom-list-field input {
    width: 100%;
    min-width: 0;
    height: 39px;
    padding: 0 11px;
    border: 1px solid #D9CDBD;
    border-radius: 9px;
    outline: none;
    background: #FFFDFC;
    color: #231F1A;
    font: 600 13px/1.2 'Inter', sans-serif;
}
.personnel-custom-list-field input:focus {
    border-color: #AD7B42;
    box-shadow: 0 0 0 3px rgba(173,123,66,.13);
}

.personnel-custom-list-orientation {
    display: grid;
    grid-template-columns: repeat(2, minmax(145px, 1fr));
    gap: 8px;
    min-width: 0;
    margin: 0;
    padding: 8px 10px 10px;
    border: 1px solid #E3D9CA;
    border-radius: 13px;
    background: #fff;
}
.personnel-custom-list-orientation > legend { padding: 0 4px; }
.personnel-custom-list-orientation > label {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 9px;
    padding: 8px 9px;
    border: 1px solid #E1D8CA;
    border-radius: 10px;
    cursor: pointer;
    background: #FCFAF6;
    transition: .16s ease;
}
.personnel-custom-list-orientation > label.selected {
    border-color: #AC783B;
    background: #FFF5E7;
    box-shadow: 0 0 0 2px rgba(172,120,59,.11);
}
.personnel-custom-list-orientation input { position: absolute; opacity: 0; pointer-events: none; }
.personnel-custom-list-orientation label > span:last-child { display: grid; min-width: 0; gap: 2px; }
.personnel-custom-list-orientation strong { color: #342B22; font-size: 12px; }
.personnel-custom-list-orientation small { color: #877C70; font-size: 10px; white-space: nowrap; }
.personnel-custom-list-orientation .paper-icon {
    position: relative;
    display: inline-block;
    flex: 0 0 auto;
    border: 1.5px solid #9A6B37;
    border-radius: 2px;
    background: #fff;
}
.personnel-custom-list-orientation .paper-icon.portrait { width: 18px; height: 24px; }
.personnel-custom-list-orientation .paper-icon.landscape { width: 24px; height: 18px; }
.personnel-custom-list-orientation .paper-icon i {
    position: absolute;
    left: 3px;
    right: 3px;
    top: 6px;
    height: 1px;
    background: #D8BE9B;
    box-shadow: 0 4px 0 #D8BE9B, 0 8px 0 #D8BE9B;
}

.personnel-custom-list-builder {
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr);
    gap: 14px;
    align-items: stretch;
}
.personnel-custom-list-pane {
    display: flex;
    min-width: 0;
    min-height: 390px;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #DED5C8;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(59,46,31,.05);
}
.personnel-custom-list-pane-head,
.personnel-custom-list-preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid #E8E0D5;
    background: #FAF6EF;
}
.personnel-custom-list-pane-head > div,
.personnel-custom-list-preview-head > div { display: flex; align-items: center; gap: 8px; }
.personnel-custom-list-pane-head strong,
.personnel-custom-list-preview-head strong { color: #332A21; font-size: 13px; }
.personnel-custom-list-count {
    padding: 5px 9px;
    border: 1px solid #DFC9AA;
    border-radius: 999px;
    background: #FFF9EF;
    color: #835724;
    font-size: 10.5px;
    font-weight: 850;
    white-space: nowrap;
}
.personnel-custom-list-picker-filters {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) repeat(3, minmax(112px, .55fr));
    gap: 7px;
    padding: 10px 11px 7px;
}
.personnel-custom-list-picker-filters .search,
.personnel-custom-list-field-search {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 6px;
    padding: 0 9px;
    border: 1px solid #DCD2C4;
    border-radius: 9px;
    background: #FCFBF9;
}
.personnel-custom-list-picker-filters .material-icons,
.personnel-custom-list-field-search .material-icons { color: #9B7B55; font-size: 17px; }
.personnel-custom-list-picker-filters input,
.personnel-custom-list-field-search input {
    width: 100%;
    min-width: 0;
    height: 36px;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #2A251F;
    font: 500 11.5px/1.2 'Inter', sans-serif;
}
.personnel-custom-list-picker-filters select {
    min-width: 0;
    height: 38px;
    padding: 0 8px;
    border: 1px solid #DCD2C4;
    border-radius: 9px;
    outline: none;
    background: #FCFBF9;
    color: #423A32;
    font: 650 11px/1.2 'Inter', sans-serif;
}
.personnel-custom-list-quick-actions,
.personnel-custom-list-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 3px 11px 9px;
}
.personnel-custom-list-quick-actions button,
.personnel-custom-list-presets button {
    display: inline-flex;
    min-height: 29px;
    align-items: center;
    gap: 4px;
    padding: 5px 8px;
    border: 1px solid #DFD4C5;
    border-radius: 8px;
    background: #FFFDFC;
    color: #665847;
    cursor: pointer;
    font: 750 10px/1.2 'Inter', sans-serif;
}
.personnel-custom-list-quick-actions button:hover,
.personnel-custom-list-presets button:hover { border-color: #B48752; background: #FFF6E9; color: #7E511F; }
.personnel-custom-list-quick-actions .material-icons { font-size: 14px; }
.personnel-custom-list-presets button.clear { color: #A53A35; }

.personnel-custom-list-people,
.personnel-custom-list-fields {
    flex: 1 1 auto;
    min-height: 0;
    max-height: 330px;
    overflow: auto;
    padding: 0 10px 11px;
    scrollbar-gutter: stable;
}
.personnel-custom-list-person-group + .personnel-custom-list-person-group { margin-top: 8px; }
.personnel-custom-list-person-group-title,
.personnel-custom-list-field-group-title {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 8px 5px;
    border-bottom: 1px solid #E7DED2;
    background: rgba(255,255,255,.96);
    color: #806344;
    font-size: 9.5px;
    font-weight: 900;
    letter-spacing: .32px;
    text-transform: uppercase;
}
.personnel-custom-list-person-row {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    min-height: 46px;
    margin-top: 5px;
    padding: 6px 9px;
    border: 1px solid #E9E2D8;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: .14s ease;
}
.personnel-custom-list-person-row:hover { border-color: #CFB18C; background: #FFFCF7; }
.personnel-custom-list-person-row.selected { border-color: #B78142; background: #FFF6E8; box-shadow: inset 3px 0 #B78142; }
.personnel-custom-list-person-row input,
.personnel-custom-list-field-option input {
    width: 17px;
    height: 17px;
    accent-color: #A46D31;
}
.personnel-custom-list-person-row > span:nth-child(2) { display: grid; min-width: 0; gap: 2px; }
.personnel-custom-list-person-row strong { overflow: hidden; color: #2C2721; font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.personnel-custom-list-person-row small { overflow: hidden; color: #91877B; font-size: 9.5px; text-overflow: ellipsis; white-space: nowrap; }
.personnel-custom-list-status-dot {
    padding: 4px 6px;
    border-radius: 999px;
    background: #EAF5EC;
    color: #27743D;
    font-size: 8.5px;
    font-weight: 850;
    white-space: nowrap;
}
.personnel-custom-list-status-dot.pending_resignation { background: #FFF2D4; color: #916000; }
.personnel-custom-list-status-dot.resigned { background: #EEF0F2; color: #64717B; }
.personnel-custom-list-empty { padding: 28px 14px; color: #968C80; font-size: 11.5px; text-align: center; }

.personnel-custom-list-presets { padding-top: 10px; }
.personnel-custom-list-field-search { margin: 0 11px 9px; }
.personnel-custom-list-field-group + .personnel-custom-list-field-group { margin-top: 9px; }
.personnel-custom-list-field-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    padding-top: 5px;
}
.personnel-custom-list-field-option {
    display: flex;
    min-width: 0;
    min-height: 35px;
    align-items: center;
    gap: 7px;
    padding: 6px 8px;
    border: 1px solid #E9E1D6;
    border-radius: 9px;
    background: #fff;
    color: #4F463D;
    cursor: pointer;
    font-size: 10.5px;
    font-weight: 650;
}
.personnel-custom-list-field-option.selected { border-color: #BC8A50; background: #FFF6E9; color: #70491E; }
.personnel-custom-list-field-option span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.personnel-custom-list-preview-section {
    margin-top: 14px;
    overflow: hidden;
    border: 1px solid #DCD2C4;
    border-radius: 15px;
    background: #F0ECE6;
}
.personnel-custom-list-preview-head { border-bottom-color: #DCD2C4; }
#personnelCustomListPrintHint { color: #756B60; font-size: 10.5px; font-weight: 700; }
.personnel-custom-list-preview-stage {
    display: flex;
    min-height: 300px;
    align-items: flex-start;
    justify-content: center;
    overflow: auto;
    padding: 18px;
    background-color: #DCD8D1;
    background-image: linear-gradient(45deg, rgba(255,255,255,.28) 25%, transparent 25%), linear-gradient(-45deg, rgba(255,255,255,.28) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, rgba(255,255,255,.28) 75%), linear-gradient(-45deg, transparent 75%, rgba(255,255,255,.28) 75%);
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
    background-size: 16px 16px;
}
.personnel-custom-list-paper {
    width: min(100%, 760px);
    min-height: 300px;
    padding: 24px 25px 32px;
    border-radius: 2px;
    background: #fff;
    color: #171717;
    box-shadow: 0 8px 24px rgba(34,31,27,.18);
}
.personnel-custom-list-paper.landscape { width: min(100%, 1040px); }
.personnel-custom-list-paper .preview-brand { color: #A66F32; font-size: 8px; font-weight: 900; letter-spacing: 1px; text-align: center; }
.personnel-custom-list-paper h3 { margin: 5px 0 0; font-family: 'Times New Roman', serif; font-size: 18px; line-height: 1.2; text-align: center; text-transform: uppercase; }
.personnel-custom-list-paper .preview-subtitle { margin: 4px 0 0; color: #665E55; font-size: 8px; line-height: 1.35; text-align: center; }
.personnel-custom-list-paper .preview-meta { margin: 3px 0 12px; color: #80786F; font-size: 7px; text-align: center; }
.personnel-custom-list-paper .preview-table-wrap { width: 100%; overflow: hidden; }
.personnel-custom-list-paper table { width: 100%; border-collapse: collapse; table-layout: fixed; font-family: Arial, sans-serif; font-size: 7px; }
.personnel-custom-list-paper th { padding: 5px 3px; border: 1px solid #5B5145; background: #1C1B19; color: #E6BB83; font-size: 6.5px; line-height: 1.2; text-transform: uppercase; }
.personnel-custom-list-paper td { padding: 4px 3px; border: 1px solid #D5CFC6; line-height: 1.25; overflow-wrap: anywhere; vertical-align: middle; }
.personnel-custom-list-paper tbody tr:nth-child(even) td { background: #FAF7F2; }
.personnel-custom-list-paper .preview-more { padding: 8px; border: 1px solid #D5CFC6; border-top: 0; color: #796F64; font-size: 7px; font-style: italic; text-align: center; }
.personnel-custom-list-paper .preview-signatures { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 17px; text-align: center; }
.personnel-custom-list-paper .preview-signatures strong { font-family: 'Times New Roman', serif; font-size: 8px; }
.personnel-custom-list-paper .preview-signatures small { display: block; margin-top: 3px; color: #777; font-size: 6.5px; font-style: italic; }

.personnel-custom-list-footer {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 18px;
    border-top: 1px solid #DFD6C9;
    background: #fff;
    box-shadow: 0 -5px 18px rgba(39,31,22,.05);
}
.personnel-custom-list-validation { min-width: 0; color: #766C61; font-size: 11px; line-height: 1.4; }
.personnel-custom-list-validation.error { color: #B42318; font-weight: 700; }
.personnel-custom-list-validation.ok { color: #23733A; }
.personnel-custom-list-footer-actions { display: flex; flex: 0 0 auto; gap: 8px; }
.personnel-custom-list-footer-actions .btn { min-height: 40px; padding: 9px 14px; border-radius: 10px; font-size: 12px; }
.personnel-custom-list-footer-actions .material-icons { font-size: 17px; }
.personnel-custom-list-print-btn { border: 1px solid #B78A55; background: #FFF7EB; color: #795025; }

@media (max-width: 1050px) {
    .personnel-custom-list-setup { grid-template-columns: 1fr 1fr; }
    .personnel-custom-list-orientation { grid-column: 1 / -1; }
    .personnel-custom-list-builder { grid-template-columns: 1fr; }
    .personnel-custom-list-pane { min-height: 360px; }
    .personnel-custom-list-people,
    .personnel-custom-list-fields { max-height: 300px; }
}

@media (max-width: 700px) {
    #hrDocMatrixModal .hr-doc-matrix-header-actions { width: 100%; justify-content: flex-start; }
    #hrDocMatrixModal .personnel-custom-list-launch { flex: 1 1 auto; justify-content: center; }
    .personnel-custom-list-modal { padding: 0; }
    .personnel-custom-list-dialog { width: 100vw; height: 100dvh; border-radius: 0; }
    .personnel-custom-list-head { padding: 14px 48px 12px 14px; }
    .personnel-custom-list-head-icon { width: 40px; height: 40px; flex-basis: 40px; }
    .personnel-custom-list-head h2 { font-size: 23px; }
    .personnel-custom-list-head p { font-size: 11px; }
    .personnel-custom-list-steps { justify-content: flex-start; overflow-x: auto; }
    .personnel-custom-list-steps span { flex: 0 0 auto; }
    .personnel-custom-list-scroll { padding: 12px; }
    .personnel-custom-list-setup { grid-template-columns: 1fr; }
    .personnel-custom-list-orientation { grid-column: auto; grid-template-columns: 1fr; }
    .personnel-custom-list-picker-filters { grid-template-columns: 1fr; }
    .personnel-custom-list-field-options { grid-template-columns: 1fr; }
    .personnel-custom-list-preview-stage { justify-content: flex-start; padding: 10px; }
    .personnel-custom-list-paper,
    .personnel-custom-list-paper.landscape { min-width: 680px; }
    .personnel-custom-list-footer { align-items: stretch; flex-direction: column; }
    .personnel-custom-list-footer-actions { display: grid; grid-template-columns: repeat(3, 1fr); }
    .personnel-custom-list-footer-actions .btn { justify-content: center; padding-inline: 8px; }
}

/* Thẻ chuyển chi nhánh chấm công: chỉ giữ tên và trạng thái chuyển. */
#moduleAttendanceManager .attendance-control-branch-bar .attendance-branch-chip {
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 76px;
    padding: 12px 16px;
    text-align: center;
}

#moduleAttendanceManager .attendance-control-branch-bar .attendance-branch-chip strong {
    width: 100%;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.25;
    text-align: center;
}

#moduleAttendanceManager .attendance-control-branch-bar .attendance-branch-chip .branch-count {
    align-self: center;
    justify-content: center;
    font-size: 11px;
}

/* Tooltip luôn mở lên trên nhưng dùng tọa độ màn hình để thoát vùng cắt của bảng cuộn. */
#moduleAttendanceManager .cell-popover.cell-popover-viewport {
    position: fixed;
    display: block;
    right: auto;
    bottom: auto;
    transform: none;
    z-index: 100000;
}

/*
 * Cầu hover nối tooltip cố định với ô công đang mở. Ở các hàng giữa, nếu thiếu
 * vùng này con trỏ sẽ chạm ô của hàng phía trên và tooltip bị đổi trước khi tới
 * được nút khôi phục. Pseudo-element vẫn nhận chuột dù thân tooltip không nhận.
 */
#moduleAttendanceManager .cell-popover.cell-popover-viewport::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -14px;
    height: 16px;
    pointer-events: auto;
}

/* Laptop công ty: Full HD ở mức scale 125–150% (viewport khoảng 1160–1480px). */
@media (min-width: 1160px) and (max-width: 1480px) {
    body:not(.hc-mobile-mode).hc-sidebar-collapsed.hc-module-attendance-manager .hc-page {
        padding: 16px 22px 28px 16px;
        gap: 12px;
    }

    body:not(.hc-mobile-mode).hc-module-attendance-manager .hc-main-topbar {
        gap: 12px;
    }

    body:not(.hc-mobile-mode).hc-module-attendance-manager .hc-topbar-title h1 {
        font-size: clamp(36px, 3.45vw, 44px);
        white-space: nowrap;
    }

    body:not(.hc-mobile-mode).hc-module-attendance-manager .hc-topbar-actions,
    body:not(.hc-mobile-mode).hc-module-attendance-manager .hc-topbar-primary,
    body:not(.hc-mobile-mode).hc-module-attendance-manager .hc-topbar-secondary {
        gap: 6px;
        flex-wrap: nowrap;
        flex-shrink: 0;
    }

    body:not(.hc-mobile-mode).hc-module-attendance-manager .hc-topbar-btn {
        min-height: 36px;
        padding: 7px 9px;
        border-radius: 14px;
        font-size: 12px;
        white-space: nowrap;
        flex: 0 0 auto;
    }

    body:not(.hc-mobile-mode).hc-sidebar-collapsed.hc-module-attendance-manager #moduleAttendanceManager .module-workspace {
        grid-template-columns: minmax(320px, .74fr) minmax(0, 1.66fr);
        gap: 10px;
    }

    body:not(.hc-mobile-mode).hc-sidebar-collapsed.hc-module-attendance-manager #moduleAttendanceManager .attendance-control-grid {
        grid-template-columns: minmax(260px, .62fr) minmax(0, 1.04fr) !important;
        gap: 10px;
    }

    body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .attendance-sync-card,
    body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .attendance-control-section {
        padding: 10px 12px;
        border-radius: 16px;
    }

    body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .attendance-sync-actions {
        display: grid;
        grid-template-columns: minmax(0, 1.08fr) minmax(122px, .92fr);
        gap: 6px;
        width: 100%;
    }

    body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .attendance-sync-actions > * {
        width: 100%;
        min-width: 0;
        max-width: none;
        margin: 0 !important;
    }

    body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .attendance-sync-actions .vi-month-picker {
        min-width: 0;
    }

    body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .attendance-sync-actions .btn {
        gap: 5px;
        padding-inline: 6px !important;
        font-size: 11px;
        white-space: nowrap;
    }

    body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager #attendanceSyncBtn {
        min-width: 0;
        gap: 4px;
        padding-inline: 4px !important;
        overflow: hidden;
        font-size: clamp(9.5px, .8vw, 11px) !important;
        letter-spacing: 0 !important;
        white-space: nowrap;
    }

    body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager #attendanceSyncBtn .material-icons {
        flex: 0 0 auto;
        font-size: 14px !important;
    }

    body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .workspace-section-title {
        font-size: 17px;
    }

    body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .attendance-control-branch-bar .attendance-branch-chip {
        min-height: 64px;
        padding: 9px 10px;
    }

    body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .attendance-control-branch-bar .attendance-branch-chip strong {
        font-size: 14px;
    }

    body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .smart-input-box {
        padding: 10px;
    }

    body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .smart-input-box h4 {
        font-size: 16px;
    }

    body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .smart-input-kicker {
        padding: 5px 8px;
        font-size: 10px;
    }

    body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .smart-input-row {
        grid-template-columns: 142px minmax(0, 1fr) 124px;
        gap: 7px;
    }

    body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .smart-input-row .attendance-date-control {
        min-width: 0;
    }

    body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .smart-input-row #attendanceDate,
    body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .smart-input-row textarea,
    body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .smart-input-row .btn {
        min-width: 0;
        padding: 8px;
        font-size: 12px;
    }

    body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .smart-input-row .btn {
        gap: 5px;
        white-space: nowrap;
    }

    body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .smart-input-row #attendanceDate {
        padding-right: 32px;
        padding-left: 9px;
        font-size: 12px;
        font-variant-numeric: tabular-nums;
        letter-spacing: -0.1px;
    }

    body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .smart-input-row .attendance-date-picker-btn {
        right: 4px;
        width: 26px;
        height: 30px;
    }

    body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .attendance-board-card:not(.matrix-fullscreen) .attendance-board-toolbar {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-start;
        align-items: center;
        column-gap: 6px;
        row-gap: 7px;
    }

    /* Một luồng liên tục: tiêu đề -> trạng thái -> thao tác -> tháng -> chốt công. */
    body:not(.hc-mobile-mode).hc-sidebar-collapsed.hc-module-attendance-manager #moduleAttendanceManager .attendance-board-card:not(.matrix-fullscreen) .attendance-toolbar-main,
    body:not(.hc-mobile-mode).hc-sidebar-collapsed.hc-module-attendance-manager #moduleAttendanceManager .attendance-board-card:not(.matrix-fullscreen) .attendance-toolbar-primary-actions,
    body:not(.hc-mobile-mode).hc-sidebar-collapsed.hc-module-attendance-manager #moduleAttendanceManager .attendance-board-card:not(.matrix-fullscreen) .attendance-toolbar-secondary {
        display: contents;
    }

    body:not(.hc-mobile-mode).hc-sidebar-collapsed.hc-module-attendance-manager #moduleAttendanceManager .attendance-board-card:not(.matrix-fullscreen) .attendance-board-heading {
        flex: 0 0 auto;
        min-width: 0;
        margin-right: 0;
    }

    body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .attendance-board-card:not(.matrix-fullscreen) #matrixMonth,
    body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .attendance-board-card:not(.matrix-fullscreen) .attendance-toolbar-secondary .vi-month-picker {
        width: 178px;
        min-width: 178px;
    }
}

/* Attendance sync card: header log menu, agent/branch row, month/sync row. */
#moduleAttendanceManager .attendance-sync-card {
    display:block;
}

#moduleAttendanceManager .attendance-sync-copy {
    width:100%;
}

#moduleAttendanceManager .attendance-sync-header {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    width:100%;
}

#moduleAttendanceManager .attendance-sync-header .attendance-sync-title {
    min-width:0;
    margin-bottom:0;
}

#moduleAttendanceManager .attendance-sync-header-log-menu {
    margin-left:auto;
}

#moduleAttendanceManager .attendance-sync-header-log-menu > summary::after {
    top:calc(100% + 7px);
    bottom:auto;
}

#moduleAttendanceManager .attendance-sync-controls,
body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .attendance-sync-controls {
    display:grid;
    grid-template-columns:minmax(0, 1.08fr) minmax(122px, .92fr);
    gap:8px;
    width:100%;
    margin-top:10px;
    align-items:stretch;
}

#moduleAttendanceManager .attendance-sync-controls > *,
body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .attendance-sync-controls > * {
    width:100%;
    min-width:0;
    max-width:none;
    margin:0 !important;
    box-sizing:border-box;
}

#moduleAttendanceManager .attendance-sync-controls .attendance-sync-list,
body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .attendance-sync-controls .attendance-sync-list {
    display:flex;
    align-items:center;
    min-height:38px;
    margin:0 !important;
}

#moduleAttendanceManager .attendance-sync-controls .vi-month-picker {
    width:100%;
    min-width:0;
}

#moduleAttendanceManager .attendance-sync-controls .vi-month-picker-button,
#moduleAttendanceManager .attendance-sync-controls #attendanceSyncBranch,
#moduleAttendanceManager .attendance-sync-controls #attendanceSyncBtn {
    width:100%;
    min-height:38px;
    box-sizing:border-box;
}

#moduleAttendanceManager .attendance-sync-controls #attendanceSyncBtn {
    justify-content:center;
    overflow:visible;
    white-space:nowrap;
}

@media (max-width: 640px) {
    body.hc-mobile-mode.hc-module-attendance-manager #moduleAttendanceManager .attendance-sync-controls {
        grid-template-columns:minmax(0, 1fr);
    }
}

/* Luôn hiển thị log agent và chuyển một nút chốt tháng theo trạng thái thanh trái. */
#moduleAttendanceManager .attendance-sync-log-panel,
body:not(.hc-mobile-mode).hc-module-attendance-manager #moduleAttendanceManager .attendance-sync-log-panel {
    display:block !important;
}

#moduleAttendanceManager .attendance-month-close-slot {
    display:flex;
    width:100%;
    margin-top:8px;
}

#moduleAttendanceManager .attendance-month-close-slot:empty,
#moduleAttendanceManager .attendance-month-close-slot:has(#attendanceMonthCloseBtn[style*="display: none"]) {
    display:none;
}

#moduleAttendanceManager .attendance-month-close-slot #attendanceMonthCloseBtn {
    width:100%;
    min-height:38px;
    justify-content:center;
    margin:0;
}

#moduleAttendanceManager .attendance-month-close-branch-slot {
    margin-top:10px;
}

/* Menu xuất toàn bộ công ngay trên dòng tiêu đề ma trận. */
#moduleAttendanceManager .attendance-bulk-export-menu {
    position:relative;
    flex:0 0 auto;
}

#moduleAttendanceManager .attendance-bulk-export-menu > summary {
    list-style:none;
    cursor:pointer;
    white-space:nowrap;
}

#moduleAttendanceManager .attendance-bulk-export-menu > summary::-webkit-details-marker {
    display:none;
}

#moduleAttendanceManager .attendance-bulk-export-menu[open] > summary {
    border-color:#b9874a;
    color:#8d602c;
    background:#fff8ee;
}

#moduleAttendanceManager .attendance-bulk-export-chevron {
    margin-left:2px;
    font-size:16px;
    transition:transform .16s ease;
}

#moduleAttendanceManager .attendance-bulk-export-menu[open] .attendance-bulk-export-chevron {
    transform:rotate(180deg);
}

#moduleAttendanceManager .attendance-bulk-export-popover {
    position:absolute;
    z-index:80;
    top:calc(100% + 7px);
    right:0;
    display:grid;
    gap:5px;
    width:min(330px, calc(100vw - 32px));
    padding:7px;
    border:1px solid #e2d2bb;
    border-radius:14px;
    background:#fffdfa;
    box-shadow:0 18px 40px rgba(48, 34, 20, .18);
}

#moduleAttendanceManager .attendance-bulk-export-popover button {
    display:flex;
    align-items:center;
    gap:10px;
    width:100%;
    padding:11px 12px;
    border:0;
    border-radius:10px;
    color:#2a211b;
    background:transparent;
    font:inherit;
    text-align:left;
    cursor:pointer;
}

#moduleAttendanceManager .attendance-bulk-export-popover button:hover,
#moduleAttendanceManager .attendance-bulk-export-popover button:focus-visible {
    outline:none;
    background:#f7ecdc;
}

#moduleAttendanceManager .attendance-bulk-export-popover button:disabled {
    cursor:wait;
    opacity:.72;
}

#moduleAttendanceManager .attendance-bulk-export-popover button > .material-icons {
    flex:0 0 auto;
    color:#ae7c41;
    font-size:20px;
}

#moduleAttendanceManager .attendance-bulk-export-popover button > span {
    display:grid;
    gap:3px;
    min-width:0;
}

#moduleAttendanceManager .attendance-bulk-export-popover strong {
    font-size:13px;
    line-height:1.25;
}

#moduleAttendanceManager .attendance-bulk-export-popover small {
    color:#766c61;
    font-size:10.5px;
    line-height:1.35;
}

@media (max-width: 640px) {
    #moduleAttendanceManager .attendance-bulk-export-menu,
    #moduleAttendanceManager .attendance-bulk-export-trigger {
        width:100%;
    }

    #moduleAttendanceManager .attendance-bulk-export-trigger {
        justify-content:center;
    }

    #moduleAttendanceManager .attendance-bulk-export-popover {
        right:auto;
        left:0;
    }
}

/* Attendance matrix command bar: always one compact row at every zoom level. */
#moduleAttendanceManager .attendance-board-card {
    container-name: attendance-board;
    container-type: inline-size;
}

#moduleAttendanceManager .attendance-board-card .attendance-board-toolbar {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: clamp(3px, .55cqi, 8px) !important;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 34px;
    margin-bottom: 8px !important;
    overflow: visible;
}

#moduleAttendanceManager .attendance-board-card .attendance-toolbar-main,
#moduleAttendanceManager .attendance-board-card .attendance-toolbar-primary-actions,
#moduleAttendanceManager .attendance-board-card .attendance-toolbar-secondary {
    display: contents !important;
}

#moduleAttendanceManager .attendance-board-card .attendance-board-heading {
    flex: 1 1 220px !important;
    min-width: 90px !important;
    margin: 0 !important;
    overflow: hidden;
}

#moduleAttendanceManager .attendance-board-card .attendance-board-title {
    display: block;
    overflow: hidden;
    color: var(--charcoal);
    font-size: clamp(13px, 1.35cqi, 18px);
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#moduleAttendanceManager .attendance-board-card #attendanceMonthCloseBadge,
#moduleAttendanceManager .attendance-board-card #attendanceMatrixRefreshBtn,
#moduleAttendanceManager .attendance-board-card #attendanceMonthlyBoardBtn,
#moduleAttendanceManager .attendance-board-card #parkingSaveBtn,
#moduleAttendanceManager .attendance-board-card .attendance-bulk-export-trigger,
#moduleAttendanceManager .attendance-board-card .vi-month-picker-button {
    min-width: 0 !important;
    min-height: clamp(30px, 2.7cqi, 36px) !important;
    max-height: 36px;
    padding: 5px clamp(6px, .8cqi, 10px) !important;
    gap: clamp(3px, .45cqi, 7px);
    overflow: hidden;
    box-sizing: border-box;
    font-size: clamp(10px, 1cqi, 13px);
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#moduleAttendanceManager .attendance-board-card #attendanceMonthCloseBadge {
    flex: 0 1 clamp(112px, 13cqi, 185px);
    max-width: 185px;
}

#moduleAttendanceManager .attendance-board-card .attendance-bulk-export-menu {
    flex: 0 1 clamp(150px, 18cqi, 240px) !important;
    min-width: 0;
    width: auto !important;
    max-width: 240px;
}

#moduleAttendanceManager .attendance-board-card .attendance-bulk-export-trigger {
    width: 100% !important;
    justify-content: center;
}

#moduleAttendanceManager .attendance-board-card .attendance-bulk-export-trigger > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

#moduleAttendanceManager .attendance-board-card #attendanceMatrixRefreshBtn {
    flex: 0 1 clamp(120px, 14cqi, 190px);
    max-width: 190px;
}

#moduleAttendanceManager .attendance-board-card .attendance-toolbar-secondary > .vi-month-picker,
#moduleAttendanceManager .attendance-board-card .attendance-toolbar-secondary > #matrixMonth {
    flex: 0 1 clamp(130px, 14cqi, 178px);
    width: clamp(130px, 14cqi, 178px) !important;
    min-width: 0 !important;
    max-width: 178px;
    margin: 0 !important;
}

#moduleAttendanceManager .attendance-board-card #attendanceMonthlyBoardBtn {
    flex: 0 1 clamp(118px, 13cqi, 180px);
    max-width: 180px;
}

#moduleAttendanceManager .attendance-board-card #parkingSaveBtn {
    flex: 0 1 clamp(92px, 10cqi, 140px);
    max-width: 140px;
}

@container attendance-board (max-width: 790px) {
    #moduleAttendanceManager .attendance-board-card .attendance-board-toolbar {
        gap: clamp(2px, .8cqi, 5px) !important;
    }

    #moduleAttendanceManager .attendance-board-card .attendance-board-heading {
        flex: 1 1 0 !important;
        min-width: 0 !important;
    }

    #moduleAttendanceManager .attendance-board-card .attendance-board-title {
        font-size: clamp(10px, 2.3cqi, 14px);
    }

    #moduleAttendanceManager .attendance-board-card #attendanceMonthCloseBadge,
    #moduleAttendanceManager .attendance-board-card #attendanceMatrixRefreshBtn,
    #moduleAttendanceManager .attendance-board-card #attendanceMonthlyBoardBtn,
    #moduleAttendanceManager .attendance-board-card #parkingSaveBtn,
    #moduleAttendanceManager .attendance-board-card .attendance-bulk-export-menu {
        flex: 0 0 clamp(30px, 5.5cqi, 36px) !important;
        width: clamp(30px, 5.5cqi, 36px) !important;
        max-width: 36px;
    }

    #moduleAttendanceManager .attendance-board-card #attendanceMonthCloseBadge,
    #moduleAttendanceManager .attendance-board-card #attendanceMatrixRefreshBtn,
    #moduleAttendanceManager .attendance-board-card #attendanceMonthlyBoardBtn,
    #moduleAttendanceManager .attendance-board-card #parkingSaveBtn,
    #moduleAttendanceManager .attendance-board-card .attendance-bulk-export-trigger {
        justify-content: center;
        padding-inline: 0 !important;
        font-size: 0 !important;
    }

    #moduleAttendanceManager .attendance-board-card #attendanceMonthCloseBadge {
        gap: 0;
        border-radius: 10px;
    }

    #moduleAttendanceManager .attendance-board-card .attendance-bulk-export-trigger > span,
    #moduleAttendanceManager .attendance-board-card .attendance-bulk-export-chevron {
        display: none;
    }

    #moduleAttendanceManager .attendance-board-card #attendanceMonthCloseBadge > .material-icons,
    #moduleAttendanceManager .attendance-board-card #attendanceMatrixRefreshBtn > .material-icons,
    #moduleAttendanceManager .attendance-board-card #attendanceMonthlyBoardBtn > .material-icons,
    #moduleAttendanceManager .attendance-board-card #parkingSaveBtn > .material-icons,
    #moduleAttendanceManager .attendance-board-card .attendance-bulk-export-trigger > .material-icons {
        flex: 0 0 auto;
        margin: 0;
        font-size: 16px !important;
    }

    #moduleAttendanceManager .attendance-board-card .attendance-toolbar-secondary > .vi-month-picker,
    #moduleAttendanceManager .attendance-board-card .attendance-toolbar-secondary > #matrixMonth {
        flex: 0 1 clamp(88px, 24cqi, 112px);
        width: clamp(88px, 24cqi, 112px) !important;
        max-width: 112px;
    }

    #moduleAttendanceManager .attendance-board-card .vi-month-picker-button {
        padding-inline: clamp(5px, 1.6cqi, 9px) !important;
        font-size: clamp(9px, 2.1cqi, 11px);
    }
}

/* ================= ĐIỀU CHỈNH LƯƠNG =================
   Ba ô lương bị khoá; đường duy nhất đổi chúng là nút "Điều chỉnh lương". Ô khoá phải TRÔNG
   khác ô nhập được — nếu nhìn giống hệt thì người dùng gõ vào rồi tưởng mình đã sửa. */
.hr-doc-info-edit-field input.hr-doc-field-locked {
    background: #f6f3ec;
    border-color: #e2dacc;
    color: #4b4034;
    font-weight: 700;
    cursor: default;
}
.hr-doc-info-edit-field input.hr-doc-field-locked:focus {
    outline: none;
    box-shadow: none;
    border-color: #e2dacc;
}

.salary-adjust-field {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-top: 2px;
}
.salary-adjust-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    padding: 0 16px;
    border: 1px solid #c8a86a;
    border-radius: 9px;
    background: linear-gradient(180deg, #fdf9f0 0%, #f6ecd8 100%);
    color: #6b5220;
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: .2px;
    cursor: pointer;
    transition: background .15s ease, box-shadow .15s ease, transform .05s ease;
}
.salary-adjust-btn:hover:not(:disabled) {
    background: linear-gradient(180deg, #fffdf7 0%, #f3e4c6 100%);
    box-shadow: 0 2px 8px rgba(160,126,58,0.18);
}
.salary-adjust-btn:active:not(:disabled) { transform: translateY(1px); }
.salary-adjust-btn:disabled { opacity: .5; cursor: not-allowed; }

/* Note đỏ giữ MÃI MÃI, mỗi lần một dòng — để đối soát được cả đường đi của mức lương. */
.salary-adjust-notes {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 9px 12px;
    border-left: 3px solid #c0483c;
    border-radius: 0 8px 8px 0;
    background: #fdf5f4;
}
.salary-adjust-note {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    color: #b42318;
    font-size: 12px;
    font-style: normal;
    font-weight: 850;
    line-height: 1.5;
}
.hr-doc-info-edit-field .salary-adjust-note-seq { color: #b42318; font-style: normal; font-weight: 850; }
.hr-doc-info-edit-field .salary-adjust-note-date { color: #b42318; font-style: normal; font-weight: 850; }
.hr-doc-info-edit-field .salary-adjust-note-move { color: #b42318; font-variant-numeric: tabular-nums; font-style: normal; font-weight: 850; }
.hr-doc-info-edit-field .salary-adjust-note-move b { padding: 0 3px; font-weight: 900; }
.hr-doc-info-edit-field .salary-adjust-note-text { color: #b42318; font-style: normal; font-weight: 850; }
.hr-doc-info-edit-field .salary-adjust-note-file {
    color: #b42318;
    font-style: normal;
    font-weight: 850;
    text-decoration: underline;
}

/* --- Modal đối chiếu cũ → mới --- */
.salary-adjust-modal .asset-form-dialog { width: min(680px, 96vw); }
.salary-adjust-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 18px 22px 20px;
}
.salary-adjust-compare {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: stretch;
    gap: 12px;
}
.salary-adjust-col {
    padding: 12px 14px;
    border: 1px solid #e6dfd2;
    border-radius: 12px;
    background: #faf8f3;
}
.salary-adjust-col-new {
    border-color: #cbb37c;
    background: linear-gradient(180deg, #fffdf7 0%, #f8f1e0 100%);
}
.salary-adjust-col-head {
    margin-bottom: 8px;
    color: #7a7168;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .4px;
    text-transform: uppercase;
}
.salary-adjust-arrow {
    display: flex;
    align-items: center;
    color: #c0a875;
}
.salary-adjust-figures { display: flex; flex-direction: column; gap: 5px; }
.salary-adjust-figures > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
}
.salary-adjust-figures label { color: #8a8078; font-size: 12px; }
.salary-adjust-figures span { font-variant-numeric: tabular-nums; }
.salary-adjust-figures .salary-adjust-strong {
    margin-top: 3px;
    padding-top: 6px;
    border-top: 1px dashed #ded4c2;
    font-weight: 850;
}
.salary-adjust-empty { color: #9a9088; font-size: 12.5px; font-style: italic; }

.salary-adjust-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.salary-adjust-form label { display: flex; flex-direction: column; gap: 5px; }
.salary-adjust-form label.full-row { grid-column: 1 / -1; }
.salary-adjust-form span {
    color: #6f665e;
    font-size: 11.5px;
    font-weight: 750;
    letter-spacing: .2px;
}
.salary-adjust-form input {
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid #ded4c2;
    border-radius: 9px;
    background: #fff;
    color: #33291f;
    font-size: 13.5px;
}
.salary-adjust-form input[type="file"] { padding: 7px 10px; font-size: 12.5px; }
.salary-adjust-form input:focus {
    outline: none;
    border-color: #c8a86a;
    box-shadow: 0 0 0 3px rgba(200,168,106,0.16);
}

/* Lý do từ chối hiện NGUYÊN VĂN tại chỗ — từ chối là chuyện bình thường ở đây (thiếu ngày,
   trùng ngày, thiếu lương cơ bản), báo "thất bại" chung chung thì HR không biết sửa gì. */
.salary-adjust-message { display: none; }
.salary-adjust-message.active {
    display: block;
    padding: 9px 12px;
    border-radius: 9px;
    font-size: 12.5px;
    font-weight: 650;
}
.salary-adjust-message.active.error { border-left: 3px solid #c0483c; background: #fdf5f4; color: #9c3a30; }
.salary-adjust-message.active.ok { border-left: 3px solid #2f7d5d; background: #f2f8f5; color: #256149; }

.salary-adjust-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

@media (max-width: 720px) {
    .salary-adjust-compare { grid-template-columns: 1fr; }
    .salary-adjust-arrow { justify-content: center; transform: rotate(90deg); }
    .salary-adjust-form { grid-template-columns: 1fr; }
}

/* Loi tat "Xac nhan tang ca phat sinh" ngay duoi Tong hop phep trong Lich cong ca nhan.
   Truoc day muon xac nhan tang ca phai di vong qua Don tu & ho so duyet. */
.leave-balance-overtime-cta {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-top: 12px;
    padding: 14px 16px;
    text-align: left;
    border: 1px solid #E4D5BC;
    border-radius: 14px;
    background: linear-gradient(180deg, #FFFDF8 0%, #FBF3E6 100%);
    color: #6D4C41;
    cursor: pointer;
}
.leave-balance-overtime-cta:hover {
    border-color: #C9A227;
    box-shadow: 0 4px 14px rgba(201, 162, 39, .14);
}
.leave-balance-overtime-cta .material-icons { font-size: 22px; color: #B36B0C; }
.leave-balance-overtime-cta span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.leave-balance-overtime-cta b { font-size: 14px; font-weight: 700; }
.leave-balance-overtime-cta small { font-size: 12px; color: #8D7B63; line-height: 1.35; }

/* Chi con MOT nghiep vu tang ca: khong de o don doc bi keo rong het hang. */
.overtime-mode-grid--single { grid-template-columns: minmax(280px, 520px); }

/* Sửa/Xóa dòng lịch sử — Chủ CRM yêu cầu 27/08/2026. */
.personnel-history-actions { display: flex; gap: 6px; margin-top: 8px; }
.personnel-history-action {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px; border: 1px solid var(--border); border-radius: 8px;
    background: #fff; color: var(--text); font-size: 12px; font-weight: 600; cursor: pointer;
}
.personnel-history-action:hover { background: #f4f4f5; }
.personnel-history-action .material-icons { font-size: 14px; }
.personnel-history-action.is-danger { color: #b42318; border-color: #f0c6c2; }
.personnel-history-action.is-danger:hover { background: #fdf3f2; }
.personnel-history-editor {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px; margin-top: 10px; padding: 10px;
    border: 1px dashed var(--border); border-radius: 10px; background: #fafafa;
}
.personnel-history-editor label { display: flex; flex-direction: column; gap: 3px; }
.personnel-history-editor label span { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.personnel-history-editor input {
    padding: 6px 8px; border: 1px solid var(--border); border-radius: 7px;
    font-family: 'Inter', sans-serif; font-size: 12.5px;
}
.personnel-history-editor-foot {
    grid-column: 1 / -1; display: flex; align-items: center; gap: 10px;
    font-size: 11.5px; color: var(--muted);
}
@media (max-width: 760px) {
    .personnel-history-editor { grid-template-columns: 1fr; }
}
