:root {
  --brand: #0b4ea2;
  --brand-d: #083a7a;
  --brand-l: #e3edf8;
  --brand-xl: #f0f5fc;
  --green: #2e7d32;
  --green-l: #e8f5e9;
  --amber: #f57f17;
  --amber-l: #fff8e1;
  --red: #e53935;
  --red-l: #ffebee;
  --purple: #7b1fa2;
  --purple-l: #f3e5f5;
  --teal: #00796b;
  --teal-l: #e0f2f1;
  --cyan: #0097a7;
  --cyan-l: #e0f7fa;
  --ink: #1e293b;
  --muted: #64748b;
  --line: #e2e8f0;
  --soft: #f1f5f9;
  --body-bg: #f4f6f9;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.07);
  --shadow-lg: 0 10px 40px rgba(0,0,0,.12);
  --sidebar-w: 250px;
  --topbar-h: 60px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', system-ui, -apple-system, sans-serif; background: var(--body-bg); color: var(--ink); display: flex; min-height: 100vh; font-size: 14px; line-height: 1.5; }
a { color: var(--brand); text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { max-width: 100%; }

/* ===== SIDEBAR ===== */
.sidebar { width: var(--sidebar-w); display: flex; flex-direction: column; position: fixed; top: 0; left: 0; bottom: 0; z-index: 100; background: #fff; border-right: 1px solid var(--line); transition: transform .3s; }
.sidebar__brand { padding: 14px 16px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.sidebar__logo svg { width: 32px; height: 32px; }
.sidebar__brand-text { font-size: 15px; font-weight: 800; color: var(--brand); letter-spacing: -.3px; }
.sidebar__brand-text small { display: block; font-size: 10px; font-weight: 500; color: var(--muted); letter-spacing: .3px; text-transform: uppercase; }
.sidebar__nav { flex: 1; padding: 12px 8px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.sidebar__item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); color: var(--muted); font-weight: 500; font-size: 13px; transition: all .15s; text-decoration: none; position: relative; }
.sidebar__item svg { width: 20px; height: 20px; flex-shrink: 0; }
.sidebar__item:hover { background: var(--brand-l); color: var(--ink); }
.sidebar__item.active { background: var(--brand-l); color: var(--brand); font-weight: 600; }
.badge { font-style: normal; font-size: 10px; font-weight: 700; background: var(--brand); color: #fff; padding: 2px 7px; border-radius: 10px; margin-left: auto; }
.sidebar__sep { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); padding: 14px 12px 6px; }
.cat-item { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--radius-sm); color: var(--muted); font-size: 12.5px; cursor: pointer; transition: background .15s; }
.cat-item:hover { background: var(--soft); }
.cat-item__dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.cat-item__count { margin-left: auto; font-size: 11px; font-weight: 600; color: var(--muted); }
.sidebar__bottom { padding: 12px 14px; border-top: 1px solid var(--line); }
.sidebar__user { display: flex; align-items: center; gap: 10px; }
.sidebar__avatar { width: 36px; height: 36px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.sidebar__uinfo { min-width: 0; }
.sidebar__uname { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar__urole { font-size: 11px; color: var(--muted); }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(15,23,42,.4); z-index: 90; }
.sidebar-overlay.active { display: block; }

/* ===== MAIN / TOPBAR ===== */
.main { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar { height: var(--topbar-h); background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 22px; position: sticky; top: 0; z-index: 50; }
.topbar__left { display: flex; align-items: center; gap: 14px; }
.topbar__title { font-size: 17px; font-weight: 800; }
.topbar__crumb { font-size: 11px; color: var(--muted); }
.topbar__actions { display: flex; align-items: center; gap: 10px; }
.hamburger { display: none; width: 38px; height: 38px; border-radius: 10px; color: var(--muted); }
.hamburger svg { width: 22px; height: 22px; }
.content { padding: 24px; flex: 1; }

/* ===== BUTTONS ===== */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 10px; font-size: 13px; font-weight: 600; transition: all .15s; white-space: nowrap; }
.btn svg { width: 16px; height: 16px; }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-d); }
.btn--ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn--green { background: var(--green); color: #fff; }
.btn--green:hover { filter: brightness(1.08); }
.btn--danger { background: var(--red-l); color: var(--red); }
.btn--danger:hover { background: #ffd9dc; }
.btn--sm { padding: 6px 12px; font-size: 12px; }

/* ===== LIBRARY ===== */
.lib-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.lib-head__title { font-size: 20px; font-weight: 800; }
.lib-head__sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.lib-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.lib-stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.lib-stat__val { font-size: 26px; font-weight: 800; line-height: 1; }
.lib-stat__lbl { font-size: 12px; color: var(--muted); margin-top: 6px; }

.prog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.prog-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s; }
.prog-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.prog-card__bar { height: 6px; }
.prog-card__body { padding: 16px 18px; flex: 1; display: flex; flex-direction: column; }
.prog-card__cat { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 20px; align-self: flex-start; margin-bottom: 10px; }
.prog-card__title { font-size: 16px; font-weight: 800; margin-bottom: 4px; }
.prog-card__meta { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.prog-card__meta span { display: inline-flex; align-items: center; gap: 4px; }
.prog-card__meta svg { width: 13px; height: 13px; }
.prog-card__prog { margin-top: auto; }
.prog-card__prog-row { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-bottom: 5px; }
.prog-card__track { height: 7px; background: var(--soft); border-radius: 6px; overflow: hidden; }
.prog-card__fill { height: 100%; border-radius: 6px; transition: width .4s; }
.prog-card__foot { display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--soft); background: #fcfdfe; }
.status-pill { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 20px; }
.status-pill--published { background: var(--green-l); color: var(--green); }
.status-pill--draft { background: var(--amber-l); color: var(--amber); }

.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty svg { width: 56px; height: 56px; opacity: .3; margin-bottom: 14px; }
.empty__title { font-size: 16px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }

/* ===== EDITOR VIEW ===== */
.edit-wrap { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
.edit-main { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.meta-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 14px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.field { display: flex; flex-direction: column; gap: 5px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.field input, .field select { border: 1.5px solid var(--line); border-radius: 9px; padding: 9px 12px; font-family: inherit; font-size: 13px; color: var(--ink); transition: border-color .15s; background: #fff; }
.field input:focus, .field select:focus { outline: none; border-color: var(--brand); }
.field__title input { font-size: 17px; font-weight: 700; }

/* Toolbar */
.tt-toolbar { display: flex; flex-wrap: wrap; gap: 3px; padding: 8px 14px; border-bottom: 1px solid var(--line); background: #fcfdfe; position: sticky; top: var(--topbar-h); z-index: 20; }
.tt-btn { width: 34px; height: 34px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); font-size: 14px; transition: background .12s, color .12s; }
.tt-btn:hover { background: var(--brand-l); }
.tt-btn.is-active { background: var(--brand); color: #fff; }
.tt-btn svg { width: 17px; height: 17px; }
.tt-btn--wide { width: auto; padding: 0 10px; font-size: 12.5px; font-weight: 700; gap: 5px; }
.tt-sep { width: 1px; background: var(--line); margin: 4px 4px; }

/* Editor canvas */
.tt-editor { min-height: 460px; padding: 26px 34px; font-size: 15px; line-height: 1.7; color: var(--ink); }
.tt-editor:focus { outline: none; }
.tt-editor .ProseMirror { outline: none; min-height: 420px; }
.tt-editor h1 { font-size: 26px; font-weight: 800; margin: 18px 0 10px; line-height: 1.25; }
.tt-editor h2 { font-size: 21px; font-weight: 800; margin: 22px 0 8px; padding-left: 12px; border-left: 4px solid var(--brand); color: var(--brand-d); }
.tt-editor h3 { font-size: 17px; font-weight: 700; margin: 16px 0 6px; color: var(--ink); }
.tt-editor p { margin: 8px 0; }
.tt-editor ul, .tt-editor ol { margin: 8px 0 8px 26px; }
.tt-editor li { margin: 3px 0; }
.tt-editor a { color: var(--brand); text-decoration: underline; }
.tt-editor img { border-radius: 10px; margin: 12px 0; box-shadow: var(--shadow-md); max-width: 100%; }
.tt-editor img.ProseMirror-selectednode { outline: 3px solid var(--brand); }
.tt-editor blockquote { border-left: 4px solid var(--line); padding-left: 16px; color: var(--muted); margin: 12px 0; font-style: italic; }
.tt-editor hr { border: none; border-top: 2px solid var(--line); margin: 18px 0; }
.tt-editor code { background: var(--soft); padding: 2px 6px; border-radius: 5px; font-size: 13px; }
.tt-editor ul[data-type="taskList"] { list-style: none; margin-left: 4px; padding: 0; }
.tt-editor ul[data-type="taskList"] li { display: flex; align-items: flex-start; gap: 9px; }
.tt-editor ul[data-type="taskList"] li > label { margin-top: 3px; }
.tt-editor ul[data-type="taskList"] input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--brand); cursor: pointer; }
.tt-editor .is-editor-empty:first-child::before { content: attr(data-placeholder); color: #aab4c2; float: left; height: 0; pointer-events: none; }
.tt-editor[contenteditable] h2 { } /* fallback shares same styles */

/* ===== SIDE PANEL (checklist + actions) ===== */
.side-col { display: flex; flex-direction: column; gap: 16px; position: sticky; top: calc(var(--topbar-h) + 16px); }
.side-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.side-card__head { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.side-card__title { font-size: 13px; font-weight: 800; display: flex; align-items: center; gap: 7px; }
.side-card__title svg { width: 16px; height: 16px; color: var(--brand); }
.side-card__body { padding: 14px 16px; }
.side-hint { font-size: 11.5px; color: var(--muted); }

.chk-prog { padding: 12px 16px; background: var(--brand-xl); border-bottom: 1px solid var(--line); }
.chk-prog__row { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; margin-bottom: 6px; }
.chk-prog__track { height: 8px; background: #fff; border-radius: 6px; overflow: hidden; }
.chk-prog__fill { height: 100%; background: linear-gradient(90deg, var(--brand), #1c7fe0); border-radius: 6px; transition: width .4s; }

.etap-list { display: flex; flex-direction: column; }
.etap { display: flex; align-items: flex-start; gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--soft); cursor: pointer; transition: background .12s; }
.etap:last-child { border-bottom: none; }
.etap:hover { background: var(--soft); }
.etap__check { width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--line); flex-shrink: 0; display: flex; align-items: center; justify-content: center; transition: all .15s; margin-top: 1px; }
.etap__check svg { width: 13px; height: 13px; color: #fff; opacity: 0; }
.etap--done .etap__check { background: var(--green); border-color: var(--green); }
.etap--done .etap__check svg { opacity: 1; }
.etap__body { flex: 1; min-width: 0; }
.etap__title { font-size: 13px; font-weight: 600; }
.etap--done .etap__title { color: var(--muted); text-decoration: line-through; }
.etap__lvl { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: var(--brand); background: var(--brand-l); padding: 1px 7px; border-radius: 10px; }
.etap__lvl--h3 { color: var(--purple); background: var(--purple-l); }
.etap-empty { font-size: 12px; color: var(--muted); text-align: center; padding: 18px 8px; }

.side-actions { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; }
.side-actions .btn { width: 100%; justify-content: center; }

.save-status { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.save-status__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }
.save-status--saved .save-status__dot { background: var(--green); }

/* ===== MODAL ===== */
.modal-overlay { position: fixed; inset: 0; background: rgba(15,23,42,.5); backdrop-filter: blur(3px); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; animation: fade .18s ease both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal { background: #fff; border-radius: 16px; width: 100%; max-width: 460px; box-shadow: var(--shadow-lg); overflow: hidden; }
.modal--wide { max-width: 800px; }
.modal__head { padding: 18px 22px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.modal__title { font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.modal__title svg { width: 20px; height: 20px; flex-shrink: 0; }
.modal__body svg { width: 14px; height: 14px; }
.modal__close { width: 32px; height: 32px; border-radius: 50%; font-size: 22px; color: var(--muted); }
.modal__close:hover { background: var(--soft); }
.modal__body { padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.modal__foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; background: var(--soft); }
.tabs { display: flex; gap: 6px; background: var(--soft); padding: 4px; border-radius: 10px; }
.tabs__btn { flex: 1; padding: 8px; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.tabs__btn.active { background: #fff; color: var(--brand); box-shadow: var(--shadow); }
.drop { border: 2px dashed var(--line); border-radius: 12px; padding: 24px; text-align: center; color: var(--muted); font-size: 13px; cursor: pointer; transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--brand); background: var(--brand-xl); }
.drop svg { width: 34px; height: 34px; opacity: .4; margin-bottom: 8px; }

/* ===== TOAST ===== */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px); background: var(--ink); color: #fff; padding: 12px 22px; border-radius: 30px; font-size: 13px; font-weight: 600; box-shadow: var(--shadow-lg); z-index: 2000; opacity: 0; transition: all .3s; display: flex; align-items: center; gap: 9px; }
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast svg { width: 17px; height: 17px; }
.toast--green { background: var(--green); }

/* ===== LOADER ===== */
.tt-loader { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 60px; color: var(--muted); font-size: 13px; }
.tt-loader__spin { width: 26px; height: 26px; border: 3px solid var(--brand-l); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.fallback-note { font-size: 11px; color: var(--amber); background: var(--amber-l); padding: 6px 14px; border-bottom: 1px solid #f3e2b8; display: flex; align-items: center; gap: 7px; }
.fallback-note svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ===== SIDEBAR KRC SCOPE ===== */
.sidebar__krc { display: flex; align-items: center; gap: 10px; margin: 12px 12px 4px; padding: 10px 12px; background: linear-gradient(135deg, var(--brand-l), var(--brand-xl)); border: 1px solid #cfe0f4; border-radius: 10px; }
.sidebar__krc svg { width: 22px; height: 22px; color: var(--brand); flex-shrink: 0; }
.sidebar__krc-name { font-size: 12.5px; font-weight: 800; color: var(--brand-d); line-height: 1.2; }
.sidebar__krc-sub { font-size: 10px; color: var(--muted); }

/* ===== HERO ===== */
.edu-hero { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: linear-gradient(120deg, var(--brand), #1c7fe0); color: #fff; border-radius: var(--radius); padding: 22px 26px; margin-bottom: 20px; box-shadow: var(--shadow-md); }
.edu-hero__hi { font-size: 22px; font-weight: 800; }
.edu-hero__sub { font-size: 13px; opacity: .92; margin-top: 4px; }
.edu-hero__sub strong { font-weight: 700; }
.edu-hero__badge { display: flex; flex-direction: column; align-items: center; gap: 2px; background: rgba(255,255,255,.15); border-radius: 12px; padding: 12px 18px; flex-shrink: 0; }
.edu-hero__badge svg { width: 24px; height: 24px; }
.edu-hero__badge span { font-size: 12px; font-weight: 700; }

/* ===== GRID 2 ===== */
.edu-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }

/* ===== SESJE (lista) ===== */
.sess-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--soft); cursor: pointer; }
.sess-row:last-child { border-bottom: none; }
.sess-row:hover { background: var(--soft); }
.sess-row__date { width: 42px; text-align: center; flex-shrink: 0; background: var(--brand-l); border-radius: 8px; padding: 5px 0; }
.sess-row__date b { display: block; font-size: 16px; font-weight: 800; color: var(--brand-d); line-height: 1; }
.sess-row__date span { font-size: 10px; color: var(--muted); text-transform: uppercase; }
.sess-row__body { flex: 1; min-width: 0; }
.sess-row__title { font-size: 13px; font-weight: 600; }
.sess-row__meta { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.sess-row__meta svg { width: 12px; height: 12px; }
.mode-tag { font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: 20px; white-space: nowrap; flex-shrink: 0; }
.mode-tag--stac { background: var(--brand-l); color: var(--brand); }
.mode-tag--online { background: var(--cyan-l); color: var(--cyan); }

/* ===== POSTĘP GRUP ===== */
.grp-prog { padding: 12px 0; border-bottom: 1px solid var(--soft); }
.grp-prog:last-child { border-bottom: none; }
.grp-prog__top { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.grp-prog__dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.grp-prog__n { margin-left: auto; font-size: 11px; color: var(--muted); }
.grp-prog__sub { font-size: 11px; color: var(--muted); margin: 2px 0 6px 18px; }
.grp-prog__pct { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* ===== CHIPS ===== */
.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.cat-chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 22px; border: 1.5px solid var(--line); background: #fff; font-size: 12.5px; font-weight: 600; color: var(--muted); transition: all .15s; }
.cat-chip:hover { border-color: var(--brand); color: var(--brand); }
.cat-chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.cat-chip__dot { width: 9px; height: 9px; border-radius: 50%; }
.cal-leg { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-right: 6px; }
.dotc { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dotc--today { background: #fff; border: 2px solid var(--brand); }

/* ===== AVATAR / MBAR ===== */
.av { width: 34px; height: 34px; border-radius: 50%; color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.av--big { width: 64px; height: 64px; font-size: 22px; }
.av--more { background: var(--soft) !important; color: var(--muted); }
.grp-avs { display: flex; margin: 12px 0; padding-left: 8px; }
.grp-avs .av { box-shadow: 0 0 0 2px #fff; margin-right: -8px; }
.mbar { height: 7px; background: var(--soft); border-radius: 6px; overflow: hidden; }
.mbar__fill { height: 100%; border-radius: 6px; transition: width .4s; }

/* ===== TABELA UCZESTNIKÓW ===== */
.table-wrap { overflow-x: auto; }
.etable { width: 100%; border-collapse: collapse; }
.etable th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.etable td { padding: 12px 16px; border-bottom: 1px solid var(--soft); font-size: 13px; vertical-align: middle; }
.etable tbody tr { cursor: pointer; transition: background .12s; }
.etable tbody tr:hover { background: var(--soft); }
.ptd-user { display: flex; align-items: center; gap: 11px; }
.ptd-name { font-weight: 600; }
.ptd-sub { font-size: 11px; color: var(--muted); }
.ptd-pct { font-size: 11px; color: var(--muted); margin-top: 4px; font-weight: 600; }
.grp-tag { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 20px; white-space: nowrap; }
.pd-line { display: flex; align-items: center; gap: 9px; font-size: 13px; padding: 7px 0; border-bottom: 1px solid var(--soft); color: var(--ink); }
.pd-line:last-child { border-bottom: none; }
.pd-line svg { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; }

/* ===== SWATCHES (grupa) ===== */
.swatches { display: flex; gap: 8px; }
.swatch { width: 28px; height: 28px; border-radius: 8px; cursor: pointer; border: 3px solid transparent; transition: transform .12s; }
.swatch:hover { transform: scale(1.1); }
.swatch.active { border-color: var(--ink); box-shadow: 0 0 0 2px #fff inset; }

/* ===== ZARZĄDZANIE CZŁONKAMI ===== */
.mm-list { max-height: 50vh; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.mm-row { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 10px; cursor: pointer; transition: background .12s; }
.mm-row:hover { background: var(--soft); }
.mm-row input { width: 18px; height: 18px; accent-color: var(--brand); flex-shrink: 0; }
.mm-body { min-width: 0; }
.mm-name { font-size: 13px; font-weight: 600; }

/* ===== KALENDARZ ===== */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-title { font-size: 16px; font-weight: 800; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dow { text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); padding: 4px 0; text-transform: uppercase; }
.cal-day { min-height: 78px; border: 1px solid var(--line); border-radius: 8px; padding: 5px; background: #fff; cursor: pointer; transition: border-color .12s, background .12s; overflow: hidden; }
.cal-day:hover { border-color: var(--brand); background: var(--brand-xl); }
.cal-day--we { background: #fafbfc; }
.cal-day--empty { border: none; background: transparent; cursor: default; }
.cal-day--today { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-l); }
.cal-day__num { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 3px; }
.cal-day--today .cal-day__num { color: var(--brand); }
.cal-ev { font-size: 10px; font-weight: 600; padding: 2px 5px; border-radius: 5px; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.cal-ev--stac { background: var(--brand-l); color: var(--brand-d); }
.cal-ev--online { background: var(--cyan-l); color: var(--cyan); }
.cal-ev:hover { filter: brightness(.96); }

/* ===== KRC HERO ===== */
.krc-hero { display: flex; align-items: center; gap: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px; margin-bottom: 20px; box-shadow: var(--shadow); }
.krc-hero__ico { width: 56px; height: 56px; border-radius: 14px; background: var(--brand); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.krc-hero__ico svg { width: 30px; height: 30px; color: #fff; }
.krc-hero__name { font-size: 20px; font-weight: 800; }
.krc-hero__addr { font-size: 13px; color: var(--muted); }
.krc-hero__tags { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
.krc-hero__tags span { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--brand); font-weight: 600; }
.krc-hero__tags svg { width: 14px; height: 14px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) { .edu-grid2 { grid-template-columns: 1fr; } }
@media (max-width: 1100px) { .edit-wrap { grid-template-columns: 1fr; } .side-col { position: static; } .lib-stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .hamburger { display: inline-flex; align-items: center; justify-content: center; }
  .meta-grid { grid-template-columns: 1fr; }
}

/* ===== DOKUMENTY / SPRAWOZDAWCZOŚĆ ===== */
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 16px; }
.doc-card { background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 14px; transition: box-shadow .15s, border-color .15s; }
.doc-card:hover { border-color: var(--brand); box-shadow: 0 4px 16px rgba(11,78,162,.1); }
.doc-card__icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.doc-card__icon svg { width: 26px; height: 26px; }
.doc-card__title { font-size: 15px; font-weight: 800; }
.doc-card__desc { font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.doc-card__btn { align-self: flex-start; margin-top: auto; display: flex; align-items: center; }
.doc-preview { font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 1.55; padding: 4px 0; max-height: 68vh; overflow-y: auto; }
.doc-preview table { width: 100%; border-collapse: collapse; }

/* ===== DMS — BAZA DOKUMENTÓW ===== */
.dms-tabbar { display:flex; gap:4px; margin-bottom:18px; border-bottom:2px solid var(--line); padding-bottom:0; }
.dms-tab { background:none; border:none; padding:9px 18px; font-size:13px; font-weight:600; color:var(--muted); cursor:pointer; border-bottom:2px solid transparent; margin-bottom:-2px; display:flex; align-items:center; gap:6px; transition:color .15s,border-color .15s; border-radius:0; }
.dms-tab svg { width:15px; height:15px; }
.dms-tab:hover { color:var(--brand); }
.dms-tab.active { color:var(--brand); border-bottom-color:var(--brand); }
.dms-tab .badge { background:var(--brand); color:#fff; font-size:9px; font-weight:700; padding:1px 6px; border-radius:8px; }
.dms-body { flex:1; min-width:0; }
.dms-toprow { display:flex; align-items:center; gap:10px; margin-bottom:12px; flex-wrap:wrap; }
.dms-search-wrap { flex:1; min-width:160px; position:relative; }
.dms-search-wrap input { width:100%; padding:8px 12px; border:1.5px solid var(--line); border-radius:8px; font-size:12px; font-family:inherit; box-sizing:border-box; }
.dms-search-wrap input:focus { outline:none; border-color:var(--brand); }
.dms-stats-row { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin-bottom:14px; }
.dms-layout { display:grid; grid-template-columns:190px 1fr 200px; gap:0; border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; background:var(--bg); min-height:380px; }
.dms-layout--edu { grid-template-columns:170px minmax(0,1fr) 260px; }
.dms-tree { border-right:1px solid var(--line); background:var(--soft); padding:8px 0; overflow-y:auto; }
.dms-tree__title { font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:.8px; color:var(--muted); padding:6px 12px 4px; }
.dms-tree__item { display:flex; align-items:center; gap:6px; padding:5px 12px; font-size:11px; cursor:pointer; transition:.15s; border-left:2px solid transparent; color:var(--ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.dms-tree__item:hover { background:var(--brand-xl); color:var(--brand); }
.dms-tree__item.active { background:var(--brand-l); color:var(--brand); border-left-color:var(--brand); font-weight:600; }
.dms-tree__item svg { width:13px; height:13px; opacity:.6; flex-shrink:0; }
.dms-tree__item.active svg,.dms-tree__item:hover svg { opacity:1; }
.dms-tree__count { margin-left:auto; flex-shrink:0; font-size:9px; background:var(--line); padding:1px 5px; border-radius:6px; color:var(--muted); }
.dms-main { padding:10px 12px; overflow-y:auto; }
.dms-file { display:flex; align-items:center; gap:8px; padding:6px 8px; border-radius:6px; transition:.15s; cursor:pointer; border:1px solid transparent; font-size:11px; }
.dms-file:hover { background:var(--brand-xl); border-color:var(--brand-l); }
.dms-file.selected { background:var(--brand-l); border-color:var(--brand); }
.dms-file__icon { width:28px; height:28px; border-radius:6px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.dms-file__icon svg { width:14px; height:14px; }
.dms-file__icon--pdf { background:#ffebee; color:#c62828; }
.dms-file__icon--doc { background:#e3edf8; color:#1565c0; }
.dms-file__icon--xls { background:#e8f5e9; color:#2e7d32; }
.dms-file__icon--img { background:#f3e5f5; color:#7b1fa2; }
.dms-file__icon--zip { background:#fff8e1; color:#e65100; }
.dms-file__icon--other { background:var(--soft); color:var(--muted); }
.dms-file__info { flex:1; min-width:0; overflow:hidden; }
.dms-file__name { font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.dms-file__meta { font-size:10px; color:var(--muted); margin-top:1px; display:flex; gap:4px; align-items:center; flex-wrap:wrap; }
.dms-file__actions { display:flex; gap:3px; opacity:0; transition:opacity .15s; flex-shrink:0; }
.dms-file:hover .dms-file__actions { opacity:1; }
.dms-tags { display:flex; gap:4px; flex-wrap:wrap; margin-top:4px; }
.dms-tag { font-size:10px; padding:1px 6px; border-radius:4px; background:var(--soft); color:var(--muted); }
.dms-src-badge { display:inline-flex; align-items:center; gap:3px; font-size:9px; font-weight:700; padding:1px 6px; border-radius:4px; background:var(--soft); color:var(--muted); white-space:nowrap; }
.dms-src-badge svg { width:10px; height:10px; flex-shrink:0; }
.dms-src-badge--scan { background:#e0f2f1; color:#00796b; }
.dms-src-badge--gen { background:#e8f5e9; color:#2e7d32; }
.dms-preview-panel { border-left:1px solid var(--line); background:var(--soft); padding:14px 12px; overflow-y:auto; display:flex; flex-direction:column; gap:6px; min-width:0; }
.dms-preview-empty { display:flex; flex-direction:column; align-items:center; gap:10px; color:var(--muted); font-size:12px; text-align:center; margin:auto; padding:20px 10px; }
.dms-preview-empty svg { width:36px; height:36px; opacity:.25; }
/* ikona pliku w preview */
.dms-pv-icon { width:40px; height:40px; min-height:40px; display:flex; align-items:center; justify-content:center; border-radius:10px; background:var(--brand-l); color:var(--brand); flex-shrink:0; margin-bottom:2px; align-self:flex-start; overflow:hidden; }
.dms-pv-icon svg { width:22px; height:22px; flex-shrink:0; }
.dms-pv-name { font-size:12px; font-weight:700; word-break:break-word; line-height:1.4; }
.dms-pv-meta { font-size:10px; color:var(--muted); display:flex; align-items:center; gap:4px; }
.dms-pv-meta svg { width:10px; height:10px; opacity:.5; }
.dms-pv-cat { display:flex; align-items:center; gap:4px; }
.dms-pv-cat svg { width:11px; height:11px; color:var(--muted); flex-shrink:0; }
.dms-pv-notes { display:flex; align-items:flex-start; gap:5px; font-size:11px; color:var(--ink); background:#fff; border:1px solid var(--line); border-radius:6px; padding:7px 9px; line-height:1.5; }
.dms-pv-notes svg,.dms-pv-notes .ico-sm svg { width:12px; height:12px; flex-shrink:0; color:var(--brand); margin-top:1px; }
.dms-pv-badges { display:flex; gap:5px; flex-wrap:wrap; margin-top:2px; }
.dms-status-dot { display:inline-flex; align-items:center; gap:3px; font-size:9px; font-weight:700; padding:1px 7px; border-radius:4px; background:var(--soft); color:var(--muted); }
.dms-status-dot--ok { background:var(--green-l); color:var(--green); }
.dms-status-dot svg { width:10px; height:10px; }
.dms-pv-section-title { font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:.7px; color:var(--muted); margin-top:10px; padding-bottom:4px; border-bottom:1px solid var(--line); }
/* Główne 3 przyciski akcji */
.dms-pv-main-actions { display:grid; grid-template-columns:repeat(3,1fr); gap:6px; margin-top:4px; }
.dms-pv-btn { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; padding:8px 4px; background:#fff; border:1.5px solid var(--line); border-radius:8px; cursor:pointer; font-size:10px; font-weight:700; color:var(--ink); transition:all .15s; font-family:inherit; }
.dms-pv-btn svg { width:16px; height:16px; color:var(--brand); }
.dms-pv-btn:hover { border-color:var(--brand); background:var(--brand-xl); color:var(--brand); }
.dms-pv-btn span { white-space:nowrap; }
/* Przyciski zarządzania */
.dms-pv-mgmt-actions { display:flex; flex-direction:column; gap:5px; margin-top:4px; }
.dms-pv-mgmt-actions .btn--sm { justify-content:flex-start; width:100%; }
.dms-pv-del-row { margin-top:6px; }
.btn--full { width:100%; justify-content:center; }
/* globalna klasa do małych ikon inline */
.ico-sm { display:inline-flex; align-items:center; flex-shrink:0; }
.ico-sm svg { width:13px; height:13px; }
/* DMS modal podgląd */
.dms-modal-preview { padding:4px 0; }
.dms-modal-preview__header { display:flex; gap:14px; align-items:flex-start; margin-bottom:14px; padding-bottom:14px; border-bottom:1px solid var(--line); }
.dms-modal-preview__ico { width:44px; height:44px; display:flex; align-items:center; justify-content:center; background:var(--brand-l); border-radius:10px; flex-shrink:0; color:var(--brand); }
.dms-modal-preview__ico svg { width:24px; height:24px; }
.dms-modal-preview__name { font-size:14px; font-weight:800; word-break:break-word; }
.dms-modal-preview__meta { font-size:11px; color:var(--muted); margin-top:3px; }
.dms-modal-preview__notes { display:flex; align-items:flex-start; gap:6px; background:var(--soft); border-radius:8px; padding:10px 12px; font-size:12px; color:var(--ink); line-height:1.5; margin-top:10px; }
.dms-modal-preview__notes svg { width:14px; height:14px; flex-shrink:0; color:var(--brand); margin-top:1px; }
.dms-modal-preview__placeholder { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px; padding:40px 20px; background:var(--soft); border-radius:10px; border:2px dashed var(--line); margin-top:14px; }
.dms-modal-preview__placeholder-ico { width:56px; height:56px; display:flex; align-items:center; justify-content:center; background:var(--brand-l); border-radius:14px; color:var(--brand); }
.dms-modal-preview__placeholder-ico svg { width:28px; height:28px; }
.dms-modal-preview__placeholder-txt { text-align:center; font-size:13px; color:var(--muted); line-height:1.6; }
.dms-modal-preview__placeholder-txt span { font-size:11px; }
/* DMS send form */
.dms-send-file-info { display:flex; align-items:center; gap:10px; background:var(--soft); border-radius:8px; padding:10px 12px; margin-bottom:14px; font-size:13px; font-weight:600; }
.dms-send-file-info svg { width:20px; height:20px; color:var(--brand); flex-shrink:0; }
/* Dropzone cloud icon */
.dms-dropzone__cloud { display:flex; align-items:center; justify-content:center; width:44px; height:44px; border-radius:12px; background:var(--brand-l); color:var(--brand); }
.dms-dropzone__cloud svg { width:24px; height:24px; }
/* dropzone */
.dms-dropzone { border:2px dashed var(--brand-l); border-radius:10px; background:var(--brand-xl); cursor:pointer; transition:border-color .2s,background .2s; margin-bottom:14px; }
.dms-dropzone:hover,.dms-dropzone.dragover { border-color:var(--brand); background:var(--brand-l); }
.dms-dropzone.picked { border-color:var(--green); background:#e8f5e9; border-style:solid; }
.dms-dropzone__inner { display:flex; flex-direction:column; align-items:center; justify-content:center; padding:28px 20px; gap:8px; }
.dms-dropzone__txt { font-size:13px; font-weight:600; color:var(--brand); text-align:center; line-height:1.5; }
.dms-dropzone__txt span { font-weight:400; color:var(--muted); font-size:11px; }
.dms-file-picked { font-size:12px; font-weight:600; color:var(--green); background:#e8f5e9; border-radius:6px; padding:6px 12px; margin-bottom:10px; text-align:center; }
@media (max-width:900px) {
  .dms-layout,.dms-layout--edu { grid-template-columns:1fr; }
  .dms-tree { max-height:160px; border-right:none; border-bottom:1px solid var(--line); }
  .dms-preview-panel { border-left:none; border-top:1px solid var(--line); }
  .dms-stats-row { grid-template-columns:repeat(2,1fr); }
}

/* ===== PASEK DOSTĘPNOŚCI (WCAG) ===== */
.topbar__a11y { display: flex; align-items: center; gap: 6px; margin-left: auto; margin-right: 12px; }
.topbar__a11y button { height: 34px; min-width: 38px; padding: 0 10px; border: 1.5px solid var(--line); border-radius: 9px; background: #fff; color: var(--muted); font-weight: 800; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; transition: all .15s; }
.topbar__a11y button:hover { border-color: var(--brand); color: var(--brand); }
.topbar__a11y button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.topbar__a11y button svg { width: 18px; height: 18px; }
.topbar__a11y sup { font-size: 9px; }

/* tryb: powiększony tekst */
html.a11y-font body { zoom: 1.15; }
/* tryb: wysoki kontrast */
html.a11y-contrast { --ink: #000; --muted: #1f2937; --line: #000; --soft: #eaeaea; --brand: #08407e; --brand-d: #06305f; }
html.a11y-contrast .side-card, html.a11y-contrast .prog-card, html.a11y-contrast .cal-day, html.a11y-contrast .etable, html.a11y-contrast .topbar__a11y button { border-width: 2px; }
html.a11y-contrast .ptd-sub, html.a11y-contrast .topbar__crumb, html.a11y-contrast .sess-row__meta { color: #1f2937; }
html.a11y-contrast a { text-decoration: underline; }

/* ===== SZCZEGÓLNE POTRZEBY ===== */
.needs-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.need-chk { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border: 1.5px solid var(--line); border-radius: 20px; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.need-chk input { accent-color: var(--brand); }
.need-chk.on { border-color: var(--teal); background: var(--teal-l); color: var(--teal); }
.needs-row { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.need-badge { display: inline-flex; align-items: center; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 16px; background: var(--teal-l); color: var(--teal); }
.need-badge--xs { font-size: 10px; padding: 1px 7px; margin-left: 4px; vertical-align: middle; }

/* ===== TESTY PRE/POST ===== */
.tt-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; margin-bottom: 5px; }
.field--row { display: flex; gap: 12px; }
.field--row > div { flex: 1; }
.field--row label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 5px; }
.growth-pill { margin-top: 12px; display: inline-flex; align-items: center; gap: 7px; background: var(--purple-l); color: var(--purple); font-weight: 800; font-size: 13px; padding: 8px 14px; border-radius: 10px; }
.growth-pill svg { width: 16px; height: 16px; }

/* ===== KONSULTACJE ===== */
.chan { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 4px 11px; border-radius: 18px; }
.chan svg { width: 13px; height: 13px; }
.chan--osob { background: var(--brand-l); color: var(--brand); }
.chan--tel { background: var(--cyan-l); color: var(--cyan); }
.chan--online { background: var(--purple-l); color: var(--purple); }

/* ===== OBECNOŚĆ ===== */
.att-list { display: flex; flex-direction: column; gap: 6px; max-height: 52vh; overflow-y: auto; }
.att-row { display: flex; align-items: center; gap: 11px; padding: 7px 4px; border-bottom: 1px solid var(--soft); }
.att-name { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; }
.att-opts { display: flex; gap: 5px; }
.att-opt { font-size: 11px; font-weight: 700; padding: 5px 10px; border-radius: 8px; border: 1.5px solid var(--line); background: #fff; color: var(--muted); }
.att-opt--present.on { background: var(--green-l); border-color: var(--green); color: var(--green); }
.att-opt--late.on { background: var(--amber-l); border-color: var(--amber); color: var(--amber); }
.att-opt--absent.on { background: var(--red-l); border-color: var(--red); color: var(--red); }
.freq-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: var(--green); background: var(--green-l); padding: 3px 9px; border-radius: 16px; white-space: nowrap; }
.freq-chip svg { width: 12px; height: 12px; }

/* === KRC TYPE SWITCHER === */
.sidebar__krc-switch { padding: 10px 16px 4px; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 4px; }
.krc-switch__label { font-size: 10px; text-transform: uppercase; letter-spacing: .7px; color: rgba(255,255,255,.4); margin-bottom: 6px; font-weight: 600; }
.krc-switch__btns { display: flex; gap: 6px; }
.krc-switch__btn { flex: 1; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-radius: 8px; padding: 7px 6px; cursor: pointer; text-align: center; transition: .15s; }
.krc-switch__btn small { display: block; font-size: 10px; color: rgba(255,255,255,.5); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.krc-switch__btn.active { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.3); }
.krc-switch__btn:hover { background: rgba(255,255,255,.12); }
.krc-type-badge { display: inline-block; padding: 1px 7px; border-radius: 4px; font-size: 11px; font-weight: 700; }
.krc-type-badge--I { background: #0b4ea2; color: #fff; }
.krc-type-badge--II { background: #6d28d9; color: #fff; }

/* === BADGE PILLS (panel operator compat) === */
.badge-pill { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; background: #f1f5f9; color: #64748b; }
.badge-pill--ok { background: #dcfce7; color: #166534; }
.badge-pill--warn { background: #fef9c3; color: #854d0e; }
.badge-pill--danger { background: #fee2e2; color: #991b1b; }
.badge-pill--info { background: #e0f2fe; color: #075985; }
.stat-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 16px; text-align: center; }
.stat-card--warn { border-color: #fde68a; background: #fffbeb; }
.stat-card__val { font-size: 22px; font-weight: 800; color: #0b4ea2; margin-bottom: 4px; }
.stat-card__lbl { font-size: 12px; color: #64748b; }

/* === NEW BADGE === */
.new-badge {
  display: inline-flex;
  align-items: center;
  font-size: 9px;
  font-weight: 800;
  color: #fff;
  background: #ef4444;
  border-radius: 4px;
  padding: 2px 5px;
  line-height: 1;
  cursor: help;
  letter-spacing: .4px;
  text-transform: uppercase;
  margin-left: 4px;
  flex-shrink: 0;
  position: relative;
  top: -1px;
}
#nbTooltip {
  position: fixed;
  z-index: 99999;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  max-width: 260px;
  min-width: 200px;
  font-size: 12px;
  line-height: 1.6;
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s ease;
  box-shadow: 0 12px 36px rgba(0,0,0,.35);
  font-family: 'Inter', sans-serif;
}
#nbTooltip.nb-visible { opacity: 1; }
#nbTooltip .nb-version { font-size: 10px; font-weight: 700; color: #ef4444; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
#nbTooltip .nb-title { font-size: 13px; font-weight: 700; color: #f8fafc; margin-bottom: 8px; }
#nbTooltip ul { margin: 0; padding-left: 14px; color: #cbd5e1; }
#nbTooltip ul li { margin-bottom: 3px; }
#nbTooltip .nb-date { margin-top: 8px; font-size: 10px; color: #64748b; }

/* ============================================================
   DZIENNIK ZAJĘĆ — karty zamiast tabeli
   ============================================================ */
.jrn-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.jrn-stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 12px;
  text-align: center;
}
.jrn-stat__val {
  font-size: 22px;
  font-weight: 800;
  color: var(--brand);
}
.jrn-stat__val--I { color: var(--brand); }
.jrn-stat__val--II { color: #7c3aed; }
.jrn-stat__lbl {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.jrn-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.jrn-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 100px 1fr 130px;
  gap: 16px;
  align-items: start;
  transition: box-shadow .15s;
}
.jrn-card:hover {
  box-shadow: var(--shadow-md);
}

.jrn-card__left {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}
.jrn-card__date {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.jrn-card__type {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .3px;
}
.jrn-type--I {
  background: rgba(11, 78, 162, .1);
  color: var(--brand);
}
.jrn-type--II {
  background: rgba(124, 58, 237, .1);
  color: #7c3aed;
}

.jrn-card__body {
  min-width: 0;
}
.jrn-card__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
  line-height: 1.35;
}
.jrn-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}
.jrn-card__pill {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 20px;
}
.jrn-forma--group {
  background: var(--brand-l);
  color: var(--brand);
}
.jrn-forma--solo {
  background: var(--purple-l);
  color: var(--purple);
}
.jrn-card__meta-item {
  font-size: 12px;
  color: var(--muted);
}
.jrn-card__note {
  font-size: 13px;
  color: #475569;
  line-height: 1.5;
  margin-top: 4px;
  padding: 8px 12px;
  background: var(--soft);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--brand-l);
}

.jrn-card__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  text-align: right;
}
.jrn-card__frek-val {
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}
.jrn-card__frek-lbl {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .5px;
  opacity: .65;
}
.jrn-card__ppl {
  font-size: 12px;
  color: var(--muted);
}
.jrn-card__actions {
  margin-top: 2px;
}

@media (max-width: 860px) {
  .jrn-card {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .jrn-card__left {
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }
  .jrn-card__right {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    justify-content: flex-start;
    text-align: left;
  }
}

/* ============================================================
   OCENY OPISOWE — czytelne karty
   ============================================================ */
.assess-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.assess-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  transition: box-shadow .15s;
}
.assess-card:hover {
  box-shadow: var(--shadow-md);
}

.assess-card__head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.assess-card__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--brand-l);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--brand);
  font-size: 17px;
  flex-shrink: 0;
}
.assess-card__info {
  flex: 1;
  min-width: 120px;
}
.assess-card__name {
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
}
.assess-card__date {
  font-size: 12px;
  color: var(--muted);
}
.assess-card__status {
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.assess-status--ok { background: var(--green-l); color: var(--green); }
.assess-status--warn { background: var(--amber-l); color: var(--amber); }
.assess-status--danger { background: var(--red-l); color: var(--red); }

.assess-card__progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.assess-card__bar {
  flex: 1;
  height: 8px;
  background: var(--soft);
  border-radius: 6px;
  overflow: hidden;
}
.assess-card__bar-fill {
  height: 100%;
  border-radius: 6px;
  transition: width .3s;
}
.assess-card__pct {
  font-size: 14px;
  font-weight: 800;
  min-width: 40px;
  text-align: right;
}

.assess-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.assess-card__tag {
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  background: var(--brand-l);
  color: var(--brand);
}

.assess-card__evals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.assess-eval {
  border-radius: var(--radius-sm);
  padding: 16px;
}
.assess-eval--pre {
  background: var(--soft);
}
.assess-eval--post {
  background: var(--soft);
}
.assess-eval--post-done {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}
.assess-eval__label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
  margin-bottom: 8px;
}
.assess-eval__text {
  font-size: 14px;
  color: #334155;
  line-height: 1.65;
}
.assess-eval__empty {
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
  line-height: 1.5;
}

@media (max-width: 700px) {
  .assess-card { padding: 16px; }
  .assess-card__evals {
    grid-template-columns: 1fr;
  }
  .assess-card__head { gap: 10px; }
}
