/* System zgłoszeń wejść na sieć oświetlenia – style */
:root {
  --navy: #1c2b3a;
  --navy-2: #26394c;
  --amber: #f2a900;
  --amber-soft: #fff4d6;
  --ink: #1d232a;
  --muted: #66717d;
  --line: #d9dee4;
  --bg: #f3f5f7;
  --card: #ffffff;
  --blue: #1f5fa8;
  --green: #1d7a46;
  --green-soft: #e3f4ea;
  --red: #b3261e;
  --red-soft: #fbe7e5;
  --orange: #b85c00;
  --orange-soft: #fff0df;
  --gray-soft: #eceff2;
  --radius: 10px;
  --tap: 46px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--blue); }
h1 { font-size: 1.6rem; margin: 0 0 .25rem; line-height: 1.25; }
h2 { font-size: 1.15rem; margin: 0 0 .75rem; }
code { background: var(--gray-soft); padding: 1px 5px; border-radius: 4px; font-size: .9em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.nowrap { white-space: nowrap; }
.warn-text { color: var(--orange); font-weight: 600; }
.center { text-align: center; }
.print-only { display: none; }

/* ---------- Pasek górny ---------- */
.topbar {
  background: var(--navy); color: #fff; display: flex; align-items: center; flex-wrap: wrap;
  padding: 0 16px; min-height: 58px; gap: 8px; border-bottom: 3px solid var(--amber);
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; padding: 10px 0; margin-right: 16px; }
.brand span { font-size: 1rem; }
.mainnav { display: flex; align-items: center; flex: 1; gap: 2px; flex-wrap: wrap; }
.mainnav a, .mainnav .linklike {
  color: #d5dde6; text-decoration: none; padding: 8px 12px; border-radius: 6px; font-size: .95rem;
  min-height: 40px; display: inline-flex; align-items: center;
}
.mainnav a:hover, .mainnav .linklike:hover { background: var(--navy-2); color: #fff; }
.mainnav a.active { background: var(--navy-2); color: #fff; box-shadow: inset 0 -3px 0 var(--amber); }
.nav-sep { width: 1px; height: 24px; background: #3e5266; margin: 0 6px; }
.nav-spacer { flex: 1; }
.nav-user { font-weight: 600; }
.linklike { background: none; border: 0; font: inherit; cursor: pointer; }
.menu-toggle { display: none; margin-left: auto; background: none; border: 1px solid #4a5f74; color: #fff; font-size: 1.3rem; border-radius: 6px; width: 46px; height: 40px; }
form.inline { display: inline; }

/* ---------- Układ ---------- */
.container { max-width: 1180px; margin: 0 auto; padding: 20px 16px 40px; }
.footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 16px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.back { display: inline-block; margin-bottom: 4px; text-decoration: none; font-size: .9rem; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; }
.card.narrow { max-width: 460px; margin: 32px auto; }
.card.empty { text-align: center; color: var(--muted); padding: 40px 20px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 16px; }
.align-start { align-items: start; }
.stack { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }

/* ---------- Formularze ---------- */
label, .label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 14px; }
label .muted { font-weight: 400; }
input[type=text], input[type=tel], input[type=email], input[type=password], input[type=search],
input[type=date], input[type=datetime-local], input[type=number], select, textarea {
  display: block; width: 100%; margin-top: 5px; min-height: var(--tap); padding: 10px 12px;
  font: inherit; font-weight: 400; color: var(--ink); background: #fff;
  border: 1px solid #b9c2cc; border-radius: 8px;
}
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(242,169,0,.45); border-color: var(--amber); }
input[type=file] { display: block; margin-top: 6px; font: inherit; max-width: 100%; }
fieldset { border: 0; border-top: 1px solid var(--line); margin: 0 0 8px; padding: 14px 0 0; }
fieldset:first-of-type { border-top: 0; padding-top: 0; }
legend { font-weight: 700; font-size: 1.05rem; padding: 0 8px 0 0; color: var(--navy); }
.has-error input, .has-error select, .has-error textarea { border-color: var(--red); background: #fffafa; }
.field-error { color: var(--red); font-weight: 500; font-size: .875rem; margin-top: 4px; }
.switch { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; cursor: pointer; padding: 8px 0; }
.switch input { width: 24px; height: 24px; flex: 0 0 24px; margin: 0; accent-color: var(--navy); }
.choice-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 6px 0 16px; }
.choice { margin: 0; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span {
  display: flex; align-items: center; justify-content: center; text-align: center; min-height: 56px; padding: 8px;
  border: 2px solid #b9c2cc; border-radius: 8px; font-weight: 600; background: #fff; line-height: 1.25;
}
.choice input:checked + span { border-color: var(--navy); background: var(--navy); color: #fff; }
.choice input:focus-visible + span { outline: 3px solid rgba(242,169,0,.6); }
.quick-hours { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: -6px 0 14px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 10px 0; }
.inline-form input, .inline-form select { width: auto; flex: 1 1 220px; margin-top: 0; }

/* ---------- Przyciski ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--tap);
  padding: 10px 18px; border: 1px solid #b9c2cc; border-radius: 8px; background: #fff; color: var(--ink);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; line-height: 1.2;
}
.btn:hover { background: #f4f6f8; }
.btn-primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-2); }
.btn-success { background: var(--green); border-color: var(--green); color: #fff; }
.btn-success:hover { background: #16653a; }
.btn-warn { background: var(--amber); border-color: #d99800; color: #241a00; }
.btn-danger { background: #fff; border-color: var(--red); color: var(--red); }
.btn-large { min-height: 56px; font-size: 1.05rem; padding: 12px 26px; }
.btn-small { min-height: 36px; padding: 6px 12px; font-size: .875rem; }
.btn-block { width: 100%; }

/* ---------- Komunikaty ---------- */
.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 14px; border: 1px solid; }
.flash-ok { background: var(--green-soft); border-color: #a9d8bb; color: #12502e; }
.flash-err { background: var(--red-soft); border-color: #eab3ae; color: #7c1a14; }
.flash-warn { background: var(--orange-soft); border-color: #f1c58f; color: #6b3600; }
.flash-volt { background: var(--amber-soft); border-color: var(--amber); color: #4a3500; font-weight: 600; }
.conflict-box { background: var(--amber-soft); border: 2px solid var(--amber); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 16px; }
.conflict-box h2 { color: #6b4b00; }
.conflict-box ul { margin: 0 0 8px; padding-left: 20px; }
.conflict-box li { margin-bottom: 6px; }
.notice { background: #eef4fb; border: 1px solid #c4d8ef; border-radius: 8px; padding: 14px 16px; margin-bottom: 16px; }
.status-card.is-sub { border-left: 5px solid var(--amber); }

/* ---------- Statusy ---------- */
.badge { display: inline-block; font-size: .75rem; font-weight: 700; padding: 3px 8px; border-radius: 99px; vertical-align: middle; letter-spacing: .01em; white-space: nowrap; }
.badge-zaplanowane { background: #e4edf8; color: #1b4d87; }
.badge-w_toku { background: var(--green-soft); color: #12502e; }
.badge-przekroczone { background: var(--red-soft); color: var(--red); }
.badge-zakonczone { background: var(--gray-soft); color: #46515c; }
.badge-anulowane { background: var(--gray-soft); color: #6b747d; text-decoration: line-through; }
.badge-volt { background: var(--amber); color: #241a00; }
h1 .badge { font-size: .85rem; }

/* ---------- Zakładki, filtry, tabela ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-bottom: 12px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tabs a {
  padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 600; white-space: nowrap;
  border-bottom: 3px solid transparent; margin-bottom: -2px;
}
.tabs a.active { color: var(--navy); border-bottom-color: var(--amber); }
.tabs .count { background: var(--gray-soft); color: var(--ink); border-radius: 99px; padding: 1px 8px; font-size: .8rem; margin-left: 4px; }
.tabs a.active .count { background: var(--navy); color: #fff; }
.filters { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; }
.filters summary { padding: 12px 16px; cursor: pointer; font-weight: 600; }
.filter-grid { display: grid; grid-template-columns: 2fr 1.3fr 1.3fr 1fr 1fr; gap: 0 12px; padding: 0 16px 6px; align-items: end; }
.filter-buttons { display: flex; gap: 8px; margin-bottom: 14px; grid-column: 1 / -1; }
.list-tools { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.list-tools span:last-child { display: flex; gap: 6px; }

.table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; }
.table th { text-align: left; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #f8f9fb; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tr.inactive td { opacity: .55; }
.reports tbody tr { cursor: pointer; }
.reports tbody tr:hover td { background: #fafbfc; }
.reports tr.row-przekroczone td:first-child { box-shadow: inset 4px 0 0 var(--red); }
.reports tr.row-w_toku td:first-child { box-shadow: inset 4px 0 0 var(--green); }
.reports tr.row-zaplanowane td:first-child { box-shadow: inset 4px 0 0 #6d9bd1; }
.reports .num { font-weight: 700; text-decoration: none; }
.pager { display: flex; gap: 4px; flex-wrap: wrap; }
.pager a { min-width: 40px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 6px; background: #fff; text-decoration: none; }
.pager a.active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ---------- Szczegóły ---------- */
.details { display: grid; grid-template-columns: 220px 1fr; gap: 0; margin: 0; }
.details dt { color: var(--muted); padding: 8px 12px 8px 0; border-bottom: 1px solid #eef0f3; }
.details dd { margin: 0; padding: 8px 0; border-bottom: 1px solid #eef0f3; }
.action-card { border: 2px solid var(--green); }
.sub-actions { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 8px; }
.sub-actions details, .card > details { padding: 6px 0; }
.sub-actions summary, .card > details summary { cursor: pointer; color: var(--blue); font-weight: 600; padding: 6px 0; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.gallery a { display: block; text-decoration: none; color: var(--muted); font-size: .8rem; }
.gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: var(--gray-soft); display: block; margin-bottom: 3px; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.thumbs img { width: 88px; height: 66px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.history { list-style: none; padding: 0; margin: 0; font-size: .92rem; }
.history li { padding: 5px 0; border-bottom: 1px dashed #e4e7eb; }
.login-card h1 { margin-bottom: 0; }

/* ---------- Widok do druku (pojedyncze zgłoszenie) ---------- */
.print-page { background: #e9ecef; }
.print-toolbar { display: flex; gap: 8px; justify-content: center; padding: 14px; }
.sheet { background: #fff; max-width: 210mm; margin: 0 auto 30px; padding: 16mm 16mm 12mm; box-shadow: 0 2px 12px rgba(0,0,0,.12); font-size: 11pt; }
.sheet-head { display: flex; justify-content: space-between; gap: 16px; border-bottom: 2px solid #000; padding-bottom: 8px; margin-bottom: 14px; }
.sheet-head h1 { font-size: 16pt; margin: 2px 0 0; }
.sheet-org { font-size: 9pt; color: #444; text-transform: uppercase; letter-spacing: .05em; }
.sheet-num { text-align: right; font-size: 11pt; }
.sheet-num b { font-size: 14pt; }
.sheet-table { width: 100%; border-collapse: collapse; }
.sheet-table th, .sheet-table td { border: 1px solid #555; padding: 6px 8px; text-align: left; vertical-align: top; }
.sheet-table th { width: 34%; background: #f1f1f1; font-weight: 600; }
.signatures { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin: 46px 0 20px; }
.signatures div { border-top: 1px dotted #000; padding-top: 4px; font-size: 9pt; text-align: center; }
.sheet-h2 { font-size: 12pt; margin: 16px 0 8px; }
.sheet-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sheet-photos figure { margin: 0; break-inside: avoid; }
.sheet-photos img { width: 100%; max-height: 80mm; object-fit: contain; border: 1px solid #ccc; }
.sheet-photos figcaption { font-size: 8pt; color: #444; }
.sheet-foot { margin-top: 14px; font-size: 8pt; color: #666; text-align: right; }

/* ---------- Tablet / telefon ---------- */
@media (max-width: 900px) {
  .filter-grid { grid-template-columns: 1fr 1fr; }
  .filter-grid label:first-of-type { grid-column: 1 / -1; }
  .choice-grid { grid-template-columns: 1fr 1fr; }
  .menu-toggle { display: block; }
  .mainnav { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; padding-bottom: 10px; }
  .mainnav.open { display: flex; }
  .mainnav a, .mainnav .linklike { min-height: var(--tap); width: 100%; }
  .nav-sep { width: 100%; height: 1px; margin: 6px 0; }
  .brand span { font-size: .95rem; }
}
@media (max-width: 720px) {
  .container { padding: 14px 10px 30px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .card { padding: 14px; }
  h1 { font-size: 1.35rem; }
  .details { grid-template-columns: 1fr; }
  .details dt { border-bottom: 0; padding-bottom: 0; font-size: .85rem; }
  /* tabela -> karty */
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table { border: 0; background: none; }
  .table tr { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; padding: 6px 0; }
  .table td { border: 0; padding: 5px 14px; }
  .table td[data-label]::before { content: attr(data-label); display: block; font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
  .reports td:first-child::before { display: none; }
  .reports tr.row-przekroczone { border-left: 5px solid var(--red); }
  .reports tr.row-w_toku { border-left: 5px solid var(--green); }
  .reports tr.row-zaplanowane { border-left: 5px solid #6d9bd1; }
  .reports td:first-child { box-shadow: none !important; }
  .form-actions .btn { flex: 1 1 100%; }
  .sheet { padding: 8mm; }
}

/* ---------- Drukowanie ---------- */
@media print {
  @page { size: A4; margin: 12mm; }
  body, .print-page { background: #fff; font-size: 10pt; }
  .topbar, .footer, .no-print, .flash, .menu-toggle { display: none !important; }
  .print-only { display: block; }
  .container { max-width: none; padding: 0; }
  .card { border: 0; padding: 0; }
  .sheet { box-shadow: none; margin: 0; padding: 0; max-width: none; }
  .table { border: 1px solid #999; display: table; }
  .table thead { display: table-header-group; }
  .table tr { display: table-row; border: 0; padding: 0; }
  .table td, .table th { display: table-cell; border: 1px solid #999; padding: 4px 6px; font-size: 9pt; }
  .table td::before { display: none !important; }
  .table tr { break-inside: avoid; }
  a { color: #000; text-decoration: none; }
  .badge { border: 1px solid #999; background: none !important; color: #000 !important; }
}

/* =====================================================================
   EWIDENCJA I MAPA (wersja 2.0)
   ===================================================================== */
.txt-red { color: #d62728; }
.span-2 { grid-column: 1 / -1; }
.quick-add { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 14px; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; }
.stat span { display: block; font-size: .8rem; color: var(--muted); }
.stat b { font-size: 1.25rem; }
.row-alert td:first-child { box-shadow: inset 4px 0 0 var(--red); }
.link-list { columns: 2; padding-left: 18px; }
.link-list li { margin-bottom: 6px; break-inside: avoid; }
.table-scroll { overflow-x: auto; }
.table-compact td, .table-compact th { padding: 6px 8px; font-size: .9rem; }
.gis-photo { max-width: 260px; max-height: 200px; border-radius: 6px; border: 1px solid var(--line); display: block; }

/* Zakładki karty obiektu */
.tab-bar { display: none; }
.tabs-on .tab-bar { display: flex; gap: 4px; overflow-x: auto; margin-bottom: -1px; position: relative; z-index: 1; scrollbar-width: thin; }
.tab-bar button { flex: 0 0 auto; border: 1px solid var(--line); border-bottom: 0; background: #eef1f4; padding: 10px 14px; border-radius: 8px 8px 0 0;
  font: inherit; font-weight: 600; cursor: pointer; color: var(--navy); min-height: 44px; }
.tab-bar button.active { background: var(--card); box-shadow: inset 0 3px 0 var(--amber); }
.tab-bar .count { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--navy); color: #fff; font-size: .75rem; margin-left: 4px; }
.tabs-on .tab-panel { display: none; border-top-left-radius: 0; }
.tabs-on .tab-panel.active { display: block; }
.tabs-on .tab-title { display: none; }
.rel-block { margin-top: 14px; }
.rel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.rel-head h3 { margin: 0; font-size: 1rem; }

/* Formularz ewidencji */
.gis-form fieldset[hidden] { display: none; }
.gps-box p { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 6px; }
.picker, .suggest-wrap { position: relative; display: block; }
.pick-results { position: absolute; left: 0; right: 0; top: 100%; z-index: 1000; background: #fff; border: 1px solid var(--line);
  border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.15); max-height: 320px; overflow-y: auto; font-weight: 400; }
.pick-results[hidden] { display: none; }
.pick-item { display: block; width: 100%; text-align: left; padding: 10px 12px; border: 0; border-bottom: 1px solid #eef1f4; background: #fff;
  font: inherit; cursor: pointer; min-height: 44px; }
.pick-item:hover, .pick-item:focus { background: var(--amber-soft); }
.pick-empty { padding: 10px 12px; color: var(--muted); }

/* Strona mapy – pełny ekran pod paskiem menu */
body.page-map { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.map-main { flex: 1; position: relative; min-height: 0; }
.map-main > .flash { position: absolute; z-index: 1200; top: 64px; left: 50%; transform: translateX(-50%); max-width: 90%; }
.map-wrap { position: absolute; inset: 0; }
#map { position: absolute; inset: 0; background: #e8ecef; }
#map.picking { cursor: crosshair; }
#map.picking .leaflet-interactive { cursor: crosshair; }
.map-error { padding: 20px; }
.map-search { position: absolute; z-index: 1000; top: 10px; left: 56px; right: 70px; max-width: 460px; }
.map-search input { margin: 0; box-shadow: 0 2px 10px rgba(0,0,0,.2); border: 0; min-height: 46px; }
.map-results { position: absolute; left: 0; right: 0; top: 50px; background: #fff; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.2);
  max-height: 60vh; overflow-y: auto; }
.map-results[hidden] { display: none; }
.map-tools { position: absolute; z-index: 1000; top: 10px; right: 10px; display: flex; flex-direction: column; gap: 8px; }
.map-btn { width: 50px; height: 50px; border-radius: 50%; border: 0; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.25);
  font-size: 1.4rem; cursor: pointer; color: var(--navy); }
.map-btn.active { background: #1a73e8; color: #fff; }
.map-btn-add { background: var(--amber); color: #241a00; font-size: 1.8rem; }
.map-panel { position: absolute; z-index: 1001; top: 10px; right: 70px; width: 290px; max-height: calc(100% - 20px); overflow-y: auto;
  background: #fff; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.25); padding: 12px 14px; }
.map-panel[hidden] { display: none; }
.map-panel h3 { font-size: .95rem; margin: 10px 0 6px; color: var(--navy); }
.map-panel h3:first-child { margin-top: 0; }
.map-panel label.radio, .map-panel label.check { display: flex; align-items: center; gap: 8px; font-weight: 500; margin: 0; padding: 6px 0; cursor: pointer; }
.map-panel input[type=radio], .map-panel input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--navy); }
.legend { margin-top: 10px; font-size: .85rem; }
.legend div { display: flex; align-items: center; gap: 8px; margin: 4px 0; }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 1px solid #222; }
.map-hint { position: absolute; z-index: 1000; bottom: 28px; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff;
  padding: 10px 16px; border-radius: 22px; box-shadow: 0 4px 14px rgba(0,0,0,.3); max-width: 92%; text-align: center; }
.map-hint[hidden], .map-zoomhint[hidden] { display: none; }
.map-hint .btn { margin-left: 8px; }
.map-zoomhint { position: absolute; z-index: 999; top: 66px; left: 50%; transform: translateX(-50%); background: rgba(255,255,255,.92);
  padding: 6px 14px; border-radius: 16px; font-size: .85rem; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.popup-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.popup-actions .btn { min-height: 34px; padding: 5px 10px; color: var(--navy); text-decoration: none; }
.popup-actions .btn-primary { color: #fff; }
.leaflet-popup-content { font-size: .9rem; line-height: 1.4; }
.leaflet-container a.btn-primary { color: #fff; }

/* Znaczniki */
.mk-szafa { background: transparent; border: 0; }
.mk-szafa span { display: inline-block; transform: translate(-50%, -50%); background: #1c2b3a; color: #fff; border: 2px solid #f2a900;
  border-radius: 4px; padding: 1px 5px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.mk-awaria { background: #d62728; color: #fff; border: 2px solid #fff; border-radius: 50%; text-align: center; line-height: 18px;
  font-weight: 800; box-shadow: 0 1px 6px rgba(0,0,0,.4); }
.mk-awaria.pilna { background: #8b0000; animation: puls 1.2s infinite; }
.mk-wejscie { border-radius: 50%; text-align: center; line-height: 22px; font-size: 14px; border: 2px solid #fff; box-shadow: 0 1px 6px rgba(0,0,0,.4); color: #fff; }
.mk-wejscie.toku { background: #6a3d9a; }
.mk-wejscie.plan { background: #8e9bb0; }
.mk-wejscie.po { background: #e65100; }
.legend .mini { position: static; display: inline-block; width: 20px; height: 20px; line-height: 16px; font-size: 11px; text-align: center; }
.legend .mk-szafa.mini span { transform: none; padding: 0 3px; font-size: 9px; }
@keyframes puls { 0% { box-shadow: 0 0 0 0 rgba(214,39,40,.7); } 70% { box-shadow: 0 0 0 12px rgba(214,39,40,0); } 100% { box-shadow: 0 0 0 0 rgba(214,39,40,0); } }

@media (max-width: 720px) {
  .map-search { left: 10px; right: 70px; top: 10px; }
  .map-panel { left: 10px; right: 10px; width: auto; top: auto; bottom: 10px; max-height: 60%; }
  .leaflet-control-zoom { display: none; }
  .link-list { columns: 1; }
  .tab-bar button { padding: 8px 10px; font-size: .9rem; }
}
@media print {
  .tab-bar, .quick-add { display: none !important; }
  .tabs-on .tab-panel { display: block !important; }
  .tabs-on .tab-title { display: block; }
}

[hidden] { display: none !important; }

/* Numery słupów na mapie */
.leaflet-tooltip.lbl-slup { background: rgba(255,255,255,.88); border: 0; box-shadow: none; padding: 0 3px; border-radius: 3px;
  font-size: 11px; font-weight: 700; color: #1c2b3a; line-height: 15px; }
.leaflet-tooltip.lbl-slup::before { display: none; }
.scale-text { background: rgba(255,255,255,.85); padding: 2px 6px; border-radius: 4px; font-size: 12px; font-weight: 600; color: #1c2b3a; }
.danger-zone { border-color: #eab3ae; }
.danger-zone summary { color: var(--red); font-weight: 600; cursor: pointer; }
