:root {
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --cream: #f1f5f9;
  --paper: #ffffff;
  --orange: #9f1239;
  --orange-deep: #9f1239;
  --amber: #fff7ed;
  --leaf: #047857;
  --soft: #ffe4e6;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  --serif: Manrope, "Segoe UI", sans-serif;
  --sans: Manrope, "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  min-height: 100vh;
}
body.has-bar { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 3px solid #fda4af; outline-offset: 2px; }
.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}

.top {
  position: sticky; top: 0; z-index: 30;
  background: #0f172a;
  color: #f8fafc;
}
.top-inner {
  max-width: 1180px;
  margin: 0 auto;
  min-height: 60px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: inherit; min-width: 0; flex: 1;
}
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text strong {
  font-size: 16px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-text em:empty, .tagline:empty { display: none; }
.brand-text em, .tagline {
  font-style: normal;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tagline { display: block; padding: 0; max-width: none; letter-spacing: 0; }
.icon-btn {
  position: relative;
  width: 44px; height: 44px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 12px;
  background: transparent;
  color: white;
  display: grid; place-items: center;
  flex: none;
}
.badge {
  position: absolute; top: -6px; right: -6px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 99px;
  background: #9f1239;
  color: white;
  font-size: 11px;
  font-weight: 800;
  display: grid; place-items: center;
}
.icon-btn.bump { animation: bump .28s ease; }
@keyframes bump { 40% { transform: scale(1.12); } }

.live, .announce, .closed { margin: 0; }
.live {
  display: flex; align-items: center; gap: 8px;
  width: 100%; border: 0;
  background: #ecfdf5; color: #065f46;
  font-weight: 800; padding: 10px 14px; text-align: left;
}
.live::before {
  content: "";
  width: 8px; height: 8px; border-radius: 50%;
  background: #059669;
  box-shadow: 0 0 0 0 rgba(5, 150, 105, .55);
  animation: pulse 1.6s infinite;
}
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(5, 150, 105, 0); } }
.announce {
  background: #fff7ed; color: #9a3412;
  font-weight: 700; padding: 8px 14px; font-size: 14px;
}
.closed {
  background: #9f1239; color: white;
  font-weight: 700; padding: 10px 14px;
}

.layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 14px 56px;
}
.finder { display: grid; gap: 12px; }
.search { display: block; min-width: 0; }
.search input, .pane-tools input, .url-copy input, .sheet input, .login-card input, dialog input, #productSearch {
  width: 100%;
  background: white;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 16px;
}
.cats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.cats::-webkit-scrollbar, .pops::-webkit-scrollbar, .tabs::-webkit-scrollbar, .filters::-webkit-scrollbar { display: none; }
.cat {
  border: 1px solid var(--line);
  background: white;
  color: #0f172a;
  border-radius: 14px;
  padding: 14px 10px;
  min-height: 56px;
  min-width: 0;
  font-weight: 800;
  font-size: 14px;
  line-height: 1.2;
  white-space: normal;
  overflow-wrap: anywhere;
}
.cat.on {
  color: white;
  background: #0f172a;
  border-color: #0f172a;
}

