/*
 * Bookings area (design ops-19 … ops-25, ops-29): the building blocks those screens draw on top of the shared shell
 * (public/neft/lms.css). Loaded on every Ops page by App\Providers\BookingsServiceProvider. Colours are the shell's
 * tokens only, so light and dark both work. Class names follow the design's, with the neft- prefix:
 *   .neft-usebar        seat bar: invoiced (green) · trained waiting (teal) · booked ahead (blue) · remaining (grey)
 *   .neft-legend        its legend
 *   .neft-policy        the client's PO policy tag (block · follow · standing · none)
 *   .neft-who / .neft-mini   a two-line cell: main text over a small grey line
 *   .neft-age, tr.neft-age-flag / tr.neft-age-red   days waiting (14 / 30 days)
 *   .neft-pick          a selectable card (POs, classes, policies) — is-on / is-off
 *   .neft-email         the confirmation email preview; .neft-tabs its language tabs
 *   .neft-json          the request preview; .neft-timeline a history list
 *   .neft-form-grid, .neft-headgrid, .neft-cols-side, .neft-seglist, .neft-reqlist, .neft-plain (ops-29 / ops-25)
 */

/* Page head extras: chips after the title (ops-20 / ops-22 / ops-25 / ops-29). */
.neft-head-chips { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; vertical-align: middle; margin-inline-start: 10px; font-size: 13px; }
.fi-header-heading .neft-head-chips { font-weight: 400; }

/* Seat bar */
.neft-usebar { display: flex; height: 10px; border-radius: 3px; overflow: hidden; background: var(--line); min-width: 140px; }
.neft-usebar > span { display: block; height: 100%; }
.neft-usebar .inv { background: var(--ok); } .neft-usebar .wait { background: var(--accent); } .neft-usebar .up { background: var(--info); }
.neft-usebar.full { box-shadow: inset 0 0 0 1px var(--bad); }
.neft-usebar.lg { height: 16px; }
.neft-legend { display: flex; gap: 14px; font-size: 12px; color: var(--ink-2); flex-wrap: wrap; align-items: center; font-weight: 400; }
.neft-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-inline-end: 5px; vertical-align: -1px; }
.neft-legend i.inv { background: var(--ok); } .neft-legend i.wait { background: var(--accent); } .neft-legend i.up { background: var(--info); }
.neft-legend i.rem { background: var(--line); border: 1px solid var(--line-strong); }

