:root{--navy:#132238;--navy2:#1e344e;--ink:#1c2938;--muted:#718096;--line:#e6ebf0;--bg:#f4f7fa;--white:#fff;--red:#df4545;--orange:#e58b27;--yellow:#d6a400;--green:#23855b;--shadow:0 10px 35px rgba(17,34,56,.12)}
*{box-sizing:border-box}body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:var(--bg)}button,input,select,textarea{font:inherit}button{cursor:pointer}.topbar{height:78px;background:var(--navy);color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 28px;position:relative;z-index:500;box-shadow:0 3px 15px #0b182633}.brand{display:flex;gap:12px;align-items:center;color:inherit;text-decoration:none}.brand-mark{display:grid;place-items:center;width:42px;height:42px;background:#d9f4e6;color:#176747;border-radius:13px;font-size:25px;font-weight:800;transform:rotate(-8deg)}.brand strong{display:block;font-size:17px;letter-spacing:-.3px}.brand small{display:block;color:#b9c8d8;font-size:11px;margin-top:3px}.primary-btn,.secondary-btn{border:0;border-radius:11px;padding:12px 17px;font-weight:750;font-size:13px;transition:transform .15s,opacity .15s}.primary-btn{background:#b8f0d2;color:#123d2b;box-shadow:0 3px 0 #77c99e}.primary-btn:hover,.secondary-btn:hover{transform:translateY(-1px)}.layout{height:calc(100vh - 78px);min-height:560px;display:grid;grid-template-columns:365px minmax(0,1fr)}.sidebar{background:#fff;border-right:1px solid var(--line);padding:26px 23px 15px;display:flex;flex-direction:column;min-height:0;z-index:400}.eyebrow{font-size:9px;font-weight:850;letter-spacing:1.7px;color:#23855b}.intro h1{font-size:30px;line-height:1.06;letter-spacing:-1.2px;margin:11px 0 12px;color:var(--navy)}.intro p{font-size:12px;line-height:1.7;color:#667487;margin:0}.status-row{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:23px 0 21px}.stat{background:#f4f7fa;border:1px solid #edf1f5;border-radius:13px;padding:13px 14px}.stat strong{display:block;font-size:24px;letter-spacing:-.8px;color:var(--navy)}.stat span{display:block;color:#718096;font-size:10px;margin-top:4px}.legend{border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:15px 0 14px}.legend h2,.list-head h2{font-size:12px;margin:0 0 12px;color:var(--navy)}.legend div{display:flex;align-items:center;gap:9px;font-size:11px;color:#526174;margin:8px 0}.dot{width:8px;height:8px;border-radius:50%;display:inline-block;flex:none}.dot.closed{background:var(--red)}.dot.difficult{background:var(--orange)}.dot.planned{background:var(--yellow)}.dot.works-open{background:#3478c8}.list-head{display:flex;align-items:center;justify-content:space-between;margin-top:18px}.list-head h2{margin:0}.text-btn{border:0;background:transparent;color:#23855b;font-weight:750;font-size:11px;padding:5px}.report-list{overflow:auto;min-height:80px;flex:1;margin:10px -7px 0;padding:0 7px}.report-card{border:1px solid var(--line);border-radius:12px;padding:12px;margin-bottom:9px;background:#fff;cursor:pointer;transition:border-color .15s,box-shadow .15s}.report-card:hover{border-color:#9bd6b8;box-shadow:0 5px 14px #1222380c}.card-top{display:flex;align-items:center;gap:7px}.card-top strong{font-size:12px;line-height:1.4;flex:1}.badge{font-size:9px;font-weight:800;padding:4px 6px;border-radius:5px;white-space:nowrap}.badge.closed{background:#fff0f0;color:#c33737}.badge.difficult{background:#fff4e6;color:#a95b00}.badge.planned{background:#fff9db;color:#8a6b00}.badge.works_open{background:#eaf2ff;color:#245ca8}.card-meta{font-size:10px;color:#8995a4;margin-top:8px}.card-details{font-size:11px;color:#536275;line-height:1.5;margin-top:8px}.card-actions{display:flex;gap:7px;margin-top:10px}.mini-btn{background:#f2f7f4;border:1px solid #d9eee2;color:#216a49;border-radius:7px;padding:7px 8px;font-size:10px;font-weight:750}.mini-btn.secondary{background:#f7f8fa;border-color:#e8edf1;color:#68778a}.empty-state{font-size:12px;color:#8b97a6;padding:20px 7px;line-height:1.6}.sidebar-foot{padding-top:13px;border-top:1px solid var(--line);font-size:10px;color:#728094}.sidebar-foot p{line-height:1.5;margin:8px 0 0}.live-dot{display:inline-block;width:7px;height:7px;background:#29b777;border-radius:50%;box-shadow:0 0 0 3px #29b77720;margin-right:6px}.map-wrap{position:relative;min-width:0;min-height:0}#map{height:100%;width:100%;background:#e8edf0}.map-tools{position:absolute;top:16px;left:16px;right:16px;z-index:450;display:flex;justify-content:space-between;pointer-events:none}.map-pill,.map-tool-btn{pointer-events:auto;background:#fff;border:1px solid #e5eaf0;box-shadow:0 4px 15px #15263c15;border-radius:10px;padding:10px 12px;font-size:11px;font-weight:750;color:#405066}.map-tool-btn{cursor:pointer}.map-hint{position:absolute;z-index:450;bottom:18px;left:50%;transform:translateX(-50%);max-width:calc(100% - 30px);background:#132238eF;color:#fff;padding:11px 15px;border-radius:10px;font-size:11px;line-height:1.5;text-align:center;box-shadow:var(--shadow);pointer-events:none}.toast{position:absolute;z-index:900;top:75px;left:50%;transform:translate(-50%,-10px);opacity:0;pointer-events:none;background:#123d2b;color:#fff;border-radius:10px;padding:11px 16px;font-size:12px;box-shadow:var(--shadow);transition:.2s}.toast.show{opacity:1;transform:translate(-50%,0)}dialog{border:0;border-radius:18px;padding:0;width:min(560px,calc(100% - 28px));box-shadow:0 25px 100px #08182c55;color:var(--ink)}dialog::backdrop{background:#0b192bb3;backdrop-filter:blur(3px)}#reportForm{padding:25px}.dialog-head{display:flex;justify-content:space-between;align-items:flex-start}.dialog-head h2{font-size:23px;letter-spacing:-.7px;color:var(--navy);margin:7px 0 0}.close-btn{border:0;background:#f1f4f7;color:#566477;border-radius:50%;width:32px;height:32px;font-size:23px;line-height:1}.form-help{font-size:12px;line-height:1.6;color:#738093;margin:13px 0 15px}.selected-points{display:flex;align-items:center;gap:8px;border:1px dashed #c9d8d0;background:#f5fbf7;border-radius:9px;padding:9px 10px;font-size:11px;color:#486555;margin-bottom:15px}.selected-points span:nth-child(2){flex:1}.pin-mini{font-size:17px;color:#23855b}label{display:block;font-size:11px;font-weight:800;color:#405066;margin:13px 0 6px}label span{color:var(--red)}label small{font-weight:500;color:#8a96a5}input,select,textarea{width:100%;border:1px solid #dce3e9;border-radius:9px;padding:11px 12px;background:#fff;color:#243348;font-size:12px;outline:none}input:focus,select:focus,textarea:focus{border-color:#65bc8d;box-shadow:0 0 0 3px #65bc8d20}textarea{resize:vertical}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.notice{background:#fff8e6;color:#7d641f;border-radius:9px;padding:10px 11px;font-size:10px;line-height:1.5;margin-top:15px}.dialog-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:18px}.secondary-btn{background:#f0f3f6;color:#58677a;box-shadow:none}.detail-wrap{padding:25px}.detail-wrap h2{margin:8px 0;font-size:22px;color:var(--navy)}.detail-wrap p{font-size:12px;line-height:1.6;color:#657386}.detail-close{float:right;border:0;background:#f1f4f7;border-radius:50%;width:30px;height:30px;font-size:20px}.detail-votes{display:flex;gap:8px;flex-wrap:wrap;margin-top:16px}.detail-votes button{flex:1;min-width:145px}.mobile-footer{display:none}.leaflet-popup-content-wrapper{border-radius:12px}.leaflet-popup-content{font-family:inherit;font-size:12px;line-height:1.5}.closure-line{filter:drop-shadow(0 1px 2px #fff)}
@media(max-width:900px){.layout{grid-template-columns:310px minmax(0,1fr)}.sidebar{padding:22px 17px 12px}.intro h1{font-size:27px}}
@media(max-width:680px){.topbar{height:68px;padding:0 14px}.brand-mark{width:36px;height:36px}.brand strong{font-size:14px}.brand small{font-size:9px}.topbar .primary-btn{padding:10px 11px;font-size:11px}.layout{height:auto;min-height:0;display:flex;flex-direction:column}.map-wrap{order:0;height:53vh;min-height:340px}.sidebar{order:1;border-right:0;padding:20px 16px 14px}.intro h1{font-size:27px}.intro p{max-width:500px}.status-row{margin:16px 0}.report-list{max-height:400px;flex:none}.sidebar-foot{margin-top:10px}.map-hint{bottom:10px;font-size:10px}.map-tools{top:10px;left:10px;right:10px}.map-pill,.map-tool-btn{padding:9px;font-size:10px}.mobile-footer{display:block;text-align:center;padding:14px 18px;color:#7d8998;font-size:10px;line-height:1.5;background:#fff}.form-grid{grid-template-columns:1fr}#reportForm{padding:21px}.dialog-head h2{font-size:21px}}


/* Ulepszenia obsługi na telefonach */
button, .map-tool-btn, .mini-btn { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #65bc8d; outline-offset: 2px; }
[hidden] { display: none !important; }
.map-undo-btn { background: #e8f7ef; border-color: #b9e5cd; color: #176747; }
body.is-picking .map-wrap { outline: 3px solid #75c99b; outline-offset: -3px; }
body.is-picking .map-hint { background: #123d2b; border: 1px solid #77c99e; }
#reportDialog, #detailDialog { max-height: min(90dvh, 820px); overflow-y: auto; overscroll-behavior: contain; }
#reportForm { padding-bottom: max(21px, env(safe-area-inset-bottom)); }

@media (max-width:680px) {
  .topbar { min-height: 68px; height: auto; gap: 10px; padding: 10px 12px; }
  .brand { min-width: 0; gap: 9px; }
  .brand > span:last-child { min-width: 0; }
  .brand strong { font-size: 13px; line-height: 1.2; }
  .brand small { font-size: 9px; line-height: 1.3; max-width: 190px; }
  .topbar .primary-btn { min-height: 44px; max-width: 48%; padding: 9px 10px; font-size: 11px; line-height: 1.25; }
  .brand-mark { flex: 0 0 36px; }
  .map-wrap { height: min(58dvh, 570px); min-height: 360px; }
  #map { touch-action: pan-x pan-y; }
  .map-tools { top: 10px; left: 10px; right: 10px; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; }
  .map-pill, .map-tool-btn { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; padding: 10px 11px; font-size: 11px; line-height: 1.2; border-radius: 12px; }
  .map-pill { max-width: calc(100% - 150px); }
  .map-tool-btn { margin-left: auto; }
  .map-undo-btn:not([hidden]) { order: 3; margin-left: 0; }
  body.is-picking .map-tools { right: 8px; }
  body.is-picking .map-hint { bottom: 12px; left: 10px; right: 10px; transform: none; max-width: none; width: auto; padding: 10px 12px; font-size: 11px; }
  .sidebar { padding: 22px 16px 16px; }
  .intro h1 { font-size: 28px; }
  .intro p { font-size: 13px; line-height: 1.6; }
  .stat { padding: 13px; }
  .stat strong { font-size: 25px; }
  .stat span { font-size: 11px; line-height: 1.35; }
  .legend div { font-size: 12px; min-height: 22px; }
  .list-head h2, .legend h2 { font-size: 14px; }
  .text-btn { min-height: 40px; padding: 8px 10px; font-size: 12px; }
  .report-card { padding: 13px; }
  .card-top strong { font-size: 13px; }
  .card-meta, .card-details { font-size: 12px; }
  .mini-btn { min-height: 42px; padding: 9px 11px; font-size: 11px; }
  #reportForm { padding: 18px 16px; }
  .form-help { font-size: 13px; }
  label { font-size: 12px; }
  input, select, textarea { min-height: 44px; font-size: 16px; }
  textarea { min-height: 92px; }
  .selected-points { flex-wrap: wrap; font-size: 12px; }
  .selected-points span:nth-child(2) { min-width: 120px; }
  .dialog-actions { position: sticky; bottom: -1px; background: #fff; padding-top: 12px; padding-bottom: max(4px, env(safe-area-inset-bottom)); }
  .dialog-actions button { min-height: 44px; }
}
@media (max-width:380px) {
  .brand small { display: none; }
  .brand strong { max-width: 130px; }
  .topbar .primary-btn { max-width: 52%; }
  .map-pill { max-width: calc(100% - 132px); }
  .map-pill, .map-tool-btn { padding: 9px; font-size: 10px; }
}
