/* FoodGood Customers. Brand: golden yellow #FFC416, black, warm taupe #908478, sage #D0D3C1. */
@import url('https://fonts.googleapis.com/css2?family=Anton&family=Noto+Sans+Georgian:wght@400;600;800&display=swap');
:root {
  --y: #FFC416; --on-y: #141414;
  --color-bg: #F5F4F0; --color-panel: #FFFFFF; --color-fg: #141414; --color-fg-muted: #6E675F;
  --color-border-line: #E4E1D9; --color-bad: #B42318; --color-good: #2F7D3A;
  --cds-text-secondary: #6E675F; --cds-chart-axis: #CFCAC0; --cds-chart-grid: #ECE9E2;
  --cds-surface-popover: #FFFFFF; --cds-border: #E4E1D9; --cds-shadow-popover: 0 8px 24px rgba(0, 0, 0, 0.12);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #121110; --color-panel: #1C1B19; --color-fg: #F3F1EC; --color-fg-muted: #A59E94;
    --color-border-line: #2F2D2A; --color-bad: #F97066; --color-good: #6CCB7A;
    --cds-text-secondary: #A59E94; --cds-chart-axis: #4A4741; --cds-chart-grid: #2A2825;
    --cds-surface-popover: #26241F; --cds-border: #3A3732; --cds-shadow-popover: 0 8px 24px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}

@import url('https://fonts.googleapis.com/css2?family=Anton&family=Noto+Sans+Georgian:wght@400;600;800&display=swap');
/* FoodGood brand: golden yellow accent, black + warm taupe primaries, sage/olive secondaries; Helvetica text, condensed wordmark, arch shapes */
.fg {
  --y: #FFC416; --on-y: #141414; --taupe: #908478; --olive: #9EA08B; --sage: #D0D3C1;
  --s0: var(--y); --s1: var(--color-fg); --s2: var(--taupe);
  --fg-sans: "Helvetica Neue", Helvetica, Arial, "Noto Sans Georgian", Sylfaen, sans-serif;
  --fg-ka: "Noto Sans Georgian", "Helvetica Neue", Helvetica, Arial, Sylfaen, sans-serif;
  --fg-display: Anton, "Helvetica Neue", Impact, "Noto Sans Georgian", sans-serif;
  font-family: var(--fg-sans);
  display: flex; flex-direction: column; gap: 30px;
}
.fg.is-ka { font-family: var(--fg-ka); }
.fg:not(.is-ka) .ka, .fg.is-ka .en { display: none !important; }

/* hero */
.fg-hero { position: relative; overflow: hidden; background: var(--y); color: var(--on-y); border-radius: 36px 36px 10px 10px; padding: clamp(18px, 4vw, 34px); display: flex; flex-direction: column; gap: 14px; }
.fg-hero::after { content: "FOODGOOD"; position: absolute; right: -0.04em; bottom: -0.18em; font-family: var(--fg-display); font-size: clamp(90px, 20vw, 230px); line-height: 1; color: rgba(0, 0, 0, 0.06); pointer-events: none; }
.fg-brand { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; position: relative; z-index: 1; }
.fg-word { display: flex; flex-direction: column; gap: 3px; }
.fg-word b { font-family: var(--fg-display); font-weight: 400; font-size: 32px; line-height: 1; letter-spacing: 0.01em; }
.fg-word span { font-size: 10px; font-weight: 700; letter-spacing: 0.2em; }
.fg-langs { display: flex; gap: 4px; }
.fg-lang { border: 1.5px solid var(--on-y); background: transparent; color: var(--on-y); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.fg-lang[aria-pressed="true"] { background: var(--on-y); color: var(--y); }
.fg-lang:focus-visible, .fg-reset:focus-visible { outline: 2px solid var(--color-fg); outline-offset: 2px; }
.fg-h1 { position: relative; z-index: 1; margin: 0; font-family: var(--fg-display); font-weight: 400; font-size: clamp(30px, 6.2vw, 52px); line-height: 1.02; text-transform: uppercase; text-wrap: balance; }
.fg.is-ka .fg-h1 { font-family: var(--fg-ka); font-weight: 800; letter-spacing: 0.01em; font-size: clamp(26px, 5.4vw, 44px); }
.fg-lede { position: relative; z-index: 1; margin: 0; max-width: 70ch; font-size: 16px; line-height: 1.55; }
.fg-lede b { font-weight: 800; font-variant-numeric: tabular-nums; }

/* filters */
.fg-filters { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--color-bg); padding-block: 10px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 8px 10px; align-items: end; border-bottom: 1px solid var(--color-border-line); }
.fg-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fg-field > span { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-fg-muted); }
.fg-field select { width: 100%; }
.fg-reset { border: 1px solid var(--color-border-line); background: var(--color-panel); color: var(--color-fg); border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 13px; cursor: pointer; justify-self: start; }
.fg-reset:hover { border-color: var(--taupe); }
.fg-showing { grid-column: 1 / -1; margin: 0; font-size: 12px; color: var(--color-fg-muted); }
.fg-showing b { color: var(--color-fg); font-weight: 700; }

