/* Ukrycie pasków przewijania (scrollbars) */
::-webkit-scrollbar { display: none; }
* { -ms-overflow-style: none; scrollbar-width: none; }
/* ============ THEME VARIABLES ============ */
:root, body[data-theme="dark"] {
  --bg: #111318;
  --bg2: #1a1d24;
  --bg3: #23262f;
  --border: #2e323d;
  --text: #e8eaf0;
  --text2: #9aa1b0;
  --accent: #4f8cff;
  --accent-soft: rgba(79, 140, 255, .15);
  --green: #34c77b;
  --green-soft: rgba(52, 199, 123, .16);
  --red: #f05c5c;
  --red-soft: rgba(240, 92, 92, .16);
  --yellow: #f0b429;
  --yellow-soft: rgba(240, 180, 41, .16);
  --shadow: 0 6px 24px rgba(0,0,0,.35);
  --seat-bg: #2a2e38;
}
body[data-theme="light"] {
  /* Мінімалістична тема "Сучасна індиго" (v1.1.1) */
  --bg: #f6f7fb;
  --bg2: #ffffff;
  --bg3: #f0f1f7;
  --border: #e6e8f1;
  --text: #191c26;
  --text2: #6b7280;
  --accent: #4f46e5;
  --accent-soft: rgba(79, 70, 229, .10);
  --green: #189a63;
  --green-soft: rgba(24, 154, 99, .12);
  --red: #dc4a4a;
  --red-soft: rgba(220, 74, 74, .11);
  --yellow: #c98d0a;
  --yellow-soft: rgba(201, 141, 10, .14);
  --shadow: 0 2px 10px rgba(20, 24, 50, .07);
  --seat-bg: #eef0f6;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  -webkit-font-smoothing: antialiased;
  font-family: -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  overflow: hidden;
}
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 13px; }

#app { display: flex; height: 100vh; height: 100dvh; }

/* ============ SIDEBAR ============ */
#sidebar {
  width: 210px; min-width: 210px;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 14px 10px;
}
.logo { display: flex; align-items: center; gap: 10px; padding: 6px 10px 18px; }
.logo-icon { font-size: 24px; }
.logo-text { font-size: 19px; font-weight: 700; letter-spacing: .3px; }
nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border: none; border-radius: 10px;
  background: transparent; color: var(--text2);
  font-size: 14px; font-weight: 600; text-align: left;
  transition: background .15s, color .15s;
}
.nav-item:hover { background: var(--bg3); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); }
.nav-icon { font-size: 17px; }
.sidebar-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 6px; }
.side-btn {
  padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px;
  background: transparent; color: var(--text2); font-size: 12.5px; text-align: left;
}
.side-btn:hover { color: var(--text); background: var(--bg3); }
.version { text-align: center; color: var(--text2); font-size: 11px; padding-top: 6px; }

/* ============ MAIN ============ */
#main { flex: 1; overflow: auto; padding: 20px 24px; }
.view-title { font-size: 21px; font-weight: 700; margin-bottom: 14px; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .spacer { flex: 1; }

.btn {
  padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg2); color: var(--text); font-size: 13px; font-weight: 600;
  transition: background .15s;
}
.btn:hover { background: var(--bg3); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.1); }
.btn.danger { color: var(--red); border-color: var(--red); background: transparent; }
.btn.danger:hover { background: var(--red-soft); }
.btn.small { padding: 4px 10px; font-size: 12px; }
.btn.icon { padding: 8px 10px; }

.input, input.input {
  padding: 8px 11px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg2); color: var(--text); outline: none;
}
.input:focus { border-color: var(--accent); }
input[type="time"], input[type="date"] { color-scheme: dark; }
body[data-theme="light"] input[type="time"], body[data-theme="light"] input[type="date"] { color-scheme: light; }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 20px; font-size: 11.5px; font-weight: 700;
}
.chip.ok { background: var(--green-soft); color: var(--green); }
.chip.no { background: var(--red-soft); color: var(--red); }
.chip.pending { background: var(--yellow-soft); color: var(--yellow); }
.chip.inactive { background: var(--bg3); color: var(--text2); }
.chip.accent { background: var(--accent-soft); color: var(--accent); }

