/* AraçHazır — ortak stil
   Dil: sanayi iş emri fişi + TR plakası. Açık zemin (atölye ışığında okunur),
   plaka mavisi tek vurgu, durumlar kendi renginde. */

:root {
  --bg: #E9ECF0;
  --paper: #FFFFFF;
  --ink: #15202E;
  --ink-2: #4B5666;
  --ink-3: #7A8494;
  --line: #CED4DC;
  --line-2: #E1E5EA;
  --blue: #0A3B8C;
  --blue-band: #163E9E;
  --blue-soft: #E3EAF7;
  --danger: #B42318;

  --st-sirada: #5B6576;
  --st-sirada-bg: #EEF0F3;
  --st-islem: #1E5BC6;
  --st-islem-bg: #E4ECFB;
  --st-parca: #B45309;
  --st-parca-bg: #FCEFDC;
  --st-hazir: #13784A;
  --st-hazir-bg: #DDF3E7;

  --radius-s: 8px;
  --radius-m: 14px;
  --font: 'Barlow', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-cond: 'Barlow Semi Condensed', 'Barlow', system-ui, sans-serif;
  color-scheme: light;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3 { font-family: var(--font-cond); line-height: 1.1; margin: 0; font-weight: 700; }
p { margin: 0; }
a { color: var(--blue); }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.wrap-narrow { width: 100%; max-width: 560px; margin: 0 auto; padding: 0 16px; }

/* ---------- TR plaka ---------- */
.plate {
  --h: 52px;
  display: inline-flex;
  align-items: stretch;
  height: var(--h);
  background: #fff;
  border: 2px solid #111;
  border-radius: 6px;
  overflow: hidden;
  font-family: var(--font-cond);
  font-weight: 700;
  color: #111;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
  white-space: nowrap;
}
.plate__band {
  width: calc(var(--h) * 0.42);
  background: var(--blue-band);
  color: #fff;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: calc(var(--h) * 0.08);
  font-size: calc(var(--h) * 0.26);
  font-family: var(--font);
  font-weight: 600;
}
.plate__text {
  display: flex;
  align-items: center;
  padding: 0 calc(var(--h) * 0.28);
  font-size: calc(var(--h) * 0.66);
  letter-spacing: 0.04em;
}
.plate--s { --h: 36px; }
.plate--l { --h: 76px; }
.plate--xl { --h: clamp(72px, 20vw, 104px); }

/* ---------- butonlar ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 20px;
  border-radius: var(--radius-s);
  border: 2px solid transparent;
  font-weight: 600;
  font-size: 17px;
  text-decoration: none;
  transition: background-color 0.15s, border-color 0.15s, transform 0.1s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: progress; }
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: #082F70; }
.btn--ghost { background: var(--paper); border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink-3); }
.btn--wa { background: #1B8A4C; color: #fff; }
.btn--wa:hover { background: #157240; }
.btn--danger { background: var(--paper); border-color: #F1C4BF; color: var(--danger); }
.btn--block { width: 100%; }
.btn--l { min-height: 60px; font-size: 19px; }
.btn--s { min-height: 44px; padding: 0 14px; font-size: 15px; }
.link-btn { background: none; border: 0; padding: 8px 0; color: var(--blue); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- form ---------- */
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: 15px; }
.field .hint { font-size: 14px; color: var(--ink-3); }
.input {
  width: 100%;
  min-height: 54px;
  padding: 0 14px;
  border: 2px solid var(--line);
  border-radius: var(--radius-s);
  background: #fff;
  font-size: 18px;
}
.input:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px var(--blue-soft); }
.input--plate {
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 30px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  min-height: 64px;
}
.input--plate::placeholder { color: #B8BFC9; }
.form-error { color: var(--danger); font-weight: 600; font-size: 15px; }
.stack { display: grid; gap: 16px; }

/* ---------- yüzeyler ---------- */
.sheet {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
}

/* ---------- durum ---------- */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  background: var(--st-bg);
  color: var(--st);
}
.status-pill::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--st); }
[data-status='Sırada'] { --st: var(--st-sirada); --st-bg: var(--st-sirada-bg); }
[data-status='İşlem Görüyor'] { --st: var(--st-islem); --st-bg: var(--st-islem-bg); }
[data-status='Parça Bekliyor'] { --st: var(--st-parca); --st-bg: var(--st-parca-bg); }
[data-status='Hazır'] { --st: var(--st-hazir); --st-bg: var(--st-hazir-bg); }

/* ---------- alt pencere (modal) ---------- */
.dialog {
  border: 0;
  padding: 0;
  width: min(520px, 100%);
  max-height: 92vh;
  margin: auto auto 0;
  border-radius: 18px 18px 0 0;
  background: var(--paper);
  color: var(--ink);
}
.dialog::backdrop { background: rgba(10, 18, 30, 0.55); }
.dialog__body { padding: 24px 20px calc(20px + env(safe-area-inset-bottom)); display: grid; gap: 16px; }
.dialog__title { font-size: 26px; }
@media (min-width: 640px) {
  .dialog { margin: auto; border-radius: 18px; }
}
.dialog[open] { animation: rise 0.18s ease-out; }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } }

/* ---------- bildirim çubuğu ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  font-weight: 600;
  z-index: 100;
  max-width: calc(100% - 32px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.muted { color: var(--ink-2); }
.small { font-size: 15px; }
.tabular { font-variant-numeric: tabular-nums; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
