@font-face { font-family: "Nunito"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/nunito-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/nunito-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/nunito-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/nunito-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/nunito-latin-ext-700-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/nunito-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 800; font-display: swap; src: url(fonts/nunito-latin-ext-800-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 800; font-display: swap; src: url(fonts/nunito-latin-800-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --akcent: #007a5e;
  --akcent-mocny: #00624b;
  --na-akcencie: #ffffff;
  --tekst: #141414;
  --szary: #6b6b6b;
  --linia: #e6e6e3;
  --tlo: #ffffff;
  --tlo2: #f6f5f2;
  --panel: 380px;
  --r: 14px;
  font-family: "Nunito", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color: var(--tekst);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #dfe6ec; overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }

.app { display: flex; height: 100dvh; padding: 12px; gap: 0; }

/* panel */
.panel {
  width: var(--panel); flex: none; background: var(--tlo); border-radius: var(--r);
  display: flex; flex-direction: column; overflow: hidden; z-index: 2;
  box-shadow: 0 8px 30px rgba(0,0,0,.12);
  transition: margin-left .3s ease;
}
.app.mini .panel { margin-left: calc(-1 * var(--panel) - 12px); }
.panel-top { display: flex; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--linia); }
.link { background: none; border: 0; padding: 0; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--tekst); text-decoration: none; }
.link:hover { text-decoration: underline; }

.dom-wybor { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--linia); }
.kod { font-size: 30px; font-weight: 800; color: var(--akcent); letter-spacing: -.02em; grid-row: span 2; }
.dom-nazwa { display: flex; flex-direction: column; font-weight: 800; font-size: 15px; }
.dom-nazwa small { color: var(--szary); font-weight: 400; font-size: 12px; }
.select { display: flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.select span { display: none; }
.select select { font: inherit; font-size: 12px; text-transform: none; letter-spacing: 0; border: 1px solid var(--linia); border-radius: 8px; padding: 5px 8px; background: var(--tlo2); width: 100%; }

.bryla { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--linia); }
.bryla button { background: none; border: 0; padding: 12px 6px 10px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; border-right: 1px solid var(--linia); }
.bryla button:last-child { border-right: 0; }
.bryla button svg { width: 34px; height: 24px; }
.bryla button.on { background: var(--akcent); color: var(--na-akcencie); font-weight: 700; }
.bryla button:not(.on):hover { background: var(--tlo2); }
.kafle-grupa { border-bottom: 1px solid var(--linia); }
.kafle-nag { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px 4px; font-size: 13px; font-weight: 800; }
.kafle-nag .info { background: none; border: 0; font-size: 11px; letter-spacing: .06em; color: var(--szary); padding: 2px 0; }
.kafle-nag .info:hover { color: var(--tekst); text-decoration: underline; }
.bryla.kafle { grid-template-columns: repeat(4, 1fr); border-bottom: 0; }
.bryla.kafle button { font-size: 11px; padding: 10px 4px 10px; line-height: 1.2; text-align: center; }