#menu { min-width: 0; padding-top: 8px; }
.mine { margin-bottom: 8px; }
.mine h2, .mine-title { font-size: 18px; font-weight: 800; margin: 14px 0 0; }
.mine-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  margin-top: 8px;
}
.mine-card p { color: var(--muted); font-size: 14px; margin-top: 4px; }
.mine-card .mine-date { display: block; margin-top: 2px; font-size: 12px; font-weight: 700; color: #475569; }
.mine-card .status { color: #9f1239; font-weight: 800; }
.mine-repeat {
  margin-top: 8px; border: 0; border-radius: 8px; padding: 7px 12px;
  background: #9f1239; color: white; font-weight: 800; font-size: 13px;
}
.block { scroll-margin-top: 76px; margin-top: 22px; }
.block h2, .pop-wrap h2, .cart-panel h2, .sheet h2, .login-card h1 {
  font-family: var(--sans);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.block h2, .pop-wrap h2 {
  font-size: 18px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.block h2 span, .filters b, .tabs b {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}
.pop-wrap { margin: 6px 0 2px; }
.pops {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 0 4px;
}
.pop {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); background: white;
  border-radius: 14px;
  padding: 8px;
  text-align: left;
  min-width: 0;
}
.pop img, .pop-e {
  width: 40px; height: 40px; border-radius: 8px;
  object-fit: cover; background: #e2e8f0;
  display: grid; place-items: center; font-size: 20px;
}
.pop span { min-width: 0; }
.pop b, .pop small { display: block; }
.pop b { font-size: 14px; overflow-wrap: anywhere; }
.pop small { color: var(--orange-deep); font-weight: 800; }

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.card {
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  min-width: 0;
  min-height: 0;
}
.card.is-off { opacity: .55; }
.thumb { position: relative; aspect-ratio: 4 / 5; height: auto; background: #f8fafc; }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.emo { position: absolute; inset: 0; display: grid; place-items: center; font-size: 32px; }
.ribbon {
  position: absolute; left: 6px; bottom: 6px;
  background: #0f172a; color: white;
  font-size: 10px; font-weight: 800;
  border-radius: 6px; padding: 2px 5px;
}
.meta { padding: 10px; display: flex; flex-direction: column; min-width: 0; flex: 1; }
.meta h3 {
  font-size: 15px; line-height: 1.25; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.5em;
}
.meta p {
  color: var(--muted); font-size: 13px; margin-top: 2px; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.6em;
}
.meta-row {
  margin-top: auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding-top: 6px;
}
.meta-row strong, .line > strong { color: #9f1239; font-size: 15px; }
.add, .step button, .primary, .ghost, .text-btn, .switch, .filters button, .tabs button { border: 0; }
.add, .step button {
  width: 36px; height: 36px; border-radius: 10px;
  background: #9f1239; color: white; font-size: 22px; line-height: 1;
}
.step {
  display: flex; align-items: center; gap: 4px;
  background: #fff1f2; border-radius: 10px; padding: 2px;
}
.step b { min-width: 16px; text-align: center; font-size: 14px; }
.step button { width: 32px; height: 32px; }
.sold { color: var(--muted); font-weight: 800; font-size: 13px; }
.result-info, .empty, .muted { color: var(--muted); }
.empty, .pad { padding: 18px 4px; }
.foot { margin-top: 28px; display: grid; gap: 8px; }
.foot button, .text-btn, dialog .text-btn, .cart-panel .text-btn {
  background: transparent; color: #9f1239;
  font-weight: 800; padding: 0; text-align: left;
}
.foot p { color: var(--muted); font-size: 14px; }

.cart-panel {
  position: fixed; z-index: 40;
  top: 0; right: 0; bottom: 0;
  width: min(420px, 100%);
  overflow: auto;
  background: white;
  box-shadow: -12px 0 40px rgba(15, 23, 42, .18);
  transform: translateX(105%);
  transition: transform .28s ease;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
}
body.cart-open .cart-panel { transform: translateX(0); }
@media (max-width: 699px) {
  .cart-panel {
    top: auto; left: 0; width: auto;
    max-height: 78vh;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -10px 30px rgba(15, 23, 42, .18);
    transform: translateY(110%);
  }
  body.cart-open .cart-panel { transform: translateY(0); }
}
.cart-tabs { display: flex; gap: 6px; margin: 0 0 12px; }
.cart-tabs button {
  flex: 1; border: 1px solid #cbd5e1; background: white; color: #0f172a;
  border-radius: 10px; padding: 8px 10px; font-weight: 800;
}
.cart-tabs button.on { background: #0f172a; color: white; border-color: #0f172a; }
.cart-grab {
  position: sticky;
  top: -16px;
  z-index: 2;
  margin: -16px -16px 8px;
  padding: 8px 16px 10px;
  background: white;
  touch-action: none;
}
.handle {
  display: block;
  width: 42px; height: 4px; border-radius: 99px;
  background: #cbd5e1; margin: 4px auto 10px; padding: 0;
}
.keep-shop {
  width: 100%;
  border: 1px solid var(--line);
  background: #f8fafc;
  color: #0f172a;
  border-radius: 10px;
  padding: 12px;
  font-weight: 800;
  text-align: center;
}
.cart-head, .dlg-head, .line, .sum-row, .admin-order-top, .prod-top {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.cart-head h2 { font-size: 22px; }
.lines { list-style: none; margin: 8px 0 0; padding: 0; }
.lines li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.lines li b { display: block; }
.lines small { color: var(--muted); }
.warn { color: #9f1239; font-size: 12px; font-weight: 800; }
.sums { margin: 12px 0; display: grid; gap: 6px; }
.sum-row span { color: var(--muted); }
.total { font-size: 18px; }
.total strong { font-size: 20px; color: #0f172a; }
.checkout { display: grid; gap: 10px; margin-top: 8px; }
.checkout label, .sheet label, .login-card label, dialog label {
  display: grid; gap: 6px; font-size: 13px; font-weight: 800; color: var(--muted);
}
.choices { display: flex; gap: 8px; }
.choice { position: relative; flex: 1; }
.choice input { position: absolute; opacity: 0; }
.choice span {
  display: block; text-align: center;
  border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 8px; font-weight: 800; color: var(--ink); background: white;
}
.choice input:checked + span {
  border-color: #9f1239; background: #fff1f2; color: #9f1239;
}
textarea {
  width: 100%; border: 1px solid #cbd5e1; border-radius: 10px;
  padding: 10px 12px; resize: vertical; background: white; font-size: 16px;
}
.primary, .ghost { border-radius: 10px; padding: 14px 16px; font-weight: 800; }
.primary { background: #9f1239; color: white; }
.primary:disabled { opacity: .55; }
.ghost { background: #0f172a; color: white; }
.slim { padding: 10px 14px; }
.sticky-btn { position: sticky; bottom: 0; }
.done { text-align: center; padding: 18px 8px 8px; display: grid; gap: 8px; }
.done strong { font-size: 36px; letter-spacing: -0.04em; }
.done a.primary { text-decoration: none; }

.cart-bar {
  position: fixed; z-index: 25;
  left: 12px; right: 12px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  display: flex; align-items: center; justify-content: space-between;
  background: #0f172a; color: white;
  border-radius: 12px; padding: 14px 16px;
}
.backdrop { position: fixed; inset: 0; z-index: 35; background: rgba(15, 23, 42, .5); }
.ask-btn {
  position: fixed; z-index: 26;
  right: 14px; bottom: calc(14px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 8px;
  border: 0; border-radius: 999px;
  background: #9f1239; color: white;
  padding: 12px 16px; font-weight: 800;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .25);
}
body.has-bar .ask-btn, body.has-bar .ask-panel { bottom: calc(84px + env(safe-area-inset-bottom)); }
body.cart-open .ask-btn { display: none; }
.ask-panel {
  position: fixed; z-index: 32;
  right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
  width: min(380px, calc(100% - 24px));
  height: min(520px, 70vh);
  display: flex; flex-direction: column;
  background: white;
  border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .22);
  overflow: hidden;
}
.ask-head {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: #0f172a; color: white;
}
.ask-head b { flex: 1; }
.ask-head .text-btn { color: #fecdd3; }
.ask-log {
  flex: 1; overflow-y: auto;
  padding: 12px; display: flex; flex-direction: column; gap: 8px;
  background: #f8fafc;
}
.ask-msg {
  max-width: 85%; padding: 9px 12px; border-radius: 14px;
  font-size: 15px; line-height: 1.35; white-space: pre-wrap; overflow-wrap: anywhere;
}
.ask-msg.bot { align-self: flex-start; background: white; border: 1px solid var(--line); }
.ask-msg.me { align-self: flex-end; background: #9f1239; color: white; }
.ask-msg.wait { color: var(--muted); }
.ask-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.ask-form input {
  flex: 1; min-width: 0;
  border: 1px solid #cbd5e1; border-radius: 10px;
  padding: 10px 12px; font-size: 16px;
}
.ask-note {
  display: flex; align-items: center; justify-content: flex-start; gap: 8px;
  padding: 0 12px 12px; color: var(--muted); font-size: 12px;
}
.note-btn {
  flex: none; border: 0; border-radius: 8px; padding: 7px 10px;
  background: #9f1239; color: white; font-weight: 800; font-size: 12px;
}
.ask-save { align-self: stretch; max-width: none; display: grid; gap: 8px; }
.ask-save p { margin: 0; }
.ask-save .ask-actions { display: flex; gap: 8px; }
.ask-save .ask-actions button { flex: 1; }
.ask-changes { align-self: stretch; max-width: none; display: grid; gap: 8px; }
.ask-changes ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14px; }
.ask-changes .ask-actions { display: flex; gap: 8px; }
.ask-changes .ask-actions button { flex: 1; }
.ask-changes .ask-state { font-weight: 800; font-size: 14px; }
.ask-changes .ask-state.bad { color: #b91c1c; }
@media (min-width: 900px) {
  body.has-bar .ask-btn, body.has-bar .ask-panel { bottom: calc(14px + env(safe-area-inset-bottom)); }
}
.toast {
  position: fixed; z-index: 60;
  left: 50%; bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: #0f172a; color: white;
  padding: 12px 16px; border-radius: 10px;
  font-weight: 700; max-width: calc(100% - 24px); text-align: center;
}
dialog {
  border: 0; border-radius: 16px; padding: 16px;
  width: min(440px, calc(100% - 24px));
  box-shadow: 0 16px 40px rgba(15, 23, 42, .18);
  max-height: calc(100dvh - 24px); overflow: auto;
}
dialog::backdrop { background: rgba(15, 23, 42, .5); }
dialog form, .sheet { display: grid; gap: 10px; }
.form-error, #passwordMsg.bad { color: #9f1239; font-weight: 800; }
.ok-msg { color: var(--leaf); font-weight: 800; }
.check { display: flex !important; align-items: center; gap: 8px; color: var(--ink) !important; }
.check input { width: auto; }
.emoji-picks { display: flex; flex-wrap: wrap; gap: 6px; }
.emoji-picks button {
  border: 1px solid var(--line); background: white;
  border-radius: 8px; font-size: 20px; width: 40px; height: 40px;
}
.preview-row img { width: 120px; height: 90px; object-fit: cover; border-radius: 8px; }
.split { display: grid; gap: 10px; }

.page-admin { background: var(--cream); }
.page-admin .top .text-btn { color: #fecdd3; min-height: 40px; }
.sound-gate {
  display: block; width: 100%; border: 0;
  background: #fbbf24; color: #0f172a;
  padding: 16px; font-size: 18px; font-weight: 800; text-align: center;
  animation: gate-pulse 1.2s ease-in-out infinite;
}
.sound-gate[hidden] { display: none; }
.new-alert {
  position: fixed; z-index: 70; left: 0; right: 0; top: 0;
  border: 0; background: #dc2626; color: white;
  padding: calc(18px + env(safe-area-inset-top)) 16px 18px;
  font-size: 24px; font-weight: 800; text-align: center; line-height: 1.2;
  animation: alert-pulse .8s ease-in-out infinite;
}
.new-alert small { font-size: 15px; font-weight: 700; }
.new-alert[hidden] { display: none; }
@keyframes alert-pulse { 50% { background: #991b1b; } }
@keyframes gate-pulse { 50% { background: #fde68a; } }
.page-admin .top .text-btn.warn { color: #0f172a; background: #fbbf24; border-radius: 999px; padding: 0 12px; }
.page-admin .brand { color: white; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card {
  width: min(420px, 100%);
  background: white; border-radius: 16px; padding: 22px;
  border: 1px solid var(--line); display: grid; gap: 10px;
}
.login-card h1 { font-size: 30px; }
.admin-tools, .pane, .tabs { max-width: 980px; margin: 0 auto; padding: 0 14px; }
.tabs {
  display: flex; gap: 8px; padding-top: 12px; padding-bottom: 8px;
  overflow-x: auto; scrollbar-width: none;
}
.tabs button { flex: none; }
.tabs button, .filters button {
  background: white; border-radius: 10px; padding: 8px 12px; font-weight: 800;
  box-shadow: inset 0 0 0 1px var(--line);
}
.tabs button.on, .filters button.on { background: #0f172a; color: white; }
.tabs button.on b, .filters button.on b { color: white; }
.url-copy { display: grid; gap: 6px; font-size: 13px; font-weight: 800; color: var(--muted); padding-top: 12px; }
.url-copy span { display: flex; gap: 8px; }
.switch {
  margin-left: auto;
  background: #ecfdf5; color: #065f46;
  border-radius: 999px; padding: 8px 12px; font-weight: 800;
}
.switch.off { background: #9f1239; color: white; }
.filters { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0; scrollbar-width: none; }
.order, .product, .sheet {
  background: white; border-radius: 12px; padding: 14px;
  border: 1px solid var(--line); margin: 10px 0;
}
.order.yeni { box-shadow: inset 4px 0 0 #9f1239; }
.order .note { background: #fff7ed; border-radius: 10px; padding: 8px 10px; margin-top: 8px; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chips span, .status {
  background: #fff1f2; color: #9f1239;
  border-radius: 99px; padding: 4px 8px; font-size: 12px; font-weight: 800;
}
.order-top-actions { display: flex; align-items: center; gap: 8px; }
.chip-known {
  display: inline-block; margin: 6px 0 0;
  background: #ecfdf5; color: #047857;
  border-radius: 99px; padding: 4px 8px; font-size: 12px; font-weight: 800;
}
.order-del {
  border: 0; background: #9f1239; color: white;
  border-radius: 10px; padding: 8px 12px; font-weight: 800; font-size: 13px;
}
.order-actions, .prod-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.order-actions button, .prod-actions button {
  border: 0; background: #0f172a; color: white;
  border-radius: 10px; padding: 8px 10px; font-weight: 800; font-size: 13px;
}
.order-actions .danger, .prod-actions .danger { background: #9f1239; }
.product { display: grid; gap: 8px; }
.product img.thumb-sm { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }
.pane-tools { display: flex; gap: 8px; align-items: center; }

@media (min-width: 720px) {
  .cats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pops { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1040px) {
  .cards, .pops { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .cart-bar { display: none !important; }
  body.has-bar { padding-bottom: 0; }
}
@media (max-width: 899px) {
  .choice span { font-size: 14px; line-height: 1.25; padding: 12px 6px; }
  .add { width: 40px; height: 40px; }
  .admin-top .top-inner { flex-wrap: wrap; }
  .admin-top .switch { margin-left: 0; }
  .url-copy span, .pane-tools { flex-direction: column; align-items: stretch; }
  .order-actions button, .prod-actions button { min-height: 40px; }
}
@media (min-width: 700px) {
  .handle { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
