:root {
    /* The platform palette, shared with Trelity Internal, Automations and Production: navy primary,
       the blue accent, and the pale ground the page sheet floats on. */
    --tp-primary: #00183c;
    --tp-primary-dark: #234692;
    --tp-text: #1c1c28;
    --tp-text-muted: #4a4f5c;
    --tp-border: #dfe1e6;
    --tp-sidebar-bg: #f6f9ec;
    --tp-sidebar-border: #e2e4e8;
    /* Roboto is what Trelity Internal renders in — it leaves MudBlazor's default family alone — so
       the two apps read as one product. Set explicitly rather than relying on that default. */
    --mud-typography-default-family: 'Roboto', 'Helvetica', 'Arial', sans-serif;
}

/* The MudLayout shell owns the scrolling (the page sheet scrolls inside it), so the document
   itself must not scroll — same setup as ReviewHub. */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    font-family: 'Roboto', 'Helvetica', 'Arial', sans-serif;
    color: var(--tp-text);
}

/* Background lives on body only, never on html: the boot splash columns sit at z-index -1 and
   are only visible when body's background is the one propagated to the canvas. Same as the
   other Trelity apps. */
body {
    background: #f6f9ec;
}

#app {
    height: 100%;
}

*, *::before, *::after {
    box-sizing: border-box;
}

a {
    color: var(--tp-primary);
    text-decoration: none;
}

a:hover {
    color: var(--tp-primary-dark);
}

h1:focus {
    outline: none;
}

/* ---------- Layout ---------- */

/* Padding around the page sheet, tightening on narrow screens (shared with the other Trelity apps) */
.pr-p-4 {
    padding: 16px !important;
}

@media (max-width: 1300px) {
    .pr-p-4 {
        padding: 10px !important;
    }
}

/* ---------- Drawer navigation ---------- */

.nav-brand-stack {
    padding-bottom: min(4vw, 12px);
    padding-top: min(4vw, 12px);
    width: 100%;
}

/* Product switcher: the current wordmark is the trigger, the menu lists the sibling sites. */
.nav-domain-menu-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: min(220px, calc(100vw - 32px));
    max-width: 100%;
    padding: 8px 6px;
    border: 0;
    border-radius: 12px;
    color: var(--tp-primary);
    background: transparent;
    cursor: pointer;
    font: inherit;
    transition: background-color .15s ease-in-out;
}

    .nav-domain-menu-trigger:hover,
    .nav-domain-menu-trigger:focus-visible,
    .nav-domain-menu-trigger[aria-expanded="true"] {
        background: rgba(255, 255, 255, .72);
    }

    .nav-domain-menu-trigger:focus-visible {
        outline: 2px solid var(--tp-primary-dark);
        outline-offset: 2px;
    }

.nav-domain-current-logo {
    display: block;
    width: min(180px, calc(100vw - 70px));
    max-width: 100%;
    height: auto;
}

.nav-domain-menu-chevron {
    flex: 0 0 auto;
    color: var(--tp-primary);
    transition: transform .15s ease-in-out;
}

.nav-domain-menu-trigger[aria-expanded="true"] .nav-domain-menu-chevron {
    transform: rotate(180deg);
}

