/*
 * Shared styles for the redesigned screens.
 *
 * Started as the provident fund pages' stylesheet and is now used by the
 * reports page too, so the name follows. The class prefix is still pf-*
 * because renaming it across four working views is churn without benefit;
 * read it as "page furniture", not "provident fund".
 *
 * A shared file rather than a copy per view. The same control defined twice
 * under two names is how the loan screens ended up with a Payments button that
 * rendered as bare text on one page, and how the update fund dialog kept its
 * squeezed names after the distribution dialog was fixed.
 */
/* Provident fund admin. Same tokens as the loan screens and the leave
   statistics page, prefixed --pf-* per this codebase's convention. */
#pfbook {
    --pf-surface:     #ffffff;
    --pf-surface-2:   #f7f9fb;
    --pf-surface-3:   #eef2f6;
    --pf-line:        #e3e8ee;
    --pf-line-strong: #ccd5de;
    --pf-ink:         #16212b;
    --pf-ink-2:       #3d4c59;
    --pf-muted:       #67788a;
    --pf-faint:       #90a0af;
    --pf-accent:      #006699;
    --pf-accent-wash: #e6f7ff;
    --pf-accent-edge: #bfe3f2;
    --pf-mono:        ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    --pf-shadow-1:    0 1px 2px rgba(22, 33, 43, .05);
    --pf-r-card:      14px;
    --pf-r-ctl:       9px;
    --pf-crit:        #a92e22;
    color: var(--pf-ink);
}

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

/* Pinned to the corner: left where it falls, a label in a table's last column
   sat past the scrolling wrap and widened the whole page on a phone. */
.pf-sr {
    position: absolute; top: 0; left: 0; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- Standing ------------------------------------------------- */

.pf-standing {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
    gap: 14px;
    margin-bottom: 16px;
}

.pf-headline, .pf-stat {
    border: 1px solid var(--pf-line);
    border-radius: var(--pf-r-card);
    background: var(--pf-surface);
    box-shadow: var(--pf-shadow-1);
}

.pf-headline {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 20px 22px;
    background: var(--pf-accent-wash);
    border-color: #cfe9f5;
}

.pf-k {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--pf-faint);
}

.pf-headline .pf-k { color: #3d7b9c; }

.pf-v {
    font-family: var(--pf-mono);
    font-variant-numeric: tabular-nums;
    font-size: 30px;
    font-weight: 600;
    letter-spacing: -.02em;
    line-height: 1.1;
    color: var(--pf-accent);
}

/* What the headline is made of, so the three contributions read as its
   parts rather than as three more figures of equal rank. */
.pf-parts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    margin-top: 6px;
    padding-top: 12px;
    border-top: 1px solid #cfe9f5;
}

.pf-parts span {
    font-family: var(--pf-mono);
    font-variant-numeric: tabular-nums;
    font-size: 12.5px;
    color: #1f5f80;
    white-space: nowrap;
}

.pf-parts i {
    font-style: normal;
    font-family: inherit;
    color: #3d7b9c;
    margin-right: 5px;
}

/* What fund earnings are made of, under the parts: one line per source, in
   the same tones, charges included as negative amounts. A disclosure, closed
   by default, with the same chevron as the dashboard's breakdowns. */
.pf-earnings {
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px dashed #cfe9f5;
}

.pf-earnings > summary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    cursor: pointer;
}

.pf-earnings > summary::-webkit-details-marker { display: none; }

.pf-earnings > summary::after {
    content: "";
    width: 5px;
    height: 5px;
    margin-top: -3px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    transition: transform .15s;
}

.pf-earnings[open] > summary::after { transform: rotate(-135deg); margin-top: 1px; }
.pf-earnings > summary:hover { text-decoration: underline; }

.pf-earnings dl {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 16px;
    margin: 6px 0 0;
    font-family: var(--pf-mono);
    font-variant-numeric: tabular-nums;
    font-size: 12px;
}

.pf-earnings dt { font-weight: 400; color: #3d7b9c; }
.pf-earnings dd { margin: 0; text-align: right; white-space: nowrap; color: #1f5f80; }

.pf-side {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.pf-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
}

.pf-v-sm {
    font-family: var(--pf-mono);
    font-variant-numeric: tabular-nums;
    font-size: 18px;
    font-weight: 600;
    color: var(--pf-ink);
    line-height: 1.2;
}

.pf-sub { font-size: 11.5px; color: var(--pf-muted); line-height: 1.45; }

.pf-editable {
    cursor: pointer;
    border-bottom: 1px dashed var(--pf-line-strong);
    align-self: flex-start;
}

.pf-editable:hover, .pf-editable:focus { color: var(--pf-accent); border-bottom-color: var(--pf-accent); }

/* ---- Card ------------------------------------------------------ */

.pf-card {
    background: var(--pf-surface);
    border: 1px solid var(--pf-line);
    border-radius: var(--pf-r-card);
    box-shadow: var(--pf-shadow-1);
    overflow: hidden;
}

.pf-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 16px 18px;
    border-bottom: 1px solid var(--pf-line);
}

.pf-h { margin: 0; font-size: 14px; font-weight: 600; color: var(--pf-ink); }
.pf-note { margin: 4px 0 0; font-size: 12.5px; color: var(--pf-muted); }

.pf-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.pf-search input {
    width: 220px;
    height: 36px;
    padding: 0 12px;
    font-size: 13px;
    color: var(--pf-ink);
    background: var(--pf-surface);
    border: 1px solid var(--pf-line-strong);
    border-radius: var(--pf-r-ctl);
}

.pf-search input::placeholder { color: var(--pf-faint); }

#pfbook .pf-search input:focus,
#pfbook .pf-search input:focus-visible {
    outline: none; box-shadow: none; border-color: #8fa0b0;
}

.pf-seg {
    display: inline-flex;
    padding: 3px;
    gap: 2px;
    background: var(--pf-surface-3);
    border-radius: var(--pf-r-ctl);
}

.pf-seg-btn {
    appearance: none;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--pf-ink-2);
    padding: 6px 12px;
    border-radius: 7px;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s ease, color .15s ease;
}

.pf-seg-btn:hover { color: var(--pf-ink); }

.pf-seg-btn.is-active {
    background: var(--pf-surface);
    color: var(--pf-accent);
    font-weight: 600;
    box-shadow: var(--pf-shadow-1);
}

.pf-stat-link { text-decoration: none; color: inherit; }
.pf-stat-link:hover { border-color: var(--pf-line-strong); text-decoration: none; }
.pf-stat-link:hover .pf-v-sm { color: var(--pf-accent); }

.pf-go { display: block; margin-top: 4px; color: var(--pf-accent); font-weight: 500; }

.pf-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 36px;
    padding: 0 13px;
    font-size: 13px;
    font-weight: 500;
    color: var(--pf-ink-2);
    background: var(--pf-surface);
    border: 1px solid var(--pf-line-strong);
    border-radius: var(--pf-r-ctl);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.pf-btn:hover, .pf-btn:focus {
    background: var(--pf-surface-3);
    color: var(--pf-ink);
    text-decoration: none;
}

.pf-btn-primary {
    color: #fff;
    background: var(--pf-accent);
    border-color: var(--pf-accent);
}

.pf-btn-primary:hover, .pf-btn-primary:focus {
    background: #005785; border-color: #005785; color: #fff;
}

.pf-btn-primary:disabled, .pf-btn-primary[disabled] {
    opacity: .55;
    cursor: not-allowed;
    background: #8aa8bf;
    border-color: #8aa8bf;
    color: #fff;
}

/* ---- Table ----------------------------------------------------- */

.pf-table-wrap { overflow-x: auto; }
table.pf-table { width: 100%; border-collapse: collapse; }

/* A column that matters less than the rest, left out on a phone so the ones
   that decide the row (and its action) stay on screen without scrolling. */
@media (max-width: 620px) {
    .pf-table .pf-col-opt { display: none; }

    /* A table that fits a phone: tighter cells, and headings and long status
       chips wrap, so each row's action stays on screen without scrolling
       sideways. */
    .pf-table.is-phone-fit th, .pf-table.is-phone-fit td { padding-left: 10px; padding-right: 10px; }
    .pf-table.is-phone-fit thead th, .pf-table.is-phone-fit .pf-status { white-space: normal; }
    .pf-table.is-phone-fit td.pf-col-act { white-space: normal; }
    .pf-table.is-phone-fit td.pf-col-act .pf-row-act { margin: 2px 0; white-space: normal; text-align: center; }
}

.pf-table thead th {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--pf-faint);
    text-align: left;
    padding: 11px 18px;
    background: var(--pf-surface-2);
    border-bottom: 1px solid var(--pf-line);
    white-space: nowrap;
}

.pf-table tbody td {
    padding: 13px 18px;
    font-size: 13.5px;
    color: var(--pf-ink-2);
    border-bottom: 1px solid var(--pf-line);
    vertical-align: middle;
}

.pf-table tbody tr:last-child td { border-bottom: 0; }
.pf-table tbody tr:hover td { background: var(--pf-surface-2); }
.pf-table .pf-r, .pf-table td.pf-r { text-align: right; }

.pf-name {
    font-weight: 600;
    color: var(--pf-ink);
    text-decoration: none;
}

.pf-name:hover, .pf-name:focus {
    color: var(--pf-accent);
    text-decoration: underline;
}

.pf-loan-pill {
    display: inline-block;
    margin-left: 8px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 999px;
    background: #fff6e6;
    color: #a35a00;
    white-space: nowrap;
}

.pf-money {
    font-family: var(--pf-mono);
    font-variant-numeric: tabular-nums;
    font-size: 13px;
    color: var(--pf-ink);
    white-space: nowrap;
}

.pf-total { font-weight: 600; }
.pf-zero { color: var(--pf-faint); }

.pf-empty { padding: 40px 18px; text-align: center; color: var(--pf-muted); font-size: 13.5px; }

/* ---- DataTables chrome and pager -------------------------------- */

#pfbook .dataTables_wrapper .dataTables_filter,
#pfbook .dataTables_wrapper .dataTables_length,
#pfbook .dataTables_wrapper .dataTables_info,
#pfbook .dataTables_wrapper .dataTables_paginate { display: none; }

/* Bootstrap's grid rows carry -15px side margins, which measure wider
   than the box holding them and produce a horizontal scrollbar. */
#pfbook .dataTables_wrapper .row { margin-left: 0; margin-right: 0; }
#pfbook .dataTables_wrapper .row > [class^="col-"],
#pfbook .dataTables_wrapper .row > [class*=" col-"] { padding-left: 0; padding-right: 0; }

/* ---- Loading and progress ------------------------------------------- */

/* A table asked for again keeps its rows, dimmed, under a bar that runs along
   its top edge, so the page does not jump and what was there stays readable
   until the answer replaces it. The first load, with nothing to keep, draws
   grey rows the shape of real ones instead (.pf-skel). Both wait a moment
   before showing, so a quick answer does not flicker. */
.pf-loadbar {
    position: relative;
    z-index: 1;
    height: 2px;
    margin-bottom: -2px;
    overflow: hidden;
    pointer-events: none;
}

.pf-loadbar::before,
.pf-progress.is-indeterminate > span {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 35%;
    background: var(--pf-accent);
    border-radius: 2px;
    animation: pf-load-slide 1.1s cubic-bezier(.4, 0, .2, 1) infinite;
}

.pf-loadbar::before { opacity: 0; transition: opacity .15s ease; }
.pf-loadbar.is-on::before { opacity: 1; transition-delay: .12s; }

/* From just off the left edge to just off the right: the bar is 35% of its
   track, so the track is 2.86 bars wide. */
@keyframes pf-load-slide {
    from { transform: translateX(-100%); }
    to   { transform: translateX(290%); }
}

.pf-table-wrap tbody { transition: opacity .15s ease; }
.pf-table-wrap[aria-busy="true"] tbody { opacity: .5; pointer-events: none; transition-delay: .12s; }
/* Grey rows are already the loading state; dimming them as well hides them. */
.pf-table-wrap[aria-busy="true"] tbody:has(> .pf-skel-row) { opacity: 1; }

.pf-skel {
    display: block;
    width: 70%;
    height: 10px;
    border-radius: 999px;
    background-color: var(--pf-line);
    background-image: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .75), rgba(255, 255, 255, 0));
    background-size: 160px 100%;
    background-repeat: no-repeat;
    background-position: -160px 0;
    animation: pf-skel-sweep 1.3s ease-in-out infinite;
}

@keyframes pf-skel-sweep {
    to { background-position: calc(100% + 160px) 0; }
}

.pf-table tbody tr.pf-skel-row td { padding-top: 18px; padding-bottom: 18px; }
.pf-table tbody tr.pf-skel-row:hover td { background: transparent; }
.pf-skel-row td:nth-child(2n) .pf-skel { width: 46%; }
.pf-skel-row td:nth-child(3n) .pf-skel { width: 58%; }
.pf-skel-row td:last-child .pf-skel { width: 40%; margin-left: auto; }

/* How far a run of steps has got: the span's width is the share done. As
   .is-indeterminate it only says that something is under way. */
.pf-progress {
    position: relative;
    height: 6px;
    overflow: hidden;
    background: var(--pf-line);
    border-radius: 999px;
}

.pf-progress > span {
    display: block;
    width: 0;
    height: 100%;
    background: var(--pf-accent);
    border-radius: inherit;
    transition: width .3s ease;
}

@media (prefers-reduced-motion: reduce) {
    .pf-loadbar::before,
    .pf-progress.is-indeterminate > span { animation: none; width: 100%; opacity: .45; }
    .pf-loadbar::before { opacity: 0; }
    .pf-loadbar.is-on::before { opacity: .45; }
    .pf-skel { animation: none; background-image: none; }
}

.pf-pager {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-top: 1px solid var(--pf-line);
}

.pf-pager[hidden] { display: none; }

.pf-range { font-size: 12.5px; color: var(--pf-muted); }
.pf-range b {
    font-family: var(--pf-mono);
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: var(--pf-ink-2);
}

.pf-pages { display: flex; gap: 4px; }

.pf-pages button {
    min-width: 32px;
    height: 32px;
    padding: 0 9px;
    background: var(--pf-surface);
    border: 1px solid var(--pf-line);
    border-radius: 8px;
    cursor: pointer;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--pf-ink-2);
    font-variant-numeric: tabular-nums;
}

.pf-pages button:hover:not(:disabled):not([aria-current]) {
    background: var(--pf-surface-2); border-color: var(--pf-line-strong);
}

.pf-pages button[aria-current] {
    background: var(--pf-accent); border-color: var(--pf-accent); color: #fff;
}

.pf-pages button:disabled { opacity: .38; cursor: default; }
.pf-pages .pf-gap { display: grid; place-items: center; min-width: 22px; color: var(--pf-faint); }