/* tiles */
.fg-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(46%, 158px), 1fr)); gap: 10px; }
.fg-tile { background: var(--color-panel); border: 1px solid var(--color-border-line); border-radius: 80px 80px 12px 12px; padding: 26px 12px 16px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; min-width: 0; }
.fg-tile.is-hero { background: var(--y); border-color: var(--y); color: var(--on-y); }
.fg-tile-lbl { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-fg-muted); }
.fg-tile.is-hero .fg-tile-lbl, .fg-tile.is-hero .fg-tile-sub { color: var(--on-y); }
.fg-tile-val { font-family: var(--fg-display); font-weight: 400; font-size: clamp(26px, 5vw, 34px); line-height: 1.1; font-variant-numeric: tabular-nums; }
.fg-tile-sub { font-size: 11px; color: var(--color-fg-muted); }

/* sections */
.fg-sec { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.fg-sec > h2 { margin: 0; font-family: var(--fg-display); font-weight: 400; font-size: clamp(22px, 4vw, 30px); line-height: 1.08; text-transform: uppercase; text-wrap: balance; display: flex; gap: 10px; align-items: baseline; }
.fg-sec > h2::before { content: ""; flex: none; width: 14px; height: 14px; border-radius: 7px 7px 2px 2px; background: var(--y); transform: translateY(-2px); }
.fg.is-ka .fg-sec > h2 { font-family: var(--fg-ka); font-weight: 800; font-size: clamp(18px, 3.4vw, 24px); }
.fg-sec h3 { margin: 0; font-size: 15px; font-weight: 700; }
.fg-note { margin: 0; color: var(--color-fg-muted); font-size: 12.5px; line-height: 1.5; max-width: 80ch; }
.fg-text { margin: 0; max-width: 78ch; line-height: 1.6; font-size: 15px; }
.fg-text b { font-weight: 800; font-variant-numeric: tabular-nums; }
.fg-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 28px; }
.fg-grid2 > * { min-width: 0; }
.fg-card { background: var(--color-panel); border: 1px solid var(--color-border-line); border-radius: 24px 24px 10px 10px; padding: clamp(14px, 3vw, 20px); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.fg-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--color-fg-muted); }
.fg-sw { display: inline-block; width: 10px; height: 10px; border-radius: 5px 5px 1px 1px; margin-right: 6px; vertical-align: -1px; }
.fg-sw.s0 { background: var(--s0); } .fg-sw.s1 { background: var(--s1); } .fg-sw.s2 { background: var(--s2); }

/* charts */
.fg-chart { position: relative; min-height: 230px; }
.fg-chart svg { display: block; overflow: visible; }
.fg-chart svg text { fill: var(--cds-text-secondary); font-size: 11px; font-family: inherit; }
.fg-chart .fg-axis .domain, .fg-chart .fg-axis line { stroke: var(--cds-chart-axis); }
.fg-chart .fg-gridl line { stroke: var(--cds-chart-grid); }
.fg-chart .fg-gridl .domain { display: none; }
.fg-chart svg text.fg-val { fill: var(--color-fg); font-variant-numeric: tabular-nums; }
.fg-tip { position: absolute; pointer-events: none; z-index: 5; background: var(--cds-surface-popover); border: 1px solid var(--cds-border); box-shadow: var(--cds-shadow-popover); border-radius: 10px; padding: 7px 10px; font-size: 12px; line-height: 1.45; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fg-tip strong { display: block; font-weight: 700; }
.fg-empty { color: var(--color-fg-muted); font-size: 13px; padding: 24px 0; }
.fg-err { color: var(--color-bad); font-size: 13px; }

/* html bars */
.fg-bars { display: flex; flex-direction: column; gap: 10px; position: relative; min-height: 200px; }
.fg-bar-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 10px; align-items: center; }
.fg-bar-name { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fg-bar-name em { font-style: normal; color: var(--color-fg-muted); font-size: 12px; }
.fg-bar-val { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.fg-bar-track { grid-column: 1 / -1; height: 9px; border-radius: 5px; background: var(--cds-chart-grid); overflow: hidden; }
.fg-bar-fill { height: 100%; border-radius: 5px; background: var(--y); }

/* tables */
.fg-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.fg-table { border-collapse: collapse; width: 100%; font-size: 13px; font-variant-numeric: tabular-nums; }
.fg-table th, .fg-table td { padding: 8px 9px; border-bottom: 1px solid var(--color-border-line); text-align: left; white-space: nowrap; }
.fg-table th { color: var(--color-fg-muted); font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.fg-table .fg-n { text-align: right; }
.fg-table td.fg-wrap { white-space: normal; min-width: 150px; }
.fg-table tr.is-sel td { background: color-mix(in srgb, var(--y) 22%, transparent); }
.fg-chip { display: inline-block; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--taupe); color: var(--taupe); font-size: 11px; }
.fg-cohort td.fg-c { text-align: right; min-width: 40px; }

/* stats */
.fg-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(46%, 140px), 1fr)); gap: 10px; }
.fg-stat { display: flex; flex-direction: column; gap: 2px; padding: 14px; border-radius: 20px 20px 8px 8px; background: color-mix(in srgb, var(--sage) 45%, transparent); }
.fg-stat b { font-family: var(--fg-display); font-weight: 400; font-size: 26px; font-variant-numeric: tabular-nums; }
.fg-stat span { font-size: 12px; color: var(--color-fg-muted); }
.fg-callout { border-radius: 24px 24px 10px 10px; padding: clamp(14px, 3vw, 20px); background: color-mix(in srgb, var(--y) 16%, var(--color-panel)); border: 1px solid color-mix(in srgb, var(--y) 55%, transparent); display: flex; flex-direction: column; gap: 8px; }

