/* ============================================================================
   shell.css  —  App-wide shell: fixed nav rail + light top bar + content area.
   Part of the 2026 UI refresh (UI-Refresh.md). Brand-aware via --color-sf-*
   tokens (so it re-themes per tenant); neutrals fixed (light-modern). Desktop
   only, min 1024px. Loaded after the brand file in App.razor.
   ============================================================================ */

/* Clarion wordmark font — the ONE place to swap the "atrangi" display font. System-font stack (no web
   dependency); resolves to a script/calligraphic face on Windows, degrades to generic cursive elsewhere.
   To pin it cross-platform, self-host a .woff2 with @font-face and point this at it. */
:root {
    --clarion-font: 'Segoe Script', 'Gabriola', 'Brush Script MT', 'Comic Sans MS', cursive;
}

.app-shell {
    display: flex;
    min-height: 100vh;
    min-width: 1024px;
}

/* ---- Nav rail (main, icon-only 64px) ---------------------------------------- */
.nav-rail {
    width: 64px;
    flex: none;
    background: #17233F;
    z-index: 40;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 0;
    position: sticky;
    top: 0;
    height: 100vh;
}

/* Admin gear is bottom-pinned by the spacer — lift it up so the page's horizontal scrollbar can't clip it */
.nav-rail .rail-admin {
    position: relative;
    bottom: 15px;
}

/* Rail logo now hosts the Titan-Techs company mark (moved here from the top bar; the top bar carries the
   Clarion product brand). White tile so the coloured logo reads on the dark navy rail. */
.nav-rail .rail-logo {
    width: 46px;
    height: 46px;
    border-radius: 11px;
    margin-bottom: 14px;
    background: #fff;
    display: grid;
    place-items: center;
    padding: 4px;
    flex: none;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}

.nav-rail .rail-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.nav-rail .rail-item {
    position: relative;
    width: 46px;
    height: 46px;
    border-radius: 11px;
    margin: 3px 0;
    flex: none;
    display: grid;
    place-items: center;
    color: #8791a5;
    font-size: 21px;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
}

.nav-rail .rail-item:hover {
    color: #fff;
    background: #243456;
}

.nav-rail .rail-item.active {
    color: #fff;
    background: rgb(var(--color-sf-primary));
}

.nav-rail .rail-item.active::before {
    content: "";
    position: absolute;
    left: -12px;
    top: 10px;
    bottom: 10px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: rgb(var(--color-sf-primary));
}

.nav-rail .rail-spacer {
    flex: 1 1 auto;
}

.nav-rail .rail-item .tip {
    position: absolute;
    left: 54px;
    top: 50%;
    transform: translateY(-50%);
    background: #17233F;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 9px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .12s ease;
    z-index: 60;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
}

.nav-rail .rail-item:hover .tip {
    opacity: 1;
}

/* ---- Nav rail (admin workspace, labeled 232px) ------------------------------ */
.nav-rail.admin {
    width: 190px;
    align-items: stretch;
    padding: 12px 7px;
    overflow-y: auto;
}

.nav-rail.admin .admin-back {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #c7cedb;
    font-size: 13px;
    font-weight: 600;
    padding: 9px 11px;
    border-radius: 9px;
    text-decoration: none;
    margin-bottom: 6px;
    flex: none;
}

.nav-rail.admin .admin-back:hover {
    background: #243456;
    color: #fff;
}

.nav-rail.admin .admin-group {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #6b7488;
    font-weight: 700;
    padding: 12px 11px 5px;
}

.nav-rail.admin .admin-link {
    display: flex;
    align-items: center;
    gap: 11px;
    color: #aeb6c6;
    font-size: 13px;
    padding: 8px 11px;
    border-radius: 8px;
    text-decoration: none;
    transition: background .12s ease, color .12s ease;
}

.nav-rail.admin .admin-link:hover {
    background: #243456;
    color: #fff;
}

.nav-rail.admin .admin-link.active {
    background: rgb(var(--color-sf-primary));
    color: #fff;
}

.nav-rail.admin .admin-link .ic {
    font-size: 16px;
    width: 18px;
    text-align: center;
    flex: none;
}

