:root {
  color-scheme: light;
  --bg: #f5f7f6;
  --surface: #ffffff;
  --ink: #18231f;
  --muted: #60716b;
  --line: #dce5e0;
  --green: #11845b;
  --green-dark: #0b6345;
  --blue: #2d6cdf;
  --yellow: #e9a93f;
  --red: #d94c36;
  --shadow: 0 16px 38px rgba(24, 35, 31, 0.1);
  font-family: "Pretendard", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  background: var(--bg);
  color: var(--ink);
  margin: 0;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

[hidden] {
  display: none !important;
}

.button {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
}

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

.button.secondary {
  background: #e8f3ee;
  color: var(--green-dark);
}

.button.ghost {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}

.button.full {
  width: 100%;
}

.customer-header,
.admin-header {
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 48px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.customer-header strong,
.customer-header span,
.admin-header p,
.admin-header h1 {
  display: block;
}

.customer-header strong {
  font-size: 18px;
}

.customer-header span,
.admin-header p,
.section-heading p,
.panel-head p,
.customer-title p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  margin: 0;
}

.cart-chip {
  background: var(--ink);
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
  min-height: 40px;
  padding: 0 14px;
}

.cart-chip span {
  background: var(--green);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  justify-content: center;
  margin-left: 6px;
  min-width: 24px;
  padding: 2px 7px;
}

.customer-shell {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) 360px;
  margin: 0 auto;
  max-width: 1180px;
  padding: 28px clamp(14px, 4vw, 40px) 64px;
}

.customer-title {
  margin-bottom: 16px;
}

.customer-title h1,
.admin-header h1,
.section-heading h2,
.panel-head h2,
.order-complete h2 {
  font-size: 34px;
  letter-spacing: 0;
  line-height: 1.18;
  margin: 4px 0 0;
}

.category-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.category-tabs button {
  background: #eaf1ee;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 800;
  min-height: 38px;
  padding: 0 14px;
  white-space: nowrap;
}

.search-box,
.order-note,
.menu-add-form label {
  color: var(--muted);
  display: grid;
  font-size: 13px;
  font-weight: 800;
  gap: 7px;
}

.search-box {
  margin-bottom: 14px;
}

.search-box input,
.order-note textarea,
.menu-add-form input,
.menu-add-form select {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  min-height: 42px;
  padding: 0 12px;
}

.order-note {
  margin-top: 14px;
}

.order-note textarea {
  line-height: 1.45;
  min-height: 76px;
  padding: 10px 12px;
  resize: vertical;
}

.category-tabs button.active {
  background: var(--ink);
  color: #fff;
}

.customer-menu-list {
  display: grid;
  gap: 12px;
}

.customer-menu-card {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) 82px;
  min-height: 108px;
  padding: 16px;
}

.customer-menu-card.has-image {
  grid-template-columns: 92px minmax(0, 1fr) 82px;
}

.customer-menu-card.sold-out {
  opacity: 0.58;
}

.menu-thumb {
  aspect-ratio: 1;
  border-radius: 8px;
  height: 92px;
  object-fit: cover;
  width: 92px;
}

.menu-copy {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  min-width: 0;
}

