/*
 * NEFT Coaches: the portal's own pieces on top of the LMS look (lms-base.css, loaded first). Colours come from the
 * tokens there (--brand, --accent, --line, --ink-*); --hl, the orange highlight, is set from Brand::accent() in a
 * <style> right after this file.
 */
:root { --hl: #f58220; --neft-h1: #0a2540; --neft-h2: #14587f; }

/* ---------------------------------------------------------------- Top bar: wordmark, language, menu button on the navy bar */
.neft-wordmark { display: inline-flex; align-items: center; gap: 5px; height: 32px; font-weight: 700; letter-spacing: .2px; font-size: 16px; color: #fff; white-space: nowrap; }
.neft-wordmark span { color: var(--hl); }
.fi-topbar .fi-logo img { background: #fff; padding: 3px 8px; border-radius: var(--r-xs); }

.neft-lang { font-size: 12.5px; padding: 4px 10px; border: 1px solid rgba(255, 255, 255, .28); border-radius: var(--r-xs); color: #fff; white-space: nowrap; }
.neft-lang:hover { background: rgba(255, 255, 255, .12); }

/* The sidebar's show / hide button: a menu button (three lines), not a "back" arrow, as in the ERP. */
.fi-sidebar-close-collapse-sidebar-btn, .fi-sidebar-open-collapse-sidebar-btn,
.fi-topbar-close-collapse-sidebar-btn, .fi-topbar-open-collapse-sidebar-btn {
    color: #fff !important; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .22); border-radius: var(--r-xs);
    width: 32px; height: 32px; opacity: 1 !important;
}
.fi-sidebar-close-collapse-sidebar-btn .fi-icon, .fi-sidebar-open-collapse-sidebar-btn .fi-icon,
.fi-topbar-close-collapse-sidebar-btn .fi-icon, .fi-topbar-open-collapse-sidebar-btn .fi-icon { width: 18px; height: 18px; }
.fi-sidebar-close-collapse-sidebar-btn:hover, .fi-sidebar-open-collapse-sidebar-btn:hover,
.fi-topbar-close-collapse-sidebar-btn:hover, .fi-topbar-open-collapse-sidebar-btn:hover { background: rgba(255, 255, 255, .16); border-color: var(--hl); }

/* Left menu: the current item also carries the orange bar on its leading edge (Coaches' own touch). */
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn { box-shadow: inset 3px 0 0 var(--hl); }
[dir="rtl"] .fi-sidebar-item.fi-active > .fi-sidebar-item-btn { box-shadow: inset -3px 0 0 var(--hl); }

/* ---------------------------------------------------------------- Dashboard */
.neft-hero { background: linear-gradient(120deg, var(--neft-h1), var(--neft-h2)); color: #fff; border-radius: var(--r-sm); padding: 18px 16px 0; overflow: hidden; }
.neft-hero small { color: #f9a85a; font-weight: 600; letter-spacing: 1px; font-size: 11px; }
.neft-hero h1 { font-size: 20px; font-weight: 700; margin: 2px 0 4px; }
.neft-hero p { margin: 0 0 14px; opacity: .85; font-size: 13px; }
.neft-hero-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1px; background: rgba(255, 255, 255, .18); border-radius: var(--r-xs) var(--r-xs) 0 0; overflow: hidden; }
.neft-hero-stats div { background: rgba(255, 255, 255, .08); padding: 10px; text-align: center; }
.neft-hero-stats b { display: block; font-size: 20px; }
.neft-hero-stats span { font-size: 12px; opacity: .8; }

/* KPI tiles (Filament stats widget) in the LMS's .neft-kpi form: 14px padding, 12px grey label, value below. */
.fi-wi-stats-overview-stat { padding: 14px; border-radius: var(--r-xs); background: var(--surface); box-shadow: none; border: 1px solid var(--line); --tw-ring-shadow: 0 0 #0000; }
.fi-wi-stats-overview-stat-label { font-size: 12px; color: var(--ink-3); }
.fi-wi-stats-overview-stat-value { font-size: 22px; font-weight: 700; color: var(--ink); line-height: 1.25; }
.fi-wi-stats-overview-stats-ctn { gap: 12px; }
.fi-wi-widget, .fi-wi { gap: 16px; }

/* Coverage meters */
.neft-meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px 20px; }
.neft-meter-head { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-2); margin-bottom: 6px; }
.neft-meter-head b { font-size: 14px; color: var(--ink); }
.neft-meter-track { height: 8px; border-radius: 4px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.neft-meter-track i { display: block; height: 100%; border-radius: 4px; background: var(--accent); }

/* Heatmap */
.neft-heat-wrap { max-height: 420px; overflow: auto; }
.neft-heat { border-collapse: separate; border-spacing: 2px; font-size: 12.5px; width: 100%; }
.neft-heat th { text-align: start; font-weight: 600; color: var(--ink-3); padding: 4px 8px; white-space: nowrap; }
.neft-heat tbody th { color: var(--ink-2); font-weight: 400; }
.neft-heat td { text-align: center; padding: 4px 6px; border-radius: 4px; min-width: 34px; font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.neft-heat .neft-heat-total { font-weight: 600; }
.neft-muted { color: var(--ink-3); font-size: 12.5px; }

/* Work-type chips (assignments, coaches) */
.neft-chips { display: flex; flex-wrap: nowrap; gap: 3px; overflow: hidden; }
.neft-chip { display: inline-block; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 1px 8px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }

/* ---------------------------------------------------------------- Coach profile (Present), bonus matrix */
.neft-profile-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.neft-profile-head small { color: var(--hl); font-weight: 600; letter-spacing: 1px; font-size: 11px; }
.neft-profile-head h2 { font-size: 20px; font-weight: 700; margin: 2px 0; color: var(--ink); }
.neft-rate { text-align: end; }
.neft-rate span { display: block; color: var(--ink-3); font-size: 12px; }
.neft-rate b { font-size: 26px; color: var(--hl); }
.neft-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 14px 0; }
.neft-kpi { border: 1px solid var(--line); border-radius: var(--r-xs); padding: 14px; background: var(--surface); }
.neft-kpi span { color: var(--ink-3); font-size: 12px; }
.neft-kpi b { display: block; font-size: 20px; color: var(--ink); }
.neft-bars .bar { display: grid; grid-template-columns: 110px 1fr 80px; gap: 8px; align-items: center; margin: 5px 0; font-size: 12px; }
.neft-bars .bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.neft-bars .bar i { display: block; height: 10px; border-radius: 0 4px 4px 0; background: var(--accent); }
.neft-bars .bar em { font-style: normal; text-align: end; font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.neft-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.neft-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.neft-table th, .neft-table td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: start; white-space: nowrap; }
.neft-table th { color: var(--ink-2); font-weight: 600; background: var(--surface-2); }
.neft-table th + th, .neft-table td + td { border-inline-start: 1px solid var(--line); }
.neft-tw { overflow-x: auto; }
.neft-yes { color: var(--ok); font-weight: 600; }
.neft-no { color: var(--bad); font-weight: 600; }
.neft-matrix td small { color: var(--ink-3); }

/* ---------------------------------------------------------------- Standard table extras (ERP / LMS F-39) */
/* Thin vertical lines between columns (ERP erp.css) */
.fi-ta-table > thead > tr > th + th, .fi-ta-table > tbody > tr > td + td { border-inline-start: 1px solid var(--line); }
/* Resizable columns: a narrowed cell ends in "…" and shows the full text on hover */
table.neft-std-table td { overflow: hidden; }
table.neft-std-table td .fi-ta-text-item, table.neft-std-table td .fi-ta-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; unicode-bidi: plaintext; }
table.neft-std-table td .fi-ta-text.fi-wrapped, table.neft-std-table td .fi-ta-text.fi-wrapped .fi-ta-text-item { white-space: normal; text-overflow: clip; }
th.neft-resizable-th { position: relative; }
.neft-col-resizer { position: absolute; inset-block: 0; inset-inline-end: -3px; width: 7px; cursor: col-resize; z-index: 2; touch-action: none; }
.neft-col-resizer::after { content: ''; position: absolute; inset-block: 25%; inset-inline-start: 3px; width: 1px; background: var(--line-strong); }
.neft-col-resizer:hover::after, body.neft-col-resizing .neft-col-resizer::after { background: var(--hl); width: 2px; }
body.neft-col-resizing { cursor: col-resize; user-select: none; }

@media print {
    .fi-topbar, .fi-sidebar, .neft-noprint { display: none !important; }
}

/* The filters are visible right above the table, so the "Active filters" strip under them only repeats them. */
.fi-ta-filters-above-content-ctn ~ .fi-ta-filter-indicators, .fi-ta-ctn:has(.fi-ta-filters-above-content-ctn) .fi-ta-filter-indicators { display: none; }

/* Inline-editable cells (text box, dropdown, switch, checkbox) at the LMS row height: Filament pads them by ~13.5px
   top and bottom, which doubles every row (daily rate on Assignments, "Works with Coaches" on Clients, Requests status). */
.fi-ta-cell .fi-ta-col:has(> .fi-ta-text-input), .fi-ta-cell .fi-ta-col:has(> .fi-ta-select),
.fi-ta-cell .fi-ta-col:has(> .fi-ta-toggle), .fi-ta-cell .fi-ta-col:has(> .fi-ta-checkbox) { padding-block: 3px; }
.fi-ta-cell .fi-ta-text-input, .fi-ta-cell .fi-ta-select { padding: 0; }
.fi-ta-cell .fi-ta-toggle, .fi-ta-cell .fi-ta-checkbox { padding-block: 4px; }
.fi-ta-cell .fi-ta-text-input .fi-input-wrp, .fi-ta-cell .fi-ta-select .fi-input-wrp { min-height: 28px; }
.fi-ta-cell .fi-ta-text-input .fi-input, .fi-ta-cell .fi-ta-select .fi-select-input { padding-block: 3px; font-size: 13px; }
/* Row checkboxes get the table's 12px leading indent (LMS first-cell padding). */
.fi-ta-selection-cell, .fi-ta-table > thead > tr > th.fi-ta-selection-cell { padding-inline: 12px 8px; }

/* Lists (ERP erp.css, Waqas 2026-10-25): the table is at most a screen high and its rows scroll inside it, so the
   column headings stay at the top and the page controls (pagination, totals) stay in view under it. */
.fi-ta-content-ctn { max-height: max(320px, calc(100vh - 290px)); overflow: auto; }
.fi-ta-table > thead > tr > th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); }

/* Hand-built grids (Teaching & Bonus) follow the same table rules: rows scroll inside, headings and totals stay. */
.neft-fit { max-height: max(220px, calc(100vh - 230px)); overflow: auto; }
.neft-fit .neft-table thead th { position: sticky; top: 0; z-index: 2; }
.neft-fit .neft-table tfoot td { position: sticky; bottom: 0; z-index: 2; background: var(--surface-2); border-top: 1px solid var(--line-strong); }
.neft-num-col { text-align: end !important; font-family: var(--font-num); font-variant-numeric: tabular-nums; }

/* A hand-built grid in the same card as a list: filter row across the top, then the scrolling grid. */
.neft-grid-card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xs); overflow: hidden; }
.neft-filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.neft-filter-row .fi-input-wrp { min-height: 34px; }

/* The date range in a filter row: Quick dates, From, Until side by side, each at its natural width. */
.neft-range .fi-sc-flex { gap: 8px; align-items: center; }
.neft-range .fi-input-wrp { min-height: 34px; }
.neft-range .fi-fo-date-time-picker, .neft-range .fi-fo-field { min-width: 170px; }
