/* FoodBooth — components from the approved screens (design/*.dc.html).
   No inline styles anywhere in the views: the CSP forbids them, so every look lives here.

   Colours, type and the Bootstrap bridge come from the brand design layer, fb-uplift.css (BASE
   handover, "The Ledger" + dark mode), loaded after this file. Rules here use its roles
   (--ground, --surface, --ink, --text, --text-2, --stroke, --link…), which switch in dark mode;
   --fb-brand, --fb-ink and the other brand tokens it defines never change. The names below are
   this file's own, kept so the rules read as before, and taken from those roles. */
:root {
  --fb-ink-2: var(--text);
  --fb-ink-3: var(--text-2);
  --fb-line: var(--stroke);
  --fb-line-2: var(--ground-2);
  --fb-brand-2: var(--fb-brand-deep);
  --fb-brand-soft: var(--selected);
  --fb-pos: var(--ok);
  --fb-pos-soft: rgba(var(--ok-rgb), .1);
  --fb-neg: var(--bad);
  --fb-neg-soft: rgba(var(--bad-rgb), .1);
  --fb-warn: var(--warn);
  --fb-warn-soft: rgba(var(--warn-rgb), .1);
  --fb-warn-line: rgba(var(--warn-rgb), .45);
  --fb-dark: var(--ink);
  --fb-dark-2: var(--text);
  --fb-radius: var(--radius);
  --fb-radius-sm: var(--radius);
}

html, body { min-height: 100%; }
body { background: var(--ground); }
a { text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--fb-brand); outline-offset: 2px; }
code, .fb-code { font-size: .8125rem; color: var(--fb-ink-2); background: var(--fb-line-2); padding: 1px 6px; border-radius: 5px; }

/* Figures line up in columns — every money column in the product depends on this. */
.fb-num { font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.fb-muted { color: var(--fb-ink-3); }
.fb-nowrap { white-space: nowrap; }
.fb-optional { font-weight: 400; color: var(--fb-ink-3); font-size: .8125rem; }
.fb-text-warn { color: var(--fb-warn); }

/* ---------- buttons ---------- */
.btn { font-weight: 600; border-radius: var(--fb-radius-sm); display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.fb-btn-primary { background: var(--fb-brand); border: 1px solid var(--fb-brand); color: var(--fb-ink); padding: 9px 18px; font-weight: 700; }
.fb-btn-primary:hover, .fb-btn-primary:focus-visible { background: var(--fb-brand-light); border-color: var(--fb-brand-light); color: var(--fb-ink); }
.fb-btn-secondary { background: var(--surface); border: 1px solid var(--fb-line); color: var(--ink); padding: 9px 16px; }
.fb-btn-secondary:hover { border-color: var(--fb-brand); color: var(--link); background: var(--surface); }
.fb-btn-dark { background: var(--ink); border: 1px solid var(--ink); color: var(--ground); padding: 9px 18px; }
.fb-btn-dark:hover { background: var(--text); border-color: var(--text); color: var(--ground); }
.fb-btn-danger { background: var(--bad); border: 1px solid var(--bad); color: var(--on-status); padding: 9px 18px; }
.fb-btn-danger:hover { background: var(--fb-brand-deep); border-color: var(--fb-brand-deep); color: #fff; }
.fb-btn-ghost-danger { background: transparent; border: 1px solid transparent; color: var(--fb-neg); padding: 9px 12px; }
.fb-btn-ghost-danger:hover { background: var(--fb-neg-soft); color: var(--fb-neg); }
.btn-sm { padding: 5px 11px; font-size: .8125rem; }
.fb-link-danger { color: var(--fb-neg); font-weight: 500; font-size: .875rem; text-decoration: none; }
.fb-link-danger:hover { color: var(--bad); text-decoration: underline; }

/* ---------- app shell ---------- */
/* The shell itself (sidebar, top bar, phone drawer) is fb-uplift.css's; fb-app.css fits this
   app's parts into it. */

.fb-lang { margin: 0; }
.fb-lang-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 6px 12px; font: inherit; font-size: .8125rem; font-weight: 600; color: var(--fb-ink-2); background: var(--surface); border: 1px solid var(--fb-line); border-radius: var(--fb-radius-sm); cursor: pointer; }
.fb-lang-btn:hover { border-color: var(--fb-brand); color: var(--link); }

.fb-user-btn { display: inline-flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; border: 1px solid var(--fb-line); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: .875rem; font-weight: 600; }
[dir="rtl"] .fb-user-btn { padding: 4px 4px 4px 8px; }
.fb-menu { min-width: 240px; border-color: var(--fb-line); border-radius: var(--fb-radius); box-shadow: var(--shadow); padding: 6px; }
.fb-menu .dropdown-item { display: flex; align-items: center; gap: 9px; border-radius: 6px; padding: 8px 10px; font-weight: 500; }
.fb-menu .dropdown-item:hover { background: var(--fb-line-2); }
.fb-menu-head { padding: 8px 10px 10px; }
.fb-menu-name { font-weight: 700; }
.fb-menu-email { font-size: .8125rem; color: var(--fb-ink-3); }
.fb-menu-role { font-size: .75rem; color: var(--link); font-weight: 600; margin-top: 2px; }

/* The platform owner inside a company: impossible to miss. */
.fb-owner-strip { display: flex; align-items: center; gap: 10px; padding: 9px var(--fb-pad); background: var(--ink); color: var(--ground); font-size: .875rem; font-weight: 500; }
.fb-owner-strip form { margin: 0; }
.fb-owner-strip-btn { background: var(--ground); color: var(--ink); border: 0; border-radius: 6px; padding: 5px 12px; font: inherit; font-size: .8125rem; font-weight: 700; }

/* ---------- owner panel ---------- */
.fb-owner-badge { display: inline-flex; align-items: center; gap: 6px; font-size: .8125rem; font-weight: 700; color: var(--fb-dark); background: var(--fb-line-2); padding: 4px 10px; border-radius: 999px; }

/* ---------- page head ---------- */
.fb-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.fb-page-title { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 4px; }
.fb-page-sub { color: var(--fb-ink-3); margin: 0; font-size: .875rem; max-width: 46rem; }
.fb-page-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fb-page-actions form { margin: 0; }
.fb-back { display: inline-flex; align-items: center; gap: 6px; font-size: .8125rem; font-weight: 600; color: var(--fb-ink-3); margin-bottom: 10px; }
[dir="rtl"] .fb-back svg { transform: scaleX(-1); }
[dir="rtl"] .fb-choice-arrow { transform: scaleX(-1); }

/* ---------- cards ---------- */
.fb-card { background: var(--surface); border: 1px solid var(--fb-line); border-radius: var(--fb-radius); padding: 22px 24px; }
.fb-card-flush { padding: 0; overflow: hidden; }
.fb-card-narrow { max-width: 44rem; }
.fb-card-warn { border-color: var(--fb-warn-line); background: var(--fb-warn-soft); }
.fb-card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 18px 24px; border-bottom: 1px solid var(--fb-line); }
.fb-card-flush > .fb-card-head:last-child { border-bottom: 0; }
.fb-card-title { font-size: 1rem; font-weight: 700; margin: 0 0 4px; }
.fb-card-head .fb-card-title { margin: 0; }
.fb-card-sub { color: var(--fb-ink-3); font-size: .8125rem; margin: 2px 0 0; }
.fb-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 24px; border-top: 1px solid var(--fb-line); background: var(--ground); font-size: .8125rem; }
.fb-card-foot-quiet { background: var(--surface); justify-content: flex-start; }
.fb-side-cards { display: flex; flex-direction: column; gap: 16px; }
.fb-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.fb-grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.fb-form-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
@media (min-width: 1100px) { .fb-form-layout { grid-template-columns: minmax(0, 1fr) 340px; } }

