:root {
  --paper: #f3f5f8;
  --surface: #ffffff;
  --surface-2: #eaeef3;
  --line: #dde2ea;
  --ink: #18202b;
  --muted: #667085;
  --accent: #2b4acb;
  --accent-ink: #ffffff;
  --accent-soft: #e5eafb;
  --now: #e8590c;
  --danger: #c92a2a;
  --hour: 76px;
  --radius-s: 6px;
  --radius-m: 10px;
  --radius-l: 16px;
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  color-scheme: light dark;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
/* Ciemny motyw: według systemu, chyba że wybrano jasny; albo wymuszony przełącznikiem */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #12161d;
    --surface: #1a2029;
    --surface-2: #232b36;
    --line: #2c3542;
    --ink: #e7ebf1;
    --muted: #96a0b0;
    --accent: #7b93ff;
    --accent-ink: #0e1430;
    --accent-soft: #232c4d;
    --now: #ff8a3d;
    --danger: #ff6b6b;
  }
}
:root[data-theme="dark"] {
  --paper: #12161d;
  --surface: #1a2029;
  --surface-2: #232b36;
  --line: #2c3542;
  --ink: #e7ebf1;
  --muted: #96a0b0;
  --accent: #7b93ff;
  --accent-ink: #0e1430;
  --accent-soft: #232c4d;
  --now: #ff8a3d;
  --danger: #ff6b6b;
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }
*, *::before, *::after { box-sizing: inherit; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; margin: 0; line-height: 1.15; }
.muted { color: var(--muted); }
.error { color: var(--danger); margin: .5rem 0 0; font-size: .92rem; }
.hint { color: var(--muted); font-size: .85rem; margin: -.4rem 0 .9rem; }
.spacer { flex: 1; }

/* ---------- Przyciski ---------- */
.btn {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-s);
  padding: .55rem 1rem;
  cursor: pointer;
  font-weight: 500;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.wide { width: 100%; }
