:root {
  --bg: #1b1d22;          /* neutralny grafit (sidebar / pasek na telefonie) */
  --bg-2: #262932;
  --card: #ffffff;
  --surface: #f4f5f7;     /* tło aplikacji – neutralna szarość */
  --text: #1a1c22;
  --muted: #6b7280;
  --primary: #2f6df0;     /* jeden, stonowany akcent */
  --primary-d: #2257c9;
  --primary-soft: #eef3fe;
  --danger: #d92d20;
  --danger-soft: #fdeceb;
  --ok: #16a34a;
  --ok-soft: #e7f6ec;
  --border: #e5e7eb;
  --shadow: 0 1px 3px rgba(17, 19, 24, 0.08);
  --radius: 10px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--surface);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
}

h1, h2, h3, h4 { margin: 0; font-weight: 700; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
.error { color: var(--danger); font-size: 0.85rem; margin: 6px 0 0; min-height: 1em; }

/* ---------- Login ---------- */
.login-body {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  background: var(--bg);
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--card);
  border-radius: 14px;
  padding: 28px 22px;
  box-shadow: var(--shadow);
}
.brand { text-align: center; margin-bottom: 20px; }
.brand h1 { font-size: 1.4rem; margin: 12px 0 4px; }
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 56px; height: 56px;
  border-radius: 16px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  letter-spacing: 1px;
  margin: 0 auto;
}
.brand-mark.sm { width: 36px; height: 36px; border-radius: 10px; font-size: 0.85rem; }
.brand-mark svg { width: 30px; height: 30px; }
.brand-mark.sm svg { width: 20px; height: 20px; }

label { display: block; font-size: 0.85rem; font-weight: 600; margin: 14px 0 6px; }
input, textarea, select {
  width: 100%;
  min-width: 0;            /* pozwala kurczyć się wewnątrz flexa (telefon) */
  max-width: 100%;
  box-sizing: border-box;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  color: var(--text);
}
/* Natywne pola czasu/daty na iOS/Androidzie nie mogą rozpychać layoutu */
input[type="time"], input[type="date"], input[type="datetime-local"] {
  -webkit-appearance: none;
  appearance: none;
  min-height: 46px;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47, 109, 240, 0.14);
}
textarea { resize: vertical; }

