/* Yönetim paneli */
:root {
  --bg: #f5f2ed; --card: #fff; --ink: #231a14; --muted: #786a5e; --line: #e4dbcf;
  --red: #c8361b; --red-dark: #9e2810; --red-soft: #fbe6df;
  --green: #2f7d4a; --green-soft: #e3f2e7; --amber: #b7791f; --amber-soft: #fff3d6; --blue-soft: #e4eefb;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--red); }
h1 { font-size: 1.5rem; margin: 20px 0 12px; }
h2 { font-size: 1.1rem; margin: 0 0 12px; }
.muted { color: var(--muted); }
.empty { color: var(--muted); padding: 30px 0; text-align: center; }
.adm-wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px 40px; }
.adm-top { background: var(--ink); color: #fff; }
.adm-top-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding-top: 12px; padding-bottom: 12px; }
.adm-brand { color: #fff; font-weight: 700; text-decoration: none; font-size: 1.1rem; }
.adm-top nav { display: flex; flex-wrap: wrap; gap: 4px; }
.adm-top nav a { color: #e8dccf; text-decoration: none; padding: 6px 10px; border-radius: 8px; }
.adm-top nav a.on, .adm-top nav a:hover { background: rgba(255, 255, 255, .12); color: #fff; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 10px;
  padding: 10px 16px; background: var(--red); color: #fff; font: 600 .95rem system-ui, sans-serif; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--red-dark); }
.btn-sm { padding: 7px 12px; font-size: .88rem; }
.btn-light { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.btn-light:hover { background: #faf7f3; }
.btn-ok { background: var(--green); color: #fff; }
.btn-ok:hover { background: #256a3d; }
.btn-danger { background: var(--red); }
.danger-text { color: var(--red); }

.alert { padding: 10px 14px; border-radius: 10px; margin: 14px 0; background: var(--amber-soft); }
.alert.ok { background: var(--green-soft); color: #1f5a34; }
.alert.err { background: var(--red-soft); color: var(--red-dark); }
.hint { color: var(--muted); font-size: .85rem; margin: 6px 0 12px; }

input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid #d6cabb; border-radius: 9px; font: inherit; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--red); outline-offset: 0; border-color: transparent; }
textarea.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .88rem; }
label { display: block; font-weight: 600; font-size: .9rem; }
label > input, label > select, label > textarea { margin-top: 5px; font-weight: 400; }
label small { display: block; font-weight: 400; color: var(--muted); margin-top: 4px; }
.check-inline { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.check-inline input { width: 18px; height: 18px; accent-color: var(--red); }
.checks { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; }
.checks p { flex-basis: 100%; margin: 4px 0 0; }
.stack > * + * { margin-top: 14px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin: 0 0 16px; }
.panel-head, .page-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.panel-head h2 { margin: 0; }
.page-head h1 { margin-bottom: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid h2 { margin: 0; }
.row-actions { display: flex; gap: 8px; }
.inline-form { display: flex; gap: 8px; align-items: center; margin-top: 14px; }
.inline-form input { max-width: 260px; }
.wrap-form { flex-wrap: wrap; }
.back { display: inline-block; margin-top: 16px; text-decoration: none; font-weight: 600; }
.w-num { max-width: 80px; }
.w-money { max-width: 140px; }
.table-scroll { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
.tbl th { text-align: left; font-size: .8rem; color: var(--muted); font-weight: 600; padding: 6px 8px; }
.tbl td { padding: 6px 8px; border-top: 1px solid var(--line); }

/* Siparişler */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 18px 0 10px; }
.stats { display: flex; gap: 10px; }
.stats div { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px; display: flex; flex-direction: column; }
.stats span { font-size: .78rem; color: var(--muted); }
.stats strong { font-size: 1.2rem; }
.tabs { display: flex; gap: 6px; overflow-x: auto; border-bottom: 1px solid var(--line); margin: 8px 0 4px; }
.tabs a { padding: 9px 14px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a.on { color: var(--ink); border-color: var(--red); }
.orders { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.order { background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; }
.order.st-yeni { border-left-color: var(--red); box-shadow: 0 0 0 2px var(--red-soft); }
.order.st-hazirlaniyor { border-left-color: var(--amber); }
.order.st-yolda { border-left-color: #2b6cb0; }
.order.st-teslim { border-left-color: var(--green); opacity: .85; }
.order.st-iptal { opacity: .6; }
.order header { display: flex; justify-content: space-between; gap: 8px; padding: 12px 14px 0; }
.order header time { font-weight: 700; font-size: 1.05rem; }
.ono { font-family: ui-monospace, Menlo, monospace; margin-right: 4px; }
.order-body { padding: 8px 14px 12px; flex: 1; }
.items { list-style: none; padding: 0; margin: 0 0 10px; }
.items li { padding: 4px 0; border-bottom: 1px dashed var(--line); }
.items small { display: block; color: var(--muted); padding-left: 24px; }
.cust { font-size: .92rem; display: grid; gap: 3px; }
.note { background: var(--amber-soft); padding: 4px 8px; border-radius: 6px; }
.order footer { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px 14px; border-top: 1px solid var(--line); }
.status-form { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: #eee6dc; color: var(--ink); vertical-align: middle; }
.tag-yeni { background: var(--red); color: #fff; }
.tag-hazirlaniyor { background: var(--amber-soft); color: #7a4f10; }
.tag-yolda { background: var(--blue-soft); color: #1e4e8c; }
.tag-teslim, .tag-paid { background: var(--green-soft); color: #1f5a34; }
.tag-iptal { background: var(--red-soft); color: var(--red-dark); }
.tag-pickup { background: #ede4f7; color: #553c7b; }

/* Ürünler */
.prow { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.prow.off .prow-info { opacity: .5; }
.prow-info { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.prow-info span { color: var(--muted); font-size: .88rem; }
.thumb { width: 48px; height: 48px; border-radius: 9px; object-fit: cover; flex: none; }
.thumb-empty { background: var(--red-soft); display: block; }
.thumb-row { display: flex; gap: 14px; align-items: center; margin-top: 10px; }
.thumb-lg { width: 120px; height: 120px; border-radius: 12px; object-fit: cover; }

/* Giriş ve kurulum */
.login-page { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.login-box { width: min(420px, 100%); background: var(--card); border-radius: 16px; padding: 26px; border: 1px solid var(--line); }
.login-box h1 { margin-top: 0; }
.checklist { list-style: none; padding: 0; }
.checklist li { padding: 6px 0 6px 26px; position: relative; }
.checklist li.ok::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 700; }
.checklist li.bad::before { content: "✗"; position: absolute; left: 0; color: var(--red); font-weight: 700; }
code { background: #f1ebe3; padding: 1px 5px; border-radius: 5px; }

@media (max-width: 560px) {
  .orders { grid-template-columns: 1fr; }
  .prow { flex-wrap: wrap; }
  .prow-info { flex-basis: calc(100% - 60px); }
}
.tag-table { background: var(--ink); color: #fff; font-size: .8rem; }
.table-big { font-size: 1.25rem; font-weight: 800; }
.nowrap { white-space: nowrap; }
.nowrap .btn { margin: 2px 0; }
.mono-code { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .04em; }
.sched-row { margin: 8px 14px 0; background: #fff3d6; color: #7a4f00; font-weight: 700; padding: 6px 10px; border-radius: 8px; }
.btn-wa { background: #1fa855; color: #fff; }
.btn-wa:hover { background: #178a45; }
.rv { color: #b7791f; font-size: .92rem; }
.rv.rv-low { color: var(--red-dark); font-weight: 600; }
.nbadge { background: #e04a2c; color: #fff; border-radius: 99px; padding: 0 6px; font-size: .72rem; font-weight: 700; }
.maplink { color: #2b6cb0; font-weight: 600; text-decoration: none; white-space: nowrap; }
.extras-box { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.extras-box legend { font-weight: 700; padding: 0 6px; }
.extras-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.extras-cat { display: grid; gap: 6px; align-content: start; }
.extras-cat strong { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.extras-cat .check-inline { font-weight: 500; }
.banner-row { display: flex; gap: 16px; align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--line); }
.banner-row img { width: 240px; aspect-ratio: 12 / 5; object-fit: cover; border-radius: 10px; flex: none; }
@media (max-width: 640px) { .banner-row { flex-direction: column; } .banner-row img { width: 100%; } }

/* Kampanya */
.deal-box { border: 1px solid #f0c9b8; background: #fff8f4; border-radius: 12px; padding: 12px 14px; }
.deal-box summary { cursor: pointer; font-weight: 700; }
.deal-box summary small { font-weight: 400; color: #8a7f76; }
.deal-box[open] summary { margin-bottom: 10px; }
.combo-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px dashed #eadfd6; }
.combo-row span { flex: 1; }
.combo-sum { margin: 8px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.deal-st { display: inline-block; padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; background: #eee; }
.deal-st.on { background: #e3f4ea; color: #1f7a45; }
.deal-st.wait { background: #fff2d6; color: #8a5a00; }
.deal-st.off { background: #f3e3e3; color: #a33; }

.meal-grid { display: flex; flex-direction: column; gap: 6px; }
.meal-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.meal-row > .check-inline:first-child { min-width: 170px; }
.meal-logo-prev { height: 28px; max-width: 90px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 2px 4px; }
.meal-up { font-size: .85rem; color: var(--muted); }
.meal-up input { font-size: .8rem; margin-left: 4px; }

.tag-confirm { background: #fff3cd; color: #7a4f00; font-weight: 700; }