.btn.danger-ghost { border-color: transparent; background: none; color: var(--danger); padding-left: 0; }
.btn.small { padding: .3rem .7rem; font-size: .9rem; }
.icon-btn {
  border: none; background: none; cursor: pointer;
  width: 34px; height: 34px; border-radius: var(--radius-s);
  display: inline-grid; place-items: center; font-size: 1.05rem; color: var(--muted);
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.link-btn { border: none; background: none; color: var(--muted); cursor: pointer; padding: 0; }
.link-btn:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Formularze ---------- */
.field { display: flex; flex-direction: column; gap: .3rem; margin: 0 0 .9rem; border: 0; padding: 0; min-width: 0; }
.field > span { font-size: .85rem; font-weight: 600; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-s);
  padding: .55rem .7rem;
}
.field textarea { resize: vertical; min-height: 90px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.row { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: .75rem; }
.grow { flex: 1; }
.segmented { display: flex; border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; }
.segmented label { flex: 1; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span {
  display: block; text-align: center; padding: .45rem .3rem; cursor: pointer;
  font-size: .9rem; border-left: 1px solid var(--line);
}
.segmented label:first-child span { border-left: 0; }
.segmented input:checked + span { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.segmented input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -2px; }

/* ---------- Logowanie ---------- */
.auth { min-height: 100%; display: grid; place-items: center; padding: 1.5rem; }
.auth-card {
  width: min(380px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: 2rem;
}
.auth-mark { font-size: 2.2rem; margin-bottom: .5rem; }
.auth-card h1 { font-size: 1.7rem; margin-bottom: .35rem; }
.auth-card p.muted { margin: 0 0 1.2rem; }

/* ---------- Układ ---------- */
.app { display: flex; height: 100%; }
.sidebar {
  width: 264px; flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  padding: 1.1rem .8rem;
  overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: .55rem; padding: 0 .55rem 1.1rem; }
.brand-mark { font-size: 1.35rem; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; letter-spacing: -.01em; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: .6rem;
  padding: .5rem .6rem; border-radius: var(--radius-s);
  color: var(--ink); text-decoration: none; font-weight: 500;
}
.nav-item:hover { background: var(--surface-2); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); }
.nav-icon { width: 1.4rem; text-align: center; flex-shrink: 0; }
.nav-item .count { margin-left: auto; font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.nav-item .count.overdue { color: var(--now); font-weight: 600; }
.nav-item .pname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item[draggable="true"] { cursor: grab; }
.nav-item.drag-over { box-shadow: inset 0 2px 0 var(--accent); }
.nav-section {
  display: flex; align-items: center; justify-content: space-between;
  margin: 1.4rem 0 .3rem; padding: 0 .2rem 0 .6rem;
  font-size: .85rem; font-weight: 600; color: var(--muted);
}
.nav-empty { padding: .4rem .6rem; color: var(--muted); font-size: .9rem; }
.sidebar-foot { margin-top: auto; padding-top: 1rem; }
.sidebar-foot .nav-section { margin-top: 0; }
.sidebar-foot .logout { margin: .8rem .6rem 0; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; height: 100%; }
.topbar { display: none; }
.view { flex: 1; overflow-y: auto; padding: 2rem 2.4rem 3rem; }
.scrim { display: none; }

@media (max-width: 860px) {
  .sidebar {
    position: fixed; z-index: 30; top: 0; bottom: 0; left: 0;
    padding-top: calc(1.1rem + env(safe-area-inset-top, 0px));
    transform: translateX(-100%); transition: transform .22s ease;
  }
  .app.menu-open .sidebar { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .25); }
  .app.menu-open .scrim { display: block; position: fixed; inset: 0; z-index: 20; background: rgba(10, 14, 20, .35); }
  .topbar {
    display: flex; align-items: center; gap: .5rem;
    padding: .5rem .7rem; background: var(--surface); border-bottom: 1px solid var(--line);
  }
  .topbar-title { flex: 1; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
  .view { padding: 1.2rem 1rem 3rem; }
  .row { grid-template-columns: 1fr 1fr; }
  .row .field:first-child { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- Nagłówek widoku dnia ---------- */
.day-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.day-weekday { font-size: 1rem; color: var(--muted); font-weight: 500; margin-bottom: .1rem; }
.day-date { font-size: clamp(2rem, 5vw, 3.1rem); letter-spacing: -.025em; }
.day-date .rel { color: var(--accent); }
.day-nav { display: flex; gap: .4rem; align-items: center; }
.day-nav input[type="date"] {
  border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-s); padding: .45rem .5rem;
}

.week {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: .35rem;
  margin-bottom: 1.6rem;
}
.week-day {
  border: 1px solid var(--line); background: var(--surface);
  border-radius: var(--radius-m); padding: .5rem .3rem .45rem;
  text-align: center; cursor: pointer; text-decoration: none; color: var(--ink);
}
.week-day:hover { border-color: var(--accent); }
.week-day .wd { display: block; font-size: .78rem; color: var(--muted); }
.week-day .dn { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.week-day .dots { display: flex; justify-content: center; gap: 3px; height: 6px; margin-top: .2rem; }
.week-day .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); opacity: .55; }
.week-day.today .dn { color: var(--accent); }
.week-day.selected { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.week-day.selected .wd, .week-day.selected .dn { color: var(--accent-ink); }
.week-day.selected .dots i { background: var(--accent-ink); opacity: .8; }

.quick-add {
  display: flex; gap: .5rem; margin-bottom: 1.6rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m);
  padding: .35rem .35rem .35rem .9rem; align-items: center;
}
.quick-add:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.quick-add input { flex: 1; border: none; background: none; outline: none; padding: .45rem 0; min-width: 0; }
.quick-add select { border: 1px solid var(--line); background: var(--surface-2); border-radius: var(--radius-s); padding: .4rem .5rem; max-width: 40%; }

.day-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 2rem; align-items: start; }
@media (max-width: 1100px) { .day-grid { grid-template-columns: 1fr; } .day-side { order: -1; } }

.section-title { font-size: 1.05rem; margin: 0 0 .7rem; display: flex; align-items: baseline; gap: .5rem; }
.section-title small { font-family: var(--font-body); font-weight: 500; color: var(--muted); font-size: .85rem; }
.day-side .block { margin-bottom: 1.6rem; }
.overdue-title { color: var(--now); }

/* ---------- Oś czasu ---------- */
.timeline {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  max-height: 70vh; overflow-y: auto;
}
.timeline-inner { position: relative; height: calc(var(--hour) * 24); margin-left: 58px; border-left: 1px solid var(--line); }
.tl-hour { position: absolute; left: 0; right: 0; height: var(--hour); border-top: 1px solid var(--line); }
.tl-hour:first-child { border-top: 0; }
.tl-hour::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px dashed var(--line); opacity: .55; }
.tl-label {
  position: absolute; left: -58px; width: 50px; text-align: right; top: -.6em;
  font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums;
}
.tl-hour:first-child .tl-label { top: .2rem; }
.tl-slot { position: absolute; left: 0; right: 0; height: calc(var(--hour) / 2); cursor: copy; }
.tl-slot:hover { background: var(--accent-soft); opacity: .6; }
.tl-now { position: absolute; left: -6px; right: 0; height: 0; border-top: 2px solid var(--now); z-index: 4; pointer-events: none; }
.tl-now::before { content: ""; position: absolute; left: 0; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--now); }
.tl-event {
  position: absolute; z-index: 2;
  border-radius: var(--radius-s);
  padding: .25rem .5rem .25rem .6rem;
  overflow: hidden; cursor: pointer;
  background: color-mix(in srgb, var(--c) 16%, var(--surface));
  border-left: 4px solid var(--c);
  font-size: .86rem; line-height: 1.3;
  display: flex; gap: .4rem; align-items: flex-start;
}
.tl-event:hover { background: color-mix(in srgb, var(--c) 26%, var(--surface)); }
.tl-event .tl-body { min-width: 0; flex: 1; }
.tl-event .tl-title { font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-event .tl-meta { color: var(--muted); font-size: .78rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-event.done { opacity: .55; }
.tl-event.done .tl-title { text-decoration: line-through; }
.tl-event.short { align-items: center; }
.tl-event.short .tl-meta { display: none; }

/* ---------- Lista zadań ---------- */
.task-list { display: flex; flex-direction: column; gap: 2px; margin: 0 0 1.4rem; padding: 0; list-style: none; }
.task {
  display: flex; gap: .7rem; align-items: flex-start;
  padding: .6rem .7rem; border-radius: var(--radius-s);
  background: var(--surface); border: 1px solid var(--line);
  cursor: pointer;
}
.task + .task { margin-top: 4px; }
.task:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.task-body { flex: 1; min-width: 0; }
.task-title { font-weight: 500; overflow-wrap: anywhere; }
.task.done .task-title { text-decoration: line-through; color: var(--muted); }
.task-meta { display: flex; flex-wrap: wrap; gap: .25rem .8rem; font-size: .82rem; color: var(--muted); margin-top: .1rem; }
.task-meta .late { color: var(--now); font-weight: 600; }
.task-desc { font-size: .86rem; color: var(--muted); margin-top: .2rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.prio { display: inline-flex; gap: 2px; align-items: center; }
.prio i { width: 4px; height: 10px; border-radius: 1px; background: currentColor; opacity: .25; }
.prio i.on { opacity: 1; }
.prio.p3 { color: var(--danger); }
.prio.p2 { color: #e67700; }
.prio.p1 { color: var(--muted); }
.pchip { display: inline-flex; gap: .3rem; align-items: center; }
.pchip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }

.check {
  appearance: none; -webkit-appearance: none; flex-shrink: 0;
  width: 20px; height: 20px; margin: .1rem 0 0;
  border: 2px solid var(--c, var(--muted)); border-radius: 50%;
  cursor: pointer; display: grid; place-items: center; background: var(--surface);
}
.check:checked { background: var(--c, var(--accent)); }
.check:checked::after { content: ""; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.check.sm { width: 16px; height: 16px; margin-top: .05rem; }
.check.sm:checked::after { width: 4px; height: 7px; }
@media (hover: hover) { .check:not(:checked):hover::after { content: ""; width: 5px; height: 9px; border: solid var(--c, var(--muted)); border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); opacity: .5; } }

.empty {
  border: 1px dashed var(--line); border-radius: var(--radius-m);
  padding: 1.1rem; color: var(--muted); font-size: .92rem; text-align: center;
}
.empty button { margin-top: .6rem; }

/* ---------- Widok projektu ---------- */
.proj-head { display: flex; gap: 1rem; align-items: center; margin-bottom: 1.4rem; }
.proj-icon {
  width: 60px; height: 60px; border-radius: var(--radius-l); flex-shrink: 0;
  display: grid; place-items: center; font-size: 1.9rem;
  background: color-mix(in srgb, var(--c) 18%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--c) 35%, var(--line));
}
.proj-head h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); letter-spacing: -.02em; overflow-wrap: anywhere; }
.proj-stats { color: var(--muted); font-size: .92rem; margin-top: .15rem; }
.proj-progress { height: 4px; border-radius: 2px; background: var(--surface-2); margin-top: .5rem; max-width: 260px; overflow: hidden; }
.proj-progress i { display: block; height: 100%; background: var(--c); }
.tabs { display: flex; gap: .3rem; margin-bottom: 1.2rem; border-bottom: 1px solid var(--line); }
.tab { border: none; background: none; padding: .5rem .8rem; cursor: pointer; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab.active { color: var(--ink); border-bottom-color: var(--accent); }
.group-title { font-size: .92rem; font-weight: 600; color: var(--muted); margin: 0 0 .5rem; }
.group-title.late { color: var(--now); }

/* ---------- Kalendarz ---------- */
.page-title { font-size: clamp(1.7rem, 4vw, 2.4rem); letter-spacing: -.02em; margin-bottom: .4rem; }
.lead { color: var(--muted); max-width: 62ch; margin: 0 0 1.8rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 1.3rem 1.4rem; margin-bottom: 1.2rem; max-width: 760px; }
.card h2 { font-size: 1.15rem; margin-bottom: .6rem; }
.copy-row { display: flex; gap: .5rem; }
.copy-row input { flex: 1; min-width: 0; border: 1px solid var(--line); background: var(--surface-2); border-radius: var(--radius-s); padding: .55rem .7rem; font-size: .88rem; }
.steps { margin: .4rem 0 0; padding-left: 1.3rem; }
.steps li { margin-bottom: .45rem; }
.steps li::marker { color: var(--accent); font-weight: 600; }
.feed-list { list-style: none; padding: 0; margin: 0; }
.feed-list li { display: flex; align-items: center; gap: .6rem; padding: .45rem 0; border-top: 1px solid var(--line); }
.feed-list li:first-child { border-top: 0; }
.feed-list .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note { font-size: .88rem; color: var(--muted); margin: .8rem 0 0; }
.pw-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: .6rem; align-items: end; }
.pw-form .field { margin: 0; }
@media (max-width: 640px) { .pw-form { grid-template-columns: 1fr; } }

