:root {
  --bg: #edf1ee;
  --surface: #ffffff;
  --surface-2: #f7f9f7;
  --ink: #16211c;
  --muted: #63736b;
  --line: #dce4df;
  --line-strong: #c5d0c9;
  --brand: #146b5c;
  --brand-dark: #0d5145;
  --brand-soft: #e5f4ef;
  --amber: #b7791f;
  --amber-soft: #fff6df;
  --red: #b42318;
  --red-soft: #fff0ed;
  --blue: #2563eb;
  --blue-soft: #edf4ff;
  --gray-soft: #f1f4f2;
  --shadow: 0 18px 48px rgba(23, 38, 31, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family:
    Pretendard,
    "Apple SD Gothic Neo",
    "Malgun Gothic",
    "Segoe UI",
    system-ui,
    sans-serif;
  font-size: 15px;
}

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

button {
  cursor: pointer;
}

.text-link {
  border: 0;
  padding: 0;
  color: var(--brand);
  font-weight: 900;
  text-align: left;
  background: transparent;
}

.text-link:hover {
  text-decoration: underline;
}

.text-link:focus-visible {
  outline: 2px solid rgba(20, 107, 92, 0.32);
  outline-offset: 3px;
  border-radius: 4px;
}

a {
  color: inherit;
  text-decoration: none;
}

.admin-app {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 18px;
  color: #f4faf7;
  background: #14352d;
}

.brand {
  display: grid;
  gap: 4px;
  padding: 8px 8px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

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

.brand span {
  color: #bcd3c9;
  font-size: 13px;
}

.nav {
  display: grid;
  gap: 6px;
  margin-top: 18px;
}

.nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  border-radius: 8px;
  padding: 0 12px;
  color: #dceae4;
}

.nav a:hover,
.nav a.is-active {
  background: rgba(255, 255, 255, 0.11);
  color: #ffffff;
}

.nav small {
  color: #a8c0b7;
}

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

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.page-head h1 {
  margin: 0 0 6px;
  font-size: 26px;
  line-height: 1.2;
}

.page-head p {
  margin: 0;
  color: var(--muted);
}

.toolbar,
.filterbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.result-count {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #bfd8cc;
  border-radius: 8px;
  background: #edf8f3;
  color: #0f5137;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.date-picker-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.date-picker-field label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.date-picker-field .input {
  width: 160px;
}

.customer-reservation-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.customer-status-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

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

.customer-info-grid div {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: #ffffff;
}

.customer-info-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.customer-info-grid strong {
  overflow: hidden;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reservation-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin: 16px 0 10px;
}

.reservation-toolbar h3 {
  margin: 0 0 4px;
  font-size: 17px;
}

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

.reservation-status-table {
  min-width: 1120px;
}

.reservation-status-table th,
.reservation-status-table td {
  vertical-align: middle;
}

.reservation-status-table th:nth-child(1),
.reservation-status-table td:nth-child(1) {
  width: 72px;
}

.reservation-status-table th:nth-child(3),
.reservation-status-table td:nth-child(3) {
  width: 96px;
  white-space: nowrap;
}

.reservation-status-table th:nth-child(4),
.reservation-status-table td:nth-child(4) {
  width: 82px;
  white-space: nowrap;
}

.reservation-status-table th:nth-child(5),
.reservation-status-table td:nth-child(5),
.reservation-status-table th:nth-child(6),
.reservation-status-table td:nth-child(6),
.reservation-status-table th:nth-child(7),
.reservation-status-table td:nth-child(7) {
  width: 86px;
  white-space: nowrap;
}

.reservation-status-table .memo-cell {
  max-width: 190px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-reservation-table {
  table-layout: fixed;
  min-width: 1120px;
}

.customer-reservation-table th,
.customer-reservation-table td {
  vertical-align: middle;
}

.customer-reservation-table th:nth-child(1),
.customer-reservation-table td:nth-child(1) {
  width: 94px;
}

.customer-reservation-table th:nth-child(2),
.customer-reservation-table td:nth-child(2) {
  width: 230px;
}

.customer-reservation-table th:nth-child(3),
.customer-reservation-table td:nth-child(3),
.customer-reservation-table th:nth-child(4),
.customer-reservation-table td:nth-child(4) {
  width: 72px;
  text-align: center;
  white-space: nowrap;
}

.customer-reservation-table th:nth-child(5),
.customer-reservation-table td:nth-child(5) {
  width: 88px;
  text-align: right;
  white-space: nowrap;
}

.customer-reservation-table th:nth-child(6),
.customer-reservation-table td:nth-child(6),
.customer-reservation-table th:nth-child(7),
.customer-reservation-table td:nth-child(7) {
  width: 86px;
  text-align: center;
  white-space: nowrap;
}

.customer-reservation-table th:nth-child(8),
.customer-reservation-table td:nth-child(8) {
  width: 150px;
}

.customer-reservation-table th:nth-child(9),
.customer-reservation-table td:nth-child(9) {
  width: 132px;
}

.pending-reservation-table th:nth-child(7),
.pending-reservation-table td:nth-child(7) {
  width: 150px;
  text-align: left;
}

.pending-reservation-table th:nth-child(8),
.pending-reservation-table td:nth-child(8) {
  width: 132px;
}

.client-paged-section .table-wrap {
  min-height: 438px;
}

.customer-reservation-table th:last-child,
.customer-reservation-table th:nth-last-child(2) {
  min-width: 0;
}

.customer-reservation-table .btn-row {
  min-width: 0;
}

.customer-reservation-table .btn-row .btn {
  min-height: 34px;
  margin-right: 4px;
  padding: 0 10px;
}

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

.receipt-result-table {
  table-layout: fixed;
  min-width: 1080px;
}

.receipt-result-table th,
.receipt-result-table td {
  vertical-align: middle;
}

.receipt-result-table th:nth-child(1),
.receipt-result-table td:nth-child(1) {
  width: 118px;
}

.receipt-result-table th:nth-child(2),
.receipt-result-table td:nth-child(2) {
  width: 112px;
  text-align: center;
}

.receipt-result-table th:nth-child(3),
.receipt-result-table td:nth-child(3) {
  width: 260px;
}

.receipt-result-table th:nth-child(4),
.receipt-result-table td:nth-child(4) {
  width: 130px;
  text-align: right;
  white-space: nowrap;
}

.receipt-result-table th:nth-child(5),
.receipt-result-table td:nth-child(5) {
  width: 76px;
  text-align: center;
  white-space: nowrap;
}

.receipt-result-table th:nth-child(6),
.receipt-result-table td:nth-child(6) {
  width: 210px;
}

.receipt-result-table th:nth-child(7),
.receipt-result-table td:nth-child(7) {
  width: 190px;
}

.receipt-result-table .summary-cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.receipt-result-card > div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.receipt-result-card strong,
.receipt-result-card span,
.receipt-result-card dd {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.receipt-result-card span {
  color: var(--muted);
  font-size: 13px;
}

.receipt-result-card dl {
  display: grid;
  grid-template-columns: 120px 72px minmax(160px, 1fr);
  gap: 10px;
  margin: 0;
}

.receipt-result-card dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.receipt-result-card dd {
  margin: 2px 0 0;
  font-size: 13px;
  font-weight: 800;
}

.reservation-list-stack {
  display: grid;
  gap: 16px;
}

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

.reservation-list-section .subsection-head {
  margin: 0;
  padding-top: 2px;
}

.memo-link {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: var(--brand);
  text-align: left;
  text-overflow: ellipsis;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
  white-space: nowrap;
}

.reservation-date-list {
  display: grid;
  gap: 12px;
}

.reservation-date-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

.reservation-date-group > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #f8fbf9;
}

.reservation-date-group h4 {
  margin: 0 0 4px;
  font-size: 17px;
}

.reservation-date-group p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.reservation-date-group.is-past > header {
  background: #faf7f5;
}

.reservation-product-card {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.6fr) auto;
  gap: 14px;
  align-items: center;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
}

.reservation-product-card:last-child {
  border-bottom: 0;
}

.reservation-product-card.is-complete,
.reservation-product-card.is-muted {
  background: #fbfcfb;
}

.reservation-product-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.reservation-product-main strong {
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reservation-product-main span {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reservation-product-facts {
  display: grid;
  grid-template-columns: 110px 120px 105px minmax(180px, 1fr);
  gap: 10px;
  margin: 0;
}

.reservation-product-facts div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.reservation-product-facts dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.reservation-product-facts dd {
  margin: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.grid.two {
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
}

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

.panel,
.card,
.table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.table-wrap {
  overflow-x: auto;
}

.panel {
  padding: 16px;
}

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

.panel-head h2 {
  margin: 0;
  font-size: 17px;
}

.panel-head.compact {
  margin-top: 12px;
}

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

.metric {
  display: grid;
  gap: 7px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

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

.metric strong {
  font-size: 25px;
}

.metric b {
  color: var(--brand);
}

.input,
.select,
.textarea {
  min-height: 40px;
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 0 11px;
  color: var(--ink);
  background: #ffffff;
}

.textarea {
  min-height: 92px;
  padding: 10px 11px;
  resize: vertical;
}

.compact-textarea {
  min-height: 72px;
}

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

.field label {
  color: #31453b;
  font-size: 13px;
  font-weight: 700;
}

.field label.required::after {
  content: " *";
  color: var(--red);
}

.field-help {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.stock-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stock-summary span {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  min-width: 150px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 11px;
  color: #405249;
  background: #f8faf8;
  font-size: 13px;
}

.stock-summary strong {
  margin-left: 10px;
  color: var(--ink);
}

.work-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8faf8;
}

.work-summary div {
  display: grid;
  gap: 4px;
}

.work-summary span,
.quantity-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.work-summary strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
}

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

.quantity-card {
  display: grid;
  gap: 6px;
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.quantity-card strong {
  color: var(--ink);
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

.quantity-card.is-reservation {
  border-color: #bfd8cc;
  background: #edf8f3;
}

.quantity-card.is-reservation strong {
  color: #0f5137;
}

.quantity-card.is-order {
  border-color: #d4c7ff;
  background: #f4f0ff;
}

.quantity-card.is-order strong {
  color: #4b2ea3;
}

.quantity-card.is-buffer {
  border-color: #f3d98b;
  background: var(--amber-soft);
}

.quantity-card.is-buffer strong {
  color: #694600;
}

.formula-box {
  min-height: 40px;
  border: 1px solid #cfe0d7;
  border-radius: 6px;
  padding: 10px 11px;
  color: var(--brand-dark);
  background: #f1f8f4;
  font-size: 14px;
  font-weight: 800;
}

.formula-box strong {
  color: var(--red);
  font-size: 16px;
  font-weight: 900;
}

.quantity-emphasis {
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}

.quantity-emphasis.order-quantity {
  color: var(--brand);
}

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

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

.inline-field-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.inline-field-head label {
  margin-bottom: 3px;
}

.inline-field-head .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.open-chat-item-list {
  display: grid;
  gap: 8px;
}

.open-chat-item-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 38px;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fbf9;
}

.open-chat-item-row .select {
  min-width: 0;
}

.danger-light {
  color: var(--red);
  border-color: #f3c9c2;
  background: #fff7f5;
}

.order-buffer-field,
.inbound-quantity-field {
  grid-column: 2;
}

.form-row-three {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 0.8fr 1.2fr 1fr;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 0 12px;
  color: var(--ink);
  background: #ffffff;
}

.btn:hover {
  border-color: #9aaba2;
}

.btn.primary {
  border-color: var(--brand);
  color: #ffffff;
  background: var(--brand);
}

.btn.primary:hover {
  background: var(--brand-dark);
}

.btn.warn {
  border-color: #efc15b;
  color: #6b4300;
  background: var(--amber-soft);
}

.btn.danger {
  border-color: #ffd0ca;
  color: var(--red);
  background: var(--red-soft);
}

.btn.icon {
  width: 38px;
  padding: 0;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.table .btn-row {
  display: table-cell;
  min-width: max-content;
  white-space: nowrap;
  vertical-align: middle;
}

.table .btn-row .btn {
  margin-right: 8px;
}

.table .btn-row .btn:last-child {
  margin-right: 0;
}

.table th:last-child {
  min-width: 132px;
}

.table th:nth-last-child(2) {
  min-width: 168px;
}

.badge,
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.badge.green {
  color: #0e624f;
  background: var(--brand-soft);
}

.badge.amber {
  color: #7a4a00;
  background: var(--amber-soft);
}

.badge.red {
  color: var(--red);
  background: var(--red-soft);
}

.badge.blue {
  color: var(--blue);
  background: var(--blue-soft);
}

.badge.paid {
  color: #7a4b00;
  background: #fff6dd;
}

.badge.gray {
  color: #53635a;
  background: var(--gray-soft);
}

.muted {
  color: var(--muted);
}

.block {
  display: block;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 18px 0 10px;
}

.section-title h3 {
  margin: 0;
  font-size: 15px;
}

.subsection-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0 8px;
}

.subsection-head h3 {
  margin: 0;
  font-size: 15px;
}

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

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

.customer-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--surface-2);
}

.customer-summary h2 {
  margin: 0 0 4px;
  font-size: 24px;
  line-height: 1.15;
}

.customer-summary p {
  font-size: 16px;
  font-weight: 700;
}

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

.customer-order-summary div {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.customer-order-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.customer-order-summary strong {
  font-size: 20px;
}

.customer-order-group {
  display: grid;
  gap: 8px;
}

.customer-order-list {
  display: grid;
  gap: 6px;
}

.customer-order-row {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 88px 88px 104px;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #ffffff;
}

.customer-order-row.is-muted {
  background: #f8faf8;
}

.customer-order-row div {
  display: grid;
  gap: 3px;
}

.customer-order-row div strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-order-row span {
  color: var(--muted);
  font-size: 12px;
}

.customer-order-row b {
  color: #34483f;
  font-size: 13px;
  text-align: center;
}

.customer-order-row > strong {
  font-size: 15px;
  text-align: right;
}

.customer-pickup-table th,
.customer-pickup-table td {
  white-space: nowrap;
}

.customer-pickup-table {
  table-layout: fixed;
}

.customer-pickup-table th:nth-child(1),
.customer-pickup-table td:nth-child(1) {
  width: 76px;
}

.customer-pickup-table th:nth-child(2),
.customer-pickup-table td:nth-child(2) {
  width: 310px;
}

.pickup-product-cell {
  vertical-align: middle;
}

.pickup-product-cell strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pickup-product-cell span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.customer-pickup-table th:nth-child(3),
.customer-pickup-table td:nth-child(3) {
  text-align: center;
  width: 86px;
}

.reservation-stock-cell {
  text-align: center;
  vertical-align: middle;
}

.reservation-stock-cell strong,
.reservation-stock-cell span {
  display: block;
}

.reservation-stock-cell span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.reservation-stock-cell.is-short span,
.pickup-available-cell.is-short span {
  color: var(--red);
}

.customer-pickup-table th:nth-child(4),
.customer-pickup-table td:nth-child(4) {
  width: 132px;
  text-align: center;
}

.customer-pickup-table th:nth-child(5),
.customer-pickup-table td:nth-child(5) {
  width: 98px;
  text-align: center;
}

.pickup-available-cell {
  text-align: center;
}

.pickup-available-cell > span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.qty-stepper {
  display: inline-grid;
  grid-template-columns: 26px 38px 26px;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
}

.qty-stepper button,
.qty-stepper input {
  min-height: 32px;
  border: 0;
  text-align: center;
  background: transparent;
}

.qty-stepper button {
  color: var(--brand);
  font-size: 16px;
  font-weight: 900;
}

.qty-stepper input {
  width: 38px;
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
  color: var(--ink);
  font-weight: 900;
}

.qty-stepper input::-webkit-outer-spin-button,
.qty-stepper input::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

.pickup-payment-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  border: 1px solid #cfe0d7;
  border-radius: 8px;
  padding: 12px;
  background: #f8faf8;
}

.pickup-payment-summary div {
  display: grid;
  gap: 5px;
}

.pickup-payment-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.pickup-payment-summary strong {
  font-size: 20px;
}

.pickup-payment-summary .is-payable strong {
  color: var(--red);
  font-size: 24px;
}

.pickup-payment-summary .is-pickup-qty strong {
  color: var(--brand);
  font-size: 24px;
}

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

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

.item-row.compact {
  grid-template-columns: minmax(0, 1fr) auto;
}

.thumb {
  width: 68px;
  height: 54px;
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(20, 107, 92, 0.18), rgba(183, 121, 31, 0.18)),
    #eef2ef;
}

.item-row h4 {
  margin: 0 0 4px;
  font-size: 15px;
}

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

.price {
  font-weight: 800;
  text-align: right;
}

.summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.summary-bar strong {
  font-size: 20px;
}

.product-stat {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.product-stat h3 {
  margin: 0;
  font-size: 15px;
}

.stat-line {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.stat-line span {
  display: grid;
  gap: 3px;
  padding: 8px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
}

.stat-line strong {
  color: var(--ink);
  font-size: 16px;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table .product-cell {
  min-width: 220px;
  max-width: 320px;
}

.table .product-name {
  display: block;
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table th,
.table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.table th {
  color: #405249;
  background: #f8faf8;
  font-size: 13px;
}

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

.state-line {
  display: block;
  width: max-content;
  min-height: 24px;
  margin-bottom: 4px;
  border-radius: 999px;
  padding: 4px 9px;
  color: #0e624f;
  background: var(--brand-soft);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.state-line.off {
  color: #53635a;
  background: var(--gray-soft);
}

.counter-main-page .page-head {
  margin-bottom: 14px;
}

.counter-title-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 6px;
}

.counter-title-line h1 {
  margin: 0;
}

.counter-current-time {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid #f5dfaa;
  border-radius: 999px;
  padding: 0 14px;
  color: #8b4b00;
  font-size: 17px;
  font-weight: 900;
  background: #fff3d4;
}

.counter-head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 12px;
  min-width: min(760px, 100%);
}

.header-customer-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-customer-search label {
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
}

.counter-layout {
  display: grid;
  grid-template-columns: minmax(690px, 1fr) 420px;
  gap: 14px;
  align-items: start;
  justify-content: start;
}

.counter-search {
  width: 200px;
}

.counter-filter {
  width: 150px;
}

.inventory-stock-panel {
  min-height: 620px;
  width: 100%;
  max-width: 100%;
}

.recent-processing-panel {
  position: sticky;
  top: 18px;
  min-height: 620px;
}

.counter-stock-wrap {
  overflow: auto;
  max-height: 486px;
}

.counter-stock-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fbfdfb;
}

.customer-search-box {
  position: relative;
  width: 320px;
}

.customer-search-input {
  width: 100%;
  min-height: 42px;
  font-size: 15px;
  font-weight: 800;
}

.customer-search-results {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 80;
  overflow-y: auto;
  display: none;
  width: 360px;
  max-height: 178px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(23, 38, 31, 0.08);
}

.customer-search-box:focus-within .customer-search-results {
  display: block;
}

.customer-result-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.85fr) minmax(150px, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 44px;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
  color: var(--ink);
  background: #ffffff;
}

.customer-result-row:last-child {
  border-bottom: 0;
}

.customer-result-row:hover {
  background: #f6fbf8;
}

.customer-result-row.is-selected,
.customer-result-row:focus-visible {
  outline: 2px solid rgba(20, 107, 92, 0.28);
  outline-offset: -2px;
  background: #edf8f3;
}

.customer-result-row strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-result-row span {
  color: var(--muted);
  font-size: 12px;
}

.recent-processing-list {
  display: grid;
  align-content: start;
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.history-empty {
  margin: 0;
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
}

.processing-row {
  display: grid;
  gap: 5px;
  min-height: 70px;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
  background: #ffffff;
}

.processing-row:last-child {
  border-bottom: 0;
}

.processing-row:hover {
  background: #f6fbf8;
}

.processing-row.is-refunded {
  background: #fbfbfa;
}

.processing-row-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.processing-row-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.receipt-status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 0 8px;
  color: #086052;
  background: #dff4ed;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.processing-row.is-refunded .receipt-status {
  color: #7a342b;
  background: #ffe6df;
}

.processing-row strong {
  color: var(--ink);
  font-size: 14px;
}

.processing-row time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.processing-row p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.processing-row .processing-amount {
  color: var(--red);
  font-weight: 900;
}

.processing-row.is-refunded .processing-amount {
  color: var(--muted);
  text-decoration: line-through;
}

.processing-row .processing-note {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: #31453b;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.processing-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.processing-actions .text-link {
  font-size: 12px;
}

.danger-link {
  color: var(--red);
}

.danger-link:disabled {
  cursor: not-allowed;
  color: var(--muted);
  opacity: 0.7;
}

.customer-receipt-list {
  display: grid;
  gap: 6px;
}

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

.customer-receipt-row:hover {
  border-color: #b6d4c9;
  background: #f4faf7;
}

.customer-receipt-row span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.customer-receipt-row strong {
  color: var(--ink);
  font-size: 13px;
}

.customer-receipt-row small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-receipt-row b {
  color: var(--red);
  font-size: 14px;
}

.customer-receipt-row em {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 0 10px;
  color: var(--brand);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  background: #ffffff;
}

.recent-processing-pager {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  margin-top: 10px;
}

.recent-processing-pager span {
  min-width: 48px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.recent-processing-pager .btn {
  min-height: 32px;
  padding: 0 10px;
}

.recent-processing-pager .btn:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.receipt-note-box {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfb;
}

.receipt-note-box span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.receipt-note-box p {
  margin: 0;
  color: #31453b;
  font-size: 13px;
  line-height: 1.45;
}

.counter-stock-table th:nth-child(n + 3):nth-child(-n + 8),
.counter-stock-table td:nth-child(n + 3):nth-child(-n + 8) {
  width: 72px;
  text-align: center;
}

.counter-stock-table th:nth-child(3),
.counter-stock-table td:nth-child(3) {
  background: rgba(233, 238, 235, 0.58);
}

.counter-stock-table th:nth-child(4),
.counter-stock-table td:nth-child(4),
.counter-stock-table th:nth-child(5),
.counter-stock-table td:nth-child(5) {
  background: rgba(237, 244, 255, 0.5);
}

.counter-stock-table th:nth-child(6),
.counter-stock-table td:nth-child(6) {
  background: rgba(244, 240, 255, 0.54);
}

.counter-stock-table th:nth-child(7),
.counter-stock-table td:nth-child(7) {
  background: rgba(255, 246, 221, 0.58);
}

.counter-stock-table th:nth-child(8),
.counter-stock-table td:nth-child(8) {
  background: rgba(222, 243, 238, 0.5);
}

.counter-stock-table {
  table-layout: fixed;
  width: 100%;
}

.counter-stock-table th:first-child,
.counter-stock-table td:first-child {
  width: 112px;
}

.counter-stock-table .product-cell {
  width: 230px;
  min-width: 230px;
  max-width: none;
}

.inventory-ledger-table {
  min-width: 1160px;
}

.inventory-ledger-table .product-cell {
  width: 190px;
  min-width: 190px;
}

.inventory-ledger-table th:nth-child(n + 3),
.inventory-ledger-table td:nth-child(n + 3) {
  width: 72px;
  text-align: center;
}

.inventory-ledger-table th:nth-child(3),
.inventory-ledger-table td:nth-child(3) {
  background: transparent;
}

.inventory-ledger-table th:nth-child(4),
.inventory-ledger-table td:nth-child(4) {
  background: transparent;
}

.inventory-ledger-table th:nth-child(5),
.inventory-ledger-table td:nth-child(5) {
  background: rgba(255, 232, 222, 0.42);
}

.inventory-ledger-table th:nth-child(6),
.inventory-ledger-table td:nth-child(6) {
  background: rgba(233, 238, 235, 0.58);
}

.inventory-ledger-table th:nth-child(7),
.inventory-ledger-table td:nth-child(7) {
  background: rgba(237, 244, 255, 0.5);
}

.inventory-ledger-table th:nth-child(8),
.inventory-ledger-table td:nth-child(8) {
  background: rgba(237, 244, 255, 0.5);
}

.inventory-ledger-table th:nth-child(9),
.inventory-ledger-table td:nth-child(9) {
  background: rgba(244, 240, 255, 0.54);
}

.inventory-ledger-table th:nth-child(10),
.inventory-ledger-table td:nth-child(10) {
  background: rgba(255, 246, 221, 0.58);
}

.inventory-ledger-table th:nth-child(11),
.inventory-ledger-table td:nth-child(11) {
  background: rgba(222, 243, 238, 0.5);
}

.inventory-ledger-table .stock-count {
  min-width: 44px;
}

.counter-stock-table th,
.counter-stock-table td {
  padding: 10px 10px;
}

.counter-stock-table th {
  line-height: 1.25;
}

.counter-stock-table .stock-heading {
  text-align: center;
}

.stock-heading strong,
.stock-heading span {
  display: block;
}

.stock-heading strong {
  color: #25382f;
  font-size: 13px;
}

.stock-heading span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.stock-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 900;
}

button.stock-count {
  cursor: pointer;
}

button.stock-count:hover {
  filter: brightness(0.97);
  transform: translateY(-1px);
}

button.stock-count:focus-visible {
  outline: 2px solid rgba(20, 107, 92, 0.32);
  outline-offset: 2px;
}

.stock-count.waiting {
  color: #193c74;
  background: #edf4ff;
}

.stock-count.short-hold {
  color: #193c74;
  background: #edf4ff;
}

.stock-count.long-hold {
  color: #4b2ea3;
  background: #f4f0ff;
}

.stock-count.paid-hold {
  color: #7a4b00;
  background: #fff6dd;
}

.stock-count.sellable {
  color: #0e624f;
  background: var(--brand-soft);
}

.stock-count.total {
  color: #25382f;
  background: #e9eeeb;
}

.stock-count.sold {
  color: #17231d;
  background: transparent;
}

.stock-count.ordered {
  color: #495057;
  background: #edf1f4;
}

.stock-count.inbound {
  color: #17231d;
  background: transparent;
}

.stock-count.damaged {
  color: #a73b22;
  background: #ffe8de;
}

.inventory-formula-note {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  margin-top: 12px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
  color: #486055;
  font-size: 13px;
  line-height: 1.4;
}

.inventory-formula-note strong {
  color: #0d2a1f;
}

.inventory-formula-note span {
  white-space: nowrap;
}

.counter-formula-note {
  margin-top: 0;
  margin-bottom: 12px;
}

.counter-formula-note span {
  white-space: normal;
}

.reservation-count {
  display: grid;
  gap: 3px;
}

.reservation-count strong {
  font-size: 15px;
}

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

.quantity-stack {
  display: grid;
  gap: 4px;
  font-size: 13px;
  line-height: 1.25;
  min-width: 76px;
}

.quantity-stack strong {
  font-size: 14px;
  white-space: nowrap;
}

.quantity-stack span {
  color: #0e624f;
  font-weight: 700;
  white-space: nowrap;
}

.board {
  display: grid;
  grid-auto-columns: minmax(300px, 1fr);
  grid-auto-flow: column;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.date-column {
  min-height: 560px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf8;
}

.date-column header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px;
  border-bottom: 1px solid var(--line);
  background: #f8faf8;
}

.date-column header h2 {
  margin: 0;
  font-size: 16px;
}

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

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

.deadline-box {
  display: grid;
  gap: 3px;
  padding: 8px;
  border-radius: 6px;
  background: var(--surface-2);
}

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

.deadline-box strong {
  font-size: 13px;
}

.image-slot {
  display: grid;
  min-height: 108px;
  place-items: center;
  border: 1px dashed #bfd0c7;
  border-radius: 8px;
  color: var(--muted);
  background: #f6faf8;
}

.image-uploader {
  display: grid;
  gap: 8px;
  min-height: 148px;
  border: 1px dashed #bfd0c7;
  border-radius: 8px;
  padding: 10px;
  background: #f6faf8;
}

.image-uploader.is-dragging {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.image-uploader.has-images .image-dropzone {
  display: none;
}

.image-dropzone {
  display: grid;
  min-height: 46px;
  place-items: center;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.62);
  cursor: pointer;
}

.image-dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.image-dropzone strong {
  color: var(--brand);
}

.image-dropzone span {
  font-size: 13px;
}

.image-preview-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 8px;
  align-items: start;
}

.image-preview-list:empty {
  display: none;
}

.image-preview-card {
  position: relative;
  min-height: 104px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
}

.image-preview-card.is-primary {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 2px rgba(20, 107, 92, 0.16);
}

.image-preview-thumb {
  width: 100%;
  height: 104px;
  background:
    linear-gradient(135deg, rgba(20, 107, 92, 0.22), rgba(183, 121, 31, 0.18)),
    #eef2ef;
  background-position: center;
  background-size: cover;
}

.image-preview-thumb.alt {
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(180, 35, 24, 0.14)),
    #eef2ef;
}

.primary-image-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  display: none;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 8px;
  color: #0e624f;
  background: rgba(229, 244, 239, 0.94);
  font-size: 12px;
  font-weight: 800;
}

