/* ==========================================================================
   Restaurant Management System page: dark theme + product showcase
   Loaded only by systems/restaurant-management-system.html (body.theme-kitchen).
   The page body goes charcoal to match the Gen-KitchenManagement app itself;
   the shared header stays as it is on every other page.
   ========================================================================== */

/* Dark tokens: the site's own variables are redefined inside <main>, so every
   shared component (cards, FAQ, tables, steps) picks up the dark colours. */
body.theme-kitchen { background: #111315; }
.theme-kitchen main {
  --color-bg: #111315;
  --color-bg-alt: #16191c;
  --color-surface: #1d2124;
  --color-text: #eceef0;
  --color-text-muted: #a3acb4;
  --color-border: rgba(255, 255, 255, 0.09);
  --color-primary-tint: rgba(255, 122, 69, 0.08);
  --color-accent-light: rgba(255, 122, 69, 0.14);
  --color-accent-text: #ff9e75;
  --color-primary-light: #8cc4ec;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 6px 14px rgba(0, 0, 0, 0.3), 0 14px 32px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 14px 28px rgba(0, 0, 0, 0.35), 0 30px 70px rgba(0, 0, 0, 0.45);

  /* page-only colours, taken from the app's palette */
  --k-surface-2: #252a2e;
  --k-line-strong: rgba(255, 255, 255, 0.16);
  --k-amber: #f2a93b;
  --k-ok: #5fc98f;
  --k-bad: #f2786a;
  --k-info: #6cb4f2;
  --k-viz: #3987e5;

  display: block;
  background: var(--color-bg);
  color: var(--color-text);
}
.theme-kitchen main ::selection { background: rgba(255, 122, 69, 0.35); color: #fff; }
.theme-kitchen .site-footer { margin-top: 0; background: #0b0d0f; border-top-color: var(--color-accent); }

/* Hero: charcoal instead of navy, with a warm kitchen glow */
.theme-kitchen .page-hero {
  background:
    radial-gradient(900px 520px at 88% -10%, rgba(255, 122, 69, 0.22), transparent 60%),
    radial-gradient(700px 480px at -10% 115%, rgba(242, 169, 59, 0.12), transparent 60%),
    linear-gradient(165deg, #1c1f22 0%, #111315 100%);
  padding-bottom: clamp(5rem, 9vw, 7rem);
}

/* Shared components with hard-coded light colours */
.theme-kitchen .card:hover { border-color: var(--k-line-strong); }
.theme-kitchen .card .icon-wrap {
  background: linear-gradient(135deg, rgba(255, 122, 69, 0.18), rgba(255, 122, 69, 0.06));
  border-color: rgba(255, 122, 69, 0.28);
  color: var(--color-accent-text);
}
.theme-kitchen .card .icon-wrap svg { width: 26px; height: 26px; }
.theme-kitchen .faq-item.open,
.theme-kitchen .faq-item:hover,
.theme-kitchen .step:hover { border-color: rgba(255, 122, 69, 0.45); }
.theme-kitchen .included-list li:hover { border-color: rgba(95, 201, 143, 0.4); }
.theme-kitchen .stats-grid strong { color: #fff; }
.theme-kitchen .cta-band .btn-dark { background: #111315; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); }
.theme-kitchen .cta-band .btn-dark:hover { background: #000; }

/* Comparison table: the custom column is the one we are selling */
.theme-kitchen .system-compare { border: 1px solid var(--color-border); overflow: hidden; }
.theme-kitchen .system-compare th,
.theme-kitchen .system-compare td { border-color: var(--color-border); color: var(--color-text-muted); padding: 0.85rem 1rem; }
.theme-kitchen .system-compare thead th { color: var(--color-text); background: var(--k-surface-2); }
.theme-kitchen .system-compare th[scope="row"] { color: var(--color-text); }
.theme-kitchen .system-compare thead th:last-child { color: #fff; background: rgba(255, 122, 69, 0.22); }
.theme-kitchen .system-compare tbody td:nth-child(3) { color: var(--color-text); background: rgba(255, 122, 69, 0.06); }
.theme-kitchen .system-compare td[colspan] { color: var(--color-text); background: rgba(95, 201, 143, 0.07); }

/* --------------------------------------------------------------------------
   Hero trust chips
   -------------------------------------------------------------------------- */
.rms-trust { display: flex; flex-wrap: wrap; gap: 0.5rem 1.1rem; max-width: 560px; margin-top: var(--space-3); }
.rms-trust li { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.9rem; color: rgba(255, 255, 255, 0.82); }
.rms-trust li::before {
  content: "";
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(95, 201, 143, 0.16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235fc98f' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 11px no-repeat;
}

/* --------------------------------------------------------------------------
   Pain -> fix cards
   -------------------------------------------------------------------------- */
.rms-pains { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
.rms-pain { padding: 0; overflow: hidden; }
.rms-pain .rms-before,
.rms-pain .rms-after { padding: var(--space-3) var(--space-4); }
.rms-pain .rms-before { border-bottom: 1px dashed var(--color-border); }
.rms-pain .rms-after { background: rgba(95, 201, 143, 0.05); }
.rms-pain .rms-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.rms-before .rms-label { color: var(--k-bad); }
.rms-after .rms-label { color: var(--k-ok); }
.rms-pain h3 { font-size: 1.08rem; margin-bottom: 0.3rem; }
.rms-pain p { margin: 0; font-size: 0.95rem; }

/* --------------------------------------------------------------------------
   Feature spotlights: copy beside a mock screen from the app
   -------------------------------------------------------------------------- */
.rms-spot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.rms-spot + .rms-spot { margin-top: clamp(3.5rem, 8vw, 6rem); }
.rms-spot--flip .rms-spot-copy { order: 2; }
.rms-hub {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: var(--space-2);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--k-amber);
}
.rms-hub svg { width: 18px; height: 18px; }
.rms-spot-copy h3 { font-size: clamp(1.4rem, 2.4vw, 1.85rem); margin-bottom: var(--space-2); }
.rms-spot-copy > p { font-size: 1.04rem; }
.rms-checks { display: grid; gap: 0.6rem; margin-top: var(--space-3); }
.rms-checks li { display: flex; gap: 0.65rem; color: var(--color-text); font-size: 0.97rem; }
.rms-checks li::before {
  content: "";
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 0.15rem;
  border-radius: 50%;
  background: rgba(95, 201, 143, 0.15) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235fc98f' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.rms-checks li.is-locked::before {
  background: rgba(242, 120, 106, 0.15) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f2786a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='6' y='11' width='12' height='9' rx='2'/%3E%3Cpath d='M9 11V8a3 3 0 016 0v3'/%3E%3C/svg%3E") center / 13px no-repeat;
}
.rms-checks li.is-locked { color: var(--color-text-muted); }

/* Mock app window (sample data, drawn in HTML so it stays sharp at any size) */
.rms-mock {
  position: relative;
  background: #1a1d20;
  border: 1px solid var(--k-line-strong);
  border-radius: 16px;
  box-shadow: var(--shadow-lg), 0 0 0 6px rgba(255, 255, 255, 0.025);
  overflow: hidden;
  font-size: 0.86rem;
}
.rms-mock::after {
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: 60%;
  height: 80%;
  background: radial-gradient(closest-side, rgba(255, 122, 69, 0.12), transparent);
  pointer-events: none;
}
.mk-top { display: flex; align-items: center; gap: 0.4rem; padding: 0.7rem 1rem; background: #202428; border-bottom: 1px solid var(--color-border); }
.mk-top i { width: 9px; height: 9px; border-radius: 50%; background: #3a3f44; }
.mk-top span { margin-left: 0.45rem; font-size: 0.76rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--color-text-muted); }
.mk-top em { margin-left: auto; padding: 0.15rem 0.55rem; border-radius: 999px; font-style: normal; font-size: 0.68rem; font-weight: 600; color: var(--k-amber); background: rgba(242, 169, 59, 0.14); }
.mk-body { display: grid; gap: 0.7rem; padding: 1rem; }
.mk-title { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; margin: 0.2rem 0 -0.1rem; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-text-muted); }

.mk-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.55rem; }
.mk-kpi,
.mk-row,
.mk-chart,
.mk-slip { background: var(--k-surface-2); border: 1px solid var(--color-border); border-radius: 10px; }
.mk-kpi { padding: 0.65rem 0.75rem; min-width: 0; }
.mk-kpi small { display: block; font-size: 0.7rem; color: var(--color-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-kpi b { display: block; font-size: 1.12rem; color: #fff; font-variant-numeric: tabular-nums; }
.mk-kpi .mk-delta { font-size: 0.7rem; font-weight: 600; }
.mk-ok { color: var(--k-ok); }
.mk-warn { color: var(--k-amber); }
.mk-bad { color: var(--k-bad); }

.mk-chart { display: flex; align-items: flex-end; gap: 4px; height: 110px; padding: 0.75rem 0.85rem 0.6rem; }
.mk-chart i { flex: 1; height: var(--h); min-height: 6px; border-radius: 3px 3px 0 0; background: var(--k-viz); opacity: 0.75; }
.mk-chart i:last-child { opacity: 1; background: #6da7ec; }

.mk-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.6rem 0.8rem; }
.mk-row > div { min-width: 0; }
.mk-row strong { display: block; color: #fff; font-weight: 600; }
.mk-row small { display: block; font-size: 0.74rem; color: var(--color-text-muted); }
.mk-pill { flex-shrink: 0; padding: 0.2rem 0.55rem; border-radius: 999px; font-size: 0.7rem; font-weight: 700; white-space: nowrap; }
.mk-pill.ok { color: var(--k-ok); background: rgba(95, 201, 143, 0.14); }
.mk-pill.warn { color: var(--k-amber); background: rgba(242, 169, 59, 0.14); }
.mk-pill.bad { color: var(--k-bad); background: rgba(242, 120, 106, 0.15); }
.mk-pill.info { color: var(--k-info); background: rgba(108, 180, 242, 0.14); }
.mk-btn { flex-shrink: 0; padding: 0.3rem 0.75rem; border-radius: 7px; font-size: 0.72rem; font-weight: 700; color: #fff; background: var(--color-accent); }
.mk-btn.ghost { color: var(--color-text); background: transparent; border: 1px solid var(--k-line-strong); }
.mk-actions { display: flex; gap: 0.4rem; flex-shrink: 0; }

/* Dish costing rows */
.mk-cost { display: grid; grid-template-columns: minmax(0, 1.7fr) repeat(2, minmax(0, 0.8fr)) auto; gap: 0.6rem; align-items: center; }
.mk-cost.mk-head { padding: 0 0.8rem; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-text-muted); }
.mk-cost .num { font-variant-numeric: tabular-nums; color: var(--color-text); }
.mk-dish { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.mk-dish img { width: 34px; height: 34px; flex-shrink: 0; border-radius: 8px; object-fit: cover; background: #2f3439; }
.mk-dish strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-target { display: flex; align-items: center; gap: 0.6rem; font-size: 0.74rem; color: var(--color-text-muted); }
.mk-meter { position: relative; flex: 1; height: 7px; border-radius: 7px; background: rgba(255, 255, 255, 0.08); }
.mk-meter i { position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: inherit; background: linear-gradient(90deg, var(--k-ok), var(--k-amber)); }
.mk-meter b { position: absolute; top: -4px; bottom: -4px; left: var(--t); width: 2px; background: #fff; border-radius: 2px; }

/* Stock level bar inside a row */
.mk-stock { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.35rem; font-size: 0.72rem; color: var(--color-text-muted); }
.mk-stock .mk-meter { width: 120px; flex: none; height: 5px; }
.mk-stock .mk-meter i { background: var(--k-bad); }
.mk-stock .mk-meter.warn i { background: var(--k-amber); }

/* Payslip */
.mk-slip { padding: 0.8rem 0.9rem; }
.mk-slip dl { display: grid; grid-template-columns: 1fr auto; gap: 0.35rem 1rem; margin: 0.5rem 0 0; }
.mk-slip dt { color: var(--color-text-muted); }
.mk-slip dd { margin: 0; text-align: right; color: var(--color-text); font-variant-numeric: tabular-nums; }
.mk-slip .mk-total { padding-top: 0.5rem; margin-top: 0.2rem; border-top: 1px dashed var(--k-line-strong); font-weight: 700; color: #fff; }

/* --------------------------------------------------------------------------
   "Everything else" tool grid
   -------------------------------------------------------------------------- */
.rms-tools { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-2); }
.rms-tool {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 1.1rem 1.15rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), transform 0.3s var(--ease), background var(--transition);
}
.rms-tool:hover { border-color: rgba(255, 122, 69, 0.4); background: #20252a; transform: translateY(-3px); }
.rms-tool svg { flex-shrink: 0; width: 22px; height: 22px; margin-top: 0.1rem; color: var(--color-accent-text); }
.rms-tool h3 { font-family: var(--font-body); font-size: 0.97rem; font-weight: 600; margin: 0 0 0.2rem; }
.rms-tool p { margin: 0; font-size: 0.86rem; line-height: 1.5; }
.rms-tools-note { margin: var(--space-4) auto 0; max-width: 640px; text-align: center; font-size: 0.92rem; }

/* --------------------------------------------------------------------------
   Owner vs staff
   -------------------------------------------------------------------------- */
.rms-roles { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
.rms-role { padding: var(--space-4); }
.rms-role-head { display: flex; align-items: center; gap: 0.9rem; margin-bottom: var(--space-2); }
.rms-role-head .icon-wrap { margin: 0; flex-shrink: 0; }
.rms-role-head h3 { margin: 0; }
.rms-role-head p { margin: 0; font-size: 0.9rem; }
.rms-role--owner { border-color: rgba(255, 122, 69, 0.35); background-image: linear-gradient(160deg, rgba(255, 122, 69, 0.08), transparent 55%); }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .rms-tools { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 960px) {
  .rms-spot { grid-template-columns: 1fr; }
  .rms-spot--flip .rms-spot-copy { order: 0; }
  .rms-tools { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .rms-pains, .rms-roles { grid-template-columns: 1fr; }
  .mk-kpis { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .rms-tools { grid-template-columns: 1fr; }
  .rms-pain .rms-before, .rms-pain .rms-after, .rms-role { padding: var(--space-3); }
  .mk-body { padding: 0.75rem; }
  .mk-cost { grid-template-columns: minmax(0, 1fr) auto; }
  .mk-cost .num,
  .mk-cost.mk-head span:nth-child(2),
  .mk-cost.mk-head span:nth-child(3) { display: none; }
  .mk-row { flex-wrap: wrap; }
  .mk-stock .mk-meter { width: 80px; }
}
@media (prefers-reduced-motion: reduce) {
  .rms-tool:hover { transform: none; }
}
