:root {
  --bg: #f3efe7;
  --ink: #101715;
  --muted: #66716c;
  --surface: #fcfbf8;
  --surface-2: #f6f1e7;
  --line: rgba(16, 23, 21, 0.08);
  --green: #1c6b43;
  --green-deep: #12462c;
  --green-soft: rgba(28, 107, 67, 0.12);
  --shadow: 0 22px 60px rgba(27, 37, 33, 0.12);
  --radius-xl: 32px;
  --radius-lg: 26px;
  --radius-md: 22px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 10%, rgba(255, 255, 255, 0.95), transparent 25%),
    radial-gradient(circle at 90% 85%, rgba(161, 198, 174, 0.45), transparent 18%),
    linear-gradient(180deg, #f6f2ea 0%, #e2eadf 100%);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(100%, 430px);
  margin: 0 auto;
  padding: 18px 16px 34px;
}

.hero-card,
.payment-card,
.summary-card,
.status-card {
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.hero-card {
  position: relative;
  overflow: hidden;
  padding: 22px 22px 24px;
  margin-bottom: 16px;
  color: #f7faf7;
  background:
    radial-gradient(circle at top right, rgba(101, 180, 135, 0.32), transparent 30%),
    linear-gradient(145deg, #13221c 0%, #183428 55%, #1d6b43 120%);
}

.hero-card::after {
  content: "";
  position: absolute;
  right: -24px;
  bottom: -34px;
  width: 128px;
  height: 128px;
  border-radius: 32px;
  transform: rotate(18deg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.02));
}

.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.eyebrow,
.step,
.summary-label,
.status-tag,
.amount-label {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow {
  color: rgba(247, 250, 247, 0.76);
}

.signal-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #77d89d;
  box-shadow: 0 0 0 8px rgba(119, 216, 157, 0.14);
}

.hero-machine-select {
  margin-top: 16px;
  max-width: 280px;
}

.hero-machine-select .amount-label {
  color: rgba(247, 250, 247, 0.76);
}

.cookie-banner{position:fixed;z-index:30;right:16px;bottom:16px;max-width:480px;padding:20px;border:1px solid #d8e4da;border-radius:16px;background:#fff;box-shadow:0 16px 48px #17211b35;color:#17211b}.cookie-banner h2{margin:0 0 8px;font-size:1.1rem}.cookie-banner p{margin:8px 0}.cookie-actions{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap;margin-top:14px}.footer-link{padding:0;border:0;background:none;color:inherit;font:inherit;text-decoration:underline;cursor:pointer}
.signal-dot.out-of-service { background: #f25454; box-shadow: 0 0 0 8px rgba(242, 84, 84, 0.18); animation: out-of-service-pulse 1.1s ease-in-out infinite; }
@keyframes out-of-service-pulse { 50% { opacity: 0.35; transform: scale(0.82); } }

h1,
h2,
p {
  margin: 0;
}

h1 {
  margin-top: 20px;
  font-size: clamp(2rem, 8vw, 2.8rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.lead {
  margin-top: 12px;
  max-width: 20ch;
  color: rgba(247, 250, 247, 0.78);
  font-size: 0.98rem;
  line-height: 1.45;
}

.payment-card,
.status-card {
  padding: 22px;
  border: 1px solid var(--line);
  background: rgba(252, 251, 248, 0.82);
  backdrop-filter: blur(14px);
}

.payment-card {
  margin-bottom: 16px;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.step,
.summary-label,
.status-tag,
.amount-label {
  color: var(--muted);
}

.section-head h2 {
  font-size: 1.35rem;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.amount-panel {
  display: block;
}

.amount-input-frame {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 88px;
  margin-top: 10px;
  padding: 0 18px;
  border: 1px solid rgba(16, 23, 21, 0.08);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(245, 240, 232, 0.88));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.currency-prefix,
.currency-suffix {
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.amount-input-frame input {
  width: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.08em;
}

.helper-text {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.summary-card {
  position: sticky;
  bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(16, 23, 21, 0.08);
  background: rgba(252, 251, 248, 0.92);
  backdrop-filter: blur(18px);
}

.summary-copy {
  min-width: 0;
}

.summary-amount {
  margin-top: 4px;
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.06em;
}

.primary-action {
  min-height: 58px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #238050 0%, var(--green) 100%);
  color: #f7faf7;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  box-shadow: 0 14px 28px rgba(28, 107, 67, 0.24);
}

.primary-action:hover {
  background: linear-gradient(180deg, #248754 0%, #1a603c 100%);
}

.primary-action:disabled {
  opacity: 0.62;
  cursor: wait;
}

.status-card {
  margin-top: 16px;
}

.status-card h2 {
  margin-top: 8px;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}

.status-card p:last-child {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.45;
}

.hidden {
  display: none;
}

/* SnaxSpot payment layout */
.snaxspot-layout {
  min-height: 100svh;
  padding-top: 28px;
}

.snaxspot-hero {
  height: 76px;
  margin-bottom: 12px;
  padding: 8px 12px;
  border-radius: 22px;
}

.header-logo {
  position: absolute;
  z-index: 1;
  top: 12px;
  left: 12px;
  width: min(68vw, 270px);
  height: 52px;
  object-fit: contain;
  object-position: left center;
}

.language-switcher {
  position: absolute;
  z-index: 2;
  top: 18px;
  right: 12px;
  display: flex;
  gap: 4px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
}

.language-option { padding: 0; border: 0; background: transparent; color: #fff; font: inherit; font-size: inherit; font-weight: inherit; cursor: pointer; }
.muted-language { color: rgba(255, 255, 255, 0.55); }

.step-card {
  position: static;
  display: grid;
  min-height: clamp(270px, 44svh, 360px);
  margin: 0 0 12px;
  padding: 28px 24px;
  border: 2px solid #a7afaa;
  background: radial-gradient(circle at 50% -10%, rgba(119, 216, 157, 0.28), transparent 48%), linear-gradient(180deg, #fdfcf9, #edf5ec);
  text-align: center;
}

.step-card h1 { margin: 0; font-size: clamp(1.7rem, 7vw, 2.2rem); }
.step-card > p:not(.summary-label) { color: var(--muted); line-height: 1.45; }
.step-card .primary-action { width: min(100%, 310px); min-height: 76px; margin: 0 auto; border: 2px solid #8f9993; font-size: 1.15rem; }
.step-card .summary-label, .purchase-card .step { justify-self: center; display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 1.5px solid #8f9993; border-radius: 999px; background: var(--green-soft); color: var(--ink); }

.suggestion-card {
  margin-bottom: 12px;
  padding: 16px;
  border: 1.5px solid #a7afaa;
  border-radius: 22px;
  background: rgba(252, 251, 248, 0.9);
  box-shadow: 3px 4px 0 rgba(16, 23, 21, 0.08);
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.suggestion-card strong { color: var(--ink); }
.suggestion-card a { color: var(--green-deep); font-weight: 800; }

.purchase-card { min-height: min(520px, 66svh); margin: 0 0 12px; }
.purchase-card .step { justify-self: start; margin-bottom: 10px; }
.purchase-card h2 { font-size: clamp(1.35rem, 6vw, 1.7rem); }
.purchase-card .amount-label { margin-top: 16px; }

.vending-preview {
  position: relative;
  display: grid;
  flex: 1;
  min-height: 280px;
  margin-top: 10px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(16, 23, 21, 0.08);
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at 50% 35%, rgba(119, 216, 157, 0.13), transparent 52%), #f4f7f2;
}

.machine-gif-frame { height: 95%; max-width: 80%; overflow: hidden; border: 1.5px solid #9aa39d; border-radius: 22px; }
.machine-gif-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.product-loading, .product-result { display: grid; justify-items: center; gap: 16px; width: 100%; height: 100%; align-content: center; }
.product-result { padding: 18px; background: linear-gradient(180deg, #ffffff, #fffdf9); }
.product-result img { max-width: 78%; height: min(230px, 35svh); object-fit: contain; }
.product-result p { font-size: 1.65rem; font-weight: 800; }

.product-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.product-pay, .product-code, .product-cancel { min-width: 170px; min-height: 58px; padding: 0 22px; border-radius: 999px; font: inherit; font-weight: 800; }
.product-pay { border: 2px solid #8f9993; background: linear-gradient(180deg, #26935b, var(--green)); color: #fff; box-shadow: 4px 5px 0 rgba(16, 23, 21, 0.16); }
.product-code { border: 2px solid #f1c75b; background: #fff7d6; color: var(--green-deep); }
.product-cancel { border: 1.5px solid #b8aaa0; background: #fff7f1; color: #7a3426; }
.product-pay:disabled, .product-code:disabled, .product-cancel:disabled { opacity: 0.6; cursor: wait; }
.voucher-panel { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; width: min(100%, 520px); margin: 12px auto 0; }
.voucher-input { min-height: 52px; border: 2px solid rgba(14, 90, 53, 0.2); border-radius: 14px; padding: 0 14px; font: inherit; font-weight: 800; text-transform: uppercase; }

.panel-loading { display: grid; justify-items: center; gap: 16px; }
.loading-spinner { width: 54px; height: 54px; border: 6px solid rgba(28, 107, 67, 0.16); border-top-color: var(--green); border-radius: 50%; animation: loading-spin 850ms linear infinite; }
@keyframes loading-spin { to { transform: rotate(360deg); } }

.payment-loading-overlay { position: fixed; z-index: 1000; inset: 0; display: grid; place-content: center; justify-items: center; gap: 18px; background: rgba(243, 239, 231, 0.92); backdrop-filter: blur(14px); color: var(--green-deep); font-weight: 800; }
.hidden { display: none !important; }

.snaxspot-layout .payment-methods { margin-top: 0; }

.admin-shell {
  width: min(100%, 760px);
}

.admin-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.admin-tabs button {
  min-height: 56px;
  border: 2px solid rgba(14, 90, 53, 0.2);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--green-deep);
  font: inherit;
  font-weight: 900;
}

.admin-tabs button.active {
  border-color: var(--green-deep);
  background: var(--green-deep);
  color: #fff;
  box-shadow: 4px 5px 0 rgba(16, 23, 21, 0.16);
}

.admin-panel {
  display: contents;
}

.admin-input {
  width: 100%;
  margin-top: 10px;
  padding: 16px;
  border: 1px solid rgba(16, 23, 21, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  font-weight: 800;
}

.admin-action {
  margin-top: 18px;
}

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

.admin-actions .admin-action {
  margin-top: 0;
}
.guide-layout { display: grid; grid-template-columns: minmax(180px, 0.38fr) minmax(0, 1fr); gap: 18px; }
.guide-list { display: grid; align-content: start; gap: 8px; max-height: 560px; overflow: auto; }
.guide-list button { width: 100%; text-align: left; border: 1px solid #d8e2da; border-radius: 12px; padding: 12px; background: #fff; color: #173827; font: inherit; }
.guide-list button.active { border-color: #0e5a35; background: #e8f4ec; }
.guide-list small { display: block; color: #607165; margin-top: 3px; }
.guide-editor-wrap { min-width: 0; display: grid; gap: 10px; }
.guide-toolbar { display: flex; flex-wrap: wrap; gap: 8px; }
.guide-toolbar .secondary-action { min-height: 38px; padding: 7px 12px; }
.guide-image-button { display: inline-flex; align-items: center; cursor: pointer; }
.guide-editor { min-height: 310px; max-height: 80vh; padding: 16px; border: 1px solid #a7afaa; border-radius: 12px; background: #fff; line-height: 1.55; overflow: auto; overflow-wrap: anywhere; resize: vertical; }
.guide-editor:empty::before { content: attr(data-placeholder); color: #738077; }
.guide-editor:focus { outline: 3px solid #bdddc8; border-color: #0e5a35; }
.guide-editor img { display: block; max-width: min(100%, 720px); max-height: 480px; margin: 14px 0; border-radius: 10px; }
.guide-editor blockquote { margin: 12px 0; padding-left: 14px; border-left: 4px solid #89b59a; color: #42554a; }
.guide-reader-open { overflow: hidden; }
.guide-reader { position: fixed; z-index: 100; inset: 0; overflow: auto; background: #f5f8f4; color: #173827; }
.guide-reader-bar { position: sticky; top: 0; z-index: 1; padding: 16px max(20px, calc((100vw - 980px) / 2)); border-bottom: 1px solid #d8e2da; background: rgba(245, 248, 244, 0.94); backdrop-filter: blur(10px); }
.guide-reader-content { width: min(900px, calc(100% - 40px)); margin: 42px auto 80px; font-size: 1.12rem; line-height: 1.72; }
.guide-reader-content h1 { margin-bottom: 32px; font-size: clamp(2rem, 5vw, 3.4rem); }
.guide-reader-content h2, .guide-reader-content h3 { margin-top: 2em; }
.guide-reader-content img { display: block; max-width: 100%; max-height: 75vh; margin: 24px 0; border-radius: 12px; }
.guide-reader-content blockquote { margin: 24px 0; padding: 12px 20px; border-left: 5px solid #89b59a; background: #eaf4ed; }

.economy-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.purchase-items { display: grid; gap: 12px; }
.purchase-item { display: grid; grid-template-columns: minmax(160px, 2fr) minmax(110px, 1fr) minmax(150px, 1fr) minmax(130px, 1fr) auto; gap: 10px; align-items: end; padding: 14px; border: 1px solid rgba(16, 23, 21, 0.1); border-radius: 16px; background: rgba(255, 255, 255, 0.55); }
.purchase-item .admin-input { margin-top: 6px; padding: 12px; }
.purchase-item label { color: var(--muted); font-size: 0.8rem; font-weight: 800; }
.purchase-item-unit { display: grid; gap: 8px; min-height: 52px; align-content: center; color: var(--green-deep); }
.purchase-item-remove { min-height: 48px; padding: 0 13px; }
.purchase-item-approve { min-height: 48px; padding: 0 13px; }
.purchase-item.ai-proposed { border-color: #e6b84b; background: #fff9e4; }
.purchase-item.ai-proposed.approved { border-color: #4b9b68; background: #effaf2; }
.purchase-discounts { display: grid; gap: 10px; padding: 14px; border: 1px solid #e6b84b; border-radius: 16px; background: #fff9e4; }.purchase-discounts h3 { margin: 0; font-size: 1rem; }.purchase-discount { display: grid; grid-template-columns: 1fr minmax(180px, 1fr); gap: 10px; align-items: center; margin: -4px 14px -4px 28px; padding: 10px 12px; border-left: 3px solid #e6b84b; border-radius: 10px; background: #fff9e4; color: #76570e; font-weight: 800; }.purchase-discount select { margin-top: 0; }
.purchase-unit-price { display: grid; gap: 10px; align-content: center; min-height: 92px; }
.purchase-unit-price strong { font-size: 1.35rem; color: var(--green-deep); }
.purchase-list { display: grid; gap: 10px; margin-top: 18px; }
.purchase-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px; border: 1px solid rgba(16, 23, 21, 0.1); border-radius: 16px; background: rgba(255, 255, 255, 0.72); }
.purchase-row div { display: grid; gap: 3px; }
.purchase-row span { color: var(--muted); font-size: 0.88rem; }
.purchase-row-total { justify-items: end; text-align: right; }
.purchase-row a { color: var(--green-deep); font-weight: 800; }
.purchase-delete { min-height: 38px; padding: 0 12px; color: #842a1c; }
.economy-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 18px; }
.economy-summary .economy-total { grid-column: span 2; }
.economy-total, .economy-stat { display: grid; gap: 5px; padding: 18px; border-radius: 18px; background: rgba(255,255,255,.72); }
.economy-total { color: #fff; background: linear-gradient(145deg, #157445, #0b4d2d); }
.economy-total.negative { background: linear-gradient(145deg, #b44935, #76281e); }
.economy-total strong { font-size: 1.7rem; }.economy-stat { border: 1px solid rgba(16,23,21,.09); }.economy-stat span, .economy-stat small, .economy-total small { font-size: .8rem; }.economy-stat span { color: var(--muted); font-weight: 800; }.economy-stat strong { color: var(--green-deep); font-size: 1.15rem; }
.economy-chart-wrap { margin-top: 18px; padding: 14px; border: 1px solid rgba(16,23,21,.09); border-radius: 18px; background: rgba(255,255,255,.58); }.economy-chart-head { display:flex; justify-content:space-between; gap:10px; margin-bottom:10px; font-size:.8rem; }.economy-chart-head span { display:flex; align-items:center; gap:5px; color:var(--muted); }.economy-chart-head i { display:inline-block; width:9px; height:9px; border-radius:50%; }.economy-chart-head i.revenue { background:#15804a; }.economy-chart-head i.expenses { background:#b44935; margin-left:5px; }.economy-chart-wrap svg { display:block; width:100%; height:160px; overflow:visible; }.chart-grid { fill:none; stroke:#d9e3dc; stroke-width:.6; }.chart-line { fill:none; stroke-width:2.2; vector-effect:non-scaling-stroke; stroke-linecap:round; stroke-linejoin:round; }.chart-line.revenue { stroke:#15804a; }.chart-line.expenses { stroke:#b44935; }
.accumulated-head { margin-top: 18px; }.chart-line.accumulated { stroke: #2767b1; }.chart-purchase-peak { fill:#fff4ef; stroke:#b44935; stroke-width:1.25; vector-effect:non-scaling-stroke; }.economy-peak { margin:8px 0 0; color:#8b3427; font-size:.8rem; font-weight:800; }

.secondary-action {
  min-height: 58px;
  padding: 0 18px;
  border: 1px solid rgba(16, 23, 21, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
  font-weight: 800;
}

.secondary-action:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.splash-page {
  display: grid;
  min-height: 100vh;
  padding: 24px;
  place-items: center;
}

.splash-card {
  width: min(100%, 440px);
  padding: 42px 30px;
  overflow: hidden;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  background:
    radial-gradient(circle at 90% 0%, rgba(111, 196, 148, 0.42), transparent 34%),
    linear-gradient(145deg, #13221c 0%, #183428 60%, #1d6b43 130%);
}

.splash-logo {
  display: block;
  width: min(178px, 62%);
  height: auto;
  margin: 0 auto 42px;
}

.splash-icon {
  display: grid;
  width: 58px;
  height: 58px;
  margin: 0 auto 18px;
  place-items: center;
  border-radius: 50%;
  color: #eaf7ee;
  font-size: 1.65rem;
  background: rgba(255, 255, 255, 0.13);
}

.splash-label {
  color: #a8dfb9;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.splash-card h1 {
  margin-top: 13px;
  color: #fff;
  font-size: clamp(2rem, 9vw, 2.7rem);
  line-height: 1.04;
  letter-spacing: -0.055em;
}

.splash-message {
  max-width: 27ch;
  margin: 18px auto 0;
  color: rgba(247, 250, 247, 0.84);
  font-size: 1rem;
  line-height: 1.55;
}
.admin-page-link { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 18px; border: 2px solid #0e5a35; border-radius: 999px; background: #0e5a35; color: #fff !important; font-weight: 900; text-decoration: none; box-shadow: 0 5px 14px rgba(14, 90, 53, 0.22); }
.admin-page-link:hover { background: #083d24; border-color: #083d24; color: #fff !important; }
.feedback-button { display: flex; width: min(100%, 260px); margin: 14px auto 0; min-height: 52px; align-items: center; justify-content: center; padding: 0 24px; border-radius: 999px; background: var(--green); color: #fff !important; font-weight: 900; text-align: center; text-decoration: none; box-shadow: 4px 5px 0 rgba(16, 23, 21, 0.16); }
.feedback-button:hover { background: var(--green-deep); color: #fff !important; }
.feedback-shell { width: min(100%, 620px); }
.feedback-form { display: grid; gap: 18px; }
.feedback-textarea { min-height: 150px; resize: vertical; font: inherit; font-weight: 500; }
.feedback-back { background: rgba(255, 255, 255, 0.76); border-color: rgba(16, 23, 21, 0.12); color: var(--ink) !important; box-shadow: none; }
.feedback-back:hover { background: #fff; border-color: rgba(16, 23, 21, 0.2); color: var(--ink) !important; }
.statistics-shell { width: min(100%, 980px); }
.statistics-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-top: 18px; }
.statistics-filters label { flex: 1 1 150px; color: var(--muted); font-weight: 800; }
.statistics-filters .admin-input { min-height: 50px; margin-top: 6px; padding: 10px 14px; }

.receipt-actions { margin: 16px 0; }
.receipt-list { display: grid; gap: 10px; }
.receipt-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px; border: 1px solid rgba(16, 23, 21, 0.1); border-radius: 16px; background: rgba(255, 255, 255, 0.7); }
.receipt-row span { display: block; margin-top: 4px; color: var(--muted); font-size: 0.9rem; }
.receipt-row-total { display: grid; justify-items: end; gap: 5px; white-space: nowrap; }
.receipt-row a { color: var(--green-deep); font-weight: 800; }
.voucher-list { display: grid; gap: 10px; margin-top: 14px; }
.voucher-toolbar { display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr); gap: 10px; margin: 14px 0 10px; }
.voucher-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px; border: 1px solid rgba(16, 23, 21, 0.1); border-radius: 16px; background: rgba(255, 255, 255, 0.7); }
.voucher-row div { display: grid; gap: 4px; }
.voucher-row strong { font-size: 1.35rem; letter-spacing: 0; color: var(--green-deep); }
.voucher-row span, .voucher-row small { color: var(--muted); }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.settings-full { grid-column: 1 / -1; }
.settings-toggle { display: flex; min-height: 70px; align-items: center; justify-content: space-between; gap: 12px; }
.settings-toggle input { width: 22px; height: 22px; accent-color: var(--green); }
.mdb-event-list { height: 250px; min-height: 160px; margin-top: 14px; padding: 12px; overflow: auto; resize: vertical; border: 1px solid #26382d; border-radius: 12px; background: #0c1510; color: #d8eadc; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.8rem; line-height: 1.45; }
.mdb-event-row { display: grid; grid-template-columns: minmax(150px, 0.7fr) minmax(0, 1.3fr); align-items: start; gap: 12px; padding: 8px 2px; border-bottom: 1px solid rgba(216, 234, 220, 0.12); background: transparent; }
.mdb-event-row:last-child { border-bottom: 0; }
.mdb-event-row div { display: grid; gap: 2px; min-width: 0; }
.mdb-event-row strong { color: #8ee6aa; }
.mdb-event-row span, .mdb-event-row small { color: #9db5a4; overflow-wrap: anywhere; }
.mdb-event-row code { display: block; max-width: 100%; padding: 0; color: #e1ece3; font: inherit; overflow-wrap: anywhere; }
.session-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin: 14px 0 10px; }
.session-filters label { display: grid; gap: 5px; flex: 1 1 205px; color: var(--muted); font-size: 0.85rem; font-weight: 800; }
.session-filters .admin-input { min-height: 42px; padding: 8px 10px; }
.session-rename-button { min-height: 34px; padding: 6px 10px; font-size: 0.8rem; white-space: nowrap; }
.muted-copy { color: var(--muted); }
.statistics-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.statistics-grid-wide { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.statistic-card { display: grid; gap: 6px; padding: 16px; border: 1px solid rgba(16, 23, 21, 0.1); border-radius: 16px; background: rgba(255, 255, 255, 0.7); }
.statistic-card span, .statistic-card small { color: var(--muted); }
.statistic-card strong { font-size: 1.1rem; }
.top-products { margin-top: 18px; }
.top-products h3 { margin: 0 0 10px; font-size: 1rem; }
.top-products ol { display: grid; gap: 8px; margin: 0; padding-left: 22px; }
.top-products li { display: flex; justify-content: space-between; gap: 12px; color: var(--ink); }
.top-products li strong { white-space: nowrap; }
.statistics-table-wrap { overflow-x: auto; }
.statistics-table { width: 100%; border-collapse: collapse; text-align: left; }
.statistics-table th, .statistics-table td { padding: 12px 10px; border-bottom: 1px solid rgba(16, 23, 21, 0.1); }
.statistics-table th { color: var(--muted); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; }
.table-sort { border:0; padding:0; background:transparent; color:inherit; font:inherit; font-weight:800; text-transform:inherit; letter-spacing:inherit; cursor:pointer; }.table-sort.active { color:var(--green-deep); }
.statistics-table td:not(:first-child), .statistics-table th:not(:first-child) { text-align: right; white-space: nowrap; }
.table-empty { color: var(--muted); text-align: center !important; }
.bar-chart { height: 210px; display: flex; align-items: end; gap: 3px; padding-top: 16px; overflow-x: auto; }
.bar-chart-item { flex: 1 0 18px; min-width: 18px; height: 100%; display: grid; grid-template-rows: 1fr 20px; align-items: end; gap: 6px; }
.bar-chart-bar { display: block; min-height: 1px; border-radius: 6px 6px 2px 2px; background: var(--green); }
.bar-chart-item small { overflow: hidden; color: var(--muted); font-size: 0.65rem; text-align: center; white-space: nowrap; }
.hour-chart .bar-chart-item { flex-basis: 24px; }
@media (max-width: 760px) { .statistics-grid-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .admin-tabs, .economy-form, .economy-summary, .guide-layout { grid-template-columns: 1fr; } .economy-summary .economy-total { grid-column: auto; } .statistics-grid, .statistics-grid-wide { grid-template-columns: 1fr; } .top-products li { align-items: flex-start; flex-direction: column; gap: 2px; } .purchase-row { align-items: flex-start; flex-direction: column; } .purchase-row-total { justify-items: start; text-align: left; } }
@media (max-width: 760px) { .purchase-item { grid-template-columns: 1fr 1fr; } .purchase-item-remove { width: 100%; } }
@media (max-width: 560px) { .purchase-discount { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .mdb-event-row { grid-template-columns: 1fr; } }

.shelf-tabs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.shelf-tabs button {
  min-height: 46px;
  border: 1px solid rgba(16, 23, 21, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
  font-weight: 800;
}

.shelf-tabs button.active {
  background: var(--green);
  color: #f7faf7;
}

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

.shelf-slot {
  display: grid;
  gap: 5px;
  min-height: 170px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(16, 23, 21, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  text-align: left;
}

.shelf-slot strong {
  font-size: 0.85rem;
  color: var(--muted);
}

.shelf-slot span {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0;
}

.shelf-slot img,
.slot-image-empty {
  width: 100%;
  height: 76px;
  border: 1px solid rgba(16, 23, 21, 0.08);
  border-radius: 8px;
  background: rgba(16, 23, 21, 0.04);
  object-fit: cover;
}

.image-library {
  display: grid;
  gap: 10px;
  margin: 4px 0 14px;
}

.image-library-dialog {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(16, 23, 21, 0.54);
  backdrop-filter: blur(4px);
}

.image-library-modal {
  width: min(760px, 100%);
  max-height: min(800px, calc(100vh - 40px));
  overflow: auto;
  padding: clamp(18px, 4vw, 30px);
  border-radius: 22px;
  background: #f8fbf8;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
}

.image-library-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.image-library-head {
  display: grid;
  gap: 3px;
}

.image-library-head small {
  color: var(--muted);
}

.image-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 9px;
}

.image-library-item {
  display: grid;
  gap: 4px;
  padding: 7px;
  border: 1px solid rgba(16, 23, 21, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.image-library-item.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 22%, transparent);
}

.image-library-item img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 6px;
  object-fit: cover;
}

.image-library-item span,
.image-library-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-library-item span { font-weight: 700; }
.image-library-item small { color: var(--muted); }

.feedback-image-tools { display: flex; flex-wrap: wrap; gap: 10px; }
.feedback-image-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.feedback-image-preview article { display: grid; gap: 6px; padding: 8px; border: 1px solid rgba(16, 23, 21, 0.12); border-radius: 12px; }
.feedback-image-preview img { width: 100%; aspect-ratio: 1; border-radius: 8px; object-fit: cover; }
.feedback-image-preview span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.8rem; }

.media-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.media-library-item {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(16, 23, 21, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
}

.media-library-item img {
  width: 74px;
  height: 74px;
  border-radius: 8px;
  object-fit: cover;
}

.media-library-item div { min-width: 0; }
.media-library-item strong,
.media-library-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-library-item small { margin-top: 4px; color: var(--muted); }
.media-library-item button { grid-column: 1 / -1; }

.shelf-slot small {
  min-height: 1em;
  color: var(--muted);
  overflow-wrap: anywhere;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.payment-methods {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 16px 4px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.card-logos {
  display: flex;
  align-items: center;
  gap: 8px;
}

.visa-logo,
.mastercard-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(16, 23, 21, 0.16);
}

.visa-logo {
  min-width: 48px;
  padding: 0 6px;
  color: #1434cb;
  font-size: 0.84rem;
  font-weight: 800;
  font-style: italic;
  letter-spacing: -0.08em;
}

.mastercard-logo {
  position: relative;
  min-width: 70px;
  padding: 0 5px;
  overflow: hidden;
}

.mastercard-logo i,
.mastercard-logo b {
  position: absolute;
  top: 7px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
}

.mastercard-logo i { left: 9px; background: #eb001b; }
.mastercard-logo b { left: 19px; background: #f79e1b; mix-blend-mode: multiply; }
.mastercard-logo em { margin-left: 25px; color: #252525; font-size: 0.55rem; font-style: normal; font-weight: 800; letter-spacing: -0.06em; }

.site-footer {
  margin-top: 22px;
  padding: 18px 8px 4px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.6;
}

.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 12px; }
.site-footer a, .legal-page a { color: var(--green-deep); font-weight: 800; }
.site-footer strong { color: var(--ink); }

.legal-page {
  width: min(100%, 720px);
  margin: 0 auto;
  padding: 24px 18px 42px;
}

.legal-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(252, 251, 248, 0.9);
  box-shadow: var(--shadow);
}

.legal-card h1 { margin-top: 0; font-size: clamp(2rem, 8vw, 2.7rem); color: var(--ink); }
.legal-card h2 { margin-top: 28px; font-size: 1.1rem; scroll-margin-top: 18px; }
.legal-card p { margin-top: 10px; color: var(--muted); line-height: 1.6; }

.shelf-slot.selected {
  outline: 3px solid rgba(28, 107, 67, 0.28);
}

.shelf-slot.low-stock span {
  color: #c9272e;
}

.overview-grid {
  display: grid;
  gap: 12px;
}

.overview-shelf {
  display: grid;
  gap: 8px;
}

.overview-shelf h3 {
  margin: 0;
  font-size: 0.95rem;
}

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

.overview-slot {
  display: grid;
  gap: 5px;
  min-height: 54px;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(16, 23, 21, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
  text-align: left;
  cursor: pointer;
}

.overview-slot.selected {
  outline: 3px solid rgba(28, 107, 67, 0.35);
}

.overview-slot strong {
  color: var(--muted);
  font-size: 0.75rem;
}

.overview-slot span {
  color: var(--ink);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0;
}

.overview-slot img,
.overview-slot .slot-image-empty {
  width: 100%;
  height: 56px;
  border: 1px solid rgba(16, 23, 21, 0.08);
  border-radius: 8px;
  background: rgba(16, 23, 21, 0.04);
  object-fit: cover;
}

.overview-slot small {
  min-height: 2.4em;
  overflow: hidden;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.overview-slot.low-stock span {
  color: #c9272e;
}

.inventory-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.inventory-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  width: 100%;
  padding: 14px;
  border: 1px solid rgba(16, 23, 21, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  text-align: left;
}

.inventory-row small {
  grid-column: 1 / -1;
  color: var(--muted);
}

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

  .voucher-toolbar, .voucher-row {
    grid-template-columns: 1fr;
  }

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

  .settings-full {
    grid-column: auto;
  }

  .voucher-row .secondary-action {
    width: 100%;
  }

  .shelf-tabs {
    grid-template-columns: repeat(3, 1fr);
  }

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

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

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

  .primary-action {
    width: 100%;
  }
}
