/*
 * Hend Steel theme v2 — floating cards in the Hend Steel orange (logo #FCB03F on near-black).
 * Warm light canvas, a floating two-row header (brand · search · user / navigation pills),
 * floating white cards with soft depth, detail values as tiles, filled inputs with numbered
 * form steps, table rows as white cards with hover lift, dot status pills, dark tooltips.
 * Layered over Filament's CSS; visual only. Colours live in the --hs-* tokens below.
 * v1 (flat CareOps look) is kept at git tag design-v1-careops.
 */

:root {
    --hs-canvas-top: #fff0d9;
    --hs-canvas: #f6f5f2;
    --hs-surface: #ffffff;
    --hs-soft: #f7f6f3;
    --hs-soft-2: #efede8;
    --hs-line: #ecebe6;
    --hs-line-strong: #e0ddd6;
    --hs-text: #17161a;
    --hs-muted: #6d6a64;
    --hs-faint: #a8a49c;
    --hs-ink: #1b1a1d;
    --hs-ink-hover: #33312f;
    --hs-accent: #fcb03f;
    --hs-accent-2: #ffc970;
    --hs-accent-soft: #ffefd6;
    --hs-accent-softer: #fff8ec;
    --hs-accent-ink: #a8610a;
    --hs-accent-hover: #f29b17;
    --hs-on-accent: #1b1a1d;
    --hs-success: #1f9d55;
    --hs-warning: #e8833a;
    --hs-danger: #dc4a3d;
    --hs-radius-lg: 22px;
    --hs-radius: 18px;
    --hs-radius-md: 14px;
    --hs-radius-sm: 11px;
    --hs-shadow: 0 1px 2px rgba(40, 28, 10, .04), 0 10px 28px -14px rgba(90, 60, 10, .16);
    --hs-shadow-hover: 0 2px 4px rgba(40, 28, 10, .05), 0 16px 36px -14px rgba(90, 60, 10, .24);
    --hs-shadow-pop: 0 24px 60px -18px rgba(60, 40, 10, .32);
    --hs-tooltip: #232220;
    --font-family: 'Inter Variable', 'Inter', 'IBM Plex Sans Arabic', ui-sans-serif, system-ui, sans-serif !important;
    --radius-lg: .7rem;
    --radius-xl: 1.1rem;
}

.dark {
    --hs-canvas-top: #2a2011;
    --hs-canvas: #0f0e0d;
    --hs-surface: #191816;
    --hs-soft: #211f1c;
    --hs-soft-2: #292622;
    --hs-line: rgba(255, 255, 255, .07);
    --hs-line-strong: rgba(255, 255, 255, .12);
    --hs-text: #f4f2ee;
    --hs-muted: #a9a59d;
    --hs-faint: #75716a;
    --hs-ink: #fcb03f;
    --hs-ink-hover: #ffc566;
    --hs-accent: #fcb03f;
    --hs-accent-soft: rgba(252, 176, 63, .18);
    --hs-accent-softer: rgba(252, 176, 63, .08);
    --hs-accent-ink: #ffcf85;
    --hs-shadow: 0 0 0 1px rgba(255, 255, 255, .05);
    --hs-shadow-hover: 0 0 0 1px rgba(255, 255, 255, .1);
}

/* ============ Canvas ============ */

body.fi-body,
.fi-body {
    background:
        radial-gradient(70rem 30rem at 50% -8rem, var(--hs-canvas-top) 0%, transparent 70%),
        var(--hs-canvas);
    background-attachment: fixed;
    color: var(--hs-text);
}

* { scrollbar-width: thin; scrollbar-color: var(--hs-line-strong) transparent; }

.fi-main { padding-inline: 1.25rem !important; }

@media (min-width: 1024px) {
    .fi-main { padding-inline: 2rem !important; }
}

/* ============ Floating two-row header ============ */

.fi-topbar-ctn {
    padding: .75rem 1rem 0;
    background: transparent !important;
    box-shadow: none !important;
}

@media (min-width: 1024px) {
    /* The header stays at the top of the page and leaves the screen on scroll. */
    .fi-topbar-ctn { padding: .9rem 2rem 0; position: relative !important; }
}

/* Solid (no backdrop-filter): a filter would become the containing block of the fixed
   dropdown panels and push them off position. */
.fi-topbar {
    background: var(--hs-surface) !important;
    border-radius: var(--hs-radius-lg);
    box-shadow: var(--hs-shadow) !important;
    border: 0 !important;
    min-height: 4rem;
    padding-inline: 1rem !important;
}

@media (min-width: 1024px) {
    .fi-topbar {
        flex-wrap: wrap;
        row-gap: 0;
        padding: .55rem 1.25rem 0 !important;
    }

    .fi-topbar-start { order: 1; min-height: 3.25rem; }
    .fi-topbar-end { order: 2; min-height: 3.25rem; }

    /* Second row: navigation pills across the full width; wraps when there are many.
       No overflow scrolling here: a scroll box clips the dropdown's free space and makes
       it flip upward. */
    .fi-topbar-nav-groups {
        order: 3;
        flex-basis: 100%;
        display: flex !important;
        flex-wrap: wrap;
        gap: .25rem;
        margin: .35rem 0 0 !important;
        padding: .55rem 0 .65rem !important;
        border-top: 1px solid var(--hs-line);
    }
}

