/*
 * pulse.css — Pulse Shell + RelianSys Design System
 * Version: 1.1  |  Last updated: 2026-06-04
 *
 * TABLE OF CONTENTS
 * 1.  Reset & Root tokens
 * 2.  Pulse Top Bar
 * 3.  Side Nav
 * 4.  Shell layout
 * 5.  RGS Page Header Strip
 * 6.  Content area
 * 7.  Cards
 * 8.  Buttons
 * 9.  Data Tables
 * 10. Mini tables (dashboard cards)
 * 11. Forms & Inputs
 * 12. Status Badges
 * 13. Update pills
 * 14. Modals
 * 15. Module Switcher Drawer
 * 16. Pagination
 * 17. Delegate selector pane
 * 18. Utilities
 */

/* ─── 1. RESET & ROOT TOKENS ─────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Pulse chrome */
    --pulse-nav-bg: #ffffff;
    --pulse-nav-bdr: #e5e7eb;
    --pulse-top-h: 52px;
    --pulse-nav-w: 224px;
    --pulse-nav-col: 64px;
    --nav-hover-bg: #f3f4f6;
    --tbl-bar-bg: #fafbfc;
    /* Content / UNIFI tokens */
    --bg: #f7f8fa;
    --white: #ffffff;
    --border: rgba(0, 0, 0, 0.08);
    --border-md: rgba(0, 0, 0, 0.1);
    --text: rgba(0, 0, 0, 0.87);
    --text-sec: rgba(0, 0, 0, 0.57);
    --text-hint: rgba(0, 0, 0, 0.35);
    --shadow-sm: 0 1px 3px rgba(36, 88, 217, 0.16), 0 1px 2px rgba(36, 88, 217, 0.14);
    --shadow-md: 0px 0px 25px RGBA(36, 88, 217, 0.10);
    /* Brand colours */
    --blue: #2862f2;
    --blue-d: #2458d9;
    --blue-tint: rgba(40, 98, 242, 0.08);
    --blue-nav-tint: rgba(40, 98, 242, 0.08);
    --blue-grad-start: #3b82f6;
    --blue-grad-end: #6366f1;
    --red: #ef4444;
    --red-tint: rgba(239, 68, 68, 0.1);
    --red-d: #dc2626;
    --red-light: #fee2e2;
    --red-badge: #fecaca;
    --red-text: #991b1b;
    --green: #10b981;
    --green-d: #059669;
    --green-tint: rgba(16, 185, 129, 0.1);
    --green-text: #065f46;
    --green-bdr: #bbf7d0;
    --amber: #f59e0b;
    --amber-d: #92400e;
    --amber-tint: rgba(245, 158, 11, 0.1);
    --amber-hover-bg: #fef3c7;
    --amber-hover-bdr: #fde68a;
    --amber-text-dark: #713f12;
    --amber-module-bg: #fff7ed;
    --due-soon: #14b8a6;
    --missed: #8b5cf6;
    --grey: rgba(0, 0, 0, 0.67);
    --pale-grey: rgba(0, 0, 0, 0.09);
    --bdr-solid: #e5e7eb;
    --overlay: rgba(0, 0, 0, 0.4);
    --overlay-light: rgba(0, 0, 0, 0.32);
    --navy: #061848;
    --radius: 8px;
    --radius-sm: 6px;
    --p-orange: #fe5a00;
    --talent: #0cc4df;
    --projects: #0cc060;
    --governance: #6c48d2;
}

html,
body {
    height: 100%;
    font-family: "Inter", system-ui, sans-serif;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

/* ─── 2. PULSE TOP BAR ───────────────────────────────────── */
.p-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 300;
    height: var(--pulse-top-h);
    background: var(--pulse-nav-bg);
    border-bottom: 1px solid var(--pulse-nav-bdr);
    display: flex;
    align-items: center;
}

