/* =========================================================
   PRIMIS HELP DESK
   assets/css/app.css

   Bootstrap is used for standard components.
   This file contains only custom PRIMIS styling.
========================================================= */


/* =========================================================
   GLOBAL VARIABLES
========================================================= */

:root {
    --hd-navy: #0b2142;
    --hd-navy2: #102f5a;
    --hd-blue: #1769e0;
    --hd-primary: #1769e0;
    --hd-primary-2: #2e7bf4;
    --hd-cyan: #27b8e6;

    --hd-bg: #f4f7fb;
    --hd-text: #17253b;
    --hd-muted: #72809a;
    --hd-border: #e3e9f2;

    --hd-shadow: 0 12px 35px rgba(24, 46, 82, .08);
}


/* =========================================================
   GLOBAL
========================================================= */

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

body {
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;

    color: var(--hd-text);
    background: var(--hd-bg);
}

a {
    text-decoration: none;
}


/* =========================================================
   APPLICATION SHELL
========================================================= */

.app-shell {
    min-height: 100vh;
    display: flex;
}


/* =========================================================
   SIDEBAR
========================================================= */

.sidebar {
    width: 260px;
    flex: 0 0 260px;

    background: linear-gradient(
        180deg,
        #0a2141,
        #0d2d55 55%,
        #09203e
    );

    color: #dce9fb;

    display: flex;
    flex-direction: column;

    padding: 22px 15px;

    position: fixed;
    inset: 0 auto 0 0;

    z-index: 1030;

    box-shadow:
        10px 0 30px rgba(5, 20, 43, .12);

    /*
     * Important:
     * The sidebar itself does NOT scroll.
     * Only the navigation area scrolls.
     */
    height: 100vh;
    min-height: 0;
    overflow: hidden;
}


/* =========================================================
   SIDEBAR BRAND
========================================================= */

.brand-block {
    display: flex;
    flex-direction: column;
    align-items: center;

    position: relative;

    gap: 8px;

    padding: 15px 8px 24px;

    /*
     * Prevent the brand from shrinking when
     * the menu becomes very long.
     */
    flex: 0 0 auto;
}

.sidebar-logo {
    display: flex;
    justify-content: center;
    align-items: center;

    width: 100%;

    padding: 15px 10px;
}

.sidebar-logo img {
    display: block;

    width: 65px;
    height: 65px;

    max-width: 90px;

    object-fit: contain;

    margin: 0 auto;
}

.brand-text {
    display: flex;
    flex-direction: column;
    align-items: center;

    text-align: center;

    width: 100%;
}

.brand-text strong {
    font-size: 14px;
}

.brand-text span {
    font-size: 9px;

    color: #9fb6d2;

    margin-top: 2px;
}

.sidebar-close {
    display: none;

    margin-left: auto;

    color: #fff;

    font-size: 24px;
}


/* =========================================================
   SIDEBAR NAVIGATION
========================================================= */

.sidebar-nav {
    display: block;

    /*
     * This is the important scrolling area.
     */
    flex: 1 1 auto;

    min-height: 0;

    overflow-y: auto;
    overflow-x: hidden;

    padding: 5px 2px 20px;

    margin: 0;

    /*
     * Firefox scrollbar.
     */
    scrollbar-width: thin;

    scrollbar-color:
        rgba(255, 255, 255, .20)
        transparent;
}


/* Chrome / Edge / Safari scrollbar */

.sidebar-nav::-webkit-scrollbar {
    width: 5px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .20);
    border-radius: 10px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, .35);
}


/* =========================================================
   SIDEBAR NAVIGATION LINKS
========================================================= */

.sidebar-link {
    display: flex;

    align-items: center;

    gap: 11px;

    padding: 10px 12px;

    border-radius: 9px;

    color: #b9cbe0;

    font-size: 12px;

    transition: .15s;

    text-decoration: none !important;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: rgba(255, 255, 255, .09);

    color: #fff;
}

.nav-icon {
    width: 20px;

    text-align: center;

    font-size: 15px;

    flex: 0 0 auto;
}


/* =========================================================
   SIDEBAR USER
========================================================= */

.sidebar-user {
    display: flex;

    gap: 10px;

    align-items: center;

    border-top:
        1px solid rgba(255, 255, 255, .08);

    padding: 17px 8px 3px;
}

.avatar {
    width: 35px;
    height: 35px;

    border-radius: 50%;

    background:
        linear-gradient(
            135deg,
            #2b77ea,
            #27b8e6
        );

    color: #fff;

    display: grid;

    place-items: center;

    font-weight: 700;

    font-size: 12px;

    flex: 0 0 auto;
}

.avatar-sm {
    width: 34px;
    height: 34px;
}

.sidebar-user-info {
    min-width: 0;

    display: flex;
    flex-direction: column;
}

.sidebar-user-info strong {
    font-size: 11px;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}

.sidebar-user-info span {
    font-size: 9px;

    color: #9fb6d2;

    margin-top: 2px;
}


/* =========================================================
   SIDEBAR SPACER
========================================================= */

.sidebar-spacer {
    display: none;
}


/* =========================================================
   SIDEBAR MOBILE OVERLAY
========================================================= */

.sidebar-overlay {
    display: none;
}


/* =========================================================
   MAIN AREA
========================================================= */

.main-area {
    margin-left: 260px;

    min-width: 0;

    width: calc(100% - 260px);

    min-height: 100vh;

    display: flex;
    flex-direction: column;
}


/* =========================================================
   TOP BAR
========================================================= */

.topbar {
    height: 76px;

    background: #fff;

    border-bottom:
        1px solid var(--hd-border);

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 0 28px;

    position: sticky;

    top: 0;

    z-index: 1020;
}

.topbar-title h1 {
    font-size: 20px;

    margin: 2px 0 0;
}

.eyebrow {
    font-size: 9px;

    font-weight: 700;

    letter-spacing: 1.5px;

    color: #8090a5;
}

.topbar-actions {
    display: flex;

    align-items: center;
}

.topbar-user {
    display: flex;

    align-items: center;

    gap: 9px;

    color: var(--hd-text) !important;

    text-align: left;
}

.topbar-user strong,
.topbar-user small {
    display: block;
}

.topbar-user strong {
    font-size: 11px;
}

.topbar-user small {
    font-size: 9px;

    color: var(--hd-muted);
}

.topbar-user:after {
    margin-left: 3px;
}

.topbar-user,
.topbar-user strong,
.topbar-user:hover,
.topbar-user:focus {
    text-decoration: none !important;
}


/* =========================================================
   PAGE CONTENT
========================================================= */

.page-content {
    flex: 1;

    padding: 27px 28px;
}


/* =========================================================
   FOOTER
========================================================= */

.app-footer {
    padding: 14px 28px;

    color: #7d8ba0;

    font-size: 10px;

    background: #fff;

    border-top:
        1px solid var(--hd-border);

    display: flex;

    justify-content: space-between;
}


/* =========================================================
   MOBILE MENU
========================================================= */

.mobile-menu {
    display: none;
}


/* =========================================================
   SECTION HEADINGS
========================================================= */

.section-heading {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

    margin-bottom: 18px;
}

.section-heading h2 {
    font-size: 18px;

    margin: 0;
}


/* =========================================================
   DASHBOARD
========================================================= */

.dashboard-hero {
    border-radius: 16px;

    padding: 30px;

    background:
        linear-gradient(
            120deg,
            #0b2a52,
            #1769e0
        );

    color: #fff;

    position: relative;

    overflow: hidden;
}

.dashboard-hero h2 {
    font-size: 27px;

    margin: 0 0 7px;
}

.dashboard-hero p {
    max-width: 650px;

    color: #d8e8fa;

    font-size: 13px;
}

.stat-card {
    border:
        1px solid var(--hd-border);

    box-shadow: var(--hd-shadow);
}

.stat-label {
    font-size: 10px;

    color: var(--hd-muted);

    text-transform: uppercase;

    letter-spacing: .7px;
}

.stat-value {
    font-size: 27px;

    font-weight: 800;

    margin-top: 3px;
}


/* =========================================================
   PROFILE
========================================================= */

.profile-card {
    max-width: 900px;
}

.profile-head {
    display: flex;

    align-items: center;

    gap: 16px;

    margin-bottom: 25px;
}

.profile-head h2 {
    margin: 0 0 5px;
}

.profile-avatar {
    width: 56px;
    height: 56px;

    font-size: 20px;
}

/* Passport photo instead of the initials (Profile window and top bar); a portrait photo is cropped to the face area */
.profile-photo {
    width: 72px; height: 72px; flex: 0 0 72px;
    border-radius: 50%; object-fit: cover; object-position: center 25%;
    border: 3px solid #e4e9f6; box-shadow: 0 4px 12px rgba(15, 23, 42, .12); background: #eef2f7;
}
.topbar-avatar-photo { object-fit: cover; object-position: center 25%; padding: 0; background: #eef2f7; }


/* =========================================================
   BUTTONS
========================================================= */

.btn {
    border-radius: 10px;

    font-weight: 700;

    transition:
        transform .18s ease,
        box-shadow .18s ease,
        filter .18s ease;
}

.btn-primary {
    background:
        linear-gradient(
            135deg,
            var(--hd-primary),
            var(--hd-primary-2)
        );

    border-color: var(--hd-primary);

    box-shadow:
        0 8px 18px rgba(23, 105, 224, .18);
}

.btn-primary:hover {
    filter: brightness(.97);

    transform: translateY(-1px);

    box-shadow:
        0 10px 22px rgba(23, 105, 224, .22);
}


/* =========================================================
   FORMS
========================================================= */

.form-control,
.form-select {
    border-color: #d9e1ec;

    border-radius: 10px;

    min-height: 44px;

    color: #20314a;
}

.form-control:focus,
.form-select:focus {
    border-color: #5b94eb;

    box-shadow:
        0 0 0 3px rgba(23, 105, 224, .10);
}

.form-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 13px;
}

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


/* =========================================================
   AUTH / LOGIN PAGE
========================================================= */

.auth-page {
    height: 100vh;

    min-height: 100vh;

    overflow: hidden;

    display: flex;

    flex-direction: column;

    background: #fff;
}

.auth-main {
    flex: 1;

    min-height: 0;

    display: flex;
}

.auth-layout {
    display: grid;

    grid-template-columns: 55% 45%;

    min-height: 0;

    flex: 1;
}

.auth-brand {
    position: relative;

    overflow: hidden;

    background: #09203e;

    color: #fff;
}


/* =========================================================
   LOGIN SLIDESHOW
========================================================= */

.login-slideshow {
    position: absolute;

    inset: 0;

    overflow: hidden;

    background: #09203e;
}

.login-slide {
    position: absolute;

    inset: 0;

    opacity: 0;

    visibility: hidden;

    transform: scale(1.03);

    transition:
        opacity 1.1s ease,
        transform 6s ease,
        visibility 0s linear 1.1s;
}

.login-slide.active {
    opacity: 1;

    visibility: visible;

    transform: scale(1);

    transition:
        opacity 1.1s ease,
        transform 6s ease,
        visibility 0s;
}

.login-slide img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
}

.login-slide-overlay {
    position: absolute;

    inset: 0;

    z-index: 1;

    pointer-events: none;

    background:
        linear-gradient(
            90deg,
            rgba(5, 27, 56, .90),
            rgba(8, 39, 76, .58),
            rgba(7, 27, 52, .25)
        );
}


/* =========================================================
   LOGIN BRAND CONTENT
========================================================= */

.auth-brand-inner {
    position: relative;

    z-index: 2;

    height: 100%;

    display: flex;

    flex-direction: column;

    justify-content: center;

    padding: 7vh 7vw 6vh;
}

.auth-brand-badge {
    display: inline-flex;

    align-items: center;

    gap: 8px;

    color: #cce0f6;

    font-size: 11px;

    margin-bottom: 24px;
}

.auth-brand-badge span {
    width: 28px;
    height: 28px;

    display: grid;

    place-items: center;

    background:
        rgba(255, 255, 255, .12);

    border-radius: 8px;
}

.auth-brand h1 {
    font-size:
        clamp(34px, 3.3vw, 58px);

    line-height: 1.04;

    letter-spacing: -1.5px;

    margin: 0 0 18px;
}

.auth-brand h1 span {
    color: #62c8f0;
}

.auth-brand p {
    font-size: 14px;

    line-height: 1.7;

    color: #c1d5ea;

    max-width: 580px;
}

.feature-row {
    display: flex;

    gap: 24px;

    margin-top: 25px;

    flex-wrap: wrap;
}

.feature {
    display: flex;

    gap: 8px;

    align-items: center;

    color: #d8e7f8;

    font-size: 11px;
}

.feature-icon {
    width: 32px;
    height: 32px;

    border-radius: 9px;

    background:
        rgba(255, 255, 255, .1);

    display: grid;

    place-items: center;
}

.login-slide-dots {
    position: relative;

    z-index: 3;

    display: flex;

    gap: 6px;

    margin-top: 28px;
}

.login-slide-dots span {
    display: block;

    width: 24px;
    height: 3px;

    border-radius: 3px;

    background:
        rgba(255, 255, 255, .35);

    transition: .25s;
}

.login-slide-dots span.active {
    width: 34px;

    background: #62c8f0;
}

.login-slide-dots span:first-child {
    background:
        rgba(255, 255, 255, .35);
}


/* =========================================================
   LOGIN FORM PANEL
========================================================= */

.auth-form-panel {
    display: flex;

    align-items: center;

    justify-content: center;

    padding: 25px 6vw;

    background:
        linear-gradient(
            135deg,
            #fff,
            #f9fbff
        );

    min-height: 0;
}

.login-card {
    width: min(450px, 100%);

    background: #fff;

    border:
        1px solid var(--hd-border);

    border-radius: 18px;

    padding: 32px;

    box-shadow:
        0 20px 55px rgba(30, 57, 95, .1);
}

.login-logo {
    display: flex;

    justify-content: center;

    align-items: center;

    width: 100%;

    margin: 0 auto 15px;
}

.login-logo img {
    display: block;

    width: 90px;

    height: auto;

    margin: 0 auto;
}

.login-card h2 {
    font-size: 27px;

    margin-bottom: 5px;
}

.login-subtitle {
    color: var(--hd-muted);

    margin-bottom: 22px;

    font-size: 12px;
}


/* =========================================================
   LOGIN INPUTS
========================================================= */

.input-wrap {
    position: relative;
}

.input-wrap .form-control {
    padding-left: 38px;
}

.input-icon {
    position: absolute;

    left: 13px;

    top: 50%;

    transform: translateY(-50%);

    color: #8c9ab0;

    font-size: 14px;

    z-index: 2;
}

.password-toggle {
    position: absolute;

    right: 10px;

    top: 50%;

    transform: translateY(-50%);

    border: 0;

    background: transparent;

    color: #7f8da3;

    cursor: pointer;
}

.remember {
    display: flex;

    align-items: center;

    gap: 7px;

    color: #67758a;
}

.forgot {
    color: #1769e0;

    font-weight: 700;
}

.help-note {
    margin-top: 18px;

    padding-top: 15px;

    border-top:
        1px solid #edf1f6;

    color: #8491a5;

    font-size: 10px;

    line-height: 1.6;
}


/* =========================================================
   AUTH FOOTER
========================================================= */

.auth-footer {
    height: 44px;

    flex: 0 0 44px;

    display: flex;

    align-items: center;

    justify-content: center;

    color: #7f8da1;

    font-size: 10px;

    background: #fff;

    border-top:
        1px solid #e6ebf2;
}


/* Consistent form presentation across PRIMIS dialogs, following the ticket form. */
.modal-content > form .modal-body,
.modal-content form > .modal-body {
    padding: 1.25rem;
}

/* A form between .modal-content and .modal-body stops Bootstrap's scrollable dialog working: the body overflows and the footer is cut off. */
.modal-dialog-scrollable .modal-content > form { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; max-height: 100%; overflow: hidden; }
.modal-dialog-scrollable .modal-content > form > .modal-header,
.modal-dialog-scrollable .modal-content > form > .modal-footer { flex: 0 0 auto; }
.modal-dialog-scrollable .modal-content > form > .modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
/* primisAlert / primisConfirm (app.js): the system's own message window */
dialog.primis-dialog { width: min(440px, calc(100vw - 2rem)); padding: 0; border: 0; background: transparent; }
dialog.primis-dialog::backdrop { background: rgba(15, 23, 42, .5); }
dialog.primis-dialog .modal-content { display: flex; pointer-events: auto; background-color: var(--bs-body-bg, #fff); }
dialog.primis-dialog .modal-body { background-color: var(--bs-body-bg, #fff); opacity: 1; }
@media (min-width: 992px) { #itemModal .modal-dialog:is(.modal-lg, .modal-xl) { max-width: var(--bs-modal-width); } }   /* Attendance Configuration, Schedules and Leaves: fields in columns */

.modal-content .form-label {
    display: block;
    margin-bottom: .4rem;
    color: #24344d;
    font-weight: 600;
}

.modal-content .form-control,
.modal-content .form-select {
    min-height: 42px;
    border-color: #d7dee8;
    border-radius: .45rem;
}

.modal-content textarea.form-control {
    min-height: unset;
}

.modal-content .form-control:focus,
.modal-content .form-select:focus {
    border-color: #168b91;
    box-shadow: 0 0 0 .2rem rgba(22, 139, 145, .14);
}

.modal-content .modal-footer {
    padding: .9rem 1.25rem;
    gap: .5rem;
}

/* =========================================================
   SEARCH
========================================================= */

.search-select {
    position: relative;
}

.search-results {
    position: absolute;

    left: 0;
    right: 0;

    top: calc(100% + 4px);

    background: #fff;

    border:
        1px solid #dee2e6;

    border-radius: .375rem;

    box-shadow:
        0 .5rem 1rem rgba(0, 0, 0, .12);

    max-height: 280px;

    overflow: auto;

    z-index: 1060;

    display: none;

    padding: .25rem;
}

.search-results.show {
    display: block;
}

.search-results button {
    display: block;

    width: 100%;

    border: 0;

    background: #fff;

    text-align: left;

    padding: .45rem .65rem;

    border-radius: .25rem;

    color: #33445d;

    font-size: .875rem;
}

.search-results button:hover,
.search-results button.active {
    background: #f1f6ff;

    color: #1769e0;
}

.search-results button {
    white-space: normal;
}

.search-empty {
    padding: .55rem .65rem;

    color: #8794a7;

    font-size: .75rem;
}


/* =========================================================
   TABLE ACTIONS
========================================================= */

.action-cell {
    position: relative;

    text-align: center;

    overflow: visible !important;
}

.action-dots {
    width: 34px;
    height: 34px;

    padding: 0;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    border: 0;

    background: transparent;

    color: #51647d;

    font-size: 22px;

    line-height: 1;

    letter-spacing: 0;

    font-weight: 700;

    border-radius: 7px;
}

.action-dots:hover {
    background: #edf3fb;

    color: #1769e0;
}

.action-menu {
    display: none !important;
}

.action-menu-floating {
    position: fixed !important;

    display: block !important;

    min-width: 155px;

    max-width: 190px;

    z-index: 2000;

    background: #fff;

    border:
        1px solid #e1e8f2;

    border-radius: 10px;

    box-shadow:
        0 14px 35px rgba(20, 42, 75, .18);

    padding: 5px;

    text-align: left;
}

.action-menu-floating button {
    display: block;

    width: 100%;

    border: 0;

    background: transparent;

    text-align: left;

    padding: 9px 11px;

    border-radius: 7px;

    font-size: 12px;

    color: #33445d;
}

.action-menu-floating button:hover {
    background: #f1f6ff;

    color: #1769e0;
}


/* =========================================================
   DATA TABLE
========================================================= */

.dt-wrapper {
    background: #fff;

    border:
        1px solid #e1e8f2;

    border-radius: 14px;

    box-shadow:
        0 10px 30px rgba(24, 46, 82, .07);

    overflow: hidden;

    padding: 0;
}

.dt-toolbar,
.dt-footer {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 12px;

    flex-wrap: wrap;
}

.dt-toolbar {
    padding: 14px 16px;

    border-bottom:
        1px solid var(--hd-border);

    background:
        linear-gradient(
            180deg,
            #fff,
            #fbfcfe
        );
}

.dt-buttons {
    display: flex;

    gap: 7px;

    flex-wrap: wrap;
}

.dt-btn {
    border:
        1px solid #d9e2ef;

    background: #fff;

    color: #40536d;

    border-radius: 7px;

    padding: 6px 11px;

    font-size: 11px;

    font-weight: 600;

    cursor: pointer;

    transition: .15s;
}

.dt-btn:hover {
    border-color: #1769e0;

    color: #1769e0;

    background: #f5f9ff;
}

.dt-search {
    display: flex;

    align-items: center;

    gap: 8px;
}

.dt-search label {
    font-size: 11px;

    color: var(--hd-muted);
}

.dt-search input {
    width: 210px;

    height: 35px;

    border:
        1px solid #d9e2ef;

    border-radius: 7px;

    padding: 7px 10px;

    outline: 0;

    box-shadow: none;
}

.dt-search input:focus {
    border-color: #5b94eb;

    box-shadow:
        0 0 0 3px rgba(23, 105, 224, .08);
}

.dt-footer {
    padding: 13px 16px;

    border-top:
        1px solid var(--hd-border);

    font-size: 11px;

    color: #7b899d;
}

.dt-pagination {
    display: flex;

    gap: 4px;
}

.dt-page {
    border:
        1px solid #dbe3ee;

    background: #fff;

    color: #52647d;

    border-radius: 7px;

    min-width: 32px;

    height: 30px;

    padding: 0 8px;

    font-size: 11px;

    cursor: pointer;
}

.dt-page:hover:not(:disabled) {
    background: #f2f7ff;

    color: #1769e0;

    border-color: #bcd2f3;
}

.dt-page.active {
    background: #1769e0;

    color: #fff;

    border-color: #1769e0;
}

.dt-page:disabled {
    opacity: .45;
}


/* =========================================================
   TABLE
========================================================= */

#ticketsTable {
    width: 100%;

    border-collapse: separate;

    border-spacing: 0;
}

.display thead th,
#ticketsTable thead th,
#ticketsTable tfoot th,
.table-responsive thead th {
    background: #f7f9fc;

    color: #6f7f96;

    font-size: 10px;

    text-transform: uppercase;

    letter-spacing: .55px;

    padding: 11px 12px;

    border-bottom:
        1px solid #e1e8f2;

    white-space: nowrap;
}

.display tbody td,
#ticketsTable tbody td,
.table-responsive tbody td {
    padding: 11px 12px;

    border-bottom:
        1px solid #edf1f6;

    color: #35465f;

    font-size: 12px;

    vertical-align: middle;
}

.display tbody tr:hover,
#ticketsTable tbody tr:hover,
.table-responsive tbody tr:hover {
    background: #f8fbff;
}

.table-responsive {
    overflow-x: auto;

    overflow-y: visible;
}

.table-responsive table {
    margin-bottom: 0;

    border-collapse: separate;

    border-spacing: 0;
}

.table-responsive tbody tr:last-child td {
    border-bottom: 0;
}

.empty-state {
    text-align: center;
    padding: 12px !important;
    color: #dc3545 !important;
    font-weight: 600;
    line-height: 1.4;
}

#ticketsTable tbody tr.no-data-row:hover {
    background: transparent;
}

#ticketsTable tbody tr.no-data-row td {
    height: auto;
    padding: 12px !important;
    border-bottom: 0;
}

#ticketsTable tfoot th {
    border-top: 1px solid #e1e8f2;
    border-bottom: 0;
}


/* =========================================================
   MODALS
========================================================= */

.modal-dialog {
    max-width: 500px;
}
/* The shared AJAX window opened with data-modal-size="xl" (e.g. User Profile) may be wide */
@media (min-width: 768px) {
    #globalModal .modal-dialog.modal-xl { max-width: min(1140px, calc(100vw - 2rem)); }
}

#ticketModal .modal-dialog {
    max-width: 1100px;
    width: calc(100% - 2rem);
    margin: 1rem auto;
}

