/* =====================================================================
   Fougito UI — shared component layer for all four back-office areas
   (Admin, Restaurant, HotelAndMall, Supplier).
   Place at:  WebApp/wwwroot/Admin/css/fougito-ui.css
   Link it LAST in every area _Layout.cshtml (after style.bundle.css,
   AdminLayout.css, cp-shared-buttons.css) so it wins over Metronic.
   Prefix: fg-  (does not collide with existing cp-* / kt-* classes)
   Radius is 0 everywhere. Font: Satoshi (already in ~/font/css/satoshi.css)
   Icons: Lucide icon font  <i class="icon-name"> — see README §Assets
   ===================================================================== */

:root {
  /* brand */
  --fg-red: #F05252;          /* primary action */
  --fg-red-hover: #D94444;
  --fg-red-press: #B83838;
  --fg-red-text: #B23434;     /* red text, eyebrows, links, negative */
  --fg-red-tint: #FCDDDD;     /* negative tag bg */
  --fg-red-wash: #FEF6F6;     /* eyebrow tag bg */
  --fg-red-line: #F2B8B8;     /* deactivate button border */
  /* ink */
  --fg-ink-900: #2E2A30;      /* headings, primary text */
  --fg-ink-700: #49454B;      /* body ink, 2px card rules, secondary btn text */
  --fg-ink-500: #6E6B70;      /* secondary text, table heads */
  --fg-ink-400: #A3A2A5;      /* placeholders, chevrons */
  --fg-ink-300: #B7B5B7;      /* input / secondary-button border */
  --fg-ink-200: #DBDADA;      /* dividers, chip borders */
  --fg-ink-150: #EDECEC;      /* table row divider */
  --fg-ink-100: #F5F6F6;      /* page ground, read-only fields, hover */
  --fg-ink-050: #FAFAFA;      /* table row hover, filter card ground */
  --fg-white: #FFFFFF;
  /* status tones (bg / text) */
  --fg-green-bg: #E1F0D9;  --fg-green: #3B6E22;  --fg-green-line: #BFDDB0;  --fg-green-dot: #6EBA45;
  --fg-amber-bg: #FFEDDE;  --fg-amber: #8F4C10;
  --fg-violet-bg: #E6E5F2; --fg-violet: #3D3A6E;
  --fg-neutral-bg: #F5F6F6; --fg-neutral: #6E6B70;
  --fg-star: #E8A33D;
  /* type */
  --fg-font: 'Satoshi', system-ui, sans-serif;
  --fg-mono: ui-monospace, Menlo, monospace;
  /* spacing (4-pt) */
  --fg-s1: 4px; --fg-s2: 8px; --fg-s3: 12px; --fg-s4: 16px; --fg-s5: 20px; --fg-s6: 24px; --fg-s8: 32px;
  /* layout */
  --fg-rail: 256px; --fg-rail-collapsed: 72px; --fg-flyout: 264px; --fg-topbar: 72px; --fg-drawer: 400px;
  --fg-shadow-dialog: 0 24px 64px rgba(46, 42, 48, .35);
  --fg-scrim: rgba(46, 42, 48, .55);
}

/* ---------- base ---------- */
.fg-app, .fg-app * { box-sizing: border-box; }
.fg-app { font-family: var(--fg-font); color: var(--fg-ink-700); background: var(--fg-ink-100); font-size: 14px; line-height: 1.5; }
.fg-app a { color: var(--fg-red-text); }
.fg-app a:hover { color: var(--fg-ink-700); }
.fg-app ::placeholder { color: var(--fg-ink-400); }
.fg-app :focus-visible { outline: 2px solid var(--fg-red); outline-offset: 2px; }
.fg-app [class*="fg-"] { border-radius: 0 !important; }

