:root {
  color-scheme: dark;
  --bg: #050505;
  --panel: #08121b;
  --line: rgba(255,255,255,.1);
  --acid: #c8f400;
  --mint: #00f5d4;
  --cyan: #00c2ff;
  --blue: #087cff;
  --hot: #ff3b63;
  --gold: #ffae00;
  --text: #f5f7ee;
  --muted: #9fb0c6;
  --danger: #ff4d6d;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
    radial-gradient(circle at 18% 4%, rgba(0,194,255,.26), transparent 26%),
    radial-gradient(circle at 90% 16%, rgba(255,59,99,.16), transparent 24%),
    radial-gradient(circle at 42% 0%, rgba(200,244,0,.15), transparent 24%),
    #050505;
  background-size: 56px 56px, 56px 56px, auto, auto, auto, auto;
}

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

button {
  border: 0;
  cursor: pointer;
}

.app-shell {
  width: min(100%, 620px);
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 14px 112px;
}

.hero {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(2,10,21,.86), rgba(4,28,46,.58)),
    radial-gradient(circle at 18% 8%, rgba(0,194,255,.45), transparent 34%),
    linear-gradient(135deg, rgba(200,244,0,.92), rgba(0,245,212,.82) 50%, rgba(0,92,255,.82));
  color: var(--text);
  box-shadow: 0 20px 90px rgba(0,119,255,.28), inset 0 0 0 1px rgba(200,244,0,.14);
}

.topbar, .product-head, .admin-head, .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.top-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.logo {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(0,194,255,.82);
  box-shadow: 0 0 28px rgba(0,194,255,.7);
}

.lang {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 3px;
  border-radius: 999px;
  background: rgba(0,0,0,.82);
}

.lang-btn {
  min-width: 48px;
  padding: 10px 12px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.lang-btn.active {
  background: var(--acid);
  color: #050505;
}

.hero-help {
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid rgba(200,244,0,.38);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(0,0,0,.72), rgba(3,12,16,.72)),
    radial-gradient(circle at 0% 0%, rgba(0,245,212,.18), transparent 42%);
  color: var(--text);
  font-weight: 950;
  box-shadow: inset 0 0 0 1px rgba(0,194,255,.08);
}

.hero-help.active {
  color: #050505;
  background: linear-gradient(90deg, var(--acid), var(--mint));
  border-color: rgba(200,244,0,.74);
}

.kicker {
  margin: 0 0 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0;
  text-transform: uppercase;
  font-weight: 800;
}

h1, h2, h3, p { margin-top: 0; }
h1 {
  margin-bottom: 10px;
  font-size: clamp(42px, 14vw, 74px);
  line-height: .86;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-text {
  max-width: 420px;
  margin-bottom: 0;
  color: rgba(245,247,238,.78);
  font-weight: 800;
}

.search-panel {
  position: sticky;
  top: max(8px, env(safe-area-inset-top));
  z-index: 4;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  margin: 14px 0 0;
  padding: 8px 10px;
  border: 1px solid rgba(0,194,255,.22);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(8,18,27,.92), rgba(5,7,10,.92)),
    radial-gradient(circle at 0% 0%, rgba(0,194,255,.2), transparent 42%);
  box-shadow: 0 12px 30px rgba(0,0,0,.24);
  backdrop-filter: blur(10px);
}

.search-icon {
  color: var(--acid);
  font-size: 24px;
  line-height: 1;
}

.search-panel input {
  min-height: 40px;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--text);
  font-weight: 800;
}

.search-panel input::placeholder {
  color: rgba(159,176,198,.72);
}

#clearSearch {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,.09);
  color: var(--text);
  font-size: 22px;
}

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 18px 0 12px;
  scrollbar-width: none;
}

.chip {
  flex: 0 0 auto;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: var(--text);
  border: 1px solid var(--line);
  font-weight: 800;
}

.chip.active {
  color: #050505;
  background: linear-gradient(90deg, var(--acid), var(--mint));
  border-color: rgba(200,244,0,.72);
}