.p-logo {
    width: var(--pulse-nav-w);
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-right: 1px solid var(--pulse-nav-bdr);
    flex-shrink: 0;
    cursor: pointer;
    gap: 10px;
    transition: width 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

    .p-logo.col {
        width: var(--pulse-nav-col);
        justify-content: center;
        padding: 0;
    }

.p-logo-mark {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 4px 12px rgba(59, 130, 246, 0.35);
}

.p-logo-text {
    line-height: 1;
    transition: opacity 0.15s;
}

    .p-logo-text .p-name {
        font-size: 14px;
        font-weight: 700;
        color: #fff;
        letter-spacing: -0.3px;
    }

    .p-logo-text .p-sub {
        font-size: 9px;
        font-weight: 500;
        color: rgba(255, 255, 255, 0.3);
        letter-spacing: 0.6px;
        text-transform: uppercase;
        margin-top: 2px;
    }

.p-logo.col .p-logo-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.p-bar-mid {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0 20px;
}

.p-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.38);
}

    .p-breadcrumb .sep {
        opacity: 0.4;
    }

    .p-breadcrumb .cur {
        color: rgba(255, 255, 255, 0.78);
        font-weight: 500;
    }

.p-bar-right {
    display: flex;
    align-items: center;
    gap: 4px;
    padding-right: 18px;
    flex-shrink: 0;
}

.p-icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: none;
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.42);
    transition: all 0.15s;
    position: relative;
}

    .p-icon-btn:hover {
        background: rgba(255, 255, 255, 0.08);
        color: rgba(255, 255, 255, 0.8);
    }

.p-notif-dot {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--red);
    color: #fff;
    font-size: 8px;
    font-weight: 700;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--pulse-nav-bg);
}

.p-bar-divider {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 6px;
}

.p-user-info {
    text-align: right;
    cursor: pointer;
}

.p-user-name {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.3;
}

.p-user-org {
    font-size: 10.5px;
    color: rgba(255, 255, 255, 0.32);
}

.p-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    cursor: pointer;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.14);
}

/* ─── 3. SIDE NAV ──────────────────────────── */
.p-nav {
    position: fixed;
    top: var(--pulse-top-h);
    left: 0;
    bottom: 0;
    z-index: 200;
    width: var(--pulse-nav-w);
    background: var(--pulse-nav-bg);
    border-right: 1px solid var(--pulse-nav-bdr);
    display: flex;
    flex-direction: column;
    transition: width 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

    .p-nav.col {
        width: var(--pulse-nav-col);
    }

.p-nav-header {
    padding: 14px 16px 10px;
    display: flex;
    align-items: center;
    gap: 9px;
    flex-shrink: 0;
    border-bottom: 1px solid var(--pulse-nav-bdr);
}

.p-nav-header-icon {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    flex-shrink: 0;
    background: rgba(40, 98, 242, 0.22);
    border: 1px solid rgba(40, 98, 242, 0.32);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #93bbff;
}

.p-nav-header-text {
    overflow: hidden;
    transition: opacity 0.15s;
}

    .p-nav-header-text .mod-name {
        font-size: 12.5px;
        font-weight: 600;
        color: rgba(255, 255, 255, 0.88);
        white-space: nowrap;
    }

    .p-nav-header-text .mod-suite {
        font-size: 10px;
        color: rgba(255, 255, 255, 0.28);
        white-space: nowrap;
        margin-top: 1px;
    }

.p-nav.col .p-nav-header {
    justify-content: center;
    padding: 14px 0 10px;
}

.p-nav.col .p-nav-header-text {
    opacity: 0;
    width: 0;
}

.p-nav-items {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 6px 0;
}

    .p-nav-items::-webkit-scrollbar {
        width: 0;
    }

.p-nav-item {
    display: flex;
    align-items: center;
    height: 38px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.38);
    transition: all 0.12s;
    white-space: nowrap;
    text-decoration: none;
    margin: 1px 8px;
    border-radius: var(--radius-sm);
    padding: 0 8px;
}

    .p-nav-item:hover {
        color: rgba(255, 255, 255, 0.78);
        background: rgba(255, 255, 255, 0.06);
    }

    .p-nav-item.active {
        color: #fff;
        background: rgba(40, 98, 242, 0.2);
        box-shadow: inset 0 0 0 1px rgba(40, 98, 242, 0.32);
    }

.p-nav.col .p-nav-item {
    margin: 1px 6px;
    padding: 0;
    justify-content: center;
}

.p-nav-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.p-nav-item.active .p-nav-icon {
    color: #93bbff;
}

.p-nav-label {
    font-size: 13px;
    font-weight: 500;
    overflow: hidden;
    transition: opacity 0.15s;
    margin-left: 2px;
}

.p-nav.col .p-nav-label {
    opacity: 0;
    width: 0;
}

