/*
 * Specula design system, variant A ("Věstník"), applied to the Filament panel.
 *
 * Paper, ink and one signal colour. Rules instead of boxes, type instead of
 * decoration: square corners, hairlines, condensed headlines and monospaced
 * uppercase labels. Light theme only; the panel has dark mode switched off.
 * The same language as the landing page and the sign-in page.
 *
 * Plain CSS on purpose: the panel ships Filament's prebuilt stylesheet and the
 * Docker image has no Node build. Filament's own rules live in cascade layers,
 * so everything here wins without !important. Published by `filament:upgrade`
 * (or `php artisan filament:assets` after editing this file).
 *
 * The colour palettes are registered in AdminPanelProvider, which also names
 * the two typefaces (served from public/fonts/specula); this file holds the
 * tokens and the component rules the palette cannot express.
 */

:root {
    /* 01 · Colour */
    --ink: #1d2129;
    --ink-soft: #2b313d;
    --muted: #4a5160;
    --rule-strong: #8a909c;
    --rule: #d4d7d2;
    --paper-deep: #e7e9e4;
    --paper: #f1f2ef;
    --white: #ffffff;
    --signal: #e8440a; /* display type, 24px and up */
    --signal-fill: #d63d06; /* fills under white text */
    --signal-text: #b8340a; /* links and small text */
    --signal-tint: #fbe4da;
    --positive: #1f6b45;
    --info: #1f4fb8;
    --caution: #7a5200;
    --danger: #a3222b;

    /* 02 · Type. Archivo carries everything; the mono face is for labels and data. */
    --font-display: var(--font-family), 'Helvetica Neue', Helvetica, sans-serif;
    --font-label: var(--mono-font-family), ui-monospace, SFMono-Regular, Menlo, monospace;

    /* 03 · Shape. No radius and no shadow; Filament reads its corners from these. */
    --radius-xs: 0;
    --radius-sm: 0;
    --radius-md: 0;
    --radius-lg: 0;
    --radius-xl: 0;
    --radius-2xl: 0;
    --radius-3xl: 0;
    --default-transition-duration: 120ms;
}

/* ---- Type --------------------------------------------------------------- */

.fi-body {
    background-color: var(--paper);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}

/* Page titles are the display layer: one loud word. A record's own page is
   the exception, because its title is the record's name and can run long. */
.fi-header-heading {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    font-stretch: 78%;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--ink);
}

.fi-page:not([class*='-record-page']) .fi-header-heading {
    font-size: clamp(4rem, 9vw, 7.5rem);
    font-weight: 800;
    font-stretch: 62%;
    line-height: 0.82;
    text-transform: uppercase;
    padding-top: 0.12em; /* room for a háček above the cap line */
}

/* Every title ends on the signal: one orange full stop. */
.fi-header-heading::after {
    content: '.' / '';
    color: var(--signal);
}

.fi-header-subheading {
    max-width: 52rem;
    font-size: 1.125rem;
    color: var(--ink-soft);
}

.fi-header {
    row-gap: calc(var(--spacing) * 6);
    align-items: flex-end;
    padding-block: calc(var(--spacing) * 4) calc(var(--spacing) * 2);
}

/* The brief: under the word, the day in one sentence, then the digest line. */
.sp-brief-lead {
    display: block;
    margin-top: calc(var(--spacing) * 3);
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    font-stretch: 80%;
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--ink);
}

