:root {
    --primary: #2388f2;
    --secondary: #14243a;
    --accent: #eb1877;
    --surface: #ffffff;
    --background: #f5f7f9;
    --border: #e4e9ef;
    --text: #18283c;
    --muted: #718096;
    --hover: #edf6ff;
    --active: #e5f2ff;
    --active-text: #1475d1;
    --button-colour: #2388f2;
    --button-text-colour: #ffffff;
    --sidebar-colour: #ffffff;
    --topbar-colour: #ffffff;
    --navigation-text-colour: #314257;
    --success: #1fb67a;
    --warning: #f0a915;
    --error: #d94b5b;
    --information: #2388f2;

    --topbar-height: 72px;
    --sidebar-width: 236px;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --shadow-sm: 0 1px 3px rgba(21, 35, 52, .08);
    --shadow-md: 0 14px 40px rgba(21, 35, 52, .18);
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
    margin: 0;
    min-width: 320px;
    color: var(--text);
    background: var(--background);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.42;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.app-shell {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    grid-template-rows: var(--topbar-height) minmax(0, calc(100vh - var(--topbar-height)));
    min-height: 100vh;
    overflow: hidden;
    background: var(--sidebar-colour);
}


a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }

/* Canonical Portal dropdown control.
 *
 * All normal Staff/Admin Portal selects inherit this control. PWA assets are
 * separate and intentionally unaffected.
 */
select:not([multiple]):not([size]) {
    min-height: 44px;
    padding: 0 42px 0 14px;
    border: 1px solid var(--border);
    border-radius: 11px;
    outline: none;
    background-color: var(--surface);
    background-image:
        linear-gradient(45deg, transparent 50%, var(--muted) 50%),
        linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position:
        calc(100% - 19px) 50%,
        calc(100% - 14px) 50%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    color: var(--text);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    box-shadow: 0 1px 2px color-mix(in srgb, var(--text) 5%, transparent);
    transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

select:not([multiple]):not([size]):hover {
    border-color: color-mix(in srgb, var(--primary) 24%, var(--border));
    background-color: color-mix(in srgb, var(--surface) 96%, var(--active) 4%);
}

select:not([multiple]):not([size]):focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 14%, transparent);
}

select:not([multiple]):not([size]):disabled {
    cursor: not-allowed;
    opacity: .62;
}

select:not([multiple]):not([size])::-ms-expand {
    display: none;
}

/* Canonical Portal date/week/month navigator.
 *
 * Page scripts keep ownership of what "previous" and "next" mean. The
 * control shell, spacing, hit targets, focus state and visual treatment are
 * shared across every Portal consumer.
 */
.portal-period-nav {
    display: inline-flex;
    align-items: stretch;
    min-height: 44px;
    overflow: visible;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: 0 1px 2px color-mix(in srgb, var(--text) 5%, transparent);
}

.portal-period-nav__step,
.portal-period-nav__label {
    min-height: 42px;
    border: 0;
    background: transparent;
    color: var(--text);
}

.portal-period-nav__step {
    display: grid;
    width: 44px;
    flex: 0 0 44px;
    place-items: center;
    padding: 0;
    cursor: pointer;
}

.portal-period-nav__step svg {
    width: 17px;
    height: 17px;
}

.portal-period-nav__label {
    display: flex;
    min-width: 176px;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border-inline: 1px solid var(--border);
    font-size: 13px;
    font-weight: 750;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
}

button.portal-period-nav__label {
    cursor: pointer;
}

.portal-period-nav__step:hover,
button.portal-period-nav__label:hover {
    background: color-mix(
        in srgb,
        var(--surface) 94%,
        var(--primary) 6%
    );
}

.portal-period-nav__step:focus-visible,
button.portal-period-nav__label:focus-visible {
    position: relative;
    z-index: 2;
    outline: 0;
    box-shadow: inset 0 0 0 2px var(--primary);
}

.portal-period-nav__step:first-child {
    border-radius: 11px 0 0 11px;
}

.portal-period-nav__step:last-child {
    border-radius: 0 11px 11px 0;
}

.portal-period-nav__label-wrap {
    position: relative;
    display: flex;
    align-items: stretch;
}

.portal-period-nav__label-wrap .portal-period-nav__label {
    height: 100%;
}

.icon {
    display: block;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    stroke-width: 1.75;
}

.topbar {
    grid-column: 1 / -1;
    grid-row: 1;
    position: sticky;
    z-index: 1000;
    top: 0;
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr) auto;
    height: var(--topbar-height);
    background: var(--topbar-colour);
}

.topbar-brand {
    display: flex;
    align-items: center;
    padding: 0 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-logo {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    border-radius: 11px;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
}

.brand-text {
    display: grid;
    min-width: 0;
}

.brand-text strong,
.profile-copy strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand-text strong { font-size: 14px; font-weight: 650; }
.brand-text small,
.profile-copy small,
.topbar-page span { color: var(--muted); font-size: 12px; }

.topbar-page {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    padding: 0 24px;
}

.topbar-page strong { font-size: 13px; font-weight: 650; }
.topbar-page span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
}

.icon-button {
    display: grid;
    width: 40px;
    height: 40px;
    padding: 0;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 50%;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
}

.icon-button:hover,
.icon-button:focus-visible {
    color: var(--text);
    border-color: var(--border);
    background: var(--hover);
    outline: none;
}

.mobile-menu-button { display: none; }

.profile-menu { position: relative; }

.profile-trigger {
    display: flex;
    min-width: 220px;
    height: 52px;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    border: 0;
    border-radius: var(--radius-md);
    color: var(--text);
    background: transparent;
    cursor: pointer;
}

.profile-trigger:hover,
.profile-trigger:focus-visible {
    background: var(--hover);
    outline: none;
}

.avatar {
    display: inline-grid;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    max-width: 36px;
    max-height: 36px;
    flex: 0 0 36px;
    aspect-ratio: 1 / 1;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    box-sizing: border-box;
    color: #fff;
    background: var(--secondary);
    font-size: 12px;
    font-weight: 700;
}

.profile-copy {
    display: grid;
    min-width: 0;
    flex: 1;
    text-align: left;
}

.profile-trigger > .icon {
    width: 16px;
    height: 16px;
    flex-basis: 16px;
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 1200;
    width: 220px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-md);
}

.profile-dropdown a {
    display: flex;
    min-height: 48px;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    font-weight: 600;
}

.profile-dropdown a:hover,
.profile-dropdown a:focus-visible {
    background: var(--hover);
    outline: none;
}

.sidebar {
    grid-column: 1;
    grid-row: 2;
    position: sticky;
    z-index: 40;
    top: var(--topbar-height);
    width: var(--sidebar-width);
    height: calc(100vh - var(--topbar-height));
    overflow: hidden;
    background: var(--sidebar-colour);
}




.sidebar-nav {
    display: grid;
    align-content: start;
    gap: 12px;
    height: 100%;
    padding: 16px 40px 32px 12px;
    overflow-y: auto;
    overflow-x: hidden;
}

.nav-section {
    display: grid;
    gap: 4px;
}

.nav-section + .nav-section {
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.nav-section h2 {
    margin: 0;
    padding: 8px 10px 4px;
    color: #4b5d72;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .045em;
    text-transform: uppercase;
}

.nav-link {
    display: flex;
    width: 100%;
    min-height: 44px;
    align-items: center;
    gap: 12px;
    padding: 6px 10px;
    border-radius: var(--radius-md);
    color: var(--navigation-text-colour);
    font-weight: 600;
}

.nav-link:hover,
.nav-link:focus-visible {
    color: var(--text);
    background: var(--hover);
    outline: none;
}

.nav-link.is-active {
    color: var(--active-text);
    background: var(--active);
}

.nav-icon {
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    place-items: center;
    border-radius: 9px;
    color: #fff;
    background: var(--primary);
}

.nav-icon .icon {
    width: 17px;
    height: 17px;
    flex-basis: 17px;
}

.nav-icon--chat,
.nav-icon--time-off,
.nav-icon--events { background: #29c5aa; }

.nav-icon--forms { background: #c140a8; }
.nav-icon--documents { background: #3c7fe8; }
.nav-icon--recognitions { background: #ed4f89; }
.nav-icon--celebrations { background: #f0a915; }

.nav-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.main {
    grid-column: 2;
    grid-row: 2;
    position: relative;
    z-index: 45;
    min-width: 0;
    height: calc(100vh - var(--topbar-height));
    margin-left: -28px;
    padding-left: 28px;
    border-top-left-radius: 28px;
    overflow: auto;
    background: var(--background);
}


.page {
    width: min(100%, 1600px);
    min-height: calc(100vh - var(--topbar-height));
    margin: 0 auto;
    padding: 24px;
    background: var(--background);
}

.page-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.page-heading {
    display: flex;
    min-height: 92px;
    align-items: center;
    gap: 16px;
    padding: 24px;
}

.page-heading-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 12px;
    color: var(--primary);
    background: var(--hover);
}

.page-heading h1 {
    margin: 0;
    font-size: 26px;
    line-height: 1.15;
}

.page-heading p {
    margin: 4px 0 0;
    color: var(--muted);
}

.placeholder {
    margin-top: 20px;
    padding: 32px;
}

.settings-shell {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    min-height: 620px;
    margin-top: 20px;
    overflow: hidden;
}

.settings-nav {
    padding: 16px;
    border-right: 1px solid var(--border);
    background: #fbfcfd;
}

.settings-nav a {
    display: flex;
    min-height: 44px;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    border-radius: var(--radius-md);
    color: #405267;
    font-weight: 600;
}

.settings-nav a:hover,
.settings-nav a:focus-visible,
.settings-nav a.is-active {
    color: var(--active-text);
    background: var(--active);
    outline: none;
}

.settings-nav .icon {
    width: 18px;
    height: 18px;
    flex-basis: 18px;
}

.settings-content {
    padding: 28px 32px;
}

.settings-content h2 {
    margin: 0 0 4px;
    font-size: 22px;
}

.settings-intro {
    margin: 0 0 28px;
    color: var(--muted);
}

.settings-section {
    padding: 24px 0;
    border-top: 1px solid var(--border);
}

.settings-section:first-of-type {
    padding-top: 0;
    border-top: 0;
}

.settings-section h3 {
    margin: 0 0 16px;
    font-size: 16px;
}

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

.field {
    display: grid;
    gap: 7px;
}

.field label {
    font-size: 13px;
    font-weight: 700;
}

.field input {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #ccd5df;
    border-radius: var(--radius-sm);
    color: var(--text);
    background-color: var(--surface);
}

.field select {
    width: 100%;
    min-height: 44px;
}

.field input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(35, 136, 242, .14);
    outline: none;
}

.colour-field {
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
}

.colour-field input[type="color"] {
    width: 48px;
    padding: 4px;
}

.settings-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 24px;
}

.button {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
}

.button-primary {
    color: var(--button-text-colour);
    background: var(--button-colour);
}

.button-secondary {
    color: var(--text);
    border-color: var(--border);
    background: var(--surface);
}

.sidebar-backdrop {
    position: fixed;
    z-index: 850;
    inset: var(--topbar-height) 0 0;
    background: rgba(15, 26, 40, .44);
}

@media (max-width: 960px) {
    .app-shell {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: var(--topbar-height) minmax(0, calc(100vh - var(--topbar-height)));
    }

    .topbar {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .topbar-brand {
        border-right: 0;
    }

    .topbar-page {
        display: none;
    }

    .mobile-menu-button {
        display: grid;
        margin-right: 8px;
    }

    .sidebar {
        position: fixed;
        top: var(--topbar-height);
        left: 0;
        width: var(--sidebar-width);
        transform: translateX(-100%);
        transition: transform 220ms ease;
        box-shadow: 12px 0 32px rgba(15, 26, 40, .18);
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .main {
        grid-column: 1;
        margin-left: 0;
        padding-left: 0;
        border-top-left-radius: 0;
        overflow: auto;
    }
}

@media (max-width: 720px) {
    .profile-trigger { min-width: 48px; width: 48px; padding: 0 6px; }
    .profile-copy,
    .profile-trigger > .icon { display: none; }

    .page { padding: 16px; }

    .settings-shell { grid-template-columns: 1fr; }
    .settings-nav {
        display: flex;
        overflow-x: auto;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }
    .settings-nav a { flex: 0 0 auto; }
    .settings-content { padding: 22px 18px; }
    .form-grid { grid-template-columns: 1fr; }
}


.notice {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    padding: 12px 14px;
    border: 1px solid color-mix(in srgb, var(--success) 35%, white);
    border-radius: var(--radius-md);
    color: #135f43;
    background: color-mix(in srgb, var(--success) 12%, white);
    font-weight: 650;
}

.notice-error {
    border-color: color-mix(in srgb, var(--error) 35%, white);
    color: #8e2633;
    background: color-mix(in srgb, var(--error) 10%, white);
}


.users-heading {
    display: flex;
    min-height: 74px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 18px;
}

.users-heading__title,
.users-heading__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.users-heading h1 {
    margin: 0;
    font-size: 26px;
    line-height: 1;
}

.users-panel {
    margin-top: 18px;
    overflow: visible;
}

.users-tabs {
    display: flex;
    min-height: 52px;
    align-items: flex-end;
    gap: 2px;
    padding: 0 16px;
    border-bottom: 1px solid var(--border);
}

.users-tab {
    position: relative;
    min-height: 52px;
    padding: 0 18px;
    border: 0;
    color: var(--text);
    background: transparent;
    font-weight: 650;
    cursor: pointer;
}

.users-tab::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 2px;
    background: transparent;
}

.users-tab.is-active {
    color: var(--primary);
}

.users-tab.is-active::after {
    background: var(--primary);
}

.users-toolbar {
    display: flex;
    min-height: 72px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
}

.users-toolbar__left {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
}

.search-control {
    display: flex;
    width: 244px;
    height: 42px;
    align-items: center;
    gap: 9px;
    padding: 0 12px;
    border: 1px solid #ccd5df;
    border-radius: 10px;
    background: var(--surface);
    color: var(--muted);
}

.search-control:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 14%, transparent);
}

.search-control .icon {
    width: 18px;
    height: 18px;
}

.search-control input {
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.search-control input::-webkit-search-cancel-button {
    display: none;
}

.selection-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.action-menu {
    position: relative;
}

.action-menu__trigger .icon {
    width: 15px;
    height: 15px;
}

.action-menu__dropdown {
    position: absolute;
    z-index: 1500;
    top: calc(100% + 8px);
    left: 0;
    width: 210px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow-md);
}

.action-menu__dropdown button {
    display: flex;
    width: 100%;
    min-height: 46px;
    align-items: center;
    gap: 12px;
    padding: 0 14px;
    border: 0;
    color: var(--text);
    background: transparent;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.action-menu__dropdown button:hover {
    background: var(--hover);
}

.action-menu__dropdown button.is-danger {
    color: var(--error);
}

.selection-count {
    font-weight: 700;
}

.selection-clear {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: var(--muted);
    background: transparent;
    font-size: 20px;
    cursor: pointer;
}

.table-scroll {
    overflow-x: auto;
    padding: 0 16px;
}

.data-table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

.data-table th,
.data-table td {
    height: 44px;
    padding: 0 13px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-size: 12px;
    font-weight: 400;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

.data-table th {
    height: 44px;
    background: #f5f6f7;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0;
}

.data-table th:not(.checkbox-column),
.data-table td:not(.checkbox-column) {
    width: 1%;
}

.data-table th:last-child,
.data-table td:last-child {
    width: auto;
}

.data-table td {
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.data-table th:first-child {
    border-top-left-radius: 12px;
}

.data-table th:last-child {
    border-top-right-radius: 12px;
}

.data-table tbody tr:hover,
.data-table tbody tr.is-selected {
    background: var(--active);
}

.checkbox-column {
    width: 42px !important;
    min-width: 42px;
    max-width: 42px;
    padding-right: 8px !important;
    padding-left: 8px !important;
    text-align: center !important;
}


.user-cell {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    display: inline-grid;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    max-width: 32px;
    max-height: 32px;
    flex: 0 0 32px;
    aspect-ratio: 1 / 1;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    box-sizing: border-box;
    color: #fff;
    background: var(--primary);
    font-size: 11px;
    font-weight: 700;
}


.page-card-body {
    padding: 24px;
}

.pagination__nav {
    min-height: 36px;
    padding: 0 13px;
    white-space: nowrap;
}

@media (max-width: 760px) {
    .page-card-body {
        padding: 18px;
    }
}

.table-footer {
    display: flex;
    min-height: 64px;
    align-items: center;
    justify-content: center;
    gap: 26px;
    padding: 10px 16px;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination .icon-button {
    width: 34px;
    height: 34px;
}

.pagination__status {
    display: grid;
    min-width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 9px;
    color: var(--primary);
    background: var(--active);
    font-weight: 700;
}

.rows-per-page {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.rows-per-page select {
    min-width: 76px;
    min-height: 44px;
    font-weight: 650;
}

@media (max-width: 760px) {
    .users-heading,
    .users-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .users-heading__actions {
        width: 100%;
        overflow-x: auto;
    }

    .users-toolbar__left {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }

    .search-control {
        width: 100%;
    }

    .add-users-button {
        width: 100%;
    }

    .table-footer {
        justify-content: space-between;
    }
}


.empty-row td {
    height: auto;
    padding: 0;
    border-bottom: 0;
}

.table-empty-state {
    display: grid;
    min-height: 320px;
    place-items: center;
    align-content: center;
    gap: 10px;
    padding: 40px 24px;
    text-align: center;
}

.table-empty-state__icon {
    display: grid;
    width: 56px;
    height: 56px;
    place-items: center;
    border-radius: 16px;
    color: var(--primary);
    background: var(--hover);
}

.table-empty-state h2 {
    margin: 4px 0 0;
    font-size: 20px;
}

.table-empty-state p {
    max-width: 420px;
    margin: 0 0 8px;
    color: var(--muted);
}


.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.drawer-backdrop {
    position: fixed;
    z-index: 1800;
    inset: 0;
    background: rgba(18, 31, 48, .46);
    backdrop-filter: blur(3px);
}

.drawer {
    position: fixed;
    z-index: 1900;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow-md);
}

.drawer--bottom {
    right: 12px;
    bottom: 12px;
    left: 12px;
    max-height: calc(100vh - 24px);
    border-radius: 18px;
    transform: translateY(calc(100% + 24px));
    transition: transform 220ms ease;
}

.drawer--bottom.is-open {
    transform: translateY(0);
}

.drawer--right {
    top: 12px;
    right: 12px;
    bottom: 12px;
    width: min(480px, calc(100vw - 24px));
    border-radius: 18px;
    transform: translateX(calc(100% + 24px));
    transition: transform 220ms ease;
}

.drawer--right.is-open {
    transform: translateX(0);
}

.drawer__header {
    display: flex;
    min-height: 72px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
}

.drawer__title {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
}

.drawer__title-icon {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    border-radius: 11px;
    color: var(--primary);
    background: var(--hover);
}

.drawer__title h2 {
    margin: 0;
    font-size: 18px;
}

.drawer__title p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.drawer__form {
    display: flex;
    min-height: 0;
    flex: 1;
    flex-direction: column;
}

.drawer__body {
    min-height: 0;
    flex: 1;
    overflow: auto;
    padding: 20px 24px 28px;
}

.drawer__footer {
    display: flex;
    min-height: 70px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    padding: 12px 18px;
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.drawer__footer-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
}

.add-users-intro {
    margin-bottom: 18px;
    color: var(--text);
    font-size: 13px;
    font-weight: 650;
    text-align: center;
}

.add-users-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.add-users-table {
    width: 100%;
    min-width: 1040px;
    border-collapse: separate;
    border-spacing: 0 10px;
    table-layout: fixed;
}

.add-users-table th {
    padding: 0 10px 6px;
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
    text-align: left;
    white-space: nowrap;
}

.add-users-table td {
    padding: 0 8px;
}

.add-users-table th:nth-child(1),
.add-users-table th:nth-child(2) {
    width: 17%;
}

.add-users-table th:nth-child(3) {
    width: 18%;
}

.add-users-table th:nth-child(4) {
    width: 21%;
}

.add-users-table th:nth-child(5) {
    width: 23%;
}

.add-users-remove-column {
    width: 44px !important;
    text-align: center !important;
}

.add-users-table input {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #ccd5df;
    border-radius: 9px;
    color: var(--text);
    background-color: var(--surface);
}

.add-users-table select {
    width: 100%;
    min-height: 44px;
}

.add-users-table input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 14%, transparent);
    outline: none;
}

.add-users-remove {
    width: 34px;
    height: 34px;
}

.add-users-add-row {
    display: flex;
    justify-content: center;
    padding-top: 18px;
}

.add-users-add-row .button {
    gap: 8px;
}

.add-users-add-row .icon {
    width: 16px;
    height: 16px;
}

.check-control {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
}

.check-control input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--primary);
}

@media (max-width: 760px) {
    .drawer--bottom {
        right: 8px;
        bottom: 8px;
        left: 8px;
        max-height: calc(100vh - 16px);
    }

    .drawer__header {
        min-height: 64px;
        padding: 12px 14px;
    }

    .drawer__title p {
        display: none;
    }

    .drawer__body {
        padding: 16px;
    }

    .drawer__footer {
        align-items: stretch;
    }

    .drawer__footer-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .drawer__footer-actions .button {
        flex: 1 1 120px;
    }
}


.settings-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.settings-section-heading h2 {
    margin: 0 0 4px;
}

.settings-subcard {
    margin-bottom: 20px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.settings-subcard__heading {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
}

.settings-subcard__heading > .icon {
    width: 22px;
    height: 22px;
    color: var(--primary);
}

.settings-subcard__heading h3,
.settings-subcard h4 {
    margin: 0;
}

.settings-subcard__heading p {
    margin: 3px 0 0;
    color: var(--muted);
}

.settings-subcard h4 {
    margin: 24px 0 14px;
    font-size: 14px;
}

.switch-row {
    display: flex;
    min-height: 44px;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    font-weight: 700;
}

.switch-row input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.security-gate {
    display: grid;
    max-width: 480px;
    min-height: 500px;
    margin: 0 auto;
    place-items: center;
    align-content: center;
    gap: 12px;
    text-align: center;
}

.security-gate__icon {
    display: grid;
    width: 68px;
    height: 68px;
    place-items: center;
    border-radius: 20px;
    color: var(--primary);
    background: var(--hover);
}

.security-gate__icon .icon {
    width: 30px;
    height: 30px;
}

.security-gate h2 {
    margin: 8px 0 0;
}

.security-gate p {
    max-width: 420px;
    margin: 0;
    color: var(--muted);
}

.security-form {
    display: grid;
    width: min(100%, 320px);
    gap: 14px;
    margin-top: 10px;
    text-align: left;
}

.security-form .button {
    width: 100%;
}

.security-cards {
    display: grid;
    gap: 20px;
}


.field--wide {
    grid-column: 1 / -1;
}

.field textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #ccd5df;
    border-radius: var(--radius-sm);
    color: var(--text);
    background: var(--surface);
    resize: vertical;
}

.field textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 14%, transparent);
    outline: none;
}

.settings-switch-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 20px;
    margin-bottom: 20px;
}

.notice code {
    margin-left: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (max-width: 720px) {
    .settings-switch-grid {
        grid-template-columns: 1fr;
    }
}


.settings-test-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 22px;
}

.integration-test-card {
    margin-bottom: 0;
}

.integration-test-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 12px;
}

.integration-test-result {
    margin-top: 14px;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 650;
}

.integration-test-result.is-success {
    color: #135f43;
    border-color: color-mix(in srgb, var(--success) 35%, white);
    background: color-mix(in srgb, var(--success) 12%, white);
}

.integration-test-result.is-error {
    color: #8e2633;
    border-color: color-mix(in srgb, var(--error) 35%, white);
    background: color-mix(in srgb, var(--error) 10%, white);
}

@media (max-width: 920px) {
    .settings-test-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .integration-test-row {
        grid-template-columns: 1fr;
    }

    .integration-test-row .button {
        width: 100%;
    }
}


.notification-centre {
    position: fixed;
    z-index: 3000;
    top: calc(var(--topbar-height) + 16px);
    right: 18px;
    display: grid;
    width: min(380px, calc(100vw - 36px));
    gap: 10px;
    pointer-events: none;
}

.notification {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 32px;
    align-items: start;
    gap: 11px;
    min-height: 64px;
    padding: 13px 12px 13px 13px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-md);
    opacity: 0;
    transform: translateX(26px);
    transition: opacity 180ms ease, transform 180ms ease;
    pointer-events: auto;
}

.notification.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.notification.is-closing {
    opacity: 0;
    transform: translateX(26px);
}

.notification__icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 10px;
}

.notification__icon .icon {
    width: 18px;
    height: 18px;
}

.notification__content {
    min-width: 0;
    padding-top: 1px;
}

.notification__title {
    display: block;
    margin: 0 0 2px;
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
}

.notification__message {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.notification__close {
    display: grid;
    width: 32px;
    height: 32px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
}

.notification__close:hover,
.notification__close:focus-visible {
    color: var(--text);
    background: var(--hover);
    outline: none;
}

.notification__close .icon {
    width: 16px;
    height: 16px;
}

.notification--success {
    border-left: 4px solid var(--success);
}

.notification--success .notification__icon {
    color: var(--success);
    background: color-mix(in srgb, var(--success) 12%, white);
}

.notification--error {
    border-left: 4px solid var(--error);
}

.notification--error .notification__icon {
    color: var(--error);
    background: color-mix(in srgb, var(--error) 10%, white);
}

.notification--warning {
    border-left: 4px solid var(--warning);
}

.notification--warning .notification__icon {
    color: var(--warning);
    background: color-mix(in srgb, var(--warning) 12%, white);
}

.notification--information,
.notification--loading {
    border-left: 4px solid var(--information);
}

.notification--information .notification__icon,
.notification--loading .notification__icon {
    color: var(--information);
    background: color-mix(in srgb, var(--information) 12%, white);
}

.notification--loading .notification__icon .icon {
    animation: notification-spin 800ms linear infinite;
}

@keyframes notification-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 620px) {
    .notification-centre {
        top: calc(var(--topbar-height) + 10px);
        right: 10px;
        left: 10px;
        width: auto;
    }
}


