/* NextDigital look for both Filament panels: airy, black on white, flat, squared buttons,
   hairline rules instead of boxes. Loaded through ->font() in the panel providers. No build step. */

/* Averta webfonts live in public/fonts/. */
@font-face {
    font-family: 'Averta';
    src: url('../fonts/averta-regular.woff2') format('woff2');
    font-weight: 400 500;
    font-display: swap;
}

@font-face {
    font-family: 'Averta';
    src: url('../fonts/averta-semibold.woff2') format('woff2');
    font-weight: 600 700;
    /* no bold cut: semibold stands in for bold */
    font-display: swap;
}

:root {
    --nd-ink: #0e0e0e;
    --nd-muted: #6b6b6b;
    --nd-line: #e3e3e3;
    --nd-fill: #f2f2f2;

    /* squared (pills and avatars are rounded explicitly below) */
    --radius-xs: 0;
    --radius-sm: 0;
    --radius-md: 0;
    --radius-lg: 0;
    --radius-xl: 0;
    --radius-2xl: 0;
    --radius-3xl: 0;
    --radius-4xl: 0;

    /* black as the accent */
    --primary-400: #3f3f46;
    --primary-500: #18181b;
    --primary-600: #0e0e0e;
    --primary-700: #000;
}

.fi-body {
    background: #fff;
    color: var(--nd-ink);
}

/* ---- top bar: text links, active one underlined ---- */
.fi-topbar {
    box-shadow: none !important;
    border-bottom: 1px solid var(--nd-line);
    min-height: 4.5rem;
}

.fi-topbar-item-icon {
    display: none;
}

/* items fill the bar's height so the active underline sits on the bar's bottom border */
.fi-topbar-nav-groups {
    align-self: stretch;
    align-items: stretch;
    margin-block: 0 -1px;
    gap: 0;
}

.fi-topbar-item {
    display: flex;
}

.fi-topbar-item-btn {
    background: none !important;
    padding: 0 0.25rem;
    margin: 0 0.75rem;
    height: auto;
    border-radius: 0;
    border-block: 2px solid transparent;
    /* top one only balances the underline so the label stays centred */
}

/* same type as .fi-btn */
.fi-topbar-item-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--nd-muted) !important;
}

.fi-topbar-item-btn:hover .fi-topbar-item-label,
.fi-topbar-item.fi-active .fi-topbar-item-label {
    color: var(--nd-ink) !important;
}

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

.fi-avatar {
    border-radius: 9999px !important;
    background: #555 !important;
}

/* ---- page ---- */
.fi-header-heading {
    font-weight: 600;
    letter-spacing: -0.01em;
}

.fi-page-header-main-ctn {
    padding-block: 2.5rem;
    row-gap: 2.5rem;
}

/* ---- tables: no box, hairline rows, small caps headers ---- */
.fi-ta-ctn {
    box-shadow: none !important;
    background: none;
    border-top: 1px solid var(--nd-line);
}

.fi-ta-header,
.fi-ta-header-toolbar {
    padding-inline: 0;
}

.fi-ta-header-heading {
    font-size: 1.125rem;
    font-weight: 600;
}

.fi-ta-table thead,
.fi-ta-table thead tr,
.fi-ta-header-cell {
    background: none !important;
}

.fi-ta-header-cell {
    padding-block: 1.25rem;
}

.fi-ta-header-cell,
.fi-ta-header-cell-sort-btn,
.fi-ta-header-cell>span {
    font-size: 0.6875rem !important;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #3d3d3d !important;
}

.fi-ta-row {
    background: none !important;
}

.fi-ta-table>tbody>tr,
.fi-ta-table>thead>tr {
    border-color: var(--nd-line) !important;
}

.fi-ta-cell>* {
    padding-block: 0.5rem;
}

.fi-ta-text-item {
    font-size: 0.9375rem;
}

.fi-ta-summary-row {
    background: none !important;
}

/* ---- badges: soft pills ---- */
.fi-badge {
    border-radius: 9999px !important;
    box-shadow: none !important;
    padding: 0.25rem 0.75rem;
}

