/* Restaurant UI - shared stylesheet for all customer, staff and kitchen
   screens. Plain, dense and readable: system fonts, neutral greys, one
   brand colour (--rk-brand), square corners, no gradients or shadows. */

:root {
  --rk-brand: #1F4E79;
  --rk-brand-ink: #FFFFFF;
  --rk-bg: #F3F4F6;
  --rk-surface: #FFFFFF;
  --rk-ink: #1F2328;
  --rk-ink-2: #57606A;
  --rk-ink-3: #8C959F;
  --rk-line: #D0D7DE;
  --rk-line-2: #E6E9ED;
  --rk-ok: #1A7F37;
  --rk-warn: #9A6700;
  --rk-bad: #CF222E;
  --rk-info: #0969DA;
  --rk-font: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --rk-mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, "Liberation Mono", monospace;
  --rk-r: 4px;
}

.rk, .rk * { box-sizing: border-box; }
.rk {
  margin: 0;
  font-family: var(--rk-font);
  font-size: 14px;
  line-height: 1.45;
  color: var(--rk-ink);
  background: var(--rk-bg);
  -webkit-font-smoothing: antialiased;
}
.rk h1, .rk h2, .rk h3 { margin: 0; font-weight: 600; letter-spacing: 0; }
.rk h1 { font-size: 22px; }
.rk h2 { font-size: 17px; }
.rk h3 { font-size: 15px; }
.rk a { color: var(--rk-brand); }
.rk .num { font-family: var(--rk-mono); font-variant-numeric: tabular-nums; }
.rk .muted { color: var(--rk-ink-2); }
.rk .faint { color: var(--rk-ink-3); }
.rk .wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* Top bar */
.rk-topbar {
  background: var(--rk-brand);
  color: var(--rk-brand-ink);
  height: 56px;
  display: flex;
  align-items: center;
}
.rk-topbar .wrap, .rk-topbar .bar {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
}
.rk-topbar .bar { padding: 0 20px; }
.rk-topbar .brand { font-size: 18px; font-weight: 700; white-space: nowrap; }
.rk-topbar .sub { font-size: 12px; opacity: .8; }
.rk-topbar .spacer { flex: 1; }
.rk-topbar .clock { font-family: var(--rk-mono); font-size: 16px; opacity: .9; }