/* ---------- stats ---------- */
.fb-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 20px; }
.fb-stat { background: var(--surface); border: 1px solid var(--fb-line); border-radius: var(--fb-radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.fb-stat-warn { border-color: var(--fb-warn-line); }
.fb-stat-label { font-size: .8125rem; color: var(--fb-ink-3); font-weight: 500; }
.fb-stat-value { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }

/* ---------- tables ---------- */
.fb-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.fb-table th, .fb-table td { padding: 13px 24px; border-bottom: 1px solid var(--fb-line-2); vertical-align: middle; text-align: start; }
.fb-table thead th { background: var(--ground); color: var(--fb-ink-3); font-weight: 500; font-size: .8125rem; border-bottom: 1px solid var(--fb-line); white-space: nowrap; }
.fb-table tbody tr:last-child > * { border-bottom: 0; }
.fb-table .text-end { text-align: end; }
.fb-table .text-center { text-align: center; }
.fb-row-muted > * { color: var(--fb-ink-3); }
.fb-row-note td { padding-top: 0; font-size: .8125rem; color: var(--fb-ink-3); }
.fb-row-actions { display: inline-flex; align-items: center; gap: 6px; justify-content: flex-end; flex-wrap: nowrap; }
.fb-row-actions form { margin: 0; }
.fb-audit-details { color: var(--fb-ink-2); font-size: .8125rem; max-width: 38rem; overflow-wrap: anywhere; }

/* brand × location matrix */
.fb-matrix th[scope="row"] { min-width: 220px; font-weight: 400; }
.fb-matrix td { min-width: 200px; }
.fb-matrix-loc { color: var(--fb-ink-2); font-weight: 600; }
.fb-brand-cell { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.fb-brand-cell:hover { text-decoration: none; }
.fb-brand-cell-name { font-weight: 700; }
.fb-cell { display: flex; flex-direction: column; gap: 7px; color: var(--ink); padding: 4px 0; }
.fb-cell:hover { text-decoration: none; }
.fb-cell:hover .fb-cell-head { color: var(--link); }
.fb-cell.is-off { opacity: .6; }
.fb-cell-head { display: flex; align-items: center; gap: 7px; font-weight: 600; font-size: .8125rem; }
.fb-cell-add { width: 100%; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 12px; border: 1px dashed var(--fb-line); border-radius: var(--fb-radius-sm); background: transparent; color: var(--fb-ink-3); font: inherit; font-size: .8125rem; }
.fb-cell-add:hover { border-color: var(--fb-brand); color: var(--link); background: var(--fb-brand-soft); }
.fb-matrix form { margin: 0; }
.fb-dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; }
.fb-dot-on { background: var(--fb-brand); }
.fb-dot-off { background: var(--fb-line); }
.fb-legend { display: flex; gap: 16px; font-size: .8125rem; color: var(--fb-ink-3); }
.fb-legend span { display: inline-flex; align-items: center; gap: 6px; }

.fb-matrix-roles th[scope="row"] { min-width: 280px; }
.fb-check { width: 1.15em; height: 1.15em; }
.fb-check:checked { background-color: var(--fb-brand); border-color: var(--fb-brand); }
.fb-check:disabled { opacity: 1; }
.fb-check:disabled:checked { background-color: var(--stroke-2); border-color: var(--stroke-2); }
.fb-check-demo { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--stroke-2); vertical-align: -1px; }

/* ---------- small parts ---------- */
.fb-chips { display: inline-flex; flex-wrap: wrap; gap: 5px; }
.fb-chip { display: inline-block; font-size: .75rem; font-weight: 500; color: var(--fb-ink-2); background: var(--fb-line-2); border-radius: 5px; padding: 2px 8px; }
.fb-pill { display: inline-flex; align-items: center; font-size: .75rem; font-weight: 600; border-radius: 999px; padding: 2px 10px; background: var(--fb-brand-soft); color: var(--link); white-space: nowrap; }
.fb-pill-pos { background: var(--fb-pos-soft); color: var(--fb-pos); }
.fb-pill-neg { background: var(--fb-neg-soft); color: var(--fb-neg); }
.fb-pill-warn { background: var(--fb-warn-soft); color: var(--fb-warn); }
.fb-pill-muted { background: var(--fb-line-2); color: var(--fb-ink-3); }
.fb-pill-dark { background: var(--ink); color: var(--ground); }
.fb-role { display: inline-block; white-space: nowrap; font-size: .8125rem; font-weight: 600; border: 1px solid var(--fb-line); border-radius: 999px; padding: 3px 12px; background: var(--surface); }
.fb-role-owner { background: var(--ink); color: var(--ground); border-color: var(--ink); }

.fb-avatar { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 38px; height: 38px; border-radius: 10px; background: var(--fb-brand-soft); color: var(--link); font-weight: 700; font-size: .8125rem; }
.fb-avatar-sm { width: 30px; height: 30px; border-radius: 999px; font-size: .75rem; }
.fb-avatar-lg { width: 64px; height: 64px; border-radius: 16px; font-size: 1.25rem; }
.fb-logo { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; flex-shrink: 0; border: 1px solid var(--fb-line); background: #fff; }
.fb-logo-sm { width: 30px; height: 30px; border-radius: 8px; }
.fb-logo-lg { width: 96px; height: 96px; border-radius: 20px; }
.fb-logo-preview { display: flex; justify-content: center; padding: 8px 0 16px; }

.fb-person { display: flex; align-items: center; gap: 12px; }
.fb-person > span { display: flex; flex-direction: column; min-width: 0; }
.fb-person-name { font-weight: 600; display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fb-person-email { font-size: .8125rem; color: var(--fb-ink-3); }
.fb-person-lg { gap: 16px; }
.fb-person-lg .fb-page-title { margin: 0; }
[dir="rtl"] .fb-person-email { text-align: end; }

.fb-flash { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--fb-radius-sm); margin-bottom: 18px; font-size: .875rem; font-weight: 500; }
.fb-flash-success { background: var(--fb-pos-soft); color: var(--fb-pos); }
.fb-flash-error { background: var(--fb-neg-soft); color: var(--fb-neg); }
.fb-note { display: flex; align-items: center; gap: 8px; font-size: .8125rem; font-weight: 500; padding: 10px 12px; border-radius: var(--fb-radius-sm); }
.fb-note-warn { background: var(--fb-warn-soft); color: var(--fb-warn); }
.fb-note-ok { background: var(--fb-pos-soft); color: var(--fb-pos); }

.fb-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 40px 24px; color: var(--fb-ink-3); }
.fb-empty p { margin: 0; max-width: 32rem; }
.fb-empty-sm { padding: 22px 24px; }
.fb-empty-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

.fb-simple-list { list-style: none; margin: 0; padding: 0; }
.fb-simple-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--fb-line-2); font-size: .875rem; }
.fb-simple-list li:last-child { border-bottom: 0; }

