:root {
  --bg: #000000;
  --card: rgba(10, 10, 10, 0.65);
  --card-hover: rgba(20, 20, 20, 0.75);
  --panel: rgba(10, 10, 10, 0.78);
  --ink: #fafafa;
  --muted: #d4d4d4;
  --subtle: #a3a3a3;
  --line: rgba(255, 255, 255, 0.14);
  --accent: #ff2442;
  --accent-hover: #D7193A;
  --accent-ink: #ffffff;
  --accent-soft: rgba(255, 36, 66, 0.14);
  --accent-border: #ff2442;
  --accent-glow: rgba(255, 36, 66, 0.35);
  --danger: #ef4444;
  --emerald-soft: rgba(16, 185, 129, 0.15);
  --emerald-ink: #34d399;
  color-scheme: dark;
}

html.light {
  --bg: #f8fafc;
  --card: #ffffff;
  --card-hover: #f8fafc;
  --panel: rgba(255, 255, 255, 0.88);
  --ink: #0f172a;
  --muted: #64748b;
  --subtle: #94a3b8;
  --line: rgba(0, 0, 0, 0.08);
  --accent: #D7193A;
  --accent-hover: #B01430;
  --accent-ink: #ffffff;
  --accent-soft: rgba(215, 25, 58, 0.1);
  --accent-border: rgba(215, 25, 58, 0.3);
  --accent-glow: rgba(215, 25, 58, 0.2);
  --danger: #dc2626;
  --emerald-soft: rgba(16, 185, 129, 0.12);
  --emerald-ink: #059669;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { overflow-y: scroll; }

::selection {
  background: var(--accent);
  color: #fff;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  color: var(--ink);
  font: 16px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.005em;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body.has-bar main,
body:has(#bar:not([hidden])) main {
  padding-bottom: 100px;
}

.hex-clip {
  clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0% 50%);
}

.glass-panel {
  background: var(--panel);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-color: var(--line);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

html.light .glass-panel {
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
}

.glass-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  transition: border-color 0.2s ease, transform 0.2s ease, background-color 0.3s ease, box-shadow 0.2s ease;
}

html.light .glass-card {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.glass-card:hover {
  border-color: rgba(215, 25, 58, 0.6);
}

.bg-wrap {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -10;
  overflow: hidden;
  background-color: #000000;
}

.bg-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 1s ease-in-out;
}

.bg-slide.active {
  opacity: 0.75;
}

.bg-vignette {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.75));
  transition: background 0.5s ease;
}

.bg-radial {
  display: none;
}

