/*
 * Offertify — DESIGN.md-rustlaag over het gehele Filament-panel.
 *
 * Filament theme de kleuren al via AdminPanelProvider (accent + statuskleuren,
 * Inter). Deze laag normaliseert vorm en ritme van álle Filament-oppervlakken
 * naar DESIGN.md: één grijsschaal, 6/8px-randen, 12/14/20-typografie, vlakke
 * kaarten, rustige tabellen, zachte focus-ringen en geen schaduw-theater.
 * Kleuren komen uitsluitend uit DESIGN.md §3; het panel is light-only.
 */

:root {
    /* every.to calm palette — warm, muted, no blue/purple.
     * Accent iets dieper dan #C4633A voor meer autoriteit (every.to "warm authority"). */
    --of-accent: #B85C38;
    --of-accent-soft: rgba(184, 92, 56, 0.12);
    --of-text: #1F1D1A;
    --of-muted: #8B8578;
    --of-border: #E8E4DC;
    --of-border-strong: #D4CFC4;
    --of-subtle: #FAF8F5;
    --of-divider: #F0EDE7;
    --of-card: #FFFFFF;
    --of-success: #4A7C59;
    --of-success-soft: rgba(74, 124, 89, 0.12);
    --of-warning: #B8860B;
    --of-warning-soft: rgba(184, 134, 11, 0.12);
    --of-danger: #A84432;
    --of-danger-soft: rgba(168, 68, 50, 0.12);

    /* — Filament-schaal naar DESIGN.md-normen —
     * 12/14/20-typografie: body 14px, tussenkop 16px is niet nodig —
     * Filament-base wordt 14px; 18px-tussenkoppen krimpen mee naar 16px. */
    --radius-xl: 8px;          /* modals en pop-overs: 12 → 8 */
    --text-base: 0.875rem;     /* 16 → 14px leestekst */
    --text-lg: 1rem;           /* 18 → 16px (stats-waarden, subkopjes) */
    --text-xl: 1.25rem;       /* 20px paginakop — blijft 20 */
}

/* — Basis: rustige achtergrond, geen letter-spacing — */

.fi-body {
    background: var(--of-subtle);
    letter-spacing: 0;
    color: var(--of-text);
}

/* every.to: warm cream page background instead of cool gray */
.fi-main {
    background: var(--of-subtle);
}

/* — Typografie: 12/14/20, sectiekoppen 14px/600 (DESIGN.md §4) — */

.fi-header-heading,
.fi-ta-header-heading,
.fi-simple-header-heading {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0;
    color: var(--of-text);
}

.fi-header-subheading,
.fi-simple-header-subheading {
    font-size: 14px;
    color: var(--of-muted);
}

.fi-section-header-heading,
.fi-modal-heading {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0;
    color: var(--of-text);
}

.fi-section-header-description,
.fi-modal-description {
    font-size: 12px;
    color: var(--of-muted);
}

/* Formulierveld-labels: 12px steungrijs, nooit gecapitaliseerd */
.fi-fo-field-label,
.fi-fieldset-label {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--of-muted);
}

.fi-fo-field-label-required-mark {
    color: var(--of-danger);
}

/* Infolist (ViewQuote/ViewInvoice): label 12px muted, tekst 14px */
.fi-in-entry-label,
.fi-in-key-value .fi-in-entry-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--of-muted);
}

.fi-in-text,
.fi-in-entry-content {
    font-size: 14px;
    color: var(--of-text);
}

/* Kruimelpad en paginering: meta-informatie is 12px muted */
.fi-breadcrumbs,
.fi-pagination-overview {
    font-size: 12px;
    color: var(--of-muted);
}

/* — Kaarten en secties: vlak, 1px-rand, radius 8 — */

.fi-section,
.fi-ta-panel,
.fi-filament-info-widget,
.fi-callout,
.fi-fieldset {
    background: var(--of-card);
    border: 1px solid var(--of-border);
    border-radius: 8px;
    box-shadow: none;
}

.fi-section-header {
    border-bottom: 1px solid var(--of-border);
    padding: 12px 16px;
}

.fi-section-content {
    padding: 16px;
}

/* — Knoppen: radius 6, geen pill-vorm, secundair = wit met rand — */

.fi-btn,
.fi-icon-btn,
.fi-pagination-item-btn,
.fi-sidebar-item-btn,
.fi-sidebar-group-btn,
.fi-topbar-item-btn,
.fi-tabs-item {
    border-radius: 6px;
}

.fi-btn {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0;
}

/* Filaments grijze (secundaire) knoppen: wit vlak met dunne rand
 * in plaats van gevuld grijs — zoals de secundaire knop in DESIGN.md. */
.fi-btn.bg-gray-50 {
    background-color: var(--of-card);
    border: 1px solid var(--of-border);
    color: var(--of-text);
}

.fi-btn.bg-gray-50:hover {
    background-color: var(--of-subtle);
    border-color: var(--of-border-strong);
}