/* ---------- Dialogi ---------- */
.dialog {
  border: 1px solid var(--line); border-radius: var(--radius-l);
  background: var(--surface); color: var(--ink);
  padding: 1.3rem 1.4rem 1.2rem; width: min(580px, calc(100vw - 1.5rem));
  max-height: calc(100vh - 2rem);
}
.dialog.narrow { width: min(460px, calc(100vw - 1.5rem)); }
.dialog::backdrop { background: rgba(10, 14, 20, .45); }
.dialog[open] { animation: pop .16s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.985); } }
.dialog-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.dialog-head h2 { font-size: 1.3rem; }
.dialog-foot { display: flex; gap: .5rem; align-items: center; margin-top: .4rem; }
.project-preview { display: flex; gap: .9rem; align-items: flex-end; }
.project-preview-icon {
  width: 52px; height: 52px; flex-shrink: 0; margin-bottom: .9rem;
  border-radius: var(--radius-m); display: grid; place-items: center; font-size: 1.6rem;
  background: color-mix(in srgb, var(--c, #3b5bdb) 18%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--c, #3b5bdb) 35%, var(--line));
}
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 4px; max-height: 172px; overflow-y: auto; padding: 2px; }
.emoji-grid button {
  border: 1px solid transparent; background: var(--surface-2); border-radius: var(--radius-s);
  height: 38px; font-size: 1.2rem; cursor: pointer;
}
.emoji-grid button:hover { border-color: var(--line); }
.emoji-grid button.sel { border-color: var(--accent); background: var(--accent-soft); }
.custom-emoji { display: flex; align-items: center; gap: .5rem; margin-top: .5rem; font-size: .88rem; }
.custom-emoji input { width: 70px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-s); padding: .3rem .5rem; text-align: center; }
.swatches { display: flex; flex-wrap: wrap; gap: .45rem; }
.swatches button {
  width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
  border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); background: var(--sw);
}
.swatches button.sel { box-shadow: 0 0 0 2px var(--ink); }
.hex-row { display: flex; align-items: center; gap: .5rem; margin-top: .6rem; flex-wrap: wrap; }
.hex-row .hint { margin: 0; }
.field .hex-row input[type="color"] {
  width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 50%;
  background: none; cursor: pointer; overflow: hidden;
}
.hex-row input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.hex-row input[type="color"]::-webkit-color-swatch { border: none; border-radius: 50%; }
.hex-row input[type="color"]::-moz-color-swatch { border: none; border-radius: 50%; }
.field .hex-row .hex-input {
  width: 7.5rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9rem;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--radius-s); padding: .4rem .55rem;
}
.field .hex-row .hex-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field .hex-row .hex-input.invalid { border-color: var(--now); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(1.2rem + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, calc(100% + 3rem)); visibility: hidden; transition: transform .2s ease, visibility 0s .2s;
  background: var(--ink); color: var(--paper);
  padding: .6rem 1rem; border-radius: var(--radius-m); font-size: .92rem; z-index: 50;
  display: flex; gap: .8rem; align-items: center; max-width: calc(100vw - 2rem);
}
.toast.show { transform: translate(-50%, 0); visibility: visible; transition: transform .2s ease; }
.toast button { border: none; background: none; color: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; padding: 0; }

