/* Adisyon / Kasa ekranı — staff.css + admin.css üzerine */
.ad-wrap { padding: 16px; }

/* Üst özet kutuları */
.ad-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 14px; }
.ad-stat {
  position: relative; background: var(--bk-1); border: 1px solid var(--line-2); border-radius: 18px; padding: 14px 16px; overflow: hidden;
  display: flex; flex-direction: column; gap: 2px; animation: panelIn .45s var(--ease) both;
}
.ad-stat::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--y); }
.ad-stat span { font-size: 12px; font-weight: 800; color: var(--mut); text-transform: uppercase; letter-spacing: .08em; }
.ad-stat b { font-family: var(--f-display); font-size: 32px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ad-stat b small { font-size: 16px; color: var(--mut); }
.ad-stat > small { color: var(--mut); font-size: 12px; }
.ad-stat.hot { border-color: var(--y); background: linear-gradient(135deg, rgba(255,196,0,.16), var(--bk-1)); }
.ad-stat.hot b { color: var(--y); }
.ad-stat .btn { margin-top: 6px; align-self: flex-start; }
.ad-stat.big { border-color: var(--y); }
.ad-stat.big b { color: var(--y); font-size: 38px; }
.ad-filter { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }

/* Masa kutuları */
.ad-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.ttile.sel { outline: 3px solid var(--y); outline-offset: 2px; }
.tt-waiter { font-size: 12px; font-weight: 700; margin-top: 4px; color: var(--tx); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-waiter .muted, .muted { color: var(--mut); font-weight: 600; }
.tt-long { color: var(--red); }
.tt-total small { font-size: 13px; color: var(--mut); }
.tb-iban { background: var(--blue); color: #061528; }

/* Masa detayı çekmecesi */
.adrawer { width: min(760px, 100vw); display: flex; flex-direction: column; }
.ad-body { flex: 1; }
.ad-tools { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.ad-tools .select { width: auto; flex: 1; min-width: 170px; padding: 8px 12px; }
.ad-bulk { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 10px 12px; margin-bottom: 12px; border-radius: 14px; background: var(--bk-2); border: 1px dashed var(--line); }

.ad-order { background: var(--bk-2); border: 1px solid var(--line-2); border-radius: 14px; padding: 10px 12px; margin-bottom: 10px; animation: oIn .4s var(--spring) both; }
.ad-order.st-pending { border-color: var(--y); box-shadow: 0 0 0 3px var(--y-soft); }
.ad-order.st-ready { border-color: var(--green); }
.ad-order.st-approved, .ad-order.st-preparing { border-color: rgba(77,163,255,.5); }
.ad-oh { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.ad-oh .muted { flex: 1; font-size: 12px; }
.ad-oh .icon-btn { width: 32px; height: 32px; font-size: 13px; }

.ad-line {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) auto auto 74px; gap: 8px; align-items: center;
  padding: 7px 6px; border-top: 1px dashed var(--line-2); border-radius: 10px; transition: background .15s;
}
.ad-line[data-pick] { cursor: pointer; }
.ad-line[data-pick]:hover { background: rgba(255,255,255,.03); }
.ad-line.on { background: var(--y-soft); box-shadow: inset 3px 0 0 var(--y); }
.ad-line.void .ad-n b, .ad-line.void .ad-t { text-decoration: line-through; color: var(--mut); }
.ad-line.comp .ad-t { text-decoration: line-through; color: var(--mut); }
.ad-line.paid { opacity: .6; }
.ad-q { font-family: var(--f-display); font-size: 20px; color: var(--y); }
.ad-n { display: flex; flex-direction: column; min-width: 0; }
.ad-n small { color: var(--y-2); font-size: 12px; }
.ad-n em { color: var(--y); font-style: normal; font-size: 12px; }
.ad-t { font-family: var(--f-display); font-size: 18px; text-align: right; white-space: nowrap; }
.ad-la { display: flex; gap: 4px; justify-content: flex-end; }
.ad-la .icon-btn { width: 32px; height: 32px; font-size: 13px; }
.ad-sel { grid-column: auto; }
.tag { display: inline-block; margin: 2px 4px 0 0; font-size: 10px; font-weight: 900; padding: 1px 7px; border-radius: 6px; letter-spacing: .03em; width: fit-content; }
.tag-comp { background: rgba(61,220,132,.18); color: var(--green); }
.tag-void { background: rgba(255,77,77,.18); color: var(--red); }
.tag-paid { background: rgba(77,163,255,.18); color: var(--blue); }

/* Hesap özeti */
.ad-sum { margin: 14px 0; padding: 12px 14px; border-radius: 16px; background: var(--bk-2); border: 1px solid var(--line-2); }
.ad-sum > div { display: flex; justify-content: space-between; align-items: baseline; padding: 3px 0; }
.ad-sum > div b { font-family: var(--f-display); font-size: 18px; }
.ad-sum .ok { color: var(--green); }
.ad-sum .due { border-top: 1px dashed var(--line-2); margin-top: 4px; padding-top: 6px; }
.ad-sum .rem { border-top: 2px solid var(--y); margin-top: 6px; padding-top: 8px; }
.ad-sum .rem span { font-family: var(--f-display); font-size: 22px; letter-spacing: .06em; color: var(--y); }
.ad-sum .rem b { font-size: 38px; color: var(--y); }
.ad-sum .hint { display: block; }

/* Ödeme paneli */
.ad-pay { padding: 14px; border-radius: 18px; background: var(--bk-1); border: 1px solid var(--line); border-top: 3px solid var(--y); }
.ad-modes, .ad-split, .ad-methods { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.ad-modes button, .ad-split button {
  flex: 1; padding: 9px 12px; border-radius: 12px; background: var(--bk-2); border: 1.5px solid var(--line-2); font-weight: 800; font-size: 13px; white-space: nowrap;
}
.ad-modes button.on, .ad-split button.on { background: var(--y); color: #111; border-color: var(--y); }
.ad-split { align-items: center; }
.ad-split .input { width: 80px; flex: none; padding: 8px 10px; }
.ad-split .hint { flex-basis: 100%; }
/* Hesabı böl: kişi başı satırlar */
.ad-split-sum { margin: -2px 0 8px; }
.ad-split-sum .ok { color: var(--green); }
.ad-shares { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.ad-share { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: var(--bk-2); border: 1.5px solid var(--line-2); flex-wrap: wrap; }
.ad-share .no { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--bk-3); font-weight: 900; font-size: 13px; }
.ad-share > b { font-family: var(--f-display); font-size: 22px; color: var(--y); min-width: 92px; }
.ad-share-ms { flex: 1; display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.ad-share-ms button { display: flex; flex-direction: column; align-items: center; min-width: 54px; padding: 5px 6px; border-radius: 10px; background: var(--bk-1); border: 1.5px solid var(--line-2); font-size: 18px; line-height: 1.1; }
.ad-share-ms button small { font-size: 10px; font-weight: 800; color: var(--mut); }
.ad-share-ms button.on { border-color: var(--y); background: var(--y-soft); }
.ad-share-ms button.on small { color: var(--tx); }
.ad-share-ms .select { width: auto; padding: 6px 8px; font-size: 12px; }
.ad-share-m { flex: 1; font-weight: 700; font-size: 13px; }
.ad-share-m small { color: var(--mut); margin-left: 4px; }
.ad-tick { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 2px solid var(--line-2); background: var(--bk-1); color: var(--mut); font-size: 22px; font-weight: 900; transition: all .15s var(--spring); }
button.ad-tick:hover { border-color: var(--green); color: var(--green); transform: scale(1.06); }
.ad-tick.on { display: grid; place-items: center; background: var(--green); border-color: var(--green); color: #07210f; }
.ad-share.paid { border-color: rgba(61,220,132,.45); background: linear-gradient(90deg, rgba(61,220,132,.10), var(--bk-2) 60%); }
.ad-share.paid > b { color: var(--green); }
.ad-share.paid .no { background: var(--green); color: #07210f; }
.ad-methods button {
  flex: 1; min-width: 110px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 8px; border-radius: 14px;
  background: var(--bk-2); border: 2px solid var(--line-2); font-weight: 800; font-size: 13px; transition: all .15s var(--spring);
}
.ad-methods button span { font-size: 26px; }
.ad-methods button.on { border-color: var(--y); background: var(--y-soft); transform: translateY(-2px); }
#mealSel, #customAmt { margin-bottom: 10px; }
.ad-cash { display: flex; gap: 10px; align-items: flex-end; margin-bottom: 12px; flex-wrap: wrap; }
.ad-cash label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 800; color: var(--mut); flex: 1; min-width: 120px; }
.ad-change { flex: 1; min-width: 130px; display: flex; flex-direction: column; padding: 8px 12px; border-radius: 12px; background: rgba(61,220,132,.12); border: 1px solid rgba(61,220,132,.4); font-size: 12px; font-weight: 800; color: var(--green); }
.ad-change b { font-family: var(--f-display); font-size: 26px; }
.ad-change.neg { background: rgba(255,77,77,.12); border-color: rgba(255,77,77,.4); color: var(--red); }

.ad-pays { margin-top: 14px; }
.ad-payrow { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--bk-2); border: 1px solid var(--line-2); margin-top: 6px; }
.ad-payrow > span { font-size: 22px; }
.ad-payrow > div { flex: 1; display: flex; flex-direction: column; }
.ad-payrow b { font-family: var(--f-display); font-size: 20px; color: var(--green); }
.ad-payrow small { color: var(--mut); font-size: 12px; }
.ad-close { margin: 16px 0 8px; }

/* Masa taşıma */
.ad-movegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; max-height: 60vh; overflow: auto; }
.ad-movegrid .ttile { min-height: 80px; }

/* Gün sonu */
.ad-rhead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.ad-rhead h2 { margin: 0 auto 0 0; font-family: var(--f-display); font-size: 30px; letter-spacing: .04em; text-transform: uppercase; }
.ad-rgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.orders-table tr.voided td { opacity: .5; text-decoration: line-through; }

@media (max-width: 700px) {
  .ad-line { grid-template-columns: 30px minmax(0, 1fr) 70px; }
  .ad-line .ad-sel, .ad-line .ad-la { grid-column: 2 / -1; justify-self: end; }
}

/* Yazdırma: sadece fiş / rapor */
#printArea { display: none; }
@media print {
  body * { visibility: hidden !important; }
  #printArea, #printArea * { visibility: visible !important; }
  #printArea { display: block; position: absolute; left: 0; top: 0; width: 100%; color: #000; background: #fff; }
  .rc { width: 72mm; margin: 0 auto; font-family: 'Courier New', monospace; font-size: 12px; }
  .rc.rc-wide { width: 100%; font-family: Arial, sans-serif; }
  .rc h2 { text-align: center; margin: 0 0 4px; font-size: 16px; }
  .rc .c { text-align: center; margin: 2px 0; }
  .rc table { width: 100%; border-collapse: collapse; margin: 6px 0; border-top: 1px dashed #000; }
  .rc td { padding: 2px 0; vertical-align: top; color: #000; }
  .rc .r { text-align: right; white-space: nowrap; }
  .rc .tot .big td { font-weight: 900; font-size: 15px; border-top: 1px dashed #000; }
  .rc * { color: #000 !important; background: none !important; box-shadow: none !important; border-color: #999 !important; }
}

/* Hesaba hızlı ürün ekleme */
#qaSearch { margin-bottom: 10px; }
.qa-cats { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 8px; }
.qa-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; max-height: 38vh; overflow-y: auto; padding: 2px; }
.qa-prod { display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: 12px; background: var(--bk-2); border: 1.5px solid var(--line-2); text-align: left; transition: all .15s var(--spring); }
.qa-prod:hover:not(:disabled) { border-color: var(--y); transform: translateY(-1px); }
.qa-prod:active:not(:disabled) { transform: scale(.97); }
.qa-prod:disabled { opacity: .45; cursor: not-allowed; }
.qa-e { font-size: 22px; }
.qa-n { flex: 1; font-weight: 700; font-size: 13px; line-height: 1.2; }
.qa-n small { color: var(--red); font-weight: 900; }
.qa-prod b { color: var(--y); font-size: 13px; white-space: nowrap; }
.qa-pick { padding: 12px; border-radius: 14px; background: var(--bk-2); border: 1.5px solid var(--y); max-height: 38vh; overflow-y: auto; }
.qa-cart { margin-top: 12px; padding: 10px; border-radius: 14px; border: 1px dashed var(--line-2); display: flex; flex-direction: column; gap: 6px; }
.qa-line { display: flex; align-items: center; gap: 10px; }
.qa-ln { flex: 1; font-weight: 700; display: flex; flex-direction: column; }
.qa-ln small { color: var(--mut); font-weight: 600; font-size: 12px; }
.qa-line b { color: var(--y); font-family: var(--f-display); font-size: 17px; }
.qa-dest { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.qa-dest label { flex: 1; min-width: 200px; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--bk-2); border: 1.5px solid var(--line-2); font-weight: 700; font-size: 13px; cursor: pointer; }
.qa-dest label.on { border-color: var(--y); background: var(--y-soft); }
.qa-dest input { accent-color: var(--y); }
