/* Two-tier desktop chrome. No mobile, iframe or business-table overrides. */
@media screen and (min-width: 769px) {
    html:not(.embed-mode) body.hc-desktop-shell-ready {
        --dc-line: #555;
        --dc-muted: #000;
        --dc-accent: #a9783a;
        --dc-panel: #f7f7f8;
        --dc-selected: #eaeaec;
        --dc-menu-width: 312px;
        --dc-topbar-height: 44px;
        height: 100vh;
        overflow: hidden;
        background: #fff;
    }
    /* Keep personal calendar tracks inside the panel without hiding time data. */
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .cal-grid {
        grid-template-columns: repeat(7, minmax(0, 1fr));
    }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .cal-day {
        min-width: 0;
        box-sizing: border-box;
    }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .cal-top,
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .cal-top-right {
        min-width: 0;
        flex-wrap: wrap;
    }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .cal-punch {
        white-space: normal;
        overflow-wrap: anywhere;
    }
    html:not(.embed-mode) body.hc-desktop-shell-ready .hc-shell {
        position: relative;
        display: grid;
        grid-template-columns: 56px minmax(0, 1fr);
        grid-template-rows: var(--dc-topbar-height) minmax(0, 1fr);
        height: 100vh;
        min-height: 0;
        overflow: hidden;
        background: var(--dc-panel);
    }
    html:not(.embed-mode) body.hc-desktop-shell-ready .hc-sidebar { display: none !important; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .hc-main {
        grid-column: 3;
        grid-row: 2;
        height: auto;
        min-height: 0;
        min-width: 0;
        margin: 0;
        border: 0;
        border-radius: 0;
        overflow: auto;
        background: #fff;
    }
    html:not(.embed-mode) body.hc-desktop-shell-ready .hc-page {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 8px 16px 0;
        gap: 12px;
        box-sizing: border-box;
    }
    html:not(.embed-mode) body.hc-desktop-shell-ready .hc-main-topbar {
        display: none !important;
    }
    /* Content is flush with the desktop chrome; these module shells need no extra frame. */
    html:not(.embed-mode) body.hc-desktop-shell-ready #modulePayroll.workspace-main-card,
    html:not(.embed-mode) body.hc-desktop-shell-ready #moduleAdminExpenses > .hce,
    html:not(.embed-mode) body.hc-desktop-shell-ready #moduleInsurance > .bhxh-workspace,
    html:not(.embed-mode) body.hc-desktop-shell-ready #modulePersonnel #personnelSearchToolbar,
    html:not(.embed-mode) body.hc-desktop-shell-ready #modulePersonnel #personnelActiveSection,
    html:not(.embed-mode) body.hc-desktop-shell-ready #modulePersonnel #personnelResignedSection,
    html:not(.embed-mode) body.hc-desktop-shell-ready #moduleMyAttendance > .module-workspace > .module-workspace-left,
    html:not(.embed-mode) body.hc-desktop-shell-ready #moduleMyAttendance > .module-workspace > .module-workspace-right {
        border: 0;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
    }
    html:not(.embed-mode) body.hc-desktop-shell-ready #modulePayroll.workspace-main-card { padding: 0 16px 28px; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #modulePersonnel > #personnelPanelStatus { padding: 0 16px 28px; }
    /* The leave view's .hc-page only holds hidden modules, so it keeps the same thin inset instead of the legacy 18/30px padding. */
    html:not(.embed-mode) body.hc-desktop-shell-ready.hc-module-personnel .hc-page { padding: 8px 16px 0; }
    /* Phép & Nghỉ bù: the table sits on the page without a card frame and fills the rest of the screen;
       scrolling, drag-pan and the pinned header/columns stay on #leaveTrackingTable. 8px = the .hc-page inset above. */
    html:not(.embed-mode) body.hc-desktop-shell-ready.hc-personnel-leave-view #modulePersonnel { height: calc(100% - 8px); }
    html:not(.embed-mode) body.hc-desktop-shell-ready.hc-personnel-leave-view #personnelPanelLeave { display: flex; flex-direction: column; gap: 8px; height: 100%; }
    html:not(.embed-mode) body.hc-desktop-shell-ready.hc-personnel-leave-view #personnelPanelLeave > .leave-tracking-table-card {
        flex: 1 1 auto;
        min-height: 0;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
    }
    html:not(.embed-mode) body.hc-desktop-shell-ready.hc-personnel-leave-view #leaveTrackingTable { height: 100%; min-height: 0; max-height: none; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #modulePersonnel #personnelSearchToolbar,
    html:not(.embed-mode) body.hc-desktop-shell-ready #modulePersonnel #personnelActiveSection,
    html:not(.embed-mode) body.hc-desktop-shell-ready #modulePersonnel #personnelResignedSection { padding: 0; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #moduleMyAttendance > .my-attendance-header { display: none; }
    /* Welfare uses the same flat frame and content inset as the other desktop modules. */
    html:not(.embed-mode) body.hc-desktop-shell-ready #moduleWelfareCosts.welfare-costs {
        margin: 0;
        padding: 8px 16px 28px;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
    }
    /* Compact personnel concept: native data, controls and permission visibility are retained. */
    html:not(.embed-mode) body.hc-desktop-shell-ready #modulePersonnel .personnel-directory-header {
        display: block !important;
        container-type: inline-size;
        position: relative;
        z-index: 2;
        margin: 2px 0 8px;
    }
    html:not(.embed-mode) body.hc-desktop-shell-ready #modulePersonnel .personnel-directory-header-grid {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas: 'heading actions' 'branch stats' 'divider divider' 'search status' 'dept dept';
        align-items: center;
        gap: 8px 16px;
        padding-bottom: 8px;
        border-bottom: 1px solid var(--dc-line);
    }
    html:not(.embed-mode) body.hc-desktop-shell-ready #modulePersonnel .personnel-directory-header-grid::before {
        content: '';
        grid-area: divider;
        grid-column: 1 / -1;
        align-self: start;
        height: 0;
        border-top: 1px solid #555;
        pointer-events: none;
    }
    html:not(.embed-mode) body.hc-desktop-shell-ready #modulePersonnel #personnelSearchToolbar,
    html:not(.embed-mode) body.hc-desktop-shell-ready #modulePersonnel #personnelSummary { display: contents; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #personnelSearchToolbar .personnel-directory-heading { display: flex !important; grid-area: heading; flex-direction: column; gap: 0; min-width: 0; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .personnel-directory-heading h2 { margin: 0; color: #000; font-family: inherit; font-size: 20px; font-weight: 700; line-height: 26px; letter-spacing: -.4px; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .personnel-directory-heading p { margin: 0; color: #000; font-size: 11px; line-height: 16px; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #personnelSearchToolbar .personnel-search-field { grid-area: search; position: relative; width: 100%; min-width: 0; max-width: none; gap: 0; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #personnelSearchToolbar .personnel-search-field > span { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #personnelSearchToolbar .personnel-search-field::before { content: 'search'; position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-family: 'Material Icons'; font-size: 18px; line-height: 1; color: #000; pointer-events: none; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #personnelSearch { min-height: 34px !important; padding: 0 10px 0 34px !important; border: 1px solid #555; border-radius: 7px; background: #fff; color: #000; font-size: 12px; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #personnelSearchActions { grid-area: actions; justify-self: end; align-self: center; flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin: 0; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #personnelSearchActions .btn { min-height: 34px !important; padding: 6px 10px !important; border-radius: 7px; font-family: inherit; font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; box-shadow: none; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #personnelSearchActions .btn .material-icons { font-size: 17px !important; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #personnelSearchActions .btn:not(.btn-primary) { background: #fff !important; color: #000 !important; border: 1px solid #555; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #personnelSearchActions .btn:not(.btn-primary):hover { background: #f7f7f8 !important; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #personnelSummary .personnel-summary-branch { display: none; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #personnelSummary .personnel-stat-group { display: flex !important; grid-area: stats; justify-self: end; align-items: center; flex-wrap: wrap; gap: 4px 12px; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #personnelSummary .personnel-summary-stat { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 0 0 12px; border: 0; border-left: 1px solid #555; border-radius: 0; background: transparent !important; color: #000 !important; font-weight: 500; letter-spacing: 0; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #personnelSummary .personnel-stat-total { order: -1; padding-left: 0; border-left: 0; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #personnelSummary .personnel-stat-copy { display: flex; flex-direction: column; gap: 0; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #personnelSummary .personnel-stat-value { font-size: 18px; font-weight: 700; line-height: 21px; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #personnelSummary :is(.personnel-stat-label, .personnel-stat-compact-label) { color: #000; font-size: 10px; line-height: 13px; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #personnelSummary .personnel-stat-label::first-letter { text-transform: uppercase; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #personnelSummary .personnel-stat-total .personnel-stat-label { display: none; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #personnelSummary .personnel-stat-compact-label { display: block !important; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #personnelSummary .personnel-summary-stat .material-icons { font-size: 19px !important; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #personnelSummary .personnel-stat-total .material-icons { color: var(--dc-accent); }
    html:not(.embed-mode) body.hc-desktop-shell-ready #personnelSummary .personnel-stat-active .material-icons { color: #66865a; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #personnelSummary .personnel-stat-pending .material-icons { color: #a9783a; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #personnelSummary .personnel-stat-resigned .material-icons { color: #000; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #personnelSummary .personnel-status-dropdown { grid-area: status; justify-self: end; width: 100%; min-width: 180px; max-width: 100%; margin: 0; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #personnelSummary .personnel-status-trigger { display: flex; justify-content: space-between; min-height: 34px; padding: 5px 9px; box-sizing: border-box; border: 1px solid #555 !important; border-radius: 7px; background: #fff !important; color: #000 !important; font-size: 12px; font-weight: 500; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #personnelSummary .personnel-status-trigger .material-icons { font-size: 16px !important; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #personnelSummary :is(.personnel-status-menu, .personnel-status-option) { border-radius: 8px; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #personnelBranchBar { grid-area: branch; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin: 0; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #personnelBranchBar .personnel-branch-chip { display: inline-flex; flex-direction: row; flex: 0 1 auto; align-items: center; gap: 7px; min-width: 0; max-width: 100%; min-height: 34px; padding: 4px 10px; box-sizing: border-box; border: 0; border-bottom: 2px solid transparent; border-radius: 6px 6px 0 0; background: transparent; color: #000; text-align: left; box-shadow: none; transform: none; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #personnelBranchBar .personnel-branch-chip strong { white-space: normal; font-family: inherit; font-size: 12px; font-weight: 500; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #personnelBranchBar .personnel-branch-chip > span:not(.branch-count),
    html:not(.embed-mode) body.hc-desktop-shell-ready #personnelBranchBar .branch-count :is(.material-icons, .branch-count-label) { display: none; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #personnelBranchBar .branch-count { padding: 1px 6px; border-radius: 6px; background: #f1f1f3; color: #000; font-size: 10px; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #personnelBranchBar .personnel-branch-chip:hover { background: #fdfbf7; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #personnelBranchBar .personnel-branch-chip.active { border-bottom-color: var(--dc-accent); background: #fbf6ee; color: #7b572b; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #personnelBranchBar .personnel-branch-chip.active strong { font-weight: 600; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #personnelBranchBar .personnel-branch-chip.active .branch-count { background: #f1e6d6; color: #7b572b; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #personnelDeptBar { grid-area: dept; gap: 4px; margin: 0; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #personnelDeptBar .personnel-dept-chip { min-height: 28px; padding: 3px 8px; border: 1px solid #555; border-radius: 6px; background: #fff; color: #000; font-family: inherit; font-size: 11px; font-weight: 500; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #personnelDeptBar .personnel-dept-chip.active { border-color: #c9ab80; background: #fbf6ee; color: #7b572b; font-weight: 600; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #personnelDeptBar .dept-count { padding: 1px 5px; border-radius: 4px; background: #f1f1f3; color: #000; font-size: 10px; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #personnelDeptBar .personnel-dept-chip.active .dept-count { background: #f1e6d6; color: #7b572b; }
    html:not(.embed-mode) body.hc-desktop-shell-ready :is(#personnelSearch, #personnelSearchActions .btn, #personnelBranchBar .personnel-branch-chip, #personnelDeptBar .personnel-dept-chip, #personnelSummary .personnel-status-trigger):focus-visible { outline: 2px solid var(--dc-accent); outline-offset: 2px; }
    @container (max-width: 850px) {
        html:not(.embed-mode) body.hc-desktop-shell-ready #modulePersonnel .personnel-directory-header-grid { grid-template-areas: 'heading actions' 'branch branch' 'stats stats' 'divider divider' 'search status' 'dept dept'; gap: 7px 10px; }
        html:not(.embed-mode) body.hc-desktop-shell-ready #personnelSummary .personnel-stat-group { justify-self: start; }
    }
    @container (max-width: 540px) {
        html:not(.embed-mode) body.hc-desktop-shell-ready #personnelSearchToolbar .personnel-directory-heading h2 { font-size: 18px; line-height: 24px; }
        html:not(.embed-mode) body.hc-desktop-shell-ready #personnelSearchToolbar .personnel-directory-heading p { font-size: 10px; line-height: 14px; }
        html:not(.embed-mode) body.hc-desktop-shell-ready #personnelSearchActions .btn { min-height: 32px !important; padding: 5px 8px !important; font-size: 11px; }
        html:not(.embed-mode) body.hc-desktop-shell-ready #personnelSummary .personnel-stat-group { gap: 4px 6px; }
        html:not(.embed-mode) body.hc-desktop-shell-ready #personnelSummary .personnel-summary-stat { padding-left: 6px; gap: 5px; }
        html:not(.embed-mode) body.hc-desktop-shell-ready #personnelSummary .personnel-stat-total { padding-left: 0; }
    }
    /* Thin window chrome: controls and the native active title stay above the scrollable workspace. */
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-window-bar { grid-column: 1 / -1; grid-row: 1; display: flex; align-items: center; gap: 14px; min-width: 0; height: var(--dc-topbar-height); padding: 0 14px; box-sizing: border-box; background: #f4efee; border-bottom: 1px solid #555; color: #171717; z-index: 43; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-window-controls { display: flex; align-items: center; flex-shrink: 0; gap: 4px; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-window-controls > button { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 7px; background: transparent; color: #000; cursor: pointer; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-window-controls > button[hidden] { display: none; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-window-controls > button:hover { background: #e8e2e1; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-window-controls > button .material-icons { font-size: 20px; width: 20px; min-width: 0; overflow: hidden; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-window-caption { display: flex; align-items: center; gap: 10px; min-width: 0; padding-left: 14px; border-left: 1px solid #555; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-window-caption > .material-icons { flex: 0 0 19px; width: 19px; overflow: hidden; font-size: 19px; color: #000; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-window-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #171717; font-size: 14px; font-weight: 600; line-height: 1.4; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-window-controls button:focus-visible { outline: 2px solid var(--dc-accent); outline-offset: 2px; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-rail { grid-column: 1; grid-row: 2; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 5px; background: #f0f0f2; border-right: 1px solid var(--dc-line); z-index: 42; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-rail button { position: relative; display: grid; place-items: center; flex-shrink: 0; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: #000; cursor: pointer; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-rail button[hidden] { display: none; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-rail button.active { color: #000; background: #dfdfe3; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-rail button:hover,
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-rail button.is-preview { background: #e5e5e8; color: #000; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-rail .material-icons { font-size: 23px; width: 24px; min-width: 0; overflow: hidden; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-rail-tooltip { position: absolute; left: calc(100% + 12px); top: 50%; transform: translateY(-50%); white-space: nowrap; background: #29292d; color: white; padding: 7px 10px; border-radius: 7px; font-size: 12px; opacity: 0; visibility: hidden; pointer-events: none; z-index: 44; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-rail button:hover .dc-rail-tooltip,
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-rail button:focus-visible .dc-rail-tooltip,
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-rail-bottom button:hover .dc-rail-tooltip,
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-rail-bottom button:focus-visible .dc-rail-tooltip { opacity: 1; visibility: visible; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-rail-bottom { display: flex; flex-direction: column; gap: 8px; margin-top: auto; padding-top: 16px; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-menu { grid-column: 1 / -1; grid-row: 1 / -1; position: absolute; left: 64px; top: calc(var(--dc-topbar-height) + 8px); bottom: auto; display: flex; flex-direction: column; width: var(--dc-menu-width); height: auto; max-height: calc(100dvh - 64px); min-height: 0; overflow: hidden; background: var(--dc-panel); border: 1px solid var(--dc-line); border-radius: 12px; box-shadow: 8px 12px 40px #2020271a; padding: 16px 12px 14px; box-sizing: border-box; z-index: 45; visibility: hidden; pointer-events: none; }
    html:not(.embed-mode) body.hc-desktop-shell-ready.dc-menu-preview .dc-menu { visibility: visible; pointer-events: auto; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-menu-items { min-height: 0; overflow-y: auto; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-menu-heading { display: flex; flex-direction: column; flex-shrink: 0; padding: 0 10px 8px; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-menu-heading-row { display: flex; align-items: baseline; gap: 6px; min-width: 0; padding: 6px 0; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-menu-heading strong { flex: 0 0 auto; font-size: 17px; font-weight: 700; color: #171717; letter-spacing: -.4px; white-space: nowrap; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-menu-family-sep { flex: 0 0 auto; color: #000; font-size: 15px; font-weight: 500; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-menu-family { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-transform: uppercase; color: #000; letter-spacing: .6px; font-size: 13px; font-weight: 700; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-heading-action,
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-notification-slot .nb-bell { display: grid; place-items: center; width: 32px; height: 36px; min-width: 32px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #000; cursor: pointer; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-heading-action:hover,
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-notification-slot .nb-bell:hover { background: var(--dc-selected); }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-heading-action .material-icons,
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-notification-slot .nb-bell .material-icons { font-size: 21px; color: inherit; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-notification-slot { flex: 0 0 auto; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-notification-slot .nb-count { top: -1px; right: -2px; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-notification-slot .nb-panel { position: fixed; top: var(--dc-notif-top, 66px); left: var(--dc-notif-left, 80px); right: auto; width: 360px; max-width: calc(100vw - 16px); max-height: min(460px, var(--dc-notif-height, 460px)); z-index: 4000; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-menu-search { padding: 0 10px 12px; flex-shrink: 0; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-menu-search[hidden] { display: none; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-function-query { width: 100%; min-height: 40px; padding: 9px 10px; box-sizing: border-box; border: 1px solid #555; border-radius: 8px; background: #fff; color: #171717; font: inherit; font-size: 13px; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-function-query::placeholder { color: #555; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-menu-items { display: flex; flex-direction: column; gap: 4px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-menu-item { display: flex; align-items: center; flex-shrink: 0; gap: 10px; width: 100%; min-height: 42px; padding: 10px; border: 0; border-radius: 9px; color: #171717; text-align: left; font-family: inherit; font-size: 14px; line-height: 1.4; font-weight: 500; background: transparent; cursor: pointer; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-menu-item .material-icons { font-size: 20px; color: #000; flex: 0 0 20px; width: 20px; min-width: 0; overflow: hidden; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-menu-label { flex: 1; min-width: 0; overflow-wrap: anywhere; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-menu-item:hover { background: #eeeef0; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-menu-item.active { background: var(--dc-selected); color: #171717; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-menu-item.active .material-icons { color: var(--dc-accent); }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-menu-item:disabled { color: #555; cursor: default; background: transparent; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-menu-soon { font-size: 9px; color: #000; white-space: nowrap; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-menu-context { display: block; margin-top: 2px; font-size: 11px; color: #000; font-weight: 400; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-menu-badge { border-radius: 5px; padding: 1px 5px; background: #e7dfd4; color: #795522; font-size: 11px; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-menu-account { display: flex; flex-direction: column; flex-shrink: 0; gap: 4px; margin-top: auto; padding: 24px 10px 2px; color: #171717; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-menu-user { font-size: 12px; font-weight: 600; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-menu-account small { font-size: 11px; color: #000; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-menu-empty { font-size: 12px; color: #000; padding: 10px; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-menu-toggle .material-icons { font-size: 20px; width: 20px; overflow: hidden; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-menu-toggle:hover { background: var(--dc-panel); }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-rail button:focus-visible,
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-menu-item:focus-visible,
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-heading-action:focus-visible,
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-function-query:focus-visible,
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-menu-toggle:focus-visible { outline: 2px solid var(--dc-accent); outline-offset: 2px; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .hc-main { grid-column: 2; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-rail-bottom #dcFunctionSearch { width: 42px; height: 42px; }
    /* Landing shortcuts retain their original handlers and badges. */
    html:not(.embed-mode) body.hc-desktop-shell-ready #hubHome .hub-home-head.tools-only { min-height: auto !important; padding: 8px 0 22px !important; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #hubHome .hub-home-head.tools-only::before,
    html:not(.embed-mode) body.hc-desktop-shell-ready #hubHome .hub-home-head.tools-only::after { display: none; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #hubHome .hc-family-workspace-head .workspace-section-title { font-size: 24px !important; line-height: 1.3; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #hubHome .hub-home-layout { grid-template-columns: minmax(0, 1fr) !important; gap: 24px; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #hubHome .hc-concept-rail { display: none !important; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #hubHome .hub-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 12px; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #hubHome .hub-card { min-height: 84px; padding: 16px; gap: 14px; border: 1px solid var(--dc-line); border-radius: 12px; box-shadow: none; background: #fff; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #hubHome .hub-card:hover { transform: none; background: #fafafa; border-color: #555; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #hubHome .hub-card-icon { width: 38px; height: 38px; border-radius: 9px; box-shadow: none; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #hubHome .hub-card-info h3 { font-size: 15px; line-height: 1.35; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #hubHome .hub-card-info p { font-size: 12px; line-height: 1.5; color: var(--dc-muted); }
    html:not(.embed-mode) body.hc-desktop-shell-ready #hubHome .hc-people-zone { padding: 14px; border-radius: 10px; box-shadow: none; background: #fafafa; border: 1px solid var(--dc-line); }
    html:not(.embed-mode) body.hc-desktop-shell-ready #hubHome .hc-people-zone h3 { font-size: 16px; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #hubHome .hc-people-zone p { font-size: 12px; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #hubHome .hc-hero-greeting-title { font-size: 27px; line-height: 1.25; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #hubHome .hc-hero-greeting-date { font-size: 13px; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #hubHome .hc-home-action-chip { min-height: 64px; padding: 14px; flex-direction: row; justify-content: flex-start; text-align: left; gap: 10px; border-radius: 12px; font-size: 14px; font-weight: 600; box-shadow: none; border: 1px solid var(--dc-line); background: #fff; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #hubHome .hc-home-action-icon { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 8px; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #hubHome .hc-home-action-icon .material-icons { font-size: 21px; width: 22px; min-width: 0; overflow: hidden; }
    /* Home landing: native greeting above a single row of native shortcuts. */
    html:not(.embed-mode) body.hc-desktop-shell-ready #hubHome[data-hub-mode="home"] .hub-home-head.tools-only {
        height: calc(100dvh - var(--dc-topbar-height) - 8px);
        min-height: 460px !important;
        padding: 0 !important;
        gap: 32px;
        box-sizing: border-box;
        overflow: visible;
    }
    html:not(.embed-mode) body.hc-desktop-shell-ready #hubHome[data-hub-mode="home"] .hc-home-welcome-block {
        display: flex;
        flex: 1;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        max-width: none;
        min-height: 260px;
        padding: 0 16px 24px;
        box-sizing: border-box;
        text-align: center;
    }
    html:not(.embed-mode) body.hc-desktop-shell-ready #hubHome[data-hub-mode="home"] .dc-home-logo {
        display: block !important;
        width: 240px;
        max-width: 60%;
        height: auto;
        margin: 0 0 18px;
        object-fit: contain;
    }
    html:not(.embed-mode) body.hc-desktop-shell-ready #hubHome[data-hub-mode="home"] .hc-hero-greeting { max-width: 720px; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #hubHome[data-hub-mode="home"] .hc-hero-greeting-title {
        width: auto;
        font-size: clamp(17px, 1.5vw, 20px);
        font-weight: 500;
        line-height: 1.5;
        letter-spacing: -.2px;
        white-space: normal;
        color: #000;
    }
    html:not(.embed-mode) body.hc-desktop-shell-ready #hubHome[data-hub-mode="home"] .hc-hero-greeting-date,
    html:not(.embed-mode) body.hc-desktop-shell-ready #hubHome[data-hub-mode="home"] .hc-home-welcome-block > .workspace-section-title { display: none; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #hubHome[data-hub-mode="home"] .dc-home-question {
        display: block !important;
        max-width: 720px;
        margin: 12px 0 0;
        color: #171717;
        font-size: clamp(24px, 2.3vw, 32px);
        font-weight: 600;
        line-height: 1.35;
        letter-spacing: -.8px;
    }
    html:not(.embed-mode) body.hc-desktop-shell-ready #hubHome[data-hub-mode="home"] .hc-home-action-grid {
        display: grid;
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: minmax(0, 1fr);
        align-items: stretch;
        width: min(100%, 900px);
        margin: 0 auto 24px;
        padding: 16px;
        gap: 8px;
        box-sizing: border-box;
        border: 1px solid #555;
        border-radius: 24px;
        background: #fafafa;
        box-shadow: 0 8px 28px #17171708;
    }
    html:not(.embed-mode) body.hc-desktop-shell-ready #hubHome[data-hub-mode="home"] .hc-home-action-chip {
        min-height: 64px;
        padding: 12px;
        gap: 10px;
        border: 1px solid #555;
        border-radius: 14px;
        background: #fff;
        color: #000;
        font-size: 13px;
        font-weight: 600;
        line-height: 1.4;
    }
    html:not(.embed-mode) body.hc-desktop-shell-ready #hubHome[data-hub-mode="home"] .hc-home-action-chip:hover { transform: translateY(-2px); background: #fffaf3; border-color: #d7bb97; box-shadow: 0 4px 12px #a9783a12; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #hubHome[data-hub-mode="home"] .hc-home-action-chip:focus-visible { outline: 2px solid var(--dc-accent); outline-offset: 3px; }
    html:not(.embed-mode) body.hc-desktop-shell-ready #hubHome[data-hub-mode="home"] .hc-home-action-icon { width: 30px; height: 30px; flex: 0 0 30px; background: #f4ecdf; }
    @media (max-width: 1100px) {
        html:not(.embed-mode) body.hc-desktop-shell-ready #hubHome[data-hub-mode="home"] .hc-home-action-chip { flex-direction: column; justify-content: center; text-align: center; min-height: 82px; padding: 10px 6px; gap: 8px; }
    }

    /* Account avatar stays at the bottom; the native function buttons start at the top of the rail. */
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-avatar { display: grid; place-items: center; flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--dc-accent); color: #fff; font-size: 20px; font-weight: 700; line-height: 1; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-avatar > img { display: block; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-rail .dc-account-trigger { border-radius: 50%; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-rail .dc-account-trigger[aria-expanded="true"] { background: #e5e5e8; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-account-menu { position: fixed; z-index: 65; width: 280px; max-width: calc(100vw - 16px); overflow-y: auto; overscroll-behavior: contain; padding: 10px; box-sizing: border-box; border: 1px solid #555; border-radius: 18px; background: #fff; color: #171717; box-shadow: 0 12px 40px #20202724; font: inherit; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-account-menu[hidden] { display: none; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-account-header { display: flex; align-items: center; gap: 10px; padding: 10px 8px 14px; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-account-header > div { min-width: 0; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-account-header .dc-avatar { width: 30px; height: 30px; font-size: 15px; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-account-name { display: block; font-size: 15px; line-height: 1.4; font-weight: 650; overflow-wrap: anywhere; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-account-role { display: block; margin-top: 3px; font-size: 12px; line-height: 1.5; font-weight: 400; overflow-wrap: anywhere; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-account-divider { height: 1px; margin: 0 8px 6px; background: #e5e5e8; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-account-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 10px; box-sizing: border-box; border: 0; border-radius: 9px; background: transparent; color: #171717; font: inherit; font-size: 14px; line-height: 1.4; text-align: left; cursor: pointer; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-account-item[hidden] { display: none; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-account-item:hover { background: #f0f0f2; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-account-item .material-icons { flex: 0 0 20px; width: 20px; overflow: hidden; font-size: 20px; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-account-item:focus-visible { outline: 2px solid var(--dc-accent); outline-offset: -2px; background: #f0f0f2; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-help-dialog { width: min(420px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 24px; box-sizing: border-box; overflow-y: auto; border: 1px solid #555; border-radius: 18px; background: #fff; color: #171717; box-shadow: 0 20px 70px #0003; font: inherit; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-help-dialog::backdrop { background: #17171755; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-help-dialog h2 { margin: 0 0 20px; font-size: 20px; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-help-dialog h3 { margin: 16px 0 4px; font-size: 14px; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-help-dialog p { margin: 0; font-size: 13px; line-height: 1.6; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-help-dialog .dc-help-contact { margin-top: 20px; padding-top: 16px; border-top: 1px solid #555; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-help-dialog button { display: block; margin: 20px 0 0 auto; min-height: 36px; padding: 7px 16px; border: 1px solid #555; border-radius: 8px; background: #fff; color: #171717; font: inherit; cursor: pointer; }
    html:not(.embed-mode) body.hc-desktop-shell-ready .dc-help-dialog button:focus-visible { outline: 2px solid var(--dc-accent); outline-offset: 2px; }
}

/* Personal attendance uses native data/actions; desktop presentation only. */
.attendance-calendar-heading { display: none; }
@media screen and (min-width: 769px) {
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body).hc-module-my-attendance #moduleMyAttendance:not(.reconciliation-focus) { --pa-line: #ddcfbd; display: grid !important; grid-template-columns: minmax(0, 1fr) 280px; column-gap: 14px; row-gap: 0; align-items: start; position: relative; isolation: isolate; }
    /* One frame groups the title, month, KPIs and calendar without moving native controls. */
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body).hc-module-my-attendance #moduleMyAttendance:not(.reconciliation-focus)::before { content: ""; grid-column: 1; grid-row: 1 / span 3; align-self: stretch; border: 1px solid var(--pa-line); border-radius: 12px; background: #fff; pointer-events: none; z-index: 0; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .attendance-toolbar { grid-column: 1; grid-row: 1; position: relative; z-index: 3; min-width: 0; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; margin: 0; padding: 14px 14px 12px; box-sizing: border-box; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .attendance-calendar-heading { display: block; margin: 0; color: #171717; font: inherit; font-size: 20px; font-weight: 700; line-height: 1.3; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .month-picker { margin: 0; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .attendance-kpi-grid { grid-column: 1; grid-row: 2; position: relative; z-index: 2; min-width: 0; grid-template-columns: minmax(0, 1fr) minmax(0, .92fr) minmax(0, 1.1fr) minmax(0, 1.18fr); gap: 10px; margin: 0; padding: 0 14px 14px; box-sizing: border-box; align-items: stretch; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .kpi-card { position: relative; min-width: 0; padding: 8px; border: 1px solid var(--pa-line); border-radius: 10px; box-shadow: none; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .kpi-head { gap: 6px; align-items: flex-start; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .kpi-label { font-size: 10px; line-height: 1.3; letter-spacing: 0; color: #584831; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .kpi-icon { width: 18px; height: 18px; border-radius: 5px; font-size: 11px; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .kpi-figure { gap: 4px 6px; margin-top: 3px; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .kpi-value { font-size: 22px; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .kpi-value small { font-size: 13px; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .kpi-side { font-size: 10px; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .kpi-note { margin: 4px 0 0; color: #605447; font-size: 10px; line-height: 1.4; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .kpi-bar { height: 3px; margin-top: 5px; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .kpi-cta { min-height: 26px; margin: 0; padding: 4px 6px; border-radius: 6px; background: #AE7C41; font-size: 10px; white-space: nowrap; gap: 3px; }
    /* Keep the native OT button beside its count; only its helper copy is hidden. */
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .kpi-card:has(.kpi-cta) { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; align-content: start; gap: 4px 6px; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .kpi-card:has(.kpi-cta) .kpi-head { grid-column: 1 / -1; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .kpi-card:has(.kpi-cta) .kpi-figure { grid-column: 1; grid-row: 2; align-self: center; margin: 0; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .kpi-card:has(.kpi-cta) .kpi-cta { grid-column: 2; grid-row: 2; align-self: center; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .kpi-card:has(.kpi-cta) .kpi-note { display: none; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .kpi-cta .material-icons { font-size: 14px; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .ot-picker { position: absolute; z-index: 12; top: calc(100% + 6px); left: 0; right: 0; max-height: 280px; margin: 0; overflow-y: auto; overscroll-behavior: contain; box-sizing: border-box; background: #fff; box-shadow: 0 8px 24px #35271820; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .ot-picker-day { min-width: 0; min-height: 42px; padding: 7px; flex-wrap: wrap; gap: 4px 7px; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .ot-picker-punch { margin-left: 0; font-size: 11px; overflow-wrap: anywhere; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .module-workspace { display: contents; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .module-workspace-right { grid-column: 1; grid-row: 3; position: relative; z-index: 1; min-width: 0; width: auto; margin: 0; padding: 0 14px 14px; box-sizing: border-box; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .module-workspace-left { grid-column: 2; grid-row: 1 / span 3; min-width: 0; position: relative; top: auto; z-index: 1; margin: 0; padding: 0; gap: 12px; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .calendar-stage { min-width: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .calendar-stage-legend { gap: 6px 12px; margin-bottom: 10px; color: #352c22; font-size: 11px; line-height: 1.5; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .cal-grid { gap: 6px; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .cal-day-header { padding: 5px 0; color: #635544; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .cal-day { min-height: 100px; padding: 7px; border-radius: 9px; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .cal-day.empty { min-height: 0; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .cal-day.has-overtime { box-shadow: inset 0 0 0 1px #1565C0; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .cal-day:focus-visible { outline: 2px solid #6e4a24; outline-offset: 2px; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .cal-punch { font-size: 11px; line-height: 1.4; color: #665747; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .cal-status { font-size: 11px; line-height: 1.35; overflow-wrap: anywhere; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .workspace-side-panel { min-width: 0; padding: 12px; border: 1px solid var(--pa-line); border-radius: 12px; box-shadow: none; background: #fff; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .workspace-pane-title { margin-bottom: 10px; font-family: inherit; font-size: 15px; font-weight: 700; line-height: 1.4; color: #171717; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .attendance-closed-panel .attendance-month-list { max-height: 320px; min-width: 0; overflow-y: auto; overscroll-behavior: contain; padding: 2px; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .stats-stage { margin-top: 12px; padding: 12px; border: 1px solid var(--pa-line); border-radius: 12px; background: #fff; box-shadow: none; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .attendance-month-card { min-width: 0; padding: 10px; border-radius: 9px; background: #fffdf9; box-shadow: none; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .attendance-month-card strong { font-size: 13px; margin-bottom: 5px; line-height: 1.4; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .attendance-month-status-line { max-width: 100%; box-sizing: border-box; padding: 4px 6px; border-radius: 6px; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .attendance-month-status-line b { min-width: 0; font-size: 11px; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .attendance-month-time { font-size: 11px; line-height: 1.5; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .attendance-month-document-alert { padding: 7px; border-radius: 7px; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .leave-fund-card { gap: 7px; padding: 9px; margin-bottom: 8px; border-radius: 8px; background: #fffdfa; border-color: var(--pa-line); }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .leave-fund-icon { width: 26px; height: 26px; border-radius: 7px; font-size: 13px; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .leave-fund-line { flex-wrap: wrap; gap: 4px 8px; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .leave-fund-label { font-size: 10px; letter-spacing: .2px; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .leave-fund-value { font-size: 14px; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .leave-fund-note { font-size: 11px; line-height: 1.5; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .leave-balance-overtime-cta { min-height: 42px; margin: 8px 0 0; gap: 7px; padding: 9px; border: 1px solid var(--pa-line); border-radius: 8px; background: #fff8ee; box-shadow: none; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .leave-balance-overtime-cta b { font-size: 12px; line-height: 1.4; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .leave-balance-overtime-cta small { font-size: 11px; line-height: 1.5; }
}
@media screen and (min-width: 769px) and (max-width: 1199px) {
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body).hc-module-my-attendance #moduleMyAttendance:not(.reconciliation-focus) { grid-template-columns: minmax(0, 1fr); }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .module-workspace-left { grid-column: 1; grid-row: 4; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; align-items: start; }
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .attendance-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Narrow desktop keeps complete KPI labels and notes readable instead of forcing four cards. */
@media screen and (min-width: 1200px) and (max-width: 1365px) {
    :is(html:not(.embed-mode) body.hc-desktop-shell-ready, html.marketing-attendance-embed body) #moduleMyAttendance:not(.reconciliation-focus) .attendance-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Desktop pending-OT chooser: centered modal; native mobile/embed/focus picker retained. */
@media screen and (min-width: 769px) {
    .personal-ot-picker-modal {
        align-items: center;
        padding: 24px;
        background: rgb(28 23 18 / 35%);
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
    }
    .personal-ot-picker-panel {
        --personal-ot-columns: minmax(0, 1fr) 132px 18px;
        max-width: 540px;
        max-height: min(640px, calc(100dvh - 48px));
        border-color: #bba58d;
        border-radius: 14px;
        box-shadow: 0 18px 54px rgb(28 23 18 / 20%);
        animation: none;
    }
    .personal-ot-picker-panel .hc-modal-head {
        padding: 16px 18px;
        border-color: #cbbda9;
        background: #fff;
        align-items: flex-start;
    }
    .personal-ot-picker-panel .hc-modal-head h3 { font-size: 18px; color: #171717; }
    .personal-ot-picker-panel .hc-modal-head p { margin: 6px 0 0; color: #171717; font-size: 12px; line-height: 1.5; }
    .personal-ot-picker-panel .hc-modal-close { flex-shrink: 0; color: #171717; border-color: #cbbda9; }
    .personal-ot-picker-columns {
        display: grid;
        grid-template-columns: var(--personal-ot-columns);
        gap: 12px;
        padding: 10px 32px;
        border-bottom: 1px solid #d5c8b8;
        background: #f8f4ee;
        color: #5e4228;
        font-size: 11px;
        font-weight: 700;
    }
    .personal-ot-picker-columns::after { content: ""; }
    .personal-ot-picker-panel .hc-modal-body { padding: 8px 18px 16px; }
    .personal-ot-picker-panel .ot-picker {
        position: static;
        max-height: none;
        padding: 0;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
        overflow: visible;
    }
    .personal-ot-picker-panel .ot-picker-title { display: none; }
    .personal-ot-picker-panel .ot-picker-day {
        display: grid;
        grid-template-columns: var(--personal-ot-columns);
        gap: 12px;
        align-items: center;
        width: 100%;
        min-height: 48px;
        margin: 0;
        padding: 10px 14px;
        border: 0;
        border-bottom: 1px solid #d5c8b8;
        border-radius: 0;
        background: #fff;
        color: #171717;
        text-align: left;
        cursor: pointer;
    }
    .personal-ot-picker-panel .ot-picker-day:last-child { border-bottom: 0; }
    .personal-ot-picker-panel .ot-picker-date { font-size: 13px; font-weight: 700; white-space: nowrap; }
    .personal-ot-picker-panel .ot-picker-punch { margin-left: 0; font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; color: #171717; }
    .personal-ot-picker-panel .ot-picker-day .material-icons { font-size: 18px; color: #8c622f; }
    .personal-ot-picker-panel .ot-picker-day:hover { background: #faf5ed; }
    .personal-ot-picker-panel button:focus-visible { outline: 2px solid #ad7735; outline-offset: -2px; border-radius: 5px; }
    .personal-ot-picker-panel .ot-picker-empty { padding: 18px 8px; color: #171717; font-size: 13px; line-height: 1.6; }
}
@media print { #personalOvertimePickerModal { display: none !important; } }

/* Marketing keeps its own chrome; only its verified attendance frame opts in. */
@media screen and (min-width: 769px) {
    html.marketing-attendance-embed body.hc-module-my-attendance #moduleMyAttendance:not(.reconciliation-focus) > .my-attendance-header { display: none; }
    html.marketing-attendance-embed #moduleMyAttendance:not(.reconciliation-focus) > .module-workspace > :is(.module-workspace-left, .module-workspace-right) { border: 0; border-radius: 0; box-shadow: none; background: transparent; }
}