.nav-rail .rail-item:focus-visible,
.nav-rail.admin .admin-link:focus-visible,
.nav-rail.admin .admin-back:focus-visible {
    outline: 2px solid #fff;
    outline-offset: -2px;
}

/* ---- Main column ------------------------------------------------------------ */
.app-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* ---- Top bar (brand-coloured; white text) — tenant primary via --color-sf-primary --- */
.top-bar {
    height: 56px;
    flex: none;
    background: rgb(var(--color-sf-primary));
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 30;
    box-shadow: 0 1px 0 rgba(0, 0, 0, .14), 0 2px 12px rgba(0, 0, 0, .08);
}

/* Clarion product brand (left of the top bar; atrangi wordmark swappable via --clarion-font).
   The mark is icofont-horn in the brand's gold accent; the name uses a display/script stack. */
.top-bar .tb-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    flex: none;
    position: relative;
    z-index: 1; /* sits above the absolutely-centred page title */
}

.top-bar .tb-brand-mark {
    font-size: 42px;
    line-height: 1;
    color: rgb(var(--color-sf-secondary)); /* gold horn on the maroon bar */
    user-select: none; /* Standard syntax */
    -webkit-user-select: none; /* Chrome, Safari */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none;
}

.top-bar .tb-brand-name {
    font-family: var(--clarion-font, 'Segoe Script', 'Gabriola', 'Brush Script MT', cursive);
    font-size: 32px;
    font-weight: 400;
    line-height: 1;
    color: #fff;
    padding-bottom: 3px; /* script fonts sit high; nudge to optical centre */
    user-select: none; /* Standard syntax */
    -webkit-user-select: none; /* Chrome, Safari */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none;
}

/* Page title — dead-centre of the top bar (the bar is a positioned/sticky element, so absolute
   anchors to it, i.e. the area right of the nav rail). pointer-events off so it never blocks clicks. */
.top-bar .tb-title {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    font-size: 21px;
    font-weight: 600; 
    color: rgba(255, 255, 255, .92);
    letter-spacing: .02em;
    white-space: nowrap;
    pointer-events: none;
}

.top-bar .tb-spacer {
    flex: 1 1 auto;
}

.top-bar .tb-bell {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, .28);
    background: rgba(255, 255, 255, .12);
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}

.top-bar .tb-bell:hover {
    background: rgba(255, 255, 255, .22);
}

.top-bar .tb-alert-count {
    position: absolute;
    top: -7px;
    right: -7px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 10px;
    background: #FFC53D;
    border: 2px solid rgb(var(--color-sf-primary)); /* bright dot pops on any brand ground */
    color: #541017;
    display: grid;
    place-items: center;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
}

.top-bar .tb-alert-wrap {
    position: relative;
}

.top-bar .tb-global-search-wrap {
    position: relative;
}

.top-bar .tb-global-search-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    z-index: 95;
    width: min(480px, calc(100vw - 24px));
    overflow: hidden;
    border: 1px solid #E0E4EA;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(20, 24, 32, .22);
    color: #20242B;
}

.top-bar .tb-global-search-menu > header,
.top-bar .tb-global-search-menu > footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 15px;
    background: #FAFBFC;
}

.top-bar .tb-global-search-menu > header {
    border-bottom: 1px solid #ECEFF3;
}

.top-bar .tb-global-search-menu > header strong,
.top-bar .tb-global-search-menu > header small {
    display: block;
}

.top-bar .tb-global-search-menu > header strong {
    color: #242831;
    font-size: 15px;
}

.top-bar .tb-global-search-menu > header small {
    margin-top: 2px;
    color: #717783;
    font-size: 11.5px;
}

.top-bar .tb-global-search-menu > header > button {
    width: 29px;
    height: 29px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #626975;
    cursor: pointer;
}

.top-bar .tb-global-search-body {
    padding: 14px 15px;
}

.top-bar .tb-global-search-body label {
    display: block;
    margin-bottom: 6px;
    color: #344054;
    font-size: 12px;
    font-weight: 700;
}

.top-bar .tb-global-search-body textarea {
    box-sizing: border-box;
    width: 100%;
    min-height: 94px;
    resize: vertical;
    border: 1px solid #C9CFD8;
    border-radius: 8px;
    padding: 10px 11px;
    outline: none;
    color: #20242B;
    font-family: inherit;
    font-size: 12.5px;
    line-height: 1.45;
}