.sp-brief-digest {
    display: block;
    margin-top: calc(var(--spacing) * 3);
    font-family: var(--font-label);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.fi-section-header-heading,
.fi-modal-heading,
.fi-ta-empty-state-heading,
.fi-empty-state-heading {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    font-stretch: 85%;
    line-height: 1.2;
    color: var(--ink);
}

.fi-section-header-description,
.fi-modal-description {
    color: var(--muted);
}

/* The label layer: mono, uppercase, muted. */
.fi-fo-field-label-content,
.fi-in-entry-label,
.fi-ta-header-cell,
.fi-ta-header-cell-sort-btn,
.fi-wi-stats-overview-stat-label,
.fi-breadcrumbs,
.fi-pagination-overview,
.fi-ta-filters-heading,
.fi-ta-col-manager-heading,
.fi-dropdown-header {
    font-family: var(--font-label);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

/* A checkbox or switch reads as a sentence, so its label is plain text. */
.fi-fo-field-label:has(> .fi-checkbox-input, > .fi-radio-input, > .fi-toggle) > .fi-fo-field-label-content {
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    color: var(--ink);
}

.fi-breadcrumbs a:hover {
    color: var(--ink);
}

/* ---- Shell -------------------------------------------------------------- */

/* One side margin for the bar and the page, so the wordmark and the content
   share a left line. */
:root {
    --sp-gutter: clamp(1rem, 5vw, 4.5rem);
}

.fi-main {
    padding-inline: var(--sp-gutter);
}

/* The top bar sits on the paper with one ink rule under it. */
.fi-topbar {
    height: 4.75rem;
    padding-block: 0;
    padding-inline: var(--sp-gutter);
    background-color: var(--paper);
    border-bottom: 1px solid var(--ink);
    --tw-shadow: 0 0 #0000;
    --tw-ring-shadow: 0 0 #0000;
    box-shadow: none;
}

/* The links stand the full height of the bar, so the active one can draw
   its rule on the bar's own bottom line. */
.fi-topbar-nav-groups {
    align-self: stretch;
    align-items: stretch;
    flex-wrap: nowrap;
    column-gap: calc(var(--spacing) * 7);
    /* No space above or below, and one pixel down: the active link's rule
       lies on the bar's bottom line instead of floating above it. */
    margin-block: 0 -1px;
    margin-inline-start: calc(var(--spacing) * 10);
    white-space: nowrap;
}

.fi-topbar-nav-groups .fi-dropdown,
.fi-topbar-nav-groups .fi-dropdown-trigger,
.fi-topbar-nav-groups .fi-topbar-item {
    display: flex;
    align-items: stretch;
}

.fi-topbar-item-btn {
    column-gap: calc(var(--spacing) * 1.5);
    height: 100%;
    padding-inline: 0;
    padding-block: 0;
    border-block: 3px solid transparent;
    background-color: transparent;
}

/* Company and account sit at the right end: name, search, initials. Below
   the desktop width the company moves into the drawer and the account
   holds the right end alone. */
.fi-topbar > .fi-tenant-menu {
    order: 3;
    margin-inline-start: auto;
}

.fi-topbar > .fi-topbar-end {
    order: 4;
    margin-inline-start: auto;
    column-gap: calc(var(--spacing) * 6);
}

@media (min-width: 64rem) {
    .fi-topbar > .fi-tenant-menu + .fi-topbar-nav-groups ~ .fi-topbar-end,
    .fi-topbar > .fi-tenant-menu ~ .fi-topbar-end {
        margin-inline-start: calc(var(--spacing) * 6);
    }
}

.fi-topbar .fi-tenant-menu-trigger .fi-tenant-avatar {
    display: none;
}

.fi-topbar .fi-global-search-field {
    width: 10rem;
}

/* A small laptop has no room for everything: the links come first. */
@media (max-width: 79.99rem) {
    .fi-topbar .fi-global-search-ctn {
        display: none;
    }

    .fi-topbar-nav-groups {
        column-gap: calc(var(--spacing) * 4);
        margin-inline-start: calc(var(--spacing) * 6);
    }
}

.fi-user-menu-trigger .fi-avatar {
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid var(--ink);
}

.fi-topbar-item-btn:hover,
.fi-topbar-item-btn:focus-visible,
.fi-topbar-item.fi-active > .fi-topbar-item-btn {
    background-color: transparent;
}

/* Type only: the navigation carries no icons. */
.fi-topbar-item-btn > .fi-icon:first-child {
    display: none;
}

.fi-topbar-item-label {
    font-family: var(--font-label);
    font-size: 0.8125rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.fi-topbar-item-btn:hover > .fi-topbar-item-label {
    color: var(--ink);
}

.fi-topbar-item.fi-active > .fi-topbar-item-btn {
    border-bottom-color: var(--ink);
}

.fi-topbar-item.fi-active > .fi-topbar-item-btn > .fi-topbar-item-label {
    font-weight: 500;
    color: var(--ink);
}

/* On a narrow screen the same items live in the sidebar drawer. */
.fi-sidebar,
.fi-sidebar-header {
    background-color: var(--paper);
}

.fi-sidebar {
    border-inline-end: 1px solid var(--ink);
}

.fi-sidebar-header {
    --tw-ring-shadow: 0 0 #0000;
    border-bottom: 1px solid var(--ink);
}

.fi-sidebar-group-label,
.fi-sidebar-item-label {
    font-family: var(--font-label);
    font-size: 0.8125rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.fi-sidebar-group-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--muted);
}

.fi-sidebar-item-btn:hover,
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn {
    background-color: var(--paper-deep);
}

.fi-sidebar-item.fi-active > .fi-sidebar-item-btn > .fi-sidebar-item-label {
    font-weight: 500;
    color: var(--ink);
}

.fi-sidebar-item-btn > .fi-icon {
    display: none;
}

/* The wordmark. */
.sp-brand {
    display: flex;
    align-items: center;
    height: 100%;
    font-family: var(--font-display);
    font-size: 1.875rem;
    font-weight: 800;
    font-stretch: 62%;
    letter-spacing: 0.04em;
    line-height: 1;
    text-transform: uppercase;
    color: var(--ink);
}

/* Company and user menus: mono, square, outlined. */
.fi-tenant-menu-trigger {
    border-radius: 0;
    background-color: transparent;
}

.fi-tenant-menu-trigger:hover {
    background-color: var(--paper-deep);
}

.fi-tenant-menu-trigger-tenant-name {
    font-family: var(--font-label);
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink);
}

.fi-tenant-menu-trigger-current-tenant-label {
    display: none;
}

.fi-avatar {
    border-radius: 0;
}

/* ---- Buttons ------------------------------------------------------------ */

.fi-btn {
    --tw-shadow: 0 0 #0000;
    border-radius: 0;
    font-family: var(--font-display);
    font-weight: 700;
    font-stretch: 90%;
}

.fi-btn.fi-size-md,
.fi-btn.fi-size-lg,
.fi-btn.fi-size-xl {
    min-height: 3rem;
    padding-inline: calc(var(--spacing) * 6);
    font-size: 1rem;
}

.fi-btn.fi-size-sm,
.fi-btn.fi-size-xs {
    min-height: 2.75rem;
    padding-inline: calc(var(--spacing) * 4);
    font-size: 0.875rem;
}

/* A count on a button is part of its words ("Filters · 2"), not a tag
   pinned to its corner. */
.fi-btn > .fi-btn-badge-ctn {
    position: static;
    translate: none;
    width: auto;
    border-radius: 0;
    background-color: transparent;
}

.fi-btn > .fi-btn-badge-ctn > .fi-badge {
    min-width: 0;
    padding: 0;
    box-shadow: none;
    font: inherit;
    letter-spacing: 0;
    text-transform: none;
    color: inherit;
}

.fi-btn > .fi-btn-badge-ctn > .fi-badge::before {
    content: '· ';
    white-space: pre;
}

/* Primary: the one filled button. */
.fi-btn.fi-color-primary:not(.fi-outlined):not(label) {
    --bg: var(--signal-fill);
    --text: #fff;
    --hover-bg: var(--signal-text);
    --hover-text: #fff;
}

/* Everything neutral is an ink outline on the ground it stands on. */
.fi-btn.fi-color-gray:not(label),
.fi-btn:not(.fi-color):not(label),
.fi-btn.fi-outlined.fi-color-primary {
    background-color: transparent;
    color: var(--ink);
    --tw-ring-color: var(--ink);
    --tw-ring-shadow: inset 0 0 0 1px var(--ink);
    box-shadow: inset 0 0 0 1px var(--ink);
}

.fi-btn.fi-color-gray:not(label):not(.fi-disabled):not([disabled]):hover,
.fi-btn:not(.fi-color):not(label):not(.fi-disabled):not([disabled]):hover,
.fi-btn.fi-outlined.fi-color-primary:not(.fi-disabled):not([disabled]):hover {
    background-color: var(--paper-deep);
}

/* Destructive: outlined in the danger red, filled only on hover. */
.fi-btn.fi-color-danger:not(label) {
    background-color: transparent;
    color: var(--danger);
    box-shadow: inset 0 0 0 1px var(--danger);
}

.fi-btn.fi-color-danger:not(label):not(.fi-disabled):not([disabled]):hover {
    background-color: var(--danger);
    color: #fff;
}

.fi-btn.fi-disabled,
.fi-btn[disabled] {
    background-color: var(--paper-deep);
    color: var(--muted);
    box-shadow: none;
    opacity: 1;
}

.fi-btn:focus-visible,
.fi-icon-btn:focus-visible,
.fi-link:focus-visible,
.fi-topbar-item-btn:focus-visible,
.fi-tabs-item:focus-visible {
    outline: 2px solid var(--signal);
    outline-offset: 3px;
}

.fi-icon-btn {
    border-radius: 0;
}

.fi-link.fi-color-primary,
.fi-link.fi-color-primary:hover {
    color: var(--signal-text);
}

.fi-link {
    font-weight: 600;
    text-underline-offset: 4px;
}

/* ---- Status ------------------------------------------------------------- */

/* A word in an outline: mono, uppercase, the colour only in text and edge. */
.fi-badge {
    border-radius: 0;
    background-color: transparent;
    padding: 0.25rem 0.5rem;
    font-family: var(--font-label);
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    --tw-ring-shadow: 0 0 #0000;
    box-shadow: inset 0 0 0 1px currentColor;
}

.fi-badge.fi-color {
    background-color: transparent;
    color: var(--color-600);
}

.fi-badge.fi-color-gray,
.fi-badge:not(.fi-color) {
    color: var(--ink);
}

/* ---- Tabs --------------------------------------------------------------- */

/* Left-aligned on a hairline; the active tab draws its own ink rule over it. */
.fi-tabs {
    column-gap: calc(var(--spacing) * 7);
    margin-inline: 0;
    padding: 0;
    background-color: transparent;
    --tw-shadow: 0 0 #0000;
    --tw-ring-shadow: 0 0 #0000;
    box-shadow: inset 0 -1px 0 var(--rule);
}

/* On a narrow screen the row scrolls sideways; the bar would cover the rule. */
.fi-tabs {
    scrollbar-width: none;
}

.fi-tabs::-webkit-scrollbar {
    display: none;
}

.fi-tabs-item {
    padding-inline: 0;
    padding-block: calc(var(--spacing) * 3);
    background-color: transparent;
}

.fi-tabs-item:hover,
.fi-tabs-item:focus-visible,
.fi-tabs-item.fi-active {
    background-color: transparent;
}

.fi-tabs-item-label {
    font-family: var(--font-label);
    font-size: 0.8125rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.fi-tabs-item:hover > .fi-tabs-item-label {
    color: var(--ink);
}

.fi-tabs-item.fi-active {
    box-shadow: inset 0 -2px 0 var(--ink);
}

.fi-tabs-item.fi-active > .fi-tabs-item-label {
    font-weight: 500;
    color: var(--ink);
}

.fi-tabs-item > .fi-icon {
    display: none;
}

/* The count rides along as plain mono text, not as a tag. */
.fi-tabs-item .fi-badge {
    box-shadow: none;
    padding-inline: 0;
    min-width: 0;
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--muted);
}

.fi-tabs-item.fi-active .fi-badge {
    color: var(--ink);
}

.fi-tabs-item .fi-badge::before {
    content: '· ';
    white-space: pre;
}

/* ---- Sections ----------------------------------------------------------- */

/* Rules instead of boxes: a section is a block on the paper under one ink
   rule. Only what floats over the page (a menu, a dialog, a notice) is a
   white sheet with an ink edge. Nothing has a shadow. */
.fi-section,
.fi-wi-stats-overview-stat,
.fi-simple-main,
.fi-input-wrp,
.fi-checkbox-input,
.fi-radio-input,
.fi-ta-ctn {
    --tw-shadow: 0 0 #0000;
}

.fi-section:not(.fi-section-not-contained) {
    background-color: transparent;
    border-top: 1px solid var(--ink);
    --tw-ring-shadow: 0 0 #0000;
    box-shadow: none;
}

.fi-section:not(.fi-section-not-contained) > .fi-section-header {
    padding-inline: 0;
    padding-block: calc(var(--spacing) * 5) calc(var(--spacing) * 2);
    border-bottom: 0;
}

.fi-section:not(.fi-section-not-contained) > .fi-section-content-ctn {
    border-top: 0;
}

.fi-section:not(.fi-section-not-contained) > .fi-section-content-ctn > .fi-section-content {
    padding-inline: 0;
    padding-block: calc(var(--spacing) * 4) calc(var(--spacing) * 8);
}

.fi-section:not(.fi-section-not-contained) > .fi-section-footer {
    padding-inline: 0;
    border-top-color: var(--rule);
}

.fi-simple-main,
.fi-dropdown-panel,
.fi-modal-window,
.fi-no-notification {
    background-color: var(--white);
    --tw-shadow: 0 0 #0000;
    --tw-ring-color: var(--ink);
    --tw-ring-shadow: 0 0 0 1px var(--ink);
    box-shadow: 0 0 0 1px var(--ink);
}

/* Inside a dialog a section has the sheet's own padding to stand in. */
.fi-modal-window .fi-section:not(.fi-section-not-contained) {
    border-top-color: var(--rule);
}

.fi-in-repeatable-item {
    background-color: transparent;
    padding-inline: 0;
    border-radius: 0;
    border-top: 1px solid var(--rule);
    --tw-ring-shadow: 0 0 #0000;
    box-shadow: none;
}

.fi-dropdown-list-item {
    border-radius: 0;
}

.fi-dropdown-list-item:hover,
.fi-dropdown-list-item:focus-visible,
.fi-dropdown-list-item.fi-selected {
    background-color: var(--paper-deep);
}

.fi-modal-close-overlay {
    background-color: rgb(29 33 41 / 0.45);
}

/* A notice: a white sheet, the heading as a label in the status colour. */
.fi-callout {
    border-radius: 0;
    background-color: var(--white);
    --tw-ring-shadow: 0 0 #0000;
    box-shadow: inset 0 0 0 1px var(--ink);
}

.fi-callout > .fi-callout-icon,
.fi-callout > .fi-icon {
    display: none;
}

.fi-callout-heading {
    font-family: var(--font-label);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.fi-callout.fi-color-warning .fi-callout-heading {
    color: var(--caution);
}

.fi-callout.fi-color-danger .fi-callout-heading {
    color: var(--danger);
}

/* ---- Figures ------------------------------------------------------------ */

/* A figure stands on the paper under an ink rule; the number carries it. */
.fi-wi-stats-overview-stat {
    background-color: transparent;
    padding-inline: 0;
    padding-block: calc(var(--spacing) * 4) 0;
    border-top: 1px solid var(--ink);
    --tw-ring-shadow: 0 0 #0000;
    box-shadow: none;
}

.fi-wi-stats-overview-stat-value {
    font-family: var(--font-display);
    font-size: 4.5rem;
    font-weight: 800;
    font-stretch: 62%;
    line-height: 0.85;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-block: calc(var(--spacing) * 3) calc(var(--spacing) * 2);
}

.fi-wi-stats-overview-stat-label-ctn > .fi-icon,
.fi-wi-stats-overview-stat-description > .fi-icon {
    display: none;
}

.fi-wi-stats-overview-stat-description {
    font-size: var(--text-sm);
    color: var(--muted);
}

/* ---- Tables ------------------------------------------------------------- */

/* The table stands on the paper: ink under the header, hairlines between rows. */
.fi-ta-ctn {
    background-color: transparent;
    --tw-ring-shadow: 0 0 #0000;
    box-shadow: none;
    overflow: visible;
}

.fi-ta-header-toolbar,
.fi-ta-header,
.fi-ta-filters-above-content-ctn,
.fi-ta-filter-indicators,
.fi-ta-content-ctn,
.fi-ta-table,
.fi-ta-table > thead,
.fi-ta-table > tbody,
.fi-ta-row,
.fi-ta-cell,
.fi-ta-header-cell,
.fi-ta-selection-cell,
.fi-ta-footer-ctn,
.fi-pagination {
    background-color: transparent;
}

/* Everything above the column heads (heading, search, filters, the active
   filter line) is one quiet strip without dividers of its own. */
.fi-ta-header,
.fi-ta-header-toolbar,
.fi-ta-filter-indicators,
.fi-ta-filters-above-content-ctn {
    padding-inline: 0;
    border-top: 0;
    border-bottom: 0;
}

.fi-ta-header-ctn,
.fi-ta-header-ctn > *,
.fi-ta-main > * {
    border-top-color: transparent;
}

.fi-ta-filter-indicators {
    border-bottom-color: transparent;
}

/* A table that carries its own heading opens like a section. */
.fi-ta-ctn-with-header:has(.fi-ta-header) {
    border-top: 1px solid var(--ink);
}

.fi-ta-header-heading {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    font-stretch: 85%;
    line-height: 1.2;
    color: var(--ink);
}

.fi-ta-header-description {
    color: var(--muted);
}

.fi-ta-content-ctn {
    border-top: 0;
}

/* The first column starts on the rule's left end, the last ends on its right. */
.fi-ta-table > thead > tr > th:first-child,
.fi-ta-table > tbody > tr > td:first-child,
.fi-ta-table > tbody > tr > td:first-child > .fi-ta-col,
.fi-ta-table > tbody > tr > td:first-child .fi-ta-text,
.fi-ta-table > tbody > tr > td:first-child .fi-ta-text-item,
.fi-ta-group-header {
    padding-inline-start: 0;
}

.fi-ta-table > thead > tr > th:last-child,
.fi-ta-table > tbody > tr > td:last-child {
    padding-inline-end: 0;
}

/* The row's name: bold and a little narrow, with one mono line under it. */
.fi-ta-cell-title .fi-ta-text-item,
.fi-ta-cell-name .fi-ta-text-item,
.fi-ta-cell-authority-name .fi-ta-text-item {
    font-size: 1.125rem;
    font-weight: 700;
    font-stretch: 85%;
    line-height: 1.2;
    color: var(--ink);
}

.fi-ta-text-description {
    margin-top: calc(var(--spacing) * 1);
    font-family: var(--font-label);
    font-size: 0.75rem;
    line-height: 1.5;
    color: var(--muted);
}

.fi-ta-table > tbody > tr > td {
    padding-block: calc(var(--spacing) * 1);
}

.fi-ta-table > thead > tr {
    background-color: transparent;
    border-bottom: 1px solid var(--ink);
}

.fi-ta-table > thead > tr > th {
    padding-block: calc(var(--spacing) * 2.5);
}

.fi-ta-table > tbody > tr {
    border-color: var(--rule);
}

.fi-ta-row:hover > .fi-ta-cell,
.fi-ta-row.fi-selected > .fi-ta-cell {
    background-color: var(--paper-deep);
}

/* The row's text sits flush with the rules, so the highlight needs room of
   its own: it overhangs the table by --sp-row-overhang on each side. The
   scrolling box is widened by the same amount, or it would clip the
   overhang; the table inside it does not move. */
:root {
    --sp-row-overhang: 1rem;
}

.fi-ta-content-ctn {
    margin-inline: calc(var(--sp-row-overhang) * -1);
    padding-inline: var(--sp-row-overhang);
}

.fi-ta-row:hover > .fi-ta-cell:first-child,
.fi-ta-row.fi-selected > .fi-ta-cell:first-child {
    box-shadow: calc(var(--sp-row-overhang) * -1) 0 0 var(--paper-deep);
}

.fi-ta-row:hover > .fi-ta-cell:last-child,
.fi-ta-row.fi-selected > .fi-ta-cell:last-child {
    box-shadow: var(--sp-row-overhang) 0 0 var(--paper-deep);
}

.fi-ta-row:hover > .fi-ta-cell:first-child:last-child,
.fi-ta-row.fi-selected > .fi-ta-cell:first-child:last-child {
    box-shadow:
        calc(var(--sp-row-overhang) * -1) 0 0 var(--paper-deep),
        var(--sp-row-overhang) 0 0 var(--paper-deep);
}

.fi-ta-group-header-row > .fi-ta-group-header-cell,
.fi-ta-group-header {
    background-color: transparent;
}

.fi-ta-group-heading {
    font-family: var(--font-label);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink);
}

.fi-ta-group-description {
    color: var(--muted);
}

.fi-pagination {
    padding-inline: 0;
    border-top: 1px solid var(--ink);
}

/* "Per page" and its number read as one quiet line: a mono label, the
   value beside it, one rule under both and no divider between them. */
.fi-pagination-records-per-page-select .fi-input-wrp-prefix {
    padding-inline: 0 calc(var(--spacing) * 3);
    border-inline-end: 0;
}

.fi-pagination-records-per-page-select .fi-input-wrp-label {
    font-family: var(--font-label);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.fi-pagination-records-per-page-select .fi-select-input {
    font-family: var(--font-label);
    font-size: 0.8125rem;
    font-weight: 500;
}

/* Page numbers stay in the background: muted mono figures without boxes or
   dividers. The current page is the only one in ink, on its own rule. */
.fi-pagination-items {
    column-gap: calc(var(--spacing) * 1);
    --tw-shadow: 0 0 #0000;
    --tw-ring-shadow: 0 0 #0000;
    box-shadow: none;
    background-color: transparent;
}

.fi-pagination-item {
    border: 0;
}

.fi-pagination-item-btn {
    border-radius: 0;
    background-color: transparent;
}

.fi-pagination-item-btn:hover,
.fi-pagination-item-btn:focus-visible {
    background-color: transparent;
}

.fi-pagination-item-label {
    font-family: var(--font-label);
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--muted);
}

.fi-pagination-item-icon {
    color: var(--muted);
}

.fi-pagination-item-btn:hover > .fi-pagination-item-label,
.fi-pagination-item-btn:hover > .fi-pagination-item-icon {
    color: var(--ink);
}

.fi-pagination-item.fi-active > .fi-pagination-item-btn {
    background-color: transparent;
    box-shadow: inset 0 -2px 0 var(--ink);
}

.fi-pagination-item.fi-active .fi-pagination-item-label {
    font-weight: 500;
    color: var(--ink);
}

.fi-pagination-item-btn:focus-visible {
    outline: 2px solid var(--signal);
    outline-offset: 3px;
}

.fi-ta-empty-state-icon-bg,
.fi-empty-state-icon-bg {
    border-radius: 0;
    background-color: transparent;
    box-shadow: inset 0 0 0 1px var(--ink);
    color: var(--ink);
}

/* ---- Forms -------------------------------------------------------------- */

/* A field is a line, not a box. */
.fi-input-wrp {
    border-radius: 0;
    background-color: transparent;
    --tw-ring-shadow: 0 0 #0000;
    box-shadow: inset 0 -1px 0 var(--ink);
}

.fi-input-wrp:not(.fi-disabled):not(.fi-invalid):not(:has(.fi-ac-action:focus)):focus-within {
    --tw-ring-shadow: 0 0 #0000;
    box-shadow: inset 0 -2px 0 var(--signal);
}

.fi-input-wrp.fi-invalid,
.fi-input-wrp.fi-invalid:focus-within {
    --tw-ring-shadow: 0 0 #0000;
    box-shadow: inset 0 -2px 0 var(--danger);
}

.fi-input-wrp.fi-disabled {
    background-color: transparent;
    box-shadow: inset 0 -1px 0 var(--rule-strong);
}

.fi-input,
.fi-select-input,
.fi-select-input-btn {
    font-weight: 500;
    color: var(--ink);
}

/* A label or unit in front of a line field needs no divider of its own. */
.fi-input-wrp-prefix,
.fi-input-wrp-suffix {
    border-color: transparent;
}

/* Text starts at the left edge of its line, unless an icon sits there. */
.fi-input-wrp .fi-input:not(.fi-input-has-inline-prefix),
.fi-input-wrp .fi-select-input:not(.fi-select-input-has-inline-prefix),
.fi-select-input-btn {
    padding-inline-start: 0;
}

/* Long text needs its edges: a text area or an editor keeps a full ink box. */
.fi-input-wrp:has(textarea),
.fi-fo-markdown-editor,
.fi-fo-rich-editor,
.fi-fo-key-value,
.fi-fo-repeater-item {
    background-color: var(--white);
    box-shadow: inset 0 0 0 1px var(--ink);
}

.fi-input-wrp:has(textarea):not(.fi-disabled):not(.fi-invalid):focus-within {
    box-shadow: inset 0 0 0 2px var(--signal);
}

.fi-input-wrp:has(textarea) > textarea,
.fi-input-wrp:has(textarea) .fi-fo-textarea {
    padding-inline: calc(var(--spacing) * 3);
}

.fi-fo-field-wrp-error-message,
.fi-fo-field-wrp-error-list {
    color: var(--danger);
}

.fi-checkbox-input,
.fi-radio-input {
    --tw-ring-color: var(--ink);
}

.fi-checkbox-input:checked,
.fi-checkbox-input:indeterminate,
.fi-radio-input:checked {
    background-color: var(--ink);
    --tw-ring-color: var(--ink);
}

.fi-checkbox-input:focus-visible,
.fi-radio-input:focus-visible {
    outline: 2px solid var(--signal);
    outline-offset: 3px;
}

.fi-toggle {
    border-radius: 0;
}

.fi-toggle > :first-child {
    border-radius: 0;
    --tw-shadow: 0 0 #0000;
    box-shadow: none;
}

.fi-toggle.fi-toggle-on {
    background-color: var(--ink);
}

.fi-toggle.fi-toggle-off {
    background-color: var(--rule-strong);
}

.fi-fo-toggle-buttons .fi-btn {
    font-family: var(--font-label);
    font-size: 0.8125rem;
    font-weight: 500;
    font-stretch: 100%;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.fi-fo-toggle-buttons-input:checked + .fi-btn {
    background-color: var(--ink);
    color: #fff;
    box-shadow: inset 0 0 0 1px var(--ink);
}

.fi-in-entry-content,
.fi-ta-text-item {
    color: var(--ink);
}

.fi-in-code,
.fi-ta-text-item.fi-font-mono,
.fi-font-mono {
    font-family: var(--font-label);
}

/* ---- Dashboard ---------------------------------------------------------- */

/* The attention banner: one callout, one line per item, the link at the end. */
.sp-attention .fi-callout-footer {
    margin-top: calc(var(--spacing) * 2);
}

.sp-attention-list {
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing) * 1.5);
    margin: 0;
    padding: 0;
    list-style: none;
}

