:root {
  --page: #f4f7fb;
  --pane: #eef3f8;
  --card: #ffffff;
  --text: #111827;
  --muted: #5f6b7a;
  --border: #d9e2ea;
  --soft-border: #e7edf2;
  --green: #1faa3d;
  --green-dark: #168a32;
  --green-soft: #edf9ef;
  --red: #f2202e;
  --red-dark: #c91521;
  --red-soft: #fff0f1;
  --orange: #f59e0b;
  --blue: #2563eb;
  --shadow: 0 8px 28px rgba(29, 52, 72, .08);
  --sidebar-width: 280px;
  --emulator-width: 1920px;
  --emulator-height: 1080px;
  --site-toolbar-height: 48px;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: var(--page);
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; min-width: 0; min-height: 0; margin: 0; background: #dfe6ec; }
body { display: grid; grid-template-rows: var(--site-toolbar-height) minmax(0, 1fr); overflow: hidden; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button:disabled, input:disabled, select:disabled { cursor: default; opacity: .48; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(31, 170, 61, .25);
  outline-offset: 2px;
}

.site-toolbar {
  position: relative;
  z-index: 500;
  display: flex;
  height: var(--site-toolbar-height);
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-bottom: 1px solid #cbd5de;
  background: #eef3f8;
  box-shadow: 0 2px 10px rgba(28, 43, 56, .1);
}
.site-nav-button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border: 1px solid #c9d4dd;
  border-radius: 9px;
  background: #fff;
  color: #273444;
  font-size: 14px;
  font-weight: 650;
  box-shadow: 0 2px 7px rgba(35, 54, 69, .06);
}
.site-nav-button:hover { border-color: #aebcc8; background: #f9fbfc; }
.site-nav-button:active { transform: translateY(1px); }
.site-nav-button span:first-child { color: var(--red); font-size: 19px; line-height: 1; }
.emulator-viewport { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: #dfe6ec; }
.ai-orientation-prompt {
  position: absolute;
  inset: 0;
  z-index: 600;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: max(18px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  background: rgba(24, 36, 48, .92);
  color: #fff;
  backdrop-filter: blur(8px);
}
.ai-orientation-prompt[hidden] { display: none; }
.ai-orientation-card {
  width: min(460px, 100%);
  padding: 25px 20px 20px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 18px;
  background: #f7f9fb;
  color: #111827;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .36);
  text-align: center;
}
.ai-orientation-phone {
  display: block;
  margin: 0 auto 13px;
  color: var(--red);
  font-size: 48px;
  font-weight: 800;
  line-height: 1;
  transform: rotate(90deg);
}
.ai-orientation-card h1 { margin: 0; font-size: clamp(24px, 7vw, 32px); line-height: 1.05; }
.ai-orientation-card p { margin: 14px auto 20px; color: #526170; font-size: 16px; line-height: 1.45; }
.ai-orientation-actions { display: grid; grid-template-columns: 1fr; gap: 10px; }
.ai-orientation-actions button {
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid #c7d1da;
  border-radius: 10px;
  background: #fff;
  color: #273444;
  font-weight: 700;
}
.ai-orientation-actions button:first-child { border-color: var(--red); background: var(--red); color: #fff; }
.ai-orientation-actions button:active { transform: translateY(1px); }
body.ai-orientation-active .emulator-stage { visibility: hidden; }
.emulator-stage {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--emulator-width);
  height: var(--emulator-height);
  overflow: hidden;
  transform: translate(-50%, -50%) scale(var(--emulator-scale, 1));
  transform-origin: center;
  background: var(--page);
  box-shadow: 0 8px 30px rgba(25, 41, 55, .16);
}
.app-shell { width: var(--emulator-width); height: var(--emulator-height); background: var(--page); }
.sidebar {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  width: var(--sidebar-width);
  height: var(--emulator-height);
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid #d6e0e8;
  background: var(--pane) url("assets/sidebar-cows-meadow.png") center bottom / 100% auto no-repeat;
}
.sidebar::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: linear-gradient(180deg, rgba(238,243,248,.98) 0%, rgba(238,243,248,.95) 69%, rgba(238,243,248,.36) 100%);
}
.brand { display: flex; min-height: 104px; align-items: center; gap: 13px; padding: 18px 20px 13px; }
.brand-mark { position: relative; display: flex; width: 60px; height: 54px; align-items: center; justify-content: center; color: #fff; font-size: 31px; font-weight: 900; font-style: italic; letter-spacing: -8px; }
.brand-mark::before { position: absolute; inset: 3px 4px; z-index: -1; content: ""; transform: skew(-13deg); border-radius: 5px; background: var(--red); box-shadow: 0 4px 12px rgba(242,32,46,.25); }
.brand-i { margin-right: 7px; }
.brand-copy { display: flex; min-width: 0; flex-direction: column; }
.brand-copy strong { font-size: 24px; font-weight: 800; letter-spacing: -.5px; }
.brand-copy small { margin-top: 1px; color: #677383; font-size: 12px; white-space: nowrap; }
.navigation { flex: 1; overflow: auto; padding: 5px 12px 10px; scrollbar-width: thin; }
.nav-button {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 49px;
  align-items: center;
  gap: 14px;
  margin: 2px 0;
  padding: 8px 13px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #273444;
  text-align: left;
  transition: background .15s, color .15s, transform .15s;
}
.nav-button:hover { background: rgba(255,255,255,.75); }
.nav-button:active { transform: translateY(1px); }
.nav-button.active { background: #fff; color: var(--red); box-shadow: 0 3px 15px rgba(60, 79, 95, .09); font-weight: 700; }
.nav-button.active::before { position: absolute; inset: 10px auto 10px 0; width: 4px; content: ""; border-radius: 4px; background: var(--red); }
.nav-icon { display: inline-flex; width: 24px; flex: 0 0 24px; align-items: center; justify-content: center; font-size: 21px; line-height: 1; }
.nav-label { overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.nav-separator { height: 1px; margin: 8px 11px; background: rgba(108,126,143,.2); }
.sidebar-footer { flex: 0 0 auto; padding: 0 13px 14px; }
.connection-card { padding: 10px 12px; border: 1px solid rgba(212,223,231,.9); border-radius: 13px; background: rgba(255,255,255,.92); box-shadow: 0 5px 18px rgba(35,58,74,.07); backdrop-filter: blur(5px); }
.connection-card > div { display: grid; grid-template-columns: 12px 1fr auto; align-items: center; gap: 7px; padding: 3px 0; font-size: 12px; }
.connection-card b { color: var(--green-dark); font-size: 11px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #9ca3af; box-shadow: 0 0 0 3px rgba(156,163,175,.13); }
.status-dot.online { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.14); }
.version { padding: 8px 4px 0; color: #637181; font-size: 11px; line-height: 1.4; }
.version span { color: #84909d; }

.workspace { height: var(--emulator-height); min-height: 0; margin-left: var(--sidebar-width); overflow: hidden; }
.page { height: var(--emulator-height); overflow: auto; padding: 20px 24px 26px; scrollbar-color: #c8d3dc transparent; }
.clock { position: absolute; z-index: 12; top: 22px; right: 34px; padding: 10px 15px; border: 1px solid rgba(217,226,234,.85); border-radius: 12px; background: rgba(255,255,255,.9); color: #45515f; box-shadow: 0 4px 18px rgba(34,53,70,.06); font-size: 14px; font-weight: 600; backdrop-filter: blur(8px); }
.page-heading { min-height: 58px; margin: 0 210px 17px 0; }
.page-title { margin: 0; font-size: 29px; font-weight: 750; letter-spacing: -.6px; }
.page-subtitle { margin: 5px 0 0; color: var(--muted); font-size: 14px; }
.section-title { margin: 0; font-size: 20px; font-weight: 750; }
.eyebrow { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: Consolas, "SFMono-Regular", monospace; }
.strong { font-weight: 700; }
.text-green { color: var(--green-dark); }
.text-red { color: var(--red); }
.text-orange { color: #b66c00; }
.hidden { display: none !important; }

.card { border: 1px solid var(--border); border-radius: 17px; background: var(--card); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; padding: 16px; }
.toolbar-group { display: flex; align-items: end; gap: 10px; }
.field { display: flex; min-width: 130px; flex-direction: column; gap: 6px; }
.field > label, .field-label { color: #4b5867; font-size: 12px; font-weight: 700; }
.input, .select, .textarea {
  min-height: 42px;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #cdd8e1;
  border-radius: 9px;
  background: #fff;
  color: var(--text);
}
.textarea { min-height: 92px; resize: vertical; }
.select { padding-right: 32px; }
.input::placeholder, .textarea::placeholder { color: #929eaa; }
.input.invalid { border-color: var(--red); background: #fffafb; }
.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid #cdd8e1;
  border-radius: 10px;
  background: #fff;
  color: #202c38;
  font-weight: 650;
  transition: filter .15s, transform .15s, box-shadow .15s;
}
.button:hover:not(:disabled) { filter: brightness(.975); box-shadow: 0 4px 12px rgba(34,52,68,.08); }
.button:active:not(:disabled) { transform: translateY(1px); }
.button.primary { border-color: var(--green); background: var(--green); color: #fff; }
.button.danger { border-color: var(--red); background: var(--red); color: #fff; }
.button.soft-danger { border-color: #ffc7cb; background: var(--red-soft); color: var(--red-dark); }
.button.dark { border-color: #263342; background: #263342; color: #fff; }
.button.ghost { border-color: transparent; background: transparent; }
.button.icon-only { width: 42px; padding: 0; }
.button.wide { min-width: 150px; }
.button.large { min-height: 54px; padding: 11px 19px; font-size: 16px; }
.pill { display: inline-flex; min-height: 34px; align-items: center; gap: 7px; padding: 6px 13px; border: 1px solid var(--border); border-radius: 999px; background: #fff; font-size: 13px; font-weight: 700; }
.pill.green { border-color: #b8e8c2; background: var(--green-soft); color: var(--green-dark); }
.pill.red { border-color: #ffc7cb; background: var(--red-soft); color: var(--red-dark); }
.pill.gray { background: #f3f6f8; color: #566270; }
.toggle { position: relative; display: inline-flex; width: 48px; height: 27px; flex: 0 0 auto; }
.toggle input { position: absolute; opacity: 0; }
.toggle span { width: 100%; border-radius: 999px; background: #b6c0c9; transition: .2s; }
.toggle span::after { display: block; width: 21px; height: 21px; margin: 3px; content: ""; transition: .2s; border-radius: 50%; background: white; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.toggle input:checked + span { background: var(--green); }
.toggle input:checked + span::after { transform: translateX(21px); }
.checkbox-line { display: flex; align-items: center; gap: 10px; color: #354250; font-size: 14px; }
.checkbox-line input { width: 18px; height: 18px; accent-color: var(--green); }

/* Mixer */
.mixer-heading { display: flex; min-height: 58px; align-items: center; gap: 10px; margin: 0 210px 16px 0; }
.mixer-heading .mixer-name { padding: 10px 18px; border: 1px solid #d4dee7; border-radius: 12px; background: #fff; box-shadow: 0 5px 16px rgba(35,55,70,.06); font-size: 22px; font-weight: 750; }
.mixer-grid { display: grid; grid-template-columns: minmax(250px, 310px) minmax(310px, 1fr) minmax(385px, 480px); gap: 14px; align-items: stretch; }
.metric-card { min-height: 404px; overflow: hidden; }
.metric-status { display: flex; align-items: center; justify-content: space-between; padding: 17px 18px 13px; border-bottom: 1px solid var(--soft-border); }
.weight-box { padding: 16px 18px 14px; text-align: center; }
.weight-value { color: var(--green-dark); font-size: 72px; font-weight: 800; line-height: 1; letter-spacing: -2px; }
.weight-unit { margin-left: 5px; color: var(--muted); font-size: 18px; font-weight: 600; }
.capacity-bar { height: 12px; margin: 14px 0 6px; overflow: hidden; border-radius: 8px; background: #e8eef2; }
.capacity-bar span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #24b84a, #91d842); transition: width .4s; }
.capacity-bar.over span { background: var(--red); }
.capacity-copy { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }
.metric-list { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; border-top: 1px solid var(--soft-border); background: var(--soft-border); }
.metric { min-height: 67px; padding: 12px 14px; background: #fff; }
.metric span { display: block; color: var(--muted); font-size: 11px; }
.metric strong { display: block; margin-top: 4px; font-size: 17px; }
.mixer-visual { position: relative; min-height: 404px; overflow: hidden; background: #f9fbfc url("assets/mixer-control-cows-meadow-wide.png") center bottom / cover no-repeat; }
.mixer-visual::after { position: absolute; inset: 0; content: ""; pointer-events: none; background: linear-gradient(180deg, rgba(255,255,255,.58), rgba(255,255,255,.05) 55%); }
.mixer-machine { position: absolute; z-index: 2; left: 50%; bottom: 22px; width: min(80%, 560px); max-height: 75%; object-fit: contain; transform: translateX(-50%); filter: drop-shadow(0 14px 13px rgba(26,48,40,.24)); }
.machine-badge { position: absolute; z-index: 3; top: 18px; left: 18px; padding: 10px 14px; border: 1px solid rgba(211,223,231,.92); border-radius: 10px; background: rgba(255,255,255,.88); box-shadow: 0 4px 15px rgba(30,50,62,.08); backdrop-filter: blur(4px); }
.machine-badge strong { display: block; font-size: 18px; }
.machine-badge span { color: var(--muted); font-size: 12px; }
.motor-state { position: absolute; z-index: 3; right: 18px; bottom: 18px; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,.9); color: #52606e; font-size: 12px; font-weight: 700; }
.motor-state.running { color: var(--green-dark); }
.motor-state .rotor { width: 11px; height: 11px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; }
.motor-state.running .rotor { animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.recipe-control { min-height: 404px; overflow: hidden; border: 2px solid var(--green); }
.mode-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 8px; gap: 7px; background: #f4f8f5; }
.mode-tab { min-height: 42px; border: 0; border-radius: 9px; background: transparent; color: #677382; font-weight: 800; }
.mode-tab.active { background: var(--green); color: white; box-shadow: 0 4px 10px rgba(31,170,61,.22); }
.recipe-body { padding: 15px 17px 17px; }
.step-line { display: grid; grid-template-columns: 27px 1fr; gap: 10px; margin-bottom: 11px; }
.step-number { display: flex; width: 25px; height: 25px; align-items: center; justify-content: center; border-radius: 50%; background: var(--green); color: #fff; font-size: 12px; font-weight: 800; }
.step-content > label { display: block; margin: 3px 0 7px; color: #45515f; font-size: 12px; font-weight: 700; }
.counter { display: grid; grid-template-columns: 42px 1fr 42px; align-items: stretch; }
.counter .button { min-height: 42px; border-radius: 9px 0 0 9px; font-size: 20px; }
.counter .button:last-child { border-radius: 0 9px 9px 0; }
.counter .input { border-radius: 0; text-align: center; font-weight: 700; }
.unit-input { position: relative; }
.unit-input .input { padding-right: 43px; }
.unit-input span { position: absolute; top: 11px; right: 12px; color: var(--muted); font-size: 13px; }
.recipe-summary-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.recipe-summary-line .button { min-height: 36px; padding: 6px 10px; font-size: 12px; }
.activate-button { width: 100%; min-height: 50px; margin-top: 4px; border: 0; border-radius: 11px; background: var(--green); color: #fff; font-size: 17px; font-weight: 750; }
.activate-button small { display: block; margin-top: 2px; font-size: 11px; font-weight: 500; opacity: .9; }
.manual-panel { display: grid; gap: 14px; }
.manual-warning { padding: 11px 13px; border: 1px solid #ffd0d3; border-radius: 9px; background: var(--red-soft); color: #a71923; font-size: 12px; }
.manual-frequency { display: grid; grid-template-columns: 1fr 92px; align-items: end; gap: 10px; }
.manual-frequency .input { text-align: right; }
.controls-card { margin-top: 14px; padding: 16px; }
.controls-title-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 13px; }
.control-grid { display: grid; grid-template-columns: repeat(8, minmax(92px, 1fr)); gap: 9px; }
.control-button { min-height: 67px; padding: 7px; border: 1px solid #cfd9e1; border-radius: 11px; background: #fff; color: #263441; font-size: 12px; font-weight: 700; line-height: 1.15; }
.control-button span { display: block; margin-bottom: 5px; font-size: 18px; line-height: 1; }
.control-button.danger { border-color: var(--red); background: var(--red); color: #fff; }
.control-button.primary { border-color: var(--green); background: var(--green); color: #fff; }
.control-button.active { border-color: #82d592; background: var(--green-soft); color: var(--green-dark); box-shadow: inset 0 0 0 1px #83d695; }
.process-row { display: grid; grid-template-columns: minmax(390px, 1.5fr) minmax(300px, 1fr) minmax(220px, .72fr); gap: 14px; margin-top: 14px; }
.process-card { min-height: 124px; padding: 16px 18px; }
.process-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.process-main { margin-top: 9px; font-size: 21px; font-weight: 760; }
.process-copy { margin-top: 4px; color: var(--muted); font-size: 13px; }
.process-progress { height: 8px; margin-top: 12px; overflow: hidden; border-radius: 8px; background: #e8eef2; }
.process-progress span { display: block; height: 100%; border-radius: inherit; background: var(--green); transition: width .3s; }
.other-mixer { position: relative; min-height: 124px; overflow: hidden; padding: 16px 18px; border: 0; background: #fff url("assets/mixer-2-summary-grass.png") right bottom / cover no-repeat; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.other-mixer::after { position: absolute; inset: 0; content: ""; background: linear-gradient(90deg, rgba(255,255,255,.97), rgba(255,255,255,.63)); }
.other-mixer > * { position: relative; z-index: 1; }
.other-mixer:hover { box-shadow: 0 8px 28px rgba(49,64,75,.15); transform: translateY(-1px); }
.numeric-field { width: 100%; min-height: 42px; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.counter .numeric-field { text-align: center; }
.numeric-field:disabled { cursor: default; }
.other-values { display: flex; gap: 30px; margin-top: 16px; }
.other-values span { display: block; color: var(--muted); font-size: 11px; }
.other-values strong { display: block; margin-top: 3px; font-size: 18px; }
.alarm-summary { min-height: 124px; padding: 16px 18px; }
.alarm-summary.has-alarm { animation: alarmPulse 1.5s ease-in-out infinite; border-color: #ff9da4; background: #fff5f6; }
@keyframes alarmPulse { 50% { box-shadow: 0 0 0 5px rgba(242,32,46,.08); } }

/* Display board */
.display-page { height: calc(var(--emulator-height) - 40px); min-height: 620px; padding: 0; overflow: hidden; background: #eef5e8; }
.display-board { display: grid; height: 100%; grid-template-rows: 1fr 1fr; background: #e7f2dd url("assets/CowGrass.png") center bottom / cover no-repeat; }
.board-mixer { display: grid; grid-template-columns: 1.3fr .7fr; align-items: center; padding: 38px 96px; border-bottom: 5px solid #fff; background: rgba(245,250,240,.74); }
.board-mixer:last-child { border-bottom: 0; }
.board-label { color: #2d3f2b; font-size: 38px; font-weight: 700; }
.board-ingredient { margin-top: 22px; color: #111; font-size: 104px; font-weight: 900; line-height: .98; text-transform: uppercase; }
.board-state { margin-top: 16px; color: var(--green-dark); font-size: 30px; font-weight: 800; }
.board-remaining { padding: 32px 38px; border-radius: 22px; background: rgba(255,255,255,.83); text-align: center; box-shadow: 0 10px 36px rgba(41,70,30,.12); }
.board-remaining.near { background: #d8f7d5; }
.board-remaining.over { background: #ffe1e3; }
.board-remaining span { display: block; color: #52664d; font-size: 28px; font-weight: 700; }
.board-remaining strong { display: block; margin-top: 11px; color: #101a0f; font-size: 148px; font-weight: 900; line-height: .9; }
.board-remaining em { font-size: .35em; font-style: normal; }

/* Tables and management pages */
.table-card { margin-top: 14px; overflow: hidden; }
.table-title { padding: 17px 18px; border-bottom: 1px solid var(--soft-border); font-size: 18px; font-weight: 750; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { padding: 12px 13px; border-bottom: 1px solid var(--border); background: #f3f6f8; color: #4e5b68; text-align: left; white-space: nowrap; }
td { padding: 12px 13px; border-bottom: 1px solid #ebf0f3; vertical-align: middle; }
tbody tr:hover { background: #f9fbfc; }
tbody tr.selected { background: #edf9ef; }
.empty-row td { height: 120px; color: var(--muted); text-align: center; }
.status-line { margin-top: 10px; padding: 11px 14px; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: var(--muted); font-size: 13px; }
.management-grid { display: grid; grid-template-columns: minmax(235px, .75fr) minmax(430px, 1.5fr) minmax(300px, 1fr); gap: 14px; min-height: calc(var(--emulator-height) - 118px); }
.management-column { display: flex; min-height: 560px; flex-direction: column; overflow: hidden; }
.column-header { display: flex; min-height: 60px; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--soft-border); }
.column-body { flex: 1; overflow: auto; padding: 14px; }
.recipe-list { display: grid; gap: 8px; }
.recipe-list-item { width: 100%; padding: 13px; border: 1px solid #d9e2e9; border-radius: 10px; background: #fff; text-align: left; }
.recipe-list-item.active { border-color: var(--green); background: var(--green-soft); box-shadow: inset 3px 0 var(--green); }
.recipe-list-item strong { display: block; }
.recipe-list-item span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.composition-list { display: grid; gap: 9px; }
.composition-item { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 10px; padding: 11px; border: 1px solid var(--border); border-radius: 10px; }
.composition-item img { width: 34px; height: 34px; object-fit: contain; }
.composition-item small { display: block; color: var(--muted); }
.composition-actions { display: flex; gap: 5px; }
.composition-actions .button { min-height: 34px; padding: 5px 8px; font-size: 12px; }
.form-stack { display: grid; gap: 14px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 9px; padding-top: 5px; }
.ingredient-page { position: relative; min-height: calc(var(--emulator-height) - 40px); }
.ingredient-page::after { position: absolute; z-index: -1; right: 0; bottom: 0; width: 1037px; height: 432px; content: ""; opacity: .27; background: url("assets/recipe-panel-cow-meadow.png") right bottom / cover no-repeat; pointer-events: none; }
.ingredient-list { display: grid; gap: 8px; margin-top: 14px; }
.ingredient-row { display: grid; min-height: 68px; grid-template-columns: 54px 1fr auto; align-items: center; gap: 12px; padding: 9px 14px; border: 1px solid var(--border); border-radius: 12px; background: rgba(255,255,255,.95); box-shadow: 0 5px 16px rgba(34,53,67,.05); }
.ingredient-row img { width: 46px; height: 46px; object-fit: contain; }
.ingredient-row strong { font-size: 15px; }
.row-actions { display: flex; gap: 8px; }
.row-actions .button { min-height: 37px; padding: 7px 11px; font-size: 12px; }

/* Settings */
.settings-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 15px; align-items: start; }
.settings-tabs { position: sticky; top: 0; display: grid; gap: 5px; padding: 10px; }
.settings-tab { min-height: 43px; padding: 9px 12px; border: 0; border-radius: 9px; background: transparent; color: #42505e; text-align: left; }
.settings-tab.active { background: #edf9ef; color: var(--green-dark); font-weight: 700; }
.settings-panel { padding: 20px; }
.settings-section + .settings-section { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--soft-border); }
.settings-section h3 { margin: 0 0 15px; font-size: 18px; }
.settings-fields { display: grid; grid-template-columns: repeat(3, minmax(160px, 1fr)); gap: 13px; }
.settings-note { margin-top: 13px; padding: 11px 13px; border-left: 3px solid #85b5e8; border-radius: 6px; background: #f1f7fd; color: #4e6072; font-size: 12px; line-height: 1.45; }
.settings-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.tag-tabs { display: flex; gap: 6px; margin: 15px 0 8px; }
.tag-tab { padding: 8px 13px; border: 1px solid var(--border); border-radius: 8px; background: white; }
.tag-tab.active { border-color: var(--green); background: var(--green-soft); color: var(--green-dark); font-weight: 700; }

/* Help */
.help-list { display: grid; gap: 16px; }
.help-section { overflow: hidden; }
.help-section summary { display: flex; min-height: 62px; align-items: center; justify-content: space-between; padding: 15px 19px; cursor: pointer; list-style: none; font-size: 19px; font-weight: 750; }
.help-section summary::-webkit-details-marker { display: none; }
.help-section summary::after { content: "⌄"; color: var(--muted); font-size: 23px; }
.help-section[open] summary { border-bottom: 1px solid var(--soft-border); }
.help-section[open] summary::after { transform: rotate(180deg); }
.help-content { display: grid; grid-template-columns: minmax(310px, .85fr) minmax(500px, 1.6fr); gap: 22px; padding: 18px; }
.help-content img { width: 100%; border: 1px solid var(--border); border-radius: 11px; box-shadow: 0 7px 22px rgba(31,49,63,.1); }
.help-copy { color: #4d5a68; font-size: 15px; line-height: 1.58; }
.help-copy p { margin: 0 0 11px; }

/* Dialogs, toast, tour */
.modal-layer { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; background: rgba(17,24,39,.48); backdrop-filter: blur(3px); }
.modal-layer[hidden] { display: none; }
.dialog { width: 580px; max-height: calc(var(--emulator-height) - 48px); overflow: auto; border: 1px solid #d4dee6; border-radius: 18px; background: #fff; box-shadow: 0 26px 90px rgba(10,26,40,.28); }
.dialog.wide { width: 860px; }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px 15px; border-bottom: 1px solid var(--soft-border); }
.dialog-title { margin: 0; font-size: 22px; }
.dialog-close { width: 38px; height: 38px; border: 0; border-radius: 9px; background: #f1f4f6; font-size: 20px; }
.dialog-body { padding: 20px 22px; color: #3f4c59; line-height: 1.45; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px 20px; }
.keypad-value { padding: 11px 14px; border: 1px solid var(--border); border-radius: 10px; background: #f7f9fb; text-align: right; font-size: 30px; font-weight: 750; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.keypad .button { min-height: 56px; font-size: 19px; }
.toast-region { position: absolute; z-index: 160; right: 24px; bottom: 24px; display: grid; width: 380px; gap: 9px; }
.toast { padding: 13px 15px; border: 1px solid #d8e2e9; border-left: 4px solid var(--green); border-radius: 11px; background: #fff; color: #344150; box-shadow: 0 12px 35px rgba(28,45,59,.17); animation: toastIn .2s ease-out; }
.toast.error { border-left-color: var(--red); }
@keyframes toastIn { from { opacity: 0; transform: translateY(7px); } }
.tour-layer { position: fixed; inset: 0; z-index: 140; pointer-events: none; }
.tour-layer[hidden] { display: none; }
.tour-shade { position: absolute; inset: 0; background: rgba(17,24,39,.64); pointer-events: auto; }
.tour-focus { position: fixed; z-index: 2; border: 4px solid #35c759; border-radius: 15px; box-shadow: 0 0 0 9999px rgba(17,24,39,.64); animation: tourPulse 1.5s ease-in-out infinite; pointer-events: none; }
@keyframes tourPulse { 50% { opacity: .62; } }
.tour-card { position: fixed; z-index: 3; width: 430px; padding: 18px 22px; border: 2px solid #35c759; border-radius: 18px; background: #fcfeff; box-shadow: 0 22px 65px rgba(10,28,42,.28); pointer-events: auto; }
.tour-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tour-counter { color: #168a32; font-size: 15px; font-weight: 700; }
.tour-card h2 { margin: 12px 0 8px; font-size: 26px; }
.tour-card p { margin: 0; color: #475467; font-size: 17px; line-height: 1.42; }
.tour-actions { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; margin-top: 17px; }
.tour-actions small { color: #667085; }
.minimized-window { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; gap: 15px; background: #e7edf2; }
.minimized-window[hidden] { display: none; }
.minimized-window img { width: 44px; height: 44px; }
.minimized-window span { font-size: 17px; font-weight: 700; }
.minimized-window button { min-height: 42px; padding: 8px 16px; border: 1px solid #c8d4dd; border-radius: 9px; background: white; }
.session-ended { text-align: center; }
.session-ended img { width: 84px; height: 84px; }
.session-ended h2 { margin: 15px 0 7px; }

@media print {
  .site-toolbar, .sidebar, .clock, .toolbar, .button, .row-actions { display: none !important; }
  .workspace { margin: 0; }
  .page { height: auto; overflow: visible; padding: 0; }
  .card { box-shadow: none; }
}

/* Exact web transfer of the installed WinUI shell and MixerPage.xaml. */
.fluent-icon,
.nav-icon { font-family: "Segoe Fluent Icons", "Segoe MDL2 Assets", sans-serif; font-style: normal; font-weight: 400; }

.brand {
  display: grid;
  min-height: 92px;
  grid-template-columns: 25px 1fr;
  align-content: center;
  align-items: center;
  column-gap: 9px;
  padding: 18px 10px 12px 18px;
}
.brand-slash { width: 25px; height: 17px; transform: skew(-14deg); border-radius: 1px; background: var(--red); }
.brand-copy { display: block; min-width: 0; }
.brand-copy strong { display: block; color: #111827; font-size: 25px; font-weight: 700; line-height: 1; letter-spacing: -.8px; white-space: nowrap; }
.brand-copy strong em { margin-right: 1px; color: var(--red); font-style: normal; font-weight: 800; }
.brand-copy small { display: block; margin: 2px 0 0 0; color: #5f6b7a; font-size: 13px; line-height: 1.15; white-space: nowrap; }
.navigation { padding: 2px 4px 8px; }
.nav-button { min-height: 52px; gap: 13px; margin: 2px 4px; padding: 8px 18px; border-radius: 8px; }
.nav-label { font-size: 16px; font-weight: 600; }
.nav-icon { width: 24px; flex-basis: 24px; font-size: 19px; }
.nav-button.active { box-shadow: none; }
.nav-button.active::before { inset-block: 8px; }
.nav-separator { margin: 4px 20px; }
.sidebar-footer { padding: 0 14px 18px; }
.connection-card { padding: 12px; border-radius: 16px; }
.connection-card > div { grid-template-columns: 12px 1fr auto; padding: 3px 0; font-size: 12px; }
.connection-card > .version { display: block; padding: 7px 0 0; color: #637181; font-size: 11px; line-height: 1.35; }
.clock { top: 12px; right: 24px; padding: 7px 14px; border-radius: 12px; font-size: 18px; font-weight: 600; box-shadow: none; }

.mixer-page {
  overflow: hidden;
  padding: 0;
  background: #f3f6fb url("assets/mixer-control-cows-meadow-wide.png") center bottom / cover no-repeat;
}
.mc-root {
  display: grid;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  grid-template-columns: 320px minmax(0, 1fr) 500px;
  grid-template-rows: 58px minmax(0, 2.05fr) minmax(0, 1.05fr) 98px 94px;
  gap: 8px 14px;
  padding: 8px 18px 8px 0;
  color: #111827;
}
.mc-panel { min-width: 0; min-height: 0; overflow: hidden; border: 1px solid #dce4ee; border-radius: 20px; background: rgba(255,255,255,.94); }
.mc-header { z-index: 2; display: flex; min-width: 0; grid-column: 1 / 4; grid-row: 1; align-items: stretch; gap: 16px; }
.mc-title-card,
.mc-mode-badge,
.mc-paused-badge { display: inline-flex; height: 100%; align-items: center; border: 1px solid #dce4ee; border-radius: 18px; }
.mc-title-card { padding: 10px 18px; background: rgba(255,255,255,.94); font-size: 24px; font-weight: 700; }
.mc-mode-badge { gap: 9px; padding: 10px 18px; border-color: #d0f0cd; background: #eaf9e8; color: #20a820; font-size: 15px; font-weight: 600; }
.mc-mode-badge .fluent-icon { font-size: 18px; }
.mc-paused-badge { padding: 10px 18px; border-color: #ffd2d5; background: #fff0f1; color: #f21f2b; font-size: 15px; font-weight: 700; }

.mc-metrics { display: flex; grid-column: 1; grid-row: 2; flex-direction: column; padding: 8px 22px; }
.mc-equipment-badge { align-self: flex-start; padding: 6px 14px; border-radius: 16px; background: #eaf9e8; color: #20a820; font-size: 17px; font-weight: 600; }
.mc-equipment-badge.bad { background: #fff0f1; color: #f21f2b; }
.mc-weight { margin-top: 5px; }
.mc-weight > span { color: #667085; font-size: 15px; }
.mc-weight > div:nth-child(2) { display: flex; align-items: center; gap: 6px; line-height: 1.03; }
.mc-weight > div strong { font-size: 34px; font-weight: 700; }
.mc-weight > div b { font-size: 20px; font-weight: 400; }
.mc-weight p { margin: 3px 0 5px; font-size: 15px; }
.mc-mass-line { display: grid !important; grid-template-columns: 1fr auto; align-items: center; gap: 12px !important; }
.mc-mass-line > b { min-width: 47px; font-size: 17px !important; font-weight: 600 !important; text-align: right; }
.mc-progress { width: 100%; height: 14px; overflow: hidden; border-radius: 7px; background: #e8ecf3; }
.mc-progress i { display: block; height: 100%; border-radius: inherit; background: #20a820; transition: width .25s; }
.mc-zero { display: flex; min-width: 190px; min-height: 42px; align-items: center; justify-content: center; gap: 8px; margin: 7px auto 2px; padding: 7px 18px; border: 2px solid #20a820; border-radius: 12px; background: #f0fbf2; color: #20a820; font-size: 16px; font-weight: 600; }
.mc-zero .fluent-icon { font-size: 18px; }
.mc-metric-stack { display: grid; min-height: 0; flex: 1; grid-template-rows: repeat(4, 1fr); margin-top: 4px; }
.mc-metric-stack > div { display: flex; min-height: 0; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid #dce4ee; }
.mc-metric-stack span { color: #667085; font-size: 15px; }
.mc-metric-stack strong { font-size: 20px; font-weight: 700; white-space: nowrap; }

.mc-photo { display: flex; min-width: 0; min-height: 0; grid-column: 2; grid-row: 2; align-items: center; justify-content: center; margin: 6px 8px; }
.mc-photo img { display: block; width: 100%; max-height: 100%; aspect-ratio: 2 / 1; object-fit: contain; border: 1px solid #dce4ee; border-radius: 20px; background: #fff; }

.mc-recipe { display: flex; grid-column: 3; grid-row: 2 / 4; flex-direction: column; padding: 8px 12px; border-width: 1.5px; border-color: #20a820; border-radius: 22px; }
.mc-mode-switch { display: grid; flex: 0 0 54px; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; }
.mc-mode-switch button { min-width: 118px; height: 48px; padding: 8px 18px; border: 1px solid #20a820; border-radius: 14px; background: #f8fafc; color: #20a820; font-size: 18px; font-weight: 700; }
.mc-mode-switch button.active { background: #20a820; color: #fff; }
.mc-process-state { display: flex; flex: 0 0 70px; align-items: center; justify-content: space-between; margin-top: 3px; padding: 8px 12px; border: 1px solid #dce4ee; border-radius: 14px; background: #f8fafc; }
.mc-process-state div span { display: block; color: #667085; font-size: 14px; }
.mc-process-state div strong { display: block; margin-top: 2px; font-size: 22px; line-height: 1.1; }
.mc-process-state > b { display: flex; align-items: center; gap: 7px; font-size: 25px; }
.mc-process-state > b .fluent-icon { color: #20a820; font-size: 21px; }
.mc-recipe-title { flex: 0 0 29px; margin-top: 6px; padding-top: 7px; font-size: 17px; font-weight: 700; }
.mc-recipe-step { display: grid; min-width: 0; align-items: start; column-gap: 10px; }
.mc-recipe-step > i { display: block; width: 28px; height: auto; color: #344054; font-size: 22px; font-style: normal; font-weight: 700; }
.mc-recipe-step label { display: block; margin-bottom: 5px; color: #111827; font-size: 18px; font-weight: 600; }
.mc-step-one { flex: 0 0 77px; grid-template-columns: 28px minmax(0,1fr) 52px; margin-top: 6px; }
.mc-step-one .select { height: 52px; min-height: 52px; padding: 8px 12px; border-color: #aebfd2; border-radius: 10px; background: #fff; font-size: 19px; }
.mc-step-one > button { width: 52px; height: 48px; align-self: end; margin-bottom: 1px; border: 1px solid #aebfd2; border-radius: 10px; background: #f8fafc; color: #20a820; font-size: 21px; }
.mc-step-two { flex: 0 0 142px; grid-template-columns: 28px minmax(0,1fr); grid-template-rows: auto auto; margin-top: 6px; padding-top: 7px; }
.mc-step-two > i { grid-row: 1 / 3; }
.mc-step-two label { font-size: 18px; }
.mc-head-count > div { display: flex; align-items: center; gap: 7px; }
.mc-head-count button { height: 52px; border: 1px solid #aebfd2; background: #fff; font-size: 22px; }
.mc-head-count button:first-child,
.mc-head-count button:nth-child(3) { width: 48px; border-radius: 10px; color: #20a820; font-size: 28px; }
.mc-head-count button:nth-child(2) { width: 120px; border-radius: 10px; color: #111827; font-size: 24px; font-weight: 600; }
.mc-head-count span { font-size: 17px; }
.mc-portion { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-top: 8px; }
.mc-portion label { margin: 0; font-size: 16px; font-weight: 500; }
.mc-portion > div { display: flex; align-items: center; gap: 8px; }
.mc-portion button { width: 124px; height: 46px; border: 1px solid #aebfd2; border-radius: 10px; background: #fff; font-size: 21px; font-weight: 600; }
.mc-portion span { font-size: 18px; }
.mc-step-three { min-height: 0; flex: 0 0 171px; grid-template-columns: 28px minmax(0,1fr); margin-top: 6px; padding-top: 4px; overflow: hidden; }
.mc-step-three > div { min-height: 0; overflow: hidden; }
.mc-step-three label { margin-bottom: 3px; font-size: 17px; }
.mc-recipe-lines { max-height: 142px; overflow-y: auto; padding: 6px; border: 1px solid #dce4ee; border-radius: 12px; background: rgba(255,255,255,.94); scrollbar-width: thin; }
.mc-recipe-line { display: grid; width: 100%; min-height: 48px; grid-template-columns: 30px 1fr auto; align-items: center; gap: 9px; margin: 0 0 6px; padding: 7px 9px; border: 0; border-radius: 0; background: transparent; color: #111827; text-align: left; }
.mc-recipe-line > i { display: flex; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 14px; background: #eaf9e8; color: #20a820; font-size: 14px; font-style: normal; font-weight: 700; }
.mc-recipe-line span strong { display: block; overflow: hidden; font-size: 16px; font-weight: 600; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.mc-recipe-line span small { display: block; margin-top: 1px; color: #667085; font-size: 13px; }
.mc-recipe-line > b { font-size: 17px; white-space: nowrap; }
.mc-empty-recipe { padding: 20px; color: #667085; text-align: center; }
.mc-total { display: flex; flex: 0 0 34px; align-items: center; color: #20a820; font-size: 19px; font-weight: 700; }
.mc-total.bad { color: #f21f2b; }
.mc-overload { flex: 0 0 auto; margin-bottom: 4px; color: #f21f2b; font-size: 13px; font-weight: 600; text-align: center; }
.mc-activate { display: flex; min-height: 64px; flex: 0 0 64px; align-items: center; justify-content: center; gap: 12px; margin-top: 4px; padding: 8px 14px; border: 0; border-radius: 14px; background: #20a820; color: #fff; }
.mc-activate > .fluent-icon { display: flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 18px; background: rgba(255,255,255,.2); font-size: 20px; }
.mc-activate > b { font-size: 21px; line-height: 1.05; text-align: left; }
.mc-activate small { display: block; margin-top: 3px; font-size: 14px; font-weight: 400; }
.mc-recipe-info { display: none; min-height: 0; flex: 1 1 auto; flex-direction: column; justify-content: flex-end; gap: 6px; margin-top: 7px; padding: 12px; border-radius: 12px; background: rgba(255,255,255,.94); font-size: 13px; }
.mc-recipe-info strong { color: #20a820; }
.mc-recipe-info span { color: #667085; }

.mc-manual-panel { display: flex; min-height: 0; flex: 1; flex-direction: column; gap: 12px; padding: 14px 6px 4px; }
.mc-manual-warning { display: flex; align-items: center; gap: 12px; padding: 13px; border: 1px solid #ffd0d3; border-radius: 14px; background: #fff0f1; color: #a71923; }
.mc-manual-warning > .fluent-icon { font-size: 26px; }
.mc-manual-warning strong { font-size: 17px; }
.mc-manual-warning p { margin: 2px 0 0; font-size: 14px; }
.mc-manual-panel h3 { margin: 4px 0 0; font-size: 18px; }
.mc-manual-panel > label { font-size: 17px; font-weight: 600; }
.mc-manual-frequency { display: flex; align-items: center; gap: 9px; }
.mc-manual-frequency input { width: 180px; height: 52px; padding: 8px 12px; border: 1px solid #aebfd2; border-radius: 10px; font-size: 23px; text-align: right; }
.mc-manual-frequency span { font-size: 18px; }
.mc-manual-start,
.mc-auto-return { min-height: 58px; border: 0; border-radius: 14px; background: #20a820; color: white; font-size: 18px; font-weight: 700; }
.mc-manual-start { display: flex; align-items: center; justify-content: center; gap: 9px; }
.mc-manual-start.stop { background: #f21f2b; }
.mc-manual-state { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 14px; border: 1px solid #dce4ee; border-radius: 14px; background: #f8fafc; }
.mc-manual-state span { color: #667085; }
.mc-auto-return { margin-top: auto; border: 1px solid #20a820; background: #fff; color: #20a820; }

.mc-controls { grid-column: 1 / 3; grid-row: 3; padding: 10px 20px; }
.mc-controls h2 { height: 22px; margin: 0 0 9px; font-size: 16px; font-weight: 700; }
.mc-control-grid { display: grid; width: 1020px; height: 213px; min-height: 0; grid-template-columns: 134fr 150fr 150fr 140fr 150fr 210fr 420fr; grid-template-rows: 128fr 112fr 44fr; gap: 6px 10px; margin-inline: auto; }
.mc-control-button { display: flex; min-width: 0; width: 100%; height: 80px; min-height: 0; align-self: center; align-items: center; justify-content: center; gap: 6px; padding: 6px; border: 1px solid #aebfd2; border-radius: 14px; background: #f8fafc; color: #111827; }
.mc-control-button > .fluent-icon { font-size: 25px; }
.mc-control-button > b { font-size: 14px; line-height: 1.05; }
.mc-control-button small { display: block; margin-top: 2px; font-size: 12px; font-weight: 600; }
.mc-control-button.danger { border-color: #f21f2b; background: #f21f2b; color: #fff; }
.mc-control-button.primary { border-color: #20a820; background: #20a820; color: #fff; }
.mc-control-button.active:not(.danger):not(.primary) { border-color: #20a820; background: #eaf9e8; color: #168a32; }
.mc-manual-unload,
.mc-auto-unload { border-color: #20a820; background: #f2fbf2; color: #168a32; }
.mc-stop { grid-column: 1; grid-row: 1; border-radius: 18px; }
.mc-pause { width: 89.333%; grid-column: 2; grid-row: 1; justify-self: center; }
.mc-clean { width: 89.333%; grid-column: 3; grid-row: 1; justify-self: center; }
.mc-manual-unload { grid-column: 4; grid-row: 1; }
.mc-auto-unload { grid-column: 5; grid-row: 1; }
.mc-conveyor { grid-column: 1; grid-row: 2; }
.mc-damper-up { width: 89.333%; grid-column: 2; grid-row: 2; justify-self: center; }
.mc-damper-down { width: 89.333%; grid-column: 3; grid-row: 2; justify-self: center; }
.mc-current-ingredient { display: flex; min-width: 0; min-height: 0; grid-column: 7; grid-row: 1; flex-direction: column; overflow: hidden; padding: 6px 11px; border: 1px solid #8fa9c5; border-radius: 13px; background: #fff; }
.mc-current-ingredient > div { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 7px; }
.mc-current-ingredient > div > span { display: -webkit-box; min-width: 0; overflow: hidden; color: #667085; font-size: 13px; font-weight: 700; line-height: 1.15; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.mc-current-ingredient > div button { min-width: 96px; min-height: 29px; flex: 0 0 auto; padding: 3px 7px; border: 1px solid #aebfd2; border-radius: 6px; background: #f8fafc; color: #111827; font-size: 14px; font-weight: 600; }
.mc-current-ingredient > strong { overflow: hidden; margin-top: 3px; font-size: 17px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.mc-current-ingredient > strong.mc-loading-idle { margin: auto 0; color: #667085; }
.mc-current-ingredient > p { display: flex; justify-content: space-between; gap: 9px; margin: auto 0 0; color: #667085; font-size: 11px; }
.mc-current-ingredient > p b { color: #111827; }
.mc-unload-box { display: grid; min-width: 0; min-height: 0; grid-column: 4 / 7; grid-row: 2; grid-template-columns: auto 82px auto 1fr; grid-template-rows: 1fr 1fr; align-items: center; gap: 4px 7px; padding: 7px 10px; border: 1px solid #dce4ee; border-radius: 14px; background: #f8fafc; }
.mc-unload-box > button:first-child { border: 0; background: transparent; color: #111827; font-size: 14px; font-weight: 600; }
.mc-unload-value { height: 35px; border: 1px solid #aebfd2; border-radius: 8px; background: #fff; font-size: 17px; font-weight: 700; }
.mc-unload-box > span { font-size: 14px; }
.mc-unload-all { display: flex; grid-column: 4; grid-row: 1; align-items: center; gap: 6px; border: 0; background: transparent; font-size: 13px; }
.mc-unload-all i { display: inline-flex; width: 20px; height: 20px; align-items: center; justify-content: center; border: 1px solid #aebfd2; border-radius: 4px; color: #20a820; font-style: normal; font-weight: 700; }
.mc-unload-box em { grid-column: 1 / 5; grid-row: 2; color: #667085; font-size: 12px; font-style: normal; text-align: center; }
.mc-damper-state { display: flex; min-width: 0; align-items: center; justify-content: center; gap: 6px; border: 1px solid #dce4ee; border-radius: 16px; background: #f8fafc; color: #667085; font-size: 11px; }
.mc-damper-state i { width: 8px; height: 8px; border-radius: 50%; background: #98a2b3; }
.mc-damper-state.on { border-color: #b9ddb9; background: #eaf9e8; color: #168a32; font-weight: 600; }
.mc-damper-state.on i { background: #20a820; }
.mc-damper-open { grid-column: 2; grid-row: 3; }
.mc-damper-closed { grid-column: 3; grid-row: 3; }
.mc-reset { border: 1px solid #f21f2b; border-radius: 10px; background: #fff0f1; color: #f21f2b; font-size: 11px; font-weight: 700; }
.mc-reset-drive { grid-column: 4; grid-row: 3; }
.mc-reset-conveyor { grid-column: 5 / 7; grid-row: 3; }
.mc-current-process { display: flex; min-width: 0; height: 91px; min-height: 0; grid-column: 7; grid-row: 2 / 4; align-self: start; flex-direction: column; padding: 9px 12px; border: 1px solid #dce4ee; border-radius: 14px; background: #f8fafc; }
.mc-current-process > span { color: #667085; font-size: 12px; font-weight: 700; }
.mc-current-process > strong { overflow: hidden; margin-top: 5px; font-size: 18px; line-height: 1.05; text-overflow: ellipsis; white-space: nowrap; }
.mc-current-process > p { display: -webkit-box; overflow: hidden; margin: 5px 0; color: #667085; font-size: 11px; line-height: 1.25; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.mc-current-process > span,
.mc-current-process > strong,
.mc-current-process > p,
.mc-current-process > .mc-process-progress { flex-shrink: 0; }
.mc-process-progress { height: 6px; margin-top: auto; overflow: hidden; border-radius: 4px; background: #e8ecf3; }
.mc-process-progress i { display: block; height: 100%; border-radius: inherit; background: #20a820; }

.mc-other-summary { grid-column: 1 / 4; grid-row: 4; padding: 8px; background: rgba(255,255,255,.92) url("assets/mixer-2-summary-grass.png") right bottom / cover no-repeat; }
.mc-other-inner { display: grid; height: 100%; min-width: 0; grid-template-columns: 340fr 160fr 240fr 165fr 150fr 135fr 220fr minmax(170px,1fr); align-items: center; gap: 8px; padding: 0 8px; border-radius: 13px; background: linear-gradient(90deg, rgba(255,255,255,.98), rgba(255,255,255,.84)); }
.mc-other-title { text-align: center; }
.mc-other-title strong { display: block; font-size: 21px; }
.mc-other-title span { display: block; margin-top: 2px; color: #667085; font-size: 12px; }
.mc-other-status { display: flex; min-width: 0; flex-direction: column; align-items: stretch; justify-content: center; gap: 4px; color: #667085; font-size: 11px; }
.mc-other-status > span { display: block; }
.mc-other-status > strong { display: inline-flex; min-height: 30px; align-items: center; justify-content: center; gap: 6px; padding: 4px 8px; border: 1px solid #bfd4eb; border-radius: 16px; background: #eaf3ff; color: #1672c4; font-size: 12px; }
.mc-other-status i { width: 8px; height: 8px; border-radius: 50%; background: #2e8bda; }
.mc-other-status.running > strong { border-color: #b9ddb9; background: #eaf9e8; color: #168a32; }
.mc-other-status.running i { background: #20a820; }
.mc-other-value { min-width: 0; }
.mc-other-value > span { display: block; overflow: hidden; color: #667085; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.mc-other-value > strong { display: block; overflow: hidden; margin-top: 3px; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.mc-other-timer { display: flex !important; align-items: center; gap: 5px; }
.mc-other-timer .fluent-icon { color: #667085; font-size: 14px; }
.mc-other-value > small { display: block; margin-top: 2px; color: #667085; font-size: 10px; }
.mc-mini-progress { width: 100%; height: 5px; margin-top: 4px; overflow: hidden; border-radius: 4px; background: #e8ecf3; }
.mc-mini-progress i { display: block; height: 100%; background: #20a820; }
.mc-open-other { display: flex; width: 100%; max-width: 200px; min-height: 60px; align-items: center; justify-content: center; gap: 8px; justify-self: end; border: 1px solid #8fa9c5; border-radius: 14px; background: #fff; color: #111827; font-size: 18px; font-weight: 600; }

.mc-alarm { display: flex; grid-column: 1 / 4; grid-row: 5; align-items: center; gap: 14px; padding: 8px 16px; }
.mc-alarm-icon { display: flex; width: 46px; height: 46px; flex: 0 0 46px; align-items: center; justify-content: center; border-radius: 23px; background: #eaf9e8; color: #20a820; }
.mc-alarm-icon .fluent-icon { font-size: 22px; }
.mc-alarm > div:nth-child(2) > span { display: block; color: #667085; font-size: 15px; font-weight: 700; }
.mc-alarm > div:nth-child(2) > strong { display: block; margin-top: 3px; font-size: 18px; }
.mc-alarm-status { display: inline-flex; align-items: center; gap: 7px; margin-left: auto; padding: 8px 14px; border-radius: 18px; background: #eaf9e8; color: #168a32; font-size: 14px; font-weight: 600; }
.mc-alarm-status i { width: 8px; height: 8px; border-radius: 50%; background: #20a820; }
.mc-alarm.has-alarm { border-color: #ff9da4; background: rgba(255,245,246,.96); }
.mc-alarm.has-alarm .mc-alarm-icon { background: #fff0f1; color: #f21f2b; }
.mc-alarm-status.bad { background: #fff0f1; color: #f21f2b; }
.mc-alarm-status.bad i { background: #f21f2b; }

/* Source-derived WinUI pages: Board, alarms, reports, recipes, ingredients, settings and help. */
.source-title-card {
  display: flex;
  min-height: 78px;
  flex-direction: column;
  justify-content: center;
  margin: 0 210px 16px 0;
  padding: 14px 24px;
  border: 1px solid rgba(217,226,234,.9);
  border-radius: 16px;
  background: rgba(255,255,255,.94);
  box-shadow: none;
}
.source-title-card .page-title { font-size: 34px; font-weight: 700; letter-spacing: -.5px; }
.source-title-card.large-title .page-title { font-size: 42px; }
.source-title-card .page-subtitle { margin-top: 2px; font-size: 14px; }

.alarms-page,
.reports-page,
.recipes-page,
.ingredients-page {
  background: linear-gradient(rgba(244,247,251,.63), rgba(244,247,251,.63)), url("assets/recipe-panel-cow-meadow.png") center bottom / cover no-repeat;
}
.alarms-page,
.reports-page { padding: 28px; }
.recipes-page { padding: 20px; }
.ingredients-page { padding: 20px; }
.settings-page,
.help-page { padding: 24px; background: #f4f7fb; }

/* The source BoardPage.xaml is a plain 1920×1080 white indicator board. */
.board-page.display-page { height: 1080px; min-height: 1080px; overflow: hidden; padding: 0; background: #fff; }
.display-board { display: grid; height: 100%; background: #000; }
.display-board.double { grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 12px; }
.display-board.single { grid-template-rows: 1fr; }
.board-mixer {
  display: grid;
  min-height: 0;
  grid-template-columns: 1fr;
  grid-template-rows: 78px 150px 4px 54px minmax(0,1fr);
  align-items: stretch;
  padding: 0;
  border: 0;
  background: #fff;
  color: #000;
}
.board-label { align-self: end; margin: 0 34px 8px; color: #000; font-size: 36px; font-weight: 700; line-height: 1; }
.board-ingredient { align-self: center; overflow: hidden; margin: 0 34px 4px; padding-block: 4px; color: #000; font-size: 82px; font-weight: 700; line-height: 1.18; text-overflow: ellipsis; white-space: nowrap; text-transform: none; }
.board-rule { height: 4px; background: #000; }
.board-caption { align-self: center; margin: 0 34px; color: #000; font-size: 30px; font-weight: 400; }
.board-remaining { display: flex; min-height: 0; align-items: center; justify-content: center; padding: 0; border-radius: 0; background: #fff; color: #000; box-shadow: none; }
.board-remaining strong { font-size: 148px; font-weight: 700; line-height: 1; letter-spacing: -4px; }
.board-remaining.near { background: #aeeaa8; }
.board-remaining.over { background: #ffd5d8; color: #c91521; }
.display-board.single .board-mixer { grid-template-rows: 130px 245px 5px 82px minmax(0,1fr); }
.display-board.single .board-label { margin: 0 54px 14px; font-size: 54px; }
.display-board.single .board-ingredient { margin-inline: 54px; font-size: 126px; }
.display-board.single .board-caption { margin-inline: 54px; font-size: 46px; }
.display-board.single .board-remaining strong { font-size: 270px; }

/* Source list and report pages. */
.source-filter {
  display: grid;
  align-items: end;
  gap: 12px;
  margin-bottom: 16px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255,255,255,.94);
}
.source-filter .field { min-width: 0; }
.source-filter .button { min-width: 112px; }
.alarm-filter { grid-template-columns: 190px minmax(260px,1fr) 210px 210px 190px auto auto; }
.report-filter { grid-template-columns: 220px 220px 220px auto auto auto auto; }
.report-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.report-summary-card { min-width: 0; padding: 16px 18px; border: 1px solid #dbe3eb; border-radius: 14px; background: rgba(255,255,255,.96); }
.report-summary-card span { display: block; margin-bottom: 7px; color: #667085; font-size: 13px; font-weight: 600; }
.report-summary-card strong { display: block; overflow: hidden; color: #1f2937; font-size: 23px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.report-summary-card small { display: block; margin-top: 5px; overflow: hidden; color: #667085; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.report-summary-card.over { border-color: #f3c3c3; background: #fff5f5; }
.report-summary-card.over strong { color: #c62828; }
.report-summary-card.under { border-color: #bfd5ef; background: #f3f8ff; }
.report-summary-card.under strong { color: #1565c0; }
.text-blue { color: #1565c0 !important; }
.source-table-card { overflow: hidden; border-radius: 16px; background: rgba(255,255,255,.96); box-shadow: none; }
.source-table-card .table-wrap { overflow: auto; }
.source-table-card table { min-width: 100%; }
.source-table-card thead th { height: 46px; padding: 10px 13px; background: #f1f4f7; color: #344054; font-size: 13px; font-weight: 700; text-align: left; }
.source-table-card tbody td { height: 46px; padding: 9px 13px; border-top: 1px solid #e4e9ef; font-size: 14px; }
.alarm-table-card { height: calc(100% - 174px); }
.alarm-table-card .table-wrap { height: 100%; }
.reports-scroll { display: grid; gap: 16px; }
.reports-scroll .source-table-card { min-height: 330px; }
.table-title { padding: 15px 17px 10px; font-size: 20px; font-weight: 700; }
.empty-row td { color: #667085; text-align: center !important; }

/* RecipeManagementPage.xaml: fixed 330 / flexible / 640 three-column layout. */
.management-grid {
  display: grid;
  height: calc(var(--emulator-height) - 134px);
  min-height: 0;
  min-width: 1160px;
  grid-template-columns: 330px minmax(450px,1fr) 640px;
  gap: 16px;
}
.management-column { min-height: 0; border-radius: 16px; background: rgba(255,255,255,.96); box-shadow: none; }
.management-column .column-header { min-height: 62px; padding: 15px 18px; }
.management-column .section-title { font-size: 22px; }
.management-column .column-body { min-height: 0; padding: 14px; }
.recipe-list { gap: 7px; }
.recipe-list-item {
  display: grid;
  min-height: 72px;
  grid-template-columns: minmax(0,1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  padding: 11px 13px;
  border: 1px solid #d9e2e9;
  border-radius: 10px;
  background: #fff;
}
.recipe-list-item.active { border-color: #20a820; background: #eaf9e8; box-shadow: none; }
.recipe-list-item strong { overflow: visible; font-size: 16px; line-height: 1.18; text-overflow: clip; white-space: normal; }
.recipe-list-item small { overflow: hidden; color: #667085; text-overflow: ellipsis; white-space: nowrap; }
.recipe-list-item span { grid-column: 2; grid-row: 1 / 3; margin: 0 0 0 12px; color: #111827; font-size: 14px; font-weight: 600; white-space: nowrap; }
.new-recipe-button { min-height: 56px; margin: 0 14px 14px; border-radius: 12px; font-size: 15px; }
.composition-column-body { display: flex; flex-direction: column; }
.composition-list { min-height: 0; flex: 1; align-content: start; overflow: auto; }
.composition-item {
  display: grid;
  min-height: 58px;
  grid-template-columns: 36px minmax(0,1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border: 1px solid #d9e2e9;
  border-radius: 10px;
  background: #fff;
  color: #111827;
  text-align: left;
}
.composition-item.active { border-color: #20a820; background: #eaf9e8; }
.composition-item i { display: flex; width: 30px; height: 30px; align-items: center; justify-content: center; border-radius: 15px; background: #eaf9e8; color: #20a820; font-style: normal; font-weight: 700; }
.composition-item strong { overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.composition-item span { color: #344054; font-size: 14px; font-weight: 600; white-space: nowrap; }
.composition-toolbar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.composition-toolbar.first { margin-top: 14px; }
.composition-toolbar .button { min-height: 48px; }
.recipe-card-actions { margin-top: 6px; }
.recipe-card-actions .button { min-width: 120px; }
.management-column .form-stack { gap: 18px; }
.management-column .textarea { min-height: 150px; }

/* IngredientManagementPage.xaml. */
.ingredient-page { min-height: 100%; }
.ingredient-page::after { display: none; }
.ingredient-catalog { overflow: hidden; padding: 0; border-radius: 16px; background: rgba(255,255,255,.96); box-shadow: none; }
.ingredient-toolbar { display: grid; grid-template-columns: 150px minmax(320px, 560px) 170px 1fr; align-items: end; padding: 16px; border-bottom: 1px solid #e4e9ef; }
.ingredient-toolbar > span { align-self: center; justify-self: end; color: #667085; font-size: 14px; }
.ingredient-list { max-height: calc(1080px - 220px); overflow: auto; gap: 0; margin: 0; }
.ingredient-row { min-height: 76px; margin: 0 14px; padding: 10px 14px; border-width: 0 0 1px; border-radius: 0; background: transparent; box-shadow: none; }
.ingredient-row img { width: 48px; height: 48px; }
.ingredient-row strong { font-size: 17px; }

.alarms-page,
.ingredients-page { display: flex; flex-direction: column; overflow: hidden; }
.alarms-page > .source-title-card,
.alarms-page > .source-filter,
.ingredients-page > .source-title-card { flex: 0 0 auto; }
.alarms-page > .alarm-table-card,
.ingredients-page > .ingredient-catalog { min-height: 0; flex: 1 1 auto; height: auto; }
.ingredients-page > .ingredient-catalog { display: flex; flex-direction: column; }
.ingredients-page .ingredient-toolbar { flex: 0 0 auto; }
.ingredients-page .ingredient-list { min-height: 0; height: auto; max-height: none; flex: 1 1 auto; }

/* SettingsPage.xaml: one continuous scroll surface with WinUI expanders. */
.settings-source-title { margin-right: 210px; }
.settings-source { display: grid; min-width: 1460px; gap: 12px; padding-bottom: 24px; }
.settings-connection { padding: 16px; border-radius: 16px; box-shadow: none; }
.settings-main-grid {
  display: grid;
  grid-template-columns: 260px 130px 130px 150px 180px 180px 180px 150px;
  align-items: end;
  gap: 12px;
}
.settings-main-grid .field { min-width: 0; }
.settings-save { min-height: 42px; grid-column: 1; }
.settings-main-grid .field:last-child { grid-column: 2; }
.source-expander { overflow: hidden; border-radius: 12px; box-shadow: none; }
.source-expander > summary {
  display: flex;
  min-height: 52px;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
  font-size: 17px;
  font-weight: 600;
}
.source-expander > summary::-webkit-details-marker { display: none; }
.source-expander > summary::before { content: "›"; width: 18px; color: #475467; font-size: 25px; font-weight: 400; line-height: 1; transform-origin: center; transition: transform .12s; }
.source-expander[open] > summary::before { transform: rotate(90deg); }
.source-expander[open] > summary { border-bottom: 1px solid #e4e9ef; }
.source-expander-body { padding: 16px; }
.compact-settings-fields { grid-template-columns: 250px 250px; }
.advance-settings-fields { grid-template-columns: 320px 170px 30px 190px; align-items: end; }
.setting-unit { align-self: center; margin-top: 21px; }
.settings-note { margin: 14px 0 0; padding: 0; border: 0; background: transparent; color: #667085; font-size: 13px; line-height: 1.45; }
.switch-line { display: flex; min-height: 42px; align-items: center; gap: 10px; }
.switch-line input { width: 40px; height: 22px; accent-color: #20a820; }
.switch-line b { font-size: 13px; font-weight: 600; }
.settings-auto-head { display: grid; grid-template-columns: 250px minmax(0,1fr); align-items: end; gap: 20px; }
.settings-auto-head .settings-note { margin: 0; }
.unload-settings-table { min-width: 1370px; margin-top: 16px; overflow: auto; }
.unload-head,
.unload-row { display: grid; grid-template-columns: 110px repeat(6, minmax(145px,1fr)) 110px; align-items: center; gap: 10px; }
.unload-head { min-height: 48px; padding: 0 5px; color: #475467; font-size: 12px; font-weight: 600; }
.unload-row { min-height: 62px; padding: 8px 5px; border-top: 1px solid #e4e9ef; }
.unload-row .input { min-width: 0; }
.database-status { margin-bottom: 14px; color: #667085; font-size: 14px; }
.database-fields {
  grid-template-columns: 240px 130px 220px 220px;
  grid-template-rows: repeat(3, auto);
}
.database-fields > .field:nth-child(5) { grid-column: 1; grid-row: 2; }
.database-fields > .field:nth-child(6) { grid-column: 2 / 4; grid-row: 2; }
.database-fields > .field:nth-child(7) { grid-column: 4; grid-row: 2; }
.database-fields > .field:nth-child(8) { grid-column: 1; grid-row: 3; }
.database-fields > .field:nth-child(9) { grid-column: 2; grid-row: 3; }
.database-actions { margin-top: 16px; }
.settings-tags-title { margin: 8px 0 0; padding: 8px 2px 0; font-size: 26px; }
.tag-expander .source-expander-body { padding: 0; }
.tag-table-wrap { max-width: 100%; overflow-x: auto; }
.tag-source-table { min-width: 1530px; border-collapse: collapse; }
.tag-source-table th { min-width: 76px; padding: 10px 8px; background: #f2f5f8; font-size: 11px; font-weight: 600; text-align: left; white-space: normal; }
.tag-source-table th:nth-child(2) { min-width: 225px; }
.tag-source-table td { height: 45px; padding: 8px; border-top: 1px solid #e4e9ef; font-size: 12px; white-space: nowrap; }
.tag-source-table td:nth-child(1),
.tag-source-table td:nth-child(3),
.tag-source-table td:nth-child(4),
.tag-source-table td:nth-child(5),
.tag-source-table td:nth-child(7) { text-align: center; }

/* HelpPage.xaml uses always-visible image/text cards, not collapsible panels. */
.help-source-title { min-height: 78px; }
.help-list { display: grid; min-width: 0; gap: 16px; }
.help-section {
  display: grid;
  grid-template-columns: 1080px minmax(0,1fr);
  gap: 24px;
  align-items: start;
  overflow: hidden;
  padding: 18px;
  border-radius: 16px;
  box-shadow: none;
}
.help-section > img { display: block; width: 1080px; height: auto; border: 1px solid #d9e2ea; border-radius: 10px; }
.help-copy { color: #344054; font-size: 15px; line-height: 1.52; }
.help-copy h2 { margin: 0 0 12px; color: #111827; font-size: 24px; }
.help-copy p { margin: 0 0 12px; }

/* Final source-faithful overrides from MainPage.xaml, MixerPage.xaml and
   IngredientManagementPage.xaml. */
.sidebar-toggle {
  position: absolute;
  z-index: 3;
  top: 9px;
  left: 8px;
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #273444;
}
.sidebar-toggle:hover { background: rgba(255,255,255,.78); }
.sidebar-toggle .fluent-icon { font-size: 20px; }
.brand { padding: 18px 10px 12px 56px; }

.connection-card { min-height: 160px; padding: 12px; }
.connection-card > .status-row {
  display: grid;
  min-height: 42px;
  grid-template-columns: 13px minmax(0,1fr);
  align-items: center;
  gap: 9px;
  padding: 0;
}
.status-dot { width: 13px; height: 13px; box-shadow: none; }
.status-dot.online { box-shadow: none; }
.status-copy { display: flex; min-width: 0; flex-direction: column; line-height: 1.16; }
.status-copy strong { color: #273444; font-size: 14px; font-weight: 600; }
.status-copy small { color: #667085; font-size: 12px; }
.connection-card > .version {
  display: flex;
  min-height: 57px;
  flex-direction: column;
  gap: 4px;
  margin-top: 3px;
  padding: 9px 0 0;
  border-top: 1px solid rgba(108,126,143,.2);
  color: #273444;
}
.connection-card > .version strong { font-size: 12px; font-weight: 600; }
.connection-card > .version span { color: #667085; font-size: 10px; line-height: 1.25; }

.mc-metric-stack > div {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
}
.mc-mode-switch button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.mc-mode-switch button .fluent-icon { font-size: 18px; font-weight: 400; }
.mc-alarm-status { display: none; }

.ingredients-page {
  display: flex;
  flex-direction: column;
  gap: 30px;
  overflow: hidden;
  padding: 20px;
}
.ingredients-page > .source-title-card {
  min-height: 80px;
  flex: 0 0 80px;
  margin: 0;
  padding: 14px 24px;
  border-radius: 16px;
}
.ingredients-page > .source-title-card .page-title { font-size: 34px; }
.ingredients-page > .ingredient-catalog {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 18px 24px;
  border-radius: 20px;
}
.ingredients-page .ingredient-toolbar {
  display: grid;
  min-height: 75px;
  flex: 0 0 75px;
  grid-template-columns: 107px 360px 150px minmax(0,1fr);
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid #dce4ee;
  border-radius: 14px;
}
.ingredients-page .ingredient-toolbar .button { min-height: 42px; }
.ingredients-page .ingredient-toolbar .button:first-child { width: 107px; }
.ingredients-page .ingredient-toolbar .button:nth-of-type(2) { width: 150px; }
.ingredients-page .ingredient-toolbar .input { height: 42px; }
.ingredients-page .ingredient-toolbar > span {
  align-self: center;
  justify-self: end;
  color: #667085;
  font-size: 14px;
}
.ingredients-page .ingredient-list {
  display: grid;
  min-height: 0;
  height: auto;
  max-height: none;
  flex: 1 1 auto;
  align-content: start;
  gap: 20px;
  margin: 24px 0 0;
  overflow: auto;
}
.ingredients-page .ingredient-row {
  display: grid;
  min-height: 88px;
  grid-template-columns: 58px minmax(0,1fr) auto;
  align-items: center;
  gap: 16px;
  margin: 0;
  padding: 14px;
  border: 1px solid #dce4ee;
  border-radius: 14px;
  background: rgba(255,255,255,.96);
  box-shadow: none;
}
.ingredients-page .ingredient-row img { width: 58px; height: 58px; }
.ingredients-page .ingredient-row strong { font-size: 17px; }
.ingredients-page .ingredient-row .row-actions { display: flex; gap: 16px; }
.ingredients-page .ingredient-row .button { min-height: 40px; font-size: 14px; }
.ingredients-page .ingredient-row .button.edit { width: 160px; }
.ingredients-page .ingredient-row .button.soft-danger { width: 120px; }

.app-shell.pane-compact .sidebar { width: 58px; }
.app-shell.pane-compact .workspace { margin-left: 58px; }
.app-shell.pane-compact .brand { visibility: hidden; }
.app-shell.pane-compact .navigation { padding-inline: 3px; }
.app-shell.pane-compact .nav-button { justify-content: center; margin-inline: 0; padding-inline: 10px; }
.app-shell.pane-compact .nav-label,
.app-shell.pane-compact .sidebar-footer { display: none; }
.app-shell.pane-compact .nav-separator { margin-inline: 8px; }
