:root {
  --bg: #f4f6fa;
  --card: #ffffff;
  --text: #16202e;
  --muted: #5b6678;
  --line: #dde3ec;
  --primary: #1f6feb;
  --primary-text: #ffffff;
  --ok: #1a7f37;
  --ok-bg: #dcf5e3;
  --warn: #9a6700;
  --warn-bg: #fff2c6;
  --bad: #c62828;
  --bad-bg: #fde4e4;
  --off: #6b7280;
  --off-bg: #e8ebf0;
  --overlay: rgba(10, 18, 30, 0.6);
  --radius: 14px;
  --shadow: 0 6px 24px rgba(20, 30, 50, 0.12);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1520;
    --card: #1a2231;
    --text: #e8edf5;
    --muted: #9aa6ba;
    --line: #2b3548;
    --primary: #4c8dff;
    --primary-text: #08101c;
    --ok: #5fd07f;
    --ok-bg: #16331f;
    --warn: #f0c24b;
    --warn-bg: #3a2f10;
    --bad: #ff7b7b;
    --bad-bg: #3c1a1a;
    --off: #9aa6ba;
    --off-bg: #263043;
    --shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
  }
}

* { box-sizing: border-box; }
html { font-size: 17px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.45;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.noscript { padding: 24px; }

:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

/* przyciski */
.btn {
  border: 2px solid var(--line);
  background: var(--card);
  border-radius: 12px;
  padding: 12px 20px;
  min-height: 48px;
  font-weight: 600;
  transition: transform 0.05s;
}
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.big { font-size: 1.15rem; padding: 16px 28px; min-height: 58px; }
.btn.small { min-height: 38px; padding: 6px 14px; font-size: 0.9rem; }
.link { background: none; border: 0; color: var(--primary); text-decoration: underline; padding: 6px; }

/* logowanie */
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
}
.login-card {
  background: var(--card);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 36px 28px;
  max-width: 460px;
  width: 100%;
  text-align: center;
  display: grid;
  gap: 18px;
}
.logo { width: 64px; height: 64px; margin: 0 auto; }
.login-card h1 { font-size: 1.8rem; }
.login-error { background: var(--bad-bg); color: var(--bad); border-radius: 10px; padding: 10px 14px; }
.dev-box { border-top: 1px dashed var(--line); padding-top: 16px; display: grid; gap: 8px; text-align: left; }
.dev-box h2 { font-size: 0.95rem; color: var(--warn); }
.dev-list { display: grid; gap: 8px; }

