:root {
  color-scheme: light;
  --bg: #fff9f0;
  --bg-2: #fff4df;
  --card: rgba(255, 255, 255, 0.84);
  --card-strong: #ffffff;
  --ink: #2a2a24;
  --muted: #756e64;
  --line: rgba(103, 90, 74, 0.16);
  --mint: #d8f1e4;
  --mint-deep: #79c59d;
  --sun: #ffd87f;
  --peach: #ffc7a1;
  --berry: #ff7f7f;
  --shadow: 0 22px 50px rgba(56, 47, 39, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Nunito", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 216, 127, 0.3), transparent 28%),
    radial-gradient(circle at 90% 10%, rgba(216, 241, 228, 0.66), transparent 22%),
    radial-gradient(circle at 20% 82%, rgba(255, 199, 161, 0.32), transparent 20%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px 20px 40px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark__dot {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 30% 30%, #fff9c7 0 22%, transparent 23%),
    linear-gradient(160deg, #ffd87f, #ffb88b);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.45);
}

.eyebrow {
  margin: 0 0 2px;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.topbar h1,
.hero-copy h2,
.card-head h3 {
  margin: 0;
  font-family: "Baloo 2", "Trebuchet MS", sans-serif;
  letter-spacing: 0.01em;
}

.topbar h1 {
  font-size: 34px;
  line-height: 0.95;
}

.mode-switch {
  display: inline-flex;
  gap: 8px;
  padding: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
}

.mode-switch__btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.mode-switch__btn.is-active {
  background: var(--mint);
  color: var(--ink);
  box-shadow: 0 8px 18px rgba(121, 197, 157, 0.2);
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.hero-panel {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border-radius: 36px;
  border: 1px solid rgba(103, 90, 74, 0.14);
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.92)),
    linear-gradient(135deg, #fff8e9, #ffffff);
  box-shadow: var(--shadow);
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: auto -40px -50px auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(216, 241, 228, 0.72);
  filter: blur(14px);
}

.hero-panel__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(216, 241, 228, 0.8);
  color: #2d6d4e;
  font-weight: 800;
}

.hero-panel__content {
  display: grid;
  grid-template-columns: minmax(260px, 400px) 1fr;
  gap: 24px;
  align-items: center;
  margin-top: 18px;
}

.hero-art {
  min-height: 320px;
  display: grid;
  place-items: center;
  padding: 18px;
  border-radius: 30px;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.25)),
    linear-gradient(160deg, rgba(255, 216, 127, 0.36), rgba(255, 199, 161, 0.42));
}

.hero-art img {
  max-width: 100%;
  max-height: 320px;
  object-fit: contain;
  filter: drop-shadow(0 20px 26px rgba(85, 73, 58, 0.16));
}

.hero-art__placeholder {
  width: min(100%, 280px);
  aspect-ratio: 1;
  border-radius: 28px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.4);
}

.hero-art__placeholder span {
  font-size: clamp(68px, 10vw, 108px);
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero-copy h2 {
  font-size: clamp(38px, 7vw, 72px);
  line-height: 0.95;
  margin-top: 6px;
}

.hero-copy__hint {
  margin: 12px 0 0;
  max-width: 560px;
  font-size: clamp(16px, 2vw, 22px);
  line-height: 1.4;
  color: var(--muted);
}

.hero-price {
  display: inline-flex;
  margin-top: 18px;
  padding: 16px 20px;
  border-radius: 22px;
  background: rgba(255, 216, 127, 0.58);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 900;
}

.checkout-grid,
.admin-grid {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

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

.admin-grid {
  grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
  align-items: start;
}

.recent-card {
  grid-column: 1 / -1;
}

.card {
  padding: 22px;
  border-radius: 28px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.card-head {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}

.card-head h3 {
  font-size: 30px;
  line-height: 1;
}

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

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

.metric-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.metric-value {
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1;
}

.action-row,
.mini-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.pill-btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 13px 18px;
  background: var(--mint-deep);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(121, 197, 157, 0.28);
}

.pill-btn--soft {
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
  box-shadow: none;
  border: 1px solid var(--line);
}

.pill-btn--sun {
  background: #ffb867;
  box-shadow: 0 12px 24px rgba(255, 184, 103, 0.26);
}

.scanner-form,
.field-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.scan-badge {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px dashed rgba(103, 90, 74, 0.2);
  color: var(--muted);
  font-weight: 700;
}

.scan-badge--camera {
  margin-bottom: 16px;
}

.cart-list,
.product-list,
.receipt-list {
  display: grid;
  gap: 12px;
}

.cart-item,
.product-item,
.receipt-item {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(103, 90, 74, 0.12);
}

.cart-item {
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
}

.item-thumb,
.product-thumb {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(150deg, rgba(255, 216, 127, 0.32), rgba(216, 241, 228, 0.6));
  display: grid;
  place-items: center;
}

.product-thumb {
  width: 84px;
  height: 84px;
}

.item-thumb img,
.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.placeholder-tile {
  width: 100%;
  height: 100%;
}

.item-copy h4,
.product-copy h4,
.receipt-item h4 {
  margin: 0;
  font-size: 22px;
  font-family: "Baloo 2", "Trebuchet MS", sans-serif;
  line-height: 1;
}

.item-copy p,
.product-copy p,
.receipt-item p {
  margin: 4px 0 0;
  color: var(--muted);
}

.item-total {
  text-align: right;
  font-weight: 900;
  font-size: 20px;
}

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

.product-item__footer,
.receipt-item__footer {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.product-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(216, 241, 228, 0.7);
  color: #2f6d50;
  font-size: 13px;
  font-weight: 800;
}

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

.field span {
  font-size: 14px;
  font-weight: 800;
  color: #554f48;
}

.field--grow {
  min-width: 0;
}

.field--actions {
  min-width: 168px;
}

.product-form {
  display: grid;
  gap: 16px;
}

.quick-add-card {
  margin-bottom: 18px;
  padding: 18px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 216, 127, 0.34), rgba(216, 241, 228, 0.54)),
    rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(103, 90, 74, 0.14);
}

.quick-add-card h4 {
  margin: 6px 0 8px;
  font-family: "Baloo 2", "Trebuchet MS", sans-serif;
  font-size: 28px;
  line-height: 1;
}

.quick-add-card__hint {
  margin: 0 0 14px;
  color: var(--muted);
}

.soft-input {
  width: 100%;
  appearance: none;
  border: 1px solid rgba(103, 90, 74, 0.18);
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
}

.soft-input:focus {
  outline: 3px solid rgba(121, 197, 157, 0.24);
  border-color: rgba(121, 197, 157, 0.64);
}

.soft-input--file {
  padding: 12px;
}

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

.preview-card {
  min-height: 112px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px dashed rgba(103, 90, 74, 0.18);
}

.preview-card__inner {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.preview-card__meta h4 {
  margin: 0;
  font-family: "Baloo 2", "Trebuchet MS", sans-serif;
  font-size: 24px;
}

.preview-card__meta p {
  margin: 4px 0 0;
  color: var(--muted);
}

.empty-state {
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px dashed rgba(103, 90, 74, 0.16);
  color: var(--muted);
}

.camera-dialog {
  width: min(560px, calc(100vw - 24px));
  border: 0;
  border-radius: 28px;
  padding: 0;
  background: transparent;
}

.camera-dialog::backdrop {
  background: rgba(30, 24, 16, 0.36);
  backdrop-filter: blur(6px);
}

.camera-dialog__content {
  padding: 20px;
  border-radius: 28px;
  background: rgba(255, 253, 248, 0.96);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.camera-video {
  width: 100%;
  border-radius: 24px;
  background: #101010;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.scan-pop {
  animation: scan-pop 520ms ease;
}

@keyframes scan-pop {
  0% {
    transform: scale(0.98);
    box-shadow: var(--shadow);
  }
  40% {
    transform: scale(1.015);
    box-shadow: 0 30px 70px rgba(121, 197, 157, 0.24);
  }
  100% {
    transform: scale(1);
    box-shadow: var(--shadow);
  }
}

@media (max-width: 1080px) {
  .checkout-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .hero-panel__content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .page-shell {
    padding-inline: 12px;
  }

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

  .mode-switch {
    justify-content: center;
  }

  .hero-panel,
  .card {
    padding: 18px;
    border-radius: 24px;
  }

  .hero-art {
    min-height: 240px;
  }

  .scanner-form,
  .field-group,
  .preview-card__inner,
  .cart-item,
  .product-item {
    grid-template-columns: 1fr;
  }

  .item-total {
    text-align: left;
  }
}