.nav-domain-menu-popover {
    width: min(220px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
}

.nav-domain-menu-list {
    width: 100%;
    padding: 6px !important;
}

.nav-domain-menu-item {
    min-height: 54px;
    padding: 10px 12px !important;
    border-radius: 10px;
}

.nav-domain-menu-logo {
    display: block;
    width: 100%;
    max-width: 174px;
    height: auto;
}

@media (max-width: 420px) {
    .nav-domain-menu-trigger {
        width: min(200px, calc(100vw - 24px));
        padding-inline: 4px;
    }

    .nav-domain-current-logo {
        width: min(160px, calc(100vw - 64px));
    }

    .nav-domain-menu-popover {
        width: min(200px, calc(100vw - 16px));
        max-width: calc(100vw - 16px);
    }
}

/* Text buttons with a leading icon, as in Trelity Internal's NavMenu. The active state is an
   addition: that sidebar has no current-page indicator, and losing it here would be a regression. */
.tp-nav-link {
    text-transform: none;
    letter-spacing: normal;
}

.tp-nav-link.active {
    background: rgba(0, 24, 60, .10);
    font-weight: 600;
}

.tp-user-card {
    background: #fff;
    width: calc(100% - 10px);
    max-width: calc(100% - 10px);
    cursor: default;
}

.tp-user-card-name {
    font-weight: 800;
    font-size: 13.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tp-user-card-sub {
    font-size: 11px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tp-user-card-logout {
    color: #000;
}

/* ---------- Public careers page ---------- */

.tp-public-title {
    margin: 0 0 60px 0;
    font-size: 26px;
    font-weight: 600;
    color: #3a3f4c;
}

.tp-public-table {
    width: auto;
    margin-bottom: 0;
}

.tp-job-name {
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.tp-job-name:hover {
    color: var(--tp-primary);
}

.tp-action-cell {
    padding: 10px 16px;
    text-align: center;
}

.tp-row-apply {
    background: var(--tp-primary);
    color: #fff;
    border: none;
    padding: 9px 20px;
    border-radius: 5px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(99, 85, 224, 0.3);
}

.tp-row-apply:hover {
    background: var(--tp-primary-dark);
}

.tp-row-edit {
    background: #fff;
    color: var(--tp-primary);
    border: 1px solid var(--tp-primary);
    padding: 8px 18px;
    border-radius: 5px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.tp-row-edit:hover {
    background: #f1effd;
}

.tp-row-delete {
    background: #fff;
    color: #e5484d;
    border: 1px solid #e5484d;
    padding: 8px 14px;
    border-radius: 5px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    margin-left: 8px;
}

.tp-row-delete:hover {
    background: #fdeeee;
}

.tp-empty-message {
    text-align: center;
    color: #8a8f9a;
    font-size: 14px;
    padding: 22px 16px;
}

/* ---------- Pipeline dialog ---------- */

.tp-dialog-subtitle {
    margin: 6px 0 12px 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--tp-text);
}

.tp-steps-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--tp-border);
}

.tp-steps-table th {
    text-align: left;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 700;
    color: #2b2b38;
    border-bottom: 1px solid var(--tp-border);
}

.tp-steps-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--tp-border);
    vertical-align: middle;
}

.tp-steps-table tr:last-child td {
    border-bottom: none;
}

.tp-step-order {
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #8a8f9a;
}

.tp-step-check {
    text-align: center;
}

.tp-step-actions {
    text-align: center;
    white-space: nowrap;
}

/* ---------- Candidates tab ---------- */

.tp-cand-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.tp-view-toggle {
    display: inline-flex;
    border: 1px solid #d9dbe2;
    border-radius: 6px;
    overflow: hidden;
}

.tp-view-toggle button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    background: #fff;
    color: var(--tp-text-muted);
}

.tp-view-toggle button.active {
    background: var(--tp-primary);
    color: #fff;
}

/* Candidate free-text search: magnifier and clear button overlaid on the input. */
.tp-cand-search {
    position: relative;
    display: flex;
    align-items: center;
}

.tp-cand-search > svg {
    position: absolute;
    left: 11px;
    color: var(--tp-text-muted);
    pointer-events: none;
}

.tp-cand-search input {
    width: 270px;
    height: 39px;
    padding-left: 33px;
    padding-right: 30px;
}

/* The native search widget's own clear affordance would sit under ours. */
.tp-cand-search input::-webkit-search-cancel-button {
    display: none;
}

.tp-cand-search-clear {
    position: absolute;
    right: 8px;
    display: flex;
    align-items: center;
    padding: 3px;
    border: none;
    border-radius: 3px;
    background: none;
    color: var(--tp-text-muted);
    cursor: pointer;
}

.tp-cand-search-clear:hover {
    color: var(--tp-text);
}

.tp-cand-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: flex-end;
    margin-bottom: 16px;
}

.tp-cand-filter {
    min-width: 200px;
    max-width: 260px;
    flex: 1 1 200px;
}

/* The search box and the view toggle share the filter rows with the selects; both keep their own
   width and sit on the row's baseline instead of stretching. */
.tp-cand-filters .tp-cand-filter-item,
.tp-kanban-filters .tp-cand-filter-item {
    flex: 0 0 auto;
}

/* The kanban pickers carry their own bottom margin, so the two extras have to match it. */
.tp-kanban-filters .tp-cand-filter-item {
    margin-bottom: 16px;
}