.fb-progress { width: 100%; height: 8px; appearance: none; border: 0; border-radius: 999px; background: var(--fb-line-2); overflow: hidden; margin: 8px 0; }
.fb-progress::-webkit-progress-bar { background: var(--fb-line-2); border-radius: 999px; }
.fb-progress::-webkit-progress-value { background: var(--fb-brand); border-radius: 999px; }
.fb-progress::-moz-progress-bar { background: var(--fb-brand); border-radius: 999px; }
.fb-card-head .fb-progress { width: 180px; margin: 0; }
.fb-meter-row { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; margin-top: 6px; }

.fb-pager { display: flex; justify-content: space-between; gap: 8px; padding: 14px 24px; border-top: 1px solid var(--fb-line-2); }
.fb-pager:empty { display: none; }

/* ---------- setup steps ---------- */
.fb-steps { list-style: none; margin: 0; padding: 0; }
.fb-step { display: flex; align-items: center; gap: 14px; padding: 14px 24px; border-bottom: 1px solid var(--fb-line-2); }
.fb-step:last-child { border-bottom: 0; }
.fb-step-mark { width: 24px; height: 24px; border-radius: 999px; border: 1.5px solid var(--fb-line); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--on-status); }
.fb-step.is-done .fb-step-mark { background: var(--fb-pos); border-color: var(--fb-pos); }
.fb-step-text { flex: 1; display: flex; flex-direction: column; }
.fb-step-name { font-weight: 600; }
.fb-step.is-done .fb-step-name { color: var(--fb-ink-3); text-decoration: line-through; text-decoration-color: var(--fb-line); }
.fb-step-hint { font-size: .8125rem; color: var(--fb-ink-3); }