/* ---------- shell: rail, flyouts, top bar, drawer ---------- */
.fg-shell { display: flex; min-height: 100vh; }
.fg-rail { width: var(--fg-rail); flex: none; background: var(--fg-white); border-right: 2px solid var(--fg-ink-200); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 3; }
.fg-rail.is-collapsed { width: var(--fg-rail-collapsed); }
.fg-rail__logo { height: var(--fg-topbar); display: flex; align-items: center; padding: 0 20px; border-bottom: 2px solid var(--fg-ink-200); }
.fg-rail__logo img { height: 28px; width: auto; }
.fg-rail__area { padding: 20px 24px 8px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-ink-500); }
.fg-rail__nav { display: flex; flex-direction: column; padding: 0 12px; gap: 2px; overflow-y: auto; }
.fg-rail__item { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border: 0; background: transparent; color: var(--fg-ink-700); font: inherit; font-size: 14px; font-weight: 500; text-align: left; cursor: pointer; text-decoration: none; }
.fg-rail__item:hover { background: var(--fg-ink-100); color: var(--fg-ink-900); }
.fg-rail__item.is-active { background: var(--fg-ink-700); color: var(--fg-white); }
.fg-rail__item i { font-size: 18px; line-height: 1; flex: none; }
.fg-rail__item .fg-chev { margin-left: auto; font-size: 16px; opacity: .7; }
.fg-flyout { position: fixed; top: 0; bottom: 0; width: var(--fg-flyout); background: var(--fg-white); border-right: 2px solid var(--fg-ink-200); padding: 20px 12px; overflow-y: auto; z-index: 2; }
.fg-flyout__title { padding: 0 12px 12px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-ink-500); }

.fg-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fg-topbar { height: var(--fg-topbar); display: flex; align-items: center; gap: 16px; padding: 0 24px; background: var(--fg-white); border-bottom: 2px solid var(--fg-ink-200); position: sticky; top: 0; z-index: 2; }
.fg-topbar__search { display: flex; align-items: center; gap: 8px; height: 40px; flex: 0 1 360px; padding: 0 12px; border: 1px solid var(--fg-ink-200); color: var(--fg-ink-500); }
.fg-topbar__search input { flex: 1; border: 0; background: transparent; font: inherit; outline: none; }
.fg-kbd { font-size: 11px; font-weight: 700; padding: 2px 6px; border: 1px solid var(--fg-ink-200); color: var(--fg-ink-500); }
.fg-avatar { width: 40px; height: 40px; display: grid; place-items: center; background: var(--fg-ink-700); color: var(--fg-white); font-weight: 900; position: relative; }
.fg-avatar--lg { width: 80px; height: 80px; font-size: 26px; }
.fg-avatar__online { position: absolute; right: -4px; top: -4px; width: 14px; height: 14px; background: var(--fg-green-dot); border: 3px solid var(--fg-white); }

.fg-drawer-scrim { position: fixed; inset: 0; background: var(--fg-scrim); z-index: 40; }
.fg-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: var(--fg-drawer); max-width: 100vw; background: var(--fg-white); display: flex; flex-direction: column; z-index: 41; }
.fg-drawer__head { height: var(--fg-topbar); flex: none; display: flex; align-items: center; padding: 0 24px; border-bottom: 2px solid var(--fg-ink-200); font-size: 17px; font-weight: 700; color: var(--fg-ink-900); }
.fg-drawer__user { display: flex; gap: 18px; padding: 24px; border-bottom: 2px solid var(--fg-ink-700); }
.fg-drawer__name { font-size: 22px; font-weight: 700; line-height: 1.1; color: var(--fg-ink-900); }
.fg-drawer__item { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 0 12px; border: 0; border-bottom: 1px solid var(--fg-ink-200); background: var(--fg-white); color: var(--fg-ink-700); font: inherit; font-size: 14px; font-weight: 500; text-align: left; text-decoration: none; cursor: pointer; }
.fg-drawer__item:hover { background: var(--fg-ink-100); }
.fg-drawer__item .fg-ico { width: 34px; height: 34px; flex: none; display: grid; place-items: center; background: var(--fg-ink-100); }
.fg-drawer__item--danger { color: var(--fg-red-text); }
.fg-drawer__item--danger .fg-ico { background: var(--fg-red-wash); color: var(--fg-red); }

