:root {
  color-scheme: light;
  --app-text-scale: 1;
  --app-ui-scale: 1;
  --widget-text-scale: 1;
  --bg: #f3f5f1;
  --panel: #ffffff;
  --panel-soft: #edf3ee;
  --ink: #16241c;
  --muted: #647268;
  --line: #d6dfd6;
  --green: #1f4732;
  --green-soft: #e5f0e8;
  --coral: #e76b58;
  --amber: #c89038;
  --blue: #3f6f90;
  --plum: #695884;
  --danger: #cf3f35;
  --shadow: 0 20px 48px rgba(22, 36, 28, 0.08);
  --shadow-soft: 0 12px 28px rgba(22, 36, 28, 0.05);
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Noto Sans KR", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  width: 100%;
}

body {
  margin: 0;
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  font-size: calc(16px * var(--app-text-scale));
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0) 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.35)),
    var(--bg);
  color: var(--ink);
  letter-spacing: 0;
}

.splash-intro {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  background: #f7f6f0;
  color: var(--green);
  transition: opacity 180ms ease, visibility 180ms ease;
}

.splash-intro img {
  width: 82px;
  height: 82px;
  object-fit: contain;
}

.splash-intro strong {
  font-size: 24px;
  line-height: 1.1;
}

.splash-intro span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.splash-intro.is-done {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  width: 100%;
  grid-template-columns: 286px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 247, 0.96)),
    #fff;
  backdrop-filter: blur(22px);
}

.sidebar {
  border-right: 1px solid rgba(214, 223, 214, 0.94);
  padding: 22px 18px 28px;
}

.right-rail {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 30;
  display: none;
  width: min(388px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(214, 223, 214, 0.94);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 28px 80px rgba(24, 38, 32, 0.16);
  backdrop-filter: blur(22px);
}

.right-rail.is-open {
  display: block;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 74px;
  margin-bottom: 10px;
  padding: 14px;
  border: 1px solid rgba(214, 223, 214, 0.78);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 248, 243, 0.96));
  box-shadow: var(--shadow-soft);
}

.brand-logo {
  width: 82px;
  height: 64px;
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
  padding: 4px;
  border: 1px solid rgba(37, 61, 34, 0.18);
}

.brand strong,
.brand span {
  display: block;
  line-height: 1.2;
}

.brand strong {
  font-size: 18px;
  font-weight: 800;
}

.brand span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.alert-toggle {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  margin: 14px 0 16px;
  padding: 0 14px;
  border: 1px solid rgba(231, 107, 88, 0.24);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff4f1, #ffefea);
  color: var(--ink);
  text-align: left;
  font-weight: 850;
}

.alert-toggle svg {
  width: 18px;
  height: 18px;
  color: var(--coral);
}

.alert-toggle strong {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  font-size: 12px;
}

.role-switcher {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 24px 0 18px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbf8;
}

.role-button {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.role-button.is-active {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 8px 18px rgba(23, 33, 29, 0.16);
}

.access-panel {
  display: grid;
  gap: 5px;
  margin: 24px 0 18px;
  padding: 16px;
  border: 1px solid rgba(31, 71, 50, 0.12);
  border-radius: 8px;
  background: linear-gradient(180deg, #edf6ef, #e5f0e8);
}

.access-panel strong {
  font-size: 15px;
}

.access-panel small {
  color: #496258;
  font-size: 12px;
  line-height: 1.35;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 48px;
  width: 100%;
  padding: 0 12px 0 10px;
  border: 1px solid rgba(214, 223, 214, 0.32);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
  color: #34413b;
  text-align: left;
  font-weight: 800;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease, border-color 140ms ease;
}

.nav-item svg,
.icon-action svg,
.search-wrap svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.1;
}

.nav-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-item:hover,
.nav-item.is-active {
  border-color: rgba(31, 71, 50, 0.12);
  background: #fff;
  box-shadow: 0 10px 20px rgba(22, 36, 28, 0.06);
}

.nav-item.is-active {
  color: var(--green);
  transform: translateY(-1px);
}

.nav-item i {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(31, 71, 50, 0.08);
}

.system-tile {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 14px;
  margin-top: 24px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.system-tile strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
}

.signal-bars {
  display: flex;
  align-items: end;
  gap: 3px;
  height: 26px;
}

.signal-bars span {
  width: 6px;
  border-radius: 5px 5px 0 0;
  background: var(--green);
}

.signal-bars span:nth-child(1) {
  height: 9px;
}

.signal-bars span:nth-child(2) {
  height: 14px;
}

.signal-bars span:nth-child(3) {
  height: 20px;
}

.signal-bars span:nth-child(4) {
  height: 26px;
  background: var(--amber);
}

.main {
  min-width: 0;
  padding: 18px 24px 34px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 16;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(214, 223, 214, 0.74);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(22px);
}

.page-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.desktop-page-title {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.desktop-page-title strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 24px;
  line-height: 1.05;
}

.mobile-top-title,
.mobile-logout-action,
.mobile-alert-action,
.mobile-menu-action {
  display: none;
}

.mobile-top-title {
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.mobile-top-title img {
  display: none;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: cover;
  flex: 0 0 auto;
}

.mobile-top-title.is-home img {
  display: block;
}

.mobile-top-title strong,
.mobile-top-title span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-top-title strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.1;
}

.mobile-top-title span {
  display: none;
}

.mobile-alert-action {
  position: relative;
}

.mobile-alert-action strong {
  position: absolute;
  top: -5px;
  right: -5px;
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  font-size: 10px;
  line-height: 1;
}

.search-wrap {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: min(560px, 100%);
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.search-wrap input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.header-alert-strip {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.header-alert-pill {
  display: grid;
  gap: 4px;
  min-width: 180px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  box-shadow: 0 8px 22px rgba(22, 36, 28, 0.06);
}

.header-alert-pill span,
.banner-alert-time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.header-alert-pill strong,
.banner-alert-copy strong {
  font-size: 15px;
  line-height: 1.3;
}

.header-alert-pill.green,
.banner-alert-card.green {
  border-color: rgba(11, 143, 101, 0.18);
  background: linear-gradient(180deg, #ffffff, #edf8f2);
}

.header-alert-pill.blue,
.banner-alert-card.blue {
  border-color: rgba(52, 125, 195, 0.18);
  background: linear-gradient(180deg, #ffffff, #edf5fb);
}

.header-alert-pill.amber,
.banner-alert-card.amber {
  border-color: rgba(217, 148, 44, 0.18);
  background: linear-gradient(180deg, #ffffff, #fff6e9);
}

.header-alert-pill.coral,
.banner-alert-card.coral {
  border-color: rgba(242, 105, 87, 0.22);
  background: linear-gradient(180deg, #ffffff, #fff1ef);
}

.banner-alert {
  margin-bottom: 16px;
}

.banner-alert-card {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  text-align: left;
  box-shadow: var(--shadow-soft);
}

.banner-alert-copy {
  display: grid;
  gap: 4px;
}

.banner-alert-copy p {
  margin: 0;
  color: #44544b;
  font-size: 14px;
  line-height: 1.45;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  max-width: 250px;
  padding: 0 14px;
  border: 1px solid rgba(214, 223, 214, 0.84);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f6faf7);
  color: #415148;
  font-size: 12px;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-action {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f6faf7);
  color: var(--ink);
  box-shadow: 0 6px 16px rgba(22, 36, 28, 0.04);
}

.icon-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(20, 36, 30, 0.08);
}

.icon-action.accent {
  border-color: rgba(242, 105, 87, 0.28);
  background: #fff0ed;
  color: var(--coral);
}

.ops-hero {
  position: relative;
  min-height: 252px;
  overflow: hidden;
  border-radius: 8px;
  background: #18241f;
  box-shadow: var(--shadow);
}

.ops-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
}

.hero-overlay {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  min-height: 252px;
  padding: 28px;
  background:
    linear-gradient(90deg, rgba(17, 31, 23, 0.94), rgba(17, 31, 23, 0.62) 58%, rgba(17, 31, 23, 0.18)),
    radial-gradient(circle at 82% 24%, rgba(232, 239, 227, 0.22), transparent 36%);
  color: #fff;
}

.hero-brand-logo {
  display: block;
  width: min(260px, 58vw);
  height: 88px;
  margin-bottom: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 250, 0.94);
  object-fit: contain;
  padding: 8px 14px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.14);
}

.hero-overlay h1 {
  max-width: 760px;
  margin: 10px 0 0;
  font-size: clamp(30px, 4vw, 50px);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(90px, 1fr));
  gap: 8px;
  width: min(410px, 100%);
}

.hero-metrics div {
  min-height: 74px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(14px);
}

.hero-metrics span,
.hero-metrics strong {
  display: block;
}

.hero-metrics span {
  color: rgba(255, 255, 255, 0.74);
  font-size: 12px;
}

.hero-metrics strong {
  margin-top: 8px;
  font-size: clamp(18px, 2vw, 24px);
  white-space: nowrap;
}

.workspace {
  margin-top: 22px;
  display: grid;
  gap: 18px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin: 8px 0 16px;
}

.section-head h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.15;
}

.section-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.section-actions {
  justify-content: flex-end;
  margin: 0 0 14px;
}