/* ---------- Spotkania z kalendarzy ---------- */
.section-row { display: flex; align-items: baseline; justify-content: space-between; gap: .8rem; flex-wrap: wrap; }
.btn.ghost { border-color: transparent; background: none; color: var(--muted); }
.btn.ghost:hover { color: var(--ink); background: var(--surface-2); }
.banner {
  font-size: .88rem; padding: .55rem .8rem; margin-bottom: .6rem;
  border-radius: var(--radius-s); border: 1px solid color-mix(in srgb, var(--now) 40%, var(--line));
  background: color-mix(in srgb, var(--now) 8%, var(--surface));
}
.banner a { color: inherit; font-weight: 600; }
.allday-strip { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .6rem; }
.ad-chip {
  border: 1px solid color-mix(in srgb, var(--c) 45%, var(--line));
  background: color-mix(in srgb, var(--c) 12%, var(--surface));
  border-radius: 999px; padding: .25rem .75rem; font-size: .85rem; cursor: pointer; font-weight: 500;
}
.ad-chip small { color: var(--muted); font-weight: 400; }
.tl-event.meeting {
  border-left: 0;
  border: 1px solid color-mix(in srgb, var(--c) 55%, var(--line));
  background: repeating-linear-gradient(135deg,
    color-mix(in srgb, var(--c) 9%, var(--surface)) 0 7px,
    color-mix(in srgb, var(--c) 15%, var(--surface)) 7px 14px);
  padding-left: .55rem;
}
.tl-event.meeting:hover { border-color: var(--c); }
.tl-event.meeting.free { border-style: dashed; }
.tl-event.meeting.past { opacity: .5; }
.tl-join {
  flex-shrink: 0; align-self: flex-start; font-size: .76rem; font-weight: 600; text-decoration: none;
  color: var(--accent-ink); background: var(--accent); border-radius: 4px; padding: .1rem .45rem;
}
.tl-event.short .tl-join { align-self: center; }
.legend { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; font-size: .8rem; color: var(--muted); margin: .5rem 0 0; }
.legend a { color: inherit; }
.legend span { display: inline-block; width: 14px; height: 10px; border-radius: 2px; }
.legend span + * { margin-right: .4rem; }
.lg-task { background: color-mix(in srgb, var(--accent) 18%, var(--surface)); border-left: 3px solid var(--accent); }
.lg-meet { border: 1px solid var(--muted); background: repeating-linear-gradient(135deg, var(--surface-2) 0 3px, var(--surface) 3px 6px); margin-left: .5rem; }
.week-day .dots i.ring { background: none; border: 1.5px solid var(--muted); width: 6px; height: 6px; }
.week-day.selected .dots i.ring { background: none; border-color: var(--accent-ink); }