/* ---------- page header ---------- */
.fg-content { padding: 24px; display: flex; flex-direction: column; gap: 24px; max-width: 1600px; width: 100%; }
.fg-page-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; justify-content: space-between; }
.fg-kicker { font-size: 12px; font-weight: 600; color: var(--fg-ink-500); }
.fg-kicker a { color: var(--fg-ink-500); text-decoration: none; } .fg-kicker a:hover { color: var(--fg-red-text); }
.fg-page-title { margin: 4px 0 0; font-family: var(--fg-font); font-weight: 700; font-size: 28px; line-height: 1.15; letter-spacing: -.01em; color: var(--fg-ink-900); }
.fg-page-desc { margin: 6px 0 0; font-size: 14px; color: var(--fg-ink-500); max-width: 720px; text-wrap: pretty; }
.fg-head-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- cards / sections ---------- */
.fg-card { background: var(--fg-white); border-top: 2px solid var(--fg-ink-700); min-width: 0; }
.fg-card--danger { border-top-color: var(--fg-red-text); }
.fg-card__head { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; justify-content: space-between; padding: 20px 22px 6px; }
.fg-card__titles { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fg-card__title { margin: 0; font-weight: 700; font-size: 20px; line-height: 1.2; color: var(--fg-ink-900); }
.fg-card__sub { font-size: 13px; color: var(--fg-ink-500); }
.fg-card__body { padding: 20px 24px 24px; display: flex; flex-direction: column; gap: 16px; }
.fg-eyebrow { width: fit-content; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-red-text); background: var(--fg-red-wash); padding: 3px 8px; }
.fg-section-num { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-ink-500); }   /* "01 · Restaurant info" */
.fg-rule { display: flex; align-items: center; gap: 12px; } .fg-rule::after { content: ""; flex: 1; height: 1px; background: var(--fg-ink-200); }
.fg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px 20px; }
.fg-grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 20px; }
.fg-span-all { grid-column: 1 / -1; }

/* ---------- buttons ---------- */
.fg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; height: 42px; padding: 0 16px; border: 1px solid var(--fg-ink-300); background: var(--fg-white); color: var(--fg-ink-700); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap; text-decoration: none; }
.fg-btn:hover { background: var(--fg-ink-100); } .fg-btn:active { background: var(--fg-ink-200); }
.fg-btn i { font-size: 16px; line-height: 1; }
.fg-btn--primary { background: var(--fg-red); border-color: var(--fg-red); color: var(--fg-white); }
.fg-btn--primary:hover { background: var(--fg-red-hover); border-color: var(--fg-red-hover); } .fg-btn--primary:active { background: var(--fg-red-press); }
.fg-btn--dark { background: var(--fg-ink-700); border-color: var(--fg-ink-700); color: var(--fg-white); }
.fg-btn--negative { color: var(--fg-red-text); border-color: var(--fg-red-line); }
.fg-btn--positive { color: var(--fg-green); border-color: var(--fg-green-line); }
.fg-btn--sm { height: 34px; padding: 0 12px; font-size: 13px; gap: 6px; }
.fg-btn--icon { width: 34px; height: 34px; padding: 0; border-color: var(--fg-ink-200); }
.fg-btn--icon:hover { border-color: var(--fg-ink-700); }
.fg-btn[disabled], .fg-btn.is-disabled { opacity: .45; cursor: not-allowed; }
.fg-link-btn { padding: 0; border: 0; background: transparent; font: inherit; font-size: 13px; font-weight: 600; color: var(--fg-ink-700); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--fg-ink-300); }
.fg-link-btn:hover { color: var(--fg-red-text); text-decoration-color: var(--fg-red-text); }
.fg-actions { display: flex; gap: 6px; flex-wrap: wrap; }   /* row actions: icon buttons first, then labelled Activate/Deactivate */