.eyebrow {
  display: inline-block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-overlay .eyebrow {
  color: rgba(255, 255, 255, 0.72);
}

.grid {
  display: grid;
  gap: 14px;
}

.grid.kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid.two {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel {
  min-width: 0;
  border: 1px solid rgba(214, 223, 214, 0.9);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  transition: box-shadow 140ms ease, transform 140ms ease, border-color 140ms ease;
}

.panel.pad {
  padding: 18px;
}

.panel:hover {
  border-color: rgba(31, 71, 50, 0.12);
  box-shadow: 0 18px 34px rgba(22, 36, 28, 0.07);
}

.metric-card {
  position: relative;
  min-height: 130px;
  padding: 16px;
  overflow: hidden;
}

.metric-card::after {
  content: "";
  position: absolute;
  right: -24px;
  bottom: -28px;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  opacity: 0.16;
  background: var(--green);
}

.metric-card:nth-child(2)::after {
  background: var(--coral);
}

.metric-card:nth-child(3)::after {
  background: var(--blue);
}

.metric-card:nth-child(4)::after {
  background: var(--amber);
}

.metric-card strong {
  display: block;
  margin-top: 10px;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1;
}

.metric-card p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.meal-dashboard-grid {
  margin-top: 14px;
}

.meal-date-table {
  min-width: 640px;
}

.meal-date-table th,
.meal-date-table td {
  text-align: center;
  vertical-align: middle;
}

.meal-count-row {
  align-items: start;
}

.meal-progress {
  height: 8px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2ec;
}

.meal-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.headcount-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.headcount-program-table td {
  line-height: 1.45;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.inline-number {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.compact-number {
  width: 38px;
  min-height: 34px;
  padding: 0 4px;
  text-align: center;
}

.compact-control {
  min-height: 32px;
  padding: 0 9px;
  font-size: 12px;
}

.cleaning-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.cleaning-summary-card {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.cleaning-summary-card.is-pending {
  border-color: rgba(219, 94, 65, 0.32);
  background: #fff8f6;
}

.cleaning-summary-card > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cleaning-summary-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.cleaning-add-panel {
  margin-top: 14px;
}

.cleaning-add-form {
  grid-template-columns: minmax(180px, 1.2fr) minmax(160px, 1fr) 90px auto;
  align-items: end;
}

.cleaning-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.cleaning-table {
  width: 100%;
  min-width: 1040px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
}

.cleaning-table.is-compact {
  min-width: 900px;
}

.cleaning-table.is-read-only {
  min-width: 900px;
}

.cleaning-table th,
.cleaning-table td {
  padding: 5px 6px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
  vertical-align: middle;
}

.cleaning-table tr:last-child th,
.cleaning-table tr:last-child td {
  border-bottom: 0;
}

.cleaning-table th:last-child,
.cleaning-table td:last-child {
  border-right: 0;
}

.cleaning-table thead th {
  background: #f1f6f3;
  color: #26382f;
  font-size: 11px;
  font-weight: 900;
}

.cleaning-table thead th.is-today {
  background: #e7f3ea;
  color: var(--green);
}

.cleaning-area-head,
.cleaning-area-name {
  position: sticky;
  left: 0;
  z-index: 2;
}

.cleaning-area-head {
  min-width: 150px;
}

.cleaning-area-name {
  background: #fff;
  text-align: left !important;
}

.cleaning-area-name strong,
.cleaning-area-name span {
  display: block;
}

.cleaning-area-name strong {
  font-size: 11px;
  line-height: 1.25;
}

.cleaning-area-name span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.cleaning-interval {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.cleaning-interval-readonly {
  display: inline-flex;
  min-width: 34px;
  justify-content: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.cleaning-date-cell {
  background: #fff;
}

.cleaning-date-cell.is-due {
  background: #ffe4df;
  box-shadow: inset 0 0 0 2px rgba(219, 94, 65, 0.28);
}

.cleaning-date-cell.is-checked {
  background: #eaf6ed;
}

.cleaning-date-cell input {
  width: 15px;
  height: 15px;
  accent-color: var(--green);
}

.cleaning-table.is-read-only .cleaning-date-cell input {
  cursor: default;
  opacity: 0.85;
}

.control,
.select-control {
  min-height: 40px;
  border: 1px solid rgba(214, 223, 214, 0.9);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fbf9);
  color: var(--ink);
}

.control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  font-weight: 820;
  box-shadow: 0 6px 16px rgba(22, 36, 28, 0.04);
}

.control svg {
  width: 17px;
  height: 17px;
}

.control.primary {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.control.warn {
  border-color: rgba(242, 105, 87, 0.28);
  background: #fff0ed;
  color: #b84435;
}

.select-control {
  padding: 0 10px;
}

.form-control {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(214, 223, 214, 0.9);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  outline: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

textarea.form-control,
textarea,
input.form-control,
select.form-control {
  font-size: 14px;
}

.form-control:focus,
textarea:focus,
input:focus,
select:focus {
  border-color: rgba(31, 71, 50, 0.34);
  box-shadow: 0 0 0 4px rgba(31, 71, 50, 0.08);
}

.toast {
  border-radius: 8px;
  box-shadow: 0 20px 44px rgba(22, 36, 28, 0.18);
}

.dashboard-layout {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
}

.layout-block {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 28px rgba(24, 38, 32, 0.055);
}

.layout-block.editable {
  cursor: grab;
}

.layout-block.is-selected {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(37, 61, 34, 0.12);
}

.layout-block.is-hidden {
  opacity: 0.52;
}

.layout-block-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(216, 222, 209, 0.72);
}

.layout-block-head strong {
  display: block;
  margin-top: 3px;
}

.layout-block-content {
  min-width: 0;
  padding: 12px 14px 14px;
}

.layout-mini-actions {
  display: flex;
  gap: 4px;
}

.layout-mini-actions button {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}

.layout-mini-actions svg,
.palette-block svg {
  width: 16px;
  height: 16px;
}

.hidden-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 4px 8px;
  border-radius: 6px;
  background: #f0eee7;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.builder-block-body,
.compact-list {
  display: grid;
  gap: 8px;
}

.builder-mini-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(216, 222, 209, 0.72);
}

.builder-mini-row span {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.builder-table {
  display: grid;
  gap: 7px;
  font-size: 13px;
}

.builder-table > div {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr;
  gap: 8px;
  align-items: center;
}

.notice-box {
  display: flex;
  gap: 12px;
  align-items: start;
  padding: 12px;
  border-radius: 8px;
  background: var(--green-soft);
  color: #254332;
  line-height: 1.5;
}

.notice-box svg {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
}

.notice-box p {
  margin: 0;
}

.ui-builder-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 280px;
  gap: 14px;
  align-items: start;
}

.builder-sidebar,
.builder-canvas {
  min-height: 220px;
}

.builder-sidebar > strong,
.builder-canvas-head strong {
  display: block;
  margin: 4px 0 12px;
}

.palette-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.palette-block {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  font-weight: 800;
}

.palette-block:hover {
  border-color: var(--green);
  background: var(--green-soft);
}

.builder-canvas-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.builder-canvas-head small {
  color: var(--muted);
  text-align: right;
}

.builder-property-card {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.builder-field {
  display: grid;
  gap: 6px;
}

.builder-field span,
.builder-check span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.builder-field input,
.builder-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  outline: 0;
}

.builder-field input {
  min-height: 38px;
  padding: 0 10px;
}

.builder-field textarea {
  padding: 10px;
  resize: vertical;
}

.builder-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.builder-check {
  display: flex;
  align-items: center;
  gap: 8px;
}

.builder-delete {
  width: 100%;
}

input.form-control,
select.form-control {
  min-height: 38px;
  padding: 0 10px;
}

textarea.form-control {
  min-height: 86px;
  padding: 10px;
  resize: vertical;
  line-height: 1.45;
}

.field-label {
  display: block;
  margin: 12px 0 6px;
  color: #26382f;
  font-size: 13px;
  font-weight: 900;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.action-full {
  width: 100%;
  margin-top: 12px;
}

.table-map {
  display: grid;
  grid-template-columns: repeat(4, minmax(88px, 1fr));
  gap: 10px;
}

.table-tile {
  display: grid;
  align-content: space-between;
  gap: 10px;
  min-height: 118px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.table-tile button {
  width: 100%;
}

.table-tile.free {
  border-color: rgba(11, 143, 101, 0.3);
  background: #effaf5;
}

.table-tile.busy {
  border-color: rgba(240, 168, 47, 0.42);
  background: #fff8e8;
}

.table-tile.dirty {
  border-color: rgba(207, 63, 53, 0.38);
  background: #fff0ee;
}

.table-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.table-name strong {
  font-size: 18px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.status-pill.green {
  background: var(--green-soft);
  color: #0a6d4e;
}

.status-pill.amber {
  background: #fff2cf;
  color: #9a6100;
}

.status-pill.coral {
  background: #ffe5df;
  color: #ac3f31;
}

.status-pill.blue {
  background: #e4efff;
  color: #245bc2;
}

.list {
  display: grid;
  gap: 10px;
}

.list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.row-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.row-title strong {
  min-width: 0;
}

.row-meta {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.order-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(210px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.order-lane {
  min-height: 360px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfa;
}

.lane-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 32px;
  margin-bottom: 10px;
}

.lane-head strong {
  font-size: 15px;
}

.order-card {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.order-card header,
.order-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.order-card h3 {
  margin: 0;
  font-size: 15px;
}

.order-items {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9eee9;
}

.progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--amber));
}

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.inventory-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 14px;
}

.inventory-summary-card {
  min-height: 112px;
}

.inventory-summary-card strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
  line-height: 1;
}

.inventory-summary-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.stock-shortage-row.is-done {
  background: #f8fbf8;
}

.stock-shortage-row.is-done strong {
  color: var(--muted);
}

.inventory-section {
  margin-bottom: 14px;
}

.section-note {
  margin: -4px 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.upload-result {
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbf8;
}

.upload-result strong {
  display: block;
  margin-top: 2px;
  font-size: 15px;
}

.upload-result.success {
  border-color: #b9e3ce;
  background: #f1fbf6;
}

.upload-result.failed {
  border-color: #f0c4ba;
  background: #fff7f4;
}

.upload-result.failed p {
  margin: 0;
  color: #9f341f;
  font-size: 13px;
}

.upload-result small {
  color: var(--muted);
  font-size: 12px;
}

.upload-result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.upload-result-grid span {
  padding: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 12px;
}

.upload-result-grid b {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 13px;
}

.meal-adjustment-grid {
  align-items: start;
  margin-top: 14px;
}

.meal-dashboard-summary {
  margin-bottom: 12px;
}

.meal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.meal-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

.meal-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.meal-card h2 {
  margin: 0;
  font-size: 18px;
}

.final-count {
  display: block;
  font-size: 28px;
  font-weight: 800;
  color: var(--ink);
}

.count-detail {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.count-detail span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.count-detail b {
  color: var(--ink);
}

.status-dashboard-panel {
  margin-top: 14px;
}

.status-dashboard-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.status-dashboard-header h2,
.panel-title h2 {
  margin: 0;
  font-size: 18px;
}

.status-dashboard-header p,
.panel-title p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.headcount-status-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  background: #fff;
}

.headcount-status-table th,
.headcount-status-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  vertical-align: top;
}

.headcount-status-table th {
  background: #f7faf8;
  color: var(--muted);
  font-size: 13px;
}

.headcount-status-table td {
  font-size: 14px;
}

.headcount-status-table td:first-child,
.headcount-status-table th:first-child {
  text-align: left;
  width: 28%;
}

.headcount-status-table tbody tr:last-child {
  background: rgba(26, 122, 87, 0.06);
  font-weight: 700;
}

.headcount-status-table .adjustment-row {
  background: rgba(44, 106, 214, 0.05);
}

.headcount-status-table .fixed-headcount-row {
  background: #edf7f1;
}

.headcount-status-table .fixed-headcount-row td {
  color: var(--green-dark);
  font-weight: 850;
}

.headcount-status-table .display-row {
  background: rgba(0, 0, 0, 0.025);
}

.headcount-status-table .negative {
  color: #b54708;
  font-weight: 700;
}

.headcount-status-table .final-cell {
  color: var(--ink);
  font-weight: 800;
}

.content-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 14px;
  margin-top: 14px;
}

.panel-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.adjustment-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.summary-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.summary-box span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.summary-box strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 22px;
}

.summary-box.add {
  background: rgba(26, 122, 87, 0.06);
}

.summary-box.exclude {
  background: rgba(181, 71, 8, 0.08);
}

.entry-list {
  display: grid;
  gap: 10px;
}

.entry-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.entry-row strong {
  display: block;
  margin-bottom: 4px;
}

.entry-row p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.entry-row .amount {
  min-width: 68px;
  text-align: right;
  font-weight: 800;
  color: var(--ink);
}

.entry-row .amount.add {
  color: #1a7a57;
}

.entry-row .amount.exclude {
  color: #b54708;
}

.source-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.meal-adjustment-panel {
  min-width: 0;
}

.meal-rule-section {
  scroll-margin-top: 88px;
}

.meal-rule-preset-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.meal-rule-preset {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
}

.meal-rule-preset strong {
  font-size: 14px;
}

.meal-rule-preset span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.meal-rule-preset:hover {
  border-color: var(--brand);
  background: rgba(255, 255, 255, 0.96);
}

.meal-adjustment-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.meal-adjustment-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.meal-adjustment-form label.wide {
  grid-column: 1 / -1;
}

.meal-adjustment-table th,
.meal-adjustment-table td {
  vertical-align: top;
}

.meal-date-toolbar {
  display: grid;
  grid-template-columns: 42px minmax(150px, 190px) 42px;
  gap: 6px;
  align-items: center;
}

.meal-date-toolbar .form-control,
.meal-date-toolbar .control {
  min-height: 42px;
}

.meal-time-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.meal-time-badge svg {
  width: 15px;
  height: 15px;
}

.meal-time-panel {
  margin-top: 14px;
}

.sheet-panel-title {
  align-items: center;
}

.meal-time-editor {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.meal-time-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: end;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbf9;
}

.meal-time-row > strong {
  align-self: center;
  color: var(--ink);
  font-size: 16px;
}

.meal-time-row label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.meal-time-row label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.meal-time-row .form-control {
  min-width: 0;
  padding-inline: 8px;
}

.time-separator {
  align-self: center;
  color: var(--muted);
  font-weight: 900;
}

.meal-dashboard-detail-grid {
  grid-template-columns: 1fr;
}

.meal-dashboard-detail-grid > * {
  min-width: 0;
  max-width: 100%;
}

.meal-adjustment-sheet-panel {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.meal-sheet-wrap {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.meal-adjustment-sheet {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  table-layout: fixed;
}

.meal-adjustment-sheet th,
.meal-adjustment-sheet td {
  padding: 7px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.meal-adjustment-sheet th:last-child,
.meal-adjustment-sheet td:last-child {
  border-right: 0;
}

.meal-adjustment-sheet tbody tr:last-child td {
  border-bottom: 0;
}

.meal-adjustment-sheet th {
  background: #eef5f1;
  color: var(--muted);
  font-size: 12px;
  text-align: left;
}

.meal-adjustment-sheet th:nth-child(1) { width: 14%; }
.meal-adjustment-sheet th:nth-child(2) { width: 25%; }
.meal-adjustment-sheet th:nth-child(3) { width: 10%; }
.meal-adjustment-sheet th:nth-child(4) { width: 10%; }
.meal-adjustment-sheet th:nth-child(5) { width: 29%; }
.meal-adjustment-sheet th:nth-child(6) { width: 12%; }

.meal-adjustment-sheet tr[data-draft="true"] {
  background: #fbfffc;
}

.sheet-input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 8px 9px;
  border: 1px solid #cbd9d0;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
}

.sheet-input:focus {
  border-color: var(--brand);
  outline: 2px solid rgba(23, 107, 77, 0.14);
  outline-offset: 0;
}

.sheet-count {
  text-align: right;
}

.sheet-row-actions {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.sheet-icon-button {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.sheet-icon-button svg {
  width: 17px;
  height: 17px;
}

.sheet-icon-button.save {
  border-color: #9dcbb5;
  background: #eaf7f0;
  color: #176b4d;
}

.sheet-icon-button.delete {
  color: #a33c2d;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.helper-text {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  margin: 10px 0 0;
}

@media (max-width: 960px) {
  .meal-grid,
  .content-grid,
  .adjustment-summary {
    grid-template-columns: 1fr;
  }

  .status-dashboard-header {
    align-items: start;
    flex-direction: column;
  }

  .meal-time-editor {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .meal-date-toolbar {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    width: 100%;
  }

  .sheet-panel-title {
    align-items: stretch;
    flex-direction: column;
  }

  .sheet-panel-title .control {
    width: 100%;
  }

  .meal-time-row {
    grid-template-columns: 44px minmax(0, 1fr) auto minmax(0, 1fr);
    padding: 10px;
  }
}

.inventory-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.inventory-item header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.inventory-item h3 {
  margin: 0;
  font-size: 16px;
}

.inventory-item .progress {
  margin: 12px 0 8px;
}

.menu-comment-thread-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.menu-comment-thread {
  display: grid;
  gap: 10px;
}

.menu-comment-list {
  display: grid;
  gap: 8px;
}

.menu-comment-row {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(20, 91, 69, 0.1);
  border-radius: 8px;
  display: grid;
  gap: 5px;
  padding: 9px;
}

.menu-comment-row > div {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.menu-comment-row span {
  color: var(--muted);
  font-size: 11px;
}

.menu-comment-row p {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
}

.menu-comment-pulse {
  background: linear-gradient(135deg, rgba(11, 143, 101, 0.12), rgba(38, 100, 134, 0.1));
  border: 1px solid rgba(11, 143, 101, 0.14);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  padding: 14px;
}

.menu-comment-pulse strong {
  color: var(--green-dark);
  font-size: 28px;
}

.menu-comment-pulse span,
.menu-comment-pulse p {
  color: var(--muted);
  margin: 0;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.menu-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.weekly-today-panel {
  display: grid;
  gap: 12px;
}

.weekly-today-panel .menu-card {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.menu-card-head {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.menu-photo {
  position: relative;
  width: 72px;
  height: 72px;
  min-height: 0;
  border: 1px solid rgba(37, 61, 34, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(11, 143, 101, 0.92), rgba(242, 105, 87, 0.78)),
    url("./assets/restaurant-ops-header.png");
  background-size: cover;
  background-position: center;
}

.menu-card.breakfast .menu-photo {
  background: url("./assets/menu-breakfast.svg");
  background-size: cover;
  background-position: center;
}

.menu-card.lunch .menu-photo {
  background: url("./assets/menu-lunch.svg");
  background-size: cover;
  background-position: center;
}

.menu-card.dinner .menu-photo {
  background: url("./assets/menu-dinner.svg");
  background-size: cover;
  background-position: center;
}

.menu-card:not(.breakfast):not(.lunch):not(.dinner):nth-child(2n) .menu-photo {
  background:
    linear-gradient(135deg, rgba(52, 120, 246, 0.82), rgba(240, 168, 47, 0.78)),
    url("./assets/restaurant-ops-header.png");
  background-size: cover;
  background-position: center;
}

.menu-card:not(.breakfast):not(.lunch):not(.dinner):nth-child(3n) .menu-photo {
  background:
    linear-gradient(135deg, rgba(127, 76, 194, 0.68), rgba(11, 143, 101, 0.8)),
    url("./assets/restaurant-ops-header.png");
  background-size: cover;
  background-position: center;
}

.menu-body {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.menu-body h3 {
  margin: 0;
  font-size: 16px;
}

.menu-card-head h3 {
  margin: 0;
  font-size: 18px;
}

.featured-dish {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
  word-break: keep-all;
}

.menu-body p {
  min-height: 38px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.dish-list {
  display: grid;
  gap: 7px;
  min-height: 146px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dish-list.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  min-height: 0;
}

.dish-list li {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfb;
  color: #304039;
  font-size: 13px;
  line-height: 1.35;
}

.dish-list.compact li {
  min-height: 34px;
  padding: 7px 8px;
  font-size: 12px;
}

.compact-input {
  width: 92px;
  min-height: 38px;
}

.staff-detail {
  grid-column: 1 / -1;
  padding-top: 6px;
}

.staff-detail summary {
  cursor: pointer;
  color: var(--green);
  font-size: 13px;
  font-weight: 850;
}

.staff-edit-field {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
  color: #304039;
  font-size: 12px;
  font-weight: 850;
}

.is-hidden {
  display: none !important;
}

.restaurant-hours-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.hours-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.hours-card {
  display: grid;
  gap: 4px;
  min-height: 74px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.hours-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.hours-card strong {
  color: var(--ink);
  font-size: 20px;
  line-height: 1.15;
}

.menu-planner {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.menu-planner .mini-title {
  align-items: start;
}

.planner-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(320px, 1.18fr);
  gap: 14px;
}

.planner-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-content: start;
}

.planner-controls label {
  display: grid;
  gap: 6px;
  color: #304039;
  font-size: 12px;
  font-weight: 850;
}

.planner-controls .wide {
  grid-column: 1 / -1;
}

.planner-rule-box {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.planner-rule-box summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 12px;
  cursor: pointer;
  color: #26382f;
  background: #f8fbf9;
  font-size: 13px;
  font-weight: 900;
}

.planner-rule-box summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.planner-rule-box label {
  padding: 10px 12px;
  border-top: 1px solid var(--line);
}

.planner-rule-box textarea.form-control {
  min-height: 72px;
}

.planner-json-editor {
  font-family: "SFMono-Regular", ui-monospace, monospace;
  font-size: 12px;
  line-height: 1.55;
}

.planner-validation {
  margin: 10px 0 14px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
}

.planner-validation.error {
  border-color: rgba(192, 57, 43, 0.28);
  background: rgba(192, 57, 43, 0.06);
}

.planner-validation.warn {
  border-color: rgba(181, 114, 24, 0.28);
  background: rgba(181, 114, 24, 0.06);
}

.planner-validation strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 13px;
}

.planner-validation ul {
  margin: 0 0 8px 16px;
  padding: 0;
  color: var(--muted);
  font-size: 12px;
}

.planner-rule-actions {
  display: flex;
  justify-content: flex-end;
  padding: 0 12px 12px;
}

.planner-pools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.planner-pools details {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.planner-pools summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  padding: 0 10px;
  cursor: pointer;
  background: #f8fbf9;
  font-size: 13px;
  font-weight: 850;
}

.planner-pools summary span {
  color: var(--muted);
  font-size: 12px;
}

.planner-pools textarea {
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
}

.planner-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(94px, 1fr)) minmax(180px, 1.4fr);
  gap: 10px;
}

.planner-summary > div,
.planner-summary > p {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.planner-summary strong {
  display: block;
  font-size: 22px;
  line-height: 1;
}

.planner-summary span,
.planner-summary p {
  color: var(--muted);
  font-size: 12px;
}

.planner-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.planner-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  table-layout: fixed;
}

.planner-table th,
.planner-table td {
  padding: 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.planner-table th:last-child,
.planner-table td:last-child {
  border-right: 0;
}

.planner-table tr:last-child th,
.planner-table tr:last-child td {
  border-bottom: 0;
}

.planner-table thead th,
.planner-table tbody th {
  background: #f1f6f3;
  text-align: center;
  font-size: 13px;
}

.weekly-dishes {
  display: grid;
  gap: 6px;
}

.weekly-dishes span {
  display: block;
  padding: 6px 8px;
  border-radius: 6px;
  background: #f8fbf7;
  color: #304039;
  font-size: 12px;
  line-height: 1.34;
}

.weekly-menu-edit-input {
  min-width: 160px;
  resize: vertical;
  font-size: 12px;
  line-height: 1.4;
}

.planner-meal {
  display: grid;
  gap: 6px;
}

.planner-meal > strong {
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-size: 12px;
}

.planner-meal.dinner > strong {
  background: #3566c8;
}

.planner-dish {
  display: grid;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  line-height: 1.38;
}

.planner-dish span:first-child {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.planner-dish input {
  width: 100%;
  min-height: 30px;
  padding: 0 7px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #f8fbf7;
  color: var(--ink);
  outline: 0;
}

.planner-dish input:focus {
  border-color: rgba(37, 61, 34, 0.34);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 61, 34, 0.08);
}

.planner-rule-report {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.planner-rule-report-block {
  display: grid;
  gap: 5px;
}

.planner-rule-report-block strong {
  color: var(--ink);
  font-size: 11px;
}

.planner-rule-report-block ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.planner-rule-report-block li {
  display: grid;
  gap: 2px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(37, 61, 34, 0.05);
}

.planner-rule-report-block li span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.planner-rule-report-block li small {
  color: var(--muted);
  font-size: 11px;
}

.planner-special-edit {
  margin-top: 2px;
  padding: 6px 7px;
  border-left: 4px solid var(--amber);
  background: #fff8e8;
  border-radius: 6px;
}

.planner-special-edit input {
  background: #fffdf5;
}

.cart-panel {
  display: grid;
  gap: 10px;
}

.cart-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.qty-stepper {
  display: inline-grid;
  grid-template-columns: 30px 30px 30px;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.qty-stepper button,
.qty-stepper span {
  display: grid;
  place-items: center;
  min-height: 30px;
  border: 0;
  background: transparent;
  text-align: center;
}

.insight-chart {
  display: grid;
  gap: 12px;
}

.bar-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) 64px;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.bar-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf0ed;
}

.bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.bar-row:nth-child(2n) .bar-track span {
  background: var(--coral);
}

.bar-row:nth-child(3n) .bar-track span {
  background: var(--blue);
}

.automation-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.toggle {
  position: relative;
  width: 52px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: #d8ded9;
}

.toggle::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  transition: 0.18s ease;
}

.toggle.is-on {
  background: var(--green);
}

.toggle.is-on::after {
  transform: translateX(22px);
}

.staff-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.staff-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.staff-detail,
.staff-edit-field {
  grid-column: 1 / -1;
}

.staff-edit-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.staff-edit-field.compact {
  max-width: 220px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--green);
  font-weight: 900;
}

.activity-feed,
.recommendations {
  display: grid;
  gap: 10px;
}

.opinion-form {
  display: grid;
  gap: 12px;
}

.opinion-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.opinion-form textarea {
  resize: vertical;
}

.rail-section + .rail-section {
  margin-top: 24px;
}

.rail-title {
  position: relative;
  margin-bottom: 12px;
  padding-right: 42px;
}

.rail-title strong {
  display: block;
  margin-top: 3px;
}

.rail-close {
  position: absolute;
  top: 0;
  right: 0;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
}

.rail-close svg {
  width: 16px;
  height: 16px;
}

.mini-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.mini-title strong {
  display: block;
  font-size: 18px;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-item {
  position: relative;
  display: grid;
  gap: 5px;
  padding-left: 18px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
}

.timeline-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.timeline-item strong {
  font-size: 14px;
}

.timeline-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.staff-event-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.staff-event-card {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.staff-event-head {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.staff-face-slot {
  width: 38px;
  height: 38px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: #f7faf7;
}

.staff-event-card span,
.staff-event-card small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.staff-event-card strong {
  font-size: 14px;
}

.staff-event-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.staff-event-card label {
  display: grid;
  gap: 4px;
}

.staff-event-card input {
  min-height: 30px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
}

.staff-character-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 10px;
}

.staff-character-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.staff-character-media {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 5px;
  width: 72px;
}

.staff-character-face {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  overflow: hidden;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: #f6faf7;
}

.staff-character-face img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.staff-character-face > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.staff-avatar-upload {
  position: relative;
  display: grid;
  place-items: center;
  width: 64px;
  min-height: 18px;
  border-radius: 6px;
  background: #127051;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}

.staff-avatar-upload input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.attachment-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 10px;
}

.file-like {
  position: relative;
  overflow: hidden;
}

.attachment-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin: 8px 0 12px;
  border: 1px solid rgba(30, 41, 59, 0.12);
  border-radius: 10px;
  background: rgba(248, 250, 252, 0.96);
}

.attachment-preview img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(30, 41, 59, 0.08);
  background: #fff;
}

.attachment-preview span {
  font-size: 0.92rem;
  color: #334155;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.staff-character-body {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.staff-character-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.staff-character-title strong {
  font-size: 14px;
}

.staff-character-title span,
.staff-specialty-row span,
.staff-week-row > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.staff-specialty-row,
.staff-week-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
}

.staff-specialty-row input {
  min-height: 28px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
}

.staff-week-checks {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.staff-week-checks label {
  display: grid;
  justify-items: center;
  gap: 2px;
  min-width: 0;
}

.staff-week-checks input {
  appearance: none;
  width: 16px;
  height: 16px;
  margin: 0;
  border: 1px solid #87d8aa;
  border-radius: 5px;
  background: #f8fffb;
  box-shadow: inset 0 0 0 2px #f8fffb;
  cursor: pointer;
}

.staff-week-checks input:checked {
  border-color: #25bf73;
  background: #49e38f;
}

.staff-week-checks input:disabled {
  opacity: 1;
  cursor: default;
}

.staff-week-checks input:disabled:checked {
  border-color: #8bdcaf;
  background: #bff2d3;
}

.staff-week-checks small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.staff-target-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.staff-target-grid label {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  color: #304039;
  font-size: 12px;
  font-weight: 820;
}

.staff-target-grid input {
  width: 16px;
  min-height: 16px;
  padding: 0;
  accent-color: var(--green);
}

.safe-manual-summary {
  align-content: start;
}

.safe-manual-summary > strong {
  font-size: 32px;
  color: var(--green);
}

.safe-manual-summary p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.safe-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.safe-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}

.safe-table th,
.safe-table td {
  padding: 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
  line-height: 1.45;
}

.safe-table th {
  background: #f1f6f3;
  color: #26382f;
  font-weight: 900;
}

.safe-table tr:last-child td {
  border-bottom: 0;
}

.safe-table th:last-child,
.safe-table td:last-child {
  border-right: 0;
}

.maintenance-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.maintenance-summary > div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf8;
}

.maintenance-summary strong {
  display: block;
  color: var(--green);
  font-size: 24px;
  line-height: 1;
}

.maintenance-summary span,
.maintenance-meta,
.maintenance-guide span,
.maintenance-card-head span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.maintenance-guide {
  display: grid;
  gap: 10px;
}

.maintenance-guide p,
.maintenance-card {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.maintenance-guide strong {
  display: block;
  margin-bottom: 4px;
  color: #26382f;
}

.maintenance-list {
  display: grid;
  gap: 10px;
}

.maintenance-card {
  display: grid;
  gap: 10px;
}

.maintenance-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.maintenance-card-head strong {
  display: block;
  color: #1c2f26;
  font-size: 16px;
}

.maintenance-card p {
  margin: 0;
  color: #314238;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.maintenance-card-actions,
.row-actions,
.maintenance-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.maintenance-timeline {
  display: grid;
  gap: 6px;
  padding: 10px;
  border-radius: 8px;
  background: #f7faf8;
}

.maintenance-timeline div {
  display: grid;
  gap: 2px;
}

.maintenance-timeline span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.maintenance-timeline strong {
  color: #26382f;
  font-size: 13px;
  line-height: 1.45;
}

.facility-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.facility-card {
  display: grid;
  gap: 14px;
}

.facility-card header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.facility-card h3 {
  margin: 5px 0 0;
  font-size: 18px;
}

.sensor-value {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbf9;
}

.robot-vision-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 18px;
  align-items: stretch;
}

.robot-vision-copy h2 {
  margin: 8px 0 10px;
  font-size: 26px;
  line-height: 1.18;
}

.robot-vision-copy p,
.robot-card-detail p,
.robot-mini-status p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.robot-stat-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.robot-stat-strip > div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbf9;
}

.robot-stat-strip strong {
  font-size: 22px;
  line-height: 1;
}

.robot-stat-strip span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.robot-showcase {
  display: grid;
  place-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(37, 61, 34, 0.16);
  border-radius: 8px;
  background: #f3f7ee;
  text-align: center;
}

.robot-showcase strong,
.robot-showcase span {
  display: block;
}

.robot-showcase span {
  margin-top: 6px;
  color: #496258;
  font-size: 13px;
  line-height: 1.45;
}

.tree-robot-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 156px;
  height: 174px;
}

.tree-robot-avatar.compact {
  width: 92px;
  height: 112px;
}

.tree-robot-canopy {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 118px;
  height: 82px;
  transform: translateX(-50%);
}

.tree-robot-avatar.compact .tree-robot-canopy {
  top: 4px;
  width: 76px;
  height: 54px;
}

.tree-robot-canopy span {
  position: absolute;
  border: 2px solid rgba(37, 61, 34, 0.24);
  border-radius: 50%;
  background: #8fbf77;
}

.tree-robot-canopy span:nth-child(1) {
  left: 0;
  top: 20px;
  width: 58px;
  height: 52px;
}

.tree-robot-canopy span:nth-child(2) {
  left: 30px;
  top: 0;
  width: 62px;
  height: 58px;
  background: #76a866;
}

.tree-robot-canopy span:nth-child(3) {
  right: 0;
  top: 24px;
  width: 56px;
  height: 50px;
  background: #a4c86f;
}

.tree-robot-avatar.compact .tree-robot-canopy span:nth-child(1) {
  top: 14px;
  width: 38px;
  height: 34px;
}

.tree-robot-avatar.compact .tree-robot-canopy span:nth-child(2) {
  left: 19px;
  width: 40px;
  height: 38px;
}

.tree-robot-avatar.compact .tree-robot-canopy span:nth-child(3) {
  top: 16px;
  width: 36px;
  height: 32px;
}

.tree-robot-face {
  position: absolute;
  top: 74px;
  display: flex;
  gap: 18px;
  z-index: 2;
  padding: 10px 16px;
  border: 2px solid rgba(71, 111, 130, 0.28);
  border-radius: 999px;
  background: #f9fbf8;
}

.tree-robot-avatar.compact .tree-robot-face {
  top: 48px;
  gap: 10px;
  padding: 7px 10px;
}

.tree-robot-face i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--blue);
}

.tree-robot-avatar.compact .tree-robot-face i {
  width: 6px;
  height: 6px;
}

.tree-robot-trunk {
  position: absolute;
  top: 96px;
  width: 42px;
  height: 42px;
  border: 2px solid rgba(99, 71, 44, 0.22);
  border-radius: 12px 12px 7px 7px;
  background: #b9814f;
}

.tree-robot-avatar.compact .tree-robot-trunk {
  top: 64px;
  width: 28px;
  height: 28px;
  border-radius: 9px 9px 6px 6px;
}

.tree-robot-base {
  position: absolute;
  top: 132px;
  display: flex;
  justify-content: space-between;
  width: 86px;
  padding: 8px 9px;
  border: 2px solid rgba(37, 61, 34, 0.2);
  border-radius: 999px;
  background: #293a35;
}

.tree-robot-avatar.compact .tree-robot-base {
  top: 88px;
  width: 58px;
  padding: 5px 7px;
}

.tree-robot-base b {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #dce8d5;
  box-shadow: inset 0 0 0 4px #6f7d75;
}

.tree-robot-avatar.compact .tree-robot-base b {
  width: 12px;
  height: 12px;
  box-shadow: inset 0 0 0 3px #6f7d75;
}

.tree-robot-shadow {
  position: absolute;
  bottom: 0;
  width: 94px;
  height: 12px;
  border-radius: 999px;
  background: rgba(37, 61, 34, 0.14);
}

.tree-robot-avatar.compact .tree-robot-shadow {
  width: 58px;
  height: 8px;
}

.tree-robot-avatar.is-moving .tree-robot-base b {
  background: #eaf3ff;
}

.tree-robot-avatar.is-charging .tree-robot-face i {
  background: var(--amber);
}

.robot-layout {
  margin-top: 14px;
}

.robot-list,
.robot-card {
  display: grid;
  gap: 14px;
}

.robot-card header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.robot-card h3 {
  margin: 5px 0 0;
  font-size: 18px;
}

.robot-card-main {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.robot-card-detail {
  display: grid;
  gap: 10px;
}

.robot-battery {
  height: 9px;
  overflow: hidden;
  border: 1px solid rgba(37, 61, 34, 0.18);
  border-radius: 999px;
  background: #eef2ea;
}

.robot-battery span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.robot-battery.wide {
  grid-column: 1 / -1;
}

.robot-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.robot-tags span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #f0eee7;
  color: #4c5f54;
  font-size: 12px;
  font-weight: 800;
}

.robot-plan-panel .list-row {
  align-items: start;
}

.robot-mini-status {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
}

.robot-mini-status strong,
.robot-mini-status span {
  display: block;
}

.robot-mini-status > div > span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.robot-production-panel {
  margin-bottom: 18px;
}

.robot-production-panel > p {
  color: var(--muted);
  margin: 8px 0 14px;
}

.robot-production-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.robot-production-summary > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-soft);
}

.robot-production-summary strong,
.robot-production-summary span {
  display: block;
}

.robot-production-summary strong {
  color: var(--text);
  font-size: 18px;
}

.robot-production-summary span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.robot-production-bars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0 16px;
}

.robot-production-bars > div > span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.robot-production-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.robot-production-grid > div > strong {
  display: block;
  margin-bottom: 8px;
}

.compact-list {
  gap: 8px;
}

.robot-qa-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.robot-qa-chip {
  border: 0;
  cursor: pointer;
}

.robot-production-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.robot-rfq-button {
  margin-top: 12px;
  width: 100%;
}

.robot-next-actions {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 13px;
}

.robot-next-actions li + li {
  margin-top: 6px;
}

.sensor-value strong {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1;
}

.sensor-value span {
  color: var(--muted);
  font-size: 13px;
}

.heatmap {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.heatmap div {
  display: grid;
  place-items: center;
  min-height: 96px;
  border: 1px solid rgba(23, 33, 29, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.18)),
    color-mix(in srgb, var(--coral) calc(var(--heat) * 1%), var(--green-soft));
}

.heatmap strong {
  font-size: 24px;
}

.heatmap span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.mini-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.mini-metrics span {
  min-height: 32px;
  padding: 8px;
  border-radius: 8px;
  background: var(--panel-soft);
  color: #304039;
  font-size: 12px;
  font-weight: 850;
  text-align: center;
}

.approval-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.feed-item,
.recommendation {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.feed-item strong,
.recommendation strong {
  display: block;
  font-size: 13px;
}

.feed-item span,
.recommendation span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.toast {
  position: fixed;
  right: 24px;
  top: 72px;
  bottom: auto;
  z-index: 5;
  max-width: min(420px, calc(100vw - 32px));
  padding: 13px 15px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-12px);
  transition: 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 14;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(15, 28, 23, 0.5);
  backdrop-filter: blur(10px);
}

.modal-shell.show {
  display: grid;
}

.modal-card {
  display: grid;
  gap: 12px;
  width: min(420px, 100%);
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-copy {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.modal-card label {
  display: grid;
  gap: 6px;
  color: #304039;
  font-size: 13px;
  font-weight: 850;
}

.modal-card input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: none;
  place-items: center;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(29, 45, 32, 0.76), rgba(29, 45, 32, 0.48)),
    var(--bg);
  backdrop-filter: blur(12px);
}

.auth-gate.show {
  display: grid;
}

.login-card {
  display: grid;
  gap: 13px;
  width: min(440px, 100%);
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.login-logo {
  width: min(260px, 100%);
  height: 118px;
  object-fit: contain;
  justify-self: center;
}

.login-card h2 {
  margin: 0;
  font-size: 24px;
}

.login-card p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.login-card label {
  display: grid;
  gap: 6px;
  color: #304039;
  font-size: 13px;
  font-weight: 850;
}

.login-card input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
}

.login-card .login-push-option {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.login-card .login-push-option input {
  width: 18px;
  min-height: 18px;
  padding: 0;
  accent-color: var(--green);
}

.demo-logins {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
}

.demo-logins button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbf9;
  color: #304039;
  font-size: 12px;
  font-weight: 850;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 120px;
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 244px minmax(0, 1fr);
  }

  .right-rail {
    top: 76px;
    right: 14px;
    max-height: calc(100vh - 90px);
  }

  .rail-section + .rail-section {
    margin-top: 0;
  }

  .grid.kpis,
  .grid.three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid.two {
    grid-template-columns: 1fr;
  }

  .facility-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ui-builder-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .main,
  .workspace,
  #workspace {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .sidebar {
    position: fixed;
    top: 68px;
    left: 12px;
    z-index: 42;
    width: min(320px, calc(100vw - 24px));
    height: calc(100vh - 80px);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 22px 52px rgba(24, 38, 32, 0.2);
    transform: translateX(calc(-100% - 18px));
    transition: transform 180ms ease;
  }

  body.mobile-menu-open .sidebar {
    transform: translateX(0);
  }

  body.mobile-menu-open .app-shell::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 38;
    background: rgba(24, 38, 32, 0.18);
  }

  .nav-list {
    grid-template-columns: 1fr;
  }

  .main {
    padding: 76px 8px 16px;
  }

  .topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 40;
    min-height: 64px;
    margin: 0;
    padding: 10px 12px;
    border: 0;
    border-bottom: 1px solid rgba(214, 223, 214, 0.9);
    border-radius: 0;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 10px 28px rgba(22, 36, 28, 0.08);
    backdrop-filter: blur(22px);
  }

  .topbar-actions {
    justify-content: flex-end;
    gap: 6px;
  }

  .desktop-page-title {
    display: none;
  }

  .mobile-top-title,
  .mobile-logout-action,
  .mobile-alert-action,
  .mobile-menu-action {
    display: flex;
  }

  .mobile-top-title {
    flex: 1;
    min-width: 0;
  }

  .mobile-logout-action,
  .mobile-alert-action,
  .mobile-menu-action {
    display: grid;
  }

  .topbar-actions .user-chip,
  .topbar-actions #resetDemo,
  .topbar-actions #logoutButton {
    display: none;
  }

  .sidebar .alert-toggle {
    display: none;
  }

  .ops-hero {
    display: none;
  }

  .header-alert-strip,
  .banner-alert {
    margin-left: 2px;
    margin-right: 2px;
  }

  .header-alert-pill {
    min-width: 150px;
  }

  .banner-alert-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .workspace {
    gap: 14px;
  }

  .hero-overlay {
    align-items: start;
    flex-direction: column;
  }

  .hero-metrics,
  .grid.kpis,
  .grid.three,
  .inventory-summary-grid,
  .inventory-grid,
  .menu-grid,
  .hours-grid,
  .planner-layout,
  .planner-pools,
  .meal-adjustment-form,
  .form-grid,
  .robot-vision-panel,
  .robot-production-summary,
  .robot-production-bars,
  .robot-production-grid,
  .maintenance-summary,
  .staff-grid {
    grid-template-columns: 1fr;
  }

  .planner-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .planner-summary > p {
    grid-column: 1 / -1;
  }

  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .layout-block {
    grid-column: 1 / -1 !important;
  }

  .table-map {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .facility-grid,
  .heatmap {
    grid-template-columns: 1fr;
  }

  .upload-result-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .dish-list.compact {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 520px) {
  .nav-list {
    grid-template-columns: 1fr;
  }

  .role-switcher {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .role-button {
    font-size: 12px;
  }

  .table-map {
    grid-template-columns: 1fr;
  }

  .hero-metrics {
    width: 100%;
  }

  .menu-card-head {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .menu-photo {
    width: 58px;
    height: 58px;
  }

  .featured-dish {
    font-size: 16px;
  }

  .list-row,
  .automation-card,
  .approval-card,
  .robot-card-main,
  .maintenance-card-head,
  .staff-card {
    grid-template-columns: 1fr;
  }

  .robot-stat-strip {
    grid-template-columns: 1fr;
  }

  .maintenance-card-head {
    display: grid;
  }

  .bar-row {
    grid-template-columns: 72px minmax(0, 1fr) 50px;
  }
}

/* 2026 premium usability pass: clearer hierarchy, larger touch targets, calmer operations UI. */
:root {
  --bg: #eef4f0;
  --panel: #ffffff;
  --panel-soft: #f4f8f5;
  --ink: #10221a;
  --muted: #64736b;
  --line: #d7e1da;
  --line-strong: #b9cbc0;
  --green: #0b6f4f;
  --green-dark: #074b37;
  --green-soft: #e7f4ed;
  --coral: #bf4f3f;
  --amber: #b87523;
  --blue: #246f95;
  --plum: #6656a5;
  --danger: #bc3f35;
  --shadow: 0 22px 54px rgba(16, 34, 26, 0.12);
  --shadow-soft: 0 12px 28px rgba(16, 34, 26, 0.07);
  --radius: 8px;
}

body {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(238, 244, 240, 0.94) 42%, #eaf2ed),
    repeating-linear-gradient(135deg, rgba(11, 111, 79, 0.035) 0 1px, transparent 1px 22px);
  color: var(--ink);
  font-size: 15px;
  text-rendering: optimizeLegibility;
}

.app-shell {
  grid-template-columns: 296px minmax(0, 1fr);
}

.sidebar {
  padding: 20px 16px 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 247, 0.97)),
    #fff;
  border-right-color: rgba(185, 203, 192, 0.7);
}

.brand,
.access-panel,
.panel,
.layout-block,
.meal-card,
.menu-card,
.inventory-item,
.staff-card,
.staff-event-card,
.staff-character-card,
.facility-card,
.maintenance-card,
.robot-card,
.approval-card,
.order-card,
.upload-result,
.empty-state,
.login-card,
.modal-card,
.right-rail {
  border-radius: 8px;
}

.brand {
  min-height: 78px;
  padding: 12px;
  border-color: rgba(11, 111, 79, 0.13);
  background: linear-gradient(180deg, #ffffff, #f6fbf7);
  box-shadow: 0 10px 26px rgba(16, 34, 26, 0.06);
}

.brand-logo {
  width: 86px;
  height: 66px;
  border-color: rgba(11, 111, 79, 0.18);
}

.brand strong {
  font-size: 18px;
  color: var(--green-dark);
}

.brand span,
.access-panel small,
.section-head p,
.panel-title p,
.status-dashboard-header p,
.timeline-item p,
.menu-body p,
.count-detail,
.section-note {
  color: var(--muted);
}

.alert-toggle {
  min-height: 50px;
  border-color: rgba(191, 79, 63, 0.18);
  background: #fff8f5;
  box-shadow: 0 8px 18px rgba(191, 79, 63, 0.06);
}

.access-panel {
  margin: 18px 0;
  padding: 15px;
  border-color: rgba(11, 111, 79, 0.16);
  background: #ecf7f0;
}

.nav-list {
  gap: 7px;
}

.nav-item {
  min-height: 52px;
  padding: 0 13px 0 10px;
  border-color: transparent;
  background: transparent;
  color: #31453b;
  font-size: 14px;
}

.nav-item i {
  width: 36px;
  height: 36px;
  background: #eef6f1;
  color: var(--green);
}

.nav-item:hover,
.nav-item.is-active {
  border-color: rgba(11, 111, 79, 0.16);
  background: #fff;
  box-shadow: 0 10px 24px rgba(16, 34, 26, 0.08);
}

.nav-item.is-active {
  color: var(--green-dark);
}

.main {
  padding: 18px 26px 38px;
}

.topbar {
  min-height: 68px;
  padding: 12px 14px;
  border-color: rgba(185, 203, 192, 0.72);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 34px rgba(16, 34, 26, 0.08);
}

.desktop-page-title strong {
  font-size: 25px;
  color: var(--green-dark);
}

.user-chip,
.icon-action,
.control,
.select-control,
.form-control,
.login-card input,
.modal-card input,
.demo-logins button {
  min-height: 46px;
  border-color: rgba(185, 203, 192, 0.88);
  background: #fff;
}

.icon-action {
  width: 46px;
  height: 46px;
}

.control {
  padding: 0 16px;
  font-size: 14px;
  font-weight: 880;
}

.control.primary {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
  box-shadow: 0 10px 20px rgba(11, 111, 79, 0.18);
}

.control.warn {
  border-color: rgba(191, 79, 63, 0.24);
  background: #fff6f3;
  color: #9e3b30;
}

.form-control,
.login-card input,
.modal-card input,
.select-control {
  font-size: 15px;
}

.form-control:focus,
textarea:focus,
input:focus,
select:focus {
  border-color: rgba(11, 111, 79, 0.48);
  box-shadow: 0 0 0 4px rgba(11, 111, 79, 0.1);
}

.workspace {
  gap: 20px;
}

.section-head {
  margin: 6px 0 14px;
}

.section-head h2 {
  color: var(--green-dark);
  font-size: 26px;
}

.eyebrow {
  color: #6f7e75;
  font-size: 11px;
}

.panel {
  border-color: rgba(185, 203, 192, 0.72);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 32px rgba(16, 34, 26, 0.07);
}

.panel.pad {
  padding: 20px;
}

.panel:hover {
  border-color: rgba(11, 111, 79, 0.16);
  box-shadow: 0 18px 42px rgba(16, 34, 26, 0.1);
}

.metric-card {
  min-height: 132px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 252, 249, 0.98));
}