.fi-topbar-item-btn {
    border-radius: var(--hs-radius-sm) !important;
    padding: .45rem .8rem !important;
    white-space: nowrap;
    transition: background-color .15s ease, color .15s ease;
}

.fi-topbar-item-btn:hover { background: var(--hs-soft) !important; }

.fi-topbar-item-label {
    font-weight: 500;
    font-size: .85rem;
    color: var(--hs-muted);
}

.fi-topbar-item-icon { color: var(--hs-faint) !important; }

.fi-topbar-item.fi-active > .fi-topbar-item-btn,
.fi-topbar-item.fi-active .fi-topbar-item-btn {
    background: var(--hs-accent-soft) !important;
}

.fi-topbar-item.fi-active .fi-topbar-item-label,
.fi-topbar-item.fi-active .fi-topbar-item-icon {
    color: var(--hs-accent-ink) !important;
    font-weight: 600;
}

/* Brand */
.hs-brand {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    color: var(--hs-ink);
}

.dark .hs-brand { color: var(--hs-text); }

.hs-brand-mark { width: 1.75rem; height: 1.75rem; color: var(--hs-accent); }

.hs-brand-name {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -.03em;
    white-space: nowrap;
}

/* Plant / date chip */
.hs-plant-chip {
    display: none;
    align-items: center;
    gap: .45rem;
    margin-inline-start: 1.25rem;
    padding-inline-start: 1.25rem;
    border-inline-start: 1px solid var(--hs-line);
    font-size: .82rem;
    font-weight: 500;
    color: var(--hs-text);
    white-space: nowrap;
}

@media (min-width: 1280px) {
    .hs-plant-chip { display: inline-flex; }
}

.hs-plant-icon { width: 1.1rem; height: 1.1rem; color: var(--hs-muted); }

.hs-plant-sep { width: 4px; height: 4px; border-radius: 9px; background: var(--hs-faint); }

.hs-plant-date { color: var(--hs-muted); }

/* Search, bell, user */
.fi-global-search-field .fi-input-wrp {
    background: var(--hs-soft) !important;
    box-shadow: none !important;
    border-radius: 999px !important;
}

@media (min-width: 1024px) {
    .fi-global-search-field .fi-input-wrp { min-width: 15rem; }
}

@media (max-width: 767px) {
    .fi-topbar-end { gap: .4rem !important; min-width: 0; }
    .fi-global-search-ctn { min-width: 0; flex: 1; }
    .fi-topbar .fi-icon-btn, .fi-topbar-database-notifications-btn { width: 2.25rem; height: 2.25rem; }
}

.fi-topbar .fi-icon-btn,
.fi-topbar-database-notifications-btn {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px !important;
    background: var(--hs-soft);
}

.fi-topbar .fi-icon-btn:hover { background: var(--hs-soft-2); }

.hs-user-chip {
    display: none;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.15;
    margin-inline-start: .35rem;
    text-align: end;
}

@media (min-width: 768px) {
    .hs-user-chip { display: flex; }
}

.hs-user-name { font-size: .82rem; font-weight: 600; color: var(--hs-text); white-space: nowrap; }

.hs-user-role { font-size: .72rem; color: var(--hs-muted); white-space: nowrap; }

.fi-user-menu-trigger .fi-avatar {
    box-shadow: 0 0 0 2px var(--hs-surface), 0 0 0 4px var(--hs-accent-soft);
}

/* Mobile drawer (top navigation collapses into it below lg). */
.fi-sidebar {
    background: var(--hs-surface) !important;
    box-shadow: var(--hs-shadow-pop) !important;
}

.fi-sidebar-item-btn { border-radius: var(--hs-radius-sm); }

.fi-sidebar-item.fi-active > .fi-sidebar-item-btn { background: var(--hs-accent-soft) !important; }

.fi-sidebar-item.fi-active .fi-sidebar-item-label,
.fi-sidebar-item.fi-active .fi-sidebar-item-icon { color: var(--hs-accent-ink) !important; }

/* ============ Page header ============ */

.fi-header { padding-top: .75rem; }

.fi-header-heading {
    font-size: 1.85rem !important;
    font-weight: 800 !important;
    letter-spacing: -.035em;
    color: var(--hs-text);
}

.fi-header-subheading { color: var(--hs-muted); }

.fi-breadcrumbs-list { gap: .25rem; }

.fi-breadcrumbs-item-label {
    font-size: .75rem;
    font-weight: 500;
    color: var(--hs-muted);
    padding: .15rem .55rem;
    border-radius: 999px;
    background: color-mix(in oklab, var(--hs-surface) 70%, transparent);
}

.fi-breadcrumbs-item-separator { opacity: .5; }

/* ============ Floating cards ============ */

.fi-section:not(.fi-section-not-contained),
.fi-ta-ctn,
.fi-wi-widget > .fi-section {
    background: var(--hs-surface) !important;
    border-radius: var(--hs-radius) !important;
    box-shadow: var(--hs-shadow) !important;
    border: 0 !important;
}

.fi-section:not(.fi-section-not-contained) > .fi-section-header {
    border: 0 !important;
    padding-bottom: .25rem !important;
}

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

/* Heading with a small accent block, like the legend chips in the reference charts. */
.fi-section-header-heading {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    font-weight: 700 !important;
    font-size: 1rem !important;
    letter-spacing: -.015em;
}