/* ---------- segmented pills / presets / chips ---------- */
.fg-seg { display: inline-flex; border: 1px solid var(--fg-ink-200); }
.fg-seg button { height: 38px; padding: 0 14px; border: 0; background: var(--fg-white); color: var(--fg-ink-700); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.fg-seg button.is-active { background: var(--fg-ink-700); color: var(--fg-white); }
.fg-chip { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border: 1px solid var(--fg-ink-200); background: var(--fg-ink-100); color: var(--fg-ink-900); font: inherit; font-size: 13px; font-weight: 600; }
.fg-chip.is-active { background: var(--fg-ink-700); border-color: var(--fg-ink-700); color: var(--fg-white); }
.fg-chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- form controls ---------- */
.fg-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fg-label { font-size: 13px; font-weight: 700; color: var(--fg-ink-700); }
.fg-label .fg-req { color: var(--fg-red-text); }
.fg-input, .fg-select, .fg-textarea { width: 100%; min-width: 0; height: 44px; padding: 0 12px; border: 1px solid var(--fg-ink-300); background: var(--fg-white); font: inherit; font-size: 14px; color: var(--fg-ink-900); outline: none; }
.fg-input:focus, .fg-select:focus, .fg-textarea:focus { border-color: var(--fg-ink-700); }
.fg-textarea { height: auto; padding: 10px 12px; line-height: 1.5; resize: vertical; }
.fg-select { appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%236E6B70' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.fg-input[readonly], .fg-input:disabled, .fg-select:disabled, .fg-textarea[readonly] { background-color: var(--fg-ink-100); border-color: var(--fg-ink-200); }
.fg-input[dir="rtl"] { text-align: right; }
.fg-input-group { display: flex; gap: 8px; } .fg-input-group .fg-input { flex: 1; }
.fg-affix { display: flex; align-items: center; height: 44px; border: 1px solid var(--fg-ink-300); background: var(--fg-white); }
.fg-affix .fg-input { border: 0; height: 42px; }
.fg-affix__tag { padding: 0 12px; font-size: 13px; font-weight: 700; color: var(--fg-ink-500); border-left: 1px solid var(--fg-ink-200); }
.fg-hint { font-size: 12px; color: var(--fg-ink-500); }
.fg-error { font-size: 12px; font-weight: 600; color: var(--fg-red-text); }
.fg-field.has-error .fg-input, .fg-field.has-error .fg-select, .fg-field.has-error .fg-textarea { border-color: var(--fg-red-text); }
.fg-search { display: flex; align-items: center; gap: 8px; height: 40px; flex: 1 1 220px; max-width: 340px; padding: 0 12px; border: 1px solid var(--fg-ink-200); color: var(--fg-ink-500); }
.fg-search input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 13px; color: var(--fg-ink-900); outline: none; }

/* switch (replace Metronic .switch) */
.fg-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.fg-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.fg-switch__track { position: relative; width: 42px; height: 24px; background: var(--fg-ink-300); transition: background .15s; }
.fg-switch__track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; background: var(--fg-white); transition: left .15s; }
.fg-switch input:checked + .fg-switch__track { background: var(--fg-red); }
.fg-switch input:checked + .fg-switch__track::after { left: 20px; }
.fg-switch input:disabled + .fg-switch__track { opacity: .55; }
.fg-switch--sm .fg-switch__track { width: 38px; height: 22px; } .fg-switch--sm .fg-switch__track::after { width: 18px; height: 18px; } .fg-switch--sm input:checked + .fg-switch__track::after { left: 18px; }
.fg-switch__label { font-size: 13px; font-weight: 600; color: var(--fg-ink-700); }

/* 6-digit Device PIN */
.fg-pin { display: flex; gap: 8px; align-items: center; }
.fg-pin input { width: 44px; height: 48px; border: 1px solid var(--fg-ink-300); background: var(--fg-white); text-align: center; font: inherit; font-size: 20px; font-weight: 700; color: var(--fg-ink-900); outline: none; }
.fg-pin input:focus { border-color: var(--fg-ink-700); }

/* image upload tile (opens cropper) */
.fg-upload { display: flex; align-items: center; gap: 14px; }
.fg-upload__thumb { width: 72px; height: 72px; display: grid; place-items: center; border: 1px dashed var(--fg-ink-300); background: var(--fg-ink-100); color: var(--fg-ink-500); overflow: hidden; }
.fg-upload__thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- badges ---------- */
.fg-badge { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border: 1px solid transparent; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--fg-neutral-bg); color: var(--fg-neutral); }
.fg-badge::before { content: ""; width: 6px; height: 6px; background: currentColor; }
.fg-badge--green { background: var(--fg-green-bg); color: var(--fg-green); }
.fg-badge--red { background: var(--fg-red-tint); color: var(--fg-red-text); }
.fg-badge--amber { background: var(--fg-amber-bg); color: var(--fg-amber); }
.fg-badge--violet { background: var(--fg-violet-bg); color: var(--fg-violet); }
button.fg-badge { cursor: pointer; font-family: inherit; } button.fg-badge:hover { border-color: currentColor; }   /* clickable status → opens status popup */
.fg-tag { display: inline-block; font-size: 12px; font-weight: 700; color: var(--fg-red-text); background: var(--fg-red-wash); padding: 2px 8px; white-space: nowrap; }   /* sub-line under order no / name */

