/* =========================================================
   Ruticomidas — design tokens
   Hazard-tape editorial system on a near-black canvas.
   ========================================================= */

:root {
  /* Brand hazards */
  --mint: #3cffd0;
  --mint-border: #309875;
  --ultraviolet: #5200ff;
  --ultraviolet-dark: #3d00bf;
  --link-blue: #3860be;
  --focus-cyan: #1eaedb;

  /* Surfaces */
  --canvas: #131313;
  --slate: #2d2d2d;
  --slate-2: #1d1d1d;
  --frame: #313131;
  --white: #ffffff;
  --black: #000000;

  /* Text */
  --text: #ffffff;
  --text-muted: #e9e9e9;
  --text-meta: #949494;
  --text-dim: #8c8c8c;
  --text-invert: #131313;

  /* Tile palette */
  --tile-mint: #3cffd0;
  --tile-purple: #5200ff;
  --tile-yellow: #f3e600;
  --tile-pink: #ff7ad9;
  --tile-orange: #ff6a1a;
  --tile-electric: #2864ff;
  --tile-white: #ffffff;

  /* Semantic states */
  --state-error:   var(--tile-pink);
  --state-warning: var(--tile-orange);
  --state-success: var(--mint);
  --state-info:    var(--focus-cyan);

  /* Radii */
  --r-1: 2px;
  --r-2: 3px;
  --r-3: 4px;
  --r-pill: 20px;
  --r-feature: 24px;
  --r-promo: 30px;
  --r-loud: 40px;
  --r-round: 999px;
  --r-card-m: 16px;

  /* Tracking */
  --track-mono: 0.11em;
  --track-caps: 0.16em;
  --track-whisper: 0.10em;

  /* Fonts */
  --f-display: 'Anton', Impact, Helvetica, sans-serif;
  --f-sans: 'Space Grotesk', Helvetica, Arial, sans-serif;
  --f-mono: 'Space Mono', 'Courier New', Courier, monospace;
  --f-serif: 'Newsreader', Georgia, serif;
}

/* =========================================================
   Reset
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--canvas);
  color: var(--text);
  font-family: var(--f-sans);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
}
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
a { color: inherit; text-decoration: none; transition: color 150ms ease; }
a:hover { color: var(--link-blue); }
::selection { background: var(--mint); color: var(--black); }

/* Focus-visible ring (B3) — uses --focus-cyan token */
:where(
  .btn, .nav-link, .chip, a[href],
  input, select, textarea,
  .modal__close, .modal__close,
  .week-nav button, .topbar .bell,
  .plan-cell, .shop-row .check,
  .recipe-card, .queue-card
):focus-visible {
  outline: 2px solid var(--focus-cyan);
  outline-offset: 2px;
}

/* Scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--canvas); }
::-webkit-scrollbar-thumb { background: var(--slate); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--frame); }

/* =========================================================
   Type utilities
   ========================================================= */
.t-hero {
  font-family: var(--f-display);
  font-weight: 400; /* Anton is single-weight */
  font-size: clamp(56px, 9vw, 140px);
  line-height: 0.88;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.masthead h1 {
  margin: 0 0 18px;
  padding-bottom: 4px;
}
.masthead h1 + .deck { margin-top: 4px; }
.t-display-2 {
  font-family: var(--f-display);
  font-size: clamp(40px, 5.5vw, 76px);
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0.005em;
}
.t-display-3 {
  font-family: var(--f-display);
  font-size: clamp(32px, 4vw, 60px);
  line-height: 0.92;
  text-transform: uppercase;
}
.t-headline-l {
  font-family: var(--f-sans);
  font-weight: 700;
  font-size: 34px;
  line-height: 1.02;
  letter-spacing: -0.01em;
}
.t-headline-m {
  font-family: var(--f-sans);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.06;
  letter-spacing: -0.005em;
}
.t-headline-s {
  font-family: var(--f-sans);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.1;
}
.t-whisper {
  font-family: var(--f-sans);
  font-weight: 300;
  font-size: 19px;
  line-height: 1.2;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}
.t-body {
  font-family: var(--f-sans);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.55;
}
.t-body-bold {
  font-family: var(--f-sans);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.5;
}
.t-mono-label {
  font-family: var(--f-mono);
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
  letter-spacing: var(--track-mono);
  text-transform: uppercase;
}
.t-mono-micro {
  font-family: var(--f-mono);
  font-weight: 400;
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.t-eyebrow {
  font-family: var(--f-sans);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.t-serif {
  font-family: var(--f-serif);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.4;
  font-style: italic;
}
.t-measure { max-width: 68ch; }

.dim { color: var(--text-meta); }
.muted { color: var(--text-dim); }
.invert { color: var(--text-invert); }

/* =========================================================
   App shell
   ========================================================= */
.app {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  background: var(--canvas);
  border-right: 1px solid var(--frame);
  padding: 28px 20px 20px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.brand {
  font-family: var(--f-display);
  font-size: 40px;
  line-height: 0.88;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  color: var(--text);
  display: block;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--frame);
  word-break: break-word;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.nav-group-label {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-meta);
  padding: 0 8px 6px;
}
.nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--r-pill);
  font-family: var(--f-sans);
  font-weight: 500;
  font-size: 14px;
  color: var(--text-muted);
  border: 1px solid transparent;
  background: transparent;
  width: 100%;
  text-align: left;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}
.nav-link:hover { color: var(--link-blue); border-color: var(--frame); }
.nav-link.active {
  background: var(--mint);
  color: var(--black);
  border-color: var(--mint);
}
.nav-link.active:hover { color: var(--black); }
.nav-link .count {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  padding: 2px 8px;
  border-radius: var(--r-round);
  background: rgba(255,255,255,0.08);
  color: var(--text);
}
.nav-link.active .count { background: rgba(0,0,0,0.18); color: var(--black); }

.sidebar-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--frame);
  border-radius: var(--r-pill);
}
.user-chip .avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--ultraviolet);
  display: grid; place-items: center;
  font-family: var(--f-display);
  font-size: 18px;
  color: var(--white);
}
.user-chip .who { display: flex; flex-direction: column; line-height: 1.1; }
.user-chip .who .name { font-weight: 700; font-size: 13px; }
.user-chip .who .role { font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-meta); }

