/* ============================================================
   SERWIS — premium UI (navy / gold / cream)
   ============================================================ */
:root {
  --navy: #0F1E3D;
  --navy-2: #17294E;
  --navy-3: #223868;
  --gold: #C9A96A;
  --gold-2: #B8945A;
  --cream: #F7F4EE;
  --paper: #FFFFFF;
  --ink: #1B2437;
  --muted: #7A8299;
  --line: #E4DFD4;
  --red: #D64541;
  --yellow: #E8A93C;
  --green: #3E9B6B;
  --radius: 14px;
  --shadow: 0 8px 28px rgba(15, 30, 61, .12);
  --font: 'Manrope', system-ui, sans-serif;
  --display: 'Fraunces', Georgia, serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font); font-size: 14px; color: var(--ink);
  background: var(--cream); display: flex; overflow: hidden;
}
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; }
a { color: inherit; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

/* ---------- Nawigacja boczna ---------- */
.rail {
  width: 76px; flex-shrink: 0; background: var(--navy); color: #fff;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 0; z-index: 900;
}
.rail-brand {
  font-family: var(--display); font-size: 30px; font-weight: 600; color: #fff;
  width: 48px; height: 48px; display: grid; place-items: center;
  border: 1.5px solid rgba(201,169,106,.55); border-radius: 12px; margin-bottom: 14px;
}
.rail-brand span { color: var(--gold); }
.rail-btn {
  width: 60px; padding: 9px 0 7px; border: 0; background: transparent; color: #A9B4CD;
  border-radius: 12px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: .18s; text-decoration: none;
}
.rail-btn svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.rail-btn i { font-style: normal; font-size: 10px; font-weight: 600; letter-spacing: .02em; }
.rail-btn:hover { color: #fff; background: var(--navy-2); }
.rail-btn.active { color: var(--gold); background: var(--navy-2); }
.rail-spacer { flex: 1; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 13px; }

/* ---------- Główna kolumna ---------- */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 18px; background: var(--paper); border-bottom: 1px solid var(--line);
}
.search-wrap { position: relative; flex: 0 1 300px; min-width: 200px; }
.search-wrap svg { position: absolute; left: 11px; top: 9px; width: 17px; height: 17px; stroke: var(--muted); fill: none; stroke-width: 1.8; }
.search-wrap input {
  width: 100%; padding: 9px 12px 9px 34px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--cream); outline: none;
}
.search-wrap input:focus { border-color: var(--gold); background: #fff; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters select {
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--ink); outline: none; max-width: 180px;
}
.filters select:focus { border-color: var(--gold); }
.chk { display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--red); font-size: 13px; }
.topbar-actions { margin-left: auto; display: flex; gap: 8px; }

.btn {
  border: 0; border-radius: 10px; padding: 9px 16px; font-weight: 700; font-size: 13.5px;
  transition: .18s; text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: var(--gold-2); }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-2); }
.btn-ghost.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-red { background: #FBEAEA; color: var(--red); }
.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 6px 10px; font-size: 12.5px; }

/* pasek podsumowania dnia */
.day-strip {
  display: flex; gap: 10px; padding: 10px 18px; background: var(--paper);
  border-bottom: 1px solid var(--line); overflow-x: auto;
}
.day-card {
  display: flex; align-items: baseline; gap: 8px; padding: 7px 14px;
  background: var(--cream); border: 1px solid var(--line); border-radius: 10px; white-space: nowrap;
}
.day-card b { font-size: 19px; font-family: var(--display); }
.day-card span { font-size: 12px; color: var(--muted); font-weight: 600; }
.day-card.c-red b { color: var(--red); }
.day-card.c-yellow b { color: var(--yellow); }
.day-card.c-green b { color: var(--green); }

/* ---------- Widoki ---------- */
.view { display: none; flex: 1; min-height: 0; position: relative; }
.view.active { display: flex; flex-direction: column; }
.view-map.active, .view-route.active { flex-direction: row; }

#map, #routeMap { flex: 1; z-index: 1; background: #DCE4EA; }

.map-legend {
  position: absolute; left: 14px; bottom: 18px; z-index: 500;
  background: rgba(255,255,255,.94); border: 1px solid var(--line); border-radius: 12px;
  padding: 9px 14px; display: flex; gap: 14px; box-shadow: var(--shadow); font-size: 12.5px; font-weight: 600;
}
.map-legend span { display: flex; align-items: center; gap: 6px; }
.dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.dot-new { background: var(--red); }
.dot-progress { background: var(--yellow); }
.dot-done { background: var(--green); }
.dot-urgent { background: var(--red); box-shadow: 0 0 0 3px rgba(214,69,65,.3); }