.menu-copy h2 {
  font-size: 19px;
  letter-spacing: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.menu-copy p {
  color: var(--muted);
  line-height: 1.45;
  margin: 6px 0 0;
}

.menu-copy strong {
  font-size: 17px;
  white-space: nowrap;
}

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

.menu-badge {
  background: #edf6f1;
  border: 1px solid #cfe6dc;
  border-radius: 999px;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 900;
  padding: 3px 8px;
}

.sold-badge {
  color: var(--red);
  font-size: 13px;
  font-weight: 900;
  margin-left: 8px;
}

.add-button {
  background: var(--green);
  border: 0;
  border-radius: 8px;
  color: #fff;
  font-weight: 900;
  min-height: 42px;
}

.empty-menu {
  align-items: center;
  background: #fff;
  border: 1px dashed #b9c9c1;
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  justify-content: center;
  min-height: 150px;
}

.cart-panel,
.order-complete,
.metrics,
.kanban-column,
.menu-manage-row {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.cart-panel {
  align-self: start;
  padding: 20px;
  position: sticky;
  top: 86px;
}

.panel-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
}

.icon-button {
  align-items: center;
  background: #edf2ef;
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  display: inline-flex;
  font-size: 24px;
  font-weight: 800;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.cart-items {
  display: grid;
  gap: 10px;
  min-height: 120px;
}

.cart-items.empty {
  align-items: center;
  color: var(--muted);
  display: flex;
  justify-content: center;
  text-align: center;
}

.cart-item {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 10px;
  padding-bottom: 12px;
}

.cart-item > div:first-child {
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.cart-control {
  align-items: center;
  display: flex;
  gap: 8px;
}

.cart-control button {
  background: #edf2ef;
  border: 0;
  border-radius: 7px;
  font-weight: 800;
  min-height: 32px;
  padding: 0 10px;
}

.total-row {
  align-items: center;
  border-top: 2px solid var(--ink);
  display: flex;
  justify-content: space-between;
  margin: 20px 0;
  padding-top: 16px;
}

.total-row strong {
  font-size: 24px;
}

.order-complete {
  display: grid;
  gap: 18px;
  grid-column: 1 / -1;
  margin: 52px auto;
  max-width: 560px;
  padding: 28px;
  text-align: center;
}

.order-complete p {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

.complete-meta {
  background: #eef4f1;
  border-radius: 999px;
  display: inline-flex;
  justify-self: center;
  padding: 7px 12px;
}

.admin-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.admin-shell {
  display: grid;
  gap: 30px;
  margin: 0 auto;
  max-width: 1280px;
  padding: 28px clamp(14px, 4vw, 40px) 70px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
}

.metrics div {
  padding: 18px;
}

.metrics div + div {
  border-left: 1px solid var(--line);
}

.metrics span {
  display: block;
  font-size: 34px;
  font-weight: 900;
}

.metrics small {
  color: var(--muted);
  font-weight: 800;
}

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

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

.kanban-column {
  box-shadow: none;
  min-height: 250px;
  padding: 14px;
}

.kanban-column h3 {
  align-items: center;
  display: flex;
  font-size: 17px;
  justify-content: space-between;
  margin: 0 0 12px;
}

.empty-column {
  align-items: center;
  border: 1px dashed #b9c9c1;
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  justify-content: center;
  min-height: 130px;
}

.order-card {
  border: 1px solid var(--line);
  border-left: 5px solid var(--green);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
  padding: 13px;
}

.order-card.cooking {
  border-left-color: var(--yellow);
}

.order-card.served {
  border-left-color: var(--blue);
}

.order-card-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.order-card ul {
  color: var(--muted);
  line-height: 1.45;
  list-style: none;
  margin: 0;
  padding: 0;
}

.order-card small {
  color: var(--muted);
}

.order-card button {
  background: var(--ink);
  border: 0;
  border-radius: 7px;
  color: #fff;
  font-weight: 800;
  min-height: 36px;
}

.menu-manager {
  display: grid;
  gap: 12px;
}

.menu-add-form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 14px;
  padding: 14px;
}

.form-title {
  align-items: baseline;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 10px;
  grid-column: 1 / -1;
  padding-bottom: 12px;
}

.form-title strong,
.form-title span {
  display: block;
}

.form-title span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.menu-add-form button {
  align-self: end;
}

.menu-manage-row {
  align-items: center;
  box-shadow: none;
  display: grid;
  gap: 14px;
  grid-template-columns: 86px minmax(130px, 1fr) minmax(180px, 1.4fr) minmax(150px, 0.9fr) 120px 90px 64px;
  padding: 14px;
}

.image-preview {
  align-items: center;
  background: #eef3f0;
  border-radius: 8px;
  display: flex;
  height: 72px;
  justify-content: center;
  overflow: hidden;
  width: 72px;
}

.image-preview img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.image-placeholder {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.manage-copy strong,
.manage-copy small,
.menu-manage-row label {
  display: block;
}

.manage-copy small,
.menu-manage-row label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.menu-manage-row input:not([type="checkbox"]) {
  border: 1px solid var(--line);
  border-radius: 7px;
  margin-top: 7px;
  min-height: 40px;
  padding: 0 10px;
  width: 100%;
}

.sold-toggle {
  align-items: center;
  color: var(--ink) !important;
  display: flex !important;
  gap: 8px;
}

.sold-toggle input {
  height: 20px;
  width: 20px;
}

.delete-menu {
  background: #fff1ed;
  border: 1px solid #ffd3c8;
  border-radius: 7px;
  color: #a43f2c;
  font-weight: 900;
  min-height: 40px;
}

.order-note-line {
  background: #f6f8f7;
  border-left: 3px solid var(--green);
  color: var(--ink);
  line-height: 1.45;
  margin: 0;
  padding: 8px 10px;
}

@media (max-width: 1000px) {
  .customer-shell,
  .kanban {
    grid-template-columns: 1fr;
  }

  .cart-panel {
    position: static;
  }

  .menu-add-form,
  .menu-manage-row {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .form-title,
  .menu-manage-row label,
  .sold-toggle,
  .menu-add-form label,
  .menu-add-form button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .customer-header,
  .admin-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .customer-title h1,
  .admin-header h1,
  .section-heading h2,
  .panel-head h2,
  .order-complete h2 {
    font-size: 28px;
  }

  .customer-menu-card,
  .customer-menu-card.has-image {
    grid-template-columns: 1fr;
  }

  .menu-copy {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .menu-thumb {
    aspect-ratio: 16 / 9;
    height: auto;
    width: 100%;
  }

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

  .metrics div + div {
    border-left: 0;
  }

  .metrics div:nth-child(2n) {
    border-left: 1px solid var(--line);
  }

  .metrics div:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
}