/* Main column */
.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--canvas);
  border-bottom: 1px solid var(--frame);
  padding: 14px 32px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.crumbs {
  display: flex; gap: 10px; align-items: center;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-meta);
}
.crumbs .here { color: var(--mint-border); }
.crumbs .sep { color: var(--frame); }
.topbar-spacer { flex: 1; }
.topbar-search {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--frame);
  border-radius: var(--r-round);
  padding: 6px 14px;
  min-width: 260px;
  color: var(--text-meta);
  background: var(--canvas);
  transition: border-color 150ms ease;
}
.topbar-search:focus-within { border-color: var(--mint); }
.topbar-search input {
  background: none; border: 0; outline: 0; color: var(--text);
  font-family: var(--f-sans); font-size: 13px;
  flex: 1; min-width: 0;
}
.topbar-search .kbd {
  font-family: var(--f-mono); font-size: 10px;
  padding: 2px 6px; border: 1px solid var(--frame); border-radius: var(--r-3);
  color: var(--text-meta);
}
.topbar .bell {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--frame);
  background: var(--canvas);
  display: grid; place-items: center;
  color: var(--text); position: relative;
}
.topbar .bell .dot {
  position: absolute; top: 7px; right: 8px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 2px var(--canvas);
}

/* Masthead inside each screen */
.masthead {
  padding: 36px 32px 24px;
  border-bottom: 1px dashed var(--frame);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.masthead .kicker {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mint-border);
  margin-bottom: 10px;
}
.masthead h1 {
  margin: 0 0 8px;
}
.masthead .deck {
  font-family: var(--f-sans);
  font-weight: 300;
  font-size: 17px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-meta);
  max-width: 520px;
}
.masthead-stats {
  display: flex; gap: 24px;
}
.stat {
  border-left: 1px solid var(--frame);
  padding-left: 16px;
  min-width: 110px;
}
.stat .label {
  font-family: var(--f-mono); font-size: 10px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-meta);
  margin-bottom: 6px;
}
.stat .value {
  font-family: var(--f-display);
  font-size: 38px;
  line-height: 1;
}
.stat .delta {
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase;
  margin-top: 6px;
  color: var(--mint);
}
.stat .delta.down { color: var(--tile-pink); }

/* Screen body */
.screen {
  padding: 28px 32px 80px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* =========================================================
   Reusable components
   ========================================================= */

/* Pill button */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--r-feature);
  border: 1px solid transparent;
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
  background: var(--slate);
  color: var(--text-muted);
}
.btn:hover {
  background: rgba(255,255,255,0.12);
  color: var(--text);
  box-shadow: 0 0 0 1px #c2c2c2;
}
.btn--primary {
  background: var(--mint);
  color: var(--black);
}
.btn--primary:hover { background: var(--white); color: var(--black); }
.btn--outline {
  background: transparent;
  color: var(--mint);
  border: 1px solid var(--mint);
  border-radius: var(--r-loud);
}
.btn--outline:hover { background: var(--mint); color: var(--black); }
.btn--ultra {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--ultraviolet);
  border-radius: var(--r-promo);
}
.btn--ultra:hover { background: var(--ultraviolet); color: var(--white); }
.btn--ghost { background: transparent; color: var(--text-meta); }
.btn--ghost:hover { color: var(--text); background: var(--slate-2); box-shadow: none; }
.btn--sm { padding: 7px 14px; font-size: 10px; letter-spacing: 0.12em; }
.btn--icon { padding: 8px; width: 36px; height: 36px; justify-content: center; }