.fi-section-header-heading::before {
    content: '';
    width: .3rem;
    height: 1rem;
    border-radius: 3px;
    background: linear-gradient(var(--hs-accent-2), var(--hs-accent));
    flex-shrink: 0;
}

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

.fi-section-collapse-btn {
    border-radius: 999px !important;
    background: var(--hs-soft);
}

.fi-section.fi-collapsed > .fi-section-header { padding-bottom: 1.25rem !important; }

/* Nested sections, repeater items: soft inner panels. */
.fi-section .fi-section:not(.fi-section-not-contained),
.fi-fo-repeater-item,
.fi-in-repeatable-item {
    background: var(--hs-soft) !important;
    border-radius: var(--hs-radius-md) !important;
    box-shadow: none !important;
    border: 0 !important;
}

.fi-modal-window {
    border-radius: 24px !important;
    box-shadow: var(--hs-shadow-pop) !important;
}

.fi-modal-heading { font-weight: 700; letter-spacing: -.02em; }

.fi-dropdown-panel {
    border-radius: var(--hs-radius) !important;
    box-shadow: 0 0 0 1px var(--hs-line), var(--hs-shadow-pop) !important;
    padding: .3rem;
}

/* A long menu of the header opens wide, in columns, centred under the header; nine links or more
   is what tells it from a small actions menu. Filament's max-width is a layered !important, which
   nothing here can beat, so the width comes from min-width. */