.email-box, .stack { display: grid; gap: 14px; text-align: left; }
.field { display: grid; gap: 6px; font-weight: 600; }
.field input, .code-input {
  width: 100%; border: 2px solid var(--line); background: var(--bg);
  border-radius: 10px; padding: 12px 14px; min-height: 52px; font-size: 1.1rem;
}
.code-input { letter-spacing: 0.3em; text-align: center; font-size: 1.6rem; }
.form-msg { margin: 0; color: var(--bad); min-height: 1.2em; }
.form-msg:empty { display: none; }
.small { font-size: 0.85rem; margin: 0; }
.row { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.dev-code { background: var(--warn-bg); border-radius: 10px; padding: 10px 14px; margin: 0; }
.row-panel { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.preview { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #000; border-radius: 12px; transform: scaleX(-1); }

/* układ aplikacji */
.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
}
.topbar-in {
  max-width: 980px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; }
.brand img { width: 32px; height: 32px; }
.who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.who strong { font-weight: 600; }
main { max-width: 980px; margin: 0 auto; padding: 16px; display: grid; gap: 18px; }

.panel {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(20, 30, 50, 0.08);
  padding: 18px;
}
.panel h2 { font-size: 1.1rem; margin-bottom: 4px; }

/* mój status */
.status-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; }
.status-btn {
  border: 2px solid var(--line);
  background: var(--card);
  border-radius: 12px;
  padding: 12px 8px;
  min-height: 56px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}
.status-btn[aria-pressed="true"] { border-width: 3px; }
.status-btn[data-state="available"][aria-pressed="true"] { border-color: var(--ok); background: var(--ok-bg); }
.status-btn[data-state="busy"][aria-pressed="true"] { border-color: var(--warn); background: var(--warn-bg); }
.status-btn[data-state="dnd"][aria-pressed="true"] { border-color: var(--bad); background: var(--bad-bg); }
.status-btn[data-state="offline"][aria-pressed="true"] { border-color: var(--off); background: var(--off-bg); }
.status-help { margin: 10px 0 0; color: var(--muted); }

.dot { width: 14px; height: 14px; border-radius: 50%; flex: none; display: inline-block; }
.dot.available { background: var(--ok); }
.dot.busy { background: var(--warn); border-radius: 3px; }
.dot.dnd { background: var(--bad); border-radius: 3px; clip-path: polygon(0 35%, 100% 35%, 100% 65%, 0 65%); width: 16px; height: 16px; }
.dot.offline { background: transparent; border: 3px solid var(--off); }

/* lista osób */
.people-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.people-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.team-select { border: 2px solid var(--line); background: var(--bg); color: inherit; border-radius: 10px; padding: 8px 12px; min-height: 44px; max-width: 100%; font: inherit; }
.team-select[hidden] { display: none; }
.group-box { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 14px 0; }
.search { border: 2px solid var(--line); background: var(--bg); border-radius: 10px; padding: 8px 12px; min-height: 44px; min-width: 220px; }
.how { margin: 4px 0 0; color: var(--muted); }
.people { display: grid; gap: 10px; margin-top: 12px; }
.person {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
.person.unavailable { background: var(--bg); }
.avatar {
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700; background: var(--off-bg); color: var(--text);
}
.avatar.available { background: var(--ok-bg); color: var(--ok); }
.avatar.busy { background: var(--warn-bg); color: var(--warn); }
.avatar.dnd { background: var(--bad-bg); color: var(--bad); }
.person-name { font-weight: 700; font-size: 1.05rem; }
.person-role { font-weight: 400; color: var(--muted); font-size: 0.85rem; margin-left: 6px; }
.person-state { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.person-action { text-align: right; display: grid; gap: 2px; justify-items: end; }
.reason { font-size: 0.82rem; color: var(--muted); max-width: 180px; }
.empty { color: var(--muted); text-align: center; padding: 20px; }

.privacy { color: var(--muted); font-size: 0.9rem; text-align: center; padding: 0 0 24px; }

.banner { background: var(--warn-bg); color: var(--text); border-radius: 12px; padding: 12px 16px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.banner.bad { background: var(--bad-bg); }

/* okna modalne */
.overlay {
  position: fixed; inset: 0; z-index: 20;
  background: var(--overlay);
  display: grid; place-items: center; padding: 16px;
}
.modal {
  background: var(--card);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 28px 24px;
  width: 100%; max-width: 460px;
  display: grid; gap: 16px; text-align: center;
}
.modal h2 { font-size: 1.5rem; }
.modal .actions { display: grid; gap: 10px; }
.modal textarea, .modal input[type="text"] {
  width: 100%; border: 2px solid var(--line); background: var(--bg);
  border-radius: 10px; padding: 10px 12px; resize: none;
}
.quote { background: var(--bg); border-radius: 10px; padding: 10px 14px; font-style: italic; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chip { border: 1px solid var(--line); background: var(--bg); border-radius: 999px; padding: 6px 12px; font-size: 0.9rem; }
.bar { height: 8px; border-radius: 4px; background: var(--off-bg); overflow: hidden; }
.bar > span { display: block; height: 100%; width: 100%; background: var(--primary); }
.bell { font-size: 2.6rem; display: inline-block; animation: knock 1s infinite; transform-origin: 50% 0; }
@keyframes knock { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(-18deg); } 30% { transform: rotate(14deg); } 45% { transform: rotate(-10deg); } 60% { transform: rotate(0); } }
@media (prefers-reduced-motion: reduce) { .bell { animation: none; } }

/* rozmowa */
.call {
  position: fixed; inset: 0; z-index: 30;
  background: #0b0f17; color: #fff;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100vh; height: 100dvh; overflow: hidden;
}
.call-top { padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.call-stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 0 12px; }
.call-stage { overflow: hidden; }
.remote { position: absolute; inset: 0 12px; width: calc(100% - 24px); height: 100%; object-fit: contain; background: #000; border-radius: 14px; }
.btn.end-top { background: var(--bad); border-color: var(--bad); color: #fff; }
.local {
  position: absolute; right: 24px; bottom: 12px;
  width: min(28vw, 220px); aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: 10px; border: 2px solid rgba(255, 255, 255, 0.6);
  background: #1b2433; transform: scaleX(-1);
}
.call-msg { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; font-size: 1.3rem; padding: 24px; pointer-events: none; }
.controls { display: flex; justify-content: center; gap: 14px; padding: 16px; flex-wrap: wrap; }
.ctl {
  border: 0; border-radius: 14px; min-width: 120px; min-height: 64px;
  padding: 8px 16px; background: #2a3448; color: #fff; font-weight: 600;
  display: grid; justify-items: center; gap: 2px;
}
.ctl.off { background: #fff; color: #111; }
.ctl.end { background: var(--bad); color: #fff; }
.ctl svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* sale */
.rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin-top: 12px; }
.room-card { border: 2px solid var(--line); border-radius: var(--radius); padding: 14px; display: grid; gap: 10px; align-content: space-between; background: var(--card); }
.room-card.locked { border-color: var(--warn); background: var(--warn-bg); }
.room-title { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; }
.room-members { margin: 0; color: var(--muted); }
.lock-badge { background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn); border-radius: 999px; padding: 2px 10px; font-size: 0.8rem; font-weight: 600; }
.remote-tag { margin-left: 8px; background: var(--off-bg); color: var(--off); border-radius: 999px; padding: 2px 10px; font-size: 0.78rem; font-weight: 600; }
.room-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.room-stage { position: relative; overflow-y: auto; padding: 0 12px 12px; min-height: 0; }
.room-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 10px; }
.tile { position: relative; aspect-ratio: 4 / 3; background: #1b2433; border-radius: 12px; overflow: hidden; }
.tile video { width: 100%; height: 100%; object-fit: cover; background: #000; }
.tile.mine video { transform: scaleX(-1); }
.tile-name { position: absolute; left: 8px; bottom: 8px; background: rgba(0, 0, 0, 0.6); color: #fff; padding: 2px 10px; border-radius: 8px; font-size: 0.85rem; }
.room-requests { display: grid; gap: 8px; margin-bottom: 10px; }
.room-request { background: var(--warn-bg); color: var(--text); border-radius: 12px; padding: 10px 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.invite-list { display: grid; gap: 8px; max-height: 50vh; overflow-y: auto; }
.invite-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; text-align: left; }
.call .modal { color: var(--text); }
.ctl.hidden, .lock-badge.hidden { display: none; }

/* instrukcje w aplikacji */
.guide { display: grid; gap: 12px; }
.guide-title { font-size: 1.7rem; }
.guide-card { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.guide-card h3 { font-size: 1.15rem; }
.guide-card p { margin: 4px 0 0; }
.guide-toc { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 14px; background: var(--bg); border-radius: 10px; padding: 12px 14px; }
.guide-toc strong { grid-column: 1 / -1; }
.guide-toc .link { text-align: left; padding: 4px 0; }
.guide-body { display: grid; gap: 10px; }
.guide-body h2 { font-size: 1.35rem; margin-top: 22px; padding-bottom: 6px; border-bottom: 3px solid var(--primary); scroll-margin-top: 70px; }
.guide-body p, .guide-body ul, .guide-body ol { margin: 0; }
.guide-body ul, .guide-body ol { padding-left: 22px; }
.guide-body li { margin-bottom: 6px; }
.guide-body figure { margin: 6px 0; }
.guide-body figure img { display: block; width: 100%; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25); }
.guide-body figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 4px; }
.guide-body .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.guide-body .w30 { width: 30%; margin-inline: auto; }
.guide-body .w40 { width: 40%; margin-inline: auto; }
.guide-body .w50 { width: 50%; margin-inline: auto; }
.guide-body .w60 { width: 60%; margin-inline: auto; }
.guide-body .w70 { width: 70%; margin-inline: auto; }
.guide-body .steps { list-style: none; padding: 0; counter-reset: s; }
.guide-body .steps li { counter-increment: s; position: relative; padding-left: 38px; min-height: 28px; }
.guide-body .steps li::before { content: counter(s); position: absolute; left: 0; top: 1px; width: 27px; height: 27px; border-radius: 50%; background: var(--primary); color: var(--primary-text); font-weight: 700; font-size: 0.9rem; text-align: center; line-height: 27px; }
.guide-body .tip, .guide-body .ok, .guide-body .warn { border-left: 5px solid var(--primary); background: var(--bg); border-radius: 8px; padding: 10px 14px; }
.guide-body .ok { border-color: var(--ok); background: var(--ok-bg); }
.guide-body .warn { border-color: var(--warn); background: var(--warn-bg); }
.guide-body table { width: 100%; border-collapse: collapse; }
.guide-body th, .guide-body td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.guide-body th { background: var(--bg); }
.guide-body .btn { display: inline-block; min-height: 0; width: auto; line-height: 1.4; border: 1px solid var(--line); background: var(--bg); border-radius: 6px; padding: 1px 8px; font-weight: 600; font-size: 0.92em; white-space: nowrap; }
.guide-body .dot { display: inline-block; width: 13px; height: 13px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.guide-body .g { background: var(--ok); } .guide-body .y { background: var(--warn); } .guide-body .r { background: var(--bad); } .guide-body .o { background: transparent; border: 2px solid var(--off); }
@media (max-width: 640px) {
  .guide-body .pair { grid-template-columns: 1fr; }
  .guide-body .w30, .guide-body .w40, .guide-body .w50, .guide-body .w60, .guide-body .w70 { width: 100%; }
}

/* udostępniany ekran */
.screen { position: absolute; inset: 0 12px; width: calc(100% - 24px); height: 100%; object-fit: contain; background: #000; border-radius: 14px; }
.screen.hidden { display: none; }
.call-stage.has-screen .remote {
  inset: auto; bottom: 12px; left: 24px; z-index: 2;
  width: min(24vw, 200px); height: auto; aspect-ratio: 4 / 3; object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.6); border-radius: 10px;
}
.tile.screen-tile { grid-column: 1 / -1; aspect-ratio: 16 / 9; max-height: 56vh; width: 100%; }
.tile.screen-tile video { object-fit: contain; }

/* rozmowa wielu osób: siatka zamiast jednego dużego obrazu */
.call-multi { display: none; position: absolute; inset: 0 12px; overflow-y: auto; }
.call-stage.multi .call-multi { display: block; }
.call-stage.multi .remote, .call-stage.multi .local, .call-stage.multi .screen { display: none; }

/* obszar obrazu: panele boczne leżą w nim, więc nie zasłaniają przycisków sterowania */
.stage-wrap { position: relative; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr); }
.controls { gap: 8px; padding: 10px 12px; }
.controls .ctl { min-width: 0; min-height: 58px; padding: 6px 10px; font-size: 0.88rem; }

/* czat spotkania */
.badge { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 6px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 0.78rem; line-height: 20px; text-align: center; }
.chat-panel {
  position: absolute; z-index: 5; top: 4px; right: 12px; bottom: 4px;
  width: min(360px, calc(100% - 24px));
  background: var(--card); color: var(--text);
  border-radius: 14px; box-shadow: var(--shadow); padding: 14px;
  display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto auto; gap: 8px; text-align: left;
}
.chat-list { overflow-y: auto; display: grid; gap: 8px; align-content: start; padding-right: 2px; }
.chat-msg { max-width: 92%; justify-self: start; }
.chat-msg.mine { justify-self: end; text-align: right; }
.chat-meta { font-size: 0.78rem; color: var(--muted); }
.chat-body { background: var(--bg); border-radius: 12px; padding: 8px 12px; overflow-wrap: anywhere; text-align: left; }
.chat-msg.mine .chat-body { background: var(--primary); color: var(--primary-text); }
.chat-msg.mine .chat-body a { color: inherit; }
.chat-body a { color: var(--primary); text-decoration: underline; }
.chat-file { font-weight: 600; }
.chat-status { margin: 0; min-height: 1.2em; }
.chat-form { display: flex; gap: 6px; flex-wrap: wrap; }
.chat-form input[type="text"] { flex: 1 1 100%; border: 2px solid var(--line); background: var(--bg); border-radius: 10px; padding: 8px 10px; min-width: 0; }
.chat-empty { text-align: center; padding: 18px 8px; }

/* panel „Kto jest w biurze” w trakcie spotkania */
.office-panel {
  position: absolute; z-index: 5; top: 4px; right: 12px; bottom: 4px;
  width: min(340px, calc(100% - 24px)); overflow-y: auto;
  background: var(--card); color: var(--text);
  border-radius: 14px; box-shadow: var(--shadow); padding: 14px;
  display: grid; gap: 8px; align-content: start; text-align: left;
}
.op-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.op-list { display: grid; gap: 4px; }
.op-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.op-who { display: grid; flex: 1; min-width: 0; }
.op-name { font-weight: 600; overflow-wrap: anywhere; }
.op-name small { margin-left: 6px; color: var(--muted); font-weight: 400; }
.op-state { font-size: 0.85rem; color: var(--muted); }
.op-away summary { cursor: pointer; color: var(--muted); padding: 6px 0; }
.invite-result { display: grid; gap: 6px; text-align: left; font-size: 0.92rem; }
.invite-result p { margin: 0; color: var(--muted); overflow-wrap: anywhere; }
.invite-result .invite-ok { color: var(--ok); font-weight: 600; }

/* administracja */
.tabs { display: flex; gap: 8px; margin: 12px 0; flex-wrap: wrap; }
.tab { border: 2px solid var(--line); background: var(--card); border-radius: 10px; padding: 8px 16px; font-weight: 600; }
.tab[aria-selected="true"] { border-color: var(--primary); background: var(--primary); color: var(--primary-text); }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table select, .table input, .form input, .form select { border: 2px solid var(--line); background: var(--bg); border-radius: 8px; padding: 6px 8px; min-height: 40px; }
.form { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; align-items: end; }
.form label { display: grid; gap: 4px; font-size: 0.85rem; color: var(--muted); }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin: 12px 0; }
.check { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.check input { width: 22px; height: 22px; }
.remember { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9rem; color: var(--muted); cursor: pointer; }
.remember input { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.inactive { opacity: 0.55; }

/* powiadomienia (toast) */
#toasts { position: fixed; left: 0; right: 0; bottom: 16px; z-index: 50; display: grid; gap: 8px; justify-items: center; padding: 0 12px; pointer-events: none; }
.toast { background: #1d2636; color: #fff; padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow); max-width: 520px; pointer-events: auto; }
.toast.error { background: var(--bad); }
.toast.ok { background: var(--ok); }

@media (max-width: 640px) {
  .status-pick { grid-template-columns: repeat(2, 1fr); }
  .person { grid-template-columns: auto 1fr; }
  .person-action { grid-column: 1 / -1; justify-items: stretch; text-align: left; }
  .person-action .btn { width: 100%; }
  .reason { max-width: none; }
  .ctl { min-width: 96px; flex: 1; }
  .local { width: 34vw; right: 18px; }
}

/* podświetlenie osoby, która mówi */
.tile.speaking { outline: 4px solid #3ddc84; outline-offset: -4px; box-shadow: 0 0 18px rgba(61, 220, 132, 0.55); }
.tile.speaking .tile-name { background: #1a7f37; }

/* własny opis statusu, e-mail i stanowisko przy osobie */
.note-box { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.note-label { display: block; color: var(--muted); font-size: 0.9rem; margin-bottom: 6px; }
.note-form { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.note-form input { flex: 1 1 260px; border: 2px solid var(--line); background: var(--bg); color: var(--text); border-radius: 8px; padding: 6px 10px; min-height: 40px; font: inherit; }
.note-box .chips { justify-content: flex-start; }
.person-email { color: var(--muted); font-size: 0.82rem; overflow-wrap: anywhere; }
.person-note { margin-top: 2px; font-style: italic; color: var(--text); font-size: 0.92rem; }
.person-role.title { color: var(--primary); font-weight: 600; }

/* baner: ktoś próbował się skontaktować */
.missed { background: var(--bad-bg); border: 3px solid var(--bad); border-radius: 14px; padding: 16px 18px; margin-bottom: 16px; box-shadow: var(--shadow); }
.missed-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.missed h2 { margin: 0; font-size: 1.25rem; color: var(--bad); }
.missed ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.missed li { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 1.02rem; }

/* zaproszenie e-mailem w oknie wyboru osób */
.invite-email { margin: 14px 0; border-top: 1px solid var(--line); padding-top: 12px; display: grid; gap: 6px; }
.invite-email label { color: var(--muted); font-size: 0.9rem; }
.invite-email-row { display: flex; gap: 8px; flex-wrap: wrap; }
.invite-email-row input { flex: 1 1 220px; border: 2px solid var(--line); background: var(--bg); color: var(--text); border-radius: 8px; padding: 6px 10px; min-height: 40px; font: inherit; }

/* czas pracy */
.table-wrap { overflow-x: auto; }
.work-table td, .work-table th { white-space: nowrap; }
.work-total { color: var(--muted); font-weight: 400; }
.remote.speaking, .local.speaking { outline: 4px solid #3ddc84; outline-offset: -4px; box-shadow: 0 0 18px rgba(61, 220, 132, 0.55); }

/* powiększanie udostępnionego ekranu */
.screen-tools { position: absolute; top: 8px; right: 8px; z-index: 3; display: flex; gap: 6px; }
.call-stage > .screen-tools { display: none; right: 20px; }
.call-stage.has-screen:not(.multi) > .screen-tools { display: flex; }
.call-stage > .screen-tools .focus-btn { display: none; }
.tile.screen-tile:fullscreen { max-height: none; width: 100vw; height: 100vh; aspect-ratio: auto; border-radius: 0; background: #000; }
.call-stage:fullscreen { background: #000; padding: 0; }
body.screen-focus .room-grid { grid-template-columns: repeat(auto-fill, 140px); gap: 8px; align-content: start; }
body.screen-focus .tile:not(.screen-tile) { aspect-ratio: auto; height: 105px; }
body.screen-focus .tile.screen-tile { grid-column: 1 / -1; order: -1; max-height: none; width: 100%; height: calc(100vh - 290px); height: calc(100dvh - 290px); min-height: 45vh; }
body.screen-focus .tile .tile-name { font-size: 0.72rem; padding: 1px 6px; }
body.screen-focus .tile.screen-tile .tile-name { font-size: 0.85rem; padding: 2px 10px; }
