/* bimen ortak arayüz: merkezi panel, kurulum sihirbazı, giriş sayfası */
:root {
  --bg: #F5F6F8; --card: #FFFFFF; --ink: #1D2330; --muted: #5E6778; --line: #E4E7EC;
  --brand: #FF5A1F; --brand-ink: #FFFFFF; --brand-soft: #FFF0E9;
  --ok: #12805C; --ok-soft: #E6F6EF; --warn: #9A5B00; --warn-soft: #FFF4DB; --bad: #B42318; --bad-soft: #FDECEA;
  --info: #2E5BD8; --info-soft: #EAF0FF;
  --r: 14px; --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 4px 16px rgba(16, 24, 40, .06);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--info); }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -.01em; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 12px; }

/* üst bar */
.top { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.top .wrap { display: flex; align-items: center; gap: 14px; min-height: 60px; }
.top img { height: 26px; display: block; }
.top .tag { font-size: 12px; font-weight: 700; color: var(--muted); border-left: 1px solid var(--line); padding-left: 12px; }

/* kart ve form */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px; }
label.f { display: block; }
label.f > span { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 5px; }
input[type=text], input[type=tel], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], select, textarea {
  width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 9px 12px; outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 160px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.grid { display: grid; gap: 12px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { .g2, .g3 { grid-template-columns: 1fr; } }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-weight: 700; cursor: pointer; text-decoration: none; color: var(--ink); white-space: nowrap; }
.btn:hover { border-color: #C9CED6; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { filter: brightness(.95); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.danger { color: var(--bad); border-color: #F3C3BE; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 13.5px; }
.btn.big { min-height: 50px; padding: 0 22px; font-size: 16px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.alert { border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.alert.bad { background: var(--bad-soft); color: var(--bad); }
.alert.ok { background: var(--ok-soft); color: var(--ok); }
.alert.warn { background: var(--warn-soft); color: var(--warn); }
.alert.info { background: var(--info-soft); color: var(--info); }

.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-aktif { background: var(--ok-soft); color: var(--ok); }
.b-deneme { background: var(--info-soft); color: var(--info); }
.b-suresi-doldu { background: var(--warn-soft); color: var(--warn); }
.b-askida { background: var(--bad-soft); color: var(--bad); }

/* giriş kutusu */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.gate .card { width: min(400px, 100%); padding: 26px; }
.gate img { height: 34px; margin-bottom: 18px; }

/* panel: özet kartları */
.stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin: 20px 0; }
@media (max-width: 980px) { .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.stat b { display: block; font-size: 26px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.stat.hl { background: var(--ink); color: #fff; border-color: var(--ink); }
.stat.hl span { color: #C8CEDA; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.toolbar input[type=search] { max-width: 320px; }
.toolbar select { width: auto; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* işletme listesi */
.list { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.item { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.3fr) 110px minmax(0, 1.1fr) minmax(0, 1fr) 28px; gap: 14px; align-items: center; padding: 13px 16px; border-top: 1px solid var(--line); cursor: pointer; }
.item:first-child { border-top: 0; }
.item:hover { background: #FAFBFC; }
.item.head { cursor: default; background: #FAFBFC; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.item .nm b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .nm small, .item small { color: var(--muted); font-size: 12.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .chev { color: #A0A7B4; font-size: 20px; text-align: right; }
.dot-setup { display: inline-block; font-size: 11px; font-weight: 700; color: var(--warn); background: var(--warn-soft); border-radius: 6px; padding: 1px 6px; margin-left: 6px; vertical-align: 2px; }
@media (max-width: 860px) {
  .item { grid-template-columns: minmax(0, 1fr) auto; }
  .item > :nth-child(2), .item > :nth-child(4), .item > :nth-child(5), .item > :nth-child(6) { display: none; }
  .item.head { display: none; }
}
.empty { padding: 40px 16px; text-align: center; color: var(--muted); }

/* yan çekmece ve pencere */
.scrim { position: fixed; inset: 0; background: rgba(16, 20, 28, .45); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--bg); z-index: 41; overflow-y: auto; box-shadow: -10px 0 40px rgba(0, 0, 0, .15); }
.drawer-head { position: sticky; top: 0; background: var(--card); border-bottom: 1px solid var(--line); padding: 14px 18px; display: flex; gap: 10px; align-items: center; z-index: 2; }
.drawer-body { padding: 16px 18px 40px; }
.drawer-body > * + * { margin-top: 14px; }
.modal { position: fixed; z-index: 41; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100% - 24px)); max-height: calc(100vh - 24px); overflow-y: auto; background: var(--card); border-radius: 18px; padding: 22px; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.modal h2 { font-size: 20px; margin-bottom: 14px; }
.kv { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 520px) { .kv { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kv div { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.kv b { display: block; font-size: 19px; font-variant-numeric: tabular-nums; }
.kv span { font-size: 12px; color: var(--muted); font-weight: 600; }
.secret { font: 700 18px/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--ink); color: #fff; border-radius: 10px; padding: 12px 14px; word-break: break-all; }
.hist { list-style: none; margin: 0; padding: 0; font-size: 13.5px; }
.hist li { padding: 7px 0; border-top: 1px solid var(--line); display: flex; gap: 10px; }
.hist li:first-child { border-top: 0; }
.hist time { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.section-title { font-size: 13px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 999px; font-weight: 600; z-index: 60; box-shadow: 0 8px 30px rgba(0, 0, 0, .25); max-width: calc(100% - 24px); }
.toast.bad { background: var(--bad); }

/* kurulum sihirbazı */
.wiz { max-width: 820px; margin: 0 auto; padding: 22px 16px 60px; }
.steps { display: flex; gap: 6px; margin: 0 0 18px; overflow-x: auto; padding-bottom: 2px; }
.steps button { flex: 1; min-width: 110px; border: 0; background: transparent; padding: 0; cursor: pointer; text-align: left; }
.steps button i { display: block; height: 5px; border-radius: 5px; background: var(--line); margin-bottom: 7px; }
.steps button span { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.steps button.done i { background: var(--ink); }
.steps button.on i { background: var(--brand); }
.steps button.on span { color: var(--ink); }
.wiz h1 { font-size: 26px; margin-bottom: 4px; }
.wiz .lead { color: var(--muted); margin: 0 0 18px; }
.foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; }
.logo-box { display: flex; gap: 14px; align-items: center; }
.logo-prev { width: 120px; height: 72px; border: 1px dashed #C9CED6; border-radius: 12px; display: grid; place-items: center; background: #fff center / contain no-repeat; color: var(--muted); font-size: 12px; text-align: center; padding: 6px; }
.area-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px 40px; gap: 10px; align-items: end; }
.tbl-prev { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tbl-prev span { font-size: 12px; font-weight: 600; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 3px 8px; }
.menu-prev { border: 1px solid var(--line); border-radius: 12px; background: #fff; max-height: 360px; overflow-y: auto; }
.menu-prev h4 { margin: 0; padding: 9px 12px; background: #FAFBFC; border-top: 1px solid var(--line); font-size: 13px; }
.menu-prev h4:first-child { border-top: 0; }
.menu-prev div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 12px; border-top: 1px solid var(--line); font-size: 14px; }
.menu-prev div b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.staff-row { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.done-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 560px) { .done-links { grid-template-columns: 1fr; } }
.done-links a { display: block; text-decoration: none; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.done-links a b { display: block; }
.done-links a span { color: var(--muted); font-size: 13px; }

/* ana sayfa */
.home { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; text-align: center; }
.home img { height: 46px; margin-bottom: 22px; }
.home h1 { font-size: clamp(26px, 5vw, 38px); margin-bottom: 10px; }
.home p { color: var(--muted); max-width: 520px; margin: 0 auto 22px; }
.go { display: flex; max-width: 440px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 5px; box-shadow: var(--shadow); }
.go input { border: 0; min-height: 44px; box-shadow: none !important; text-align: right; padding-right: 2px; }
.go em { align-self: center; font-style: normal; color: var(--muted); padding-right: 10px; white-space: nowrap; }
#step > * + * { margin-top: 14px; }
