:root {
  --navy: #1b2340;
  --blue: #2357e8;
  --line: #c9ced8;
  --muted: #6b7280;
  --bg: #f3f5f9;
  --card: #fff;
  --ok: #15803d;
  --bad: #b91c1c;
  --warn-bg: #fff7e6;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: #111827;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); font-size: 15px; }
a { color: var(--blue); }
button, .btn {
  font: inherit; border: 1px solid var(--navy); background: var(--navy); color: #fff;
  padding: 8px 14px; border-radius: 6px; cursor: pointer; text-decoration: none; display: inline-block;
}
button.secondary, .btn.secondary { background: #fff; color: var(--navy); }
button:disabled { opacity: .5; cursor: not-allowed; }
input, select, textarea {
  font: inherit; width: 100%; padding: 7px 8px; border: 1px solid var(--line); border-radius: 5px; background: #fff;
}
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; padding: 0; vertical-align: middle; }
input:disabled, select:disabled { background: #f1f1f1; color: #333; }
label.field { display: block; font-size: 12px; font-weight: 600; color: var(--navy); }
label.field small { display: block; font-weight: 400; color: var(--muted); }
label.field input, label.field select { margin-top: 4px; }

.topbar {
  background: #fff; border-bottom: 3px solid var(--blue); padding: 10px 16px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; position: sticky; top: 0; z-index: 5;
}
.brand { font-weight: 900; letter-spacing: 2px; font-size: 22px; color: var(--navy); text-decoration: none; }
.topbar .spacer { flex: 1; }
.topbar .who { font-size: 13px; color: var(--muted); }
.wrap { max-width: 1100px; margin: 0 auto; padding: 16px; }

.section { background: var(--card); border: 1px solid var(--line); margin-bottom: 16px; border-radius: 6px; overflow: hidden; }
.section > h2 {
  margin: 0; background: var(--navy); color: #fff; font-size: 15px; padding: 8px 12px;
}
.section > .body { padding: 12px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.note { font-size: 12px; color: var(--muted); font-style: italic; margin-top: 8px; }
.attr { font-size: 11px; color: var(--muted); margin-top: 6px; }

.repair { border: 1px solid var(--line); border-radius: 6px; padding: 10px; margin-bottom: 10px; }
.repair h3 { margin: 0 0 8px; font-size: 14px; color: var(--navy); display: flex; justify-content: space-between; }
.repair .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin-bottom: 8px; }
.total { font-weight: 700; padding: 7px 8px; border: 1px dashed var(--line); border-radius: 5px; margin-top: 4px; background: #fafafa; }
.photos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.photo-slot {
  border: 1px dashed var(--line); border-radius: 6px; aspect-ratio: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; font-size: 12px; color: var(--muted);
  position: relative; overflow: hidden; cursor: pointer; background: #fafafa;
}
.photo-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-slot .tag {
  position: absolute; left: 4px; top: 4px; background: var(--navy); color: #fff; font-weight: 700;
  padding: 1px 6px; border-radius: 4px; z-index: 1;
}
.photo-slot input { display: none; }
.photo-slot.busy::after { content: "Yükleniyor…"; position: absolute; inset: 0; background: rgba(255,255,255,.8); display: flex; align-items: center; justify-content: center; }
.checks { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.checks label { display: flex; gap: 6px; align-items: center; font-weight: 600; font-size: 14px; }

table.grid { width: 100%; border-collapse: collapse; }
table.grid th, table.grid td { border: 1px solid var(--line); padding: 4px; font-size: 13px; text-align: center; }
table.grid th { background: #e9ecf3; color: var(--navy); }
table.grid td input { border: 0; padding: 6px 4px; text-align: center; }
.okmark { color: var(--ok); font-weight: 700; }
.badmark { color: var(--bad); font-weight: 700; }
.scroll { overflow-x: auto; }

.status-choice { display: flex; gap: 24px; flex-wrap: wrap; font-weight: 700; font-size: 16px; }
.status-choice label { display: flex; gap: 8px; align-items: center; }
canvas.sig { width: 100%; max-width: 480px; height: 160px; border: 1px solid var(--line); border-radius: 6px; background: #fff; touch-action: none; display: block; }

.savebar {
  position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding: 10px 16px;
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}
.savebar .msg { flex: 1; font-size: 13px; color: var(--muted); }
.savebar .msg.err { color: var(--bad); }
.banner { background: var(--warn-bg); border: 1px solid #f0c36d; padding: 10px 12px; border-radius: 6px; margin-bottom: 16px; }

table.list { width: 100%; border-collapse: collapse; background: #fff; }
table.list th, table.list td { border-bottom: 1px solid var(--line); padding: 10px 8px; text-align: left; font-size: 14px; }
table.list th { background: var(--navy); color: #fff; font-size: 12px; }
.pill { font-size: 12px; padding: 2px 8px; border-radius: 99px; background: #e5e7eb; }

@media (max-width: 640px) {
  .photos { grid-template-columns: repeat(2, 1fr); }
  .hide-sm { display: none; }
}

/* ---------- Saha (mobil, eldivenle kullanım) ---------- */
.wrap.narrow { max-width: 720px; padding-bottom: 120px; }
button.big, .btn.big { font-size: 18px; font-weight: 700; padding: 16px 20px; min-height: 56px; border-radius: 10px; width: 100%; text-align: center; margin-top: 8px; }
button.danger { background: #fff; color: var(--bad); border-color: var(--bad); }
.wrap.narrow input, .wrap.narrow select { font-size: 18px; padding: 12px; min-height: 52px; }
.wrap.narrow label.field { font-size: 14px; }
.wrap.narrow input[type=radio] { width: 26px; height: 26px; min-height: 0; }
.choice { display: grid; gap: 8px; }
.choice label {
  display: flex; gap: 12px; align-items: center; border: 2px solid var(--line); border-radius: 10px;
  padding: 14px; font-weight: 700; font-size: 16px; background: #fff; cursor: pointer;
}
.choice label:has(input:checked) { border-color: var(--blue); background: #eef3ff; }
.grid4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .grid4 { grid-template-columns: repeat(4, 1fr); } }
.env-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 10px; }
.env-head { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.env-head strong { color: var(--navy); }
.dp { margin-top: 8px; font-size: 14px; }

.shot { border: 2px dashed var(--line); border-radius: 12px; padding: 10px; position: relative; background: #fafafa; }
.shot.has { border-style: solid; border-color: var(--ok); }
.shot img { width: 100%; max-height: 360px; object-fit: contain; border-radius: 8px; display: block; background: #000; }
.shot-empty { font-size: 18px; text-align: center; color: var(--muted); padding: 36px 0; line-height: 1.6; }
.shot-id { font-size: 12px; color: var(--muted); margin-top: 4px; }
.shot.busy::after {
  content: "Yükleniyor…"; position: absolute; inset: 0; background: rgba(255,255,255,.85); font-size: 20px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; border-radius: 12px;
}
.unit-wrap { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.unit-wrap input { font-size: 26px !important; font-weight: 700; }
.unit { font-size: 20px; font-weight: 700; color: var(--navy); }
.big-num { margin-top: 14px; }

.repair-item {
  display: flex; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 10px;
  margin-bottom: 8px; text-decoration: none; color: inherit; background: #fff; min-height: 64px;
}
.repair-item .num {
  width: 36px; height: 36px; border-radius: 50%; background: var(--navy); color: #fff; display: flex;
  align-items: center; justify-content: center; font-weight: 800; flex: none;
}
.repair-item .grow { flex: 1; }
.repair-item small { color: var(--muted); }
.pill.ok { background: #dcfce7; color: var(--ok); font-weight: 700; }
.pill.bad { background: #fee2e2; color: var(--bad); font-weight: 700; }
.pill.approved { background: #dcfce7; color: var(--ok); }

.back { display: inline-block; font-size: 16px; font-weight: 700; padding: 8px 0 12px; text-decoration: none; }
.dots { display: flex; gap: 6px; margin-bottom: 10px; }
.dot {
  width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); display: flex; align-items: center;
  justify-content: center; font-size: 13px; font-weight: 700; color: var(--muted);
}
.dot.done { background: var(--ok); border-color: var(--ok); color: #fff; }
.dot.cur { border-color: var(--blue); color: var(--blue); }
.step-title { margin: 4px 0 14px; color: var(--navy); }
table.grid.sum td { font-size: 18px; padding: 10px; text-align: left; }
table.grid.sum tr.tot td { font-weight: 800; background: #eef0f5; }
.verdict { margin-top: 14px; padding: 18px; border-radius: 10px; font-size: 22px; font-weight: 800; text-align: center; }
.verdict small { font-size: 14px; font-weight: 500; }
.verdict.ok { background: #dcfce7; color: var(--ok); }
.verdict.bad { background: #fee2e2; color: var(--bad); }
.banner.ok { background: #dcfce7; border-color: #86efac; }
.actions { display: grid; gap: 4px; margin-top: 12px; }
.savebar .btn.big, .savebar button.big { width: auto; flex: 1; margin-top: 0; }
.pill.ready { background: #fef3c7; color: #92400e; font-weight: 700; }
.count-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.count-grid button { font-size: 24px; }

.weather { border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; border: 2px solid; position: sticky; top: 64px; z-index: 4; }
.weather.ok { background: #f0fdf4; border-color: #86efac; }
.weather.warn { background: #fff7ed; border-color: #fb923c; }
.weather-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 700; }
.weather-row button { padding: 8px 12px; flex: none; }
.weather-msg { color: #9a3412; font-weight: 700; margin: 6px 0; font-size: 14px; }
.weather-edit { margin-top: 8px; }

.step-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 12px; }
.step-card.done { border-color: #86efac; background: #f7fef9; }
.step-card.blocked { opacity: .55; background: #f5f5f5; }
.step-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; color: var(--navy); }
.sig-img { max-width: 320px; max-height: 120px; border: 1px solid var(--line); border-radius: 6px; background: #fff; display: block; }
.step-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.step-picker button { margin-top: 0; font-size: 16px; padding: 12px 8px; }
.step-picker .count { display: inline-block; min-width: 24px; padding: 0 6px; border-radius: 99px; background: rgba(255,255,255,.25); margin-left: 4px; }
.step-picker button.secondary .count { background: #e5e7eb; }
.step-head .grow { flex: 1; }
.summary-bar { background: var(--navy); color: #fff; font-size: 14px; padding: 10px 12px; font-weight: 700; cursor: pointer; }
.list-row { display: flex; gap: 8px; align-items: stretch; }
.list-row .repair-item { flex: 1; }
.print-btn { display: flex; align-items: center; justify-content: center; font-size: 22px; margin-bottom: 8px; min-width: 56px; border-radius: 10px; }
.photo-note { margin-top: 8px; font-size: 16px !important; min-height: 46px !important; }
.photo-note-text { font-style: italic; color: #111; }

.outbox-badge { font-size: 13px; font-weight: 700; background: #fef3c7; color: #92400e; padding: 4px 10px; border-radius: 99px; }
.outbox-badge.warn { background: #fee2e2; color: var(--bad); }

.who-did { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); margin-top: 8px; }
.who-did strong { color: var(--navy); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.chip { background: #fff; color: var(--navy); border: 2px solid var(--line); border-radius: 99px; padding: 10px 14px; font-size: 15px; font-weight: 600; }
.chip.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.location-text { font-size: 17px; font-weight: 700; padding: 10px 12px; background: #eef0f5; border-radius: 8px; margin: 8px 0; }
.tag-hint { background: #fff7e6; border: 1px dashed #f0c36d; border-radius: 8px; padding: 8px 10px; font-size: 14px; }

.progress { height: 12px; background: #e5e7eb; border-radius: 99px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--ok); width: 0; transition: width .3s; }
.editor { border: 2px solid var(--blue); border-radius: 12px; padding: 12px; margin: 10px 0; display: grid; gap: 10px; background: #f8faff; }
.choice.two { grid-template-columns: 1fr 1fr; }
.choice.two label { padding: 12px 8px; font-size: 15px; }
.row-buttons { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; }
.row-buttons .big { margin-top: 0; }
img.mini { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; flex: none; }
button.big.sign { margin-top: 16px; background: var(--ok); border-color: var(--ok); }
