:root {
  --tlo: #f4f5f7; --karta: #fff; --tekst: #1f2733; --cichy: #5f6b7a; --linia: #dde1e7;
  --akcent: #2f5b8f; --akcent-jasny: #e7eef7; --ok: #2e7d4f; --ostr: #b26a00; --blad: #b3261e;
  font-size: 15px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; background: var(--tlo); color: var(--tekst); line-height: 1.45; }
a { color: var(--akcent); text-decoration: none; }
a:hover { text-decoration: underline; }
header.gora { background: #1f3a5c; color: #fff; display: flex; align-items: center; gap: 4px; padding: 0 18px; height: 52px; position: sticky; top: 0; z-index: 10; }
header.gora .logo { font-weight: 600; margin-right: 18px; color: #fff; }
header.gora nav a { color: #dbe6f3; padding: 8px 11px; border-radius: 6px; font-size: 14px; }
header.gora nav a:hover, header.gora nav a.akt { background: rgba(255,255,255,.12); color: #fff; text-decoration: none; }
header.gora .prawa { margin-left: auto; display: flex; gap: 12px; align-items: center; font-size: 13px; color: #c5d3e4; }
header.gora .prawa a, header.gora .prawa button { color: #fff; }
.licznik { background: #e0a100; color: #1b1b1b; border-radius: 9px; padding: 0 6px; font-size: 11px; font-weight: 700; margin-left: 3px; }
main { max-width: 1280px; margin: 0 auto; padding: 22px 18px 60px; }
h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 17px; margin: 0 0 12px; }
h3 { font-size: 15px; margin: 14px 0 6px; }
.podtytul { color: var(--cichy); margin-bottom: 18px; }
.karta { background: var(--karta); border: 1px solid var(--linia); border-radius: 10px; padding: 16px 18px; margin-bottom: 16px; }
.siatka { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 16px; }
.siatka-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
@media (max-width: 900px) { .siatka-2 { grid-template-columns: 1fr; } }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 600; color: var(--cichy); font-size: 12.5px; text-transform: uppercase; letter-spacing: .02em; border-bottom: 1px solid var(--linia); padding: 7px 8px; }
td { border-bottom: 1px solid #eef0f3; padding: 8px; vertical-align: top; }
tr:hover td { background: #fafbfc; }
.pusto { color: var(--cichy); font-style: italic; padding: 10px 0; }
.btn, button { font: inherit; font-size: 14px; border: 1px solid var(--linia); background: #fff; color: var(--tekst); border-radius: 7px; padding: 6px 12px; cursor: pointer; display: inline-block; }
.btn:hover, button:hover { background: #f1f3f6; text-decoration: none; }
.btn.glowny, button.glowny { background: var(--akcent); border-color: var(--akcent); color: #fff; }
.btn.glowny:hover, button.glowny:hover { background: #244a76; }
.btn.ok, button.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.zly, button.zly { color: var(--blad); border-color: #e7b9b5; }
.btn.maly, button.maly { padding: 3px 8px; font-size: 12.5px; }
button.link { border: none; background: none; color: var(--akcent); padding: 0; }
form.inline { display: inline; }
input[type=text], input[type=email], input[type=url], input[type=search], input[type=date], input[type=datetime-local], input[type=number], input[type=password], select, textarea {
  font: inherit; font-size: 14px; padding: 6px 8px; border: 1px solid #c8ced6; border-radius: 6px; background: #fff; max-width: 100%;
}
textarea { width: 100%; }
textarea.mono, .mono { font-family: Consolas, "Courier New", monospace; font-size: 13px; }
.formularz p { margin: 0 0 12px; }
.formularz label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 3px; }
.formularz input[type=text], .formularz input[type=email], .formularz input[type=url], .formularz select, .formularz textarea { width: 100%; }
.formularz .helptext { display: block; color: var(--cichy); font-size: 12px; margin-top: 2px; }
.formularz input[type=checkbox] { margin-right: 6px; }
.errorlist { color: var(--blad); margin: 4px 0; padding-left: 18px; font-size: 13px; }
.filtry { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.komunikaty { list-style: none; padding: 0; margin: 0 0 16px; }
.komunikaty li { padding: 10px 14px; border-radius: 8px; margin-bottom: 6px; background: var(--akcent-jasny); border: 1px solid #c9d8ea; }
.komunikaty li.success { background: #e6f4ec; border-color: #b8dcc6; }
.komunikaty li.error { background: #fbeaea; border-color: #efc2be; }
.komunikaty li.warning { background: #fff4e0; border-color: #f0d6a6; }
.znacznik { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; font-weight: 600; background: #eceff3; color: #3c4653; white-space: nowrap; }
.st-nowe, .st-nowa { background: #fff1d6; color: #7a4d00; }
.st-przydzielone { background: #efe6f7; color: #553075; }
.st-przyjete, .st-analiza { background: #dfeaf7; color: #234a75; }
.st-odrzucone, .st-przegrana, .st-rezygnacja, .st-nieaktualna { background: #f1e3e2; color: #7d2a24; }
.st-wyslana, .st-zlozona { background: #e2f1e8; color: #1f5b38; }
.st-wygrana { background: #1f5b38; color: #fff; }
.st-robocza { background: #eceff3; }
.st-aktualna { background: var(--akcent); color: #fff; }
.alarm { color: var(--blad); font-weight: 600; }
.ostrz { color: var(--ostr); font-weight: 600; }
.cichy { color: var(--cichy); font-size: 13px; }
.zakladki { display: flex; gap: 2px; border-bottom: 1px solid var(--linia); margin: 18px 0 16px; flex-wrap: wrap; }
.zakladki a { padding: 9px 14px; border: 1px solid transparent; border-bottom: none; border-radius: 8px 8px 0 0; color: var(--cichy); font-weight: 500; }
.zakladki a.akt { background: var(--karta); border-color: var(--linia); color: var(--tekst); margin-bottom: -1px; }
.zakladki a:hover { text-decoration: none; color: var(--tekst); }
.naglowek { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.dane { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; font-size: 14px; }
.dane dt { color: var(--cichy); }
.dane dd { margin: 0; white-space: pre-line; }
.wiadomosc { border: 1px solid var(--linia); border-radius: 8px; padding: 12px 14px; margin-bottom: 12px; background: #fff; }
.wiadomosc .tresc { white-space: pre-wrap; font-size: 13.5px; max-height: 280px; overflow: auto; background: #fafbfc; padding: 8px 10px; border-radius: 6px; margin: 8px 0; }
.akcje { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.podpowiedz { font-size: 13px; }
.drzewo { font-size: 14px; }
.drzewo .w { display: flex; align-items: center; gap: 8px; padding: 4px 6px; padding-left: calc(6px + var(--p) * 24px); border-bottom: 1px solid #f0f2f5; }
.drzewo .w.katalog { font-weight: 600; background: #f7f9fb; }
.drzewo .w .nazwa { flex: 1; }
.drzewo .w .meta { color: var(--cichy); font-size: 12.5px; white-space: nowrap; }
.wersja { border: 1px solid var(--linia); border-radius: 8px; padding: 12px 14px; margin-bottom: 10px; }
.wersja.aktualna { border-color: var(--akcent); box-shadow: inset 4px 0 0 var(--akcent); }
.wersja ul { margin: 6px 0; padding-left: 20px; }
.zmiana { border-left: 3px solid var(--linia); padding: 6px 12px; margin: 8px 0; }
.zmiana.nowa { border-color: var(--ostr); background: #fffaf0; }
.zmiana pre { white-space: pre-wrap; font-family: inherit; font-size: 13px; margin: 6px 0 0; max-height: 260px; overflow: auto; }
.instalacja { border: 1px solid var(--linia); border-radius: 8px; padding: 10px 14px; margin-bottom: 10px; }
.pasek { height: 8px; background: #e6e9ee; border-radius: 4px; overflow: hidden; width: 120px; display: inline-block; vertical-align: middle; }
.pasek span { display: block; height: 100%; background: var(--akcent); }
.login { max-width: 380px; margin: 80px auto; }
.kafle { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kafel { background: var(--karta); border: 1px solid var(--linia); border-radius: 10px; padding: 14px; }
.kafel .liczba { font-size: 26px; font-weight: 700; }
.kafel .opis { color: var(--cichy); font-size: 13px; }
details summary { cursor: pointer; color: var(--akcent); font-size: 13.5px; }

/* --- wykres obciążenia kosztorysantów (pulpit) --- */
.wyk-legenda { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--cichy); margin: 6px 0 10px; }
.wyk-legenda i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.wyk-wiersz { display: grid; grid-template-columns: 170px 1fr 130px; align-items: center; gap: 12px; padding: 7px 4px; border-bottom: 1px solid #f0f2f5; }
.wyk-wiersz .osoba { font-weight: 600; cursor: pointer; }
.wyk-wiersz .osoba:hover { color: var(--akcent); }
.slupek { display: flex; height: 22px; border-radius: 5px; overflow: hidden; min-width: 4px; }
.slupek button { all: unset; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; font-weight: 600; cursor: pointer; height: 100%; }
.slupek button:hover, .slupek button.akt { filter: brightness(1.15); box-shadow: inset 0 0 0 2px rgba(255,255,255,.7); }
.g-po, .slupek button.g-po { background: #b3261e; } .g-7, .slupek button.g-7 { background: #d98200; }
.g-pozniej, .slupek button.g-pozniej { background: #2f5b8f; } .g-brak, .slupek button.g-brak { background: #9aa3ae; }
button:disabled, button:disabled:hover { opacity: .5; cursor: not-allowed; }
.wyk-liczby { font-size: 13px; text-align: right; } .wyk-liczby b { font-size: 15px; }
.wyk-lista { display: none; margin: 4px 0 10px 182px; border: 1px solid var(--linia); border-radius: 8px; padding: 8px 12px; background: #fbfcfd; }
.wyk-lista.otwarta { display: block; }
.wyk-lista table td, .wyk-lista table th { padding: 5px 8px; }
.wyk-pusty { color: var(--cichy); font-size: 13px; }
@media (max-width: 800px) { .wyk-wiersz { grid-template-columns: 1fr; } .wyk-lista { margin-left: 0; } }
.niedostepne { color: var(--cichy); font-style: italic; background: #f7f8fa; border: 1px dashed #cfd5dd; border-radius: 6px; padding: 8px 10px; font-size: 13.5px; }
.pole-ai h3 { display: flex; align-items: center; gap: 8px; }
.pytanie { display: flex; gap: 8px; align-items: flex-start; padding: 4px 0; }
.pytanie .tekst { flex: 1; }
.pytanie .odp { color: var(--ok); font-size: 13px; }
.znacznik.obow { background: #efe6fb; color: #5b2b94; }
.macierz td, .macierz th { text-align: center; } .macierz td:first-child, .macierz th:first-child { text-align: left; }
.konf-menu { display: flex; gap: 2px; border-bottom: 1px solid var(--linia); margin: 10px 0 16px; flex-wrap: wrap; }
.konf-menu a { padding: 8px 14px; border-radius: 8px 8px 0 0; color: var(--cichy); border: 1px solid transparent; border-bottom: none; }
.konf-menu a.akt { background: var(--karta); border-color: var(--linia); color: var(--tekst); margin-bottom: -1px; }
.formularz fieldset { border: 1px solid var(--linia); border-radius: 8px; padding: 10px 16px 4px; margin: 0 0 14px; }
.formularz legend { font-weight: 600; padding: 0 6px; }
.dwie-kol { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
@media (max-width: 800px) { .dwie-kol { grid-template-columns: 1fr; } }

/* --- wgrywanie plików maili --- */
.upuszczanie { border: 2px dashed #c3ccd8; border-radius: 10px; padding: 12px 16px; background: #fafbfd; position: relative; margin-bottom: 14px; }
.upuszczanie.nad { border-color: var(--akcent); background: var(--akcent-jasny); }
.upuszczanie input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.upuszczanie label { cursor: pointer; font-size: 14px; }
button.zly:not(:disabled):hover, .btn.zly:hover { background: #fbeceb; }
.upuszczanie .osobne { position: relative; z-index: 2; display: inline-block; margin-top: 6px; font-size: 13px; }
/* 2.6.1 */
.kafel-akcent { border-color: #b59ad0; background: #f7f1fc; }
details.inline { display: inline-block; vertical-align: top; margin-left: 6px; }
details.inline > summary { cursor: pointer; color: var(--cichy); font-size: 13px; list-style: none; display: inline; text-decoration: underline; }
.przyjecie textarea { width: 100%; min-width: 220px; }
.podsumowanie-st { font-size: 12.5px; color: var(--cichy); }
.zly-tekst { color: #7d2a24; cursor: pointer; font-size: 13px; }