.up-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.up-item {
  display: grid; grid-template-columns: 1fr auto; column-gap: .6rem;
  padding: .65rem .8rem; border-radius: var(--radius-s); cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--c);
}
.up-item:hover { border-color: color-mix(in srgb, var(--c) 60%, var(--line)); border-left-color: var(--c); }
.up-when { font-size: .8rem; font-weight: 600; color: var(--accent); }
.up-title { font-weight: 600; grid-column: 1; overflow-wrap: anywhere; }
.up-sub { font-size: .82rem; color: var(--muted); grid-column: 1; }
.up-join { grid-column: 2; grid-row: 1 / span 3; align-self: center; text-decoration: none; }
.hint-card { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius-m); padding: 1rem; }
.hint-card p { margin: .3rem 0 .8rem; color: var(--muted); font-size: .9rem; }
.hint-card .btn { text-decoration: none; display: inline-block; }

.ev-meta { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1rem; }
.ev-meta > div { display: grid; grid-template-columns: 90px 1fr; gap: .6rem; font-size: .93rem; }
.ev-k { color: var(--muted); font-weight: 600; font-size: .85rem; }
.ev-meta a, .ev-desc a { color: var(--accent); overflow-wrap: anywhere; }
.ev-join { display: inline-block; text-decoration: none; margin-bottom: 1rem; }
.ev-desc { white-space: pre-line; font-size: .92rem; max-height: 240px; overflow-y: auto; padding: .7rem .8rem; background: var(--surface-2); border-radius: var(--radius-s); overflow-wrap: anywhere; }
#evTitle { font-size: 1.25rem; overflow-wrap: anywhere; padding-right: .5rem; }