/* ---------- toolbar + table + pagination ---------- */
.fg-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 20px; }
.fg-toolbar__end { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--fg-ink-500); }
.fg-table-wrap { overflow-x: auto; }
.fg-table { width: 100%; border-collapse: collapse; }
.fg-table th { padding: 0 16px; height: 42px; border-bottom: 2px solid var(--fg-ink-700); text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-ink-500); white-space: nowrap; }
.fg-table th.is-sortable { cursor: pointer; } .fg-table th.is-sortable:hover { color: var(--fg-ink-900); background: var(--fg-ink-100); }
.fg-table td { padding: 12px 16px; border-bottom: 1px solid var(--fg-ink-150); vertical-align: middle; font-size: 13px; color: var(--fg-ink-700); }
.fg-table tbody tr:hover { background: var(--fg-ink-050); }
.fg-cell-two { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.fg-cell-two strong { font-weight: 600; color: var(--fg-ink-900); white-space: nowrap; }
.fg-cell-date { display: flex; flex-direction: column; gap: 2px; white-space: nowrap; } .fg-cell-date span { font-size: 12px; color: var(--fg-ink-500); }
.fg-person { display: flex; align-items: center; gap: 12px; }
.fg-person__ini { width: 40px; height: 40px; flex: none; display: grid; place-items: center; background: var(--fg-ink-100); color: var(--fg-ink-700); font-size: 13px; font-weight: 700; }
.fg-person__name { font-size: 13px; font-weight: 700; color: var(--fg-ink-900); } .fg-person__sub { font-size: 12px; color: var(--fg-ink-500); }
.fg-empty { padding: 28px 22px; font-size: 13px; color: var(--fg-ink-500); border-bottom: 1px solid var(--fg-ink-150); }
.fg-pager { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 14px 20px 18px; font-size: 13px; color: var(--fg-ink-500); }
.fg-pager__pages { display: flex; gap: 4px; }
.fg-pager__pages button { min-width: 34px; height: 34px; padding: 0 8px; border: 1px solid var(--fg-ink-200); background: var(--fg-white); color: var(--fg-ink-700); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.fg-pager__pages button.is-current { background: var(--fg-ink-700); border-color: var(--fg-ink-700); color: var(--fg-white); }
.fg-pager__pages button:disabled { opacity: .35; cursor: default; }

/* ---------- reporting-period filter card ---------- */
.fg-filter { background: var(--fg-white); border-top: 2px solid var(--fg-ink-700); padding: 18px 20px; display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.fg-filter__titles { margin-right: auto; display: flex; flex-direction: column; gap: 2px; }
.fg-filter__eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-ink-500); }
.fg-filter__title { font-size: 16px; font-weight: 700; color: var(--fg-ink-900); }
.fg-filter__help { flex-basis: 100%; font-size: 13px; color: var(--fg-ink-500); }
.fg-date { display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 10px; border: 1px solid var(--fg-ink-200); background: var(--fg-white); }
.fg-date input { border: 0; background: transparent; font: inherit; font-size: 13px; color: var(--fg-ink-900); outline: none; }

/* ---------- KPI tiles ---------- */
.fg-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); background: var(--fg-white); border-top: 2px solid var(--fg-ink-700); }
.fg-kpi { display: flex; align-items: center; gap: 16px; padding: 20px 22px; border-right: 1px solid var(--fg-ink-200); border-bottom: 1px solid var(--fg-ink-200); min-width: 0; }
.fg-kpi__icon { width: 48px; height: 48px; flex: none; display: grid; place-items: center; background: var(--fg-ink-100); color: var(--fg-ink-700); font-size: 20px; }
.fg-kpi__icon--primary { background: var(--fg-red); color: var(--fg-white); }
.fg-kpi__value { font-weight: 700; font-size: clamp(20px, 1.9vw, 26px); line-height: 1.1; letter-spacing: -.02em; color: var(--fg-ink-900); font-variant-numeric: tabular-nums; }
.fg-kpi__unit { font-size: 13px; font-weight: 700; color: var(--fg-ink-500); margin-left: 6px; }
.fg-kpi__label { font-size: 13px; font-weight: 600; color: var(--fg-ink-500); }

