:root {
  --page-bg: #eef8f5;
  --panel: #ffffff;
  --ink: #151923;
  --muted: #66766f;
  --line: #d9e8e3;
  --navy: #0f6f64;
  --navy-soft: #16877a;
  --yellow: #fff1a8;
  --red: #e53935;
  --red-deep: #0f6f64;
  --primary: #1fae9a;
  --primary-deep: #0f6f64;
  --primary-pale: #e8fbf8;
  --shadow: 0 14px 34px rgba(15, 111, 100, 0.12);
  --card-radius: 20px;
  --app-width: 520px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--page-bg);
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

.mobile-frame {
  width: min(100%, var(--app-width));
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 12px 140px;
  background:
    linear-gradient(180deg, rgba(31, 174, 154, 0.08), rgba(238, 248, 245, 0) 280px),
    #f6fbf9;
}

.order-header {
  position: sticky;
  isolation: isolate;
  top: 0;
  z-index: 30;
  margin: 0 -12px 4px;
  padding: 14px 16px 12px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 255, 255, 0.24), transparent 34%),
    linear-gradient(135deg, rgba(7, 75, 68, 0.98) 0%, rgba(15, 111, 100, 0.98) 46%, rgba(31, 174, 154, 0.94) 100%),
    #0f6f64;
  border-radius: 0 0 24px 24px;
  box-shadow: 0 16px 34px rgba(15, 111, 100, 0.26);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.order-header::after {
  content: "Fit4Work";
  position: absolute;
  right: 8px;
  bottom: -10px;
  z-index: 0;
  color: rgba(255, 255, 255, 0.1);
  font-size: 3.35rem;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

.order-header > * {
  position: relative;
  z-index: 2;
}

.header-title-row,
.header-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.header-title-row h1 {
  margin: 2px 0 0;
  font-size: 1.18rem;
  font-weight: 900;
  line-height: 1.2;
}

.brand-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.13);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.04em;
}

.change-customer-button {
  min-height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.14);
  font-size: 0.82rem;
  font-weight: 800;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.82);
}

.header-meta strong {
  color: #fff;
  font-size: 0.95rem;
}

.header-total-row {
  margin-top: 10px;
}

.header-total-row span {
  display: block;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.82);
}

.header-total-row strong {
  display: block;
  margin-top: 2px;
  color: var(--yellow);
  font-size: 1.68rem;
  font-weight: 900;
  line-height: 1.05;
  text-shadow: 0 2px 10px rgba(4, 38, 36, 0.18);
}

.shipping-copy {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  flex: 0 0 auto;
  min-height: 38px;
  max-width: none;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 16px;
  color: #fff7c5;
  background: rgba(6, 62, 56, 0.38);
  font-size: 0.9rem;
  font-weight: 900;
  text-align: right;
  line-height: 1.25;
  white-space: nowrap;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 6px 14px rgba(5, 44, 40, 0.14);
}

.shipping-copy::before {
  content: "FREE";
  flex: 0 0 auto;
  padding: 3px 6px;
  border-radius: 999px;
  color: var(--primary-deep);
  background: rgba(255, 241, 168, 0.92);
  font-size: 0.66rem;
  font-weight: 900;
  line-height: 1;
}

.progress-track {
  height: 8px;
  margin-top: 11px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 1px 2px rgba(4, 38, 36, 0.18);
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #fff1a8 0%, #7df4df 48%, var(--primary) 100%);
  transition: width 0.18s ease;
}

.customer-input-row {
  display: flex;
  gap: 8px;
}

.customer-input-row input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 13px;
  background: #fff;
  color: var(--ink);
}

.navy-button {
  min-width: 72px;
  min-height: 48px;
  border-radius: 12px;
  color: #fff;
  background: var(--primary-deep);
  font-weight: 900;
}