.metric-card::after {
  display: none;
}

.metric-card strong,
.final-count,
.menu-comment-pulse strong {
  color: var(--green-dark);
}

.meal-card,
.inventory-item,
.menu-card,
.staff-card,
.staff-event-card,
.staff-character-card,
.facility-card,
.maintenance-card,
.robot-card,
.approval-card,
.order-card {
  border-color: rgba(185, 203, 192, 0.78);
  background: #fff;
  box-shadow: 0 8px 22px rgba(16, 34, 26, 0.055);
}

.meal-card {
  padding: 18px;
}

.headcount-status-table,
.cleaning-table {
  border-radius: 8px;
  overflow: hidden;
}

.headcount-status-table th,
.cleaning-table thead th {
  background: #eef7f1;
  color: var(--green-dark);
}

.headcount-status-table td,
.headcount-status-table th,
.cleaning-table td,
.cleaning-table th {
  border-color: rgba(185, 203, 192, 0.72);
}

.cleaning-date-cell.is-due {
  background: #fff1ed;
  box-shadow: inset 0 0 0 2px rgba(191, 79, 63, 0.22);
}

.cleaning-date-cell.is-checked {
  background: #e8f6ee;
}

.cleaning-date-cell input {
  width: 18px;
  height: 18px;
}

.menu-grid {
  gap: 14px;
}

