/* Fillo design system v3 · components. White, air, black pills, lime = filled, glass floats.
   Sizes from RULES.md: 44 px targets 8 px apart, 24 px card padding, one radius ladder, type roles only. */
@layer f.components {
/* Mark */
/* The mark, exactly the live logo (mark.svg, viewBox 43 x 48): three ink rects 20 x 14 with radius 4, 3 apart, and a lime rect 19 x 14
   top right, 4 to the side. --b is the ink rect's width; everything else follows those ratios. The same geometry as an SVG symbol: icons.svg#fillo-mark. */
.f-mark { display: inline-grid; grid-template-columns: auto auto; gap: calc(var(--b) * .15) calc(var(--b) * .2); align-items: start; --b: .9em; }
.f-mark i { display: block; width: var(--b); height: calc(var(--b) * .7); background: var(--f-text); border-radius: calc(var(--b) * .2); }
.f-mark i.l { background: var(--f-lime); width: calc(var(--b) * .95); transition: transform var(--f-dur-base) var(--f-spring); }
.f-logo:hover .f-mark i.l { transform: translateY(-2px); }   /* the lime block is alive: it lifts when you reach the logo */
.f-mark i:nth-child(3), .f-mark i:nth-child(4) { grid-column: 1; }
.f-wordmark { font: 800 1.5rem/1 var(--f-font-display); letter-spacing: -.03em; }
.f-logo { display: inline-flex; align-items: center; gap: .5em; font-size: 1rem; min-height: var(--f-target-min); }

/* Buttons: radius = 0.28 x height. 44 is the hit region (Apple), 40 in bars (Material), 32 only in dense app UI. */
.f-btn { --f-control-h: 44px; display: inline-flex; align-items: center; justify-content: center; gap: var(--f-gap-el); height: var(--f-control-h); padding: 0 var(--f-space-6);
  border-radius: var(--f-r-control); font: var(--f-btn-text); border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform var(--f-dur-base) var(--f-ease-out), box-shadow var(--f-dur-base) var(--f-ease-out), background var(--f-dur-base); }
.f-btn--primary { background: var(--f-btn-primary-bg); color: var(--f-btn-primary-text); }
.f-btn--primary:hover { transform: translateY(-1px); box-shadow: var(--f-shadow-soft); }
.f-btn--primary:active { transform: translateY(0) scale(.97); box-shadow: none; }
.f-btn--secondary { background: var(--f-surface); border-color: var(--f-text); color: var(--f-text); }
.f-btn--secondary:hover { background: var(--f-surface-2); transform: translateY(-1px); }
.f-btn--glass { background: var(--f-glass); backdrop-filter: blur(var(--f-glass-blur)); -webkit-backdrop-filter: blur(var(--f-glass-blur)); border: var(--f-glass-edge); box-shadow: var(--f-shadow-soft); }
.f-btn--pill { border-radius: var(--f-r-pill); }
.f-btn--md { --f-control-h: 40px; padding: 0 var(--f-space-4); font-size: .875rem; }
.f-btn--sm { --f-control-h: 32px; min-width: 44px; padding: 0 var(--f-space-3); font-size: .8125rem; }
.f-btn--lg { --f-control-h: 52px; padding: 0 var(--f-space-8); font-size: 1rem; }
.f-btn[disabled] { background: var(--f-surface-2); color: var(--f-text-muted); border-color: transparent; pointer-events: none; }
.f-btn .f-arrow { width: 16px; height: 16px; transition: transform var(--f-dur-base) var(--f-ease-out); }
.f-btn:hover .f-arrow { transform: translateX(4px); }
@media (max-width: 360px) { .f-btn:not(.f-btn--icon) { white-space: normal; height: auto; min-height: var(--f-control-h); padding-block: var(--f-space-2); text-align: center; } }
.f-btn:active { transform: scale(.97); transition-duration: 80ms; }   /* the press: quick in, 180 ms back */
.f-btn--icon { width: var(--f-control-h); padding: 0; border-radius: 50%; background: var(--f-surface); border-color: var(--f-border); }
.f-btn--icon:hover { border-color: var(--f-text); transform: translateY(-1px); }
.f-btn--icon.f-btn--sm { position: relative; min-width: 0; } .f-btn--icon.f-btn--sm::before { content: ""; position: absolute; inset: -6px; }   /* 32 to see, 44 to touch */
.f-btn--ghost { background: transparent; color: var(--f-text); }
.f-btn--ghost:hover { background: var(--f-surface-2); }
.f-btn--danger { background: var(--f-danger-bg); color: var(--f-danger); border-color: var(--f-danger-line); }
.f-btn--danger:hover { border-color: var(--f-danger); }
.f-btn.is-loading { pointer-events: none; color: transparent; position: relative; }
.f-btn.is-loading::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--f-border); border-color: color-mix(in srgb, var(--f-spin, var(--f-text)) 30%, transparent); border-top-color: var(--f-spin, var(--f-text)); animation: f-spin 800ms linear infinite; }
.f-btn--primary { --f-spin: var(--f-btn-primary-text); } .f-btn--danger { --f-spin: var(--f-danger); }
/* documentation state helpers: mirror the pseudo states so a catalogue can show them side by side */
.f-btn--primary.is-hover { transform: translateY(-1px); box-shadow: var(--f-shadow-soft); }
.f-btn--secondary.is-hover { background: var(--f-surface-2); transform: translateY(-1px); } .f-btn--ghost.is-hover { background: var(--f-surface-2); } .f-btn--danger.is-hover { border-color: var(--f-danger); }
.f-btn.is-focus, .f-input.is-focus, .f-select.is-focus { outline: 2px solid var(--f-focus); outline-offset: 3px; }
.f-btn.is-active { transform: scale(.97); box-shadow: none; }