.category-tabs {
  position: sticky;
  top: 132px;
  z-index: 20;
  display: flex;
  gap: 8px;
  margin: 0 -12px;
  padding: 10px 12px 12px;
  overflow-x: auto;
  background: rgba(246, 251, 249, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.category-tab {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(15, 111, 100, 0.12);
  border-radius: 999px;
  color: #40655f;
  background: #fff;
  font-weight: 900;
  box-shadow: 0 6px 16px rgba(15, 111, 100, 0.07);
}

.category-tab.is-active {
  color: #fff;
  border-color: var(--primary-deep);
  background: linear-gradient(135deg, #0f6f64, #16877a);
  box-shadow: 0 8px 18px rgba(15, 111, 100, 0.22);
}

.order-notices {
  display: grid;
  gap: 4px;
  margin: 6px 0 14px;
  padding: 0 4px;
}

.order-notices p {
  margin: 0;
  color: #687a74;
  font-size: 0.78rem;
  line-height: 1.45;
}

.product-list {
  display: grid;
  gap: 14px;
}

.product-list.is-locked {
  opacity: 0.48;
  pointer-events: none;
}

.product-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(15, 111, 100, 0.08);
  border-radius: var(--card-radius);
  background: var(--panel);
  box-shadow:
    0 14px 30px rgba(15, 111, 100, 0.1),
    0 2px 8px rgba(14, 46, 42, 0.04);
}

.product-card.is-hidden {
  display: none;
}

.product-main {
  display: grid;
  grid-template-columns: 122px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.product-image {
  width: 122px;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  background: linear-gradient(135deg, #e8fbf8, #f5fbf8);
  object-fit: cover;
  box-shadow: inset 0 0 0 1px rgba(15, 111, 100, 0.06);
}

.product-info {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 6px;
}

.product-name {
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1.24;
  word-break: keep-all;
}

.product-meta-line {
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  padding: 5px 8px;
  border-radius: 999px;
  color: #436d66;
  background: #edf8f5;
  font-size: 0.76rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-description {
  overflow: hidden;
  color: #7a8984;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-price {
  margin-top: 1px;
  color: var(--primary-deep);
  font-size: 1rem;
  font-weight: 900;
}

.size-buttons {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 3px 0 2px;
  scrollbar-width: none;
}

.size-buttons::-webkit-scrollbar {
  display: none;
}

.size-button {
  flex: 0 0 auto;
  min-width: 40px;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid rgba(15, 111, 100, 0.13);
  border-radius: 12px;
  color: #41655f;
  background: #fff;
  font-weight: 900;
  box-shadow: 0 4px 10px rgba(15, 111, 100, 0.06);
}

.size-button.is-active {
  color: #fff;
  border-color: var(--primary-deep);
  background: linear-gradient(135deg, #0f6f64, #16877a);
  box-shadow: 0 8px 16px rgba(15, 111, 100, 0.22);
}

.quantity-panel {
  display: grid;
  grid-template-columns: 58px minmax(96px, 1fr) 58px;
  gap: 7px;
  align-items: center;
}

.qty-button {
  min-height: 48px;
  border-radius: 14px;
  font-size: 1.5rem;
  font-weight: 900;
  touch-action: manipulation;
  user-select: none;
}

.qty-minus {
  color: var(--primary-deep);
  background: #e8fbf8;
}

.qty-plus {
  color: #fff;
  background: linear-gradient(135deg, #0f6f64, #16877a);
  box-shadow: 0 8px 16px rgba(15, 111, 100, 0.18);
}

.qty-center {
  min-height: 48px;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(72px, 1fr) minmax(0, auto);
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(15, 111, 100, 0.12);
  border-radius: 14px;
  padding: 5px 8px;
  background: #f7fcfa;
}

.qty-input {
  width: 100%;
  min-width: 72px;
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  padding: 0 8px;
  color: var(--ink);
  background: transparent;
  font-size: 1.22rem;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
  outline: 0;
  touch-action: manipulation;
}

.qty-input:focus {
  background: #fff;
  box-shadow: inset 0 0 0 2px rgba(15, 111, 100, 0.24);
}

.qty-center span {
  min-width: 0;
  overflow: hidden;
  color: var(--primary-deep);
  font-size: 0.8rem;
  font-weight: 900;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bottom-order-bar {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 80;
  width: min(100%, var(--app-width));
  min-height: 78px;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(168px, 0.95fr);
  gap: 10px;
  align-items: center;
  padding: 11px 12px calc(11px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(15, 111, 100, 0.1);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 -14px 34px rgba(15, 111, 100, 0.16);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.bottom-left {
  min-height: 56px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  justify-items: start;
  padding: 8px 11px;
  border: 1px solid rgba(15, 111, 100, 0.16);
  border-radius: 17px;
  color: var(--primary-deep);
  background: linear-gradient(135deg, #ecfbf7, #ffffff);
  text-align: left;
  box-shadow: 0 8px 18px rgba(15, 111, 100, 0.09);
  touch-action: manipulation;
}

.bottom-left:active {
  transform: translateY(1px);
}

.bottom-cart-icon {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, #0f6f64, #16877a);
  font-size: 1.1rem;
  line-height: 1;
  box-shadow: 0 8px 16px rgba(15, 111, 100, 0.22);
}

.bottom-cart-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.bottom-cart-copy strong {
  color: var(--primary-deep);
  font-size: 0.94rem;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-button {
  min-height: 56px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  color: #fff;
  background: linear-gradient(135deg, #0f6f64 0%, #16877a 55%, #1fae9a 100%);
  box-shadow: 0 12px 24px rgba(15, 111, 100, 0.3);
  font-weight: 900;
  touch-action: manipulation;
}

.order-button strong {
  font-size: 0.84rem;
}

.order-button:disabled {
  color: #91a19c;
  background: #dbe9e5;
  box-shadow: none;
}

.sheet {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: end center;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 15, 30, 0.42);
}

.sheet-panel {
  position: relative;
  width: min(100%, var(--app-width));
  max-height: min(70vh, 620px);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  padding: 10px 14px calc(16px + env(safe-area-inset-bottom));
  border-radius: 22px 22px 0 0;
  background: #fff;
  box-shadow: 0 -16px 38px rgba(15, 23, 42, 0.2);
  animation: sheetUp 0.2s ease-out;
}

.sheet-handle {
  width: 42px;
  height: 5px;
  margin: 0 auto 12px;
  border-radius: 999px;
  background: #d8dde6;
}

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

.sheet-header h2 {
  margin: 0;
  font-size: 1.05rem;
}

.sheet-close-button {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--primary-deep);
  background: var(--primary-pale);
  font-weight: 900;
}

.mini-order-items {
  min-height: 96px;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px 0;
}

.mini-order-item,
.mini-order-empty {
  padding: 11px 12px;
  border: 1px solid #e5e9f0;
  border-radius: 12px;
  background: #fbfcfd;
}

.mini-order-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.mini-order-info {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.mini-order-item strong {
  font-size: 0.95rem;
}

.mini-order-info span,
.mini-order-empty {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.mini-order-controls {
  display: grid;
  grid-template-columns: 38px minmax(58px, 74px) 38px 48px;
  gap: 6px;
  align-items: center;
}

.mini-qty-button,
.mini-delete-button {
  min-height: 38px;
  border-radius: 10px;
  font-weight: 900;
}

.mini-qty-button {
  color: var(--primary-deep);
  background: var(--primary-pale);
  font-size: 1.08rem;
  touch-action: manipulation;
  user-select: none;
}

.mini-qty-input {
  width: 100%;
  min-width: 58px;
  min-height: 38px;
  border: 1px solid #dfe5ee;
  border-radius: 10px;
  padding: 0 6px;
  color: var(--ink);
  background: #fff;
  text-align: center;
  font-size: 1rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  outline: 0;
}

.mini-qty-input:focus {
  border-color: rgba(15, 111, 100, 0.48);
  box-shadow: 0 0 0 3px rgba(15, 111, 100, 0.12);
}

.mini-delete-button {
  color: #b42332;
  background: #fdecee;
  font-size: 0.78rem;
}

.mini-order-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.mini-order-summary div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 12px;
  background: var(--primary-pale);
}

.mini-order-summary span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.mini-order-summary strong {
  color: var(--primary-deep);
  font-size: 1.08rem;
  font-weight: 900;
}

@keyframes sheetUp {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: end center;
  padding: 16px 12px;
  background: rgba(8, 15, 30, 0.56);
}

.modal-backdrop {
  position: absolute;
  inset: 0;
}

.customer-modal {
  place-items: center;
}

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

.customer-modal-panel h2 {
  margin-bottom: 0;
}

.customer-modal-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.customer-modal-panel label {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 900;
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 472px);
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 18px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.22);
}

.confirm-customer-field,
.confirm-memo-field {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.confirm-customer-field span,
.confirm-memo-field span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 900;
}

.confirm-customer-field input,
.confirm-memo-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: #fff;
  font-weight: 800;
}

.confirm-customer-field input {
  min-height: 48px;
  padding: 0 13px;
}

.confirm-memo-field {
  margin: 14px 0 0;
  padding: 12px;
  border: 1px solid #dfe5ee;
  border-radius: 14px;
  background: #f8fafc;
}

.confirm-memo-field textarea {
  min-height: 86px;
  padding: 12px 13px;
  resize: vertical;
  line-height: 1.45;
  background: #fff;
}

.modal-panel h2 {
  margin: 0 0 12px;
  font-size: 1.2rem;
}

.modal-customer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: #f3f5f8;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.modal-customer strong {
  color: var(--ink);
}

.modal-items {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.modal-item {
  display: grid;
  gap: 2px;
  padding: 12px;
  border: 1px solid #e5e9f0;
  border-radius: 12px;
  background: #fff;
}

.modal-item-title {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 900;
}

.modal-item-detail {
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 800;
}

.modal-summary {
  display: grid;
  gap: 8px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.modal-summary div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-weight: 800;
}

.modal-summary strong {
  color: var(--primary-deep);
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.secondary-button,
.confirm-button {
  min-height: 52px;
  border-radius: 14px;
  font-weight: 900;
}

.secondary-button {
  color: var(--primary-deep);
  background: #edf1f6;
}

.confirm-button {
  color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-deep) 100%);
}

.complete-panel {
  text-align: center;
}

.complete-panel .confirm-button {
  width: 100%;
  margin-top: 12px;
}

.empty-state {
  padding: 22px;
  border-radius: var(--card-radius);
  background: #fff;
  box-shadow: var(--shadow);
}

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

.admin-body {
  background: var(--page-bg);
}

.admin-shell {
  width: min(1000px, calc(100% - 24px));
  margin: 20px auto 42px;
  display: grid;
  gap: 16px;
}

.card,
.admin-header,
.admin-login,
.admin-grid,
.admin-table-card,
.admin-danger-zone,
.stat-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}

.admin-header,
.admin-login,
.admin-grid,
.admin-table-card,
.admin-danger-zone,
.stat-card {
  padding: 18px;
}

.admin-header h1,
.admin-table-card h2,
.admin-grid h2,
.admin-login h2,
.admin-danger-zone h2 {
  margin: 0 0 10px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--primary-deep);
  font-size: 0.8rem;
  font-weight: 900;
}

.admin-note,
.helper-text {
  color: var(--muted);
  line-height: 1.5;
}

.admin-form {
  display: grid;
  gap: 10px;
}

.field-label {
  color: var(--muted);
  font-weight: 800;
}

input[type="password"],
input[type="file"] {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 900;
}

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

.button-ghost {
  color: var(--primary-deep);
  border: 1px solid var(--line);
  background: #fff;
}

.admin-top-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

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

.stat-card strong {
  display: block;
  margin-top: 6px;
  font-size: 1.35rem;
}

.stat-card-danger {
  border-color: #f4b7b7;
  background: #fff7f7;
}

.stat-card-danger div,
.stat-card-danger strong {
  color: #b42332;
}

.admin-alert {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border-radius: 16px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: var(--shadow);
}

.admin-alert strong {
  font-size: 1.1rem;
}

.admin-alert span {
  font-size: 0.9rem;
}

.admin-alert-danger {
  color: #981b1e;
  border: 1px solid #f2aaaa;
  background: #fff1f1;
}

.admin-grid {
  display: grid;
  gap: 18px;
}

.admin-danger-zone {
  display: grid;
  gap: 14px;
  border-color: #f4b7b7;
  background: #fffafa;
}

.danger-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.danger-button {
  color: #981b1e;
  border: 1px solid #f2aaaa;
  background: #fff1f1;
}

.danger-button-strong {
  color: #fff;
  border-color: #b42332;
  background: #b42332;
}

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

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.product-table-scroll {
  max-height: 360px;
  overflow: auto;
}

.image-table-scroll {
  max-height: min(420px, 70vh);
  overflow-x: auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.order-table-scroll,
.failed-table-scroll,
.scroll-table {
  max-height: 420px;
  overflow: auto;
}

table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  background: #fff;
}

.image-admin-table {
  min-width: 730px;
}

.image-admin-table th {
  z-index: 2;
}

.image-admin-table th:first-child,
.image-admin-table td:first-child {
  width: 48px;
  text-align: center;
  vertical-align: middle;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 0.9rem;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--muted);
  background: #f6f8fb;
  font-size: 0.8rem;
}

.empty-cell {
  color: var(--muted);
  text-align: center;
}

.prelike {
  white-space: pre-line;
}

.admin-image-thumb {
  width: 58px;
  height: 58px;
  display: block;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f4f6f9;
  object-fit: cover;
}

.image-bulk-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.image-select-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-deep);
  cursor: pointer;
}

.image-select-checkbox:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.image-file-name {
  display: block;
  max-width: 280px;
  overflow-wrap: anywhere;
  font-size: 0.92rem;
}

.image-lock-badge {
  display: inline-flex;
  margin-top: 6px;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--primary-deep);
  background: var(--primary-pale);
  font-size: 0.76rem;
  font-weight: 900;
}

.image-delete-button {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 10px;
}

.image-muted-action {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
}

.flash-stack {
  display: grid;
  gap: 8px;
}

.flash-message {
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 800;
}

.flash-message.success {
  color: #146837;
  background: #e8f5ed;
}

.flash-message.error {
  color: #b42332;
  background: #fdecee;
}

@media (max-width: 380px) {
  .product-main {
    grid-template-columns: 106px minmax(0, 1fr);
  }

  .product-image {
    width: 106px;
  }

  .quantity-panel {
    grid-template-columns: 52px minmax(88px, 1fr) 52px;
  }

  .bottom-order-bar {
    grid-template-columns: minmax(0, 1fr) 152px;
  }

  .bottom-left {
    grid-template-columns: 30px minmax(0, 1fr);
    padding-inline: 9px;
  }

  .bottom-cart-icon {
    width: 30px;
    height: 30px;
    border-radius: 11px;
    font-size: 0.98rem;
  }

  .bottom-cart-copy strong {
    font-size: 0.86rem;
  }
}

@media (min-width: 720px) {
  .mobile-frame {
    margin-top: 22px;
    margin-bottom: 22px;
    border-radius: 22px;
    box-shadow: 0 18px 44px rgba(15, 111, 100, 0.14);
    overflow: clip;
    padding-bottom: 140px;
  }

  .order-header {
    margin: 0 -12px 4px;
  }

  .bottom-order-bar {
    border-radius: 0 0 22px 22px;
  }
}

@media (min-width: 900px) {
  .admin-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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