/* main.css - Vardiya Notlarım
   Tema: KIRMIZI / SİYAH / BEYAZ
   Mobil öncelikli, büyük dokunma hedefleri, yüksek kontrast */

:root {
  --red: #e10600;
  --red-dark: #b30500;
  --red-soft: #ff3b30;
  --black: #0a0a0a;
  --black-2: #161616;
  --black-3: #1f1f1f;
  --line: #2b2b2b;
  --white: #ffffff;
  --gray: #9b9b9b;
  --gray-2: #c9c9c9;
  --ok: #1f1f1f;
  --tap: 52px;
  --radius: 14px;
  --maxw: 560px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--black);
  color: var(--white);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: contain;
}

#app {
  max-width: var(--maxw);
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 17px; }

/* ---------- Üst bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--black);
  border-bottom: 2px solid var(--red);
  padding: 10px 14px;
}
.topbar-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.shift-status { font-size: 14px; color: var(--gray-2); display: flex; align-items: center; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 7px; }
.dot-green { background: #2ecc71; box-shadow: 0 0 8px #2ecc71; }
.dot-red { background: var(--red); box-shadow: 0 0 8px var(--red); }
.mode-btn {
  background: var(--black-3);
  color: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 14px;
  font-weight: 600;
}

/* ---------- İçerik ---------- */
.content {
  flex: 1;
  padding: 14px 14px 96px;
}

/* ---------- Alt menü ---------- */
.bottomnav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--black-2);
  border-top: 2px solid var(--red);
  z-index: 30;
}
.navitem {
  background: none;
  border: none;
  color: var(--gray);
  padding: 9px 0 calc(9px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 11px;
}
.navitem.active { color: var(--white); }
.navitem.active .navicon { transform: translateY(-1px); }
.navitem.active .navlabel { color: var(--red-soft); font-weight: 700; }
.navicon { font-size: 21px; }

/* ---------- Butonlar ---------- */
.btn {
  min-height: var(--tap);
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 17px;
  font-weight: 700;
  padding: 0 18px;
  color: var(--white);
  background: var(--black-3);
  transition: transform .05s ease, background .15s ease;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--red); border-color: var(--red); }
.btn-primary:active { background: var(--red-dark); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--white); }
.btn-danger { background: #000; border: 2px solid var(--red); color: var(--red-soft); }
.btn-block { width: 100%; display: block; margin-top: 10px; }
.btn-xl { min-height: 64px; font-size: 20px; }
.btn-sm { min-height: 40px; font-size: 14px; padding: 0 14px; border-radius: 999px; }

/* ---------- Boş durumlar ---------- */
.empty-state {
  text-align: center;
  padding: 48px 18px;
  color: var(--gray-2);
}
.empty-state.small { padding: 30px 12px; }
.empty-icon { font-size: 54px; margin-bottom: 8px; }
.empty-state h2 { color: var(--white); margin: 6px 0; }
.small { font-size: 14px; }

/* ---------- Ana ekran ---------- */
.home { display: flex; flex-direction: column; gap: 14px; }
.quick-actions-top { display: flex; justify-content: flex-end; }

.amount-box {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--black-2);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 4px 16px;
}
.amount-input {
  flex: 1;
  background: none;
  border: none;
  color: var(--white);
  font-size: 44px;
  font-weight: 800;
  padding: 12px 0;
  outline: none;
  width: 100%;
}
.amount-input.flash { color: var(--red-soft); }
.amount-cur { color: var(--gray); font-size: 22px; font-weight: 700; }

.amt-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}
.amt-btn {
  min-height: var(--tap);
  background: var(--black-2);
  color: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 19px;
  font-weight: 700;
}
.amt-btn:active { transform: scale(.96); border-color: var(--red); }
.amt-special { background: var(--black-3); color: var(--red-soft); border-color: var(--red); }

.field-row { display: flex; gap: 9px; }
.field-row > * { flex: 1; }

