/* İşletme paneli ve süper yönetici ortak stilleri */
:root {
  --bg: #f6f5f3; --card: #fff; --ink: #1c1917; --muted: #6b6560; --line: #e5e1dc;
  --accent: #c2410c; --accent-ink: #fff; --ok: #15803d; --warn: #b45309; --bad: #b91c1c;
  --radius: 10px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px 60px; }

.top { position: sticky; top: 0; z-index: 10; background: var(--card); border-bottom: 1px solid var(--line); }
.top__in { max-width: 1040px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.brand small { font-weight: 500; color: var(--muted); }
.tabs { display: flex; gap: 4px; overflow-x: auto; flex: 1; }
.tabs button { border: 0; background: none; padding: 8px 12px; border-radius: 8px; font-weight: 500; color: var(--muted); white-space: nowrap; cursor: pointer; position: relative; }
.tabs button[aria-selected="true"] { background: var(--bg); color: var(--ink); }
.dot { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px; border-radius: 99px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; }

h1 { font-size: 22px; margin: 22px 0 6px; }
h2 { font-size: 17px; margin: 0 0 12px; }
.sub { color: var(--muted); margin: 0 0 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin-bottom: 16px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }

label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.field { margin-bottom: 12px; }
.field small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
input[type=text], input[type=password], input[type=number], input[type=tel], input[type=date], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent); border-color: var(--accent); }
input[type=color] { width: 48px; height: 38px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 14px; margin: 6px 0; }
.check input { width: 18px; height: 18px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 14px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-weight: 600; cursor: pointer; text-decoration: none; color: var(--ink); white-space: nowrap; }
.btn:hover { border-color: #cfc8c0; }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn--danger { color: var(--bad); }
.btn--sm { padding: 5px 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.cat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 14px; overflow: hidden; }
.cat__head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: #fbfaf8; flex-wrap: wrap; }
.cat__head strong { font-size: 16px; flex: 1; min-width: 120px; }
.cat__head .en { color: var(--muted); font-weight: 400; font-size: 13px; margin-left: 6px; }
.prod { display: grid; grid-template-columns: 52px minmax(0, 1fr) 120px auto; gap: 12px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.prod:last-child { border-bottom: 0; }
.prod__img { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; background: var(--bg); display: grid; place-items: center; color: var(--muted); font-size: 11px; }
.prod__name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prod__meta { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prod.is-out .prod__name { text-decoration: line-through; color: var(--muted); }
.price-in { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.price-in input { border: 0; width: 100%; text-align: right; padding: 7px 4px 7px 8px; font-weight: 600; }
.price-in input:focus { outline: none; }
.price-in span { padding: 0 8px; color: var(--muted); }
.price-in.saved { border-color: var(--ok); box-shadow: 0 0 0 2px color-mix(in srgb, var(--ok) 20%, transparent); }
.icon-btn { border: 1px solid var(--line); background: #fff; border-radius: 8px; width: 32px; height: 32px; cursor: pointer; display: inline-grid; place-items: center; }
.empty-row { padding: 14px; color: var(--muted); font-size: 14px; }
@media (max-width: 640px) {
  .prod { grid-template-columns: 44px minmax(0, 1fr) 96px; }
  .prod__img { width: 44px; height: 44px; }
  .prod > .actions { grid-column: 2 / -1; }
}

.modal { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.4); display: grid; place-items: center; padding: 16px; }
.modal__box { background: var(--card); border-radius: 16px; width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; padding: 20px; }
.modal__box h2 { display: flex; justify-content: space-between; align-items: center; }
.img-pick { display: flex; gap: 12px; align-items: center; }
.img-pick img, .img-pick .ph { width: 88px; height: 88px; border-radius: 10px; object-fit: cover; background: var(--bg); display: grid; place-items: center; color: var(--muted); font-size: 12px; text-align: center; }

.call { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); margin-bottom: 10px; }
.call strong { font-size: 18px; }
.call .tag { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: #fef3c7; color: #92400e; }
.call .tag.bill { background: #dbeafe; color: #1e40af; }
.call time { color: var(--muted); font-size: 13px; margin-left: auto; }
.call.is-new { border-color: var(--warn); box-shadow: 0 0 0 3px #fde68a; }

.notice { padding: 12px 14px; border-radius: 10px; background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; font-size: 14px; margin-bottom: 14px; }
.notice.info { background: #eff6ff; border-color: #bfdbfe; color: #1e3a8a; }
.qr-prev { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.qr-prev svg { width: 140px; height: 140px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }

table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 8px; border-bottom: 1px solid var(--line); }
table.list td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 99px; }
.pill.ok { background: #dcfce7; color: #166534; } .pill.bad { background: #fee2e2; color: #991b1b; } .pill.warn { background: #fef3c7; color: #92400e; }
.scroll-x { overflow-x: auto; }

.login { max-width: 380px; margin: 10vh auto; padding: 0 16px; }
.login .card { padding: 24px; }
.err { color: var(--bad); font-size: 13.5px; min-height: 20px; margin: 6px 0 0; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(16px); opacity: 0; transition: .2s; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 99px; font-size: 14px; z-index: 60; pointer-events: none; }
.toast.is-on { opacity: 1; transform: translateX(-50%); }
[hidden] { display: none !important; }