/* ---- buttons: squared, small caps ---- */
.fi-btn {
    border-radius: 0 !important;
    box-shadow: none !important;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    line-height: 1.25rem;
    /* = the loading spinner's height, so the button doesn't grow while loading */
    font-weight: 600;
    padding: 0.9rem 1.5rem;
}

.fi-btn.fi-color-gray,
.fi-btn:not(.fi-color) {
    background: var(--nd-fill);
    color: var(--nd-ink);
}

.fi-btn.fi-color-gray:hover,
.fi-btn:not(.fi-color):hover {
    background: #e6e6e6;
}

/* ---- forms: underlined fields, small caps labels ---- */
.fi-input-wrp {
    border-radius: 0 !important;
    box-shadow: none !important;
    background: none !important;
    border-bottom: 1px solid #c9c9c9;
}

.fi-input-wrp:focus-within {
    border-bottom-color: var(--nd-ink);
}

.fi-input,
.fi-select-input,
.fi-fo-textarea textarea {
    font-size: 1rem;
    padding-inline: 0;
}

/* keep room for the caret (it overlapped the value) */
select.fi-select-input {
    padding-inline-end: 1.75rem;
    background-position: right 0 center;
}

.fi-input-wrp-prefix {
    padding-inline-start: 0;
}

.fi-fo-field-label-content {
    font-size: 0.6875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #3d3d3d;
}

/* ---- boxes that remain: hairline, no shadow ---- */
.fi-section,
.fi-wi-stats-overview-stat {
    box-shadow: none !important;
    border: 1px solid var(--nd-line);
}

.fi-wi-stats-overview .fi-section {
    border: 0;
}

.fi-wi-stats-overview-stat-value {
    font-weight: 600;
}

.fi-modal-window,
.fi-dropdown-panel {
    border-radius: 0 !important;
}

/* ---- relation tabs: underlined like the top nav ---- */
.fi-tabs {
    box-shadow: none !important;
    background: none;
    border-bottom: 1px solid var(--nd-line);
    padding: 0;
    gap: 1.5rem;
}

.fi-tabs-item {
    background: none !important;
    border-radius: 0;
    padding: 0.75rem 0.125rem;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.fi-tabs-item.fi-active {
    border-bottom-color: var(--nd-ink);
}

.fi-tabs-item-label {
    font-size: 1rem;
    color: var(--nd-muted) !important;
}

.fi-tabs-item.fi-active .fi-tabs-item-label {
    color: var(--nd-ink) !important;
}

/* ---- login and password pages: no card, big title ---- */
.fi-simple-main {
    box-shadow: none !important;
    background: none;
}

.fi-simple-header-heading {
    font-size: 1.875rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.fi-simple-main .fi-btn {
    padding-block: 1.125rem;
}

.fi-simple-header {
    margin-bottom: 2rem;
}

.fi-simple-header .fi-logo {
    height: 2.25rem !important;
    margin-bottom: 1.5rem;
}

.fi-input-wrp-suffix,
.fi-input-wrp-prefix,
.fi-input-wrp-actions {
    border: 0 !important;
}

.fi-fo-field-label:has(.fi-checkbox-input) .fi-fo-field-label-content {
    font-size: 0.875rem;
    letter-spacing: 0;
    text-transform: none;
}

.fi-tabs {
    margin-inline: 0 !important;
    width: 100%;
    max-width: none;
    overflow: visible;
    justify-content: flex-start;
}

/* ---- phones: same top bar as desktop, no hamburger/sidebar ---- */
.fi-topbar-start,
.fi-topbar-nav-groups {
    display: flex !important;
}

.fi-topbar-open-sidebar-btn,
.fi-topbar-close-sidebar-btn,
.fi-sidebar,
.fi-sidebar-close-overlay {
    display: none !important;
}

@media (max-width: 1023px) {
    .fi-topbar-start {
        margin-inline-end: 0.5rem;
    }

    .fi-topbar-nav-groups {
        overflow-x: auto;
        scrollbar-width: none;
        margin-inline-start: 0;
    }

    .fi-topbar-item-btn {
        margin: 0 0.5rem;
        white-space: nowrap;
    }
}