/* =========================================================================
   SAĞLAM MENÜ PANELİ — Taş ve Pirinç (tanıtım sitesiyle aynı sistem)
   ========================================================================= */
:root {
  --stone: #F4F1EB; --paper: #FBF9F5; --sand: #ECE7DE;
  --ink: #1C1916; --ink-2: #5F5850; --muted: #8A8178;
  --line: #E2DBD0; --line-2: #D3CABD;
  --brass: #9C7A45; --brass-hi: #C9A56B;
  --ok: #4C6B3C; --ok-bg: #E6EDDF; --err: #9B2C2C; --err-bg: #F6E3E0;
  --f-display: "Inter Tight", "Inter", -apple-system, sans-serif;
  --f-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.22, .8, .24, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--stone); color: var(--ink); font-family: var(--f-body); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; border-radius: 8px; }

.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 16px; }

/* Logo */
.logo { display: inline-flex; align-items: center; gap: 9px; font-family: var(--f-display); font-weight: 600; font-size: 17px; letter-spacing: -.02em; text-decoration: none; }
.logo svg { width: 26px; height: 26px; flex: none; }
.lm-bg { fill: var(--ink); } .lm-ring { fill: none; stroke: var(--brass-hi); stroke-width: 2.4; } .lm-dot { fill: var(--stone); }

/* Butonlar */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent; font-weight: 500; font-size: 15px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .2s, border-color .2s, transform .2s; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .55; cursor: default; }
.btn-dark { background: var(--ink); color: var(--stone); }
.btn-dark:hover { background: #34302B; }
.btn-line { border-color: var(--line-2); background: var(--paper); }
.btn-line:hover { border-color: var(--ink); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13.5px; }
.btn-block { width: 100%; }
.btn-wa { background: #1F7A4D; color: #fff; }
.btn-danger { color: var(--err); }
.i { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Form */
.field { display: grid; gap: 7px; margin-bottom: 16px; }
.field label { font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.input { width: 100%; height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2); background: #fff; font-size: 16px; transition: border-color .2s, box-shadow .2s; }
.input:focus { outline: none; border-color: var(--brass); box-shadow: 0 0 0 4px rgba(156, 122, 69, .14); }
.input-suffix { display: flex; align-items: stretch; }
.input-suffix .input { border-radius: 12px 0 0 12px; }
.input-suffix span { display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--line-2); border-left: 0; border-radius: 0 12px 12px 0; background: var(--sand); color: var(--ink-2); font-size: 14px; white-space: nowrap; }
.hint { font-size: 12.5px; color: var(--muted); }
.form-error { background: var(--err-bg); color: var(--err); padding: 11px 14px; border-radius: 12px; font-size: 14px; margin-bottom: 16px; }

/* Giriş / davet ekranı */
.auth { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px calc(32px + var(--safe-b)); }
.auth-card { width: 100%; max-width: 400px; background: var(--paper); border: 1px solid var(--line); border-radius: 26px; padding: 32px 26px 28px; }
.auth-card .logo { margin-bottom: 30px; }
.auth h1 { font-family: var(--f-display); font-weight: 600; font-size: 28px; letter-spacing: -.03em; line-height: 1.1; margin-bottom: 8px; }
.auth .sub { color: var(--ink-2); margin-bottom: 26px; }
.auth-foot { margin-top: 22px; font-size: 13.5px; color: var(--ink-2); text-align: center; }
.auth-foot a { font-weight: 500; }

/* Üst bar */
.top { position: sticky; top: 0; z-index: 20; background: rgba(244, 241, 235, .9); -webkit-backdrop-filter: saturate(160%) blur(12px); backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 60px; }
.top-actions { display: flex; gap: 6px; align-items: center; }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--paper); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; text-decoration: none; }
.icon-btn:hover { border-color: var(--ink); }

/* Başlık */
.head { padding: 26px 0 14px; }
.eyebrow { font-size: 11.5px; font-weight: 500; letter-spacing: .15em; text-transform: uppercase; color: var(--brass); margin-bottom: 8px; }
.title { font-family: var(--f-display); font-weight: 600; font-size: clamp(26px, 6vw, 34px); letter-spacing: -.03em; line-height: 1.1; }
.head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.head .meta { margin-top: 8px; color: var(--ink-2); font-size: 14px; }
.back { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-2); text-decoration: none; margin-bottom: 14px; }

/* Arama + kategori çipleri */
.tools { position: sticky; top: 60px; z-index: 15; background: var(--stone); padding: 8px 0 10px; }
.search { position: relative; }
.search .i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search .input { padding-left: 40px; height: 44px; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 10px -16px 0; padding: 0 16px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--paper); font-size: 13.5px; cursor: pointer; white-space: nowrap; }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--stone); }