.image-preview-card.is-primary .primary-image-badge {
  display: inline-flex;
}

.image-preview-card .btn.icon {
  position: absolute;
  top: 6px;
  right: 6px;
  min-height: 30px;
  width: 30px;
  background: rgba(255, 255, 255, 0.92);
}

.image-add-card {
  display: grid;
  min-height: 104px;
  place-items: center;
  border: 1px dashed #bfd0c7;
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.62);
  cursor: pointer;
}

.image-add-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.image-add-card strong {
  color: var(--brand);
  font-size: 24px;
}

.image-add-card span {
  font-size: 13px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(10, 22, 17, 0.44);
}

.modal-backdrop.is-open {
  display: flex;
}

.modal {
  width: min(100%, 620px);
  max-height: min(820px, 92vh);
  overflow: auto;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.modal.customer-detail-modal {
  width: min(100%, 1040px);
}

.customer-detail-modal header {
  padding: 14px 18px 10px;
}

.customer-detail-modal .modal-body {
  gap: 8px;
  padding: 10px 18px 12px;
}

.customer-detail-modal .customer-summary {
  padding: 8px 12px;
}

.customer-detail-modal .customer-summary h2 {
  font-size: 22px;
}

.customer-detail-modal .customer-summary p {
  margin: 0;
}

.customer-detail-modal .subsection-head {
  margin: 4px 0 6px;
}

.customer-detail-modal .subsection-head p {
  margin-top: 2px;
}

.customer-detail-modal .customer-pickup-table th,
.customer-detail-modal .customer-pickup-table td {
  padding-top: 7px;
  padding-bottom: 7px;
}

.modal.stock-reservation-modal {
  width: min(100%, 820px);
}

.modal.walkin-sale-modal {
  width: min(100%, 920px);
}

.modal.receipt-detail-modal {
  width: min(100%, 860px);
}

.walkin-sale-wrap {
  max-height: 360px;
}

.walkin-sale-table th,
.walkin-sale-table td {
  vertical-align: middle;
}

.walkin-sale-table th:nth-child(1),
.walkin-sale-table td:nth-child(1) {
  width: 118px;
}

.walkin-sale-table th:nth-child(3),
.walkin-sale-table td:nth-child(3),
.walkin-sale-table th:nth-child(4),
.walkin-sale-table td:nth-child(4),
.walkin-sale-table th:nth-child(5),
.walkin-sale-table td:nth-child(5) {
  width: 128px;
  text-align: center;
}

.walkin-sale-table td:nth-child(5) {
  font-weight: 900;
}

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

.receipt-detail-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  border: 1px solid #cfe0d7;
  border-radius: 8px;
  padding: 12px;
  background: #f8faf8;
}