.menu-card {
  background: #fff;
}

.menu-card-head {
  grid-template-columns: 64px minmax(0, 1fr);
}

.menu-photo {
  width: 64px;
  height: 64px;
  border-color: rgba(11, 111, 79, 0.16);
}

.featured-dish {
  font-size: 18px;
  color: var(--green-dark);
}

.dish-list li,
.list-row,
.menu-comment-row {
  border-radius: 8px;
}

.menu-comment-thread-grid,
.inventory-grid,
.staff-character-grid {
  gap: 14px;
}

.menu-comment-row {
  padding: 12px;
  background: #fff;
  border-color: rgba(185, 203, 192, 0.72);
}

.menu-comment-row p {
  font-size: 14px;
}

.staff-character-card {
  grid-template-columns: 82px minmax(0, 1fr);
  padding: 12px;
}

.staff-character-media {
  width: 82px;
}

.staff-character-face {
  width: 72px;
  height: 72px;
  border-color: rgba(11, 111, 79, 0.2);
  background: #f8fbf9;
}

.staff-avatar-upload {
  width: 72px;
  min-height: 24px;
  background: var(--green);
  font-size: 11px;
}

.right-rail {
  top: 18px;
  border-color: rgba(185, 203, 192, 0.72);
  background: rgba(255, 255, 255, 0.97);
}