#ticketModal .modal-content {
    max-height: calc(100vh - 2rem);
    display: flex;
    flex-direction: column;
}

#ticketModal .modal-body {
    overflow-y: auto;
}

#ticketModal .modal-footer {
    flex: 0 0 auto;
}

#ticketModal .detail-grid-three,
#ticketModal .form-grid-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

#ticketModal .field-full {
    grid-column: 1 / -1;
}

#ticketModal .ticket-comments-section {
    margin-top: 18px;
}

#ticketModal .ticket-comments-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

#ticketModal .comment-item {
    margin-top: 0;
}

#ticketModal .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

#ticketModal .modal-footer .btn {
    min-width: 96px;
}

/* Ticket modal: keep header/footer fixed while only the body scrolls. */
#ticketModal #ticketModalContent {
    display: contents;
}

/* The update form must not become a flex container around the scrolling body/footer. */
#ticketModal #updateTicketForm {
    display: contents;
}

#ticketModal .modal-body {
    min-height: 0;
    flex: 1 1 auto;
}

#ticketModal .ticket-view-footer,
#ticketModal .ticket-update-footer {
    flex: 0 0 auto;
    position: relative;
    z-index: 2;
    border-top: 2px solid #d9e1ec;
    background: #fff;
    box-shadow: 0 -3px 10px rgba(15, 35, 65, 0.04);
    padding: 12px 20px;
}

#ticketModal .ticket-view-footer {
    min-height: 64px;
}

#ticketModal .ticket-update-footer {
    min-height: 64px;
}

#ticketModal .update-comments-list {
    max-height: 240px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid #e5eaf1;
    border-radius: 10px;
    background: #f8fafc;
}


.modal-content {
    border:
        1px solid #e3e9f2;

    border-radius: 14px;

    overflow: hidden;

    box-shadow:
        0 20px 55px rgba(24, 46, 82, .18);
}

.modal-header {
    padding: 15px 18px;

    background:
        linear-gradient(
            180deg,
            #fff,
            #fbfcfe
        );

    border-bottom:
        1px solid #e7edf5;
}

.modal-header h2,
.modal-header h3 {
    font-size: 16px;

    font-weight: 700;

    margin: 0 0 3px;

    color: #17253b;
}

.modal-header p {
    font-size: 11px;

    color: #7a899e;

    margin: 0;
}

.modal-body {
    padding: 18px;
}

.modal-footer {
    padding: 12px 18px;

    background: #fbfcfe;

    border-top:
        1px solid #e7edf5;
}

.modal-footer .btn {
    min-width: 90px;

    border-radius: 7px;

    font-size: 12px;

    font-weight: 600;
}

.modal-body .form-label {
    font-size: 11px;

    font-weight: 700;

    color: #53657e;

    margin-bottom: 6px;
}

.modal-body .form-control,
.modal-body .form-select {
    font-size: 12px;

    border-color: #d9e2ed;

    border-radius: 7px;

    min-height: 38px;

    box-shadow: none;
}

.modal-body textarea.form-control {
    min-height: 92px;

    resize: vertical;
}

.modal-body .form-control:focus,
.modal-body .form-select:focus {
    border-color: #77a9ec;

    box-shadow:
        0 0 0 .2rem rgba(23, 105, 224, .1);
}


/* =========================================================
   TICKET DETAILS
========================================================= */

.detail-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 11px;
}

.detail-grid-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-grid-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ticket-section-title {
    font-size: 11px;
    font-weight: 800;
    color: #1769e0;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 10px;
}

.requester-readonly-grid .detail-value {
    background: #f8fafc;
}

@media (max-width: 768px) {
    #ticketModal .modal-dialog {
        max-width: calc(100% - 1rem);
        width: calc(100% - 1rem);
        margin: .5rem auto;
    }
    #ticketModal .modal-content {
        max-height: calc(100vh - 1rem);
    }
    #ticketModal .detail-grid-three,
    #ticketModal .form-grid-three {
        grid-template-columns: 1fr;
    }
}


.detail-label {
    display: block;

    font-size: 9px;

    text-transform: uppercase;

    letter-spacing: .6px;

    color: #8491a5;

    font-weight: 700;

    margin-bottom: 3px;
}

.detail-value {
    font-size: 12px;

    color: #30415a;

    line-height: 1.5;
}

.ticket-description {
    background: #f7f9fc;

    border:
        1px solid #e7edf5;

    border-radius: 8px;

    padding: 11px;
}

.comment-item {
    margin-top: 9px;

    padding: 10px 11px;

    background: #f8fbff;

    border:
        1px solid #e5edf7;

    border-radius: 8px;

    font-size: 11px;

    color: #42536b;
}

.comment-item strong {
    display: block;

    font-size: 11px;

    color: #263852;
}

.comment-item small {
    display: block;

    color: #8a97a9;

    font-size: 9px;

    margin: 2px 0 6px;
}


/* =========================================================
   SIDEBAR MENU HIERARCHY
========================================================= */


/* =========================================================
   LEVEL 1
========================================================= */

.sidebar-nav > .sidebar-link {
    padding-left: 14px !important;

    font-size: 12px;

    font-weight: 700;
}

.sidebar-nav > .sidebar-link > span:first-child {
    gap: 11px;
}

.sidebar-nav > .sidebar-link > .nav-icon {
    width: 28px;

    font-size: 14px;

    font-weight: 700;
}


/* =========================================================
   LEVEL 2
========================================================= */

.sidebar-nav > .collapse > .sidebar-submenu,
.sidebar-nav > .collapse > .sidebar-link {
    padding-left: 38px !important;

    font-size: 11px;

    font-weight: 600;
}

.sidebar-nav > .collapse > .sidebar-submenu > span:first-child,
.sidebar-nav > .collapse > .sidebar-link > span:first-child {
    gap: 11px;
}

.sidebar-nav > .collapse > .sidebar-submenu > .nav-icon,
.sidebar-nav > .collapse > .sidebar-link > .nav-icon {
    width: 24px;

    font-size: 12px;
}


/* =========================================================
   LEVEL 3
========================================================= */

.sidebar-nav .sidebar-submenu-level2 {
    padding-left: 64px !important;

    font-size: 10px;

    font-weight: 400;

    position: relative;
}

.sidebar-nav .sidebar-submenu-level2 > .nav-icon {
    width: 18px;

    font-size: 9px;
}


/* =========================================================
   LEVEL 2 COLLAPSE HEADERS
========================================================= */

.sidebar-nav .sidebar-submenu[data-bs-toggle="collapse"] {
    justify-content: space-between;
}

.sidebar-nav .sidebar-submenu[data-bs-toggle="collapse"] > span:first-child {
    display: flex;

    align-items: center;
}


/* =========================================================
   MENU SPACING
========================================================= */

.sidebar-nav > .sidebar-link {
    margin-bottom: 3px;
}

.sidebar-nav > .collapse > .sidebar-submenu,
.sidebar-nav > .collapse > .sidebar-link {
    margin-bottom: 2px;
}

.sidebar-nav .sidebar-submenu-level2 {
    margin-bottom: 1px;
}


/* =========================================================
   COLLAPSE ARROWS
========================================================= */

.help-desk-arrow {
    font-size: 14px;

    transition:
        transform .2s ease;
}

.sidebar-link[aria-expanded="false"] .help-desk-arrow {
    transform: rotate(-90deg);
}

.sidebar-link[aria-expanded="true"] .help-desk-arrow {
    transform: rotate(0deg);
}


/* =========================================================
   ACTIVE MENU
========================================================= */

.sidebar-submenu.active {
    font-weight: 700;
}

.sidebar-submenu-level2.active {
    font-weight: 600;
}


/* =========================================================
   SUBMENU VISUAL SEPARATION
========================================================= */

.sidebar-nav > .collapse {
    margin-top: -1px;

    margin-bottom: 4px;
}

.sidebar-nav .sidebar-submenu-level2::before {
    content: "";

    position: absolute;

    left: 49px;

    top: 0;

    bottom: 0;

    width: 1px;

    background:
        rgba(255, 255, 255, .10);
}


/* =========================================================
   RESPONSIVE - 900px
========================================================= */

@media (max-width: 900px) {

    .auth-layout {
        grid-template-columns: 1fr;
    }

    .auth-brand {
        display: none;
    }

    .auth-form-panel {
        padding: 20px;
    }


    /* Mobile sidebar */

    .sidebar {
        width: 260px;

        transform: translateX(-100%);

        transition:
            transform .2s ease;
    }

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

    .sidebar-close {
        display: block;
    }


    /* Mobile overlay */

    .sidebar-overlay {
        position: fixed;

        inset: 0;

        background:
            rgba(0, 0, 0, .45);

        z-index: 1025;
    }

    .sidebar-overlay.show {
        display: block;
    }


    /* Main area */

    .main-area {
        margin-left: 0;

        width: 100%;
    }


    /* Mobile menu button */

    .mobile-menu {
        display: block;
    }


    /* Topbar */

    .topbar {
        padding: 0 15px;
    }


    /* Content */

    .page-content {
        padding: 20px 15px;
    }


    /* Forms */

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

    .field-full {
        grid-column: auto;
    }


    /* Topbar title */

    .topbar-title h1 {
        font-size: 17px;
    }


    /* Hide full user text */

    .topbar-user > div:nth-child(2) {
        display: none;
    }


    /* Auth page */

    .auth-page {
        overflow: auto;

        min-height: 100vh;

        height: auto;
    }

    .auth-main {
        min-height:
            calc(100vh - 44px);
    }

    .auth-footer {
        position: relative;
    }

    .login-card {
        box-shadow: none;
    }


    /* Sidebar hierarchy */

    .sidebar-nav > .sidebar-link {
        padding-left: 12px !important;
    }

    .sidebar-nav > .collapse > .sidebar-submenu,
    .sidebar-nav > .collapse > .sidebar-link {
        padding-left: 34px !important;
    }

    .sidebar-nav .sidebar-submenu-level2 {
        padding-left: 56px !important;
    }

    .sidebar-nav .sidebar-submenu-level2::before {
        left: 43px;
    }
}


/* =========================================================
   RESPONSIVE - 575px
========================================================= */

@media (max-width: 575px) {

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .modal-dialog {
        margin: .5rem;
    }

    .modal-body {
        padding: 14px;
    }

    .modal-header {
        padding: 13px 14px;
    }

    .modal-footer {
        padding: 10px 14px;
    }

    .login-card {
        padding: 24px 20px;

        border-radius: 14px;
    }

    .app-footer {
        padding: 12px 15px;

        font-size: 9px;
    }
}


/* =========================================================
   PRIMIS FINAL UI REFINEMENT
   Sidebar navigation is instant and stable. Bootstrap Collapse
   is intentionally not used for sidebar menus.
========================================================= */

/* Sidebar: no movement, no height animation, no shaking. */
.sidebar-nav .collapse,
.sidebar-nav .collapsing,
.sidebar-nav .collapse.show {
    transition: none !important;
    animation: none !important;
}

.sidebar-nav .collapse:not(.show) {
    display: none !important;
}

.sidebar-nav .collapse.show {
    display: block !important;
    height: auto !important;
    overflow: visible !important;
}

.sidebar-nav .collapsing {
    height: auto !important;
    overflow: visible !important;
}

.sidebar-nav .sidebar-link,
.sidebar-nav .nav-icon,
.sidebar-nav .help-desk-arrow {
    transition: none !important;
    animation: none !important;
}

.sidebar-nav .sidebar-link {
    transform: none !important;
}

.sidebar-nav .help-desk-arrow,
.sidebar-link[aria-expanded="false"] .help-desk-arrow,
.sidebar-link[aria-expanded="true"] .help-desk-arrow {
    transform: none !important;
}

.sidebar-nav a[data-sidebar-toggle] .help-desk-arrow::after {
    content: '';
}

/* Keep each menu row at a fixed height so opening a submenu does not
   make neighbouring items jump. */
.sidebar-nav > .sidebar-link {
    min-height: 44px;
}

.sidebar-nav > .collapse > .sidebar-link,
.sidebar-nav > .collapse > .sidebar-submenu {
    min-height: 38px;
}

.sidebar-nav .sidebar-submenu-level2 {
    min-height: 34px;
}

/* Compact profile/change-password typography. */
#globalModal .modal-content,
#ticketModal .modal-content,
#createTicketModal .modal-content {
    font-size: 13px;
}

#globalModal .modal-title,
#ticketModal .modal-title,
#createTicketModal .modal-title {
    font-size: 16px !important;
    line-height: 1.25;
}

#globalModal .modal-header p,
#ticketModal .modal-header p,
#createTicketModal .modal-header p {
    font-size: 11px !important;
}

#globalModal .modal-body,
#ticketModal .modal-body,
#createTicketModal .modal-body {
    font-size: 13px !important;
}

#globalModal .form-label,
#ticketModal .form-label,
#createTicketModal .form-label {
    font-size: 12px;
}

#globalModal .form-control,
#globalModal .form-select,
#ticketModal .form-control,
#ticketModal .form-select,
#createTicketModal .form-control,
#createTicketModal .form-select {
    font-size: 13px;
}

/* General application controls remain calm: no jumping or shaking. */
.sidebar-link,
.btn,
.action-dots,
.dt-btn,
.dt-page,
.dropdown-item {
    transform: none !important;
}