/* Buttons */
.rk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--rk-line);
  border-radius: var(--rk-r);
  background: var(--rk-surface);
  color: var(--rk-ink);
  font: 600 13px var(--rk-font);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.rk-btn:hover { background: #F6F8FA; }
.rk-btn:disabled { opacity: .5; cursor: not-allowed; }
.rk-btn-primary { background: var(--rk-brand); border-color: var(--rk-brand); color: var(--rk-brand-ink); }
.rk-btn-primary:hover { background: var(--rk-brand); filter: brightness(1.1); }
.rk-btn-ok { background: var(--rk-ok); border-color: var(--rk-ok); color: #fff; }
.rk-btn-bad { background: #fff; border-color: var(--rk-bad); color: var(--rk-bad); }
.rk-btn-lg { min-height: 48px; font-size: 15px; padding: 0 20px; }
.rk-btn-block { display: flex; width: 100%; }

/* Panels and tables */
.rk-panel {
  background: var(--rk-surface);
  border: 1px solid var(--rk-line);
  border-radius: var(--rk-r);
}
.rk-panel-hd {
  padding: 12px 16px;
  border-bottom: 1px solid var(--rk-line);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.rk-panel-bd { padding: 16px; }
.rk-table { width: 100%; border-collapse: collapse; }
.rk-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--rk-ink-2);
  background: #F6F8FA;
  padding: 8px 12px;
  border-bottom: 1px solid var(--rk-line);
}
.rk-table td { padding: 10px 12px; border-bottom: 1px solid var(--rk-line-2); vertical-align: top; }
.rk-table tr:last-child td { border-bottom: none; }

/* Status tags: plain text tags with a thin border */
.rk-tag {
  display: inline-block;
  padding: 1px 8px;
  border: 1px solid var(--rk-line);
  border-radius: var(--rk-r);
  font-size: 12px;
  font-weight: 600;
  color: var(--rk-ink-2);
  background: #fff;
  white-space: nowrap;
}
.rk-tag.ok { color: var(--rk-ok); border-color: #A7D7B3; background: #F0FAF2; }
.rk-tag.warn { color: var(--rk-warn); border-color: #E6CF8E; background: #FFF8E5; }
.rk-tag.bad { color: var(--rk-bad); border-color: #F2B8BD; background: #FFF1F2; }
.rk-tag.info { color: var(--rk-info); border-color: #A8C8F0; background: #F0F6FF; }

/* Stat tiles */
.rk-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.rk-stat { background: var(--rk-surface); border: 1px solid var(--rk-line); border-radius: var(--rk-r); padding: 12px 16px; }
.rk-stat .v { font-family: var(--rk-mono); font-size: 26px; font-weight: 600; }
.rk-stat .l { font-size: 12px; color: var(--rk-ink-2); }

/* Forms */
.rk-field { margin-bottom: 12px; }
.rk-field label { display: block; font-size: 12px; font-weight: 600; color: var(--rk-ink-2); margin-bottom: 4px; }
.rk-input, .rk select, .rk textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--rk-line);
  border-radius: var(--rk-r);
  background: #fff;
  font: 14px var(--rk-font);
  color: var(--rk-ink);
}
.rk-input:focus, .rk select:focus, .rk textarea:focus { outline: 2px solid var(--rk-brand); outline-offset: -1px; }
.rk-help { font-size: 12px; color: var(--rk-ink-3); margin-top: 4px; }
.rk-alert { padding: 10px 14px; border: 1px solid; border-radius: var(--rk-r); font-weight: 600; }
.rk-alert.bad { color: var(--rk-bad); border-color: #F2B8BD; background: #FFF1F2; }
.rk-alert.ok { color: var(--rk-ok); border-color: #A7D7B3; background: #F0FAF2; }

/* Centered message pages */
.rk-center { min-height: 70vh; display: flex; align-items: center; justify-content: center; padding: 40px 16px; }
.rk-card { width: 100%; max-width: 480px; background: #fff; border: 1px solid var(--rk-line); border-radius: var(--rk-r); padding: 28px; }
.rk-card h1 { margin-bottom: 6px; }
.rk-kv { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--rk-line-2); }
.rk-kv:last-child { border-bottom: none; }
.rk-bignum { font-family: var(--rk-mono); font-size: 44px; font-weight: 700; color: var(--rk-brand); margin: 8px 0 4px; }

/* Empty states */
.rk-empty { text-align: center; padding: 48px 16px; color: var(--rk-ink-3); }

/* Kitchen screens: dark canvas, light tickets, coloured header by age */
.rk-kitchen { background: #1C1E21; color: #E6E6E6; }
.rk-kitchen .rk-topbar { background: #2B2F33; color: #fff; border-bottom: 1px solid #000; }
.rk-ticket {
  background: #fff;
  color: #111;
  border-radius: var(--rk-r);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.rk-ticket-hd { padding: 8px 10px; background: #3A3F44; color: #fff; display: flex; justify-content: space-between; align-items: flex-start; }
.rk-ticket.age-warn .rk-ticket-hd { background: #B07D00; }
.rk-ticket.age-late .rk-ticket-hd { background: #B3261E; }
.rk-ticket.started .rk-ticket-hd { background: var(--rk-brand); }
.rk-ticket.rush { outline: 3px solid #B3261E; }

@media (max-width: 760px) {
  .rk-stats { grid-template-columns: repeat(2, 1fr); }
}

/* Buttons written as links: keep the button colours even when the website
   theme or company colours set a link colour. */
a.rk-btn, a.rk-btn:visited, a.rk-btn:focus { color: var(--rk-ink); text-decoration: none; }
a.rk-btn:hover { color: var(--rk-ink); }
a.rk-btn.rk-btn-primary, a.rk-btn.rk-btn-primary:visited, a.rk-btn.rk-btn-primary:hover, a.rk-btn.rk-btn-primary:focus { color: var(--rk-brand-ink) !important; }
a.rk-btn.rk-btn-ok, a.rk-btn.rk-btn-ok:visited, a.rk-btn.rk-btn-ok:hover, a.rk-btn.rk-btn-ok:focus { color: #fff !important; }
a.rk-btn.rk-btn-bad, a.rk-btn.rk-btn-bad:visited, a.rk-btn.rk-btn-bad:hover { color: var(--rk-bad) !important; }