.rail-close {
  width: 38px;
  height: 38px;
}

.toast {
  min-height: 48px;
  padding: 12px 16px;
  background: var(--green-dark);
  color: #fff;
}

.auth-gate {
  background:
    linear-gradient(135deg, rgba(6, 54, 39, 0.82), rgba(28, 72, 52, 0.64)),
    #eef4f0;
}

.login-card,
.modal-card {
  padding: 24px;
  border-color: rgba(255, 255, 255, 0.54);
  box-shadow: 0 28px 74px rgba(9, 34, 24, 0.22);
}

.login-card h2 {
  color: var(--green-dark);
  font-size: 26px;
}

.login-card p {
  font-size: 14px;
}

.demo-logins button {
  font-size: 13px;
  background: #f4f9f6;
}

@media (max-width: 820px) {
  .main {
    padding: 78px 12px 18px;
  }

  .topbar {
    min-height: 66px;
    padding: 9px 10px;
  }

  .mobile-top-title strong {
    font-size: 19px;
    color: var(--green-dark);
  }

  .mobile-top-title img {
    width: 38px;
    height: 38px;
    object-fit: contain;
  }

  .mobile-logout-action,
  .mobile-alert-action,
  .mobile-menu-action {
    min-width: 48px;
    width: 48px;
    height: 48px;
  }

  .sidebar {
    top: 76px;
    width: min(336px, calc(100vw - 20px));
    height: calc(100vh - 88px);
    border-radius: 8px;
  }

  .section-head h2 {
    font-size: 24px;
  }

  .panel.pad {
    padding: 16px;
  }

  .control,
  .form-control,
  .select-control {
    min-height: 48px;
  }

  .menu-card-head {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .menu-photo {
    width: 58px;
    height: 58px;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 15px;
  }

  .topbar-actions {
    gap: 5px;
  }

  .mobile-logout-action,
  .mobile-alert-action,
  .mobile-menu-action {
    min-width: 46px;
    width: 46px;
    height: 46px;
  }

  .section-head h2 {
    font-size: 23px;
  }

  .staff-character-card {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .staff-character-media {
    width: 76px;
  }

  .staff-character-face,
  .staff-avatar-upload {
    width: 68px;
  }

  .staff-character-face {
    height: 68px;
  }
}

/* Integrated nutrition workspace and Quality capture */
.weekly-menu-tool-stack {
  display: grid;
  gap: 16px;
}

.menu-edit-note {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #175f48;
}

.menu-edit-note svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.weekly-dish-editor {
  min-width: 148px;
  min-height: 174px;
  padding: 10px;
  resize: vertical;
  line-height: 1.45;
  background: #fbfdfb;
  border-color: rgba(40, 117, 83, 0.24);
}

.weekly-dish-editor:focus {
  background: #fff;
  border-color: #16845e;
  box-shadow: 0 0 0 3px rgba(22, 132, 94, 0.12);
}

.menu-diagnostic-panel {
  overflow: hidden;
}

.diagnostic-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.diagnostic-summary > div {
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(20, 91, 69, 0.12);
  border-radius: 8px;
  background: #f6faf7;
}

.diagnostic-summary span,
.diagnostic-summary strong {
  display: block;
}

.diagnostic-summary span {
  color: var(--muted);
  font-size: 12px;
}

.diagnostic-summary strong {
  margin-top: 5px;
  color: var(--green-dark);
  font-size: 18px;
  overflow-wrap: anywhere;
}

.diagnostic-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.65fr);
  gap: 12px;
}