@media (max-width: 1000px) {
    .pf-standing { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
    .pf-side { grid-template-columns: 1fr; }
    .pf-card-head { flex-direction: column; align-items: stretch; }
    .pf-search input { width: 100%; }
}

/* ---- Disbursed list ---------------------------------------------- */

.pf-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.pf-back {
    font-size: 13px;
    font-weight: 500;
    color: #006699;
    text-decoration: none;
    white-space: nowrap;
}

.pf-back:hover, .pf-back:focus { text-decoration: underline; color: #005785; }

/* Two tiles rather than five, so they do not stretch to fill the row. */
.pf-standing-narrow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

@media (max-width: 1000px) {
    .pf-standing-narrow { grid-template-columns: 1fr; }
}

.pf-row-act {
    display: inline-flex;
    align-items: center;
    height: 30px;
    padding: 0 11px;
    font-size: 12px;
    font-weight: 500;
    color: #3d4c59;
    background: #fff;
    border: 1px solid #ccd5de;
    border-radius: 7px;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s ease, color .15s ease;
}

.pf-row-act:hover, .pf-row-act:focus { background: #eef2f6; color: #16212b; text-decoration: none; }

/* Two actions in one cell need air between them. */
.pf-table td .pf-row-act + .pf-row-act { margin-left: 6px; }

.pf-row-act-danger { color: #a92e22; border-color: #e8cdc9; }
.pf-row-act-danger:hover, .pf-row-act-danger:focus { background: #fbeae7; color: #8c2419; }

/* ---- Individual fund page ---------------------------------------- */

.pf-head-sub {
    font-weight: 400;
    font-size: 15px;
    color: #67788a;
    margin-left: 8px;
}

/* Two tiles stacked beside the headline rather than in a 2x2 grid. */
.pf-side-stack { grid-template-columns: 1fr; align-content: start; }

.pf-date { white-space: nowrap; color: #16212b; }

.pf-comment {
    font-size: 12.5px;
    color: #67788a;
    display: block;
    max-width: 320px;
}

/* ---- Modals -------------------------------------------------------
   The three dialogs on this screen used Tailwind's stock blue for their
   confirm buttons and 8px-tall inputs at 12px, so they read as a different
   product from the page behind them. Scoped to .pf-modal rather than
   rewriting each field, which keeps the markup and its wiring intact. */

.pf-modal .modal-title,
.pf-modal h3 {
    font-size: 15px;
    font-weight: 600;
    color: #16212b;
}

.pf-modal label {
    display: block;
    margin-bottom: 5px;
    font-size: 12.5px;
    font-weight: 600;
    color: #3d4c59;
    text-transform: none;
    letter-spacing: normal;
}

.pf-modal input[type="text"],
.pf-modal input[type="number"],
.pf-modal input[type="date"],
.pf-modal input[type="month"],
.pf-modal select,
.pf-modal textarea {
    width: 100%;
    height: 38px;
    padding: 0 11px;
    font-size: 13.5px;
    line-height: normal;
    color: #16212b;
    /* background-color, not the shorthand: the shorthand resets background-image
       too, and that is where @tailwindcss/forms paints a select's chevron - so
       the two dropdowns rendered as plain text boxes with nothing to say they
       could be opened. */
    background-color: #fff;
    border: 1px solid #ccd5de;
    border-radius: 9px;
}

/* Room for the chevron, which sits at the right edge.
   These controls used to carry text-xs px-2 py-1 h-8 as well. Bootstrap's
   spacing utilities are !important, so .px-2 beat anything this file could say
   about padding - the same collision that makes py-4 mean 24px rather than
   16px across this codebase. The classes are off the markup rather than
   fought with !important here. */
.pf-modal select { padding-right: 34px; }

.pf-modal textarea { height: auto; padding: 9px 11px; }

/* No blue ring, matching the rest of the product. */
.pf-modal input:focus,
.pf-modal select:focus,
.pf-modal textarea:focus {
    outline: none;
    box-shadow: none;
    border-color: #8fa0b0;
}

.pf-modal input:disabled,
.pf-modal select:disabled {
    background: #f7f9fb;
    color: #90a0af;
}

/* The dialog itself: same card radius and hairline as the page. */
.pf-modal > div {
    border-radius: 14px;
    border: 1px solid #e3e8ee;
    box-shadow: 0 10px 30px rgba(22, 33, 43, .12);
}

.pf-modal table th {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #90a0af;
    background: #f7f9fb;
}

.pf-modal table td { font-size: 13px; color: #3d4c59; }

/* ---- Per-employee amount cards -------------------------------------
   Used by both dialogs: the distribution preview (.pf-distribute-*) and the
   update fund editor (.pf-employee-row / .pf-amount-input). One rule for both,
   because they are the same control and were already drifting - two class
   names for one thing is how the loan screens ended up with a button that
   rendered as bare text on one page.

   The width:100% these dialogs set on their inputs is right for the stacked
   fields at the top and wrong here: it overrode each card's own w-28, so the
   input filled the row and names like "Mohammad Zakir Hussain Khan" wrapped
   into four lines beside it. */

.pf-distribute-amount-input,
.pf-amount-input {
    width: 112px !important;
    flex: none;
    height: 36px;
    padding: 0 11px;
    text-align: right;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    font-variant-numeric: tabular-nums;
    font-size: 13px;
    font-weight: 600;
    color: #16212b;
    background-color: #fff;
    border: 1px solid #ccd5de;
    border-radius: 9px;
}

.pf-distribute-amount-input:focus,
.pf-amount-input:focus {
    outline: none;
    box-shadow: none;
    border-color: #8fa0b0;
}

.pf-distribute-row,
.pf-employee-row {
    gap: 12px;
    border-color: #e3e8ee !important;
    border-radius: 11px !important;
    box-shadow: none !important;
}

.pf-distribute-row:hover,
.pf-employee-row:hover {
    border-color: #ccd5de !important;
    box-shadow: 0 1px 2px rgba(22, 33, 43, .05) !important;
}

/* The name takes what is left, and reads as one line wherever it fits. */
.pf-distribute-row > span,
.pf-employee-row > span {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    line-height: 1.35;
}

/* ---- Reports ------------------------------------------------------- */

/* Inside the page frame, so the cards line up with the header and nav. */
.pf-reports {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.pf-reports-group > .pf-k { margin: 0 0 10px; }

.pf-reports-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

/* Head and foot each take a row of the grid, so cards side by side keep
   their controls level however long either description runs, and a status
   line under one card's buttons does not push the other's down. */
.pf-report {
    display: grid;
    grid-row: span 2;
    grid-template-rows: subgrid;
    row-gap: 0;
}

.pf-report-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px;
}

.pf-report-icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: var(--pf-r-ctl);
    background: var(--pf-accent-wash);
    color: var(--pf-accent);
}

/* i and svg: Font Awesome's script swaps the one for the other. */
.pf-report-icon i, .pf-report-icon svg { font-size: 15px; }

.pf-report-text { min-width: 0; }
.pf-report-text .pf-note { max-width: 62ch; line-height: 1.5; }

.pf-report-scope {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 10px 0 0;
    font-size: 12px;
    font-weight: 500;
    color: var(--pf-ink-2);
}

.pf-report-scope i, .pf-report-scope svg { font-size: 11px; color: var(--pf-faint); }

.pf-report-foot {
    padding: 14px 18px 16px;
    background: var(--pf-surface-2);
    border-top: 1px solid var(--pf-line);
}

.pf-report-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

/* A list report has no period, only a note beside its button. */
.pf-report-row-plain { align-items: center; }

.pf-report-actions { display: flex; gap: 8px; }

.pf-report-foot .pf-hint:empty { display: none; }
.pf-report-status { color: var(--pf-ink-2); }

/* A report takes seconds to build; the button says so while it does. */
.pf-btn:disabled { opacity: .55; cursor: not-allowed; }
.pf-btn[aria-busy="true"] { opacity: 1; cursor: progress; }

.pf-field label {
    display: block;
    margin-bottom: 5px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: #90a0af;
}

/* The date range is a div the picker writes into, not an input, so it is
   shaped to match the fields beside it rather than left as a bare box. */
.pf-range-picker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    min-width: 230px;
    padding: 0 11px;
    font-size: 13px;
    color: #16212b;
    background: #fff;
    border: 1px solid #ccd5de;
    border-radius: 9px;
    cursor: pointer;
    white-space: nowrap;
}

.pf-range-picker:hover { border-color: #8fa0b0; }
.pf-range-picker:focus-visible { outline: 2px solid var(--pf-accent-edge); outline-offset: 1px; }
.pf-range-picker > span { flex: 1; }
.pf-range-picker i, .pf-range-picker svg { color: #67788a; font-size: 12px; }
.pf-range-caret { margin-left: auto; }

@media (max-width: 960px) {
    .pf-reports-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Below sm the frame has no side padding of its own. */
@media (max-width: 639px) {
    .pf-reports { padding: 0 16px; }
}

/* Stacked, the period's hint goes under the period rather than under the
   buttons, and any status after them. */
@media (max-width: 700px) {
    .pf-report-foot { display: flex; flex-direction: column; gap: 10px; }
    .pf-report-row { display: contents; }
    .pf-report-foot .pf-report-actions { order: 2; }
    .pf-report-foot .pf-report-status, .pf-report-foot .pf-err { order: 3; }
    .pf-report-foot .pf-hint, .pf-report-foot .pf-err { margin: 0; }
    .pf-report-actions .pf-btn { flex: 1; justify-content: center; }
    .pf-range-picker { min-width: 0; width: 100%; }
}

/* ---- Penalties ----------------------------------------------------- */


.pf-status {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 2px 9px;
    border-radius: 999px;
    white-space: nowrap;
}

.pf-status-approved { background: #e8f6f0; color: #0f7a52; }
.pf-status-pending  { background: #fff6e6; color: #a35a00; }
.pf-status-rejected { background: #fbeae7; color: #a92e22; }
.pf-status-draft    { background: #eef2f6; color: #3d4c59; }

/* The employee's own history names states by what they mean rather than by
   colour, so the four tones map onto the palette above. "act" is its own
   colour on purpose: it is the set the employee can still do something
   about, and it should not look like the ones they are only waiting on. */
.pf-status-ok   { background: #e8f6f0; color: #0f7a52; }
.pf-status-no   { background: #fbeae7; color: #a92e22; }
.pf-status-wait { background: #eef2f6; color: #3d4c59; }
.pf-status-act  { background: #e6f7ff; color: #005785; }

/* The year box and employee picker sit in the card header with the button. */
.pf-year { width: 96px; }

.pf-employee-filter { min-width: 240px; }

.pf-select2 .select2-container .select2-selection--single,
.pf-year {
    height: 36px !important;
    padding: 0 11px;
    font-size: 13px;
    color: #16212b;
    background-color: #fff;
    border: 1px solid #ccd5de !important;
    border-radius: 9px !important;
}

/* The clear and the arrow are both absolutely positioned by select2 and both
   land at the right edge, so they were sitting on top of each other and off
   the vertical centre. Given a lane each, with the text padded clear of both. */
.pf-select2 .select2-container--default .select2-selection--single {
    position: relative;
}

.pf-select2 .select2-container--default .select2-selection--single .select2-selection__rendered {
    /* Height and vertical padding stated, not just line-height: pages that
       load their own select2 CSS add padding here, which pushed the label
       below the middle of a control whose height is fixed. */
    height: 34px;
    line-height: 34px;
    padding: 0 46px 0 0;
    color: #16212b;
}

.pf-select2 .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #90a0af;
}

.pf-select2 .select2-container--default .select2-selection--single .select2-selection__clear {
    position: absolute;
    top: 0;
    right: 26px;
    width: 18px;
    height: 34px;
    margin: 0;
    padding: 0;
    line-height: 34px;
    text-align: center;
    font-size: 16px;
    font-weight: 400;
    color: #90a0af;
}

.pf-select2 .select2-container--default .select2-selection--single .select2-selection__clear:hover {
    color: #16212b;
}

.pf-select2 .select2-container--default .select2-selection--single .select2-selection__arrow {
    top: 0;
    right: 8px;
    width: 14px;
    height: 34px;
    /* Select2's stock arrow is a CSS triangle; every other control on these
       screens uses the same chevron. */
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20' stroke='%2367788a' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8l4 4 4-4'/%3E%3C/svg%3E") center / 14px 14px no-repeat;
}

.pf-select2 .select2-container--default .select2-selection--single .select2-selection__arrow b {
    display: none;
}

#pfbook .pf-year:focus { outline: none; box-shadow: none; border-color: #8fa0b0 !important; }

/* Select2 renders its dropdown at the end of <body>, outside #pfbook, so
   these are matched on the class the picker is opened with rather than
   scoped to the page like everything else here. */
.pf-select2-dropdown {
    border: 1px solid #ccd5de;
    border-radius: 9px;
    box-shadow: 0 6px 20px rgba(22, 33, 43, .10);
    overflow: hidden;
}

.pf-select2-dropdown .select2-search--dropdown { padding: 8px; }

.pf-select2-dropdown .select2-search__field {
    height: 32px;
    padding: 0 10px;
    font-size: 13px;
    border: 1px solid #ccd5de !important;
    border-radius: 7px;
    outline: none;
}

.pf-select2-dropdown .select2-results__option {
    font-size: 13px;
    padding: 8px 12px;
    color: #3d4c59;
}

.pf-select2-dropdown .select2-results__option[aria-selected="true"] {
    background: #eef2f6;
    color: #16212b;
}

/* Stock select2 highlights in its own blue, which is the one colour on the
   page that belongs to no part of the product. */
.pf-select2-dropdown .select2-results__option--highlighted,
.pf-select2-dropdown .select2-results__option--highlighted[aria-selected] {
    background: #e6f7ff;
    color: #006699;
}

/* ---- Dialogs ------------------------------------------------------- */

/* Bootstrap owns .modal positioning; everything inside is ours. Tokens are
   repeated here rather than inherited because a modal is not inside #pfbook. */
.pf-dialog {
    --pf-surface:     #ffffff;
    --pf-surface-2:   #f7f9fb;
    --pf-surface-3:   #eef2f6;
    --pf-line:        #e3e8ee;
    --pf-line-strong: #ccd5de;
    --pf-ink:         #16212b;
    --pf-ink-2:       #3d4c59;
    --pf-muted:       #67788a;
    --pf-faint:       #90a0af;
    --pf-accent:      #006699;
    --pf-accent-wash: #e6f7ff;
    --pf-accent-edge: #bfe3f2;
    --pf-mono:        ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    --pf-shadow-1:    0 1px 2px rgba(22, 33, 43, .05);
    --pf-r-ctl:       9px;
    --pf-crit:        #a92e22;
}

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

.pf-dialog .modal-content {
    border: 1px solid var(--pf-line);
    border-radius: 14px;
    box-shadow: 0 18px 48px rgba(22, 33, 43, .18);
    overflow: hidden;
}

.pf-d-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--pf-line);
}

.pf-d-title { margin: 0; font-size: 15px; font-weight: 600; color: var(--pf-ink); }
.pf-d-sub { margin: 4px 0 0; font-size: 12.5px; color: var(--pf-muted); }

.pf-d-close {
    appearance: none;
    border: 0;
    background: transparent;
    font-size: 22px;
    line-height: 1;
    padding: 0 2px;
    color: var(--pf-faint);
    cursor: pointer;
}

.pf-d-close:hover, .pf-d-close:focus { color: var(--pf-ink); outline: none; }

.pf-d-body { padding: 20px 22px; }

.pf-d-foot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 22px;
    background: var(--pf-surface-2);
    border-top: 1px solid var(--pf-line);
}

/* ---- Dialog form --------------------------------------------------- */

.pf-fb { margin-bottom: 16px; }
.pf-fb:last-child { margin-bottom: 0; }

.pf-label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--pf-ink-2);
}

.pf-req { color: #c0392b; font-weight: 400; }

.pf-dialog .pf-input,
.pf-dialog .pf-textarea {
    display: block;
    width: 100%;
    padding: 0 11px;
    height: 38px;
    font-size: 13.5px;
    color: var(--pf-ink);
    background: var(--pf-surface);
    border: 1px solid var(--pf-line-strong);
    border-radius: var(--pf-r-ctl);
}

.pf-dialog .pf-textarea { height: 92px; padding: 9px 11px; resize: vertical; line-height: 1.5; }

.pf-dialog .pf-input:focus,
.pf-dialog .pf-textarea:focus {
    outline: none;
    box-shadow: none;
    border-color: var(--pf-accent);
}

.pf-dialog .pf-input::placeholder,
.pf-dialog .pf-textarea::placeholder { color: var(--pf-faint); }

/* Two fields to a row where they belong together - a month and its amount,
   a year and its day count. */
.pf-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

@media (max-width: 575px) {
    .pf-pair { grid-template-columns: minmax(0, 1fr); }
}

/* The unit lives in the field rather than in the label, so what is being
   typed is never in doubt. */
.pf-unit { position: relative; }
.pf-unit .pf-input { padding-left: 30px; }
.pf-unit.pf-unit-suffix .pf-input { padding-left: 11px; padding-right: 48px; }

.pf-unit span {
    position: absolute;
    top: 0;
    left: 11px;
    height: 38px;
    display: flex;
    align-items: center;
    font-size: 13px;
    color: var(--pf-faint);
    pointer-events: none;
}

.pf-unit.pf-unit-suffix span { left: auto; right: 12px; }

/* Two mutually exclusive choices that drive the rest of the form. A select
   hides one of two options behind a click. */
.pf-choice { display: flex; gap: 8px; }

.pf-choice label {
    flex: 1;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 13px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--pf-ink-2);
    background: var(--pf-surface);
    border: 1px solid var(--pf-line-strong);
    border-radius: var(--pf-r-ctl);
    cursor: pointer;
}

.pf-choice input { margin: 0; accent-color: var(--pf-accent); }

.pf-choice label:hover { border-color: #8fa0b0; }

.pf-choice label.is-picked {
    color: var(--pf-accent);
    background: var(--pf-accent-wash);
    border-color: var(--pf-accent);
}

.pf-choice small { display: block; font-weight: 400; font-size: 11.5px; color: var(--pf-muted); }
.pf-choice label.is-picked small { color: #3d7b9c; }

/* What the figure will be measured against, shown next to the field it
   qualifies rather than as a disabled input of its own. */
.pf-hint {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--pf-muted);
}

.pf-hint b {
    font-family: var(--pf-mono);
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: var(--pf-ink-2);
}

.pf-err {
    margin: 6px 0 0;
    font-size: 12px;
    color: #c0392b;
}

.pf-err:empty { display: none; }

.pf-dialog .pf-input.is-bad,
.pf-dialog .pf-textarea.is-bad { border-color: #c0392b; }

.pf-d-alert {
    margin-bottom: 16px;
    padding: 10px 13px;
    font-size: 12.5px;
    color: #8c2419;
    background: #fbeae7;
    border: 1px solid #e8cdc9;
    border-radius: var(--pf-r-ctl);
}

.pf-d-alert ul { margin: 6px 0 0; padding-left: 18px; }

/* ---- Applications ---------------------------------------------------- */

/* The status tabs. Bootstrap's nav-tabs markup is kept intact - five places
   in the page read the active status off .nav-item a.active[href] - so this
   restyles that markup as the segmented control the rest of the product
   uses rather than replacing it. */
#pfbook .pf-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 2px;
    margin: 0;
    padding: 3px;
    list-style: none;
    background: var(--pf-surface-3);
    border: 0;
    border-radius: var(--pf-r-ctl);
}

#pfbook .pf-tabs .nav-item { margin: 0; }

#pfbook .pf-tabs .nav-link {
    display: block;
    padding: 6px 12px;
    border: 0;
    border-radius: 7px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--pf-ink-2);
    background: transparent;
    white-space: nowrap;
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
}

#pfbook .pf-tabs .nav-link:hover { color: var(--pf-ink); background: rgba(255, 255, 255, .55); }

#pfbook .pf-tabs .nav-link.active,
#pfbook .pf-tabs .nav-link.active:hover {
    background: var(--pf-surface);
    color: var(--pf-accent);
    font-weight: 600;
    box-shadow: var(--pf-shadow-1);
}

/* ---- Request type pills ---------------------------------------------- */

/* Eight request types, so the colour is carrying real information here and
   is not decoration. Same shape and weight as the status pills, with the
   saturation dropped out of Bootstrap's badge palette so a dense table
   reads as rows rather than as a row of stickers. */
.pf-type {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.pf-type-lr       { background: #e6f7ff; color: #005785; }
.pf-type-wfh      { background: #eef2ff; color: #4338ca; }
.pf-type-wa       { background: #e8f6f0; color: #0f7a52; }
.pf-type-loan     { background: #eef2f6; color: #3d4c59; }
.pf-type-ow       { background: #fdf2f8; color: #9d266d; }
/* Olive, not the amber it used to share with .pf-late and .pf-type-penalty.
   Those two mean caution; an attendance adjustment is only a request type, and
   a late one carrying a penalty put three identical amber pills in a row. */
.pf-type-ata      { background: #f0f4e8; color: #4d6b1f; }
.pf-type-aewh     { background: #f5f0ff; color: #6b21a8; }
.pf-type-elar     { background: #e0f5fb; color: #0369a1; }
.pf-type-overtime { background: #fff1e6; color: #b45309; }
/* Leave transfer: the teal its card on Make a request already wears. */
.pf-type-transfer { background: #e6f5f2; color: #00705f; }

/* Leave transfer pages (AN36). The employee's open ask, and closing it, on
   one line above the offers on it; an earlier ask's requests one to a line,
   each with how it ended; a transfer that fails a check, on HR's list. */
#pfbook .lt-ask { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--pf-line); }
#pfbook .lt-fails { color: var(--pf-crit); }

/* The four checks HR decides on in the transfer dialog, as the decision
   buttons tone them, and the reason a transfer stands where it does. */
.pf-request-dialog .lt-checks { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.pf-request-dialog .lt-checks li { display: flex; gap: 8px; font-size: 13px; line-height: 1.45; color: var(--pf-ink-2); }
.pf-request-dialog .lt-checks .lt-mark { flex: none; width: 16px; font-weight: 700; }
.pf-request-dialog .lt-checks .is-ok .lt-mark { color: #0f7a52; }
.pf-request-dialog .lt-checks .is-no .lt-mark,
.pf-request-dialog .lt-checks .is-no b { color: var(--pf-crit); }
.pf-request-dialog .lt-reason { margin: 0; font-size: 13.5px; color: var(--pf-ink); overflow-wrap: anywhere; }

/* Not a type - an action riding in the same row of chips. */
.pf-type-penalty { background: #fff6e6; color: #a35a00; cursor: pointer; }
.pf-type-penalty:hover { background: #ffedcc; }

/* ---- Row flags ------------------------------------------------------- */

/* Emergency, attachment and penalty markers, riding after the applicant's
   name rather than in a column of their own. */
.pf-flags {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-left: 9px;
    vertical-align: middle;
}

.pf-flag {
    font-size: 13px;
    line-height: 1;
    color: var(--pf-faint);
}

.pf-flag-urgent  { color: #a92e22; }
.pf-flag-file    { color: #90a0af; }
.pf-flag-penalty { color: #a35a00; cursor: pointer; }
.pf-flag-penalty:hover { color: #8a4b00; }

/* Amber, not red. Red is what a rejected or cancelled request wears, and what
   Discard and Cancel request wear - it means dead or destructive. A late
   submission is a caution on a request that is still live, and it is amber
   everywhere else it appears: the report panel's header, the report deadline
   on the row, the Report due count, the penalty band. */
.pf-late {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #fff6e6;
    color: #a35a00;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .03em;
    white-space: nowrap;
}

/* ---- Bulk selection -------------------------------------------------- */

/* Was absolutely positioned at right:270px, top:-15px over the table. */
.pf-bulk {
    display: none;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    padding: 6px 8px 6px 12px;
    background: var(--pf-accent-wash);
    border: 1px solid var(--pf-wash-line, #cfe9f5);
    border-radius: var(--pf-r-ctl);
    font-size: 12.5px;
    color: #1f5f80;
}

.pf-bulk.is-on { display: inline-flex; }

.pf-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* The date range control, which is a div rather than a button. Wide enough
   for a full range, so a short label ("All dates") does not shrink it and
   shift the filters beside it; the label takes the spare room, keeping the
   caret at the right edge. */
#pfbook #leave_status_range {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    min-width: 240px;
    padding: 0 11px;
    font-size: 13px;
    color: var(--pf-ink);
    background: var(--pf-surface);
    border: 1px solid var(--pf-line-strong);
    border-radius: var(--pf-r-ctl);
    cursor: pointer;
    white-space: nowrap;
}

/* Centred in whole pixels. Nunito at 13px is an 18px glyph box with the
   capitals in its upper part; the inherited 19.5px line left 0.75px of
   leading that Chrome rounds differently at 1x and 2x, and on a 1x screen
   the label sat 2px high. An 18px line lands the same on any screen, and
   2px above it centres the capitals and digits in the box. */
#pfbook #leave_status_range span { flex: 1; line-height: 18px; padding-top: 2px; }
#pfbook #leave_status_range:hover { border-color: #8fa0b0; }
/* Font Awesome's script swaps each <i> for an <svg>, so an i-only rule never
   reached the icons; the svg sizes to its font-size (1em) and fills with
   currentColor. */
#pfbook #leave_status_range i,
#pfbook #leave_status_range svg { color: var(--pf-faint); font-size: 12px; }

/* The three plain selects in the filter row. */
#pfbook .pf-filters select.form-control {
    height: 36px;
    min-width: 150px;
    padding: 0 30px 0 11px;
    font-size: 13px;
    color: var(--pf-ink);
    background-color: var(--pf-surface);
    border: 1px solid var(--pf-line-strong);
    border-radius: var(--pf-r-ctl);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20' stroke='%2367788a' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 9px center;
    background-size: 14px 14px;
}

#pfbook .pf-filters select.form-control:focus { outline: none; box-shadow: none; border-color: #8fa0b0; }

/* The applications page keeps its filters, tabs, table and modals inside one
   card, so the padding lives on a body rather than on pf-card-head alone. */
.pf-card-body { padding: 18px; }

@media (max-width: 575px) {
    .pf-card-body { padding: 14px; }
}

/* ---- Request details dialog ------------------------------------------ */

/* Bootstrap's modal markup, restyled in place: the ids and the handlers
   bound to them are what drive this dialog, so none of them move. */
.pf-request-dialog .modal-content {
    border: 1px solid var(--pf-line);
    border-radius: 14px;
    box-shadow: 0 18px 48px rgba(22, 33, 43, .18);
}

.pf-request-dialog .modal-header {
    align-items: center;
    padding: 16px 22px;
    border-bottom: 1px solid var(--pf-line);
}

.pf-request-dialog .modal-title {
    font-size: 15px !important;
    font-weight: 600;
    color: var(--pf-ink);
}

.pf-request-dialog .modal-body { padding: 20px 22px; }

.pf-request-dialog .modal-footer {
    gap: 8px;
    padding: 14px 22px;
    background: var(--pf-surface-2);
    border-top: 1px solid var(--pf-line);
}

/* Thirteen headings set at 20px bold - larger than the dialog title they sat
   under, so the page read as a list of shouted labels. */
.pf-request-dialog .pf-d-section {
    margin: 20px 0 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--pf-faint);
}

.pf-request-dialog .modal-body > .pf-d-section:first-of-type { margin-top: 0; }

/* The rules between every section did the same job as the spacing above. */
.pf-request-dialog hr {
    margin: 18px 0 0;
    border: 0;
    border-top: 1px solid var(--pf-line);
}

.pf-request-dialog .form-step p { margin: 0; color: var(--pf-ink-2); font-size: 14px; }
/* An error under a field keeps its own look; the rule above would otherwise
   take its colour and size, as it does every paragraph in a form step. */
.pf-request-dialog .form-step p.pf-err { margin: 6px 0 0; font-size: 12px; color: #c0392b; }
/* The attachment picker keeps its own size and colours, as the rule above takes
   from every paragraph in a form step: its hint is muted, its error red, and
   its drop-zone lines are smaller than body text. */
.pf-request-dialog .form-step p.rf-drop-lead { font-size: 13px; }
.pf-request-dialog .form-step p.rf-drop-rule { font-size: 11.5px; color: var(--pf-faint, #90a0af); }
.pf-request-dialog .form-step p.rf-hint { font-size: 12px; color: var(--pf-muted, #67788a); }
.pf-request-dialog .form-step p.rf-hint.is-error { font-size: 12px; color: var(--pf-crit, #a92e22); }

.pf-request-dialog #admin_modal_leave_description {
    font-size: 14px;
    line-height: 1.6;
    color: var(--pf-ink);
}

.pf-request-dialog #admin_modal_leave_remarks {
    width: 100%;
    min-height: 76px;
    padding: 9px 11px;
    font-size: 13.5px;
    color: var(--pf-ink);
    background: var(--pf-surface);
    border: 1px solid var(--pf-line-strong) !important;
    border-radius: var(--pf-r-ctl) !important;
    resize: vertical;
}

.pf-request-dialog #admin_modal_leave_remarks:focus {
    outline: none;
    box-shadow: none;
    border-color: var(--pf-accent) !important;
}

/* Was width: 33rem !important inside a dialog that is not always that wide,
   holding rows of Tailwind classes at their own scale. */
.pf-request-dialog #admin_modal_leave_docs {
    width: auto !important;
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pf-file a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: 260px;
    padding: 5px 11px;
    font-size: 12.5px;
    color: var(--pf-ink-2);
    background: var(--pf-surface-2);
    border: 1px solid var(--pf-line);
    border-radius: var(--pf-r-ctl);
    text-decoration: none;
}

.pf-file a:hover, .pf-file a:focus {
    background: var(--pf-accent-wash);
    border-color: #cfe9f5;
    color: var(--pf-accent);
    text-decoration: none;
}

.pf-file i { flex: none; font-size: 11px; color: var(--pf-faint); }
.pf-file a:hover i { color: var(--pf-accent); }

.pf-file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pf-file-ext {
    flex: none;
    padding: 1px 5px;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--pf-muted);
    background: var(--pf-surface-3);
    border-radius: 4px;
}

.pf-file-size {
    flex: none;
    font-family: var(--pf-mono);
    font-size: 10.5px;
    color: var(--pf-faint);
}

/* An image attachment shows itself. */
.pf-file .pf-thumb {
    position: relative;
    display: block;
    width: 76px;
    height: 76px;
    padding: 0;
    overflow: hidden;
    background: var(--pf-surface-3);
    border: 1px solid var(--pf-line);
    border-radius: var(--pf-r-ctl);
}

.pf-file .pf-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-file .pf-thumb:hover { border-color: var(--pf-accent); }

.pf-thumb-zoom {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 15px;
    background: rgba(22, 33, 43, .45);
    opacity: 0;
    transition: opacity .15s ease;
}

.pf-thumb:hover .pf-thumb-zoom, .pf-thumb:focus .pf-thumb-zoom { opacity: 1; }
.pf-thumb-zoom i { color: #fff !important; font-size: 15px !important; }

.pf-file {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pf-file.is-removable {
    padding-right: 0;
}

.pf-file-del {
    flex: none;
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    background: none;
    border: 0;
    border-radius: 5px;
    padding: 0;
    color: var(--pf-faint);
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
}

.pf-file-del:hover { background: var(--pf-surface-3); color: var(--pf-crit); }

/* The attachment opened in place. */
.pf-lightbox { border-radius: var(--pf-r-card) !important; }
.pf-lightbox-img { display: block; max-width: 78vw; max-height: 76vh; border-radius: 8px; }

/* Actions in the product's own palette rather than Bootstrap's info/danger. */
.pf-request-dialog .modal-footer .btn {
    height: 36px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--pf-r-ctl);
    border: 1px solid transparent;
}

.pf-request-dialog .modal-footer .btn-info {
    background: var(--pf-accent);
    border-color: var(--pf-accent);
    color: #fff;
}

.pf-request-dialog .modal-footer .btn-info:hover { background: #005785; border-color: #005785; }

.pf-request-dialog .modal-footer .btn-danger {
    background: #fff;
    border-color: #e8cdc9;
    color: #a92e22;
}

.pf-request-dialog .modal-footer .btn-danger:hover { background: #fbeae7; color: #8c2419; }

.pf-request-dialog .modal-footer .btn-dark,
.pf-request-dialog .modal-footer .btn-secondary {
    background: #fff;
    border-color: var(--pf-line-strong);
    color: var(--pf-ink-2);
}

.pf-request-dialog .modal-footer .btn-dark:hover,
.pf-request-dialog .modal-footer .btn-secondary:hover { background: var(--pf-surface-3); color: var(--pf-ink); }

/* The request type, printed at 20px bold above the description. */
.pf-request-dialog #request_type_badge { font-size: 13px !important; margin-bottom: 2px; }

.pf-tabrow {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    /* No rule of its own: pf-card-head above already draws one, and the two
       together read as an empty band between the filters and the tabs. */
    margin: 16px 0 14px;
}


/* A state the row reports rather than an action you can take - so it sits
   with the applicant, next to Late, and says what it is instead of being an
   icon in the actions column with the answer in a tooltip. */
.pf-state {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--pf-surface-3);
    color: var(--pf-ink-2);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .03em;
    white-space: nowrap;
    vertical-align: 1px;
}

/* The chips above the description are the table's own pf-type pills now, so
   they only need spacing here - not a palette of their own. */
.pf-request-dialog #request_type_badge > * + * { margin-left: 6px; }
.pf-request-dialog #request_type_badge .pf-late { margin-left: 6px; }

/* The employee filter sits in a row of three plain selects that each show a
   chosen option in ink. Left at the faint placeholder colour it was the one
   control in the row that read as disabled, so it takes the same ink as its
   neighbours until something is actually chosen. */
.pf-filters .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: var(--pf-ink);
}

.pf-filters .pf-select2,
.pf-filters .pf-select2 .select2-container { min-width: 240px; }

/* ---- Request dialog: the decision ------------------------------------ */

/* What is being asked for, stated once and first. The dialog used to open
   on the free-text reason, which is the least reliable thing in it. */
.pf-d-ask {
    margin: 2px 0 0;
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -.01em;
    color: var(--pf-ink);
}

/* Facts as label and value rather than a run of bulleted sentences. */
/* Label above value rather than beside it. Side-by-side gave the value about
   170px of a 288px column, so "07 Sep 2026 - 3:43 PM" and every loan figure
   broke across two lines mid-value. Stacked, the value has the whole column,
   and the few that still wrap wrap as a block instead of a ragged
   continuation of their own label. */
.pf-request-dialog .pf-kv {
    /* The lists arrive with list-style-type: disc set inline and, on the
       details list, a .leaveDetails indent; both have to go or the labels
       sit bulleted and a column short. */
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: grid;
    /* Three across, fixed. auto-fit put the column count at the mercy of the
       dialog's width, and a taller request's scrollbar took 15px of it - so a
       leave request came out three across and an extra leave request four,
       with the same labels in different places. */
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px 24px;
}

.pf-request-dialog .pf-kv > li { min-width: 0; list-style: none; }

.pf-kv-k {
    display: block;
    margin-bottom: 2px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--pf-faint);
}

.pf-kv-v {
    display: block;
    font-size: 13.5px;
    line-height: 1.45;
    color: var(--pf-ink);
    overflow-wrap: anywhere;
}

/* Beside a machine reading there is half the width, so two across. */
.pf-request-dialog .pf-d-cols .pf-kv { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }

@media (max-width: 575px) {
    .pf-request-dialog .pf-kv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* A value chosen along a scale - the approver's share of salary on a flexible
   loan. The same control as .rf-range on the employee's request form,
   restated there on the rf tokens because the request forms do not load this
   file; change the two together.

   A native range input underneath, so the keyboard and screen readers treat
   it as any other input. The page sets --pf-range-fill on the input and
   positions .pf-range-value, since both follow the value. The figure over the
   handle shows only while the slider is hovered, dragged or moved with the
   keyboard, as Ant Design's does; the page adds .is-sliding for a drag. */
.pf-range { position: relative; max-width: 420px; padding: 6px 0 0; }
.pf-range-value {
    position: absolute; top: -24px; left: 8px; z-index: 1;
    transform: translateX(-50%);
    padding: 2px 7px; border-radius: 6px;
    background: var(--pf-ink); color: var(--pf-surface);
    font-family: var(--pf-mono); font-size: 11.5px; font-weight: 600;
    font-variant-numeric: tabular-nums; white-space: nowrap;
    pointer-events: none;
    opacity: 0; transition: opacity .15s;
}
.pf-range-value::after {
    content: ""; position: absolute; left: 50%; bottom: -4px;
    transform: translateX(-50%);
    border: 4px solid transparent; border-bottom: 0; border-top-color: var(--pf-ink);
}
.pf-range-input:hover ~ .pf-range-value,
.pf-range-input:focus-visible ~ .pf-range-value,
.pf-range.is-sliding .pf-range-value { opacity: 1; }
.pf-range input.pf-range-input {
    -webkit-appearance: none; appearance: none;
    display: block; width: 100%; height: 16px; margin: 0; padding: 0;
    border: 0; background: transparent; cursor: pointer;
}
.pf-range input.pf-range-input:focus { outline: none; box-shadow: none; }
.pf-range input.pf-range-input::-webkit-slider-runnable-track {
    height: 4px; border-radius: 2px;
    background: linear-gradient(to right,
        var(--pf-accent) var(--pf-range-fill, 0%), var(--pf-line) var(--pf-range-fill, 0%));
}
.pf-range input.pf-range-input::-moz-range-track { height: 4px; border-radius: 2px; background: var(--pf-line); }
.pf-range input.pf-range-input::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--pf-accent); }
.pf-range input.pf-range-input::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none; box-sizing: border-box;
    width: 16px; height: 16px; margin-top: -6px; border-radius: 50%;
    background: var(--pf-surface); border: 2px solid var(--pf-accent);
    transition: box-shadow .15s;
}
.pf-range input.pf-range-input::-moz-range-thumb {
    box-sizing: border-box; width: 16px; height: 16px; border-radius: 50%;
    background: var(--pf-surface); border: 2px solid var(--pf-accent);
    transition: box-shadow .15s;
}
.pf-range input.pf-range-input:hover::-webkit-slider-thumb,
.pf-range input.pf-range-input:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--pf-accent-edge); }
.pf-range input.pf-range-input:hover::-moz-range-thumb,
.pf-range input.pf-range-input:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px var(--pf-accent-edge); }
.pf-range-marks {
    display: flex; justify-content: space-between; margin-top: 6px;
    font-family: var(--pf-mono); font-size: 11px; color: var(--pf-faint);
    font-variant-numeric: tabular-nums;
}

/* The penalty decision, beside the lateness that calls for it. */
.pf-penalty {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 18px;
    padding: 12px 14px;
    background: var(--pf-caution-bg, #fff6e6);
    border: 1px solid #f0dcb8;
    border-radius: var(--pf-r-ctl);
}

.pf-penalty-text p { margin: 0; }
.pf-penalty-title { font-size: 13.5px; font-weight: 600; color: #a35a00; }
.pf-penalty-why { margin-top: 2px !important; font-size: 12px; color: #8a6a3a; }
/* The page's .switch is 60x34, sized for a control that used to sit alone in
   the footer. Beside a two-line label it only has to read as a switch. */
.pf-penalty .switch { margin: 0; flex: none; width: 38px; height: 21px; }
.pf-penalty .slider:before { height: 15px; width: 15px; left: 3px; bottom: 3px; }
.pf-penalty input:checked + .slider:before { transform: translateX(17px); }

/* A section heading with its own control on the same row - the balance year,
   the look-up's range - rather than a line of 10px text below it.
   Not .pf-d-head: that name is taken by the pf-dialog block above, and its
   22px padding was indenting these headings past every other one. */
.pf-request-dialog .pf-d-band {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pf-request-dialog .pf-d-band .pf-d-section { margin: 20px 0 6px; }

.pf-request-dialog .pf-d-year { margin: 14px 0 0 auto; }

.pf-request-dialog .pf-d-year input {
    width: 76px;
    height: 28px;
    padding: 0 8px;
    font-family: var(--pf-mono);
    font-size: 12px;
    text-align: center;
    color: var(--pf-ink-2);
    background: var(--pf-surface);
    border: 1px solid var(--pf-line-strong);
    border-radius: 7px;
}

.pf-request-dialog .pf-d-year input:focus {
    outline: none; box-shadow: none; border-color: var(--pf-accent);
}

/* Balance table. Was a Bootstrap .table with centred text set inline. */
.pf-request-dialog .pf-d-table { margin: 0; font-size: 13px; }

.pf-request-dialog .pf-d-table th {
    padding: 8px 10px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--pf-faint);
    text-align: center;
    border: 0;
    border-bottom: 1px solid var(--pf-line);
}

.pf-request-dialog .pf-d-table td {
    padding: 9px 10px;
    text-align: center;
    color: var(--pf-ink-2);
    border: 0;
    border-bottom: 1px solid var(--pf-line);
}

.pf-request-dialog .pf-d-table tbody tr:last-child td { border-bottom: 0; }

.pf-request-dialog .pf-d-table .pf-d-avail {
    font-family: var(--pf-mono);
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: var(--pf-ink);
}

/* The row for the type actually being asked for. */
.pf-request-dialog .pf-d-table tbody tr.is-asked td {
    background: var(--pf-accent-wash);
    color: var(--pf-ink);
}

.pf-request-dialog .pf-d-table tbody tr.is-asked .pf-d-avail { color: var(--pf-accent); }

/* Remarks: what it is for, said next to it. */
.pf-request-dialog .pf-d-remarks {
    width: 100%;
    min-height: 76px;
    padding: 9px 11px;
    font-size: 13.5px;
    color: var(--pf-ink);
    background: var(--pf-surface);
    border: 1px solid var(--pf-line-strong);
    border-radius: var(--pf-r-ctl);
    resize: vertical;
}

.pf-request-dialog .pf-d-remarks::placeholder { color: var(--pf-faint); }
.pf-request-dialog .pf-d-remarks:focus { outline: none; box-shadow: none; border-color: var(--pf-accent); }
.pf-request-dialog .pf-d-remarks.is-bad { border-color: #c0392b; }
/* A hint that has turned into an error, for any request dialog. !important
   to win over .pf-d-hint's own, which has it. */
.pf-request-dialog .pf-d-hint.is-error { color: var(--pf-crit) !important; }

.pf-request-dialog .pf-d-hint {
    margin: 6px 0 0 !important;
    font-size: 11.5px;
    color: var(--pf-muted) !important;
}

/* Approve and Reject are the decision; Close is the way out of it. */
.pf-request-dialog .modal-footer { justify-content: space-between; }
.pf-request-dialog .pf-d-foot-left { margin-right: auto; }

/* A decision on leave days (Management's on a due, as the final approver's
   on a request): days, then month and amount, or the reason below, in three
   equal columns so every picked decision lines up, stacking on a phone; and
   its figures (what is to be decided, what is, what is left) on one line. */
.pf-request-dialog .ld-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 14px; }
.pf-request-dialog .ld-fields .ld-wide { grid-column: 1 / -1; margin: 0; }
.pf-request-dialog .pf-d-stats.ld-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 575px) {
    .pf-request-dialog .ld-fields { grid-template-columns: minmax(0, 1fr); }
}

/* The decision's cards, like the Nominee modal's relationship cards: an icon,
   the decision and what it means, and a check badge. Each is a label holding a
   visually hidden checkbox, so the keyboard reaches it and its focus shows. */
.pf-request-dialog .leave-due-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 8px 0 0; }
/* Positioned, so the hidden checkbox sits in its own card: at the dialog's
   corner, focusing it on a tap scrolled the dialog back to the top. */
.pf-request-dialog .leave-due-card {
    position: relative;
    display: flex; align-items: center; gap: 12px; margin: 0; padding: 12px 14px;
    background: var(--pf-surface); border: 1px solid var(--pf-line); border-radius: var(--pf-r-ctl);
    cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.pf-request-dialog .leave-due-card:hover { border-color: var(--pf-accent); box-shadow: var(--pf-shadow-1); }
.pf-request-dialog .leave-due-card.is-picked { background: var(--pf-accent-wash); border-color: var(--pf-accent); }
.pf-request-dialog .leave-due-card:focus-within { outline: 2px solid var(--pf-accent-edge); outline-offset: 1px; }
.pf-request-dialog .leave-due-avatar {
    flex: none; display: grid; place-items: center; width: 34px; height: 34px;
    background: var(--pf-surface-2); border-radius: 8px; color: var(--pf-accent); font-size: 16px;
}
.pf-request-dialog .leave-due-who { flex: 1; min-width: 0; }
.pf-request-dialog .leave-due-name { display: block; margin-bottom: 2px; font-size: 13px; font-weight: 700; color: var(--pf-ink); }
.pf-request-dialog .leave-due-rel { display: block; font-size: 11.5px; line-height: 1.35; color: var(--pf-muted); }
.pf-request-dialog .leave-due-badge {
    flex: none; display: grid; place-items: center; width: 22px; height: 22px;
    background: var(--pf-surface); border: 1.5px solid var(--pf-line-strong); border-radius: 50%;
    color: var(--pf-muted); font-size: 11px; transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.pf-request-dialog .leave-due-card.is-picked .leave-due-badge { background: var(--pf-accent); border-color: var(--pf-accent); color: #fff; }

/* What each picked decision needs, in a panel per decision, like the Nominee
   modal's shares: its name and a remove button, then its fields (.ld-fields). */
.pf-request-dialog .leave-due-selected-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.pf-request-dialog .leave-due-selected-list:empty { display: none; }
.pf-request-dialog .leave-due-selected-card {
    padding: 12px 14px 14px; background: var(--pf-surface-2);
    border: 1px solid var(--pf-line); border-radius: var(--pf-r-ctl);
}
.pf-request-dialog .leave-due-selected-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.pf-request-dialog .leave-due-selected-name { font-size: 13px; font-weight: 700; color: var(--pf-accent); }
.pf-request-dialog .leave-due-selected-inputs .ld-label { display: block; margin: 0 0 4px; }
.pf-request-dialog .leave-due-selected-remove {
    flex: none; display: grid; place-items: center; width: 26px; height: 26px;
    background: var(--pf-surface); border: 1px solid var(--pf-line); border-radius: 6px;
    color: var(--pf-faint); cursor: pointer; transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.pf-request-dialog .leave-due-selected-remove:hover { background: var(--pf-crit); border-color: var(--pf-crit); color: #fff; }
.pf-request-dialog .leave-due-selected-remove i { font-size: 11px; }
.pf-request-dialog .ld-fields .pf-input.is-bad, .pf-request-dialog .ld-fields .pf-d-remarks.is-bad { border-color: #c0392b; }
@media (max-width: 575px) {
    .pf-request-dialog .leave-due-cards { grid-template-columns: minmax(0, 1fr); }
}

.pf-request-dialog .modal-footer .btn-link.pf-d-quiet {
    padding: 0 4px;
    color: var(--pf-muted);
    background: none;
    border: 0;
    text-decoration: none;
}

.pf-request-dialog .modal-footer .btn-link.pf-d-quiet:hover { color: var(--pf-ink); text-decoration: underline; }

/* Mark As is a correction to the request, not a verdict on it - but drawn
   borderless it read as a different kind of control from the two beside it.
   Same outline as Reject, neutral rather than red. */
.pf-request-dialog .modal-footer #marked_as_btn {
    display: inline-flex;
    align-items: center;
    background: var(--pf-surface);
    border-color: var(--pf-line-strong);
    color: var(--pf-ink-2);
}

.pf-request-dialog .modal-footer #marked_as_btn:hover {
    background: var(--pf-surface-3);
    color: var(--pf-ink);
}

/* Bootstrap's caret is sized off the text baseline; inside a flex button it
   becomes a flex item and lands high. */
.pf-request-dialog .modal-footer #marked_as_btn::after {
    margin-left: 7px;
    align-self: center;
    vertical-align: 0;
    border-top-color: var(--pf-faint);
}

/* The Mark As menu, in the dialog's own palette. */
.pf-request-dialog .modal-footer .dropdown-menu {
    min-width: 0;
    padding: 5px;
    border: 1px solid var(--pf-line);
    border-radius: var(--pf-r-ctl);
    box-shadow: 0 8px 26px rgba(22, 33, 43, .16);
}

.pf-request-dialog .modal-footer .dropdown-item {
    padding: 7px 12px;
    font-size: 13px;
    color: var(--pf-ink-2);
    background: none;
    border: 0;
    border-radius: 7px;
    text-align: left;
}

.pf-request-dialog .modal-footer .dropdown-item:hover,
.pf-request-dialog .modal-footer .dropdown-item:focus {
    background: var(--pf-surface-3);
    color: var(--pf-ink);
}

/* The request date opens the calendar. It was Tailwind's blue-500, the one
   colour on the dialog that belonged to no palette. */
.pf-request-dialog .pf-kv a,
.pf-request-dialog .pf-kv a:hover,
.pf-request-dialog .pf-kv a:focus {
    color: var(--pf-accent) !important;
    text-decoration: none;
    border-bottom: 1px dashed #9fc7db;
}

.pf-request-dialog .pf-kv a:hover { border-bottom-color: var(--pf-accent); }

/* Who raised the request: a footnote, not an alert. */
.pf-request-dialog #created_alert {
    padding: 0;
    margin-top: 14px !important;
    background: none;
    border: 0;
    color: var(--pf-muted);
    font-size: 12px;
}

.pf-request-dialog #created_alert svg { width: 12px; height: 12px; margin-right: 6px; opacity: .7; }
.pf-request-dialog #created_alert b, .pf-request-dialog #created_alert strong { color: var(--pf-ink-2); }

/* The facts beside the machine reading, or beside a leave adjustment. */
.pf-request-dialog .pf-d-cols {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 16px 28px;
    align-items: start;
}

.pf-request-dialog .pf-d-cols > div:only-child { grid-column: 1 / -1; }

/* Heads a column, so it needs to sit above the field labels rather than
   beside them at the same weight. */
.pf-request-dialog .pf-d-cols strong {
    display: block;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--pf-line);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--pf-muted);
}

@media (max-width: 767px) {
    .pf-request-dialog .pf-d-cols { grid-template-columns: minmax(0, 1fr); }
}

/* The Monthly/Yearly range, on the look-up's own heading row. */
.pf-request-dialog .pf-d-range { margin: 14px 0 0 auto; }
.pf-request-dialog .pf-d-range .pf-seg-btn { padding: 4px 10px; font-size: 12px; }

/* What the employee has already taken: four counts, so a strip of figures
   rather than a two-column table of four rows. */
.pf-request-dialog .pf-d-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    margin-top: 4px;
}

.pf-request-dialog .pf-d-stat {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 10px 12px;
    background: var(--pf-surface-2);
    border: 1px solid var(--pf-line);
    border-radius: var(--pf-r-ctl);
}

.pf-request-dialog .pf-d-stat-k {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--pf-faint);
}

.pf-request-dialog .pf-d-stat-v {
    font-family: var(--pf-mono);
    font-variant-numeric: tabular-nums;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.1;
    color: var(--pf-ink);
}

/* Nothing taken is the common case; it should not read as a figure. */
.pf-request-dialog .pf-d-stat-v.is-zero { font-weight: 500; color: var(--pf-faint); }

/* Report bodies come out of a rich-text editor, and app.css is Tailwind: its
   preflight sets every paragraph margin to 0 and strips list markers. So a
   report written as spaced paragraphs and bullets reached the reader as one
   unbroken block with no bullets at all - which is why people pad theirs with
   <br><br> and &nbsp; and number their own lines by hand.

   .pf-prose restores ordinary prose inside the editor's output only. It is
   also applied to the editor's own canvas, so what is typed is what the
   approver sees. */
.pf-prose {
    font-size: 14px;
    line-height: 1.65;
    color: var(--pf-ink, #16212b);
    overflow-wrap: anywhere;
}

.pf-prose p { margin: 0 0 10px; }
.pf-prose p:last-child { margin-bottom: 0; }
.pf-prose > :first-child { margin-top: 0; }

.pf-prose ul,
.pf-prose ol { margin: 0 0 10px; padding-left: 22px; }
.pf-prose ul { list-style: disc outside; }
.pf-prose ol { list-style: decimal outside; }
.pf-prose ul ul { list-style: circle outside; }
.pf-prose li { display: list-item; margin: 2px 0; }
.pf-prose li > p { margin: 0; }

.pf-prose h1, .pf-prose h2, .pf-prose h3, .pf-prose h4 {
    margin: 14px 0 6px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--pf-ink, #16212b);
}

.pf-prose h1 { font-size: 18px; }
.pf-prose h2 { font-size: 16px; }
.pf-prose h3, .pf-prose h4 { font-size: 14.5px; }

.pf-prose strong, .pf-prose b { font-weight: 600; }
.pf-prose a { color: var(--pf-accent, #006699); }

.pf-prose blockquote {
    margin: 0 0 10px;
    padding: 2px 0 2px 12px;
    border-left: 3px solid var(--pf-line-strong, #ccd5de);
    color: var(--pf-ink-2, #3d4c59);
}

.pf-prose table { border-collapse: collapse; margin: 0 0 10px; }
.pf-prose td, .pf-prose th { padding: 6px 9px; border: 1px solid var(--pf-line, #e3e8ee); }

/* The editor writes alignment as these classes. */
.pf-prose .text-center { text-align: center; }
.pf-prose .text-right  { text-align: right; }
.pf-prose .text-justify { text-align: justify; }

.pf-request-dialog .pf-d-report { font-size: 14px; line-height: 1.65; color: var(--pf-ink); }

/* ---- Anchored confirm ------------------------------------------------- */

.pf-pop {
    position: absolute;
    z-index: 1080;
    width: 288px;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .12s ease, transform .12s ease;
    pointer-events: none;
}

/* On a page with no #pfbook, js/pf-pop.js puts the popup straight on the
   body, out of reach of the tokens #pfbook and .pf-dialog define; it carries
   the same set itself there. */
body > .pf-pop {
    --pf-surface:     #ffffff;
    --pf-surface-2:   #f7f9fb;
    --pf-surface-3:   #eef2f6;
    --pf-line:        #e3e8ee;
    --pf-line-strong: #ccd5de;
    --pf-ink:         #16212b;
    --pf-ink-2:       #3d4c59;
    --pf-muted:       #67788a;
    --pf-faint:       #90a0af;
    --pf-accent:      #006699;
    --pf-accent-wash: #e6f7ff;
    --pf-accent-edge: #bfe3f2;
    --pf-r-ctl:       9px;
    --pf-crit:        #a92e22;
}

.pf-pop[hidden] { display: none; }
.pf-pop.is-open { opacity: 1; transform: none; pointer-events: auto; }

.pf-pop-card {
    padding: 14px 16px;
    background: var(--pf-surface);
    border: 1px solid var(--pf-line);
    border-radius: var(--pf-r-ctl);
    box-shadow: 0 8px 26px rgba(22, 33, 43, .16);
}

.pf-pop-body { display: flex; align-items: flex-start; gap: 9px; }
.pf-pop-icon { flex: none; margin-top: 1px; color: #d68910; font-size: 14px; }

.pf-pop-title { margin: 0; font-size: 13.5px; font-weight: 600; color: var(--pf-ink); }
.pf-pop-desc { margin: 3px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--pf-ink-2); }

.pf-pop-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.pf-pop-actions[hidden] { display: none; }

/* The popup as a note about what happened (js/pf-pop.js), not a question. */
.pf-pop-icon.is-ok { color: #0f7a52; }
.pf-pop-icon.is-info { color: var(--pf-accent); }
.pf-pop-icon.is-no { color: #a92e22; }

.pf-pop-btn {
    appearance: none;
    height: 28px;
    padding: 0 12px;
    font: inherit;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--pf-ink-2);
    background: var(--pf-surface);
    border: 1px solid var(--pf-line-strong);
    border-radius: 7px;
    cursor: pointer;
}

.pf-pop-btn:hover { background: var(--pf-surface-3); color: var(--pf-ink); }

.pf-pop-btn.is-primary {
    color: #fff;
    background: var(--pf-accent);
    border-color: var(--pf-accent);
}

.pf-pop-btn.is-primary:hover { background: #005785; border-color: #005785; }

/* Points down at whichever control was pressed. */
.pf-pop-arrow {
    position: absolute;
    bottom: -6px;
    width: 11px;
    height: 11px;
    margin-left: -6px;
    background: var(--pf-surface);
    border-right: 1px solid var(--pf-line);
    border-bottom: 1px solid var(--pf-line);
    transform: rotate(45deg);
}

/* Figures in the mono face, so amounts line up down a column. */
.pf-request-dialog .pf-kv-v.is-num {
    font-family: var(--pf-mono);
    font-variant-numeric: tabular-nums;
    font-size: 13px;
}

/* The parenthetical the value carried, on its own line. */
.pf-request-dialog .pf-kv-note {
    display: block;
    margin-top: 1px;
    font-size: 11.5px;
    line-height: 1.4;
    color: var(--pf-muted);
}

/* The applicant's name opens their profile. Underlined only on hover: the
   column is a list of names, and forty underlines read as forty warnings. */
.pf-name-link, .pf-name-link:focus { color: var(--pf-ink); text-decoration: none; }
.pf-name-link:hover { color: var(--pf-accent); text-decoration: underline; }

/* Balance cards carry a footnote the look-up's do not. */
.pf-request-dialog .pf-d-stat-note {
    font-size: 11.5px;
    line-height: 1.4;
    color: var(--pf-muted);
}

/* The leave type actually being asked for. */
.pf-request-dialog .pf-d-stat.is-asked {
    background: var(--pf-accent-wash);
    border-color: #cfe9f5;
}

.pf-request-dialog .pf-d-stat.is-asked .pf-d-stat-k { color: #3d7b9c; }
.pf-request-dialog .pf-d-stat.is-asked .pf-d-stat-v { color: var(--pf-accent); }
.pf-request-dialog .pf-d-stat.is-asked .pf-d-stat-note { color: #1f5f80; }

/* Leave owed beyond the balance (AN36). A card with a due says so as a
   figure of its own, as large as what is left, under a caution rule - on the
   card being asked for too. A card with nothing owed has none of it. */
.pf-request-dialog .pf-d-stat.has-due,
.pf-request-dialog .pf-d-stat.is-asked.has-due { border-color: #f0dcb8; }

.pf-request-dialog .pf-d-stat-due {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-top: 4px;
    padding-top: 7px;
    border-top: 1px dashed #f0dcb8;
}

.pf-request-dialog .pf-d-stat .pf-d-stat-due-k {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #a35a00;
}

.pf-request-dialog .pf-d-stat .pf-d-stat-due-v {
    font-family: var(--pf-mono);
    font-variant-numeric: tabular-nums;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.1;
    color: #a35a00;
}

/* A balance below zero: what is owed, in the caution colour dues use. */
.pf-request-dialog .pf-d-stat .pf-d-stat-v.is-neg { color: #a35a00; }

.pf-request-dialog .pf-d-empty { font-size: 13px; color: var(--pf-muted); }

/* ---- Request history -------------------------------------------------- */

/* The rail and its dots, for any dialog that lists events in order - a
   request's history, a day's clock-ins. */

.pf-dialog .pf-tl,
.pf-history .pf-tl {
    list-style: none;
    margin: 2px 0 0;
    padding: 0 0 0 18px;
    border-left: 1px solid var(--pf-line);
}

.pf-dialog .pf-tl-item,
.pf-history .pf-tl-item {
    position: relative;
    padding: 4px 0;
}

.pf-dialog .pf-tl-item + .pf-tl-item,
.pf-history .pf-tl-item + .pf-tl-item { margin-top: 10px; }

/* The dot sits on the rail, not beside it. */
.pf-dialog .pf-tl-item::before,
.pf-history .pf-tl-item::before {
    content: "";
    position: absolute;
    left: -23px;
    top: 10px;
    width: 9px;
    height: 9px;
    background: var(--pf-surface);
    border: 2px solid var(--pf-line-strong);
    border-radius: 50%;
}

.pf-dialog .pf-tl-item.is-ok::before,
.pf-history .pf-tl-item.is-ok::before { border-color: #0f7a52; }
.pf-dialog .pf-tl-item.is-no::before,
.pf-history .pf-tl-item.is-no::before { border-color: var(--pf-danger, #a92e22); }
.pf-dialog .pf-tl-item.is-back::before,
.pf-history .pf-tl-item.is-back::before { border-color: #a35a00; }

/* ---- Approval pipeline ------------------------------------------------ */

/* The stages in order, as steps rather than a drawing: HTML wraps on a narrow
   dialog where the SVG it replaced had to guess each label's width. */
.pf-request-dialog .pf-pl {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 0;
    margin: 4px 0 0;
    padding: 0;
}

.pf-request-dialog .pf-pl-step {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    color: var(--pf-faint);
}

/* the rule between steps, drawn as part of every step but the first */
.pf-request-dialog .pf-pl-step + .pf-pl-step::before {
    content: "";
    width: 22px;
    height: 1px;
    margin: 0 8px;
    background: var(--pf-line-strong);
}

.pf-request-dialog .pf-pl-mark {
    display: inline-grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-family: var(--pf-mono);
    font-size: 10.5px;
    font-weight: 600;
    color: var(--pf-faint);
    background: var(--pf-surface);
    border: 1px solid var(--pf-line-strong);
}

.pf-request-dialog .pf-pl-mark i { font-size: 9.5px; }

.pf-request-dialog .pf-pl-step.is-done { color: var(--pf-ink-2); }
.pf-request-dialog .pf-pl-step.is-done .pf-pl-mark { color: #0f7a52; background: #e8f6f0; border-color: #bde0cd; }
.pf-request-dialog .pf-pl-step.is-done + .pf-pl-step::before { background: #bde0cd; }

.pf-request-dialog .pf-pl-step.is-now,
.pf-request-dialog .pf-pl-step.is-ok,
.pf-request-dialog .pf-pl-step.is-no,
.pf-request-dialog .pf-pl-step.is-back { font-weight: 600; color: var(--pf-ink); }

.pf-request-dialog .pf-pl-step.is-now  .pf-pl-mark { color: #fff; background: var(--pf-accent); border-color: var(--pf-accent); }
.pf-request-dialog .pf-pl-step.is-ok   .pf-pl-mark { color: #fff; background: #0f7a52; border-color: #0f7a52; }
.pf-request-dialog .pf-pl-step.is-no   .pf-pl-mark { color: #fff; background: #a92e22; border-color: #a92e22; }
.pf-request-dialog .pf-pl-step.is-back .pf-pl-mark { color: #a35a00; background: #fff6e6; border-color: #f0dcb8; }

/* Where it is now, in a sentence, with the same status pill the tables use. */
.pf-request-dialog .pf-pl-state {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin-top: 12px;
}

.pf-request-dialog .pf-pl-sentence { font-size: 13px; font-weight: 600; color: var(--pf-ink); }
.pf-request-dialog .pf-pl-state .pf-status { margin-left: auto; }

/* what / when / who on one line, wrapping together rather than running into
   each other on a narrow dialog. */
.pf-tl-line {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 2px 12px;
}

.pf-tl-what {
    font-size: 13px;
    font-weight: 600;
    color: var(--pf-ink);
}

.pf-tl-when {
    font-family: var(--pf-mono);
    font-variant-numeric: tabular-nums;
    font-size: 12px;
    color: var(--pf-muted);
}

.pf-tl-who { font-size: 12.5px; color: var(--pf-ink-2); }
.pf-tl-who::before { content: "by "; color: var(--pf-faint); }

.pf-request-dialog .pf-tl-note,
.pf-history .pf-tl-note {
    margin: 3px 0 0 !important;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--pf-ink-2) !important;
}

.pf-request-dialog .pf-tl-note::before,
.pf-request-dialog .pf-tl-note::after,
.pf-history .pf-tl-note::before,
.pf-history .pf-tl-note::after { content: "\201C"; color: var(--pf-faint); }
.pf-request-dialog .pf-tl-note::after,
.pf-history .pf-tl-note::after { content: "\201D"; }

/* The profile's History and Sign-in activity tabs, on the same tokens as
   .pf-dialog, which a page is not inside. The full set: the tabs' buttons and
   tables read the surface, radius and wash tokens too. */
.pf-history {
    --pf-surface:     #ffffff;
    --pf-surface-2:   #f7f9fb;
    --pf-surface-3:   #eef2f6;
    --pf-line:        #e3e8ee;
    --pf-line-strong: #ccd5de;
    --pf-ink:         #16212b;
    --pf-ink-2:       #3d4c59;
    --pf-muted:       #67788a;
    --pf-faint:       #90a0af;
    --pf-accent:      #006699;
    --pf-accent-wash: #e6f7ff;
    --pf-accent-edge: #bfe3f2;
    --pf-mono:        ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    --pf-r-ctl:       9px;
}

/* What a history entry changed: the field, what it was, what it became. The
   old value is struck through so the pair reads at a glance; a value that was
   empty is simply left out. */
.pf-tl-changes {
    list-style: none;
    margin: 5px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pf-tl-changes li { font-size: 12.5px; line-height: 1.5; color: var(--pf-ink-2); }
.pf-tl-field { color: var(--pf-muted); margin-right: 6px; }
.pf-tl-from { color: var(--pf-faint); text-decoration: line-through; }
.pf-tl-arrow { color: var(--pf-faint); margin: 0 5px; }
.pf-tl-to { color: var(--pf-ink); }

/* An admin acting while signed in as the person. */
.pf-tl-via { font-size: 12px; color: var(--pf-muted); }

/* The device a change came from, linked to the sign-in history for it. */
.pf-tl-device { font-size: 12px; color: var(--pf-muted); }
.pf-tl-device a { font-family: var(--pf-mono); color: var(--pf-accent); text-decoration: none; }
.pf-tl-device a:hover, .pf-tl-device a:focus { text-decoration: underline; }

/* A remark about the entry itself, not a quote: where the record begins. */
.pf-tl-aside { margin: 3px 0 0 !important; font-size: 12px; color: var(--pf-muted) !important; }

/* The History tab's own lines: what it shows, and its loading state. */
.pf-history .pf-history-note { margin: 0 0 14px; font-size: 12.5px; color: var(--pf-muted); }
.pf-history .pf-history-note:empty { display: none; }
.pf-history .pf-tl + .pf-history-note { margin-top: 14px; }
.pf-history .pf-btn { margin-top: 14px; }

/* A table in a profile card runs to the card's edges, as it does in a
   .pf-card, instead of sitting indented inside the card's padding. */
.pf-history .pf-table-wrap { margin: 0 -20px; }
.pf-history .pf-table-wrap + .pf-history-note { margin-top: 14px; }

/* ---- Sign-in history ---------------------------------------------------- */

/* Everything recorded for one sign-in, two across; the user agent takes the
   whole width because it is one long line. */
.pf-signin-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 24px;
    margin: 0;
}

.pf-signin-facts > div { min-width: 0; }
.pf-signin-facts > .is-wide { grid-column: 1 / -1; }
.pf-signin-facts dd { margin: 0; }
.pf-kv-v.is-mono { font-family: var(--pf-mono); font-size: 12.5px; }

/* Facts about one thing, label over value (.pf-kv-k / .pf-kv-v), as many
   across as fit: a page's counterpart to the dialogs' .pf-kv. */
.pf-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px 24px;
    margin-top: 0;
}

.pf-facts > div { min-width: 0; }
.pf-facts dd { margin: 0; }

@media (max-width: 575px) {
    .pf-signin-facts { grid-template-columns: 1fr; }
}

/* Failed sign-ins that spiked, above the list: amber like .pf-alert, one
   line per spike with the attempts behind it. */
.pf-spikes { margin-bottom: 16px; border-color: #f0dcb8; }
.pf-spikes .pf-card-head { background: #fff6e6; border-bottom-color: #f0dcb8; }
.pf-spikes .pf-h { color: #8a4b00; }
.pf-spikes .pf-note { color: #8a6a3a; }

.pf-spike-list { list-style: none; margin: 0; padding: 0; }

.pf-spike-list > li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 18px;
    border-bottom: 1px solid var(--pf-line);
}

.pf-spike-list > li:last-child { border-bottom: 0; }
.pf-spike-what { font-size: 13.5px; font-weight: 600; color: var(--pf-ink); margin-right: 6px; }

/* Who to look at, and the screening signals (SignInSignals), in a band
   under the card head. */
.pf-signin-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--pf-line);
}

.pf-signin-privileged { margin: 0; white-space: nowrap; }

/* The devices behind the rows - one person's, or everyone on many devices -
   in a band between the tools and the sign-ins. */
.pf-signin-devices { padding-top: 12px; border-bottom: 1px solid var(--pf-line); }
.pf-signin-devices-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin: 0 18px 8px; }
.pf-signin-devices-head .pf-label,
.pf-signin-devices-head .pf-note { margin: 0; }

.pf-signals { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.pf-signals .pf-label { margin: 0 4px 0 0; }

/* A signal: how many, and what of; pressed, it filters the table. */
.pf-signal {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 5px 11px;
    font: inherit;
    font-size: 12.5px;
    color: var(--pf-ink-2);
    background: var(--pf-surface);
    border: 1px solid var(--pf-line-strong);
    border-radius: 999px;
    cursor: pointer;
}

.pf-signal:hover { background: var(--pf-surface-2); }
.pf-signal-count { font-family: var(--pf-mono); font-weight: 700; color: #a35a00; }
.pf-signal.is-zero .pf-signal-count { color: var(--pf-faint); }

.pf-signal.is-active {
    font-weight: 600;
    color: var(--pf-accent);
    background: var(--pf-accent-wash);
    border-color: var(--pf-accent-edge);
}

.pf-signal.is-active .pf-signal-count { color: var(--pf-accent); }

/* The signals one sign-in trips, under its result. */
.pf-signin-flags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }

/* An IP address or device in a row that filters the table to itself. */
.pf-filter-link {
    padding: 0;
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    border-bottom: 1px dotted var(--pf-line-strong);
    cursor: pointer;
}

.pf-filter-link:hover,
.pf-filter-link:focus-visible { color: var(--pf-accent); border-bottom-color: var(--pf-accent); outline: none; }

/* A fact that rides with a history entry - the penalty an approval carried. */
.pf-tl-tag {
    padding: 1px 8px;
    font-size: 11px;
    font-weight: 600;
    color: #a35a00;
    background: #fff6e6;
    border-radius: 999px;
}

/* ---- My requests (employee's own history) ----------------------------- */

/* The year the table is showing, on the card head beside the title. The box
   itself is .pf-year up in the filters block; this only sets the type. */
#pfbook .pf-year {
    font-family: var(--pf-mono);
    font-variant-numeric: tabular-nums;
    text-align: center;
}

/* The detail under a cell's headline - leave type and term under the request,
   the adjusted-to date under the dates. Three columns of N/A before. */
.pf-sub-line {
    display: block;
    margin-top: 3px;
    font-size: 11.5px;
    color: var(--pf-muted);
}

.pf-faint { color: var(--pf-faint); }

.pf-table .pf-col-act { text-align: right; white-space: nowrap; }
.pf-table td.pf-col-act > * + * { margin-left: 6px; }

/* Row actions that go somewhere or destroy something, beside the plain View. */
.pf-row-act-go {
    color: var(--pf-accent);
    border-color: #bcdcec;
    text-decoration: none;
}

.pf-row-act-go:hover, .pf-row-act-go:focus {
    background: var(--pf-accent-wash);
    border-color: var(--pf-accent);
    color: #005785;
    text-decoration: none;
}


/* Errors handed back by the request forms. */
.pf-alert {
    margin: 0 18px 4px;
    padding: 10px 14px;
    background: #fff6e6;
    border: 1px solid #f0dcb8;
    border-radius: var(--pf-r-ctl);
    font-size: 13px;
    color: #8a6a3a;
}

/* ---- Report dialog ---------------------------------------------------- */

.pf-report-dialog .modal-content {
    border: 1px solid var(--pf-line);
    border-radius: 14px;
    box-shadow: 0 18px 48px rgba(22, 33, 43, .18);
}

.pf-report-dialog .modal-header {
    align-items: center;
    padding: 16px 22px;
    border-bottom: 1px solid var(--pf-line);
}

.pf-report-dialog .modal-title { font-size: 15px; font-weight: 600; color: var(--pf-ink); }
.pf-report-dialog .modal-body { padding: 18px 22px; }

.pf-report-dialog .pf-d-section { margin: 0 0 2px; }

.pf-report-hint {
    margin: 0 0 14px;
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--pf-muted);
    max-width: 62ch;
}

/* CKEditor was given a 500px inline height on the textarea it replaces, which
   the editor does not read, so the box came out whatever the toolbar made it. */
/* The canvas takes the same prose styling as the rendered report, so what is
   typed is what the approver is shown. */
.pf-report-editor .ck-content { font-size: 14px; line-height: 1.65; color: var(--pf-ink); }
.pf-report-editor .ck-content p { margin: 0 0 10px; }
.pf-report-editor .ck-content ul { list-style: disc outside; padding-left: 22px; margin: 0 0 10px; }
.pf-report-editor .ck-content ol { list-style: decimal outside; padding-left: 22px; margin: 0 0 10px; }
.pf-report-editor .ck-content li { display: list-item; margin: 2px 0; }

.pf-report-editor .ck-editor__editable_inline {
    min-height: 280px;
    max-height: 46vh;
    border-color: var(--pf-line-strong) !important;
    border-radius: 0 0 var(--pf-r-ctl) var(--pf-r-ctl) !important;
}

.pf-report-editor .ck.ck-toolbar {
    border-color: var(--pf-line-strong) !important;
    border-radius: var(--pf-r-ctl) var(--pf-r-ctl) 0 0 !important;
    background: var(--pf-surface-2) !important;
}

.pf-report-editor .ck-focused { box-shadow: none !important; }

.pf-report-error {
    margin: 10px 0 0;
    font-size: 12.5px;
    color: var(--pf-danger, #a92e22);
}

.pf-report-error[hidden] { display: none; }

.pf-report-saved {
    font-size: 12px;
    color: var(--pf-muted);
}

.pf-report-saved[hidden] { display: none; }

.pf-report-dialog .modal-footer {
    gap: 8px;
    padding: 14px 22px;
    background: var(--pf-surface-2);
    border-top: 1px solid var(--pf-line);
    justify-content: flex-end;
}

.pf-report-dialog .pf-d-foot-left { margin-right: auto; }

.pf-report-dialog .modal-footer .btn {
    height: 36px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--pf-r-ctl);
    border: 1px solid transparent;
}

.pf-report-dialog .modal-footer .btn-info {
    background: var(--pf-accent); border-color: var(--pf-accent); color: #fff;
}

.pf-report-dialog .modal-footer .btn-info:hover { background: #005785; border-color: #005785; }

.pf-report-dialog .modal-footer .btn-secondary,
.pf-report-dialog .modal-footer .btn-dark {
    background: #fff; border-color: var(--pf-line-strong); color: var(--pf-ink-2);
}

.pf-report-dialog .modal-footer .btn-dark {
    background: none; border-color: transparent; color: var(--pf-muted);
}

.pf-report-dialog .modal-footer .btn-dark:hover { color: var(--pf-ink); background: none; }
.pf-report-dialog .modal-footer .btn-secondary:hover { background: var(--pf-surface-3); color: var(--pf-ink); }

/* ---- Date pickers ------------------------------------------------------
   bootstrap-datepicker appends its popup to <body>, outside #pfbook, so
   these cannot be scoped to the page wrapper. They are safe as global rules
   because only the redesigned screens load this stylesheet - and every year
   and date field on them opens this same stock widget, square-cornered with
   a hard blue selection against everything else here. */

.datepicker.dropdown-menu {
    padding: 8px;
    font-size: 12.5px;
    color: var(--pf-ink, #16212b);
    background: #fff;
    border: 1px solid var(--pf-line, #e3e8ee);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(22, 33, 43, .16);
}

/* The stock caret is two stacked borders that rarely line up with the field. */
.datepicker.dropdown-menu:before,
.datepicker.dropdown-menu:after { display: none; }

.datepicker table { width: 100%; border-collapse: separate; border-spacing: 2px; }

.datepicker thead th {
    font-weight: 600;
    color: var(--pf-ink-2, #3d4c59);
    border-radius: 7px;
}

.datepicker thead th.datepicker-switch {
    font-size: 13px;
    color: var(--pf-ink, #16212b);
}

.datepicker thead th.dow {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--pf-faint, #90a0af);
}

.datepicker thead th.prev,
.datepicker thead th.next { font-size: 15px; color: var(--pf-muted, #67788a); }

.datepicker thead th.datepicker-switch:hover,
.datepicker thead th.prev:hover,
.datepicker thead th.next:hover { background: var(--pf-surface-3, #eef2f6); }

.datepicker table tr td,
.datepicker table tr td span {
    border-radius: 7px;
    color: var(--pf-ink-2, #3d4c59);
}

.datepicker table tr td.day:hover,
.datepicker table tr td span:hover { background: var(--pf-surface-3, #eef2f6); }

.datepicker table tr td.old,
.datepicker table tr td.new,
.datepicker table tr td span.old,
.datepicker table tr td span.new { color: var(--pf-faint, #90a0af); }

.datepicker table tr td.today,
.datepicker table tr td.today:hover {
    background: var(--pf-accent-wash, #e6f7ff);
    color: var(--pf-accent, #006699);
    font-weight: 600;
}

/* Was Bootstrap's gradient primary, the one hard blue block on the page. */
.datepicker table tr td.active,
.datepicker table tr td.active:hover,
.datepicker table tr td.active.active,
.datepicker table tr td span.active,
.datepicker table tr td span.active:hover,
.datepicker table tr td span.active.active {
    background: var(--pf-accent, #006699) !important;
    background-image: none !important;
    border-color: var(--pf-accent, #006699) !important;
    color: #fff !important;
    text-shadow: none !important;
    font-weight: 600;
}

.datepicker table tr td span { height: 34px; line-height: 34px; margin: 1px; }

/* The report deadline. The system blocks submission the day after the request
   date at office close, so this is the one date that costs money to miss. */
.pf-due { color: #a35a00 !important; font-weight: 600; }

.pf-report-due {
    margin: 0 0 10px;
    font-size: 12.5px;
    font-weight: 600;
    color: #a35a00;
}

.pf-report-due[hidden] { display: none; }

/* How much is waiting on you, on the tab itself, so the page does not have to
   be clicked through to find out. */
#pfbook .pf-tabs .pf-tab-count {
    display: inline-block;
    min-width: 17px;
    margin-left: 6px;
    padding: 0 5px;
    font-family: var(--pf-mono);
    font-size: 10.5px;
    font-weight: 700;
    line-height: 17px;
    text-align: center;
    border-radius: 999px;
    background: var(--pf-line-strong);
    color: #fff;
}

/* A report due is the one with a deadline behind it. */
#pfbook .pf-tabs .pf-tab-count.is-due { background: #a35a00; }
#pfbook .pf-tabs .pf-tab-count.is-draft { background: var(--pf-faint); }

/* The confirm anchored to a control that is not inside a dialog - a row
   action - so it is placed against the viewport rather than a modal. */
.pf-pop-fixed { position: fixed; }

/* Flipped under its anchor when there is no room above. */
.pf-pop.is-below { transform: translateY(-4px); }
.pf-pop.is-below.is-open { transform: none; }

.pf-pop.is-below .pf-pop-arrow {
    bottom: auto;
    top: -6px;
    border: 0;
    border-left: 1px solid var(--pf-line);
    border-top: 1px solid var(--pf-line);
}

/* The employee dialog's footer controls live inside the cancel form, so the
   form has to be the flex row rather than a block sitting in one. */
.pf-request-dialog .modal-footer > form {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin: 0;
}

/* ---- Report: write / preview ------------------------------------------ */

.pf-report-modes { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.pf-report-modes .pf-seg-btn { padding: 4px 12px; font-size: 12px; }

.pf-report-editor[hidden] { display: none !important; }

/* The preview is the approver's view, boxed like the editor it replaces so
   swapping between them does not move the dialog around. */
.pf-report-preview {
    min-height: 280px;
    max-height: 46vh;
    overflow-y: auto;
    padding: 12px 14px;
    background: var(--pf-surface);
    border: 1px solid var(--pf-line-strong);
    border-radius: var(--pf-r-ctl);
}

.pf-report-preview[hidden] { display: none !important; }
.pf-report-preview:empty::before { content: "Nothing written yet."; color: var(--pf-faint); }

/* CKEditor injects its own ck-content rules at load, after this stylesheet,
   so the canvas needs the extra specificity to keep matching the output. */
.pf-request-dialog .pf-report-editor .ck-content.ck-editor__editable,
.pf-report-dialog .pf-report-editor .ck-content.ck-editor__editable {
    font-size: 14px;
    line-height: 1.65;
    color: var(--pf-ink);
}

.pf-report-dialog .pf-report-editor .ck-content p { margin: 0 0 10px; padding-left: 0; }
.pf-report-dialog .pf-report-editor .ck-content p:last-child { margin-bottom: 0; }
.pf-report-dialog .pf-report-editor .ck-content ul,
.pf-report-dialog .pf-report-editor .ck-content ol { margin: 0 0 10px; padding-left: 22px; }
.pf-report-dialog .pf-report-editor .ck-content li { margin: 2px 0; }

/* Rows are one line per fact. A date range and the leave type that qualifies
   a request both read worse broken across two lines, and there is room. */
.pf-table td .pf-sub-line { white-space: nowrap; }
.pf-table td .pf-name,
.pf-table td .pf-type { white-space: nowrap; }

@media (max-width: 900px) {
    /* Below this the table scrolls in its wrapper, so wrapping buys nothing. */
    .pf-table td .pf-sub-line { white-space: normal; }
}

/* ---- Report panel ------------------------------------------------------ */

/* The report is what the approver is deciding on, and it was drawn exactly
   like the field lists around it. Its own panel, with the submitted-on line
   as the header, and a cap so a long report cannot push the balance and the
   history off the bottom of the dialog. */
.pf-report-panel {
    margin-top: 4px;
    background: var(--pf-surface);
    border: 1px solid var(--pf-line);
    border-radius: var(--pf-r-ctl);
    overflow: hidden;
}

.pf-report-panel-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--pf-surface-2);
    border-bottom: 1px solid var(--pf-line);
    font-size: 11.5px;
    font-weight: 600;
    color: var(--pf-muted);
}

.pf-report-panel-head.is-late { background: #fff6e6; border-bottom-color: #f0dcb8; color: #a35a00; }

.pf-report-panel-icon { font-size: 11px; color: var(--pf-faint); }
.pf-report-panel-head.is-late .pf-report-panel-icon { color: #a35a00; }

.pf-report-panel-when {
    margin-left: auto;
    font-family: var(--pf-mono);
    font-variant-numeric: tabular-nums;
    font-weight: 500;
    color: var(--pf-ink-2);
}

.pf-report-panel-head.is-late .pf-report-panel-when { color: #a35a00; }

.pf-report-panel-body {
    max-height: 260px;
    overflow-y: auto;
    padding: 12px 14px;
}

/* ---- Attendance ------------------------------------------------------- */

/* The month's counts, above the table: as many tiles to a row as fit. */
.pf-att-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

/* The quick filters, on their own row under the card head. */
.pf-att-bar {
    padding: 12px 18px;
    border-bottom: 1px solid var(--pf-line);
    overflow-x: auto;
}

/* How many days a quick filter would keep, inside its button. */
.pf-att-count {
    margin-left: 4px;
    font-family: var(--pf-mono);
    font-variant-numeric: tabular-nums;
    font-size: 11.5px;
    color: var(--pf-faint);
}

.pf-seg-btn.is-active .pf-att-count { color: var(--pf-accent); }

/* The month and day boxes in the card head. Same box as .pf-year, widened for
   "Sep 2026" and "2026-09-24". */
.pf-att-month { width: 108px; }
.pf-att-day { width: 124px; }

/* Admin tools after the filters, set apart so they do not read as a filter. */
.pf-att-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding-left: 12px;
    border-left: 1px solid var(--pf-line);
}

.pf-att-who { font-weight: 600; color: var(--pf-ink); }

.pf-att-date { white-space: nowrap; color: var(--pf-ink); }
.pf-att-date b { display: inline-block; min-width: 36px; font-weight: 600; color: var(--pf-muted); }

/* Day kinds that are not a request type. A day in the office is the ordinary
   case, so its pill is outlined rather than filled: a badge like the others,
   but a month still reads as its exceptions. */
.pf-type-office { background: #fff; color: #3d4c59; box-shadow: inset 0 0 0 1px #ccd5de; }
.pf-type-absent { background: #fbeae7; color: #a92e22; }
.pf-type-off    { background: #eef2f6; color: #67788a; }
.pf-type + .pf-type { margin-left: 4px; }
.pf-day-plain { font-size: 12.5px; color: var(--pf-muted); }

/* Weekends and holidays sit back a shade, so the working weeks read as blocks. */
.pf-table tbody tr.is-off td { background: var(--pf-surface-2); }

.pf-time {
    font-family: var(--pf-mono);
    font-variant-numeric: tabular-nums;
    font-size: 13px;
    color: var(--pf-ink);
    white-space: nowrap;
}

.pf-time.is-none { color: var(--pf-faint); }
.pf-time.is-warn { color: #a35a00; font-weight: 600; }

/* Time worked against the day's office hours: the full day, short by no more
   than the late-minute allowance, or short by more. */
.pf-hours {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-family: var(--pf-mono);
    font-variant-numeric: tabular-nums;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.pf-hours.is-full  { background: #e8f6f0; color: #0f7a52; }
.pf-hours.is-near  { background: #fff6e6; color: #a35a00; }
.pf-hours.is-short { background: #fbeae7; color: #a92e22; }
.pf-hours.is-plain { background: #eef2f6; color: #3d4c59; }

/* A remark on the day, under its pill, cut to one line; the whole of it is in
   the title. */
.pf-att-remark {
    display: block;
    max-width: 260px;
    margin-top: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11.5px;
    color: var(--pf-muted);
}

/* The day at a glance, above its timeline. */
.pf-att-daysum {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px 16px;
    margin: 0 0 18px;
    padding: 0 0 16px;
    border-bottom: 1px solid var(--pf-line);
}

.pf-att-daysum > div { min-width: 0; }

@media (max-width: 575px) {
    .pf-att-daysum { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.pf-att-daysum dd { margin: 0; font-family: var(--pf-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* What else happened on a day, as status chips under its badge. */
.pf-att-marks {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 5px;
}

.pf-att-pairnote { margin: -8px 0 16px; }

/* Shown on a card while it is receiving punches as they happen. */
/* Nunito's capitals sit above the middle of their line box, which also
   holds room for descenders they never use. Centring the dot on that box put
   it 1.75px below the letters, and the letters sat high in the pill. So the
   dot stands on the baseline and is lifted half a capital's height, which
   holds for any font, and a pixel of padding moves from under the text to
   over it. */
.pf-att-live {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    margin-left: 8px;
    padding: 2px 8px 0;
    border-radius: 999px;
    background: #e8f6f0;
    color: #0f7a52;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    vertical-align: middle;
}

.pf-att-live::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    transform: translateY(calc(3px - .5cap));
}

.pf-att-live[hidden] { display: none; }

/* Connected, but the live worker has gone quiet: punches wait for the hourly
   fetch. The pending amber of .pf-status-pending. */
.pf-att-live.is-delayed { background: #fff6e6; color: #a35a00; }

/* Live pulses: a soft ring grows out of the dot and fades, every two seconds.
   A pulse, not a blink, so nothing flashes. Delayed holds still, so the
   motion itself says punches are arriving; so does a steady dot for anyone
   who asks for less motion. */
@keyframes pf-live-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(15, 122, 82, .5); }
    70%  { box-shadow: 0 0 0 5px rgba(15, 122, 82, 0); }
    100% { box-shadow: 0 0 0 0 rgba(15, 122, 82, 0); }
}

.pf-att-live::before { animation: pf-live-pulse 2s ease-out infinite; }
.pf-att-live.is-delayed::before { animation: none; }

@media (prefers-reduced-motion: reduce) {
    .pf-att-live::before { animation: none; }
}

/* ---- Attendance: refresh -------------------------------------------------- */

/* The counts above the table, and those in its quick filters, dim with it
   while it loads. */
.pf-att-stats .pf-v-sm, .pf-att-stats .pf-sub, .pf-att-count { transition: opacity .15s ease; }
.pf-att-stats[aria-busy="true"] .pf-v-sm,
.pf-att-stats[aria-busy="true"] .pf-sub,
.pf-seg[aria-busy="true"] .pf-att-count { opacity: .5; transition-delay: .12s; }

/* One day or the whole month, above the fields for either. */
.pf-att-scope { margin-bottom: 12px; }
.pf-att-refresh-hint { margin-top: 10px; }

/* A run: what it is, how far it has got, and each day as it is done. */
.pf-att-run {
    margin-top: 16px;
    padding: 14px 16px 16px;
    background: var(--pf-surface-2);
    border: 1px solid var(--pf-line);
    border-radius: var(--pf-r-ctl);
}

.pf-att-run[hidden] { display: none; }
.pf-att-run-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.pf-att-run-what { flex: 1 1 auto; min-width: 0; }
.pf-att-run-title { margin: 0; font-size: 13.5px; font-weight: 600; color: var(--pf-ink); }
.pf-att-run-head .pf-status { margin-top: 1px; }
.pf-att-run-head .pf-btn[hidden] { display: none; }

/* Each day of the run, by its date: waiting, being fetched, done or failed.
   The fills are the .pf-status-ok and -no pairs. */
.pf-att-run-days {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.pf-att-run-days[hidden] { display: none; }

.pf-att-run-day {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    font-family: var(--pf-mono);
    font-size: 11.5px;
    font-variant-numeric: tabular-nums;
    color: var(--pf-faint);
    background: var(--pf-surface);
    box-shadow: inset 0 0 0 1px var(--pf-line);
}

.pf-att-run-day.is-busy {
    color: var(--pf-accent);
    background: var(--pf-accent-wash);
    box-shadow: inset 0 0 0 1px var(--pf-accent-edge);
    animation: pf-run-day 1.4s ease-in-out infinite;
}

.pf-att-run-day.is-ok { color: #0f7a52; background: #e8f6f0; box-shadow: none; }
.pf-att-run-day.is-no { color: #a92e22; background: #fbeae7; box-shadow: none; font-weight: 600; }

@keyframes pf-run-day {
    50% { box-shadow: inset 0 0 0 1px var(--pf-accent); }
}

@media (prefers-reduced-motion: reduce) {
    .pf-att-run-day.is-busy { animation: none; }
}

/* The days that failed, each with why, and a way to run just those again. */
.pf-att-run-failed { margin-top: 14px; }
.pf-att-run-failed[hidden] { display: none; }
.pf-att-run-failed ul { margin: 0 0 12px; padding: 0; list-style: none; font-size: 12.5px; color: var(--pf-ink-2); }
.pf-att-run-failed li + li { margin-top: 4px; }
.pf-att-run-failed b { font-weight: 600; color: #a92e22; }

/* A table that could not be loaded says so where its rows would be. */
.pf-load-error .pf-btn { margin-left: 8px; }

/* ---- Attendance: today --------------------------------------------------- */

.pf-att-today { margin-bottom: 16px; }

/* One column per group, as many to a row as fit. */
.pf-att-today-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    transition: opacity .15s ease;
}

/* Dimmed, still readable, while the card is being asked for again. */
.pf-att-today-groups[aria-busy="true"] { opacity: .55; }

/* Refresh says what it is doing: spinning while it asks, a tick once the card
   is current, a warning when no answer came. Wide enough for its longest
   label, so the header does not shift between them. */
.pf-att-today-refresh { min-width: 128px; justify-content: center; }
.pf-att-today-refresh[aria-busy="true"] { cursor: progress; }
.pf-att-today-refresh.is-done, .pf-att-today-refresh.is-done:hover { color: #0f7a52; }
.pf-att-today-refresh.is-failed, .pf-att-today-refresh.is-failed:hover { color: #a35a00; }

.pf-att-today-group {
    min-width: 0;
    padding: 14px 18px 16px;
    border-right: 1px solid var(--pf-line);
}

.pf-att-today-group:last-child { border-right: 0; }

.pf-att-today-h {
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--pf-faint);
}

.pf-att-today-h b {
    margin-left: 4px;
    font-family: var(--pf-mono);
    font-variant-numeric: tabular-nums;
    font-size: 12px;
    color: var(--pf-ink);
}

/* The overdue get the ink; everybody else is a list to scan. */
.pf-att-today-group.is-waiting .pf-att-today-h b { color: #a35a00; }

/* A long list scrolls in its box. Its scrollbar is thin and in the card's
   line colour, darker while the pointer is over the list: still there to see
   and drag, not a grey slab down every column. */
.pf-att-today-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 244px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--pf-line-strong) transparent;
}

.pf-att-today-list:hover { scrollbar-color: var(--pf-faint) transparent; }

/* Browsers without scrollbar-color (Safari) draw the same from these. */
.pf-att-today-list::-webkit-scrollbar { width: 6px; }
.pf-att-today-list::-webkit-scrollbar-track { background: transparent; }
.pf-att-today-list::-webkit-scrollbar-thumb { background: var(--pf-line-strong); border-radius: 3px; }
.pf-att-today-list:hover::-webkit-scrollbar-thumb { background: var(--pf-faint); }

/* More below: the last lines fade out, until the list is scrolled to its end. */
.pf-att-today-list.is-more {
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 36px), transparent);
            mask-image: linear-gradient(to bottom, #000 calc(100% - 36px), transparent);
}

.pf-att-today-list li { padding: 5px 0; }
.pf-att-today-list li + li { border-top: 1px solid var(--pf-line); }

.pf-att-today-who {
    appearance: none;
    border: 0;
    padding: 0;
    background: none;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--pf-ink);
    text-align: left;
    cursor: pointer;
}

.pf-att-today-who:hover, .pf-att-today-who:focus { color: var(--pf-accent); text-decoration: underline; }

/* The name, and the timeline button at the end of its first line: centred
   on the whole name, it drifted down beside a name that wraps. */
.pf-att-today-line {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

/* Just its icon, muted, so it sits quietly beside the name; it takes the
   .pf-row-act hover to show it is a button. 20px, with the gap beside it, is
   still a comfortable target. */
.pf-att-today-tl {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    /* Two pixels taller than the name's line, so centred on it. */
    margin-top: -1px;
    padding: 0;
    font-size: 10.5px;
    color: #67788a;
    background: transparent;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.pf-att-today-tl:hover, .pf-att-today-tl:focus { background: #eef2f6; color: #16212b; }

.pf-att-today-empty { font-size: 12.5px; color: var(--pf-faint); }

@media (max-width: 620px) {
    .pf-att-today-group { border-right: 0; border-bottom: 1px solid var(--pf-line); }
}

/* A punch that does not pair up. Amber: worth a look, not an error. */
.pf-sub-line.is-warn { color: #a35a00; font-weight: 600; }
.pf-att-flagnote { margin: -6px 0 16px; font-size: 12.5px; color: #a35a00; }

@media (max-width: 620px) {
    .pf-att-tools { padding-left: 0; border-left: 0; }
}

/* ---- Roles & permissions ------------------------------------------------ */

/* The view switch and the page's one-line summary above the cards. */
.pf-ac-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.pf-ac-top .pf-note { margin: 0; }

.pf-ac-view[hidden] { display: none; }

/* A list to pick from on the left, what was picked on the right. */
.pf-split {
    display: grid;
    grid-template-columns: minmax(250px, 300px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

@media (max-width: 900px) {
    .pf-split { grid-template-columns: 1fr; }
}

.pf-card-head-stack { flex-direction: column; align-items: stretch; }
.pf-card-head-stack .pf-search input { width: 100%; }

/* The picking list: roles, or people. */
.pf-pick {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 68vh;
    overflow-y: auto;
}

.pf-pick > li + li { border-top: 1px solid var(--pf-line); }

.pf-pick button {
    display: block;
    width: 100%;
    padding: 11px 18px;
    text-align: left;
    background: transparent;
    border: 0;
    border-left: 3px solid transparent;
    cursor: pointer;
    font: inherit;
}

.pf-pick button:hover { background: var(--pf-surface-2); }

.pf-pick button.is-active {
    background: var(--pf-accent-wash);
    border-left-color: var(--pf-accent);
}

.pf-pick-name { display: block; font-size: 13.5px; font-weight: 600; color: var(--pf-ink); }
.pf-pick button.is-off .pf-pick-name { color: var(--pf-faint); }
.pf-pick-empty { padding: 18px; font-size: 13px; color: var(--pf-muted); }

/* A plain select sized like the search box beside it. */
.pf-select {
    height: 36px;
    padding: 0 30px 0 11px;
    font-size: 13px;
    color: var(--pf-ink);
    background-color: var(--pf-surface);
    border: 1px solid var(--pf-line-strong);
    border-radius: var(--pf-r-ctl);
}

.pf-select:focus { outline: none; border-color: #8fa0b0; }

/* A checkbox, drawn: the request form's .rf-check box on the page tokens
   (request-form.blade.php restates it on its rf tokens, since those forms do
   not load this file). input.pf-check outranks the Tailwind forms plugin's
   [type=checkbox] rules, which would otherwise paint their own box and tick;
   color is the accent because the plugin fills a checked box, on hover and
   focus, with currentColor. */
input.pf-check {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    flex: none;
    width: 17px;
    height: 17px;
    margin: 0;
    padding: 0;
    color: var(--pf-accent);
    background: var(--pf-surface);
    background-image: none;
    border: 1px solid var(--pf-line-strong);
    border-radius: 5px;
    box-shadow: none;
    cursor: pointer;
    transition: background-color .12s ease, border-color .12s ease;
}

input.pf-check:hover { border-color: var(--pf-accent); }
input.pf-check:focus { outline: none; box-shadow: none; }
input.pf-check:focus-visible { outline: 2px solid var(--pf-accent); outline-offset: 2px; }

input.pf-check:checked,
input.pf-check:indeterminate {
    background: var(--pf-accent);
    background-image: none;
    border-color: var(--pf-accent);
}

/* The tick is two borders on a rotated box, as on the request form. */
input.pf-check::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(.6);
    opacity: 0;
    transition: opacity .1s ease, transform .1s ease;
}

input.pf-check:checked::after { opacity: 1; transform: rotate(45deg) scale(1); }

/* Some of a group but not all: a bar in place of the tick. */
input.pf-check:indeterminate::after {
    left: 3px;
    top: 7px;
    width: 9px;
    height: 0;
    border-width: 0 0 2px;
    transform: none;
    opacity: 1;
}

input.pf-check:disabled { opacity: .45; cursor: default; }
input.pf-check:disabled:hover { border-color: var(--pf-line-strong); }

.pf-check-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0 0;
    font-size: 13px;
    color: var(--pf-ink-2);
    cursor: pointer;
}

.pf-check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px 14px;
}

.pf-check-grid .pf-check-line { margin: 0; }

.pf-mono-input { font-family: var(--pf-mono); font-size: 13px !important; }

/* An on/off switch: a checkbox drawn as a track, the size of the penalty
   switch in the request dialog (.pf-penalty .switch) but in the accent - on
   here means granted, not a penalty. */
.pf-switch {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    font-size: 13px;
    color: var(--pf-ink-2);
    cursor: pointer;
}

.pf-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }

.pf-switch-track {
    position: relative;
    flex: none;
    width: 38px;
    height: 21px;
    background: var(--pf-line-strong);
    border-radius: 999px;
    transition: background .15s ease;
}

.pf-switch-track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 15px;
    height: 15px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(22, 33, 43, .2);
    transition: transform .15s ease;
}

.pf-switch input:checked + .pf-switch-track { background: var(--pf-accent); }
.pf-switch input:checked + .pf-switch-track::after { transform: translateX(17px); }
.pf-switch input:focus-visible + .pf-switch-track { box-shadow: 0 0 0 3px var(--pf-accent-edge); }
.pf-switch input:disabled + .pf-switch-track { opacity: .45; }

/* Permissions in their groups, each group folding away. */
.pf-groups { padding: 4px 18px 18px; }
.pf-groups-flush { padding: 0; max-height: 46vh; overflow-y: auto; }

.pf-group {
    margin-top: 12px;
    border: 1px solid var(--pf-line);
    border-radius: 10px;
    overflow: hidden;
}

.pf-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 12px;
    background: var(--pf-surface-2);
}

.pf-group-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    background: none;
    border: 0;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--pf-ink);
    cursor: pointer;
}

.pf-group-toggle i { width: 10px; font-size: 11px; color: var(--pf-muted); transition: transform .15s ease; }
.pf-group.is-folded .pf-group-toggle i { transform: rotate(-90deg); }
.pf-group.is-folded .pf-perm-list { display: none; }
.pf-group-count { font-weight: 500; font-size: 12px; color: var(--pf-muted); }

/* One rule under the group head, not one per row: in two columns a group
   with an odd count left the last row's rule half the width. */
.pf-perm-list {
    list-style: none;
    margin: 0;
    padding: 4px 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    border-top: 1px solid var(--pf-line);
}

.pf-perm {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 42px;
    padding: 6px 12px;
}

.pf-perm:hover { background: var(--pf-surface-2); }

.pf-perm.is-changed { background: var(--pf-accent-wash); }

.pf-perm-main {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
    margin: 0;
    cursor: pointer;
}

/* The box sits on the name's line, as .rf-check does; a switch, taller than
   the line, centres on the name and its code together. */
.pf-perm-main.pf-switch { align-items: center; }

.pf-perm-text { min-width: 0; }
.pf-perm-name { display: block; font-size: 13px; color: var(--pf-ink); line-height: 17px; }
.pf-perm-code { display: block; font-family: var(--pf-mono); font-size: 11px; color: var(--pf-faint); overflow-wrap: anywhere; }
.pf-perm-side { display: inline-flex; align-items: center; gap: 6px; flex: none; }

/* "3 of 5 on": opens the people behind the figure. */
.pf-count-btn {
    padding: 3px 9px;
    font-size: 12px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    color: var(--pf-accent);
    background: var(--pf-surface);
    border: 1px solid var(--pf-accent-edge);
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
}

.pf-count-btn:hover { background: var(--pf-accent-wash); }
.pf-count-btn.is-none { color: var(--pf-muted); border-color: var(--pf-line-strong); }

/* Unsaved changes: a bar under the card that stays in view at the bottom of
   the window until they are saved or dropped. */
.pf-ac-col { min-width: 0; }

.pf-savebar {
    position: sticky;
    bottom: 16px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
    padding: 12px 18px;
    background: var(--pf-surface);
    border: 1px solid var(--pf-accent-edge);
    border-radius: var(--pf-r-card);
    box-shadow: 0 10px 28px rgba(22, 33, 43, .14);
}

.pf-savebar[hidden] { display: none; }
.pf-savebar-text { margin-right: auto; font-size: 13px; font-weight: 600; color: var(--pf-ink-2); }

/* A person's roles, each with what it is to them. */
.pf-ac-person { padding: 14px 18px 0; }
.pf-ac-person .pf-groups { padding: 4px 0 18px; }

.pf-role-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.pf-role-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 6px 5px 12px;
    font-size: 13px;
    color: var(--pf-ink);
    background: var(--pf-surface-2);
    border: 1px solid var(--pf-line);
    border-radius: 999px;
}

.pf-role-chip small { font-size: 11px; color: var(--pf-muted); }

.pf-chip-x {
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    padding: 0;
    font-size: 14px;
    line-height: 1;
    color: var(--pf-muted);
    background: transparent;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}

.pf-chip-x:hover { color: #a92e22; background: #fbeae7; }

.pf-ac-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.pf-ac-toolbar-tight { margin: 0 0 12px; }

/* People in a dialog, each with a switch. */
.pf-person-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 52vh;
    overflow-y: auto;
    border: 1px solid var(--pf-line);
    border-radius: 10px;
}

.pf-person-list > li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 12px;
}

.pf-person-list > li + li { border-top: 1px solid var(--pf-line); }
.pf-person-list .pf-pick-name { font-size: 13px; }

.pf-who-role { margin: 16px 0 6px; }
.pf-who-role:first-child { margin-top: 0; }

/* Choosing who gets a permission as it is offered: the role's people, each
   row a tick box, none ticked to start. */
.pf-picker { margin-top: 14px; }
.pf-picker-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.pf-picker-head .pf-label { margin: 0; }
.pf-picker-head .pf-actions { margin-left: auto; }
.pf-picker-count { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--pf-muted); }
.pf-picker-search { margin-bottom: 8px; }
.pf-picker-list { max-height: 40vh; }
.pf-picker-list > li { padding: 0; }
.pf-picker-list > li[hidden] { display: none; }
.pf-picker-item { width: 100%; margin: 0; padding: 9px 12px; }
.pf-picker .pf-hint { margin-top: 8px; }
.pf-ac-picker-slot:empty { display: none; }

/* The groups dialog: each group editable in its row. */
.pf-group-edit { list-style: none; margin: 0 0 18px; padding: 0; }
.pf-group-edit > li + li { margin-top: 8px; }

/* Aligned to the name field, not to the field and the code line under it. */
.pf-group-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: start;
    gap: 10px;
}

.pf-group-edit .pf-switch { margin-top: 10px; }
.pf-group-edit .pf-btn { margin-top: 1px; }

.pf-group-new .pf-group-row { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; }
.pf-group-new { padding-top: 16px; border-top: 1px solid var(--pf-line); }

.pf-ac-changes { padding: 16px 18px 18px; }

.pf-group-all { margin: 0; font-size: 12px; white-space: nowrap; }

/* What a save will do, listed in the review before it is done. */
.pf-review-list { list-style: disc; margin: 4px 0 10px; padding-left: 18px; font-size: 13px; line-height: 1.6; color: var(--pf-ink-2); }

.pf-ac-profile { margin-left: 8px; vertical-align: middle; }

/* Role names riding in a table cell, wrapping as a row of chips. */
.pf-ac-offered .pf-state { margin: 2px 4px 2px 0; }

/* What a role lets someone do, one line per module: the People view and the
   profile's Access tab. */
.pf-meters { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.pf-meters:empty { display: none; }

.pf-meter {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 4px 10px;
    padding: 9px 12px;
    font: inherit;
    text-align: left;
    background: var(--pf-surface);
    border: 1px solid var(--pf-line);
    border-radius: var(--pf-r-ctl);
}

button.pf-meter { cursor: pointer; }
button.pf-meter:hover { background: var(--pf-surface-2); border-color: var(--pf-line-strong); }
.pf-meter-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; font-weight: 600; color: var(--pf-ink); }
.pf-meter-count { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--pf-muted); white-space: nowrap; }
.pf-meter-bar { grid-column: 1 / -1; height: 4px; overflow: hidden; background: var(--pf-surface-3); border-radius: 999px; }
.pf-meter-bar > span { display: block; height: 100%; background: var(--pf-accent); border-radius: inherit; }
.pf-ac-summary { margin-top: 14px; }

.pf-access-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.pf-access-head .pf-history-note { margin: 0; }
.pf-access-head .pf-btn { flex: none; margin-top: 0; }
.pf-access-role { margin-top: 18px; }

.pf-access-role-name {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 0 0 10px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--pf-ink);
}

.pf-access-role-name small { font-size: 11.5px; font-weight: 400; color: var(--pf-muted); }
.pf-access-role-total { margin-left: auto; font-size: 12px; font-weight: 500; color: var(--pf-muted); }

/* Roles side by side: which to show, then modules by roles. */
.pf-compare-roles {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--pf-line);
}

.pf-compare-label { margin: 0 6px 0 0; }
.pf-compare-diff { margin: 0; white-space: nowrap; }

.pf-role-toggle {
    padding: 4px 11px;
    font: inherit;
    font-size: 12.5px;
    color: var(--pf-ink-2);
    background: var(--pf-surface);
    border: 1px solid var(--pf-line-strong);
    border-radius: 999px;
    cursor: pointer;
}

.pf-role-toggle:hover { background: var(--pf-surface-2); }

.pf-role-toggle[aria-pressed="true"] {
    font-weight: 600;
    color: var(--pf-accent);
    background: var(--pf-accent-wash);
    border-color: var(--pf-accent-edge);
}

.pf-compare .pf-c { text-align: center; }
.pf-compare thead .pf-sub-line { font-weight: 400; letter-spacing: 0; text-transform: none; }

/* The module column stays put while the roles scroll sideways. */
.pf-compare td:first-child,
.pf-compare th:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    min-width: 280px;
    background: var(--pf-surface);
}

.pf-compare .pf-group-toggle { text-align: left; }
.pf-compare .pf-group-count { white-space: nowrap; }

.pf-compare thead th:first-child { background: var(--pf-surface-2); }
.pf-compare .pf-compare-group td { background: var(--pf-surface-2); }
.pf-compare .pf-compare-group .pf-group-toggle i { width: 12px; }
.pf-compare .pf-compare-perm td { padding-top: 8px; padding-bottom: 8px; }
.pf-compare .pf-compare-perm td:first-child { padding-left: 40px; }

.pf-compare-cell {
    min-width: 72px;
    padding: 3px 10px;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
}

.pf-compare-cell.is-all { color: #0f7a52; background: #e8f6f0; }
.pf-compare-cell.is-some { color: var(--pf-accent); background: var(--pf-accent-wash); }
.pf-compare-cell.is-none { color: var(--pf-faint); background: var(--pf-surface); border-color: var(--pf-line); }
.pf-compare-cell:hover { border-color: var(--pf-accent-edge); }

.pf-compare-yes { font-size: 12px; font-weight: 600; color: #0f7a52; }

@media (max-width: 620px) {
    .pf-perm-list { grid-template-columns: 1fr; }
    .pf-group-row, .pf-group-new .pf-group-row { grid-template-columns: 1fr; }
}

/* ---- Nominee dialog ---------------------------------------------------
   The nominee dialog's own design, moved here from
   nominee/partials/_nomineeModal.blade.php, so it is defined once in the
   shared stylesheet instead of inside the page. The dialog keeps its own
   overlay and shell; role/aria, Esc, focus return and the Tab trap live in
   the dialog's script instead of a Bootstrap modal, so none of the values
   below change. */

/* The dialog title, sub-title and body padding come from the theme
   (.pf-d-title, .pf-d-sub, .pf-d-body) - the custom overrides for them were
   removed so the dialog inherits the defaults. The body keeps only its
   layout (it must fill the shell and scroll), not a padding of its own. */

.nominee-modal-root *,
.nominee-modal-root *::before,
.nominee-modal-root *::after {
    box-sizing: border-box !important;
}

.nominee-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    margin: 0;
}

.nominee-modal-overlay.active {
    display: flex;
}

.nominee-modal-root .pf-dialog.nominee-dialog {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 800px;
    max-height: 92vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(22, 33, 43, 0.2);
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

.nominee-modal-root .pf-dialog.nominee-dialog > form {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow-y: auto;
}

.nominee-modal-root .pf-dialog.nominee-dialog > form > .pf-d-body {
    flex: 1;
    overflow-y: auto;
    margin: 0;
}

/* The dialog's pieces: what used to be inline styles on the markup, with the
   same declarations and values, so nothing renders differently. */
.nominee-modal-root .nominee-fb {
    margin-bottom: 16px;
}

.nominee-modal-root .nominee-flex {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nominee-modal-root .nominee-rel-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--pf-surface-3, #eef2f6);
    display: grid;
    place-items: center;
    flex-shrink: 0;
    transition: all .15s ease;
}

.nominee-modal-root .nominee-rel-avatar i {
    font-size: 12px;
    color: var(--pf-muted, #67788a);
}

.nominee-modal-root .nominee-who {
    min-width: 0;
    flex: 1;
}

.nominee-modal-root .nominee-name {
    font-weight: 700;
    color: var(--pf-ink, #16212b);
    font-size: 13px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nominee-modal-root .nominee-rel {
    font-size: 11px;
    color: var(--pf-muted, #67788a);
    margin-top: 1px;
}

.nominee-modal-root .nominee-share-pct {
    font-size: 12px;
    color: var(--pf-muted, #67788a);
    font-weight: 700;
}

.nominee-modal-root .nominee-message {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--pf-faint, #90a0af);
    display: flex;
    align-items: center;
    gap: 6px;
}

.nominee-modal-root .nominee-micro {
    font-size: 10px;
}

.nominee-modal-root .nominee-msg-icon {
    margin-right: 6px;
}

/* The check icon inside a relationship card: what the inline style carried. */
.nominee-modal-root .nominee-check-icon {
    font-size: 9px;
    color: #fff;
    opacity: 0;
    transition: all .15s ease;
}

.nominee-modal-root .nominee-shares-header {
    display: none;
    margin-bottom: 2px;
}

.nominee-modal-root .nominee-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nominee-modal-root .nominee-count-accent {
    color: var(--pf-accent, #006699);
    font-weight: 500;
}

.nominee-modal-root .nominee-total-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--pf-surface, #fff);
    border: 1px solid var(--pf-line, #e3e8ee);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.nominee-modal-root .nominee-total-icon i {
    font-size: 12px;
    color: var(--pf-muted, #67788a);
}

.nominee-modal-root .nominee-total-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--pf-ink, #16212b);
}

.nominee-modal-root .nominee-total-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--pf-ink, #16212b);
    font-family: var(--pf-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
}

.nominee-modal-root .nominee-rel-card {
    border: 1px solid #e3e8ee;
    border-radius: 10px;
    padding: 12px 14px;
    cursor: pointer;
    transition: all .15s ease;
    background: #fff;
    margin: 0;
}

.nominee-modal-root .nominee-rel-card:hover {
    border-color: #006699;
    box-shadow: 0 1px 3px rgba(0, 102, 153, .12);
}

.nominee-modal-root .nominee-selected-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #e3e8ee;
    background: #fff;
    cursor: grab;
    transition: all .15s ease;
    margin: 0;
}

.nominee-modal-root .nominee-selected-card:hover {
    border-color: #006699;
    box-shadow: 0 1px 3px rgba(0, 102, 153, .12);
}

.nominee-modal-root .nominee-share-input {
    border: 1px solid #e3e8ee;
    border-radius: 6px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: #16212b;
    outline: none;
    -moz-appearance: textfield;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    height: 32px;
    transition: width .15s ease, border-color .15s ease, background-color .15s ease;
    margin: 0;
    padding: 0 4px;
}

.nominee-modal-root .nominee-share-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.nominee-modal-root .nominee-share-input-error {
    border-color: #fecaca;
    background-color: #fef2f2;
    color: #a92e22;
}

.nominee-modal-root .nominee-share-input-warning {
    border-color: #fecaca;
    background-color: #fef2f2;
    color: #a92e22;
}

.nominee-modal-root .nominee-share-field-error {
    display: none;
    position: absolute;
    bottom: -26px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: #a92e22;
    font-weight: 600;
    white-space: nowrap;
    z-index: 10;
    background: #fef2f2;
    padding: 5px 12px;
    border-radius: 6px;
    border: 1px solid #fecaca;
    box-shadow: 0 2px 4px rgba(169, 46, 34, 0.1);
    text-align: center;
    min-width: 120px;
    margin: 0;
}

.nominee-modal-root .nominee-share-field-error::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid #fecaca;
}

.nominee-modal-root .nominee-share-field-error::after {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 4px solid #fef2f2;
}

.nominee-modal-root .nominee-share-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
}

.nominee-modal-root .nominee-card-actions {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
}

.nominee-modal-root .nominee-remove-card {
    height: 28px;
    width: 28px;
    padding: 0;
    border: 1px solid #e3e8ee;
    border-radius: 7px;
    background: #fff;
    color: #90a0af;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: all .15s ease;
    margin: 0;
}

.nominee-modal-root .nominee-remove-card:hover {
    background: #a92e22;
    border-color: #a92e22;
    color: #fff;
}

.nominee-modal-root .nominee-check-badge {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1.5px solid #ccd5de;
    background: #fff;
    display: grid;
    place-items: center;
    transition: all .15s ease;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
}

.nominee-modal-root .nominee-share-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #e6f7ff;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid #006699;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    font-weight: 700;
    color: #006699;
    margin: 0;
}

.nominee-modal-root .pf-d-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid #e3e8ee;
    margin: 0;
}

.nominee-modal-root .pf-d-close {
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    color: #67788a;
    cursor: pointer;
    padding: 0;
    margin: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nominee-modal-root .pf-d-foot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 20px;
    border-top: 1px solid #e3e8ee;
    margin: 0;
}

.nominee-modal-root .pf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #e3e8ee;
    background: #fff;
    color: #16212b;
    cursor: pointer;
    margin: 0;
}

.nominee-modal-root .pf-btn-primary {
    background: #006699;
    border-color: #006699;
    color: #fff;
}

.nominee-modal-root .pf-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #16212b;
    margin-bottom: 6px;
    margin-top: 0;
    padding: 0;
}

.nominee-modal-root .pf-req {
    color: #a92e22;
}

.nominee-modal-root #nominee-relationship-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
    margin: 0;
    padding: 0;
}

.nominee-modal-root #nominee-sortable-modal {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 0;
    padding: 0;
}

.nominee-modal-root #nominee-total-bar {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid #e3e8ee;
    background: #f7f9fb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all .15s ease;
    margin-bottom: 0;
}


/* ---- Death settlement dialog --------------------------------------- */


@keyframes deathModalIn {
    from { opacity: 0; transform: translateY(8px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.death-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(2px);
}

.death-modal-overlay.active {
    display: flex;
}

/* The death dialog keeps its own overlay and shell - not a Bootstrap modal.
   role/aria, Esc, focus return and the Tab trap are done in the dialog's
   script instead, so none of these values change. */

.pf-dialog.death-dialog {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 720px;
    max-height: 95vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(22, 33, 43, 0.2);
    display: flex;
    flex-direction: column;
    animation: deathModalIn 0.2s ease-out;
}

/* The dialog title, sub-title and body padding come from the theme
   (.pf-d-title, .pf-d-sub, .pf-d-body); the body keeps only its layout. */

.pf-dialog.death-dialog > form > .pf-d-body {
    flex: 1;
    overflow-y: auto;
}

/* The death dialog's pieces that were inline styles on the markup. */
.death-crit-icon {
    color: #a92e22;
    font-size: 14px;
}

.death-nominee-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.death-section-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #90a0af;
    margin: 0 0 6px 0;
}

.death-date-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.death-date-field label span {
    color: #a92e22;
    font-weight: 700;
}

.death-nominee-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #e3e8ee;
    border-radius: 10px;
    background: #fff;
    transition: all .15s ease;
}

.death-nominee-card:hover {
    border-color: #ccd5de;
    box-shadow: 0 1px 2px rgba(22, 33, 43, .04);
}

.death-nominee-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e6f7ff;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    color: #006699;
    font-weight: 700;
    font-size: 12px;
}

.death-nominee-info {
    flex: 1;
    min-width: 0;
}

.death-nominee-name {
    font-weight: 700;
    color: #16212b;
    font-size: 12px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.death-nominee-relation {
    font-size: 10px;
    color: #67788a;
    margin-top: 1px;
}

.death-nominee-amounts {
    text-align: right;
    flex-shrink: 0;
}

.death-nominee-share {
    font-weight: 700;
    color: #006699;
    font-size: 13px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.death-empty-state {
    text-align: center;
    padding: 20px;
}

.death-empty-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fef2f2;
    display: grid;
    place-items: center;
    margin: 0 auto 8px;
    color: #a92e22;
    font-size: 16px;
}

.death-empty-title {
    font-size: 12px;
    font-weight: 700;
    color: #16212b;
    margin: 0 0 2px;
}

.death-nominee-full {
    width: 100%;
    margin-top: 16px;
}


/* ---- Feature tours ------------------------------------------------------- */

/* The popovers of resources/js/tours.js (Driver.js). They are added to
   <body>, outside #pfbook, so the tokens are repeated here, as for
   .pf-dialog. */
.driver-popover.wb-tour {
    --pf-surface:     #ffffff;
    --pf-surface-3:   #eef2f6;
    --pf-line:        #e3e8ee;
    --pf-line-strong: #ccd5de;
    --pf-ink:         #16212b;
    --pf-ink-2:       #3d4c59;
    --pf-muted:       #67788a;
    --pf-accent:      #006699;
    --driver-popover-font-family: 'Nunito', ui-sans-serif, system-ui, sans-serif;
    min-width: 260px;
    max-width: 320px;
    padding: 18px 18px 14px;
    color: var(--pf-ink);
    background: var(--pf-surface);
    border: 1px solid var(--pf-line);
    border-radius: 14px;
    box-shadow: 0 18px 48px rgba(22, 33, 43, .18);
}
.driver-popover.wb-tour .driver-popover-title { padding-right: 20px; font-size: 15px; line-height: 1.35; font-weight: 700; color: var(--pf-ink); }
.driver-popover.wb-tour .driver-popover-description { margin-top: 6px; font-size: 13.5px; line-height: 1.55; color: var(--pf-ink-2); }
.driver-popover.wb-tour .driver-popover-description b { font-weight: 700; color: var(--pf-ink); }
.driver-popover.wb-tour .driver-popover-progress-text { font-size: 12px; color: var(--pf-muted); }
.driver-popover.wb-tour .driver-popover-close-btn { top: 6px; right: 6px; color: var(--pf-muted); }
.driver-popover.wb-tour .driver-popover-close-btn:hover,
.driver-popover.wb-tour .driver-popover-close-btn:focus-visible { color: var(--pf-ink); }
.driver-popover.wb-tour .driver-popover-footer { margin-top: 16px; }
.driver-popover.wb-tour .driver-popover-footer-btn {
    height: 32px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 600;
    line-height: 30px;
    text-shadow: none;
    color: var(--pf-ink-2);
    background: var(--pf-surface);
    border: 1px solid var(--pf-line-strong);
    border-radius: 9px;
}
.driver-popover.wb-tour .driver-popover-footer-btn:hover,
.driver-popover.wb-tour .driver-popover-footer-btn:focus-visible { background: var(--pf-surface-3); color: var(--pf-ink); }
.driver-popover.wb-tour .driver-popover-next-btn { color: #fff; background: var(--pf-accent); border-color: var(--pf-accent); }
.driver-popover.wb-tour .driver-popover-next-btn:hover,
.driver-popover.wb-tour .driver-popover-next-btn:focus-visible { color: #fff; background: #005785; border-color: #005785; }
.driver-popover.wb-tour .driver-popover-navigation-btns button + button { margin-left: 6px; }