.danger-chip {
  color: white;
  background: rgba(255,77,109,.16);
  border-color: rgba(255,77,109,.42);
}

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

.faq-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
}

.faq-head {
  padding: 14px;
  border: 1px solid rgba(0,194,255,.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(8,18,27,.94), rgba(9,10,13,.94)),
    radial-gradient(circle at 100% 0%, rgba(200,244,0,.16), transparent 36%);
}

.faq-head h2 {
  margin-bottom: 8px;
  font-size: 32px;
  line-height: 1;
}

.faq-head p:last-child {
  margin-bottom: 0;
}

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

.faq-item {
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(8,18,27,.92), rgba(5,7,10,.94)),
    radial-gradient(circle at 0% 0%, rgba(0,194,255,.13), transparent 40%);
  overflow: hidden;
}

.faq-item summary {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  color: var(--text);
  font-weight: 950;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(200,244,0,.12);
  color: var(--acid);
  font-size: 22px;
  line-height: 1;
}

.faq-item[open] {
  border-color: rgba(0,245,212,.35);
  box-shadow: 0 0 28px rgba(0,194,255,.08);
}

.faq-item[open] summary::after {
  content: "-";
  color: #050505;
  background: linear-gradient(90deg, var(--acid), var(--mint));
}

.faq-item p {
  margin: 0;
  padding: 0 14px 14px;
  color: var(--muted);
  line-height: 1.5;
}

.product {
  min-width: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(8,18,27,.94), rgba(9,10,13,.94)),
    radial-gradient(circle at 50% 0%, rgba(0,194,255,.24), transparent 42%);
  box-shadow: inset 0 0 0 1px rgba(0,194,255,.05);
  overflow: hidden;
}

.product img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  display: block;
  border-radius: 7px 7px 0 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(255,255,255,.12), transparent 36%),
    linear-gradient(135deg, rgba(0,124,255,.2), rgba(0,194,255,.12), rgba(200,244,0,.08));
}

.product h3 {
  min-height: 42px;
  margin: 12px 10px 8px;
  font-size: 15px;
  line-height: 1.18;
  letter-spacing: 0;
}

.product > p,
.product-head {
  margin-left: 10px;
  margin-right: 10px;
}

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

.price {
  color: var(--acid);
  font-weight: 950;
  text-shadow: 0 0 18px rgba(200,244,0,.38);
}

.small {
  font-size: 12px;
  line-height: 1.3;
}

.product button, .primary, .ghost, .danger {
  width: 100%;
  min-height: 46px;
  border-radius: 8px;
  font-weight: 950;
}

button:disabled {
  cursor: not-allowed;
  filter: grayscale(.45);
  opacity: .52;
}

.product button {
  width: calc(100% - 20px);
  margin: 0 10px 10px;
}

.product button, .primary {
  background: linear-gradient(90deg, var(--acid), var(--mint));
  color: #050505;
}

.ghost {
  margin-top: 8px;
  color: var(--text);
  background: rgba(255,255,255,.08);
  border: 1px solid var(--line);
}

.danger {
  color: white;
  background: var(--danger);
}

.cart-bar {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 10;
  max-width: 592px;
  margin: 0 auto;
  min-height: 56px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--acid), var(--mint), var(--cyan));
  color: #050505;
  font-weight: 950;
  box-shadow: 0 18px 52px rgba(0,245,212,.22);
}

.sheet {
  width: min(100% - 20px, 560px);
  max-height: min(88vh, 760px);
  margin: auto auto 10px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px 12px 8px 8px;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(8,18,27,.98), rgba(5,5,5,.98)),
    radial-gradient(circle at 50% 0%, rgba(0,194,255,.2), transparent 38%);
}

.sheet::backdrop {
  background: rgba(0,0,0,.72);
}

.sheet-inner {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 16px;
}

.icon-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(0,0,0,.72);
  color: white;
  font-size: 24px;
  z-index: 2;
}

.modal-image {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(200,244,0,.13), rgba(0,194,255,.12));
}

.flavor-block {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(0,194,255,.18);
  border-radius: 8px;
  background:
    radial-gradient(circle at 20% 0%, rgba(0,194,255,.18), transparent 42%),
    rgba(255,255,255,.045);
}