/* Ürün listesi */
.cat { margin: 18px 0 8px; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.cat h2 { font-family: var(--f-display); font-weight: 600; font-size: 19px; letter-spacing: -.02em; }
.cat span { font-size: 12.5px; color: var(--muted); }
.items { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 14px; align-items: center; padding: 14px 16px; border-top: 1px solid var(--line); }
.item:first-child { border-top: 0; }
.item-name { font-weight: 500; font-size: 15px; }
.item-state { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; min-height: 18px; transition: color .2s; }
.item-state.saving { color: var(--muted); }
.item-state.saved { color: var(--ok); }
.item-state.error { color: var(--err); }
.item.is-off .item-name { color: var(--muted); }
.item-ctrl { display: flex; align-items: center; gap: 12px; }
.prices { grid-column: 1 / -1; display: grid; gap: 8px; }
.price { display: flex; align-items: center; width: 118px; height: 42px; border: 1px solid var(--line-2); border-radius: 11px; background: #fff; overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.price:focus-within { border-color: var(--brass); box-shadow: 0 0 0 4px rgba(156, 122, 69, .14); }
.price input { width: 100%; min-width: 0; height: 100%; border: 0; background: transparent; padding: 0 4px 0 12px; font-size: 16px; text-align: right; font-variant-numeric: tabular-nums; }
.price input:focus { outline: none; }
.price span { padding: 0 12px 0 4px; color: var(--ink-2); font-size: 14px; }
.size-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 2px 0; }
.size-row label { font-size: 13.5px; color: var(--ink-2); }

/* Anahtar */
.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--line-2); transition: background .25s var(--ease); }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .25s var(--ease); }
.switch input:checked + span { background: var(--ink); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 2px solid var(--brass); outline-offset: 2px; }

.empty { text-align: center; padding: 48px 16px; color: var(--ink-2); }
.footer-space { height: calc(48px + var(--safe-b)); }

/* Yönetici */
.biz-list { display: grid; gap: 12px; }
.biz { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.biz-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.biz h3 { font-family: var(--f-display); font-weight: 600; font-size: 19px; letter-spacing: -.02em; }
.biz .url { font-size: 13.5px; color: var(--brass); text-decoration: none; }
.biz .stats { font-size: 13px; color: var(--muted); margin-top: 4px; }
.owner { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.owner-mail { font-size: 14px; word-break: break-all; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-ok { background: var(--ok-bg); color: var(--ok); }
.pill-wait { background: #F3EAD9; color: #8A6420; }
.pill-off { background: var(--err-bg); color: var(--err); }
.biz-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }

/* Pencere */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; background: rgba(28, 25, 22, .45); padding: 0; }
.modal-card { width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto; background: var(--paper); border-radius: 24px 24px 0 0; padding: 24px 20px calc(24px + var(--safe-b)); animation: up .35s var(--ease); }
.modal-card h2 { font-family: var(--f-display); font-weight: 600; font-size: 22px; letter-spacing: -.02em; margin-bottom: 6px; }
.modal-card .sub { color: var(--ink-2); margin-bottom: 20px; font-size: 14px; }
.modal-actions { display: grid; gap: 8px; margin-top: 8px; }
.linkbox { font-size: 13px; background: #fff; border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; word-break: break-all; margin-bottom: 14px; user-select: all; }
.file { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px dashed var(--line-2); border-radius: 12px; background: #fff; cursor: pointer; font-size: 14px; color: var(--ink-2); }
.file input { display: none; }
.file.ok { border-style: solid; border-color: var(--ok); color: var(--ok); }
@keyframes up { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 640px) {
  .modal { align-items: center; padding: 24px; }
  .modal-card { border-radius: 24px; }
}

/* Bildirim */
.toast { position: fixed; left: 50%; bottom: calc(20px + var(--safe-b)); transform: translateX(-50%); z-index: 60; max-width: calc(100% - 32px); background: var(--ink); color: var(--stone); padding: 12px 18px; border-radius: 999px; font-size: 14px; box-shadow: 0 16px 40px -16px rgba(0,0,0,.5); animation: up .3s var(--ease); }
.toast.err { background: var(--err); }

.loading { display: flex; align-items: center; justify-content: center; min-height: 60vh; color: var(--muted); }

@media (min-width: 640px) {
  .item { grid-template-columns: minmax(0, 1fr) auto; }
  .prices { grid-column: auto; }
  .item.has-sizes { grid-template-columns: minmax(0, 1fr) auto; }
  .item.has-sizes .prices { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
