:root {
  --bg: #f4f5f7;
  --panel: #ffffff;
  --ink: #1c2230;
  --muted: #6a7385;
  --line: #dde1e8;
  --accent: #1f4e8c;
  --accent-soft: #eaf1fa;
  --ok: #1a7f52;
  --warn: #9a6207;
  --warn-bg: #fdf5e4;
  --bad: #a92b2b;
  --bad-bg: #fbeded;
  --radius: 6px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: 52px;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 "Segoe UI", "Noto Sans Hebrew", Arial, sans-serif;
}

/* ---------------------------------------------------------- שלד */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 30;
  background: var(--accent);
  color: #fff;
  padding: 0 22px;
  height: 52px;
}
.topbar .brand { font-weight: 700; font-size: 17px; }
.topbar .brand.active { text-decoration: underline; }
.topbar a { color: #fff; text-decoration: none; }
.topbar nav { display: flex; gap: 14px; align-items: center; }
.topbar nav a { opacity: .85; }
.topbar nav a:hover { opacity: 1; text-decoration: underline; }
.topbar nav a.active { opacity: 1; font-weight: 700; }
.nav-gap { width: 10px; flex: 0 0 10px; }
.nav-account {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.nav-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 220px;
}
.nav-user-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 50%;
  flex: 0 0 34px;
}
.nav-user-icon svg { width: 18px; height: 18px; display: block; }
.nav-user-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}
.nav-user-name {
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-user-sub {
  font-size: 11px;
  opacity: .8;
  white-space: nowrap;
}
.logout-form { display: inline; margin: 0; }
.icon-btn.topbar-logout {
  width: 34px;
  height: 34px;
  background: transparent;
  border-color: rgba(255, 255, 255, .35);
  color: #fff;
}
.icon-btn.topbar-logout:hover { background: rgba(255, 255, 255, .12); filter: none; }
.icon-btn.topbar-logout svg { width: 18px; height: 18px; }
.topbar nav a.nav-ico {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.topbar nav a.nav-ico svg {
  width: 16px;
  height: 16px;
  display: block;
}
.brand-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
}
.login-wrap {
  min-height: 52vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-card { width: min(420px, 100%); }
.login-form { display: grid; gap: 12px; }
.login-form button { justify-self: start; }
.dash-counts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
@media (max-width: 800px) {
  .dash-counts { grid-template-columns: 1fr 1fr; }
}
.dash-count {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  text-decoration: none;
  color: inherit;
}
.dash-count .dash-n {
  font-size: 28px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.dash-count .dash-l { color: var(--muted); font-size: 13px; line-height: 1.25; }
.dash-count.draft .dash-n { color: var(--muted); }
.dash-count.update .dash-n { color: #c45c26; }
.dash-count.submitted .dash-n { color: #d9822b; }
.dash-count.locked .dash-n { color: var(--ok); }
.dash-count.rejected .dash-n { color: var(--bad); }

main { flex: 1; max-width: 1180px; width: 100%; margin: 22px auto 28px; padding: 0 18px; }

.site-footer {
  margin-top: auto;
  position: sticky;
  bottom: 0;
  z-index: 30;
  background: var(--accent);
  color: #fff;
  padding: 10px 22px;
  font-size: 13px;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.site-footer time { opacity: .9; font-variant-numeric: tabular-nums; }
.site-footer-brand {
  color: #fff;
  text-decoration: none;
  unicode-bidi: isolate;
}
.site-footer-brand:hover { text-decoration: underline; }
.site-footer-version {
  opacity: .9;
  font-variant-numeric: tabular-nums;
  unicode-bidi: isolate;
}


/* ---------------------------------------------------------- פאנלים */

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 18px;
}
.panel > h2 {
  margin: 0 0 12px;
  font-size: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: 100%;
}
.panel > h2 .sub { font-weight: 400; color: var(--muted); font-size: 13px; }
.subhead { font-size: 14px; margin: 14px 0 8px; color: var(--muted); }

.tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 18px;
  padding: 0;
  border-bottom: 1px solid var(--line);
}
.tabs a {
  display: inline-block;
  padding: 8px 16px;
  margin-bottom: -1px;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.tabs a:hover { color: var(--ink); }
.tabs a.active {
  color: var(--accent);
  font-weight: 600;
  border-bottom-color: var(--accent);
}

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }

/* פרטי הנסיעה ופרטי העובד זה לצד זה */
.panels-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.panels-row > .panel { min-width: 0; }
@media (max-width: 900px) { .panels-row { grid-template-columns: 1fr; gap: 0; } }

h1 { font-size: 21px; margin: 0 0 4px; }
.trip-id {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
  unicode-bidi: isolate;
}
.facts-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-start;
  gap: 6px 22px;
  margin: 0 0 8px;
}
.facts-line:last-child { margin-bottom: 0; }
.facts-line.facts-inline { flex-wrap: nowrap; }
.facts-line.facts-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: baseline;
}
.facts-line.facts-split .facts-pair {
  display: flex;
  min-width: 0;
}
.facts-line.facts-split .facts-pair .val,
.facts-line.facts-split .facts-pair input {
  flex: 1;
  min-width: 0;
  width: auto;
}
.facts-pair {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}
.facts-pair .lbl,
.facts-pair label.lbl,
.facts-line > .lbl {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  flex: 0 0 auto;
}
.facts-pair .val {
  min-width: 0;
  color: var(--ink);
  font-weight: 400;
}
.facts-pair .dates-ltr {
  display: inline-block;
}
.facts-pair input[type=date],
.facts-pair input[type=text],
.facts-pair input[type=email],
.facts-pair select,
.facts-line textarea {
  font: inherit;
  max-width: 100%;
}
.facts-line textarea {
  flex: 1;
  min-width: 12rem;
  min-height: 2.6rem;
}
.panel.is-editing .view-only { display: none; }
.panel:not(.is-editing) .edit-only { display: none; }
.icon-save-shape {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.page-head-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}
.page-head-report {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 52px;
  margin-bottom: 8px;
  gap: 12px;
}
.page-head-report h1 {
  margin: 0;
  text-align: center;
  justify-self: center;
}
.header-actions-primary { justify-self: start; }
.header-actions-secondary { justify-self: end; }
.btn-icon {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.btn-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}
.panel.accounting {
  border-color: #c6d8ee;
}
.panel.accounting > h2 {
  color: var(--accent);
}
.books-split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin: 0 0 16px;
}
.books-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: #fff;
}
.books-card .books-k {
  font-size: 12.5px;
  color: var(--muted);
}
.books-card .books-v {
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  margin-top: 4px;
}
.books-card .books-u {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.books-card.recognized { background: #e7f6ee; border-color: #8cc9a6; }
.books-card.recognized .books-v { color: var(--ok); }
.books-card.excess { background: var(--bad-bg); border-color: #e0a0a0; }
.books-card.excess .books-v { color: var(--bad); }
.books-card.private { background: #f3f0fa; border-color: #c5b6e0; }
.books-card.private .books-v { color: #5b3d8a; }
.books-locked-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  justify-content: space-between;
}
.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
}
.header-actions form { display: contents; }
button.btn-sm, .btn.btn-sm {
  padding: 4px 9px;
  font-size: 12.5px;
}

/* ---------------------------------------------------------- טבלאות */

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 7px 9px; text-align: right; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: 12.5px; white-space: nowrap; }
td.num, th.num { text-align: left; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* עמודת עלות + פעולות ברוחב קבוע, כדי שיישרו בין כל טבלאות הדוח. */
th.col-amount, td.col-amount {
  width: 9.5rem;
  min-width: 9.5rem;
  max-width: 9.5rem;
}
th.col-end, td.col-end {
  width: 5.25rem;
  min-width: 5.25rem;
  max-width: 5.25rem;
}
.fx-stale,
.fx-stale .muted,
.facts-pair .val.fx-stale {
  color: var(--bad);
}
input.fx-stale {
  color: var(--bad);
  background: var(--bad-bg);
  border-color: #e0a0a0;
}
.dates-ltr {
  direction: ltr;
  unicode-bidi: isolate;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.car-table .col-add .row-actions { justify-content: flex-start; gap: 4px; }
.car-table th.col-end,
.car-table td.col-end {
  width: 8.75rem;
  min-width: 8.75rem;
  max-width: 8.75rem;
}
.th-sort {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sort-arrows {
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  vertical-align: middle;
}
.sort-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 16px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
  color: var(--muted);
  text-decoration: none;
  line-height: 0;
}
.sort-btn svg { width: 14px; height: 14px; display: block; }
.sort-btn:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.sort-btn.on {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}
tr.total td { font-weight: 700; border-top: 2px solid var(--line); border-bottom: none; }
tbody tr:hover { background: #fafbfc; }
.table-wrap { overflow-x: auto; }

.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.fx-ils-amount {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  padding: 6px 0;
  min-height: 1.4em;
}
.excess { color: var(--bad); }
.zero { color: var(--muted); }

/* ---------------------------------------------------------- טפסים */

.year-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.year-bar-actions {
  display: flex;
  gap: 6px;
}
.year-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.year-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.4rem;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.year-tag:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.year-tag.on {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}
.year-tag.on:hover { filter: brightness(1.08); color: #fff; }

form.inline, .inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.stack-form { display: flex; flex-direction: column; gap: 12px; }
.stack-form > button { align-self: flex-start; }
.leg {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: #fafbfc;
}
.leg h3 { margin: 0 0 10px; font-size: 14px; }
.check {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 14px;
}
.ticket-kind {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  font-size: 14px;
}
.ticket-kind > span { color: var(--muted); font-size: 12px; }
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.panel-head h2 {
  margin: 0;
  font-size: 16px;
  padding: 0;
  border: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  width: max-content;
}
span.section-status {
  display: block;
  width: 10px;
  height: 10px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 50%;
  flex: 0 0 10px;
  align-self: center;
  line-height: 0;
  font-size: 0;
  overflow: hidden;
  box-sizing: border-box;
}
span.section-status.ok { background: var(--ok); }
span.section-status.warn { background: #d9822b; }
span.section-status.err { background: var(--bad); }
.section-issues {
  margin: 0 0 10px;
  padding: 8px 12px 8px 28px;
  border-radius: var(--radius);
  font-size: 13px;
}
.section-issues.err { background: var(--bad-bg); color: var(--bad); }
.section-issues.warn { background: var(--warn-bg); color: var(--warn); }
.section-ack {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  font-size: 13px;
}
.panel-head-actions { display: flex; align-items: center; gap: 4px; }
.panel:not(.is-editing) .js-save-edit { display: none; }
.panel.is-editing .js-start-edit { display: none; }
form.panel { font: inherit; }
.pd-days {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 14px;
}
.pd-days strong {
  font-variant-numeric: tabular-nums;
  margin-right: 6px;
}
.airline-pick {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}
#flight-form:not(:has(#kind-roundtrip:checked)) #return-leg {
  display: none !important;
}
.modal-card.flight,
.modal-card.line {
  width: min(720px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
}
.modal-card.flight { width: min(820px, 100%); }
.modal-card.flight input,
.modal-card.flight select,
.modal-card.line input,
.modal-card.line select { width: auto; }
input[type=time] { min-width: 110px; }
.field { display: flex; flex-direction: column; gap: 3px; }
.field label, .field .lbl { font-size: 12px; color: var(--muted); }
input, select, textarea {
  font: inherit;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  min-width: 0;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}
input[type=date] { min-width: 140px; }
.date-dmy {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  position: relative;
  vertical-align: middle;
}
.date-dmy input[type=date] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  min-width: 0;
}
.date-dmy-text {
  width: 8.4rem;
  min-width: 8.4rem;
  font-variant-numeric: tabular-nums;
  text-align: left;
  direction: ltr;
}
.date-dmy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-color: var(--line);
  background: #fff;
  color: var(--muted);
}
.cal-pop {
  position: absolute;
  top: 100%;
  inset-inline-start: 0;
  left: 0;
  z-index: 50;
  margin-top: 4px;
  padding: 10px;
  width: 15rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
}
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.cal-title { font-weight: 600; }
.cal-nav { width: 28px; height: 28px; padding: 0; background: #fff; color: var(--ink); border-color: var(--line); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.cal-dow { font-size: .75rem; color: var(--muted); padding: 2px 0; }
.cal-day { padding: 5px 0; background: transparent; border: 1px solid transparent; color: var(--ink); font-variant-numeric: tabular-nums; }
.cal-day:hover { border-color: var(--accent); }
.cal-we { color: #d12b2b; }
.cal-today { background: #e4e4e4; }
.cal-sel, .cal-sel.cal-we { background: var(--accent); color: #fff; }
.cal-foot { margin-top: 6px; }
.cal-clear { padding: 3px 10px; background: #fff; color: var(--ink); border-color: var(--line); }
.date-dmy-btn svg { width: 18px; height: 18px; display: block; }
.date-dmy-btn:hover { color: var(--accent); border-color: var(--accent); }
input[type=checkbox] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  padding: 0;
  accent-color: var(--accent);
}
input.w-sm { width: 90px; }
input.w-md { width: 130px; }
input.w-lg { width: 210px; }
input.w-xl { width: 22rem; min-width: 18rem; }

button, .btn {
  font: inherit;
  padding: 6px 13px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
[hidden] { display: none !important; }
button:hover, .btn:hover { filter: brightness(1.08); }
button.ghost, .btn.ghost {
  background: #fff;
  color: var(--accent);
}
button.danger, .btn.danger {
  background: #fff;
  color: var(--bad);
  border-color: #e3bcbc;
  padding: 3px 8px;
  font-size: 12.5px;
}
.row-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
}
.row-actions form { margin: 0; }
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: #fff;
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.icon-btn:hover { background: var(--accent-soft); filter: none; }
.icon-btn.danger { color: var(--bad); border-color: #e3bcbc; }
.icon-btn.danger:hover { background: var(--bad-bg); }
.icon-btn svg { width: 16px; height: 16px; display: block; }
a.icon-btn { text-decoration: none; color: var(--accent); }
.icon-btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}
.icon-btn.submit,
a.icon-btn.submit {
  width: 48px;
  height: 48px;
  color: #fff;
}
.icon-btn.submit svg {
  width: 26px;
  height: 26px;
}
.icon-btn.submit.ok,
a.icon-btn.submit.ok {
  background: var(--ok);
  border-color: #166c46;
  box-shadow: 0 2px 10px rgba(26, 127, 82, .35);
}
.icon-btn.submit.ok:hover,
a.icon-btn.submit.ok:hover {
  background: #166c46;
  filter: none;
}
.icon-btn.submit.warn {
  background: #d9822b;
  border-color: #c47422;
  box-shadow: 0 2px 10px rgba(217, 130, 43, .35);
  cursor: not-allowed;
}
.icon-btn.submit.err {
  background: var(--bad);
  border-color: #8e2424;
  box-shadow: 0 2px 10px rgba(169, 43, 43, .35);
  cursor: not-allowed;
}
.icon-btn.submit.warn:hover,
.icon-btn.submit.err:hover {
  background: inherit;
  filter: none;
}
.icon-btn.submit.warn:hover { background: #d9822b; }
.icon-btn.submit.err:hover { background: var(--bad); }
span.icon-btn.submit { color: #fff; }
.note-row { margin-top: 12px; }
.note-row textarea {
  width: 100%;
  min-height: 4.5rem;
  resize: vertical;
}

body.modal-open { overflow: hidden; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 34, 48, .45);
}
.modal-card {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 20px 16px;
  box-shadow: 0 12px 40px rgba(28, 34, 48, .18);
}
.modal-card h2 { margin: 0 0 14px; font-size: 17px; }
.modal-card.wizard { width: min(520px, 100%); }
.modal-form { display: flex; flex-direction: column; gap: 12px; }
.modal-form input, .modal-form select, .modal-form textarea { width: 100%; }
.modal-form textarea { min-height: 4rem; resize: vertical; }
.clone-choice {
  display: flex;
  gap: 8px;
  margin: 0 0 14px;
}
.clone-choice button { flex: 1; }
.clone-choice button.on {
  background: var(--accent);
  color: #fff;
}
.clone-choice button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 6px;
}
.wizard-nav {
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  font-size: 12.5px;
  color: var(--muted);
}
.wizard-nav li {
  flex: 1;
  text-align: center;
  padding: 6px 4px;
  border-bottom: 2px solid var(--line);
}
.wizard-nav li.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.wizard-nav li.done { color: var(--ok); border-bottom-color: var(--ok); }
.wizard-summary { margin: 0; }
.wizard-summary > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}
.wizard-summary dt { color: var(--muted); font-weight: 400; }
.wizard-summary dd { margin: 0; font-weight: 600; }

/* ---------------------------------------------------------- הודעות */

.note, .warn, .err, .ok {
  border-radius: var(--radius);
  padding: 10px 13px;
  margin-bottom: 14px;
  font-size: 13.5px;
  border: 1px solid;
}
.note { background: var(--accent-soft); border-color: #c6d8ee; }
.warn { background: var(--warn-bg); border-color: #ecd9a8; color: var(--warn); }
.err  { background: var(--bad-bg);  border-color: #eec4c4; color: var(--bad); }
.ok   { background: #eaf6f0; border-color: #b9e0cc; color: var(--ok); }
.warn ul, .err ul { margin: 6px 0 0; padding-inline-start: 18px; }

.badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid #c6d8ee;
}
.badge.draft { background: #eef0f3; color: var(--muted); border-color: var(--line); }
.badge.update { background: #fde8d8; color: #c45c26; border-color: #f3c7a4; }
.badge.submitted { background: var(--warn-bg); color: var(--warn); border-color: #ecd9a8; }
.badge.locked { background: #eaf6f0; color: var(--ok); border-color: #b9e0cc; }
.badge.rejected { background: var(--bad-bg); color: var(--bad); border-color: #f3c4bf; }
.badge.flag { background: var(--warn-bg); color: var(--warn); border-color: #ecd9a8; }

/* ---------------------------------------------------------- התחשבנות */

.settle { width: auto; min-width: 360px; }
.settle td { border: none; padding: 4px 9px; }
.settle tr.sum td {
  border-top: 2px solid var(--ink);
  font-weight: 700;
  font-size: 16px;
  padding-top: 8px;
}
.settle .neg { color: var(--bad); }
.settle.fx-cols { width: 100%; min-width: 0; }
.settle.fx-cols th {
  background: none;
  border: none;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  padding: 4px 9px;
}
.settle.fx-cols td:first-child { padding-right: 0; }

/* ---------------------------------------------------------- ימי פנאי */

.days { display: flex; flex-wrap: wrap; gap: 6px; }
.days form { margin: 0; }
.days button {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
  font-size: 12.5px;
  padding: 4px 9px;
  min-width: 92px;
}
.days button.vac { background: var(--warn-bg); border-color: #ecd9a8; color: var(--warn); }

.day-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
}
.day-pick {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  user-select: none;
  min-width: 148px;
}
.day-pick:hover { border-color: var(--accent); }
.day-pick:has(input:checked) {
  background: var(--warn-bg);
  border-color: #ecd9a8;
}
.day-pick.taken {
  cursor: default;
  opacity: .72;
}
.day-pick.taken:hover { border-color: #ecd9a8; }
.day-pick input[type=checkbox] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  margin: 0;
  padding: 0;
  accent-color: var(--warn);
  flex-shrink: 0;
}
.day-pick .dow {
  font-size: 12px;
  color: var(--muted);
  min-width: 3.6em;
}
.day-pick .dt {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs a {
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  text-decoration: none;
  color: var(--ink);
  font-size: 13px;
}
.tabs a.on { background: var(--accent); color: #fff; border-color: var(--accent); }

.icon-btn.star.on {
  color: #c49212;
  background: #fff8e6;
  border-color: #ecd9a8;
}
.country-tab-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 18px;
  margin-bottom: 12px;
}
.country-tab-tools .field { max-width: 280px; flex: 1 1 180px; }
.country-tab-fav-only {
  padding-bottom: 6px;
  color: var(--ink);
}
.settle-opts td:last-child { width: 1%; white-space: nowrap; }
.settle-opt { justify-content: flex-end; }

th.col-review, td.col-review {
  width: 1%;
  white-space: nowrap;
  vertical-align: middle;
  border-inline-end: 1px solid var(--line);
}
.review-stamp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 3px 10px 3px 7px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  border: 1px solid var(--line);
  background: #eef1f5;
  color: var(--muted);
  white-space: nowrap;
}
.review-stamp svg { width: 16px; height: 16px; display: block; flex-shrink: 0; }
button.review-stamp {
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: #eef1f5;
  color: var(--muted);
  border: 1px solid var(--line);
}
button.review-stamp:hover { filter: none; }
.review-stamp.pending,
button.review-stamp.pending { background: #eef1f5; color: var(--muted); border-color: #d5dae2; }
.review-stamp.approved,
button.review-stamp.approved { background: #e7f6ee; color: var(--ok); border-color: #8cc9a6; }
.review-stamp.rejected,
button.review-stamp.rejected { background: var(--bad-bg); color: var(--bad); border-color: #e0a0a0; }
.review-stamp.private,
button.review-stamp.private { background: #f3f0fa; color: #5b3d8a; border-color: #c5b6e0; }
.review-stamp.clarify,
button.review-stamp.clarify { background: var(--warn-bg); color: var(--warn); border-color: #e0c48a; }
button.review-stamp.pending:hover { background: #e4e8ee; border-color: #b8c0cc; }
button.review-stamp.approved:hover { background: #d8f0e3; }
button.review-stamp.rejected:hover { background: #f6d6d6; }
button.review-stamp.private:hover { background: #ebe4f6; }
button.review-stamp.clarify:hover { background: #f6e6c4; }
.review-choices {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}
.review-choice {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-start;
  margin: 0;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14px;
  background: #fff;
  text-align: left;
  white-space: nowrap;
}
.review-choice:hover { border-color: var(--accent); }
.review-choice.approved:has(:checked) { background: #e7f6ee; border-color: #8cc9a6; }
.review-choice.rejected:has(:checked) { background: var(--bad-bg); border-color: #e0a0a0; }
.review-choice.private:has(:checked) { background: #f3f0fa; border-color: #c5b6e0; }
.review-choice.clarify:has(:checked) { background: var(--warn-bg); border-color: #e0c48a; }
.review-choice.update:has(:checked) { background: #e8eef8; border-color: #9ab0d4; }
.decision-choices {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 8px;
  width: 100%;
}
.decision-choices .review-choice {
  display: flex;
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  box-sizing: border-box;
  justify-content: center;
}
.decision-choices .review-choice span {
  flex: 0 1 auto;
}
.review-choice input {
  width: auto;
  margin: 0;
  flex: 0 0 auto;
}
.review-choice span {
  flex: 1;
  text-align: left;
  white-space: nowrap;
}
tr.line-rejected td, tr.line-clarify td { opacity: 0.72; }

/* ---------------------------------------------------------- מסמכים תומכים */

th.col-docs, td.col-docs {
  width: 1%;
  white-space: nowrap;
  text-align: center;
  vertical-align: middle;
}
.doc-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 3px 9px 3px 7px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #eef1f5;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}
.doc-chip svg { width: 15px; height: 15px; display: block; flex-shrink: 0; }
.doc-chip:hover { filter: none; background: #e4e8ee; }
.doc-chip.has { background: #e7f6ee; color: var(--ok); border-color: #8cc9a6; }
.doc-chip.has:hover { background: #d8f0e3; }
.doc-chip.missing { background: var(--bad-bg); color: var(--bad); border-color: #e0a0a0; }
.doc-chip.missing:hover { background: #f6d6d6; }
.doc-chip.none { background: #fff; color: var(--muted); border-style: dashed; }

.doc-pill {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--line);
}
.doc-pill.has { background: #e7f6ee; color: var(--ok); border-color: #8cc9a6; }
.doc-pill.missing { background: var(--bad-bg); color: var(--bad); border-color: #e0a0a0; }

.docs-banner { margin: 10px 0; }
.docs-banner[hidden] { display: none; }
.doc-files-field input[type=file] { max-width: 100%; }

.docs-panel-body .docs-groups { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.docs-group { border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.docs-group.missing { border-color: #e0a0a0; background: #fffafa; }
.docs-group-head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 7px 10px;
  background: transparent;
  color: var(--ink);
  border: 0;
  font: inherit;
  text-align: right;
  cursor: pointer;
}
.docs-group-head:hover { filter: none; background: var(--accent-soft); }
.docs-group-label { flex: 1; font-weight: 600; }
.docs-group-files { padding: 0 10px 7px; overflow-wrap: anywhere; }

.modal-card.docs {
  width: min(560px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
}
.modal-card.docs.has-viewer { width: min(1080px, 100%); }
.docs-body { display: grid; grid-template-columns: 1fr; gap: 14px; }
.modal-card.docs.has-viewer .docs-body { grid-template-columns: minmax(300px, 380px) 1fr; }
.modal-card.docs.busy { opacity: .75; pointer-events: none; }
.docs-error, .docs-warn { margin: 0 0 10px; }
.docs-error[hidden], .docs-warn[hidden] { display: none; }
.docs-list { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.docs-item { border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; background: #fff; }
.docs-item.old { background: #f7f8fa; }
.docs-item-name {
  display: block;
  width: 100%;
  margin: 0 0 2px;
  padding: 0;
  background: transparent;
  color: var(--accent);
  border: 0;
  font: inherit;
  font-weight: 600;
  text-align: right;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.docs-item-name:hover { filter: none; text-decoration: underline; }
.docs-item-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.docs-item-actions a.btn { text-decoration: none; }
.docs-drop {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 0;
  padding: 16px;
  border: 2px dashed #b9c3d3;
  border-radius: 8px;
  color: var(--accent);
  background: var(--accent-soft);
  cursor: pointer;
}
.docs-drop svg { width: 28px; height: 28px; flex-shrink: 0; }
.docs-drop.over { border-color: var(--accent); background: #dbe8f8; }
.docs-history { margin-top: 10px; font-size: 13px; }
.docs-viewer { min-width: 0; border: 1px solid var(--line); border-radius: 6px; background: #fff; display: flex; flex-direction: column; }
.docs-viewer[hidden] { display: none; }
.docs-viewer-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}
.docs-viewer-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.docs-viewer-actions a.btn { text-decoration: none; }
.docs-viewer-stage { padding: 8px; display: flex; justify-content: center; align-items: flex-start; overflow: auto; }
.docs-frame { width: 100%; height: 62vh; border: 0; background: #f4f5f7; }
.docs-img { max-width: 100%; max-height: 62vh; height: auto; }
@media (max-width: 800px) {
  .modal-card.docs.has-viewer .docs-body { grid-template-columns: 1fr; }
  .docs-frame { height: 50vh; }
}
.docs-include {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0 4px;
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
  cursor: pointer;
}
.docs-include[hidden] { display: none; }
.docs-include input { width: auto; margin: 0; }
.car-pay-row > td { padding-inline-start: 24px; }
.car-pay-table { width: auto; min-width: 60%; margin-bottom: 6px; }
.car-pay-table td { padding: 2px 14px 2px 6px; border: 0; white-space: nowrap; vertical-align: baseline; }
.car-pay-table td.num { text-align: right; }
.car-pay-amt { display: inline-flex; gap: 14px; align-items: baseline; }
.car-pay-table .row-actions { justify-content: flex-start; }
.car-pay-warn { color: var(--danger, #b3261e); margin-bottom: 6px; }

.col-add { width: 1%; white-space: nowrap; }
.extra-row td { background: rgba(127, 127, 127, 0.06); }
.extra-desc { padding-inline-start: 24px; }
.extra-arrow { opacity: .6; margin-inline-end: 4px; }

.error-actions { text-align: center; margin-top: 18px; }