.tp-filter-clear {
    background: #fff;
    color: var(--tp-text-muted);
    border: 1px solid #d9dbe2;
    padding: 9px 16px;
    border-radius: 5px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.tp-filter-clear:hover {
    background: #f4f4f7;
    color: var(--tp-text);
}

.tp-filter-count {
    margin-left: auto;
    padding-bottom: 10px;
    font-size: 13px;
    color: var(--tp-text-muted);
}

.tp-sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.tp-sortable:hover {
    color: var(--tp-primary);
}

.tp-sort-arrow {
    font-size: 10px;
    color: var(--tp-primary);
}

.tp-sort-arrow-idle {
    color: #c3c6cf;
}

.tp-kanban-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}

.tp-kanban-picker {
    min-width: 220px;
    max-width: 320px;
    margin-bottom: 16px;
}

.tp-kanban {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    overflow-x: auto;
    padding-bottom: 12px;
}

.tp-kanban-col {
    flex: 0 0 250px;
    width: 250px;
}

.tp-kanban-col-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.tp-kanban-step {
    display: inline-block;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 13px;
    border-radius: 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 190px;
}

.tp-kanban-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    border-radius: 20px;
    border: 1px solid #d9dbe2;
    background: #fff;
    font-size: 12px;
    font-weight: 700;
    color: var(--tp-text-muted);
}

.tp-kanban-cards {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.tp-kanban-card {
    border-radius: 8px;
    padding: 14px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    cursor: pointer;
}

.tp-kanban-card:hover {
    border-color: var(--tp-primary);
}

.tp-kanban-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 10px;
}

.tp-kanban-card-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--tp-text);
    text-align: center;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tp-kanban-move {
    flex: 0 0 auto;
    display: flex;
    background: none;
    border: none;
    padding: 2px;
    cursor: pointer;
    color: #8a8f9a;
}

.tp-kanban-move:hover {
    color: var(--tp-primary);
}

.tp-kanban-move-spacer {
    flex: 0 0 18px;
}

.tp-kanban-card-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: var(--tp-text-muted);
}

.tp-kanban-card-details span {
    font-weight: 700;
    color: #2b2b38;
}

.tp-kanban-card-bar {
    height: 9px;
    width: 70%;
    border-radius: 3px;
    margin: 10px 0 12px 0;
}