.top {
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100%;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.top-inner {
  max-width: 768px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  width: 40px;
  height: 40px;
  overflow: hidden;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.brand:hover .brand-logo {
  transform: scale(1.05) rotate(3deg);
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.2;
  transition: color 0.2s ease;
}

.brand:hover .brand-title {
  color: var(--accent);
}

.brand-sub {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
}

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

.theme-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  color: #fbbf24;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
  flex-shrink: 0;
}

html.light .theme-btn {
  color: #334155;
}

.theme-btn:hover {
  transform: scale(1.05);
  border-color: var(--accent-border);
}

.theme-btn svg {
  width: 18px;
  height: 18px;
}

.icon-moon { display: none; }
html.light .icon-sun { display: none; }
html.light .icon-moon { display: block; }

main {
  flex: 1;
  width: 100%;
  max-width: 768px;
  margin: 0 auto;
  padding: 20px 16px 32px;
}

.hero {
  text-align: center;
  margin: 4px auto 24px;
  max-width: 600px;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid #ff2442;
  color: #ff2442;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 0 14px rgba(255, 36, 66, 0.25);
  margin-bottom: 12px;
}

html.light .hero-chip {
  background: rgba(255, 255, 255, 0.75);
  border-color: #ff2442;
  color: #D7193A;
}

.hero-chip .sep,
.hero-chip .sub {
  color: #ffffff;
  font-weight: 600;
}

html.light .hero-chip .sep,
html.light .hero-chip .sub {
  color: #0f172a;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.9); }
}

.hero h2 {
  margin: 0 0 8px;
  font-size: clamp(1.65rem, 4.5vw, 2.25rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #fafafa;
}

.text-crimson {
  color: var(--accent);
}

.hero p {
  margin: 0;
  color: #e5e5e5;
  font-size: 0.95rem;
}

h2 { font-size: 1.25rem; font-weight: 800; margin: 0 0 12px; }

h2.cat {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fafafa;
  margin: 26px 0 10px;
}

h2.cat::before {
  content: "";
  width: 4px;
  height: 16px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}

.banner {
  width: 100%;
  margin: 0 0 16px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  font-weight: 600;
  text-align: center;
}

html.light .banner {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.empty {
  color: var(--muted);
  text-align: center;
  padding: 32px 16px;
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: 16px;
}

.muted { color: var(--muted); margin: 4px 0; }
.small { font-size: 0.85rem; }

.panel-card {
  background: var(--card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--accent-border);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.35);
}

html.light .panel-card {
  box-shadow: 0 8px 24px -6px rgba(15, 23, 42, 0.06);
}

.item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 14px;
  align-items: center;
  background: var(--card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 10px;
  transition: border-color 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.item:hover {
  border-color: var(--accent-border);
  transform: translateY(-1px);
}

.item.off { opacity: 0.5; }
.item.off:hover { border-color: var(--line); transform: none; }

.info { display: flex; flex-direction: column; gap: 2px; }
.info strong { font-size: 1rem; font-weight: 700; }
.price { color: var(--accent); font-weight: 700; font-size: 0.92rem; }
html.light .price { color: var(--accent); }

.badge {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 600;
}

.qty { display: flex; align-items: center; gap: 10px; }
.qty button {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.qty button:hover:not(:disabled) {
  border-color: var(--accent);
  transform: scale(1.04);
}

.qty button:last-child {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 0 14px var(--accent-glow);
}

.qty button:last-child:hover:not(:disabled) {
  background: var(--accent-hover);
}

.qty button:disabled { opacity: 0.3; cursor: default; box-shadow: none; }
.qty output { min-width: 1.6ch; text-align: center; font-weight: 800; font-size: 1rem; }
.note { grid-column: 1 / -1; }

input, select { font: inherit; color: inherit; }
input:not([type="checkbox"]):not([type="radio"]) {
  width: 100%;
  min-height: 44px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:not([type="checkbox"]):not([type="radio"]):focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.field { display: block; margin: 16px 0; border: 0; padding: 0; font-weight: 600; }
.field input:not([type="radio"]) { margin-top: 6px; font-weight: 400; }
fieldset.field legend { padding: 0; margin-bottom: 8px; font-weight: 700; }

.radio {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 46px;
  padding: 8px 12px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.radio:hover {
  border-color: var(--accent-border);
}

.radio input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  margin: 10px 0;
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover:not(:disabled) {
  border-color: var(--accent-border);
  transform: translateY(-1px);
}

.btn.primary {
  background: var(--accent);
  border-color: #ff4d6a;
  color: var(--accent-ink);
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn.primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn.ghost {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: #ff4d6a;
}

html.light .btn.ghost {
  color: var(--accent);
}

.btn.link {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}

.btn.link:hover:not(:disabled) {
  color: var(--ink);
  border-color: transparent;
  transform: none;
}

.btn.danger {
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.25);
}

.btn.danger:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--danger);
}

.btn:disabled { opacity: 0.5; cursor: default; transform: none; }

.lines { list-style: none; margin: 0; padding: 0; }
.lines li {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.lines small { display: block; color: var(--muted); margin-top: 2px; }

.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.15rem;
  padding: 14px 0 6px;
  margin: 8px 0 16px;
}

.total-row b {
  color: var(--accent);
  font-size: 1.3rem;
}

.total-big {
  font-size: 2.2rem;
  font-weight: 900;
  margin: 4px 0 12px;
  color: var(--accent);
}

.qris {
  display: block;
  width: min(100%, 300px);
  margin: 16px auto;
  padding: 12px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  cursor: zoom-in;
}

.qris-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.qris-modal-img {
  display: block;
  max-width: min(92vw, 420px);
  max-height: 82vh;
  width: auto;
  height: auto;
  padding: 14px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.qris-close {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: #ff2442;
  color: #ffffff;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(255, 36, 66, 0.45);
  transition: transform 0.15s ease, background-color 0.2s ease;
}

.qris-close:hover {
  background: #D7193A;
  transform: scale(1.06);
}

.steps { padding-left: 1.25rem; color: var(--muted); }
.steps li { margin: 8px 0; }
.steps b, .steps em { color: var(--ink); }

.orderno {
  font-size: 2.5rem;
  font-weight: 900;
  margin: 12px 0;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.bar {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(68px + env(safe-area-inset-bottom));
  max-width: 736px;
  margin: 0 auto;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--panel);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--accent-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 0 20px rgba(215, 25, 58, 0.2);
}

.bar span { font-weight: 800; font-size: 0.98rem; }
.bar .btn { width: auto; min-height: 42px; margin: 0; padding: 8px 18px; }

#ts {
  position: fixed;
  left: 50%;
  bottom: 90px;
  transform: translateX(-50%);
  z-index: 35;
}

.toast {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 96px;
  z-index: 50;
  max-width: 440px;
  margin: 0 auto;
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--accent-border);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  text-align: center;
  font-weight: 700;
}

.site-footer {
  width: 100%;
  border-top: 1px solid var(--line);
  margin-top: auto;
  padding: 10px 16px;
  text-align: center;
}

.footer-inner {
  max-width: 768px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
}

.footer-brand img {
  width: 20px;
  height: 20px;
  object-fit: cover;
}

.footer-brand strong {
  font-weight: 800;
  letter-spacing: 0.02em;
}

.footer-copy {
  margin: 0;
  font-size: 0.7rem;
  color: var(--subtle);
}

.admin-rows .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 12px;
  transition: border-color 0.2s ease;
}

.admin-rows .row:hover {
  border-color: var(--accent-border);
}

.admin-rows .row > :first-child,
.admin-rows .row > .chk,
.admin-rows .row > button {
  grid-column: 1 / -1;
}

.admin-rows .row > .chk {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  font-weight: 600;
}

.admin-rows .row > .chk input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.admin-rows .btn { margin: 0; }

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  flex-wrap: wrap;
}

.toolbar label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  cursor: pointer;
}

.toolbar input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}

.savebar {
  position: sticky;
  bottom: 0;
  z-index: 25;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  margin-top: 16px;
  border-radius: 16px;
  background: var(--panel);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line);
}
