/* Flo product UI layer (6 November 2026): tokens, base and the shared controls.
   Source of truth: companies/lutiq/projects/flo-rebrand/product-ui-20261106/styles/flo-app.css.
   Values here are copied from it, not redefined. Flo Sans only, Regular and Bold. */

@font-face {
  font-family: "Flo Sans";
  src: url("../fonts/flo-sans.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Flo Sans";
  src: url("../fonts/flo-sans-bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Registered palette */
  --navy: #0b2d3a;
  --teal: #073d46;
  --ivory: #f4f1e8;
  --seafoam: #d6e5df;
  --action: #ff9b72;
  --mint: #a9e8cf;

  /* Fields, Paper and states */
  --ocean: #073448;
  --navy-bar: #082c3e;
  --mist: #c3d9ce;
  --paper: #f4f0e2;
  --ink: #0e4149;
  --muted: #526a6d;
  --muted-strong: #355d61;
  --line-paper: #cad2c7;
  --peach-light: #ffbc95;
  --coral: #ff5a36;
  --action-hover: #ffc09a;
  --action-pressed: #ed936c;
  --focus: #ffb78b;
  --focus-ring: #073445;
  --line-section: #b7d9cc26;
  --line-frame: #b5dcd437;
  --line-control: #a9d4c67d;
  --line-hairline: #ffffff1c;
  --wash-coral: #f5dece;
  --wash-teal: #cfd4cd;

  --font-sans: "Flo Sans", Arial, sans-serif;
  --ease: cubic-bezier(.2, .65, .25, 1);

  /* Product roles */
  --canvas: #f7f4e9;
  --card: #fdfcf9;
  --field: var(--card);
  --hover: #f1f3f0;
  --track: var(--paper);
  --text: var(--ink);
  --text-2: var(--muted);
  --link: var(--muted-strong);
  --link-hover: var(--ink);
  --accent: var(--teal);
  --selected: var(--mint);
  --selected-wash: #dbf4e8;
  --border: #d8dcd1;
  --divider: #e6e9e2;
  --control-line: var(--line-paper);
  --field-line: #7c8e8c;
  --positive: #196b4b;
  --positive-wash: #dbf4e8;
  --negative: #ab3921;
  --negative-wash: var(--wash-coral);
  --series-1: #277986;
  --radius-card: 8px;
  --radius-control: 4px;
  --shadow-card: 0 1px 2px rgb(0 30 43 / .06), 0 4px 14px rgb(0 30 43 / .04);

  --bar-h: 76px;
  --nav-w: 232px;
  --pad: clamp(16px, 2vw, 24px);

  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--canvas); }
body {
  margin: 0;
  min-width: 320px;
  background: var(--canvas);
  color: var(--text);
  font: 400 15px/1.55 var(--font-sans);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
p, h1, h2, h3, h4, figure, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
h1, h2, h3, h4 { font-weight: 700; color: var(--text); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--peach-light); color: var(--ink); }
[hidden] { display: none !important; }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px var(--focus-ring);
}

.num { font-variant-numeric: tabular-nums; }
.caption { font-size: 12px; line-height: 1.5; color: var(--text-2); }
.label { font-size: 13px; line-height: 1.4; color: var(--text-2); }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* Dark fields: the chrome and the sign-in ground redefine the roles. */
.app-bar, .side-nav, .on-dark {
  --text: var(--ivory); --text-2: var(--mist); --card: var(--teal); --hover: var(--teal); --canvas: var(--navy);
  --border: var(--line-frame); --divider: var(--line-section); --control-line: var(--line-control); --field-line: var(--line-control);
  --link: var(--mint); --link-hover: var(--peach-light); --accent: var(--mint);
  color-scheme: dark;
  color: var(--text);
}

/* ---------- Actions ---------- */
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: square; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 10px 18px;
  border: 0; border-radius: var(--radius-control);
  font: 700 14px/1.35 var(--font-sans); white-space: nowrap;
  transition: background-color 160ms var(--ease), color 160ms var(--ease);
}
.button-primary { background: var(--action); color: var(--ink); }
.button-primary:hover { background: var(--action-hover); }
.button-primary:active { background: var(--action-pressed); }
.button-primary:disabled { background: var(--action); opacity: .55; }