/* Tag pill (non-interactive) */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-family: var(--f-mono); font-size: 10px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  background: var(--slate);
  color: var(--text);
  border: 1px solid transparent;
}
.tag--mint { background: var(--mint); color: var(--black); }
.tag--ultra { background: var(--ultraviolet); color: var(--white); }
.tag--yellow { background: var(--tile-yellow); color: var(--black); }
.tag--pink { background: var(--tile-pink); color: var(--black); }
.tag--orange { background: var(--tile-orange); color: var(--black); }
.tag--electric { background: var(--tile-electric); color: var(--white); }
.tag--outline { background: transparent; border-color: var(--frame); color: var(--text-meta); }
.tag--outline-mint { background: transparent; border-color: var(--mint); color: var(--mint); }

/* Card */
.card {
  background: var(--canvas);
  border: 1px solid var(--frame);
  border-radius: var(--r-feature);
  padding: 24px;
}
.card--block {
  border: 0;
  color: var(--black);
}
.card--mint { background: var(--mint); }
.card--ultra { background: var(--ultraviolet); color: var(--white); }
.card--yellow { background: var(--tile-yellow); }
.card--pink { background: var(--tile-pink); }
.card--white { background: var(--white); color: var(--black); }

/* Image placeholder — striped, with mono caption */
.imgph {
  position: relative;
  width: 100%;
  border-radius: var(--r-3);
  border: 1px solid var(--frame);
  background:
    repeating-linear-gradient(
      135deg,
      #1f1f1f 0,
      #1f1f1f 8px,
      #181818 8px,
      #181818 16px
    );
  display: grid;
  place-items: center;
  color: var(--text-meta);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  overflow: hidden;
}
.imgph::after {
  content: attr(data-label);
  padding: 4px 8px;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--frame);
  border-radius: var(--r-3);
}
.imgph[data-tone="mint"] {
  background:
    repeating-linear-gradient(135deg, #4cffd6 0, #4cffd6 8px, #3cffd0 8px, #3cffd0 16px);
  color: rgba(0,0,0,0.6);
}
.imgph[data-tone="purple"] {
  background:
    repeating-linear-gradient(135deg, #5b09ff 0, #5b09ff 8px, #4a00e8 8px, #4a00e8 16px);
  color: rgba(255,255,255,0.7);
}
.imgph[data-tone="yellow"] {
  background:
    repeating-linear-gradient(135deg, #fff200 0, #fff200 8px, #e6d800 8px, #e6d800 16px);
  color: rgba(0,0,0,0.6);
}
.imgph[data-tone="pink"] {
  background:
    repeating-linear-gradient(135deg, #ff86dd 0, #ff86dd 8px, #ff6dd0 8px, #ff6dd0 16px);
  color: rgba(0,0,0,0.55);
}
.imgph[data-tone="orange"] {
  background:
    repeating-linear-gradient(135deg, #ff7a30 0, #ff7a30 8px, #ff6315 8px, #ff6315 16px);
  color: rgba(0,0,0,0.55);
}

/* Inputs */
.field {
  display: flex; flex-direction: column; gap: 6px;
}
.field label {
  font-family: var(--f-mono); font-size: 10px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-meta);
}
.input, .select {
  background: var(--canvas);
  border: 1px solid var(--frame);
  border-radius: var(--r-1);
  color: var(--text);
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
  transition: border-color 150ms ease;
}
.input:focus, .select:focus { border-color: var(--mint); }

/* Section header inside screens */
.section-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 16px;
}
.section-head h2 { margin: 0; }
.section-head .sub {
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-meta);
}

/* Layout helpers */
.row { display: flex; gap: 12px; align-items: center; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.stack-2 { display: flex; flex-direction: column; gap: 8px; }
.stack-3 { display: flex; flex-direction: column; gap: 12px; }
.stack-4 { display: flex; flex-direction: column; gap: 16px; }
.stack-6 { display: flex; flex-direction: column; gap: 24px; }

/* Timeline rail (StoryStream-inspired, for ticket queue + activity) */
.rail {
  position: relative;
  padding-left: 100px;
}
.rail::before {
  content: '';
  position: absolute;
  left: 78px; top: 8px; bottom: 8px;
  width: 1px;
  background-image: linear-gradient(to bottom, var(--ultraviolet-dark) 50%, transparent 50%);
  background-size: 1px 8px;
}
.rail-item {
  position: relative;
  margin-bottom: 14px;
}
.rail-time {
  position: absolute;
  left: -100px; top: 18px;
  width: 70px;
  font-family: var(--f-mono); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-meta);
  text-align: right;
}
.rail-item::after {
  content: '';
  position: absolute;
  left: -23px; top: 24px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--mint);
  border: 2px solid var(--canvas);
}
.rail-item.purple::after { background: var(--ultraviolet); }

/* Progress bar (used in budgets) */
.progress {
  height: 6px;
  background: var(--slate);
  border-radius: var(--r-round);
  overflow: hidden;
  position: relative;
}
.progress > span {
  display: block;
  height: 100%;
  background: var(--mint);
  border-radius: var(--r-round);
}
.progress--over > span { background: var(--tile-pink); }

/* Divider */
.hr {
  border: 0;
  border-top: 1px dashed var(--frame);
  margin: 0;
}

/* Small icon (inline SVG-sized) */
.ico {
  width: 16px; height: 16px;
  display: inline-block; vertical-align: middle;
}

/* =========================================================
   PLANNING — weekly grid
   ========================================================= */
.week-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.week-nav {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--frame);
  border-radius: var(--r-round);
  padding: 4px;
}
.week-nav button {
  background: transparent; border: 0; color: var(--text-muted);
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  transition: background 150ms ease, color 150ms ease;
}
.week-nav button:hover { background: var(--slate); color: var(--text); }
.week-nav .label {
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: 0.16em; text-transform: uppercase;
  padding: 0 10px;
}