/* Status chips (not targets) */
.f-chip { display: inline-flex; align-items: center; gap: var(--f-gap-el); height: 32px; padding: 0 var(--f-space-3); border-radius: var(--f-r-chip); font: var(--f-label);
  background: var(--f-open-bg); border: 1px solid var(--f-open-line); color: var(--f-text); white-space: nowrap; }
.f-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; box-sizing: border-box; border: 1.5px solid var(--f-ink-30); }  /* open = a ring */
.f-chip--booked::before, .f-chip--filled::before, .f-chip--peak::before, .f-chip--ok::before, .f-chip--warn::before, .f-chip--danger::before { border: 0; }
.f-chip--booked { background: var(--f-booked-bg); border-color: var(--f-booked-line); }
.f-chip--booked::before { background: var(--f-ink-30); }
.f-chip--filled { background: var(--f-filled-bg); border-color: var(--f-filled-bg); color: var(--f-filled-text); }
.f-chip--filled::before { background: var(--f-ink); }
.f-chip--peak { background: var(--f-peak-stripe); }
.f-chip--ok { background: var(--f-ok-bg); border-color: var(--f-ok-bg); color: var(--f-ok); } .f-chip--ok::before { background: var(--f-ok); }
.f-chip--warn { background: var(--f-warn-bg); border-color: var(--f-warn-bg); color: var(--f-warn); } .f-chip--warn::before { background: var(--f-warn); }
.f-chip--danger { background: var(--f-danger-bg); border-color: var(--f-danger-line); color: var(--f-danger); } .f-chip--danger::before { background: var(--f-danger); }
.f-chip--sm { height: 24px; padding: 0 var(--f-space-2); font-size: .75rem; border-radius: var(--f-r-xs); gap: var(--f-space-1); }
.f-chip--sm::before { width: 6px; height: 6px; }
/* a chip as a filter button: hover outlines, pressed is ink with an ink dot */
button.f-chip { cursor: pointer; transition: border-color var(--f-dur-fast), background var(--f-dur-fast), color var(--f-dur-fast), transform var(--f-dur-fast); }
button.f-chip:hover { border-color: var(--f-text); }
button.f-chip:active { transform: scale(.96); }
button.f-chip[aria-pressed="true"] { background: var(--f-text); border-color: var(--f-text); color: var(--f-bg); }
button.f-chip[aria-pressed="true"]::before { background: var(--f-text); border: 0; }

/* Slot cells */
.f-cell { display: inline-flex; align-items: center; justify-content: center; height: 32px; min-width: 64px; padding: 0 var(--f-space-3); border-radius: var(--f-r-chip);
  background: var(--f-open-bg); border: 1px solid var(--f-open-line); font: var(--f-data); font-variant-numeric: tabular-nums; }
.f-cell--booked { background: var(--f-booked-bg); border-color: var(--f-booked-line); }
.f-cell--filled { background: var(--f-filled-bg); border-color: var(--f-filled-bg); color: var(--f-filled-text); font-weight: 700; }
.f-cell--peak { background: var(--f-peak-stripe); }

