/* Birlik Catering: Bootstrap 5 üzerine küçük eklemeler */
:root { --brand: #B3261E; }

.app-width { max-width: 760px; margin-inline: auto; }
.app-width.wide { max-width: 1100px; }

/* Giriş sayfası */
.login-body { min-height: 100vh; display: grid; place-items: center; background: #f4f1ee; padding: 16px; }
.login-card { width: 100%; max-width: 400px; border: 0; border-top: 5px solid var(--brand); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 44px; height: 44px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; font-size: 1.4rem; display: grid; place-items: center; }

/* Gün sekmeleri: telefonda yatay kaydırılır */
.day-tabs { flex-wrap: nowrap; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
.day-tabs .nav-link { text-align: center; white-space: nowrap; padding: 6px 14px; color: #333; background: #fff; border: 1px solid #dee2e6; }
.day-tabs .nav-link.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* Menü satırları */
.menu-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; }
.menu-row.selected { background: #fdf1f0; }
.menu-name { min-width: 0; overflow-wrap: anywhere; }
.qty-box { display: flex; align-items: center; gap: 6px; flex: none; }
.qty-btn { width: 44px; height: 44px; font-size: 1.4rem; line-height: 1; padding: 0; }
.qty-input { width: 64px; height: 44px; font-size: 1.15rem; font-weight: 600; }

/* Alt sabit çubuk: toplam + gönder */
.order-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: #fff; border-top: 1px solid #dee2e6;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -2px 10px rgba(0, 0, 0, .06); }

.toast-box { position: fixed; left: 16px; right: 16px; bottom: 92px; z-index: 2000; max-width: 520px; margin-inline: auto; pointer-events: none; }

/* ---------------------------------------------------------------- Sekreter */
.sec-tabs .nav-link { color: #444; }
.sec-tabs .nav-link.active { color: var(--brand); font-weight: 600; border-bottom-color: #f8f9fa; }
.date-input { max-width: 170px; border-radius: 0; text-align: center; }
.cutoff-input { max-width: 140px; }
.chip { font-size: .9rem; padding: .55em .85em; font-weight: 500; }
.chip.text-bg-light { border: 1px solid #dee2e6; }

.order-card { border-left: 6px solid #adb5bd; }
.order-card.status-pending { border-left-color: #6c757d; }
.order-card.status-sent_to_kitchen { border-left-color: #0d6efd; }
.order-card.status-preparing { border-left-color: #ffc107; }
.order-card.status-ready { border-left-color: #198754; background: #f1faf4; }
.order-card.status-delivered { border-left-color: #212529; opacity: .75; }
.order-card.flash { animation: flash-green 1s ease-in-out 8; }
@keyframes flash-green { 0%, 100% { background: #f1faf4; } 50% { background: #b7ebc6; } }
.order-items li { padding: 1px 0; }
.order-note { background: #fff7e0; border: 1px solid #f1d98a; border-radius: 6px; padding: 4px 8px; margin-top: 4px; }
.ready-alert { font-size: 1.1rem; }
.btn.armed { background: #dc3545; border-color: #dc3545; color: #fff; }
.modal .qty-box { margin-left: auto; }

/* ---------------------------------------------------------------- Mutfak ekranı (koyu, büyük puntolu, dokunmatik) */
body.kitchen { background: #101417; color: #f4f6f8; min-height: 100vh; font-size: 1.15rem; }
.kitchen .toast-box { bottom: 24px; }
.k-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 20px; background: #1a2025; border-bottom: 3px solid var(--brand); }
.k-title { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; font-size: 1.6rem; }
.k-date { font-size: 1.3rem; color: #c9d1d8; }
.k-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.k-clock { font-size: 1.8rem; font-weight: 700; min-width: 4.5ch; text-align: right; }
.k-btn { background: #2a3238; color: #f4f6f8; border: 1px solid #3a444c; border-radius: 10px; padding: 10px 16px; font-size: 1.05rem; min-height: 48px; }
.k-btn:hover { background: #343d44; }

.k-tabs { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 20px 0; align-items: stretch; }
.k-tab { flex: 1 1 200px; max-width: 360px; background: #1a2025; color: #c9d1d8; border: 2px solid #2d363d; border-radius: 12px; padding: 16px; font-size: 1.35rem; font-weight: 800; letter-spacing: .04em; min-height: 64px; }
.k-tab.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.k-count { display: inline-block; margin-left: 8px; background: rgba(255, 255, 255, .2); border-radius: 999px; padding: 0 12px; }
.k-allready { margin-left: auto; background: #1f9d55; color: #fff; border: 0; border-radius: 12px; padding: 16px 28px; font-size: 1.35rem; font-weight: 800; min-height: 64px; }
.k-allready.armed { background: #e8590c; }

.k-main { padding: 16px 20px 40px; }
.k-offline { background: #e8590c; color: #fff; padding: 10px 16px; border-radius: 10px; margin-bottom: 12px; font-weight: 700; }
.k-empty { text-align: center; padding: 80px 16px; font-size: 1.8rem; color: #8b98a3; }
.k-summary { font-size: 1.8rem; font-weight: 800; margin-bottom: 14px; }
.k-summary span { font-weight: 500; color: #ffc078; }
.k-group-title { font-size: 1.2rem; text-transform: uppercase; letter-spacing: .12em; color: #8b98a3; margin: 18px 0 10px; }
.k-totals { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.k-total { background: #1a2025; border: 2px solid #2d363d; border-radius: 14px; padding: 14px 16px; text-align: center; }
.k-total-name { font-size: 1.5rem; font-weight: 700; min-height: 2.2em; display: flex; align-items: center; justify-content: center; line-height: 1.15; }
.k-total-num { font-size: 4.6rem; font-weight: 900; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.k-total-rem { font-size: 1.15rem; color: #ffc078; margin-top: 6px; }
.k-total.done { opacity: .55; border-color: #1f9d55; }
.k-total.done .k-total-rem { color: #69db7c; }

.k-firms { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; align-items: start; }
.k-firm { background: #1a2025; border: 3px solid #2d363d; border-radius: 16px; padding: 14px 16px; }
.k-firm header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 8px; }
.k-firm h3 { font-size: 1.7rem; font-weight: 800; margin: 0; flex: 1 1 100%; line-height: 1.15; }
.k-tag { background: #0d6efd; color: #fff; border-radius: 8px; padding: 2px 10px; font-size: .95rem; font-weight: 800; }
.k-sum { margin-left: auto; font-size: 1.3rem; font-weight: 800; color: #ffc078; }
.k-firm ul { list-style: none; padding: 0; margin: 0 0 8px; }
.k-firm li { display: flex; align-items: baseline; gap: 12px; padding: 4px 0; border-bottom: 1px dashed #2d363d; font-size: 1.45rem; }
.k-firm li b { min-width: 2.4ch; text-align: right; font-size: 1.9rem; color: #fff; font-variant-numeric: tabular-nums; }
.k-note { background: #f1d98a; color: #1c1500; border-radius: 10px; padding: 8px 12px; font-size: 1.25rem; font-weight: 700; margin: 8px 0; }
.k-firm footer { display: flex; gap: 10px; margin-top: 10px; }
.k-act { flex: 1; min-height: 68px; border: 0; border-radius: 12px; font-size: 1.6rem; font-weight: 900; letter-spacing: .04em; color: #fff; }
.k-act.ready { background: #1f9d55; flex: 2; }
.k-act.start { background: #e8a317; color: #1c1500; }
.k-act.undo { background: #2a3238; border: 1px solid #3a444c; font-size: 1.1rem; font-weight: 600; flex: 1; }
.k-ready-mark { flex: 2; display: grid; place-items: center; font-size: 1.7rem; font-weight: 900; color: #69db7c; }
.k-firm.st-preparing { border-color: #e8a317; }
.k-firm.st-preparing .k-tag { background: #e8a317; color: #1c1500; }
.k-firm.st-ready { border-color: #1f9d55; opacity: .7; }
.k-firm.st-ready .k-tag { background: #1f9d55; }
.k-firm.fresh { animation: k-blink 1s ease-in-out 12; }
@keyframes k-blink { 0%, 100% { border-color: #2d363d; box-shadow: none; } 50% { border-color: #ffd43b; box-shadow: 0 0 0 4px rgba(255, 212, 59, .35); } }

@media (prefers-reduced-motion: reduce) {
  .order-card.flash, .k-firm.fresh { animation: none; }
  .k-firm.fresh { border-color: #ffd43b; }
}
