/* Manager pages: Lists, Records, Allergens, Settings (2026-10-26). */
.mg-list-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 12px !important; }
.mg-more { position: relative; }
.mg-more summary { list-style: none; }
.mg-more summary::-webkit-details-marker { display: none; }
.mg-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: min(380px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: 14px;
  padding: 18px; border-radius: 16px; background: var(--surface); box-shadow: 0 0 0 1px var(--border-soft), var(--shadow); }
.mg-pop-foot { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.mg-days { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; border: 0; }
.mg-days legend { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.mg-days label { position: relative; }
.mg-days input { position: absolute; opacity: 0; }
.mg-days span { display: grid; place-items: center; min-width: 44px; height: 36px; padding: 0 8px; border-radius: 999px; background: var(--surface2); font-size: 13.5px; font-weight: 600; cursor: pointer; }
.mg-days input:checked + span { background: var(--action); color: var(--on-action); }
.mg-days input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.mg-check { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; }
.mg-check input { width: 20px; height: 20px; accent-color: var(--action); }

.mg-items { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border-soft); }
.mg-items li { display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 20px; border-bottom: 1px solid var(--border-soft); }
.mg-kind { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border: 2px solid var(--border-strong); border-radius: 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.mg-text { flex: 1; min-width: 0; display: flex; flex-direction: column; margin: 0; }
.mg-text input { width: 100%; height: 40px; padding: 0 10px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--text); font: inherit; font-size: 15px; }
.mg-text input:hover { background: var(--surface2); }
.mg-text input:focus { outline: none; background: var(--surface); border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-wash); }
.mg-text .hint { padding: 0 10px 4px; }
.mg-row-actions { display: flex; gap: 0; flex: none; }
.mg-row-actions form { margin: 0; }
.mg-row-actions .icon-btn:disabled { opacity: .25; cursor: default; }
.mg-x:hover { color: var(--bad); }
.mg-empty { color: var(--muted); font-size: 14px; padding: 14px 20px !important; }
.mg-add { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.mg-add .field { flex: 1 1 220px; }
.mg-add .field.narrow { flex: 0 1 180px; }
.mg-num { flex: 0 1 110px !important; }
.mg-unit { flex: 1; display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin: 0; }
.mg-unit .field:first-of-type { flex: 1 1 200px; }
#fridges .rows > li { align-items: flex-end; }

/* Records */
.rc-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rc-nav form { margin: 0; display: flex; gap: 8px; }
.rc-nav input[type=date] { height: 40px; padding: 0 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; }
.rc-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.rc-stat { padding: 14px 16px; border-radius: 14px; background: var(--surface); box-shadow: 0 0 0 1px var(--border-soft); }
.rc-stat b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.rc-stat span { font-size: 13px; color: var(--muted); }
.rc-stat.is-bad b { color: var(--bad); }
.rc-stat.is-warn b { color: var(--warn); }
.rc-stat.is-good b { color: var(--good); }
.rc-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.rc-table th { text-align: left; font-size: 12.5px; font-weight: 650; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--border); }
.rc-table td { padding: 10px 12px; border-bottom: 1px solid var(--border-soft); vertical-align: top; }
.rc-table tr:last-child td { border-bottom: 0; }
.rc-table .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.rc-table tr.is-bad td.rc-val { color: var(--bad); font-weight: 700; }
.rc-table tr.is-void td { color: var(--muted); }
.rc-table tr.is-void .rc-what { text-decoration: line-through; }
.rc-fix { display: block; margin-top: 3px; font-size: 13px; color: var(--muted); }
.rc-fix b { color: var(--text); }
.rc-miss { color: var(--warn); font-weight: 600; }
.rc-wrap { overflow-x: auto; }
.rc-corr summary { list-style: none; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); }
.rc-corr summary::-webkit-details-marker { display: none; }
.rc-corr form { display: flex; gap: 6px; margin-top: 6px; }
.rc-corr input { flex: 1; min-width: 140px; height: 36px; padding: 0 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; font-size: 14px; }
.rc-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.rc-day { display: flex; flex-direction: column; gap: 4px; padding: 10px; border-radius: 12px; background: var(--surface2); text-decoration: none; color: var(--text); font-size: 13px; min-height: 76px; }
.rc-day b { font-size: 14px; }
.rc-day.is-today { box-shadow: inset 0 0 0 2px var(--text); }
.rc-day .ok { color: var(--good); font-weight: 650; }
.rc-day .bad { color: var(--bad); font-weight: 650; }
.rc-day .miss { color: var(--warn); font-weight: 650; }
.rc-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rc-form { display: flex; flex-direction: column; gap: 12px; }
.rc-done { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--good-wash); font-size: 14px; }
.rc-done.is-bad { background: var(--bad-wash); }
@media (max-width: 760px) {
  .rc-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rc-two { grid-template-columns: 1fr; }
  .rc-week { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rc-table .rc-hide { display: none; }
}

/* Allergens */
.al-wrap { overflow-x: auto; border-radius: 18px; box-shadow: 0 0 0 1px var(--border-soft); background: var(--surface); }
.al-table { border-collapse: collapse; font-size: 14px; min-width: 100%; }
.al-table th, .al-table td { border-bottom: 1px solid var(--border-soft); padding: 0; }
.al-table thead th { position: sticky; top: 0; background: var(--surface); }
.al-table .al-col { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 12.5px; font-weight: 600; padding: 10px 6px; white-space: nowrap; color: var(--muted); height: 150px; text-align: left; }
.al-table .al-dish { text-align: left; padding: 10px 14px; min-width: 180px; font-weight: 600; position: sticky; left: 0; background: var(--surface); }
.al-table .al-dish small { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; }
.al-table .al-sec td { padding: 14px 14px 6px; font: 650 12px var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--surface2); }
.al-cell { width: 40px; min-width: 40px; text-align: center; }
.al-cell button, .al-cell span { display: grid; place-items: center; width: 100%; height: 42px; border: 0; background: none; font: 800 13px var(--font-sans); color: var(--text); cursor: pointer; }
.al-cell span { cursor: default; }
.al-y { background: var(--bad-wash) !important; color: var(--bad) !important; }
.al-m { background: var(--warn-wash) !important; color: var(--warn) !important; }
.al-key { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); }
.al-key i { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; font: 800 12px var(--font-sans); font-style: normal; margin-right: 6px; vertical-align: -5px; }
.al-dish-actions { display: flex; gap: 2px; }
@media print {
  .top, .page-head .btn, .al-noprint, .sd-toasts { display: none !important; }
  .page { padding: 0; max-width: none; }
  .al-wrap { box-shadow: none; overflow: visible; }
  .al-table .al-col { height: 120px; }
}

/* Settings */
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.st-rules { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.st-seg { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; border: 0; }
.st-seg legend { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.st-seg label { position: relative; }
.st-seg input { position: absolute; opacity: 0; }
.st-seg span { display: grid; place-items: center; min-height: 42px; padding: 0 16px; border-radius: 12px; background: var(--surface2); font-size: 14.5px; font-weight: 600; cursor: pointer; }
.st-seg input:checked + span { background: var(--action); color: var(--on-action); }
.st-seg input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Phones: the check's name gets the full row; its buttons sit underneath. */
@media (max-width: 560px) {
  .mg-items li { flex-wrap: wrap; row-gap: 0; padding: 6px 8px 4px 14px; }
  .mg-text { flex-basis: calc(100% - 40px); }
  .mg-row-actions { margin-left: auto; }
}