.select, .input {
  min-height: var(--tap);
  width: 100%;
  background: var(--black-2);
  color: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 14px;
  outline: none;
}
textarea.input { min-height: 70px; padding: 12px 14px; resize: vertical; }
.select:focus, .input:focus { border-color: var(--red); }
.lbl { display: block; font-size: 13px; color: var(--gray-2); margin: 12px 0 5px; }

/* ---------- Ödeme butonları ---------- */
.pay-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}
.pay-btn {
  min-height: 60px;
  border-radius: var(--radius);
  font-size: 20px;
  font-weight: 800;
  color: var(--white);
  background: var(--black-3);
  border: 2px solid var(--line);
}
.pay-btn:active { transform: scale(.97); }
.pay-nakit { border-color: var(--white); }
.pay-kart { border-color: var(--red); color: var(--red-soft); }
.pay-filo { border-color: var(--gray-2); }
.pay-diğer { border-color: var(--line); color: var(--gray-2); }

/* ---------- Büyük aksiyonlar ---------- */
.big-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn-big {
  min-height: 76px;
  border-radius: var(--radius);
  font-size: 19px;
  font-weight: 800;
  color: var(--white);
  border: none;
}
.btn-big:active { transform: scale(.97); }
.btn-talk { background: var(--red); }
.btn-suspect { background: #000; border: 2px solid var(--red); color: var(--red-soft); }

/* ---------- Son kayıt kartı ---------- */
.last-card {
  background: var(--black-2);
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  border-radius: var(--radius);
  padding: 13px;
}
.last-card.empty { color: var(--gray); text-align: center; border-left-color: var(--line); }
.last-head { display: flex; align-items: baseline; gap: 10px; }
.last-time { color: var(--gray-2); font-size: 14px; }
.last-amount { font-size: 24px; font-weight: 800; }
.last-pay { margin-left: auto; font-weight: 700; color: var(--red-soft); }
.last-meta { margin: 8px 0; font-size: 14px; color: var(--gray-2); }
.last-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  background: var(--black-3);
  color: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 14px;
  font-weight: 600;
  min-height: 40px;
}
.chip-danger { color: var(--red-soft); border-color: var(--red); }

/* ---------- Bugünkü özet ---------- */
.today-summary { margin-top: 2px; }
.sum-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}
.sum-item {
  background: var(--black-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.sum-item span { color: var(--gray-2); font-size: 14px; }
.sum-item b { font-size: 17px; }

/* ---------- Etiketler ---------- */
.tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.tag-ok { color: var(--white); border-color: var(--gray); }
.tag-warn { color: #ffd166; border-color: #6b5b00; }
.tag-danger { color: var(--red-soft); border-color: var(--red); }

.rec-indicator { color: var(--red-soft); font-weight: 800; text-align: center; margin: 14px 0; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .35; } }

/* ---------- Modal ---------- */
#modal { display: none; }
#modal.show { display: block; }
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.72);
  z-index: 40;
}
.modal-card {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--maxw);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--black-2);
  border-top: 3px solid var(--red);
  border-radius: 18px 18px 0 0;
  padding: 18px 16px calc(20px + env(safe-area-inset-bottom));
  z-index: 41;
  animation: slideUp .18s ease;
}
@keyframes slideUp { from { transform: translate(-50%, 30px); opacity: .6; } to { transform: translate(-50%, 0); opacity: 1; } }
.modal-card h3 { margin: 2px 0 12px; color: var(--white); }
.modal-card p { color: var(--gray-2); font-size: 15px; }
.modal-actions { display: flex; gap: 10px; margin-top: 16px; }
.modal-actions .btn { flex: 1; margin-top: 0; }

/* ---------- Kayıt detay ---------- */
.detail-grid { display: flex; flex-direction: column; }
.att-row { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; align-items: center; }
.att-thumb { position: relative; width: 72px; height: 72px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.att-thumb img { width: 100%; height: 100%; object-fit: cover; }
.att-del {
  position: absolute; top: 2px; right: 2px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--red); color: #fff; border: none;
  font-weight: 800; line-height: 1;
}
.att-add {
  width: 72px; height: 72px;
  border-radius: 10px;
  background: var(--black-3);
  border: 1px dashed var(--red);
  color: var(--red-soft);
  font-size: 12px;
  font-weight: 700;
}
.audit-box { margin-top: 16px; background: var(--black-3); border-radius: 12px; padding: 12px; }
.audit-title { font-size: 13px; color: var(--gray-2); font-weight: 700; margin-bottom: 6px; }
.audit-list { margin: 0; padding-left: 18px; font-size: 13px; color: var(--gray-2); }
.audit-list li { margin: 3px 0; }