.tp-kanban-reviews {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.tp-kanban-no-reviews {
    font-size: 12px;
    color: #8a8f9a;
    font-style: italic;
}

.tp-kanban-review {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.tp-kanban-reviewer {
    font-size: 12.5px;
    color: #3a3a48;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tp-kanban-eval {
    display: inline-block;
    flex: 0 0 auto;
    white-space: nowrap;
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
}

/* ---------- Candidate details dialog ---------- */

.tp-cand-detail {
    display: grid;
    grid-template-columns: 240px minmax(380px, 1fr) 300px;
    gap: 24px;
}

@media (max-width: 1100px) {
    .tp-cand-detail {
        grid-template-columns: 1fr;
    }

    .tp-cand-info,
    .tp-cand-summaries {
        border-right: none;
        padding-right: 0;
    }
}

.tp-cand-info {
    border-right: 1px solid var(--tp-sidebar-border);
    padding-right: 24px;
}

.tp-cand-summaries {
    border-right: 1px solid var(--tp-sidebar-border);
    padding-right: 24px;
}

.tp-cand-summaries h3 {
    margin: 0 0 14px 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--tp-primary);
}

.tp-summary-card {
    border: 1px solid var(--tp-border);
    border-radius: 10px;
    background: #fff;
    padding: 14px;
    margin-bottom: 14px;
}

.tp-summary-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.tp-summary-toggle {
    display: flex;
    align-items: center;
    gap: 7px;
    flex: 1;
    min-width: 0;
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    color: var(--tp-text);
    cursor: pointer;
    text-align: left;
}

.tp-summary-toggle .tp-summary-spark {
    color: var(--tp-primary);
    flex: none;
}

.tp-summary-toggle .tp-summary-chev {
    flex: none;
    color: #9a9fab;
    transition: transform .15s ease;
}

.tp-summary-card.is-open .tp-summary-toggle .tp-summary-chev {
    transform: rotate(90deg);
}

.tp-summary-toggle span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tp-summary-gen {
    border: 1px solid var(--tp-primary);
    background: #fff;
    color: var(--tp-primary);
    padding: 5px 12px;
    border-radius: 999px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, color .15s;
}

.tp-summary-gen:hover:not(:disabled) {
    background: var(--tp-primary);
    color: #fff;
}

.tp-summary-gen:disabled {
    opacity: .55;
    cursor: default;
}

.tp-summary-body {
    font-size: 13px;
    line-height: 1.65;
    color: var(--tp-text-muted);
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

.tp-summary-empty {
    font-size: 12.5px;
    color: #9a9fab;
    font-style: italic;
}

/* ---------- AI ATS score ---------- */

/* One colour scale for every score in the app: the details panel, the list rows and the kanban cards. */
.tp-score-strong {
    --tp-score-color: #0b7a5b;
    --tp-score-soft: #d9f3ea;
}

.tp-score-good {
    --tp-score-color: #12b886;
    --tp-score-soft: #e0f5ee;
}

.tp-score-fair {
    --tp-score-color: #d9932a;
    --tp-score-soft: #fdf3d7;
}

.tp-score-weak {
    --tp-score-color: #e5484d;
    --tp-score-soft: #fbdedf;
}

.tp-ats {
    border: 1px solid var(--tp-border);
    border-radius: 10px;
    background: #fff;
    padding: 14px;
    margin-bottom: 22px;
}

.tp-ats-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.tp-ats-heading {
    min-width: 0;
}

.tp-ats-band {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--tp-score-soft);
    color: var(--tp-score-color);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .3px;
    text-transform: uppercase;
}

.tp-ats-meta {
    margin-top: 5px;
    font-size: 11.5px;
    line-height: 1.5;
    color: #9a9fab;
    overflow-wrap: break-word;
}

.tp-ats-overall {
    flex: none;
    display: flex;
    align-items: baseline;
    gap: 2px;
    color: var(--tp-score-color);
}

.tp-ats-overall span {
    font-size: 32px;
    font-weight: 800;
    line-height: 1;
}

.tp-ats-overall small {
    font-size: 11px;
    font-weight: 600;
    color: #9a9fab;
}

.tp-ats-criterion {
    margin-bottom: 12px;
}

.tp-ats-criterion-head {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 5px;
}

.tp-ats-criterion-name {
    flex: 1;
    min-width: 0;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--tp-text);
}

.tp-ats-criterion-weight {
    font-size: 10.5px;
    font-weight: 600;
    color: #9a9fab;
}

.tp-ats-criterion-score {
    min-width: 30px;
    text-align: right;
    font-size: 13px;
    font-weight: 800;
    color: var(--tp-score-color);
}

.tp-ats-bar {
    height: 6px;
    border-radius: 999px;
    background: #eef0f2;
    overflow: hidden;
}

.tp-ats-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: var(--tp-score-color);
    transition: width .25s ease;
}

.tp-ats-reason {
    margin-top: 5px;
    font-size: 11.5px;
    line-height: 1.55;
    color: var(--tp-text-muted);
    overflow-wrap: break-word;
}

.tp-ats-verdict {
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid var(--tp-sidebar-border);
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--tp-text-muted);
    overflow-wrap: break-word;
}

.tp-ats-run {
    margin-top: 12px;
    width: 100%;
}

/* The compact badge used in the candidates table and on the kanban cards. */
.tp-score-badge {
    display: inline-block;
    min-width: 34px;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--tp-score-soft);
    color: var(--tp-score-color);
    font-size: 12px;
    font-weight: 800;
    text-align: center;
    cursor: default;
}

.tp-score-none {
    color: #b6bac3;
    font-weight: 600;
    cursor: default;
}

/* Marks a score computed for a CV that has since been replaced. */
.tp-score-stale {
    margin-left: 5px;
    color: #e8763a;
    font-weight: 800;
    cursor: default;
}

.tp-kanban-score {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* The card details style every span as a bold label; the badge keeps its own score colour. */
.tp-kanban-card-details .tp-score-badge {
    color: var(--tp-score-color);
}

.tp-kanban-card-details .tp-score-none,
.tp-kanban-card-details .tp-score-stale {
    font-weight: 700;
}

.tp-kanban-card-details .tp-score-none {
    color: #b6bac3;
}

.tp-kanban-card-details .tp-score-stale {
    color: #e8763a;
}

.tp-upload {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 14px;
    border: 1.5px dashed var(--tp-border);
    border-radius: 8px;
    background: #fafbfc;
    cursor: pointer;
    color: var(--tp-primary);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
    transition: border-color .15s, background .15s;
}

.tp-upload:hover,
.tp-upload.tp-dragover {
    border-color: var(--tp-primary);
    background: #f3f1fe;
}

.tp-upload svg {
    flex: none;
}

/* Overlay the native file input across the whole label so files can be
   dropped onto it directly (the browser assigns dropped files natively). */
.tp-upload input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.tp-upload-busy {
    font-size: 12px;
    color: var(--tp-text-muted);
    margin: -4px 0 10px 2px;
}

.tp-cand-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 20px;
    gap: 8px;
}