/* Cards and glass: 24 px padding, 24 px radius */
.f-card { background: var(--f-surface); border: 1px solid var(--f-border); border-radius: var(--f-r-card); padding: var(--f-space-6); }
.f-card--lift { border-color: transparent; box-shadow: var(--f-shadow-soft); }
.f-card--cloud { background: var(--f-surface-2); border-color: var(--f-surface-2); }
.f-card--link { cursor: pointer; transition: transform var(--f-dur-base) var(--f-ease-out), box-shadow var(--f-dur-base) var(--f-ease-out), border-color var(--f-dur-base); }
.f-card--link:hover { transform: translateY(-2px); box-shadow: var(--f-shadow-soft); border-color: transparent; }
.f-card--link:active { transform: translateY(0) scale(.99); box-shadow: var(--f-contact); transition-duration: 80ms; }
.f-glass { background: var(--f-glass); backdrop-filter: blur(var(--f-glass-blur)) saturate(1.1); -webkit-backdrop-filter: blur(var(--f-glass-blur)) saturate(1.1);
  border: var(--f-glass-edge); border-radius: var(--f-r-card); box-shadow: var(--f-shadow-soft); }

/* Photo card with floating glass layers */
.f-photo { position: relative; border-radius: var(--f-r-card); overflow: hidden; background: var(--f-surface-2); isolation: isolate; }
.f-photo > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.f-photo .f-photo__layer { position: absolute; }   /* two classes: beats the glass material, which positions itself */

/* Schedule card rows */
.f-sched { display: grid; gap: var(--f-gap-el); }
.f-sched__row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: var(--f-space-3); font: var(--f-data); color: var(--f-text-muted); }
.f-sched__row b { color: var(--f-text); font-weight: 400; }

/* Data line */
.f-chart { width: 100%; height: auto; display: block; }
.f-chart__line { fill: none; stroke: var(--f-text); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.f-chart__area { fill: var(--f-lime); opacity: .9; }

/* Nav pill: 56 tall, links are 40 px boxes, the 40 px button sits 8 px inside the pill (concentric) */
.f-nav { display: flex; align-items: center; gap: var(--f-space-6); height: 56px; padding: 0 var(--f-space-2) 0 var(--f-space-6); border-radius: var(--f-r-pill); }
.f-nav__links { display: flex; gap: var(--f-space-1); margin-left: auto; }
.f-nav__links a { display: inline-flex; align-items: center; height: var(--f-control-h-md); padding: 0 var(--f-space-3); border-radius: var(--f-r-md); font: var(--f-label); opacity: .78;
  transition: opacity var(--f-dur-fast), background var(--f-dur-fast), transform 80ms; }
.f-nav__links a:hover { opacity: 1; background: var(--f-surface-2); }
.f-nav__links a:active { transform: scale(.97); }
.f-nav__links a[aria-current] { opacity: 1; background: var(--f-surface-2); }
@media (max-width: 920px) { .f-nav__links a:not(:last-child) { display: none; } }
@media (max-width: 560px) { .f-nav { gap: var(--f-space-3); padding-left: var(--f-space-4); } .f-nav__links { display: none; } }

/* Slider */
.f-slider { display: grid; grid-template-columns: var(--f-control-h) 1fr var(--f-control-h); align-items: center; gap: var(--f-space-4); }
.f-slider__track { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: var(--f-space-4); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px; margin: -4px; }
.f-slider__track::-webkit-scrollbar { display: none; }
.f-tile { position: relative; aspect-ratio: 4 / 3; border-radius: var(--f-r-media); overflow: hidden; background: var(--f-surface-2); scroll-snap-align: start; }
.f-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--f-dur-slow) var(--f-ease-out); }
.f-tile:hover img { transform: scale(1.03); }
.f-tile__label { position: absolute; left: var(--f-space-3); bottom: var(--f-space-3); height: 28px; padding: 0 var(--f-space-3); display: inline-flex; align-items: center; border-radius: var(--f-r-sm);
  background: var(--f-glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: var(--f-glass-edge); font: var(--f-eyebrow); color: var(--f-text); }

/* Proof line and eyebrow: prose is Manrope, mono is for numbers */
.f-proof { font: var(--f-small); color: var(--f-text-muted); }
.f-eyebrow { font: var(--f-eyebrow); letter-spacing: .02em; color: var(--f-text-muted); }

/* The one hand-drawn mark: an SVG stroke drawn once */
.f-handmark { position: relative; display: inline-block; }
.f-handmark svg { position: absolute; left: -9%; top: -22%; width: 118%; max-width: none; height: 144%; overflow: visible; pointer-events: none; }
.f-handmark path { fill: none; stroke: var(--f-text); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 320; stroke-dashoffset: 320; }


/* Toast */
.f-toast { display: inline-flex; align-items: center; gap: var(--f-space-3); padding: var(--f-space-3) var(--f-space-4) var(--f-space-3) var(--f-space-3); border-radius: var(--f-r-md); background: var(--f-surface); box-shadow: var(--f-shadow-soft); font: var(--f-label); }
.f-toast--ok { color: var(--f-ok); } .f-toast--warn { color: var(--f-warn); } .f-toast--danger { color: var(--f-danger); background: var(--f-danger-bg); }
.f-toast .f-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }

/* Forms: label 8 field, fields 24 apart (RULES.md 8) */
.f-field { display: grid; gap: var(--f-gap-el); align-content: start; }
.f-field > label { font: var(--f-label); display: flex; justify-content: space-between; gap: var(--f-space-3); align-items: baseline; }
.f-field > label .f-hint { font: var(--f-small); color: var(--f-text-muted); font-weight: 500; }
.f-input, .f-select, .f-textarea { width: 100%; height: var(--f-control-h); border-radius: var(--f-r-md); border: 1px solid var(--f-border); padding: 0 var(--f-space-4); background: var(--f-surface); color: var(--f-text); font: var(--f-body);
  transition: border-color var(--f-dur-fast), box-shadow var(--f-dur-fast); }
.f-input::placeholder, .f-textarea::placeholder { color: var(--f-ink-30); }
.f-input:hover, .f-select:hover, .f-textarea:hover { border-color: var(--f-ink-30); }
.f-input:focus, .f-select:focus, .f-textarea:focus { outline: none; border-color: var(--f-text); box-shadow: 0 0 0 3px rgba(17,17,17,.08); }
.f-textarea { height: auto; min-height: 112px; padding: var(--f-space-3) var(--f-space-4); resize: vertical; }
.f-help { font: var(--f-small); color: var(--f-text-muted); }
.f-error { font: var(--f-small); color: var(--f-danger); }
.f-field.is-invalid .f-input, .f-field.is-invalid .f-select, .f-field.is-invalid .f-textarea, .f-input.is-invalid { border-color: var(--f-danger); }
.f-input[disabled], .f-select[disabled], .f-textarea[disabled] { background: var(--f-surface-2); color: var(--f-text-muted); border-color: transparent; }
.f-search { position: relative; }
.f-search svg { position: absolute; left: var(--f-space-4); top: 50%; translate: 0 -50%; width: 16px; height: 16px; color: var(--f-text-muted); pointer-events: none; }
.f-search .f-input { padding-left: 40px; }
.f-range { width: 100%; height: 24px; margin: 0; accent-color: var(--f-text); }
.f-switch { position: relative; display: inline-flex; align-items: center; gap: var(--f-space-3); min-height: var(--f-target-min); cursor: pointer; font: var(--f-body); }
.f-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.f-switch i { width: 44px; height: 24px; border-radius: var(--f-r-pill); background: var(--f-ink-30); position: relative; flex: none; transition: background var(--f-dur-base); }
.f-switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--f-bg); box-shadow: var(--f-contact); transition: transform var(--f-dur-base) var(--f-spring), width var(--f-dur-fast) var(--f-ease-out); }
.f-switch:hover input:not(:checked) + i { background: var(--f-ink-60); }
.f-switch:active i::after { width: 26px; }   /* the knob stretches while held, like a drop of liquid */
.f-switch input:checked:active + i::after { transform: translateX(14px); }
.f-switch input:checked + i { background: var(--f-text); }
.f-switch input:checked + i::after { transform: translateX(20px); }
.f-switch input:focus-visible + i { outline: 2px solid var(--f-focus); outline-offset: 3px; }
.f-switch input[disabled] + i { opacity: .4; }
.f-check, .f-radio { display: inline-flex; align-items: center; gap: var(--f-space-3); min-height: var(--f-target-min); cursor: pointer; font: var(--f-body); }
.f-check input, .f-radio input { width: 20px; height: 20px; margin: 0; accent-color: var(--f-text); }