/* ---------- modal (replaces Bootstrap .modal-content styling) ---------- */
.fg-modal-scrim { position: fixed; inset: 0; z-index: 60; background: var(--fg-scrim); display: flex; align-items: center; justify-content: center; padding: 24px; overflow-y: auto; }
.fg-modal { width: 100%; max-width: 560px; max-height: calc(100vh - 48px); overflow: auto; background: var(--fg-white); border-top: 4px solid var(--fg-ink-700); box-shadow: var(--fg-shadow-dialog); display: flex; flex-direction: column; }
.fg-modal--wide { max-width: 880px; }
.fg-modal--alert { max-width: 440px; border-top-color: var(--fg-red-text); }
.fg-modal__head { display: flex; align-items: flex-start; gap: 16px; padding: 22px 24px 14px; }
.fg-modal__titles { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fg-modal__crumb { font-size: 12px; font-weight: 600; color: var(--fg-ink-500); }   /* "Setups · Table Management" */
.fg-modal__title { margin: 0; font-weight: 700; font-size: 22px; color: var(--fg-ink-900); }
.fg-modal__sub { font-size: 13px; color: var(--fg-ink-500); }
.fg-modal__close { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border: 1px solid var(--fg-ink-200); background: var(--fg-white); color: var(--fg-ink-700); cursor: pointer; }
.fg-modal__body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px 20px; padding: 8px 24px 20px; }
.fg-modal--wide .fg-modal__body { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.fg-modal__section { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 2px; padding-top: 8px; border-top: 1px solid var(--fg-ink-200); }
.fg-modal__section strong { font-size: 13px; color: var(--fg-ink-900); } .fg-modal__section span { font-size: 12px; color: var(--fg-ink-500); }
.fg-modal__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--fg-ink-200); }
.fg-modal__note { margin-right: auto; font-size: 12px; color: var(--fg-ink-500); }   /* "Branch, name and rate required" */
.fg-alert-icon { width: 44px; height: 44px; flex: none; display: grid; place-items: center; background: var(--fg-red-tint); color: var(--fg-red-text); font-size: 20px; }

/* ---------- order details ---------- */
.fg-status-hero { display: flex; align-items: center; gap: 20px; padding: 20px; background: var(--fg-ink-100); }
.fg-status-hero__icon { width: 88px; height: 88px; flex: none; display: grid; place-items: center; background: var(--fg-white); color: var(--fg-red-text); font-size: 40px; }
.fg-status-hero__label { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-red-text); }
.fg-status-hero__value { font-weight: 700; font-size: 26px; color: var(--fg-ink-900); }
.fg-totals { display: flex; flex-direction: column; gap: 8px; padding: 16px; background: var(--fg-ink-100); }
.fg-totals__row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; font-weight: 700; color: var(--fg-ink-700); }
.fg-totals__grand { display: flex; justify-content: space-between; padding-top: 8px; border-top: 1px solid var(--fg-ink-200); font-size: 15px; font-weight: 700; color: var(--fg-red-text); }

/* ---------- asset / banner gallery tiles ---------- */
.fg-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.fg-tile { position: relative; aspect-ratio: 16 / 7; background: var(--fg-ink-100); border: 1px solid var(--fg-ink-200); display: flex; align-items: flex-end; padding: 10px; }
.fg-tile__actions { position: absolute; top: 8px; right: 8px; display: flex; gap: 6px; }

/* ---------- toast (replaces toastr theme) ---------- */
.fg-toast { position: fixed; right: 24px; bottom: 24px; z-index: 80; min-width: 280px; max-width: 420px; padding: 14px 16px; background: var(--fg-ink-900); color: var(--fg-white); font-size: 14px; font-weight: 600; box-shadow: var(--fg-shadow-dialog); }
.fg-toast--error { background: var(--fg-red-text); }

/* ---------- QR card ---------- */
.fg-qr-card { width: 300px; padding: 24px; border: 2px solid var(--fg-ink-900); background: var(--fg-white); display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.fg-qr-card__caption { font-size: 13px; color: var(--fg-ink-500); }
.fg-qr-card__brand { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-ink-500); }

@media (max-width: 960px) {
  .fg-rail { position: fixed; left: 0; transform: translateX(-100%); transition: transform .2s; }
  .fg-rail.is-open { transform: none; }
  .fg-content { padding: 16px; }
  .fg-page-title { font-size: 24px; }
}
@media print {
  .fg-rail, .fg-topbar, .fg-head-actions, .fg-toolbar, .fg-pager { display: none !important; }
  .fg-app { background: #FFFFFF; }
}