/* Time Clock module - canonical shared components */
.time-clock-overview{margin-top:18px;overflow:visible;padding:0;border-radius:22px}
.time-clock-overview__header{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:26px 28px 22px;border-bottom:1px solid var(--border);background:linear-gradient(135deg,color-mix(in srgb,var(--primary) 5%,var(--surface)),var(--surface) 62%);border-radius:22px 22px 0 0}
.time-clock-overview__identity{display:flex;align-items:center;gap:18px;min-width:0}
.time-clock-overview__icon{display:grid;width:58px;height:58px;flex:0 0 58px;place-items:center;border-radius:16px;background:color-mix(in srgb,var(--primary) 11%,var(--surface));color:var(--primary)}
.time-clock-overview__icon .icon{width:29px;height:29px}
.time-clock-overview__identity h1{margin:0;font-size:28px;line-height:1.1}
.time-clock-overview__identity p{margin:7px 0 0;color:var(--muted);font-size:14px}
.time-clock-overview__actions{display:flex;align-items:center;gap:10px;flex:0 0 auto}
.time-clock-overview__notice{margin:0 28px 18px}
.time-clock-tabs{display:flex;gap:18px;min-height:70px;align-items:flex-end;padding:0 28px;border-bottom:1px solid var(--border)}
.time-clock-tab{position:relative;min-height:58px;padding:0 10px;border:0;background:transparent;color:var(--muted);font-size:14px;font-weight:800;cursor:pointer}
.time-clock-tab:hover{color:var(--text)}
.time-clock-tab.is-active{color:var(--primary)}
.time-clock-tab.is-active:after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:3px;border-radius:3px 3px 0 0;background:var(--primary)}
.time-clock-toolbar{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:22px 28px}
.time-clock-search{width:min(100%,500px)}
.time-clock-add-button{min-width:110px;justify-content:center}
.time-clock-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;padding:0 28px 30px}
.time-clock-card{display:flex;min-width:0;min-height:390px;flex-direction:column;padding:24px;border:1px solid var(--border);border-radius:18px;background:var(--surface);box-shadow:var(--shadow-sm);transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}
.time-clock-card:hover{transform:translateY(-2px);border-color:color-mix(in srgb,var(--primary) 23%,var(--border));box-shadow:var(--shadow-md)}
.time-clock-card__head{display:grid;grid-template-columns:52px minmax(0,1fr) auto;align-items:center;gap:14px}
.time-clock-card__icon{display:grid;width:52px;height:52px;place-items:center;border-radius:15px;background:color-mix(in srgb,var(--primary) 10%,var(--surface));color:var(--primary)}
.time-clock-card__icon .icon{width:24px;height:24px}
.time-clock-card__title{min-width:0}
.time-clock-card__title h2{margin:0;overflow:hidden;color:var(--text);font-size:19px;line-height:1.25;text-overflow:ellipsis;white-space:nowrap}
.time-clock-card__title>span{display:block;margin-top:5px;color:var(--muted);font-size:12px}
.time-clock-status-pill{display:inline-flex;align-items:center;gap:7px;min-height:32px;padding:0 11px;border-radius:999px;font-size:12px;font-weight:800;white-space:nowrap}
.time-clock-status-pill.is-active{background:color-mix(in srgb,var(--success) 13%,var(--surface));color:color-mix(in srgb,var(--success) 82%,var(--text))}
.time-clock-status-pill.is-archived{background:color-mix(in srgb,var(--muted) 10%,var(--surface));color:var(--muted)}
.time-clock-status-pill__dot{width:9px;height:9px;border-radius:50%;background:currentColor}
.time-clock-card__divider{height:1px;margin:20px 0;background:var(--border)}
.time-clock-card__details{display:grid;gap:17px}
.time-clock-card__row{display:grid;grid-template-columns:24px 92px minmax(0,1fr);align-items:center;gap:8px;min-height:36px}
.time-clock-card__row-icon{display:grid;width:24px;height:24px;place-items:center;color:color-mix(in srgb,var(--muted) 88%,var(--text))}
.time-clock-card__row-icon .icon{width:19px;height:19px}
.time-clock-card__label{color:var(--muted);font-size:13px}
.time-clock-card__value{min-width:0}
.time-clock-assignment-chips{display:flex;flex-wrap:wrap;gap:6px}
.entity-chip{display:inline-flex;min-height:30px;align-items:center;padding:0 10px;border-radius:9px;background:var(--hover);color:var(--primary);font-size:13px;font-weight:800}
.muted{color:var(--muted)}
.avatar-stack{display:flex}
.mini-avatar{display:grid;width:30px;height:30px;place-items:center;border:2px solid var(--surface);border-radius:50%;background:var(--secondary);color:var(--surface);font-size:11px;font-weight:800}
.mini-avatar+.mini-avatar{margin-left:-8px}
.time-clock-employee-stack{display:flex;align-items:center;min-height:38px;padding-left:10px}
.time-clock-employee-avatar-wrap{position:relative;display:block;width:38px;height:38px;margin-left:-10px}
.time-clock-employee-avatar-wrap:first-child{margin-left:0}
.time-clock-employee-avatar{display:grid;width:38px;height:38px;overflow:hidden;place-items:center;border:3px solid var(--surface);border-radius:50%;background:var(--secondary);color:var(--surface);box-shadow:var(--shadow-sm);font-size:11px;font-weight:900}
.time-clock-employee-avatar img{width:100%;height:100%;object-fit:cover}
.time-clock-employee-more{position:relative;display:grid;width:38px;height:38px;margin-left:-8px;place-items:center;border:3px solid var(--surface);border-radius:50%;background:var(--hover);color:var(--primary);font-size:11px;font-weight:900}
.time-clock-card__schedule{display:grid;gap:3px}
.time-clock-card__schedule strong{font-size:13px;font-weight:800}
.time-clock-card__schedule span{color:var(--muted);font-size:12px}
.time-clock-card footer{display:grid;grid-template-columns:minmax(0,1fr) 44px;gap:10px;margin-top:auto;padding-top:22px}
.time-clock-access{display:flex;width:100%;min-height:44px;align-items:center;justify-content:center;gap:8px;border:0;border-radius:14px;background:color-mix(in srgb,var(--primary) 11%,var(--surface));color:var(--primary);font-weight:850;text-decoration:none}
.time-clock-access:hover{background:color-mix(in srgb,var(--primary) 16%,var(--surface));color:var(--primary)}
.time-clock-access .icon{width:18px;height:18px}
.time-clock-more-button{width:44px;height:44px;border:1px solid var(--border);background:var(--surface)}
.time-clock-more-button:hover{border-color:color-mix(in srgb,var(--primary) 28%,var(--border));background:var(--hover);color:var(--primary)}
.time-clock-empty{margin:0 28px 28px}
.clock-card-menu{position:relative}
.clock-card-dropdown{position:absolute;z-index:1400;right:0;top:calc(100% + 8px);width:210px;padding:6px;border:1px solid var(--border);border-radius:14px;background:var(--surface);box-shadow:var(--shadow-md)}
.clock-card-dropdown button{display:flex;width:100%;min-height:42px;align-items:center;gap:10px;padding:0 10px;border:0;border-radius:9px;background:transparent;color:var(--text);font-weight:650;cursor:pointer}
.clock-card-dropdown button:hover{background:var(--hover)}
.clock-card-dropdown .danger{color:var(--error)}
.clock-card-dropdown .icon{width:17px;height:17px}

.time-clock-drawer{height:min(850px,calc(100vh - 24px))}
.time-clock-drawer .drawer__body{background:#f8fafc}
.compact-form{max-width:520px;margin:30px auto}
.assignment-columns{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.assignment-columns section{padding:18px;border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--surface)}
.assignment-columns h3{margin:0 0 14px}
.choice-list{display:grid;gap:8px;max-height:430px;overflow:auto}
.choice-list label{display:flex;align-items:center;gap:10px;min-height:44px;padding:8px 10px;border-radius:9px;cursor:pointer}
.choice-list label:hover{background:var(--hover)}
.choice-list span{display:grid}
.choice-list small{color:var(--muted)}

.clock-settings-layout{display:grid;grid-template-columns:230px minmax(0,1fr);min-height:560px;background:#f8fafc}
.clock-settings-nav{display:grid;align-content:start;gap:5px;padding:14px 12px;border-right:1px solid var(--border);background:var(--surface)}
.clock-settings-nav button{min-height:44px;padding:0 13px;border:0;border-radius:10px;background:transparent;color:var(--text);font-weight:700;text-align:left;cursor:pointer}
.clock-settings-nav button.is-active,.clock-settings-nav button:hover{background:var(--active);color:var(--primary)}
.clock-settings-content{padding:18px 24px 32px;overflow:auto}
.clock-settings-content>section>h3{margin:0 0 4px;font-size:24px;letter-spacing:-.02em}
.clock-settings-content .settings-intro{margin:0 0 20px;color:var(--muted);line-height:1.45}

.time-clock-general-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.time-clock-settings-card--general-week{grid-column:1/-1}
.time-clock-settings-card,.time-clock-setting-card,.time-clock-behaviour-summary{border:1px solid var(--border);border-radius:15px;background:var(--surface);box-shadow:0 4px 16px rgba(20,36,58,.035)}
.time-clock-settings-card{padding:16px}
.time-clock-settings-card--wide{margin-top:14px}
.time-clock-settings-card__heading{display:flex;align-items:flex-start;gap:12px;margin-bottom:15px}
.time-clock-settings-card__heading--toggle{align-items:center}
.time-clock-settings-card__heading--toggle>div{flex:1}
.time-clock-settings-card__heading h4,.time-clock-setting-card h4,.time-clock-behaviour-summary h4{margin:0;font-size:15px}
.time-clock-settings-card__heading p,.time-clock-setting-card p,.time-clock-behaviour-summary p{margin:3px 0 0;color:var(--muted);font-size:12px;line-height:1.45}
.time-clock-settings-card__icon{display:grid;width:34px;height:34px;flex:0 0 34px;place-items:center;border-radius:10px;background:color-mix(in srgb,var(--primary) 10%,white);color:var(--primary)}
.time-clock-settings-card__icon .icon{width:18px;height:18px}
.time-clock-card-field-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.time-clock-card-field-grid .field{margin:0}
.time-clock-card-field-grid .field label{font-size:12px;font-weight:700}
.time-clock-card-field-grid input,.time-clock-card-field-grid select{background:#fbfcfe}

.day-picker{display:flex;flex-wrap:wrap;gap:8px;margin:4px 0 0}
.day-picker input{position:absolute;opacity:0;pointer-events:none}
.day-picker span{display:grid;width:38px;height:38px;place-items:center;border:1px solid var(--border);border-radius:50%;background:#fff;font-weight:800;cursor:pointer;transition:border-color 150ms ease,background 150ms ease,color 150ms ease,box-shadow 150ms ease}
.day-picker input:checked+span{border-color:var(--primary);background:var(--primary);color:#fff;box-shadow:0 4px 10px color-mix(in srgb,var(--primary) 22%,transparent)}

.time-clock-primary-settings{display:grid;gap:12px}
.time-clock-setting-card{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:16px}
.time-clock-setting-card__copy{display:flex;align-items:flex-start;gap:12px;min-width:0}
.time-clock-setting-card__copy>div{min-width:0}
.time-clock-toggle{flex:0 0 auto}
.time-clock-toggle b{min-width:52px;color:var(--muted);font-size:12px}
.time-clock-toggle input:checked~b{color:var(--primary)}

.time-clock-minute-control{display:flex;align-items:center;gap:10px}
.time-clock-minute-control input{width:130px}
.time-clock-minute-control span{color:var(--muted);font-size:13px}
.time-clock-settings-note{margin:12px 0 0;padding:12px 14px;border-radius:12px;background:color-mix(in srgb,var(--primary) 7%,white);color:var(--muted);font-size:12px;line-height:1.5}

.time-clock-behaviour-summary{margin-top:14px;padding:16px}
.time-clock-behaviour-summary__grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}
.time-clock-behaviour-summary__grid>div{display:grid;gap:5px;padding:12px;border:1px solid var(--border);border-radius:11px;background:#fbfcfe}
.time-clock-behaviour-summary__grid span{color:var(--muted);font-size:11px;font-weight:700}
.time-clock-behaviour-summary__grid strong{font-size:13px}

.clock-settings-content .settings-switch-grid{display:grid;gap:10px}
.clock-settings-content .switch-row{position:relative;display:flex;min-height:58px;align-items:center;gap:12px;margin:0;padding:12px 14px;border:1px solid var(--border);border-radius:12px;background:var(--surface);font-weight:700}
.clock-settings-content .switch-row>input[type="checkbox"]{appearance:none;-webkit-appearance:none;position:relative;width:42px;height:24px;flex:0 0 42px;margin:0;border:0;border-radius:999px;background:#cbd4df;cursor:pointer;outline:none;transition:background 150ms ease}
.clock-settings-content .switch-row>input[type="checkbox"]::after{content:"";position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.2);transition:transform 150ms ease}
.clock-settings-content .switch-row>input[type="checkbox"]:checked{background:var(--primary)}
.clock-settings-content .switch-row>input[type="checkbox"]:checked::after{transform:translateX(18px)}
.clock-settings-content .switch-row>input[type="checkbox"]:disabled{opacity:.55;cursor:not-allowed}
.clock-settings-content .switch-row>span{display:grid;gap:3px;line-height:1.35}
.clock-settings-content .switch-row small{color:var(--muted);font-weight:500}
.clock-settings-content .notification-matrix input[type="checkbox"],
.clock-settings-content .check-control input[type="checkbox"],
.clock-settings-content .break-row input[type="checkbox"]{
    appearance:none;
    -webkit-appearance:none;
    position:relative;
    width:38px;
    height:22px;
    min-width:38px;
    margin:0;
    border:0;
    border-radius:999px;
    background:#cbd4df;
    cursor:pointer;
    outline:none;
    transition:background 150ms ease;
}
.clock-settings-content .notification-matrix input[type="checkbox"]::after,
.clock-settings-content .check-control input[type="checkbox"]::after,
.clock-settings-content .break-row input[type="checkbox"]::after{
    content:"";
    position:absolute;
    top:3px;
    left:3px;
    width:16px;
    height:16px;
    border-radius:50%;
    background:#fff;
    box-shadow:0 1px 3px rgba(0,0,0,.2);
    transition:transform 150ms ease;
}
.clock-settings-content .notification-matrix input[type="checkbox"]:checked,
.clock-settings-content .check-control input[type="checkbox"]:checked,
.clock-settings-content .break-row input[type="checkbox"]:checked{background:var(--primary)}
.clock-settings-content .notification-matrix input[type="checkbox"]:checked::after,
.clock-settings-content .check-control input[type="checkbox"]:checked::after,
.clock-settings-content .break-row input[type="checkbox"]:checked::after{transform:translateX(16px)}
.clock-settings-content>section:not([data-clock-settings-panel="general"]):not([data-clock-settings-panel="clocking-pc-access"])>.form-grid,
.clock-settings-content>section:not([data-clock-settings-panel="general"]):not([data-clock-settings-panel="clocking-pc-access"])>.settings-switch-grid,
.clock-settings-content>section:not([data-clock-settings-panel="general"]):not([data-clock-settings-panel="clocking-pc-access"])>.geofence-flow,
.clock-settings-content>section:not([data-clock-settings-panel="general"]):not([data-clock-settings-panel="clocking-pc-access"])>.notification-matrix,
.clock-settings-content>section:not([data-clock-settings-panel="general"]):not([data-clock-settings-panel="clocking-pc-access"])>.settings-option-builder,
.clock-settings-content>section[data-clock-settings-panel="breaks"]>[data-break-list]{
    margin-top:14px;
    padding:16px;
    border:1px solid var(--border);
    border-radius:15px;
    background:var(--surface);
}

.break-row{display:grid;grid-template-columns:minmax(160px,1fr) 110px 100px 40px;align-items:center;gap:10px;margin-bottom:10px}
.break-row input{height:42px;padding:0 10px;border:1px solid var(--border);border-radius:9px}
.settings-option-builder{display:grid;gap:12px;margin-top:22px}
.settings-option-builder__heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.settings-option-builder__heading h4{margin:0 0 5px}
.settings-option-builder__heading p{margin:0}
.settings-option-list{display:grid;gap:10px}
.settings-option-row{display:grid;grid-template-columns:minmax(180px,1fr) auto 40px;align-items:end;gap:12px;padding:12px;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--surface)}
.settings-option-row__label{margin:0}
.settings-option-row .check-control{min-height:42px;align-items:center}
.geofence-flow{display:grid;grid-template-columns:1fr auto;gap:8px 14px;max-width:520px;margin-top:24px;padding:18px;border:1px solid var(--border);border-radius:var(--radius-lg)}
.geofence-flow b{color:var(--primary)}
.notification-matrix{display:grid;grid-template-columns:minmax(180px,1fr) repeat(3,80px);align-items:center;gap:0;border:1px solid var(--border);border-radius:12px;overflow:hidden}
.notification-matrix>*{display:grid;min-height:48px;place-items:center;padding:8px;border-right:1px solid var(--border);border-bottom:1px solid var(--border)}
.notification-matrix>span{place-items:center start}
.notification-matrix input{width:17px;height:17px;accent-color:var(--primary)}
.confirmation-dialog{position:fixed;z-index:3200;inset:0;display:grid;place-items:center;padding:20px;background:rgba(18,31,48,.5)}
.confirmation-dialog__panel{width:min(430px,100%);padding:26px;border-radius:var(--radius-lg);background:var(--surface);box-shadow:var(--shadow-md);text-align:center}
.confirmation-dialog__icon{display:grid;width:54px;height:54px;margin:0 auto 14px;place-items:center;border-radius:16px;background:color-mix(in srgb,var(--warning) 14%,white);color:var(--warning)}
.confirmation-dialog__panel h2{margin:0 0 8px}
.confirmation-dialog__panel p{margin:0;color:var(--muted)}
.confirmation-dialog__actions{display:flex;justify-content:center;gap:10px;margin-top:22px}
.button-danger{color:#fff;background:var(--error)}

@media(max-width:1180px){
    .time-clock-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px){
    .time-clock-overview__header{align-items:flex-start;flex-direction:column;padding:20px}
    .time-clock-overview__actions,.time-clock-overview__actions .button{width:100%}
    .time-clock-overview__actions .button{justify-content:center}
    .time-clock-tabs{padding:0 18px}
    .time-clock-toolbar{padding:18px;align-items:stretch;flex-direction:column}
    .time-clock-search,.time-clock-add-button{width:100%;max-width:none}
    .time-clock-grid{grid-template-columns:1fr;padding:0 18px 22px}
    .time-clock-card{min-height:0;padding:20px}
    .time-clock-card__head{grid-template-columns:46px minmax(0,1fr)}
    .time-clock-card__icon{width:46px;height:46px}
    .time-clock-status-pill{grid-column:2;justify-self:start}
    .time-clock-card__row{grid-template-columns:22px 82px minmax(0,1fr)}
    .time-clock-empty{margin:0 18px 22px}
}
@media(max-width:1050px){
    .time-clock-general-grid{grid-template-columns:1fr}
    .time-clock-behaviour-summary__grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:900px){
    .assignment-columns{grid-template-columns:1fr}
    .clock-settings-layout{grid-template-columns:1fr}
    .clock-settings-nav{display:flex;overflow-x:auto;border-right:0;border-bottom:1px solid var(--border)}
    .clock-settings-nav button{white-space:nowrap}
    .notification-matrix{grid-template-columns:minmax(130px,1fr) repeat(3,58px)}
}
@media(max-width:620px){
    .time-clock-toolbar{align-items:stretch;flex-direction:column}
    .time-clock-toolbar .search-control,.time-clock-toolbar .button{width:100%}
    .time-clock-grid{grid-template-columns:1fr}
    .break-row{grid-template-columns:1fr 90px}
    .break-row .check-control{grid-column:1}
    .settings-option-builder__heading{align-items:stretch;flex-direction:column}
    .settings-option-row{grid-template-columns:1fr auto}
    .settings-option-row__label{grid-column:1/-1}
    .clock-settings-content{padding:14px 12px 24px}
    .time-clock-card-field-grid{grid-template-columns:1fr}
    .time-clock-setting-card{align-items:flex-start;flex-direction:column}
    .time-clock-behaviour-summary__grid{grid-template-columns:1fr}
    .time-clock-minute-control{align-items:flex-start;flex-direction:column}
    .time-clock-minute-control input{width:100%}
}


.auth-page{min-height:100vh;margin:0;color:var(--text);background:var(--background)}
.auth-shell{display:grid;min-height:100vh;place-items:center;padding:24px}
.auth-card{width:min(100%,440px);padding:30px;border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--surface);box-shadow:var(--shadow-md)}
.auth-brand{display:flex;align-items:center;gap:12px;margin-bottom:30px}.auth-brand .brand-mark{display:grid;width:48px;height:48px;place-items:center;border-radius:14px;color:#fff;background:var(--accent);font-weight:800}.auth-brand div{display:grid;gap:2px}.auth-brand strong{font-size:17px}.auth-brand span:last-child{color:var(--muted);font-size:13px}.auth-heading h1{margin:0 0 6px;font-size:28px;font-weight:700}.auth-heading p{margin:0 0 24px;color:var(--muted)}.auth-form{display:grid;gap:18px}.auth-submit{width:100%;margin-top:4px}


[hidden] {
    display: none !important;
}

.confirmation-dialog[hidden] {
    display: none !important;
}


.user-detail-page {
    min-width: 0;
}

.user-detail-header {
    display: flex;
    min-height: 76px;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
}

.user-detail-header__identity {
    display: flex;
    min-width: 0;
    flex: 1;
    align-items: center;
    gap: 11px;
}

.user-detail-header h1 {
    margin: 0;
    font-size: 20px;
}

.user-detail-header p {
    margin: 2px 0 0;
    color: var(--muted);
}

.user-detail-layout {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 18px;
    margin-top: 18px;
    min-height: calc(100vh - var(--topbar-height) - 142px);
}

.user-profile-panel {
    position: sticky;
    top: 0;
    align-self: start;
    height: calc(100vh - var(--topbar-height) - 36px);
    overflow: hidden;
    padding: 16px;
}

.profile-panel-scroll {
    height: calc(100% - 190px);
    overflow-y: auto;
    padding-right: 5px;
}

.profile-avatar-wrap {
    display: grid;
    justify-items: center;
    gap: 4px;
    margin-bottom: 14px;
    text-align: center;
}

.profile-avatar {
    position: relative;
    display: grid;
    width: 88px;
    height: 88px;
    overflow: hidden;
    place-items: center;
    border-radius: 50%;
    color: white;
    background: var(--primary);
    font-size: 24px;
    font-weight: 700;
    cursor: pointer;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar--small {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    font-size: 13px;
}

.profile-avatar__overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 3px;
    color: white;
    background: rgba(13, 31, 53, .72);
    font-size: 11px;
    opacity: 0;
    transition: opacity 160ms ease;
}

.profile-avatar:hover .profile-avatar__overlay,
.profile-avatar:focus-within .profile-avatar__overlay {
    opacity: 1;
}

.profile-search {
    width: 100%;
    margin-bottom: 14px;
}

.profile-section {
    padding: 16px 2px;
    border-top: 1px solid var(--border);
}

.profile-section:first-child {
    border-top: 0;
}

.profile-section h2 {
    margin: 0 0 14px;
    font-size: 15px;
}

.profile-section .field {
    margin-bottom: 12px;
}

.profile-section .field:last-child {
    margin-bottom: 0;
}

.profile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.badge {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    padding: 0 10px;
    border-radius: 8px;
    color: var(--text);
    background: var(--hover);
    font-size: 12px;
    font-weight: 700;
}

.muted {
    color: var(--muted);
}

.usage-list dl {
    margin: 0;
}

.usage-list dl > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(110px, 1fr);
    align-items: center;
    gap: 8px;
    min-height: 42px;
    border-bottom: 1px solid var(--border);
}

.usage-list dt {
    color: var(--muted);
    font-size: 12px;
}

.usage-list dd {
    margin: 0;
    text-align: right;
    font-size: 12px;
    font-weight: 700;
}

.usage-list input {
    width: 100%;
    height: 32px;
    padding: 0 8px;
    border: 1px solid transparent;
    border-radius: 7px;
    text-align: right;
}

.usage-list input:focus {
    border-color: var(--primary);
    outline: none;
}

.user-detail-main {
    min-width: 0;
    overflow: hidden;
}

.user-detail-tabs {
    display: flex;
    min-height: 54px;
    overflow-x: auto;
    border-bottom: 1px solid var(--border);
}

.user-detail-tabs button {
    position: relative;
    min-width: max-content;
    min-height: 54px;
    padding: 0 18px;
    border: 0;
    color: var(--muted);
    background: transparent;
    font-weight: 700;
    cursor: pointer;
}

.user-detail-tabs button.is-active {
    color: var(--primary);
}

.user-detail-tabs button.is-active::after {
    content: "";
    position: absolute;
    right: 12px;
    bottom: 0;
    left: 12px;
    height: 2px;
    background: var(--primary);
}

.user-tab-panel {
    padding: 24px;
}

.content-heading {
    margin-bottom: 16px;
}

.content-heading h2 {
    margin: 0;
    font-size: 20px;
}

.content-heading p {
    margin: 4px 0 0;
    color: var(--muted);
}

.content-heading--actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.compensation-card {
    max-width: 760px;
}

.activity-timeline {
    display: grid;
    gap: 0;
}

.activity-timeline article {
    position: relative;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 12px;
    padding-bottom: 22px;
}

.activity-timeline article::before {
    content: "";
    position: absolute;
    top: 15px;
    bottom: 0;
    left: 6px;
    width: 1px;
    background: var(--border);
}

.activity-timeline article:last-child::before {
    display: none;
}

.activity-timeline__dot {
    position: relative;
    z-index: 1;
    width: 13px;
    height: 13px;
    margin-top: 3px;
    border: 3px solid var(--surface);
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}

.activity-timeline p,
.activity-timeline small {
    margin: 3px 0 0;
    color: var(--muted);
}

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

.note-card {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.note-card > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.note-card small {
    color: var(--muted);
}

.note-card p {
    margin: 12px 0;
    line-height: 1.55;
}

.profile-data-table {
    display: grid;
    min-width: 900px;
}

.profile-data-row {
    display: grid;
    grid-template-columns: minmax(220px, 2fr) 150px 140px 170px 180px;
    align-items: center;
    min-height: 62px;
    border-bottom: 1px solid var(--border);
}

.profile-data-row > span {
    min-width: 0;
    padding: 10px 12px;
}

.profile-data-row small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
}

.profile-data-row--header {
    min-height: 46px;
    border-radius: 10px;
    background: #f4f6f8;
    font-size: 12px;
    font-weight: 700;
}

.toggle-control {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.toggle-control input {
    position: absolute;
    opacity: 0;
}

.toggle-control span {
    position: relative;
    width: 38px;
    height: 22px;
    border-radius: 999px;
    background: #cbd4df;
    transition: background 150ms ease;
}

.toggle-control span::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
    transition: transform 150ms ease;
}

.toggle-control input:checked + span {
    background: var(--success);
}

.toggle-control input:checked + span::after {
    transform: translateX(16px);
}

.toggle-control b {
    font-size: 12px;
}

.row-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.button-link.is-danger {
    color: var(--error);
}

.profile-small-drawer {
    min-height: 360px;
}

@media (max-width: 1050px) {
    .user-detail-layout {
        grid-template-columns: 270px minmax(0, 1fr);
    }
}

@media (max-width: 820px) {
    .user-detail-layout {
        grid-template-columns: 1fr;
    }

    .user-profile-panel {
        position: static;
        height: auto;
    }

    .profile-panel-scroll {
        height: auto;
        max-height: 620px;
    }

    .user-detail-header {
        flex-wrap: wrap;
    }

    .user-detail-header .button-primary {
        width: 100%;
    }
}


.login-status-card {
    margin-bottom: 20px;
}

.login-status-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.login-status-grid > div,
.security-recipient-summary > div {
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.login-status-grid span,
.security-recipient-summary span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.login-status-grid strong,
.security-recipient-summary strong {
    min-width: 0;
    overflow-wrap: anywhere;
}

.delivery-choice-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 16px;
}

.security-recipient-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.inline-form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 18px;
}

@media (max-width: 980px) {
    .login-status-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .login-status-grid,
    .security-recipient-summary {
        grid-template-columns: 1fr;
    }

    .inline-form-actions .button {
        width: 100%;
    }
}


.status-pill {
    display: inline-flex;
    min-height: 25px;
    align-items: center;
    padding: 0 9px;
    border-radius: 999px;
    color: var(--muted);
    background: var(--hover);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.status-pill--approved {
    color: #146346;
    background: color-mix(in srgb, var(--success) 14%, white);
}

.status-pill--pending,
.status-pill--pending-approval {
    color: #795500;
    background: color-mix(in srgb, var(--warning) 16%, white);
}

.status-pill--blocked {
    color: #8d2431;
    background: color-mix(in srgb, var(--error) 12%, white);
}

.status-pill--not-registered {
    color: var(--muted);
    background: var(--hover);
}

.profile-subtabs {
    display: flex;
    gap: 4px;
    margin: 0 0 20px;
    padding: 4px;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f6f8fa;
}

.profile-subtabs button {
    min-height: 40px;
    min-width: max-content;
    padding: 0 14px;
    border: 0;
    border-radius: 9px;
    color: var(--muted);
    background: transparent;
    font-weight: 650;
    cursor: pointer;
}

.profile-subtabs button:hover,
.profile-subtabs button:focus-visible {
    color: var(--text);
    background: var(--hover);
    outline: none;
}

.profile-subtabs button.is-active {
    color: var(--primary);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.device-subpanel[hidden] {
    display: none !important;
}

.device-subpanel.is-active {
    display: block;
}

.profile-data-table--devices .profile-data-row,
.profile-data-table--sessions .profile-data-row,
.profile-data-table--verification .profile-data-row {
    grid-template-columns:
        minmax(230px, 2fr)
        minmax(120px, 1fr)
        minmax(145px, 1fr)
        minmax(115px, 1fr)
        minmax(190px, 1.2fr);
}

@media (max-width: 980px) {
    .profile-subtabs {
        margin-right: -8px;
        margin-left: -8px;
        border-right: 0;
        border-left: 0;
        border-radius: 0;
    }
}


.groups-page-heading {
    margin-bottom: 18px;
}

.groups-workspace {
    overflow: hidden;
}

.groups-toolbar {
    display: flex;
    min-height: 66px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.groups-toolbar__right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.groups-toolbar__right .search-control {
    width: 260px;
}

.groups-collapse-all {
    gap: 8px;
}

.groups-collapse-all .icon {
    width: 16px;
    height: 16px;
}

.group-segments {
    display: grid;
    gap: 14px;
    padding: 16px;
}

.group-segment {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.group-segment__header {
    display: flex;
    min-height: 54px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 16px;
}

.group-segment__toggle {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
    border: 0;
    color: var(--primary);
    background: transparent;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.group-segment__toggle .icon {
    width: 15px;
    height: 15px;
    transition: transform 160ms ease;
}

.group-segment.is-collapsed .group-segment__toggle .icon {
    transform: rotate(-90deg);
}

.group-segment__colour {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--information);
}

.group-segment__count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
}

.group-segment__count .icon {
    width: 15px;
    height: 15px;
}

.group-segment__body {
    padding: 0 14px 14px;
}

.group-table {
    display: grid;
    grid-template-columns:
        38px
        minmax(max-content, 1.25fr)
        max-content
        minmax(max-content, .9fr)
        minmax(180px, 1.4fr);
    align-items: center;
    min-height: 44px;
}

.group-table > span {
    min-width: 0;
    padding: 7px 12px;
    font-size: 12px;
}

.group-table--header {
    border-radius: 10px;
    color: var(--text);
    background: #f5f6f7;
    font-size: 11px;
    font-weight: 600;
}

.group-table--row {
    border-bottom: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
}

.group-table--row:hover {
    background: var(--hover);
}

.group-table--row small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
}

.connected-count {
    color: var(--primary);
    font-weight: 650;
}

.add-group-link {
    margin-top: 10px;
}

.segment-empty-state {
    padding: 22px 10px 10px;
    color: var(--muted);
    text-align: center;
}

.group-builder-drawer {
    height: min(860px, calc(100vh - 24px));
}

.group-builder-body {
    position: relative;
    padding-bottom: 90px;
}

.group-builder-progress {
    display: flex;
    max-width: 620px;
    align-items: center;
    justify-content: center;
    gap: 60px;
    margin: 0 auto 28px;
    padding: 14px;
    border-bottom: 1px solid var(--border);
}

.group-builder-progress span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
}

.group-builder-progress b {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border: 2px solid var(--border);
    border-radius: 50%;
}

.group-builder-progress span.is-active {
    color: var(--primary);
}

.group-builder-progress span.is-active b,
.group-builder-progress span.is-complete b {
    border-color: var(--primary);
    color: white;
    background: var(--primary);
}

.group-builder-step[hidden] {
    display: none !important;
}

.group-builder-centre {
    display: grid;
    width: min(440px, 100%);
    gap: 14px;
    margin: 55px auto;
}

.group-builder-icon {
    display: grid;
    width: 58px;
    height: 58px;
    margin: 0 auto 8px;
    place-items: center;
    border-radius: 50%;
    color: var(--primary);
    background: var(--active);
}

.group-builder-icon .icon {
    width: 28px;
    height: 28px;
}

.group-selection-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.group-selection-heading h3 {
    margin: 0;
}

.group-selection-heading p {
    margin: 4px 0 0;
    color: var(--muted);
}

.group-selection-heading .search-control {
    width: 280px;
}

.group-user-table {
    min-width: 900px;
}

.group-user-row {
    display: grid;
    grid-template-columns:
        minmax(160px, 1fr)
        minmax(160px, 1fr)
        minmax(150px, .9fr)
        minmax(180px, 1fr)
        minmax(160px, 1fr);
    min-height: 48px;
    align-items: center;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
}

.group-user-row > span {
    min-width: 0;
    padding: 8px 12px;
}

.group-user-row input {
    position: absolute;
    opacity: 0;
}

.group-user-row--header {
    border-radius: 10px;
    background: #f4f6f8;
    font-size: 12px;
    font-weight: 700;
    cursor: default;
}

.group-user-row:hover,
.group-user-row.is-selected {
    border-radius: 10px;
    background: var(--active);
}

.group-summary-card {
    width: min(520px, 100%);
    margin: 45px auto;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-align: center;
}

.group-summary-card h3 {
    margin: 12px 0 4px;
    font-size: 24px;
}

.group-summary-card > p {
    margin: 0 0 22px;
    color: var(--muted);
}

.group-summary-card dl {
    margin: 0;
}

.group-summary-card dl div {
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border);
}

.group-summary-card dt {
    color: var(--muted);
}

.group-summary-card dd {
    margin: 0;
    font-weight: 700;
}

.drawer__footer-spacer {
    flex: 1;
}

.app-modal {
    position: fixed;
    z-index: 3300;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(18, 31, 48, .52);
}

.app-modal[hidden] {
    display: none !important;
}

.app-modal__panel {
    width: min(520px, 100%);
    max-height: calc(100vh - 40px);
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-md);
}

.app-modal__panel--medium {
    width: min(640px, 100%);
}

.app-modal__header {
    display: flex;
    min-height: 74px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
}

.app-modal__header h2 {
    margin: 0;
}

.app-modal__header p {
    margin: 3px 0 0;
    color: var(--muted);
}

.app-modal__body {
    max-height: calc(100vh - 210px);
    overflow-y: auto;
    padding: 20px;
}

.app-modal__footer {
    display: flex;
    min-height: 70px;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 18px;
    border-top: 1px solid var(--border);
}

.group-choice-list {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.group-choice-list label {
    display: flex;
    min-height: 58px;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
}

.group-choice-list label:hover {
    background: var(--hover);
}

.group-choice-list input {
    width: 17px;
    height: 17px;
    accent-color: var(--primary);
}

.group-choice-list span {
    display: grid;
    gap: 3px;
}

.group-choice-list small {
    color: var(--muted);
}

.group-modal-search {
    width: 100%;
}

.compact-empty-state {
    min-height: 230px;
}

.group-dashboard-header {
    padding: 18px;
}

.group-dashboard-header h1 {
    margin: 10px 0 2px;
    font-size: 23px;
    font-weight: 650;
}

.group-dashboard-header p {
    margin: 0;
    color: var(--muted);
}

.group-dashboard-cards {
    display: grid;
    grid-template-columns: 1fr 1fr 1.35fr;
    gap: 16px;
    margin-top: 16px;
}

.group-stat-card {
    display: grid;
    min-height: 120px;
    align-content: center;
    gap: 6px;
    padding: 20px;
}

.group-stat-card strong {
    font-size: 24px;
    font-weight: 650;
}

.group-stat-card strong small {
    font-size: 15px;
}

.group-stat-card span {
    color: var(--muted);
}

.group-stat-card--wide {
    align-content: center;
}

.group-stat-card--wide strong {
    font-size: 15px;
}

.group-dashboard-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 16px;
}

.group-activity-card,
.group-engagement-card {
    min-height: 360px;
    padding: 18px;
}

.group-activity-card header h2,
.group-engagement-card header h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 650;
}

.group-engagement-card header p {
    margin: 4px 0 0;
    color: var(--muted);
}

.group-activity-list {
    display: grid;
    max-height: 290px;
    margin-top: 18px;
    overflow-y: auto;
}

.group-activity-list article {
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr);
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.group-activity-dot {
    width: 8px;
    height: 8px;
    margin-top: 6px;
    border-radius: 50%;
    background: var(--primary);
}

.group-activity-list p {
    margin: 3px 0;
}

.group-activity-list small {
    color: var(--muted);
}

.engagement-chart {
    display: flex;
    height: 250px;
    align-items: flex-end;
    gap: 8px;
    margin-top: 28px;
    padding: 0 4px 24px;
    border-bottom: 1px solid var(--border);
}

.engagement-chart__column {
    display: grid;
    height: 100%;
    min-width: 0;
    flex: 1;
    align-items: end;
    justify-items: center;
    gap: 7px;
}

.engagement-chart__column span {
    width: min(22px, 80%);
    min-height: 4px;
    border-radius: 7px 7px 2px 2px;
    background: var(--primary);
}

.engagement-chart__column small {
    color: var(--muted);
    font-size: 10px;
    transform: rotate(-40deg);
    white-space: nowrap;
}

.group-members-card {
    margin-top: 16px;
    overflow: hidden;
}

.group-members-toolbar {
    display: flex;
    min-height: 78px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
}

.group-members-toolbar h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 650;
}