.top-bar .tb-global-search-body textarea:focus {
    border-color: rgb(var(--color-sf-primary));
    box-shadow: 0 0 0 3px rgba(var(--color-sf-primary), .12);
}

.top-bar .tb-global-search-examples {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.top-bar .tb-global-search-examples button {
    border: 0;
    background: transparent;
    padding: 2px 0;
    color: #5A6380;
    font-size: 10.5px;
    text-decoration: underline;
    cursor: pointer;
}

.top-bar .tb-global-search-examples button + button {
    margin-left: 9px;
}

.top-bar .tb-global-search-message {
    margin-top: 9px;
    border-radius: 7px;
    padding: 8px 10px;
    background: #EEF7F0;
    color: #286437;
    font-size: 11px;
}

.top-bar .tb-global-search-message.is-error {
    background: #FCEBEC;
    color: #9B1C24;
}

.top-bar .tb-global-search-menu > footer {
    border-top: 1px solid #ECEFF3;
}

.top-bar .tb-global-search-menu > footer > span {
    color: #717783;
    font-size: 10.5px;
}

.top-bar .tb-global-search-menu > footer > button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex: none;
    min-height: 34px;
    border: 0;
    border-radius: 8px;
    padding: 0 13px;
    background: rgb(var(--color-sf-primary));
    color: #fff;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
}

.top-bar .tb-global-search-menu > footer > button:disabled {
    opacity: .55;
    cursor: default;
}

.top-bar .tb-alert-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    z-index: 90;
    width: min(430px, calc(100vw - 24px));
    overflow: hidden;
    background: #fff;
    border: 1px solid #E0E4EA;
    border-radius: 13px;
    box-shadow: 0 18px 48px rgba(20, 24, 32, .22);
    color: #20242B;
}

.top-bar .tb-alert-menu > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 15px 12px;
    border-bottom: 1px solid #ECEFF3;
    background: #FAFBFC;
}

.top-bar .tb-alert-menu > header strong,
.top-bar .tb-alert-menu > header small {
    display: block;
}

.top-bar .tb-alert-menu > header strong {
    font-size: 15px;
    color: #242831;
}

.top-bar .tb-alert-menu > header small {
    color: #717783;
    font-size: 11.5px;
    margin-top: 2px;
}

.top-bar .tb-alert-header-actions {
    display: flex;
    gap: 4px;
}

.top-bar .tb-alert-header-actions button {
    width: 29px;
    height: 29px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #626975;
    cursor: pointer;
}

.top-bar .tb-alert-header-actions button:hover {
    background: #ECEFF3;
    color: rgb(var(--color-sf-primary));
}

.top-bar .tb-agenda-list {
    max-height: min(510px, calc(100vh - 150px));
    overflow-y: auto;
}

.top-bar .tb-alert-section-heading {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 13px;
    border-bottom: 1px solid #E8EBEF;
    background: #F5F7F9;
    color: #4F5661;
}

.top-bar .tb-alert-section-heading.is-activity {
    border-top: 1px solid #DDE1E6;
}