/* =========================================================
   MODERN PRIMIS DASHBOARD
   Custom dashboard presentation only.
========================================================= */
.dashboard-modern { padding-bottom: 12px; }
.dashboard-hero-modern { min-height: 0; display:flex; align-items:center; justify-content:space-between; padding:18px 28px; box-shadow:0 12px 30px rgba(18,55,98,.12); }
.dashboard-hero-content { position:relative; z-index:2; }
.dashboard-eyebrow { font-size:10px; font-weight:800; letter-spacing:1.4px; color:#bfe7ff; margin-bottom:5px; }
.dashboard-eyebrow i { margin-right:6px; }
.dashboard-hero-modern h2 { font-size:24px; letter-spacing:-.4px; margin-bottom:4px; }
.dashboard-hero-modern p { margin-bottom:10px; font-size:13px; }
.dashboard-hero-modern .dashboard-hero-actions .btn { padding:5px 12px; font-size:13px; }
.dashboard-hero-actions { display:flex; gap:9px; flex-wrap:wrap; }
.dashboard-hero-secondary { color:#fff; background:rgba(255,255,255,.09); border:1px solid rgba(255,255,255,.25); }
.dashboard-hero-secondary:hover { color:#fff; background:rgba(255,255,255,.15); }
.dashboard-hero-art { width:150px; height:96px; position:relative; flex:0 0 150px; opacity:.92; }
.dashboard-hero-art span { position:absolute; width:42px; height:42px; border:1px solid rgba(255,255,255,.2); background:rgba(255,255,255,.08); border-radius:13px; display:flex; align-items:center; justify-content:center; color:#fff; font-size:16px; box-shadow:0 10px 24px rgba(0,0,0,.08); }
.dashboard-hero-art span:nth-child(1){right:8px;top:0;transform:rotate(8deg)}
.dashboard-hero-art span:nth-child(2){left:16px;top:28px;transform:rotate(-7deg)}
.dashboard-hero-art span:nth-child(3){right:34px;bottom:0;transform:rotate(5deg)}
.dashboard-section-title { margin-top:28px; margin-bottom:14px; }
.dashboard-section-title h2 { font-size:19px; font-weight:800; }
.dashboard-section-title p { margin:3px 0 0; font-size:11px; color:var(--hd-muted); }
.dashboard-total-pill { background:#fff; border:1px solid var(--hd-border); padding:8px 12px; border-radius:20px; font-size:11px; font-weight:700; color:var(--hd-muted); box-shadow:0 6px 18px rgba(24,46,82,.05); }
.dashboard-total-pill i { color:var(--hd-primary); margin-right:5px; }
.dashboard-stat-card { background:#fff; border:1px solid var(--hd-border); border-radius:14px; min-height:132px; padding:17px; box-shadow:var(--hd-shadow); position:relative; overflow:hidden; transition:transform .16s ease,box-shadow .16s ease; }
.dashboard-stat-card:hover { transform:translateY(-2px); box-shadow:0 15px 35px rgba(24,46,82,.11); }
.dashboard-stat-icon { width:34px; height:34px; border-radius:10px; display:flex; align-items:center; justify-content:center; color:var(--hd-primary); background:#edf4ff; margin-bottom:12px; font-size:14px; }
.dashboard-stat-card .stat-label { font-size:9px; }
.dashboard-stat-card .stat-value { font-size:25px; line-height:1.1; }
.dashboard-stat-foot { font-size:10px; color:#9aa8bb; margin-top:5px; }
.dashboard-panel { background:#fff; border:1px solid var(--hd-border); border-radius:16px; box-shadow:var(--hd-shadow); padding:22px; }
.dashboard-panel-header { display:flex; align-items:flex-start; justify-content:space-between; gap:15px; margin-bottom:16px; }
.dashboard-panel-kicker { font-size:9px; font-weight:800; color:var(--hd-primary); letter-spacing:1.2px; margin-bottom:4px; }
.dashboard-panel h3 { font-size:17px; font-weight:800; margin:0; color:var(--hd-text); }
.dashboard-panel-header p { font-size:11px; color:var(--hd-muted); margin:4px 0 0; }
.dashboard-panel-icon { width:34px; height:34px; flex:0 0 34px; border-radius:10px; background:#f1f6fd; color:var(--hd-primary); display:flex; align-items:center; justify-content:center; }
.dashboard-bar-chart { height:245px; display:flex; align-items:flex-end; gap:12px; padding:8px 4px 0; border-bottom:1px solid #e9eef5; }
.dashboard-bar-item { flex:1; height:100%; min-width:0; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; }
.dashboard-bar-value { font-size:10px; font-weight:800; color:var(--hd-text); margin-bottom:5px; }
.dashboard-bar-track { width:100%; max-width:42px; height:185px; display:flex; align-items:flex-end; background:#f1f5fa; border-radius:9px 9px 4px 4px; overflow:hidden; }
.dashboard-bar-fill { width:100%; min-height:4px; border-radius:9px 9px 4px 4px; background:linear-gradient(180deg,#2e7bf4,#1769e0); box-shadow:0 5px 14px rgba(23,105,224,.2); }
.dashboard-bar-label { margin-top:8px; font-size:9px; color:var(--hd-muted); text-align:center; white-space:normal; }
.dashboard-mini-summary { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-top:15px; }
.dashboard-mini-summary div { padding:10px 11px; background:#f7f9fc; border:1px solid #edf1f6; border-radius:10px; }
.dashboard-mini-summary i { color:var(--hd-primary); margin-right:5px; }
.dashboard-mini-summary span { font-size:9px; color:var(--hd-muted); display:block; }
.dashboard-mini-summary strong { display:block; font-size:16px; margin-top:2px; }
.dashboard-donut-wrap { display:flex; justify-content:center; padding:8px 0 15px; }
.dashboard-donut { width:170px; height:170px; border-radius:50%; display:flex; align-items:center; justify-content:center; box-shadow:inset 0 0 0 1px rgba(0,0,0,.03); }
.dashboard-donut-hole { width:108px; height:108px; border-radius:50%; background:#fff; display:flex; flex-direction:column; align-items:center; justify-content:center; box-shadow:0 5px 20px rgba(24,46,82,.08); }
.dashboard-donut-hole strong { font-size:26px; line-height:1; }
.dashboard-donut-hole span { font-size:10px; color:var(--hd-muted); margin-top:4px; }
.dashboard-legend { border-top:1px solid #edf1f6; padding-top:12px; display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.dashboard-legend-item { display:flex; justify-content:space-between; align-items:center; font-size:10px; color:var(--hd-muted); }
.dashboard-legend-item span { display:flex; align-items:center; gap:6px; }
.dashboard-legend-item i { width:8px; height:8px; border-radius:50%; display:inline-block; }
.dashboard-legend-item strong { color:var(--hd-text); }
.workflow-modern { display:flex; align-items:center; gap:8px; padding-top:8px; }
.workflow-step { flex:1; display:flex; align-items:flex-start; gap:11px; }
.workflow-step > span { width:38px; height:38px; flex:0 0 38px; border-radius:11px; background:#edf4ff; color:var(--hd-primary); display:flex; align-items:center; justify-content:center; }
.workflow-step small { display:block; font-size:8px; font-weight:800; color:#9aa8bb; letter-spacing:1px; }
.workflow-step strong { display:block; font-size:12px; margin-top:2px; }
.workflow-step p { font-size:10px; line-height:1.45; color:var(--hd-muted); margin:4px 0 0; }
.workflow-line { width:26px; height:1px; background:#dce5ef; flex:0 0 26px; }
.dashboard-actions-panel h3 { font-size:17px; margin:5px 0 15px; }
.dashboard-action { display:flex; align-items:center; gap:11px; padding:11px; border:1px solid #e8edf4; border-radius:11px; color:var(--hd-text); margin-top:8px; transition:.15s; }
.dashboard-action:hover { background:#f7faff; border-color:#d5e4f8; color:var(--hd-text); transform:translateX(2px); }
.dashboard-action > span { width:34px; height:34px; flex:0 0 34px; border-radius:10px; display:flex; align-items:center; justify-content:center; background:#edf4ff; color:var(--hd-primary); }
.dashboard-action div { min-width:0; flex:1; }
.dashboard-action strong { display:block; font-size:11px; }
.dashboard-action small { display:block; font-size:9px; color:var(--hd-muted); margin-top:2px; }
.dashboard-action > i { color:#a6b2c2; }
@media (max-width: 991.98px) { .dashboard-hero-art{display:none}.dashboard-hero-modern{padding:16px 20px}.workflow-modern{display:block}.workflow-line{display:none}.workflow-step{margin-bottom:14px}.dashboard-mini-summary{grid-template-columns:1fr} }
@media (max-width: 575.98px) { .dashboard-panel{padding:17px}.dashboard-hero-modern h2{font-size:21px}.dashboard-total-pill{display:none}.dashboard-bar-chart{gap:5px}.dashboard-bar-track{max-width:30px}.dashboard-bar-label{font-size:8px} }


/* Top-bar ticket notification badge */
.topbar-name-line { display: inline-flex !important; align-items: center; gap: 8px; }
.ticket-notification { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border-radius: 999px; background: #dc3545; color: #fff; font-size: 10px; line-height: 1.2; font-weight: 700; vertical-align: middle; }
.ticket-notification .fa { font-size: 11px; }


/* Requested Help Desk navigation hierarchy and standalone red notification. */
.sidebar-nav #helpDeskTicketsMenu .sidebar-submenu-level2 {
    display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 62px !important;
    color: #b9cbe0; font-size: 12px; text-decoration: none !important;
}
.sidebar-nav #helpDeskTicketsMenu .sidebar-submenu-level2:hover,
.sidebar-nav #helpDeskTicketsMenu .sidebar-submenu-level2.active { background: rgba(255,255,255,.09); color: #fff; }
.sidebar-nav #helpDeskTicketsMenu .sidebar-submenu-level2 .nav-icon { width: 18px; }
.topbar-user-wrap { display: flex; align-items: center; gap: 10px; }
.topbar-user-wrap > .ticket-notification {
    display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; border-radius: 0;
    background: transparent; color: #dc3545; font-size: 13px; line-height: 1; font-weight: 800;
    flex: 0 0 auto; white-space: nowrap;
}
.topbar-user-wrap > .ticket-notification .fa { color: #dc3545; font-size: 18px; }
.topbar-user-wrap > .topbar-user { margin: 0; }


/* Requested profile dropdown, clickable notification, and dashboard navigation cards. */
.ticket-notification { color:#fff !important; background:#dc3545 !important; border-radius:50%; width:26px; height:26px; display:inline-flex !important; align-items:center; justify-content:center; position:relative; text-decoration:none !important; flex:0 0 26px; }
.ticket-notification .fa { position:absolute; top:20px; left:-3px; color:#9aa6b7 !important; font-size:17px !important; }
.ticket-notification span { position:absolute; top:-6px; right:-6px; min-width:24px; height:24px; padding:0 5px; display:flex; align-items:center; justify-content:center; color:#fff; background:#ff2525; border:2px solid #fff; border-radius:50%; font-size:12px; font-weight:800; line-height:1; }
.profile-dropdown-menu { min-width:330px; padding:0; border:1px solid #e3e8ef; border-radius:0; overflow:hidden; }
.profile-dropdown-heading { display:flex; align-items:center; gap:14px; padding:18px 16px; border-bottom:1px solid #e0e6ee; }
.profile-dropdown-avatar { width:64px; height:64px; flex:0 0 64px; border-radius:50%; background:#2447bd; color:#fff; border:4px solid #e4e9f6; display:flex; align-items:center; justify-content:center; font-size:21px; font-weight:700; }
.profile-dropdown-identity { display:flex; flex-direction:column; gap:4px; min-width:0; }
.profile-dropdown-identity strong { color:#172238; font-size:18px; font-weight:750; }
.profile-dropdown-identity span { color:#6d7d96; font-size:14px; font-weight:600; }
.profile-dropdown-row { min-height:89px; padding:12px 16px !important; display:flex !important; align-items:center; gap:17px; border-bottom:1px solid #e0e6ee; color:#39485e !important; font-size:17px; font-weight:650; }
.profile-dropdown-icon { width:46px; height:46px; flex:0 0 46px; display:flex; align-items:center; justify-content:center; border-radius:15px; background:#f0f4f8; color:#53657d; font-size:20px; }
.profile-dropdown-chevron { margin-left:auto; color:#91a2b8; font-size:23px; }
.profile-dropdown-row.profile-logout { color:#f02028 !important; border-bottom:0; }
.profile-logout .profile-dropdown-icon { background:#fff0f0; color:#f02028; }
.dashboard-stat-card-link { display:block; height:100%; color:inherit !important; text-decoration:none !important; cursor:pointer; }
.dashboard-stat-card-link:hover { transform:translateY(-2px); }

/* Final refinements: compact profile menu and separated bell/count badge. */
.topbar-user-wrap { gap: 1cm !important; }
.topbar-user-wrap > .ticket-notification {
    position: relative; display: inline-flex !important; align-items: center; justify-content: center;
    width: 25px; height: 30px; flex: 0 0 25px; margin: 0; padding: 0;
    background: transparent !important; color: #9aa6b7 !important; border-radius: 0;
    text-decoration: none !important; overflow: visible;
}
.topbar-user-wrap > .ticket-notification .fa {
    position: static !important; display: block; color: #9aa6b7 !important;
    font-size: 20px !important; line-height: 1;
}
.topbar-user-wrap > .ticket-notification span {
    position: absolute; top: -3px; right: -9px; min-width: 23px; height: 23px;
    padding: 0 4px; display: flex; align-items: center; justify-content: center;
    background: #ff2525 !important; color: #fff !important; border: 2px solid #fff;
    border-radius: 999px; font-size: 11px; font-weight: 800; line-height: 1;
}
/* Restore the profile dropdown to a compact size while keeping its reference styling. */
.profile-dropdown-menu { min-width: 270px; padding: 0; border-radius: 0; }
.profile-dropdown-heading { gap: 10px; padding: 12px 13px; }
.profile-dropdown-avatar { width: 48px; height: 48px; flex-basis: 48px; border-width: 3px; font-size: 17px; }
.profile-dropdown-identity strong { font-size: 14px; }
.profile-dropdown-identity span { font-size: 12px; }
.profile-dropdown-row { min-height: 58px; padding: 9px 13px !important; gap: 12px; font-size: 14px; }
.profile-dropdown-icon { width: 36px; height: 36px; flex-basis: 36px; border-radius: 12px; font-size: 17px; }
.profile-dropdown-chevron { font-size: 19px; }

/* Final refinements: compact profile menu and separated bell/count badge. */
.topbar-user-wrap { gap: 1cm !important; }
.topbar-user-wrap > .ticket-notification { position:relative; display:inline-flex !important; align-items:center; justify-content:center; width:25px; height:30px; flex:0 0 25px; margin:0; padding:0; background:transparent !important; color:#9aa6b7 !important; border-radius:0; text-decoration:none !important; overflow:visible; }
.topbar-user-wrap > .ticket-notification .fa { position:static !important; display:block; color:#9aa6b7 !important; font-size:20px !important; line-height:1; }
.topbar-user-wrap > .ticket-notification span { position:absolute; top:-3px; right:-9px; min-width:23px; height:23px; padding:0 4px; display:flex; align-items:center; justify-content:center; background:#ff2525 !important; color:#fff !important; border:2px solid #fff; border-radius:999px; font-size:11px; font-weight:800; line-height:1; }
.profile-dropdown-menu { min-width:270px; padding:0; border-radius:0; }
.profile-dropdown-heading { gap:10px; padding:12px 13px; }
.profile-dropdown-avatar { width:48px; height:48px; flex-basis:48px; border-width:3px; font-size:17px; }
.profile-dropdown-identity strong { font-size:14px; }
.profile-dropdown-identity span { font-size:12px; }
.profile-dropdown-row { min-height:58px; padding:9px 13px !important; gap:12px; font-size:14px; }
.profile-dropdown-icon { width:36px; height:36px; flex-basis:36px; border-radius:12px; font-size:17px; }
.profile-dropdown-chevron { font-size:19px; }

/* Compact role-only top-bar dropdown and neutral Bootstrap focus states. */
.topbar-user-wrap > .topbar-user {
    color: var(--hd-text, #17253b) !important;
    text-decoration: none !important;
    box-shadow: none !important;
    background: transparent !important;
    border: 0 !important;
    outline: 0;
    font-size: 12px;
    line-height: 1.3;
    min-height: 32px;
}
.topbar-user-wrap > .topbar-user:hover,
.topbar-user-wrap > .topbar-user:focus,
.topbar-user-wrap > .topbar-user:active,
.topbar-user-wrap > .topbar-user.show {
    color: var(--hd-text, #17253b) !important;
    background: transparent !important;
    box-shadow: none !important;
}
.topbar-role-line { font-weight: 650; white-space: nowrap; }
.profile-dropdown-menu { min-width: 220px; max-width: 260px; border-radius: 8px; }
.profile-dropdown-heading.profile-dropdown-role-only {
    display: block;
    padding: 10px 14px;
    border-bottom: 1px solid #e5eaf1;
    color: #526178;
    background: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
}
.profile-dropdown-menu .dropdown-item,
.profile-dropdown-menu .dropdown-item:focus,
.profile-dropdown-menu .dropdown-item:active {
    background-color: #fff !important;
    color: #334155 !important;
    box-shadow: none !important;
    outline: none;
}
.profile-dropdown-menu .dropdown-item:hover {
    background-color: #f5f7fa !important;
    color: #17253b !important;
}
.profile-dropdown-menu .profile-logout,
.profile-dropdown-menu .profile-logout:hover,
.profile-dropdown-menu .profile-logout:focus,
.profile-dropdown-menu .profile-logout:active {
    color: #dc3545 !important;
    background-color: #fff !important;
}

/* Top-bar identity: circular initials avatar followed by the full employee name. */
.topbar-user-wrap > .topbar-user {
    display: inline-flex !important;
    align-items: center;
    gap: 10px;
    color: var(--hd-text, #17253b) !important;
    text-decoration: none !important;
    box-shadow: none !important;
    background: transparent !important;
    border: 0 !important;
}
.topbar-avatar {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #2447bd;
    color: #fff;
    border: 3px solid #e4e9f6;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
}
.topbar-user .topbar-name-line {
    display: inline-flex !important;
    align-items: center;
    color: var(--hd-text, #17253b);
    font-size: 13px;
    font-weight: 750;
    white-space: nowrap;
}
@media (max-width: 575.98px) {
    .topbar-avatar { width: 32px; height: 32px; flex-basis: 32px; font-size: 11px; }
    .topbar-user .topbar-name-line { max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
}


/* =========================================================
   PRIMIS MODERN NAVIGATION — navy / teal, stable hierarchy
========================================================= */
:root { --hd-navy:#101d35; --hd-navy2:#162844; --hd-primary:#168b91; --hd-primary-2:#58d3c5; }
.sidebar { background:linear-gradient(180deg,#101d35 0%,#132642 58%,#101d35 100%); color:#e8f1fb; }
.brand-block { padding-bottom:18px; border-bottom:1px solid rgba(255,255,255,.09); margin-bottom:12px; }
.sidebar-nav { gap:4px; }
.sidebar-nav .sidebar-link { color:#c7d4e5; border-radius:10px; margin:3px 0; transition:background-color .16s ease,color .16s ease; }
.sidebar-nav .sidebar-link:hover { color:#fff; background:rgba(88,211,197,.10); }
.sidebar-nav .sidebar-link.active { color:#fff !important; background:linear-gradient(90deg,rgba(22,139,145,.36),rgba(88,211,197,.12)) !important; box-shadow:inset 3px 0 #58d3c5; }
.sidebar-nav .sidebar-link.active .nav-icon,.sidebar-nav .sidebar-link:hover .nav-icon { color:#58d3c5; }
.sidebar-nav .sidebar-submenu { padding-left:24px !important; }
.sidebar-nav .sidebar-submenu-level2 { padding-left:43px !important; font-size:12px; }
.sidebar-nav .sidebar-submenu-level2.active { background:rgba(22,139,145,.30) !important; color:#fff !important; box-shadow:inset 3px 0 #58d3c5; }
.sidebar-nav .collapse { padding-left:0; }
.sidebar-nav .help-desk-arrow { color:#90a5bd; }
/* Hamburger is available on desktop and mobile. */
.sidebar-hamburger { display:inline-flex !important; align-items:center; justify-content:center; flex:0 0 40px; width:40px; height:40px; margin-right:14px; border:1px solid #e2e9f2 !important; border-radius:10px; color:#263a54 !important; background:#fff !important; text-decoration:none; font-size:22px; line-height:1; box-shadow:none !important; }
.sidebar-hamburger:hover,.sidebar-hamburger:focus { background:#f2fbfa !important; color:#168b91 !important; }
.topbar { justify-content:flex-start; }
.topbar-title { flex:1; min-width:0; }
.topbar-actions { margin-left:auto; }
.app-shell.sidebar-hidden .sidebar { transform:translateX(-100%); visibility:hidden; }
.app-shell.sidebar-hidden .main-area { margin-left:0; width:100%; }
.sidebar { transition:transform .18s ease,visibility .18s ease; }
@media (max-width:991.98px) {
  .app-shell.sidebar-hidden .sidebar { transform:translateX(-100%); visibility:hidden; }
  .app-shell .sidebar { transform:translateX(-100%); visibility:hidden; }
  .app-shell .sidebar.open { transform:translateX(0); visibility:visible; }
  .app-shell.sidebar-hidden .main-area { margin-left:0; width:100%; }
}

/* Dashboard overview fills the full row for both role-specific card counts. */
.dashboard-stat-grid { display:grid; gap:14px; margin:0; }
.dashboard-stat-grid.manager-stat-grid { grid-template-columns:repeat(7,minmax(0,1fr)); }
.dashboard-stat-grid.agent-stat-grid { grid-template-columns:repeat(6,minmax(0,1fr)); }
.dashboard-stat-grid .dashboard-stat-item { min-width:0; padding:0; }
.dashboard-stat-grid .dashboard-stat-card { height:100%; min-width:0; padding:15px 13px; }
.dashboard-stat-grid .stat-label { font-size:10px; white-space:nowrap; }
.dashboard-bottom-panels > [class*="col-"] { display:flex; }
.dashboard-bottom-panels .dashboard-panel { width:100%; height:100%; }
@media (max-width:1199.98px) {
 .dashboard-stat-grid.manager-stat-grid,.dashboard-stat-grid.agent-stat-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width:575.98px) {
 .dashboard-stat-grid.manager-stat-grid,.dashboard-stat-grid.agent-stat-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
 .dashboard-stat-grid .dashboard-stat-card { min-height:115px; padding:13px 11px; }
 .sidebar-hamburger { margin-right:9px; }
}


/* =========================================================
   PRIMIS PORTAL DASHBOARD AND SIDEBAR COUNTS
========================================================= */
.sidebar-count-badge{margin-left:auto;min-width:25px;height:21px;padding:0 7px;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;background:rgba(88,211,197,.14);border:1px solid rgba(88,211,197,.26);color:#78e1d4;font-size:10px;font-weight:800;font-variant-numeric:tabular-nums;line-height:1;}
.sidebar-nav .sidebar-submenu-level2{display:flex;align-items:center;gap:6px;}
.sidebar-nav .sidebar-submenu-level2>span:nth-child(2){min-width:0;}
.menu-soon-dot{width:7px;height:7px;border-radius:50%;background:#d9a441;margin-left:auto;flex:0 0 auto;}
.primis-portal-dashboard{max-width:1500px;margin:0 auto;padding-bottom:28px;color:#182943;}
.portal-hero{position:relative;overflow:hidden;display:flex;align-items:center;justify-content:space-between;gap:24px;padding:20px 30px;margin-bottom:22px;border-radius:18px;background:linear-gradient(120deg,#101d35 0%,#17395a 64%,#176b75 100%);color:#fff;box-shadow:0 16px 38px rgba(16,29,53,.16);}
.portal-hero:after{content:"";position:absolute;width:330px;height:330px;right:70px;top:-190px;border:1px solid rgba(255,255,255,.1);border-radius:50%;box-shadow:0 0 0 35px rgba(255,255,255,.025),0 0 0 75px rgba(255,255,255,.02);}
.portal-hero-copy{position:relative;z-index:1;max-width:780px;}
.portal-eyebrow{font-size:11px;font-weight:800;letter-spacing:1.6px;text-transform:uppercase;color:#7ce0d2;margin-bottom:8px;}
.portal-hero h1{font-size:clamp(23px,2.4vw,30px);font-weight:800;letter-spacing:-.6px;margin:0 0 6px;color:#fff;}
.portal-hero p{max-width:730px;color:rgba(255,255,255,.8);font-size:13.5px;line-height:1.55;margin:0 0 8px;}
.portal-motto{font-size:12px;font-weight:700;color:#8ce7db;letter-spacing:.2px;}
.portal-hero-mark{position:relative;z-index:1;flex:0 0 96px;width:96px;height:96px;border-radius:24px;border:1px solid rgba(255,255,255,.2);background:rgba(255,255,255,.07);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;color:#75ded0;transform:rotate(3deg);}
.portal-hero-mark i{font-size:32px;}.portal-hero-mark span{font-weight:900;letter-spacing:2.5px;font-size:12px;}
.portal-section-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;margin:0 2px 17px;}
.portal-section-heading h2{font-size:21px;font-weight:800;margin:0 0 5px;color:#172943;}.portal-section-heading p{font-size:12px;color:#77869b;margin:0;}
.portal-system-count{white-space:nowrap;border:1px solid #dce7ef;background:#fff;color:#53657c;border-radius:999px;padding:8px 12px;font-size:11px;font-weight:700;}
.portal-system-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;}
.portal-system-card{min-width:0;display:flex;flex-direction:column;padding:22px 22px 19px;border:1px solid #e1e9f1;border-radius:18px;background:#fff;box-shadow:0 7px 22px rgba(25,48,79,.045);color:inherit;text-decoration:none;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;}
a.portal-system-card:hover{transform:translateY(-3px);box-shadow:0 14px 30px rgba(25,48,79,.10);border-color:#9bded7;color:inherit;}
.portal-card-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:18px;}
.portal-system-icon{width:48px;height:48px;display:flex;align-items:center;justify-content:center;border-radius:14px;background:#e8f8f6;color:#168b91;font-size:21px;}
.portal-system-status{border-radius:999px;padding:6px 9px;font-size:9px;font-weight:800;white-space:nowrap;}.portal-system-status.ready{background:#e5f7ee;color:#18794e;}.portal-system-status.planned{background:#fff5df;color:#946717;}
.portal-system-card h3{font-size:17px;line-height:1.35;font-weight:800;margin:0 0 9px;color:#172943;}.portal-system-card p{font-size:12px;line-height:1.75;color:#718097;margin:0 0 19px;flex:1;}
.portal-card-metrics{display:flex;flex-wrap:wrap;gap:7px;margin:0 0 17px;}.portal-card-metrics span{padding:7px 9px;border-radius:8px;background:#f4f7fa;color:#6b7a8f;font-size:10px;}.portal-card-metrics strong{color:#1a344f;font-size:12px;margin-right:3px;}
.portal-card-link{display:flex;align-items:center;justify-content:space-between;gap:10px;border-top:1px solid #edf1f5;padding-top:14px;color:#147f87;font-size:11px;font-weight:800;}.portal-card-link i{font-size:13px;}.portal-card-link.muted{color:#a2adba;}.portal-system-planned{background:linear-gradient(150deg,#fff 0%,#fbfcfe 100%);}
.portal-system-planned .portal-system-icon{background:#f0f3f7;color:#7b8aa0;}
.portal-overview-panel{margin-top:22px;border:1px solid #dfe9ef;border-radius:16px;background:#f7fbfc;padding:20px 22px;}.portal-overview-panel>div{display:flex;align-items:flex-start;gap:14px;}.portal-overview-icon{width:40px;height:40px;flex:0 0 40px;display:flex;align-items:center;justify-content:center;border-radius:12px;background:#e1f5f2;color:#168b91;font-size:17px;}.portal-overview-panel h3{font-size:14px;font-weight:800;margin:1px 0 6px;color:#1a304a;}.portal-overview-panel p{font-size:11px;line-height:1.75;margin:0;color:#708197;}
@media(max-width:1100px){.portal-system-grid{grid-template-columns:repeat(2,minmax(0,1fr));}.portal-hero-mark{flex-basis:84px;width:84px;height:84px;}}
@media(max-width:650px){.portal-hero{padding:18px 18px;border-radius:15px;}.portal-hero-mark{display:none;}.portal-system-grid{grid-template-columns:1fr;}.portal-section-heading{align-items:flex-start;}.portal-system-count{font-size:10px;}.portal-system-card{padding:19px;}}


/* ============================================================
   PRIMIS full-page navigation/loading overlay and four-ring spinner
   ============================================================ */
.primis-loading-overlay{
    position:fixed;inset:0;z-index:200000;display:flex;align-items:center;justify-content:center;
    background:rgba(13,27,48,.88);opacity:1;visibility:visible;pointer-events:auto;
    transition:opacity .16s ease,visibility .16s ease;
    overscroll-behavior:contain;
}
.primis-loading-overlay.is-hidden{opacity:0;visibility:hidden;pointer-events:none;}
.primis-four-ring-spinner{
    position:relative;width:clamp(76px, min(3cm, 22vw), 3cm);height:clamp(76px, min(3cm, 22vw), 3cm);
    flex:0 0 auto;
}
.primis-loader-ring{
    --ring-size:100%;--ring-color:#1EB53A;--ring-start:0deg;--ring-duration:3.7s;--ring-direction:normal;
    position:absolute;top:50%;left:50%;width:var(--ring-size);height:var(--ring-size);
    border-radius:50%;transform:translate(-50%,-50%) rotate(var(--ring-start));
    background:conic-gradient(from 0deg,var(--ring-color) 0deg 108deg,transparent 108deg 360deg);
    -webkit-mask:radial-gradient(farthest-side,transparent calc(100% - 1mm),#000 calc(100% - 1mm));
    mask:radial-gradient(farthest-side,transparent calc(100% - 1mm),#000 calc(100% - 1mm));
    animation:primis-ring-rotation var(--ring-duration) linear infinite var(--ring-direction);
    will-change:transform;
}
.primis-ring-green{--ring-size:100%;--ring-color:#1EB53A;--ring-start:-18deg;--ring-duration:3.8s;--ring-direction:normal;}
.primis-ring-yellow{--ring-size:86.6%;--ring-color:#FCD116;--ring-start:76deg;--ring-duration:3.1s;--ring-direction:reverse;}
.primis-ring-black{--ring-size:73.2%;--ring-color:#000000;--ring-start:158deg;--ring-duration:4.4s;--ring-direction:normal;}
.primis-ring-blue{--ring-size:59.8%;--ring-color:#00A3DD;--ring-start:244deg;--ring-duration:2.8s;--ring-direction:reverse;}
@keyframes primis-ring-rotation{from{transform:translate(-50%,-50%) rotate(var(--ring-start));}to{transform:translate(-50%,-50%) rotate(calc(var(--ring-start) + 360deg));}}
@media(max-width:600px){
    .primis-four-ring-spinner{width:clamp(64px,22vw,86px);height:clamp(64px,22vw,86px);}
    .primis-loader-ring{-webkit-mask:radial-gradient(farthest-side,transparent calc(100% - max(2px, .8vw)),#000 calc(100% - max(2px, .8vw)));mask:radial-gradient(farthest-side,transparent calc(100% - max(2px, .8vw)),#000 calc(100% - max(2px, .8vw)));}
}
@media(prefers-reduced-motion:reduce){
    .primis-loading-overlay{transition:none;}
    .primis-loader-ring{animation:none;will-change:auto;}
}


/* PRIMIS idle-session warning */
.session-warning-modal{z-index:20000}.session-warning-modal .modal-backdrop{z-index:19990}.session-warning-modal .modal-dialog{max-width:440px;margin:1rem auto}.session-warning-card{border:0;border-radius:18px;padding:28px 30px 24px;text-align:center;box-shadow:0 22px 70px rgba(8,20,40,.28)}.session-clock-icon{width:68px;height:68px;margin:0 auto 18px;border-radius:50%;display:grid;place-items:center;background:rgba(22,139,145,.10);color:#168b91;font-size:28px}.session-warning-card h2{font-size:23px;font-weight:700;color:#17243a;margin:0 0 10px}.session-warning-text{color:#697586;margin:0 0 22px}.session-countdown{width:104px;height:104px;border:8px solid #e8edf3;border-top-color:#168b91;border-right-color:#168b91;border-radius:50%;margin:0 auto 28px;display:flex;flex-direction:column;align-items:center;justify-content:center}.session-countdown strong{font-size:26px;line-height:1.1;color:#17243a;font-variant-numeric:tabular-nums}.session-countdown span{font-size:10px;font-weight:800;color:#8792a2;margin-top:5px}.session-warning-divider{height:1px;background:#edf0f4;margin:0 0 28px}.session-stay-button,.session-logout-button{width:100%;border-radius:11px;padding:13px 16px;font-weight:700}.session-logout-button{margin-top:10px}.session-warning-modal .modal-content{background:transparent}.session-warning-modal .modal-body{padding:0}@media(max-width:480px){.session-warning-card{padding:24px 20px 20px;margin:0 12px}.session-warning-modal .modal-dialog{margin:.5rem auto}}

/* Session timeout warning: subtle fade-in with PRIMIS navy/teal colors. */
.session-warning-modal{z-index:20000;--bs-modal-transition:transform .25s ease-out}.session-warning-modal.show{animation:primisSessionFadeIn .28s ease-out both}.session-warning-modal .modal-backdrop{z-index:19990}.session-warning-modal .modal-dialog{max-width:440px;margin:1rem auto}.session-warning-modal .session-warning-card{border:0;border-radius:18px;padding:28px 30px 24px;text-align:center;background:#fff;box-shadow:0 22px 70px rgba(8,20,40,.28)}.session-warning-modal .session-clock-icon{width:68px;height:68px;margin:0 auto 18px;border-radius:50%;display:grid;place-items:center;background:rgba(22,139,145,.10);color:#168b91;font-size:28px}.session-warning-modal h2{font-size:23px;font-weight:700;color:#17243a;margin:0 0 10px}.session-warning-modal .session-warning-text{color:#697586;margin:0 0 22px}.session-warning-modal .session-countdown{width:104px;height:104px;border:8px solid #e8edf3;border-top-color:#168b91;border-right-color:#168b91;border-radius:50%;margin:0 auto 28px;display:flex;flex-direction:column;align-items:center;justify-content:center}.session-warning-modal .session-countdown strong{font-size:26px;line-height:1.1;color:#17243a;font-variant-numeric:tabular-nums}.session-warning-modal .session-countdown span{font-size:10px;font-weight:800;color:#8792a2;margin-top:5px}.session-warning-modal .session-warning-divider{height:1px;background:#edf0f4;margin:0 0 28px}.session-warning-modal .session-stay-button,.session-warning-modal .session-logout-button{width:100%;border-radius:11px;padding:13px 16px;font-weight:700}.session-warning-modal .session-logout-button{margin-top:10px}.session-warning-modal .modal-content{background:transparent;border:0}.session-warning-modal .modal-body{padding:0}@keyframes primisSessionFadeIn{from{opacity:0}to{opacity:1}}@media(max-width:480px){.session-warning-modal .session-warning-card{padding:24px 20px 20px;margin:0 12px}.session-warning-modal .modal-dialog{margin:.5rem auto}}@media(prefers-reduced-motion:reduce){.session-warning-modal.show{animation:none}.session-warning-modal *{transition:none!important}}


/* Create Ticket modal: keep the form body scrollable and footer reachable on phones. */
#createTicketModal .modal-dialog { width: calc(100% - 1rem); max-width: 600px; margin: .5rem auto; }
#createTicketModal .modal-content { display: flex; flex-direction: column; max-height: calc(100vh - 1rem); max-height: calc(100dvh - 1rem); overflow: hidden; }
#createTicketModal .modal-header,
#createTicketModal .modal-footer { flex: 0 0 auto; }
#createTicketForm { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; overflow: hidden; }
#createTicketModal .modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
#createTicketModal .modal-footer { padding-bottom: max(.75rem, env(safe-area-inset-bottom)); }
@media (max-width: 575.98px) {
  #createTicketModal .modal-dialog { width: calc(100% - .75rem); margin: .375rem auto; }
  #createTicketModal .modal-content { max-height: calc(100vh - .75rem); max-height: calc(100dvh - .75rem); border-radius: 12px; }
  #createTicketModal .modal-header { padding: .875rem 1rem; }
  #createTicketModal .modal-body { padding: .875rem 1rem; }
  #createTicketModal .modal-footer { padding: .75rem 1rem max(.75rem, env(safe-area-inset-bottom)); gap: .5rem; flex-wrap: nowrap; }
  #createTicketModal .modal-footer .btn { min-width: 0; flex: 1 1 50%; white-space: nowrap; }
}


/* User Management table refinements */
#userTable { margin-bottom: 0; border-collapse: separate; border-spacing: 0; }
/* Match the User Management footer exactly to the existing Tickets table header styling. */
#userTable thead th,
#userTable tfoot th {
  white-space: nowrap !important;
  font-weight: 600 !important;
  color: #6f7f96 !important;
  background: #f7f9fc !important;
  font-size: 10px !important;
  text-transform: uppercase !important;
  letter-spacing: .55px !important;
  padding: 11px 12px !important;
  border-color: #e1e8f2 !important;
  border-bottom: 1px solid #e1e8f2 !important;
}
#userTable tfoot th { border-top: 1px solid #e1e8f2 !important; border-bottom: 0 !important; }
#userTable .user-action-cell { position: relative; white-space: nowrap; }
.user-dropdown-floating { min-width: 190px; max-height: min(70vh, 420px); overflow-y: auto; box-shadow: 0 12px 32px rgba(16,29,53,.2); }
.user-table-responsive { overflow-x: auto; overflow-y: visible; }
#userTable .dropdown-item { white-space: nowrap; }
#userTablePages { flex-wrap: wrap; }
@media (max-width: 767.98px) { #userTable { min-width: 760px; } #userTableInfo { width: 100%; } }


/* Ensure user action-menu commands remain fully visible against Bootstrap/theme overrides. */
.user-action-menu { background:#ffffff !important; border:1px solid #d6deea !important; box-shadow:0 12px 28px rgba(16,29,53,.20) !important; opacity:1 !important; }
.user-action-menu .dropdown-item,
.user-action-menu form .dropdown-item { display:block; width:100%; padding:.55rem .9rem; color:#17243a !important; background:#ffffff !important; opacity:1 !important; font-size:.9rem; font-weight:500; text-align:left; text-decoration:none; border:0; }
.user-action-menu .dropdown-item:hover,
.user-action-menu form .dropdown-item:hover { color:#0b5260 !important; background:#e8f5f6 !important; }
.user-action-menu .dropdown-item:disabled,
.user-action-menu form .dropdown-item:disabled { color:#667085 !important; opacity:.75 !important; cursor:not-allowed; }
.user-action-menu li, .user-action-menu form { margin:0; padding:0; }

/* Accessible two-column role transfer control used by User Management. */
.role-transfer-grid{display:grid;grid-template-columns:minmax(0,1fr) 44px minmax(0,1fr);gap:12px;align-items:stretch}
.role-transfer-panel{min-width:0;border:1px solid #dbe3ee;border-radius:10px;background:#fff;padding:10px;box-shadow:0 2px 8px rgba(16,29,53,.04)}
.role-transfer-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;font-weight:700;font-size:.88rem;color:#17243a;margin-bottom:9px}
.role-transfer-search{margin-bottom:8px}
.role-transfer-list{height:220px;overflow:auto;border:1px solid #e1e8f2;border-radius:7px;padding:5px;background:#f8fafc}
.role-transfer-item{display:flex;align-items:center;gap:8px;width:100%;padding:8px 9px;margin:0 0 4px;border:1px solid transparent;border-radius:6px;background:#fff;color:#25344b;text-align:left;font-size:.86rem;line-height:1.35;cursor:pointer}
.role-transfer-item:last-child{margin-bottom:0}
.role-transfer-item:hover{border-color:#9bd8d5;background:#effafa}
.role-transfer-item.is-selected{border-color:#168b91;background:#e2f5f3;color:#104e54;box-shadow:inset 3px 0 #168b91}
.role-transfer-item:focus-visible{outline:2px solid #168b91;outline-offset:1px}
.role-transfer-check{display:inline-flex;align-items:center;justify-content:center;flex:0 0 18px;width:18px;height:18px;border:1px solid #c7d1df;border-radius:4px;background:#fff;color:transparent;font-size:11px}
.role-transfer-item.is-selected .role-transfer-check{border-color:#168b91;background:#168b91;color:#fff}
.role-transfer-name{overflow-wrap:anywhere}
.role-transfer-controls{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px}
.role-transfer-controls .btn{width:38px;height:38px;padding:0;display:inline-flex;align-items:center;justify-content:center}
.role-transfer-controls .btn:disabled{opacity:.4}
.role-transfer-list:empty::after{content:'No roles';display:block;padding:12px 8px;color:#8290a4;text-align:center;font-size:.82rem}
.user-dropdown-floating{max-height:min(70vh,420px);overflow-y:auto;overscroll-behavior:contain}
@media(max-width:575.98px){.role-transfer-grid{grid-template-columns:minmax(0,1fr);gap:8px}.role-transfer-controls{flex-direction:row}.role-transfer-controls #moveRoleRight .fa-chevron-right{transform:rotate(90deg)}.role-transfer-controls #moveRoleLeft .fa-chevron-left{transform:rotate(90deg)}.role-transfer-list{height:160px}}

/* User Management action menus: compact viewport-bound menus, never stretch across the page. */
.user-action-menu.user-dropdown-floating {
  width: max-content !important;
  min-width: 190px !important;
  max-width: min(240px, calc(100vw - 16px)) !important;
  box-sizing: border-box !important;
  white-space: normal;
  overflow-wrap: anywhere;
}
.user-action-menu.user-dropdown-floating form,
.user-action-menu.user-dropdown-floating li,
.user-action-menu.user-dropdown-floating .dropdown-item {
  max-width: 100%;
}

/* Keep Update User usable on short screens and mobile devices. */
#userModal .modal-dialog { width: calc(100% - 1rem); max-width: 1100px; margin: .5rem auto; }
#userModal .modal-content { max-height: calc(100dvh - 1rem); }
#userModal .modal-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
#userModal .role-transfer-grid { grid-template-columns: minmax(0,1fr) 42px minmax(0,1fr); gap: 10px; }
#userModal .role-transfer-list { height: clamp(125px, 24vh, 190px); min-height: 125px; }
#userModal .role-transfer-panel { padding: 8px; }
#userModal .role-transfer-item { padding: 6px 8px; margin-bottom: 3px; }
#userModal .role-transfer-controls .btn { width: 36px; height: 36px; }
@media (max-width: 767.98px) {
  #userModal .modal-dialog { width: calc(100% - .5rem); margin: .25rem auto; }
  #userModal .modal-content { max-height: calc(100dvh - .5rem); }
  #userModal .role-transfer-grid { grid-template-columns: minmax(0,1fr); gap: 8px; }
  #userModal .role-transfer-controls { flex-direction: row; justify-content: center; }
  #userModal .role-transfer-list { height: 135px; min-height: 110px; }
}


/* Update User modal: narrower layout with reliable vertical scrolling on short viewports. */
#userModal .user-modal-dialog {
  width: calc(100% - 2rem);
  max-width: 850px;
  margin: .5rem auto;
}
#userModal .modal-content {
  max-height: calc(100vh - 1rem);
  max-height: calc(100dvh - 1rem);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
#userModal .modal-content > form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
#userModal .modal-header,
#userModal .modal-footer {
  flex: 0 0 auto;
}
#userModal .modal-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
@media (max-width: 767.98px) {
  #userModal .user-modal-dialog {
    width: calc(100% - .75rem);
    max-width: none;
    margin: .375rem auto;
  }
  #userModal .modal-content {
    max-height: calc(100vh - .75rem);
    max-height: calc(100dvh - .75rem);
  }
}

/* Employees modals: identical sizing to the user modal */
/* Update User modal: narrower layout with reliable vertical scrolling on short viewports. */
#empModal .user-modal-dialog {
  width: calc(100% - 2rem);
  max-width: min(1140px, calc(100vw - 2rem));   /* same width as Profile > Update my information */
  margin: .5rem auto;
}
#empModal .modal-content {
  max-height: calc(100vh - 1rem);
  max-height: calc(100dvh - 1rem);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
#empModal .modal-content > form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
#empModal .modal-header,
#empModal .modal-footer {
  flex: 0 0 auto;
}
#empModal .modal-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
/* Employee form: small group headings (Personal details / Contact / Post and place of work) */
/* Passport photo + signature, centred at the top of the employee window; also the Replace preview */
#empModal .emp-media { display: flex; justify-content: center; align-items: flex-start; flex-wrap: wrap; gap: 1.5rem;
  padding-bottom: 1rem; margin-bottom: 1rem; border-bottom: 1px solid #e3e9f2; }
#empModal .emp-media.d-none { display: none !important; }
.emp-media-tile { text-align: center; }
.emp-media-label { font-size: .72rem; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: #64748b; margin-bottom: .35rem; }
.emp-media-frame { display: flex; align-items: center; justify-content: center; min-width: 120px; min-height: 140px; max-width: 280px;
  padding: 6px; background: #fff; border: 1px solid #dbe2ec; border-radius: 8px; box-shadow: 0 1px 3px rgba(15,23,42,.06); }
.emp-media-photo { width: 110px; height: 130px; object-fit: cover; object-position: center 25%; border-radius: 6px; }
.emp-media-sig, #empFilePreview { max-width: 260px; max-height: 120px; object-fit: contain; }
.emp-media-empty { display: flex; flex-direction: column; align-items: center; gap: .3rem; color: #94a3b8; font-size: .8rem; }
.emp-media-empty i { font-size: 2.2rem; }
.emp-media-empty[hidden], .emp-media-frame img[hidden] { display: none !important; }
#empFileCurrent .emp-media-frame { width: max-content; }
[data-bs-theme="dark"] #empModal .emp-media { border-color: #2e384d; }
[data-bs-theme="dark"] .emp-media-frame { border-color: #2e384d; background: #fff; }
@media (max-width: 767.98px) {
  #empModal .user-modal-dialog {
    width: calc(100% - .75rem);
    max-width: none;
    margin: .375rem auto;
  }
  #empModal .modal-content {
    max-height: calc(100vh - .75rem);
    max-height: calc(100dvh - .75rem);
  }
}

/* Roles & Permissions table intentionally mirrors the User Management datatable. */
#roleTable { margin-bottom: 0; border-collapse: separate; border-spacing: 0; }
#roleTable thead th,
#roleTable tfoot th {
  white-space: nowrap !important;
  font-weight: 600 !important;
  color: #6f7f96 !important;
  background: #f7f9fc !important;
  font-size: 10px !important;
  text-transform: uppercase !important;
  letter-spacing: .55px !important;
  padding: 11px 12px !important;
  border-color: #e1e8f2 !important;
  border-bottom: 1px solid #e1e8f2 !important;
}
#roleTable tfoot th { border-top: 1px solid #e1e8f2 !important; border-bottom: 0 !important; }
#roleTable .role-action-cell { white-space: nowrap; width: 1%; }
#roleTable .role-action-toggle { width: 34px; height: 32px; display: inline-flex; align-items: center; justify-content: center; }
#roleTablePages { flex-wrap: wrap; }
@media (max-width: 767.98px) { #roleTable { min-width: 680px; } #roleTableInfo { width: 100%; } }


/* =========================================================
   SHARED PRIMIS DATATABLE STANDARD
   Applied consistently across Help Desk and Settings tables.
========================================================= */
.primis-data-table,
#ticketsTable,
#userTable,
#roleTable {
    width: 100%;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    background: #fff;
}

.primis-data-table thead th,
.primis-data-table tfoot th,
#ticketsTable thead th,
#ticketsTable tfoot th,
#userTable thead th,
#userTable tfoot th,
#roleTable thead th,
#roleTable tfoot th,
.table-responsive table thead th,
.table-responsive table tfoot th {
    background: #f7f9fc !important;
    color: #6f7f96 !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: .55px;
    padding: 11px 12px !important;
    border-bottom: 1px solid #e1e8f2 !important;
    white-space: nowrap;
    vertical-align: middle;
}

.primis-data-table tfoot th,
#ticketsTable tfoot th,
#userTable tfoot th,
#roleTable tfoot th,
.table-responsive table tfoot th {
    border-top: 1px solid #e1e8f2 !important;
    border-bottom: 0 !important;
}

.primis-data-table tbody td,
#ticketsTable tbody td,
#userTable tbody td,
#roleTable tbody td,
.table-responsive table tbody td {
    border-bottom: 1px solid #edf1f6;
    color: #35465f;
    vertical-align: middle;
}

.primis-data-table tbody tr:hover,
#ticketsTable tbody tr:hover,
#userTable tbody tr:hover,
#roleTable tbody tr:hover {
    background: #f8fbff;
}

/* Keep the required empty-state message consistently visible in red. */
.primis-empty-state,
.primis-empty-state td,
td.primis-empty-state,
.empty-state,
.user-no-data td,
.role-no-data td {
    color: #dc3545 !important;
    font-weight: 600 !important;
    text-align: center !important;
    padding: 14px 12px !important;
    line-height: 1.4;
    background: #fff !important;
}

.user-no-data:hover,
.role-no-data:hover,
tr.no-data-row:hover {
    background: #fff !important;
}


/* Unified data-table presentation for Settings tables. */
.unified-dt-wrapper { background:#fff; border:1px solid var(--hd-border); border-radius:16px; overflow:hidden; box-shadow:var(--hd-shadow); }
.unified-dt-wrapper .dt-toolbar { padding:16px 18px; border-bottom:1px solid var(--hd-border); background:#fff; }
.unified-dt-wrapper .dt-footer { padding:14px 18px; border-top:1px solid var(--hd-border); background:#fff; color:var(--hd-muted); }
.unified-dt-wrapper .table-responsive { margin:0; }
.unified-dt-wrapper table { margin-bottom:0; width:100%; }
.unified-dt-wrapper .primis-data-table thead th,
.unified-dt-wrapper .primis-data-table tfoot th { background:#f5f8fc; color:#526985; font-size:11px; font-weight:700; letter-spacing:.045em; text-transform:uppercase; padding:14px 15px; border-bottom:1px solid #dfe7f2; white-space:nowrap; }
.unified-dt-wrapper .primis-data-table tbody td { padding:13px 15px; border-bottom:1px solid #e7edf5; vertical-align:middle; }
.unified-dt-wrapper .primis-empty-state { color:#dc3545!important; text-align:center; font-weight:600; padding:22px!important; }
.unified-dt-wrapper .dt-page { min-width:36px; padding:7px 10px; border:1px solid #dce5f1; border-radius:8px; background:#fff; color:#526985; }
.unified-dt-wrapper .dt-page.active { background:#1769e0; border-color:#1769e0; color:#fff; }
.unified-dt-wrapper .dt-page:disabled { opacity:.45; cursor:not-allowed; }
.unified-dt-wrapper .dt-info,.unified-dt-wrapper .dt-length { font-size:13px; color:#72809a; }
.unified-dt-wrapper .dt-toolbar .form-control,.unified-dt-wrapper .dt-toolbar .form-select { min-height:38px; }
@media(max-width:767.98px){.unified-dt-wrapper .dt-toolbar,.unified-dt-wrapper .dt-footer{align-items:stretch!important}.unified-dt-wrapper .dt-footer{flex-direction:column}.unified-dt-wrapper .dt-pagination{flex-wrap:wrap}}


/* One footer layout for every PRIMIS datatable: record count left, Previous/page/Next centered, page-size right. */
.dt-wrapper .dt-footer, .unified-dt-wrapper .dt-footer {
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
  align-items:center;
  gap:12px;
  padding:14px 18px;
  min-height:64px;
  background:#fff;
  border-top:1px solid var(--hd-border);
}
.dt-wrapper .dt-info, .unified-dt-wrapper .dt-info { grid-column:1; grid-row:1; justify-self:start; text-align:left; color:#72809a; font-size:13px; }
.dt-wrapper .dt-pagination, .unified-dt-wrapper .dt-pagination { grid-column:2; grid-row:1; justify-self:center; display:flex; align-items:center; gap:0; }
.dt-wrapper .dt-length, .unified-dt-wrapper .dt-length { grid-column:3; grid-row:1; justify-self:end; text-align:right; white-space:nowrap; color:#72809a; font-size:13px; }
.dt-wrapper .dt-page, .unified-dt-wrapper .dt-page { min-width:36px; height:36px; padding:6px 10px; border:1px solid #d8e1ec; border-radius:0; background:#fff; color:#526985; font-size:13px; }
.dt-wrapper .dt-page:first-child, .unified-dt-wrapper .dt-page:first-child { border-radius:10px 0 0 10px; }
.dt-wrapper .dt-page:last-child, .unified-dt-wrapper .dt-page:last-child { border-radius:0 10px 10px 0; }
.dt-wrapper .dt-page.active, .unified-dt-wrapper .dt-page.active { background:#168b91; border-color:#168b91; color:#fff; }
.dt-wrapper .dt-page:disabled, .unified-dt-wrapper .dt-page:disabled { opacity:.5; cursor:not-allowed; }
@media(max-width:767.98px) {
 .dt-wrapper .dt-footer, .unified-dt-wrapper .dt-footer { grid-template-columns:1fr; justify-items:stretch; }
 .dt-wrapper .dt-info, .unified-dt-wrapper .dt-info, .dt-wrapper .dt-pagination, .unified-dt-wrapper .dt-pagination, .dt-wrapper .dt-length, .unified-dt-wrapper .dt-length { grid-column:1; justify-self:center; text-align:center; }
 .dt-wrapper .dt-info, .unified-dt-wrapper .dt-info { grid-row:1; }
 .dt-wrapper .dt-pagination, .unified-dt-wrapper .dt-pagination { grid-row:2; }
 .dt-wrapper .dt-length, .unified-dt-wrapper .dt-length { grid-row:3; }
}


/* Settings pages follow the All Help Desk Tickets page layout: heading/actions outside, table tools and table inside one frame. */
.settings-section-heading { margin: 0 0 1rem; }
.settings-section-heading h2 { margin: 0 0 .2rem; font-size: 1.35rem; font-weight: 600; color: #101d35; }
.settings-table-frame { background: #fff; border: 1px solid #dce5f0; border-radius: 1rem; padding: 1rem; box-shadow: 0 8px 24px rgba(16,29,53,.045); min-width: 0; }
.settings-table-frame > .table-responsive { margin-bottom: 0; }
.settings-table-frame .primis-data-table { margin-bottom: 0; }
.settings-inner-heading { margin: 0 0 .75rem; color: #101d35; font-size: 1rem; font-weight: 600; }
.settings-policy-note { padding-top: .75rem; border-top: 1px solid #e1e8f2; }
@media (max-width: 767.98px) { .settings-section-heading { align-items: flex-start !important; } .settings-section-heading .page-actions { width: 100%; } .settings-section-heading .page-actions .btn { width: 100%; } .settings-table-frame { padding: .65rem; border-radius: .75rem; } }


/* Unified datatable panels: headings and primary actions are inside the table frame. */
.settings-frame-heading{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap;margin:0 0 1rem;padding:0 0 .9rem;border-bottom:1px solid #dce5f0;}
.settings-frame-heading h2{font-size:1.25rem;font-weight:600;line-height:1.35;color:#101d35;margin:0 0 .2rem;}
.settings-frame-heading .small,.settings-frame-heading .text-muted{font-size:.9rem;color:#64748b!important;font-weight:400;}
.settings-table-frame,.tickets-table-frame{font-family:inherit;font-size:.875rem;color:#17345b;background:#fff;border:1px solid #dce5f0;border-radius:1rem;padding:1rem;box-shadow:0 8px 24px rgba(16,29,53,.045);min-width:0;}
.settings-table-frame .primis-data-table,.tickets-table-frame .primis-data-table{font-family:inherit;font-size:.875rem;color:#17345b;margin-bottom:0;width:100%;}
.settings-table-frame .primis-data-table thead th,.settings-table-frame .primis-data-table tfoot th,.tickets-table-frame .primis-data-table thead th,.tickets-table-frame .primis-data-table tfoot th{background:#f5f8fc;color:#58708e;font-size:.72rem;font-weight:600;text-transform:uppercase;letter-spacing:.025em;border-color:#dce5f0;padding:.8rem .75rem;white-space:nowrap;}
.settings-table-frame .primis-data-table tbody td,.tickets-table-frame .primis-data-table tbody td{font-family:inherit;font-size:.875rem;font-weight:400;color:#17345b;border-color:#e6edf5;padding:.85rem .75rem;vertical-align:middle;}
.settings-table-frame .primis-data-table .primis-empty-state,.tickets-table-frame .primis-data-table .primis-empty-state{color:#dc3545!important;text-align:center;font-weight:600;padding:1.25rem;}
.tickets-table-frame .section-heading{margin-bottom:1rem;}
@media(max-width:767.98px){.settings-table-frame,.tickets-table-frame{padding:.75rem;border-radius:.75rem}.settings-frame-heading{align-items:flex-start}.settings-frame-heading .page-actions{width:100%}.settings-frame-heading .page-actions .btn{max-width:100%}}


/* User Management refinements: compact neutral role badges and centered title abbreviation. */
.user-assigned-roles { white-space: normal; min-width: 125px; }
.user-role-badge { display: inline-block; max-width: 100%; margin: 1px 3px 2px 0; padding: .28rem .48rem; border-radius: .35rem; background-color: #6c757d !important; color: #fff !important; font-size: .72rem; font-weight: 600; line-height: 1.15; white-space: normal; overflow-wrap: anywhere; }
.profile-dropdown-heading.profile-dropdown-role-only { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 38px; }
.profile-dropdown-heading.profile-dropdown-role-only span { display: block; width: 100%; text-align: center; }

/* TasksMIS Targets table fixes: single table controller, unclipped action menus, frame-contained heading. */
.targets-table-frame .settings-frame-heading{margin-bottom:1rem;padding-bottom:.75rem;border-bottom:1px solid #e6edf5;}
.targets-table-frame .user-table-responsive{overflow:visible !important;}
.targets-table-frame .user-action-cell{position:relative;white-space:nowrap;}
.targets-table-frame .user-action-dropdown{position:static;}
.targets-table-frame .user-action-menu{z-index:1090;box-shadow:0 12px 28px rgba(16,29,53,.18);border:1px solid #d6deea;}
.targets-table-frame .table-responsive{overflow:visible !important;}
@media(max-width:767.98px){.targets-table-frame .settings-frame-heading .page-actions{width:100%;}.targets-table-frame .settings-frame-heading .page-actions .btn{width:100%;}}

/* Responsive data tables across Settings and Tasks Management. Keep the complete row available via horizontal scrolling on narrow screens. */
.settings-table-frame > .table-responsive,
.settings-table-frame > .user-table-responsive,
.settings-table-frame .table-responsive,
.settings-table-frame .user-table-responsive,
.tasks-management-frame .table-responsive,
.tasks-management-frame .user-table-responsive {
  display:block;
  width:100%;
  max-width:100%;
  overflow-x:auto !important;
  overflow-y:hidden !important;
  -webkit-overflow-scrolling:touch;
  scrollbar-gutter:stable;
}
.settings-table-frame .primis-data-table,
.tasks-management-frame .primis-data-table { width:100%; }
@media (max-width: 767.98px) {
  .settings-table-frame .primis-data-table,
  .tasks-management-frame .primis-data-table { min-width:680px; }
  .targets-table-frame .primis-data-table { min-width:760px; }
  .targets-table-frame .user-table-responsive,
  .targets-table-frame .table-responsive { overflow-x:auto !important; overflow-y:hidden !important; }
}

/* Keep Add New Target and Add New Activity dialogs exactly the same width.
   Both use the same desktop max-width and the same viewport-safe sizing on mobile. */
#targetCreateModal .target-create-dialog,
#targetEditModal .modal-dialog,
#activityCreateModal .activity-modal-dialog { width:calc(100% - 1rem); max-width:850px; max-height:calc(100dvh - 1rem); margin:.5rem auto; }
#targetCreateModal .target-modal-content,
#targetEditModal .modal-content,
#activityCreateModal .activity-modal-content { display:flex; flex-direction:column; max-height:calc(100dvh - 1rem); overflow:hidden; }
#targetCreateModal .target-modal-form { display:flex; flex:1 1 auto; flex-direction:column; min-height:0; overflow:hidden; }
#targetCreateModal .modal-header,
#targetEditModal .modal-header { flex:0 0 auto; }
#targetCreateModal .modal-body,
#targetEditModal .modal-body { flex:1 1 auto; min-height:0; overflow-y:auto; overscroll-behavior:contain; }
#targetCreateModal .modal-footer,
#targetEditModal .modal-footer { flex:0 0 auto; padding-bottom:max(.75rem, env(safe-area-inset-bottom)); background:#fff; border-top:1px solid #e5eaf1; }
@media(max-width:575.98px) {
  #targetCreateModal .target-create-dialog,
  #targetEditModal .modal-dialog,
  #activityCreateModal .activity-modal-dialog { width:calc(100% - .5rem); max-width:none; max-height:calc(100dvh - .5rem); margin:.25rem auto; }
  #targetCreateModal .target-modal-content,
  #targetEditModal .modal-content,
  #activityCreateModal .activity-modal-content { max-height:calc(100dvh - .5rem); }
  #targetCreateModal .modal-header,
  #targetEditModal .modal-header { padding:.75rem; }
  #targetCreateModal .modal-body,
  #targetEditModal .modal-body { padding:.75rem; }
  #targetCreateModal .modal-footer,
  #targetEditModal .modal-footer { padding:.65rem .75rem max(.65rem, env(safe-area-inset-bottom)); gap:.5rem; }
  #targetCreateModal .modal-footer .btn,
  #targetEditModal .modal-footer .btn { flex:1 1 auto; }
  #targetCreateModal .target-entry-row > [class*="col-"] { width:100%; }
  #targetCreateModal .target-entry-row .target-remove-row { width:100%; }
}


/* Full-width alignment for Settings and Tasks Management tables. Keep sidebar untouched.
   The main content gets equal 44px gutters; nested page wrappers must not add a second gutter. */
.management-wide-page main.page-content {
  padding-left: 44px;
  padding-right: 44px;
  min-width: 0;
}
.management-wide-page main.page-content > .page-content {
  padding-left: 0;
  padding-right: 0;
  min-width: 0;
}
.management-wide-page .settings-table-frame,
.management-wide-page .tasks-management-frame,
.management-wide-page .targets-table-frame,
.management-wide-page .activity-table-frame {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}
@media (max-width: 767.98px) {
  .management-wide-page main.page-content {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* Final alignment: Settings and Tasks Management use the same content gutter as Tickets.
   The sidebar and topbar are intentionally untouched. Nested page wrappers add no second gutter. */
.management-wide-page main.page-content {
  padding-left: 28px !important;
  padding-right: 28px !important;
  min-width: 0;
  box-sizing: border-box;
}
.management-wide-page main.page-content > .page-content {
  width: 100%;
  max-width: none;
  margin: 0;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-sizing: border-box;
}
.management-wide-page main.page-content > .page-content > .settings-table-frame,
.management-wide-page main.page-content > .page-content > .tasks-management-frame,
.management-wide-page main.page-content > .page-content > .targets-table-frame,
.management-wide-page main.page-content > .page-content > .activity-table-frame,
.management-wide-page main.page-content > .settings-table-frame,
.management-wide-page main.page-content > .tasks-management-frame,
.management-wide-page main.page-content > .targets-table-frame,
.management-wide-page main.page-content > .activity-table-frame {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box;
}
@media (max-width: 767.98px) {
  .management-wide-page main.page-content {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}

/* Automatic: every page whose content holds a management frame gets the same full-width layout as above,
   whatever its title or file name, so a new page never falls back to the narrower double gutter.
   (The title list in header.php that sets .management-wide-page is only a fallback for browsers without :has().) */
body.app-page:has(main.page-content :is(.settings-table-frame, .tasks-management-frame, .targets-table-frame, .activity-table-frame)) main.page-content {
  padding-left: 28px !important;
  padding-right: 28px !important;
  min-width: 0;
  box-sizing: border-box;
}
body.app-page:has(main.page-content :is(.settings-table-frame, .tasks-management-frame, .targets-table-frame, .activity-table-frame)) main.page-content > .page-content {
  width: 100%;
  max-width: none;
  margin: 0;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-sizing: border-box;
}
body.app-page:has(main.page-content :is(.settings-table-frame, .tasks-management-frame, .targets-table-frame, .activity-table-frame)) main.page-content :is(.page-content > .settings-table-frame, .page-content > .tasks-management-frame, .page-content > .targets-table-frame, .page-content > .activity-table-frame),
body.app-page:has(main.page-content :is(.settings-table-frame, .tasks-management-frame, .targets-table-frame, .activity-table-frame)) main.page-content > :is(.settings-table-frame, .tasks-management-frame, .targets-table-frame, .activity-table-frame) {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box;
}
@media (max-width: 767.98px) {
  body.app-page:has(main.page-content :is(.settings-table-frame, .tasks-management-frame, .targets-table-frame, .activity-table-frame)) main.page-content {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}

/* =========================================================
   UNIFIED SUB-SUBMENU DESIGN — use Tickets submenu as the standard
   Applied globally so every third-level navigation item has the
   same spacing, icon alignment, hover, and active appearance.
========================================================= */
.sidebar-nav .sidebar-submenu-level2 {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    min-height: 32px;
    padding: 8px 10px 8px 62px !important;
    border-radius: 8px !important;
    color: #b9cbe0 !important;
    font-size: 10px !important;
    font-weight: 400 !important;
    line-height: 1.35;
    text-decoration: none !important;
    box-shadow: none;
    transition: background-color .16s ease, color .16s ease;
}
.sidebar-nav .sidebar-submenu-level2 > .nav-icon {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 18px;
    width: 18px !important;
    min-width: 18px;
    margin: 0 !important;
    font-size: 9px !important;
    color: #90a5bd;
}
.sidebar-nav .sidebar-submenu-level2 > span:nth-child(2) {
    flex: 1 1 auto;
    min-width: 0;
}
.sidebar-nav .sidebar-submenu-level2:hover {
    color: #fff !important;
    background: rgba(255,255,255,.09) !important;
}
.sidebar-nav .sidebar-submenu-level2:hover > .nav-icon {
    color: #58d3c5 !important;
}
.sidebar-nav .sidebar-submenu-level2.active,
.sidebar-nav .sidebar-submenu-level2.active:hover {
    color: #fff !important;
    background: rgba(22,139,145,.30) !important;
    font-weight: 600 !important;
    box-shadow: inset 3px 0 #58d3c5 !important;
}
.sidebar-nav .sidebar-submenu-level2.active > .nav-icon {
    color: #58d3c5 !important;
}
.sidebar-nav .sidebar-submenu-level2 .sidebar-count-badge {
    flex: 0 0 auto;
    margin-left: auto;
}
@media (max-width: 991.98px) {
    .sidebar-nav .sidebar-submenu-level2 {
        padding-left: 48px !important;
    }
}

/* PRIMIS premium logout confirmation modal */
.primis-logout-modal{z-index:20010;--logout-navy:#101d35;--logout-navy-soft:#172b4d;--logout-teal:#168b91;--logout-mint:#58d3c5;}
.primis-logout-modal .modal-dialog{max-width:470px;margin:1rem auto;padding:0 10px;}
.primis-logout-modal .modal-content{position:relative;overflow:hidden;border:1px solid rgba(218,228,238,.95);border-radius:22px;background:#fff;box-shadow:0 28px 90px rgba(8,22,44,.30);}
.primis-logout-modal .logout-modal-topbar{position:relative;display:flex;align-items:center;gap:12px;min-height:92px;padding:19px 22px;color:#fff;background:linear-gradient(118deg,#101d35 0%,#172b4d 72%,#164c5a 100%);}
.primis-logout-modal .logout-modal-topbar:after{position:absolute;right:-35px;top:-80px;width:190px;height:190px;border:1px solid rgba(88,211,197,.20);border-radius:50%;content:"";box-shadow:0 0 0 22px rgba(88,211,197,.035),0 0 0 46px rgba(88,211,197,.025);pointer-events:none;}
.primis-logout-modal .logout-brand-mark{position:relative;z-index:1;display:flex;align-items:center;justify-content:center;width:47px;height:47px;flex:0 0 47px;border:1px solid rgba(88,211,197,.45);border-radius:15px;background:rgba(88,211,197,.12);color:#8ce9df;font-size:21px;}
.primis-logout-modal .logout-brand-mark span{position:absolute;right:8px;bottom:8px;width:7px;height:7px;border:1px solid #142b43;border-radius:50%;background:#58d3c5;}
.primis-logout-modal .logout-brand-copy{position:relative;z-index:1;display:flex;flex:1;flex-direction:column;gap:6px;min-width:0;}
.primis-logout-modal .logout-eyebrow{font-size:11px;font-weight:800;letter-spacing:1.7px;color:#fff;}
.primis-logout-modal .logout-session-label{display:flex;align-items:center;gap:6px;color:#b9c9dc;font-size:9px;font-weight:700;letter-spacing:1.2px;}
.primis-logout-modal .logout-session-label i{font-size:6px;color:#58d3c5;}
.primis-logout-modal .logout-modal-close{position:relative;z-index:2;display:flex;align-items:center;justify-content:center;width:34px;height:34px;flex:0 0 34px;border:1px solid rgba(255,255,255,.18);border-radius:10px;background:rgba(255,255,255,.07);color:#dce7f2;transition:background .18s ease,border-color .18s ease;}
.primis-logout-modal .logout-modal-close:hover{border-color:rgba(88,211,197,.55);background:rgba(88,211,197,.13);color:#fff;}
.primis-logout-modal .modal-body{padding:29px 30px 27px;text-align:center;}
.primis-logout-modal .logout-modal-icon-wrap{position:relative;display:flex;align-items:center;justify-content:center;width:100px;height:92px;margin:0 auto 14px;}
.primis-logout-modal .logout-modal-icon{position:relative;z-index:2;display:flex;align-items:center;justify-content:center;width:66px;height:66px;border:1px solid #c9eeea;border-radius:21px;background:linear-gradient(145deg,#f0fbf9,#dff5f1);box-shadow:0 8px 20px rgba(22,139,145,.12);color:#168b91;font-size:27px;transform:rotate(-5deg);}
.primis-logout-modal .logout-icon-orbit{position:absolute;display:block;border:1px solid rgba(22,139,145,.18);border-radius:50%;}
.primis-logout-modal .logout-icon-orbit-one{inset:5px 9px 4px;transform:rotate(24deg);}
.primis-logout-modal .logout-icon-orbit-two{inset:12px 1px 11px;transform:rotate(-25deg);border-style:dashed;border-color:rgba(22,139,145,.22);}
.primis-logout-modal h2{margin:0 0 10px;color:#101d35;font-size:24px;font-weight:800;letter-spacing:-.65px;}
.primis-logout-modal #logoutConfirmDescription{max-width:340px;margin:0 auto 19px;color:#657286;font-size:13px;line-height:1.75;}
.primis-logout-modal .logout-session-note{display:flex;align-items:center;justify-content:center;gap:8px;max-width:320px;margin:0 auto 24px;padding:10px 12px;border:1px solid #e7edf3;border-radius:11px;background:#f8fafc;color:#5d6d80;font-size:11px;font-weight:600;}
.primis-logout-modal .logout-session-note i{color:#168b91;font-size:13px;}
.primis-logout-modal .logout-modal-actions{display:flex;justify-content:center;gap:11px;}
.primis-logout-modal .logout-modal-actions .btn{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-width:0;min-height:46px;padding:11px 16px;border-radius:11px;font-size:12px;font-weight:750;text-decoration:none;transition:transform .16s ease,background .16s ease,box-shadow .16s ease;}
.primis-logout-modal .logout-modal-actions .btn:hover{transform:translateY(-1px);}
.primis-logout-modal .logout-cancel-btn{flex:1;border:1px solid #dce4ed;background:#fff;color:#34445a;}
.primis-logout-modal .logout-cancel-btn:hover{border-color:#c6d2df;background:#f6f8fb;color:#101d35;}
.primis-logout-modal .logout-confirm-btn{flex:1;border:1px solid #168b91;background:linear-gradient(115deg,#168b91,#117b83);box-shadow:0 6px 15px rgba(22,139,145,.18);color:#fff;}
.primis-logout-modal .logout-confirm-btn:hover{border-color:#106e75;background:linear-gradient(115deg,#117b83,#106e75);box-shadow:0 8px 18px rgba(22,139,145,.25);color:#fff;}
.primis-logout-modal .logout-confirm-btn i{font-size:11px;transition:transform .16s ease;}
.primis-logout-modal .logout-confirm-btn:hover i{transform:translateX(2px);}
.primis-logout-modal .logout-modal-actions .btn:focus-visible{outline:3px solid rgba(22,139,145,.25);outline-offset:3px;}
.primis-logout-modal .logout-modal-footer{display:flex;align-items:center;justify-content:center;gap:7px;padding:12px 16px;border-top:1px solid #edf1f5;background:#fbfcfd;color:#8a96a6;font-size:10px;font-weight:600;letter-spacing:.15px;}
.primis-logout-modal .logout-modal-footer i{color:#168b91;font-size:11px;}
@media(max-width:480px){.primis-logout-modal .modal-dialog{margin:.65rem auto;padding:0 9px;}.primis-logout-modal .logout-modal-topbar{min-height:82px;padding:15px 16px;}.primis-logout-modal .modal-body{padding:23px 19px 22px;}.primis-logout-modal h2{font-size:21px;}.primis-logout-modal .logout-modal-actions{flex-direction:column-reverse;}.primis-logout-modal .logout-modal-actions .btn{width:100%;}.primis-logout-modal .logout-modal-icon-wrap{height:83px;margin-bottom:11px;}}



/* Idle timeout warning: visually aligned with the PRIMIS logout confirmation modal. */
.session-warning-modal{z-index:20020;--bs-modal-transition:transform .25s ease-out;}
.session-warning-modal .modal-dialog{max-width:470px;margin:1rem auto;padding:0 10px;}
.session-warning-modal .modal-content{position:relative;overflow:hidden;border:1px solid rgba(218,228,238,.95);border-radius:22px;background:#fff;box-shadow:0 28px 90px rgba(8,22,44,.30);}
.session-warning-modal .session-warning-topbar{min-height:92px;}
.session-warning-modal .session-warning-status{position:relative;z-index:1;display:flex;align-items:center;justify-content:center;width:36px;height:36px;flex:0 0 36px;border:1px solid rgba(88,211,197,.35);border-radius:11px;background:rgba(88,211,197,.10);color:#8ce9df;font-size:16px;}
.session-warning-modal .modal-body{padding:0;}
.session-warning-modal .session-warning-card{padding:25px 30px 27px;border:0;border-radius:0;background:#fff;text-align:center;box-shadow:none;}
.session-warning-modal .session-warning-icon-wrap{height:88px;margin:0 auto 10px;}
.session-warning-modal .session-warning-icon{transform:rotate(-5deg);}
.session-warning-modal h2{margin:0 0 10px;color:#101d35;font-size:24px;font-weight:800;letter-spacing:-.65px;}
.session-warning-modal .session-warning-text{max-width:355px;margin:0 auto 20px;color:#657286;font-size:13px;line-height:1.75;}
.session-warning-modal .session-countdown-panel{max-width:300px;margin:0 auto 18px;padding:15px 20px 17px;border:1px solid #e6edf3;border-radius:16px;background:linear-gradient(180deg,#fbfdfd,#f6fafb);}
.session-warning-modal .session-countdown-label{display:flex;align-items:center;justify-content:center;gap:7px;margin-bottom:8px;color:#657286;font-size:10px;font-weight:800;letter-spacing:1.3px;}
.session-warning-modal .session-countdown-label i{color:#168b91;font-size:12px;}
.session-warning-modal .session-countdown{width:auto;height:auto;margin:0 auto 11px;border:0;border-radius:0;display:flex;flex-direction:row;align-items:baseline;justify-content:center;gap:8px;}
.session-warning-modal .session-countdown strong{color:#101d35;font-size:35px;line-height:1.15;font-weight:800;letter-spacing:1px;font-variant-numeric:tabular-nums;}
.session-warning-modal .session-countdown span{margin:0;color:#8a96a6;font-size:9px;font-weight:800;letter-spacing:1px;}
.session-warning-modal .session-countdown-track{height:4px;overflow:hidden;border-radius:99px;background:#e2ecef;}
.session-warning-modal .session-countdown-track span{display:block;width:100%;height:100%;border-radius:99px;background:linear-gradient(90deg,#58d3c5,#168b91);transform-origin:left center;}
.session-warning-modal .logout-session-note{max-width:355px;margin:0 auto 20px;padding:10px 12px;border:1px solid #e7edf3;border-radius:11px;background:#f8fafc;color:#5d6d80;font-size:11px;font-weight:600;line-height:1.5;}
.session-warning-modal .logout-modal-actions{display:flex;justify-content:center;gap:11px;}
.session-warning-modal .logout-modal-actions .btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;flex:1;min-width:0;min-height:46px;padding:11px 13px;border-radius:11px;font-size:12px;font-weight:750;text-decoration:none;transition:background .16s ease,box-shadow .16s ease;}
.session-warning-modal .session-logout-button{margin:0;}
.session-warning-modal .session-stay-button{margin:0;}
.session-warning-modal .logout-modal-footer{display:flex;align-items:center;justify-content:center;gap:7px;padding:12px 16px;border-top:1px solid #edf1f5;background:#fbfcfd;color:#8a96a6;font-size:10px;font-weight:600;letter-spacing:.15px;}
.session-warning-modal .logout-modal-footer i{color:#168b91;font-size:11px;}
.session-warning-modal.show{animation:primisSessionFadeIn .28s ease-out both;}
@media(max-width:480px){.session-warning-modal .modal-dialog{margin:.65rem auto;padding:0 9px;}.session-warning-modal .session-warning-topbar{min-height:82px;padding:15px 16px;}.session-warning-modal .session-warning-card{padding:21px 18px 22px;}.session-warning-modal h2{font-size:21px;}.session-warning-modal .session-countdown-panel{padding:14px 16px;}.session-warning-modal .logout-modal-actions{flex-direction:column-reverse;}.session-warning-modal .logout-modal-actions .btn{width:100%;}.session-warning-modal .session-warning-status{width:32px;height:32px;flex-basis:32px;}}
@media(prefers-reduced-motion:reduce){.session-warning-modal.show{animation:none}.session-warning-modal *{transition:none!important;}}


/* PRIMIS idle warning redesign v2: split security rail and focused action panel. */
.session-warning-modal{z-index:20000;--bs-modal-transition:transform .24s ease-out;}
.session-warning-modal .modal-backdrop{z-index:19990;}
.session-warning-modal .modal-dialog{width:calc(100% - 2rem);max-width:720px;margin:1rem auto;}
.session-warning-modal .modal-content.session-warning-shell{display:grid;grid-template-columns:238px minmax(0,1fr);overflow:hidden;border:1px solid rgba(255,255,255,.55);border-radius:20px;background:#fff;box-shadow:0 28px 90px rgba(8,20,40,.32);}
.session-warning-modal.show{animation:primisSessionFadeIn .24s ease-out both;}
.session-warning-rail{position:relative;display:flex;flex-direction:column;justify-content:space-between;min-width:0;padding:24px 22px 20px;color:#fff;background:radial-gradient(circle at 15% 10%,rgba(41,164,165,.26),transparent 36%),linear-gradient(155deg,#142944 0%,#101d35 58%,#0c293b 100%);}
.session-warning-rail:after{content:"";position:absolute;right:-42px;bottom:70px;width:150px;height:150px;border:1px solid rgba(105,220,207,.13);border-radius:50%;box-shadow:0 0 0 18px rgba(105,220,207,.035),0 0 0 38px rgba(105,220,207,.025);pointer-events:none;}
.session-warning-rail-brand{display:flex;align-items:center;gap:10px;font-size:14px;font-weight:800;letter-spacing:1.3px;}
.session-warning-brand-icon{display:grid;place-items:center;width:34px;height:34px;border:1px solid rgba(124,225,214,.35);border-radius:10px;background:rgba(22,139,145,.2);color:#8be2d8;font-size:16px;}
.session-warning-rail-main{position:relative;z-index:1;margin:30px 0 26px;}
.session-warning-overline{display:block;margin-bottom:18px;color:#9ab8cb;font-size:9px;font-weight:800;letter-spacing:1.8px;}
.session-warning-clock-mark{display:grid;place-items:center;width:52px;height:52px;margin-bottom:18px;border:1px solid rgba(128,225,216,.28);border-radius:15px;background:rgba(22,139,145,.17);color:#83e0d6;font-size:23px;box-shadow:inset 0 1px rgba(255,255,255,.08);}
.session-warning-rail-label{display:block;margin-bottom:5px;color:#c0d0dc;font-size:12px;font-weight:500;}
.session-warning-modal .session-countdown{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;width:auto;height:auto;margin:0 0 16px;padding:0;border:0;border-radius:0;background:none;color:#fff;}
.session-warning-modal .session-countdown strong{color:#fff;font-size:36px;font-weight:750;line-height:1.1;letter-spacing:-1px;font-variant-numeric:tabular-nums;}
.session-warning-modal .session-countdown span{margin-top:7px;color:#94b1c3;font-size:9px;font-weight:800;letter-spacing:1.5px;}
.session-warning-modal .session-countdown-track{height:4px;width:100%;overflow:hidden;border-radius:99px;background:rgba(255,255,255,.16);}
.session-warning-modal .session-countdown-track span{display:block;width:100%;height:100%;border-radius:inherit;background:linear-gradient(90deg,#168b91,#7ce0d4);transition:width .2s linear;}
.session-warning-rail-foot{position:relative;z-index:1;display:flex;align-items:center;gap:8px;color:#9bb4c6;font-size:10px;}
.session-warning-rail-foot i{color:#73d5ca;}
.session-warning-main{display:flex;flex-direction:column;min-width:0;padding:25px 27px 0;background:#fff;}
.session-warning-main-top{display:flex;align-items:center;gap:8px;color:#738196;font-size:9px;font-weight:800;letter-spacing:1.25px;}
.session-warning-status-dot{width:7px;height:7px;border-radius:50%;background:#168b91;box-shadow:0 0 0 4px rgba(22,139,145,.10);}
.session-warning-main-icon{display:grid;place-items:center;width:32px;height:32px;margin-left:auto;border:1px solid #e4ebf1;border-radius:10px;color:#168b91;background:#f5fbfb;font-size:14px;}
.session-warning-copy{padding:30px 0 22px;}
.session-warning-modal .session-warning-copy h2{margin:0 0 10px;color:#13243b;font-size:25px;font-weight:750;letter-spacing:-.65px;line-height:1.2;}
.session-warning-modal .session-warning-text{margin:0;max-width:390px;color:#66758a;font-size:13px;line-height:1.75;}
.session-warning-info{display:flex;align-items:flex-start;gap:10px;padding:12px 13px;border:1px solid #e4eeee;border-radius:11px;background:#f6fbfb;color:#617285;font-size:11px;line-height:1.55;}
.session-warning-info-icon{display:grid;place-items:center;flex:0 0 20px;width:20px;height:20px;border-radius:6px;background:#dff3f0;color:#147b80;font-size:10px;}
.session-warning-actions{display:grid;grid-template-columns:minmax(0,.82fr) minmax(0,1.18fr);gap:10px;margin-top:auto;padding:24px 0 20px;}
.session-warning-modal .session-warning-actions .btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:11px 12px;border-radius:10px;font-size:12px;font-weight:700;transition:background .18s ease,border-color .18s ease,transform .18s ease;}
.session-warning-modal .session-logout-button{border:1px solid #dbe3ec;background:#fff;color:#526176;}
.session-warning-modal .session-logout-button:hover{border-color:#b9c6d4;background:#f7f9fc;color:#182a42;}
.session-warning-modal .session-stay-button{border:1px solid #168b91;background:#168b91;color:#fff;box-shadow:0 5px 12px rgba(22,139,145,.16);}
.session-warning-modal .session-stay-button:hover{border-color:#117a80;background:#117a80;color:#fff;transform:translateY(-1px);}
.session-warning-modal .session-warning-actions .btn:focus-visible{outline:3px solid rgba(22,139,145,.25);outline-offset:2px;}
.session-warning-modal .session-warning-actions .btn:disabled{opacity:.65;cursor:wait;transform:none;}
.session-warning-footer{display:flex;align-items:center;gap:7px;margin:0 -27px;padding:13px 27px;border-top:1px solid #edf1f5;background:#fbfcfe;color:#8a97a8;font-size:9px;letter-spacing:.2px;}
.session-warning-footer i{color:#168b91;}
@media(max-width:575.98px){.session-warning-modal .modal-dialog{width:calc(100% - 1rem);margin:.5rem auto;}.session-warning-modal .modal-content.session-warning-shell{grid-template-columns:minmax(0,1fr);border-radius:16px;}.session-warning-rail{padding:16px 18px 15px;}.session-warning-rail-brand{font-size:12px;}.session-warning-brand-icon{width:30px;height:30px;}.session-warning-rail-main{display:grid;grid-template-columns:44px minmax(0,1fr);column-gap:12px;align-items:center;margin:15px 0 14px;}.session-warning-overline{grid-column:1/-1;margin-bottom:9px;}.session-warning-clock-mark{grid-row:2/4;width:44px;height:44px;margin:0;border-radius:12px;font-size:19px;}.session-warning-rail-label{align-self:end;margin:0;font-size:11px;}.session-warning-modal .session-countdown{grid-column:2;grid-row:3;margin:0;}.session-warning-modal .session-countdown strong{font-size:28px;}.session-warning-modal .session-countdown span{margin-top:3px;font-size:8px;}.session-warning-modal .session-countdown-track{grid-column:1/-1;margin-top:12px;}.session-warning-rail-foot{display:none;}.session-warning-rail:after{right:-30px;bottom:-60px;width:120px;height:120px;}.session-warning-main{padding:19px 19px 0;}.session-warning-copy{padding:21px 0 17px;}.session-warning-modal .session-warning-copy h2{font-size:22px;}.session-warning-modal .session-warning-text{font-size:12px;}.session-warning-actions{padding:18px 0 16px;gap:8px;}.session-warning-modal .session-warning-actions .btn{font-size:11px;padding:10px 8px;}.session-warning-footer{margin:0 -19px;padding:12px 19px;}}
@media(prefers-reduced-motion:reduce){.session-warning-modal.show{animation:none}.session-warning-modal .session-countdown-track span,.session-warning-modal .session-warning-actions .btn{transition:none;}}


/* PRIMIS idle warning — refined centered security-card design */
.session-warning-modal{z-index:20000;--bs-modal-transition:transform .22s ease-out}
.session-warning-modal .modal-backdrop{z-index:19990}
.session-warning-modal .modal-dialog{width:calc(100% - 2rem);max-width:490px;margin:1rem auto}
.session-warning-modal .session-warning-shell{display:block;overflow:hidden;border:1px solid rgba(207,220,232,.9);border-radius:20px;background:#fff;box-shadow:0 28px 90px rgba(8,24,48,.30)}
.session-warning-header{position:relative;overflow:hidden;padding:18px 24px 16px;background:linear-gradient(120deg,#101d35 0%,#173451 72%,#145a63 100%);color:#fff}
.session-warning-brand{position:relative;z-index:1;display:flex;align-items:center;gap:10px;min-height:34px}
.session-warning-brand-mark{display:grid;place-items:center;width:34px;height:34px;flex:0 0 34px;border:1px solid rgba(128,222,213,.38);border-radius:10px;background:rgba(34,145,148,.22);color:#91e6dd;font-size:16px}
.session-warning-brand-name{font-size:15px;font-weight:800;letter-spacing:1.15px;color:#fff}
.session-warning-secure-label{margin-left:auto;padding:6px 9px;border:1px solid rgba(205,226,239,.18);border-radius:30px;background:rgba(255,255,255,.07);color:#d5e5ef;font-size:9px;font-weight:800;letter-spacing:.8px;white-space:nowrap}
.session-warning-secure-label .fa{margin-right:4px;color:#85ded4}
.session-warning-header-line{position:absolute;right:-35px;bottom:-42px;width:210px;height:78px;border:1px solid rgba(129,221,213,.16);border-radius:50%;transform:rotate(-14deg)}
.session-warning-content{padding:25px 28px 23px;text-align:center}
.session-warning-symbol{position:relative;display:grid;place-items:center;width:62px;height:62px;margin:0 auto 15px;border:1px solid #d2efec;border-radius:18px;background:linear-gradient(145deg,#f0fbfa,#e0f5f2);color:#168b91;font-size:27px;box-shadow:0 6px 18px rgba(22,139,145,.09)}
.session-warning-symbol-dot{position:absolute;right:-3px;bottom:1px;width:13px;height:13px;border:3px solid #fff;border-radius:50%;background:#e8ad4c}
.session-warning-kicker{margin-bottom:7px;color:#168b91;font-size:10px;font-weight:800;letter-spacing:1.35px}
.session-warning-content h2{margin:0 0 9px;color:#13243b;font-size:23px;font-weight:750;letter-spacing:-.45px;line-height:1.25}
.session-warning-content .session-warning-text{max-width:370px;margin:0 auto 20px;color:#68778b;font-size:13px;line-height:1.65}
.session-warning-timer-panel{padding:14px 16px 13px;border:1px solid #e4ebf2;border-radius:14px;background:#f8fafc;text-align:left}
.session-warning-timer-copy{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:7px;color:#6d7b8f;font-size:11px;font-weight:600}
.session-warning-timer-live{color:#168b91;font-size:9px;font-weight:800;letter-spacing:.55px;white-space:nowrap}
.session-warning-timer-live .fa{margin-right:4px;font-size:7px}
.session-warning-modal .session-countdown{display:flex;align-items:baseline;gap:7px;margin:0 0 10px;padding:0;border:0;border-radius:0;width:auto;height:auto;background:transparent;flex-direction:row;justify-content:flex-start}
.session-warning-modal .session-countdown strong{color:#142640;font-size:32px;font-weight:800;letter-spacing:1px;line-height:1.15;font-variant-numeric:tabular-nums}
.session-warning-modal .session-countdown span{margin:0;color:#93a0b0;font-size:9px;font-weight:800;letter-spacing:.7px}
.session-countdown-track{height:5px;overflow:hidden;border-radius:99px;background:#e3eaf0}
.session-countdown-track span{display:block;width:100%;height:100%;border-radius:99px;background:linear-gradient(90deg,#168b91,#55c7b9);transform-origin:left center;transition:width .3s linear}
.session-warning-info{display:flex;align-items:flex-start;gap:8px;margin:15px 1px 18px;color:#78869a;font-size:11px;line-height:1.5;text-align:left}
.session-warning-info>.fa{margin-top:2px;color:#168b91;font-size:13px}
.session-warning-info strong{color:#40516a;font-weight:700}
.session-warning-actions{display:grid;grid-template-columns:.8fr 1.2fr;gap:10px}
.session-warning-modal .session-logout-button,.session-warning-modal .session-stay-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:45px;margin:0;padding:11px 14px;border-radius:10px;font-size:12px;font-weight:750;transition:background .15s ease,border-color .15s ease,transform .15s ease}
.session-warning-modal .session-logout-button{border:1px solid #dbe3ec;background:#fff;color:#4f5f74}
.session-warning-modal .session-logout-button:hover{border-color:#c8d3e0;background:#f5f8fb;color:#233750}
.session-warning-modal .session-stay-button{border:1px solid #168b91;background:#168b91;color:#fff;box-shadow:0 5px 12px rgba(22,139,145,.18)}
.session-warning-modal .session-stay-button:hover{border-color:#117a80;background:#117a80;color:#fff;transform:translateY(-1px)}
.session-warning-modal .session-stay-button:focus-visible,.session-warning-modal .session-logout-button:focus-visible{outline:3px solid rgba(22,139,145,.25);outline-offset:2px}
.session-warning-footer{display:flex;align-items:center;gap:7px;padding:12px 22px;border-top:1px solid #edf1f5;background:#fcfdfe;color:#8b97a8;font-size:10px}
.session-warning-footer>.fa{color:#168b91}
.session-warning-footer-secure{margin-left:auto;color:#a0aaba;font-size:9px}
.session-warning-modal.show{animation:primisSessionCardIn .2s ease-out both}
@keyframes primisSessionCardIn{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:480px){.session-warning-modal .modal-dialog{width:calc(100% - 1rem);margin:.5rem auto}.session-warning-header{padding:15px 17px}.session-warning-content{padding:22px 18px 19px}.session-warning-content h2{font-size:21px}.session-warning-modal .session-countdown strong{font-size:29px}.session-warning-actions{grid-template-columns:1fr}.session-warning-modal .session-logout-button{order:2}.session-warning-modal .session-stay-button{order:1}.session-warning-footer{padding:11px 16px}}
@media(prefers-reduced-motion:reduce){.session-warning-modal.show{animation:none}.session-warning-modal *{transition:none!important}}

/* Keep the idle-session warning exactly the same width as the logout modal. */
.primis-logout-modal .modal-dialog,
.session-warning-modal .modal-dialog {
  width: calc(100% - 20px);
  max-width: 470px;
  margin: 1rem auto;
  padding: 0;
}
@media (max-width: 480px) {
  .primis-logout-modal .modal-dialog,
  .session-warning-modal .modal-dialog {
    width: calc(100% - 18px);
    max-width: 470px;
    margin: .65rem auto;
    padding: 0;
  }
}


/* Refined Pwani Regional Secretariat sidebar identity */
.brand-block {
    position: relative;
    gap: 10px;
    padding: 18px 12px 22px;
    margin: 0 10px 10px;
    border-bottom: 1px solid rgba(158, 184, 211, .16);
}
.brand-block::before {
    content: "";
    position: absolute;
    top: 10px; left: 50%;
    width: 92px; height: 92px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(88,211,197,.13) 0%, rgba(88,211,197,0) 72%);
    pointer-events: none;
}
.sidebar-logo {
    position: relative; z-index: 1;
    width: 82px; height: 82px;
    padding: 9px;
    border: 1px solid rgba(88,211,197,.32);
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(255,255,255,.10), rgba(255,255,255,.035));
    box-shadow: 0 8px 22px rgba(0,0,0,.12), inset 0 1px rgba(255,255,255,.08);
}
.sidebar-logo img { width: 62px; height: 62px; max-width: 100%; object-fit: contain; filter: drop-shadow(0 3px 5px rgba(0,0,0,.12)); }
.brand-text { position: relative; z-index: 1; gap: 7px; padding: 0 4px; }
.brand-text strong { max-width: 190px; color: #f4f8fc; font-size: 12px; font-weight: 750; line-height: 1.45; letter-spacing: .15px; text-wrap: balance; }
.brand-text span { display: inline-flex; align-items: center; justify-content: center; gap: 6px; margin-top: 0; padding: 5px 11px; border: 1px solid rgba(88,211,197,.26); border-radius: 999px; background: rgba(22,139,145,.16); color: #78ded3; font-size: 9px; font-weight: 800; line-height: 1.2; letter-spacing: 1.35px; text-transform: uppercase; }
.brand-text span::before { content: ""; width: 5px; height: 5px; flex: 0 0 5px; border-radius: 50%; background: #58d3c5; box-shadow: 0 0 0 3px rgba(88,211,197,.10); }
@media (max-width: 575.98px) { .brand-block { padding-top: 14px; padding-bottom: 17px; } .sidebar-logo { width: 72px; height: 72px; border-radius: 21px; } .sidebar-logo img { width: 54px; height: 54px; } .brand-text strong { font-size: 11px; } }


/* Reference-matched PRIMIS session timeout modal */
.session-warning-modal{z-index:20000;--bs-modal-transition:transform .22s ease-out}
.session-warning-modal .modal-dialog{width:calc(100% - 20px);max-width:470px;margin:1rem auto;padding:0}
.session-warning-modal .session-warning-shell{display:block;overflow:hidden;border:1px solid #d9e4ed;border-radius:16px;background:#fff;box-shadow:0 24px 70px rgba(8,24,48,.32)}
.session-warning-modal .session-warning-header{position:relative;display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:86px;padding:18px 22px;background:linear-gradient(112deg,#082640 0%,#0d2b49 100%);color:#fff}
.session-warning-modal .session-warning-brand{display:flex;align-items:center;gap:13px;min-width:0}
.session-warning-modal .session-warning-brand-mark{display:grid;place-items:center;width:43px;height:48px;flex:0 0 43px;border:0;border-radius:0;background:transparent;color:#27d0d0;font-size:35px}
.session-warning-modal .session-warning-brand-copy{display:flex;flex-direction:column;gap:3px;min-width:0}
.session-warning-modal .session-warning-brand-name{color:#fff;font-size:23px;font-weight:500;letter-spacing:.1px;line-height:1.1}
.session-warning-modal .session-warning-secure-label{color:#b7cad9;font-size:10px;font-weight:700;letter-spacing:1.15px;white-space:nowrap}
.session-warning-modal .session-warning-header-status{display:flex;align-items:center;justify-content:flex-end;gap:8px;color:#f1f6fa;font-size:9px;font-weight:700;letter-spacing:.55px;text-align:right;white-space:nowrap}
.session-warning-modal .session-warning-header-status .fa{color:#14c5c7;font-size:11px}
.session-warning-modal .session-warning-content{padding:27px 25px 24px;text-align:center}
.session-warning-modal .session-warning-symbol-wrap{position:relative;display:grid;place-items:center;width:104px;height:104px;margin:0 auto 5px;border:7px solid #e2f5f5;border-radius:50%}
.session-warning-modal .session-warning-symbol-wrap:after{position:absolute;inset:-7px;border:5px solid transparent;border-top-color:#159c9f;border-right-color:#159c9f;border-radius:50%;content:"";transform:rotate(18deg)}
.session-warning-modal .session-warning-symbol{display:grid;place-items:center;width:80px;height:80px;margin:0;border:0;border-radius:50%;background:#e2f5f5;color:#087d83;font-size:32px;box-shadow:none}
.session-warning-modal .session-warning-content h2{margin:0 0 8px;color:#102943;font-size:25px;font-weight:800;letter-spacing:-.7px;line-height:1.25}
.session-warning-modal .session-warning-text{max-width:360px;margin:0 auto 23px;color:#526984;font-size:14px;line-height:1.55}
.session-warning-modal .session-warning-timer-panel{padding:17px 18px 16px;border:0;border-radius:15px;background:#f0f8fb;text-align:center}
.session-warning-modal .session-warning-timer-label{margin-bottom:5px;color:#61778e;font-size:12px;font-weight:700;letter-spacing:.3px}
.session-warning-modal .session-countdown{display:flex;justify-content:center;align-items:center;margin:0 0 10px;padding:0;border:0;background:transparent}
.session-warning-modal .session-countdown strong{color:#102943;font-size:43px;font-weight:800;letter-spacing:.6px;line-height:1.12;font-variant-numeric:tabular-nums}
.session-warning-modal .session-countdown-track{height:8px;overflow:hidden;border-radius:99px;background:#cbd8e2}
.session-warning-modal .session-countdown-track span{display:block;width:100%;height:100%;border-radius:99px;background:#0da1a2;transform-origin:left center;transition:width .3s linear}
.session-warning-modal .session-warning-info{display:flex;align-items:center;gap:9px;margin:10px 0 19px;padding:12px 14px;border:0;border-radius:11px;background:#f0f8fb;color:#536a83;font-size:11px;line-height:1.45;text-align:left}
.session-warning-modal .session-warning-info>.fa{flex:0 0 auto;margin:0;color:#0d8f96;font-size:17px}
.session-warning-modal .session-warning-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.session-warning-modal .session-warning-actions .btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-width:0;min-height:49px;margin:0;padding:12px 10px;border-radius:10px;font-size:13px;font-weight:750;white-space:nowrap;transition:background .15s ease,border-color .15s ease,transform .15s ease}
.session-warning-modal .session-logout-button{border:1px solid #9aafc3;background:#fff;color:#18334e}
.session-warning-modal .session-logout-button:hover{border-color:#6f8ba5;background:#f7fafc;color:#102943}
.session-warning-modal .session-stay-button{border:1px solid #0c999a;background:#079899;color:#fff;box-shadow:none}
.session-warning-modal .session-stay-button:hover{border-color:#087f84;background:#087f84;color:#fff}
.session-warning-modal .session-warning-footer{display:flex;align-items:center;justify-content:center;gap:9px;min-height:48px;padding:12px 16px;border-top:1px solid #edf1f5;background:#f8fbfd;color:#627992;font-size:11px;text-align:center}
.session-warning-modal .session-warning-footer>.fa{color:#078f92;font-size:19px}
@media(max-width:480px){.session-warning-modal .modal-dialog{width:calc(100% - 18px);margin:.5rem auto}.session-warning-modal .session-warning-header{min-height:76px;padding:14px 15px;gap:8px}.session-warning-modal .session-warning-brand{gap:8px}.session-warning-modal .session-warning-brand-mark{width:32px;height:38px;flex-basis:32px;font-size:28px}.session-warning-modal .session-warning-brand-name{font-size:19px}.session-warning-modal .session-warning-secure-label{font-size:8px;letter-spacing:.8px}.session-warning-modal .session-warning-header-status{max-width:125px;font-size:8px;white-space:normal}.session-warning-modal .session-warning-content{padding:22px 17px 18px}.session-warning-modal .session-warning-symbol-wrap{width:88px;height:88px;border-width:6px}.session-warning-modal .session-warning-symbol-wrap:after{inset:-6px}.session-warning-modal .session-warning-symbol{width:68px;height:68px;font-size:27px}.session-warning-modal .session-warning-content h2{font-size:22px}.session-warning-modal .session-warning-text{font-size:12px;margin-bottom:18px}.session-warning-modal .session-warning-countdown strong,.session-warning-modal .session-countdown strong{font-size:37px}.session-warning-modal .session-warning-timer-panel{padding:14px 13px}.session-warning-modal .session-warning-actions{gap:8px}.session-warning-modal .session-warning-actions .btn{gap:6px;padding:10px 6px;font-size:11px}.session-warning-modal .session-warning-footer{font-size:10px}}
@media(prefers-reduced-motion:reduce){.session-warning-modal.show{animation:none}.session-warning-modal *{transition:none!important}}

/* ===== Shared action menu - identical to the Task Creation action menu (budget, planning and task pages) ===== */
html body .btn.task-action-trigger{width:34px;height:34px;padding:0;border-radius:10px;border:1px solid #d6deea;background:#fff;color:#4a5b73;display:inline-flex;align-items:center;justify-content:center;box-shadow:none}
html body .btn.task-action-trigger:hover,html body .btn.task-action-trigger.show,html body .btn.task-action-trigger:focus{background:#eef4fb;color:#0b5ea8;border-color:#b9d2ee;box-shadow:none}
html body .dropdown-menu.task-action-menu{min-width:200px;width:auto;max-width:none;padding:.4rem;background:#fff;border:1px solid #d6deea;border-radius:14px;box-shadow:0 16px 34px rgba(16,29,53,.20);z-index:1090;opacity:1}
html body .dropdown-menu.task-action-menu li{margin:0;padding:0;list-style:none}
html body .dropdown-menu.task-action-menu .task-menu-head{padding:.35rem .7rem .45rem;font-size:.68rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:#7a8aa3}
html body .dropdown-menu.task-action-menu .dropdown-item{display:flex!important;align-items:center;gap:.65rem;width:100%;border-radius:9px;padding:.5rem .7rem!important;font-weight:600!important;font-size:.9rem!important;text-align:left;white-space:nowrap;opacity:1;background:transparent!important;background-image:none!important;box-shadow:none!important;outline:none!important;color:#1f2d44!important;-webkit-text-fill-color:#1f2d44!important}
html body .dropdown-menu.task-action-menu .dropdown-item i{margin:0!important}
html body .dropdown-menu.task-action-menu .task-act-icon{width:28px;height:28px;flex:0 0 28px;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;font-size:.8rem}
html body .dropdown-menu.task-action-menu .task-act-view .task-act-icon{background:#e6f0fd;color:#1d63c4;-webkit-text-fill-color:#1d63c4}
html body .dropdown-menu.task-action-menu .task-act-edit .task-act-icon{background:#fff2da;color:#b06b00;-webkit-text-fill-color:#b06b00}
html body .dropdown-menu.task-action-menu .task-act-submit .task-act-icon,html body .dropdown-menu.task-action-menu .task-act-review .task-act-icon{background:#e0f5ea;color:#17803f;-webkit-text-fill-color:#17803f}
html body .dropdown-menu.task-action-menu .task-act-delete .task-act-icon{background:#fde6e6;color:#c23030;-webkit-text-fill-color:#c23030}
html body .dropdown-menu.task-action-menu .task-act-view:is(:hover,:focus,:focus-visible,:active){background:#eef4fd!important}
html body .dropdown-menu.task-action-menu .task-act-edit:is(:hover,:focus,:focus-visible,:active){background:#fff8ea!important}
html body .dropdown-menu.task-action-menu .task-act-submit:is(:hover,:focus,:focus-visible,:active),html body .dropdown-menu.task-action-menu .task-act-review:is(:hover,:focus,:focus-visible,:active){background:#eefaf3!important}
html body .dropdown-menu.task-action-menu .task-act-delete,html body .dropdown-menu.task-action-menu .task-act-delete:is(:hover,:focus,:focus-visible,:active){color:#b32424!important;-webkit-text-fill-color:#b32424!important}
html body .dropdown-menu.task-action-menu .task-act-delete:is(:hover,:focus,:focus-visible,:active){background:#fdeeee!important}
html body .dropdown-menu.task-action-menu .dropdown-divider{margin:.3rem .4rem;border-top:1px solid #d6deea;opacity:1}

/* Final reference-match: PRIMIS secure session timeout modal. Keep this as the single final override. */
.session-warning-modal{z-index:20020;--bs-modal-transition:transform .22s ease-out}
.session-warning-modal .modal-dialog{width:calc(100% - 32px);max-width:750px;margin:1.25rem auto;padding:0}
.session-warning-modal .modal-content.session-warning-shell{display:block;overflow:hidden;border:1px solid #d7e3ed;border-radius:16px;background:#fff;box-shadow:0 24px 70px rgba(8,24,48,.32)}
.session-warning-modal .session-warning-header{position:relative;display:flex;align-items:center;justify-content:space-between;gap:18px;min-height:114px;padding:24px 44px;background:linear-gradient(112deg,#082640 0%,#0d2b49 100%);color:#fff}
.session-warning-modal .session-warning-brand{display:flex;align-items:center;gap:18px;min-width:0}
.session-warning-modal .session-warning-brand-mark{display:grid;place-items:center;width:48px;height:54px;flex:0 0 48px;border:0;border-radius:0;background:transparent;color:#27d0d0;font-size:43px}
.session-warning-modal .session-warning-brand-copy{display:flex;flex-direction:column;gap:4px;min-width:0}
.session-warning-modal .session-warning-brand-name{color:#fff;font-size:34px;font-weight:500;letter-spacing:.1px;line-height:1.05}
.session-warning-modal .session-warning-secure-label{margin:0;padding:0;border:0;border-radius:0;background:transparent;color:#b7cad9;font-size:13px;font-weight:700;letter-spacing:1.2px;white-space:nowrap}
.session-warning-modal .session-warning-header-status{display:flex;align-items:center;justify-content:flex-end;gap:12px;color:#f1f6fa;font-size:12px;font-weight:700;letter-spacing:.5px;text-align:right;white-space:nowrap}
.session-warning-modal .session-warning-header-status .fa{color:#14c5c7;font-size:14px}
.session-warning-modal .session-warning-content{padding:32px 36px 28px;text-align:center}
.session-warning-modal .session-warning-symbol-wrap{position:relative;display:grid;place-items:center;width:160px;height:160px;margin:0 auto 3px;border:8px solid #e2f5f5;border-radius:50%}
.session-warning-modal .session-warning-symbol-wrap:after{position:absolute;inset:-8px;border:7px solid transparent;border-top-color:#159c9f;border-right-color:#159c9f;border-radius:50%;content:"";transform:rotate(18deg)}
.session-warning-modal .session-warning-symbol{display:grid;place-items:center;width:128px;height:128px;margin:0;border:0;border-radius:50%;background:#e2f5f5;color:#087d83;font-size:48px;box-shadow:none}
.session-warning-modal .session-warning-content h2{margin:0 0 10px;color:#102943;font-size:42px;font-weight:800;letter-spacing:-1.2px;line-height:1.18}
.session-warning-modal .session-warning-text{max-width:590px;margin:0 auto 26px;color:#526984;font-size:20px;line-height:1.45}
.session-warning-modal .session-warning-timer-panel{padding:20px 40px 20px;border:0;border-radius:16px;background:#f0f8fb;text-align:center}
.session-warning-modal .session-warning-timer-label{margin-bottom:7px;color:#61778e;font-size:17px;font-weight:700;letter-spacing:.3px}
.session-warning-modal .session-countdown{display:flex;justify-content:center;align-items:center;margin:0 0 13px;padding:0;border:0;background:transparent}
.session-warning-modal .session-countdown strong{color:#102943;font-size:60px;font-weight:800;letter-spacing:.6px;line-height:1.12;font-variant-numeric:tabular-nums}
.session-warning-modal .session-countdown-track{height:17px;overflow:hidden;border-radius:99px;background:#cbd8e2}
.session-warning-modal .session-countdown-track span{display:block;width:100%;height:100%;border-radius:99px;background:#0da1a2;transform-origin:left center;transition:width .3s linear}
.session-warning-modal .session-warning-info{display:flex;align-items:center;gap:14px;margin:12px 0 25px;padding:15px 22px;border:0;border-radius:12px;background:#f0f8fb;color:#536a83;font-size:16px;line-height:1.4;text-align:left}
.session-warning-modal .session-warning-info>.fa{flex:0 0 auto;margin:0;color:#0d8f96;font-size:27px}
.session-warning-modal .session-warning-actions{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.session-warning-modal .session-warning-actions .btn{display:inline-flex;align-items:center;justify-content:center;gap:14px;min-width:0;min-height:73px;margin:0;padding:17px 16px;border-radius:12px;font-size:20px;font-weight:750;white-space:nowrap;transition:background .15s ease,border-color .15s ease,transform .15s ease}
.session-warning-modal .session-warning-actions .btn .fa{font-size:26px}
.session-warning-modal .session-logout-button{border:2px solid #9aafc3;background:#fff;color:#18334e}
.session-warning-modal .session-logout-button:hover{border-color:#6f8ba5;background:#f7fafc;color:#102943}
.session-warning-modal .session-stay-button{border:1px solid #0c999a;background:#079899;color:#fff;box-shadow:none}
.session-warning-modal .session-stay-button:hover{border-color:#087f84;background:#087f84;color:#fff}
.session-warning-modal .session-warning-footer{display:flex;align-items:center;justify-content:center;gap:12px;min-height:62px;padding:14px 20px;border-top:1px solid #edf1f5;background:#f8fbfd;color:#627992;font-size:16px;text-align:center}
.session-warning-modal .session-warning-footer>.fa{color:#078f92;font-size:26px}
@media(max-width:767.98px){.session-warning-modal .modal-dialog{width:calc(100% - 24px);margin:.75rem auto}.session-warning-modal .session-warning-header{min-height:88px;padding:17px 20px;gap:12px}.session-warning-modal .session-warning-brand{gap:10px}.session-warning-modal .session-warning-brand-mark{width:37px;height:42px;flex-basis:37px;font-size:33px}.session-warning-modal .session-warning-brand-name{font-size:25px}.session-warning-modal .session-warning-secure-label{font-size:10px;letter-spacing:.9px}.session-warning-modal .session-warning-header-status{max-width:175px;font-size:9px;white-space:normal}.session-warning-modal .session-warning-content{padding:25px 22px 22px}.session-warning-modal .session-warning-symbol-wrap{width:112px;height:112px;border-width:6px}.session-warning-modal .session-warning-symbol-wrap:after{inset:-6px;border-width:5px}.session-warning-modal .session-warning-symbol{width:90px;height:90px;font-size:34px}.session-warning-modal .session-warning-content h2{font-size:29px}.session-warning-modal .session-warning-text{font-size:15px;margin-bottom:20px}.session-warning-modal .session-warning-timer-panel{padding:16px 20px}.session-warning-modal .session-warning-timer-label{font-size:13px}.session-warning-modal .session-countdown strong{font-size:45px}.session-warning-modal .session-countdown-track{height:10px}.session-warning-modal .session-warning-info{gap:9px;margin:10px 0 18px;padding:12px 13px;font-size:12px}.session-warning-modal .session-warning-info>.fa{font-size:19px}.session-warning-modal .session-warning-actions{gap:10px}.session-warning-modal .session-warning-actions .btn{gap:7px;min-height:52px;padding:11px 7px;font-size:13px;white-space:normal}.session-warning-modal .session-warning-actions .btn .fa{font-size:17px}.session-warning-modal .session-warning-footer{min-height:48px;padding:11px 12px;font-size:11px}.session-warning-modal .session-warning-footer>.fa{font-size:18px}}
@media(max-width:380px){.session-warning-modal .session-warning-header{padding:14px 12px;gap:6px}.session-warning-modal .session-warning-brand{gap:7px}.session-warning-modal .session-warning-brand-mark{width:29px;flex-basis:29px;font-size:27px}.session-warning-modal .session-warning-brand-name{font-size:20px}.session-warning-modal .session-warning-secure-label{font-size:8px}.session-warning-modal .session-warning-header-status{max-width:112px;font-size:8px}.session-warning-modal .session-warning-content{padding:20px 14px 16px}.session-warning-modal .session-warning-content h2{font-size:25px}.session-warning-modal .session-warning-actions .btn{font-size:11px;gap:5px}}
@media(prefers-reduced-motion:reduce){.session-warning-modal .session-countdown-track span,.session-warning-modal .session-warning-actions .btn{transition:none}}

/* ===== Sidebar brand: logo + organisation + department abbreviation ===== */
.brand-block{background:linear-gradient(180deg,rgba(88,211,197,.07) 0%,rgba(88,211,197,0) 100%);border-radius:18px 18px 0 0}
.sidebar-logo{box-shadow:0 0 0 4px rgba(88,211,197,.08),0 10px 26px rgba(0,0,0,.20),inset 0 1px rgba(255,255,255,.10)}
.brand-text .brand-dept{display:inline-flex;align-items:center;justify-content:center;gap:8px;margin-top:2px;padding:7px 16px 7px 12px;border:1px solid rgba(255,255,255,.20);border-radius:999px;background:linear-gradient(135deg,#1fb5a8 0%,#168b91 55%,#12717f 100%);color:#fff;font-size:13px;font-weight:800;line-height:1.1;letter-spacing:1.6px;text-transform:uppercase;box-shadow:0 8px 18px rgba(10,98,110,.38),inset 0 1px rgba(255,255,255,.22);max-width:100%}
.brand-text .brand-dept::before{display:none}
.brand-text .brand-dept i{font-size:13px;opacity:.92;letter-spacing:0}
.brand-text .brand-dept-name{display:-webkit-box;max-width:190px;margin-top:1px;color:#a9bfd8;font-size:10px;font-weight:500;line-height:1.4;text-align:center;letter-spacing:.2px;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}


/* ===== Session timeout modal: same compact size as the logout modal, fully responsive ===== */
.session-warning-modal .modal-dialog{width:auto;max-width:470px;margin:1rem auto;padding:0 10px;max-height:calc(100vh - 1.5rem)}
.session-warning-modal .modal-content.session-warning-shell{border-radius:22px;max-height:calc(100vh - 1.5rem);overflow-y:auto;box-shadow:0 22px 60px rgba(8,24,48,.30)}
.session-warning-modal .session-warning-header{min-height:92px;padding:19px 22px;gap:12px}
.session-warning-modal .session-warning-brand{gap:12px}
.session-warning-modal .session-warning-brand-mark{width:38px;height:42px;flex:0 0 38px;font-size:30px}
.session-warning-modal .session-warning-brand-name{font-size:18px;font-weight:600}
.session-warning-modal .session-warning-secure-label{font-size:10px;letter-spacing:1px}
.session-warning-modal .session-warning-header-status{max-width:120px;font-size:9px;gap:6px;white-space:normal;line-height:1.25}
.session-warning-modal .session-warning-header-status .fa{font-size:12px}
.session-warning-modal .session-warning-content{padding:20px 22px 16px}
.session-warning-modal .session-warning-symbol-wrap{width:92px;height:92px;border-width:5px;margin-bottom:8px}
.session-warning-modal .session-warning-symbol-wrap:after{inset:-5px;border-width:4px}
.session-warning-modal .session-warning-symbol{width:72px;height:72px;font-size:28px}
.session-warning-modal .session-warning-content h2{font-size:22px;letter-spacing:-.3px;margin-bottom:6px}
.session-warning-modal .session-warning-text{max-width:none;margin-bottom:14px;font-size:14px;line-height:1.45}
.session-warning-modal .session-warning-timer-panel{padding:13px 18px;border-radius:14px}
.session-warning-modal .session-warning-timer-label{margin-bottom:3px;font-size:12px}
.session-warning-modal .session-countdown{margin-bottom:9px}
.session-warning-modal .session-countdown strong{font-size:36px;letter-spacing:.4px}
.session-warning-modal .session-countdown-track{height:8px}
.session-warning-modal .session-warning-info{gap:10px;margin:10px 0 14px;padding:10px 13px;font-size:12px;border-radius:10px}
.session-warning-modal .session-warning-info>.fa{font-size:18px}
.session-warning-modal .session-warning-actions{gap:10px}
.session-warning-modal .session-warning-actions .btn{gap:8px;min-height:46px;padding:10px 12px;border-radius:11px;font-size:14px}
.session-warning-modal .session-warning-actions .btn .fa{font-size:16px}
.session-warning-modal .session-warning-footer{min-height:42px;padding:9px 16px;gap:8px;font-size:12px}
.session-warning-modal .session-warning-footer>.fa{font-size:16px}
@media(max-width:575.98px){
 .session-warning-modal .modal-dialog{margin:.5rem auto;padding:0 8px}
 .session-warning-modal .session-warning-header{min-height:76px;padding:14px 16px}
 .session-warning-modal .session-warning-brand-name{font-size:16px}
 .session-warning-modal .session-warning-header-status{display:none}
 .session-warning-modal .session-warning-content{padding:16px 16px 12px}
 .session-warning-modal .session-warning-symbol-wrap{width:76px;height:76px}.session-warning-modal .session-warning-symbol{width:58px;height:58px;font-size:22px}
 .session-warning-modal .session-warning-content h2{font-size:19px}
 .session-warning-modal .session-countdown strong{font-size:30px}
 .session-warning-modal .session-warning-actions{grid-template-columns:1fr}
 .session-warning-modal .session-warning-actions .btn{min-height:44px}
}
@media(max-height:620px){.session-warning-modal .session-warning-symbol-wrap{display:none}}

/* ===== Summary cards with alert colours ===== */
.task-request-summary .task-summary-item.fund-danger{background:#fdeeee;border-color:#f1b9b9;box-shadow:inset 4px 0 0 #d64545}
.task-request-summary .task-summary-item.fund-warning{background:#fff7e6;border-color:#f3d79b;box-shadow:inset 4px 0 0 #e69b00}
.task-request-summary .task-summary-item.fund-success{background:#eaf7ef;border-color:#b7e0c6;box-shadow:inset 4px 0 0 #1f9d55}
.task-request-summary .task-summary-item.fund-muted{background:#f3f5f8;border-color:#dfe5ee;box-shadow:inset 4px 0 0 #9aa8bb}
.task-request-summary .fund-danger strong{color:#b02a2a}.task-request-summary .fund-warning strong{color:#9a6200}.task-request-summary .fund-success strong{color:#17663a}.task-request-summary .fund-muted strong{color:#5d6c82}
.fund-state{display:inline-flex;align-items:center;justify-content:center;gap:.35rem;font-style:normal;font-size:.7rem;font-weight:800;letter-spacing:.04em;text-transform:uppercase}
.fund-danger .fund-state{color:#b02a2a}.fund-warning .fund-state{color:#9a6200}.fund-success .fund-state{color:#17803f}.fund-muted .fund-state{color:#6b7c93}

/* ===== Task creation restriction alert (pending implementation reports) ===== */
.impl-restriction-alert{border:1px solid #f3d79b;border-left:5px solid #e69b00;background:#fff8e8;color:#5b4300}
.impl-restriction-alert .impl-restriction-title{display:flex;align-items:center;gap:.6rem;font-size:1rem}
.impl-restriction-alert .impl-restriction-title i{font-size:1.3rem;color:#c27c00}
.impl-stage-chips{display:flex;flex-wrap:wrap;gap:.4rem;margin:.6rem 0}
.impl-chip{display:inline-flex;align-items:center;gap:.4rem;padding:.2rem .65rem;border-radius:999px;font-size:.78rem;font-weight:700;background:#fff;border:1px solid #efd9a6;color:#6b4a00}
.impl-chip b{background:#e69b00;color:#fff;border-radius:999px;padding:0 .45rem;font-size:.72rem}
.impl-pending-list{max-height:210px;overflow:auto;border:1px solid #efd9a6;border-radius:10px;background:#fff}
.impl-pending-item{display:flex;align-items:center;gap:.7rem;padding:.45rem .75rem;border-bottom:1px solid #f4e7c7;font-size:.85rem}
.impl-pending-item:last-child{border-bottom:0}
.impl-pending-item .impl-p-code{font-weight:700;color:#1d4f9c;white-space:nowrap}
.impl-pending-item .impl-p-task{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#41546f}
.impl-pending-item .impl-p-stage{white-space:nowrap;font-size:.72rem;font-weight:800;padding:.15rem .55rem;border-radius:999px;background:#fff0d1;color:#8a5b00}
.impl-pending-item .impl-p-stage.stage-2{background:#dde9fb;color:#1d4f9c}.impl-pending-item .impl-p-stage.stage-3{background:#e8e3fb;color:#4b3aa6}
@media(max-width:575.98px){.impl-pending-item{flex-wrap:wrap}.impl-pending-item .impl-p-task{flex:0 0 100%;white-space:normal}}

/* negative balances */
.num-negative{color:#b02a2a!important;font-weight:700}

/* ===== Unified summary cards: white cards share the layout of the alert-coloured ones (no alert colour) ===== */
.task-request-summary .task-summary-grid .task-summary-item{border:1px solid #dce8f7;border-radius:12px;padding:.9rem .75rem;gap:.3rem;align-items:stretch;text-align:center;background:#fff;box-shadow:inset 4px 0 0 #c9d6ea,0 3px 10px rgba(23,52,91,.07)}
.task-request-summary .task-summary-grid .task-summary-item .task-summary-label{display:block}
.task-request-summary .task-summary-grid .task-summary-item strong{color:#0f5c8d}
.task-request-summary .task-summary-grid .task-summary-item.fund-danger{background:#fdeeee;border-color:#f1b9b9;box-shadow:inset 4px 0 0 #d64545,0 3px 10px rgba(176,42,42,.10)}
.task-request-summary .task-summary-grid .task-summary-item.fund-warning{background:#fff7e6;border-color:#f3d79b;box-shadow:inset 4px 0 0 #e69b00,0 3px 10px rgba(154,98,0,.10)}
.task-request-summary .task-summary-grid .task-summary-item.fund-success{background:#eaf7ef;border-color:#b7e0c6;box-shadow:inset 4px 0 0 #1f9d55,0 3px 10px rgba(23,102,58,.10)}
.task-request-summary .task-summary-grid .task-summary-item.fund-muted{background:#f3f5f8;border-color:#dfe5ee;box-shadow:inset 4px 0 0 #9aa8bb,0 3px 10px rgba(93,108,130,.08)}
.task-request-summary .task-summary-grid .task-summary-item.fund-danger strong{color:#b02a2a}.task-request-summary .task-summary-grid .task-summary-item.fund-warning strong{color:#9a6200}.task-request-summary .task-summary-grid .task-summary-item.fund-success strong{color:#17663a}.task-request-summary .task-summary-grid .task-summary-item.fund-muted strong{color:#5d6c82}
.fund-state.fund-plain{color:#7a8aa3}

/* ===== Decision-button switch, shared by every Review / Analysis / Approval modal ===== */
.dept-action-switch-4{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:480px){.dept-action-switch-4{grid-template-columns:1fr}}
.dept-switch-btn:disabled{opacity:.42;cursor:not-allowed;background:transparent!important;color:#41546f!important}
.task-status-pill.is-analysed{background:#dde9fb;color:#1d4f9c}
.bulk-task-row.is-empty{opacity:.5}


/* ===== PRIMIS Central Notification Bell ===== */
.notif-wrap { position: relative; display: inline-flex; align-items: center; }
.notif-bell { position: relative; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(15,23,42,.08); border-radius: 50%; background: #fff; color: #475569; font-size: 17px; cursor: pointer; box-shadow: 0 2px 6px rgba(15,23,42,.06); transition: transform .15s, box-shadow .15s, color .15s; }
.notif-bell:hover, .notif-bell[aria-expanded="true"] { color: #0d6efd; box-shadow: 0 4px 12px rgba(13,110,253,.18); transform: translateY(-1px); }
.notif-bell.has-notif .fa { color: #0d6efd; animation: notifRing 2.8s ease-in-out infinite; transform-origin: 50% 0; }
@keyframes notifRing { 0%,86%,100% { transform: rotate(0); } 90% { transform: rotate(14deg); } 94% { transform: rotate(-12deg); } 97% { transform: rotate(6deg); } }
@media (prefers-reduced-motion: reduce) { .notif-bell.has-notif .fa { animation: none; } }
.notif-badge { position: absolute; top: -4px; right: -4px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: #e11d48; color: #fff; border: 2px solid #fff; font-size: 10.5px; font-weight: 700; line-height: 15px; text-align: center; font-style: normal; }
.notif-badge[hidden] { display: none; }
.notif-panel { width: 380px; max-width: calc(100vw - 24px); padding: 0; border: 0; border-radius: 16px; overflow: hidden; box-shadow: 0 18px 48px rgba(15,23,42,.22); margin-top: 10px !important; }
.notif-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; background: linear-gradient(135deg,#0d6efd,#4f46e5); color: #fff; }
.notif-head strong { display: block; font-size: 15px; }
.notif-head small { display: block; opacity: .85; font-size: 12px; }
.notif-refresh { width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(255,255,255,.18); color: #fff; }
.notif-refresh:hover { background: rgba(255,255,255,.3); }
.notif-refresh.spin .fa { animation: notifSpin .8s linear infinite; }
@keyframes notifSpin { to { transform: rotate(360deg); } }
.notif-body { max-height: min(70vh, 560px); overflow-y: auto; background: #f8fafc; }
.notif-tabs { display: flex; gap: 6px; padding: 10px 12px 4px; overflow-x: auto; position: sticky; top: 0; background: #f8fafc; z-index: 1; }
.notif-tab { flex: 0 0 auto; border: 1px solid #dbe3ee; background: #fff; color: #475569; border-radius: 999px; padding: 4px 11px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.notif-tab.active { background: #0d6efd; border-color: #0d6efd; color: #fff; }
.notif-tab-count { margin-left: 6px; background: #e11d48; color: #fff; border-radius: 999px; padding: 0 6px; font-size: 10px; }
.notif-list { padding: 6px 12px 12px; }
.notif-module { margin-top: 10px; }
.notif-module-head { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #64748b; padding: 4px 2px; }
.notif-module-count { margin-left: auto; background: #e11d48; color: #fff; border-radius: 999px; padding: 0 8px; font-size: 11px; }
.notif-module-count.zero { background: #cbd5e1; }
.notif-none { background: #fff; border: 1px dashed #d5deea; border-radius: 12px; padding: 12px; font-size: 12.5px; color: #94a3b8; text-align: center; }
.notif-item { background: #fff; border: 1px solid #e5ebf3; border-left: 4px solid #0d6efd; border-radius: 12px; margin-top: 8px; overflow: hidden; }
.notif-item.tone-secondary { border-left-color: #64748b; } .notif-item.tone-warning { border-left-color: #f59e0b; }
.notif-item.tone-info { border-left-color: #0ea5e9; } .notif-item.tone-success { border-left-color: #16a34a; } .notif-item.tone-danger { border-left-color: #e11d48; }
.notif-item-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; text-decoration: none; color: #0f172a; }
.notif-item-head:hover { background: #f1f5f9; }
.notif-item-icon { width: 32px; height: 32px; border-radius: 10px; background: #eef2ff; color: #4f46e5; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.notif-item-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.notif-item-text strong { font-size: 13.5px; } .notif-item-text small { color: #64748b; font-size: 11.5px; }
.notif-count { background: #e11d48; color: #fff; border-radius: 999px; min-width: 24px; text-align: center; padding: 1px 8px; font-size: 12px; font-weight: 700; }
.notif-rows { list-style: none; margin: 0; padding: 0 0 4px; border-top: 1px solid #eef2f7; }
.notif-rows a { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 54px; font-size: 12.5px; color: #334155; text-decoration: none; }
.notif-rows a:hover { background: #f1f5f9; color: #0d6efd; }
.notif-row-main { font-weight: 600; white-space: nowrap; }
.notif-row-sub { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #64748b; }
.notif-row-tag { flex: 0 0 auto; background: #eef2f7; color: #475569; border-radius: 6px; padding: 0 6px; font-size: 10.5px; font-weight: 600; }
.notif-more { display: block; padding: 6px 12px 8px 54px; font-size: 12px; font-weight: 600; text-decoration: none; }
.notif-empty { padding: 24px; text-align: center; color: #94a3b8; }
.topbar-user-wrap { gap: 14px; }
@media (max-width: 575.98px) { .notif-panel { position: fixed !important; top: 64px !important; left: 12px !important; right: 12px !important; width: auto; transform: none !important; } }


/* ===== Password forms: field, uniform eye icon, strength meter (change / reset / registration) ===== */
.pw-modal-head { padding: 22px 26px 16px; border-bottom: 1px solid #e3e9f2; align-items: center; }
.pw-modal-head .modal-title { font-size: 22px; font-weight: 600; color: #17253b; }
.pw-modal-body { padding: 22px 26px 24px; }
.pw-group .pw-label { display: block; font-size: 16px; font-weight: 600; color: #17253b; margin-bottom: 8px; }
.pw-field { position: relative; display: flex; align-items: center; height: 58px; border: 1px solid #6b7a99; border-radius: 10px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.pw-field:focus-within { border-color: #0b5cad; box-shadow: 0 0 0 3px rgba(11,92,173,.18); }
.pw-lock { flex: 0 0 auto; width: 46px; display: inline-flex; align-items: center; justify-content: center; color: #475569; font-size: 17px; }
.pw-input { flex: 1 1 auto; min-width: 0; height: 100%; border: 0 !important; outline: 0 !important; box-shadow: none !important; background: transparent !important; color: #17253b; font-size: 16px; padding: 0 4px 0 0; }
/* ONE eye icon for every password control in PRIMIS (change, reset, registration, login) */
.pw-eye, .password-toggle { flex: 0 0 auto; width: 46px; height: 100%; display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; color: #0b5cad; font-size: 18px; line-height: 1; cursor: pointer; padding: 0; }
.pw-eye:hover, .password-toggle:hover { color: #08447f; }
.pw-eye .fa, .password-toggle .fa { font-size: 18px; width: 20px; text-align: center; }
.pw-meter { margin: -2px 0 18px; }
.pw-meter[hidden] { display: none !important; }
.pw-meter-row { display: flex; justify-content: space-between; align-items: baseline; color: #5b6880; font-size: 15px; margin-bottom: 8px; }
.pw-level { font-weight: 700; font-size: 15px; }
.pw-bar { height: 8px; border-radius: 99px; background: #e1e7ef; overflow: hidden; }
.pw-bar > span { display: block; height: 100%; width: 0; border-radius: 99px; background: #94a3b8; transition: width .25s ease, background-color .25s; }
.pw-meter[data-level="weak"] .pw-bar > span { background: #0b5cad; } .pw-meter[data-level="weak"] .pw-level { color: #b42318; }
.pw-meter[data-level="fair"] .pw-bar > span { background: #f59e0b; } .pw-meter[data-level="fair"] .pw-level { color: #b45309; }
.pw-meter[data-level="good"] .pw-bar > span { background: #0ea5e9; } .pw-meter[data-level="good"] .pw-level { color: #0369a1; }
.pw-meter[data-level="strong"] .pw-bar > span { background: #16a34a; } .pw-meter[data-level="strong"] .pw-level { color: #15803d; }
.pw-rules { list-style: none; margin: 14px 0 0; padding: 0; }
.pw-rules li { display: flex; align-items: center; gap: 10px; padding: 3px 0; font-size: 15.5px; color: #475569; transition: color .15s; }
.pw-rules li .fa { font-size: 17px; width: 18px; text-align: center; color: #64748b; }
.pw-rules li.ok, .pw-rules li.ok .fa { color: #16a34a; font-weight: 600; }
.pw-match { font-size: 13px; margin-top: 6px; } .pw-match.ok { color: #16a34a; } .pw-match.bad { color: #b42318; }
.pw-signout { display: flex; align-items: flex-start; gap: 12px; margin: 4px 0 18px; }
.pw-signout .form-check-input { width: 24px; height: 24px; margin-top: 2px; flex: 0 0 auto; opacity: 1; background-color: #0b5cad; border-color: #0b5cad; }
.pw-signout label { display: flex; flex-direction: column; font-size: 16px; color: #17253b; }
.pw-signout small { color: #5b6880; font-size: 14.5px; }
.pw-actions { display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
.pw-cancel { color: #0b5cad; font-weight: 600; text-decoration: none; padding: 10px 18px; }
.pw-submit { background: #0b5cad; border-color: #0b5cad; font-weight: 600; font-size: 16px; padding: 14px 22px; border-radius: 8px; }
.pw-submit:hover:not(:disabled) { background: #08447f; border-color: #08447f; }
.pw-submit:disabled { opacity: .55; cursor: not-allowed; }
.pw-card { max-width: 520px; }
.field.pw-wide { flex: 0 0 100%; max-width: 100%; width: 100%; grid-column: 1 / -1; }
#requiredPasswordModal .modal-dialog, #globalModal .modal-dialog:has(.pw-form) { max-width: 520px; }
@media (max-width: 575.98px) { .pw-modal-body, .pw-modal-head { padding-left: 18px; padding-right: 18px; } .pw-field { height: 52px; } }


/* ===== Help Desk reports ===== */
.hr-page { display: flex; flex-direction: column; gap: 18px; }
.hr-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.hr-h2 { font-size: 20px; font-weight: 700; margin: 0 0 2px; color: #0b2142; } .hr-h2 .fa { color: #1769e0; margin-right: 8px; }
.hr-downloads { display: flex; gap: 10px; flex-wrap: wrap; }
.hr-btn-excel, .hr-btn-pdf { color: #fff; font-weight: 600; border: 0; padding: 9px 16px; border-radius: 10px; box-shadow: 0 4px 12px rgba(15,23,42,.15); }
.hr-btn-excel { background: linear-gradient(135deg,#16a34a,#15803d); } .hr-btn-pdf { background: linear-gradient(135deg,#dc2626,#b91c1c); }
.hr-btn-excel:hover, .hr-btn-pdf:hover { color: #fff; filter: brightness(1.08); }
.hr-filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; background: #fff; border: 1px solid #e3e9f2; border-radius: 14px; padding: 16px; box-shadow: 0 8px 24px rgba(24,46,82,.06); }
.hr-f label { display: block; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #64748b; margin-bottom: 5px; }
.hr-f-actions { display: flex; flex-wrap: wrap; align-items: end; align-content: end; gap: 8px; }
.hr-f-actions .btn { flex: 1 1 auto; padding-inline: .5rem !important; white-space: nowrap; }   /* stay inside the filter column, however narrow */
.hr-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.hr-card { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid #e3e9f2; border-radius: 14px; padding: 16px; box-shadow: 0 8px 24px rgba(24,46,82,.06); }
.hr-card strong { display: block; font-size: 26px; line-height: 1.1; color: #0b2142; } .hr-card small { color: #64748b; }
.hr-card-ic { width: 46px; height: 46px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 20px; }
.hr-card-ic.c1 { background: linear-gradient(135deg,#1769e0,#2e7bf4); } .hr-card-ic.c2 { background: linear-gradient(135deg,#16a34a,#22c55e); }
.hr-card-ic.c3 { background: linear-gradient(135deg,#f59e0b,#fbbf24); } .hr-card-ic.c4 { background: linear-gradient(135deg,#7c3aed,#a78bfa); }
.hr-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.hr-panel { background: #fff; border: 1px solid #e3e9f2; border-radius: 14px; padding: 16px; box-shadow: 0 8px 24px rgba(24,46,82,.06); }
.hr-panel h3 { font-size: 14px; font-weight: 700; color: #0b2142; margin-bottom: 12px; }
.hr-bar-row { display: grid; grid-template-columns: 96px 1fr 34px; align-items: center; gap: 8px; margin-bottom: 7px; font-size: 12.5px; }
.hr-bar-l { color: #475569; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .hr-bar-n { text-align: right; font-weight: 700; color: #0b2142; }
.hr-bar-t { height: 9px; background: #eef2f7; border-radius: 99px; overflow: hidden; } .hr-bar-f { display: block; height: 100%; border-radius: 99px; background: #1769e0; }
.hr-search { max-width: 260px; }
.hr-table thead th { background: #0b2142; color: #fff; font-size: 12px; white-space: nowrap; border: 0; }
/* the header repeated at the bottom of every table (app.js addTableFooter) */
tfoot[data-auto-foot] th { background: #f7f9fc; color: #6f7f96; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .55px; white-space: nowrap; }
[data-bs-theme="dark"] tfoot[data-auto-foot] th { background: #1d2530; color: #9fb0c6; }
.hr-table tfoot[data-auto-foot] th { background: #0b2142; color: #fff; font-size: 12px; font-weight: 700; text-transform: none; letter-spacing: 0; border: 0; }
.hr-table td { font-size: 13px; vertical-align: middle; }
.hr-subject { min-width: 220px; }
.hr-pill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 700; background: #e2e8f0; color: #334155; white-space: nowrap; }
.hr-pill.st-primary, .hr-bar-f.st-primary { background: #dbeafe; color: #1d4ed8; } .hr-bar-f.st-primary { background: #2563eb; }
.hr-pill.st-purple { background: #ede9fe; color: #6d28d9; } .hr-bar-f.st-purple { background: #7c3aed; }
.hr-pill.st-warning { background: #fef3c7; color: #b45309; } .hr-bar-f.st-warning { background: #f59e0b; }
.hr-pill.st-orange { background: #ffedd5; color: #c2410c; } .hr-bar-f.st-orange { background: #ea580c; }
.hr-pill.st-success { background: #dcfce7; color: #15803d; } .hr-bar-f.st-success { background: #16a34a; }
.hr-pill.st-secondary { background: #e2e8f0; color: #475569; } .hr-bar-f.st-secondary { background: #64748b; }
.hr-pill.st-danger { background: #fee2e2; color: #b91c1c; } .hr-bar-f.st-danger { background: #dc2626; }
.hr-pill.pr-critical { background: #fee2e2; color: #b91c1c; } .hr-pill.pr-high { background: #ffedd5; color: #c2410c; } .hr-pill.pr-medium { background: #dbeafe; color: #1d4ed8; } .hr-pill.pr-low { background: #dcfce7; color: #15803d; }


/* ===== Attractive dashboard cards (Help Desk + Tasks Management) ===== */
.dashboard-modern .dashboard-stat-card { --tone: #2563eb; position: relative; overflow: hidden; border: 1px solid #e3e9f2; border-radius: 16px; background: linear-gradient(160deg, #fff 55%, color-mix(in srgb, var(--tone) 9%, #fff) 100%); box-shadow: 0 8px 22px rgba(24,46,82,.07); transition: transform .18s ease, box-shadow .18s ease, border-color .18s; }
.dashboard-modern .dashboard-stat-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--tone), color-mix(in srgb, var(--tone) 55%, #fff)); }
.dashboard-modern .dashboard-stat-card::after { content: ""; position: absolute; right: -18px; bottom: -18px; width: 86px; height: 86px; border-radius: 50%; background: color-mix(in srgb, var(--tone) 12%, transparent); }
.dashboard-modern .dashboard-stat-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--tone) 45%, #e3e9f2); box-shadow: 0 16px 34px color-mix(in srgb, var(--tone) 22%, transparent); }
.dashboard-modern .dashboard-stat-icon { width: 42px; height: 42px; border-radius: 13px; background: linear-gradient(135deg, var(--tone), color-mix(in srgb, var(--tone) 60%, #000 0%)); color: #fff; font-size: 18px; box-shadow: 0 6px 14px color-mix(in srgb, var(--tone) 38%, transparent); margin-bottom: 4px; position: relative; z-index: 1; }
.dashboard-modern .dashboard-stat-icon i { color: #fff !important; }
.dashboard-modern .dashboard-stat-card .stat-label { position: relative; z-index: 1; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #64748b; margin-top: 8px; }
.dashboard-modern .dashboard-stat-card .stat-value { position: relative; z-index: 1; font-size: 30px; font-weight: 800; color: #0b2142; letter-spacing: -.02em; }
.dashboard-modern .dashboard-stat-card .stat-value.tm-money { font-size: 1.1rem; letter-spacing: 0; }
.dashboard-modern .dashboard-stat-foot { position: relative; z-index: 1; font-size: 11px; color: #64748b; }
.dash-card-meter { position: relative; z-index: 1; height: 5px; border-radius: 99px; background: color-mix(in srgb, var(--tone) 16%, #e6ecf5); margin-top: 9px; overflow: hidden; }
.dash-card-meter span { display: block; height: 100%; border-radius: 99px; background: var(--tone); }
/* donut + ring */
.dashboard-donut-hole { background: var(--hd-surface, #fff); }
.dash-ring { width: 128px; height: 128px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.dash-ring-hole { width: 92px; height: 92px; border-radius: 50%; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(15,23,42,.08); text-align: center; }
.dash-ring-hole strong { font-size: 20px; line-height: 1; color: #0b2142; } .dash-ring-hole span { font-size: 9.5px; color: #64748b; margin-top: 3px; }
.dash-ring-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.dash-ring-row .tm-list { flex: 1 1 180px; margin: 0; }
/* 12-month chart */
.dash-mc-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12px; color: #475569; margin-bottom: 8px; } .dash-mc-legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.dash-mc-scroll { overflow-x: auto; padding-bottom: 4px; }
.dash-mc-plot { position: relative; min-width: 680px; height: 280px; padding-left: 46px; padding-bottom: 26px; }
.dash-mc-axis { position: absolute; left: 0; top: 0; bottom: 26px; width: 100%; pointer-events: none; }
.dash-mc-axis span { position: absolute; left: 0; width: 100%; font-size: 10px; color: #94a3b8; border-bottom: 1px dashed #e2e8f0; transform: translateY(50%); line-height: 0; padding-bottom: 0; }
.dash-mc-axis span:first-child { }
.dash-mc-cols { position: relative; height: 100%; display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; align-items: end; }
.dash-mc-col { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; position: relative; border-radius: 8px; }
.dash-mc-col.is-current { background: rgba(37,99,235,.07); }
.dash-mc-bars { flex: 1 1 auto; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.dash-mc-bar { position: relative; width: 38%; max-width: 22px; border-radius: 5px 5px 0 0; min-height: 0; transition: filter .15s; }
.dash-mc-bar:hover { filter: brightness(1.12); }
.dash-mc-bar em { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 9px; color: #475569; white-space: nowrap; margin-bottom: 2px; }
.dash-mc-lab { position: absolute; bottom: -22px; left: 0; right: 0; text-align: center; font-size: 11px; font-weight: 600; color: #64748b; }
@media (max-width: 575.98px) { .dash-mc-plot { height: 240px; } }
.dash-mc-plot { padding-top: 14px; }
.dash-mc-axis { top: 14px; }
.dash-mc-bar em { opacity: 0; pointer-events: none; background: #0b2142; color: #fff; padding: 1px 5px; border-radius: 5px; z-index: 6; margin-bottom: 4px; }
.dash-mc-bar:hover em { opacity: 1; }

/* =========================================================
   UNIFIED BUTTONS (one size, radius and colour set for the whole system)
   Excludes icon / special controls: close, eye, action menus, tabs, pagination chips, role-transfer lists.
========================================================= */
html body .btn:not(.btn-close):not(.pw-eye):not(.task-action-trigger):not(.user-action-toggle):not(.role-transfer-item):not(.dt-btn):not(.btn-link):not(.dropdown-item):not(.nav-link):not(.sidebar-link):not(.btn-sm):not(.btn-lg),
html body a.btn:not(.btn-sm):not(.btn-lg):not(.btn-link) {
    min-height: 40px; padding: .5rem 1.1rem; font-size: .9rem; font-weight: 600; line-height: 1.3;
    border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    letter-spacing: 0; text-transform: none; transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
html body .btn.btn-sm:not(.task-action-trigger):not(.user-action-toggle):not(.role-transfer-item):not(.btn-link) {
    min-height: 32px; padding: .3rem .8rem; font-size: .82rem; font-weight: 600; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
}
html body .btn-primary, html body .btn-primary:focus {
    background: linear-gradient(135deg, #168b91, #1fa6a0) !important; border-color: #168b91 !important; color: #fff !important;
    box-shadow: 0 6px 14px rgba(22, 139, 145, .22);
}
html body .btn-primary:hover, html body .btn-primary:active { background: linear-gradient(135deg, #127a80, #168b91) !important; border-color: #127a80 !important; color: #fff !important; transform: translateY(-1px); filter: none; }
html body .btn-primary:disabled, html body .btn-primary.disabled { opacity: .55; transform: none; box-shadow: none; cursor: not-allowed; }
html body .btn-secondary, html body .btn-outline-secondary { background: #fff; color: #33445f; border: 1px solid #cfd8e5; box-shadow: none; }
html body .btn-secondary:hover, html body .btn-outline-secondary:hover { background: #eef3f8; color: #17253b; border-color: #b5c3d6; }
html body .btn-light { background: #f3f6fa; color: #33445f; border: 1px solid #d9e1ec; box-shadow: none; }
html body .btn-light:hover { background: #e6edf5; color: #17253b; border-color: #c4d0e0; }
html body .btn-success { background: #16803c; border-color: #16803c; color: #fff; box-shadow: none; }
html body .btn-success:hover { background: #126a32; border-color: #126a32; color: #fff; }
html body .btn-danger { background: #c0392b; border-color: #c0392b; color: #fff; box-shadow: none; }
html body .btn-danger:hover { background: #a63024; border-color: #a63024; color: #fff; }
html body .btn-warning { background: #f59e0b; border-color: #f59e0b; color: #1f2937; box-shadow: none; }
html body .btn-outline-primary { color: #168b91; border: 1px solid #168b91; background: transparent; }
html body .btn-outline-primary:hover { background: #168b91; color: #fff; }
html body .btn-outline-danger { color: #c0392b; border: 1px solid #c0392b; background: transparent; }
html body .btn-outline-danger:hover { background: #c0392b; color: #fff; }
html body .modal-footer .btn, html body .pw-actions .btn { min-width: 110px; }

/* Forced / profile password modals: always reachable on small or short screens */
#requiredPasswordModal .modal-dialog { margin: .5rem auto; max-height: calc(100vh - 1rem); }
#requiredPasswordModal .modal-content { max-height: calc(100vh - 1rem); display: flex; flex-direction: column; }
#requiredPasswordModal .modal-body, #globalModal .pw-modal-body { overflow-y: auto; -webkit-overflow-scrolling: touch; }
#requiredPasswordModal.modal, #globalModal.modal { overflow-y: auto; }
@media (max-width: 575.98px) {
  #requiredPasswordModal .modal-dialog, #globalModal .modal-dialog { margin: .35rem; max-width: none; }
  #globalModal .modal-content { max-height: calc(100vh - .7rem); display: flex; flex-direction: column; }
  .pw-actions { flex-wrap: wrap; } .pw-actions .btn { flex: 1 1 100%; }
}

html body .dropdown-menu.task-action-menu li form{margin:0;padding:0}
html body .dropdown-menu.task-action-menu .dropdown-item:disabled{opacity:.5;cursor:not-allowed}

/* Ticket progress tracker (ticket view) */
.tk-flow{list-style:none;display:flex;gap:0;padding:0;margin:.4rem 0 1rem;overflow-x:auto}
.tk-flow li{flex:1 1 0;min-width:96px;text-align:center;position:relative;display:flex;flex-direction:column;align-items:center;gap:.2rem;color:#7a8aa3;font-size:.82rem}
.tk-flow li+li::before{content:"";position:absolute;top:15px;right:50%;width:100%;height:3px;background:#dbe3ee;z-index:0}
.tk-flow li.is-done+li.is-done::before,.tk-flow li.is-done+li.is-current::before{background:#168b91}
.tk-flow .tk-dot{width:32px;height:32px;border-radius:50%;background:#eef2f8;border:2px solid #dbe3ee;display:inline-flex;align-items:center;justify-content:center;position:relative;z-index:1;color:#9aa8bd}
.tk-flow li.is-done .tk-dot{background:#168b91;border-color:#168b91;color:#fff}
.tk-flow li.is-current .tk-dot{box-shadow:0 0 0 4px rgba(22,139,145,.2)}
.tk-flow li.is-current .tk-name{color:#0f6d72;font-weight:700}
.tk-flow li.is-cancelled .tk-dot{background:#c0392b;border-color:#c0392b;color:#fff}
.tk-flow .tk-name{font-weight:600;color:#33445f}
.tk-flow small{color:#7a8aa3;font-size:.72rem}
.tk-history{margin:.2rem 0 1rem;font-size:.85rem}.tk-history summary{cursor:pointer;color:#0f6d72;font-weight:600}
.tk-history ul{list-style:none;padding-left:0;margin:.5rem 0 0}.tk-history li{padding:.25rem 0;border-bottom:1px dashed #e3e9f2}
.tk-h-when{display:inline-block;min-width:120px;color:#7a8aa3}
[data-bs-theme="dark"] .tk-flow .tk-dot{background:#232a36;border-color:#3a4252}
[data-bs-theme="dark"] .tk-flow .tk-name{color:#c4cfe2}

/* Click-to-sort table columns (app.js setupTableSorting) */
th.is-sortable { cursor: pointer; user-select: none; }
th.is-sortable::after { content: "\21C5"; display: inline-block; margin-left: .35em; font-size: .8em; opacity: .35; font-weight: 400; }
th.is-sortable.sort-asc::after { content: "\25B2"; opacity: .9; }
th.is-sortable.sort-desc::after { content: "\25BC"; opacity: .9; }
th.is-sortable:hover { color: #0d6efd; }
th.is-sortable:focus-visible { outline: 2px solid #0d6efd; outline-offset: -2px; }

/* Every Bulk Action modal is as wide as the Implementation Report Decision view modal of implementation-review.php
   (#implStageModal in includes/impl_stage_page.php: up to 1040px, .5rem from the screen edges).
   !important because the pages also size these modals by id (#deptForwardModal .modal-dialog ...). */
.modal-dialog.bulk-modal-dialog { width: calc(100% - 1rem) !important; max-width: min(1040px, calc(100vw - 1rem)) !important; margin: .5rem auto !important; }
@media (max-width: 575.98px) { .modal-dialog.bulk-modal-dialog { width: calc(100% - .5rem) !important; } }

/* Bulk Action modals: the chosen action is green (save / forward / pay), Return is red, like the button at the bottom.
   An action that has nothing to apply to is disabled and never coloured. */
.bulk-modal-dialog .dept-action-switch .dept-switch-btn.is-active { background: #17803f !important; color: #fff !important; }
.bulk-modal-dialog .dept-action-switch .dept-switch-btn.is-active:is(.return, .sw-return) { background: #c23030 !important; }
.bulk-modal-dialog .dept-action-switch .dept-switch-btn:disabled,
.bulk-modal-dialog .dept-action-switch .dept-switch-btn:disabled:hover { background: transparent !important; color: #8a97ab !important; opacity: .45; cursor: not-allowed; }

/* Copy / CSV / Excel / PDF / Print bar above tables marked data-export (app.js setupExportButtons) */
.export-only-bar { margin: 0 0 10px; }
@media print { .export-only-bar { display: none !important; } }

/* Session timeout: the ring around the hourglass is a countdown - a full circle when the warning opens, shrinking (clockwise, back to
   the top) as the time runs out; red in the last fifth. --session-left (0..1) is set by app.js setupIdleSession. */
.session-warning-modal .session-warning-symbol-wrap:after{border-color:#159c9f !important;transform:none !important;-webkit-mask:conic-gradient(#000 calc(var(--session-left,1) * 360deg),transparent 0);mask:conic-gradient(#000 calc(var(--session-left,1) * 360deg),transparent 0);transition:border-color .3s ease}
/* Session timeout colour stages (app.js sets data-level on the ring and the bar): 100-76% success, 75-51% primary, 50-26% warning, 25-0% danger */
.session-warning-modal .session-warning-symbol-wrap[data-level]:after{border-color:var(--sw-c) !important}
.session-warning-modal .session-warning-symbol-wrap[data-level] .session-warning-symbol{color:var(--sw-i);transition:color .3s ease}
.session-warning-modal .session-countdown-track[data-level] span{background:var(--sw-c) !important;transition:width .3s linear,background-color .3s ease}
.session-warning-modal [data-level="success"]{--sw-c:var(--bs-success,#198754);--sw-i:var(--bs-success,#198754)}
.session-warning-modal [data-level="primary"]{--sw-c:var(--bs-primary,#0d6efd);--sw-i:var(--bs-primary,#0d6efd)}
.session-warning-modal [data-level="warning"]{--sw-c:var(--bs-warning,#ffc107);--sw-i:#b88400}
.session-warning-modal [data-level="danger"]{--sw-c:var(--bs-danger,#dc3545);--sw-i:var(--bs-danger,#dc3545)}