/* Kolory pochodzą z motywu (js/themes.js ustawia te zmienne na <html>; poniżej zapasowe wartości motywu Jasny).
   --<x> = kolor jednolity, --<x>-p = tło do `background:` (kolor lub gradient, zawsze jako obraz). Elementy: bg, topbar, side, colbg, st1..st3 (paski statusu),
   task, act, prog, modal, mhead, inbg, selbg, bp, bs, bd, bplus, avatar; jednolite: inbd, avtext, text, muted, line; ikony: --team-f, --nav-s.
   Powierzchnie z własnym tłem (górny pasek, panel boczny, zadanie, akcja, okno, lista) mają własne zestawy --bar-* / --side-* / --task-* / --act-* / --modal-*
   (text, muted, col, line) i lokalnie nadpisują --text --muted --col --line, żeby tekst i podświetlenia pasowały do ich tła. */
:root {
  --bg:#f4f5f7; --bg-p:linear-gradient(#f4f5f7,#f4f5f7);
  --topbar:#ffffff; --topbar-p:linear-gradient(#ffffff,#ffffff);
  --side:#ffffff; --side-p:linear-gradient(#ffffff,#ffffff);
  --colbg:#ebedf1; --colbg-p:linear-gradient(#ebedf1,#ebedf1);
  --st1:#94a3b8; --st1-p:linear-gradient(#94a3b8,#94a3b8); --st2:#3b82f6; --st2-p:linear-gradient(#3b82f6,#3b82f6); --st3:#16a34a; --st3-p:linear-gradient(#16a34a,#16a34a);
  --task:#ffffff; --task-p:linear-gradient(#ffffff,#ffffff); --act:#f8fafc; --act-p:linear-gradient(#f8fafc,#f8fafc);
  --prog:#e2e8f0; --prog-p:linear-gradient(#e2e8f0,#e2e8f0);
  --modal:#ffffff; --modal-p:linear-gradient(#ffffff,#ffffff); --mhead:#f1f5f9; --mhead-p:linear-gradient(#f1f5f9,#f1f5f9);
  --inbg:#ffffff; --inbg-p:linear-gradient(#ffffff,#ffffff); --inbd:#cbd5e1; --selbg:#dbeafe; --selbg-p:linear-gradient(#dbeafe,#dbeafe);
  --bp:#2563eb; --bp-p:linear-gradient(#2563eb,#2563eb); --bs:#e2e8f0; --bs-p:linear-gradient(#e2e8f0,#e2e8f0);
  --bd:#dc2626; --bd-p:linear-gradient(#dc2626,#dc2626); --bplus:#2563eb; --bplus-p:linear-gradient(#2563eb,#2563eb);
  --avatar:#5b4be3; --avatar-p:linear-gradient(135deg,#2563eb,#8b5cf6); --avtext:#ffffff;
  --team:#4f46e5; --team-f:#4f46e5; --team-bg-f:#4f46e5; --nav:#475569; --nav-s:#475569; --nav-side-s:#475569;
  --accent:#2563eb; --on-bp:#ffffff; --on-bs:#0f172a; --on-bd:#ffffff; --on-bplus:#ffffff; --on-avatar:#ffffff;
  --text:#0f172a; --muted:#556274; --col:#e9eaee; --line:#d5dbe5; --card:#ffffff; --danger:#c9372c;
  --btn:#e2e6ec; --btn-hover:#d2d8e0; --btn-edge:rgba(15,23,42,.22);
  --bar-text:#0f172a; --bar-muted:#556274; --bar-col:#eef0f3; --bar-line:#d5dbe5;
  --side-text:#0f172a; --side-muted:#556274; --side-col:#eef0f3; --side-line:#d5dbe5;
  --task-text:#0f172a; --task-muted:#556274; --task-col:#eef0f3; --task-line:#d5dbe5;
  --act-text:#0f172a; --act-muted:#556274; --act-col:#eceff3; --act-line:#d5dbe5;
  --modal-text:#0f172a; --modal-muted:#556274; --modal-col:#eef0f3; --modal-line:#d5dbe5;
  --mhead-text:#0f172a; --in-text:#0f172a; --in-muted:#556274; --sel-text:#0f172a;
}
* { box-sizing: border-box; }
[hidden] { display:none !important; }
html, body { height:100%; }
body { margin:0; font-family: system-ui, sans-serif; background:var(--bg-p); color:var(--text); display:flex; flex-direction:column; }
button { cursor:pointer; border:0; border-radius:6px; padding:6px 12px; background:var(--bp-p); color:var(--on-bp); font:inherit; }
button:not([class]):hover:not(:disabled), .mact button:not(.secondary):hover:not(:disabled) { filter:brightness(1.1); }
button.ghost { background:transparent; color:var(--muted); padding:2px 6px; }
button.ghost:hover { color:var(--text); }
button.danger:hover { color:var(--danger); }
button.secondary { background:var(--bs-p); color:var(--on-bs); }
button.secondary:hover:not(:disabled) { filter:brightness(.94); }
button.bad { background:var(--bd-p); color:var(--on-bd); }
button.bad:hover:not(:disabled) { filter:brightness(1.1); }
button:disabled { opacity:.3; cursor:default; }
input, select, textarea { padding:7px 8px; border-radius:6px; border:1px solid var(--inbd); background:var(--inbg-p); color:var(--in-text); min-width:0; font:inherit; width:100%; }
/* listy rozwijane (natywne okienko opcji nie bierze tła-gradientu): jawny kolor tła i tekstu z motywu */
select option, select optgroup { background-color:var(--inbg); color:var(--in-text); }
select { background-color:var(--inbg); }
input::placeholder, textarea::placeholder { color:var(--in-muted); opacity:.8; }
textarea { resize:vertical; min-height:84px; }
input:focus, select:focus, textarea:focus { outline:2px solid var(--accent); outline-offset:-1px; }
/* okrągłe plusiki */
.plus { display:inline-flex; align-items:center; justify-content:center; width:26px; height:26px; flex:0 0 auto; border-radius:50%; background:var(--bplus-p); color:var(--on-bplus); font-size:19px; line-height:1; padding:0 0 2px; font-weight:400; }
.plus.sm { width:22px; height:22px; font-size:16px; }
button.plusbtn { background:var(--bplus-p); color:var(--on-bplus); border-radius:50%; width:26px; height:26px; padding:0 0 2px; font-size:19px; line-height:1; display:inline-flex; align-items:center; justify-content:center; flex:0 0 auto; }
button.plusbtn.sm { width:22px; height:22px; font-size:16px; }
button.plusbtn:hover, button.pill:hover .plus { filter:brightness(1.12); }
button.pill { display:inline-flex; align-items:center; gap:8px; padding:3px 14px 3px 4px; border-radius:20px; background:var(--col); color:var(--text); }
button.pill:hover { background:var(--line); }
button.pill.sm { padding:2px 10px 2px 3px; font-size:.85rem; gap:6px; }

#login { display:flex; flex-direction:column; align-items:center; gap:12px; margin-top:15vh; }
#loginForm { display:flex; flex-direction:column; gap:10px; width:260px; }
#lerr { color:var(--danger); min-height:1.2em; margin:0; }

/* logowanie przez Google (przycisk dodaje skrypt Google, widoczny tylko gdy skonfigurowano identyfikator klienta) */
#googleBox { width:260px; display:flex; flex-direction:column; align-items:center; gap:12px; }
.or { width:100%; display:flex; align-items:center; gap:10px; color:var(--muted); font-size:.82rem; text-transform:uppercase; letter-spacing:.06em; }
.or::before, .or::after { content:''; flex:1; border-top:1px solid var(--line); }
#gphotoBox { width:100%; display:flex; flex-direction:column; align-items:center; gap:6px; text-align:center; }
#gphotoBox .hint { margin:0; font-size:.78rem; }
#gphotoBox button { width:100%; }

/* zdjęcie profilowe w kółku awatara: wypełnia całe kółko, inicjały znikają */
.av.has-img, .avatar.has-img { background:none !important; overflow:hidden; padding:0 !important; }
.avimg { width:100%; height:100%; object-fit:cover; border-radius:50%; display:block; }