.card-head { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; margin-bottom: .8rem; }
.card-head h2 { margin: 0; }
.card-actions { display: flex; gap: .4rem; }
.cal-list { list-style: none; margin: 0; padding: 0; }
.cal-row { display: flex; align-items: center; gap: .7rem; padding: .7rem 0; border-top: 1px solid var(--line); }
.cal-row:first-child { border-top: 0; }
.cal-row.off .cal-name { color: var(--muted); }
.cal-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-status { font-size: .84rem; color: var(--muted); }
.cal-status.err { color: var(--danger); }
.switch { position: relative; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch span { display: block; width: 36px; height: 20px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); position: relative; transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: transform .15s; }
.switch input:checked + span { background: var(--c); border-color: var(--c); }
.switch input:checked + span::after { transform: translateX(16px); background: #fff; }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.checkline { display: flex; align-items: center; gap: .5rem; margin-bottom: .6rem; cursor: pointer; }
.checkline input { width: 16px; height: 16px; accent-color: var(--accent); }
code { font-size: .86em; background: var(--surface-2); padding: .05rem .3rem; border-radius: 4px; }
.disclosure summary { cursor: pointer; display: flex; align-items: baseline; gap: .6rem; list-style: none; }
.disclosure summary::-webkit-details-marker { display: none; }
.disclosure summary::before { content: "›"; color: var(--muted); transition: transform .15s; display: inline-block; }
.disclosure[open] summary::before { transform: rotate(90deg); }
.disclosure summary h2 { margin: 0; }
.disclosure[open] summary { margin-bottom: .7rem; }
.link-btn.inline { color: var(--accent); text-decoration: underline; font-size: inherit; }
@media (max-width: 640px) {
  .cal-row { flex-wrap: wrap; }
  .cal-row .grow { flex: 1 1 calc(100% - 50px); }
}

/* ---------- Własne grafiki ikon ---------- */
.picon { display: inline-block; width: 1.25em; height: 1.25em; object-fit: contain; border-radius: 4px; vertical-align: -.22em; }
.picon.fill { width: 100%; height: 100%; border-radius: inherit; vertical-align: top; }
.nav-icon .picon { width: 20px; height: 20px; vertical-align: -5px; }
.proj-icon, .project-preview-icon { overflow: hidden; }
.proj-icon .picon.fill { width: 100%; height: 100%; }
.upload-row { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.upload-row label.btn { cursor: pointer; }
.upload-hint { margin: .35rem 0 0; }
.segmented.compact span { padding: .3rem .7rem; font-size: .85rem; }
#projectForm.dropping { outline: 2px dashed var(--accent); outline-offset: 6px; border-radius: var(--radius-m); }

/* ---------- Przełącznik widoku ---------- */
.view-switch { display: flex; border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; background: var(--surface); margin-right: .4rem; }
.view-switch a { padding: .4rem .75rem; font-size: .88rem; color: var(--ink); text-decoration: none; border-left: 1px solid var(--line); white-space: nowrap; }
.view-switch a:first-child { border-left: 0; }
.view-switch a:hover { background: var(--surface-2); }
.view-switch a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.day-nav { flex-wrap: wrap; }

/* ---------- Widok 3 dni / tygodnia ---------- */
.multi-opts { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.multi-opts .checkline { margin: 0; font-size: .9rem; }
.timeline.mtl { max-height: 74vh; overflow: auto; }
.mtl-row { display: grid; grid-template-columns: 58px repeat(var(--days), minmax(0, 1fr)); min-width: calc(58px + var(--days) * 96px); }
.mtl-week .mtl-row { grid-template-columns: 52px repeat(var(--days), minmax(0, 1fr)); min-width: calc(52px + var(--days) * 110px); }
.mtl-sticky { position: sticky; top: 0; z-index: 6; background: var(--surface); border-bottom: 1px solid var(--line); }
.mtl-gutter { position: sticky; left: 0; z-index: 3; background: var(--surface); }
.mtl-day {
  display: flex; align-items: baseline; justify-content: center; gap: .35rem; padding: .55rem .3rem;
  color: var(--ink); text-decoration: none; border-left: 1px solid var(--line);
}
.mtl-day:hover { background: var(--surface-2); }
.mtl-day .wd { font-size: .8rem; color: var(--muted); }
.mtl-day .dn { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.mtl-day.today .dn { color: var(--accent-ink); background: var(--accent); border-radius: 999px; min-width: 1.8em; text-align: center; }
.mtl-day.today .wd { color: var(--accent); font-weight: 600; }
.mtl-allday { border-top: 1px solid var(--line); }
.mtl-allday .mtl-gutter span { display: block; font-size: .72rem; color: var(--muted); text-align: right; padding: .45rem .4rem 0 0; line-height: 1.2; }
.mtl-cell { border-left: 1px solid var(--line); padding: .3rem; display: flex; flex-direction: column; gap: .25rem; min-width: 0; max-height: 8.5rem; overflow-y: auto; }
.mtl-cell .ad-chip { text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: .15rem .55rem; font-size: .8rem; }
.mtl-task {
  display: flex; align-items: center; gap: .35rem; min-width: 0; cursor: pointer;
  font-size: .82rem; padding: .15rem .4rem; border-radius: 4px;
  background: color-mix(in srgb, var(--c) 14%, var(--surface)); border-left: 3px solid var(--c);
}
.mtl-task span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mtl-task.done { opacity: .55; }
.mtl-task.done span { text-decoration: line-through; }
.mtl-body { position: relative; }
.mtl-hours { position: sticky; height: calc(var(--hour) * 24); }
.mtl-label { position: absolute; right: 8px; transform: translateY(-.6em); font-size: .76rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.mtl-col { position: relative; height: calc(var(--hour) * 24); border-left: 1px solid var(--line); min-width: 0; }
.mtl-col.we, .mtl-cell.we, .mtl-day.we { background: color-mix(in srgb, var(--ink) 3%, var(--surface)); }
.mtl-col.today { background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.mtl-col .tl-now { left: 0; }
.mtl-col .tl-event { padding: .2rem .35rem .2rem .45rem; font-size: .8rem; gap: .3rem; }
.mtl-col .tl-event .tl-meta { font-size: .72rem; }
.mtl-week .mtl-col .tl-join { display: none; }
@media (max-width: 1100px) { .mtl-col .tl-join { display: none; } }

/* ---------- Podprojekty ---------- */
#projectList .nav-item { padding-left: calc(.15rem + var(--depth, 0) * 1rem); gap: .35rem; }
.tree-toggle, .tree-toggle-space { width: 1.1rem; flex-shrink: 0; }
.tree-toggle {
  border: none; background: none; color: var(--muted); cursor: pointer; padding: 0; font-size: .8rem; line-height: 1;
  height: 1.4rem; border-radius: 4px; transition: transform .12s ease;
}
.tree-toggle:hover { color: var(--ink); background: var(--surface-2); }
.tree-toggle.collapsed { transform: rotate(-90deg); }
.nav-item.dragging { opacity: .45; }
.nav-item.drop-before { box-shadow: inset 0 2px 0 var(--accent); }
.nav-item.drop-after { box-shadow: inset 0 -2px 0 var(--accent); }
.nav-item.drop-inside { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; font-size: .88rem; color: var(--muted); margin-bottom: .5rem; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Podgląd dnia w oknie zadania ---------- */
.dialog.with-preview { width: min(940px, calc(100vw - 1.5rem)); }
.task-layout { display: block; }
.dialog.with-preview .task-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.4rem; align-items: start; }
.task-preview {
  border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface-2);
  padding: .75rem; display: flex; flex-direction: column; gap: .5rem; min-width: 0;
  position: sticky; top: 0;
}
.task-preview[hidden] { display: none; }
.tp-head { display: flex; flex-direction: column; gap: .1rem; }
.tp-head strong { font-size: .95rem; }
.tp-head strong::first-letter { text-transform: uppercase; }
.tp-head small { color: var(--muted); font-size: .8rem; }
.tp-status { font-size: .84rem; line-height: 1.4; padding: .45rem .6rem; border-radius: var(--radius-s); background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.tp-status.ok { color: var(--ink); border-color: color-mix(in srgb, #2f9e44 45%, var(--line)); background: color-mix(in srgb, #2f9e44 10%, var(--surface)); }
.tp-status.warn { color: var(--ink); border-color: color-mix(in srgb, var(--now) 55%, var(--line)); background: color-mix(in srgb, var(--now) 12%, var(--surface)); }
.tp-status .link-btn { color: var(--accent); font-weight: 600; text-decoration: underline; }
.tp-allday { display: flex; flex-wrap: wrap; gap: .3rem; }
.tp-allday:empty { display: none; }
.tp-allday .ad-chip { cursor: default; font-size: .78rem; padding: .15rem .55rem; }
.tp-untimed { font-size: .78rem; color: var(--muted); align-self: center; }
.tp-timeline { position: relative; height: 400px; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); }
.tp-inner { position: relative; height: calc(34px * 24); margin-left: 46px; border-left: 1px solid var(--line); }
.tp-inner .tl-hour { height: 34px; }
.tp-inner .tl-label { left: -46px; width: 40px; font-size: .72rem; }
.tp-inner .tl-slot { height: 17px; }
.tp-inner .tl-event { cursor: default; font-size: .76rem; padding: .1rem .4rem; }
.tp-inner .tl-event.meeting { padding-left: .4rem; }
.tp-draft {
  z-index: 3; border: 2px dashed var(--c) !important; border-left-width: 2px;
  background: color-mix(in srgb, var(--c) 28%, var(--surface)) !important; box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.tl-event.clash { outline: 2px solid var(--now); outline-offset: -1px; }
.tp-draft.clash { border-color: var(--now) !important; outline: none; }
.tp-hint { margin: 0; font-size: .76rem; }
@media (max-width: 760px) {
  /* Podgląd zaraz pod datą i godziną, przed priorytetem i opisem */
  .dialog.with-preview .task-layout { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .dialog.with-preview .task-fields { display: contents; }
  .dialog.with-preview .task-fields > :nth-child(n+5) { order: 2; }
  .task-preview { position: static; order: 1; margin-bottom: .9rem; }
  .tp-timeline { height: 260px; }
}

/* ---------- Ikona projektu przed tytułem ---------- */
.t-icon { display: inline-flex; align-items: center; justify-content: center; margin-right: .3em; flex-shrink: 0; vertical-align: -.1em; line-height: 1; }
.t-icon .picon { width: 1.1em; height: 1.1em; vertical-align: 0; }
.tl-event .tl-title .t-icon { font-size: .95em; }
.ad-chip .t-icon { margin-right: .25em; }
#evTitle .t-icon { margin-right: .35em; }
.cal-name .pchip { font-size: .78rem; font-weight: 500; margin-left: .35rem; vertical-align: 1px; }

/* ---------- Kolor projektu w drzewie ---------- */
#projectList .pdot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex-shrink: 0; box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 25%, transparent); }
#projectList .nav-item.active { background: color-mix(in srgb, var(--c) 16%, var(--surface)); color: var(--ink); box-shadow: inset 3px 0 0 var(--c); }
#projectList .nav-item.active .pname { font-weight: 600; }
#projectList .nav-item.drop-before { box-shadow: inset 0 2px 0 var(--accent); }
#projectList .nav-item.drop-after { box-shadow: inset 0 -2px 0 var(--accent); }
#projectList .nav-item.drop-inside { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }

/* ---------- Zadania z podprojektów: kafelek w kafelku ---------- */
.tl-event.nested {
  flex-direction: column; align-items: stretch; gap: .15rem; padding: .18rem .25rem .25rem .3rem;
  background: color-mix(in srgb, var(--c) 14%, var(--surface)); border-left: 4px solid var(--c);
}
.tl-event.nested:hover { background: color-mix(in srgb, var(--c) 22%, var(--surface)); }
.nest-root {
  display: flex; align-items: center; min-width: 0; flex-shrink: 0;
  font-size: .72rem; font-weight: 700; letter-spacing: .01em; line-height: 1.2;
  color: color-mix(in srgb, var(--c) 65%, var(--ink));
}
.nest-root .nr-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nest-root .t-icon { margin-right: .25em; }
.nest-inner {
  flex: 1; min-height: 0; display: flex; gap: .35rem; align-items: flex-start; overflow: hidden;
  background: color-mix(in srgb, var(--c2) 20%, var(--surface)); border-left: 3px solid var(--c2);
  border-radius: 4px; padding: .12rem .4rem .15rem;
}
.nest-desc {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  font-size: .74rem; color: var(--muted); margin-top: .15rem; white-space: pre-line;
}
/* Krótki blok: jedna linia — ikona projektu głównego + kafelek podprojektu */
.tl-event.nested.short { flex-direction: row; align-items: center; gap: .25rem; padding: .1rem .2rem .1rem .25rem; }
.tl-event.nested.short .nr-name { display: none; }
.tl-event.nested.short .nest-root .t-icon { margin: 0; }
.tl-event.nested.short .nest-inner { align-items: center; padding: 0 .35rem; height: 100%; }
.tl-event.nested.short .tl-meta { display: none; }
.root-badge {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  min-width: 1.35em; height: 1.35em; padding: 0 .15em; margin-right: .3em; border-radius: 4px; vertical-align: -.25em;
  background: color-mix(in srgb, var(--c) 30%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 60%, transparent);
  font-size: .85em; line-height: 1;
}
.root-badge .picon { width: 1em; height: 1em; vertical-align: 0; }
.mtl-task .root-badge { margin-right: 0; }
.pchip.root-chip { font-weight: 600; }

/* Kafelek podprojektu: ikona + nazwa, tytuł zadania, opis */
.nest-inner { padding: .15rem .45rem .2rem; }
.nest-inner .tl-body { display: flex; flex-direction: column; gap: .08rem; min-width: 0; }
.nest-sub {
  display: flex; align-items: center; min-width: 0; font-size: .72rem; font-weight: 600; line-height: 1.25;
  color: color-mix(in srgb, var(--c2) 70%, var(--ink));
}
.nest-sub .ns-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nest-sub .t-icon { margin-right: .3em; }
.nest-title { display: flex; align-items: center; gap: .35rem; min-width: 0; }
.nest-title .tl-title { min-width: 0; }
.nest-desc { margin-top: .05rem; }
.tl-event.nested.done .nest-title .tl-title { text-decoration: line-through; }
/* Krótki blok: bez nazwy podprojektu, ikona podprojektu przed tytułem */
.tl-event.nested.short .nest-sub .ns-name { display: none; }
.tl-event.nested.short .tl-body { flex-direction: row; align-items: center; gap: 0; }
.tl-event.nested:not(.short) { padding: .12rem .25rem .2rem .3rem; gap: .1rem; }
.tl-event.nested:not(.short) .nest-inner { padding: .1rem .45rem .12rem; }
.nest-inner .tl-body { gap: .04rem; }
.nest-desc { font-size: .72rem; line-height: 1.2; }

/* ---------- Podprojekty w widoku projektu ---------- */
.proj-actions { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; }
.own-title { margin-top: .4rem; }
.own-title .picon, .subs-title .picon { width: 1.1em; height: 1.1em; }
.subs-title { margin-top: 2rem; }
.sub-section {
  margin: 0 0 1rem calc(var(--depth, 0) * 1.2rem);
  border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: var(--radius-m);
  background: color-mix(in srgb, var(--c) 6%, var(--surface)); padding: .6rem .8rem .4rem;
}
.sub-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .3rem; }
.sub-title { display: flex; align-items: center; gap: .45rem; min-width: 0; flex: 1; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1rem; }
.sub-title:hover .sub-name { text-decoration: underline; }
.sub-icon { width: 1.6rem; height: 1.6rem; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; background: color-mix(in srgb, var(--c) 22%, var(--surface)); flex-shrink: 0; overflow: hidden; }
.sub-icon .picon { width: 100%; height: 100%; }
.sub-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub-name small { color: var(--muted); font-weight: 500; }
.sub-stats { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.sub-stats .late { color: var(--now); font-weight: 600; }
.sub-empty { color: var(--muted); font-size: .88rem; padding: .3rem 0 .5rem; }
.sub-section .task-list { margin-bottom: .2rem; }
@media (max-width: 640px) { .sub-section { margin-left: calc(var(--depth, 0) * .6rem); } }

/* ---------- Kalendarz firmowy przez skrypt Google ---------- */
.push-block { margin-bottom: .9rem; }
.push-block .hint { margin: 0 0 .6rem; }
.steps.compact { margin: 0 0 .6rem; padding-left: 1.2rem; font-size: .88rem; line-height: 1.45; }
.steps.compact li { margin-bottom: .25rem; }
.code-box {
  width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .74rem; line-height: 1.4;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); border-radius: var(--radius-s);
  padding: .5rem .6rem; resize: vertical; white-space: pre; overflow: auto;
}
.push-actions { display: flex; align-items: center; gap: .8rem; margin: .5rem 0 .6rem; flex-wrap: wrap; }
.push-actions .link-btn { color: var(--muted); text-decoration: underline; }
.cal-badge { font-size: .75rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: .15rem .55rem; white-space: nowrap; }

/* ---------- Przełącznik motywu ---------- */
.theme-row { cursor: pointer; }
.theme-row .switch { margin-left: auto; }
.theme-auto { font-size: .8rem; padding: .1rem .6rem .3rem 2.6rem; text-align: left; }