/* Two-line cells */
.neft-who { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.neft-mini { font-size: 11.5px; color: var(--ink-3); font-weight: 400; }
a.neft-mini { color: var(--ink-3); }
.neft-mini.neft-bad-text, a.neft-mini.neft-bad-text { color: var(--bad); font-weight: 600; }
.neft-mini.neft-warn-text { color: var(--warn); font-weight: 600; }
.neft-src-line { display: inline-flex; gap: 5px; align-items: center; font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.neft-src-line svg, .neft-src-line .fi-icon { width: 16px; height: 16px; flex: none; color: var(--ink-3); }

/* PO policy tag */
.neft-policy { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 4px; border: 1px solid var(--line-strong); color: var(--ink-2); background: var(--surface-2); white-space: nowrap; text-decoration: none; line-height: 1.5; }
a.neft-policy:hover { text-decoration: underline; }
.neft-policy.block { border-color: var(--bad); color: var(--bad); background: var(--bad-soft); }
.neft-policy.follow { border-color: #D89614; color: var(--warn); background: var(--warn-soft); }
.neft-policy.standing { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* Days waiting */
.neft-age { font-family: var(--font-num); font-weight: 600; white-space: nowrap; }
.fi-ta-row.neft-age-flag > td:first-child, tr.neft-age-flag > td:first-child { box-shadow: inset 3px 0 0 #D89614; }
.fi-ta-row.neft-age-red > td:first-child, tr.neft-age-red > td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.fi-ta-row.neft-age-red > td, tr.neft-age-red > td { background: color-mix(in srgb, var(--bad-soft) 55%, var(--surface)); }

/* Selectable cards */
.neft-pick { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-xs); background: var(--surface); color: var(--ink); font-size: 13px; text-align: start; width: 100%; }
.neft-pick + .neft-pick { margin-top: 8px; }
button.neft-pick, label.neft-pick { cursor: pointer; font: inherit; font-size: 13px; }
button.neft-pick:hover:not(:disabled), label.neft-pick:hover { border-color: var(--accent); }
.neft-pick.is-on { border-color: var(--accent); background: var(--accent-soft); }
.neft-pick.is-off { background: var(--surface-2); color: var(--ink-3); cursor: default; }
.neft-pick .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.neft-pick .dot { width: 14px; height: 14px; margin-top: 2px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); flex: none; }
.neft-pick.is-on .dot { border: 4px solid var(--accent); }
.neft-pick.is-off .dot { background: var(--line); }
.neft-pick .neft-bar-h { display: flex; gap: 8px; align-items: center; }
.neft-pick .neft-bar-h .num { font-size: 12px; font-family: var(--font-num); white-space: nowrap; color: var(--ink-2); }

/* Confirmation email preview */
.neft-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); align-items: center; }
.neft-tabs button { padding: 8px 14px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; font: inherit; font-size: 13px; color: var(--ink-3); cursor: pointer; }
.neft-tabs button[aria-selected="true"] { color: var(--ink); font-weight: 600; border-color: var(--accent); }
.neft-email { border: 1px solid var(--line); border-radius: var(--r-xs); background: var(--surface); }
.neft-email .hdr { display: grid; grid-template-columns: 70px 1fr; gap: 6px 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 12.5px; align-items: center; margin: 0; }
.neft-email .hdr dt { color: var(--ink-3); } .neft-email .hdr dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.neft-email .body { padding: 12px; font-size: 13px; line-height: 1.6; min-height: 180px; }
.neft-email .body p { margin: 0 0 8px; }
.neft-email .body[dir="rtl"], .neft-email .hdr[dir="rtl"] { font-family: var(--font-ar); }
.neft-email .body table { border-collapse: collapse; font-size: 12.5px; margin: 6px 0; }
.neft-email .body td { padding: 2px 10px 2px 0; }
.neft-email .body[dir="rtl"] td { padding: 2px 0 2px 10px; }

/* Request preview */
pre.neft-json { max-height: 460px; overflow: auto; margin: 0; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-xs); font-family: var(--font-num); font-size: 12px; line-height: 1.5; color: var(--ink); overflow-x: auto; white-space: pre; }