.planning-grid {
  display: grid;
  grid-template-columns: 120px repeat(7, minmax(0, 1fr));
  gap: 10px;
}
.plan-cell {
  background: var(--slate-2);
  border: 1px solid var(--frame);
  border-radius: var(--r-pill);
  padding: 14px 14px 10px;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 150ms ease, background 150ms ease;
  cursor: pointer;
  position: relative;
  text-align: left;
  font-family: inherit;
  color: inherit;
  width: 100%;
  overflow: hidden;
}
.plan-cell:hover { border-color: var(--mint); }
.plan-cell.empty {
  background: transparent;
  border-style: dashed;
  align-items: center;
  justify-content: center;
  color: var(--text-meta);
  font-family: var(--f-mono); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
}
.plan-cell .meal-tag {
  font-family: var(--f-mono); font-size: 9px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-meta);
}
.plan-cell .meal-title {
  font-family: var(--f-sans); font-weight: 700;
  font-size: 14px; line-height: 1.2;
  color: var(--text);
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: auto;
}
.plan-cell .meal-loose {
  display: flex; flex-direction: column; gap: 3px;
  margin-top: 2px;
  padding-top: 8px;
  border-top: 1px dashed var(--frame);
}
.plan-cell .meal-loose .ll {
  font-family: var(--f-mono); font-size: 9px;
  letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--mint-border);
}
.plan-cell .meal-loose .lr {
  font-family: var(--f-sans); font-weight: 500;
  font-size: 12px; line-height: 1.25;
  color: var(--text-muted);
  display: flex; justify-content: space-between; gap: 6px;
}
.plan-cell .meal-loose .lr .qq {
  font-family: var(--f-mono); font-size: 9px;
  letter-spacing: 0.10em; color: var(--text-meta);
}
.plan-cell .add-loose {
  margin-top: auto;
  font-family: var(--f-mono); font-size: 9px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-meta);
  border: 1px dashed var(--frame);
  border-radius: var(--r-round);
  padding: 5px 6px;
  background: transparent;
  align-self: stretch;
  text-align: center;
  cursor: pointer;
  transition: color 120ms ease, border-color 120ms ease, background 120ms ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.plan-cell .add-loose:hover {
  color: var(--mint);
  border-color: var(--mint);
}
.plan-cell.not-consumed .meal-title,
.plan-cell.not-consumed .meal-tag {
  opacity: 0.45;
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

/* Recipe-tinted planning tiles. Applied when a meal has a recipe assigned. */
.plan-cell.tone-mint   { background: var(--mint);          border-color: var(--mint); }
.plan-cell.tone-yellow { background: var(--tile-yellow);   border-color: var(--tile-yellow); }
.plan-cell.tone-pink   { background: var(--tile-pink);     border-color: var(--tile-pink); }
.plan-cell.tone-orange { background: var(--tile-orange);   border-color: var(--tile-orange); }
.plan-cell.tone-purple { background: var(--ultraviolet);   border-color: var(--ultraviolet); }
.plan-cell.tone-electric { background: var(--tile-electric); border-color: var(--tile-electric); }
.plan-cell.tone-blue   { background: var(--tile-electric); border-color: var(--tile-electric); }

/* Dark-text tones */
.plan-cell.tone-mint   .meal-title,
.plan-cell.tone-yellow .meal-title,
.plan-cell.tone-pink   .meal-title,
.plan-cell.tone-orange .meal-title { color: var(--black); }
.plan-cell.tone-mint   .meal-tag,
.plan-cell.tone-yellow .meal-tag,
.plan-cell.tone-pink   .meal-tag,
.plan-cell.tone-orange .meal-tag { color: rgba(0,0,0,0.55); }
.plan-cell.tone-mint   .meal-loose .ll,
.plan-cell.tone-yellow .meal-loose .ll,
.plan-cell.tone-pink   .meal-loose .ll,
.plan-cell.tone-orange .meal-loose .ll { color: rgba(0,0,0,0.7); }
.plan-cell.tone-mint   .meal-loose .lr,
.plan-cell.tone-yellow .meal-loose .lr,
.plan-cell.tone-pink   .meal-loose .lr,
.plan-cell.tone-orange .meal-loose .lr { color: rgba(0,0,0,0.85); }
.plan-cell.tone-mint   .meal-loose,
.plan-cell.tone-yellow .meal-loose,
.plan-cell.tone-pink   .meal-loose,
.plan-cell.tone-orange .meal-loose { border-top-color: rgba(0,0,0,0.18); }
.plan-cell.tone-mint   .add-loose,
.plan-cell.tone-yellow .add-loose,
.plan-cell.tone-pink   .add-loose,
.plan-cell.tone-orange .add-loose {
  color: rgba(0,0,0,0.55);
  border-color: rgba(0,0,0,0.25);
}
.plan-cell.tone-mint   .add-loose:hover,
.plan-cell.tone-yellow .add-loose:hover,
.plan-cell.tone-pink   .add-loose:hover,
.plan-cell.tone-orange .add-loose:hover { color: var(--black); border-color: var(--black); background: rgba(0,0,0,0.08); }

/* Light-text tones */
.plan-cell.tone-purple .meal-title,
.plan-cell.tone-electric .meal-title,
.plan-cell.tone-blue .meal-title { color: var(--white); }
.plan-cell.tone-purple .meal-tag,
.plan-cell.tone-electric .meal-tag,
.plan-cell.tone-blue .meal-tag { color: rgba(255,255,255,0.7); }
.plan-cell.tone-purple .meal-loose .ll,
.plan-cell.tone-electric .meal-loose .ll,
.plan-cell.tone-blue .meal-loose .ll { color: rgba(255,255,255,0.85); }
.plan-cell.tone-purple .meal-loose,
.plan-cell.tone-electric .meal-loose,
.plan-cell.tone-blue .meal-loose { border-top-color: rgba(255,255,255,0.2); }
.plan-cell.tone-purple .add-loose,
.plan-cell.tone-electric .add-loose,
.plan-cell.tone-blue .add-loose {
  color: rgba(255,255,255,0.7);
  border-color: rgba(255,255,255,0.3);
}
.plan-cell.tone-purple .add-loose:hover,
.plan-cell.tone-electric .add-loose:hover,
.plan-cell.tone-blue .add-loose:hover { color: var(--white); border-color: var(--white); background: rgba(255,255,255,0.08); }

/* Past day → desaturate the tile + strike through the meal text */
.plan-cell.past {
  filter: brightness(0.5) saturate(0.65);
}
.plan-cell.past .meal-title,
.plan-cell.past .meal-tag,
.plan-cell.past .meal-loose .lr {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}
.plan-cell.past .add-loose { display: none; }
.plan-cell.past .meal-loose .lr .qq { text-decoration: line-through; }

/* ── Per-recipe rows within a multi-recipe plan cell ─────────────────── */
.plan-cell .recipe-row {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  padding-bottom: 6px;
  margin-bottom: 2px;
  border-bottom: 1px dashed var(--frame);
  cursor: pointer;
  transition: opacity 100ms ease;
}
.plan-cell .recipe-row:hover { opacity: 0.8; }
.plan-cell .recipe-row:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}
.plan-cell .recipe-row.not-consumed .meal-title {
  opacity: 0.4;
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}
.plan-cell .recipe-row.not-consumed .meal-tag { opacity: 0.4; }
/* recipe-btn--del still used for loose ingredient × buttons */
.plan-cell .recipe-btn--del {
  background: none; border: none; cursor: pointer;
  font-size: 11px; padding: 1px 3px; line-height: 1.4;
  color: inherit; opacity: 0.45; flex-shrink: 0; margin-top: 1px;
  transition: opacity 120ms ease, color 120ms ease;
}
.plan-cell .recipe-btn--del:hover { color: var(--tile-pink); opacity: 1; }
/* Separator color adapts to tone context */
.plan-cell.tone-mint   .recipe-row,
.plan-cell.tone-yellow .recipe-row,
.plan-cell.tone-pink   .recipe-row,
.plan-cell.tone-orange .recipe-row { border-bottom-color: rgba(0,0,0,0.15); }
.plan-cell.tone-purple .recipe-row,
.plan-cell.tone-electric .recipe-row { border-bottom-color: rgba(255,255,255,0.15); }
/* Two action buttons sharing the bottom row */
.plan-cell .add-row { display: flex; gap: 4px; margin-top: auto; }
.plan-cell .add-row .add-loose { flex: 1; margin-top: 0; }
/* Past day hides the action row */
.plan-cell.past .add-row { display: none; }