.tp-cand-avatar-lg {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #e2e4e8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--tp-primary);
}

.tp-cand-header-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--tp-text);
}

.tp-cand-field-label {
    font-size: 12px;
    font-weight: 700;
    color: #8a8f9a;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 4px;
}

.tp-cand-field-value {
    font-size: 14px;
    color: var(--tp-text);
    margin-bottom: 14px;
    overflow-wrap: break-word;
}

.tp-doc-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--tp-border);
    border-radius: 6px;
    margin-bottom: 8px;
    background: #fff;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    text-decoration: none;
}

.tp-doc-item:hover {
    border-color: var(--tp-primary);
}

.tp-doc-item span {
    font-size: 13px;
    color: #3a3a48;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Document row: the file (download) + a remove button. */
.tp-doc-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.tp-doc-row .tp-doc-item {
    flex: 1 1 auto;
    margin-bottom: 0;
}

.tp-doc-remove {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 6px;
    background: none;
    color: #9aa0ad;
    cursor: pointer;
}

.tp-doc-remove:hover {
    color: #d64545;
    background: #fae9e9;
}

.tp-doc-remove:disabled {
    opacity: .5;
    cursor: default;
}

.tp-cand-history h3 {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--tp-primary);
}

.tp-cand-status-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 16px;
}

.tp-cand-status-row > div {
    flex: 1;
}

.tp-timeline {
    max-height: 320px;
    overflow-y: auto;
    padding-right: 4px;
    margin-bottom: 16px;
}

.tp-timeline-item {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.tp-timeline-dot {
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    margin-top: 3px;
}

.tp-timeline-body {
    min-width: 0;
    flex: 1;
}

.tp-timeline-text {
    font-size: 12.5px;
    color: #3a3a48;
}

.tp-timeline-text strong {
    color: var(--tp-text);
}

.tp-comment-box {
    border: 1px solid #d9dbe2;
    border-radius: 6px;
    padding: 10px 12px;
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.7;
    color: var(--tp-text-muted);
}

.tp-comment-box strong {
    color: #2b2b38;
}

.tp-comment-eval {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.tp-comment-eval .tp-chip {
    font-size: 10.5px;
    padding: 3px 9px;
}

.tp-comment-edited {
    font-size: 11px;
    font-style: italic;
    color: #9aa0ad;
}

/* Icon-only edit affordance, pushed to the end of the evaluation row. */
.tp-comment-edit {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    background: none;
    border: none;
    padding: 2px;
    color: var(--tp-primary);
    cursor: pointer;
}

.tp-comment-edit:hover {
    opacity: 0.7;
}

.tp-comment-box .tp-comment-input {
    margin-bottom: 8px;
}

.tp-comment-form {
    border-top: 1px solid var(--tp-sidebar-border);
    padding-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tp-comment-form h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--tp-text);
}

.tp-comment-input {
    min-height: 68px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.5;
}

.tp-comment-form-footer {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tp-comment-form-footer select {
    flex: 1;
}

.tp-comment-form-footer button {
    white-space: nowrap;
}

/* ---------- Apply Job modal ---------- */

.tp-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(28, 28, 40, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    z-index: 50;
}

.tp-modal {
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.tp-modal-wide {
    width: 920px;
    max-width: 100%;
}

.tp-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #dbeafe;
    padding: 14px 22px;
}

.tp-modal-title {
    font-style: italic;
    font-weight: 700;
    font-size: 20px;
    color: #3f4fc9;
}

.tp-modal-close {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #1c1c28;
    display: flex;
}

.tp-modal-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    height: calc(90vh - 54px);
    max-height: 760px;
}

.tp-modal-about {
    padding: 26px 28px 34px 28px;
    border-right: 1px solid var(--tp-sidebar-border);
    overflow-y: auto;
}

.tp-modal-about h2 {
    margin: 0 0 4px 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--tp-text);
}