.p-nav-badge {
    background: var(--red);
    color: #fff;
    font-size: 9.5px;
    font-weight: 700;
    border-radius: 10px;
    padding: 1px 6px;
    margin-left: auto;
    flex-shrink: 0;
    transition: opacity 0.15s;
}

.p-nav.col .p-nav-badge {
    opacity: 0;
}

.p-nav-divider {
    height: 1px;
    background: var(--pulse-nav-bdr);
    margin: 6px 14px;
}

.p-nav-section {
    font-size: 9.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: rgba(255, 255, 255, 0.18);
    padding: 8px 16px 4px;
    white-space: nowrap;
    overflow: hidden;
    transition: opacity 0.15s;
}

.p-nav.col .p-nav-section {
    opacity: 0;
    height: 0;
    padding: 0;
}

.p-nav-footer {
    border-top: 1px solid var(--pulse-nav-bdr);
    flex-shrink: 0;
}

.p-nav-collapse {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.28);
    font-size: 12px;
    border: none;
    background: none;
    width: 100%;
    font-family: "Inter", sans-serif;
    transition: all 0.15s;
    white-space: nowrap;
    justify-content: center;
}

.p-nav:not(.col) .p-nav-collapse {
    justify-content: flex-start;
    padding: 12px 16px;
}

.p-nav-collapse:hover {
    color: rgba(255, 255, 255, 0.68);
    background: rgba(255, 255, 255, 0.05);
}

.p-nav-collapse-icon {
    flex-shrink: 0;
    transition: transform 0.22s;
}

.p-nav.col .p-nav-collapse-icon {
    transform: rotate(180deg);
}

.p-nav-collapse-label {
    transition: opacity 0.15s;
}

.p-nav.col .p-nav-collapse-label {
    opacity: 0;
}

/* ─── 4. SHELL LAYOUT ────────────────────────────────────── */
.p-shell {
    display: flex;
    padding-top: var(--pulse-top-h);
    padding-left: var(--pulse-nav-w);
    height: 100vh;
    transition: padding-left 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

    .p-shell.col {
        padding-left: var(--pulse-nav-col);
    }

.p-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

/* ─── 5. RGS PAGE HEADER STRIP ──────────────────────────── */
.rgs-strip {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 48px;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.rgs-strip-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.rgs-strip-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rgs-page-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 650;
    color: var(--text);
}

    .rgs-page-title svg {
        color: var(--blue);
        flex-shrink: 0;
    }

.rgs-tabs {
    display: flex;
    gap: 2px;
}

.rgs-tab {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-sec);
    padding: 5px 12px;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.12s;
    display: block;
}

    .rgs-tab:hover {
        color: var(--text);
        background: var(--bg);
    }

    .rgs-tab.active {
        color: var(--blue);
        font-weight: 600;
        background: var(--blue-tint);
    }

.rgs-powered {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10.5px;
    color: var(--text-hint);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 4px 12px;
}

    .rgs-powered strong {
        font-weight: 800;
        color: var(--text-sec);
    }

        .rgs-powered strong span {
            color: var(--blue);
        }

/* ─── 6. CONTENT AREA ────────────────────────────────────── */
.rgs-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    background: var(--bg);
}

    .rgs-content::-webkit-scrollbar {
        width: 5px;
    }

    .rgs-content::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.1);
        border-radius: 4px;
    }

/* ─── 7. CARDS ───────────────────────────────────────────── */
.card {
    background: var(--white) !important;
    border-radius: var(--radius) !important;
    border: 1px solid var(--border) !important;
    box-shadow: var(--shadow-md) !important;
    overflow: hidden;
}

.card-flex {
    display: flex;
    flex-direction: column;
}

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    gap: 8px;
}

.card-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 7px;
}

.card-title-bar {
    width: 3px;
    height: 14px;
    border-radius: 2px;
    background: var(--blue);
    flex-shrink: 0;
}

    .card-title-bar.red {
        background: var(--red);
    }

    .card-title-bar.green {
        background: var(--green);
    }

.card-body {
    padding: 12px 14px;
}

.count-pill {
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: var(--green);
    border-radius: 20px;
    padding: 2px 9px;
    flex-shrink: 0;
}

    .count-pill.red {
        background: var(--red);
    }

.callout {
    border: 1px solid var(--border-md);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
}

    .callout.red {
        border-color: var(--red);
    }