/* ============ CALENDAR ============ */
.cal-layout { display: flex; gap: 18px; align-items: flex-start; }
.cal-left { flex: 1.4; min-width: 480px; }
.cal-right {
  flex: 1; min-width: 380px; background: var(--bg2);
  border: 1px solid var(--border); border-radius: 14px; padding: 16px;
  position: sticky; top: 0;
  max-height: calc(100vh - 110px); overflow: auto;
}
.cal-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.cal-month-title { font-size: 17px; font-weight: 700; min-width: 170px; text-align: center; text-transform: capitalize; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dow { text-align: center; font-size: 11.5px; font-weight: 700; color: var(--text2); padding: 4px 0; text-transform: uppercase; }
.cal-cell {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 10px;
  min-height: 76px; padding: 7px 8px; cursor: pointer; position: relative;
  display: flex; flex-direction: column; gap: 4px;
  transition: border-color .15s, background .15s;
}
.cal-cell:hover { border-color: var(--accent); }
.cal-cell.empty { background: transparent; border-color: transparent; cursor: default; }
.cal-cell.today .cal-daynum { background: var(--accent); color: #fff; }
.cal-cell.selected { border-color: var(--accent); background: var(--accent-soft); }
.cal-cell.weekend .cal-daynum { color: var(--red); }
.cal-cell.today.weekend .cal-daynum { color: #fff; }
.cal-daynum {
  font-weight: 700; font-size: 13px; width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center; border-radius: 50%;
}
.cal-badges { display: flex; gap: 4px; flex-wrap: wrap; margin-top: auto; }
.cal-badge { font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 10px; }
.cal-badge.ok { background: var(--green-soft); color: var(--green); }
.cal-badge.pending { background: var(--yellow-soft); color: var(--yellow); }
.cal-badge.no { background: var(--red-soft); color: var(--red); }

.day-title { font-size: 16px; font-weight: 700; margin-bottom: 3px; text-transform: capitalize; }
.day-sub { color: var(--text2); font-size: 12.5px; margin-bottom: 12px; }
.shift-row { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.shift-row label { font-size: 12.5px; color: var(--text2); font-weight: 600; }

.day-entry { position: relative; overflow: hidden; border-bottom: 1px solid var(--border); }
.day-entry:last-child { border-bottom: none; }
.day-entry-inner {
  display: flex; align-items: center; gap: 8px; padding: 8px 6px;
  background: var(--bg2); position: relative; z-index: 1; transition: transform .18s ease;
}
.day-entry-trash {
  position: absolute; top: 0; right: 0; bottom: 0; width: 72px;
  background: var(--red); color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 20px; z-index: 0; cursor: pointer;
}
.status-cycle {
  width: 26px; height: 26px; min-width: 26px; border-radius: 50%;
  border: none; font-size: 13px; font-weight: 800; color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.status-cycle.ok { background: var(--green); }
.status-cycle.no { background: var(--red); }
.status-cycle.pending { background: var(--yellow); color: #4a3800; }
.entry-name { flex: 1; min-width: 0; cursor: pointer; }
.entry-name .nm { font-weight: 600; font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.entry-name .nm:hover { color: var(--accent); }
.entry-name .st { font-size: 11px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entry-right { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: 0 0 auto; }
.entry-meta { display: flex; align-items: center; gap: 6px; }
.entry-times { display: flex; align-items: center; gap: 4px; }
.entry-times input[type="time"] { width: 74px; padding: 4px 5px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg3); color: var(--text); font-size: 12px; }
.entry-hours { font-size: 12px; font-weight: 700; color: var(--accent); min-width: 42px; text-align: right; }
.entry-del { border: none; background: transparent; color: var(--text2); font-size: 15px; padding: 2px 6px; border-radius: 6px; }
.entry-del:hover { color: var(--red); background: var(--red-soft); }

.add-worker-box { position: relative; margin-top: 12px; }
.dropdown {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 30;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: var(--shadow); max-height: 260px; overflow: auto; margin-top: 4px;
}
.dropdown-item { padding: 8px 12px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.dropdown-item:hover { background: var(--accent-soft); }
.dropdown-item .dd-street { color: var(--text2); font-size: 11.5px; }
.dropdown-empty { padding: 10px 12px; color: var(--text2); font-size: 12.5px; }

.summary-row { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.sum-box { background: var(--bg3); border-radius: 10px; padding: 8px 14px; text-align: center; }
.sum-box .v { font-size: 17px; font-weight: 800; }
.sum-box .l { font-size: 11px; color: var(--text2); font-weight: 600; }
.sum-box.g .v { color: var(--green); }
.sum-box.y .v { color: var(--yellow); }
.sum-box.r .v { color: var(--red); }

/* ============ WORKERS ============ */
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; }
.seg button { border: none; background: var(--bg2); color: var(--text2); padding: 6px 11px; font-size: 12px; font-weight: 600; }
.seg button.active { background: var(--accent); color: #fff; }
table.tbl { width: 100%; border-collapse: collapse; background: var(--bg2); border-radius: 12px; overflow: hidden; }
.tbl th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px;
  color: var(--text2); padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--bg3);
}
.tbl td { padding: 9px 12px; border-bottom: 1px solid var(--border); font-size: 13px; }
.tbl tbody tr { cursor: pointer; transition: background .1s; }
.tbl tbody tr:hover { background: var(--accent-soft); }
.tbl .muted { color: var(--text2); }
.tbl-wrap { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }

/* ============ TRANSPORT ============ */
.veh-grid { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.veh-card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px; width: 300px;
}
.veh-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.veh-name { font-weight: 700; font-size: 15px; flex: 1; }
.veh-type { font-size: 11.5px; color: var(--text2); margin-bottom: 10px; }
.veh-free { margin-left: auto; }
.veh-body {
  background: var(--bg3); border-radius: 18px 18px 12px 12px; padding: 12px 10px 10px;
  border: 2px solid var(--border); position: relative;
}
.veh-windshield {
  height: 6px; border-radius: 6px; background: var(--accent-soft);
  margin: -4px 18px 10px;
}
.seat-row { display: flex; gap: 8px; justify-content: center; margin-bottom: 8px; }
.seat-row.front { justify-content: space-between; padding: 0 4px; }
.seat {
  flex: 1; max-width: 86px; min-height: 52px; border-radius: 9px;
  background: var(--seat-bg); border: 2px solid var(--border);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; padding: 4px 3px; text-align: center; gap: 1px;
  transition: border-color .12s, transform .1s;
}
.seat:hover { border-color: var(--accent); transform: scale(1.03); }
.seat.driver { background: var(--accent-soft); cursor: default; border-style: dashed; }
.seat.driver:hover { transform: none; border-color: var(--border); }
.seat.taken.ok { border-color: var(--green); }
.seat.taken.pending { border-color: var(--yellow); }
.seat.taken.no { border-color: var(--red); }
.seat.taken.none { border-color: var(--accent); }
.seat-label { font-size: 9.5px; color: var(--text2); font-weight: 700; text-transform: uppercase; }
.seat-name { font-size: 10px; font-weight: 700; line-height: 1.15; word-break: break-word; }
.seat-street { font-size: 8.5px; color: var(--text2); line-height: 1.1; }
.seat-plus { font-size: 18px; color: var(--text2); }
.veh-actions { display: flex; gap: 6px; margin-top: 10px; }

.name-cell { display: flex; align-items: center; gap: 6px; }
.row-cal { border: none; background: transparent; font-size: 16px; line-height: 1; padding: 3px 5px; border-radius: 7px; flex: none; }
.row-cal:hover { background: var(--bg3); }

/* ============ MODALS ============ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 400;
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.modal {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow); width: 100%; max-width: 560px;
  max-height: calc(100vh - 60px); overflow: auto; padding: 20px;
}
.modal.wide { max-width: 760px; }
.modal-title { font-size: 17px; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.modal-title .x { margin-left: auto; border: none; background: transparent; color: var(--text2); font-size: 19px; padding: 2px 8px; border-radius: 6px; }
.modal-title .x:hover { background: var(--bg3); color: var(--text); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin-bottom: 14px; }
.form-field { display: flex; flex-direction: column; gap: 4px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-size: 11.5px; font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: .3px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 6px; flex-wrap: wrap; }

.mini-cal { margin-bottom: 14px; }
.mini-cal-title { font-weight: 700; font-size: 13px; margin-bottom: 6px; text-transform: capitalize; }
.mini-grid { display: grid; grid-template-columns: repeat(7, 30px); gap: 3px; }
.mini-cell {
  width: 30px; height: 30px; border-radius: 7px; background: var(--bg3);
  display: flex; align-items: center; justify-content: center;
  font-size: 10.5px; color: var(--text2); position: relative; cursor: default;
}
.mini-cell.ok { background: var(--green-soft); color: var(--green); font-weight: 800; }
.mini-cell.no { background: var(--red-soft); color: var(--red); font-weight: 800; }
.mini-cell.pending { background: var(--yellow-soft); color: var(--yellow); font-weight: 800; }
.mini-cell.blank { background: transparent; }

.type-pick { display: flex; gap: 10px; margin-bottom: 14px; }
.type-opt {
  flex: 1; border: 2px solid var(--border); border-radius: 12px; padding: 10px;
  cursor: pointer; text-align: center; background: var(--bg3);
}
.type-opt.sel { border-color: var(--accent); background: var(--accent-soft); }
.type-opt .t-name { font-weight: 700; font-size: 13px; }
.type-opt .t-desc { font-size: 11px; color: var(--text2); }
.type-opt .t-icon { font-size: 22px; }

.picker-list { max-height: 320px; overflow: auto; border: 1px solid var(--border); border-radius: 10px; margin-top: 8px; }
.picker-item { padding: 9px 12px; display: flex; align-items: center; gap: 10px; cursor: pointer; border-bottom: 1px solid var(--border); }
.picker-item:last-child { border-bottom: none; }
.picker-item:hover { background: var(--accent-soft); }
.picker-item.disabled { opacity: .45; cursor: not-allowed; }
.picker-item .p-name { font-weight: 600; font-size: 13px; }
.picker-item .p-street { font-size: 11.5px; color: var(--text2); }
.picker-item .p-right { margin-left: auto; display: flex; gap: 6px; align-items: center; }

.stat-line { display: flex; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }

#toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--bg3); color: var(--text); border: 1px solid var(--border);
  padding: 10px 18px; border-radius: 10px; box-shadow: var(--shadow);
  font-size: 13px; font-weight: 600; z-index: 600; opacity: 0; transition: all .25s;
  pointer-events: none;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.empty-note { color: var(--text2); font-size: 13px; padding: 16px 4px; text-align: center; }
.section-label { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; color: var(--text2); margin: 14px 0 8px; }

/* ============ VEHICLE (car look with wheels) ============ */
.veh-body { position: relative; margin: 6px 16px 16px; border-radius: 34px 34px 14px 14px; }
.veh-cabin { position: relative; }
.wheel {
  position: absolute; width: 9px; height: 24px; background: #3a3f4b;
  border-radius: 5px; box-shadow: inset 0 0 0 2px rgba(0,0,0,.22);
}
.wheel-fl { left: -9px; top: 28px; }
.wheel-fr { right: -9px; top: 28px; }
.wheel-rl { left: -9px; bottom: 22px; }
.wheel-rr { right: -9px; bottom: 22px; }

/* ============ TRANSPORT LAYOUT + WORKER POOL ============ */
.transport-layout { display: flex; gap: 16px; align-items: flex-start; }
.worker-pool {
  width: 214px; min-width: 214px; background: var(--bg2);
  border: 1px solid var(--border); border-radius: 14px; padding: 12px;
  position: sticky; top: 0; max-height: calc(100vh - 130px); overflow: auto;
}
.worker-pool:empty { display: none; }
.worker-pool.drop-hot { border-color: var(--accent); background: var(--accent-soft); }
.pool-title { font-weight: 700; font-size: 13px; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.pool-hint { font-size: 11px; color: var(--text2); margin-bottom: 10px; line-height: 1.3; }
.pool-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 9px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--bg3);
  margin-bottom: 7px; cursor: grab;
}
.pool-item:active { cursor: grabbing; }
.pool-item:hover { border-color: var(--accent); }
.pool-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.pool-dot.ok { background: var(--green); }
.pool-dot.pending { background: var(--yellow); }
.pool-info { min-width: 0; }
.pool-name { font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pool-street { font-size: 10.5px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.veh-grid { flex: 1; }
.seat.drag-over { border-color: var(--accent); background: var(--accent-soft); transform: scale(1.05); }
.seat.taken { cursor: grab; }

/* ============ ADD-VEHICLE (existing list) ============ */
.existing-veh { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.ev-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg3); cursor: pointer; font-size: 13px; font-weight: 600;
}
.ev-item:hover { border-color: var(--accent); background: var(--accent-soft); }

/* ============ ASSIGN-DAYS MODAL ============ */
.cal-cell.assign { min-height: 46px; align-items: center; justify-content: center; }
.cal-cell.assign .cal-daynum { width: auto; height: auto; }
.cal-cell.assign .assign-mark { font-weight: 800; font-size: 15px; margin-top: 2px; }
.cal-cell.assign.sel-day.ok { border-color: var(--green); background: var(--green-soft); }
.cal-cell.assign.sel-day.ok .assign-mark { color: var(--green); }
.cal-cell.assign.sel-day.no { border-color: var(--red); background: var(--red-soft); }
.cal-cell.assign.sel-day.no .assign-mark { color: var(--red); }
.cal-cell.assign.sel-day.pending { border-color: var(--yellow); background: var(--yellow-soft); }
.cal-cell.assign.sel-day.pending .assign-mark { color: var(--yellow); }
.hint { font-size: 12px; color: var(--text2); margin: -6px 0 12px; }

/* ============ MAP ============ */
.map-layout { display: flex; gap: 16px; align-items: stretch; }
#map-canvas {
  flex: 1; height: calc(100vh - 172px); min-height: 420px;
  border: 1px solid var(--border); border-radius: 14px; overflow: hidden; z-index: 0;
}
.map-side {
  width: 244px; min-width: 244px; background: var(--bg2);
  border: 1px solid var(--border); border-radius: 14px; padding: 12px;
  max-height: calc(100vh - 172px); overflow: auto;
}
.addr-item { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 9px; cursor: pointer; }
.addr-item:hover { background: var(--accent-soft); }
.addr-item.warn:hover { background: var(--red-soft); }
.addr-count {
  background: var(--accent); color: #fff; font-weight: 800; font-size: 11.5px;
  min-width: 22px; height: 22px; border-radius: 11px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
}
.addr-name { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.map-pin-wrap { background: none; border: none; }
.map-pin {
  width: 30px; height: 30px; border-radius: 50% 50% 50% 0;
  background: var(--accent); transform: rotate(-45deg);
  border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.4);
  display: flex; align-items: center; justify-content: center;
}
.map-pin.multi { background: #e8590c; }
.map-pin span { transform: rotate(45deg); color: #fff; font-weight: 800; font-size: 12px; }

.map-pop { min-width: 160px; }
.map-pop-addr { font-weight: 700; font-size: 13px; margin-bottom: 2px; }
.map-pop-count { font-size: 11.5px; color: #667; margin-bottom: 6px; }
.map-pop-item { padding: 4px 6px; border-radius: 6px; cursor: pointer; font-size: 12.5px; font-weight: 600; }
.map-pop-item:hover { background: var(--accent-soft); color: var(--accent); }
.map-pop-item .muted { color: #99a; font-weight: 500; }

/* ============ POOL NUMBERED / HISTORY MONTH ============ */
.pool-num {
  background: var(--bg2); border: 1px solid var(--border); color: var(--text2);
  font-weight: 800; font-size: 11.5px; min-width: 22px; height: 22px; border-radius: 6px;
  flex: none; display: inline-flex; align-items: center; justify-content: center;
}
.hist-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.hist-title { font-weight: 700; font-size: 13px; text-transform: capitalize; min-width: 130px; text-align: center; }
.mini-grid7 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.mini-dow { text-align: center; font-size: 10.5px; font-weight: 700; color: var(--text2); }
.mini-grid7 .mini-cell { width: auto; height: 32px; }

/* ============ DRIVER CHECKBOX / TYPE PICK / CUSTOM ============ */
.chk {
  display: flex !important; align-items: center; gap: 8px;
  font-weight: 600 !important; font-size: 12.5px !important;
  text-transform: none !important; letter-spacing: 0 !important; color: var(--text) !important;
  cursor: pointer;
}
.chk input[type="checkbox"] { width: 16px; height: 16px; flex: none; accent-color: var(--accent); }
.type-pick { flex-wrap: wrap; }
.type-opt { min-width: 118px; }

/* --- lista istniejących pojazdów: przycisk trwałego usunięcia --- */
.ev-item .ev-pick { flex: 1; }
.ev-del {
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--red);
  border-radius: 7px;
  width: 26px; height: 26px;
  flex: none;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}
.ev-del:hover { background: var(--red); color: #fff; border-color: var(--red); }
.ev-item.added { opacity: .6; cursor: default; }
.ev-item.added:hover { border-color: var(--border); background: var(--bg3); }

/* =====================================================================
   ADAPTACJA MOBILNA / RESPONSIVE  (dodano w v1.1)
   Cel: żadne ramki nie nachodzą na siebie i nie wychodzą poza ekran
   na telefonie (iPhone / Android). Desktop bez zmian.
   ===================================================================== */

/* Wybór osoby dotykiem: kliknij osobę w puli → podświetla się → kliknij
   miejsce, aby ją posadzić. Alternatywa dla drag&drop na telefonie.
   (działa też na desktopie, nie psuje przeciągania) */
.pool-item.sel {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 2px var(--accent) inset;
}
body.placing .seat:not(.taken):not(.driver) {
  border-color: var(--accent);
  border-style: dashed;
  animation: seatPulse 1.1s ease-in-out infinite;
}
@keyframes seatPulse { 0%,100% { background: var(--seat-bg); } 50% { background: var(--accent-soft); } }
.place-hint {
  position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%);
  background: var(--accent); color: #fff; font-size: 13px; font-weight: 700;
  padding: 8px 16px; border-radius: 999px; box-shadow: var(--shadow);
  z-index: 250; pointer-events: none; max-width: 92vw; text-align: center;
}

/* lepsze zachowanie dotyku na wszystkich elementach klikalnych */
button, .nav-item, .seat, .pool-item, .day-entry, .tbl tbody tr,
.picker-item, .dropdown-item, .addr-item, .ev-item, .type-opt {
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 820px) {
  body { overflow: auto; -webkit-text-size-adjust: 100%; }

  /* --- układ ogólny: pasek nawigacji na dole --- */
  #app { flex-direction: column; height: auto; min-height: 100vh; min-height: 100dvh; }

  #sidebar {
    position: fixed; left: 0; right: 0; bottom: 0;
    width: 100%; min-width: 0; height: 60px;
    flex-direction: row; align-items: stretch;
    padding: 0; border-right: none; border-top: 1px solid var(--border);
    z-index: 200; box-shadow: 0 -2px 12px rgba(30,40,70,.08);
    padding-bottom: env(safe-area-inset-bottom, 0);
    box-sizing: content-box;
  }
  .logo { display: none; }
  nav { flex-direction: row; flex: 1; gap: 0; }
  .nav-item {
    flex: 1; flex-direction: column; gap: 2px;
    justify-content: center; align-items: center;
    padding: 6px 2px; border-radius: 0; font-size: 10px; font-weight: 700;
    min-width: 0;
  }
  .nav-item span:not(.nav-icon) { font-size: 9.5px; line-height: 1; }
  .nav-icon { font-size: 21px; }
  .nav-item.active { background: transparent; color: var(--accent); box-shadow: inset 0 3px 0 var(--accent); }
  .nav-item:hover { background: transparent; }

  /* eksport jako 5. ikona w pasku (tekst ukryty, zostaje 📊) */
  .sidebar-bottom { margin-top: 0; flex-direction: row; align-items: stretch; gap: 0; }
  .version { display: none; }
  #btn-export {
    width: 56px; padding: 0; border: none; border-left: 1px solid var(--border);
    border-radius: 0; font-size: 0; display: flex; align-items: center; justify-content: center;
  }
  #btn-export::before { content: "📊"; font-size: 22px; }

  /* --- główny obszar: miejsce na dolny pasek --- */
  #main { padding: 14px 12px calc(74px + env(safe-area-inset-bottom, 0)); overflow-y: auto; }
  .view-title { font-size: 19px; }
  .toolbar { gap: 8px; }
  .btn { min-height: 42px; }
  .btn.small { min-height: 34px; }

  /* pola formularzy ≥16px, żeby iOS nie zoomował przy focusie */
  .input, input.input, select, textarea,
  .entry-times input[type="time"] { font-size: 16px; }

  /* --- KALENDARZ --- */
  .cal-layout { flex-direction: column; gap: 12px; }
  .cal-left { flex: none; min-width: 0; width: 100%; }
  .cal-right {
    flex: none; min-width: 0; width: 100%;
    position: static; max-height: none; padding: 14px;
  }
  .cal-grid { gap: 3px; }
  .cal-cell { min-height: 50px; padding: 4px 4px; border-radius: 8px; }
  .cal-daynum { font-size: 12px; width: 20px; height: 20px; }
  .cal-badge { font-size: 10px; padding: 1px 5px; }
  .cal-dow { font-size: 10px; }
  .cal-month-title { font-size: 15px; min-width: 0; flex: 1; }

  .day-entry { padding: 10px 4px; gap: 10px; }
  .status-cycle { width: 32px; height: 32px; min-width: 32px; font-size: 15px; }
  .entry-times input[type="time"] { width: 88px; padding: 8px 6px; }
  .entry-del { font-size: 20px; padding: 6px 10px; }

  /* --- PRACOWNICY: tabela w poziomym scrollu, nic się nie ściska --- */
  .tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table.tbl { min-width: 560px; }

  /* --- SAMOCHODY --- */
  .transport-layout { flex-direction: column; gap: 12px; }
  .worker-pool {
    width: 100%; min-width: 0; position: static;
    max-height: 42vh; order: -1;
  }
  .veh-grid { gap: 12px; }
  .veh-card { width: 100%; max-width: 460px; margin: 0 auto; }
  .seat { max-width: none; min-height: 58px; }
  .veh-actions .btn { flex: 1; }

  /* --- MAPA --- */
  .map-layout { flex-direction: column; gap: 12px; }
  #map-canvas { flex: none; width: 100%; height: 52vh; min-height: 300px; }
  .map-side { width: 100%; min-width: 0; max-height: 40vh; }

  /* --- MODALE jako dolne "szuflady" na całą szerokość --- */
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal {
    max-width: 100%; width: 100%;
    border-radius: 18px 18px 0 0;
    max-height: 92vh; padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0));
  }
  .modal.wide { max-width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .modal-actions { flex-direction: row; }
  .modal-actions .btn { flex: 1; min-height: 44px; }
  .mini-grid { grid-template-columns: repeat(7, 1fr); }
  .mini-cell { width: auto; height: 34px; }
  .type-pick { flex-wrap: wrap; }
  .type-opt { min-width: calc(50% - 5px); }
  .picker-list { max-height: 50vh; }

  #toast { bottom: calc(74px + env(safe-area-inset-bottom, 0)); }
}

/* bardzo wąskie ekrany (małe telefony) */
@media (max-width: 380px) {
  #main { padding-left: 10px; padding-right: 10px; }
  .cal-cell { min-height: 44px; }
  .cal-badge { font-size: 9px; padding: 1px 4px; }
  .nav-item span:not(.nav-icon) { font-size: 9px; }
  .type-opt { min-width: 100%; }
}

/* =============== Podsumowanie transportu (ile aut / osób / miejsc) =============== */
.transport-summary { display: flex; gap: 8px; flex-wrap: wrap; margin: -4px 0 14px; }
.ts-box {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 10px;
  padding: 6px 12px; font-size: 13px; color: var(--text2); font-weight: 600;
}
.ts-box b { color: var(--text); font-size: 15px; font-weight: 800; }
.veh-count { margin-left: 4px; }

/* =============== Doszlifowanie mobilne (v1.1.2) =============== */
@media (max-width: 820px) {
  /* Kalendarz: nagłówek podniesiony, miesiąc wypełnia miejsce między strzałkami,
     bez legendy/„Dziś”/pustego odstępu — czysto i wyżej. */
  .cal-header { flex-wrap: nowrap; gap: 6px; margin-bottom: 10px; }
  .cal-header .spacer,
  .cal-header .chip,
  #cal-today { display: none; }
  #cal-prev, #cal-next { flex: 0 0 auto; }
  #cal-prev, #cal-next { min-height: 40px; min-width: 40px; }
  .cal-month-title { flex: 1; text-align: center; font-size: 17px; }

  /* Lista dnia: godziny na stałe z prawej, imię zawija się do 2 linii */
  .day-entry-inner { align-items: flex-start; }
  .entry-name { flex: 1 1 auto; min-width: 0; }
  .entry-right { flex-direction: column; align-items: flex-end; gap: 4px; }
  .entry-times input[type="time"] { width: 74px; padding: 6px 4px; }

  /* Podsumowanie transportu — równomiernie na całą szerokość */
  .transport-summary { gap: 6px; }
  .ts-box { flex: 1; text-align: center; padding: 8px 6px; }
}

/* =============== KAFELKI AUT (ikona 3D) + panel-szuflada miejsc (v1.1.3) =============== */
.veh-tile {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  width: 128px; padding: 14px 10px 10px;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 16px;
  cursor: pointer; text-align: center;
  transition: transform .1s, box-shadow .15s, border-color .15s;
}
.veh-tile:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.veh-tile:active { transform: translateY(0); }
.veh-tile.drop-hot { border-color: var(--accent); background: var(--accent-soft); }

.vt-car { position: relative; width: 92px; height: 56px; margin-top: 2px; }
.vt-car::before {
  content: ''; position: absolute; left: 0; right: 0; bottom: 9px; height: 30px;
  border-radius: 14px 16px 9px 9px;
  background: linear-gradient(180deg, #6366f1 0%, #4338ca 100%);
  box-shadow: inset 0 -4px 8px rgba(0,0,0,.28), inset 0 3px 5px rgba(255,255,255,.18), 0 5px 9px rgba(20,24,50,.26);
}
.vt-roof {
  position: absolute; left: 22px; right: 24px; top: 2px; height: 22px;
  border-radius: 12px 12px 2px 2px;
  background: linear-gradient(180deg, #a5b4fc, #6366f1);
  box-shadow: inset 0 2px 3px rgba(255,255,255,.35);
}
.vt-window {
  position: absolute; left: 27px; top: 6px; width: 24px; height: 13px;
  border-radius: 5px; background: rgba(255,255,255,.82);
}
.vt-wheel {
  position: absolute; bottom: 0; width: 17px; height: 17px; border-radius: 50%;
  background: #23262f; box-shadow: inset 0 0 0 4px #cfd3de, 0 2px 3px rgba(0,0,0,.25);
}
.vt-wheel.l { left: 13px; }
.vt-wheel.r { right: 15px; }
.vt-badge {
  position: absolute; right: -6px; top: -8px; z-index: 2;
  background: var(--text); color: #fff; font-size: 11px; font-weight: 800;
  padding: 2px 8px; border-radius: 999px; box-shadow: var(--shadow);
}
.veh-tile.full .vt-badge { background: var(--red); }
.vt-name { font-size: 13px; font-weight: 700; line-height: 1.15; max-width: 110px; }
.vt-sub { font-size: 11.5px; font-weight: 700; }
.vt-sub.okc { color: var(--green); }
.vt-sub.noc { color: var(--red); }

@media (max-width: 820px) {
  .veh-grid { gap: 10px; justify-content: flex-start; }
  .veh-tile { width: calc(33.333% - 7px); min-width: 96px; padding: 12px 6px 8px; }
  .vt-name { font-size: 12px; }
}

/* =============== Poprawki v1.1.6 (kalendarz: swipe zamiast ✕, jeden rząd) =============== */
@media (max-width: 820px) {
  /* usuwanie w kalendarzu tylko swipem — chowamy ✕ */
  .entry-del[data-act="del"] { display: none; }

  /* zmiana od–do + suma godzin: zawsze w jednym rzędzie */
  .shift-row { flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; }
  .shift-row label { font-size: 11px; white-space: nowrap; }
  #shift-start, #shift-end { width: 74px; min-width: 0; padding: 6px 4px; font-size: 15px; flex: 0 0 auto; }
  .shift-row .chip { flex: 0 0 auto; }

  .summary-row { flex-wrap: nowrap; gap: 6px; }
  .sum-box { flex: 1 1 0; min-width: 0; padding: 6px 4px; }
  .sum-box .v { font-size: 15px; }
  .sum-box .l { font-size: 9.5px; }
}

/* =====================================================================
   NEO-SKEUO / HAND-DRAWN SKETCH UI  (v1.2.1)
   Atrament na papierze: ciemne kontury 2px, twarde przesunięte cienie
   (jak szkic), kremowe tło, lekka "niedoskonałość" narożników.
   Nakładka na koniec pliku — łatwo usunąć, by wrócić do płaskiego stylu.
   ===================================================================== */
body[data-theme="light"] {
  --bg:  #f1ead9;    /* kremowy papier */
  --bg2: #faf5e8;    /* jaśniejsza powierzchnia */
  --bg3: #eae1cd;
  --border: #322e26; /* atrament */
  --ink:    #322e26;
  --text:   #322e26;
  --text2:  #7c745f;
  --accent: #322e26;
  --accent-soft: rgba(50,46,38,.08);
  --green: #3f7d43; --green-soft: rgba(63,125,67,.14);
  --red:   #c0392b; --red-soft:   rgba(192,57,43,.12);
  --yellow:#b07d16; --yellow-soft: rgba(176,125,22,.16);
  --seat-bg: #f4edda;
  --shadow: 5px 5px 0 rgba(50,46,38,.85);
}
body { background: var(--bg); }

/* Szkicowy narożnik: delikatnie nierówne promienie = ręczny sznyt */
.btn, .cal-cell, .seat, .chip, .seg, .status-cycle,
.cal-right, .worker-pool, .map-side, .veh-tile, .sum-box, .ts-box,
.tbl-wrap, .modal, .picker-list, .dropdown, .day-entry, .input,
input.input, select, textarea, .entry-times input[type="time"], .type-opt, .ev-item {
  border-radius: 13px 10px 14px 11px;
}

/* --- przyciski --- */
.btn {
  border: 2px solid var(--ink); background: var(--bg2); color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink); font-weight: 700;
}
.btn:hover { background: var(--bg3); box-shadow: 3px 3px 0 var(--ink); }
.btn:active { box-shadow: 0 0 0 var(--ink); transform: translate(3px, 3px); }
.btn.primary { background: var(--ink); color: var(--bg2); box-shadow: 3px 3px 0 rgba(50,46,38,.45); }
.btn.primary:hover { background: #23201a; }
.btn.danger { color: var(--red); border-color: var(--red); background: var(--bg2); box-shadow: 3px 3px 0 var(--red); }

/* --- pola --- */
.input, input.input, select, textarea,
.entry-times input[type="time"], .shift-row .input {
  border: 2px solid var(--ink); background: var(--bg2); color: var(--ink);
  box-shadow: inset 2px 2px 0 rgba(50,46,38,.14);
}
.input:focus, textarea:focus, select:focus { box-shadow: inset 2px 2px 0 rgba(50,46,38,.28); }

/* --- sidebar / nawigacja --- */
#sidebar { background: var(--bg); border-right: 2px solid var(--ink); box-shadow: none; }
.nav-item { border: 2px solid transparent; }
.nav-item:hover { background: var(--bg3); color: var(--ink); }
.nav-item.active { background: var(--bg2); color: var(--ink); border-color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }

/* --- karty / panele (wypukłe, twardy cień) --- */
.cal-right, .worker-pool, .map-side, .veh-tile, .sum-box, .ts-box,
.tbl-wrap, .modal, .picker-list, .add-worker-box .dropdown, .veh-card {
  border: 2px solid var(--ink); background: var(--bg2); box-shadow: 5px 5px 0 var(--ink);
}
.sum-box, .ts-box { box-shadow: 3px 3px 0 var(--ink); }

/* --- kalendarz --- */
.cal-cell { border: 2px solid var(--ink); background: var(--bg2); box-shadow: 3px 3px 0 var(--ink); }
.cal-cell:hover { background: var(--bg3); }
.cal-cell.selected { background: var(--bg3); box-shadow: 0 0 0; transform: translate(3px, 3px); }
.cal-cell.today .cal-daynum { background: var(--ink); color: var(--bg2); }
.cal-cell.empty { border-color: transparent; box-shadow: none; background: transparent; }

/* --- lista dnia --- */
.day-entry { border-bottom: none; margin-bottom: 8px; overflow: hidden; border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.day-entry-inner { background: var(--bg2); }
.status-cycle { border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); }

/* --- segment --- */
.seg { border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); background: var(--bg2); overflow: hidden; }
.seg button { background: transparent; }
.seg button.active { background: var(--ink); color: var(--bg2); }

/* --- miejsca w aucie --- */
.seat { border: 2px solid var(--ink); background: var(--bg2); box-shadow: 3px 3px 0 var(--ink); }
.seat:hover { background: var(--bg3); transform: none; }
.seat.taken { box-shadow: 0 0 0; transform: translate(3px, 3px); }
.seat.taken.ok { border-color: var(--green); }
.seat.taken.pending { border-color: var(--yellow); }
.seat.taken.no { border-color: var(--red); }
.seat.driver { background: var(--bg3); border-style: dashed; }

/* --- kafelek auta: monochromatyczny szkic --- */
.vt-car::before { background: var(--bg2); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.vt-roof { background: var(--bg3); border: 2px solid var(--ink); box-shadow: none; }
.vt-window { background: var(--bg); border: 1.5px solid var(--ink); }
.vt-wheel { background: var(--ink); box-shadow: none; }
.vt-badge { background: var(--ink); color: var(--bg2); border: 2px solid var(--ink); box-shadow: none; }
.veh-tile.full .vt-badge { background: var(--red); border-color: var(--red); }
.veh-tile:hover { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 var(--ink); }

/* --- chip / toast --- */
.chip { border: 1.5px solid var(--ink); box-shadow: 1.5px 1.5px 0 var(--ink); background: var(--bg2); border-radius: 20px; }
.chip.ok { color: var(--green); } .chip.no { color: var(--red); } .chip.pending { color: var(--yellow); }
#toast { border: 2px solid var(--ink); background: var(--bg2); box-shadow: 4px 4px 0 var(--ink); color: var(--ink); }

/* --- tabela --- */
.tbl th { background: var(--bg3); border-bottom: 2px solid var(--ink); }
.tbl td { border-bottom: 1.5px dashed var(--border); }
.tbl tbody tr:hover { background: var(--bg3); }

/* --- typy pojazdów / listy w modalu --- */
.type-opt, .ev-item { border: 2px solid var(--ink); background: var(--bg2); box-shadow: 2px 2px 0 var(--ink); }
.type-opt.sel { background: var(--bg3); }

/* --- pismo odręczne (ładuje się online; offline: fallback systemowy) --- */
body { font-family: 'Patrick Hand', 'Comic Sans MS', 'Segoe Print', -apple-system, sans-serif; }
.view-title, .logo-text, .modal-title, .day-title, .cal-month-title {
  font-family: 'Caveat', 'Patrick Hand', cursive; font-weight: 700; letter-spacing: .3px;
}
.view-title { font-size: 30px; }
.logo-text { font-size: 24px; }

/* mobil: cienie nieco mniejsze, by nie wychodziły poza ekran */
@media (max-width: 820px) {
  .cal-right, .worker-pool, .map-side, .tbl-wrap, .veh-tile { box-shadow: 3px 3px 0 var(--ink); }
  .modal { box-shadow: 0 -4px 0 var(--ink), 4px 4px 0 var(--ink); }
}

/* =============== Poprawki v1.2.2 =============== */
/* Pracownicy: kolumna 📅 wyrównana (jedna pod drugą) */
.col-cal { width: 42px; text-align: center; padding-left: 8px; padding-right: 2px; }
.row-cal { font-size: 17px; }

/* segment i „Dodaj” — ta sama wysokość */
.toolbar .seg, .toolbar #w-add { min-height: 44px; }

/* ikony paneli w stylu szkicu (monochromatyczne) */
#t-word, #t-copy, #t-sms, .nav-icon, .ts-box { filter: grayscale(1); }

/* Samochody: dolny pasek akcji + jednakowe ramki kafelków */
.transport-actions { margin-top: 16px; }
.veh-tile { height: 150px; justify-content: flex-start; }
.vt-name { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* Kalendarz: tytuł dnia większy i grubszy */
.day-title { font-size: 27px; font-weight: 700; }

/* Kalendarz: zmiana od–do i chip godzin — jednakowe ramki */
.shift-row .chip { border: 2px solid var(--ink); padding: 7px 12px; box-shadow: 2px 2px 0 var(--ink); font-size: 13px; border-radius: 10px; }

@media (max-width: 820px) {
  /* zmiana od–do: szersze pola, by nie ucinało „00” */
  #shift-start, #shift-end { width: 92px; font-size: 15px; padding: 7px 6px; }

  /* podsumowanie: mniejsze ramki, „suma godzin” szersza i bez obcięcia */
  .summary-row { flex-wrap: nowrap; gap: 6px; }
  .sum-box { flex: 1 1 0; min-width: 0; padding: 5px 4px; }
  .sum-box:last-child { flex: 1.5 1 0; }
  .sum-box .v { font-size: 14px; white-space: nowrap; }
  .sum-box .l { font-size: 9px; }

  /* wiersz pracownika w dniu: miniaturowy, od–do i godziny w jednym rzędzie */
  .day-entry { margin-bottom: 6px; }
  .day-entry-inner { align-items: center; gap: 6px; padding: 6px; }
  .status-cycle { width: 28px; height: 28px; min-width: 28px; font-size: 13px; }
  .entry-name .nm { font-size: 12px; }
  .entry-name .st { font-size: 10px; }
  .entry-right { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 5px; }
  .entry-times { flex-direction: row; gap: 3px; }
  .entry-times input[type="time"] { width: 62px; padding: 4px 2px; font-size: 12px; }
  .entry-hours { font-size: 11px; min-width: 30px; }
}

/* =============== Poprawki v1.2.3 =============== */
/* Kalendarz: mniejsze ramki podsumowania (idzie/czeka/nie) i zmiany od–do */
.summary-row { gap: 8px; margin-bottom: 10px; }
.sum-box { padding: 5px 9px; }
.sum-box .v { font-size: 15px; }
.sum-box .l { font-size: 10px; }
.shift-row { gap: 8px; }
.shift-row .input { padding: 5px 6px; }
.shift-row .chip { padding: 5px 9px; font-size: 12.5px; box-shadow: 2px 2px 0 var(--ink); }

/* Mapa: tytuł zawsze w jednym wierszu; ikona 📍 monochromatyczna (styl szkicu) */
.map-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: clamp(16px, 5.2vw, 30px); }
#geo-run { filter: grayscale(1); }

@media (max-width: 820px) {
  .sum-box { padding: 4px 3px; }
  .sum-box .v { font-size: 13px; }
  .shift-row .chip { padding: 5px 7px; }
}

/* Czerwony krzyżyk do czyszczenia czasu */
.entry-del[data-act="clear-time"], #shift-clear { color: var(--red) !important; font-weight: 800; font-size: 16px; }

@media (max-width: 380px) {
  /* Żeby w głównych godzinach zmiany wszystko zmieściło się w jednym wierszu, zmniejszamy inputy */
  #shift-start, #shift-end { width: 56px !important; padding: 4px 2px !important; font-size: 13px !important; }
  .shift-row label { font-size: 10px; }
  .shift-row { gap: 4px; flex-wrap: nowrap !important; overflow: hidden; }
}

/* Usuwanie pracownika z dnia w widoku Transportu */
.pool-del {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text2);
  font-size: 16px;
  padding: 4px 10px;
  cursor: pointer;
  border-radius: 6px;
}
.pool-del:hover {
  background: var(--bg2);
  color: var(--text);
}