.map-hint {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 600;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 12px;
  box-shadow: var(--shadow); font-weight: 600; display: flex; gap: 12px; align-items: center;
}
.map-hint button { background: var(--gold); border: 0; border-radius: 8px; padding: 5px 12px; font-weight: 700; }

/* markery */
.pin { position: relative; }
.pin-dot {
  width: 26px; height: 26px; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg);
  border: 2.5px solid #fff; box-shadow: 0 3px 8px rgba(15,30,61,.35);
  display: grid; place-items: center;
}
.pin-dot::after { content:''; width: 7px; height: 7px; background: #fff; border-radius: 50%; }
.pin.urgent .pin-dot { animation: pulse 1.6s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 3px 8px rgba(15,30,61,.35), 0 0 0 0 rgba(214,69,65,.5); }
  70% { box-shadow: 0 3px 8px rgba(15,30,61,.35), 0 0 0 12px rgba(214,69,65,0); }
  100% { box-shadow: 0 3px 8px rgba(15,30,61,.35), 0 0 0 0 rgba(214,69,65,0); }
}
@media (prefers-reduced-motion: reduce) { .pin.urgent .pin-dot { animation: none; outline: 3px solid rgba(214,69,65,.45); } }
.leaflet-popup-content-wrapper { border-radius: 12px; font-family: var(--font); }
.pop b { font-size: 14px; }
.pop .badge { margin-top: 4px; }