/* A bordered control for menus and secondary actions that are not links. */
.button-quiet {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 8px 12px;
  border: 1px solid var(--field-line); border-radius: var(--radius-control);
  background: var(--field); color: var(--text);
  font: 400 14px/1.35 var(--font-sans); white-space: nowrap;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease);
}
.button-quiet:hover { background: var(--hover); border-color: var(--text-2); }
.button-quiet:disabled { opacity: .55; }
.button-quiet[aria-expanded="true"] { background: var(--hover); }
.button-icon { width: 40px; padding: 0; }

.text-control {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 8px 0;
  border: 0; border-radius: 0;
  background: none; color: var(--link);
  font: 400 14px/1.4 var(--font-sans); white-space: nowrap;
  text-decoration: underline; text-decoration-color: var(--control-line); text-decoration-thickness: 1px; text-underline-offset: 4px;
  transition: color 160ms var(--ease), text-decoration-color 160ms var(--ease);
}
.text-control:hover { color: var(--link-hover); text-decoration-color: currentColor; }
.text-control:disabled { opacity: .55; }

/* ---------- Status chips: the state in words, square marker ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 22px; padding: 1px 8px 1px 0;
  font-size: 12px; line-height: 1.4; white-space: nowrap; color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.chip::before { content: ""; width: 7px; height: 7px; flex: none; background: currentColor; }
.chip[data-state="late"] { padding-left: 8px; border-radius: var(--radius-control); background: var(--wash-coral); color: var(--ink); }
.chip[data-state="late"]::before { background: var(--negative); }
.chip[data-state="today"] { padding-left: 8px; border-radius: var(--radius-control); background: var(--wash-teal); color: var(--ink); }
.chip[data-state="done"] { color: var(--positive); }
.chip[data-state="plain"]::before { display: none; }
.chip[data-state="plain"] { padding-right: 0; }

/* ---------- Fields ---------- */
.field { display: grid; gap: 6px; }
.field-label { font-size: 13px; line-height: 1.4; color: var(--text-2); }
.input, .textarea {
  width: 100%; min-height: 44px; padding: 10px 12px;
  border: 1px solid var(--field-line); border-radius: var(--radius-control);
  background: var(--field); color: var(--text);
  font: 400 15px/1.4 var(--font-sans);
  transition: border-color 160ms var(--ease);
}
.textarea { line-height: 1.55; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--muted); opacity: 1; }
.input:hover, .textarea:hover { border-color: var(--text-2); }
.field-error {
  display: flex; gap: 8px; font-size: 13px; line-height: 1.45; color: var(--ink);
}
.field-error::before { content: ""; width: 3px; flex: none; background: var(--coral); }

.select {
  min-height: 40px; padding: 8px 34px 8px 12px;
  border: 1px solid var(--field-line); border-radius: var(--radius-control);
  background: var(--field) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23526a6d' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 12px center;
  color: var(--text); font-size: 14px; appearance: none; max-width: 100%;
}
.select:hover { border-color: var(--text-2); }

/* Segmented control: a Paper track; the chosen option in Mint with Ink and Bold. */
.segmented { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--radius-control); background: var(--track); box-shadow: inset 0 0 0 1px var(--border); }
.segmented button {
  min-height: 34px; padding: 0 12px; border: 0; border-radius: 3px; background: none;
  color: var(--text-2); font-size: 14px;
}
.segmented button:hover { color: var(--text); }
.segmented button[aria-pressed="true"] { background: var(--selected); color: var(--ink); font-weight: 700; }
/* Reserve the Bold width so choosing an option does not shift the row. */
.segmented button::after { content: attr(data-label); display: block; height: 0; overflow: hidden; visibility: hidden; font-weight: 700; }

/* ---------- Surfaces ---------- */
.panel { border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--card); box-shadow: var(--shadow-card); }

/* Meter: a Series 1 fill on Canvas. */
.meter { position: relative; height: 8px; background: var(--canvas); border: 1px solid var(--border); }
.meter-fill { position: absolute; inset: 0 auto 0 0; background: var(--series-1); transition: width 240ms var(--ease); }

/* Tables */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  color: var(--text-2); font-weight: 400; font-size: 12px; text-align: left; white-space: nowrap;
  position: sticky; top: 0; background: var(--card); z-index: 1;
}
.table td { padding: 12px 14px; border-bottom: 1px solid var(--divider); color: var(--text); vertical-align: top; }
.table tbody tr:hover td { background: var(--hover); }
.table tbody tr { cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; }
}