@media (min-width: 1024px) {
    .fi-dropdown-panel:has(> .fi-dropdown-list > a.fi-dropdown-list-item:nth-child(9)) {
        min-width: min(38rem, calc(100vw - 2rem));
        max-height: calc(100vh - 11rem);
        overflow-y: auto;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%);
    }

    .fi-dropdown-panel:has(> .fi-dropdown-list > a.fi-dropdown-list-item:nth-child(17)) { min-width: min(58rem, calc(100vw - 2rem)); }

    .fi-dropdown-panel > .fi-dropdown-list:has(> a.fi-dropdown-list-item:nth-child(9)) {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .1rem .4rem;
    }

    .fi-dropdown-panel > .fi-dropdown-list:has(> a.fi-dropdown-list-item:nth-child(17)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.fi-dropdown-list-item { border-radius: var(--hs-radius-sm) !important; }

.fi-dropdown-list-item:hover { background: var(--hs-soft) !important; }

/* ============ Detail pages: values as tiles ============ */

.fi-in-entry:has(.fi-in-entry-label):not(:has(table, .fi-in-repeatable, .hs-table-wrap)) {
    background: var(--hs-soft);
    border-radius: var(--hs-radius-md);
    padding: .75rem .9rem;
    transition: background-color .15s ease;
}

.fi-in-entry:has(.fi-in-entry-label):not(:has(table, .fi-in-repeatable, .hs-table-wrap)):hover {
    background: var(--hs-accent-softer);
}

.fi-in-entry-label {
    font-size: .74rem !important;
    font-weight: 500 !important;
    color: var(--hs-muted) !important;
}

.fi-in-text-item {
    font-weight: 600;
    font-size: .95rem;
    color: var(--hs-text);
}

/* ============ Forms: filled inputs, numbered steps ============ */

.fi-sc-form { counter-reset: hs-step; }

.fi-sc-form .fi-section:not(.fi-section .fi-section) > .fi-section-header .fi-section-header-heading {
    counter-increment: hs-step;
}

.fi-sc-form .fi-section:not(.fi-section .fi-section) > .fi-section-header .fi-section-header-heading::before {
    content: counter(hs-step);
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    font-size: .75rem;
    font-weight: 700;
    color: var(--hs-accent-ink);
    background: var(--hs-accent-soft);
}

.fi-input-wrp {
    background: var(--hs-soft) !important;
    border-radius: var(--hs-radius-sm) !important;
    box-shadow: none !important;
    min-height: 2.75rem;
    transition: background-color .15s ease, box-shadow .15s ease;
}

.fi-input-wrp:hover { background: var(--hs-soft-2) !important; }

/* Inside soft inner panels (repeater rows, nested sections) inputs are white so they stand out. */
.fi-fo-repeater-item .fi-input-wrp,
.fi-section .fi-section .fi-input-wrp { background: var(--hs-surface) !important; }

.fi-input-wrp:focus-within {
    background: var(--hs-surface) !important;
    box-shadow: 0 0 0 1.5px var(--hs-accent), 0 0 0 5px var(--hs-accent-soft) !important;
}

.fi-input-wrp.fi-disabled,
.fi-input-wrp:has(:disabled) {
    background: repeating-linear-gradient(-45deg, var(--hs-soft) 0 6px, var(--hs-soft-2) 6px 7px) !important;
}

.fi-input,
.fi-select-input { font-weight: 500; }

.fi-fo-field-label-content {
    font-size: .8rem;
    font-weight: 600;
    color: var(--hs-text);
}

.fi-fo-field-label-required-mark { color: var(--hs-accent) !important; }

.fi-checkbox-input,
.fi-radio-input { border-radius: 6px; }

.fi-checkbox-input:checked,
.fi-toggle.fi-toggle-on { background-color: var(--hs-accent) !important; }

/* CheckboxList options as selectable chips. */
.fi-fo-checkbox-list-option-label,
.fi-fo-checkbox-list-option {
    background: var(--hs-soft);
    border-radius: var(--hs-radius-sm);
    padding: .6rem .8rem;
}

.fi-fo-checkbox-list-option:has(:checked),
.fi-fo-checkbox-list-option-label:has(:checked) {
    background: var(--hs-accent-soft);
    box-shadow: 0 0 0 1.5px var(--hs-accent) inset;
}

.fi-sc-actions, .fi-form-actions { gap: .6rem; }

/* ============ Tables: white row cards on a soft well ============ */

.fi-ta-header, .fi-ta-header-ctn, .fi-ta-header-toolbar, .fi-pagination { border-color: transparent !important; }

.fi-ta-header-toolbar .fi-input-wrp { border-radius: 999px !important; }

.fi-ta-content-ctn {
    margin: 0 .5rem .5rem;
    padding: .25rem .35rem .4rem;
    background: var(--hs-soft);
    border-radius: var(--hs-radius-md);
    border: 0 !important;
}

.fi-ta-table {
    border-collapse: separate !important;
    border-spacing: 0 7px;
}

.fi-ta-table > thead,
.fi-ta-table > thead > tr,
.fi-ta-table > tbody,
.fi-ta-table > tbody > tr {
    background: transparent !important;
    border: 0 !important;
}

.fi-ta-table > :not(:last-child),
.fi-ta-table > tbody > :not(:last-child) { border: 0 !important; }

.fi-ta-header-cell,
.fi-ta-empty-header-cell,
.fi-ta-actions-header-cell {
    background: transparent !important;
    font-size: .72rem;
    font-weight: 600;
    color: var(--hs-faint) !important;
    padding-block: .4rem 0 !important;
}

.fi-ta-row > td {
    background: var(--hs-surface);
    border: 0 !important;
    transition: box-shadow .15s ease, background-color .15s ease;
}

.fi-ta-row > td:first-child {
    border-start-start-radius: var(--hs-radius-md);
    border-end-start-radius: var(--hs-radius-md);
}

.fi-ta-row > td:last-child {
    border-start-end-radius: var(--hs-radius-md);
    border-end-end-radius: var(--hs-radius-md);
}

.fi-ta-row:hover > td {
    box-shadow: 0 -1px 0 var(--hs-accent-soft) inset, 0 1px 0 var(--hs-accent-soft) inset;
    background: color-mix(in oklab, var(--hs-surface) 85%, var(--hs-accent-soft));
}

.fi-ta-row.fi-selected > td { background: var(--hs-accent-soft); }

.fi-ta-text-item { color: var(--hs-text); }

.fi-ta-cell:first-child .fi-ta-text-item,
.fi-ta-cell-number .fi-ta-text-item { font-weight: 600; }

.fi-ta-empty-state-icon-bg {
    background: var(--hs-accent-soft) !important;
    border-radius: 999px !important;
}

.fi-ta-empty-state-icon { color: var(--hs-accent) !important; }

.fi-pagination-item-button { border-radius: var(--hs-radius-sm) !important; }

/* ============ Status pills ============ */

.fi-badge {
    border-radius: 999px !important;
    box-shadow: none !important;
    padding-inline: .65rem;
    padding-block: .22rem;
    font-weight: 600;
    font-size: .72rem;
}

.fi-badge.fi-color { color: var(--color-700); background-color: var(--color-50); }

.dark .fi-badge.fi-color {
    background-color: color-mix(in oklab, var(--color-400) 16%, transparent);
    color: var(--color-300);
}

.fi-ta-text .fi-badge::before,
.fi-in-text .fi-badge::before {
    content: '';
    width: .4rem;
    height: .4rem;
    border-radius: 999px;
    background-color: var(--color-500, var(--gray-400));
    box-shadow: 0 0 0 3px color-mix(in oklab, var(--color-500, var(--gray-400)) 20%, transparent);
    flex-shrink: 0;
}

/* ============ Buttons ============ */

.fi-btn {
    border-radius: var(--hs-radius-sm) !important;
    font-weight: 600;
    min-height: 2.5rem;
    transition: transform .12s ease, box-shadow .15s ease, background-color .15s ease;
}

.fi-btn:active { transform: translateY(1px); }

.fi-btn.fi-color-primary:not(.fi-outlined) {
    background: var(--hs-accent) !important;
    color: var(--hs-on-accent, #1b1a1d) !important;
    box-shadow: 0 6px 16px -8px rgba(160, 95, 10, .55) !important;
}

.fi-btn.fi-color-primary:not(.fi-outlined):hover { background: var(--hs-accent-hover, #f29b17) !important; }

.fi-btn:not(.fi-outlined):not(.fi-color) {
    background: var(--hs-surface) !important;
    box-shadow: 0 0 0 1px var(--hs-line-strong) !important;
}

.fi-btn:not(.fi-outlined):not(.fi-color):hover { background: var(--hs-soft) !important; }

.fi-icon-btn { border-radius: var(--hs-radius-sm); }

.fi-link { font-weight: 600; }

.fi-ac-link-action { border-radius: 999px; padding: .2rem .55rem; }

.fi-ac-link-action:hover { background: var(--hs-accent-soft); }

/* ============ Tabs: segmented control ============ */

.fi-tabs {
    background: var(--hs-soft-2) !important;
    box-shadow: none !important;
    border-radius: 999px !important;
    padding: .25rem !important;
    gap: .15rem;
    width: fit-content;
    max-width: 100%;
}

.fi-tabs-item {
    border-radius: 999px !important;
    padding: .4rem .95rem !important;
    background: transparent !important;
}

.fi-tabs-item-label { color: var(--hs-muted); font-weight: 500; }

.fi-tabs-item.fi-active {
    background: var(--hs-surface) !important;
    box-shadow: 0 1px 3px rgba(40, 28, 10, .1) !important;
}

.fi-tabs-item.fi-active .fi-tabs-item-label { color: var(--hs-text); font-weight: 600; }

/* ============ Stats widget: one KPI strip ============ */

.fi-wi-stats-overview-stats-ctn {
    gap: 0 !important;
    background: var(--hs-surface);
    border-radius: var(--hs-radius);
    box-shadow: var(--hs-shadow);
    overflow: hidden;
}

.fi-wi-stats-overview-stat {
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    border-inline-end: 1px solid var(--hs-line);
    border-bottom: 1px solid var(--hs-line);
    margin-inline-end: -1px;
    margin-bottom: -1px;
    padding: 1.15rem 1.25rem !important;
}

.fi-wi-stats-overview-stat-label {
    font-size: .8rem;
    font-weight: 500;
    color: var(--hs-muted) !important;
}

.fi-wi-stats-overview-stat-value {
    font-size: 2rem !important;
    font-weight: 800 !important;
    letter-spacing: -.04em;
    color: var(--hs-text);
}

.fi-wi-stats-overview-stat-description { font-size: .75rem; }

/* ============ Tooltips, notifications ============ */

.tippy-box {
    background: var(--hs-tooltip) !important;
    color: #fff !important;
    border-radius: 12px !important;
    font-size: .78rem !important;
    padding: .15rem .25rem;
    box-shadow: var(--hs-shadow-pop);
}

.tippy-arrow { color: var(--hs-tooltip) !important; }

.fi-no-notification {
    border-radius: var(--hs-radius) !important;
    box-shadow: var(--hs-shadow-pop) !important;
}

/* ============ Sign-in: split card ============ */

.fi-simple-layout {
    background:
        radial-gradient(55rem 35rem at 90% -10%, #ffdca3 0%, transparent 60%),
        radial-gradient(45rem 30rem at -5% 110%, #ffe9c7 0%, transparent 60%),
        #f6f3ee;
}

.dark .fi-simple-layout { background: var(--hs-canvas); }

.fi-simple-main {
    border-radius: 26px !important;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .7), 0 30px 70px -24px rgba(90, 60, 10, .3) !important;
    position: relative;
    overflow: hidden;
}

.fi-simple-main::before {
    content: '';
    position: absolute;
    inset-inline: 0;
    top: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--hs-accent-2), var(--hs-accent), var(--hs-ink));
}

/* ============ Shared classes for custom screens ============ */

.hs-card {
    background: var(--hs-surface);
    border-radius: var(--hs-radius);
    box-shadow: var(--hs-shadow);
    padding: 1.15rem 1.25rem;
}

.hs-tile {
    background: var(--hs-soft);
    border-radius: var(--hs-radius-md);
    padding: .9rem 1rem;
}

.hs-label { font-size: .78rem; font-weight: 500; color: var(--hs-muted); }

.hs-value {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.04em;
    color: var(--hs-text);
}

.hs-value small,
.hs-unit { font-size: .8rem; font-weight: 500; color: var(--hs-faint); letter-spacing: 0; }

.hs-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    background: var(--hs-surface);
    border-radius: var(--hs-radius);
    box-shadow: var(--hs-shadow);
    overflow: hidden;
}

.hs-kpis > * {
    padding: 1.1rem 1.25rem;
    border-inline-end: 1px solid var(--hs-line);
    border-bottom: 1px solid var(--hs-line);
    margin-inline-end: -1px;
    margin-bottom: -1px;
}

.hs-meter {
    position: relative;
    height: 1.25rem;
    background: repeating-linear-gradient(90deg, var(--hs-line-strong) 0 3px, transparent 3px 7px);
    border-radius: 3px;
    overflow: hidden;
}

.hs-meter > span {
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    background: repeating-linear-gradient(90deg, var(--m, var(--hs-success)) 0 3px, transparent 3px 7px);
}

.hs-table-wrap {
    overflow-x: auto;
    background: var(--hs-soft);
    border-radius: var(--hs-radius-md);
    padding: .25rem;
}

.hs-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 4px;
    font-size: .85rem;
}

.hs-table th {
    padding: .45rem .75rem .2rem;
    text-align: start;
    font-size: .72rem;
    font-weight: 600;
    color: var(--hs-faint);
    white-space: nowrap;
}

.hs-table td {
    padding: .55rem .75rem;
    background: var(--hs-surface);
}

.hs-table td:first-child { border-start-start-radius: 10px; border-end-start-radius: 10px; }

.hs-table td:last-child { border-start-end-radius: 10px; border-end-end-radius: 10px; }

.hs-table tbody tr:hover td { background: color-mix(in oklab, var(--hs-surface) 85%, var(--hs-accent-soft)); }

.hs-table.hs-grid td + td { border-inline-start: 1px solid var(--hs-line); }

/* ============ Home dashboard ============ */

.hs-hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--hs-radius-lg);
    padding: 1.6rem 1.75rem;
    color: #fff;
    background:
        radial-gradient(30rem 16rem at 100% 0%, rgba(255, 255, 255, .22) 0%, transparent 60%),
        linear-gradient(120deg, #1b1a1d 0%, #4a3416 50%, #e9962a 100%);
    box-shadow: 0 24px 50px -28px rgba(120, 70, 10, .6);
}