/* Today border ring still wins over tone borders */
.plan-cell.today {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
}

.plan-row-head {
  display: flex; align-items: center; justify-content: flex-start;
  padding: 12px;
  font-family: var(--f-mono); font-weight: 700;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text);
}
.plan-day-head {
  padding: 8px 12px;
  border-bottom: 1px solid var(--frame);
  display: flex; flex-direction: column; gap: 2px;
}
.plan-day-head .dow {
  font-family: var(--f-mono); font-size: 10px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-meta);
}
.plan-day-head .dom {
  font-family: var(--f-display);
  font-size: 28px; line-height: 1;
}
.plan-day-head.today .dom { color: var(--mint); }
.plan-day-head.today .dow { color: var(--mint); }

/* =========================================================
   RECIPES
   ========================================================= */
.recipe-filters {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.chip {
  padding: 7px 14px;
  border-radius: var(--r-round);
  border: 1px solid var(--frame);
  background: transparent;
  font-family: var(--f-mono); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-muted);
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}
.chip:hover { border-color: var(--text); color: var(--text); }
.chip.active { background: var(--text); color: var(--black); border-color: var(--text); }

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.recipe-card {
  border-radius: var(--r-feature);
  overflow: hidden;
  border: 1px solid var(--frame);
  background: var(--slate-2);
  display: flex; flex-direction: column;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease;
}
.recipe-card:hover { border-color: var(--mint); background: var(--canvas); }
.recipe-card .imgph { height: 160px; border-radius: 0; border-left: 0; border-right: 0; border-top: 0; }
.recipe-card__bar {
  min-height: 108px;
  position: relative;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 12px 16px 14px;
}
.recipe-card__bar-meta {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
}
.recipe-card__bar.tone-mint   { background: var(--mint);          color: rgba(0,0,0,0.75); }
.recipe-card__bar.tone-yellow { background: var(--tile-yellow);   color: rgba(0,0,0,0.75); }
.recipe-card__bar.tone-pink   { background: var(--tile-pink);     color: rgba(0,0,0,0.75); }
.recipe-card__bar.tone-orange { background: var(--tile-orange);   color: rgba(0,0,0,0.75); }
.recipe-card__bar.tone-purple { background: var(--ultraviolet);   color: rgba(255,255,255,0.85); }
.recipe-card__bar.tone-electric { background: var(--tile-electric); color: rgba(255,255,255,0.85); }
.recipe-card__bar.tone-blue   { background: var(--tile-electric); color: rgba(255,255,255,0.85); }
.recipe-card__title {
  font-family: var(--f-sans); font-weight: 700;
  font-size: 20px; line-height: 1.15;
  color: inherit;
  margin-top: 4px;
}
.recipe-card__body { padding: 16px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.recipe-card__meta {
  display: flex; justify-content: space-between; align-items: center;
  gap: 8px; flex-wrap: wrap;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px dashed var(--frame);
}
.recipe-card__meta .price {
  font-family: var(--f-mono);
  font-size: 18px; line-height: 1; font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--mint);
}
/* ingredient rows inside card */
.recipe-card__ings {
  display: flex; flex-direction: column; gap: 3px;
  max-height: 120px; overflow: hidden;
}
.recipe-card__ing {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 12px; color: var(--text-meta);
  padding: 1px 0;
  position: relative;
}
.recipe-card__ing .ing-price {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--text-dim);
  opacity: 0.45;
  transition: opacity 150ms ease, color 150ms ease;
  margin-left: 8px;
  flex-shrink: 0;
}
.recipe-card__ing:hover .ing-price { opacity: 1; color: var(--mint-border); }
.recipe-card__ing .ing-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recipe-card__ing .ing-qty  { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.1em; color: var(--text-dim); margin-left: 6px; flex-shrink: 0; }
/* keep feature class harmless (still referenced in other lists) */
.recipe-card--public { border-color: var(--ultraviolet); }