.diagnostic-block {
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(185, 203, 192, 0.72);
  border-radius: 8px;
  background: #fff;
}

.diagnostic-block.staple-block {
  background: #fff9ee;
  border-color: rgba(190, 144, 67, 0.25);
}

.diagnostic-list {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.diagnostic-list > div:not(.empty-state) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 7px;
  background: #f6f9f7;
}

.diagnostic-list strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.diagnostic-list span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.quality-photo-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quality-camera-button,
.quality-submit-button {
  min-height: 52px;
  font-weight: 800;
}

.quality-camera-button {
  flex: 1 1 210px;
  justify-content: center;
  color: #155b45;
  background: #eef8f3;
  border-color: rgba(22, 132, 94, 0.22);
}

.menu-comment-row .attachment-preview {
  align-items: flex-start;
  padding: 0;
  margin: 4px 0;
  border: 0;
  background: transparent;
}

.menu-comment-row .attachment-preview img {
  width: min(100%, 320px);
  height: auto;
  max-height: 260px;
  object-fit: cover;
}

.menu-comment-row .attachment-preview span {
  display: none;
}

@media (max-width: 900px) {
  .diagnostic-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .diagnostic-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .weekly-menu-tool-stack {
    gap: 12px;
  }

  .diagnostic-summary {
    gap: 7px;
  }

  .diagnostic-summary > div,
  .diagnostic-block {
    padding: 10px;
  }

  .diagnostic-summary strong {
    font-size: 16px;
  }

  .diagnostic-list > div:not(.empty-state) {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .diagnostic-list span {
    text-align: left;
  }
}

/* ===== Dark mode + mobile full menu + bottom nav (added) ===== */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1411;
  --panel: #18211d;
  --panel-soft: #1e2a24;
  --ink: #e9f1ec;
  --muted: #9fb0a6;
  --line: #2a3832;
  --line-strong: #3b4d45;
  --green: #41b389;
  --green-dark: #cdebdc;
  --green-soft: #1d2b25;
  --coral: #e08572;
  --amber: #d7a253;
  --blue: #5aa3cc;
  --plum: #9c8bd6;
  --danger: #e0675a;
  --shadow: 0 22px 54px rgba(0, 0, 0, 0.5);
  --shadow-soft: 0 12px 28px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] body {
  background:
    linear-gradient(180deg, rgba(20, 30, 26, 0.6), rgba(14, 20, 17, 0.9) 50%),
    var(--bg);
}