.top-bar .tb-alert-section-heading span {
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.top-bar .tb-alert-section-heading small {
    color: #858B95;
    font-size: 10px;
}

.top-bar .tb-agenda-empty {
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #777E89;
    font-size: 13px;
}

.top-bar .tb-agenda-empty.is-compact {
    min-height: 72px;
}

.top-bar .tb-agenda-empty i {
    color: #43A047;
    font-size: 18px;
}

.top-bar .tb-agenda-item {
    width: 100%;
    display: grid;
    grid-template-columns: 52px 34px minmax(0, 1fr) 16px;
    gap: 9px;
    align-items: start;
    padding: 12px 13px;
    border: 0;
    border-bottom: 1px solid #EEF0F3;
    background: #fff;
    color: inherit;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.top-bar .tb-agenda-item:hover {
    background: #F8F9FB;
}

.top-bar .tb-activity-item {
    width: 100%;
    display: grid;
    grid-template-columns: 52px 34px minmax(0, 1fr);
    gap: 9px;
    align-items: start;
    padding: 12px 13px;
    border-bottom: 1px solid #EEF0F3;
    background: #fff;
    color: inherit;
    text-align: left;
}

.top-bar .tb-agenda-time {
    color: #686F7A;
    font-size: 10.5px;
    font-weight: 650;
    padding-top: 9px;
    white-space: nowrap;
}

.top-bar .tb-agenda-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    font-size: 15px;
}

.top-bar .tb-agenda-item.is-alert .tb-agenda-icon {
    color: #8A3B00;
    background: #FFF0DB;
}

.top-bar .tb-agenda-item.is-interview .tb-agenda-icon {
    color: #6D1830;
    background: #F7E8ED;
}

.top-bar .tb-agenda-item.is-due .tb-agenda-icon {
    color: #6B5900;
    background: #FFF8CE;
}

.top-bar .tb-activity-item.is-candidate .tb-agenda-icon {
    color: #1D5D42;
    background: #E4F5EC;
}

.top-bar .tb-activity-item.is-requisition .tb-agenda-icon {
    color: #5A467A;
    background: #EEE8F7;
}

.top-bar .tb-activity-item.is-submission .tb-agenda-icon {
    color: #155D78;
    background: #E2F2F8;
}

.top-bar .tb-activity-item.is-status .tb-agenda-icon {
    color: #6D1830;
    background: #F7E8ED;
}

.top-bar .tb-agenda-copy {
    min-width: 0;
}

.top-bar .tb-agenda-kind,
.top-bar .tb-agenda-copy strong,
.top-bar .tb-agenda-copy small,
.top-bar .tb-agenda-copy em {
    display: block;
}

.top-bar .tb-activity-details {
    display: block;
    margin-top: 4px;
    color: #555D68;
    font-size: 11.5px;
    line-height: 1.35;
}

.top-bar .tb-activity-details div,
.top-bar .tb-activity-details p {
    margin: 0;
}

.top-bar .tb-agenda-kind {
    color: rgb(var(--color-sf-primary));
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.top-bar .tb-agenda-copy strong {
    color: #272B33;
    font-size: 12.5px;
    line-height: 1.25;
    margin-top: 2px;
}

.top-bar .tb-agenda-copy small {
    color: #555D68;
    display: -webkit-box;
    font-size: 11.5px;
    line-height: 1.35;
    margin-top: 3px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.top-bar .tb-agenda-copy em {
    color: #858B95;
    font-size: 10.5px;
    font-style: normal;
    margin-top: 4px;
}

.top-bar .tb-agenda-go {
    align-self: center;
    color: #A3A8B0;
    font-size: 13px;
}

.top-bar .tb-alert-menu > footer {
    padding: 8px 14px;
    background: #FAFBFC;
    border-top: 1px solid #ECEFF3;
    color: #737A85;
    font-size: 10.5px;
    text-align: right;
}

/* Live activity is provider-wrapped by LiveActivityToastHost; these selectors are the only
   Syncfusion-specific presentation detail exposed to the shell. */
#live-activity-toast.e-toast-container {
    top: auto !important;
    bottom: 16px !important;
    right: 16px !important;
    z-index: 10020 !important;
}

#live-activity-toast .e-toast.live-activity-toast {
    border: 1px solid #E0E4EA;
    border-left: 4px solid rgb(var(--color-sf-primary));
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 12px 35px rgba(20, 24, 32, .22);
}

#live-activity-toast .e-toast-icon {
    color: rgb(var(--color-sf-primary));
}

#live-activity-toast .live-toast-copy {
    color: #272B33;
    line-height: 1.35;
}

#live-activity-toast .live-toast-copy > strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
}

#live-activity-toast .live-toast-date {
    display: block;
    margin-top: 5px;
    color: #686F7A;
    font-size: 11.5px;
    font-weight: 650;
}

#live-activity-toast .live-toast-details {
    margin-top: 6px;
    color: #555D68;
    font-size: 11.5px;
    line-height: 1.35;
}

#live-activity-toast .live-toast-details div,
#live-activity-toast .live-toast-details p {
    margin: 0;
}

@media (max-width: 600px) {
    #live-activity-toast.e-toast-container {
        top: auto !important;
        bottom: 8px !important;
        right: 8px !important;
        left: 8px !important;
        width: auto !important;
    }

    #live-activity-toast .e-toast {
        width: 100% !important;
    }
}