.hs-hero::after {
    content: '';
    position: absolute;
    inset-inline-end: -3rem;
    bottom: -4rem;
    width: 16rem;
    height: 16rem;
    border-radius: 3rem;
    background: repeating-linear-gradient(-45deg, rgba(255, 255, 255, .08) 0 2px, transparent 2px 10px);
    transform: rotate(18deg);
}

.hs-hero-kicker { font-size: .8rem; opacity: .75; font-weight: 500; }

.hs-hero-title { font-size: 1.75rem; font-weight: 800; letter-spacing: -.035em; margin-top: .25rem; }

.hs-hero-sub { font-size: .88rem; opacity: .8; margin-top: .35rem; }

.hs-hero-stats { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.2rem; position: relative; z-index: 1; }

.hs-hero-stat {
    background: rgba(255, 255, 255, .14);
    backdrop-filter: blur(6px);
    border-radius: 14px;
    padding: .6rem .9rem;
    min-width: 8rem;
}

.hs-hero-stat b { display: block; font-size: 1.35rem; font-weight: 800; letter-spacing: -.03em; }

.hs-hero-stat span { font-size: .74rem; opacity: .8; }

.hs-grid-auto { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }

/* Work-queue task cards, like the "Alerts" list in the reference. */
.hs-task {
    display: flex;
    align-items: center;
    gap: .85rem;
    background: var(--hs-surface);
    border-radius: var(--hs-radius-md);
    box-shadow: var(--hs-shadow);
    padding: .8rem .9rem;
    transition: box-shadow .15s ease, transform .15s ease;
    text-decoration: none;
    color: inherit;
}