[data-theme="dark"] .splash-intro {
  background: #0e1411;
  color: var(--green);
}

[data-theme="dark"] .topbar,
[data-theme="dark"] .sidebar,
[data-theme="dark"] .right-rail,
[data-theme="dark"] .brand,
[data-theme="dark"] .panel,
[data-theme="dark"] .full-menu-panel,
[data-theme="dark"] .modal-card,
[data-theme="dark"] .login-card {
  background: var(--panel);
  border-color: var(--line);
  color: var(--ink);
  backdrop-filter: none;
}

[data-theme="dark"] .access-panel,
[data-theme="dark"] .feed-item,
[data-theme="dark"] .empty-state,
[data-theme="dark"] .user-chip,
[data-theme="dark"] .icon-action,
[data-theme="dark"] .control,
[data-theme="dark"] .select-control,
[data-theme="dark"] .form-control,
[data-theme="dark"] .login-card input,
[data-theme="dark"] .modal-card input,
[data-theme="dark"] .demo-logins button {
  background: var(--panel-soft);
  border-color: var(--line);
  color: var(--ink);
}

[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
  background: var(--panel-soft);
  border-color: var(--line);
  color: var(--ink);
}

[data-theme="dark"] .control.primary {
  background: var(--green);
  border-color: var(--green);
  color: #07130d;
}

[data-theme="dark"] .nav-item,
[data-theme="dark"] .bottom-nav-item {
  color: var(--ink);
}

[data-theme="dark"] .nav-item i {
  background: var(--green-soft);
  color: var(--green);
}

[data-theme="dark"] .nav-item:hover,
[data-theme="dark"] .nav-item.is-active {
  background: var(--panel-soft);
  border-color: var(--line-strong);
}

[data-theme="dark"] .auth-gate {
  background: rgba(6, 10, 8, 0.92);
}

/* Full menu overlay (mobile) */
.full-menu {
  display: none;
}

.full-menu-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.full-menu-titlewrap strong {
  display: block;
  font-size: 22px;
  line-height: 1.1;
  color: var(--green-dark);
}

.full-menu-titlewrap span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.full-menu-tools {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.full-menu-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.full-menu-brand img {
  width: 64px;
  height: 50px;
  object-fit: contain;
  flex: 0 0 auto;
}

.full-menu-brand strong {
  display: block;
  font-size: 16px;
  color: var(--green-dark);
}

.full-menu-brand span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.full-menu-nav {
  display: grid;
  gap: 8px;
}

/* Mobile bottom quick nav */
.mobile-bottom-nav {
  display: none;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 2px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.bottom-nav-item i {
  width: 22px;
  height: 22px;
}

.bottom-nav-item.is-active {
  color: var(--green);
}

@media (max-width: 820px) {
  /* Fix: keep a single column so the fixed sidebar does not leave an empty right track */
  .app-shell {
    grid-template-columns: 1fr;
  }

  /* Mobile uses the full-menu overlay instead of the sliding sidebar */
  .sidebar {
    display: none;
  }

  body.mobile-menu-open .app-shell::before {
    display: none;
  }

  /* Top bar: logo + title + alert + menu only */
  .mobile-logout-action,
  .topbar-actions #passwordChangeButton {
    display: none !important;
  }

  .mobile-top-title img {
    display: block;
  }

  body.mobile-menu-open .full-menu {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 60;
    overflow: auto;
    background: rgba(8, 14, 11, 0.5);
  }

  .full-menu-panel {
    margin: 64px 12px 24px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel);
    box-shadow: var(--shadow);
  }

  .mobile-bottom-nav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 2px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: var(--panel);
    border-top: 1px solid var(--line);
    box-shadow: 0 -10px 28px rgba(16, 34, 26, 0.1);
  }

  .mobile-bottom-nav::-webkit-scrollbar {
    display: none;
  }

  .mobile-bottom-nav .bottom-nav-item {
    flex: 0 0 auto;
    min-width: 72px;
  }

  .main {
    padding-bottom: 88px;
  }

  /* 알림사항 허브에서는 하단 바가 없으므로 패딩 불필요 */
  body[data-view="noticeHub"] .main,
  body[data-view="announcements"] .main,
  body[data-view="menuComments"] .main,
  body[data-view="safe100"] .main,
  body[data-view="inventory"] .main,
  body[data-view="hygiene"] .main {
    padding-bottom: 16px;
  }
}

/* Notification settings */
.text-scale-settings {
  display: grid;
  gap: 12px;
  max-width: 760px;
  margin-bottom: 16px;
}

.text-scale-card {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow-soft);
}

.text-scale-card-head {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.text-scale-card-head strong {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.text-scale-card-head span {
  font-size: 13px;
  color: var(--muted);
}

.text-scale-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.text-scale-option {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(31, 71, 50, 0.16);
  border-radius: 999px;
  background: #f3f7f3;
  color: var(--green);
  font-size: 14px;
  font-weight: 800;
}

.text-scale-option.is-active {
  border-color: rgba(31, 71, 50, 0.32);
  background: var(--green);
  color: #fff;
  box-shadow: 0 12px 26px rgba(31, 71, 50, 0.18);
}

.notif-settings-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 560px;
}

.notif-settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--card);
  border-radius: 12px;
  border: 1px solid var(--line);
}

.notif-settings-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.notif-settings-info strong {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.notif-settings-info span {
  font-size: 13px;
  color: var(--muted);
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

body[data-app-text-scale="compact"] .app-shell,
body[data-app-text-scale="compact"] .login-card,
body[data-app-text-scale="compact"] .modal-card,
body[data-app-text-scale="compact"] .full-menu-panel,
body[data-app-text-scale="compact"] .right-rail,
body[data-app-text-scale="compact"] .toast {
  zoom: 0.94;
}

body[data-app-text-scale="compact"] .app-shell {
  width: calc(100% / 0.94);
}

body[data-app-text-scale="large"] .app-shell,
body[data-app-text-scale="large"] .login-card,
body[data-app-text-scale="large"] .modal-card,
body[data-app-text-scale="large"] .full-menu-panel,
body[data-app-text-scale="large"] .right-rail,
body[data-app-text-scale="large"] .toast {
  zoom: 1.08;
}

body[data-app-text-scale="large"] .app-shell {
  width: calc(100% / 1.08);
}

body[data-app-text-scale="xlarge"] .app-shell,
body[data-app-text-scale="xlarge"] .login-card,
body[data-app-text-scale="xlarge"] .modal-card,
body[data-app-text-scale="xlarge"] .full-menu-panel,
body[data-app-text-scale="xlarge"] .right-rail,
body[data-app-text-scale="xlarge"] .toast {
  zoom: 1.16;
}

body[data-app-text-scale="xlarge"] .app-shell {
  width: calc(100% / 1.16);
}

.toggle-track {
  position: absolute;
  inset: 0;
  background: #d0d6d3;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s;
}

.toggle-track::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 6px rgba(0,0,0,0.2);
  transition: transform 0.2s;
}

.toggle-switch input:checked + .toggle-track {
  background: var(--green, #22c55e);
}

.toggle-switch input:checked + .toggle-track::after {
  transform: translateX(20px);
}

/* Bottom composer (글쓰기 메뉴 공통) */
.composer-wrap {
  position: sticky;
  bottom: 0;
  margin-top: 16px;
  padding: 10px 0 4px;
  background: linear-gradient(to top, var(--bg) 72%, transparent);
  z-index: 30;
}

.composer-editing-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  margin: 0 4px 6px;
}

.composer-editing-chip i,
.composer-editing-chip svg {
  width: 15px;
  height: 15px;
}

.composer-cancel {
  border: 0;
  background: transparent;
  color: var(--green);
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
  padding: 0;
}

.composer-bar {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 8px 10px;
  box-shadow: 0 8px 24px rgba(16, 34, 26, 0.1);
}

.composer-secondary-wrap {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
}

.composer-secondary {
  min-width: 96px;
  max-width: 150px;
  height: 42px;
}

.composer-input {
  flex: 1 1 auto;
  min-width: 0;
  resize: none;
  border: 0;
  background: transparent;
  font: inherit;
  color: var(--ink);
  padding: 10px 4px;
  max-height: 132px;
  line-height: 1.4;
}

.composer-input:focus {
  outline: none;
}

.composer-send {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #13c28a, #0a9e6e);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(13, 184, 129, 0.38);
  transition: transform 0.13s ease, box-shadow 0.13s ease;
}

.composer-send:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(13, 184, 129, 0.5);
}

.composer-send:active {
  transform: scale(0.94);
}

.composer-send i,
.composer-send svg {
  width: 18px;
  height: 18px;
}

.composer-photo-button {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  padding: 0;
  margin: 0;
}

.composer-photo-button i,
.composer-photo-button svg {
  width: 18px;
  height: 18px;
}

/* Long-press / right-click row actions */
.row-action-menu {
  position: fixed;
  z-index: 200;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.2);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 130px;
}

.row-action-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 11px 14px;
  border-radius: 8px;
  font: inherit;
  color: var(--ink);
  text-align: left;
}

.row-action-menu button:hover {
  background: rgba(0, 0, 0, 0.06);
}

.row-action-menu button[data-act="delete"] {
  color: #e5484d;
}

.row-action-menu i,
.row-action-menu svg {
  width: 16px;
  height: 16px;
}

.list-row[data-row-id],
.menu-comment-row[data-row-id],
.safe-table tr[data-row-id] {
  cursor: context-menu;
  -webkit-touch-callout: none;
}

@media (max-width: 820px) {
  .composer-wrap {
    bottom: 84px;
  }
}

/* === 위젯 스니펫 미리보기 ============================================ */
.wp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.wp-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 18px 18px 16px;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  color: #fff;
  box-shadow: 0 14px 34px rgba(20, 24, 60, 0.22);
  isolation: isolate;
}