/* ─── 8. BUTTONS ─────────────────────────────────────────── */
.btn {
    align-items: center;
    gap: 5px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: "Inter", sans-serif;
    transition: all 0.15s;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--blue);
    color: #fff;
}

    .btn-primary:hover {
        background: var(--blue-d);
    }

.btn-secondary {
    background: var(--white);
    color: var(--text);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

    .btn-secondary:hover {
        background: var(--bg);
    }

.btn-danger {
    background: var(--red);
    color: #fff;
}

    .btn-danger:hover {
        background: #dc2626;
    }

.btn-amber {
    background: #fffbeb;
    color: var(--amber-d);
    border: 1px solid #fde68a;
}

    .btn-amber:hover {
        background: #fef3c7;
    }

.btn-ghost {
    background: none;
    color: var(--text-sec);
    border: 1px solid var(--border);
}

    .btn-ghost:hover {
        background: var(--bg);
        color: var(--text);
    }

.btn-green {
    background: var(--green);
    color: #fff;
}

    .btn-green:hover {
        background: #059669;
    }

.btn-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.sp {
    flex: 1;
}

/* ─── 9. DATA TABLES ─────────────────────────────────────── */
.tbl-card {
    background: var(--white) !important;
    border-radius: var(--radius) !important;
    border: 1px solid var(--border) !important;
    box-shadow: var(--shadow-md) !important;
    overflow: hidden;
}

.tbl-bar {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 16px;
    background: #fafbfc;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.tbl-label {
    font-size: 12px;
    color: var(--text-sec);
}

.tbl-sel {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 12px;
    font-family: "Inter", sans-serif;
    background: var(--white);
    color: var(--text);
    outline: none;
}

.tbl-search {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 5px 11px;
    font-size: 12px;
    font-family: "Inter", sans-serif;
    outline: none;
    color: var(--text);
    width: 210px;
    background: var(--white);
    transition: border 0.15s;
}

    .tbl-search:focus {
        border-color: var(--blue);
        outline: 2px solid var(--blue-tint);
    }

.dt {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

    .dt thead tr {
        background: #fafbfc;
    }

    .dt th {
        padding: 8px 14px;
        text-align: left;
        font-size: 10px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: var(--text-hint);
        border-bottom: 1px solid var(--border);
        white-space: nowrap;
    }

        .dt th.r,
        .dt td.r {
            text-align: right;
        }

        .dt th.sort {
            cursor: pointer;
            user-select: none;
        }

            .dt th.sort::after {
                content: " ⇅";
                opacity: 0.3;
            }

    .dt td {
        padding: 9px 14px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.04);
        vertical-align: middle;
    }

    .dt tr:last-child td {
        border-bottom: none;
    }

    .dt tr:hover td {
        background: rgba(40, 98, 242, 0.03);
    }

    .dt td a {
        color: var(--blue);
        text-decoration: none;
        font-weight: 500;
    }

        .dt td a:hover {
            text-decoration: underline;
        }

.cb-col {
    width: 40px !important;
    padding: 9px 6px 9px 16px !important;
}

input[type="checkbox"] {
    accent-color: var(--blue-tint);
    width: 13px;
    height: 13px;
    cursor: pointer;
}

input[type="radio"] {
    accent-color: var(--blue);
}

.tbl-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-sec);
    background: #fafbfc;
}

/* ─── 10. MINI TABLES (dashboard cards) ─────────────────── */
.mt {
    width: 100%;
    border-collapse: collapse;
    font-size: 11.5px;
}

    .mt thead tr {
        background: #fafbfc;
    }

    .mt th {
        padding: 6px 12px;
        text-align: left;
        font-size: 9.5px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: var(--text-hint);
        border-bottom: 1px solid var(--border);
        white-space: nowrap;
    }

        .mt th.r,
        .mt td.r {
            text-align: right;
        }

    .mt td {
        padding: 7px 12px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.035);
        vertical-align: middle;
        line-height: 1.4;
    }

    .mt tr:last-child td {
        border-bottom: none;
    }

    .mt tr:hover td {
        background: var(--blue-tint);
    }

    .mt a {
        color: var(--blue);
        text-decoration: none;
        font-weight: 500;
    }

        .mt a:hover {
            text-decoration: underline;
        }

.mt-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 12px;
    border-top: 1px solid var(--border);
}