/* History list */
.neft-timeline { list-style: none; margin: 0; padding: 0 0 0 4px; }
.neft-timeline li { position: relative; padding: 0 0 12px 20px; font-size: 13px; }
.neft-timeline li::before { content: ""; position: absolute; inset-inline-start: 3px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.neft-timeline li::after { content: ""; position: absolute; inset-inline-start: 7px; top: 17px; bottom: 0; width: 1px; background: var(--line-strong); }
.neft-timeline li:last-child { padding-bottom: 0; }
.neft-timeline li:last-child::after { display: none; }
.neft-timeline .when { font-size: 11.5px; color: var(--ink-3); font-family: var(--font-num); }

/* Forms and layouts */
.neft-form-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.neft-form-grid .span-2 { grid-column: span 2; }
.neft-form-grid .neft-field .v { font-size: 13px; font-weight: 400; color: var(--ink); min-height: 34px; display: flex; align-items: center; gap: 6px; padding: 5px 9px; border: 1px solid var(--line); border-radius: var(--r-xs); background: var(--surface-2); }
.neft-form-grid .neft-field .v.mono { font-family: var(--font-num); }
.neft-form-grid .neft-hint { font-weight: 400; }
.neft-cols-side { display: grid; gap: 16px; grid-template-columns: 300px minmax(0, 1fr); align-items: start; }
@media (max-width: 1100px) { .neft-cols-side { grid-template-columns: minmax(0, 1fr); } .neft-form-grid .span-2 { grid-column: auto; } }
.neft-row-wrap { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.neft-plain { list-style: none; margin: 0; padding: 0; }
.neft-plain > li { display: flex; gap: 10px; align-items: center; padding: 8px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.neft-plain > li:last-child { border-bottom: 0; }
.neft-plain svg, .neft-plain .fi-icon { width: 16px; height: 16px; flex: none; color: var(--ink-3); }
.neft-headgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px 18px; margin: 0; }
.neft-headgrid dt { font-size: 11.5px; color: var(--ink-3); }
.neft-headgrid dd { margin: 2px 0 0; font-size: 13px; }
.neft-alert-block { align-items: flex-start; flex-wrap: nowrap; }
.neft-alert-block > div { flex: 1; min-width: 0; }
.neft-alert-block a, .neft-alert-block button.neft-link { color: inherit; text-decoration: underline; font-weight: 600; }
button.neft-link { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; color: var(--accent); }
button.neft-link:hover { text-decoration: underline; }
.neft-sub-head { font-size: 12px; font-weight: 600; margin: 0 0 6px; }

/* Nominee check cells */
td.neft-is-error { box-shadow: inset 0 0 0 1px var(--bad); background: var(--bad-soft); }
td.neft-is-warn { box-shadow: inset 0 0 0 1px #D89614; background: var(--warn-soft); }
.neft-cell-msg { font-size: 11.5px; color: var(--bad); font-family: var(--font-ui); font-weight: 400; margin-top: 2px; white-space: normal; }
.neft-cell-msg.warn { color: var(--warn); }
table.neft-t td.rn, table.neft-t th.rn { width: 36px; color: var(--ink-3); text-align: end; font-family: var(--font-num); }

/* ops-29 segments and requesters */
.neft-seglist { list-style: none; margin: 0; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.neft-seglist button { display: flex; flex-direction: column; gap: 3px; padding: 9px 10px; border-radius: var(--r-xs); border: 1px solid transparent; color: var(--ink); background: none; font: inherit; text-align: start; width: 100%; cursor: pointer; }
.neft-seglist button:hover { background: var(--surface-2); }
.neft-seglist button[aria-current="true"] { border-color: var(--accent); background: var(--accent-soft); }
.neft-seglist .top { display: flex; gap: 8px; align-items: baseline; width: 100%; }
.neft-seglist .top strong { flex: 1; }
.neft-exp3 { display: flex; gap: 4px; flex-wrap: wrap; font-size: 11.5px; }
.neft-reqlist { list-style: none; margin: 0; padding: 0; }
.neft-reqlist li { border-top: 1px solid var(--line); }
.neft-reqlist li:first-child { border-top: 0; }
.neft-reqlist button { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 10px 14px; color: var(--ink); background: none; border: 0; font: inherit; text-align: start; width: 100%; cursor: pointer; }
.neft-reqlist button:hover { background: var(--surface-2); }
.neft-reqlist button[aria-current="true"] { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.neft-reqlist .r { text-align: end; }
.neft-reqlist .inactive { color: var(--ink-3); }

/* Filament table cells holding .neft-who stacks: start-aligned like the design's cells. */
.fi-ta-cell .neft-who { align-items: flex-start; text-align: start; }
.fi-ta-cell .neft-who .neft-chip { align-self: flex-start; }
.neft-place-btn .fi-btn, .neft-place-btn .fi-ac-btn-action { width: 100%; justify-content: center; }

/* Record numbers inside Filament table cells built with BookingUi::number(): teal, underlined, on one line. */
.fi-ta-cell a.neft-mono { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; font-size: 12.5px; }
.fi-ta-cell span.neft-mono { white-space: nowrap; }
.neft-page table.neft-t td a:not(.neft-btn):not(.neft-chip):not(.neft-mono) { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* Arabic (RTL): record numbers, PO numbers and dates stay in their own left-to-right order ("4500-HAL-88213"). */
[dir="rtl"] .neft-mono, [dir="rtl"] .fi-ta-text-item.fi-font-mono, [dir="rtl"] .neft-num { direction: ltr; unicode-bidi: isolate; }