/* Zachte focus-ring overal hetzelfde: accentkleur, 3px, geen harde rand */
.fi-btn:focus-visible,
.fi-icon-btn:focus-visible,
.fi-link:focus-visible,
.fi-pagination-item-btn:focus-visible,
.fi-sidebar-item-btn:focus-visible,
.fi-topbar-item-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--of-accent-soft);
}

/* — Invoer: rustige rand, accent-focus met zachte ring — */

.fi-input-wrp,
.fi-select-input-ctn,
.fi-fo-textarea-wrp,
.fi-fo-select-wrp,
.fi-fo-rich-editor-main,
.fi-fo-checkbox-list-search-input-wrp {
    border-radius: 6px;
    border-color: var(--of-border-strong);
}

.fi-input-wrp:focus-within,
.fi-select-input-ctn:focus-within,
.fi-fo-textarea-wrp:focus-within,
.fi-fo-rich-editor-main:focus-within {
    border-color: var(--of-accent);
    box-shadow: 0 0 0 3px var(--of-accent-soft);
}

/* Rich editor: werkbalk is wit met een dunne scheidingslijst */
.fi-fo-rich-editor-toolbar {
    background-color: var(--of-card);
    border-bottom: 1px solid var(--of-border);
}

/* — Tabellen: dunne koppen, lichte rijdeling, tabular-cijfers — */

.fi-ta-header {
    background: var(--of-card);
}

.fi-ta-header-cell {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
    color: var(--of-muted);
}

/* every.to: spacious table rows — more breathing room */
.fi-ta-cell {
    padding: 16px 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--of-divider);
}

.fi-ta-header-cell {
    padding: 12px 16px;
}

/* every.to: table container is a clean card with more padding */
.fi-ta-content {
    border-radius: 8px;
}

/* every.to: larger, more readable record titles in tables */
.fi-ta-text {
    font-size: 14px;
}

/* every.to: more space between filter chips and search */
.fi-ta-filters {
    gap: 8px;
}

/* every.to: pagination with more breathing room */
.fi-pagination {
    padding: 12px 16px;
}

.fi-ta-text {
    font-variant-numeric: tabular-nums;
}

/* every.to: table row hover — subtiele achtergrond + zachte overgang */
.fi-ta-record .fi-ta-cell {
    transition: background-color 150ms ease;
}

.fi-ta-record:hover .fi-ta-cell {
    background: var(--of-subtle);
}

/* — Badges: 6px-randen (geen pill), 12px/500 — */

.fi-badge {
    font-size: 12px;
    font-weight: 500;
    border-radius: 6px;
    padding-inline: 8px;
    padding-block: 2px;
}

/* — Dropdowns, modals en panelen: zelfde ronding, rand en zachte schaduw — */

.fi-dropdown-panel,
.fi-modal-window,
.fi-fo-date-time-picker-panel {
    border: 1px solid var(--of-border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
}

.fi-modal-header {
    border-bottom: 1px solid var(--of-border);
}

.fi-modal-footer {
    border-top: 1px solid var(--of-border);
}

.fi-dropdown-list-item {
    font-size: 14px;
}

/* — Zijbalk en bovenbalk: warme vlakken met dunne scheidingslijnen — */

.fi-sidebar,
.fi-topbar {
    background: var(--of-card);
    letter-spacing: 0;
}

/* every.to: sidebar items with more breathing room */
.fi-sidebar-item-btn {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    /* Subtiele hover-animatie: linkerrand accent (every.to micro-interactie) */
    position: relative;
    transition: background-color 150ms ease, padding-left 150ms ease;
}

.fi-sidebar-item-btn::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 2px;
    height: 60%;
    background: var(--of-accent);
    border-radius: 0 2px 2px 0;
    transition: transform 150ms ease;
}

.fi-sidebar-item-btn:hover {
    background: var(--of-subtle);
}

.fi-sidebar-item-btn:hover::before {
    transform: translateY(-50%) scaleY(1);
}

/* — every.to: "Nieuw voorstel" knop bovenaan de sidebar — */
.fi-sidebar-new-btn-ctn {
    padding: 8px 12px 16px;
}

.fi-sidebar-new-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    background: var(--of-accent);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 150ms ease, transform 100ms ease;
}

.fi-sidebar-new-btn:hover {
    background: #A8502E;
}

.fi-sidebar-new-btn:active {
    transform: scale(0.98);
}

.fi-sidebar-new-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--of-accent-soft);
}

.fi-sidebar-new-btn-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* In collapsed sidebar: alleen het plus-icoon tonen */
.fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-new-btn-label {
    display: none;
}

.fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-new-btn {
    padding: 10px;
    justify-content: center;
}

/* — every.to: Focus mode (verberg sidebar) — */
body.fi-focus-mode .fi-sidebar {
    margin-left: -280px;
    transition: margin-left 200ms ease;
}