/* ---------- outlets on the dashboard ---------- */
.fb-outlet-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0; }
.fb-outlet-group { padding: 18px 24px; border-bottom: 1px solid var(--fb-line-2); border-inline-end: 1px solid var(--fb-line-2); }
.fb-outlet-group-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.fb-outlet-group-name { font-weight: 700; }
.fb-outlet-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.fb-outlet { display: flex; align-items: center; gap: 10px; font-size: .875rem; }
.fb-outlet.is-off { opacity: .55; }
.fb-outlet-name { font-weight: 600; }
.fb-outlet-channels { margin-inline-start: auto; font-size: .75rem; color: var(--fb-ink-3); white-space: nowrap; }

/* ---------- forms ---------- */
.fb-form { display: flex; flex-direction: column; gap: 16px; margin: 0; }
.fb-field { display: flex; flex-direction: column; gap: 6px; margin: 0; min-width: 0; }
.fb-field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.fb-label { font-size: .875rem; font-weight: 600; color: var(--ink); padding: 0; margin: 0; }
fieldset.fb-field { border: 0; padding: 0; }
legend.fb-label { float: none; width: auto; margin-bottom: 6px; }
.fb-hint { font-size: .8125rem; color: var(--fb-ink-3); line-height: 1.6; margin: 0; }
.fb-field-error { font-size: .8125rem; color: var(--fb-neg); font-weight: 500; }
.fb-field-error:empty { display: none; }
.form-control, .form-select { border-color: var(--fb-line); border-radius: var(--fb-radius-sm); padding: 9px 12px; font-size: .9375rem; }
.form-control:focus, .form-select:focus { border-color: var(--fb-brand); box-shadow: 0 0 0 3px var(--bs-focus-ring-color); }
.form-control-sm, .form-select-sm { padding: 5px 10px; font-size: .8125rem; }
.form-check-input:checked { background-color: var(--fb-brand); border-color: var(--fb-brand); }
.form-check-input:focus { box-shadow: 0 0 0 3px var(--bs-focus-ring-color); border-color: var(--fb-brand); }
.input-validation-error { border-color: var(--fb-neg); }
.fb-readonly { padding: 9px 12px; border-radius: var(--fb-radius-sm); background: var(--fb-line-2); color: var(--fb-ink-2); }
.fb-form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.fb-form-actions form { margin: 0; }

.fb-radio-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.fb-radio-card { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--fb-line); border-radius: var(--fb-radius-sm); cursor: pointer; }
.fb-radio-card:has(input:checked) { border-color: var(--fb-brand); background: var(--fb-brand-soft); }
.fb-radio-card input { margin-top: 4px; accent-color: var(--fb-brand); }
.fb-radio-card > span { display: flex; flex-direction: column; gap: 2px; }
.fb-toggle-card { border: 1px solid var(--fb-line); border-radius: var(--fb-radius-sm); padding: 14px 16px; }
.fb-toggle-card .form-check { margin-bottom: 6px; }
.fb-scope-pick { border: 1px solid var(--fb-line); border-radius: var(--fb-radius-sm); padding: 14px 16px; background: var(--ground); }
.fb-scope-pick[hidden] { display: none; }

.fb-inline-form { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; padding: 16px 24px; border-top: 1px solid var(--fb-line); background: var(--ground); margin: 0; }
.fb-inline-form .fb-field { flex: 1 1 180px; }
.fb-inline-form-tight { padding: 0; border: 0; background: transparent; align-items: center; }
.fb-inline-form-tight .form-control { width: 200px; }
.fb-inline-filter { display: flex; gap: 8px; margin: 0; }
.fb-search { position: relative; margin: 0; }
.fb-search svg { position: absolute; top: 50%; transform: translateY(-50%); inset-inline-start: 12px; color: var(--fb-ink-3); pointer-events: none; }
.fb-search .form-control { padding-inline-start: 36px; min-width: 260px; }

.fb-temp-password { border: 1px solid var(--fb-warn-line); background: var(--fb-warn-soft); border-radius: var(--fb-radius); padding: 18px 20px; margin-bottom: 20px; }
.fb-temp-password-head { display: flex; align-items: center; gap: 8px; color: var(--fb-warn); margin-bottom: 6px; }
.fb-temp-password p { font-size: .875rem; color: var(--fb-ink-2); }
.fb-temp-password-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.fb-temp-password-value { font-size: 1.25rem; font-weight: 700; letter-spacing: .06em; color: var(--ink); background: var(--surface); border: 1px solid var(--fb-line); padding: 6px 14px; border-radius: var(--fb-radius-sm); user-select: all; }