.group-members-toolbar p {
    margin: 3px 0 0;
    color: var(--muted);
}

.group-members-toolbar .search-control {
    width: 260px;
}

.group-members-table td a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

@media (max-width: 950px) {
    .group-dashboard-cards,
    .group-dashboard-panels {
        grid-template-columns: 1fr;
    }

    .groups-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .groups-toolbar__right {
        align-items: stretch;
        flex-direction: column;
    }

    .groups-toolbar__right .search-control {
        width: 100%;
    }

    .group-selection-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .group-selection-heading .search-control {
        width: 100%;
    }
}

@media (max-width: 650px) {
    .group-builder-progress {
        gap: 10px;
        justify-content: space-between;
    }

    .group-builder-progress span {
        display: grid;
        justify-items: center;
        text-align: center;
    }

    .app-modal {
        padding: 10px;
    }

    .group-members-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .group-members-toolbar .search-control {
        width: 100%;
    }
}


.pay-rate-effective-date{max-width:260px;margin-bottom:18px}
.pay-rate-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.pay-rate-card{display:flex;min-height:96px;align-items:center;justify-content:space-between;gap:18px;padding:16px;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--surface)}
.pay-rate-card>div,.pay-rate-card label{display:grid;gap:4px}
.pay-rate-card>div span,.pay-rate-card label>span{color:var(--muted);font-size:12px}
.pay-rate-card label{width:145px}
.currency-input{display:flex;height:var(--control-height);align-items:center;overflow:hidden;border:1px solid var(--border-strong);border-radius:var(--radius-md);background:var(--surface)}
.currency-input:focus-within{border-color:var(--primary);box-shadow:0 0 0 3px color-mix(in srgb,var(--primary) 15%,transparent)}
.currency-input b{padding-left:12px;font-weight:600}
.currency-input input{width:100%;height:100%;border:0;box-shadow:none}
.settings-information-box{display:flex;align-items:flex-start;gap:10px;margin-top:16px;padding:13px;border-radius:var(--radius-md);background:var(--active)}
.settings-information-box p{margin:0}
.payroll-schedule-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:16px}
.payroll-schedule-summary>div{display:grid;gap:5px;padding:13px;border:1px solid var(--border);border-radius:var(--radius-md);background:#fafbfc}
.payroll-schedule-summary span{color:var(--muted);font-size:12px}
.payroll-schedule-summary strong{font-size:17px;font-weight:650}
.payroll-schedule-note{margin:12px 0 0;color:var(--muted);font-size:12px}
.apprentice-control{min-height:var(--control-height);align-items:center;padding:0 12px;border:1px solid var(--border);border-radius:var(--radius-md)}
@media(max-width:760px){.pay-rate-grid,.payroll-schedule-summary{grid-template-columns:1fr}.pay-rate-card{align-items:stretch;flex-direction:column}.pay-rate-card label{width:100%}}


/* Canonical Time Off module */
.time-off-heading {
    display: flex;
    min-height: 86px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
    padding: 18px 24px;
}

.time-off-heading h1 {
    margin: 0;
    font-size: 27px;
}

.time-off-heading-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.time-off-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: start;
    gap: 16px;
}

.time-off-main-card,
.policy-panel {
    padding: 0;
}

.time-off-toolbar {
    position: relative;
    display: flex;
    min-height: 72px;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}

.time-off-toolbar .search-control {
    width: 260px;
    flex: 0 0 260px;
}

.date-range-button {
    min-width: 210px;
    justify-content: space-between;
}

.time-off-policy-filter {
    width: 196px;
    min-width: 196px;
    min-height: 42px;
    padding-left: 14px;
    padding-right: 42px;
    border-radius: 12px;
    color: var(--ink);
    font-weight: 600;
}

.date-range-popover {
    position: absolute;
    z-index: 70;
    top: 66px;
    left: 286px;
    width: 440px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-lg);
}

.popover-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}

.time-off-main-card .table-scroll {
    min-height: 0;
    overflow-x: auto;
}

.time-off-table {
    width: 100%;
    min-width: 780px;
    table-layout: fixed;
}

.time-off-table th,
.time-off-table td {
    height: 46px;
}

.time-off-table th:nth-child(2),
.time-off-table td:nth-child(2) {
    width: 245px;
    min-width: 245px;
    padding-right: 32px;
    border-right: 1px solid var(--border);
}

.time-off-table th:nth-child(3),
.time-off-table td:nth-child(3) {
    width: 220px;
    min-width: 220px;
    padding-left: 28px;
    padding-right: 32px;
}

.time-off-table th:nth-child(4),
.time-off-table td:nth-child(4) {
    width: auto;
    min-width: 280px;
    padding-left: 32px;
}

.time-off-table tbody tr {
    cursor: pointer;
}

.time-off-table tbody tr:hover {
    background: var(--hover);
}

.time-off-main-card .table-pagination {
    display: flex;
    min-height: 64px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-top: 1px solid var(--border);
}

.time-off-policies {
    display: grid;
    align-content: start;
}

.policy-panel,
.policy-type-block,
.policy-list {
    overflow: visible;
}

.policy-panel__header {
    display: flex;
    min-height: 72px;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}

.policy-panel__header h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 17px;
}

.policy-dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--success);
}

.policy-type-block + .policy-type-block {
    border-top: 1px solid var(--border);
}

.policy-type-heading {
    display: flex;
    min-height: 52px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px 8px;
}

.policy-type-heading__name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.policy-type-heading__menu {
    flex: 0 0 auto;
    margin-left: auto;
}

.policy-type-empty {
    padding: 0 16px 14px;
    color: var(--muted);
    font-size: 13px;
}

.policy-list {
    padding: 0 12px 12px;
}

.policy-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 38px;
    align-items: center;
    border-bottom: 1px solid var(--border);
    background: #f7f8f9;
}

.policy-row:first-child {
    border-radius: 10px 10px 0 0;
}

.policy-row:last-child {
    border-bottom: 0;
    border-radius: 0 0 10px 10px;
}

.policy-row:only-child {
    border-radius: 10px;
}

.policy-row__main {
    display: grid;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px 6px 12px 14px;
    border: 0;
    color: var(--text);
    background: transparent;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.policy-row__main:hover {
    color: var(--primary);
}

.policy-row__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.policy-row__members {
    color: var(--muted);
    font-size: 13px;
    white-space: nowrap;
}

.native-policy-menu {
    position: relative;
    display: grid;
    place-items: center;
}

.native-policy-menu > summary {
    display: grid;
    width: 32px;
    height: 32px;
    list-style: none;
    place-items: center;
    border-radius: 50%;
    cursor: pointer;
}

.native-policy-menu > summary::-webkit-details-marker {
    display: none;
}

.native-policy-menu > summary span {
    font-size: 24px;
    line-height: 1;
}

.native-policy-menu .policy-action-menu {
    position: absolute;
    z-index: 2100;
    top: calc(100% + 5px);
    right: 0;
    display: none;
    width: 245px;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-lg);
}

.native-policy-menu[open] .policy-action-menu {
    display: block;
}

.native-policy-menu .policy-action-menu button,
.native-policy-menu .policy-action-menu .policy-menu-link {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border: 0;
    border-radius: var(--radius-sm);
    color: var(--text);
    background: transparent;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.native-policy-menu .policy-action-menu button:hover,
.native-policy-menu .policy-action-menu .policy-menu-link:hover {
    background: var(--active);
}

.native-policy-menu .policy-action-menu .policy-menu-link {
    border-radius: var(--radius-sm);
    color: var(--text);
    text-decoration: none;
}

.native-policy-menu .policy-action-menu .danger {
    color: var(--danger);
}

.time-off-manual-drawer {
    overflow: hidden;
}

.manual-time-off-body {
    display: grid;
    align-content: start;
    gap: 18px;
}

.manual-time-off-balance {
    display: grid;
    gap: 8px;
    padding: 16px;
    border-radius: 14px;
    background: var(--hover);
}

.manual-time-off-balance > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.manual-time-off-balance strong {
    font-size: 18px;
}

.manual-time-off-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.manual-time-off-toggle-row > div,
.checkbox-row > span {
    display: grid;
    gap: 3px;
}

.manual-time-off-toggle-row small,
.manual-time-off-balance small,
.manual-time-off-body .field > small,
.checkbox-row small {
    color: var(--muted);
}

.manual-amount-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
}

.manual-amount-control > span {
    min-width: 54px;
    color: var(--muted);
    font-weight: 650;
}

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.time-off-policy-drawer {
    height: min(88vh, 920px);
}

.time-off-policy-drawer .drawer__body {
    padding: 28px 32px 36px;
}

.time-off-policy-footer {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
}

.time-off-policy-footer [data-policy-next],
.time-off-policy-footer [data-policy-back] {
    width: auto;
    min-width: 104px;
}

.time-off-policy-footer [data-policy-next] {
    justify-self: end;
}

.time-off-policy-footer [data-policy-back] {
    justify-self: start;
}

.policy-wizard-page {
    width: min(100%, 760px);
    margin: 0 auto;
}

.policy-form-narrow {
    width: min(100%, 680px);
    margin: 0 auto;
}

.policy-form-narrow .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.policy-limit-options {
    display: grid;
    justify-items: start;
    gap: 10px;
}

.policy-limit-options h4 {
    margin: 0 0 2px;
}

.policy-limit-options > label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.policy-work-week {
    display: grid;
    grid-template-columns: repeat(7, minmax(56px, 1fr));
    gap: 8px;
    margin-top: 18px;
}

.policy-work-week > h4 {
    grid-column: 1 / -1;
}

.policy-work-week .work-day {
    display: grid;
    justify-items: center;
    gap: 8px;
}

.policy-work-week .work-day label {
    display: grid;
    justify-items: center;
}

.policy-work-week .work-day label > span {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 50%;
}

.policy-work-week .work-day input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.policy-work-week .work-day label:has(input:checked) > span {
    color: #fff;
    border-color: var(--primary);
    background: var(--primary);
}

.policy-work-week .work-day input[type="number"] {
    width: 64px;
    height: 40px;
    text-align: center;
}


.request-rule {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 80px 100px auto;
    align-items: center;
    gap: 8px;
    margin: 12px 0;
}


.policy-assign-page {
    width: min(100%, 980px);
}

.policy-assign-section {
    display: grid;
    gap: 18px;
}

.policy-assign-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.policy-assign-heading h3,
.policy-assign-heading p {
    margin: 0;
}

.policy-assign-heading p {
    margin-top: 5px;
    color: var(--muted);
}

.policy-default-control {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-width: 210px;
}

.policy-default-switch {
    flex: 0 0 44px;
}

.policy-default-label {
    color: var(--text);
    font-size: 13px;
    font-weight: 650;
    line-height: 1.3;
    white-space: nowrap;
}

.policy-assign-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.policy-assign-toolbar .search-control {
    width: min(360px, 100%);
}

.policy-selected-count {
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
}

.policy-user-table {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.policy-user-table__header,
.policy-user-row {
    display: grid;
    grid-template-columns: 48px minmax(220px, 1fr) minmax(160px, .7fr);
    align-items: center;
}

.policy-user-table__header {
    min-height: 48px;
    padding: 0 14px;
    background: var(--hover);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.policy-user-table__body {
    max-height: 430px;
    overflow: auto;
}

.policy-user-row {
    min-height: 58px;
    padding: 0 14px;
    border-top: 1px solid var(--border);
    cursor: pointer;
    transition: background .15s ease;
}

.policy-user-row:hover {
    background: var(--hover);
}

.policy-user-row:has(input[data-policy-user]:checked) {
    background: var(--active);
}

.policy-user-checkbox {
    display: grid;
    place-items: center;
}

.policy-user-checkbox input {
    width: 17px;
    height: 17px;
    accent-color: var(--primary);
}

.policy-user-name-cell {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 11px;
    font-weight: 650;
}

.policy-user-avatar {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 750;
}

.policy-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.policy-user-last-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.wizard-steps {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    color: var(--muted);
    font-size: 12px;
}

.wizard-steps span.is-active {
    color: var(--primary);
    font-weight: 650;
}


/* Canonical Time Off policy assignment balance rows */
[data-starting-balance-list] {
    display: grid;
    width: min(100%, 760px);
    gap: 12px;
    margin-top: 18px;
}

.starting-balance-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 210px;
    align-items: center;
    gap: 24px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
}

.starting-balance-employee {
    display: grid;
    min-width: 0;
    gap: 7px;
}

.starting-balance-name {
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
}

.starting-balance-current {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 9px;
    color: var(--muted);
    font-size: 12px;
}

.starting-balance-current > span {
    font-weight: 650;
}

.starting-balance-current strong {
    color: var(--text);
    font-size: 13px;
    font-weight: 750;
}

.starting-balance-current small {
    color: var(--muted);
    font-size: 11px;
}

.starting-balance-field {
    display: grid;
    width: 100%;
    gap: 4px;
    margin: 0;
}

.starting-balance-field > span:first-child {
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
}

.starting-balance-field > small {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.3;
}

.starting-balance-input {
    display: flex;
    align-items: center;
    gap: 8px;
}

.starting-balance-input input {
    width: 128px;
    min-width: 0;
    height: 40px;
    padding: 0 10px;
    text-align: right;
}

.starting-balance-input > span {
    min-width: 42px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
}

@media (max-width: 1050px) {
    .time-off-layout {
        grid-template-columns: 1fr;
    }

    .time-off-policies {
        grid-row: 1;
    }
}

@media (max-width: 760px) {
    .time-off-heading,
    .time-off-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .time-off-heading-actions {
        margin-left: 0;
    }

    .time-off-toolbar .search-control,
    .date-range-button,
    .time-off-policy-filter {
        width: 100%;
        min-width: 0;
        flex-basis: auto;
    }

    .date-range-popover {
        top: 180px;
        right: 12px;
        left: 12px;
        width: auto;
    }

    .time-off-policy-drawer {
        right: 6px;
        bottom: 6px;
        left: 6px;
        height: calc(100vh - 12px);
    }

    .time-off-policy-drawer .drawer__body {
        padding: 22px 16px 28px;
    }

    .policy-work-week {
        grid-template-columns: repeat(4, minmax(56px, 1fr));
    }

    .choice-cards,
    .limitation-row,
    .starting-balance-row {
        grid-template-columns: 1fr;
    }

    .starting-balance-row {
        gap: 14px;
        padding: 14px;
    }

    .starting-balance-field {
        width: min(100%, 220px);
    }

    .request-rule {
        grid-template-columns: 1fr 80px 100px;
    }


    .policy-assign-heading,
    .policy-assign-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .policy-default-control {
        width: 100%;
        min-width: 0;
        justify-content: flex-start;
    }

    .policy-assign-toolbar .search-control {
        width: 100%;
    }

    .policy-user-table__header,
    .policy-user-row {
        grid-template-columns: 42px minmax(180px, 1fr) minmax(110px, .7fr);
    }

    .request-rule span {
        grid-column: 1 / -1;
    }

    .wizard-steps {
        display: none;
    }
}


/* Modern Time Off policy wizard */
.policy-settings-section {
    display: grid;
    gap: 22px;
}

.wizard-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.wizard-section-heading h3 {
    margin: 3px 0 5px;
    font-size: 22px;
    letter-spacing: -0.02em;
}

.wizard-section-heading p,
.settings-card p,
.limitation-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}