.receipt-detail-summary div {
  display: grid;
  gap: 5px;
}

.receipt-detail-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

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

.receipt-items-table th,
.receipt-items-table td {
  vertical-align: middle;
}

.receipt-items-table th:first-child,
.receipt-items-table td:first-child {
  min-width: 260px;
}

.receipt-items-table th:nth-child(n + 2),
.receipt-items-table td:nth-child(n + 2) {
  width: 120px;
  text-align: right;
}

.receipt-history-items-table {
  table-layout: fixed;
  min-width: 760px;
}

.receipt-history-items-table th,
.receipt-history-items-table td {
  white-space: nowrap;
}

.receipt-history-items-table th:first-child,
.receipt-history-items-table td:first-child {
  width: 240px;
  min-width: 240px;
  text-align: left;
}

.receipt-history-items-table th:nth-child(2),
.receipt-history-items-table td:nth-child(2) {
  width: 106px;
  text-align: center;
}

.receipt-history-items-table th:nth-child(3),
.receipt-history-items-table td:nth-child(3),
.receipt-history-items-table th:nth-child(4),
.receipt-history-items-table td:nth-child(4) {
  width: 82px;
  text-align: center;
}

.receipt-history-items-table th:nth-child(5),
.receipt-history-items-table td:nth-child(5) {
  width: 104px;
  text-align: right;
}