.tp-about-job-title {
    font-style: italic;
    font-weight: 700;
    font-size: 16px;
    color: var(--tp-primary);
    margin-bottom: 18px;
}

.tp-about-details {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 28px;
    margin-bottom: 22px;
    font-size: 14px;
}

.tp-about-key {
    font-weight: 700;
    color: var(--tp-text);
}

.tp-about-val {
    color: #3a3a48;
}

.tp-about-section {
    margin-bottom: 18px;
}

.tp-about-section h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--tp-text);
}

.tp-about-description {
    font-size: 13px;
    line-height: 1.55;
    color: var(--tp-text-muted);
    white-space: pre-line;
}

.tp-modal-form {
    padding: 24px 26px 28px 26px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
}

.tp-field-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #2b2b38;
    margin-bottom: 6px;
}

.tp-field-help {
    font-size: 13px;
    line-height: 1.5;
    color: #5a5a68;
    margin: 0 0 10px;
}

.tp-field-help a {
    color: #4a3aff;
    font-weight: 600;
    text-decoration: underline;
}

.tp-field-input {
    width: 100%;
    padding: 10px 11px;
    border: 1px solid #9aa0ad;
    border-radius: 3px;
    font-family: inherit;
    font-size: 13px;
}

select.tp-field-input {
    background: #fff;
    color: var(--tp-text);
    height: 39px;
}

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

/* Country picker (flag + dial code) + number, side by side. */
.tp-phone-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.tp-country-trigger {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 7px;
    width: auto;
    background: #fff;
    cursor: pointer;
}

.tp-country-trigger .fi {
    width: 22px;
    height: 16px;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .12);
}

.tp-country-dial {
    font-size: 13px;
    font-weight: 600;
    color: var(--tp-text);
}

.tp-country-caret {
    color: #9aa0ad;
}

.tp-phone-row .tp-field-input[type="tel"] {
    flex: 1 1 auto;
    min-width: 0;
}

.tp-country-pop {
    margin-top: 6px;
    background: #fff;
    border: 1px solid #cfd3db;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(20, 20, 40, .16);
    padding: 8px;
}

.tp-country-search {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #9aa0ad;
    border-radius: 4px;
    font-family: inherit;
    font-size: 13px;
    margin-bottom: 6px;
}

.tp-country-search:focus {
    outline: none;
    border-color: var(--tp-primary);
}

.tp-country-list {
    max-height: 240px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.tp-country-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 8px;
    background: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}

.tp-country-item:hover {
    background: #f0eefc;
}

.tp-country-item .fi {
    flex: 0 0 auto;
    width: 22px;
    height: 16px;
    border-radius: 2px;
}

.tp-country-item-name {
    flex: 1 1 auto;
    font-size: 13px;
    color: var(--tp-text);
}

.tp-country-item-dial {
    flex: 0 0 auto;
    font-size: 12px;
    color: var(--tp-text-muted);
}

/* Salary expectation ($ prefix). */
.tp-salary-row {
    position: relative;
}

.tp-salary-prefix {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    font-weight: 600;
    color: var(--tp-text-muted);
    pointer-events: none;
}

.tp-salary-input {
    padding-left: 22px;
}

/* Inline validation feedback. */
.tp-field-input-invalid,
.tp-field-input-invalid:focus {
    border-color: #d64545;
}

.tp-field-error {
    margin-top: 5px;
    font-size: 12px;
    font-weight: 600;
    color: #d64545;
}

.tp-upload-box {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 1px solid #9aa0ad;
    border-radius: 4px;
    padding: 30px 12px;
    cursor: pointer;
    margin-top: 6px;
    color: #2b2b38;
    transition: border-color .15s, background .15s;
}

.tp-upload-box.tp-dragover {
    border-color: var(--tp-primary);
    background: #f3f1fe;
}

.tp-upload-box span {
    font-size: 13.5px;
    font-weight: 500;
    text-align: center;
}