/* Segmented control and tabs */
.f-seg { display: inline-flex; width: fit-content; padding: 4px; gap: 4px; border-radius: var(--f-r-md); background: var(--f-surface-2); }
.f-seg button { height: 36px; padding: 0 var(--f-space-4); border: 0; border-radius: 9px; background: transparent; font: var(--f-label); color: var(--f-text-muted); cursor: pointer; transition: background var(--f-dur-fast), color var(--f-dur-fast); }
.f-seg button:hover { color: var(--f-text); }
.f-seg button[aria-pressed="true"] { background: var(--f-surface); color: var(--f-text); box-shadow: var(--f-contact); }
.f-tabs { display: flex; gap: var(--f-space-1); border-bottom: 1px solid var(--f-border); }
.f-tabs button { height: var(--f-target-min); padding: 0 var(--f-space-3); border: 0; background: none; font: var(--f-label); color: var(--f-text-muted); cursor: pointer; position: relative; transition: color var(--f-dur-fast); }
.f-tabs button:hover { color: var(--f-text); }
.f-tabs button[aria-selected="true"] { color: var(--f-text); }
.f-tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: var(--f-space-3); right: var(--f-space-3); bottom: -1px; height: 2px; background: var(--f-text); }

/* Table: 56 px rows, hover wash, selected = the wash with an ink mark */
.f-table { width: 100%; border-collapse: separate; border-spacing: 0; font: var(--f-body); }
.f-table th { text-align: left; font: var(--f-label); color: var(--f-text-muted); padding: 0 var(--f-space-3) var(--f-space-3); border-bottom: 1px solid var(--f-border); }
.f-table td { padding: var(--f-space-3); height: 56px; border-bottom: 1px solid var(--f-border); vertical-align: middle; }
.f-table tbody tr { transition: background var(--f-dur-fast); }
.f-table tbody tr:hover td { background: var(--f-surface-2); }
.f-table td:first-child { white-space: nowrap; }
.f-table tr.is-selected td { background: var(--f-surface-2); }
.f-table tr.is-selected td:first-child { box-shadow: inset 2px 0 0 var(--f-text); }
.f-table .num { font: var(--f-data); text-align: right; white-space: nowrap; }

/* KPI tile, avatar, badge */
.f-kpi { display: grid; gap: var(--f-space-2); padding: var(--f-space-6); border-radius: var(--f-r-card); background: var(--f-surface); border: 1px solid var(--f-border); }
.f-kpi__label { font: var(--f-label); color: var(--f-text-muted); }
.f-kpi__value { font: 400 2rem/1 var(--f-font-data); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.f-kpi__delta { font: var(--f-small); color: var(--f-text-muted); }
.f-kpi__delta.up { color: var(--f-ok); } .f-kpi__delta.down { color: var(--f-danger); }
.f-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--f-surface-2); color: var(--f-text); font: var(--f-label); display: inline-grid; place-items: center; overflow: hidden; flex: none; }
.f-avatar img { width: 100%; height: 100%; object-fit: cover; }
.f-avatar--sm { width: 32px; height: 32px; font-size: .75rem; } .f-avatar--lg { width: 56px; height: 56px; font-size: 1.125rem; }
.f-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 var(--f-space-1); border-radius: var(--f-r-pill); background: var(--f-text); color: var(--f-bg); font: 700 .75rem/1 var(--f-font-display); }
.f-badge--lime { padding: 0 var(--f-space-2); background: var(--f-lime); color: var(--f-ink); }

/* Banner, tooltip */
.f-banner { display: flex; gap: var(--f-space-3); align-items: flex-start; padding: var(--f-space-3) var(--f-space-4); border-radius: var(--f-r-md); border: 1px solid var(--f-border); background: var(--f-surface-2); font: var(--f-small); color: var(--f-text); }
.f-banner--ok { background: var(--f-ok-bg); border-color: transparent; color: var(--f-ok); }
.f-banner--warn { background: var(--f-warn-bg); border-color: transparent; color: var(--f-warn); }
.f-banner--danger { background: var(--f-danger-bg); border-color: var(--f-danger-line); color: var(--f-danger); }
.f-tip { position: relative; }
.f-tip::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translate(-50%, 4px); padding: var(--f-space-1) var(--f-space-2); border-radius: 8px; background: var(--f-text); color: var(--f-bg); font: var(--f-small); white-space: nowrap; opacity: 0; pointer-events: none; z-index: 5;
  transition: opacity var(--f-dur-fast), transform var(--f-dur-fast) var(--f-ease-out); }