.receipt-history-items-table th:nth-child(6),
.receipt-history-items-table td:nth-child(6) {
  width: 88px;
  text-align: center;
}

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

.reservation-owner-summary div {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.reservation-owner-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.reservation-owner-summary strong {
  font-size: 20px;
}

.reservation-owner-table th:nth-child(3),
.reservation-owner-table td:nth-child(3) {
  text-align: center;
  width: 72px;
}

.reservation-owner-table th:nth-child(4),
.reservation-owner-table td:nth-child(4),
.reservation-owner-table th:nth-child(5),
.reservation-owner-table td:nth-child(5) {
  width: 92px;
  text-align: center;
}

.modal header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 12px;
  border-bottom: 1px solid var(--line);
}

.modal header h2 {
  margin: 0 0 5px;
  font-size: 19px;
}

.modal header p {
  margin: 0;
  color: var(--muted);
}

.modal-body {
  display: grid;
  gap: 14px;
  padding: 16px 18px;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px 18px;
  border-top: 1px solid var(--line);
}

.footer-hint {
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
}

.footer-hint.important {
  border: 1px solid #f3d98b;
  border-radius: 999px;
  padding: 7px 10px;
  color: #694600;
  background: var(--amber-soft);
  font-weight: 800;
}

.tabs {
  display: flex;
  gap: 8px;
  width: 100%;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.tabs button {
  display: inline-flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  border: 0;
  border-radius: 6px;
  padding: 0 16px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
  background: transparent;
}

.tabs button.is-active {
  color: var(--ink);
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(20, 40, 30, 0.08);
}

.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  padding: 0 7px;
  color: #ffffff;
  background: var(--red);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.notice {
  padding: 12px;
  border: 1px solid #f3d98b;
  border-radius: 8px;
  color: #694600;
  background: var(--amber-soft);
}

.notice.danger-note {
  margin-top: 14px;
  border-color: #ffd0ca;
  color: #8f1d12;
  background: var(--red-soft);
}

.feedback-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 140;
  display: flex;
  align-items: center;
  min-height: 46px;
  max-width: min(420px, calc(100vw - 48px));
  border: 1px solid #b9d9c9;
  border-radius: 8px;
  padding: 0 16px;
  color: #0f5137;
  background: #eaf7f0;
  box-shadow: var(--shadow);
  font-size: 14px;
  font-weight: 800;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.feedback-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.danger-zone {
  border-color: #ffd2cc;
  background: #fff8f7;
}

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

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

  .sidebar {
    position: static;
    height: auto;
  }

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

  .grid.two,
  .grid.three,
  .form-grid,
  .form-row-three,
  .work-summary,
  .quantity-board {
    grid-template-columns: 1fr;
  }

  .order-buffer-field,
  .inbound-quantity-field {
    grid-column: 1;
  }

  .page-head {
    display: grid;
  }

  .counter-main-page .panel-head {
    display: grid;
  }

  .customer-search-panel {
    position: static;
  }

  .customer-order-row {
    grid-template-columns: 1fr 80px 80px 96px;
  }
}

@media (max-width: 640px) {
  .main {
    padding: 14px;
  }

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

  .item-row {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .item-row .price {
    grid-column: 1 / -1;
    text-align: left;
  }

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

  .customer-order-summary,
  .customer-order-row,
  .pickup-payment-summary {
    grid-template-columns: 1fr;
  }

  .customer-order-row b,
  .customer-order-row > strong {
    text-align: left;
  }

  .counter-search,
  .counter-filter {
    width: 100%;
  }

  .customer-result-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