/* ---------- sign-in and notices ---------- */
.fb-auth { background: var(--ground); }
.fb-auth-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 40px 16px 24px; gap: 16px; }
.fb-auth-tag { margin: 0; color: var(--fb-ink-3); font-size: .875rem; }
.fb-lang-btn-quiet { background: transparent; }
.fb-auth-card { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--fb-line); border-radius: var(--radius); padding: 30px 28px; }
.fb-auth-title { font-size: 1.375rem; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 6px; }
.fb-auth-lead { color: var(--fb-ink-2); font-size: .9375rem; line-height: 1.8; margin: 0 0 20px; }
.fb-auth-note { text-align: center; font-size: .8125rem; color: var(--fb-ink-3); margin: 18px 0 0; }
.fb-auth-section { border-top: 1px solid var(--fb-line-2); margin-top: 20px; padding-top: 18px; }
.fb-section-title { font-size: .9375rem; font-weight: 700; margin: 0 0 8px; }
.fb-auth-foot { font-size: .8125rem; color: var(--fb-ink-3); margin-top: auto; }
.fb-choice-list { display: flex; flex-direction: column; gap: 10px; }
.fb-choice-list form { margin: 0; }
.fb-choice { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--fb-line); border-radius: var(--fb-radius); background: var(--surface); text-align: start; font: inherit; color: var(--ink); }
.fb-choice:hover, .fb-choice.is-current { border-color: var(--fb-brand); background: var(--fb-brand-soft); }
.fb-choice-text { flex: 1; display: flex; flex-direction: column; }
.fb-choice-name { font-weight: 700; }
.fb-choice-meta { font-size: .8125rem; color: var(--fb-ink-3); display: flex; gap: 8px; align-items: center; }
.fb-choice-arrow { color: var(--fb-ink-3); }

/* ---------- subscriptions, notifications, owner panel details ---------- */
.fb-card-body { padding: 16px 24px; }
.fb-card-muted { opacity: .7; }
.fb-card-title-row { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.fb-card-title-row .fb-card-title { margin: 0; }
.fb-logo-md { width: 64px; height: 64px; border-radius: 16px; }
.fb-input-short { max-width: 140px; }
.fb-person-link { color: var(--ink); }
.fb-person-link:hover { text-decoration: none; }
.fb-person-link:hover .fb-person-name { color: var(--link); }

.fb-facts { margin: 0; padding: 8px 24px 4px; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 4px 24px; }
.fb-facts > div { padding: 10px 0; border-bottom: 1px solid var(--fb-line-2); }
.fb-facts dt { font-size: .8125rem; color: var(--fb-ink-3); font-weight: 500; margin-bottom: 3px; }
.fb-facts dd { margin: 0; font-weight: 600; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.fb-facts dd .fb-muted { font-weight: 400; font-size: .8125rem; }
.fb-facts-flat { padding: 4px 0 0; }

.fb-actions-stack { border-top: 1px solid var(--fb-line); }
.fb-disclosure { border-bottom: 1px solid var(--fb-line-2); padding: 0 24px; }
.fb-actions-stack .fb-disclosure:last-child { border-bottom: 0; }
.fb-disclosure > summary { cursor: pointer; padding: 13px 0; font-weight: 600; font-size: .875rem; color: var(--ink); list-style: none; display: flex; align-items: center; gap: 8px; }
.fb-disclosure > summary::-webkit-details-marker { display: none; }
.fb-disclosure > summary::before { content: "+"; display: inline-flex; width: 18px; height: 18px; align-items: center; justify-content: center; border: 1px solid var(--fb-line); border-radius: 5px; font-size: .8125rem; color: var(--fb-ink-3); }
.fb-disclosure[open] > summary::before { content: "−"; }
.fb-disclosure[open] { padding-bottom: 16px; }
.fb-card .fb-disclosure { padding-inline: 0; border: 0; }

.fb-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.fb-tab { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--fb-line); color: var(--fb-ink-2); font-size: .8125rem; font-weight: 600; background: var(--surface); }
.fb-tab:hover { text-decoration: none; border-color: var(--fb-ink-3); color: var(--ink); }
.fb-tab.is-active { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.fb-stat-link { color: var(--ink); }
.fb-stat-link:hover { text-decoration: none; border-color: var(--fb-ink-3); }

.fb-table-compact th, .fb-table-compact td { padding: 8px 10px; }
.fb-tiers .form-control { max-width: 180px; }

.fb-member-list { list-style: none; margin: 0; padding: 6px 0; }
.fb-member-list li { display: flex; align-items: center; gap: 10px; padding: 9px 20px; }
.fb-member-list li.is-off { opacity: .5; }
.fb-member-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fb-member-text .fb-person-email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.fb-check-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px 16px; }
.fb-check-list li { display: flex; align-items: center; gap: 8px; font-size: .875rem; }
.fb-check-list li.is-on svg { color: var(--fb-pos); }
.fb-check-list li.is-off { color: var(--fb-ink-3); }


.fb-nav-lock { margin-inline-start: auto; opacity: .7; display: inline-flex; }
.fb-owner-strip-link { color: var(--ground); font-weight: 600; font-size: .8125rem; text-decoration: underline; text-decoration-color: var(--fb-brand); }
.fb-owner-strip-link:hover { color: var(--ground); }

/* strips under the top bar: subscription and banner notifications */
.fb-strip { display: flex; align-items: center; gap: 10px; padding: 10px 28px; font-size: .875rem; border-bottom: 1px solid var(--fb-line); }
.fb-strip form { margin: 0; }
.fb-strip a { font-weight: 700; white-space: nowrap; }
.fb-strip-info { background: var(--fb-brand-soft); color: var(--fb-brand-2); }
.fb-strip-warning { background: var(--fb-warn-soft); color: var(--warn); }
.fb-strip-critical { background: var(--fb-neg-soft); color: var(--fb-neg); }
.fb-strip-close { border: 0; background: transparent; color: inherit; padding: 4px; border-radius: 6px; display: inline-flex; }
.fb-strip-close:hover { background: var(--ground-2); }
@media (max-width: 575.98px) { .fb-strip { padding: 10px 16px; } }

/* notification list */
.fb-notice-list { list-style: none; margin: 0; padding: 0; }
.fb-notice { display: flex; align-items: flex-start; gap: 14px; padding: 16px 24px; border-bottom: 1px solid var(--fb-line-2); }
.fb-notice:last-child { border-bottom: 0; }
.fb-notice form { margin: 0; }
.fb-notice-mark { width: 9px; height: 9px; border-radius: 999px; margin-top: 7px; flex-shrink: 0; background: var(--fb-brand); }
.fb-notice-warning .fb-notice-mark { background: var(--fb-warn); }
.fb-notice-critical .fb-notice-mark { background: var(--fb-neg); }
.fb-notice.is-read .fb-notice-mark { background: var(--fb-line); }
.fb-notice.is-read .fb-notice-title { font-weight: 500; color: var(--fb-ink-2); }
.fb-notice-text { flex: 1; min-width: 0; }
.fb-notice-title { font-weight: 700; }
.fb-notice-body { color: var(--fb-ink-2); font-size: .875rem; line-height: 1.8; white-space: pre-line; }
.fb-notice-meta { color: var(--fb-ink-3); font-size: .75rem; margin-top: 4px; }

/* ---------- setup navigation: section tabs, linking page ---------- */
.fb-tabs-section { margin: -8px 0 20px; }
.fb-tabs-section .fb-tab { display: inline-flex; align-items: center; gap: 6px; }
.fb-btn-ghost { background: transparent; border: 1px solid transparent; color: var(--fb-ink-3); padding: 5px 11px; }
.fb-btn-ghost:hover { color: var(--link); background: var(--fb-brand-soft); }
a.fb-step-text { color: var(--ink); }
a.fb-step-text:hover { text-decoration: none; }
a.fb-step-text:hover .fb-step-name { color: var(--link); }
.fb-cell-cta { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; padding: 5px 10px; border-radius: 6px; background: var(--fb-brand-soft); color: var(--link); font-size: .8125rem; font-weight: 600; }
.fb-cell:hover .fb-cell-cta { background: var(--fb-brand); color: var(--fb-ink); }
.fb-listing-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 16px; }
@media (max-width: 575.98px) { .fb-listing-cards { grid-template-columns: 1fr; } }
.fb-listing-cards .fb-card { scroll-margin-top: 80px; }
.fb-listing-cards .fb-card:target { border-color: var(--fb-brand); box-shadow: 0 0 0 3px var(--bs-focus-ring-color); }
.fb-listing-list { list-style: none; margin: 0; padding: 4px 24px; }
.fb-listing-list li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--fb-line-2); }
.fb-listing-list li:last-child { border-bottom: 0; }
.fb-listing-list form { margin: 0 0 0 auto; }
[dir="rtl"] .fb-listing-list form { margin: 0 auto 0 0; }
.fb-listing-channel { font-weight: 600; min-width: 110px; }
.fb-listing-id { color: var(--fb-ink-2); }