.f-tip:hover::after, .f-tip:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 560px) { .f-tip::after { left: 0; width: max-content; max-width: min(240px, calc(100vw - 48px)); white-space: normal; transform: translateY(4px); } .f-tip:hover::after, .f-tip:focus-visible::after { transform: none; } }

/* Modal and drawer, over a scrim */
.f-scrim { position: fixed; inset: 0; background: var(--f-scrim); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: opacity var(--f-dur-base); z-index: 50; }
.f-scrim.is-open { opacity: 1; pointer-events: auto; }
.f-modal { position: fixed; left: 50%; top: 50%; width: min(100% - 32px, 480px); transform: translate(-50%, calc(-50% + 16px)); background: var(--f-surface); border-radius: var(--f-r-card); padding: var(--f-space-6); box-shadow: var(--f-shadow-lift); opacity: 0; pointer-events: none; z-index: 51;
  visibility: hidden; transition: opacity var(--f-dur-base), transform var(--f-dur-base) var(--f-ease-out), visibility var(--f-dur-base); }
.f-modal.is-open { visibility: visible; transition: opacity var(--f-dur-base), transform var(--f-dur-base) var(--f-ease-out), visibility 0s; opacity: 1; pointer-events: auto; transform: translate(-50%, -50%); }
.f-drawer { position: fixed; top: 16px; right: 16px; bottom: 16px; width: min(100% - 32px, 420px); background: var(--f-surface); border-radius: var(--f-r-card); padding: var(--f-space-6); box-shadow: var(--f-shadow-lift); transform: translateX(calc(100% + 32px)); z-index: 51; overflow: auto;
  visibility: hidden; transition: transform var(--f-dur-slow) var(--f-ease-out), visibility var(--f-dur-slow); }
.f-drawer.is-open { visibility: visible; transition: transform var(--f-dur-slow) var(--f-ease-out), visibility 0s; transform: none; }
.f-modal__head, .f-drawer__head { display: flex; align-items: center; justify-content: space-between; gap: var(--f-space-4); margin-bottom: var(--f-space-4); }
.f-modal__actions { display: flex; justify-content: flex-end; gap: var(--f-space-3); margin-top: var(--f-space-6); }

/* Empty state (Fillo may live here), skeletons and loaders */
.f-empty { min-width: 0; max-width: 100%; display: grid; justify-items: center; text-align: center; gap: var(--f-space-3); padding: var(--f-space-12) var(--f-space-6); border-radius: var(--f-r-card); border: 1px dashed var(--f-border); }
.f-empty p { max-width: 36ch; color: var(--f-text-muted); }
.f-skeleton { position: relative; overflow: hidden; background: var(--f-skeleton); border-radius: var(--f-r-sm); min-height: 16px; }
.f-skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, var(--f-skeleton-hi), transparent); animation: f-shimmer 1.4s var(--f-ease-move) infinite; }
.f-skeleton--text { height: 16px; } .f-skeleton--title { height: 24px; width: 60%; } .f-skeleton--avatar { width: 40px; height: 40px; border-radius: 50%; } .f-skeleton--card { height: 120px; border-radius: var(--f-r-card); }
.f-dots { display: inline-flex; gap: var(--f-space-1); align-items: center; height: 24px; }
.f-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--f-ink-30); animation: f-dots 900ms ease-in-out infinite; }
.f-dots i:nth-child(2) { animation-delay: 150ms; } .f-dots i:nth-child(3) { animation-delay: 300ms; }
.f-spinner { width: 24px; height: 24px; border-radius: 50%; border: 2.5px solid var(--f-border); border-top-color: var(--f-text); animation: f-spin 800ms linear infinite; flex: none; }
.f-spinner--lg { width: 40px; height: 40px; border-width: 3px; }
.f-progress { height: 8px; border-radius: 4px; background: var(--f-surface-2); overflow: hidden; }
.f-progress i { display: block; height: 100%; width: var(--value, 0%); background: var(--f-text); border-radius: 4px; transition: width var(--f-dur-fill) var(--f-ease-out); }
.f-progress.is-filled i { background: var(--f-lime); }
.f-progress--indeterminate i { width: 40%; animation: f-slide 1.2s var(--f-ease-move) infinite; }
.f-waves { display: flex; align-items: center; gap: var(--f-space-2); font: var(--f-data); color: var(--f-text-muted); }
.f-waves i { flex: 1; height: 8px; border-radius: 4px; background: var(--f-surface-2); }
.f-waves i.on { background: var(--f-text); } .f-waves i.full { background: var(--f-lime); }
.f-waves i.run { background: linear-gradient(90deg, var(--f-text) 0 50%, var(--f-surface-2) 50%); background-size: 200% 100%; animation: f-run 1.2s linear infinite; }

