:root {
  color-scheme: light;
  --bg: #fff7ef;
  --surface: #ffffff;
  --surface-warm: #fffaf2;
  --surface-mint: #eff8f2;
  --surface-peach: #fff0e2;
  --text: #26231f;
  --muted: #6c665c;
  --line: #dfd4c7;
  --green: #2f6c50;
  --green-dark: #1f4c38;
  --mint: #87c7a1;
  --gold: #cf9c49;
  --coral: #df754f;
  --sky: #7aa5b8;
  --danger: #a43d36;
  --shadow: 0 18px 45px rgba(62, 49, 34, 0.13);
}

* {
  box-sizing: border-box;
}

body {
  position: relative;
  isolation: isolate;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.96), rgba(255, 249, 239, 0.94) 48%, rgba(241, 250, 245, 0.92)),
    url("./assets/hotel-day.jpg") center top / min(760px, 82vw) auto no-repeat,
    #fbf5ec;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", sans-serif;
  line-height: 1.5;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(115deg, rgba(135, 199, 161, 0.12), transparent 38%),
    linear-gradient(245deg, rgba(207, 156, 73, 0.14), transparent 34%),
    url("./assets/hero-atrium.jpg") center / cover;
  opacity: 0.1;
  pointer-events: none;
}

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

a {
  color: inherit;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 5vw, 64px);
  background: rgba(255, 250, 242, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.app-header h1,
.section-heading h2,
.panel h3 {
  margin: 0;
}

.app-header h1 {
  font-size: 30px;
  line-height: 1.18;
}

.brand-block {
  display: grid;
  gap: 3px;
  min-width: 150px;
}

.brand-logo {
  display: block;
  width: clamp(128px, 14vw, 190px);
  height: auto;
}

.admin-brand-subtitle {
  color: var(--green-dark);
  font-size: 15px;
  line-height: 1.2;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.top-nav {
  display: flex;
  gap: 8px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.top-nav a {
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.top-nav a.is-active {
  background: linear-gradient(135deg, var(--green), #4f8a65);
  color: #fff;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.language-switcher select {
  min-width: 150px;
  height: 40px;
  padding: 0 10px;
  border-radius: 8px;
  background: #fff;
}

main {
  width: min(1120px, calc(100% - 32px));
  margin: 28px auto 64px;
}

.visual-band {
  position: relative;
  display: grid;
  min-height: 250px;
  overflow: hidden;
  margin-bottom: 18px;
  border: 1px solid rgba(49, 108, 80, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(26, 78, 55, 0.62), rgba(70, 126, 91, 0.24) 48%, rgba(255, 250, 238, 0.08)),
    url("./assets/hero-atrium.jpg") center 44% / cover;
  box-shadow: var(--shadow);
}

.visual-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 38%, rgba(255, 248, 236, 0.16));
  pointer-events: none;
}

.visual-band > div {
  position: relative;
  z-index: 1;
  align-self: end;
  width: min(620px, 100%);
  padding: 28px;
  color: #fff;
  text-shadow: 0 2px 14px rgba(24, 44, 34, 0.26);
}

.visual-band .eyebrow {
  color: #dff3e7;
}

.visual-band h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
}

.visual-band p:last-child {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.95);
}

.notice-band {
  overflow: hidden;
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-mint);
}

.notice-band div {
  display: grid;
  gap: 5px;
  padding: 16px;
  background: var(--surface-warm);
}

.notice-band div:first-child {
  background: var(--surface-mint);
}

.notice-band strong {
  color: var(--green-dark);
}

.notice-band span,
.submit-panel span,
.panel-title-row span {
  color: var(--muted);
}

.view {
  display: block;
}

.view.is-hidden {
  display: none;
}

.section-heading {
  margin: 28px 0 16px;
}

.section-heading h2 {
  font-size: 26px;
  line-height: 1.25;
}

.order-layout {
  display: grid;
  gap: 16px;
}

.panel,
.submit-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.panel h3 {
  font-size: 20px;
  line-height: 1.25;
}

.submit-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px;
}