.view-all-link {
    display: block;
    text-align: center;
    padding: 7px;
    margin: 0 12px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text-sec);
    font-size: 11.5px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.12s;
}

    .view-all-link:hover {
        background: var(--blue-tint);
        color: var(--blue);
        border-color: rgba(40, 98, 242, 0.2);
    }

/* ─── 11. FORMS & INPUTS ─────────────────────────────────── */
.form-group {
    margin-bottom: 14px;
}

.form-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 5px;
    display: block;
}

    .form-label .req {
        color: var(--red);
    }

.form-input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 7px 11px;
    font-size: 13px;
    font-family: "Inter", sans-serif;
    outline: none;
    color: var(--text);
    transition: border 0.15s;
}

    .form-input:focus {
        border-color: var(--blue);
        outline: 2px solid var(--blue-tint);
    }

.form-textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 7px 11px;
    font-size: 13px;
    font-family: "Inter", sans-serif;
    outline: none;
    color: var(--text);
    resize: vertical;
    min-height: 80px;
    transition: border 0.15s;
}

    .form-textarea:focus {
        border-color: var(--blue);
    }

.form-select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 7px 11px;
    font-size: 13px;
    font-family: "Inter", sans-serif;
    outline: none;
    color: var(--text);
    background: var(--white);
}

.form-hint {
    font-size: 11px;
    color: var(--text-sec);
    margin-top: 4px;
}

.filter-select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 7px 10px;
    font-size: 12px;
    color: var(--text);
    background: var(--bg);
    font-family: "Inter", sans-serif;
    outline: none;
    cursor: pointer;
    margin-bottom: 8px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%239CA3AF' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 9px center;
}

/* ─── 12. STATUS BADGES ──────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 10.5px;
    font-weight: 700;
    white-space: nowrap;
}

.badge-N {
    background: var(--green-tint);
    color: var(--green);
}

.badge-C {
    background: var(--amber-tint);
    color: var(--amber-d);
}

.badge-D {
    background: var(--red-tint);
    color: var(--red);
}

.badge-H {
    background: var(--bg);
    color: var(--text-sec);
    border: 1px solid var(--border);
}

.badge-WA {
    background: var(--amber-tint);
    color: var(--amber-d);
}

.badge-A {
    background: var(--blue-tint);
    color: var(--blue);
}

.badge-A2 {
    background: var(--green-tint);
    color: var(--green);
}

.badge-SC {
    background: var(--bg);
    color: var(--text-sec);
    border: 1px solid var(--border);
}

.badge-R {
    background: var(--red-tint);
    color: var(--red);
}

/* Count badge (red/zero) */
.cnt {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    padding: 2px 6px;
    border-radius: 5px;
    font-size: 10.5px;
    font-weight: 700;
    color: #fff;
    background: var(--red);
}

    .cnt.zero {
        background: var(--bg);
        color: var(--text-hint);
        border: 1px solid var(--border);
    }

/* Coloured numbers in tables */
.num-blue {
    color: var(--blue);
    font-weight: 600;
}

.num-red {
    color: var(--red);
    font-weight: 600;
}

.num-dim {
    color: var(--text-hint);
}

/* ─── 13. UPDATE PILLS ───────────────────────────────────── */
.upd-pills {
    display: flex;
    gap: 5px;
    align-items: center;
}

.upd-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10.5px;
    font-weight: 700;
}

.up-new {
    background: var(--green-tint);
    color: var(--green);
}

.up-chg {
    background: var(--amber-tint);
    color: var(--amber-d);
}

.up-del {
    background: var(--red-tint);
    color: var(--red);
}

.up-zero {
    background: var(--bg);
    color: var(--text-hint);
    border: 1px solid var(--border);
}

/* ─── 14. MODALS ─────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(3px);
    display: none;
    align-items: center;
    justify-content: center;
}

    .modal-overlay.open {
        display: flex;
    }

.modal {
    background: var(--white);
    border-radius: 12px;
    width: 560px;
    max-width: 95vw;
    max-height: 84vh;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

    .modal.wide {
        width: 720px;
    }

    .modal.narrow {
        width: 440px;
    }

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.modal-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.modal-subtitle {
    font-size: 11px;
    color: var(--text-hint);
    margin-top: 1px;
}

.modal-close {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--text-sec);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .modal-close:hover {
        background: var(--bg);
    }

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 18px 20px;
}

.modal-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

/* ─── 15. MODULE SWITCHER DRAWER ─────────────────────────── */
.mod-overlay {
    position: fixed;
    inset: 0;
    z-index: 400;
    background: rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(4px);
    display: none;
}

    .mod-overlay.open {
        display: block;
    }