/* ---------- Uyarı kutuları ---------- */
.warn-box {
  background: #1a1206;
  border: 1px solid #6b5b00;
  border-radius: 12px;
  padding: 12px;
  margin: 12px 0;
  font-size: 14px;
  color: #ffd166;
}
.warn-box ul, .miss-list { margin: 8px 0 0; padding-left: 18px; }
.warn-box li, .miss-list li { margin: 3px 0; }
.ok-box {
  background: var(--black-3);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  margin: 12px 0;
  font-size: 14px;
  color: var(--gray-2);
}
.miss-list { list-style: none; padding-left: 0; }
.miss-list li { border-bottom: 1px solid var(--line); padding: 8px 0; }

/* ---------- Geçmiş ---------- */
.history, .report { display: flex; flex-direction: column; }
.page-title { font-size: 20px; margin: 4px 0 14px; }
.filter-bar { margin-bottom: 12px; }
.hist-list { display: flex; flex-direction: column; gap: 10px; }
.hist-card {
  background: var(--black-2);
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  border-radius: var(--radius);
  padding: 12px;
}
.hist-card:active { transform: scale(.99); }
.hist-top { display: flex; align-items: center; gap: 8px; }
.hist-top b { font-size: 16px; }
.hist-time { margin-left: auto; color: var(--gray); font-size: 13px; }
.hist-mid { display: flex; gap: 12px; flex-wrap: wrap; margin: 8px 0 6px; font-size: 14px; color: var(--gray-2); }
.hist-bot { display: flex; gap: 14px; font-size: 13px; }
.diff-ok { color: #2ecc71; font-weight: 700; }
.diff-bad { color: var(--red-soft); font-weight: 800; }

/* ---------- Vardiya detay satırları ---------- */
.rec-list-scroll { max-height: 320px; overflow-y: auto; margin-top: 12px; }
.rec-row {
  display: grid;
  grid-template-columns: 52px 1fr 64px 1fr;
  gap: 8px;
  align-items: center;
  padding: 10px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.rec-time { color: var(--gray); }
.rec-amt { font-weight: 700; }
.rec-pay { color: var(--red-soft); font-weight: 600; }
.rec-ev { color: var(--gray-2); font-size: 12px; text-align: right; }

/* ---------- Rapor ---------- */
.report-head {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--black-2);
  border-left: 4px solid var(--red);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 12px;
}
.report-head b { font-size: 18px; }
.report-head span { color: var(--gray); font-size: 14px; }
.report-table { background: var(--black-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.rt-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.rt-row:last-child { border-bottom: none; }
.rt-row span { color: var(--gray-2); }
.rt-row b { font-weight: 700; }
.rt-highlight { background: #1a0000; border-top: 1px solid var(--red); border-bottom: 1px solid var(--red); }
.report-actions { margin-top: 16px; }

/* ---------- Ayarlar ---------- */
.settings { display: flex; flex-direction: column; }
.set-group {
  background: var(--black-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 14px;
}
.set-group h3 { margin: 0 0 10px; font-size: 16px; }
.set-danger { border-color: #3a0000; }
.set-danger h3 { color: var(--red-soft); }
.app-version { text-align: center; color: var(--gray); font-size: 12px; margin-top: 6px; }

/* ---------- Auth ---------- */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.auth-card {
  width: 100%;
  max-width: 360px;
  background: var(--black-2);
  border: 1px solid var(--line);
  border-top: 4px solid var(--red);
  border-radius: 18px;
  padding: 28px 22px;
  text-align: center;
}
.brand { font-size: 26px; font-weight: 900; letter-spacing: .5px; }
.brand::first-letter { color: var(--red); }
.auth-sub { color: var(--gray-2); margin: 6px 0 18px; }
.pin-input {
  width: 100%;
  text-align: center;
  letter-spacing: 12px;
  font-size: 30px;
  font-weight: 800;
  background: var(--black);
  color: var(--white);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
  outline: none;
}
.pin-input:focus { border-color: var(--red); }
.auth-note { color: var(--gray); font-size: 12px; margin-top: 14px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 90px;
  transform: translate(-50%, 20px);
  background: var(--black-3);
  color: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  padding: 13px 18px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  max-width: 90%;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  z-index: 60;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast-warn { border-left-color: #ffd166; color: #ffd166; }
.toast-ok { border-left-color: var(--red); }

/* ---------- SVG ikonlar ve yeni liste/ses bölümleri ---------- */
.icon, .nav-icon, .btn-icon, .mini-icon, .empty-svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}
.nav-icon { width: 25px; height: 25px; }
.btn-icon { width: 22px; height: 22px; margin-right: 7px; }
.mini-icon { width: 17px; height: 17px; margin-left: 5px; color: var(--gray-2); }
.empty-svg { width: 58px; height: 58px; color: var(--red-soft); margin-bottom: 8px; }
.navitem { gap: 4px; }
.navitem.active .nav-icon { color: var(--red-soft); transform: translateY(-1px); }
.navitem:not(.active) .nav-icon { color: var(--gray); }
.navicon { font-size: 0; line-height: 0; display: flex; align-items: center; justify-content: center; }
.btn-big { display: flex; align-items: center; justify-content: center; gap: 4px; }
.btn-big .btn-icon { margin-right: 3px; }

.section-card {
  background: var(--black-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  margin-top: 12px;
}
.section-card h3 { margin: 0 0 10px; font-size: 16px; }
.muted { color: var(--gray); font-size: 14px; }
.today-records { margin-top: 8px; }
.record-card {
  width: 100%;
  text-align: left;
  background: var(--black-3);
  color: var(--white);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line);
  border-radius: 12px;
  padding: 10px 11px;
  margin-top: 8px;
}
.record-card.record-warn { border-left-color: var(--red); }
.record-main { display: grid; grid-template-columns: 56px 1fr 74px; gap: 8px; align-items: center; }
.record-main span { color: var(--gray); font-size: 13px; }
.record-main b { font-size: 18px; }
.record-main strong { text-align: right; color: var(--red-soft); font-size: 14px; }
.record-meta { margin-top: 6px; display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--gray-2); font-size: 13px; }
.record-icons { display: inline-flex; align-items: center; min-width: 34px; justify-content: flex-end; }
.rt-neutral { background: #15120a; border-top: 1px solid #6b5b00; border-bottom: 1px solid #6b5b00; }
.report-head div { display: flex; flex-direction: column; }
.report-head small { color: var(--gray-2); font-size: 12px; margin-top: 3px; }
.stacked-actions { flex-direction: column; }
.stacked-actions .btn { width: 100%; }
.stacked-actions .btn:disabled { opacity: .45; }
.rec-indicator.idle { color: var(--gray-2); animation: none; }
.audio-player { width: 100%; margin-top: 8px; }
.voice-box {
  margin-top: 16px;
  background: var(--black-3);
  border-radius: 12px;
  padding: 12px;
}
.voice-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  margin: 8px 0;
  background: var(--black-2);
}
.voice-item p { margin: 6px 0; color: var(--gray-2); font-size: 13px; }
.voice-actions { display: flex; gap: 8px; margin-top: 8px; }
.support-grid { display: grid; grid-template-columns: 1fr; gap: 7px; margin-bottom: 10px; }
.support-grid div { display: flex; justify-content: space-between; align-items: center; background: var(--black-3); border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; }
.support-grid span { color: var(--gray-2); font-size: 14px; }
.parse-box {
  background: var(--black);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  color: var(--gray-2);
  max-height: 180px;
  overflow: auto;
  font-size: 12px;
  white-space: pre-wrap;
}
.att-add { display: inline-flex; align-items: center; justify-content: center; flex-direction: column; gap: 4px; }