/* Steps and pagination */
.f-steps { display: flex; flex-wrap: wrap; gap: var(--f-space-4); margin: 0; padding: 0; counter-reset: s; }
.f-steps li { list-style: none; display: flex; align-items: center; gap: var(--f-space-2); font: var(--f-label); color: var(--f-text-muted); }
.f-steps li::before { counter-increment: s; content: counter(s); width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--f-border); display: grid; place-items: center; font: var(--f-data-sm); }
.f-steps li.is-done, .f-steps li.is-now { color: var(--f-text); }
.f-steps li.is-done::before { background: var(--f-text); color: var(--f-bg); border-color: var(--f-text); }
.f-steps li.is-now::before { border-color: var(--f-text); }
.f-pagination { display: inline-flex; gap: var(--f-space-1); }
.f-pagination button { min-width: 44px; height: 44px; padding: 0 var(--f-space-2); border: 0; border-radius: var(--f-r-md); background: transparent; font: var(--f-label); color: var(--f-text-muted); cursor: pointer; transition: background var(--f-dur-fast), color var(--f-dur-fast); }
.f-pagination button:hover { background: var(--f-surface-2); color: var(--f-text); }
.f-pagination button:disabled { background: none; color: var(--f-text-muted); opacity: .4; cursor: default; }
.f-pagination button[aria-current="page"] { background: var(--f-text); color: var(--f-bg); }

/* Week grid: the product's occupancy picture */
.f-week { display: grid; grid-template-columns: 64px repeat(7, minmax(0, 1fr)); gap: var(--f-space-2); align-items: center; }
@media (max-width: 420px) { .f-week { grid-template-columns: 44px repeat(7, minmax(0, 1fr)); gap: var(--f-space-1); } .f-week__h, .f-week__t { font: var(--f-data-sm); } }
.f-week__h, .f-week__t { font: var(--f-data); color: var(--f-text-muted); } .f-week__h { text-align: center; }
.f-week__c { height: 32px; border-radius: var(--f-r-sm); background: var(--f-booked-bg); }
.f-week__c--open { background: var(--f-open-bg); border: 1px dashed var(--f-open-line); position: relative; overflow: hidden; }
.f-week__c--open::after { content: ""; position: absolute; inset: 0; background: var(--f-lime); transform: scaleY(0); transform-origin: 50% 100%; transition: transform var(--f-dur-slow) var(--f-ease-out); }
@media (hover: hover) and (pointer: fine) { .f-week__c--open:hover::after { transform: none; } .f-week__c--open:hover { border-color: var(--f-lime); } }
.f-week__c--filled { background: var(--f-filled-bg); }
.f-week__c--peak { background: var(--f-peak-stripe); }

/* Messages: a draft the desk signs off, and the member's reply as the desk sees it. Product bubbles, not WhatsApp's. */
.f-msg { max-width: 420px; padding: var(--f-space-3) var(--f-space-4); border-radius: var(--f-r-card); border-bottom-left-radius: var(--f-r-xs); background: var(--f-surface-2); font: var(--f-body); }
.f-msg--reply { background: var(--f-surface); border: 1px solid var(--f-border); border-radius: var(--f-r-card); border-bottom-right-radius: var(--f-r-xs); margin-left: auto; }
.f-msg__meta { display: block; margin-top: var(--f-space-1); font: var(--f-data-sm); color: var(--f-text-muted); }