/* ---------- sales: dashboard, uploads ---------- */
.fb-period-form { display: inline-flex; gap: 6px; align-items: center; margin-inline-start: auto; }
.fb-period-form .form-control { width: 150px; }

.fb-hero-card { display: flex; gap: 24px; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; background: var(--surface); border: 1px solid var(--fb-line); border-radius: var(--fb-radius); padding: 26px 28px; }
.fb-hero-label { font-size: .9375rem; font-weight: 600; color: var(--fb-ink-3); margin: 0 0 6px; }
.fb-hero-value { font-size: clamp(2rem, 5vw, 2.75rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.fb-hero-cur { font-size: 1rem; font-weight: 600; color: var(--fb-ink-3); }
.fb-hero-sub { margin: 10px 0 0; color: var(--fb-ink-2); }
.fb-hero-change { margin: 6px 0 0; font-size: .875rem; font-weight: 600; }
.fb-hero-change.is-up { color: var(--fb-pos); }
.fb-hero-change.is-down { color: var(--fb-neg); }
.fb-hero-stats { display: flex; gap: 28px; margin: 0; flex-wrap: wrap; }
.fb-hero-stats dt { font-size: .8125rem; color: var(--fb-ink-3); font-weight: 500; }
.fb-hero-stats dd { margin: 2px 0 0; font-size: 1.25rem; font-weight: 700; }

.fb-row-total > * { font-weight: 700; background: var(--ground); border-top: 1px solid var(--fb-line); }

.fb-waterfall { list-style: none; margin: 0; padding: 0; }
.fb-waterfall li { display: grid; grid-template-columns: minmax(120px, 1.4fr) 1fr 60px 90px; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--fb-line-2); font-size: .875rem; }
.fb-waterfall li:last-child { border-bottom: 0; }
.fb-waterfall .fb-waterfall-start, .fb-waterfall .fb-waterfall-end { grid-template-columns: 1fr auto; font-weight: 700; }
.fb-waterfall-end { border-top: 2px solid var(--ink); }
.fb-waterfall-pct { color: var(--fb-ink-3); text-align: end; }
.fb-waterfall li > .fb-num:last-child { text-align: end; }
.fb-waterfall-bar .fb-progress { margin: 0; }
.fb-progress-neg::-webkit-progress-value { background: var(--fb-neg); }
.fb-progress-neg::-moz-progress-bar { background: var(--fb-neg); }
@media (max-width: 575.98px) { .fb-waterfall li { grid-template-columns: 1fr 60px 90px; } .fb-waterfall-bar { display: none; } }

.fb-chart-wrap { width: 100%; overflow: hidden; }
.fb-chart { width: 100%; height: auto; display: block; }
.fb-bar-gross { fill: var(--series-1); }
.fb-bar-net { fill: var(--ink); }
.fb-chart-label { font-size: 9px; fill: var(--fb-ink-3); font-family: inherit; }
.fb-chart-axis { stroke: var(--fb-line); stroke-width: 1; }
.fb-dot-gross { background: var(--series-1); }
.fb-dot-net { background: var(--ink); }
[dir="rtl"] .fb-chart { transform: scaleX(-1); }
[dir="rtl"] .fb-chart-label { transform-box: fill-box; transform-origin: center; transform: scaleX(-1); }

.fb-upload { display: flex; flex-direction: column; gap: 14px; margin: 0; }
.fb-dropzone { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 28px 20px; border: 2px dashed var(--fb-line); border-radius: var(--fb-radius); background: var(--ground); color: var(--fb-ink-3); cursor: pointer; }
.fb-dropzone:hover, .fb-dropzone:focus-within { border-color: var(--fb-brand); color: var(--link); background: var(--fb-brand-soft); }
.fb-dropzone-title { font-weight: 700; color: var(--ink); }
.fb-dropzone input[type="file"] { max-width: 100%; font-size: .8125rem; }
.fb-upload > .btn { align-self: flex-start; }

.fb-check-list-single { grid-template-columns: 1fr; }
.fb-check-list li.is-warn { color: var(--fb-warn); }
.fb-check-list li.is-warn svg { color: var(--fb-warn); }

/* ----- dashboard alerts and breakdown ----- */
.fb-alerts { display: flex; flex-direction: column; gap: 10px; }
.fb-alert { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 14px; background: var(--surface); border: 1px solid var(--fb-line); border-radius: var(--fb-radius); padding: 14px 18px; color: var(--fb-ink-3); }
.fb-alert > svg { flex-shrink: 0; }
.fb-alert-text { flex: 1 1 260px; display: flex; flex-direction: column; gap: 2px; color: var(--ink); font-size: .875rem; line-height: 1.55; }
.fb-alert-sub { color: var(--fb-ink-2); font-size: .8125rem; }
.fb-alert .btn { flex-shrink: 0; }
.fb-alert-warn { background: var(--fb-warn-soft); border-color: color-mix(in srgb, var(--fb-warn) 28%, transparent); color: var(--fb-warn); }
.fb-alert-warn .btn { background: var(--surface); }
.fb-tabs-inline { margin: 0; }
.fb-change { font-weight: 600; white-space: nowrap; }
.fb-change.is-up { color: var(--fb-pos); }
.fb-change.is-down { color: var(--fb-neg); }

/* ----- reports ----- */
.fb-text-neg { color: var(--fb-neg); }
.fb-text-pos { color: var(--fb-pos); display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.fb-builder { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
@media (min-width: 992px) { .fb-builder { grid-template-columns: 290px minmax(0, 1fr); } }
.fb-builder-side { display: flex; flex-direction: column; gap: 12px; }
.fb-builder-form { display: flex; flex-direction: column; gap: 0; padding: 6px 18px; }
.fb-builder-section { border: 0; border-bottom: 1px solid var(--fb-line); margin: 0; padding: 14px 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.fb-builder-section:last-of-type { border-bottom: 0; }
.fb-builder-section legend { float: none; width: auto; margin: 0 0 2px; }
.fb-check-stack { display: flex; flex-direction: column; gap: 6px; }
.fb-check-scroll { max-height: 180px; overflow-y: auto; }
.fb-check-row { display: flex; align-items: center; gap: 8px; font-size: .875rem; cursor: pointer; margin: 0; }
.fb-check-row input { margin: 0; flex-shrink: 0; }
.fb-builder-dates { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.fb-builder-dates input { min-width: 0; }

.fb-segmented { display: flex; border: 1px solid var(--fb-line); border-radius: var(--fb-radius-sm); overflow: hidden; }
.fb-segmented label { flex: 1; margin: 0; cursor: pointer; }
.fb-segmented input { position: absolute; opacity: 0; pointer-events: none; }
.fb-segmented span { display: block; text-align: center; padding: 6px 8px; font-size: .8125rem; font-weight: 600; color: var(--fb-ink-2); }
.fb-segmented label + label span { border-inline-start: 1px solid var(--fb-line); }
.fb-segmented input:checked + span { background: var(--ink); color: var(--ground); }
.fb-segmented input:focus-visible + span { outline: 2px solid var(--fb-brand); outline-offset: -2px; }
.fb-segmented label.is-disabled { cursor: not-allowed; }
.fb-segmented label.is-disabled span { color: var(--fb-ink-3); opacity: .55; }
.fb-builder-main { min-width: 0; }
.fb-builder-meta { font-size: .8125rem; color: var(--fb-ink-3); margin: 0 0 12px; }
.fb-compare-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 12px; }
.fb-compare-item { background: var(--surface); border: 1px solid var(--fb-line); border-radius: var(--fb-radius-sm); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.fb-compare-label { font-size: .75rem; color: var(--fb-ink-3); font-weight: 600; }
.fb-compare-value { font-size: 1.125rem; font-weight: 700; }
.fb-compare-note { grid-column: 1 / -1; }
.fb-report-table td, .fb-report-table th { white-space: nowrap; }
.fb-row-subtotal > * { font-weight: 600; color: var(--fb-ink-2); background: var(--ground); }
.fb-row-group-start > * { border-top: 1px solid var(--fb-line); }
.fb-hbars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.fb-hbars li { display: grid; grid-template-columns: minmax(90px, 180px) 1fr 110px; gap: 12px; align-items: center; font-size: .875rem; }
.fb-hbars .fb-progress { width: 100%; margin: 0; }
.fb-hbars-value { text-align: end; font-weight: 600; }
@media (max-width: 575.98px) { .fb-hbars li { grid-template-columns: 1fr 90px; } .fb-hbars .fb-progress { display: none; } }
.fb-line { fill: none; stroke: var(--fb-brand); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.fb-line-dot { fill: var(--surface); stroke: var(--fb-brand); stroke-width: 1.2; }
.fb-report-list { list-style: none; margin: 0; padding: 0; }
.fb-report-list li { display: flex; align-items: center; gap: 12px; padding: 14px 24px; border-top: 1px solid var(--fb-line); }
.fb-report-list li:first-child { border-top: 0; }
.fb-report-link { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; color: var(--ink); }
.fb-report-link:hover { text-decoration: none; color: var(--link); }
.fb-report-name { font-weight: 700; }
.fb-report-meta { font-size: .8125rem; color: var(--fb-ink-3); }
.fb-report-flags { display: flex; gap: 6px; flex-wrap: wrap; }
.fb-template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.fb-template { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--fb-line); border-radius: var(--fb-radius); color: var(--ink); }
.fb-template:hover { text-decoration: none; border-color: var(--fb-brand); background: var(--fb-brand-soft); color: var(--ink); }
.fb-template-name { font-weight: 700; }
.fb-template-text { font-size: .875rem; color: var(--fb-ink-2); line-height: 1.55; }
.fb-journal-filter { align-items: center; }
.fb-select-auto { width: auto; }
.fb-journal-summary { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; font-size: .875rem; }
.fb-accounts-table td { vertical-align: top; }
.fb-accounts-table input { min-width: 110px; }
.fb-row-sub > td:first-child { padding-inline-start: 32px; color: var(--fb-ink-2); }
.fb-field-narrow { max-width: 200px; }
.fb-pinned { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }

/* ----- time analysis ----- */
.fb-heat { border-collapse: separate; border-spacing: 3px; width: 100%; min-width: 640px; table-layout: fixed; }
.fb-heat th { font-size: .6875rem; font-weight: 600; color: var(--fb-ink-3); text-align: center; white-space: nowrap; padding: 0 0 4px; }
.fb-heat tbody th { text-align: start; padding: 0 6px 0 8px; width: 70px; font-size: .75rem; color: var(--fb-ink-2); }
.fb-heat thead th:first-child { width: 70px; }
.fb-heat td { height: 26px; border-radius: 4px; }
.fb-heat-0 { background: var(--ground); }
.fb-heat-1 { background: color-mix(in srgb, var(--fb-brand) 12%, var(--surface)); }
.fb-heat-2 { background: color-mix(in srgb, var(--fb-brand) 30%, var(--surface)); }
.fb-heat-3 { background: color-mix(in srgb, var(--fb-brand) 50%, var(--surface)); }
.fb-heat-4 { background: color-mix(in srgb, var(--fb-brand) 72%, var(--surface)); }
.fb-heat-5 { background: var(--fb-brand); }
.fb-heat-legend { display: inline-flex; align-items: center; gap: 4px; font-size: .75rem; color: var(--fb-ink-3); }
.fb-heat-legend i { display: inline-block; width: 14px; height: 14px; border-radius: 3px; }
.fb-peaks { margin: 0; padding-inline-start: 20px; display: flex; flex-direction: column; gap: 10px; }
.fb-peaks li { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.fb-peaks-name { font-weight: 700; }
.fb-bar-accent { fill: var(--fb-warn); }


/* ----- API ----- */
.fb-api-key { font-size: .9375rem; letter-spacing: .02em; word-break: break-all; }
.fb-pre { background: var(--ground); border: 1px solid var(--fb-line); border-radius: var(--fb-radius-sm); padding: 14px 16px; font-size: .8125rem; line-height: 1.6; overflow-x: auto; margin: 8px 0 12px; text-align: left; }
.fb-pre code { background: none; padding: 0; color: var(--ink); }
.fb-api-steps { padding-inline-start: 20px; display: flex; flex-direction: column; gap: 6px; font-size: .875rem; color: var(--fb-ink-2); margin: 12px 0 0; }