.wizard-eyebrow {
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.modern-choice-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.modern-choice-card {
    position: relative;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 12px;
    min-height: 92px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.modern-choice-card:hover {
    border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
    box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
}

.modern-choice-card:has(input:checked) {
    border-color: var(--primary);
    background: color-mix(in srgb, var(--primary) 8%, white);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent);
}

.modern-choice-card > input {
    position: absolute;
    opacity: 0;
}

.choice-card-radio {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    border: 2px solid var(--border-strong, #cbd5e1);
    border-radius: 50%;
    background: #fff;
}

.modern-choice-card:has(input:checked) .choice-card-radio {
    border: 5px solid var(--primary);
}

.choice-card-copy {
    display: grid;
    gap: 5px;
}

.choice-card-copy strong {
    font-size: 15px;
}

.choice-card-copy small {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

.policy-settings-stack {
    display: grid;
    gap: 14px;
}

.settings-card {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #f8fafc;
}

.settings-card__heading,
.settings-card--split {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.settings-card__heading {
    margin-bottom: 16px;
}

.settings-card h4 {
    margin: 0 0 4px;
    font-size: 15px;
}

.settings-card--split .settings-card__copy {
    min-width: 0;
    flex: 1 1 auto;
}

.settings-card__control {
    width: min(330px, 45%);
    margin: 0;
}

.policy-compact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.amount-earned-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    align-items: end;
    gap: 18px;
}

.modern-radio-list {
    display: grid;
    gap: 10px;
}

.modern-radio-list label {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
}

.amount-earned-control {
    margin: 0;
}

.ratio-builder {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: end;
    gap: 14px;
}

.ratio-builder__text {
    padding-bottom: 14px;
    color: var(--muted);
    font-weight: 600;
}

.settings-card--options {
    display: grid;
    gap: 0;
}

.settings-card--options > h4 {
    margin-bottom: 10px;
}

.modern-check-row {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    padding: 14px 0;
    border-top: 1px solid var(--border);
}

.modern-check-row span {
    display: grid;
    gap: 3px;
}

.modern-check-row small {
    color: var(--muted);
    line-height: 1.4;
}

.limitation-card-list {
    display: grid;
    gap: 12px;
}

.limitation-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #f8fafc;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.limitation-card:has([data-limitation-toggle]:checked) {
    border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
    box-shadow: 0 8px 22px rgba(15, 23, 42, .05);
}

.limitation-card__copy strong {
    display: block;
    margin-bottom: 4px;
    font-size: 15px;
}

.limitation-card__value {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 110px minmax(0, 240px);
    align-items: center;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.limitation-card__value[hidden] {
    display: none;
}

.switch-control {
    position: relative;
    display: inline-flex;
    width: 44px;
    height: 24px;
    cursor: pointer;
}

.switch-control input {
    position: absolute;
    opacity: 0;
}

.switch-control span {
    width: 100%;
    border-radius: 999px;
    background: #dbe2ea;
    transition: background .18s ease;
}

.switch-control span::after {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 5px rgba(15, 23, 42, .18);
    content: '';
    transition: transform .18s ease;
}

.switch-control input:checked + span {
    background: var(--primary);
}

.switch-control input:checked + span::after {
    transform: translateX(20px);
}

@media (max-width: 760px) {
    .modern-choice-cards,
    .policy-compact-grid,
    .amount-earned-layout,
    .ratio-builder {
        grid-template-columns: 1fr;
    }

    .settings-card--split {
        align-items: stretch;
        flex-direction: column;
    }

    .settings-card__control {
        width: 100%;
    }

    .ratio-builder__text {
        padding: 0;
    }

    .limitation-card__value {
        grid-template-columns: 1fr;
    }
}


.avatar img,
.user-avatar img,
.mini-avatar img,
.policy-user-avatar img,
.profile-avatar img {
    width: 100% !important;
    height: 100% !important;
    min-width: 100%;
    min-height: 100%;
    max-width: none !important;
    max-height: none !important;
    display: block;
    flex: none;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center center;
    border-radius: inherit;
}

body:has(.drawer.is-open) details.native-policy-menu[open] {
    display: none !important;
}


.balance-equivalent-note {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.3;
}


.time-off-history-drawer,
.time-off-edit-drawer {
    width: min(560px, calc(100vw - 24px));
}

.history-drawer-body,
.history-section,
.history-request-list {
    display: grid;
    gap: 16px;
}

.history-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.history-section-heading h3 {
    margin: 0;
    font-size: 18px;
}

.history-section-heading span {
    color: var(--muted);
    font-size: 13px;
}

.history-balance-grid {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(150px, 1fr)
    );
    gap: 12px;
}

.history-balance-card,
.request-recalculation-note {
    display: grid;
    gap: 7px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface-subtle);
}

.history-balance-card span,
.history-balance-card small,
.request-recalculation-note p {
    color: var(--muted);
}

.history-balance-card strong {
    font-size: 22px;
}

.history-request-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.history-request-card__header {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.history-request-card__header > div {
    display: grid;
    gap: 4px;
}

.history-request-card__header small {
    color: var(--muted);
}

.history-request-details {
    display: grid;
    margin: 0;
}

.history-request-details > div {
    display: grid;
    grid-template-columns: minmax(110px, .45fr) 1fr;
    gap: 16px;
    padding: 13px 16px;
    border-bottom: 1px solid var(--border);
}

.history-request-details dt {
    color: var(--muted);
}

.history-request-details dd {
    margin: 0;
    text-align: right;
    font-weight: 600;
}

.history-request-card__footer {
    display: flex;
    justify-content: flex-end;
    padding: 12px 16px;
}

.request-recalculation-note p {
    margin: 0;
    line-height: 1.5;
}

.time-off-table tbody tr[data-time-off-user-row] {
    cursor: pointer;
}

.time-off-table tbody tr[data-time-off-user-row]:hover {
    background: var(--surface-hover);
}

@media (max-width: 640px) {
    .history-request-details > div {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .history-request-details dd {
        text-align: left;
    }
}

.history-request-details dd small{display:block;margin-top:3px;color:var(--muted);font-weight:500;}


/* ============================================================
   GLOBAL AVATAR SHAPE SAFETY
   Enforces a true square crop before circular masking.
============================================================ */
.avatar,
.user-avatar,
.mini-avatar,
.policy-user-avatar,
.profile-avatar {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 50%;
    box-sizing: border-box;
}



/* Time Clock scheduled break rows */
.break-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 150px 92px auto 40px;
  gap: 10px;
  align-items: center;
}

.break-row input[type="time"],
.break-row input[type="number"],
.break-row input[type="text"] {
  width: 100%;
}

@media (max-width: 820px) {
  .break-row {
    grid-template-columns: 1fr 1fr;
  }

  .break-row .check-control {
    min-height: 42px;
  }
}


/* Global application brand logo */
.brand-logo--image {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    place-items: center;
    overflow: hidden;
    border-radius: 12px;
    background: transparent;
}

.brand-logo--image img {
    display: block;
    width: 40px;
    height: 40px;
    object-fit: contain;
}

@media (max-width: 900px) {
    .brand-logo--image,
    .brand-logo--image img {
        width: 38px;
        height: 38px;
    }

    .brand-logo--image {
        flex-basis: 38px;
    }
}


/* Settings > Branding logo upload */
.branding-logo-section {
    margin-bottom: 20px;
}

.branding-logo-upload {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.branding-logo-preview {
    display: grid;
    width: 132px;
    height: 92px;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #f6f8fb;
}

.branding-logo-preview img {
    display: block;
    max-width: 108px;
    max-height: 68px;
    object-fit: contain;
}

.branding-logo-controls {
    display: grid;
    gap: 14px;
}

.branding-logo-controls input[type="file"] {
    height: auto;
    min-height: 46px;
    padding: 10px;
}

.brand-logo--image img {
    object-fit: contain;
}

.brand-text {
    justify-content: center;
}

.brand-text strong {
    line-height: 1.2;
}

@media (max-width: 700px) {
    .branding-logo-upload {
        grid-template-columns: 1fr;
    }

    .branding-logo-preview {
        width: 100%;
        max-width: 220px;
    }
}


.settings-diagnostics-grid {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(190px, 1fr)
    );
    gap: 12px;
    margin-top: 16px;
}

.settings-diagnostics-grid article {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--hover);
}

.settings-diagnostics-grid span,
.settings-diagnostics-grid strong {
    display: block;
}

.settings-diagnostics-grid span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.settings-diagnostics-grid strong {
    margin-top: 6px;
    overflow-wrap: anywhere;
}


/* Canonical global Admin notification badges and bell drawer */
.nav-notification-badge{
    min-width:21px;
    height:21px;
    margin-left:auto;
    padding:0 6px;
    border:2px solid var(--sidebar-colour,#fff);
    border-radius:999px;
    background:var(--primary);
    color:#fff;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    font-size:10px;
    font-weight:850;
    line-height:1;
    box-shadow:0 3px 8px color-mix(in srgb,var(--primary) 22%,transparent);
}
.nav-notification-badge[hidden]{display:none!important}
.nav-link.is-active .nav-notification-badge{border-color:var(--active,#e5f2ff)}
.admin-notification-menu{position:relative;display:flex;align-items:center}
.admin-notification-bell{position:relative}
.admin-notification-bell__badge{
    position:absolute;
    top:-3px;
    right:-4px;
    min-width:19px;
    height:19px;
    padding:0 5px;
    border:2px solid var(--topbar-colour,#fff);
    border-radius:999px;
    background:var(--error);
    color:#fff;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    font-size:9px;
    font-weight:850;
    line-height:1;
}
.admin-notification-bell__badge[hidden]{display:none!important}
.admin-notification-drawer{
    position:absolute;
    z-index:2600;
    top:calc(100% + 10px);
    right:0;
    width:min(390px,calc(100vw - 24px));
    max-height:min(640px,calc(100vh - var(--topbar-height) - 24px));
    overflow:hidden;
    border:1px solid var(--border);
    border-radius:var(--radius-lg);
    background:var(--surface);
    box-shadow:var(--shadow-md)
}
.admin-notification-drawer[hidden]{display:none!important}
.admin-notification-drawer__header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:14px 14px 12px;
    border-bottom:1px solid var(--border)
}
.admin-notification-drawer__header>div:first-child{min-width:0;display:grid;gap:2px}
.admin-notification-drawer__header strong{font-size:15px}
.admin-notification-drawer__header span{color:var(--muted);font-size:11px}
.admin-notification-drawer__actions{display:flex;align-items:center;gap:6px}
.admin-notification-drawer__actions .button-small{min-height:34px;padding:0 10px;font-size:11px}
.admin-notification-list{max-height:min(540px,calc(100vh - var(--topbar-height) - 104px));overflow:auto;padding:8px}
.admin-notification-item{
    position:relative;
    width:100%;
    display:grid;
    gap:4px;
    padding:12px 13px 12px 16px;
    border:0;
    border-radius:12px;
    background:transparent;
    color:var(--text);
    text-align:left;
    cursor:pointer
}
.admin-notification-item:hover,.admin-notification-item:focus-visible{background:var(--hover);outline:none}
.admin-notification-item.is-unread{background:color-mix(in srgb,var(--primary) 7%,var(--surface))}
.admin-notification-item.is-unread::before{content:"";position:absolute;left:6px;top:18px;width:5px;height:5px;border-radius:50%;background:var(--primary)}
.admin-notification-item strong{font-size:12px;line-height:1.3}
.admin-notification-item span{color:var(--muted);font-size:12px;line-height:1.4;overflow-wrap:anywhere}
.admin-notification-item small{color:var(--muted);font-size:10px}
.admin-notification-empty{padding:34px 18px;text-align:center;color:var(--muted);font-size:12px}
.admin-notification-empty.is-error{color:var(--error)}
.notification--interactive{cursor:pointer}
.notification--interactive:focus-visible{outline:3px solid color-mix(in srgb,var(--primary) 28%,transparent);outline-offset:2px}
@media(max-width:620px){
    .admin-notification-drawer{position:fixed;top:calc(var(--topbar-height) + 8px);right:10px;left:10px;width:auto;max-height:calc(100vh - var(--topbar-height) - 18px)}
    .admin-notification-drawer__header{align-items:flex-start}
    .admin-notification-drawer__actions .button-small{display:none}
}


/* Time Off request history status headers */
.history-request-card__header{
    min-height:70px;
    padding:14px 16px;
    align-items:center;
    border-bottom:1px solid transparent;
    transition:background-color .18s ease,color .18s ease;
}
.history-request-card__header--pending{
    background:#fff4d9!important;
    color:#946006!important;
    border-bottom-color:#f1d795!important;
}
.history-request-card__header--approved{
    background:#e8f8ef!important;
    color:#197448!important;
    border-bottom-color:#bfe6cf!important;
}
.history-request-card__header--declined,
.history-request-card__header--cancelled,
.history-request-card__header--canceled{
    background:#ffedf0!important;
    color:#ad3044!important;
    border-bottom-color:#f2c3cc!important;
}
.history-request-card__header > div,
.history-request-card__header strong,
.history-request-card__header small,
.history-request-status-text{
    color:inherit!important;
}
.history-request-status-text{
    min-width:92px;
    min-height:30px;
    padding:0 12px;
    border:1px solid currentColor;
    border-radius:999px;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    text-align:center!important;
    line-height:1!important;
    white-space:nowrap;
    text-transform:capitalize;
    font-weight:800;
}


/* Global-format date picker used by Time Off drawers */
.global-date-picker{
    position:relative;
    width:100%;
}
.global-date-picker > input[type="text"]{
    width:100%;
    min-height:42px;
    padding-right:48px;
}
.global-date-picker > input[type="text"].is-invalid{
    border-color:var(--danger,#d64555)!important;
    box-shadow:0 0 0 3px rgba(214,69,85,.12)!important;
}
.global-date-picker > input[type="date"].global-date-picker__native{
    position:absolute!important;
    left:0!important;
    bottom:0!important;
    width:1px!important;
    min-width:1px!important;
    max-width:1px!important;
    height:1px!important;
    min-height:1px!important;
    max-height:1px!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
    color:transparent!important;
    opacity:0!important;
    pointer-events:none!important;
    clip:rect(0 0 0 0)!important;
    clip-path:inset(50%)!important;
    overflow:hidden!important;
    z-index:-1!important;
}
.global-date-picker__button{
    position:absolute;
    width:40px!important;
    height:40px!important;
    min-height:40px!important;
    right:1px;
    top:1px;
    padding:0!important;
    border:0!important;
    border-radius:10px!important;
    background:transparent!important;
    color:var(--text,#18283c)!important;
    display:grid!important;
    place-items:center!important;
    font-size:14px!important;
    cursor:pointer;
}
.global-date-picker__button:hover{
    background:var(--surface-muted,#f3f6f9)!important;
}


/* Access Gateway v140 layout prototype */
.nav-icon--access-gateway{
    color:var(--information,#2388f2);
}
.gateway-hero{
    padding:24px;
    border-radius:22px;
    background:
        linear-gradient(
            135deg,
            color-mix(
                in srgb,
                var(--primary) 95%,
                #12335c 5%
            ),
            color-mix(
                in srgb,
                var(--primary) 70%,
                #14243a 30%
            )
        );
    color:#fff;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:24px;
    box-shadow:0 18px 42px color-mix(
        in srgb,
        var(--primary) 22%,
        transparent
    );
}
.gateway-hero__copy{
    max-width:760px;
}
.gateway-eyebrow{
    display:block;
    margin-bottom:5px;
    color:var(--information,#2388f2);
    font-size:11px;
    font-weight:850;
    letter-spacing:.08em;
    text-transform:uppercase;
}
.gateway-hero .gateway-eyebrow{
    color:rgba(255,255,255,.76);
}
.gateway-hero h1{
    margin:0;
    color:#fff;
    font-size:30px;
    line-height:1.1;
}
.gateway-hero p{
    max-width:740px;
    margin:9px 0 0;
    color:rgba(255,255,255,.82);
    line-height:1.55;
}
.gateway-hero__actions{
    flex:0 0 auto;
    display:flex;
    flex-wrap:wrap;
    gap:10px;
}
.gateway-hero__actions .button{
    min-height:44px;
}
.gateway-hero__actions .button--secondary{
    border-color:rgba(255,255,255,.36);
    background:rgba(255,255,255,.12);
    color:#fff;
}
.gateway-tabs{
    margin-top:14px;
    padding:7px;
    border:1px solid #dfe7ef;
    border-radius:16px;
    background:#fff;
    display:flex;
    gap:6px;
    overflow-x:auto;
    box-shadow:0 8px 22px rgba(24,45,73,.06);
}
.gateway-tab{
    min-height:40px;
    padding:0 14px;
    border:0;
    border-radius:11px;
    background:transparent;
    color:#65768a;
    font:inherit;
    font-size:12px;
    font-weight:800;
    white-space:nowrap;
    cursor:pointer;
}
.gateway-tab:hover{
    background:#f0f5fa;
}
.gateway-tab.is-active{
    background:var(--primary);
    color:#fff;
}
.gateway-panel{
    margin-top:14px;
}
.gateway-panel[hidden]{
    display:none!important;
}
.gateway-summary-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:12px;
}
.gateway-summary-card{
    min-height:132px;
    padding:18px;
    border:1px solid #e0e7ef;
    border-radius:var(--radius-lg);
    background:#fff;
    color:#1d3047;
    text-align:left;
    display:grid;
    grid-template-rows:auto auto 1fr;
    gap:7px;
    cursor:pointer;
    box-shadow:0 9px 24px rgba(24,45,73,.06);
}
.gateway-summary-card:hover{
    transform:translateY(-1px);
    box-shadow:0 13px 30px rgba(24,45,73,.1);
}
.gateway-summary-card > span{
    font-size:11px;
    font-weight:800;
    color:#728297;
}
.gateway-summary-card > strong{
    font-size:29px;
    line-height:1;
}
.gateway-summary-card > small{
    align-self:end;
    color:#8491a2;
    line-height:1.35;
}
.gateway-summary-card--success{
    border-top:4px solid var(--success,#1fb67a);
}
.gateway-summary-card--warning{
    border-top:4px solid var(--warning,#f0a915);
}
.gateway-summary-card--information{
    border-top:4px solid var(--information,#2388f2);
}
.gateway-summary-card--accent{
    border-top:4px solid var(--accent,#eb1877);
}
.gateway-dashboard-grid{
    margin-top:12px;
    display:grid;
    grid-template-columns:minmax(0,1fr) 330px;
    gap:12px;
    align-items:start;
}
.gateway-workforce-card,
.gateway-module-card,
.gateway-events-card,
.gateway-stage-card{
    border-radius:var(--radius-lg);
}
.gateway-section-heading{
    margin-bottom:15px;
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:20px;
}
.gateway-section-heading h2,
.gateway-module-card h2,
.gateway-stage-card h2{
    margin:0;
    color:#1c3048;
    font-size:18px;
}
.gateway-section-heading p,
.gateway-stage-card p{
    margin:5px 0 0;
    color:#7c899a;
    line-height:1.45;
}
.gateway-search{
    width:min(260px,100%);
    min-height:42px;
    padding:0 12px;
    border:1px solid #dfe7ef;
    border-radius:12px;
    background:#f8fafc;
    display:flex;
    align-items:center;
    gap:8px;
}
.gateway-search .icon{
    width:17px;
    color:#8996a6;
}
.gateway-search input{
    width:100%;
    border:0;
    outline:0;
    background:transparent;
    font:inherit;
}
.gateway-table-wrap{
    overflow-x:auto;
}
.gateway-table{
    width:100%;
    min-width:1100px;
    border-collapse:separate;
    border-spacing:0;
}
.gateway-table th{
    padding:10px 12px;
    border-bottom:1px solid #dfe6ee;
    color:#7c899a;
    font-size:10px;
    font-weight:850;
    letter-spacing:.05em;
    text-align:left;
    text-transform:uppercase;
}
.gateway-table td{
    padding:13px 12px;
    border-bottom:1px solid #edf1f5;
    color:#3c4d61;
    font-size:12px;
    vertical-align:middle;
}
.gateway-table tbody tr:hover{
    background:#f9fbfd;
}
.gateway-person{
    min-width:190px;
    display:flex;
    align-items:center;
    gap:10px;
}
.gateway-person > div{
    display:grid;
    gap:2px;
}
.gateway-person strong{
    color:#1c3048;
}
.gateway-person small{
    color:#8794a4;
}
.gateway-avatar{
    width:38px;
    height:38px;
    border-radius:12px;
    background:#eaf3fd;
    color:var(--primary);
    display:grid;
    place-items:center;
    position:relative;
    overflow:hidden;
    flex:0 0 38px;
    font-size:11px;
    font-weight:900;
}
.gateway-avatar__initials{
    grid-area:1/1;
    display:grid;
    place-items:center;
    width:100%;
    height:100%;
}
.gateway-avatar>img{
    grid-area:1/1;
    display:block;
    width:100%;
    height:100%;
    max-width:none;
    max-height:none;
    object-fit:cover;
    object-position:50% 50%;
    border-radius:inherit;
}
.gateway-avatar>img[hidden]{
    display:none!important;
}
.gateway-state{
    min-height:28px;
    padding:0 10px;
    border-radius:999px;
    display:inline-flex;
    align-items:center;
    font-size:10px;
    font-weight:850;
    white-space:nowrap;
}
.gateway-state--neutral{
    background:#eef2f6;
    color:#647489;
}
.gateway-state--success{
    background:#e7f8f0;
    color:#18774b;
}
.gateway-state--warning{
    background:#fff5d9;
    color:#9a6810;
}
.gateway-state--accent{
    background:#fce8f2;
    color:#a72b68;
}
.gateway-placeholder-note{
    margin-top:13px;
    padding:11px 12px;
    border:1px solid #f0dfa9;
    border-radius:12px;
    background:#fff9e9;
    color:#795d14;
    display:flex;
    align-items:flex-start;
    gap:9px;
}
.gateway-placeholder-note .icon{
    flex:0 0 auto;
    width:18px;
}
.gateway-placeholder-note p{
    margin:0;
    font-size:11px;
    line-height:1.45;
}
.gateway-side-stack{
    display:grid;
    gap:12px;
}
.gateway-module-card header{
    margin-bottom:12px;
}
.gateway-mini-list{
    display:grid;
    gap:8px;
}
.gateway-mini-list button{
    width:100%;
    min-height:60px;
    padding:10px;
    border:1px solid #e4eaf0;
    border-radius:14px;
    background:#fafbfd;
    color:#20344c;
    display:grid;
    grid-template-columns:38px minmax(0,1fr) 18px;
    align-items:center;
    gap:10px;
    text-align:left;
    cursor:pointer;
}
.gateway-mini-list button:hover{
    border-color:color-mix(
        in srgb,
        var(--primary) 35%,
        #e4eaf0
    );
    background:#f4f8fc;
}
.gateway-mini-list button > span:nth-child(2){
    display:grid;
    gap:3px;
}
.gateway-mini-list small{
    color:#8794a4;
}
.gateway-mini-list > button > .icon{
    width:16px;
    color:#9aa6b4;
}
.gateway-mini-icon{
    width:38px;
    height:38px;
    border-radius:12px;
    background:#eaf3fd;
    color:var(--primary);
    display:grid;
    place-items:center;
}
.gateway-mini-icon .icon{
    width:18px;
}
.gateway-metric-row{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:9px;
}
.gateway-metric-row > div{
    padding:13px;
    border:1px solid #e4eaf0;
    border-radius:14px;
    background:#fafbfd;
    display:grid;
    gap:6px;
}
.gateway-metric-row span{
    color:#7d8b9c;
    font-size:10px;
    font-weight:750;
}
.gateway-metric-row strong{
    color:#1d3047;
    font-size:24px;
}
.gateway-inline-actions{
    margin-top:10px;
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
}
.gateway-inline-actions .button{
    padding-inline:10px;
}
.gateway-events-card{
    margin-top:12px;
}
.gateway-event-list{
    display:grid;
}
.gateway-event{
    min-height:68px;
    padding:13px 0;
    border-top:1px solid #edf1f5;
    display:grid;
    grid-template-columns:10px minmax(0,1fr) auto;
    align-items:start;
    gap:11px;
}
.gateway-event:first-child{
    border-top:0;
}
.gateway-event__marker{
    width:9px;
    height:9px;
    margin-top:5px;
    border-radius:50%;
    background:#9aa7b5;
}
.gateway-event__marker--information{
    background:var(--information,#2388f2);
}
.gateway-event__marker--warning{
    background:var(--warning,#f0a915);
}
.gateway-event > div{
    display:grid;
    gap:4px;
}
.gateway-event strong{
    color:#20344c;
}
.gateway-event p{
    margin:0;
    color:#7d8a9b;
    line-height:1.4;
}
.gateway-event time{
    color:#9aa6b4;
    font-size:10px;
    white-space:nowrap;
}
.gateway-stage-card{
    min-height:310px;
    padding:34px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:20px;
    text-align:left;
}
.gateway-stage-card__icon{
    width:76px;
    height:76px;
    flex:0 0 auto;
    border-radius:22px;
    background:#eaf3fd;
    color:var(--primary);
    display:grid;
    place-items:center;
}
.gateway-stage-card__icon .icon{
    width:34px;
    height:34px;
}
.gateway-stage-card > div{
    max-width:650px;
}
.gateway-stage-card strong{
    display:block;
    margin-top:15px;
    color:#596a7f;
}
.gateway-drawer{
    z-index:1300;
}
.gateway-drawer__body{
    display:grid;
    align-content:start;
    gap:12px;
}
.gateway-drawer-section{
    padding:15px;
    border:1px solid #e2e9f0;
    border-radius:16px;
    background:#fbfcfd;
}
.gateway-detail-list{
    margin:0;
    display:grid;
}
.gateway-detail-list > div{
    min-height:45px;
    padding:9px 0;
    border-top:1px solid #e8edf2;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:14px;
}
.gateway-detail-list > div:first-child{
    border-top:0;
}
.gateway-detail-list dt{
    color:#77869a;
}
.gateway-detail-list dd{
    margin:0;
    color:#23374f;
    font-weight:800;
    text-align:right;
}
.gateway-drawer-actions{
    display:grid;
    gap:8px;
}
.gateway-drawer-actions .button{
    width:100%;
}
.gateway-disabled-note{
    margin:10px 0 0;
    color:#8995a5;
    font-size:11px;
    line-height:1.45;
}
@media(max-width:1250px){
    .gateway-summary-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
    .gateway-dashboard-grid{
        grid-template-columns:1fr;
    }
    .gateway-side-stack{
        grid-template-columns:1fr 1fr;
    }
}
@media(max-width:760px){
    .gateway-hero{
        align-items:flex-start;
        flex-direction:column;
    }
    .gateway-hero__actions{
        width:100%;
    }
    .gateway-hero__actions .button{
        flex:1;
    }
    .gateway-summary-grid,
    .gateway-side-stack,
    .gateway-inline-actions{
        grid-template-columns:1fr;
    }
    .gateway-section-heading{
        flex-direction:column;
    }
    .gateway-search{
        width:100%;
    }
    .gateway-stage-card{
        padding:24px;
        align-items:flex-start;
        flex-direction:column;
    }
}


/* Access Gateway v141 navigation and spacing refinement */
.nav-section:has(.nav-icon--access-gateway){
    margin-top:10px;
    padding-top:15px;
    border-top:1px solid var(--border,#e1e8ef);
}

.nav-icon--access-gateway{
    background:linear-gradient(
        145deg,
        var(--primary),
        color-mix(
            in srgb,
            var(--primary) 68%,
            #14243a 32%
        )
    )!important;
    color:#fff!important;
}

.nav-icon--access-gateway .icon{
    width:18px;
    height:18px;
    stroke-width:2.2;
}

.gateway-tab{
    text-decoration:none;
}

.gateway-workforce-card,
.gateway-module-card,
.gateway-events-card{
    padding:22px!important;
}

.gateway-workforce-card .gateway-table-wrap{
    margin-inline:-22px;
}

.gateway-workforce-card .gateway-table th:first-child,
.gateway-workforce-card .gateway-table td:first-child{
    padding-left:22px;
}

.gateway-workforce-card .gateway-table th:last-child,
.gateway-workforce-card .gateway-table td:last-child{
    padding-right:22px;
}

.gateway-placeholder-note{
    margin-top:16px;
}

.gateway-events-card .gateway-section-heading,
.gateway-workforce-card .gateway-section-heading{
    margin-bottom:18px;
}

.gateway-module-card header{
    margin-bottom:15px;
}

.gateway-stage-card{
    padding:40px!important;
}

.gateway-drawer-section{
    padding:18px;
}

@media(max-width:760px){
    .gateway-workforce-card,
    .gateway-module-card,
    .gateway-events-card{
        padding:16px!important;
    }

    .gateway-workforce-card .gateway-table-wrap{
        margin-inline:-16px;
    }

    .gateway-workforce-card .gateway-table th:first-child,
    .gateway-workforce-card .gateway-table td:first-child{
        padding-left:16px;
    }

    .gateway-workforce-card .gateway-table th:last-child,
    .gateway-workforce-card .gateway-table td:last-child{
        padding-right:16px;
    }
}


/* Access Gateway v142 — centred permission-controlled tab row */
.gateway-tabs{
    align-items:stretch;
    justify-content:center;
}

.gateway-tabs .gateway-tab{
    flex:1 1 0;
    min-width:0;
    padding-inline:10px;
    display:flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    line-height:1.25;
}

@media(max-width:1100px){
    .gateway-tabs{
        justify-content:flex-start;
    }

    .gateway-tabs .gateway-tab{
        flex:0 0 auto;
        min-width:138px;
    }
}


/* Access Gateway v143 data management */
.gateway-management-grid{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(380px,.85fr);gap:16px;align-items:start}.gateway-data-card,.gateway-editor{padding:24px!important;border-radius:20px}.gateway-record-list{display:grid;gap:9px}.gateway-record{width:100%;min-height:68px;padding:12px 14px;border:1px solid #e2e9f0;border-radius:14px;background:#fafbfd;color:#20344c;display:grid;grid-template-columns:minmax(0,1fr) auto 18px;align-items:center;gap:12px;text-align:left;cursor:pointer}.gateway-record:hover{border-color:color-mix(in srgb,var(--primary) 35%,#e2e9f0);background:#f4f8fc}.gateway-record>span:first-child{display:grid;gap:4px}.gateway-record small{color:#7f8da0}.gateway-record>.icon{width:16px;color:#9aa7b5}.gateway-editor{display:grid;gap:18px;position:sticky;top:86px}.gateway-editor header h2{margin:0}.gateway-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px}.gateway-span-2{grid-column:1/-1}.gateway-editor .form-field{display:grid;gap:6px}.gateway-editor .form-field>span{font-size:11px;font-weight:800;color:#596b80}.gateway-editor input,.gateway-editor select,.gateway-editor textarea{width:100%;border:1px solid #d9e2eb;border-radius:11px;background-color:#fff;padding:11px 12px;font:inherit}.gateway-editor select{padding-right:40px}.gateway-editor textarea{resize:vertical}.gateway-editor small{color:#7f8da0;line-height:1.4}.gateway-toggle-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.gateway-check{min-height:44px;padding:10px 12px;border:1px solid #e2e9f0;border-radius:11px;background:#fafbfd;display:flex;align-items:center;gap:9px;font-weight:750}.gateway-check input{width:auto}.gateway-editor footer{display:flex;justify-content:flex-end;gap:9px}.empty-state{padding:30px;border:1px dashed #ccd7e2;border-radius:14px;color:#7c899a;text-align:center}@media(max-width:1100px){.gateway-management-grid{grid-template-columns:1fr}.gateway-editor{position:static}}@media(max-width:680px){.gateway-data-card,.gateway-editor{padding:16px!important}.gateway-form-grid,.gateway-toggle-grid{grid-template-columns:1fr}.gateway-span-2{grid-column:auto}}


/* Access Gateway v144 — public IP network whitelist */
.gateway-editor header p{
    margin:5px 0 0;
    color:#7d8a9b;
    line-height:1.45;
}

.gateway-readonly-method{
    min-height:66px;
    padding:13px;
    border:1px solid #dfe7ef;
    border-radius:14px;
    background:#f8fafc;
    display:flex;
    align-items:center;
    gap:11px;
}

.gateway-readonly-method > .icon{
    width:21px;
    height:21px;
    color:var(--primary);
}

.gateway-readonly-method > div{
    display:grid;
    gap:4px;
}

.gateway-readonly-method strong{
    color:#20344c;
}

.gateway-readonly-method small{
    color:#7d8a9b;
}

.gateway-current-ip{
    padding:14px;
    border:1px solid #dce6f0;
    border-radius:15px;
    background:#f8fbfe;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
}

.gateway-current-ip > div{
    min-width:0;
    display:grid;
    gap:4px;
}

.gateway-current-ip span{
    color:#7a8899;
    font-size:10px;
    font-weight:850;
    letter-spacing:.06em;
    text-transform:uppercase;
}

.gateway-current-ip strong{
    color:#1e334b;
    font-size:17px;
    overflow-wrap:anywhere;
}

.gateway-current-ip small{
    color:#8491a2;
    line-height:1.4;
}

.gateway-current-ip .button{
    flex:0 0 auto;
    min-width:190px;
}

.gateway-network-warning{
    padding:12px 14px;
    border:1px solid #f0dca3;
    border-radius:14px;
    background:#fff8e4;
    color:#785a11;
    display:flex;
    align-items:flex-start;
    gap:10px;
}

.gateway-network-warning > .icon{
    width:18px;
    height:18px;
    flex:0 0 auto;
    margin-top:1px;
}

.gateway-network-warning p{
    margin:0;
    line-height:1.45;
}

@media(max-width:720px){
    .gateway-current-ip{
        align-items:stretch;
        flex-direction:column;
    }

    .gateway-current-ip .button{
        width:100%;
        min-width:0;
    }
}


/* Access Gateway v147 — registered device deletion */
.gateway-device-editor-footer{
    display:flex;
    align-items:center;
    gap:10px;
}
.gateway-editor-footer-spacer{
    flex:1 1 auto;
}
.gateway-device-editor-footer .button-danger{
    border:1px solid var(--error,#d64555);
    background:var(--error,#d64555);
    color:#fff;
}
.gateway-device-editor-footer .button-danger:hover{
    filter:brightness(.95);
}
@media(max-width:640px){
    .gateway-device-editor-footer{
        display:grid;
        grid-template-columns:1fr 1fr;
    }
    .gateway-device-editor-footer .button-danger{
        grid-column:1/-1;
    }
    .gateway-editor-footer-spacer{
        display:none;
    }
}


/* Access Gateway v148 — canonical decision tester */
.gateway-decision-tester{margin-top:18px}
.gateway-decision-tester header p{margin:5px 0 0;color:#7d8a9b}
.gateway-decision-result{
    margin-top:14px;padding:15px;border:1px solid #dce6f0;
    border-radius:15px;background:#f8fafc;
}
.gateway-decision-result[data-state="allowed"]{
    border-color:#a8ddc2;background:#eefaf4;
}
.gateway-decision-result[data-state="blocked"]{
    border-color:#efb8c0;background:#fff2f4;
}
.gateway-decision-result strong{display:block;color:#21374e;font-size:18px}
.gateway-decision-result>span{
    display:inline-block;margin-top:4px;color:#748397;font-size:11px;
    font-weight:850;text-transform:uppercase;
}
.gateway-decision-result p{margin:8px 0 0;color:#53687e}
.gateway-decision-result dl{
    margin:12px 0 0;display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;
}
.gateway-decision-result dl>div{
    padding:9px;border-radius:var(--radius-md);background:rgba(255,255,255,.7);
}
.gateway-decision-result dt{
    color:#8290a0;font-size:10px;text-transform:uppercase;
}
.gateway-decision-result dd{
    margin:3px 0 0;color:#283f57;font-weight:750;
}
@media(max-width:700px){
    .gateway-decision-result dl{grid-template-columns:1fr}
}


/* v206 — Manager phone overrides */
.gateway-override-layout{
    display:grid;
    gap:18px;
}

.gateway-override-warning{
    display:flex;
    align-items:flex-start;
    gap:13px;
    margin:18px 0;
    padding:15px 16px;
    border:1px solid #f0cf83;
    border-radius:14px;
    background:#fff8e8;
    color:#714e08;
}

.gateway-override-warning svg{
    width:23px;
    height:23px;
    flex:0 0 23px;
}

.gateway-override-warning>div{
    display:grid;
    gap:4px;
}

.gateway-override-table th,
.gateway-override-table td{
    padding:14px 15px;
    vertical-align:top;
}

.gateway-override-link{
    border:0;
    background:none;
    padding:0;
    color:var(--primary);
    font:inherit;
    font-weight:800;
    cursor:pointer;
    text-align:left;
}

.gateway-override-reason{
    display:-webkit-box;
    max-width:300px;
    overflow:hidden;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:2;
}

.gateway-override-drawer{
    height:min(82vh,760px)!important;
    max-height:82vh!important;
    border-radius:24px 24px 0 0!important;
}

.gateway-override-form-body{
    overflow:auto;
    padding:24px 28px!important;
}

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

.gateway-override-confirmations{
    display:grid;
    gap:12px;
    margin-top:22px;
}

.gateway-override-confirmations .gateway-check{
    padding:14px;
    border:1px solid #dce5ef;
    border-radius:var(--radius-md);
    background:#fff;
}

.gateway-override-accountability{
    border-color:#efc66a!important;
    background:#fff8e8!important;
    color:#714e08;
    font-weight:800;
}

.gateway-override-detail{
    width:min(520px,100vw)!important;
}

.gateway-override-audit-list{
    display:grid;
    gap:10px;
}

.gateway-override-audit-list article{
    padding:12px;
    border:1px solid #dce5ef;
    border-radius:12px;
    background:#f8fafc;
}

.gateway-override-audit-list article strong{
    display:block;
    text-transform:capitalize;
}

.gateway-override-audit-list article span{
    display:block;
    margin-top:3px;
    color:var(--muted);
    font-size:12px;
}

.gateway-override-audit-list article p{
    margin:8px 0 0;
}

@media(max-width:760px){
    .gateway-override-form-grid{
        grid-template-columns:1fr;
    }

    .gateway-override-drawer{
        height:94vh!important;
        max-height:94vh!important;
    }
}


/* v207 — compact modern Manager Override right drawer */
.gateway-override-drawer{
    top:0!important;
    right:0!important;
    bottom:0!important;
    left:auto!important;
    width:min(520px,100vw)!important;
    height:100dvh!important;
    max-height:100dvh!important;
    border-radius:24px 0 0 24px!important;
    transform:translateX(102%)!important;
    overflow:hidden!important;
    box-shadow:-24px 0 56px rgba(20,36,58,.20)!important;
}

.gateway-override-drawer.is-open{
    transform:translateX(0)!important;
}

.gateway-override-drawer .drawer__header{
    flex:0 0 auto;
    padding:20px 22px!important;
    border-bottom:1px solid #e3e9ef;
    background:#fff;
}

.gateway-override-drawer .drawer__form{
    min-height:0;
    display:flex;
    flex-direction:column;
    flex:1;
}

.gateway-override-form-body{
    min-height:0;
    overflow:auto!important;
    padding:20px 22px 30px!important;
    background:#f7f9fc;
}

.gateway-override-intro-card{
    display:flex;
    align-items:flex-start;
    gap:13px;
    margin-bottom:18px;
    padding:15px;
    border:1px solid #cfe2f8;
    border-radius:15px;
    background:#edf6ff;
}

.gateway-override-intro-card__icon{
    display:grid;
    width:42px;
    height:42px;
    flex:0 0 42px;
    place-items:center;
    border-radius:12px;
    background:#fff;
    color:var(--primary);
}

.gateway-override-intro-card__icon svg{
    width:21px;
    height:21px;
}

.gateway-override-intro-card>div{
    display:grid;
    gap:4px;
}

.gateway-override-intro-card p{
    margin:0;
    color:#5d6d82;
    line-height:1.45;
}

.gateway-override-form-stack{
    display:grid;
    gap:15px;
    padding:17px;
    border:1px solid #dfe7ef;
    border-radius:16px;
    background:#fff;
    box-shadow:0 7px 22px rgba(20,36,58,.05);
}

.gateway-override-form-stack .modern-field{
    margin:0!important;
}

.gateway-override-form-stack .modern-field>span{
    font-weight:800;
}

.gateway-override-form-stack select,
.gateway-override-form-stack textarea{
    width:100%;
    border:1px solid #d7e0ea;
    border-radius:var(--radius-md);
    background-color:#fff;
    color:var(--text);
    outline:none;
}

.gateway-override-form-stack select{
    min-height:44px;
}

.gateway-override-form-stack textarea{
    min-height:122px;
    padding:12px 13px;
    resize:vertical;
}

.gateway-override-form-stack select:focus,
.gateway-override-form-stack textarea:focus{
    border-color:var(--primary);
    box-shadow:0 0 0 3px rgba(35,136,242,.12);
}

.gateway-override-form-stack small{
    color:var(--muted);
    font-weight:500;
    line-height:1.45;
}

.gateway-override-inline-fields{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:12px;
}

.gateway-override-helper{
    margin:-4px 0 0;
    padding:10px 12px;
    border-radius:11px;
    background:#f4f7fa;
    color:#66758a;
    font-size:12px;
    line-height:1.45;
}

.gateway-override-confirmations{
    display:grid;
    gap:10px;
    margin-top:16px;
}

.gateway-override-confirmation-card{
    position:relative;
    display:grid;
    grid-template-columns:auto auto 1fr;
    align-items:flex-start;
    gap:11px;
    padding:14px;
    border:1px solid #dfe7ef;
    border-radius:14px;
    background:#fff;
    cursor:pointer;
    transition:
        border-color .16s,
        background .16s,
        box-shadow .16s;
}

.gateway-override-confirmation-card>input{
    width:18px;
    height:18px;
    margin:10px 0 0;
    accent-color:var(--primary);
}

.gateway-override-confirmation-card__box{
    display:grid;
    width:38px;
    height:38px;
    place-items:center;
    border-radius:11px;
    background:#edf6ff;
    color:var(--primary);
}

.gateway-override-confirmation-card__box svg{
    width:19px;
    height:19px;
}

.gateway-override-confirmation-card>span:last-child{
    display:grid;
    gap:3px;
    padding-top:2px;
}

.gateway-override-confirmation-card small{
    color:var(--muted);
    line-height:1.4;
}

.gateway-override-confirmation-card:has(input:checked){
    border-color:#91c5f8;
    background:#f5faff;
    box-shadow:0 0 0 3px rgba(35,136,242,.08);
}

.gateway-override-confirmation-card--warning{
    border-color:#efd18e;
    background:#fffaf0;
}

.gateway-override-confirmation-card--warning
.gateway-override-confirmation-card__box{
    background:#fff1cc;
    color:#946600;
}

.gateway-override-confirmation-card--warning:has(input:checked){
    border-color:#e3ae37;
    background:#fff7e3;
    box-shadow:0 0 0 3px rgba(227,174,55,.10);
}

.gateway-override-drawer .drawer__footer{
    flex:0 0 auto;
    display:flex;
    justify-content:flex-end;
    gap:10px;
    padding:14px 20px calc(
        14px + env(safe-area-inset-bottom)
    )!important;
    border-top:1px solid #e3e9ef;
    background:#fff;
    box-shadow:0 -9px 24px rgba(20,36,58,.06);
}

.gateway-override-drawer .drawer__footer .button{
    min-height:44px;
    border-radius:12px;
}

body.gateway-override-drawer-open{
    overflow:hidden;
}

@media(max-width:620px){
    .gateway-override-drawer{
        width:100vw!important;
        border-radius:0!important;
    }

    .gateway-override-inline-fields{
        grid-template-columns:1fr;
    }

    .gateway-override-drawer .drawer__footer{
        display:grid;
        grid-template-columns:1fr 1fr;
    }
}


/* v210 — Gateway Audit Log and Settings */
.gateway-audit-toolbar{
    display:grid;
    grid-template-columns:minmax(260px,1.5fr) repeat(2,minmax(180px,.65fr));
    gap:12px;
    margin:18px 0;
    padding:14px;
    border:1px solid #dfe7ef;
    border-radius:15px;
    background:#f8fafc;
}

.gateway-audit-toolbar .modern-field{
    margin:0!important;
}

.gateway-audit-toolbar input{
    min-height:43px;
}
.gateway-audit-toolbar select{
    min-height:44px;
}

.gateway-audit-table th,
.gateway-audit-table td{
    padding:13px 14px;
    vertical-align:top;
}

.gateway-audit-summary{
    display:block;
    max-width:340px;
    margin-top:4px;
    color:var(--muted);
    line-height:1.35;
}

.gateway-audit-detail-drawer,
.gateway-settings-drawer{
    width:min(560px,100vw)!important;
    top:0!important;
    bottom:0!important;
    height:100dvh!important;
    max-height:100dvh!important;
    border-radius:24px 0 0 24px!important;
    overflow:hidden!important;
}

.gateway-audit-detail-drawer .drawer__body,
.gateway-settings-form-body{
    min-height:0;
    overflow:auto!important;
    padding:20px 22px 30px!important;
    background:#f7f9fc;
}

.gateway-audit-metadata{
    max-height:420px;
    overflow:auto;
    margin:0;
    padding:14px;
    border-radius:12px;
    background:#101b2b;
    color:#dbe9f8;
    font-size:12px;
    white-space:pre-wrap;
    word-break:break-word;
}

.gateway-settings-grid{
    display:grid;
    gap:18px;
}

.gateway-settings-summary-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:12px;
    margin-top:20px;
}

.gateway-settings-summary-grid article{
    display:grid;
    gap:6px;
    padding:16px;
    border:1px solid #dfe7ef;
    border-radius:15px;
    background:#fff;
}

.gateway-settings-summary-grid span{
    color:var(--muted);
    font-size:12px;
    font-weight:700;
}

.gateway-settings-summary-grid strong{
    font-size:18px;
}

.gateway-settings-notice{
    display:flex;
    gap:12px;
    align-items:flex-start;
    margin-top:18px;
    padding:15px;
    border:1px solid #cfe2f8;
    border-radius:14px;
    background:#edf6ff;
    color:#174f84;
}

.gateway-settings-notice svg{
    width:22px;
    height:22px;
    flex:0 0 22px;
}

.gateway-settings-notice>div{
    display:grid;
    gap:4px;
}

.gateway-settings-form-section{
    display:grid;
    gap:11px;
    margin-bottom:16px;
    padding:16px;
    border:1px solid #dfe7ef;
    border-radius:16px;
    background:#fff;
    box-shadow:0 6px 20px rgba(20,36,58,.04);
}

.gateway-settings-toggle{
    display:flex;
    align-items:flex-start;
    gap:12px;
    padding:13px;
    border:1px solid #e0e7ef;
    border-radius:var(--radius-md);
    background:#fff;
    cursor:pointer;
}

.gateway-settings-toggle input{
    width:19px;
    height:19px;
    margin-top:3px;
    accent-color:var(--primary);
}

.gateway-settings-toggle>span{
    display:grid;
    gap:3px;
}

.gateway-settings-toggle small{
    color:var(--muted);
    line-height:1.4;
}

.gateway-settings-toggle:has(input:checked){
    border-color:#93c7f8;
    background:#f4faff;
}

.gateway-settings-number-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:12px;
}

.gateway-settings-number-grid .modern-field{
    margin:0!important;
}

.gateway-settings-number-grid input{
    min-height:45px;
}

.gateway-settings-drawer .drawer__form{
    min-height:0;
    display:flex;
    flex-direction:column;
    flex:1;
}

.gateway-settings-drawer .drawer__footer{
    flex:0 0 auto;
    display:flex;
    justify-content:flex-end;
    gap:10px;
    padding:14px 20px calc(
        14px + env(safe-area-inset-bottom)
    )!important;
    border-top:1px solid #e3e9ef;
    background:#fff;
    box-shadow:0 -9px 24px rgba(20,36,58,.06);
}

body.gateway-settings-drawer-open{
    overflow:hidden;
}

@media(max-width:900px){
    .gateway-audit-toolbar{
        grid-template-columns:1fr;
    }

    .gateway-settings-summary-grid{
        grid-template-columns:1fr 1fr;
    }
}

@media(max-width:620px){
    .gateway-audit-detail-drawer,
    .gateway-settings-drawer{
        width:100vw!important;
        border-radius:0!important;
    }

    .gateway-settings-summary-grid,
    .gateway-settings-number-grid{
        grid-template-columns:1fr;
    }

    .gateway-settings-drawer .drawer__footer{
        display:grid;
        grid-template-columns:1fr 1fr;
    }
}


/* v215 — Office Connectivity */
.gateway-connectivity-grid{display:grid;gap:20px}
.gateway-connectivity-hero{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:24px;border:1px solid #dce7f1;border-radius:22px;background:linear-gradient(135deg,#f8fbff,#eef6ff)}
.gateway-connectivity-hero h2{margin:4px 0 8px;font-size:28px}.gateway-connectivity-hero p{margin:0;max-width:720px;color:#60758b}
.gateway-eyebrow{font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.09em;color:#2c78c7}
.gateway-status-pill{display:inline-flex;align-items:center;padding:9px 13px;border-radius:999px;font-weight:800;background:#edf2f7;color:#506276;white-space:nowrap}
.gateway-status-pill--online{background:#e9f8ef;color:#177245}.gateway-status-pill--outage{background:#fff0f0;color:#b3262d}.gateway-status-pill--possible_outage,.gateway-status-pill--recovering{background:#fff7df;color:#8b6200}
.gateway-connectivity-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.gateway-metric-card{padding:18px;border:1px solid #dde7f0;border-radius:var(--radius-lg);background:#fff;box-shadow:0 8px 26px rgba(20,48,78,.06)}
.gateway-metric-card span,.gateway-metric-card small{display:block;color:#71849a}.gateway-metric-card strong{display:block;margin:8px 0;font-size:20px;color:#172c45;overflow-wrap:anywhere}
.gateway-connectivity-section{padding:22px;border:1px solid #dde7f0;border-radius:var(--radius-lg);background:#fff}.gateway-section-heading{display:flex;justify-content:space-between;margin-bottom:16px}.gateway-section-heading h3{margin:4px 0 0;font-size:21px}
.gateway-runtime-counts{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}.gateway-runtime-counts article{padding:15px;border-radius:15px;background:#f5f8fb;text-align:center}.gateway-runtime-counts strong{display:block;font-size:24px}.gateway-runtime-counts span{font-size:13px;color:#687d92}
.gateway-diagnostic-list{display:grid;gap:9px}.gateway-diagnostic-list>div{display:grid;grid-template-columns:28px 1fr auto;align-items:center;gap:10px;padding:12px 14px;border-radius:var(--radius-md);background:#f6f9fc}.gateway-diagnostic-list>div>span{display:grid;place-items:center;width:25px;height:25px;border-radius:50%;background:#dff5e8;color:#147044;font-weight:900}.gateway-diagnostic-list em{font-style:normal;color:#6d8093}
.gateway-connectivity-timeline{display:grid;gap:12px}.gateway-connectivity-timeline article{display:grid;grid-template-columns:120px 1fr;gap:16px;padding:14px;border-left:3px solid #2d8cf0;background:#f8fbfe;border-radius:0 14px 14px 0}.gateway-connectivity-timeline time{font-weight:800;color:#597086}.gateway-connectivity-timeline p{margin:4px 0 0;color:#697d91}
.gateway-agent-setup ol{margin:0;padding-left:22px;color:#526b82}.gateway-agent-setup li+li{margin-top:8px}.gateway-agent-setup code{padding:2px 6px;border-radius:6px;background:#edf3f8}
@media(max-width:1000px){.gateway-connectivity-cards{grid-template-columns:repeat(2,1fr)}.gateway-runtime-counts{grid-template-columns:repeat(3,1fr)}}@media(max-width:640px){.gateway-connectivity-hero{flex-direction:column}.gateway-connectivity-cards{grid-template-columns:1fr}.gateway-runtime-counts{grid-template-columns:repeat(2,1fr)}.gateway-connectivity-timeline article{grid-template-columns:1fr}}


/* v216 — Registered Devices Work Access Test */
.gateway-heading-actions{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:10px;
    flex-wrap:wrap;
}
.gateway-decision-drawer{
    width:min(520px,100vw);
    z-index:1901;
}
.gateway-decision-drawer .drawer__header{
    align-items:flex-start;
}
.gateway-decision-drawer .drawer__title{
    align-items:flex-start;
}
.gateway-decision-drawer .drawer__title h2{
    margin:3px 0 5px;
}
.gateway-decision-drawer .drawer__title p{
    margin:0;
    color:#687d92;
    line-height:1.45;
}
.gateway-decision-drawer .drawer__body{
    padding:22px;
}
.gateway-drawer-form{
    display:grid;
    gap:17px;
}
.gateway-drawer-form .drawer__footer{
    position:sticky;
    bottom:-22px;
    display:flex;
    justify-content:flex-end;
    gap:10px;
    margin:5px -22px -22px;
    padding:16px 22px;
    border-top:1px solid #e0e8f0;
    background:#fff;
}
.gateway-decision-drawer[aria-hidden="false"]{
    transform:translateX(0);
}
body.gateway-drawer-open{
    overflow:hidden;
}
@media(max-width:640px){
    .gateway-heading-actions{
        width:100%;
        justify-content:stretch;
    }
    .gateway-heading-actions .button{
        flex:1;
    }
}


/* v217 — Work Access Test drawer layering correction */
[data-gateway-decision-backdrop]{
    z-index:1800;
}
.gateway-decision-drawer{
    z-index:1901;
}
.gateway-decision-drawer[hidden],
[data-gateway-decision-backdrop][hidden]{
    display:none !important;
}


/* v218 — Work Access Test full modernisation */
.gateway-decision-drawer{
    width:min(760px,100vw);
    background:#fff;
    box-shadow:-28px 0 80px rgba(15,35,60,.24);
}
.gateway-decision-drawer .drawer__header{
    padding:28px 30px 24px;
    border-bottom:1px solid #e1e9f2;
    background:linear-gradient(180deg,#fff 0%,#fbfdff 100%);
}
.gateway-decision-drawer .drawer__title{
    gap:16px;
    align-items:flex-start;
}
.gateway-decision-drawer .gateway-drawer-icon{
    display:grid;
    place-items:center;
    flex:0 0 56px;
    width:56px;
    height:56px;
    border-radius:17px;
    background:#eaf4ff;
    color:#1478e5;
}
.gateway-decision-drawer .gateway-drawer-icon svg{
    width:27px;
    height:27px;
}
.gateway-decision-drawer .drawer__title h2{
    margin:2px 0 7px;
    font-size:30px;
    line-height:1.12;
    letter-spacing:-.025em;
    color:#10213a;
}
.gateway-decision-drawer .drawer__title p{
    max-width:560px;
    font-size:15px;
    line-height:1.55;
    color:#63778e;
}
.gateway-decision-drawer .drawer__body{
    padding:28px 30px 0;
    overflow-y:auto;
}
.gateway-decision-form{
    display:grid;
    gap:22px;
}
.gateway-decision-note{
    display:grid;
    grid-template-columns:42px 1fr;
    gap:14px;
    align-items:flex-start;
    padding:18px 20px;
    border:1px solid #b9d8ff;
    border-radius:var(--radius-lg);
    background:linear-gradient(135deg,#f4f9ff,#eaf4ff);
}
.gateway-decision-note__icon{
    display:grid;
    place-items:center;
    width:38px;
    height:38px;
    border-radius:50%;
    background:#dcecff;
    color:#1478e5;
    font-weight:900;
    font-size:18px;
}
.gateway-decision-note strong{
    display:block;
    margin-bottom:5px;
    color:#15304f;
}
.gateway-decision-note p{
    margin:0;
    color:#526a84;
    line-height:1.55;
}
.gateway-control-group{
    display:grid;
    gap:9px;
}
.gateway-control-label{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
}
.gateway-control-label label{
    font-size:15px;
    font-weight:800;
    color:#152b46;
}
.gateway-control-label span{
    font-size:12px;
    color:#607993;
    text-align:right;
}
.gateway-control-shell{
    position:relative;
    display:grid;
    grid-template-columns:54px minmax(0,1fr);
    align-items:center;
    min-height:62px;
    border:1px solid #c8d7e8;
    border-radius:16px;
    background:#fff;
    box-shadow:0 5px 16px rgba(20,48,78,.05);
    overflow:hidden;
    transition:border-color .18s ease,box-shadow .18s ease;
}
.gateway-control-shell:focus-within{
    border-color:#2488ef;
    box-shadow:0 0 0 4px rgba(36,136,239,.12);
}
.gateway-control-icon{
    display:grid;
    place-items:center;
    align-self:stretch;
    border-right:1px solid #e5edf5;
    background:#f3f8fd;
    color:#1f77d0;
    font-size:20px;
}
.gateway-control-shell select,
.gateway-control-shell input{
    width:100%;
    min-width:0;
    height:60px;
    padding:0 46px 0 16px;
    border:0 !important;
    border-radius:0 !important;
    outline:0 !important;
    background:transparent !important;
    box-shadow:none !important;
    color:#142a44;
    font:inherit;
    font-size:15px;
}
.gateway-control-shell input{
    padding-right:18px;
}
.gateway-control-shell select{
    appearance:none;
    background-image:
        linear-gradient(45deg,transparent 50%,#49647f 50%),
        linear-gradient(135deg,#49647f 50%,transparent 50%) !important;
    background-position:
        calc(100% - 22px) 27px,
        calc(100% - 16px) 27px !important;
    background-size:6px 6px,6px 6px !important;
    background-repeat:no-repeat !important;
}
.gateway-control-shell input::placeholder{
    color:#8a9caf;
}
.gateway-control-help{
    display:block;
    padding-left:4px;
    color:#657e98;
    font-size:12px;
    line-height:1.45;
}
.gateway-decision-check{
    display:grid;
    grid-template-columns:28px 1fr;
    gap:14px;
    align-items:flex-start;
    padding:18px 20px;
    border:1px solid #dbe6f0;
    border-radius:17px;
    background:#f8fbfe;
    cursor:pointer;
}
.gateway-decision-check input{
    position:absolute;
    opacity:0;
    pointer-events:none;
}
.gateway-decision-check__box{
    display:grid;
    place-items:center;
    width:24px;
    height:24px;
    margin-top:1px;
    border:1.5px solid #a9bbce;
    border-radius:6px;
    background:#fff;
}
.gateway-decision-check input:checked
    +.gateway-decision-check__box{
    border-color:#1478e5;
    background:#1478e5;
}
.gateway-decision-check input:checked
    +.gateway-decision-check__box::after{
    content:"✓";
    color:#fff;
    font-size:15px;
    font-weight:900;
}
.gateway-decision-check strong{
    display:block;
    margin-bottom:4px;
    color:#142a44;
}
.gateway-decision-check small{
    color:#677e95;
    line-height:1.45;
}
.gateway-decision-checklist{
    padding:20px;
    border:1px solid #cfe1f5;
    border-radius:var(--radius-lg);
    background:linear-gradient(135deg,#f8fbff,#edf6ff);
}
.gateway-decision-checklist>strong{
    display:block;
    margin-bottom:14px;
    color:#142a44;
    font-size:16px;
}
.gateway-decision-checklist>div{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:12px 18px;
}
.gateway-decision-checklist span{
    position:relative;
    padding-left:27px;
    color:#48617c;
    font-size:13px;
}
.gateway-decision-checklist span::before{
    content:"✓";
    position:absolute;
    left:0;
    top:-1px;
    display:grid;
    place-items:center;
    width:19px;
    height:19px;
    border-radius:50%;
    background:#199b75;
    color:#fff;
    font-size:11px;
    font-weight:900;
}
.gateway-decision-footer{
    position:sticky;
    bottom:0;
    display:grid !important;
    grid-template-columns:minmax(150px,.75fr) minmax(220px,1.25fr);
    gap:12px;
    margin:4px -30px 0;
    padding:20px 30px 24px !important;
    border-top:1px solid #e1e9f2;
    background:#fff;
    z-index:3;
}
.gateway-decision-footer .button{
    min-height:52px;
    border-radius:15px;
    font-size:15px;
    font-weight:850;
}
.gateway-decision-cancel{
    border:1px solid #c9d7e6 !important;
    background:#fff !important;
    color:#17304d !important;
}
.gateway-decision-submit{
    background:linear-gradient(135deg,#166ee8,#248bf7) !important;
    color:#fff !important;
    box-shadow:0 12px 24px rgba(31,123,235,.24);
}
.gateway-decision-result{
    border-radius:16px;
    padding:16px 18px;
}
@media(max-width:760px){
    .gateway-decision-drawer{
        width:100vw;
    }
    .gateway-decision-drawer .drawer__header,
    .gateway-decision-drawer .drawer__body{
        padding-left:20px;
        padding-right:20px;
    }
    .gateway-decision-checklist>div{
        grid-template-columns:1fr 1fr;
    }
    .gateway-decision-footer{
        margin-left:-20px;
        margin-right:-20px;
        padding-left:20px !important;
        padding-right:20px !important;
    }
}
@media(max-width:520px){
    .gateway-decision-drawer .drawer__title h2{
        font-size:24px;
    }
    .gateway-control-label{
        align-items:flex-start;
        flex-direction:column;
        gap:3px;
    }
    .gateway-control-label span{
        text-align:left;
    }
    .gateway-decision-checklist>div{
        grid-template-columns:1fr;
    }
    .gateway-decision-footer{
        grid-template-columns:1fr;
    }
}

/* v219 — Live Office Connectivity */
.office-connectivity-workspace{display:grid;gap:20px}.office-connectivity-hero{display:flex;justify-content:space-between;gap:24px;align-items:flex-start;padding:26px;border:1px solid #d8e5f2;border-radius:22px;background:linear-gradient(135deg,#f7fbff,#eaf4ff)}.office-connectivity-hero h2{margin:5px 0 8px;font-size:29px;color:#112943}.office-connectivity-hero p{margin:0;max-width:760px;color:#5d748b;line-height:1.55}.office-connectivity-hero__actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;justify-content:flex-end}.office-status{display:inline-flex;gap:8px;align-items:center;padding:10px 13px;border-radius:999px;background:#eef3f7;color:#506579;font-weight:800;font-size:13px}.office-status i{width:9px;height:9px;border-radius:50%;background:#8a9cad}.office-status--online{background:#e7f8ef;color:#167047}.office-status--online i{background:#19a36f}.office-status--outage{background:#fff0f0;color:#af2931}.office-status--outage i{background:#d53d46}.office-status--possible_outage,.office-status--recovering{background:#fff6dc;color:#825f00}.office-status--possible_outage i,.office-status--recovering i{background:#d49a00}
.office-status-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.office-status-card{padding:19px;border:1px solid #dce6ef;border-radius:var(--radius-lg);background:#fff;box-shadow:0 8px 24px rgba(19,48,79,.055)}.office-status-card--primary{background:linear-gradient(145deg,#fff,#f2f8ff);border-color:#bfdbf8}.office-status-card>span,.office-status-card small{display:block;color:#6c8195}.office-status-card strong{display:block;margin:8px 0;font-size:20px;color:#122a45;overflow-wrap:anywhere}
.office-panel{padding:22px;border:1px solid #dce6ef;border-radius:var(--radius-lg);background:#fff}.office-panel__header{display:flex;justify-content:space-between;gap:16px;margin-bottom:17px}.office-panel__header h3{margin:4px 0 5px;font-size:21px}.office-panel__header p{margin:0;color:#687e93}.office-agent-list{display:grid;gap:10px}.office-agent-row{display:grid;grid-template-columns:48px minmax(0,1fr) auto;gap:14px;align-items:center;padding:15px;border:1px solid #e1e9f1;border-radius:16px;background:#fbfdff}.office-agent-row__icon{display:grid;place-items:center;width:45px;height:45px;border-radius:var(--radius-md);background:#eaf4ff;color:#1477dc}.office-agent-row__icon svg{width:22px;height:22px}.office-agent-row__main>div{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.office-agent-row__main p{margin:3px 0;color:#526b83;overflow-wrap:anywhere}.office-agent-row__main small{color:#74879a}.office-agent-state{display:inline-flex;padding:4px 8px;border-radius:999px;background:#eef2f6;color:#65778a;font-size:11px;font-weight:850}.office-agent-state--healthy{background:#e5f8ee;color:#137246}.office-agent-state--revoked{background:#fff0f0;color:#a92831}
.office-empty-state{display:grid;justify-items:start;gap:8px;padding:24px;border:1px dashed #c8d7e6;border-radius:16px;background:#f8fbfe}.office-empty-state p{margin:0 0 6px;color:#687f95}.office-empty-state--compact{padding:18px}.office-runtime-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}.office-runtime-grid article{padding:16px;border-radius:15px;background:#f4f8fc;text-align:center}.office-runtime-grid strong{display:block;font-size:24px;color:#112a45}.office-runtime-grid span{font-size:12px;color:#667e95}
.office-heartbeat-table{border:1px solid #e0e8f0;border-radius:16px;overflow:hidden}.office-heartbeat-table__head,.office-heartbeat-table__row{display:grid;grid-template-columns:150px minmax(160px,1fr) 150px 110px;gap:12px;padding:12px 15px;align-items:center}.office-heartbeat-table__head{background:#f3f7fb;color:#63798e;font-size:12px;font-weight:850}.office-heartbeat-table__row{border-top:1px solid #e8eef4;color:#4e667e;font-size:13px}.office-heartbeat-table__row strong{color:#152e49}
.office-agent-drawer{width:min(650px,100vw);z-index:1901}.office-agent-drawer .drawer__header{padding:26px 28px}.office-agent-drawer .drawer__body{padding:24px 28px 0}.office-agent-form{display:grid;gap:18px}.office-agent-intro,.office-agent-secret__warning{padding:17px 18px;border:1px solid #bedaff;border-radius:16px;background:linear-gradient(135deg,#f4f9ff,#eaf4ff)}.office-agent-intro strong,.office-agent-secret__warning strong{display:block;margin-bottom:5px;color:#15304e}.office-agent-intro p,.office-agent-secret__warning p{margin:0;color:#577089;line-height:1.5}.office-agent-secret{display:grid;gap:17px}.copy-field{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}.copy-field button{border:0;border-radius:12px;padding:0 15px;background:#eaf3fc;color:#1d5f9f;font-weight:800;cursor:pointer}.office-agent-next-steps{padding:18px;border:1px solid #dce7f1;border-radius:16px;background:#f9fbfd}.office-agent-next-steps strong{display:block;margin-bottom:9px}.office-agent-next-steps ol{margin:0;padding-left:20px;color:#536d85}.office-agent-next-steps li+li{margin-top:7px}.office-agent-next-steps code{padding:2px 5px;border-radius:5px;background:#eaf1f7}.office-agent-message{padding:14px 16px;border-radius:14px;background:#edf8f2;color:#176d47;font-weight:750}.office-agent-drawer .drawer__footer{position:sticky;bottom:0;display:flex;justify-content:flex-end;gap:10px;margin:4px -28px 0;padding:18px 28px 22px;border-top:1px solid #e1e9f1;background:#fff}[data-office-agent-backdrop]{z-index:1800}
@media(max-width:1000px){.office-status-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.office-runtime-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:700px){.office-connectivity-hero{flex-direction:column}.office-connectivity-hero__actions{justify-content:flex-start}.office-status-grid{grid-template-columns:1fr}.office-agent-row{grid-template-columns:42px minmax(0,1fr)}.office-agent-row>.button{grid-column:2}.office-heartbeat-table__head{display:none}.office-heartbeat-table__row{grid-template-columns:1fr 1fr}.office-runtime-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}


/* v220 — Office Agent drawer stacking correction */
[data-office-agent-backdrop]{
    z-index:1800 !important;
}
.office-agent-drawer{
    z-index:1902 !important;
}
.office-agent-drawer[hidden],
[data-office-agent-backdrop][hidden]{
    display:none !important;
}
.office-agent-drawer[aria-hidden="false"]{
    transform:translateX(0) !important;
    visibility:visible !important;
    opacity:1 !important;
    pointer-events:auto !important;
}


/* v221 — Mandatory modern drawer standard */
:root{
    --drawer-top-offset:0px;
    --drawer-surface:#ffffff;
    --drawer-border:#dce6f0;
    --drawer-text:#132b47;
    --drawer-muted:#667d94;
    --drawer-primary:#1879e8;
    --drawer-primary-strong:#1268d5;
    --drawer-soft:#f5f9fd;
    --drawer-radius:20px;
    --drawer-shadow:-28px 0 80px rgba(15,35,60,.26);
}

/*
 * HARD RULE:
 * All right-side drawers must use the same fixed, full-height,
 * modern shell and must always sit above the portal header.
 */
.drawer.drawer--right{
    position:fixed !important;
    top:var(--drawer-top-offset) !important;
    right:0 !important;
    bottom:0 !important;
    left:auto !important;
    height:100dvh !important;
    max-height:100dvh !important;
    margin:0 !important;
    border:0 !important;
    border-left:1px solid var(--drawer-border) !important;
    border-radius:var(--drawer-radius) 0 0 var(--drawer-radius) !important;
    background:var(--drawer-surface) !important;
    box-shadow:var(--drawer-shadow) !important;
    overflow:hidden !important;
    z-index:2102 !important;
    transform:translateX(104%);
    transition:
        transform .22s ease,
        opacity .18s ease,
        visibility .18s ease;
}

.drawer.drawer--right[aria-hidden="false"]{
    transform:translateX(0) !important;
    opacity:1 !important;
    visibility:visible !important;
    pointer-events:auto !important;
}

.drawer.drawer--right[hidden]{
    display:none !important;
}

.drawer-backdrop{
    position:fixed !important;
    inset:0 !important;
    z-index:1800 !important;
    background:rgba(21,38,58,.58) !important;
    backdrop-filter:blur(4px);
    -webkit-backdrop-filter:blur(4px);
}

.drawer-backdrop[hidden]{
    display:none !important;
}

.drawer.drawer--right .drawer__header{
    position:relative;
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:18px;
    min-height:112px;
    padding:26px 28px 22px !important;
    border-bottom:1px solid var(--drawer-border) !important;
    background:linear-gradient(180deg,#fff 0%,#fbfdff 100%) !important;
    z-index:2;
}

.drawer.drawer--right .drawer__title{
    display:flex;
    align-items:flex-start;
    gap:15px;
    min-width:0;
}

.drawer.drawer--right .drawer__title > div{
    min-width:0;
}

.drawer.drawer--right .gateway-drawer-icon{
    display:grid !important;
    place-items:center !important;
    flex:0 0 54px;
    width:54px !important;
    height:54px !important;
    border-radius:17px !important;
    background:#eaf4ff !important;
    color:#1478e5 !important;
    box-shadow:inset 0 0 0 1px #d5e8fb;
}

.drawer.drawer--right .gateway-drawer-icon svg{
    width:26px !important;
    height:26px !important;
}

.drawer.drawer--right .gateway-eyebrow{
    display:block;
    margin-bottom:4px;
    font-size:11px;
    font-weight:900;
    letter-spacing:.08em;
    text-transform:uppercase;
    color:#287acb;
}

.drawer.drawer--right .drawer__title h2{
    margin:0 0 6px !important;
    font-size:27px !important;
    line-height:1.16 !important;
    letter-spacing:-.025em;
    color:var(--drawer-text) !important;
}

.drawer.drawer--right .drawer__title p{
    margin:0 !important;
    max-width:520px;
    color:var(--drawer-muted) !important;
    font-size:14px !important;
    line-height:1.52 !important;
}

.drawer.drawer--right .icon-button{
    display:grid !important;
    place-items:center !important;
    flex:0 0 40px;
    width:40px !important;
    height:40px !important;
    padding:0 !important;
    border:1px solid transparent !important;
    border-radius:12px !important;
    background:transparent !important;
    color:#516980 !important;
    cursor:pointer;
}

.drawer.drawer--right .icon-button:hover{
    border-color:#d9e5ef !important;
    background:#f2f7fb !important;
    color:#18324e !important;
}

.drawer.drawer--right .drawer__body{
    height:calc(100dvh - 112px) !important;
    max-height:calc(100dvh - 112px) !important;
    padding:24px 28px 0 !important;
    overflow-y:auto !important;
    overflow-x:hidden !important;
    background:#fff !important;
}

/* Mandatory modern form controls inside all drawers */
.drawer.drawer--right label,
.drawer.drawer--right .modern-field{
    font-size:14px;
}

.drawer.drawer--right .modern-field{
    display:grid !important;
    gap:8px !important;
}

.drawer.drawer--right .modern-field > span{
    display:block !important;
    font-weight:800 !important;
    color:var(--drawer-text) !important;
}

.drawer.drawer--right input:not([type="checkbox"]):not([type="radio"]):not(.global-date-picker__native):not([data-request-queue-search]):not([data-attendance-adjustment-search]),
.drawer.drawer--right select,
.drawer.drawer--right textarea{
    width:100% !important;
    min-width:0 !important;
    min-height:52px !important;
    padding:13px 15px !important;
    border:1px solid #cbd9e7 !important;
    border-radius:14px !important;
    background:#fff !important;
    color:#162f4b !important;
    font:inherit !important;
    font-size:14px !important;
    line-height:1.35 !important;
    outline:0 !important;
    box-shadow:0 5px 16px rgba(18,47,77,.045) !important;
    transition:
        border-color .18s ease,
        box-shadow .18s ease,
        background .18s ease;
}

.drawer.drawer--right textarea{
    min-height:130px !important;
    resize:vertical;
}

.drawer.drawer--right select{
    min-height:44px !important;
    appearance:none;
    -webkit-appearance:none;
    padding-top:0 !important;
    padding-bottom:0 !important;
    padding-right:44px !important;
    background-image:
        linear-gradient(45deg,transparent 50%,#526b83 50%),
        linear-gradient(135deg,#526b83 50%,transparent 50%) !important;
    background-position:
        calc(100% - 22px) 23px,
        calc(100% - 16px) 23px !important;
    background-size:6px 6px,6px 6px !important;
    background-repeat:no-repeat !important;
}

.drawer.drawer--right input::placeholder,
.drawer.drawer--right textarea::placeholder{
    color:#8b9caf !important;
}

.drawer.drawer--right input:not(.global-date-picker__native):not([data-request-queue-search]):not([data-attendance-adjustment-search]):focus,
.drawer.drawer--right select:focus,
.drawer.drawer--right textarea:focus{
    border-color:#2788ed !important;
    box-shadow:0 0 0 4px rgba(39,136,237,.12) !important;
    background:#fff !important;
}

.drawer.drawer--right .modern-field small{
    color:#6f8498 !important;
    font-size:12px !important;
    line-height:1.45 !important;
}

.drawer.drawer--right .button{
    min-height:48px !important;
    padding:0 18px !important;
    border:1px solid transparent !important;
    border-radius:14px !important;
    font-weight:850 !important;
    font-size:14px !important;
    cursor:pointer !important;
    transition:
        transform .16s ease,
        box-shadow .16s ease,
        background .16s ease;
}

.drawer.drawer--right .button:hover{
    transform:translateY(-1px);
}

.drawer.drawer--right .button:not(.button--secondary):not(.button--danger){
    background:linear-gradient(
        135deg,
        var(--drawer-primary),
        var(--drawer-primary-strong)
    ) !important;
    color:#fff !important;
    box-shadow:0 10px 22px rgba(24,121,232,.22) !important;
}

.drawer.drawer--right .button--secondary{
    border-color:#cbd8e5 !important;
    background:#fff !important;
    color:#18324e !important;
    box-shadow:none !important;
}

.drawer.drawer--right .button--danger{
    border-color:#f0c9cd !important;
    background:#fff4f5 !important;
    color:#a92933 !important;
    box-shadow:none !important;
}

.drawer.drawer--right .drawer__footer{
    position:sticky !important;
    bottom:0 !important;
    display:flex !important;
    justify-content:flex-end !important;
    align-items:center !important;
    gap:10px !important;
    margin:8px 0 0 !important;
    padding:18px 28px 22px !important;
    border-top:1px solid var(--drawer-border) !important;
    background:rgba(255,255,255,.98) !important;
    backdrop-filter:blur(10px);
    -webkit-backdrop-filter:blur(10px);
    z-index:4 !important;
}

/* Office Agent drawer-specific modernisation */
.office-agent-drawer{
    width:min(660px,100vw) !important;
}

.office-agent-drawer .office-agent-form{
    display:grid !important;
    gap:20px !important;
}

.office-agent-drawer .office-agent-intro{
    padding:18px 20px !important;
    border:1px solid #bedaff !important;
    border-radius:17px !important;
    background:linear-gradient(135deg,#f6faff,#eaf4ff) !important;
    box-shadow:0 8px 22px rgba(30,101,174,.07);
}

.office-agent-drawer .office-agent-intro strong{
    display:block !important;
    margin-bottom:6px !important;
    color:#16314e !important;
    font-size:15px !important;
}

.office-agent-drawer .office-agent-intro p{
    margin:0 !important;
    color:#58718a !important;
    line-height:1.55 !important;
}

.office-agent-drawer .office-agent-secret{
    gap:18px !important;
}

.office-agent-drawer .office-agent-secret__warning{
    padding:18px 20px !important;
    border:1px solid #f0d8a1 !important;
    border-radius:17px !important;
    background:linear-gradient(135deg,#fffaf0,#fff4d9) !important;
}

.office-agent-drawer .copy-field{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) auto !important;
    gap:9px !important;
}

.office-agent-drawer .copy-field button{
    min-width:74px;
    min-height:52px;
    padding:0 15px !important;
    border:1px solid #cbd9e7 !important;
    border-radius:14px !important;
    background:#eef6fe !important;
    color:#175f9f !important;
    font-weight:850 !important;
    cursor:pointer;
}

.office-agent-drawer .office-agent-next-steps{
    padding:19px 20px !important;
    border:1px solid #d8e5f0 !important;
    border-radius:17px !important;
    background:#f8fbfe !important;
}

.office-agent-drawer .office-agent-message{
    padding:15px 17px !important;
    border-radius:14px !important;
    background:#eaf8f1 !important;
    color:#176d47 !important;
    font-weight:750 !important;
}

/* Never allow a fixed portal header to cover a drawer */
body.gateway-drawer-open .app-header,
body.gateway-drawer-open .topbar,
body.gateway-drawer-open header.site-header{
    z-index:1900 !important;
}

@media(max-width:700px){
    .drawer.drawer--right{
        width:100vw !important;
        border-radius:0 !important;
    }

    .drawer.drawer--right .drawer__header{
        padding:22px 20px 18px !important;
    }

    .drawer.drawer--right .drawer__body{
        padding:20px 20px 0 !important;
    }

    .drawer.drawer--right .drawer__footer{
        margin-left:0 !important;
        margin-right:0 !important;
        padding-left:20px !important;
        padding-right:20px !important;
    }

    .drawer.drawer--right .drawer__title h2{
        font-size:23px !important;
    }
}


/* v222 — Drawer portal / top navigation stacking fix */
body > .drawer.drawer--right{
    position:fixed !important;
    inset:0 0 0 auto !important;
    z-index:100002 !important;
    isolation:isolate;
}

body > .drawer-backdrop{
    position:fixed !important;
    inset:0 !important;
    z-index:100001 !important;
}

body.gateway-drawer-open{
    overflow:hidden !important;
}

/*
 * Once portalled to <body>, no header, topbar, transformed content shell,
 * filter, opacity or positioned ancestor can cover the drawer.
 */
body > .drawer.drawer--right .drawer__header{
    position:relative !important;
    z-index:2 !important;
}

body > .drawer.drawer--right .drawer__body{
    position:relative !important;
    z-index:1 !important;
}

/* Access Gateway v207 — grouped operations/configuration navigation */
.gateway-navigation{
    margin-top:14px;
    display:grid;
    grid-template-columns:minmax(0,2.4fr) minmax(260px,.8fr);
    gap:12px;
    align-items:stretch;
}
.gateway-navigation__group{
    min-width:0;
    padding:8px;
    border:1px solid #dfe7ef;
    border-radius:var(--radius-lg);
    background:#fff;
    box-shadow:0 8px 22px rgba(24,45,73,.06);
}
.gateway-navigation__label{
    display:block;
    padding:2px 8px 7px;
    color:#7a899b;
    font-size:10px;
    font-weight:900;
    letter-spacing:.12em;
    text-transform:uppercase;
}
.gateway-navigation .gateway-tabs{
    margin:0;
    padding:0;
    border:0;
    border-radius:0;
    background:transparent;
    box-shadow:none;
}
.gateway-legacy-networks{
    overflow:hidden;
}
.gateway-legacy-networks>summary{
    list-style:none;
    min-height:72px;
    padding:20px 24px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    cursor:pointer;
    font-weight:850;
    color:#20344c;
}
.gateway-legacy-networks>summary::-webkit-details-marker{display:none}
.gateway-legacy-networks>summary small{
    color:#7f8da0;
    font-weight:700;
}
.gateway-legacy-networks__body{
    padding:0 20px 20px;
}
.gateway-legacy-networks__body .gateway-management-grid{
    margin-top:0;
}
@media(max-width:1100px){
    .gateway-navigation{grid-template-columns:1fr}
}
@media(max-width:680px){
    .gateway-navigation__group{padding:7px}
    .gateway-legacy-networks>summary{
        padding:16px;
        align-items:flex-start;
        flex-direction:column;
        gap:4px;
    }
    .gateway-legacy-networks__body{padding:0 12px 12px}
}

/* HRD_UI_BOTTOM_DRAWER_MODERN_RECOVERY_V239_START */

/*
 * Scope:
 * - Preserve General Posts, Events, Celebrations and Forms as BOTTOM drawers.
 * - Keep the complete Forms builder and its iframe.
 * - Put each affected backdrop below its drawer.
 * - Remove blur from those four bottom-drawer backdrops.
 * - Restore the known-good modern feed/editor/table styling.
 * - Restore safe input padding.
 * - Keep right drawers below the 72px top navigation.
 *
 * This block deliberately does not alter application PHP, repositories,
 * APIs, database data or Forms builder JavaScript.
 */

:root {
    --drawer-top-offset: var(--topbar-height, 72px) !important;
    --hrd-v239-topbar-height: var(--topbar-height, 72px);
    --hrd-v239-bottom-backdrop-z: 1800;
    --hrd-v239-bottom-drawer-z: 1900;
    --hrd-v239-border: #dce6f0;
    --hrd-v239-border-soft: #e6edf4;
    --hrd-v239-surface: #ffffff;
    --hrd-v239-surface-soft: #f7fafe;
    --hrd-v239-text: #18283c;
    --hrd-v239-muted: #718096;
    --hrd-v239-primary: var(--primary, #2388f2);
    --hrd-v239-shadow: 0 20px 58px rgba(15, 35, 60, .22);
}

/* Right drawers must begin below, rather than underneath, the top nav. */
.drawer.drawer--right {
    top: var(--hrd-v239-topbar-height) !important;
    bottom: 0 !important;
    height: calc(100dvh - var(--hrd-v239-topbar-height)) !important;
    max-height: calc(100dvh - var(--hrd-v239-topbar-height)) !important;
}

/*
 * The regression shown by the diagnostic is exact:
 * the backdrop is z-index 2000 while the bottom drawer is z-index 1900.
 * These page-specific rules restore the correct order without changing
 * unrelated Access Gateway right drawers.
 */
[data-update-backdrop],
[data-event-backdrop],
[data-celebration-backdrop],
[data-forms-backdrop] {
    position: fixed !important;
    inset: 0 !important;
    z-index: var(--hrd-v239-bottom-backdrop-z) !important;
    background: rgba(18, 31, 48, .50) !important;
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

[data-update-backdrop][hidden],
[data-event-backdrop][hidden],
[data-celebration-backdrop][hidden],
[data-forms-backdrop][hidden] {
    display: none !important;
}

/* Feed editors: retain the original bottom-sheet interaction. */
[data-update-drawer],
[data-event-drawer],
[data-celebration-drawer] {
    position: fixed !important;
    top: auto !important;
    right: 12px !important;
    bottom: 12px !important;
    left: 12px !important;
    width: auto !important;
    height: min(
        88vh,
        900px,
        calc(100dvh - var(--hrd-v239-topbar-height) - 24px)
    ) !important;
    max-height: calc(
        100dvh - var(--hrd-v239-topbar-height) - 24px
    ) !important;
    margin: 0 !important;
    border: 1px solid var(--hrd-v239-border) !important;
    border-radius: 24px !important;
    background: var(--hrd-v239-surface) !important;
    color: var(--hrd-v239-text) !important;
    box-shadow: var(--hrd-v239-shadow) !important;
    overflow: hidden !important;
    isolation: isolate !important;
    z-index: var(--hrd-v239-bottom-drawer-z) !important;
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transform: translateY(calc(100% + 24px)) !important;
    transition:
        transform .22s ease,
        opacity .18s ease,
        visibility .18s ease !important;
}

[data-update-drawer].is-open,
[data-event-drawer].is-open,
[data-celebration-drawer].is-open,
[data-update-drawer][aria-hidden="false"],
[data-event-drawer][aria-hidden="false"],
[data-celebration-drawer][aria-hidden="false"] {
    transform: translateY(0) !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

[data-update-drawer][hidden],
[data-event-drawer][hidden],
[data-celebration-drawer][hidden] {
    display: none !important;
}

/* Create Form remains a compact bottom drawer. */
[data-form-name-drawer] {
    position: fixed !important;
    top: auto !important;
    right: 12px !important;
    bottom: 12px !important;
    left: 12px !important;
    width: auto !important;
    height: auto !important;
    max-height: min(
        430px,
        calc(100dvh - var(--hrd-v239-topbar-height) - 24px)
    ) !important;
    margin: 0 !important;
    border: 1px solid var(--hrd-v239-border) !important;
    border-radius: 20px !important;
    background: var(--hrd-v239-surface) !important;
    color: var(--hrd-v239-text) !important;
    box-shadow: var(--hrd-v239-shadow) !important;
    overflow: hidden !important;
    isolation: isolate !important;
    z-index: var(--hrd-v239-bottom-drawer-z) !important;
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transform: translateY(calc(100% + 24px)) !important;
    transition:
        transform .22s ease,
        opacity .18s ease,
        visibility .18s ease !important;
}

[data-form-name-drawer].is-open,
[data-form-name-drawer][aria-hidden="false"] {
    transform: translateY(0) !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

[data-form-name-drawer][hidden] {
    display: none !important;
}

/*
 * The complete Forms builder remains a bottom drawer. It is constrained
 * below the top navigation and no content-builder markup or iframe URL is
 * changed by this installer.
 */
[data-form-builder-drawer] {
    position: fixed !important;
    top: calc(var(--hrd-v239-topbar-height) + 8px) !important;
    right: 8px !important;
    bottom: 8px !important;
    left: 8px !important;
    width: auto !important;
    height: calc(
        100dvh - var(--hrd-v239-topbar-height) - 16px
    ) !important;
    max-height: calc(
        100dvh - var(--hrd-v239-topbar-height) - 16px
    ) !important;
    margin: 0 !important;
    border: 1px solid var(--hrd-v239-border) !important;
    border-radius: 20px !important;
    background: var(--hrd-v239-surface) !important;
    color: var(--hrd-v239-text) !important;
    box-shadow: var(--hrd-v239-shadow) !important;
    overflow: hidden !important;
    isolation: isolate !important;
    z-index: var(--hrd-v239-bottom-drawer-z) !important;
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transform: translateY(calc(100% + 24px)) !important;
    transition:
        transform .22s ease,
        opacity .18s ease,
        visibility .18s ease !important;
}

[data-form-builder-drawer].is-open,
[data-form-builder-drawer][aria-hidden="false"] {
    transform: translateY(0) !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

[data-form-builder-drawer][hidden] {
    display: none !important;
}

/* Never allow the bottom-drawer surface or its content to inherit blur. */
[data-update-drawer],
[data-update-drawer] *,
[data-event-drawer],
[data-event-drawer] *,
[data-celebration-drawer],
[data-celebration-drawer] *,
[data-form-name-drawer],
[data-form-name-drawer] *,
[data-form-builder-drawer],
[data-form-builder-drawer] * {
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Canonical drawer regions with comfortable spacing. */
[data-update-drawer] .drawer__form,
[data-event-drawer] .drawer__form,
[data-celebration-drawer] .drawer__form,
[data-form-name-drawer] .drawer__form,
[data-form-builder-drawer] .drawer__form {
    display: flex !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    flex-direction: column !important;
}

[data-update-drawer] .drawer__header,
[data-event-drawer] .drawer__header,
[data-celebration-drawer] .drawer__header,
[data-form-name-drawer] .drawer__header,
[data-form-builder-drawer] .drawer__header {
    min-height: 76px !important;
    flex: 0 0 auto !important;
    padding: 16px 22px !important;
    border-bottom: 1px solid var(--hrd-v239-border) !important;
    background: linear-gradient(180deg, #fff 0%, #fbfdff 100%) !important;
}

[data-update-drawer] .drawer__body,
[data-event-drawer] .drawer__body,
[data-celebration-drawer] .drawer__body,
[data-form-name-drawer] .drawer__body {
    min-height: 0 !important;
    flex: 1 1 auto !important;
    padding: 22px 26px 28px !important;
    overflow: auto !important;
    background: #fff !important;
}

[data-update-drawer] .drawer__footer,
[data-event-drawer] .drawer__footer,
[data-celebration-drawer] .drawer__footer,
[data-form-name-drawer] .drawer__footer {
    position: static !important;
    min-height: 70px !important;
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 10px !important;
    margin: 0 !important;
    padding: 12px 22px !important;
    border-top: 1px solid var(--hrd-v239-border) !important;
    background: #fff !important;
    z-index: 2 !important;
}

/* Forms builder iframe and canvas are retained in full. */
[data-form-builder-drawer] .drawer__form {
    height: 100% !important;
}

[data-form-builder-drawer] .drawer__body,
[data-form-builder-drawer] .forms-builder-frame-wrap {
    display: block !important;
    min-height: 0 !important;
    flex: 1 1 auto !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #f6f8fb !important;
}

[data-form-builder-drawer] iframe[data-builder-frame] {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    border: 0 !important;
    background: #f6f8fb !important;
}

/* Shared modern page shell for General Posts, Events and Celebrations. */
.events-page-content {
    display: grid !important;
    gap: 18px !important;
    padding: 24px !important;
}

.page-heading--with-action {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 16px !important;
}

.events-page-content .table-card {
    padding: 18px !important;
    overflow: hidden !important;
    border: 1px solid var(--hrd-v239-border) !important;
    border-radius: 18px !important;
    background: #fff !important;
    box-shadow: 0 8px 24px rgba(24, 45, 73, .055) !important;
}

.events-page-content .table-toolbar {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    min-height: 58px !important;
    padding: 0 0 16px !important;
    flex-wrap: wrap !important;
}

.events-page-content .table-toolbar__selection {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
}

.events-page-content .table-search {
    display: block !important;
    width: min(300px, 100%) !important;
    min-width: 240px !important;
    margin-left: auto !important;
}

.events-page-content .table-search input {
    display: block !important;
    width: 100% !important;
    min-height: 42px !important;
    padding: 0 14px !important;
    border: 1px solid #cbd8e5 !important;
    border-radius: 12px !important;
    outline: 0 !important;
    background: #fff !important;
    color: var(--hrd-v239-text) !important;
    box-shadow: 0 3px 12px rgba(24, 45, 73, .035) !important;
}

.events-page-content .table-search input:focus {
    border-color: var(--hrd-v239-primary) !important;
    box-shadow: 0 0 0 4px rgba(35, 136, 242, .12) !important;
}

.events-page-content .table-scroll {
    margin: 0 !important;
    padding: 0 !important;
    overflow: auto !important;
    border: 1px solid var(--hrd-v239-border) !important;
    border-radius: 16px !important;
    background: #fff !important;
}

.events-page-content .data-table {
    width: 100% !important;
    min-width: 100% !important;
    margin: 0 !important;
    border: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    table-layout: auto !important;
    background: #fff !important;
}

.events-page-content .data-table th,
.events-page-content .data-table td {
    height: auto !important;
    padding: 14px 16px !important;
    border-bottom: 1px solid #e8eef4 !important;
    vertical-align: middle !important;
}

.events-page-content .data-table th {
    background: #f5f8fb !important;
    color: #334b63 !important;
    font-size: 11px !important;
    font-weight: 850 !important;
    letter-spacing: .02em !important;
}

.events-page-content .data-table tbody tr:last-child td {
    border-bottom: 0 !important;
}

.events-page-content .data-table tbody tr:hover td {
    background: #f8fbfe !important;
}

.events-page-content .table-empty-state {
    min-height: 260px !important;
    padding: 44px 24px !important;
}

/* Modern event/update/celebration editor structure. */
.event-title-link {
    padding: 0 !important;
    border: 0 !important;
    background: none !important;
    color: var(--hrd-v239-primary) !important;
    font: inherit !important;
    font-weight: 800 !important;
    cursor: pointer !important;
    text-align: left !important;
}

.event-editor__form {
    min-height: 0 !important;
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
}

.event-stepper--modern {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 12px !important;
    padding: 12px 24px !important;
    border-bottom: 1px solid var(--hrd-v239-border-soft) !important;
    background: #f8fafc !important;
}

.event-stepper--modern button {
    display: flex !important;
    min-height: 42px !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 9px !important;
    padding: 8px 13px !important;
    border: 1px solid transparent !important;
    border-radius: 13px !important;
    background: #edf2f7 !important;
    color: var(--hrd-v239-muted) !important;
    font-weight: 800 !important;
}

.event-stepper--modern button span {
    display: grid !important;
    width: 24px !important;
    height: 24px !important;
    place-items: center !important;
    border-radius: 50% !important;
    background: #fff !important;
    font-size: 12px !important;
}

.event-stepper--modern button.is-active {
    border-color: #b9d9fb !important;
    background: #e7f3ff !important;
    color: var(--hrd-v239-primary) !important;
}

.event-stepper--modern button.is-complete {
    background: #eaf8f2 !important;
    color: #15805a !important;
}

.event-editor__workspace {
    min-height: 0 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 390px !important;
    flex: 1 1 auto !important;
    overflow: hidden !important;
}

.event-editor__content {
    min-width: 0 !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: auto !important;
    padding: 24px 28px 36px !important;
}

.event-editor__step {
    width: min(920px, 100%) !important;
    margin: 0 auto !important;
}

.event-editor__step[hidden] {
    display: none !important;
}

.event-section-heading {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 24px !important;
    margin-bottom: 22px !important;
}

.event-section-heading h3 {
    margin: 4px 0 0 !important;
    font-size: 22px !important;
    line-height: 1.2 !important;
}

.event-section-heading p {
    width: min(360px, 45%) !important;
    margin: 0 !important;
    color: var(--hrd-v239-muted) !important;
}

.event-section-kicker {
    color: var(--hrd-v239-primary) !important;
    font-size: 11px !important;
    font-weight: 850 !important;
    letter-spacing: .09em !important;
    text-transform: uppercase !important;
}

.form-grid--3,
.event-date-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 12px !important;
}

.modern-field {
    display: grid !important;
    width: 100% !important;
    min-width: 0 !important;
    gap: 8px !important;
    margin: 0 0 18px !important;
    color: var(--hrd-v239-text) !important;
    font-weight: 750 !important;
}

.modern-field > span {
    display: block !important;
    padding: 0 2px !important;
}

.modern-field input,
.modern-field textarea,
.modern-field select {
    width: 100% !important;
    min-width: 0 !important;
    border: 1px solid #d8e1eb !important;
    border-radius: 13px !important;
    outline: 0 !important;
    background-color: #fff !important;
    color: var(--hrd-v239-text) !important;
    font: inherit !important;
    line-height: 1.35 !important;
    transition:
        border-color .16s ease,
        box-shadow .16s ease !important;
}

.modern-field input:not([type="file"]) {
    min-height: 48px !important;
    padding: 0 14px !important;
}

.modern-field select {
    min-height: 44px !important;
}

.modern-field textarea {
    min-height: 130px !important;
    padding: 13px 14px !important;
    resize: vertical !important;
}

.modern-field input[type="file"] {
    min-height: 48px !important;
    padding: 10px 12px !important;
}

.modern-field input:focus,
.modern-field textarea:focus,
.modern-field select:focus {
    border-color: var(--hrd-v239-primary) !important;
    box-shadow: 0 0 0 3px rgba(35, 136, 242, .12) !important;
}

.event-cover-panel,
.event-settings-card {
    display: grid !important;
    gap: 14px !important;
    margin-bottom: 22px !important;
    padding: 18px !important;
    border: 1px solid #dfe7ef !important;
    border-radius: 16px !important;
    background: #fff !important;
    box-shadow: 0 5px 18px rgba(20, 36, 58, .05) !important;
}

.event-cover-panel__heading {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;
    margin-bottom: 1px !important;
}

.event-cover-panel__heading > div {
    display: grid !important;
    gap: 3px !important;
}

.event-cover-panel__heading span,
.event-settings-card small {
    color: var(--hrd-v239-muted) !important;
    font-size: 12px !important;
}

.event-upload-button {
    position: relative !important;
    overflow: hidden !important;
    cursor: pointer !important;
}

.event-upload-button input[type="file"] {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    opacity: 0 !important;
    cursor: pointer !important;
}

.event-cover-library {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(100px, 1fr)) !important;
    gap: 11px !important;
}

.event-cover-choice {
    position: relative !important;
    height: 88px !important;
    overflow: hidden !important;
    padding: 0 !important;
    border: 2px solid transparent !important;
    border-radius: 12px !important;
    background: #edf2f7 !important;
    cursor: pointer !important;
}

.event-cover-choice img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.event-cover-choice__check {
    position: absolute !important;
    right: 7px !important;
    bottom: 7px !important;
    display: none !important;
    width: 25px !important;
    height: 25px !important;
    place-items: center !important;
    border-radius: 50% !important;
    background: var(--hrd-v239-primary) !important;
    color: #fff !important;
    font-weight: 900 !important;
}

.event-cover-choice.is-selected {
    border-color: var(--hrd-v239-primary) !important;
    box-shadow: 0 0 0 3px rgba(35, 136, 242, .12) !important;
}

.event-cover-choice.is-selected .event-cover-choice__check {
    display: grid !important;
}

.event-upload-selection {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 14px !important;
    margin-top: 13px !important;
    padding: 10px 12px !important;
    border-radius: 11px !important;
    background: #edf6ff !important;
    color: var(--hrd-v239-primary) !important;
    font-weight: 750 !important;
}

.event-upload-selection[hidden] {
    display: none !important;
}

.modern-choice-row,
.event-recipient {
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
    margin: 0 !important;
    padding: 14px !important;
    border: 1px solid #dfe7ef !important;
    border-radius: 13px !important;
    background: #fff !important;
}

.modern-choice-row input,
.event-recipient input {
    margin-top: 3px !important;
}

.modern-choice-row span,
.event-recipient > span:last-child {
    display: grid !important;
    gap: 3px !important;
}

.modern-choice-row small,
.event-recipient small {
    color: var(--hrd-v239-muted) !important;
    font-weight: 500 !important;
}

.event-status-options {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    margin: 0 !important;
}

.recipient-heading--modern {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 18px !important;
    margin-bottom: 16px !important;
    padding: 14px !important;
    border: 1px solid #dfe7ef !important;
    border-radius: 14px !important;
    background: #f8fafc !important;
}

.recipient-count {
    color: var(--hrd-v239-primary) !important;
    font-weight: 850 !important;
}

.event-recipient-list {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
}

.event-mobile-preview {
    min-width: 0 !important;
    min-height: 0 !important;
    overflow: auto !important;
    padding: 20px !important;
    border-left: 1px solid #dfe7ef !important;
    background: linear-gradient(180deg, #dff9f3, #e6f1fb) !important;
}

.event-mobile-preview__heading {
    display: flex !important;
    justify-content: space-between !important;
    gap: 10px !important;
    margin-bottom: 16px !important;
}

.event-mobile-preview__heading span {
    font-weight: 850 !important;
}

.event-mobile-preview__heading small {
    color: #617086 !important;
}

.event-phone {
    width: 300px !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 10px !important;
    border: 7px solid #eef2f6 !important;
    border-radius: 38px !important;
    background: #fff !important;
    box-shadow: 0 18px 45px rgba(28, 53, 84, .2) !important;
}

.event-phone__speaker {
    width: 64px !important;
    height: 6px !important;
    margin: 2px auto 10px !important;
    border-radius: 999px !important;
    background: #b9c3cf !important;
}

.event-phone__screen {
    min-height: 470px !important;
    overflow: hidden !important;
    border: 1px solid #172335 !important;
    border-radius: 20px !important;
    background: #f3f5f8 !important;
}

.event-preview-card {
    margin: 12px !important;
    overflow: hidden !important;
    border-radius: 18px !important;
    background: #fff !important;
    box-shadow: 0 8px 24px rgba(20, 36, 58, .1) !important;
}

.event-preview-cover {
    display: grid !important;
    min-height: 160px !important;
    place-items: center !important;
    padding: 18px !important;
    background: #edf2f7 !important;
    color: #8492a6 !important;
    text-align: center !important;
}

.event-preview-cover.has-image {
    min-height: 0 !important;
    aspect-ratio: 16 / 10 !important;
    background-image: var(--event-preview-image) !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-size: contain !important;
    background-color: #111827 !important;
}

.event-preview-cover--poster {
    background-size: contain !important;
    background-color: #111827 !important;
}

.event-preview-body {
    padding: 16px !important;
}

.event-preview-type {
    color: var(--hrd-v239-primary) !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    letter-spacing: .08em !important;
    text-transform: uppercase !important;
}

.event-preview-body h3 {
    margin: 6px 0 10px !important;
    font-size: 22px !important;
}

.social-preview-row {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-top: 14px !important;
    flex-wrap: wrap !important;
    color: #66758a !important;
}

.celebration-preview-stack {
    display: grid !important;
    gap: 16px !important;
}

.celebration-preview-stack img {
    width: 100% !important;
    max-height: 280px !important;
    object-fit: contain !important;
    border-radius: 16px !important;
    background: #111827 !important;
}

/* Forms list, search, table and Create Form field. */
[data-forms-page] {
    padding: 24px !important;
}

[data-forms-page] .users-heading,
[data-forms-page] .forms-panel {
    border: 1px solid var(--hrd-v239-border) !important;
    border-radius: 18px !important;
    background: #fff !important;
    box-shadow: 0 8px 24px rgba(24, 45, 73, .055) !important;
}

[data-forms-page] .forms-panel {
    margin-top: 18px !important;
    overflow: hidden !important;
    padding: 0 !important;
}

[data-forms-page] .forms-panel .users-toolbar {
    min-height: 68px !important;
    padding: 13px 22px !important;
    border-bottom: 1px solid #edf2f7 !important;
    background: #fff !important;
}

[data-forms-page] .search-control {
    min-height: 42px !important;
    padding: 0 12px !important;
    border: 1px solid #cbd8e5 !important;
    border-radius: 12px !important;
    background: #fff !important;
}

[data-forms-page] .search-control input[data-form-search] {
    min-height: 38px !important;
    padding: 0 7px !important;
    border: 0 !important;
    border-radius: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    color: var(--hrd-v239-text) !important;
}

[data-forms-page] .search-control:focus-within {
    border-color: var(--hrd-v239-primary) !important;
    box-shadow: 0 0 0 4px rgba(35, 136, 242, .12) !important;
}

[data-forms-page] .forms-panel .table-scroll {
    margin: 0 22px 22px !important;
    padding: 0 !important;
    overflow: auto !important;
    border: 1px solid var(--hrd-v239-border) !important;
    border-radius: 16px !important;
    background: #fff !important;
}

[data-forms-page] .forms-table {
    width: 100% !important;
    min-width: 100% !important;
    margin: 0 !important;
    border: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    background: #fff !important;
}

[data-forms-page] .forms-table th,
[data-forms-page] .forms-table td {
    height: auto !important;
    padding: 13px 15px !important;
    border-bottom: 1px solid #e8eef4 !important;
    vertical-align: middle !important;
}

[data-forms-page] .forms-table th {
    background: #f5f8fb !important;
    color: #334b63 !important;
    font-size: 11px !important;
    font-weight: 850 !important;
}

[data-forms-page] .forms-table tbody tr:last-child td {
    border-bottom: 0 !important;
}

[data-forms-page] .forms-table tbody tr:hover td {
    background: #f8fbfe !important;
}

[data-form-name-drawer] .field {
    display: grid !important;
    width: 100% !important;
    gap: 8px !important;
    margin: 0 !important;
    color: var(--hrd-v239-text) !important;
    font-weight: 750 !important;
}

[data-form-name-drawer] .field > span {
    padding: 0 2px !important;
}

[data-form-name-drawer] .field > input:not([type="hidden"]) {
    width: 100% !important;
    min-height: 48px !important;
    padding: 0 14px !important;
    border: 1px solid #cbd8e5 !important;
    border-radius: 13px !important;
    outline: 0 !important;
    background: #fff !important;
    color: var(--hrd-v239-text) !important;
    font: inherit !important;
}

[data-form-name-drawer] .field > input:focus {
    border-color: var(--hrd-v239-primary) !important;
    box-shadow: 0 0 0 3px rgba(35, 136, 242, .12) !important;
}

[data-form-name-drawer] .drawer__footer-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
}

/* Gateway Audit controls and table are restored without changing data. */
.gateway-audit-toolbar {
    display: flex !important;
    align-items: flex-end !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
}

.gateway-audit-toolbar label {
    display: grid !important;
    gap: 7px !important;
    min-width: 0 !important;
}

.gateway-audit-toolbar input:not([type="checkbox"]):not([type="radio"]),
.gateway-audit-toolbar select {
    min-width: 150px !important;
    border: 1px solid #cbd8e5 !important;
    border-radius: 12px !important;
    outline: 0 !important;
    background-color: #fff !important;
    color: var(--hrd-v239-text) !important;
    font: inherit !important;
}

.gateway-audit-toolbar input:not([type="checkbox"]):not([type="radio"]) {
    padding: 10px 14px !important;
}

.gateway-audit-toolbar select {
    min-height: 44px !important;
}

.gateway-audit-toolbar input:focus,
.gateway-audit-toolbar select:focus {
    border-color: var(--hrd-v239-primary) !important;
    box-shadow: 0 0 0 3px rgba(35, 136, 242, .12) !important;
}

.gateway-audit-table {
    width: 100% !important;
    min-width: 100% !important;
    border: 1px solid var(--hrd-v239-border) !important;
    border-radius: 16px !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    overflow: hidden !important;
    background: #fff !important;
}

.gateway-audit-table th,
.gateway-audit-table td {
    height: auto !important;
    padding: 13px 15px !important;
    border-bottom: 1px solid #e8eef4 !important;
    vertical-align: top !important;
}

.gateway-audit-table th {
    background: #f5f8fb !important;
    color: #334b63 !important;
    font-size: 11px !important;
    font-weight: 850 !important;
}

.gateway-audit-table tbody tr:last-child td {
    border-bottom: 0 !important;
}

@media (max-width: 1100px) {
    .event-editor__workspace {
        grid-template-columns: minmax(0, 1fr) 340px !important;
    }

    .event-cover-library {
        grid-template-columns: repeat(3, minmax(100px, 1fr)) !important;
    }
}

@media (max-width: 820px) {
    .events-page-content,
    [data-forms-page] {
        padding: 14px !important;
    }

    .page-heading--with-action {
        grid-template-columns: auto minmax(0, 1fr) !important;
    }

    .page-heading--with-action > .button {
        grid-column: 1 / -1 !important;
        justify-self: start !important;
    }

    [data-update-drawer],
    [data-event-drawer],
    [data-celebration-drawer] {
        right: 8px !important;
        bottom: 8px !important;
        left: 8px !important;
        height: calc(
            100dvh - var(--hrd-v239-topbar-height) - 16px
        ) !important;
        max-height: calc(
            100dvh - var(--hrd-v239-topbar-height) - 16px
        ) !important;
        border-radius: 20px !important;
    }

    .event-editor__workspace {
        display: block !important;
        overflow: auto !important;
    }

    .event-editor__content {
        overflow: visible !important;
        padding: 20px 18px 32px !important;
    }

    .event-mobile-preview {
        border-top: 1px solid #dfe7ef !important;
        border-left: 0 !important;
    }

    .event-section-heading {
        display: grid !important;
    }

    .event-section-heading p {
        width: auto !important;
    }

    .form-grid--3,
    .event-date-grid,
    .event-recipient-list {
        grid-template-columns: 1fr !important;
    }

    [data-forms-page] .forms-panel .table-scroll {
        margin-right: 12px !important;
        margin-left: 12px !important;
    }
}

@media (max-width: 620px) {
    .event-stepper--modern {
        padding: 10px 14px !important;
    }

    .event-stepper--modern button strong {
        display: none !important;
    }

    .event-cover-library {
        grid-template-columns: repeat(2, minmax(100px, 1fr)) !important;
    }

    .event-cover-panel__heading {
        align-items: flex-start !important;
        flex-direction: column !important;
    }

    [data-update-drawer] .drawer__header,
    [data-event-drawer] .drawer__header,
    [data-celebration-drawer] .drawer__header,
    [data-form-name-drawer] .drawer__header,
    [data-form-builder-drawer] .drawer__header {
        padding-right: 16px !important;
        padding-left: 16px !important;
    }

    [data-update-drawer] .drawer__body,
    [data-event-drawer] .drawer__body,
    [data-celebration-drawer] .drawer__body,
    [data-form-name-drawer] .drawer__body {
        padding-right: 16px !important;
        padding-left: 16px !important;
    }

    [data-update-drawer] .drawer__footer,
    [data-event-drawer] .drawer__footer,
    [data-celebration-drawer] .drawer__footer,
    [data-form-name-drawer] .drawer__footer {
        padding-right: 16px !important;
        padding-left: 16px !important;
    }
}

/* HRD_UI_BOTTOM_DRAWER_MODERN_RECOVERY_V239_END */

/* HRD_INTERNET_ACCESS_GATEWAY_WORKSTATIONS_V294 */
.iag-panel-header {
    align-items: flex-start;
    gap: 20px;
}

.iag-panel-header > div {
    min-width: 0;
}

.iag-panel-header p {
    max-width: 760px;
    margin: 6px 0 0;
    color: var(--muted);
}

.iag-workstation-list {
    display: grid;
    gap: 10px;
}

.iag-workstation-row {
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.iag-workstation-row .office-agent-row__main {
    min-width: 0;
}

.iag-workstation-row .office-agent-row__main > div {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.iag-workstation-row p,
.iag-workstation-row small {
    overflow-wrap: anywhere;
}

.iag-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    margin-left: auto;
}

body.iag-drawer-open {
    overflow: hidden !important;
}

.iag-drawer-backdrop {
    position: fixed !important;
    z-index: 120040 !important;
    inset: 0 !important;
}

.iag-drawer {
    position: fixed !important;
    z-index: 120041 !important;
    top: max(12px, env(safe-area-inset-top)) !important;
    right: 12px !important;
    bottom: max(12px, env(safe-area-inset-bottom)) !important;
    left: auto !important;
    width: min(620px, calc(100vw - 24px)) !important;
    max-height: calc(100vh - 24px) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-md) !important;
    overflow: hidden !important;
}

.iag-drawer .drawer__header,
.iag-drawer .drawer__body,
.iag-drawer .drawer__footer {
    padding-right: 24px !important;
    padding-left: 24px !important;
}

.iag-drawer .drawer__header {
    padding-top: 22px !important;
    padding-bottom: 18px !important;
}

.iag-drawer-body {
    overflow-y: auto !important;
    padding-top: 20px !important;
    padding-bottom: 28px !important;
}

.iag-code-result {
    display: grid;
    gap: 16px;
    margin-top: 18px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--background);
}

.iag-code-result code,
.iag-code-result [data-iag-provision-endpoint] {
    display: block;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    overflow-wrap: anywhere;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.iag-code-expiry {
    margin: 0;
    color: var(--muted);
}

.iag-assigned-employee,
.iag-override-warning {
    display: grid;
    gap: 4px;
    margin: 12px 0 18px;
    padding: 13px 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--background);
}

.iag-assigned-employee span,
.iag-override-warning p {
    margin: 0;
    color: var(--muted);
}

.iag-override-layout {
    display: grid;
    gap: 16px;
}

.iag-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.iag-detail-grid > div,
.iag-detail-reason {
    display: grid;
    gap: 4px;
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
}

.iag-detail-grid span,
.iag-detail-reason span {
    color: var(--muted);
    font-size: 12px;
}

.iag-detail-grid strong,
.iag-detail-reason p {
    margin: 0;
    overflow-wrap: anywhere;
}

.iag-detail-reason {
    margin-top: 12px;
}

.iag-activity-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.iag-activity-item {
    display: grid;
    gap: 8px;
    padding: 14px 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
}

.iag-activity-item > div {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.iag-activity-item time,
.iag-activity-item small {
    color: var(--muted);
}

.iag-activity-item p {
    margin: 0;
}

.iag-user-card {
    display: grid;
    gap: 18px;
}

.iag-user-heading {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    gap: 14px;
}

.iag-user-heading > .icon {
    margin-top: 2px;
}

.iag-user-heading h3,
.iag-user-heading p {
    margin: 0;
}

.iag-user-heading p {
    margin-top: 5px;
    color: var(--muted);
}

.iag-user-status {
    align-self: start;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--background);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.iag-user-status.is-error {
    border-color: color-mix(in srgb, var(--error) 35%, var(--border));
    color: var(--error);
}

.iag-user-assignment-controls {
    display: grid;
    grid-template-columns: minmax(220px, 1.5fr) minmax(170px, .75fr) auto;
    align-items: end;
    gap: 12px;
}

.iag-user-assignment-list {
    display: grid;
    gap: 10px;
}

.iag-user-assignment-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 14px 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.iag-user-assignment-main {
    min-width: 0;
}

.iag-user-assignment-main > div {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.iag-user-assignment-main p,
.iag-user-assignment-main small {
    margin: 5px 0 0;
    color: var(--muted);
    overflow-wrap: anywhere;
}

@media (max-width: 900px) {
    .iag-workstation-row,
    .iag-user-assignment-row {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .iag-row-actions {
        width: 100%;
        justify-content: flex-start;
        margin-left: 0;
    }

    .iag-user-assignment-controls {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .iag-user-assignment-controls .button {
        justify-content: center;
    }
}

@media (max-width: 620px) {
    .iag-panel-header,
    .iag-user-heading {
        display: grid;
        grid-template-columns: 1fr;
    }

    .iag-user-heading > .icon {
        display: none;
    }

    .iag-user-status {
        justify-self: start;
    }

    .iag-drawer {
        top: 8px !important;
        right: 8px !important;
        bottom: 8px !important;
        width: calc(100vw - 16px) !important;
        max-height: calc(100vh - 16px) !important;
    }

    .iag-drawer .drawer__header,
    .iag-drawer .drawer__body,
    .iag-drawer .drawer__footer {
        padding-right: 16px !important;
        padding-left: 16px !important;
    }

    .iag-detail-grid {
        grid-template-columns: 1fr;
    }

    .iag-activity-item > div {
        display: grid;
    }
}
/* /HRD_INTERNET_ACCESS_GATEWAY_WORKSTATIONS_V294 */


/* HRD_REGISTERED_DEVICE_MAC_PRESENCE_V295_1 */
.gateway-device-record-states{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.gateway-device-network-status{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:14px;border:1px solid var(--border,#dce5ef);border-radius:14px;background:var(--surface-soft,#f7f9fc)}
.gateway-device-network-status[hidden]{display:none!important}
.gateway-device-network-status>div{min-width:0;padding:10px 12px;border-radius:11px;background:var(--surface);box-shadow:inset 0 0 0 1px rgba(34,55,82,.06)}
.gateway-device-network-status span{display:block;margin-bottom:3px;color:var(--muted,#66758a);font-size:12px;font-weight:700}
.gateway-device-network-status strong{display:block;overflow-wrap:anywhere;color:var(--text,#10233f);font-size:13px}
.gateway-device-network-status[data-state="present"]{border-color:#a9dec0;background:#eefaf3}
.gateway-device-network-status[data-state="absent"]{border-color:#efb8b8;background:#fff3f3}
.gateway-device-network-status[data-state="unknown"]{border-color:#ead59a;background:#fff9e8}
@media (max-width:760px){.gateway-device-network-status{grid-template-columns:1fr}.gateway-device-record-states{align-items:flex-end;flex-direction:column}}
/* /HRD_REGISTERED_DEVICE_MAC_PRESENCE_V295_1 */


/* HRD_OFFICE_AGENT_DIRECTORY_NEW_DEVICE_WORKFLOW_V296 */
.gateway-mac-typeahead-field {
    position: relative;
}

.gateway-mac-typeahead {
    position: relative;
    width: 100%;
}

.gateway-mac-typeahead__input {
    position: relative;
    display: flex;
    align-items: center;
}

.gateway-mac-typeahead__input input {
    width: 100%;
    padding-right: 46px !important;
}

.gateway-mac-typeahead__toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    display: grid;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--muted);
    place-items: center;
    transform: translateY(-50%);
    cursor: pointer;
}

.gateway-mac-typeahead__toggle:hover,
.gateway-mac-typeahead.is-open .gateway-mac-typeahead__toggle {
    background: var(--surface-muted);
    color: var(--text);
}

.gateway-mac-typeahead__toggle svg {
    width: 17px;
    height: 17px;
    transition: transform .18s ease;
}

.gateway-mac-typeahead.is-open .gateway-mac-typeahead__toggle svg {
    transform: rotate(180deg);
}

.gateway-mac-typeahead__menu {
    position: absolute;
    z-index: 120060;
    top: calc(100% + 7px);
    right: 0;
    left: 0;
    max-height: 300px;
    overflow-y: auto;
    padding: 7px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-md);
    overscroll-behavior: contain;
}

.gateway-mac-typeahead__menu[hidden] {
    display: none !important;
}

.gateway-mac-typeahead__option {
    display: grid;
    width: 100%;
    gap: 4px;
    padding: 10px 11px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    text-align: left;
    cursor: pointer;
}

.gateway-mac-typeahead__option:hover,
.gateway-mac-typeahead__option.is-active {
    background: var(--surface-muted);
}

.gateway-mac-typeahead__option.is-new-device {
    background: color-mix(in srgb, var(--primary) 8%, var(--surface));
}

.gateway-mac-typeahead__option.is-new-device:hover,
.gateway-mac-typeahead__option.is-new-device.is-active {
    background: color-mix(in srgb, var(--primary) 14%, var(--surface));
}

.gateway-mac-typeahead__option-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.gateway-mac-typeahead__option strong {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    letter-spacing: .02em;
}

.gateway-mac-typeahead__option small {
    color: var(--muted);
    line-height: 1.35;
}

.gateway-mac-new-badge,
.gateway-mac-mapped-badge {
    flex: 0 0 auto;
    padding: 3px 7px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.gateway-mac-new-badge {
    background: color-mix(in srgb, var(--primary) 14%, var(--surface));
    color: var(--primary);
}

.gateway-mac-mapped-badge {
    background: var(--surface-muted);
    color: var(--muted);
}

.gateway-mac-typeahead__empty {
    padding: 14px 12px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

@media (max-width: 700px) {
    .gateway-mac-typeahead__menu {
        position: fixed;
        z-index: 130050;
        top: auto;
        right: 14px;
        bottom: 14px;
        left: 14px;
        max-height: min(52vh, 360px);
    }
}

/* HRD_UNIFIED_EMPLOYEE_ACCESS_ASSIGNMENT */
.employee-access-device-list{
    padding:24px!important;
    border-radius:var(--radius-lg);
}
.employee-access-device-table-wrap{
    width:100%;
    margin-top:18px;
    overflow-x:auto;
    border:1px solid var(--border);
    border-radius:var(--radius-lg);
    background:var(--surface);
}
.employee-access-device-table{
    width:100%;
    min-width:1480px;
    border-collapse:separate;
    border-spacing:0;
    color:var(--text);
    font-size:13px;
}
.employee-access-device-table th,
.employee-access-device-table td{
    padding:13px 14px;
    border-bottom:1px solid var(--border);
    vertical-align:middle;
    text-align:left;
    white-space:nowrap;
}
.employee-access-device-table th{
    position:sticky;
    top:0;
    z-index:1;
    background:var(--background);
    color:var(--muted);
    font-size:11px;
    font-weight:850;
    letter-spacing:.04em;
    text-transform:uppercase;
}
.employee-access-device-table tbody tr:last-child td{
    border-bottom:0;
}
.employee-access-device-table tbody tr:hover td{
    background:color-mix(in srgb,var(--primary) 3%,var(--surface));
}
.employee-access-device-row{
    cursor:pointer;
}
.employee-access-device-row:focus-visible{
    outline:2px solid var(--primary);
    outline-offset:-2px;
}
.employee-access-table-action-heading{
    position:sticky!important;
    right:0;
    z-index:3;
    background:var(--background)!important;
    box-shadow:-10px 0 16px -16px color-mix(in srgb,var(--text) 55%,transparent);
    text-align:right!important;
}
.employee-access-device-row:hover .employee-access-table-action{
    background:color-mix(in srgb,var(--primary) 3%,var(--surface))!important;
}
.employee-access-table-person,
.employee-access-table-device{
    display:grid;
    gap:3px;
    min-width:145px;
}
.employee-access-table-person strong,
.employee-access-table-device strong{
    color:var(--text);
    font-weight:850;
}
.employee-access-table-person small,
.employee-access-table-device small,
.employee-access-table-sub{
    display:block;
    margin-top:3px;
    color:var(--muted);
    font-size:11px;
    line-height:1.3;
}
.employee-access-table-mono{
    font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;
    letter-spacing:.01em;
}
.employee-access-table-action{
    position:sticky!important;
    right:0;
    z-index:2;
    width:1%;
    min-width:92px;
    text-align:right!important;
    background:var(--surface)!important;
    box-shadow:-10px 0 16px -16px color-mix(in srgb,var(--text) 55%,transparent);
}
.employee-access-table-action .button{
    min-width:62px;
}
.employee-access-drawer{
    width:min(780px,100vw)!important;
}
.employee-access-drawer .drawer__form{
    min-height:0;
}
.employee-access-body{
    display:grid;
    gap:18px;
    padding-bottom:28px!important;
}
.employee-access-section{
    display:grid;
    gap:16px;
    padding:20px;
    border:1px solid var(--border);
    border-radius:var(--radius-lg);
    background:var(--surface);
    box-shadow:0 8px 24px color-mix(in srgb,var(--text) 5%,transparent);
}
.employee-access-section>header{
    display:flex;
    align-items:flex-start;
    gap:12px;
}
.employee-access-section>header>div{
    display:grid;
    gap:4px;
}
.employee-access-section h3{
    margin:0;
    font-size:16px;
    color:var(--text);
}
.employee-access-section p{
    margin:0;
    color:var(--muted);
    line-height:1.45;
}
.employee-access-step{
    display:grid;
    place-items:center;
    flex:0 0 30px;
    width:30px;
    height:30px;
    border-radius:var(--radius-md);
    background:color-mix(in srgb,var(--primary) 14%,transparent);
    color:var(--primary);
    font-weight:900;
}
.employee-access-section.is-readonly{
    opacity:.82;
}
.employee-access-lock,
.employee-access-empty,
.employee-access-status{
    padding:13px 15px;
    border:1px solid var(--border);
    border-radius:var(--radius-md);
    background:color-mix(in srgb,var(--background) 86%,transparent);
    color:var(--muted);
    line-height:1.45;
}
.employee-access-status[data-tone="success"]{
    border-color:color-mix(in srgb,var(--success) 35%,var(--border));
    background:color-mix(in srgb,var(--success) 10%,var(--surface));
    color:var(--success);
}
.employee-access-status[data-tone="error"]{
    border-color:color-mix(in srgb,var(--error) 35%,var(--border));
    background:color-mix(in srgb,var(--error) 9%,var(--surface));
    color:var(--error);
}
.employee-access-review-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
}
.employee-access-review-item{
    display:grid;
    gap:4px;
    min-width:0;
    padding:12px 14px;
    border:1px solid var(--border);
    border-radius:var(--radius-md);
    background:var(--background);
}
.employee-access-review-item span{
    color:var(--muted);
    font-size:11px;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.04em;
}
.employee-access-review-item strong{
    overflow-wrap:anywhere;
    color:var(--text);
}
.drawer.drawer--right.employee-access-drawer .drawer__footer{
    position:sticky!important;
    bottom:0!important;
    z-index:4!important;
    display:flex!important;
    align-items:center!important;
    gap:10px!important;
    width:100%!important;
    margin:0!important;
    padding:18px 28px calc(20px + env(safe-area-inset-bottom))!important;
    box-sizing:border-box!important;
    border-top:1px solid var(--drawer-border)!important;
    background:rgba(255,255,255,.98)!important;
    backdrop-filter:blur(10px);
    -webkit-backdrop-filter:blur(10px);
}
.drawer.drawer--right.employee-access-drawer .drawer__footer>.button:first-child{
    margin-left:0;
}
.drawer.drawer--right.employee-access-drawer .drawer__footer>.button:last-child{
    margin-right:0;
}
.employee-access-drawer [disabled]{
    cursor:not-allowed;
}
@media(max-width:720px){
    .employee-access-device-list,
    .employee-access-section{
        padding:16px!important;
    }
    .employee-access-review-grid{
        grid-template-columns:1fr;
    }
}

/* /HRD_UNIFIED_EMPLOYEE_ACCESS_ASSIGNMENT */

/* HRD_INITIAL_PRESENCE_GATE_ACCESS_DEBUG_V308 */
.employee-access-debug-actions{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
}
.employee-access-debug-status{
    padding:12px 14px;
    border:1px solid var(--border);
    border-radius:var(--radius-md);
    background:var(--background);
    color:var(--muted);
    line-height:1.45;
}
.employee-access-debug-status[data-tone="success"]{
    border-color:color-mix(in srgb,var(--success) 35%,var(--border));
    background:color-mix(in srgb,var(--success) 9%,var(--surface));
    color:var(--success);
}
.employee-access-debug-status[data-tone="error"]{
    border-color:color-mix(in srgb,var(--error) 35%,var(--border));
    background:color-mix(in srgb,var(--error) 9%,var(--surface));
    color:var(--error);
}
.employee-access-debug-report{
    display:grid;
    gap:14px;
}
.employee-access-debug-outcome{
    display:grid;
    gap:5px;
    padding:14px 16px;
    border:1px solid var(--border);
    border-radius:var(--radius-md);
    background:var(--background);
}
.employee-access-debug-outcome[data-tone="success"]{
    border-color:color-mix(in srgb,var(--success) 38%,var(--border));
    background:color-mix(in srgb,var(--success) 10%,var(--surface));
}
.employee-access-debug-outcome[data-tone="warning"]{
    border-color:color-mix(in srgb,var(--warning) 42%,var(--border));
    background:color-mix(in srgb,var(--warning) 11%,var(--surface));
}
.employee-access-debug-outcome strong{
    color:var(--text);
    font-size:15px;
}
.employee-access-debug-outcome span{
    color:var(--muted);
    line-height:1.45;
}
.employee-access-debug-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
}
.employee-access-debug-grid>div{
    display:grid;
    gap:4px;
    min-width:0;
    padding:12px 14px;
    border:1px solid var(--border);
    border-radius:var(--radius-md);
    background:var(--background);
}
.employee-access-debug-grid span{
    color:var(--muted);
    font-size:11px;
    font-weight:800;
    letter-spacing:.04em;
    text-transform:uppercase;
}
.employee-access-debug-grid strong{
    overflow-wrap:anywhere;
    color:var(--text);
}
.employee-access-debug-details{
    border:1px solid var(--border);
    border-radius:var(--radius-md);
    background:var(--background);
}
.employee-access-debug-details summary{
    padding:13px 15px;
    color:var(--text);
    font-weight:800;
    cursor:pointer;
}
.employee-access-debug-details ol{
    display:grid;
    gap:0;
    margin:0;
    padding:0 15px 15px;
    list-style:none;
}
.employee-access-debug-details li{
    display:grid;
    grid-template-columns:minmax(128px,auto) minmax(0,1fr);
    gap:12px;
    padding:10px 0;
    border-top:1px solid var(--border);
}
.employee-access-debug-details time{
    color:var(--muted);
    font-size:12px;
}
.employee-access-debug-details li div{
    display:grid;
    gap:3px;
}
.employee-access-debug-details li strong{
    color:var(--text);
}
.employee-access-debug-details li span{
    color:var(--muted);
    line-height:1.4;
}
@media(max-width:720px){
    .employee-access-debug-grid{
        grid-template-columns:1fr;
    }
    .employee-access-debug-details li{
        grid-template-columns:1fr;
        gap:4px;
    }
}
/* /HRD_INITIAL_PRESENCE_GATE_ACCESS_DEBUG_V308 */

/* /HRD_UNIFIED_EMPLOYEE_ACCESS_ASSIGNMENT */

/* ============================================================
   TIME OFF REQUESTS DRAWER
   Canonical pending approvals + history component.
   Compact drawer modifier mirrors the approved Time Off reference.
============================================================ */
.time-off-pending-button {
    gap: 8px;
}

.time-off-pending-button__count {
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--warning);
    color: var(--button-text-colour);
    font-size: 11px;
    font-weight: 850;
    line-height: 1;
}

/* Reusable compact variant of the canonical right-side drawer shell. */
.drawer.drawer--right.drawer--compact {
    width: min(520px, 100vw) !important;
}

.drawer.drawer--right.drawer--compact .drawer__header {
    min-height: 76px !important;
    padding: 0 20px !important;
    align-items: center !important;
    background: var(--surface) !important;
}

.drawer.drawer--right.drawer--compact .drawer__body {
    height: auto !important;
    max-height: none !important;
}

.drawer.drawer--right.drawer--compact input:not([type="checkbox"]):not([type="radio"]):not([data-request-queue-search]):not([data-attendance-adjustment-search]),
.drawer.drawer--right.drawer--compact textarea {
    min-height: 42px !important;
    border-radius: 12px !important;
}

.time-off-requests-drawer .drawer__form {
    height: 100%;
    min-height: 0;
}

.time-off-requests-header {
    gap: 14px !important;
}

.time-off-requests-header__title {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
}

.time-off-requests-header__title h2 {
    margin: 0 !important;
    overflow: hidden;
    color: var(--text) !important;
    font-size: 15px !important;
    font-weight: 800;
    line-height: 1.2 !important;
    letter-spacing: 0 !important;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.time-off-requests-drawer .time-off-requests-close {
    width: 28px !important;
    height: 28px !important;
    flex: 0 0 28px !important;
    border-radius: 8px !important;
    color: var(--muted) !important;
}

.time-off-requests-drawer .time-off-requests-close .icon {
    width: 16px;
    height: 16px;
}

.time-off-request-source {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

.time-off-request-source strong {
    max-width: 150px;
    overflow: hidden;
    padding: 8px 10px;
    border-radius: 10px;
    background: var(--background);
    color: var(--text);
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.time-off-request-tabs {
    display: flex;
    flex: 0 0 auto;
    min-height: 53px;
    padding: 0 10px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.time-off-request-tab {
    min-height: 53px;
    padding: 0 12px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.time-off-request-tab.is-active {
    border-bottom-color: var(--primary);
    color: var(--primary);
}

.time-off-request-tab span {
    margin-left: 5px;
    padding: 2px 6px;
    border-radius: 999px;
    background: var(--background);
    color: inherit;
    font-size: 10px;
}

.time-off-request-toolbar {
    display: flex;
    min-height: 74px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--background);
}

.time-off-request-search {
    width: 240px;
    height: 42px;
    margin-left: auto;
    border-radius: 12px;
    background: var(--surface);
}

.time-off-request-drawer-body {
    min-height: 0 !important;
    flex: 1 1 auto !important;
    padding: 16px !important;
    overflow-y: auto !important;
    background: var(--background) !important;
}

.time-off-request-list {
    display: grid;
    gap: 16px;
}

.time-off-request-card {
    overflow: hidden;
    border: 0;
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.time-off-request-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
}

.time-off-request-person {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.time-off-request-person > div {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.time-off-request-person strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.time-off-request-person small {
    color: var(--muted);
    font-size: 11px;
}

.time-off-request-avatar {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 50%;
    object-fit: cover;
}

.time-off-request-avatar--fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: var(--button-text-colour);
    font-size: 11px;
    font-weight: 800;
}

.time-off-request-card__details {
    margin: 0 16px;
    overflow: hidden;
    border-radius: 14px;
    background: var(--surface);
}

.time-off-request-detail-row {
    display: grid;
    grid-template-columns: minmax(120px, .7fr) 1fr;
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 4px solid var(--surface);
    background: var(--background);
}

.time-off-request-detail-row:last-child {
    border-bottom: 0;
}

.time-off-request-detail-row > span {
    color: var(--text);
    font-size: 12px;
}

.time-off-request-detail-row > strong {
    text-align: right;
    font-size: 12px;
    font-weight: 750;
}

.time-off-request-detail-row strong small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 500;
}

.time-off-paid-pill {
    margin-left: 5px;
    padding: 3px 7px;
    border-radius: 999px;
    background: var(--muted);
    color: var(--button-text-colour);
    font-size: 9px;
    font-style: normal;
    font-weight: 800;
}

.time-off-paid-pill.is-paid {
    background: color-mix(in srgb, var(--success) 70%, var(--muted));
}

.time-off-request-response {
    display: grid;
    gap: 12px;
    padding: 16px;
}

.time-off-requests-drawer .time-off-request-response textarea {
    width: 100%;
    min-height: 64px !important;
    padding: 12px 14px !important;
    resize: vertical;
}

.time-off-request-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.time-off-requests-drawer .time-off-request-actions .button {
    min-height: 42px !important;
    border-radius: 999px !important;
    justify-content: center;
}

.time-off-request-history-state {
    margin: 14px 16px 0;
    min-height: 40px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.time-off-request-history-state--approved {
    background: color-mix(in srgb, var(--success) 13%, var(--surface));
    color: color-mix(in srgb, var(--success) 78%, var(--text));
}

.time-off-request-history-state--declined,
.time-off-request-history-state--cancelled,
.time-off-request-history-state--canceled {
    background: color-mix(in srgb, var(--error) 12%, var(--surface));
    color: var(--error);
}

.time-off-request-history-meta {
    padding: 12px 16px 16px;
    color: var(--muted);
    text-align: center;
    font-size: 11px;
}

.time-off-request-empty {
    min-height: 170px;
    border: 0 !important;
    background: transparent !important;
    place-items: center;
    text-align: center;
}

@media (max-width: 640px) {
    .drawer.drawer--right.drawer--compact .drawer__header {
        min-height: 70px !important;
        padding: 0 14px !important;
    }

    .time-off-request-source {
        gap: 5px;
        font-size: 11px;
    }

    .time-off-request-source strong {
        max-width: 118px;
        padding: 7px 8px;
    }

    .time-off-request-toolbar {
        min-height: 66px;
        padding: 12px 14px;
    }

    .time-off-request-search {
        width: 220px;
    }

    .time-off-request-detail-row {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .time-off-request-detail-row > strong {
        text-align: left;
    }

    .time-off-request-actions {
        grid-template-columns: 1fr 1fr;
        gap: 9px;
    }
}



/* Desktop Admin Overview — PWA parity */
.admin-overview-page {
    display: grid;
    gap: 14px;
    margin-top: 14px;
}

.admin-overview-heading {
    justify-content: flex-start;
}

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

.admin-overview-metric {
    display: grid;
    min-width: 0;
    min-height: 104px;
    align-content: start;
    gap: 5px;
    padding: 14px 16px;
}

.admin-overview-metric > span {
    overflow: hidden;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .02em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.admin-overview-metric > strong {
    overflow: hidden;
    color: var(--secondary);
    font-size: clamp(23px, 1.8vw, 31px);
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-overview-metric > small {
    overflow: hidden;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-overview-panel {
    padding: 14px;
}

.admin-overview-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 11px;
    border-bottom: 1px solid var(--border);
}

.admin-overview-panel__header > div > span {
    color: var(--primary);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.admin-overview-panel__header h2 {
    margin: 2px 0 0;
    font-size: 19px;
    line-height: 1.15;
}

.admin-overview-panel__header p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.25;
}

.admin-overview-online-count {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--secondary);
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.admin-overview-users {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding-top: 12px;
}

.admin-overview-user {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    min-width: 0;
    align-content: start;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: outline-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.admin-overview-user.is-clocked-in {
    outline: 2px solid var(--success);
    outline-offset: 1px;
}

.admin-overview-user.is-office-away {
    outline: 2px solid var(--error);
    outline-offset: 1px;
}

.admin-overview-user.is-clockout-countdown {
    outline: 2px solid var(--error);
    outline-offset: 1px;
    animation: admin-overview-countdown-pulse 1s ease-in-out infinite;
}

@keyframes admin-overview-countdown-pulse {
    0%, 100% {
        outline-color: var(--error);
        outline-offset: 1px;
    }
    50% {
        outline-color: transparent;
        outline-offset: 5px;
    }
}

.admin-overview-avatar {
    position: relative;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--hover);
    color: var(--secondary);
    font-size: 11px;
    font-weight: 800;
}

.admin-overview-avatar img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
    object-position: 50% 50%;
}

.admin-overview-user__main {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.admin-overview-user__name {
    overflow: hidden;
    color: var(--secondary);
    font-size: 13px;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-overview-pwa-presence,
.admin-overview-office {
    display: inline-flex;
    width: 100%;
    min-width: 0;
    align-items: center;
    gap: 5px;
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-overview-pwa-presence i,
.admin-overview-office i {
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    border-radius: 50%;
    background: #9aa8b7;
}

.admin-overview-pwa-presence.is-online {
    color: var(--success);
    font-weight: 700;
}

.admin-overview-pwa-presence.is-online i,
.admin-overview-office.is-active i,
.admin-overview-office.is-override i {
    background: var(--success);
}

.admin-overview-office.is-grace,
.admin-overview-office.is-warning,
.admin-overview-office.is-awaiting_initial_presence {
    color: var(--error);
    font-weight: 700;
}

.admin-overview-office.is-grace i,
.admin-overview-office.is-warning i,
.admin-overview-office.is-awaiting_initial_presence i {
    background: var(--error);
}

.admin-overview-clock-summary {
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    gap: 3px 7px;
    padding: 5px 6px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--background);
    color: var(--muted);
    font-size: 10px;
    line-height: 1.2;
}

.admin-overview-clock-summary strong {
    color: var(--secondary);
}

.admin-overview-sessions {
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    gap: 3px;
}

.admin-overview-session {
    display: inline-flex;
    min-height: 20px;
    align-items: center;
    gap: 3px;
    padding: 0 5px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    font-size: 9px;
    line-height: 1;
}

.admin-overview-session strong {
    color: var(--secondary);
}

.admin-overview-session.is-empty {
    font-style: italic;
}

.admin-overview-loading,
.admin-overview-empty,
.admin-overview-error {
    grid-column: 1 / -1;
    display: grid;
    gap: 8px;
    min-height: 90px;
    place-items: center;
    align-content: center;
    padding: 18px;
    border: 1px dashed var(--border);
    border-radius: 13px;
    color: var(--muted);
    text-align: center;
}

.admin-overview-error strong {
    color: var(--error);
}

/* Admin Overview — canonical Time Off Today / Future integration */
.admin-overview-time-off-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.admin-overview-time-off-panel {
    min-width: 0;
    padding: 14px;
}

.admin-overview-time-off-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 11px;
    border-bottom: 1px solid var(--border);
}

.admin-overview-time-off-panel__header > div {
    min-width: 0;
}

.admin-overview-time-off-panel__header > div > span,
.admin-overview-time-off-drawer__eyebrow {
    color: var(--primary);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.admin-overview-time-off-panel__header h2 {
    margin: 2px 0 0;
    color: var(--secondary);
    font-size: 19px;
    line-height: 1.15;
}

.admin-overview-time-off-panel__header p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.3;
}

.admin-overview-time-off-count {
    display: inline-flex;
    min-width: 30px;
    min-height: 30px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    padding: 0 9px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--secondary);
    font-size: 11px;
    font-weight: 800;
}

.admin-overview-time-off-list {
    display: grid;
    max-height: min(430px, 48vh);
    gap: 8px;
    padding-top: 12px;
    overflow-x: hidden;
    overflow-y: auto;
}

.admin-overview-time-off-item {
    display: grid;
    width: 100%;
    min-width: 0;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface);
    color: inherit;
    box-shadow: var(--shadow-sm);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.admin-overview-time-off-item:hover,
.admin-overview-time-off-item:focus-visible {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    outline: none;
    transform: translateY(-1px);
}

.admin-overview-time-off-avatar {
    position: relative;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--hover);
    color: var(--secondary);
    font-size: 11px;
    font-weight: 800;
}

.admin-overview-time-off-avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-overview-time-off-item__main,
.admin-overview-time-off-item__date {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.admin-overview-time-off-item__main strong,
.admin-overview-time-off-item__date strong {
    overflow: hidden;
    color: var(--secondary);
    font-size: 12px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-overview-time-off-item__main small,
.admin-overview-time-off-item__date small {
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-overview-time-off-item__date {
    justify-items: end;
    text-align: right;
}

.admin-overview-time-off-empty {
    display: grid;
    min-height: 82px;
    place-items: center;
    padding: 16px;
    border: 1px dashed var(--border);
    border-radius: 13px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.4;
    text-align: center;
}

.admin-overview-time-off-drawer .drawer__title-icon {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    border-radius: 14px;
}

.admin-overview-time-off-drawer__body {
    display: grid;
    align-content: start;
    gap: 12px;
}

.admin-overview-time-off-detail-card {
    margin: 0;
}

@media (max-width: 759px) {
    .admin-overview-time-off-grid {
        grid-template-columns: 1fr;
    }

    .admin-overview-time-off-list {
        max-height: none;
    }

    .admin-overview-time-off-item {
        grid-template-columns: 42px minmax(0, 1fr);
        padding: 12px;
    }

    .admin-overview-time-off-avatar {
        width: 42px;
        height: 42px;
    }

    .admin-overview-time-off-item__date {
        grid-column: 2;
        justify-items: start;
        text-align: left;
    }
}

/* Wide desktop: six KPI cards in one row and five employees per row.
   Two employee rows = 10 staff visible at a glance on a normal desktop viewport. */
@media (min-width: 1280px) {
    .admin-overview-metrics {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .admin-overview-users {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) and (max-width: 1279px) {
    .admin-overview-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .admin-overview-users {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 760px) and (max-width: 1023px) {
    .admin-overview-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-overview-users {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 759px) {
    .admin-overview-metrics,
    .admin-overview-users {
        grid-template-columns: 1fr;
    }

    .admin-overview-panel__header {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-overview-user {
        grid-template-columns: 42px minmax(0, 1fr);
        padding: 12px;
    }

    .admin-overview-avatar {
        width: 42px;
        height: 42px;
    }

    .admin-overview-user__name {
        font-size: 14px;
    }

    .admin-overview-pwa-presence,
    .admin-overview-office,
    .admin-overview-clock-summary {
        font-size: 11px;
    }

    .admin-overview-session {
        min-height: 23px;
        font-size: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .admin-overview-user.is-clockout-countdown {
        animation: none;
        outline-color: var(--error);
    }
}

/* Desktop Admin Activity */
.admin-activity-dashboard {
    display: grid;
    gap: 12px;
}
.admin-activity-heading {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    margin: 0;
    padding: 14px 16px;
}
.admin-activity-heading-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.admin-activity-heading-actions small {
    color: var(--muted);
    font-size: 11px;
    white-space: nowrap;
}
.admin-activity-heading-actions .button {
    min-height: 34px;
    padding-inline: 12px;
}
.admin-activity-error {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-color: color-mix(in srgb, var(--error) 28%, var(--border));
}
.admin-activity-error span {
    color: var(--muted);
    font-size: 12px;
}
.admin-activity-stats {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}
.admin-activity-stat {
    display: grid;
    align-content: center;
    gap: 3px;
    min-height: 88px;
    padding: 12px 14px;
}
.admin-activity-stat > span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.admin-activity-stat > strong {
    color: var(--text);
    font-size: 26px;
    line-height: 1;
}
.admin-activity-stat > small {
    color: var(--muted);
    font-size: 10px;
}
.admin-activity-tables {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    align-items: start;
}
.admin-activity-table-card {
    min-width: 0;
    overflow: hidden;
    padding: 0;
}
.admin-activity-table-card > header {
    display: flex;
    min-height: 58px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
}
.admin-activity-table-card > header div {
    min-width: 0;
}
.admin-activity-table-card > header span {
    display: block;
    margin-bottom: 2px;
    color: var(--primary);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;
}
.admin-activity-table-card > header h2 {
    overflow: hidden;
    margin: 0;
    color: var(--text);
    font-size: 14px;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.admin-activity-table-card > header > strong {
    display: grid;
    min-width: 28px;
    height: 28px;
    place-items: center;
    padding: 0 7px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface) 92%, var(--hover) 8%);
    font-size: 10px;
}
.admin-activity-table-scroll {
    max-height: 430px;
    overflow: auto;
    overscroll-behavior: contain;
}
.admin-activity-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}
.admin-activity-table th,
.admin-activity-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}
.admin-activity-table th {
    position: sticky;
    z-index: 2;
    top: 0;
    background: var(--surface);
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .035em;
    text-transform: uppercase;
}
.admin-activity-table th:last-child,
.admin-activity-table td:last-child {
    width: 92px;
    text-align: right;
}
.admin-activity-table td strong,
.admin-activity-table td small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}
.admin-activity-table td strong {
    color: var(--text);
    font-size: 11px;
    line-height: 1.25;
    white-space: nowrap;
}
.admin-activity-table td small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.25;
    white-space: nowrap;
}
.admin-activity-table time {
    color: var(--muted);
    font-size: 9px;
    line-height: 1.25;
}
.admin-activity-table tbody tr:last-child td {
    border-bottom: 0;
}
.admin-activity-table tbody tr:hover td {
    background: color-mix(in srgb, var(--surface) 94%, var(--hover) 6%);
}
.admin-activity-empty {
    height: 80px;
    color: var(--muted);
    font-size: 11px;
    text-align: center !important;
    vertical-align: middle !important;
}
.admin-firewall-chart-card {
    overflow: hidden;
    padding: 0;
}
.admin-firewall-chart-header {
    display: flex;
    min-height: 74px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
}
.admin-firewall-chart-header > div:first-child {
    min-width: 0;
}
.admin-firewall-chart-header > div:first-child > span {
    display: block;
    margin-bottom: 2px;
    color: var(--primary);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;
}
.admin-firewall-chart-header h2 {
    margin: 0;
    color: var(--text);
    font-size: 15px;
    line-height: 1.2;
}
.admin-firewall-chart-header p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 10px;
}
.admin-firewall-chart-summary {
    display: flex;
    align-items: center;
    gap: 10px;
}
.admin-firewall-chart-summary > div {
    display: grid;
    min-width: 72px;
    gap: 1px;
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: color-mix(in srgb, var(--surface) 94%, var(--hover) 6%);
}
.admin-firewall-chart-summary span {
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
}
.admin-firewall-chart-summary strong {
    color: var(--text);
    font-size: 16px;
    line-height: 1.05;
}
.admin-firewall-chart-summary .button {
    min-height: 34px;
    padding-inline: 12px;
    white-space: nowrap;
}
.admin-firewall-chart-legend {
    display: flex;
    justify-content: flex-end;
    gap: 14px;
    padding: 9px 14px 0;
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
}
.admin-firewall-chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.admin-firewall-chart-legend i {
    width: 8px;
    height: 8px;
    border-radius: 3px;
}
.admin-firewall-chart-legend i.is-critical,
.admin-firewall-bar-segment.is-critical {
    background: var(--error);
}
.admin-firewall-chart-legend i.is-high,
.admin-firewall-bar-segment.is-high {
    background: color-mix(in srgb, var(--error) 58%, var(--warning) 42%);
}
.admin-firewall-chart-legend i.is-other,
.admin-firewall-bar-segment.is-other {
    background: var(--primary);
}
.admin-firewall-chart-scroll {
    overflow-x: auto;
    padding: 4px 14px 12px;
    overscroll-behavior-inline: contain;
}
.admin-firewall-chart {
    position: relative;
    display: grid;
    grid-template-columns: repeat(14, minmax(42px, 1fr));
    min-width: 760px;
    height: 220px;
    align-items: end;
    gap: 8px;
    padding: 20px 4px 0;
    border-radius: 12px;
    background-image: repeating-linear-gradient(
        to top,
        color-mix(in srgb, var(--border) 72%, transparent) 0,
        color-mix(in srgb, var(--border) 72%, transparent) 1px,
        transparent 1px,
        transparent 48px
    );
}
.admin-firewall-bar-group {
    display: grid;
    grid-template-rows: 16px 160px 24px;
    min-width: 0;
    align-items: end;
    justify-items: stretch;
}
.admin-firewall-bar-value {
    align-self: center;
    color: var(--text);
    font-size: 9px;
    font-weight: 800;
    text-align: center;
}
.admin-firewall-bar-track {
    display: flex;
    width: min(30px, 72%);
    height: 160px;
    align-items: flex-end;
    justify-self: center;
    overflow: hidden;
    flex-direction: column-reverse;
    border-radius: 7px 7px 3px 3px;
    background: color-mix(in srgb, var(--border) 42%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--border) 65%, transparent);
}
.admin-firewall-bar-segment {
    display: block;
    width: 100%;
    min-height: 0;
    transition: filter .16s ease, opacity .16s ease;
}
.admin-firewall-bar-group:hover .admin-firewall-bar-segment {
    filter: saturate(1.08);
}
.admin-firewall-bar-label {
    overflow: hidden;
    align-self: end;
    color: var(--muted);
    font-size: 9px;
    font-weight: 650;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.admin-firewall-chart-empty {
    display: grid;
    min-height: 150px;
    place-items: center;
    padding: 18px;
    color: var(--muted);
    font-size: 11px;
    text-align: center;
}
@media (max-width: 1199px) {
    .admin-activity-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .admin-activity-tables {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 760px) {
    .admin-activity-heading {
        grid-template-columns: auto minmax(0, 1fr);
    }
    .admin-activity-heading-actions {
        grid-column: 1 / -1;
        justify-content: space-between;
    }
    .admin-activity-stats,
    .admin-activity-tables {
        grid-template-columns: 1fr;
    }
    .admin-activity-table-scroll {
        max-height: 360px;
    }
    .admin-firewall-chart-header {
        align-items: flex-start;
        flex-direction: column;
    }
    .admin-firewall-chart-summary {
        width: 100%;
        flex-wrap: wrap;
    }
    .admin-firewall-chart-summary .button {
        margin-left: auto;
    }
}
/* /Desktop Admin Activity */


/* Desktop Admin Documents */
.documents-dashboard {
    display: grid;
    gap: 12px;
}
.documents-heading {
    margin-bottom: 0;
}
.documents-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}
.documents-stat-card {
    display: grid;
    min-height: 92px;
    align-content: center;
    gap: 4px;
    padding: 13px 15px;
}
.documents-stat-card > span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.documents-stat-card > strong {
    color: var(--text);
    font-size: 27px;
    line-height: 1;
}
.documents-stat-card > small {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.3;
}
.documents-table-card {
    position: relative;
    overflow: visible;
    padding: 0;
}
.documents-table-card__header {
    padding: 14px 16px 10px;
}
.documents-table-card__header > div {
    min-width: 0;
}
.documents-eyebrow {
    display: block;
    margin-bottom: 3px;
    color: var(--primary);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.documents-table-card__header h2 {
    margin: 0;
    color: var(--text);
    font-size: 17px;
    line-height: 1.2;
}
.documents-table-card__header p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.4;
}
.documents-toolbar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    padding: 0 16px 12px;
}
.documents-search {
    width: min(420px, 100%);
}
.documents-date-range-button {
    min-width: 220px;
    justify-content: space-between;
    gap: 10px;
    white-space: nowrap;
}
.documents-date-range-button .icon {
    flex: 0 0 auto;
}
.documents-delete-button {
    gap: 7px;
    justify-self: end;
}
.documents-delete-button[hidden] {
    display: none !important;
}
.documents-date-range-popover {
    z-index: 20;
    right: 16px;
    left: auto;
    width: min(430px, calc(100% - 32px));
}
.documents-table-scroll {
    border-top: 1px solid var(--border);
}
.documents-table {
    min-width: 850px;
}
.documents-table th,
.documents-table td {
    padding-top: 11px;
    padding-bottom: 11px;
    vertical-align: middle;
}
.documents-table th:first-child,
.documents-table td:first-child {
    padding-left: 16px;
}
.documents-table th:last-child,
.documents-table td:last-child {
    padding-right: 16px;
}
.documents-table tbody tr.is-selected td {
    background: color-mix(in srgb, var(--primary) 6%, var(--surface));
}
.documents-employee-cell {
    display: flex;
    min-width: 180px;
    align-items: center;
    gap: 10px;
}
.documents-employee-cell > strong,
.documents-name-cell > strong {
    min-width: 0;
    color: var(--text);
    font-size: 12px;
    line-height: 1.35;
}
.documents-employee-cell > strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.documents-avatar {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--hover);
    color: var(--secondary);
    font-size: 10px;
    font-weight: 800;
}
.documents-avatar > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 50%;
}
.documents-avatar > img[hidden] + span {
    display: grid !important;
    width: 100%;
    height: 100%;
    place-items: center;
}
.documents-name-cell {
    min-width: 210px;
}
.documents-submitted-date {
    min-width: 170px;
    border-left: 1px solid var(--border);
    padding-left: 18px !important;
}
.documents-submitted-date time {
    color: var(--text);
    font-size: 11px;
    line-height: 1.35;
    white-space: nowrap;
}
.documents-actions-column {
    min-width: 190px;
    text-align: right !important;
}
.documents-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
}
.documents-row-actions .button {
    min-height: 32px;
    gap: 6px;
    padding: 6px 10px;
    white-space: nowrap;
}
.documents-table-footer {
    min-height: 54px;
    padding: 9px 16px;
    border-top: 1px solid var(--border);
}
.documents-table-footer .pagination,
.documents-table-footer .rows-per-page {
    gap: 8px;
}
.documents-table-footer .rows-per-page > span {
    white-space: nowrap;
}
@media (max-width: 920px) {
    .documents-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .documents-toolbar {
        grid-template-columns: minmax(0, 1fr) auto;
    }
    .documents-delete-button {
        grid-column: 1 / -1;
        justify-self: start;
    }
}
@media (max-width: 620px) {
    .documents-stats {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .documents-stat-card {
        min-height: 82px;
        padding: 11px 12px;
    }
    .documents-stat-card > strong {
        font-size: 24px;
    }
    .documents-toolbar {
        grid-template-columns: 1fr;
        padding-inline: 12px;
    }
    .documents-search,
    .documents-date-range-button {
        width: 100%;
        min-width: 0;
    }
    .documents-delete-button {
        grid-column: auto;
    }
    .documents-table-card__header {
        padding-inline: 12px;
    }
    .documents-table-footer {
        align-items: center;
        gap: 8px;
        padding-inline: 12px;
    }
}
/* /Desktop Admin Documents */