/* 안드로이드 위젯과 동일한 그라디언트 테마 */
.wp-card.wp-meal      { background: linear-gradient(135deg, #A38BFF 0%, #7C6CFF 100%); }
.wp-card.wp-notice    { background: linear-gradient(135deg, #48E0AE 0%, #13C28A 100%); }
.wp-card.wp-inventory { background: linear-gradient(135deg, #4FD0E6 0%, #1EA7C9 100%); }
.wp-card.wp-quality   { background: linear-gradient(135deg, #FFB347 0%, #F7901E 100%); }
.wp-card.wp-clean     { background: linear-gradient(135deg, #FF9B7B 0%, #FF6B4A 100%); }

.wp-card-glow {
  position: absolute;
  inset: -40% -20% auto auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  filter: blur(8px);
  z-index: -1;
  pointer-events: none;
}

.wp-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.wp-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.24);
}
.wp-card-icon svg { width: 17px; height: 17px; }

.wp-card-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.wp-card-badge {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.26);
}

.wp-card-body {
  flex: 1;
  min-height: 0;
}

/* 식수인원 3컬럼 */
.wp-meals {
  display: flex;
  align-items: stretch;
  gap: 6px;
  height: 100%;
}
.wp-meal {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 10px 4px;
}
.wp-meal-label { font-size: 13px; opacity: 0.92; }
.wp-meal-value { font-size: 26px; font-weight: 800; line-height: 1.1; }

/* 목록형 본문 */
.wp-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.wp-list li {
  font-size: 13.5px;
  line-height: 1.35;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.15);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wp-empty {
  margin: 0;
  font-size: 13.5px;
  opacity: 0.9;
  padding: 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
}

.wp-card-action {
  margin-top: 12px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  padding: 9px;
  border-radius: 12px;
  color: rgba(20, 24, 60, 0.82);
  background: rgba(255, 255, 255, 0.88);
}

.wp-card-meta {
  margin-top: 8px;
  font-size: 11.5px;
  opacity: 0.85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* === Android 위젯 1:1 미리보기 (.aw-*) ================================ */
/*
 * 그라디언트 방향: Android angle=135 (bottom-left → top-right) = CSS 315deg
 * 색상·border·padding·버튼은 widget_*.xml / widget_*_background.xml 그대로
 */
.aw-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 18px;
}

.aw-widget {
  border-radius: 22px;
  padding: 14px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  color: #fff;
  font-family: sans-serif;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  font-size: calc(16px * var(--widget-text-scale));
}

.aw-notice    { background: linear-gradient(315deg, #13C28A, #48E0AE); border: 1px solid #A0F5D8; }
.aw-meal      { background: linear-gradient(315deg, #7C6CFF, #A38BFF); border: 1px solid #C9BCFF; }
.aw-inventory { background: linear-gradient(315deg, #1EA7C9, #4FD0E6); border: 1px solid #A0E9F5; }
.aw-clean     { background: linear-gradient(315deg, #FF6B4A, #FF9B7B); border: 1px solid #FFCAB5; }
.aw-quality   { background: linear-gradient(315deg, #F7901E, #FFB347); border: 1px solid #FFDDA0; }

/* widgetXxxHeader — 19sp bold */
.aw-hdr {
  font-size: calc(15px * var(--widget-text-scale));
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* widgetXxxTitle — 25sp bold, marginTop=8dp */
.aw-title {
  font-size: calc(20px * var(--widget-text-scale));
  font-weight: 700;
  margin-top: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* widgetXxxDetail — 18sp, weight=1, pre-wrap, line-clamped */
.aw-detail {
  flex: 1;
  margin-top: 5px;
  font-size: calc(13.5px * var(--widget-text-scale));
  line-height: calc(1.55 * var(--widget-text-scale));
  white-space: pre-wrap;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* widgetXxxAction button — minHeight=46dp, gravity=center */
.aw-btn {
  margin-top: 6px;
  text-align: center;
  font-size: calc(14px * var(--widget-text-scale));
  font-weight: 700;
  min-height: calc(40px * var(--widget-text-scale));
  line-height: calc(40px * var(--widget-text-scale));
  border-radius: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Quality 위젯 두 버튼 (글 작성 | 사진 촬영) */
.aw-quality-btns {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}
.aw-quality-btns .aw-btn {
  flex: 1;
  margin-top: 0;
}

/* widgetXxxMeta — 14sp */
.aw-meta {
  margin-top: 5px;
  font-size: calc(11px * var(--widget-text-scale));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 식수인원 위젯 중앙 구역 (weight=1, horizontal) */
.aw-meal-center {
  flex: 1;
  display: flex;
  align-items: center;
}
.aw-meal-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.aw-meal-lbl { font-size: calc(11px * var(--widget-text-scale)); color: #C9C2F0; }
.aw-meal-val { font-size: calc(26px * var(--widget-text-scale)); font-weight: 700; color: #fff; line-height: 1.1; }
/* 구분선 (1dp × 60dp, #66C9C2F0) */
.aw-sep {
  width: 1px;
  height: 48px;
  background: rgba(201, 194, 240, 0.4);
  flex-shrink: 0;
}

/* === 채팅보드 형식 (공지/QUALITY/SAFE/재고) ========================= */
.chat-thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  min-width: 0;
}

.chat-msg {
  display: flex;
  width: 100%;
  min-width: 0;
  gap: 8px;
}
.chat-msg.is-mine { justify-content: flex-end; }
.chat-msg.is-theirs { justify-content: flex-start; align-items: flex-start; }

/* 아바타 (is-theirs 전용) */
.chat-avatar-slot {
  flex: 0 0 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 2px;
}
.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--line);
  background: var(--surface-2);
  flex-shrink: 0;
  display: block;
}
.chat-avatar-placeholder {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}

/* 말풍선 컬럼 (작성자명 + 버블) */
.chat-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  max-width: min(72%, 480px);
}
.chat-msg.is-mine > .chat-col { align-items: flex-end; }
.chat-author-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  padding: 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-bubble {
  min-width: 80px;
  padding: 11px 14px;
  border-radius: 16px;
  background: var(--surface-2, #f1f3f8);
  border: 1px solid var(--border, rgba(20, 24, 60, 0.08));
  box-shadow: 0 4px 14px rgba(20, 24, 60, 0.06);
  overflow-wrap: anywhere;
  word-break: break-word;
}
.chat-msg.is-theirs .chat-bubble {
  border-bottom-left-radius: 5px;
}
.chat-msg.is-mine .chat-bubble {
  border-bottom-right-radius: 5px;
  background: linear-gradient(135deg, #6c8bff 0%, #5a6cff 100%);
  border-color: transparent;
  color: #fff;
}
.chat-msg.is-mine .chat-bubble .status-pill {
  background: rgba(255, 255, 255, 0.26);
  color: #fff;
}
.chat-msg.is-mine .chat-bubble .chat-meta,
.chat-msg.is-mine .chat-bubble .chat-time { color: rgba(255, 255, 255, 0.82); }

.chat-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 5px;
}
.chat-head strong { font-size: 14.5px; font-weight: 700; }
.chat-time { font-size: 11.5px; opacity: 0.7; margin-left: auto; }

.chat-text {
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.chat-meta {
  margin-top: 6px;
  font-size: 11.5px;
  opacity: 0.72;
}
.chat-actions {
  margin-top: 9px;
  display: flex;
  gap: 6px;
}

/* 길게누르기/우클릭 수정·삭제 대상 표시 */
.chat-msg[data-row-id] { cursor: context-menu; }
.chat-msg.is-done .chat-bubble { opacity: 0.72; }

[data-theme="dark"] .chat-bubble {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}
[data-theme="dark"] .chat-msg.is-mine .chat-bubble {
  background: linear-gradient(135deg, #6c8bff 0%, #5a6cff 100%);
}

@media (max-width: 640px) {
  .chat-col { max-width: min(80%, 440px); }
}

/* === 상단 프로필 아바타 ================================================ */
.topbar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(20, 120, 80, 0.22);
  flex-shrink: 0;
}

/* === 사진 라이트박스 =================================================== */
.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-lightbox[hidden] { display: none; }
.photo-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.84);
  cursor: pointer;
}
.photo-lightbox-img {
  position: relative;
  max-width: min(92vw, 900px);
  max-height: 88vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}
.photo-lightbox-close {
  position: absolute;
  top: 14px;
  right: 18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* attachment-preview 클릭 가능 */
.attachment-preview { cursor: zoom-in; }
.attachment-preview img { transition: opacity 120ms; }
.attachment-preview:hover img { opacity: 0.82; }

/* ───────────────────────────────────────────────
   알림사항 허브 – 채팅방 목록
   ─────────────────────────────────────────────── */
.notice-hub {
  padding: 12px 0 24px;
}

.chat-room-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chat-room-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--card);
  border: 0;
  border-bottom: 1px solid var(--line);
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s;
  color: var(--ink);
  font: inherit;
}

.chat-room-card:first-child {
  border-top: 1px solid var(--line);
}

.chat-room-card:hover {
  background: var(--panel);
}

.chat-room-card:active {
  background: var(--line);
}

.chat-room-card-icon {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.chat-room-card-icon i,
.chat-room-card-icon svg {
  width: 22px;
  height: 22px;
}

.chat-room-card-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.chat-room-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.chat-room-card-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.chat-room-card-time {
  font-size: 12px;
  color: var(--muted);
  flex-shrink: 0;
}

.chat-room-card-preview {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-room-card-chevron {
  flex: 0 0 auto;
  color: var(--muted);
  width: 18px;
  height: 18px;
}

/* ───────────────────────────────────────────────
   채팅방 내부 상단 뒤로가기 바
   ─────────────────────────────────────────────── */
.chatroom-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surface, var(--bg));
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

.chatroom-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.12s;
  padding: 0;
}

.chatroom-back-btn:hover {
  background: var(--line);
}

.chatroom-back-btn i,
.chatroom-back-btn svg {
  width: 20px;
  height: 20px;
}

.chatroom-room-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.chatroom-room-icon i,
.chatroom-room-icon svg {
  width: 16px;
  height: 16px;
}

.chatroom-room-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

/* 채팅방 열려있을 때 섹션 헤더 숨김 */
body[data-chatroom-open] .section-head {
  display: none;
}

/* ───────────────────────────────────────────────
   채팅방 검색 버튼 / 검색바
   ─────────────────────────────────────────────── */
.chatroom-search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  margin-left: auto;
  transition: background 0.12s, color 0.12s;
}

.chatroom-search-btn:hover,
.chatroom-search-btn.is-active {
  background: var(--green-tint, rgba(13, 184, 129, 0.12));
  color: var(--green);
}

.chatroom-search-btn i,
.chatroom-search-btn svg {
  width: 18px;
  height: 18px;
}

.chatroom-search-bar {
  position: sticky;
  top: 57px;
  z-index: 19;
  padding: 8px 14px;
  background: var(--surface, var(--bg));
  border-bottom: 1px solid var(--line);
}

.chatroom-search-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
}

.chatroom-search-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(13, 184, 129, 0.12);
}

/* ───────────────────────────────────────────────
   통합관제 직원 프로필 섹션
   ─────────────────────────────────────────────── */
.cmd-profiles-section {
  margin-bottom: 16px;
}

.cmd-my-profile {
  margin-bottom: 14px;
}

.cmd-profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg);
  transition: background 0.12s;
}

.cmd-profile-card.is-me {
  background: linear-gradient(135deg, rgba(13, 184, 129, 0.08), rgba(13, 184, 129, 0.04));
  border: 1px solid rgba(13, 184, 129, 0.2);
}

.cmd-profile-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.cmd-profile-card.is-me .cmd-profile-avatar {
  width: 56px;
  height: 56px;
}

.cmd-profile-avatar--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--green-tint, rgba(13, 184, 129, 0.15));
  color: var(--green);
  font-weight: 700;
  font-size: 18px;
}

.cmd-profile-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.cmd-profile-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.cmd-profile-card.is-me .cmd-profile-name {
  font-size: 17px;
}

.cmd-profile-role {
  font-size: 12px;
  color: var(--muted);
}

.cmd-profile-birth {
  font-size: 11px;
  color: var(--muted);
  background: var(--line);
  padding: 1px 6px;
  border-radius: 10px;
  display: inline-block;
  margin-top: 2px;
}

.cmd-staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
}

.cmd-staff-grid .cmd-profile-avatar {
  width: 36px;
  height: 36px;
}

.cmd-staff-grid .cmd-profile-card {
  padding: 8px 10px;
}

.cmd-staff-grid .cmd-profile-name {
  font-size: 13px;
}

@media (max-width: 480px) {
  .cmd-staff-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