body.fi-focus-mode .fi-main {
    margin-left: 0 !important;
    transition: margin-left 200ms ease;
}

/* Focus mode toggle knop in de topbar */
.fi-focus-mode-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--of-muted);
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 150ms ease, color 150ms ease;
}

.fi-focus-mode-toggle:hover {
    background: var(--of-subtle);
    color: var(--of-text);
}

.fi-focus-mode-toggle[aria-pressed="true"] {
    background: var(--of-accent-soft);
    color: var(--of-accent);
}

.fi-focus-mode-toggle svg {
    width: 18px;
    height: 18px;
}

/* every.to: active sidebar item uses accent color, not Filament default */
.fi-sidebar-item-active {
    background: var(--of-accent-soft) !important;
    color: var(--of-accent) !important;
}

.fi-sidebar-item-active .fi-sidebar-item-icon {
    color: var(--of-accent) !important;
}

/* every.to: navigation group labels are small, muted, uppercase-feeling */
.fi-sidebar-group-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--of-muted);
    padding: 16px 12px 4px;
}

.fi-sidebar-group-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
    color: var(--of-muted);
}

.fi-topbar {
    border-bottom: 1px solid var(--of-border);
}

.fi-sidebar-header {
    border-bottom: 1px solid var(--of-divider);
}

/* — Tabs: rustige items; de actieve status kleurt Filament met het accent — */

.fi-tabs-item {
    font-size: 14px;
    font-weight: 500;
    color: var(--of-muted);
}

.fi-tabs-item:hover {
    color: var(--of-text);
    background: var(--of-subtle);
}

/* — Lege staten: subtiel icoonvlak, 14/600-kop, 12px-meldtekst — */

.fi-empty-state-icon-bg {
    background: var(--of-subtle);
    border-radius: 8px;
}

.fi-empty-state-heading {
    font-size: 14px;
    font-weight: 600;
    color: var(--of-text);
}

.fi-empty-state-description {
    font-size: 12px;
    color: var(--of-muted);
}

/* — Repeaters (contactpersonen, regelgroepen): witte kaartjes met rand — */

.fi-fo-repeater-item,
.fi-fo-builder-item-has-header,
.fi-fo-simple-repeater-item {
    background: var(--of-card);
    border: 1px solid var(--of-border);
    border-radius: 8px;
    box-shadow: none;
}

.fi-fo-repeater-item-header,
.fi-fo-builder-item-header {
    border-bottom: 1px solid var(--of-divider);
}

/* — Bestandsupload (logo): afgeronde sierlijst-rand — */

.fi-fo-file-upload {
    border-radius: 8px;
}

/* — Checkbox- en keuzelijsten in filters/modals — */

.fi-fo-checkbox-list-option,
.fi-fo-modal-table-select {
    border-radius: 6px;
}

/* — Pipeline Weather widget — */

.q-weather {
    background: var(--of-surface, #FFFFFF);
    border: 1px solid var(--of-divider, #E8E4DD);
    border-radius: 10px;
    padding: 14px 18px;
    cursor: pointer;
    user-select: none;
    transition: border-color 0.15s ease;
}

.q-weather:hover {
    border-color: var(--weather-color, #C4633A);
}

.q-weather__main {
    display: flex;
    align-items: center;
    gap: 14px;
}

.q-weather__emoji {
    font-size: 28px;
    line-height: 1;
}

.q-weather__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.q-weather__label {
    font-size: 14px;
    font-weight: 600;
    color: var(--weather-color, #C4633A);
}

.q-weather__summary {
    font-size: 13px;
    color: var(--of-text-muted, #6B6558);
}

.q-weather__chevron {
    color: var(--of-text-muted, #6B6558);
    transition: transform 0.2s ease;
    display: flex;
    align-items: center;
}

.q-weather__chevron svg {
    width: 16px;
    height: 16px;
}

.q-weather__chevron--open {
    transform: rotate(180deg);
}

.q-weather__details {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--of-divider, #E8E4DD);
}

.q-weather__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.q-weather__stat {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    background: var(--of-bg, #FAF8F5);
    color: var(--of-text-muted, #6B6558);
    border: 1px solid var(--of-divider, #E8E4DD);
}

.q-weather__stat strong {
    margin-right: 4px;
    color: var(--of-text, #2D2A26);
}

.q-weather__stat--good {
    background: #EDF5EF;
    color: #4A7C59;
    border-color: #C5DCC9;
}

.q-weather__stat--warn {
    background: #FDF6E8;
    color: #B8860B;
    border-color: #EBDDB8;
}

.q-weather__stat--bad {
    background: #FBEDEA;
    color: #A84432;
    border-color: #EBC5BE;
}

.q-weather__tips {
    margin: 0;
    padding: 0 0 0 18px;
    font-size: 13px;
    color: var(--of-text-muted, #6B6558);
    line-height: 1.7;
}

.q-weather__tips li::marker {
    color: var(--weather-color, #C4633A);
}
