/* בסיס: RTL, איפוס, טיפוגרפיה, טפסים וכפתורים. מרווחים לוגיים (inline-start/end) כדי שהכיוון יתהפך נכון. */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  direction: rtl;
  text-align: start;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
h1, h2, h3, h4 { margin: 0; line-height: 1.25; text-wrap: balance; }
h1 { font-size: var(--fs-2xl); font-weight: 700; }
h2 { font-size: var(--fs-lg); font-weight: 600; }
h3 { font-size: var(--fs-md); font-weight: 600; }
p { margin: 0; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }

/* שעות, תאריכים וטווחים (07:00–15:00) נשארים משמאל לימין גם בתוך טקסט עברי */
.ltr, time, .num { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.tabular { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: var(--fs-sm); }
.xs { font-size: var(--fs-xs); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* פוקוס גלוי לכל רכיב אינטראקטיבי */
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-sm); }

/* ---------- כפתורים ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 40px; padding: 0 var(--s4);
  font: inherit; font-weight: 500; font-size: var(--fs-sm);
  border-radius: var(--r-md); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: default; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { color: var(--cannot); border-color: #F3B4B4; }
.btn-danger:hover { background: var(--cannot-soft); }
.btn-lg { min-height: 48px; font-size: var(--fs-md); padding: 0 var(--s6); }
.btn-block { width: 100%; }
.icon-btn {
  width: 40px; height: 40px; display: inline-grid; place-items: center;
  border-radius: var(--r-md); border: 1px solid var(--line-strong); background: var(--surface);
  color: var(--ink); cursor: pointer; padding: 0;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 18px; height: 18px; }

/* ---------- טפסים ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: var(--fs-sm); font-weight: 500; color: var(--ink); }
.hint { font-size: var(--fs-xs); color: var(--muted); }
.input, select.input, textarea.input {
  width: 100%; min-height: 44px; padding: 10px 12px;
  font: inherit; font-size: 16px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-md);
  transition: border-color .15s, box-shadow .15s;
}
textarea.input { min-height: 96px; resize: vertical; }
.input:focus { outline: none; border-color: var(--primary); box-shadow: var(--focus); }
.input[aria-invalid="true"] { border-color: var(--cannot); }
input[type="time"].input, input[type="email"].input, input[type="password"].input { direction: ltr; text-align: right; }
.form-error { color: var(--cannot); font-size: var(--fs-sm); }
.form-ok { color: var(--want); font-size: var(--fs-sm); }
