/* Panel klienta: tylko to, czego nie ma w styles.css. */
.kl-top { display: flex; align-items: center; gap: 12px; max-width: 980px; margin: 0 auto; padding: 16px 24px; }
.kl-top .spacer { flex: 1; }
.kl-small { font-size: 12px; line-height: 16px; }
.kl-hello h1 { font-size: 28px; line-height: 1.2; letter-spacing: -.4px; margin: 0; }
.kl-hello p { margin-top: 4px; }
.kl-list { display: flex; flex-direction: column; gap: 12px; }
.kl-proj { display: flex; flex-direction: column; gap: 10px; text-align: left; cursor: pointer; }
.kl-proj:hover { border-color: var(--ring); }
.kl-proj .row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.kl-proj .row .grow { flex: 1; min-width: 0; font-weight: 600; font-size: 16px; }
.kl-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.kl-task { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.kl-task:last-child { border-bottom: 0; }
.kl-task .top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.kl-task .top .grow { flex: 1; min-width: 160px; }
.kl-task.done .nm { color: var(--muted-foreground); text-decoration: line-through; }
.kl-dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border); flex: none; display: grid; place-items: center; font-size: 11px; }
.kl-dot.on { background: #4ea36a; border-color: #4ea36a; color: #fff; }
.kl-dot.wip { border-color: #d9a441; }
.kl-ask { background: var(--muted); border-radius: var(--radius-lg); padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.kl-ask .btns { display: flex; gap: 8px; flex-wrap: wrap; }
.kl-msgs { display: flex; flex-direction: column; gap: 10px; }
.kl-msg { max-width: 88%; padding: 10px 12px; border-radius: var(--radius-lg); background: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.kl-msg.me { align-self: flex-end; background: var(--primary); color: var(--primary-foreground); }
.kl-msg small { display: block; font-size: 11px; opacity: .7; margin-bottom: 2px; }
.kl-files { display: flex; flex-direction: column; }
.kl-file { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.kl-file:last-child { border-bottom: 0; }
.kl-file a { font-weight: 500; text-decoration: underline; overflow-wrap: anywhere; }
.kl-file .grow { flex: 1; min-width: 160px; }
.kl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.kl-compose { display: flex; flex-direction: column; gap: 8px; }
.kl-empty { color: var(--muted-foreground); padding: 8px 0; }
.kl-up { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.kl-up input[type=file] { max-width: 100%; }
@media (max-width: 720px) {
  .kl-top, .kl-main { padding-left: 16px; padding-right: 16px; }
  .kl-grid { grid-template-columns: 1fr; }
  .kl-hello h1 { font-size: 24px; }
  .kl-msg { max-width: 96%; }
  .kl-who { display: none; }
}

/* widok zespołu: panel klienta na karcie klienta i projektu */
.ask-wait { color: #9a6a00; font-weight: 500; }
.ask-ok { color: var(--green-fg); font-weight: 500; }
.ask-fix { color: var(--red-fg); font-weight: 500; }

/* nowy układ panelu klienta (ten sam wygląd co CMS, tylko do odczytu) */
.kl-user { gap: 10px; }
.kl-user .who { flex: 1; min-width: 0; text-align: left; }
.kl-user .who small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.kl-two { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.kl-line { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); color: inherit; }
.kl-line:last-child { border-bottom: 0; }
.kl-line .grow { flex: 1; min-width: 0; }
.kl-line small { display: block; }
.kl-d { font-variant-numeric: tabular-nums; font-size: 13px; min-width: 78px; color: var(--muted-foreground); }
.kl-d.late { color: var(--destructive); font-weight: 600; }
.kl-block { display: block; }
.kl-pad { padding: 16px 24px; }
.kl-tasks tr.done .nm { color: var(--muted-foreground); text-decoration: line-through; }
.kl-tasks tr.kl-sub td { background: var(--muted); white-space: normal; }
.kl-tasks tr.kl-sub .kl-ask { background: transparent; padding: 0; }
.kl-opis { max-width: 820px; }
.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kl-two { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) { .stats { grid-template-columns: minmax(0, 1fr); } }
.kl-tasks tr.kl-sub td { text-align: left !important; } .kl-tasks .kl-ask { align-items: flex-start; }

.avatar.kl-default { background: var(--muted); color: var(--muted-foreground); display: grid; place-items: center; }
.avatar.kl-default svg.i { width: 60%; height: 60%; }
.kl-user { width: 100%; text-align: left; cursor: pointer; border: 0; background: none; font: inherit; color: inherit; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--radius-md); }
.kl-user:hover { background: var(--accent); }

/* zdjęcia przy zadaniu i powiększenie */
.kl-gal { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.kl-thumb { width: 132px; height: 92px; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; background: var(--muted); cursor: zoom-in; }
.kl-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kl-thumb:hover { border-color: var(--ring); }
.kl-lb { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .86); display: grid; place-items: center; padding: 24px; }
.kl-lb img { max-width: min(94vw, 1400px); max-height: 86vh; border-radius: 8px; object-fit: contain; background: #fff; }
.kl-lb-x, .kl-lb-n { position: absolute; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .16); color: #fff; cursor: pointer; display: grid; place-items: center; }
.kl-lb-x:hover, .kl-lb-n:hover { background: rgba(255, 255, 255, .3); }
.kl-lb-x { top: 16px; right: 16px; }
.kl-lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.kl-lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.kl-lb-c { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); color: #fff; font-size: 13px; opacity: .8; }

.kl-gen { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.kl-gen .btn { width: 100%; }
.kl-gen .btn[hidden] { display: none; }
#inviteHaslo[type="text"] { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .02em; }