.fg-details { border-top: 1px solid var(--color-border-line); padding-top: 14px; }
.fg-details summary { cursor: pointer; font-weight: 700; }
.fg-details ul { margin: 10px 0 0; padding-left: 1.2em; max-width: 80ch; line-height: 1.55; color: var(--color-fg-muted); font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.fg-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--taupe); padding-top: 10px; font-size: 11px; color: var(--taupe); letter-spacing: 0.12em; font-weight: 700; }

@media (max-width: 520px) {
  .fg { gap: 24px; }
  .fg-table th, .fg-table td { padding: 7px 6px; }
  .fg-hero { border-radius: 28px 28px 8px 8px; }
}
/* ---------- app shell: sign-in, top bar, sheets ---------- */
body:not(.is-ka) .ka, body.is-ka .en { display: none !important; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--color-bg); color: var(--color-fg);
  font-family: "Helvetica Neue", Helvetica, Arial, "Noto Sans Georgian", Sylfaen, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.is-ka { font-family: "Noto Sans Georgian", "Helvetica Neue", Helvetica, Arial, Sylfaen, sans-serif; }
[hidden] { display: none !important; }
button { font: inherit; }

.app { min-height: 100vh; }
.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 1180px; margin: 0 auto; padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
}
.wordmark { display: flex; flex-direction: column; gap: 2px; line-height: 1; }
.wordmark b { font-family: Anton, "Helvetica Neue", Impact, sans-serif; font-weight: 400; font-size: 26px; letter-spacing: 0.01em; }
.wordmark span { font-size: 9.5px; font-weight: 700; letter-spacing: 0.24em; color: var(--color-fg-muted); }
.bar-right { display: flex; align-items: center; gap: 8px; }
.fg-langs { display: flex; gap: 4px; }
.fg-lang {
  border: 1.5px solid var(--color-fg); background: transparent; color: var(--color-fg); border-radius: 999px;
  padding: 6px 11px; font-size: 13px; font-weight: 700; cursor: pointer;
}
.fg-lang[aria-pressed="true"] { background: var(--color-fg); color: var(--color-bg); }
.acct {
  width: 38px; height: 38px; border-radius: 19px 19px 8px 8px; border: none; background: var(--y); color: var(--on-y);
  font-weight: 800; font-size: 15px; cursor: pointer; text-transform: uppercase;
}
.fg-lang:focus-visible, .acct:focus-visible, .primary:focus-visible, .ghost:focus-visible, .link:focus-visible { outline: 2px solid var(--color-fg); outline-offset: 2px; }

#dash-root { max-width: 1180px; margin: 0 auto; padding: 4px 16px calc(40px + env(safe-area-inset-bottom, 0px)); }
.load-state { max-width: 1180px; margin: 0 auto; padding: 8px 16px; color: var(--color-fg-muted); font-size: 14px; }

/* filter selects */
select.dash-select {
  appearance: none; -webkit-appearance: none; width: 100%;
  border: 1px solid var(--color-border-line); border-radius: 12px; padding: 9px 30px 9px 12px;
  background: var(--color-panel) 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 1l5 5 5-5' fill='none' stroke='%23908478' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 11px center;
  color: var(--color-fg); font: inherit; font-size: 14px;
}
select.dash-select:disabled { opacity: 0.75; }

