/* Shared brand tokens and PrimeFaces icons, independent of an obsolete theme. */
:root {
    --tracking-primary: #0b84f3;
    --tracking-primary-dark: #0564c4;
}

/* PrimeFaces still emits legacy ui-icon classes; use the bundled PrimeIcons font. */
.ui-icon[class*="ui-icon-"] {
    display: inline-block;
    width: 16px;
    height: 16px;
    font-size: 0;
    overflow: visible;
    text-indent: 0;
    background-image: none;
    line-height: 1;
}
.ui-icon[class*="ui-icon-"]::before {
    font-size: 14px;
    font-family: primeicons;
    font-style: normal;
    font-weight: normal;
    line-height: 1;
    text-indent: 0;
}
.ui-icon-triangle-1-s::before { content: "\e902"; }
.ui-icon-triangle-1-n::before { content: "\e903"; }
.ui-icon-triangle-1-w::before,
.ui-icon-circle-triangle-w::before,
.ui-icon-seek-prev::before { content: "\e900"; }
.ui-icon-triangle-1-e::before,
.ui-icon-circle-triangle-e::before,
.ui-icon-seek-next::before { content: "\e901"; }
.ui-icon-seek-first::before { content: "\e92d"; }
.ui-icon-seek-end::before { content: "\e92e"; }
.ui-icon-check::before { content: "\e909"; }
.ui-icon-minus::before,
.ui-icon-minusthick::before { content: "\e90f"; }
.ui-icon-close::before { content: "\e90b"; }
.ui-icon-search::before { content: "\e908"; }
.ui-icon-calendar::before { content: "\e927"; }

/* PrimeFaces renders a bare i for toggleMask; its native click/key handlers
   and switch label remain unchanged while this stylesheet supplies the eye. */
html body:is(.tracking-body, .tracking-login-body, .public-home, .company-showcase)
    .ui-password:has(> .ui-password-icon) {
    position: relative !important;
    display: inline-flex !important;
    align-items: center;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 44px;
    vertical-align: middle;
}
html body:is(.tracking-body, .tracking-login-body, .public-home, .company-showcase)
    .ui-password:has(> .ui-password-icon) > input.ui-inputfield {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    padding-right: 48px !important;
}
html body:is(.tracking-body, .tracking-login-body, .public-home, .company-showcase)
    .ui-password > .ui-password-icon {
    position: absolute !important;
    top: 50% !important;
    right: 6px !important;
    left: auto !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 36px;
    min-width: 36px;
    height: 36px;
    margin: 0 !important;
    padding: 0;
    border: 1px solid #cee4fa;
    border-radius: 8px;
    color: var(--tracking-primary-dark) !important;
    background: #edf5fd;
    transform: translateY(-50%) !important;
    cursor: pointer;
}
html body:is(.tracking-body, .tracking-login-body, .public-home, .company-showcase)
    .ui-password > .ui-password-icon::before {
    content: "\e966";
    font-family: primeicons !important;
    font-size: 18px !important;
    font-style: normal;
    font-weight: normal;
    line-height: 1;
}
html body:is(.tracking-body, .tracking-login-body, .public-home, .company-showcase)
    .ui-password.ui-password-unmasked > .ui-password-icon::before { content: "\e965"; }