a.hs-task:hover { box-shadow: var(--hs-shadow-hover); transform: translateY(-1px); }

.hs-task-icon {
    width: 2.5rem;
    height: 2.5rem;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: var(--c, var(--hs-accent-ink));
    background: color-mix(in oklab, var(--c, var(--hs-accent)) 13%, transparent);
}

.hs-task-icon svg { width: 1.2rem; height: 1.2rem; }

.hs-task-body { min-width: 0; flex: 1; }

.hs-task-title { font-weight: 700; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.hs-task-sub { font-size: .78rem; color: var(--hs-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.hs-task-go {
    font-size: .78rem;
    font-weight: 600;
    color: var(--hs-accent-ink);
    background: var(--hs-accent-softer);
    padding: .3rem .7rem;
    border-radius: 999px;
    white-space: nowrap;
}

/* Quick-access module tiles. */
.hs-module {
    background: var(--hs-surface);
    border-radius: var(--hs-radius);
    box-shadow: var(--hs-shadow);
    padding: 1rem 1.1rem 1.1rem;
}

.hs-module-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .7rem; }

.hs-module-head .hs-task-icon { width: 2.2rem; height: 2.2rem; border-radius: 10px; }

.hs-module-title { font-weight: 700; font-size: .95rem; }

.hs-module-count { margin-inline-start: auto; font-size: .72rem; color: var(--hs-faint); font-weight: 600; }

.hs-module-links { display: flex; flex-wrap: wrap; gap: .35rem; }

.hs-module-links a {
    font-size: .78rem;
    font-weight: 500;
    color: var(--hs-text);
    background: var(--hs-soft);
    padding: .35rem .65rem;
    border-radius: 999px;
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease;
}

.hs-module-links a:hover { background: var(--hs-accent-soft); color: var(--hs-accent-ink); }

.hs-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: .25rem .15rem .7rem;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -.02em;
}

.hs-section-title small { font-weight: 500; font-size: .78rem; color: var(--hs-muted); letter-spacing: 0; }

.hs-empty {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: 1rem 1.1rem;
    border-radius: var(--hs-radius-md);
    background: var(--hs-surface);
    box-shadow: var(--hs-shadow);
    color: var(--hs-muted);
}

/* ============ Documents: head strip, "where is my request", sheets, history ============ */

.hs-muted { color: var(--hs-muted); }
.hs-strong { font-weight: 700; }

.hs-dot { display: inline-block; width: .5rem; height: .5rem; border-radius: 99px; background: var(--hs-faint); flex: none; margin-inline-end: .4rem; vertical-align: middle; }
.hs-dot-done, .hs-dot-success { background: var(--hs-success); }
.hs-dot-now, .hs-dot-warning { background: var(--hs-accent); }
.hs-dot-stop, .hs-dot-danger { background: var(--hs-danger); }
.hs-dot-info { background: #3b82f6; }

.hs-chip { display: inline-flex; align-items: center; gap: .3rem; padding: .12rem .55rem; border-radius: 99px; font-size: .74rem; font-weight: 600; white-space: nowrap; background: var(--hs-soft-2); color: var(--hs-muted); }
.hs-chip-success { background: rgba(31, 157, 85, .12); color: #17803f; }
.hs-chip-warning { background: var(--hs-accent-soft); color: var(--hs-accent-ink); }
.hs-chip-danger { background: rgba(220, 74, 61, .12); color: #b8362b; }
.hs-chip-info { background: rgba(59, 130, 246, .12); color: #2563c9; }
.dark .hs-chip-success { color: #5fd08f; }
.dark .hs-chip-danger { color: #ff8b80; }
.dark .hs-chip-info { color: #8ab4ff; }

/* Head strip: the document's facts as small label / value cells that wrap. */
.hs-dochead { display: grid; grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr)); gap: 1px; background: var(--hs-line); border-radius: var(--hs-radius-md); overflow: hidden; border: 1px solid var(--hs-line); }
.hs-dochead-cell { background: var(--hs-surface); padding: .6rem .8rem; display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.hs-dochead-wide { grid-column: span 2; }
.hs-dochead-label { font-size: .7rem; color: var(--hs-muted); font-weight: 500; }
.hs-dochead-value { font-size: .86rem; font-weight: 600; color: var(--hs-text); overflow-wrap: anywhere; }
.hs-dochead-value a { color: var(--hs-accent-ink); }
@media (max-width: 640px) { .hs-dochead-wide { grid-column: span 1; } }

/* "Where is my request": eight steps on one line, a progress rail behind them. */
.hs-journey-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.hs-journey-title { font-weight: 700; font-size: .95rem; }
.hs-journey-now { display: inline-flex; align-items: center; font-size: .84rem; font-weight: 600; background: var(--hs-soft); padding: .3rem .75rem; border-radius: 99px; }
.hs-journey-count { margin-inline-start: .6rem; color: var(--hs-muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.hs-journey-steps { --hs-n: 8; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--hs-n), minmax(0, 1fr)); position: relative; }
.hs-journey-steps::before, .hs-journey-steps::after { content: ""; position: absolute; top: 1.05rem; inset-inline-start: calc(50% / var(--hs-n)); height: 3px; border-radius: 3px; }
.hs-journey-steps::before { inset-inline-end: calc(50% / var(--hs-n)); background: var(--hs-line-strong); }
.hs-journey-steps::after { width: calc((100% - 100% / var(--hs-n)) * var(--hs-progress) / 100); background: var(--hs-success); }
.hs-step { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .15rem; padding: 0 .2rem; min-width: 0; }
.hs-step-icon { width: 2.1rem; height: 2.1rem; border-radius: 99px; display: flex; align-items: center; justify-content: center; background: var(--hs-surface); border: 2px solid var(--hs-line-strong); color: var(--hs-faint); margin-bottom: .3rem; }
.hs-step-icon svg { width: 1.05rem; height: 1.05rem; }
.hs-step-done .hs-step-icon { background: var(--hs-success); border-color: var(--hs-success); color: #fff; }
.hs-step-now .hs-step-icon { background: var(--hs-accent); border-color: var(--hs-accent); color: var(--hs-on-accent); box-shadow: 0 0 0 5px var(--hs-accent-soft); }
.hs-step-stop .hs-step-icon { background: var(--hs-danger); border-color: var(--hs-danger); color: #fff; }
.hs-step-skip .hs-step-icon { border-style: dashed; }
.hs-step-label { font-size: .78rem; font-weight: 700; color: var(--hs-text); line-height: 1.25; }
.hs-step-todo .hs-step-label, .hs-step-skip .hs-step-label { color: var(--hs-faint); font-weight: 600; }
.hs-step-who { font-size: .74rem; color: var(--hs-text); font-weight: 500; overflow-wrap: anywhere; }
.hs-step-when { font-size: .7rem; color: var(--hs-muted); font-variant-numeric: tabular-nums; }
.hs-step-note { font-size: .7rem; color: var(--hs-muted); line-height: 1.3; overflow-wrap: anywhere; }
.hs-step-now .hs-step-note { color: var(--hs-accent-ink); font-weight: 600; }
@media (max-width: 900px) {
    .hs-journey-steps { grid-template-columns: 1fr; gap: .1rem; }
    .hs-journey-steps::before, .hs-journey-steps::after { display: none; }
    .hs-step { flex-direction: row; flex-wrap: wrap; text-align: start; align-items: center; gap: .1rem .5rem; padding: .35rem 0; }
    .hs-step-icon { margin: 0; width: 1.8rem; height: 1.8rem; }
    .hs-step-label { min-width: 7rem; }
}

/* Sheets: lines as a spreadsheet — thin grid, light head, numbers on the end side. */
.hs-sheet-wrap { overflow-x: auto; border: 1px solid var(--hs-line-strong); border-radius: var(--hs-radius-md); }
.hs-sheet { width: 100%; border-collapse: collapse; font-size: .84rem; }
.hs-sheet th { background: var(--hs-soft); color: var(--hs-muted); font-weight: 600; font-size: .74rem; text-align: start; padding: .5rem .65rem; border-bottom: 1px solid var(--hs-line-strong); white-space: nowrap; }
.hs-sheet td { padding: .5rem .65rem; border-bottom: 1px solid var(--hs-line); vertical-align: middle; }
.hs-sheet th + th, .hs-sheet td + td { border-inline-start: 1px solid var(--hs-line); }
.hs-sheet tbody tr:hover td { background: var(--hs-accent-softer); }
.hs-sheet tbody tr:last-child td { border-bottom: 0; }
.hs-sheet tfoot td { background: var(--hs-soft); border-top: 1px solid var(--hs-line-strong); font-weight: 600; }
.hs-c-no { width: 2.2rem; text-align: center !important; color: var(--hs-faint); font-variant-numeric: tabular-nums; }
.hs-c-num { text-align: end !important; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hs-c-photo { width: 3.6rem; position: relative; }
.hs-c-photo img { width: 2.6rem; height: 2.6rem; object-fit: cover; border-radius: .45rem; border: 1px solid var(--hs-line-strong); display: block; }
.hs-photo-none { width: 2.6rem; height: 2.6rem; border-radius: .45rem; background: var(--hs-soft); color: var(--hs-faint); display: flex; align-items: center; justify-content: center; }
.hs-photo-none svg { width: 1.1rem; height: 1.1rem; }
.hs-photo-more { position: absolute; bottom: .3rem; inset-inline-end: .3rem; font-size: .65rem; font-weight: 700; background: var(--hs-ink); color: var(--hs-surface); border-radius: 99px; padding: 0 .3rem; }
.hs-cell-main { font-weight: 600; color: var(--hs-text); }
.hs-cell-sub { font-size: .76rem; color: var(--hs-muted); }
.hs-cell-link { font-weight: 700; color: var(--hs-accent-ink); }
.hs-cell-link:hover { text-decoration: underline; }
.hs-row-off td { opacity: .55; text-decoration: line-through; }

/* Every table written inside a page entry (the older pages) takes the sheet look too: a frame, a light head row,
   lines between every cell, each value under its heading. */
.fi-in-text table:not(.hs-sheet) { width: 100%; border-collapse: collapse; font-size: .84rem; border: 1px solid var(--hs-line-strong); margin: .25rem 0; }
.fi-in-text table:not(.hs-sheet) th { background: var(--hs-soft); color: var(--hs-muted); font-weight: 600; font-size: .74rem; text-align: start; padding: .5rem .65rem; border: 1px solid var(--hs-line-strong); white-space: nowrap; }
.fi-in-text table:not(.hs-sheet) td { padding: .5rem .65rem; border: 1px solid var(--hs-line); vertical-align: middle; text-align: start; }
.fi-in-text table:not(.hs-sheet) tr:hover td { background: var(--hs-accent-softer); }
.fi-in-text table:not(.hs-sheet) a { font-weight: 700; color: var(--hs-accent-ink); }
.fi-in-text table:not(.hs-sheet) + table:not(.hs-sheet) { margin-top: .9rem; }
.hs-row-off td:last-child { text-decoration: none; opacity: 1; }

/* History: one line per event, newest first. */
.hs-history { display: flex; flex-direction: column; }
.hs-history-row { display: grid; grid-template-columns: 7.5rem auto 1fr auto; align-items: center; gap: .3rem .5rem; padding: .45rem 0; border-bottom: 1px dashed var(--hs-line-strong); font-size: .84rem; }
.hs-history-row:last-child { border-bottom: 0; }
.hs-history-when { color: var(--hs-muted); font-size: .76rem; font-variant-numeric: tabular-nums; }
.hs-history-text { color: var(--hs-text); }
.hs-history-doc { font-size: .72rem; color: var(--hs-faint); font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .hs-history-row { grid-template-columns: auto 1fr; } .hs-history-when { grid-column: 1 / -1; } .hs-history-doc { grid-column: 2; } }

/* Cards of a list page (what is coming, what waits): a title row with chips and buttons, a sheet below. */
.hs-cards { display: flex; flex-direction: column; gap: 1rem; }
.hs-card { background: var(--hs-surface); border-radius: var(--hs-radius); box-shadow: var(--hs-shadow); padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .75rem; }
.hs-card-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; }
.hs-card-title { font-weight: 700; font-size: .95rem; color: var(--hs-text); }
.hs-card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }

/* Entry forms, every department: each line a white card with a thin frame and a light head bar carrying its
   number and its buttons; the fields sit on a tight grid under it. */
.fi-fo-repeater-items { gap: .75rem !important; }
.fi-fo-repeater-item { background: var(--hs-surface) !important; border: 1px solid var(--hs-line-strong) !important; border-radius: var(--hs-radius-md) !important; overflow: hidden; }
.fi-fo-repeater-item-header { background: var(--hs-soft); border-bottom: 1px solid var(--hs-line-strong); padding: .4rem .75rem !important; min-height: 2.4rem; }
.fi-fo-repeater-item-header-label { font-weight: 700; font-size: .8rem; color: var(--hs-text); }
.fi-fo-repeater-item-content { padding: .75rem .9rem !important; border-top: 0 !important; }
.fi-fo-repeater-item .fi-input-wrp { background: var(--hs-soft) !important; }
.fi-fo-repeater-add { margin-top: .75rem; }
.hs-line-form .fi-fo-repeater-item-content { padding: .75rem .9rem !important; }
.hs-line-form .fi-fo-field-wrp-label { font-size: .74rem; }
.hs-line-form .fi-fo-file-upload .filepond--root { min-height: 2.6rem; margin-bottom: 0; }