/* Overlay the native file input so files can be dropped onto the box directly. */
.tp-upload-file {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.tp-modal-apply {
    width: 100%;
    margin-top: 6px;
    background: var(--tp-primary);
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 5px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.tp-modal-apply:hover {
    background: var(--tp-primary-dark);
}

/* ---------- Page header ---------- */

.tp-job-apps-btn {
    text-transform: none;
    font-weight: 600;
    border-radius: 8px;
    flex-shrink: 0;
}

/* Tabs are MudTabs now (see Recruitment.razor), styled by MudBlazor rather than here. */

/* ---------- Toolbar ---------- */

.tp-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.tp-toolbar-links {
    display: flex;
    gap: 26px;
}

.tp-toolbar-links a {
    font-size: 14px;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.tp-create-btn {
    padding: 11px 18px;
    border-radius: 5px;
    font-size: 13.5px;
    font-weight: 600;
    text-transform: none;
    box-shadow: 0 1px 2px rgba(99, 85, 224, 0.3);
}

.tp-section-title {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--tp-text);
}

/* ---------- Chips ---------- */

.tp-chip {
    display: inline-block;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 11px;
    border-radius: 20px;
    margin-bottom: 10px;
}

.tp-chip-active {
    background: #12b886;
}

.tp-chip-cancelled {
    background: #e5484d;
}

.tp-chip-completed {
    background: #2b6fd6;
}

.tp-chip-role {
    background: #7a7f8c;
    padding: 5px 12px;
    margin-bottom: 0;
}

.tp-chip-warning {
    background: #f0b429;
    margin-bottom: 0;
}

/* ---------- Jobs table ---------- */

.tp-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--tp-border);
    margin-bottom: 26px;
}

.tp-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 13.5px;
    font-weight: 700;
    color: #2b2b38;
    border-bottom: 1px solid var(--tp-border);
    border-right: 1px solid var(--tp-border);
}

.tp-table th:last-child {
    border-right: none;
}

.tp-table td {
    padding: 14px 16px;
    font-size: 14px;
    color: #3a3a48;
    border-bottom: 1px solid var(--tp-border);
    border-right: 1px solid var(--tp-border);
}

.tp-table td:last-child {
    border-right: none;
}

.tp-table tr:last-child td {
    border-bottom: none;
}

.tp-empty-row td {
    height: 44px;
}

/* ---------- Error UI (template default) ---------- */

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* Recruitment AI assistant (floating chat) */
.tp-chat {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 1300;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
}

.tp-chat-panel {
    width: 360px;
    max-width: calc(100vw - 3rem);
    height: 460px;
    max-height: calc(100vh - 6rem);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 14px;
}

.tp-chat-header {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.6rem 0.5rem 0.6rem 0.9rem;
    background: var(--mud-palette-primary, #594ae2);
    color: #fff;
}

.tp-chat-title {
    flex: 1;
    font-weight: 600;
    font-size: 0.95rem;
}

.tp-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: #f7f7fb;
}

.tp-chat-empty {
    color: #6b6b76;
    font-size: 0.85rem;
    text-align: center;
    margin: auto 0;
}

.tp-chat-msg {
    max-width: 85%;
    padding: 0.5rem 0.75rem;
    border-radius: 12px;
    font-size: 0.88rem;
    line-height: 1.35;
    white-space: pre-wrap;
    word-break: break-word;
}

.tp-chat-msg.user {
    align-self: flex-end;
    background: var(--mud-palette-primary, #594ae2);
    color: #fff;
    border-bottom-right-radius: 3px;
}

.tp-chat-msg.bot {
    align-self: flex-start;
    background: #fff;
    color: #1f1f29;
    border: 1px solid #e4e4ee;
    border-bottom-left-radius: 3px;
}

.tp-chat-typing {
    display: flex;
    align-items: center;
}

.tp-chat-input {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem;
    border-top: 1px solid #e4e4ee;
    background: #fff;
}

/* ---- Review cards, shared by the 1 on 1 and PDP boards ---- */
.oo-card {
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 14px;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s ease, transform .2s ease;
}

.oo-card:hover {
    box-shadow: var(--mud-elevation-8);
    transform: translateY(-3px);
}

.oo-content {
    flex: 1 1 auto;
}

.oo-actions {
    margin-top: auto;
    padding: 8px 12px 12px;
    gap: 8px;
}

.oo-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 24px;
}

.oo-ico {
    color: var(--mud-palette-text-secondary);
}

.oo-label {
    color: var(--mud-palette-text-secondary);
    font-size: .8rem;
}

.oo-value {
    margin-left: auto;
    text-align: right;
    font-size: .85rem;
    font-weight: 500;
}