.submit-panel div {
  display: grid;
  gap: 4px;
}

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

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

label {
  display: grid;
  gap: 7px;
  color: var(--text);
  font-weight: 700;
}

.field-hint {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffefb;
  color: var(--text);
}

input,
select {
  height: 44px;
  padding: 0 12px;
}

textarea {
  min-height: 110px;
  padding: 12px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(135, 199, 161, 0.36);
  border-color: var(--green);
}

.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.guest-meals {
  display: grid;
  gap: 12px;
}

.guest-card {
  display: grid;
  gap: 13px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fffdf8, #fff7ee);
}

.guest-card h4,
.meal-description {
  margin: 0;
}

.guest-card h4 {
  font-size: 18px;
  line-height: 1.25;
}

.meal-preview {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 14px;
  align-items: center;
}

.meal-image {
  width: 100%;
  aspect-ratio: 5 / 4;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 10px 24px rgba(62, 49, 34, 0.18);
}

.meal-description {
  color: var(--muted);
  font-size: 14px;
}

.meal-diet-note {
  margin: 0;
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 700;
}

.guest-special-section {
  display: grid;
  gap: 10px;
  padding-top: 4px;
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.chip-grid label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffefb;
  cursor: pointer;
}

.chip-grid label:has(input:checked) {
  border-color: rgba(47, 108, 80, 0.58);
  background: var(--surface-mint);
  color: var(--green-dark);
}

.chip-grid input {
  width: auto;
  height: auto;
}

.primary-button,
.secondary-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.primary-button {
  min-height: 46px;
  padding: 0 18px;
  background: linear-gradient(135deg, var(--green), #4f8a65);
  color: #fff;
}

.primary-button:hover {
  background: var(--green-dark);
}

.secondary-button {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: #fffefb;
  color: var(--green-dark);
}

.icon-button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--green);
  font-size: 18px;
}

.confirmation-panel {
  max-width: 760px;
}

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

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

.key-value-grid div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-warm);
}

.key-value-grid span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.meal-list {
  margin: 0;
  padding-left: 20px;
}

.meal-list li {
  margin-bottom: 8px;
}

.meal-list span {
  color: var(--muted);
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.lookup-form,
.admin-tools {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
}

.admin-tools {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.helper-text {
  margin: 0;
  color: var(--muted);
}

.result-block {
  margin-top: 16px;
}

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

.summary-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, var(--surface-mint));
}

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

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

.table-panel {
  padding: 0;
}

.table-panel .panel-title-row {
  padding: 18px 20px 0;
}

.table-scroll {
  overflow: auto;
}

.menu-editor {
  display: grid;
  gap: 16px;
}

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

.editor-row {
  display: grid;
  grid-template-columns: 80px 1fr 2fr 120px;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-warm);
}

.drink-row {
  grid-template-columns: 1fr 1.4fr 120px;
}

table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

th,
td {
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--green-dark);
  font-size: 13px;
  white-space: nowrap;
}

td {
  font-size: 14px;
}

.empty-state {
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.status-good {
  color: var(--green);
  font-weight: 800;
}

.status-warning {
  color: var(--danger);
  font-weight: 800;
}

@media (max-width: 820px) {
  .app-header {
    position: static;
    display: grid;
  }

  .app-header h1 {
    font-size: 30px;
  }

  .top-nav {
    overflow-x: auto;
  }

  .language-switcher {
    margin-left: 0;
  }

  .visual-band {
    min-height: 230px;
  }

  .visual-band > div {
    padding: 22px;
  }

  .notice-band,
  .field-grid,
  .field-grid.compact,
  .lookup-form,
  .admin-tools,
  .editor-row,
  .drink-row,
  .summary-grid {
    grid-template-columns: 1fr;
  }

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

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

  .primary-button,
  .secondary-button {
    width: 100%;
  }
}

@media print {
  .app-header,
  .notice-band,
  .top-nav,
  .action-row {
    display: none;
  }

  body {
    background: #fff;
  }

  main {
    width: 100%;
    margin: 0;
  }

  .panel {
    border: 0;
    box-shadow: none;
  }
}