/* =========================================================
   SHOPPING LIST
   ========================================================= */
.market-block {
  border: 1px solid var(--frame);
  border-radius: var(--r-feature);
  overflow: hidden;
}
.market-block__head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--frame);
  background: var(--slate-2);
}
.market-block__name {
  font-family: var(--f-display);
  font-size: 28px; line-height: 1;
  text-transform: uppercase;
}
.market-block__list { list-style: none; margin: 0; padding: 0; }
.shop-row {
  display: grid;
  grid-template-columns: 28px 1fr auto auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px dashed var(--frame);
  transition: background 150ms ease;
}
.shop-row:last-child { border-bottom: 0; }
.shop-row:hover { background: var(--slate-2); }
.shop-row.checked .name { text-decoration: line-through; color: var(--text-meta); }
.shop-row .check {
  width: 22px; height: 22px;
  border: 1px solid var(--text-meta);
  border-radius: var(--r-3);
  display: grid; place-items: center;
  cursor: pointer;
  background: transparent;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}
.shop-row .check.on {
  background: var(--mint);
  border-color: var(--mint);
  color: var(--black);
}
.shop-row .name { font-weight: 600; font-size: 15px; }
.shop-row .qty {
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-meta);
}
.shop-row .price {
  font-family: var(--f-display);
  font-size: 22px; line-height: 1;
}
.shop-row .src {
  font-family: var(--f-mono); font-size: 9px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-meta);
}

/* =========================================================
   EXPENSES — dashboard
   ========================================================= */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.kpi {
  border-radius: var(--r-feature);
  padding: 20px;
  display: flex; flex-direction: column; gap: 8px;
  min-height: 130px;
}
.kpi .label {
  font-family: var(--f-mono); font-size: 10px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-meta);
}
.kpi.invert .label { color: rgba(0,0,0,0.55); }
.kpi .v {
  font-family: var(--f-display);
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 0.92;
  word-break: break-word;
}
.kpi .sub {
  font-family: var(--f-mono); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-meta);
  margin-top: auto;
}
.kpi.invert .sub { color: rgba(0,0,0,0.6); }
.kpi--mint { background: var(--mint); color: var(--black); }
.kpi--ultra { background: var(--ultraviolet); color: var(--white); }
.kpi--ultra .label, .kpi--ultra .sub { color: rgba(255,255,255,0.65); }
.kpi--canvas { background: var(--canvas); border: 1px solid var(--frame); }
.kpi--yellow { background: var(--tile-yellow); color: var(--black); }
.kpi--yellow .label, .kpi--yellow .sub { color: rgba(0,0,0,0.6); }