/* live status */
.fg-livebar { margin: -4px 0 0; display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--color-fg-muted); }
.fg-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--color-border-line); }
.fg-dot.is-ok { background: var(--color-good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-good) 22%, transparent); }
.fg-dot.is-late { background: var(--y); }
.fg-dot.is-bad { background: var(--color-bad); }
.fg-bars-sm { min-height: 0; }

/* sign-in */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--y); }
.auth-card {
  width: min(100%, 400px); background: var(--color-panel); color: var(--color-fg); border-radius: 120px 120px 18px 18px;
  padding: 56px 24px 24px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.14);
}
.auth-card .wordmark { align-items: center; margin-bottom: 4px; }
.auth-card .wordmark b { font-size: 34px; }
.auth-card h1 { margin: 0; text-align: center; font-size: 20px; }
.auth-card .fg-langs { justify-content: center; }
.hint { margin: 0; color: var(--color-fg-muted); font-size: 13px; line-height: 1.5; }
.field { display: flex; flex-direction: column; gap: 5px; border: none; padding: 0; margin: 0; min-width: 0; }
.field > span, .field > legend { font-size: 12px; font-weight: 700; color: var(--color-fg-muted); padding: 0; }
.field input, .field select {
  border: 1px solid var(--color-border-line); border-radius: 12px; padding: 11px 12px; background: var(--color-bg);
  color: var(--color-fg); font: inherit; font-size: 16px; width: 100%;
}
.field input:focus, .field select:focus { outline: 2px solid var(--y); border-color: var(--y); }
.form-error { margin: 0; color: var(--color-bad); font-size: 13px; }
.form-error.ok { color: var(--color-good); }
.primary {
  border: none; background: var(--color-fg); color: var(--color-bg); border-radius: 999px; padding: 12px 18px;
  font-weight: 800; font-size: 15px; cursor: pointer;
}
.primary:disabled, .ghost:disabled { opacity: 0.5; cursor: default; }
.ghost {
  border: 1.5px solid var(--color-fg); background: transparent; color: var(--color-fg); border-radius: 999px;
  padding: 9px 16px; font-weight: 700; font-size: 14px; cursor: pointer;
}
.ghost.danger, .link.danger { color: var(--color-bad); border-color: var(--color-bad); }
.link { border: none; background: none; color: var(--color-fg); text-decoration: underline; text-underline-offset: 3px; padding: 4px 6px; cursor: pointer; font-size: 13px; }

/* sheets */
dialog.sheet {
  border: none; padding: 0; background: var(--color-panel); color: var(--color-fg);
  width: min(100% - 24px, 560px); max-height: min(92vh, 900px); border-radius: 28px 28px 14px 14px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}
dialog.sheet.wide { width: min(100% - 24px, 900px); }
dialog.sheet::backdrop { background: rgba(20, 20, 20, 0.45); }
.sheet-in { display: flex; flex-direction: column; gap: 14px; padding: 18px 18px 20px; }
.sheet-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.sheet-h b { font-size: 17px; }
.sheet-h .sub { display: block; font-size: 12.5px; color: var(--color-fg-muted); margin-top: 2px; }
.x { border: none; background: var(--color-bg); color: var(--color-fg); width: 34px; height: 34px; border-radius: 17px; font-size: 20px; line-height: 1; cursor: pointer; flex: none; }
.sheet-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 12px; border-top: 1px solid var(--color-border-line); }
.sheet-row.col { flex-direction: column; align-items: stretch; }
.sheet-row .ghost { align-self: flex-start; }
.runs { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.runs td { padding: 5px 4px; border-bottom: 1px solid var(--color-border-line); vertical-align: top; }
.runs td.bad { color: var(--color-bad); }
.checks { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.check { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--color-fg); }
.users-wrap { overflow-x: auto; }
.users { width: 100%; border-collapse: collapse; font-size: 13px; }
.users th, .users td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--color-border-line); white-space: nowrap; }
.users th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-fg-muted); }
.users td.actions { text-align: right; }
.role-chip { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--color-bg); }
.role-chip.admin { background: var(--y); color: var(--on-y); }
.perm { margin: 0; padding-left: 1.1em; font-size: 12.5px; color: var(--color-fg-muted); line-height: 1.55; }

@media (max-width: 520px) {
  .wordmark b { font-size: 22px; }
  .fg-lang { padding: 5px 9px; }
  .sheet-in { padding: 16px 14px 18px; }
}
