/* =========================================================
   Bolu Et Mangal — Tasarım sistemi (tüm sayfalar)
   Renkler logodan türetildi: kömür grisi + köz turuncusu
   ========================================================= */
:root {
  --coal-950: #111213;
  --coal-900: #18191a;
  --coal-850: #1e2021;
  --coal-800: #25282a;
  --coal-700: #30343a;
  --coal-600: #454a50;

  --cream-50: #fcfaf6;
  --cream-100: #f6f1e8;
  --cream-200: #ece4d6;
  --cream-300: #dcd1bf;

  --ink: #1b1c1d;
  --ink-2: #4b4743;
  --muted: #7a736b;
  --line: #e4dccd;

  --ember-300: #f7c26b;
  --ember-400: #f2a33a;
  --ember-500: #e57a2e;
  --ember-600: #cc5428;
  --ember-700: #a83f22;
  --ember-grad: linear-gradient(135deg, #f4b04a 0%, #e57a2e 45%, #c9452a 100%);

  --ok: #2f7d4f;
  --ok-bg: #e6f2ea;
  --warn: #9a6200;
  --warn-bg: #fbf0d9;
  --bad: #b3261e;
  --bad-bg: #fbe5e3;
  --info: #2c5d86;
  --info-bg: #e3edf6;

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-ui: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 26px;
  --shadow-sm: 0 1px 2px rgba(20, 16, 12, .06), 0 1px 1px rgba(20, 16, 12, .04);
  --shadow-md: 0 6px 20px -6px rgba(20, 16, 12, .18);
  --shadow-lg: 0 24px 60px -18px rgba(20, 16, 12, .35);
  --container: 1240px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  /* Temaya göre değişen yüzeyler */
  --surface: #fff;
  --ember-tint: #fdeedd;
  --warn-ink: #6d4a07;
  color-scheme: light;
}

/* ---------- Koyu tema (ziyaretçi seçer; ilk açılışta cihaz ayarı) ---------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --cream-50: #121314;
  --cream-100: #1a1c1e;
  --cream-200: #2a2d30;
  --cream-300: #3b4044;
  --surface: #1d1f21;
  --ink: #f2ede5;
  --ink-2: #cdc6bb;
  --muted: #9c958b;
  --line: #2e3235;
  --ember-600: #f08a4b;
  --ember-700: #f4a24e;
  --ember-tint: rgba(229, 122, 46, .16);
  --ok: #72d49c;
  --ok-bg: rgba(47, 125, 79, .24);
  --warn: #f3c463;
  --warn-bg: rgba(154, 98, 0, .24);
  --warn-ink: #f3d28f;
  --bad: #ff8f85;
  --bad-bg: rgba(179, 38, 30, .26);
  --info: #93c2e8;
  --info-bg: rgba(44, 93, 134, .3);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .45);
  --shadow-md: 0 10px 26px -10px rgba(0, 0, 0, .7);
  --shadow-lg: 0 24px 60px -18px rgba(0, 0, 0, .8);
}
:root[data-theme="dark"] .input::placeholder, :root[data-theme="dark"] .textarea::placeholder { color: #6f6a63; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
/* Kaydırma çubuğunun yeri her zaman ayrılır: sayfa kısa ya da uzun olsa da genişlik değişmez, header sayfa geçişlerinde kaymaz */
html { scrollbar-gutter: stable; }
body {
  margin: 0;
  overflow-x: clip;
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream-50);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; font-weight: 600; }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ember-500); outline-offset: 2px; border-radius: 4px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.display { font-family: var(--font-display); font-weight: 500; letter-spacing: -.01em; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ember-600);
}
.eyebrow::before { content: ''; width: 22px; height: 2px; background: var(--ember-grad); border-radius: 2px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Butonlar ---------- */
.btn {
  --bg: var(--coal-900); --fg: #fff; --bd: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--bd);
  background: var(--bg); color: var(--fg); font-weight: 700; font-size: 14px; letter-spacing: .01em;
  transition: transform .15s var(--ease), box-shadow .2s var(--ease), background .2s, border-color .2s, color .2s;
  white-space: nowrap; text-decoration: none;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-ember { --bg: var(--ember-grad); background: var(--ember-grad); --fg: #1b1208; }
.btn-ember:hover { box-shadow: 0 10px 28px -10px rgba(229, 122, 46, .8); }
.btn-ghost { --bg: transparent; --fg: var(--ink); --bd: var(--cream-300); }
.btn-ghost:hover { --bd: var(--ink); box-shadow: none; }
.btn-light { --bg: var(--surface); --fg: var(--ink); --bd: var(--line); }
.btn-outline-light { --bg: transparent; --fg: #fff; --bd: rgba(255, 255, 255, .35); }
.btn-outline-light:hover { --bd: #fff; background: rgba(255, 255, 255, .06); box-shadow: none; }
.btn-danger { --bg: var(--bad-bg); --fg: var(--bad); }
.btn-sm { min-height: 34px; padding: 0 14px; font-size: 13px; }
.btn-lg { min-height: 52px; padding: 0 28px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-icon { width: 40px; min-height: 40px; padding: 0; }
.link { color: var(--ember-600); font-weight: 700; }
.link:hover { text-decoration: underline; }

/* ---------- Formlar ---------- */
.field { display: grid; gap: 6px; }
.field > span, .label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: var(--r-md);
  border: 1px solid var(--cream-300); background: var(--surface); color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 96px; resize: vertical; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%237a736b' stroke-width='1.8'%3E%3Cpath d='m1 1 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--ember-500); box-shadow: 0 0 0 4px rgba(229, 122, 46, .14); }
.input::placeholder, .textarea::placeholder { color: #aaa197; }
.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .span-2 { grid-column: span 2; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--ember-600); }
.form-error { padding: 10px 14px; border-radius: var(--r-md); background: var(--bad-bg); color: var(--bad); font-size: 14px; font-weight: 600; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } .form-grid .span-2 { grid-column: auto; } }

/* ---------- Rozet & durum ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; background: var(--cream-100); color: var(--ink-2); white-space: nowrap;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
.badge.plain::before { display: none; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.ember { background: var(--ember-tint); color: var(--ember-700); }

/* ---------- Kart ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.card-pad { padding: 24px; }

/* ---------- Toast ---------- */
.toast-stack { position: fixed; z-index: 1000; left: 20px; bottom: 20px; display: grid; gap: 10px; max-width: min(380px, calc(100vw - 40px)); }
.toast {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-md);
  background: var(--coal-900); color: #fff; box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 600;
  animation: toast-in .3s var(--ease);
}
.toast.error { background: var(--bad); }
.toast.success .icon { color: #7ee2a8; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 900; background: rgba(12, 10, 8, .6); backdrop-filter: blur(4px);
  display: grid; place-items: center; padding: 20px; animation: fade .2s;
}
.modal {
  width: min(560px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--surface); border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg); animation: pop .25s var(--ease);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 24px 0; }
.modal-head h3 { font-family: var(--font-display); font-weight: 500; font-size: 22px; }
.modal-body { padding: 20px 24px 24px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 0 24px 24px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }

/* ---------- Boş durum & yükleniyor ---------- */
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .icon { width: 36px; height: 36px; margin: 0 auto 12px; color: var(--cream-300); }
.empty h4 { color: var(--ink); font-size: 16px; margin-bottom: 6px; }
.skeleton { background: linear-gradient(90deg, var(--cream-100), var(--cream-200), var(--cream-100)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: var(--r-md); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Tablo ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--cream-100); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--cream-50); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
.badge.slate { background: #e3e7ec; color: #4a5866; }
:root[data-theme="dark"] .badge.slate { background: rgba(140, 155, 170, .2); color: #b4c0cc; }