.cols-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.cols-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 16px;
}
.cols-l-r {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
}

.budget-row {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px dashed var(--frame);
}
.budget-row:last-child { border-bottom: 0; }
.budget-row .icon {
  width: 26px; height: 26px;
  border-radius: var(--r-3);
  display: grid; place-items: center;
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: 0; text-transform: none;
}
.budget-row .name {
  display: flex; flex-direction: column; gap: 5px;
}
.budget-row .name .top {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 12px;
}
.budget-row .name .label {
  font-family: var(--f-sans); font-weight: 600;
  font-size: 14px;
}
.budget-row .name .pct {
  font-family: var(--f-mono); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-meta);
}
.budget-row .amount {
  font-family: var(--f-display);
  font-size: 22px; line-height: 1; text-align: right;
}
.budget-row .amount .of {
  display: block;
  font-family: var(--f-mono); font-size: 9px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-meta);
  margin-top: 4px;
}

/* Bar chart */
.bars {
  display: flex; align-items: flex-end; gap: 12px;
  height: 180px;
  padding: 12px 0 0;
}
.bar {
  flex: 1;
  height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 8px;
  min-width: 0;
}
.bar .col {
  width: 100%;
  background: var(--slate);
  border-radius: var(--r-3) var(--r-3) 0 0;
  position: relative;
  min-height: 4px;
}
.bar .col.mint { background: var(--mint); }
.bar .col.ultra { background: var(--ultraviolet); }
.bar .col .v {
  position: absolute; top: -22px; left: 50%; transform: translateX(-50%);
  font-family: var(--f-mono); font-size: 10px;
  letter-spacing: 0.1em; color: var(--text-meta);
  white-space: nowrap;
}
.bar .lbl {
  font-family: var(--f-mono); font-size: 9px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-meta);
}

/* Donut (CSS conic) */
.donut {
  width: 180px; height: 180px;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}
.donut::after {
  content: '';
  position: absolute; inset: 24px;
  background: var(--canvas);
  border-radius: 50%;
}
.donut .center {
  position: absolute; inset: 24px;
  display: grid; place-items: center;
  z-index: 2;
  text-align: center;
}
.donut .center .v {
  font-family: var(--f-display);
  font-size: 32px; line-height: 1;
}
.donut .center .l {
  font-family: var(--f-mono); font-size: 9px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-meta);
  margin-top: 6px;
}

.legend { display: flex; flex-direction: column; gap: 10px; }
.legend-row {
  display: grid;
  grid-template-columns: 12px 1fr auto auto;
  gap: 10px; align-items: center;
}
.legend-row .sw { width: 12px; height: 12px; border-radius: var(--r-2); }
.legend-row .ln { font-size: 13px; }
.legend-row .pc {
  font-family: var(--f-mono); font-size: 10px;
  letter-spacing: 0.12em; color: var(--text-meta);
}
.legend-row .vl {
  font-family: var(--f-display); font-size: 18px; line-height: 1;
}

/* =========================================================
   TICKETS / OCR
   ========================================================= */
.queue-card {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--frame);
  border-radius: var(--r-pill);
  background: var(--canvas);
  align-items: center;
  transition: border-color 150ms ease;
}
.queue-card:hover { border-color: var(--mint); }
.queue-card .thumb {
  width: 80px; height: 80px; border-radius: var(--r-3);
  overflow: hidden;
}
.queue-card.pending    { border-color: var(--state-warning); }
.queue-card.processing { border-color: var(--state-info); }
.queue-card.done       { border-color: var(--state-success); }
.queue-card.error      { border-color: var(--state-error); }

.queue-card .meta {
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-meta);
  display: flex; gap: 12px; flex-wrap: wrap;
}
.queue-card .total {
  font-family: var(--f-display); font-size: 36px; line-height: 1;
}

.tickets-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

/* Misc */
.notify-banner {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  border-radius: var(--r-round);
  background: var(--mint);
  color: var(--black);
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  font-weight: 700;
  width: fit-content;
}
.notify-banner.ultra { background: var(--ultraviolet); color: var(--white); }

/* =========================================================
   Data table (.dt)
   ========================================================= */