/* Icons: 16 px in text and buttons, 20 px in navigation; 1.8 stroke, round caps, currentColor, never filled */
.f-icon { width: 16px; height: 16px; display: inline-block; vertical-align: -3px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.f-icon--20 { width: 20px; height: 20px; vertical-align: -5px; stroke-width: 1.6; }

/* App shell: 240 px side, 40 px rows, the page head with one primary action */
.f-shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100dvh; background: var(--f-bg); }
.f-side { padding: var(--f-space-6) var(--f-space-4); border-right: 1px solid var(--f-border); display: grid; align-content: start; gap: var(--f-space-1); }
.f-side a { display: flex; align-items: center; gap: var(--f-space-3); height: 40px; padding: 0 var(--f-space-3); border-radius: var(--f-r-md); font: var(--f-label); color: var(--f-text-muted); transition: background var(--f-dur-fast), color var(--f-dur-fast); }
.f-side a:hover { color: var(--f-text); background: var(--f-surface-2); }
.f-side a[aria-current="page"] { color: var(--f-text); background: var(--f-surface-2); }
.f-side a.f-logo, .f-side a.f-logo:hover { color: var(--f-text); background: none; }
.f-side .f-badge { margin-left: auto; }
.f-page { padding: var(--f-space-8); min-width: 0; }
.f-page__head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--f-space-6); margin-bottom: var(--f-gap-head); }
.f-page__head h1, .f-page__title { font: var(--f-h3); letter-spacing: var(--f-tracking-tight); }
.f-page__head .f-eyebrow { margin-bottom: var(--f-space-2); }
@media (max-width: 920px) {
  .f-shell { grid-template-columns: 1fr; }
  .f-side { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--f-border); padding: var(--f-space-3) var(--f-space-4); }
  .f-side .f-logo { display: none; }
  .f-page { padding: var(--f-space-6) var(--f-space-4); }
  .f-page__head { flex-direction: column; align-items: flex-start; gap: var(--f-space-4); }
}

/* Menu: row actions in a popover, 40 px rows, danger last */
.f-menu { position: relative; display: inline-block; }
.f-menu__list { position: absolute; top: calc(100% + 8px); left: 0; min-width: 200px; margin: 0; padding: var(--f-space-1); list-style: none; background: var(--f-surface); border: 1px solid var(--f-border); border-radius: var(--f-r-md); box-shadow: var(--f-shadow-soft); z-index: 5;
  visibility: hidden; opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity var(--f-dur-fast), transform var(--f-dur-fast) var(--f-ease-out), visibility var(--f-dur-fast); }
.f-menu.is-open .f-menu__list, .f-menu__list.is-open { visibility: visible; transition: opacity var(--f-dur-fast), transform var(--f-dur-fast) var(--f-ease-out), visibility 0s; opacity: 1; transform: none; pointer-events: auto; }
.f-menu__list button { display: flex; align-items: center; gap: var(--f-space-3); width: 100%; height: 40px; padding: 0 var(--f-space-3); border: 0; border-radius: 9px; background: none; font: var(--f-label); color: var(--f-text); text-align: left; cursor: pointer; }
.f-menu__list button:hover { background: var(--f-surface-2); }
.f-menu__list button.is-danger { color: var(--f-danger); }
.f-menu__list hr { border: 0; border-top: 1px solid var(--f-border); margin: var(--f-space-1) 0; }

/* Upload zone: the day's sheet comes in here */
.f-drop { display: grid; justify-items: center; text-align: center; gap: var(--f-space-2); padding: var(--f-space-8) var(--f-space-6); border: 1px dashed var(--f-border); border-radius: var(--f-r-card); background: var(--f-surface); transition: border-color var(--f-dur-fast), background var(--f-dur-fast); }
.f-drop:hover, .f-drop.is-over { border-color: var(--f-text); background: var(--f-surface-2); }
.f-drop .f-icon { width: 24px; height: 24px; color: var(--f-text-muted); }
.f-drop p { font: var(--f-small); color: var(--f-text-muted); max-width: 32ch; }
.f-drop--done { border-style: solid; }
.f-file { display: inline-flex; align-items: center; gap: var(--f-space-2); height: 32px; white-space: nowrap; max-width: 100%; padding: 0 var(--f-space-2) 0 var(--f-space-3); border-radius: var(--f-r-chip); background: var(--f-surface-2); font: var(--f-label); }
.f-file .f-btn--icon { --f-control-h: 32px; position: relative; width: 32px; border: 0; background: transparent; } .f-file .f-btn--icon::before { content: ""; position: absolute; inset: -6px; }   /* 32 to see, 44 to touch */
}