.top-bar .tb-user-menu-wrap {
    position: relative;
}

.top-bar .tb-user {
    display: flex;
    align-items: center;
    gap: 9px;
    background: transparent;
    border: 0;
    border-radius: 9px;
    cursor: pointer;
    font: inherit;
    padding: 3px 6px 3px 3px;
    text-align: left;
}

.top-bar .tb-user:hover,
.top-bar .tb-user[aria-expanded="true"] {
    background: rgba(255, 255, 255, .14);
}

.top-bar .tb-user .av {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #fff;
    color: rgb(var(--color-sf-primary));
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 13px;
    flex: none;
}

.top-bar .tb-user-copy {
    display: block;
}

.top-bar .tb-user .nm {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: #fff;
    line-height: 1.15;
}

.top-bar .tb-user .rl {
    display: block;
    font-size: 11px;
    color: rgba(255, 255, 255, .72);
}

.top-bar .tb-user-chevron {
    color: rgba(255, 255, 255, .78);
    font-size: 13px;
    transition: transform .15s ease;
}

.top-bar .tb-user[aria-expanded="true"] .tb-user-chevron {
    transform: rotate(180deg);
}

.top-bar .tb-user-menu {
    background: #fff;
    border: 1px solid #E0E4EA;
    border-radius: 10px;
    box-shadow: 0 14px 38px rgba(20, 24, 32, .18);
    min-width: 230px;
    padding: 6px;
    position: absolute;
    right: 0;
    top: calc(100% + 9px);
    z-index: 80;
}

.top-bar .tb-user-menu::before {
    border-bottom: 7px solid #fff;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    content: "";
    position: absolute;
    right: 21px;
    top: -7px;
}

.top-bar .tb-user-menu button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 7px;
    color: #252A33;
    cursor: pointer;
    display: flex;
    font: inherit;
    gap: 11px;
    padding: 10px;
    text-align: left;
    width: 100%;
}

.top-bar .tb-user-menu button:hover {
    background: #F3F5F8;
}

.top-bar .tb-user-menu button > i {
    color: rgb(var(--color-sf-primary));
    font-size: 20px;
}

.top-bar .tb-user-menu button span,
.top-bar .tb-user-menu button strong,
.top-bar .tb-user-menu button small {
    display: block;
}

.top-bar .tb-user-menu button strong {
    font-size: 13px;
}

.top-bar .tb-user-menu button small {
    color: #6E7683;
    font-size: 11px;
    font-weight: 400;
    margin-top: 2px;
}

.top-bar .tb-logout {
    margin-left: 4px;
    border: 1px solid rgba(255, 255, 255, .30);
    background: rgba(255, 255, 255, .10);
    border-radius: 8px;
    padding: 7px 11px;
    font-size: 12.5px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    display: flex;
    gap: 6px;
    align-items: center;
}

.top-bar .tb-logout:hover {
    background: rgba(255, 255, 255, .20);
}

/* ---- Content area ----------------------------------------------------------- */
.app-content {
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    background: #F4F6FA;
    overflow: auto;
}

@media (prefers-reduced-motion: reduce) {
    .nav-rail *, .top-bar * {
        transition: none !important;
    }
}

/* ---- Scrollbars: thin, neutral, floating (was heavy maroon track + gold/dark thumb in styles.css) --- */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: transparent !important;
    border: none !important;
}

::-webkit-scrollbar-thumb {
    background: #C4CAD6 !important;
    border: 3px solid transparent !important; /* padding-box border = a floating, inset thumb */
    background-clip: padding-box !important;
    border-radius: 10px !important;
    box-shadow: none !important; /* kills the old inset-black shadow */
    -webkit-box-shadow: none !important;
}

::-webkit-scrollbar-thumb:hover {
    background: #A7AFBF !important;
}

::-webkit-scrollbar-corner {
    background: transparent !important;
}

/* Firefox — beat the styles.css `body, form, html { scrollbar-color }` rule */
html, body, form {
    scrollbar-width: thin;
    scrollbar-color: #C4CAD6 transparent !important;
}

* {
    scrollbar-width: thin;
    scrollbar-color: #C4CAD6 transparent;
}