.dt {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.dt thead th {
  text-align: left;
  padding: 14px 18px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-meta);
  border-bottom: 1px solid var(--frame);
  background: var(--slate-2);
  font-weight: 400;
}
.dt tbody td {
  padding: 14px 18px;
  border-bottom: 1px dashed var(--frame);
  vertical-align: middle;
}
.dt tbody tr:hover { background: var(--slate-2); }
.dt tbody tr:last-child td { border-bottom: 0; }
.dt tbody tr.low td { background: rgba(255, 122, 217, 0.04); }
.dt tfoot td {
  padding: 16px 18px;
  border-top: 1px solid var(--frame);
  background: var(--slate-2);
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1100px) {
  .app { grid-template-columns: 220px 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .planning-grid { grid-template-columns: 100px repeat(7, minmax(110px, 1fr)); overflow-x: auto; }
}
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
  .cols-2, .cols-3, .cols-l-r { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr; }
  .tickets-stats { grid-template-columns: repeat(2, 1fr); }
  .topbar { padding: 12px 16px; }
  .topbar-search { display: none; }
  .masthead, .screen { padding-left: 16px; padding-right: 16px; }
  .dt { font-size: 13px; }
  .dt thead th, .dt tbody td { padding: 10px 12px; }

  /* Touch targets ≥44px on mobile (M7) */
  .btn--icon, .topbar .bell, .modal__close { width: 44px; height: 44px; }
  .week-nav button { width: 44px; height: 44px; }
}

/* =========================================================
   Modals
   ========================================================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 1;
}
@keyframes rc-pop  { from { transform: translateY(10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal {
  background: var(--canvas);
  border: 1px solid var(--frame);
  border-radius: var(--r-feature);
  width: min(720px, 100%);
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  animation: rc-pop 200ms cubic-bezier(0.22, 1, 0.36, 1);
}
.modal--wide { width: min(900px, 100%); }
.modal--xl   { width: min(1080px, 100%); }

.modal__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--frame);
}
.modal__head .kicker {
  font-family: var(--f-mono); font-size: 10px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--mint-border);
  margin-bottom: 6px;
}
.modal__head h2 {
  margin: 0;
  font-family: var(--f-display);
  font-size: 36px;
  line-height: 0.98;
  text-transform: uppercase;
}
.modal__close {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--slate);
  border: 1px solid var(--frame);
  color: var(--text);
  display: grid; place-items: center;
  cursor: pointer; flex-shrink: 0;
  transition: background 150ms ease, color 150ms ease;
}
.modal__close:hover { background: var(--mint); color: var(--black); }

.modal__body {
  padding: 20px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.modal__foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--frame);
  background: var(--slate-2);
}
.modal__foot .right { display: flex; gap: 8px; }

/* Field grid inside modals */
.fgrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.fgrid .full { grid-column: 1 / -1; }

/* Toggle */
.toggle {
  display: inline-flex; align-items: center; gap: 10px;
  cursor: pointer;
  user-select: none;
}
.toggle input { display: none; }
.toggle .track {
  width: 36px; height: 20px;
  border-radius: var(--r-round);
  background: var(--slate);
  position: relative;
  transition: background 150ms ease;
}
.toggle .track::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--text);
  transition: left 150ms ease;
}
.toggle input:checked + .track { background: var(--mint); }
.toggle input:checked + .track::after { left: 18px; background: var(--black); }
.toggle .lbl {
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase;
}

/* Inline mini-row for ingredients/items inside modals */
.ing-row {
  display: grid;
  grid-template-columns: 1fr 80px 90px 32px;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed var(--frame);
}
.ing-row:last-child { border-bottom: 0; }
.ing-row input, .ing-row select {
  width: 100%;
}
.ing-row .x {
  background: transparent; border: 1px solid var(--frame);
  color: var(--text-meta);
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid; place-items: center;
  cursor: pointer;
  transition: color 120ms ease, border-color 120ms ease;
}
.ing-row .x:hover { color: var(--tile-pink); border-color: var(--tile-pink); }

/* Ticket-item list inside ticket modal */
.tk-row {
  display: grid;
  grid-template-columns: 1fr 60px 70px 80px 28px;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px dashed var(--frame);
  font-size: 13px;
}
.tk-row:last-child { border-bottom: 0; }
.tk-row .nm input {
  background: transparent;
  border: 0;
  color: var(--text);
  font-weight: 600;
  width: 100%;
  outline: none;
  padding: 4px 0;
}
.tk-row .nm input:focus { border-bottom: 1px solid var(--mint); }
.tk-row .num input {
  background: var(--slate-2);
  border: 1px solid var(--frame);
  color: var(--text);
  font-family: var(--f-mono); font-size: 12px;
  border-radius: var(--r-3);
  padding: 4px 8px;
  width: 100%; outline: none;
}
.tk-row .pr {
  font-family: var(--f-mono); font-size: 12px;
  text-align: right;
  color: var(--text);
}
.tk-row .pr input {
  background: var(--slate-2);
  border: 1px solid var(--frame);
  color: var(--text);
  font-family: var(--f-mono); font-size: 12px;
  border-radius: var(--r-3);
  padding: 4px 8px;
  width: 100%; outline: none;
  text-align: right;
}

/* Receipt thumb in ticket modal */
.tk-thumb {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: var(--r-3);
  overflow: hidden;
  position: relative;
}