/* ---------- Buttons ---------- */
.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 11px 16px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, opacity 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.btn svg { flex-shrink: 0; }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:active { background: var(--primary-d); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-danger { background: #fff; color: var(--danger); border-color: #fecaca; }
.btn-block { width: 100%; margin-top: 20px; }
.btn-sm { padding: 8px 12px; font-size: 0.88rem; border-radius: 10px; }
.icon-btn {
  background: transparent;
  border: none;
  color: inherit;
  line-height: 1;
  width: 42px; height: 42px;
  border-radius: 12px;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:active { background: rgba(148, 163, 184, 0.18); }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--bg);
  color: #fff;
  padding-top: var(--safe-top);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
}
.topbar-title { flex: 1; display: flex; flex-direction: column; line-height: 1.15; }
.topbar-title small { color: #94a3b8; }
.topbar .icon-btn { color: #fff; }

.boss-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-2);
}
.boss-bar .bb-ic { color: #94a3b8; }
.boss-bar .bb-ic svg { width: 20px; height: 20px; }
.boss-bar select { flex: 1; padding: 9px 12px; background: #14161a; color: #fff; border-color: #34373f; }

/* ---------- Ikony ---------- */
svg.ic { display: block; flex-shrink: 0; }
[data-icon] { display: inline-flex; align-items: center; justify-content: center; }
.btn [data-icon] { margin-right: -2px; }
.btn [data-icon] svg { width: 17px; height: 17px; }

/* ---------- Pływający przycisk menu (FAB) ---------- */
.fab {
  position: fixed;
  left: 50%;
  bottom: calc(20px + var(--safe-bottom));
  transform: translateX(-50%);
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 14px rgba(17, 19, 24, 0.28);
  z-index: 45;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s;
}
.fab:active { transform: translateX(-50%) scale(0.9); background: var(--primary-d); }
.fab svg { width: 26px; height: 26px; }
.fab.hidden { display: none; }
.fab-dot {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--danger);
  border: 2px solid #fff;
}

/* ---------- Menu (modal) ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(15, 23, 42, 0.55);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fade 0.15s ease;
}
.menu-card {
  width: 100%;
  max-width: 360px;
  background: var(--card);
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 12px 32px rgba(17, 19, 24, 0.18);
  animation: pop 0.18s ease;
}
@keyframes pop { from { transform: scale(0.93); opacity: 0; } to { transform: none; opacity: 1; } }
.menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 8px 6px 14px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px;
  border: none;
  background: transparent;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  border-radius: 9px;
  font-family: inherit;
  text-align: left;
}
.menu-item:active { background: var(--surface); }
.menu-item.active { background: var(--primary-soft); color: var(--primary-d); }
.menu-item .mi-ic {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  flex-shrink: 0;
}
.menu-item .mi-ic svg { width: 20px; height: 20px; }
.menu-item.active .mi-ic { background: var(--primary); color: #fff; }
.menu-item.danger { color: var(--danger); }
.menu-item.danger .mi-ic { background: #fef2f2; color: var(--danger); }
.menu-item .mi-badge {
  margin-left: auto;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}
.menu-sep { height: 1px; background: var(--border); margin: 6px 12px; }

/* ---------- Container ---------- */
.container {
  max-width: 560px;
  margin: 0 auto;
  padding: 16px 14px calc(110px + var(--safe-bottom)); /* miejsce na pływający przycisk */
}

/* ---------- Calendar ---------- */
.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.cal-head h2 { font-size: 1.1rem; text-transform: capitalize; }
.cal-head .icon-btn { color: var(--text); background: var(--card); border: 1px solid var(--border); }
.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.cal-cell {
  aspect-ratio: 1 / 1;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 9px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  user-select: none;
}
.cal-cell.empty { background: transparent; border: none; cursor: default; }
.cal-cell:active { transform: scale(0.96); }
.cal-cell.today { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.cal-cell.weekend { color: var(--muted); }
.cal-cell .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--primary);
}
.cal-cell.has-hours { background: var(--primary-soft); border-color: #d7e3fb; }
.legend { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; margin-top: 14px; justify-content: center; }
.legend .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); display: inline-block; }
.legend .ring { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--primary); display: inline-block; margin-left: 12px; }