.flavor-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.flavor-title strong {
  max-width: 58%;
  color: var(--acid);
  font-size: 12px;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flavor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 270px;
  overflow-y: auto;
  padding-right: 2px;
}

.flavor-option {
  min-height: 74px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(7,26,40,.9), rgba(5,7,10,.94)),
    radial-gradient(circle at 0% 0%, rgba(0,194,255,.18), transparent 40%);
  color: var(--text);
  text-align: left;
  box-shadow: inset 0 0 0 1px rgba(0,194,255,.04);
}

.flavor-option span {
  display: block;
  font-size: 12px;
  line-height: 1.22;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.flavor-option small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
}

.flavor-option.active {
  color: #050505;
  border-color: rgba(200,244,0,.75);
  background: linear-gradient(135deg, var(--acid), var(--mint));
  box-shadow: 0 0 28px rgba(0,245,212,.22);
}

.flavor-option.active small {
  color: rgba(5,5,5,.66);
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #121514;
  color: var(--text);
  padding: 12px;
  outline: none;
}

.cart-items {
  display: grid;
  gap: 8px;
}

.cart-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255,255,255,.06);
}

.result {
  padding: 14px;
  border-radius: 8px;
  background: rgba(200,244,0,.12);
  color: var(--acid);
  font-weight: 950;
}

.link-button {
  display: grid;
  place-items: center;
  text-decoration: none;
}

.admin-shell {
  width: min(100% - 24px, 1120px);
  margin: 0 auto;
  padding: 24px 0 80px;
}

.admin-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 14px;
}

.admin-workspace {
  display: grid;
  gap: 14px;
}

.admin-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.admin-tab {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: var(--text);
  font-weight: 950;
}

.admin-tab.active {
  color: #050505;
  background: linear-gradient(90deg, var(--acid), var(--mint));
  border-color: rgba(200,244,0,.72);
}

.panel {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8,18,27,.92);
}

.list {
  display: grid;
  gap: 10px;
}

.orders-head {
  display: grid;
  grid-template-columns: 1fr minmax(240px, 360px);
  align-items: end;
  gap: 12px;
  margin-bottom: 12px;
}

.orders-head h2,
.orders-head p {
  margin-bottom: 6px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.stat-card {
  padding: 12px;
  border: 1px solid rgba(0,194,255,.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(8,18,27,.94), rgba(9,10,13,.94)),
    radial-gradient(circle at 100% 0%, rgba(200,244,0,.12), transparent 36%);
}

.stat-card span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.stat-card strong {
  font-size: 24px;
  line-height: 1;
}

.orders-list {
  display: grid;
  gap: 10px;
}

.order-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(8,18,27,.94), rgba(5,7,10,.96)),
    radial-gradient(circle at 0% 0%, rgba(0,194,255,.13), transparent 40%);
}

.order-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.order-title div {
  display: grid;
  gap: 4px;
}

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

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

.order-meta span {
  padding: 8px;
  border-radius: 8px;
  background: rgba(255,255,255,.055);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.order-meta strong {
  color: var(--text);
}

.order-comment {
  margin: 0;
  padding: 10px;
  border-left: 3px solid var(--acid);
  border-radius: 6px;
  background: rgba(200,244,0,.08);
  color: var(--text);
}

.order-items {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.order-items li {
  display: grid;
  gap: 4px;
  padding: 9px;
  border-radius: 8px;
  background: rgba(255,255,255,.045);
}

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

.order-actions {
  display: flex;
  justify-content: flex-end;
}

.order-actions button {
  width: min(100%, 220px);
}

.empty-state {
  padding: 16px;
  border: 1px dashed rgba(255,255,255,.14);
  border-radius: 8px;
}

.admin-product {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-product img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 6px;
  background: rgba(255,255,255,.04);
}

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

.checks label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checks input {
  width: auto;
}

@media (max-width: 760px) {
  .admin-grid { grid-template-columns: 1fr; }
  .orders-head { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .order-meta { grid-template-columns: 1fr; }
}