/* ---------- Panele / tabele ---------- */
.panel { flex: 1; overflow: auto; padding: 18px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.panel-head h3 { font-family: var(--display); font-size: 20px; }
.tbl { width: 100%; border-collapse: collapse; background: var(--paper); border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 4px rgba(15,30,61,.07); }
.tbl th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); background: #FBFAF6; }
.tbl td { padding: 12px 14px; border-bottom: 1px solid #F0EDE5; vertical-align: middle; }
.tbl tbody tr { cursor: pointer; transition: .12s; }
.tbl tbody tr:hover { background: #FBF7EF; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; font-size: 11.5px; font-weight: 700; }
.badge::before { content:''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.b-new { background: #FBEAEA; color: var(--red); }
.b-in_progress { background: #FBF3E1; color: #B37E1C; }
.b-done { background: #E7F4EC; color: #2C7B52; }
.b-urgent { background: var(--red); color: #fff; }
.b-urgent::before { background: #fff; }

/* ---------- Panel szczegółów ---------- */
.detail {
  width: 420px; max-width: 100vw; flex-shrink: 0; background: var(--paper);
  border-left: 1px solid var(--line); overflow-y: auto; z-index: 800;
  box-shadow: -6px 0 24px rgba(15,30,61,.08);
}
.detail-inner { padding: 20px; }
.detail h2 { font-family: var(--display); font-size: 21px; line-height: 1.25; margin: 6px 0 2px; }
.detail .d-num { color: var(--muted); font-weight: 700; font-size: 12px; letter-spacing: .05em; }
.d-close { float: right; border: 0; background: var(--cream); width: 32px; height: 32px; border-radius: 50%; font-size: 17px; }
.d-badges { display: flex; gap: 6px; margin: 10px 0 14px; flex-wrap: wrap; }
.d-sec { margin-top: 18px; }
.d-sec h4 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 8px; border-bottom: 1px solid var(--line); padding-bottom: 5px; }
.d-row { display: flex; gap: 8px; padding: 3.5px 0; }
.d-row b { min-width: 108px; color: var(--muted); font-weight: 600; font-size: 13px; }
.d-row a { color: var(--navy); font-weight: 700; text-decoration: none; }
.d-desc { background: var(--cream); border-radius: 10px; padding: 12px; line-height: 1.55; }
.d-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.work-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.work-btn { padding: 10px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; font-weight: 700; font-size: 12.5px; transition: .15s; }
.work-btn:hover { border-color: var(--gold); }
.work-btn.on { background: var(--navy); color: var(--gold); border-color: var(--navy); }
.d-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.d-photos figure { position: relative; }
.d-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; cursor: zoom-in; }
.d-photos .del { position: absolute; top: 4px; right: 4px; background: rgba(15,30,61,.75); color: #fff; border: 0; width: 22px; height: 22px; border-radius: 50%; font-size: 12px; }
.timeline { list-style: none; }
.timeline li { position: relative; padding: 0 0 14px 20px; border-left: 2px solid var(--line); margin-left: 6px; }
.timeline li::before { content:''; position: absolute; left: -6px; top: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); border: 2px solid #fff; }
.timeline li.work::before { background: var(--navy); }
.timeline time { font-size: 11.5px; color: var(--muted); display: block; }
.hist-item { display: flex; justify-content: space-between; padding: 8px 10px; background: var(--cream); border-radius: 8px; margin-bottom: 6px; cursor: pointer; }
.hist-item:hover { background: #F1EBDD; }
.upload-zone { border: 2px dashed var(--line); border-radius: 10px; padding: 14px; text-align: center; color: var(--muted); font-weight: 600; cursor: pointer; transition: .15s; }
.upload-zone:hover, .upload-zone.drag { border-color: var(--gold); color: var(--gold-2); background: #FBF7EF; }

/* ---------- Kalendarz ---------- */
.cal-toolbar { display: flex; align-items: center; gap: 10px; padding: 12px 18px; background: var(--paper); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.cal-toolbar b { font-family: var(--display); font-size: 17px; min-width: 190px; text-align: center; }
.cal-mode { margin-left: auto; display: flex; gap: 6px; }
.cal-wrap { flex: 1; display: flex; min-height: 0; }
.cal-unassigned { width: 250px; flex-shrink: 0; background: var(--paper); border-right: 1px solid var(--line); padding: 14px; overflow-y: auto; }
.cal-unassigned h3 { font-family: var(--display); font-size: 16px; margin-bottom: 2px; }
.cal-unassigned p { margin-bottom: 10px; font-size: 12px; }
.cal-grid-wrap { flex: 1; overflow: auto; padding: 14px; }
.cal-grid { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; min-width: 720px; }
.cal-cell { background: var(--paper); min-height: 92px; padding: 6px; }
.cal-cell.head { min-height: 0; padding: 8px; font-weight: 700; font-size: 12px; background: #FBFAF6; text-align: center; }
.cal-cell.head small { display: block; color: var(--muted); font-weight: 600; }
.cal-cell.tech-head { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; background: #FBFAF6; min-height: 0; padding: 10px 8px; }
.cal-cell.today { background: #FDFAF2; }
.cal-cell.dropok { outline: 2px dashed var(--gold); outline-offset: -3px; }
.chip {
  display: block; border-radius: 8px; padding: 6px 8px; margin-bottom: 5px; font-size: 12px;
  background: var(--cream); border-left: 3.5px solid var(--gold); cursor: grab; user-select: none;
}
.chip b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip small { color: var(--muted); }
.chip.s-new { border-left-color: var(--red); }
.chip.s-in_progress { border-left-color: var(--yellow); }
.chip.s-done { border-left-color: var(--green); opacity: .75; }
.chip.urgent { background: #FBEAEA; }
.chip:active { cursor: grabbing; }
.workload { display: flex; gap: 14px; padding: 10px 18px; background: var(--paper); border-top: 1px solid var(--line); overflow-x: auto; }
.wl { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.wl .bar { width: 90px; height: 7px; background: var(--cream); border-radius: 99px; overflow: hidden; }
.wl .bar i { display: block; height: 100%; border-radius: 99px; }

/* ---------- Trasy ---------- */
.route-panel { width: 360px; max-width: 100vw; flex-shrink: 0; background: var(--paper); border-right: 1px solid var(--line); padding: 16px; overflow: hidden; display: flex; flex-direction: column; gap: 12px; }
.route-panel h3, .route-controls, .route-start, .route-summary, .route-actions, .route-panel > p { flex-shrink: 0; }
.route-panel h3 { font-family: var(--display); font-size: 19px; }
.route-controls { display: flex; gap: 8px; }
.route-controls select, .route-controls input, .route-start input { flex: 1; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; width: 100%; }
.route-start label { font-size: 12px; font-weight: 700; color: var(--muted); display: block; }
.route-list { list-style: none; display: flex; flex-direction: column; gap: 7px; min-height: 40px; flex: 1; overflow-y: auto; padding-right: 4px; scrollbar-width: thin; scrollbar-color: var(--gold) transparent; }
.route-list::-webkit-scrollbar { width: 6px; }
.route-list::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 3px; }
.route-item { display: flex; gap: 10px; align-items: center; background: var(--cream); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; cursor: grab; }
.route-item.dragging { opacity: .4; }
.route-item .no { width: 24px; height: 24px; border-radius: 50%; background: var(--navy); color: var(--gold); display: grid; place-items: center; font-weight: 800; font-size: 12px; flex-shrink: 0; }
.route-item .inf { min-width: 0; flex: 1; }
.route-item .inf b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.route-item .inf small { color: var(--muted); }
.route-item .leg { font-size: 11.5px; color: var(--gold-2); font-weight: 800; white-space: nowrap; }
.route-summary { background: var(--navy); color: #fff; border-radius: 12px; padding: 12px 14px; font-weight: 600; display: none; }
.route-summary.show { display: block; }
.route-summary b { color: var(--gold); font-family: var(--display); font-size: 19px; }
.route-actions { display: flex; gap: 8px; }

/* ---------- Raporty ---------- */
.report-controls { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; margin-bottom: 16px; }
.report-controls label { font-size: 12px; font-weight: 700; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.report-controls input { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.rep-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.rep-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.rep-card b { font-family: var(--display); font-size: 27px; display: block; }
.rep-card span { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.rep-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.rep-block { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.rep-block h4 { font-family: var(--display); font-size: 16px; margin-bottom: 10px; }
.rep-tech { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid #F0EDE5; font-size: 13px; }
.rep-tech .bar { flex: 1; height: 8px; background: var(--cream); border-radius: 99px; overflow: hidden; }
.rep-tech .bar i { display: block; height: 100%; }
.rep-log { max-height: 320px; overflow: auto; font-size: 12.5px; }
.rep-log div { padding: 5px 0; border-bottom: 1px solid #F0EDE5; }
.rep-log time { color: var(--muted); margin-right: 6px; }

/* ---------- Modale ---------- */
.modal { position: fixed; inset: 0; background: rgba(15,30,61,.5); z-index: 1000; display: grid; place-items: center; padding: 16px; overflow: auto; }
.modal-card { background: var(--paper); border-radius: 18px; width: 640px; max-width: 100%; max-height: 92vh; overflow: auto; box-shadow: var(--shadow); }
.modal-sm { width: 480px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px 0; }
.modal-head h3 { font-family: var(--display); font-size: 20px; }
.modal .x { border: 0; background: var(--cream); width: 32px; height: 32px; border-radius: 50%; font-size: 18px; }
.modal form { padding: 16px 22px 22px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid2 .span2 { grid-column: span 2; }
.modal label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.modal input, .modal select, .modal textarea {
  padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; outline: none;
  font-weight: 500; color: var(--ink); background: #fff;
}
.modal input:focus, .modal select:focus, .modal textarea:focus { border-color: var(--gold); }
.geo-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.geo-status { font-size: 12px; font-weight: 700; color: var(--green); }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(10,16,30,.9); z-index: 1200; display: grid; place-items: center; cursor: zoom-out; }
.lightbox img { max-width: 94vw; max-height: 92vh; border-radius: 10px; }

/* toasty */
.toast-wrap { position: fixed; bottom: 18px; right: 18px; z-index: 1300; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--navy); color: #fff; padding: 11px 16px; border-radius: 12px; box-shadow: var(--shadow); font-weight: 600; animation: slidein .25s; border-left: 4px solid var(--gold); }
.toast.err { border-left-color: var(--red); }
@keyframes slidein { from { transform: translateY(10px); opacity: 0; } }

/* ---------- Logowanie ---------- */
.login-body { display: grid; place-items: center; background: radial-gradient(1100px 600px at 70% -10%, var(--navy-3), var(--navy) 60%); }
.login-card { width: 380px; max-width: 92vw; background: var(--paper); border-radius: 20px; padding: 34px 30px; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.login-brand { text-align: center; margin-bottom: 22px; }
.brand-mark { width: 54px; height: 54px; margin: 0 auto 12px; display: grid; place-items: center; font-family: var(--display); font-size: 30px; color: var(--navy); border: 2px solid var(--gold); border-radius: 14px; }
.login-brand h1 { font-family: var(--display); font-size: 27px; }
.login-brand h1 span { color: var(--gold); }
.login-brand p { color: var(--muted); font-size: 13px; margin-top: 4px; }
.login-card label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--muted); margin-bottom: 14px; }
.login-card input { padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px; outline: none; }
.login-card input:focus { border-color: var(--gold); }
.login-err { background: #FBEAEA; color: var(--red); border-radius: 10px; padding: 9px 12px; font-weight: 700; font-size: 13px; margin-bottom: 12px; }

/* ---------- Responsywność ---------- */
@media (max-width: 1100px) {
  .detail { position: fixed; right: 0; top: 0; bottom: 0; }
  .rep-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  body { flex-direction: column-reverse; }
  .rail { width: 100%; flex-direction: row; padding: 4px 8px; justify-content: space-around; }
  .rail-brand, .rail-spacer { display: none; }
  .rail-btn { width: auto; padding: 6px 10px; }
  .topbar { padding: 10px; }
  .filters select { max-width: 140px; font-size: 12.5px; }
  .topbar-actions { margin-left: 0; width: 100%; justify-content: flex-end; }
  .view-route.active { flex-direction: column; }
  .route-panel { width: 100%; max-height: 45vh; border-right: 0; border-bottom: 1px solid var(--line); }
  .cal-wrap { flex-direction: column; }
  .cal-unassigned { width: 100%; max-height: 180px; border-right: 0; border-bottom: 1px solid var(--line); }
  .detail { width: 100vw; }
  .grid2 { grid-template-columns: 1fr; }
  .grid2 .span2 { grid-column: span 1; }
}
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ===== chipy filtra statusów (multi-wybór) ===== */
.status-chips { display: flex; gap: 6px; }
.schip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid #E3DED2; background: #fff; color: #8A8577;
  font: 600 13px/1 'Manrope', sans-serif; transition: all .15s;
}
.schip .dot { opacity: .35; }
.schip.on { border-color: #0F1E3D; background: #0F1E3D; color: #F7F4EE; }
.schip.on .dot { opacity: 1; }
.schip:hover { border-color: #C9A96A; }

/* ===== klastry markerów ===== */
.cluster-pin { background: none; border: none; }
.cluster-dot {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #0F1E3D; color: #F7F4EE; border: 3px solid #C9A96A;
  font: 800 14px/1 'Manrope', sans-serif;
  box-shadow: 0 3px 10px rgba(15,30,61,.35);
}
.cluster-pin.urgent .cluster-dot { border-color: #D64541; animation: pulse 1.6s infinite; }
@media (prefers-reduced-motion: reduce) { .cluster-pin.urgent .cluster-dot { animation: none; } }
/* wyłączamy domyślne tło pluginu */
.marker-cluster, .marker-cluster div { background: none !important; }

/* ===== sortowanie tabeli ===== */
#ticketTable thead th { user-select: none; }
#ticketTable thead th.sorted { color: #C9A96A; }

/* ===== paczki do wysłania ===== */
.pin-box {
  width: 28px; height: 28px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; border: 2.5px solid #fff;
  box-shadow: 0 2px 8px rgba(15,30,61,.35);
}
.pin.urgent .pin-box { animation: pulse 1.6s infinite; }
.badge.b-ship { background: #0F1E3D; color: #C9A96A; border: 1px solid #C9A96A; }
.kind-ico { font-size: 14px; }
.legend-box {
  display: inline-flex; width: 16px; height: 16px; border-radius: 4px;
  background: #0F1E3D; align-items: center; justify-content: center;
  font-size: 10px; font-style: normal;
}
.day-card.c-ship { border-left: 4px solid #C9A96A; }
.day-card.c-ship b { color: #0F1E3D; }

/* przełącznik rodzaju w formularzu */
.kind-switch { display: flex; gap: 8px; }
.kopt { flex: 1; cursor: pointer; }
.kopt input { position: absolute; opacity: 0; }
.kopt span {
  display: block; text-align: center; padding: 11px 8px; border-radius: 10px;
  border: 1.5px solid var(--line); background: #fff;
  font-weight: 700; font-size: 13.5px; transition: all .15s;
}
.kopt input:checked + span { border-color: var(--navy); background: var(--navy); color: var(--cream); }
.kopt input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.kopt:hover span { border-color: var(--gold); }

/* ===== kalendarz: widok miesiąca ===== */
.cal-grid.month { grid-template-columns: repeat(7, 1fr); }
.mcell {
  min-height: 104px; padding: 6px;
  display: flex; flex-direction: column; gap: 3px;
  align-items: stretch; overflow-y: auto; max-height: 190px;
  scrollbar-width: thin;
}
.mcell .mday {
  font: 700 12.5px/1 'Manrope', sans-serif; color: #8A8577;
  align-self: flex-end; margin-bottom: 2px;
}
.mcell.today .mday {
  color: #fff; background: var(--navy); border-radius: 999px;
  width: 22px; height: 22px; display: flex; align-items: center; justify-content: center;
}
.mcell.other { background: #FBFAF6; }
.mcell.other .mday { opacity: .4; }
.chip.mini {
  padding: 3px 7px; font-size: 11.5px; line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: flex; align-items: center; gap: 5px; cursor: pointer;
}
.chip.mini i {
  width: 7px; height: 7px; border-radius: 50%;
  flex-shrink: 0; display: inline-block;
}
@media (max-width: 820px) {
  .mcell { min-height: 74px; max-height: 130px; }
  .chip.mini { font-size: 10.5px; }
}