html body:is(.tracking-body, .tracking-login-body, .public-home, .company-showcase)
    .ui-password > .ui-password-icon:hover { background: #deeeff; }
html body:is(.tracking-body, .tracking-login-body, .public-home, .company-showcase)
    .ui-password > .ui-password-icon:focus-visible {
    outline: 2px solid var(--tracking-primary-dark);
    outline-offset: 2px;
}
html body:is(.tracking-body, .tracking-login-body, .public-home, .company-showcase)
    .ui-password:has(> input:disabled) > .ui-password-icon { opacity: .5; cursor: not-allowed; }

/* The public directory has no application theme but uses native PrimeFaces checkboxes. */
body.public-home .ui-chkbox {
    display: inline-flex;
    align-items: center;
    width: auto;
    min-height: 28px;
    vertical-align: middle;
}
body.public-home .ui-chkbox .ui-chkbox-box {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 1px solid #8eafc2 !important;
    border-radius: 6px;
    color: #fff;
    background: #fff;
}
body.public-home .ui-chkbox .ui-chkbox-box.ui-state-active,
body:is(.tracking-body, .public-home) .ui-chkbox .ui-chkbox-box:has(
    .ui-chkbox-icon:is(.ui-icon-minus, .ui-icon-minusthick)) {
    color: #fff !important;
    border-color: var(--tracking-primary) !important;
    background: var(--tracking-primary) !important;
}
body.public-home .ui-chkbox .ui-chkbox-icon {
    width: 16px;
    height: 16px;
    margin: 0 !important;
    font-size: 0 !important;
    color: inherit;
    line-height: 1;
}
body.public-home .ui-chkbox .ui-chkbox-icon::before { color: inherit; font-size: 14px !important; }
body.public-home .ui-chkbox .ui-chkbox-box.ui-state-focus,
body.public-home .ui-chkbox:focus-within .ui-chkbox-box {
    box-shadow: 0 0 0 3px rgba(11, 132, 243, .18);
}
body.public-home .ui-chkbox.ui-state-disabled { opacity: .6; cursor: not-allowed; }

/* PrimeFaces owns the single required-field marker, including business-only indicators. */
html body .ui-outputlabel .ui-outputlabel-rfi {
    color: #c62828 !important;
    font-weight: 700;
}

/* The user name opens the account menu; logout is a separate, explicit action. */
.account-menu { position: relative; }
.account-menu-toggle { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 5px 10px 5px 5px; border: 1px solid #dce8f4; border-radius: 14px; background: #fff; cursor: pointer; list-style: none; }
.account-menu-toggle::-webkit-details-marker { display: none; }
.account-menu-toggle:hover, .account-menu[open] .account-menu-toggle { border-color: #b8d8f8; background: #f4f9fe; }
.account-menu-toggle:focus-visible { outline: 2px solid var(--tracking-primary); outline-offset: 3px; }
.account-menu-copy { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.account-menu-copy strong { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.account-menu-copy small { color: #61738a; font-size: 10px; }
.account-menu-arrow { color: #61738a; font-size: 10px; transition: transform .15s; }
.account-menu[open] .account-menu-arrow { transform: rotate(180deg); }
.account-menu-panel { position: absolute; top: calc(100% + 10px); right: 0; z-index: 1100; width: 250px; max-width: calc(100vw - 24px); padding: 8px; border: 1px solid #dce8f4; border-radius: 15px; background: #fff; box-shadow: 0 14px 36px rgba(9,33,63,.16); }
.account-menu-identity { padding: 10px 12px 14px; margin-bottom: 5px; border-bottom: 1px solid #e7eff6; overflow-wrap: anywhere; }
.account-menu-identity strong, .account-menu-identity span { display: block; }
.account-menu-identity strong { font-size: 13px; color: #12263f; }
.account-menu-identity span { margin-top: 3px; font-size: 11px; color: #61738a; }
.account-menu-logout, .account-menu-profile { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 10px 12px; border-radius: 9px; font-size: 12px; font-weight: 650; text-decoration: none; }
.account-menu-logout { color: #bd3445 !important; }
.account-menu-logout:hover { background: #fff0f2; }
.account-menu-profile { color: #12263f; }
.account-menu-profile:hover { background: #edf5fd; }
@media (max-width: 700px) {
    .account-menu-copy { display: none; }
    .account-menu-toggle { padding: 4px; gap: 5px; min-height: 40px; }
    .account-menu-arrow { margin-right: 3px; }
}

/* Navigation by task, with at most two expandable levels. */
.tracking-nav .nav-group > summary { font-size: 13px; line-height: 1.35; }
.tracking-nav .nav-submenu { margin-left: 19px; padding-left: 12px; }
.tracking-nav .nav-submenu .nav-group > summary { min-height: 38px; padding: 7px 10px; font-size: 12px; font-weight: 600; gap: 8px; }
.tracking-nav .nav-submenu .nav-group .nav-icon { width: 22px; height: 22px; flex-basis: 22px; background: transparent; }
.tracking-nav .nav-submenu .nav-submenu { margin-left: 10px; padding-left: 8px; }
.tracking-nav .contains-active > summary { color: var(--tracking-primary-dark); }
.tracking-nav .nav-sublink { line-height: 1.4; }
.tracking-nav .nav-sublink > i { flex: 0 0 16px; text-align: center; }
.tracking-nav summary:focus-visible, .tracking-nav a:focus-visible { outline: 2px solid var(--tracking-primary); outline-offset: 2px; }
.tracking-nav .nav-group .nav-group[open] > summary .group-chevron { transform: rotate(180deg); }
.tracking-nav .nav-group .nav-group:not([open]) > summary .group-chevron { transform: none; }