.mod-drawer {
    position: fixed;
    top: var(--pulse-top-h);
    left: 0;
    bottom: 0;
    width: 380px;
    background: var(--white);
    box-shadow: 4px 0 40px rgba(0, 0, 0, 0.12);
    border-right: 1px solid var(--border);
    padding: 20px;
    overflow-y: auto;
    z-index: 401;
}

.mod-drawer-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-hint);
    margin-bottom: 18px;
}

.mod-section {
    margin-bottom: 20px;
}

.mod-section-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-hint);
    margin-bottom: 9px;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .mod-section-label::after {
        content: "";
        flex: 1;
        height: 1px;
        background: var(--border);
    }

.mod-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.mod-card {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 10px 11px;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}

    .mod-card:hover {
        border-color: var(--blue);
        background: var(--blue-tint);
        box-shadow: 0 2px 8px rgba(40, 98, 242, 0.08);
    }

    .mod-card.active {
        border-color: var(--blue);
        background: var(--blue-tint);
    }

.mod-card-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.mod-card-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
}

.mod-card.active .mod-card-name {
    color: var(--blue);
}

.mod-card-sub {
    font-size: 10.5px;
    color: var(--text-sec);
    margin-top: 1px;
}

/* ─── 16. PAGINATION ─────────────────────────────────────── */
.pager {
    display: flex;
    align-items: center;
    gap: 3px;
}

.pg {
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: 5px;
    cursor: pointer;
    font-size: 11.5px;
    color: var(--text);
    background: var(--white);
    font-family: "Inter", sans-serif;
    transition: background 0.12s;
}

    .pg:hover {
        background: var(--bg);
    }

.pg-cur {
    padding: 4px 10px;
    border-radius: 5px;
    background: var(--navy);
    color: #fff;
    font-size: 11.5px;
    font-weight: 600;
}

/* ─── 17. DELEGATE SELECTOR PANE ─────────────────────────── */
.delegate-pane {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.delegate-search {
    padding: 8px;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}

    .delegate-search input {
        width: 100%;
        border: 1px solid var(--border);
        border-radius: 6px;
        padding: 5px 9px;
        font-size: 12px;
        font-family: "Inter", sans-serif;
        outline: none;
    }

.delegate-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0;
}

.delegate-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.1s;
}

    .delegate-item:hover {
        background: var(--bg);
    }

/* ─── 18. UTILITIES ──────────────────────────────────────── */
.page-tab {
    padding: 5px 13px;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    color: var(--text-sec);
    border: 1px solid transparent;
    text-decoration: none;
    transition: all 0.12s;
}

    .page-tab:hover {
        color: var(--text);
        background: var(--bg);
    }

    .page-tab.active {
        color: var(--blue);
        border-color: var(--blue);
        background: var(--blue-tint);
    }

.diff-add {
    background: rgba(16, 185, 129, 0.12);
    color: var(--green);
    border-radius: 2px;
    padding: 0 2px;
}

.diff-del {
    background: rgba(239, 68, 68, 0.09);
    color: var(--red);
    text-decoration: line-through;
    border-radius: 2px;
    padding: 0 2px;
}

.dept-row {
    display: flex;
    align-items: center;
    padding: 7px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

    .dept-row:last-child {
        border-bottom: none;
    }

.dept-name {
    flex: 1;
    color: var(--blue);
    font-weight: 500;
    font-size: 12px;
    cursor: pointer;
}

    .dept-name:hover {
        text-decoration: underline;
    }

.approved-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(16, 185, 129, 0.09);
    color: var(--green);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 600;
    padding: 4px 12px;
    cursor: pointer;
    margin: 10px 14px 0;
}

.hint-text {
    font-size: 12px;
    color: var(--text-sec);
    line-height: 1.5;
}

/* ─── RESPONSIVE: hide text labels below 900px ───────────── */
@media (max-width: 900px) {
    :root {
        --pulse-nav-w: var(--pulse-nav-col);
    }

    .p-nav-label,
    .p-nav-section,
    .p-nav-badge,
    .p-nav-header-text,
    .p-nav-collapse-label {
        display: none;
    }
}