.grupy { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.grupa { border-bottom: 1px solid var(--linia); }
.grupa-nag {
  width: 100%; background: none; border: 0; display: flex; align-items: center; gap: 12px;
  padding: 13px 18px; text-align: left; font-size: 13px;
}
.grupa-nag .stan { width: 16px; height: 16px; border: 1.5px solid #9a9a9a; border-radius: 50%; flex: none; position: relative; }
.grupa.zmieniona .grupa-nag .stan { border-color: var(--akcent); background: var(--akcent); }
.grupa.zmieniona .grupa-nag .stan::after { content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px; border: solid #fff; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.grupa-nag .nazwa { flex: 1; }
.grupa-nag .wybrano { color: var(--szary); font-size: 11px; max-width: 120px; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grupa-nag .strz { width: 8px; height: 8px; border: solid #555; border-width: 0 1.5px 1.5px 0; transform: rotate(-45deg); transition: transform .2s; flex: none; }
.grupa.otwarta .grupa-nag { font-weight: 800; }
.grupa.otwarta .grupa-nag .strz { transform: rotate(45deg); }
.grupa.wylaczona { opacity: .45; }
.grupa.wylaczona .grupa-nag { cursor: not-allowed; }
.opcje { display: none; background: var(--akcent); color: var(--na-akcencie); }
.grupa.otwarta .opcje { display: block; }
.opcja { display: flex; align-items: center; gap: 12px; padding: 11px 18px; font-size: 13px; cursor: pointer; border-top: 1px solid rgba(255,255,255,.14); }
.opcja input { position: absolute; opacity: 0; pointer-events: none; }
.opcja .kropka { width: 16px; height: 16px; border-radius: 50%; background: #fff; flex: none; display: grid; place-items: center; }
.opcja input:checked + .kropka::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--akcent); }
.opcja input:focus-visible + .kropka { outline: 2px solid #fff; outline-offset: 2px; }
.opcja .probka { width: 18px; height: 18px; border-radius: 4px; border: 1px solid rgba(255,255,255,.6); flex: none; }
.opcja .opis { flex: 1; }
.opcja .cena-d { font-size: 11px; color: rgba(255,255,255,.78); white-space: nowrap; }
.opcja .info { background: none; border: 0; color: #fff; font-weight: 700; font-size: 11px; letter-spacing: .06em; padding: 2px 0 2px 4px; white-space: nowrap; }
.opcja .info:hover { text-decoration: underline; }
.uwaga { font-size: 12px; padding: 8px 18px 12px; color: #fff; background: var(--akcent); }

.panel-dol { border-top: 1px solid var(--linia); padding: 14px 18px; display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.cena { display: flex; flex-direction: column; min-width: 0; }
.cena small { font-size: 10px; color: var(--szary); line-height: 1.3; max-width: 150px; }
.cena strong { font-size: 21px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; }
.przyciski { display: flex; flex-direction: column; gap: 6px; }
.btn { border: 0; border-radius: 999px; padding: 9px 16px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
.btn.ciemny { background: var(--tekst); color: #fff; }
.btn.pelny { width: 100%; padding: 14px 18px; font-size: 12px; }
.lista-konf { margin: 0 0 6px; padding: 12px 14px; background: var(--tlo2); border-radius: 10px; font-size: 12px; line-height: 1.6; color: #444; list-style: none; }
.lista-konf b { color: var(--tekst); font-weight: 700; }
.btn.akcent { background: var(--akcent); color: var(--na-akcencie); }
.btn.jasny { background: var(--tlo2); }
.btn:hover { filter: brightness(.95); }

/* widok 3D */
.widok { flex: 1; position: relative; margin-left: -12px; border-radius: 0 var(--r) var(--r) 0; overflow: hidden; }
.app.mini .widok { margin-left: 0; border-radius: var(--r); }
.widok canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.ladowanie { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: #445; background: #dfe6ec; z-index: 3; transition: opacity .4s; }
.ladowanie.ukryj { opacity: 0; pointer-events: none; }

.pasek-gora { position: absolute; top: 14px; left: 26px; right: 14px; display: flex; justify-content: flex-end; gap: 10px; align-items: center; }
.btn-pokaz { display: none; margin-right: auto; }
.app.mini .btn-pokaz { display: inline-flex; }
.pora, .kamery { display: flex; background: rgba(255,255,255,.88); border-radius: 999px; padding: 4px; gap: 2px; backdrop-filter: blur(6px); }
.pora button, .kamery button { border: 0; background: none; border-radius: 999px; padding: 7px 13px; font-size: 12px; }
.pora button.on, .kamery button.on { background: var(--akcent); color: #fff; }
.btn-pokaz { border: 0; border-radius: 999px; padding: 9px 16px; background: #fff; font-size: 12px; font-weight: 600; }

.znaczek { position: absolute; top: 64px; right: 14px; background: rgba(255,255,255,.9); border-radius: 10px; padding: 8px 12px; font-size: 12px; }

.pasek-dol { position: absolute; bottom: 14px; left: 26px; right: 14px; display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.akcje { display: flex; gap: 8px; margin-left: auto; }
.pill { border: 0; border-radius: 999px; background: #fff; padding: 11px 18px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 500; box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.pill.akcent { background: var(--akcent); color: var(--na-akcencie); }
.pill[aria-pressed="true"] { background: var(--akcent); color: #fff; }
.pill.ikona { padding: 10px 12px; display: grid; place-items: center; }

/* modal */
.modal { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-tlo { position: absolute; inset: 0; background: rgba(20,20,20,.45); }
.modal-okno { position: relative; background: #fff; border-radius: var(--r); width: min(880px, 100%); max-height: calc(100dvh - 32px); overflow: auto; padding: 26px 28px 28px; }
.modal-okno.waskie { width: min(520px, 100%); }
.modal-x { position: absolute; top: 10px; right: 12px; border: 0; background: none; font-size: 28px; line-height: 1; padding: 4px 8px; }
.modal h2 { margin: 0 0 16px; font-size: 21px; font-weight: 800; color: var(--akcent); padding-right: 30px; }
.modal p { font-size: 14px; line-height: 1.55; color: #333; }

.placeholder { border: 2px dashed #c9c6be; border-radius: 10px; background: repeating-linear-gradient(45deg, #f7f6f2, #f7f6f2 10px, #f0eee8 10px, #f0eee8 20px); color: #6d6a62; display: grid; place-items: center; text-align: center; padding: 18px; font-size: 12px; line-height: 1.5; aspect-ratio: 16 / 9; }
.placeholder b { display: block; font-size: 13px; color: #3d3b36; margin-bottom: 4px; }
.info-img { width: 100%; border-radius: 10px; display: block; aspect-ratio: 16 / 9; object-fit: cover; }

.galeria { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.galeria figure { margin: 0; }
.galeria img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; display: block; cursor: zoom-in; }
.galeria figcaption { font-size: 12px; color: var(--szary); margin-top: 6px; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.88); z-index: 30; display: grid; place-items: center; padding: 16px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; }

.rzut-wrap { display: grid; grid-template-columns: 1.3fr 1fr; gap: 22px; align-items: start; }
.rzut-wrap img { width: 100%; display: block; border: 1px solid var(--linia); border-radius: 10px; background: #fff; }
.tabela { width: 100%; border-collapse: collapse; font-size: 13px; }
.tabela td { padding: 7px 0; border-bottom: 1px solid var(--linia); }
.tabela td:last-child { text-align: right; white-space: nowrap; padding-left: 12px; }
.tabela tr.suma td { font-weight: 700; border-bottom: 0; padding-top: 12px; }
.tabela .d { color: var(--szary); }

.form { display: grid; gap: 10px; margin-top: 16px; }
.form input, .form textarea { font: inherit; font-size: 14px; border: 1px solid var(--linia); border-radius: 10px; padding: 11px 12px; background: var(--tlo2); width: 100%; }
.form textarea { min-height: 80px; resize: vertical; }
.wiersz-btn { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.drobny { font-size: 11px; color: var(--szary); line-height: 1.5; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--tekst); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 13px; z-index: 40; }

@media (max-width: 860px) {
  html, body { height: auto; overflow: visible; }
  body { overflow-x: clip; }
  .app { display: flex; flex-direction: column; padding: 0; height: auto; min-height: 100svh; }
  .widok { order: -1; flex: none; position: sticky; top: 0; z-index: 5; height: 46svh; margin: 0; border-radius: 0; }
  .app.mini .widok { border-radius: 0; }
  .panel { display: block; flex: none; width: 100%; border-radius: 0; margin: 0; box-shadow: none; overflow: visible; position: relative; z-index: 1; }
  .app.mini .panel { margin-left: 0; }
  .grupy { overflow: visible; }
  .panel-dol { position: sticky; bottom: 0; z-index: 6; background: #fff; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 14px rgba(0,0,0,.06); }
  .panel-top { padding: 12px 16px; }
  #minimalizuj { display: none; }
  .dom-wybor { padding: 10px 16px; }
  .kod { font-size: 24px; }
  .grupa-nag, .opcja { padding-left: 16px; padding-right: 16px; }
  .grupa-nag { padding-top: 15px; padding-bottom: 15px; }
  .pasek-gora { left: 12px; right: 12px; top: 10px; }
  .pasek-dol { left: 12px; right: 12px; bottom: 12px; }
  .kamery { display: none; }
  .pora button { padding: 6px 10px; font-size: 11px; }
  .pill { padding: 9px 11px; font-size: 11px; letter-spacing: .04em; white-space: nowrap; flex: none; }
  .akcje { gap: 6px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .akcje::-webkit-scrollbar { display: none; }
  .znaczek { top: 52px; right: 12px; }
  .rzut-wrap { grid-template-columns: 1fr; }
  .modal-okno { padding: 22px 18px; }
}
.uwagi-sek { padding: 4px 0 16px; border-bottom: 1px solid var(--linia); }
.uwagi-sek .drobny { margin: 2px 18px 10px; }
.uwagi-sek .btn { margin: 0 18px; }
.uwagi-sek .licznik { color: var(--akcent); }
.uwagi-lista { list-style: none; margin: 0 18px 10px; padding: 0; display: grid; gap: 6px; }
.uwagi-lista li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; background: var(--tlo2); border-radius: 10px; font-size: 12px; cursor: pointer; }
.uwagi-lista li b { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--akcent); color: #fff; display: grid; place-items: center; font-size: 11px; }
.uwagi-lista li small { display: block; color: var(--szary); font-size: 11px; }
.piny { position: absolute; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.pin { position: absolute; left: 0; top: 0; pointer-events: auto; width: 28px; height: 28px; margin-top: -8px; border-radius: 50%; border: 2px solid #fff; background: var(--akcent); color: #fff; font-weight: 800; font-size: 13px; line-height: 1; display: grid; place-items: center; box-shadow: 0 3px 10px rgba(0,0,0,.35); padding: 0; }
.pin::after { content: ""; position: absolute; left: 50%; bottom: -9px; transform: translateX(-50%); border: 6px solid transparent; border-top: 7px solid #fff; }
.pin:hover { background: var(--akcent-mocny); }
.tryb-uwagi { position: absolute; top: 60px; left: 50%; transform: translateX(-50%); z-index: 3; background: var(--tekst); color: #fff; border-radius: 999px; padding: 8px 8px 8px 16px; font-size: 13px; display: flex; gap: 12px; align-items: center; white-space: nowrap; }
.tryb-uwagi[hidden] { display: none; }
.tryb-uwagi button { border: 0; border-radius: 999px; background: #fff; color: var(--tekst); padding: 6px 12px; font-size: 12px; font-weight: 700; }
.widok.dodaje-uwage canvas { cursor: crosshair; }
.podpowiedzi { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.chip { border: 1px solid var(--linia); background: var(--tlo2); border-radius: 999px; padding: 6px 11px; font-size: 12px; }
.chip:hover { border-color: var(--akcent); color: var(--akcent); }
.uwagi-form { margin: 4px 0 8px; padding: 12px 14px; border: 1px dashed #cfd8d4; border-radius: 10px; font-size: 13px; }
.uwagi-form ol { margin: 6px 0 10px; padding-left: 20px; line-height: 1.5; }
.uwagi-form .btn { margin-top: 6px; }
.nota-v2 { margin: 16px 18px; padding: 14px 16px; border-radius: 12px; background: var(--tlo2); font-size: 13px; line-height: 1.5; }
.nota-v2 b { color: var(--akcent); font-size: 14px; }
.nota-v2 p { margin: 6px 0; color: #444; }
.nota-v2 .btn { display: inline-block; margin-top: 6px; text-decoration: none; color: var(--tekst); }