.sp-attention-item {
    display: flex;
    align-items: baseline;
    gap: calc(var(--spacing) * 2.5);
    font-size: var(--text-sm);
    color: var(--ink-soft);
}

.sp-attention-dot {
    flex: none;
    width: 6px;
    height: 6px;
    background-color: var(--caution);
    transform: translateY(-1px);
}

.sp-attention-item[data-level='info'] .sp-attention-dot {
    background-color: var(--rule-strong);
}

.sp-attention-text {
    flex: 1 1 auto;
}

.sp-attention-link {
    flex: none;
}

/* Lists of tenders inside a sheet: hairline rows, no bullets. */
.sp-rows {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sp-rows > li + li {
    border-top: 1px solid var(--rule);
}

.sp-row {
    display: flex;
    align-items: center;
    gap: calc(var(--spacing) * 3);
    padding-block: calc(var(--spacing) * 2.5);
    color: inherit;
    text-decoration: none;
}

.sp-rows-tight .sp-row {
    padding-block: calc(var(--spacing) * 1.5);
}

.sp-row-inline {
    justify-content: space-between;
}

.sp-row:hover .sp-row-title {
    color: var(--signal-text);
}

.sp-row-text {
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing) * 0.5);
    min-width: 0;
}

.sp-row-title {
    font-size: var(--text-base);
    font-weight: 700;
    font-stretch: 85%;
    line-height: 1.2;
    color: var(--ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sp-row-sub,
.sp-muted {
    font-size: var(--text-xs);
    color: var(--muted);
}

.sp-row-sub {
    font-family: var(--font-label);
}

.sp-empty {
    margin: 0;
    padding-block: calc(var(--spacing) * 2);
    font-size: var(--text-sm);
    color: var(--muted);
}

.sp-divider {
    border-top: 1px solid var(--rule);
    margin-block: calc(var(--spacing) * 3);
}

/* On the brief the matching facts are the least urgent block: they show
   only where three blocks fit side by side. */
@media (max-width: 79.99rem) {
    .sp-matching {
        display: none;
    }
}

/* The label layer, as on field labels. */
.sp-kicker {
    display: block;
    margin-bottom: calc(var(--spacing) * 2);
    font-family: var(--font-label);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.sp-code {
    font-family: var(--font-label);
    font-size: var(--text-xs);
    color: var(--ink-soft);
}

/* Closing soon: the days-left figure carries the row. */
.sp-days {
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 3.25rem;
}

.sp-days-value {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 800;
    font-stretch: 62%;
    letter-spacing: -0.02em;
    line-height: 0.85;
    color: var(--ink);
}

.sp-days-unit {
    margin-top: calc(var(--spacing) * 1);
    font-family: var(--font-label);
    font-size: 0.625rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.sp-deadline[data-urgent='true'] .sp-days-value,
.sp-deadline[data-urgent='true'] .sp-days-unit {
    color: var(--danger);
}

/* Team pipeline: one segmented bar and a legend of counts. */
.sp-bar {
    display: flex;
    gap: 2px;
    height: 10px;
    margin-block: calc(var(--spacing) * 1) calc(var(--spacing) * 3);
    overflow: hidden;
}

.sp-bar-segment {
    flex: 1 1 0;
    min-width: 4px;
}

.sp-bar-segment[data-status='new'],
.sp-legend-swatch[data-status='new'] {
    background-color: var(--rule-strong);
}

.sp-bar-segment[data-status='under_review'],
.sp-legend-swatch[data-status='under_review'] {
    background-color: var(--caution);
}

.sp-bar-segment[data-status='relevant'],
.sp-legend-swatch[data-status='relevant'] {
    background-color: var(--positive);
}

.sp-bar-segment[data-status='pursuing'],
.sp-legend-swatch[data-status='pursuing'] {
    background-color: var(--ink);
}

.sp-bar-segment[data-status='empty'] {
    background-color: var(--paper-deep);
}

.sp-legend {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: calc(var(--spacing) * 2);
    margin: 0;
    padding: 0;
    list-style: none;
}

.sp-legend-item {
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing) * 1);
    color: inherit;
    text-decoration: none;
}

.sp-legend-value {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    font-stretch: 62%;
    letter-spacing: -0.02em;
    line-height: 0.9;
    color: var(--ink);
}

.sp-legend-label {
    display: flex;
    align-items: center;
    gap: calc(var(--spacing) * 1.5);
    font-size: var(--text-xs);
    color: var(--muted);
}

.sp-legend-swatch {
    width: 8px;
    height: 8px;
}

/* Sources: name badge, health badge, then the facts. */
.sp-source {
    flex-direction: column;
    align-items: stretch;
    gap: calc(var(--spacing) * 1);
}

.sp-source-head {
    display: flex;
    align-items: center;
    gap: calc(var(--spacing) * 2);
}

.sp-health {
    margin-left: auto;
}

.sp-source[data-enabled='false'] .fi-badge {
    opacity: 0.7;
}

/* Matching: a two-column fact list. */
.sp-facts {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: calc(var(--spacing) * 2.5) calc(var(--spacing) * 4);
    margin: 0;
    font-size: var(--text-sm);
}

.sp-facts dt {
    align-self: center;
    font-family: var(--font-label);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.sp-facts dd {
    margin: 0;
    color: var(--ink-soft);
}

.sp-facts a {
    color: inherit;
}

.sp-facts a:hover {
    color: var(--signal-text);
}

/* ---- Footer ------------------------------------------------------------- */

.sp-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: calc(var(--spacing) * 2) calc(var(--spacing) * 10);
    margin-top: calc(var(--spacing) * 16);
    margin-inline: var(--sp-gutter);
    padding-block: calc(var(--spacing) * 5) calc(var(--spacing) * 8);
    border-top: 1px solid var(--ink);
    font-family: var(--font-label);
    font-size: 0.75rem;
    color: var(--muted);
}

.sp-footer-mark {
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 800;
    font-stretch: 62%;
    letter-spacing: 0.04em;
    line-height: 1;
    text-transform: uppercase;
    color: var(--ink);
}
