@font-face {
  font-family: Heebo;
  src: url("/static/fonts/heebo-400.woff2");
}
@font-face {
  font-family: Heebo;
  src: url("/static/fonts/heebo-500.woff2");
  font-weight: 500;
}
@font-face {
  font-family: Heebo;
  src: url("/static/fonts/heebo-700.woff2");
  font-weight: 700;
}
@font-face {
  font-family: Heebo;
  src: url("/static/fonts/heebo-900.woff2");
  font-weight: 900;
}
:root {
  --page: #f5f5f5;
  --surface: #fff;
  --ink: #111214;
  --muted: #626262;
  --line: #d6d6d6;
  --soft: #f3f3f3;
  --accent: #f08c00;
  --good: #526957;
  --warn: #756345;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #111214;
    --surface: #191919;
    --ink: #fff;
    --muted: #b0b0b0;
    --line: #444;
    --soft: #242424;
    --good: #a8b7aa;
    --warn: #c0b39c;
    color-scheme: dark;
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 15px/1.55 Heebo, "Arial Hebrew", Arial, sans-serif;
}
#app {
  max-width: 480px;
  min-height: 100dvh;
  margin: auto;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top);
}
h1,
h2,
p {
  margin: 0;
}
h1 {
  font-size: 25px;
  line-height: 1.2;
  letter-spacing: -0.5px;
}
h2 {
  font-size: 16px;
}
header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand {
  font-size: 25px;
  font-weight: 900;
  direction: ltr;
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand svg {
  width: 22px;
  height: 22px;
}
.title {
  padding: 21px 18px 16px;
}
.title small {
  display: block;
  margin-bottom: 6px;
}
main {
  padding: 0 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
footer {
  padding: 14px 18px max(14px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
small,
.muted {
  font-size: 12px;
  color: var(--muted);
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a.btn {
  cursor: pointer;
}
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  width: 100%;
}
.primary {
  background: var(--accent);
  color: #16120c;
  border-color: var(--accent);
}
button:disabled {
  color: var(--muted);
  background: var(--soft);
  cursor: default;
}
.row,
.actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}
.actions > * {
  flex: 1;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
}
input,
textarea,
select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  padding: 12px;
  font-size: 16px;
  min-height: 48px;
}
textarea {
  min-height: 90px;
}
.plate {
  direction: ltr;
  unicode-bidi: isolate;
  display: flex;
  align-self: center;
  background: #ffda3c;
  color: #141414;
  border: 2px solid #292929;
  border-radius: 5px;
  overflow: hidden;
  width: 100%;
  max-width: 290px;
  font-weight: 700;
  font-size: 32px;
  letter-spacing: 2px;
}
.plate i {
  background: #164a96;
  color: #fff;
  font: 700 10px Arial;
  display: grid;
  align-items: end;
  padding: 8px 5px;
  font-style: normal;
}
.plate bdi,
.plate input {
  flex: 1;
  text-align: center;
  padding: 2px 8px;
}
.plate input {
  background: transparent;
  color: #141414;
  border: 0;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 2px;
  min-height: 55px;
}
bdi,
[dir="ltr"] {
  unicode-bidi: isolate;
  font-variant-numeric: tabular-nums;
}
.card {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 14px;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.soft,
.note {
  background: var(--soft);
}
.note {
  padding: 13px;
  border-radius: 7px;
  font-size: 13px;
}
.warn {
  color: var(--warn);
}
.good {
  color: var(--good);
}
.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.chip {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 9px 11px;
  font-size: 12px;
  background: var(--surface);
  color: var(--ink);
}
.selected {
  border: 2px solid var(--accent);
}
.angle-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}
.angle {
  min-height: 90px;
  padding: 0;
  border: 1px dashed var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: var(--soft);
  color: var(--ink);
  font-size: 11px;
}
.angle img {
  width: 100%;
  height: 68px;
  object-fit: cover;
  display: block;
}
.angle span {
  display: block;
  padding: 6px;
}
.progress {
  height: 6px;
  background: var(--line);
}
progress {
  width: 100%;
  height: 6px;
  accent-color: var(--accent);
}
.next {
  border-inline-start: 3px solid var(--accent);
  padding: 10px 12px;
  background: var(--soft);
}
.photo {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  border-radius: 6px;
  background: var(--soft);
}
.camera {
  min-height: 330px;
  background: #252525;
  color: white;
  display: grid;
  place-content: center;
  gap: 24px;
  text-align: center;
  border-radius: 7px;
  padding: 20px;
}
.camera svg {
  width: 100%;
  height: 150px;
  stroke: white;
  fill: none;
}
.error {
  margin: 0 18px 12px;
  padding: 12px;
  border: 1px solid var(--warn);
  border-radius: 7px;
  color: var(--warn);
}
.queue {
  margin: 12px 18px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px;
  text-align: right;
  color: var(--ink);
  min-height: 48px;
}
.faded {
  opacity: 0.45;
}
.carview {
  min-height: 235px;
  background: var(--soft);
  border-radius: 7px;
  overflow: hidden;
}
.carview div[style*="radial-gradient"],
.carview span {
  display: none !important;
}
a {
  color: inherit;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.hidden {
  display: none !important;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.icon {
  width: 19px;
  height: 19px;
  vertical-align: middle;
  flex-shrink: 0;
  margin-inline-end: 8px;
}
.faded-mark {
  opacity: 0.28 !important;
}
summary {
  min-height: 48px;
  padding: 12px;
  cursor: pointer;
}
details .chips {
  padding: 8px;
}
label[hidden] {
  display: none;
}
.angle .photo {
  border-radius: 0;
}
.carview canvas {
  max-width: 100%;
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 11px;
}
.legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.legend b {
  border: 1px solid currentColor;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: grid;
  place-content: center;
}
.legend-dent {
  color: #8d635e;
}
.legend-scratch {
  color: #4f7a8a;
}
.legend-break {
  color: #796684;
}
.legend-glass {
  color: #647b93;
}
.legend-other {
  color: var(--muted);
}
/* Round 1: hidden must win over flex/grid display, including the part picker. */
[hidden] { display: none !important; }
.brand { letter-spacing: -1px; }
.plate { line-height: 1.6; }
.plate i { min-width: 25px; letter-spacing: 0; place-items: end center; }
.note { display: flex; gap: 9px; align-items: start; }
.note .icon { margin: 2px 0 0; }
.next { font-size: 14px; }
.chip.selected { padding: 8px 10px; }
/* Choices retain a neutral selected state; amber identifies the next action/angle. */
.chips .selected, .card.selected { border-color: var(--ink); }
.angle { min-height: 83px; font-size: 10px; border-style: solid; text-align: center; }
.angle.empty { border-style: dashed; }
.angle.current { border: 2px solid var(--accent); }
.angle img { height: 55px; }
.angle span { padding: 3px; }
.angle-placeholder { height: 55px; display: grid; place-items: center; padding: 4px; }
.angle-placeholder svg { width: 24px; height: 24px; color: var(--muted); }
.camera { min-height: 405px; position: relative; overflow: hidden; width: 100%; }
.camera svg { width: 100%; height: 220px; stroke-width: 2; stroke-dasharray: 7 5; opacity: .7; }
.camera p { position: absolute; top: 16px; inset-inline: 16px; font-size: 12px; }
.carview { border: 1px solid var(--line); border-radius: 9px; }
.mark-sheet { gap: 14px; padding: 18px; margin: 0 18px 20px; border: 1px solid var(--line); border-radius: 16px 16px 7px 7px; }
.mark-sheet::before { content: ""; width: 38px; height: 4px; background: var(--line); border-radius: 4px; margin: -7px auto 0; }
.mark-preview { min-height: 0; }
.mark-preview svg { display: block; width: 100%; height: auto; }
.legend { padding: 10px 0; font-size: 10px; }
.legend b { width: 18px; height: 18px; font-size: 10px; }
textarea { resize: vertical; font-size: 13px; }
.damage-row { position: relative; padding: 13px 0; padding-inline-end: 66px; border-bottom: 1px solid var(--line); min-height: 100px; display: flex; flex-direction: column; gap: 5px; }
.damage-row h2 { font-size: 12px; }
.damage-row p, .damage-row strong { font-size: 11px; }
.damage-row .note { padding: 0; background: transparent; font-size: 11px; }
.damage-thumb { position: absolute; inset-inline-end: 0; top: 13px; width: 56px; height: 44px; object-fit: cover; border: 1px solid var(--line); border-radius: 4px; }
.damage-open { font-size: 12px; padding: 0; border: 0; justify-content: start; text-decoration: underline; font-weight: 500; }
.checkbig { width: 55px; height: 55px; background: var(--soft); color: var(--good); border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; font-size: 28px; margin: 10px 0; }

.field-error { color: var(--ink); font-size: 12px; padding: 8px 0; }
.field .invalid { border: 2px solid var(--ink); }

.link-options { display: flex; flex-direction: column; gap: 12px; }

/* S05: אפשרויות הקישור כשורות ברוחב מלא */
.chips.stack { flex-direction: column; align-items: stretch; }
.chips.stack > button { width: 100%; text-align: start; justify-content: flex-start; min-height: 52px; }

/* Approved garage opening and ownership screens (O01–O24). */
.open-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.company{display:flex;align-items:center;justify-content:space-between;font-size:12px;background:var(--soft);padding:11px;border-radius:6px}
.owner-compare .card{padding:11px}
.owner-compare h4{font-size:13px}
.car-summary .plate{width:100%;max-width:260px;margin:8px auto 10px}
.car-summary p{text-align:center}
.model-field{border:0;padding:0;margin:0;min-width:0;display:flex;flex-direction:column;gap:12px}
.model-field legend{font-size:12px;color:var(--muted);margin-bottom:5px}
.model-field>p{font-size:13px}
.model-choice{cursor:pointer;align-items:center;min-height:76px}
.model-choice input{width:18px;min-height:18px;height:18px;flex:none;padding:0;accent-color:var(--ink)}
.model-choice:has(input:checked){border:2px solid var(--ink);padding:11px}
.model-choice b{font-size:13px}
.model-choice small{margin-top:5px}
.model-field .model-list{display:flex;flex-direction:column;gap:8px}
.model-field [hidden]{display:none!important}
.priority-model input{font-size:14px}
.open-fields .field:nth-child(3),.open-fields .field:nth-child(4),.open-fields .field:last-child{grid-column:1/-1}
.open-fields .field{min-width:0;margin:0}.tag{display:inline-block;border:1px solid var(--line);border-radius:4px;padding:2px 6px;font-size:10px;color:var(--muted)}
.company-options{display:flex;gap:8px}.company .btn{width:auto;min-height:32px;padding:4px 12px}
.owner-compare .card{min-width:0}.owner-compare h2{font-size:13px}.owner-compare b{display:block}
.model-list{max-height:280px;overflow:auto}.model-list .model-choice{display:flex;gap:10px;border:1px solid var(--line);border-radius:8px;padding:12px}
.model-list .model-choice:has(input:checked){border:2px solid var(--ink);padding:11px}
.open-steps{background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:18px 36px;line-height:2.4}.open-steps li:first-child{font-weight:700}

/* Plates remain one line inside narrow system and transfer cards. */
.plate, .plate bdi, .plate input { white-space: nowrap; }
.plate { flex-shrink: 0; font-size: clamp(20px, 7vw, 32px); letter-spacing: 1px; }
.plate bdi, .plate input { min-width: 0; }
.car-summary .plate { font-size: clamp(20px, 6vw, 27px); letter-spacing: 1px; }
/* S07/O01 + O23: שורת-בחירה — בלי :has() (טאבלטים עם Chromium ישן); הרדיו לא יורש את עיצוב שדות-הקלט */
.choice { display:flex; align-items:center; gap:12px; border:1px solid var(--line); padding:14px; border-radius:8px; min-height:52px; cursor:pointer; }
.choice > input[type=radio] { flex:0 0 22px; width:22px; height:22px; min-height:0; margin:0; padding:0; accent-color:var(--ink); }
.choice > span { flex:1; text-align:start; }