/* ---------- Day panel ---------- */
.panel {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  animation: slideUp 0.2s ease;
}
@keyframes slideUp { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--bg);
  color: #fff;
  padding: calc(10px + var(--safe-top)) 12px 10px;
}
.panel-head h2 { font-size: 1.05rem; text-align: center; flex: 1; }
.panel-head .icon-btn { color: #fff; }
.panel-head-spacer { width: 42px; flex-shrink: 0; }
.panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px calc(28px + var(--safe-bottom));
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid var(--border);
  margin-bottom: 18px;
}
.card h3 { font-size: 1rem; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.card h3 .h-ic { color: var(--primary); }
.card h3 .h-ic svg { width: 18px; height: 18px; }
.small-note { font-size: 0.82rem; margin: 0 0 10px; }
.task-done-name { font-weight: 700; margin: 2px 0 2px; }
.time-row { display: flex; gap: 12px; }
.time-row .field { flex: 1 1 0; min-width: 0; }
/* Widełki z datą+godziną (datetime-local) układamy w pionie — są zbyt szerokie na telefon */
.dt-row { flex-direction: column; gap: 10px; }
.dt-row .field { width: 100%; }
.field label { margin-top: 0; }
.row-end {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 6px 2px 12px;
}
.section-head h3 { font-size: 1rem; }
.empty { text-align: center; padding: 24px 10px; }

.entries { display: flex; flex-direction: column; gap: 10px; }
.entry {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
}
.entry-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.entry-title { font-weight: 700; font-size: 0.98rem; }
.entry-time {
  font-variant-numeric: tabular-nums;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}
.entry-desc { margin: 8px 0 0; color: #3f434c; font-size: 0.9rem; white-space: pre-wrap; word-break: break-word; }
.entry-actions { display: flex; gap: 8px; margin-top: 12px; }
.entry-actions .btn { padding: 7px 11px; font-size: 0.82rem; }
.entry.readonly { border-left-color: var(--border); }
.entry.from-task { border-left-color: var(--primary); }

/* ---------- Sheets / modals ---------- */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(15, 23, 42, 0.5);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fade 0.15s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sheet-card {
  background: var(--card);
  width: 100%;
  max-width: 560px;
  border-radius: 16px 16px 0 0;
  padding: 18px 16px calc(20px + var(--safe-bottom));
  box-shadow: 0 -8px 32px rgba(17, 19, 24, 0.16);
  animation: slideUp 0.2s ease;
  max-height: 92dvh;
  overflow-y: auto;
}
.sheet-item {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 16px 8px;
  font-size: 1rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  color: var(--text);
  font-family: inherit;
}
.sheet-item:last-child { border-bottom: none; }
.form-card h3 { margin-bottom: 8px; }
.form-card h4 { margin: 4px 0 8px; }
.modal-actions { display: flex; gap: 10px; margin-top: 16px; }
.modal-actions .btn { flex: 1; }
hr { border: none; border-top: 1px solid var(--border); margin: 18px 0; }

/* ---------- Interns list ---------- */
.interns { display: flex; flex-direction: column; gap: 10px; }
.intern-row {
  display: flex;
  flex-direction: column;   /* na telefonie: dane u góry, przyciski poniżej */
  align-items: stretch;
  gap: 10px;
  padding: 12px;
  background: var(--surface);
  border-radius: 14px;
}
.intern-row .info { min-width: 0; }
.intern-row .info strong { display: block; font-size: 0.95rem; }
.intern-row .info small { display: block; color: var(--muted); word-break: break-word; }
.intern-row .i-school { color: var(--text); font-weight: 600; margin-top: 2px; }
.intern-row .i-about {
  margin: 6px 0 0;
  font-size: 0.85rem;
  color: #3f434c;
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
}
.intern-row.inactive { opacity: 0.55; }
/* Rząd przycisków akcji – równo rozłożony, zawija się czytelnie */
.intern-row > div:not(.info) { display: flex; flex-wrap: wrap; gap: 8px; }
.intern-row .btn { flex: 1 1 auto; min-width: 84px; padding: 9px 10px; font-size: 0.82rem; }
.intern-row .inline-editor { flex-direction: column; }
.intern-row .inline-editor input { width: 100%; }
.intern-row .inline-editor .btn { flex: 1 1 100%; }

/* ---------- Ekran zakończonej praktyki ---------- */
.lock-card { text-align: center; margin: 32px auto 0; max-width: 420px; padding: 28px 22px; }
.lock-card h3 { display: block; }   /* nadpisuje flex z .card h3, by tekst był wyśrodkowany */
.lock-ic {
  display: grid;
  place-items: center;
  width: 72px; height: 72px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: #dcfce7;
  color: var(--ok);
}
.lock-card h3 { font-size: 1.15rem; }
.lock-card p { margin: 10px 0 22px; }
.lock-card .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }

/* ---------- Zadania ---------- */
.task-flag { margin-top: 8px; display: inline-flex !important; }

/* ---------- Zadania (karty) ---------- */
.task { border-left-color: var(--primary); }
.task.done { border-left-color: var(--ok); opacity: 0.72; }
.task.done .entry-title { text-decoration: line-through; }
.task-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--border);
}
.chip svg { width: 13px; height: 13px; }
.chip.due { background: #fff; color: var(--muted); }
.chip.overdue { background: var(--danger-soft); color: #a31c14; border-color: #f6cdca; }
.chip.who { background: var(--primary-soft); color: var(--primary-d); border-color: #d7e3fb; }
.chip.ok { background: var(--ok-soft); color: #15803d; border-color: #c5e9d1; }
.task-people { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }

.assignees {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px 10px;
  margin-top: 6px;
}
.assignees label, .check-all {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  margin: 6px 0;
  cursor: pointer;
}
.assignees input[type="checkbox"], .check-all input[type="checkbox"] { width: 18px; height: 18px; }
.check-all { margin-top: 6px; font-weight: 600; }

/* ---------- Tablica ---------- */
.composer { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; margin-bottom: 16px; }
.composer-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.attach-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); cursor: pointer; margin: 0; flex-shrink: 0; }
.attach-btn svg { width: 20px; height: 20px; color: var(--muted); }
.attach-btn:active { background: #e8eaee; }
.img-preview { position: relative; margin-top: 10px; display: inline-block; }
.img-preview img { max-width: 100%; max-height: 240px; border-radius: 10px; display: block; border: 1px solid var(--border); }
.img-clear { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border: none; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; }

.posts { display: flex; flex-direction: column; gap: 12px; }
.post { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.post-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.post-author { font-weight: 700; font-size: 0.92rem; }
.post-time { font-size: 0.76rem; color: var(--muted); white-space: nowrap; }
.post-body { white-space: pre-wrap; word-break: break-word; font-size: 0.95rem; }
.post-img { margin-top: 10px; }
.post-img img { max-width: 100%; border-radius: 10px; border: 1px solid var(--border); display: block; }
.post-actions { margin-top: 10px; }
.post-actions .btn { padding: 6px 10px; font-size: 0.8rem; }

/* ---------- Kontakty (wiadomości) ---------- */
.contacts { display: flex; flex-direction: column; gap: 8px; }
.contact { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; text-align: left; width: 100%; font-family: inherit; }
.contact:hover { background: var(--surface); }
.contact .avatar { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-d); font-weight: 700; flex-shrink: 0; }
.contact .c-main { flex: 1; min-width: 0; }
.contact .c-name { font-weight: 600; font-size: 0.95rem; display: flex; gap: 6px; align-items: center; }
.contact .c-last { color: var(--muted); font-size: 0.82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact .c-badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; display: grid; place-items: center; border-radius: 999px; background: var(--primary); color: #fff; font-size: 0.74rem; font-weight: 700; flex-shrink: 0; }
.role-tag { font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); background: var(--surface); border: 1px solid var(--border); padding: 1px 5px; border-radius: 5px; }

/* ---------- Czat ---------- */
.chat-body { flex: 1; overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 6px; background: var(--surface); }
.chat-inner { max-width: 760px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 6px; }
.bubble { max-width: 80%; padding: 9px 12px; border-radius: 14px; font-size: 0.92rem; white-space: pre-wrap; word-break: break-word; }
.bubble.them { align-self: flex-start; background: var(--card); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.bubble.me { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.bubble img { max-width: 100%; border-radius: 10px; margin-top: 6px; display: block; }
.bubble .b-time { font-size: 0.64rem; opacity: 0.75; margin-top: 4px; text-align: right; }
.chat-empty { margin: auto; color: var(--muted); }

.chat-composer { border-top: 1px solid var(--border); background: var(--card); padding: 10px 12px calc(10px + var(--safe-bottom)); }
.chat-input-row { display: flex; align-items: center; gap: 8px; max-width: 760px; margin: 0 auto; }
.chat-input-row #chatInput { flex: 1; }
.send-btn { background: var(--primary); color: #fff; flex-shrink: 0; }
.send-btn:active { background: var(--primary-d); }
.send-btn svg { width: 20px; height: 20px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + var(--safe-bottom));
  transform: translateX(-50%);
  background: var(--bg);
  color: #fff;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  z-index: 80;
  box-shadow: var(--shadow);
  animation: fade 0.15s ease;
  max-width: 90vw;
  text-align: center;
}
.toast.err { background: var(--danger); }

@media (min-width: 600px) {
  .sheet { align-items: center; }
  .sheet-card { border-radius: 14px; box-shadow: 0 16px 40px rgba(17, 19, 24, 0.2); }
}

/* ================= PC: boczny panel (sidebar) ================= */
.sidebar { display: none; }

@media (min-width: 900px) {
  :root { --sidebar-w: 256px; }

  body { background: var(--surface); }

  .sidebar {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: var(--sidebar-w);
    background: var(--bg);
    color: #d4d6db;
    padding: 16px 12px;
    z-index: 50;
    border-right: 1px solid #2c2f37;
  }
  .side-brand {
    display: flex; align-items: center; gap: 12px;
    padding: 8px 10px 16px;
    margin-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  }
  .side-brand .brand-mark { background: var(--primary); flex-shrink: 0; margin: 0; }
  .side-brand .side-title { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
  .side-brand .side-title strong { color: #fff; font-size: 1.05rem; font-weight: 700; letter-spacing: 0.04em; }
  .side-brand .side-title small { color: #8b8f99; font-size: 0.7rem; }

  .side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
  .side-nav .menu-item { color: #b9bcc4; font-weight: 500; padding: 11px 12px; border-radius: 8px; }
  .side-nav .menu-item:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }
  .side-nav .menu-item .mi-ic { background: transparent; color: #9498a2; width: 24px; height: 24px; border-radius: 0; }
  .side-nav .menu-item .mi-ic svg { width: 19px; height: 19px; }
  .side-nav .menu-item.active { background: rgba(47, 109, 240, 0.14); color: #fff; font-weight: 600; }
  .side-nav .menu-item.active .mi-ic { background: transparent; color: #6c9bff; }
  .side-nav .menu-item.danger { color: #e88a82; }
  .side-nav .menu-item.danger .mi-ic { background: transparent; color: #e88a82; }
  .side-nav .menu-item .mi-badge { background: var(--primary); }
  .side-nav .menu-sep { background: rgba(255, 255, 255, 0.08); margin: 8px 10px; }

  .side-user {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 10px 6px;
    margin-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
  }
  .side-user .su-ic {
    display: grid; place-items: center;
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.07); color: #b9bcc4; flex-shrink: 0;
  }
  .side-user .su-ic svg { width: 17px; height: 17px; }
  .side-user .su-info { min-width: 0; }
  .side-user .su-info strong { display: block; color: #f3f4f6; font-size: 0.9rem; }
  .side-user .su-info small { color: #8b8f99; }

  /* Treść obok sidebara */
  #main { margin-left: var(--sidebar-w); }

  /* Jasny, spokojny nagłówek treści (zamiast ciemnego paska) */
  .topbar { background: var(--card); color: var(--text); border-bottom: 1px solid var(--border); }
  .topbar .brand-mark { display: none; }            /* logo jest w sidebarze */
  .topbar-inner { padding: 14px 24px; }
  .topbar-title strong { font-size: 1.15rem; letter-spacing: -0.01em; }
  .topbar-title small { display: none; }            /* nazwisko jest w sidebarze */
  .topbar .icon-btn { color: var(--text); }

  .boss-bar { background: var(--card); border-bottom: 1px solid var(--border); padding: 12px 24px; }
  .boss-bar .bb-ic { color: var(--muted); }
  .boss-bar select { background: #fff; color: var(--text); border-color: var(--border); max-width: 320px; }

  .fab { display: none !important; }
  .panel { left: var(--sidebar-w); }

  .container { max-width: 880px; padding: 24px 24px 56px; }
  .cal-cell { font-size: 1rem; border-radius: 8px; }
  .cal-grid { gap: 8px; }
  .cal-head h2 { font-size: 1.2rem; }

  /* Wygodne okno modalne na PC (m.in. „Konta praktykantów”) */
  .sheet-card { max-width: 600px; }
}
