/* DevDesk — style (bez zewnętrznych zależności; fonty systemowe, IBM Plex jeśli zainstalowany) */
:root {
  --ground: #F2F2EE; --surface: #FFFFFF; --ink: #15181C; --ink-2: #33383E; --muted: #565D66; --faint: #8C9198;
  --line: #DCDDD7; --line-2: #ECEDE8; --line-3: #C4C6C0; --soft: #F7F7F4;
  --side: #15181C; --side-2: #2B3038; --side-ink: #C9CCD0;
  --accent: #1F55B8; --accent-ink: #163F8A; --sel: #EEF3FC;
  --crit: #B42318; --crit-ink: #8E1B12; --crit-bg: #FBE4E1;
  --warn: #C9701A; --warn-ink: #6B3D00; --warn-bg: #FBEBD3;
  --ok-ink: #1F5C38; --ok-bg: #E3F1E8;
  --font: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", "Cascadia Mono", Consolas, ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ground); color: var(--ink); font: 15px/1.45 var(--font); }
a { color: var(--accent); } a:hover { color: var(--accent-ink); }
h1 { margin: 6px 0 0; font-size: 28px; font-weight: 600; letter-spacing: -0.01em; }
h2 { margin: 0; font-size: 17px; font-weight: 600; }
h3 { margin: 0; font-size: 15px; font-weight: 600; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); } .small { font-size: 13px; } .xs { font-size: 12px; }
.sr { position: absolute; left: -9999px; }

/* układ */
.app { display: flex; flex-wrap: wrap; min-height: 100vh; }
.side { flex: 1 1 232px; max-width: 100%; background: var(--side); padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; }
.main { flex: 999 1 560px; min-width: 0; padding: 28px 32px 48px; display: flex; flex-direction: column; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; color: #fff; font-weight: 600; font-size: 16px; text-decoration: none; }
.brand { font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.brand .logo { width: 32px; height: 32px; display: block; flex: none; }
.brand .brand-dev { font-weight: 400; color: var(--side-ink); }
.nav { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 12px; border-radius: 6px; color: var(--side-ink); text-decoration: none; font-size: 14px; }
.nav:hover { background: #262A30; color: #fff; }
.nav.on { background: var(--side-2); color: #fff; }
.nav .badge { margin-left: auto; font: 11px var(--mono); color: var(--faint); }
.nav .dot { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.nav-sec { color: var(--faint); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; padding: 20px 12px 6px; }
.nav-foot { margin-top: auto; padding-top: 20px; display: flex; flex-direction: column; gap: 4px; }
.live { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #3FB86B; margin-left: auto; box-shadow: 0 0 0 3px rgba(63,184,107,.25); }
.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.head .sub { font: 13px var(--mono); color: var(--muted); }
.row { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.col-2 { flex: 2 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.col-1 { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.grid-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }

/* karty, przyciski, chipy */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px 22px; }
.card.flush { padding: 0; overflow-x: auto; }
.card.strong { border: 2px solid var(--ink); }
.card.edit { border: 2px solid var(--accent); }
.card-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 6px; font: 500 14px var(--font); cursor: pointer; text-decoration: none; border: 1px solid var(--line-3); background: var(--surface); color: var(--ink); }
.btn:hover { border-color: var(--ink-2); color: var(--ink); }
.btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.primary:hover { background: #000; color: #fff; }
.btn.danger { color: var(--crit-ink); border-color: #E4B4AE; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn.link { border: 0; background: none; color: var(--accent); padding: 0; min-height: 36px; }
.btn.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.side-btn { background: var(--side-2); color: #fff; border: 0; justify-content: space-between; margin-bottom: 12px; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: 4px; font-size: 12px; font-weight: 500; white-space: nowrap; background: var(--line-2); color: var(--ink-2); }
.st-backlog { background: var(--ground); color: var(--muted); }
.st-plan { background: var(--line-2); color: var(--ink-2); }
.st-wtoku { background: var(--ink); color: #fff; }
.st-zablokowane { background: var(--crit-bg); color: var(--crit-ink); }
.st-zrobione { background: var(--ok-bg); color: var(--ok-ink); }
.pr-niski { background: var(--ground); color: var(--muted); }
.pr-sredni { background: var(--line-2); color: var(--ink-2); }
.pr-wysoki { background: var(--warn-bg); color: var(--warn-ink); }
.pr-pilny { background: var(--crit-bg); color: var(--crit-ink); }
.k-overtime { background: var(--warn-bg); color: var(--warn-ink); }
.k-regular { background: var(--line-2); color: var(--ink-2); }
.src-auto { background: #E3EBFA; color: #1D4690; }
.src-manual, .src-edited { background: #F0E6F7; color: #5E2F7D; }
.swatch { width: 12px; height: 12px; border-radius: 3px; flex: none; display: inline-block; }
.flash { padding: 12px 16px; border-radius: 8px; font-size: 14px; }
.flash.ok { background: var(--ok-bg); color: var(--ok-ink); }
.flash.error { background: var(--crit-bg); color: var(--crit-ink); }
.empty { padding: 20px; color: var(--muted); font-size: 14px; }

/* formularze */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
input[type=text], input[type=date], input[type=time], input[type=number], input[type=password], input:not([type]), select, textarea {
  min-height: 44px; max-width: 100%; border: 1px solid var(--line-3); border-radius: 6px; padding: 0 10px; font: 14px var(--font); color: var(--ink); background: var(--surface); width: 100%; }
textarea { padding: 10px; min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.check { display: flex; align-items: center; gap: 12px; min-height: 46px; border-top: 1px solid var(--line-2); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); flex: none; }
.check .done { color: var(--faint); text-decoration: line-through; }
.kv { display: flex; justify-content: space-between; gap: 12px; min-height: 42px; align-items: center; border-top: 1px solid var(--line-2); font-size: 14px; }
.kv > span:first-child { color: var(--muted); }
.saved { font-size: 12px; color: var(--ok-ink); opacity: 0; transition: opacity .2s; }
.saved.show { opacity: 1; }
.saved.err { color: var(--crit-ink); }

/* tabele */
table { width: 100%; border-collapse: collapse; }
th { font-weight: 500; font-size: 12px; color: var(--muted); text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--soft); white-space: nowrap; }
td { padding: 6px 12px; height: 50px; border-bottom: 1px solid var(--line-2); font-size: 14px; }
tr.sel td { background: var(--sel); }
td .tlink { color: var(--ink); text-decoration: none; display: block; padding: 6px 0; }
td .tlink:hover { color: var(--accent); }
.nowrap { white-space: nowrap; }
.late { color: var(--crit-ink); font-weight: 500; }
.bar { height: 5px; background: var(--line-2); border-radius: 3px; margin-top: 4px; }
.bar > div { height: 5px; border-radius: 3px; }
.bar.over > div { background: var(--crit) !important; }

/* Dziś */
.focus-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: flex-start; }
.focus-title { font-size: 22px; font-weight: 600; color: var(--ink); text-decoration: none; }
.clock { font: 500 32px var(--mono); }
.hours-bar { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; padding: 10px 12px; border-radius: 6px; font-size: 13px; background: var(--ground); color: var(--ink-2); }
.hours-bar.ot { background: var(--warn-bg); color: var(--warn-ink); }
.reminder { display: none; padding: 12px 16px; border-radius: 8px; background: var(--warn-bg); color: var(--warn-ink); font-size: 14px; align-items: center; gap: 12px; flex-wrap: wrap; }
.reminder.show { display: flex; }
.stats-line { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.stats-line strong { font: 500 13px var(--mono); color: var(--ink); }
.toggle { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; font-size: 14px; }
.toggle input { width: 18px; height: 18px; accent-color: var(--warn); }
.pcard { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--ink); }
.pcard:hover { border-color: var(--ink-2); }

/* Projekty */
.plist { flex: 1 1 210px; min-width: 0; padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.prow { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.prow:hover { background: var(--ground); color: var(--ink); }
.prow.on { background: var(--line-2); }
.prow .meta { font: 12px var(--mono); color: var(--muted); }
.pstats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.pstat { background: var(--soft); border-radius: 8px; padding: 10px 12px; }
.pstat .v { font: 500 20px var(--mono); }
.pstat.ot { background: var(--warn-bg); color: var(--warn-ink); }
.colors { display: flex; gap: 8px; flex-wrap: wrap; }
.colors label { cursor: pointer; }
.colors input { position: absolute; opacity: 0; }
.colors span { display: block; width: 32px; height: 32px; border-radius: 6px; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line-3); }
.colors input:checked + span { border-color: var(--ink); }
.colors input:focus-visible + span { outline: 2px solid var(--accent); }

/* Roadmapa */
.gantt { min-width: 1040px; }
.g-head { display: flex; border-bottom: 1px solid var(--line); background: var(--soft); }
.g-label { flex: 0 0 360px; padding: 0 16px; display: flex; align-items: center; gap: 10px; min-width: 0; }
.g-time { flex: 1; position: relative; border-left: 1px solid var(--line); }
.g-months { display: flex; }
.g-months div { padding: 6px 10px; font-size: 13px; font-weight: 600; border-right: 1px solid var(--line); }
.g-weeks { display: flex; border-top: 1px solid var(--line-2); }
.g-weeks div { flex: 1; text-align: center; font: 11px var(--mono); color: var(--muted); padding: 6px 0; border-right: 1px solid var(--line-2); }
.g-weeks div.now { color: var(--crit-ink); font-weight: 500; }
.g-group { display: flex; align-items: center; gap: 10px; padding: 14px 16px 8px; font-weight: 600; font-size: 14px; border-top: 1px solid var(--line-2); }
.g-row { display: flex; min-height: 44px; }
.g-row .g-time { overflow: visible; }
.g-row .g-label { padding-left: 36px; }
.g-row .g-label a { color: var(--ink); text-decoration: none; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.g-row .g-label a:hover { color: var(--accent); }
.g-grid { background-image: linear-gradient(to right, var(--line-2) 1px, transparent 1px); }
.g-bar { position: absolute; top: 11px; height: 22px; border-radius: 4px; display: block; cursor: grab; touch-action: none; user-select: none; }
.g-bar:hover, .g-bar:focus-visible { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink-2); outline: none; z-index: 3; }
.g-bar.dragging { cursor: grabbing; z-index: 4; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); opacity: .9; }
.g-bar.saving { opacity: .6; }
.g-h { position: absolute; top: -2px; bottom: -2px; width: 10px; cursor: ew-resize; }
.g-h.l { left: -3px; } .g-h.r { right: -3px; }
.g-h::after { content: ""; position: absolute; top: 6px; bottom: 6px; left: 4px; width: 2px; border-radius: 1px; background: rgba(255,255,255,.75); opacity: 0; }
.g-bar:hover .g-h::after, .g-bar.dragging .g-h::after { opacity: 1; }
.g-tip { position: absolute; bottom: calc(100% + 6px); left: 0; white-space: nowrap; background: var(--ink); color: #fff; font: 12px var(--mono); padding: 3px 7px; border-radius: 4px; pointer-events: none; display: none; }
.g-bar.dragging .g-tip, .g-bar:hover .g-tip, .g-bar:focus-visible .g-tip { display: block; }
.g-bar.done { opacity: .35; }
.g-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--crit); pointer-events: none; }
.load { display: grid; gap: 6px; align-items: end; height: 150px; margin-top: 18px; border-bottom: 1px solid var(--line-3); }
.load > div { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; }
.load .b { width: 100%; border-radius: 3px 3px 0 0; background: #5A6169; }
.load .b.hot { background: var(--warn); }

/* Czas pracy */
.days { position: relative; height: 190px; margin-top: 18px; border-bottom: 1px solid var(--line-3); }
.days .norm { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--faint); }
.days .norm span { position: absolute; right: 0; top: -16px; font: 11px var(--mono); color: var(--muted); }
.days .cols { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 14px; align-items: end; padding-right: 28px; }
.days .col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.days .reg { width: 100%; max-width: 56px; background: #3A4048; }
.days .ot { width: 100%; max-width: 56px; background: var(--warn); border-radius: 3px 3px 0 0; }
.days .reg.top { border-radius: 3px 3px 0 0; }
.day-labels { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 14px; padding: 6px 28px 0 0; font-size: 12px; color: var(--muted); text-align: center; }
.day-labels .today { color: var(--ink); font-weight: 600; }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 2px; display: inline-block; }
.preview { font-size: 13px; padding: 10px 12px; border-radius: 6px; background: var(--ground); color: var(--ink-2); }
.preview.warn { background: var(--warn-bg); color: var(--warn-ink); }
.preview.err { background: var(--crit-bg); color: var(--crit-ink); }
.daychecks { display: flex; gap: 6px; flex-wrap: wrap; }
.daychecks label { display: inline-flex; align-items: center; gap: 4px; padding: 0 10px; min-height: 36px; border: 1px solid var(--line-3); border-radius: 6px; font-size: 13px; color: var(--ink); cursor: pointer; }

@media (max-width: 700px) {
  .main { padding: 20px 16px 40px; }
  .side .proj-link, .side .nav-sec, .side .nav-foot { display: none; }
  .clock { font-size: 26px; }
  .form-grid { grid-template-columns: 1fr; }
  .side { padding: 12px; }
}

.task-cell { display: flex; gap: 8px; align-items: baseline; min-width: 200px; }
.task-cell .swatch { flex: none; transform: translateY(1px); }

.timer-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--line-2); }
.timer-row:first-of-type { border-top: 0; }
.timer-row .clock { font-size: 28px; }

.bulkbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 14px; border-radius: 10px; background: var(--ink); color: #fff; }
.bulkbar select { min-height: 36px; }
.bulkbar .btn.link { color: #C9CCD0; }
.bulkbar[hidden] { display: none; }
.grip { display: inline-flex; color: var(--faint); cursor: grab; vertical-align: middle; margin-right: 8px; padding: 4px 2px; }
tr[draggable="true"]:hover .grip { color: var(--ink-2); }
tr.dragging td { opacity: .45; }
.prow.drop-ok { background: var(--sel); box-shadow: inset 0 0 0 2px var(--accent); }
.bulkbar .btn.primary { background: #fff; color: var(--ink); border-color: #fff; }
.bulkbar .btn:not(.primary):not(.link) { background: transparent; color: #fff; border-color: #5A6169; }
.bulkbar .btn.danger { color: #F4B4AC; border-color: #8E1B12; }

.newtask-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.newtask.disabled-dates [data-new-start], .newtask.disabled-dates [data-new-due] { opacity: .45; }
tr.just-created td { animation: flashrow 2.4s ease-out 1; }
@keyframes flashrow { 0% { background: #DDEBD9; } 100% { background: var(--sel); } }
.flash a { margin-left: 8px; font-weight: 500; }

/* Roadmapa — przełącznik widoków (kwartał / miesiąc / tydzień / dzień) */
.seg { display: inline-flex; border: 1px solid var(--line-3); border-radius: 8px; overflow: hidden; background: var(--surface); }
.seg a { min-height: 36px; padding: 0 16px; display: flex; align-items: center; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 13px; border-left: 1px solid var(--line); }
.seg a:first-child { border-left: 0; }
.seg a:hover { background: var(--soft); color: var(--ink); }
.seg a.on { background: var(--ink); color: #fff; }
.h1-note { font-weight: 400; color: var(--muted); font-size: 20px; }
.g-months a { padding: 6px 10px; font-size: 13px; font-weight: 600; border-right: 1px solid var(--line); color: var(--ink); text-decoration: none; min-width: 0; overflow: hidden; white-space: nowrap; }
.g-months a:hover { background: var(--surface); color: var(--accent); }
.g-weeks a { flex: 1; min-width: 0; text-align: center; font: 11px var(--mono); color: var(--muted); padding: 6px 0; border-right: 1px solid var(--line-2); text-decoration: none; line-height: 1.3; }
.g-weeks a:hover { background: var(--surface); color: var(--accent); }
.g-weeks a.now { color: var(--crit-ink); font-weight: 600; }
.g-weeks a.we { background: var(--ground); }
.g-weeks .wd { display: block; font-family: var(--font); font-size: 10px; }
.g-weeks a.g-day { display: flex; flex-direction: column; gap: 3px; padding: 8px 8px; text-align: left; font-family: var(--font); font-size: 12px; color: var(--ink); }
.g-weeks a.g-day .cap { font: 11px var(--mono); color: var(--muted); }
.g-weeks a.g-day.now { background: var(--sel); box-shadow: inset 0 -3px 0 var(--accent); color: var(--ink); font-weight: 400; }
.capbar { display: block; height: 5px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.capbar span { display: block; height: 5px; background: var(--accent); }
.capbar span.past { background: #5A6169; }
.g-bar.cut-l { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.g-bar.cut-r { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.g-in { position: absolute; left: 8px; right: 8px; top: 0; bottom: 0; display: flex; align-items: center; color: #fff; font: 11px var(--mono); white-space: nowrap; overflow: hidden; pointer-events: none; }
.weekplan { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); min-width: 900px; }
.wp-day { display: flex; flex-direction: column; gap: 6px; min-height: 220px; padding: 12px 10px; border-left: 1px solid var(--line-2); }
.wp-day:first-child { border-left: 0; }
.wp-day.now { background: var(--sel); }
.wp-day.we { background: var(--soft); }
.wp-h { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; font-size: 12px; }
.wp-h .plan { color: var(--accent); }
.wp-blk { display: flex; flex-direction: column; padding: 6px 8px; border-radius: 5px; font-size: 12px; line-height: 1.3; background: var(--c); color: #fff; }
.wp-blk.past { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--c); }

/* Roadmapa — widok dnia */
.dayplan { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.day-tasks { flex: 0 1 310px; min-width: 260px; display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.day-axis { flex: 1 1 560px; min-width: 0; padding: 14px 16px 18px; max-height: calc(100vh - 160px); overflow-y: auto; }
.day-side { flex: 0 1 270px; min-width: 240px; display: flex; flex-direction: column; gap: 20px; }
.btn[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.dt-group { display: flex; flex-direction: column; gap: 6px; }
.dt-gh { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 40px; padding: 0 8px; border: 0; border-radius: 6px; background: var(--soft); color: var(--ink-2); font: 600 12px var(--font); text-transform: uppercase; letter-spacing: .04em; cursor: pointer; }
.dt-gh:hover { background: var(--line-2); color: var(--ink); }
.dt-gh:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.dt-gh .chev { flex: none; transition: transform .15s; }
.dt-gh[aria-expanded="true"] .chev { transform: rotate(90deg); }
.dt-name { flex: 0 0 auto; max-width: 62%; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dt-meta { margin-left: auto; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-transform: none; letter-spacing: 0; font-weight: 400; }
.dt-list { display: flex; flex-direction: column; gap: 6px; }
.dt-list[hidden], .dt-task[hidden], .dt-group[hidden] { display: none; }
.dt-task { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: grab; }
.dt-task:hover { border-color: var(--ink-2); }
.dt-task.dragging { opacity: .5; }
.dt-task .grip { color: var(--faint); flex: none; }
.dt-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.dt-body a { color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 500; line-height: 1.3; }
.dt-body a:hover { color: var(--accent); }
.dt-info { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dt-info .chip { height: 20px; font-size: 11px; padding: 0 7px; }
.dt-info .late { color: var(--crit-ink); }
.dt-info .plan { color: var(--accent); }
.ax-heads { display: flex; font-size: 12px; padding-bottom: 8px; }
.ax-hcol { width: 56px; flex: none; }
.ax-lhead { flex: 2 1 0; min-width: 180px; padding-left: 8px; }
.ax-dhead { flex: 3 1 0; min-width: 240px; padding-left: 8px; }
.ax { display: flex; position: relative; }
.ax-hours { width: 56px; flex: none; position: relative; }
.ax-h { position: absolute; right: 8px; font: 11px var(--mono); color: var(--faint); }
.ax-h.work { color: var(--ink-2); }
.ax-h.now { right: 4px; color: #fff; background: var(--crit); border-radius: 3px; padding: 0 3px; font-weight: 600; z-index: 3; }
.ax-lane { flex: 2 1 0; min-width: 180px; position: relative; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.ax-done { flex: 3 1 0; min-width: 240px; position: relative; border-right: 1px solid var(--line); }
.ax-zone { position: absolute; left: 0; right: 0; background: var(--ground); pointer-events: none; }
.ax-zone.ot { background: var(--warn-bg); }
.ax-zone span { position: absolute; right: 8px; top: 2px; font-size: 11px; color: var(--muted); }
.ax-zone.ot span { color: var(--warn-ink); }
.ax-line { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); pointer-events: none; }
.ax-line.half { border-top: 1px dashed var(--line-2); }
.ax-end { position: absolute; left: 0; right: 0; border-top: 2px solid var(--warn); pointer-events: none; }
.ax-now { position: absolute; left: 0; right: 0; border-top: 2px solid var(--crit); pointer-events: none; z-index: 4; }
.ax-entry { position: absolute; display: flex; flex-direction: column; padding: 3px 7px; border-radius: 6px; background: var(--surface); box-shadow: inset 0 0 0 2px var(--c); font-size: 12px; line-height: 1.25; overflow: hidden; box-sizing: border-box; z-index: 1; }
.ax-entry .t { font-weight: 500; }
.ax-entry.running { border-bottom: 4px solid #3FB86B; }
.blk { position: absolute; display: flex; flex-direction: column; align-items: flex-start; padding: 4px 8px; border: 0; border-radius: 6px; color: #fff; font: inherit; text-align: left; overflow: hidden; cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; z-index: 3; box-sizing: border-box; }
.blk .bt { font-size: 11px; opacity: .92; white-space: nowrap; }
.blk .bn { font-size: 13px; font-weight: 500; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.blk.short { flex-direction: row; align-items: center; gap: 8px; padding-top: 0; padding-bottom: 0; }
.blk.sel { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); z-index: 5; }
.blk:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.blk.dragging { cursor: grabbing; opacity: .9; z-index: 6; }
.blk-rs { position: absolute; left: 0; right: 0; bottom: 0; height: 8px; cursor: ns-resize; }
.blk-rs::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 24px; margin-left: -12px; height: 2px; border-radius: 1px; background: rgba(255,255,255,.7); opacity: 0; }
.blk:hover .blk-rs::after, .blk.sel .blk-rs::after { opacity: 1; }
.ax-ghost { position: absolute; left: 6px; right: 6px; border: 2px dashed var(--accent); border-radius: 6px; background: rgba(31,85,184,.10); z-index: 6; pointer-events: none; padding: 4px 8px; box-sizing: border-box; font-size: 12px; color: var(--accent-ink); }
.ax-ghost[hidden] { display: none; }
.sum-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 10px 0; }
.sum-grid div { display: flex; flex-direction: column; background: var(--soft); border-radius: 6px; padding: 8px 10px; font-size: 13px; }
.sum-grid span { font-size: 12px; color: var(--muted); }
.sum-grid .ot { background: var(--warn-bg); }
.sum-grid .ot span, .sum-grid .ot b { color: var(--warn-ink); }
.sum-grid b { font-weight: 500; }
.sel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
[data-sel][hidden] { display: none !important; }
.dt-acts { display: flex; flex-direction: column; align-items: stretch; gap: 2px; flex: none; }
.dt-acts .btn.link { min-height: 26px; justify-content: center; font-size: 12px; }
input[type=search][data-dt-search] { min-height: 40px; }
.dt-task.hit { border-color: var(--accent); background: var(--sel); }
.dt-more { display: flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 8px; border: 1px dashed var(--line-3); border-radius: 8px; background: none; color: var(--accent); font: 500 13px var(--font); cursor: pointer; text-align: left; }
.dt-more:hover { border-color: var(--accent); background: var(--sel); }
.dt-more .chev { flex: none; transition: transform .15s; }
.dt-more[aria-expanded="true"] .chev { transform: rotate(180deg); }
.dt-others { display: flex; flex-direction: column; gap: 6px; padding-left: 10px; border-left: 2px solid var(--line-2); }
.dt-others[hidden] { display: none; }
.dt-empty { padding: 2px 4px; }
.auto-tag { display: inline-block; margin-top: 2px; font: 600 10px var(--mono); background: rgba(255,255,255,.22); border-radius: 3px; padding: 1px 5px; white-space: nowrap; }
.blk.short .auto-tag { margin-top: 0; }
.auto-row { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; cursor: pointer; }
.auto-row input { margin-top: 3px; }
.dlg { border: 0; border-radius: 12px; padding: 22px 24px; max-width: 440px; width: calc(100% - 32px); box-shadow: 0 20px 60px rgba(0,0,0,.25); color: var(--ink); font-family: var(--font); }
.dlg::backdrop { background: rgba(21,24,28,.45); }
.dlg h2 { font-size: 18px; }
.ax-entry .mono { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ax-entry .t { overflow: hidden; text-overflow: ellipsis; }
.ax-entry.narrow { padding: 3px 5px; font-size: 11px; }
.ax-entry.narrow .mono { white-space: normal; font-size: 10px; }

/* Dziś — nowy pulpit */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.kpi { display: flex; flex-direction: column; gap: 6px; padding: 14px 18px; }
.kpi .k-l { font-size: 12px; color: var(--muted); }
.kpi .k-v { font: 500 24px var(--mono); }
.kpi .k-v small { font-size: 13px; color: var(--muted); }
.kpi .bar { margin-top: 2px; height: 6px; } .kpi .bar > div { height: 6px; }
.kpi.ot { background: var(--warn-bg); border-color: #F0D3A8; }
.kpi.ot, .kpi.ot .k-l { color: var(--warn-ink); }
.hero { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; padding: 22px 26px; }
.hero-main { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.hero-title { font-size: 24px; font-weight: 600; line-height: 1.25; color: var(--ink); text-decoration: none; }
.hero-title:hover { color: var(--accent); }
.plan-row, .att-row { display: flex; align-items: center; gap: 12px; min-height: 46px; border-top: 1px solid var(--line-2); font-size: 14px; }
.plan-row .mono { width: 104px; flex: none; font-size: 13px; }
.plan-row.gap { color: var(--faint); font-style: italic; }
.pr-sw { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.pr-t { flex: 1; min-width: 0; color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.pr-t:hover { color: var(--accent); }
.plan-row.gap .pr-t { color: var(--faint); }
.auto-pill { font: 11px var(--mono); color: var(--accent-ink); background: var(--sel); border-radius: 3px; padding: 1px 6px; }
.att-row .mono { width: 140px; flex: none; white-space: nowrap; }
.icon-btn { width: 36px; padding: 0; }
.next-card { background: var(--sel); border-color: #C9D7F2; display: flex; flex-direction: column; gap: 10px; }
.next-card .card-h { margin-bottom: 0; }
.next-title { font-size: 18px; font-weight: 600; line-height: 1.3; color: var(--ink); text-decoration: none; }
.strip { display: flex; gap: 10px; }
.st-labels { width: 72px; flex: none; display: flex; flex-direction: column; gap: 0; font-size: 12px; color: var(--muted); }
.st-labels span { display: flex; align-items: center; }
.st-labels span:last-child { margin-top: 8px; }
.st-body { flex: 1; min-width: 0; position: relative; }
.st-hours { position: relative; height: 20px; }
.st-hours span { position: absolute; transform: translateX(-50%); font-size: 11px; color: var(--faint); }
.st-hours span.work { color: var(--ink-2); }
.st-lane { position: relative; border-radius: 6px; background: var(--soft); }
.st-ot { position: absolute; top: 0; bottom: 0; background: var(--warn-bg); }
.st-blk { position: absolute; top: 4px; bottom: 4px; border-radius: 4px; color: #fff; font-size: 11px; font-weight: 500; padding: 0 6px; display: flex; align-items: center; gap: 6px; overflow: hidden; box-sizing: border-box; border: 1px solid var(--surface); }
.st-blk span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-blk i { font: normal 10px var(--mono); background: rgba(255,255,255,.25); border-radius: 3px; padding: 0 4px; flex: none; }
.st-blk.past { opacity: .45; }
.st-done { position: absolute; height: 18px; border-radius: 4px; background: var(--surface); box-shadow: inset 0 0 0 2px var(--c); }
.st-done.running { box-shadow: inset 0 0 0 2px var(--c), inset 0 -4px 0 #3FB86B; }
.st-now { position: absolute; top: 20px; bottom: 0; width: 2px; background: var(--crit); pointer-events: none; }
.st-now span { position: absolute; top: -2px; left: 4px; font-size: 10px; font-weight: 600; color: #fff; background: var(--crit); border-radius: 3px; padding: 0 3px; }
.kv0 { display: flex; justify-content: space-between; gap: 8px; }
.wk-bars { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; align-items: end; height: 80px; margin-top: 8px; border-bottom: 1px solid var(--line-3); }
.wk-col { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; }
.wk-w { background: #5A6169; border-radius: 3px 3px 0 0; }
.wk-p { background: #C9D7F2; border-radius: 3px 3px 0 0; }
.wk-lab { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; font-size: 11px; color: var(--muted); text-align: center; margin-top: 4px; }
.wk-lab .on { color: var(--ink); font-weight: 600; }
.dt-more[hidden], .dt-empty[hidden], .dt-group[hidden] { display: none; }

/* Przełącznik Work / Private */
.brand-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 0 18px; flex-wrap: wrap; }
.brand-row .brand { padding: 4px 8px; }
.space-switch { display: inline-flex; border: 1px solid #3A4048; border-radius: 7px; overflow: hidden; background: #1E2228; }
.space-switch button { position: relative; min-height: 30px; padding: 0 9px; border: 0; background: none; color: #A3A8AE; font: 600 11px var(--font); letter-spacing: .02em; cursor: pointer; }
.space-switch button:hover { color: #fff; }
.space-switch button.on { background: #fff; color: var(--ink); }
.space-switch button:focus-visible { outline: 2px solid #8FB3F5; outline-offset: -2px; }
.sp-dot { position: absolute; top: 4px; right: 3px; width: 6px; height: 6px; border-radius: 50%; background: #3FB86B; }
/* tryb Private: inny kolor menu, żeby było jasne, gdzie jesteś */
body.space-private { --side: #1D1A2B; --side-2: #372F55; --accent: #6A4BC4; --accent-ink: #4B3299; --sel: #F1EEFB; }
body.space-private .side { background: var(--side); }
body.space-private .space-switch { border-color: #4A4170; background: #262138; }
body.space-private .space-switch button.on { background: #CDBEFF; color: #1D1A2B; }
body.space-private .main { box-shadow: inset 0 4px 0 #6A4BC4; }

/* Logowanie / zakładanie konta */
.auth-page { min-height: 100vh; background: var(--side); background-image: radial-gradient(circle at 20% 10%, #2B3038 0, transparent 45%); }
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; box-sizing: border-box; }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border-radius: 14px; padding: 28px 28px 24px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 24px 60px rgba(0,0,0,.35); box-sizing: border-box; }
.auth-card h1 { font-size: 22px; margin: 0; }
.auth-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; }
.auth-brand .brand-dev { font-weight: 400; color: var(--muted); }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 46px; }
.pw-eye { position: absolute; right: 2px; top: 2px; bottom: 2px; width: 42px; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 6px; }
.pw-eye:hover, .pw-eye[aria-pressed="true"] { color: var(--ink); }
.auth-card code { font: 12px var(--mono); background: var(--ground); padding: 1px 4px; border-radius: 3px; }

/* --- wspólne projekty --------------------------------------------------------------- */
.av { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%;
  color: #fff; font: 600 11px var(--font); flex: none; }
.av.sm { width: 22px; height: 22px; font-size: 10px; }
.av.lg { width: 36px; height: 36px; font-size: 15px; }
.av-stack { display: inline-flex; align-items: center; }
.av-stack .av { border: 2px solid var(--surface); margin-left: -7px; width: 30px; height: 30px; font-size: 13px; }
.av-stack .av:first-child { margin-left: 0; }
.av-stack.sm .av { width: 24px; height: 24px; font-size: 10px; margin-left: -5px; }
.av-stack.sm .av:first-child { margin-left: 0; }
.share-ic { flex: none; color: #8FB3F5; margin-left: 6px; }
.prow .share-ic { color: var(--accent); }
.chip.shared-chip { background: #E7EEFB; color: #1F4A99; }
.chip.owner-chip { background: var(--ink); color: #fff; }
.chip.pending-chip { background: var(--warn-bg); color: var(--warn-ink); }
.btn.pill { border-radius: 16px; }
.who-sep { width: 1px; height: 24px; background: var(--line); margin: 0 4px; }
.share-panel { display: flex; flex-direction: column; gap: 14px; border-color: #BFD1F3; }
.member-list { list-style: none; margin: 0; padding: 0; }
.member-list li { display: flex; align-items: center; gap: 12px; min-height: 56px; border-top: 1px solid var(--line-2); }
.share-rules { background: var(--soft); border-radius: 8px; padding: 10px 14px; font-size: 13px; }
.share-rules ul { margin: 4px 0 0; padding-left: 18px; }
.assign-box { display: flex; flex-direction: column; gap: 4px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.assign-opt { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px; border: 1px solid var(--line-2);
  border-radius: 8px; cursor: pointer; font-size: 14px; }
.assign-opt input { width: 18px; height: 18px; accent-color: var(--ink); }
.assign-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.assign-pill { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px 0 4px; border-radius: 16px;
  border: 1px dashed var(--line-3); font-size: 13px; cursor: pointer; background: var(--surface); }
.assign-pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.assign-pill.on, .assign-pill:has(input:checked) { border-style: solid; border-color: var(--ink); background: var(--soft); font-weight: 500; }
.assign-pill:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.act-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.act-list li { display: flex; gap: 8px; align-items: flex-start; }
.invite-banner { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: #E7EEFB; border: 1px solid #BFD1F3;
  border-radius: 10px; font-size: 14px; }
.invite-card { max-width: 620px; display: flex; flex-direction: column; gap: 18px; }
.space-pick { border: 0; margin: 0; padding: 0; display: flex; gap: 10px; flex-wrap: wrap; }
.space-pick legend { font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.space-opt { flex: 1 1 220px; display: flex; gap: 10px; padding: 14px; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; }
.space-opt span { display: flex; flex-direction: column; gap: 4px; }
.space-opt b { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.space-opt .dot { width: 12px; height: 12px; border-radius: 4px; }
.space-opt input { accent-color: var(--ink); width: 18px; height: 18px; margin: 2px 0 0; }
.space-opt.work:has(input:checked) { border-color: var(--ink); background: #FFF8E6; }
.space-opt.private:has(input:checked) { border-color: #6A4BC4; background: #F1EEFB; }
.my-group-h { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--soft); border-bottom: 1px solid var(--line-2); }
.my-group-h a { color: var(--ink); text-decoration: none; }
.my-row { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 4px 16px; border-bottom: 1px solid var(--line-2); }
.my-row:last-child { border-bottom: 0; }
.my-title { flex: 1; min-width: 0; color: var(--ink); text-decoration: none; font-size: 14px; }
.my-title:hover { text-decoration: underline; }
.my-due { width: 52px; text-align: right; color: var(--muted); }
.my-spent { width: 56px; text-align: right; }
.share-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; }

/* --- telefon (PWA) ------------------------------------------------------------------------- */
.mtop, .mtab, .msheet, .m-only { display: none; }
/* okienko szybkiej notatki na komputerze (skrót klawiszowy w kliencie desktopowym) */
@media (min-width: 761px) {
  .msheet:not([hidden]) { display: flex; align-items: flex-start; justify-content: center; position: fixed; inset: 0; z-index: 60; padding-top: 14vh; }
  .msheet-bg { position: absolute; inset: 0; background: rgba(21,24,28,.45); }
  .msheet-panel { position: relative; width: min(520px, 92vw); background: var(--surface); border-radius: 14px; padding: 20px 22px;
    display: flex; flex-direction: column; gap: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
  .msheet-grip, #msheet-menu { display: none !important; }
  .msheet-acts { display: flex; justify-content: flex-end; gap: 10px; }
  .msheet-panel h2 { font-size: 18px; }
}
@media (max-width: 760px) {
  html, body { -webkit-text-size-adjust: 100%; }
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .app { display: block; }
  .side { display: none; }
  .main { padding: 16px 14px 28px; gap: 16px; }
  h1 { font-size: 24px; }
  .head { align-items: flex-start; gap: 12px; }
  .head .sub { font-size: 12px; }
  input, select, textarea { font-size: 16px; }   /* iOS nie powiększa strony przy wpisywaniu */

  .mtop { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 30;
    padding: calc(10px + env(safe-area-inset-top)) 14px 10px; background: var(--side); color: #fff; }
  .mtop .brand { padding: 0; font-size: 16px; gap: 8px; }
  .mtop .brand .logo { width: 30px; height: 30px; }
  .mtop .space-switch { margin-left: auto; }
  .mtop .space-switch button { min-height: 34px; padding: 0 12px; font-size: 12px; }
  .mtop-menu { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: 0;
    background: none; color: #fff; cursor: pointer; border-radius: 50%; padding: 0; }
  .mtop-menu .av { width: 34px; height: 34px; font-size: 14px; }

  .mtab { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center; position: fixed;
    left: 0; right: 0; bottom: 0; z-index: 30; padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: var(--surface); border-top: 1px solid var(--line); }
  .mtab a { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 52px; justify-content: center;
    color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 500; border-radius: 12px; }
  .mtab a[aria-current="page"] { color: var(--ink); font-weight: 700; }
  .mtab a[aria-current="page"] svg { stroke-width: 2.4; }
  .mtab a span { position: relative; }
  .mtab .live { position: absolute; right: -11px; top: 3px; width: 7px; height: 7px; margin: 0; }
  .mtab-fab { display: flex; justify-content: center; }
  .mtab-fab button { width: 54px; height: 54px; border-radius: 18px; border: 0; background: var(--ink); color: #fff;
    display: flex; align-items: center; justify-content: center; cursor: pointer; margin-top: -18px;
    box-shadow: 0 6px 16px rgba(21,24,28,.28); }
  body.space-private .mtab-fab button { background: #6A4BC4; }
  body.space-private .mtop { background: #1D1A2B; }
  body.space-private .mtab a[aria-current="page"] { color: #4B3299; }
  body.space-private .main { box-shadow: none; }

  .msheet:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 50; }
  .msheet-bg { position: absolute; inset: 0; background: rgba(21,24,28,.5); }
  .msheet-panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 86vh; overflow-y: auto; background: var(--surface);
    border-radius: 22px 22px 0 0; padding: 10px 16px calc(18px + env(safe-area-inset-bottom)); display: flex; flex-direction: column;
    gap: 12px; box-shadow: 0 -10px 30px rgba(0,0,0,.2); }
  .msheet-grip { width: 40px; height: 4px; border-radius: 2px; background: var(--line-3); align-self: center; }
  .msheet-panel h2 { font-size: 18px; }
  .msheet-acts { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }
  .msheet-acts .btn { min-height: 50px; justify-content: center; }
  .msheet-user { display: flex; align-items: center; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line-2); }
  .msheet-links { display: flex; flex-direction: column; }
  .msheet-links a { display: flex; align-items: center; gap: 10px; min-height: 48px; color: var(--ink); text-decoration: none;
    border-bottom: 1px solid var(--line-2); font-size: 15px; }
  .msheet-links .dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
  .msheet-sec { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding-top: 6px; }
  body.sheet-open { overflow: hidden; }

  /* przyciski i pola wygodne dla palca */
  .btn { min-height: 44px; }
  .btn.small { min-height: 38px; }

  /* projekty: lista projektów jako przewijany pasek, tabela jako karty */
  .row { gap: 14px; }
  .plist { flex-direction: row; overflow-x: auto; flex: 1 1 100%; padding: 8px; gap: 6px; scroll-snap-type: x proximity; }
  .prow { flex: none; min-height: 48px; padding: 6px 12px; border: 1px solid var(--line-2); scroll-snap-align: start; }
  .plist > form, .plist > details { flex: none; width: 280px; border-top: 0 !important; }
  [data-task-table] { overflow: visible; }
  [data-task-table] table { min-width: 0 !important; }
  [data-task-table] thead { display: none; }
  [data-task-table] tbody tr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 10px 14px;
    border-bottom: 1px solid var(--line-2); }
  [data-task-table] td { display: block; height: auto; padding: 0; border: 0; min-width: 0 !important; }
  [data-task-table] td:first-child { display: none; }
  [data-task-table] td:nth-child(2) { flex: 1 1 100%; }
  [data-task-table] td:nth-child(2) .tlink { padding: 2px 0; font-weight: 500; }
  [data-task-table] td:last-child { margin-left: auto; display: flex; align-items: center; gap: 6px; }
  [data-task-table] td:last-child .bar { width: 48px; }
  .bulkbar { display: none !important; }
  .newtask { order: 9; }
  .m-only { display: inline-flex; }
  .ep-projects .head .btns .btn[href*="roadmap"] { display: none; }
  .pstats { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* plan dnia: oś godzin na górze, lista zadań pod nią */
  .dayplan { flex-direction: column; }
  .day-axis { order: -1; max-height: none; flex-basis: auto; width: 100%; }
  .day-tasks { flex-basis: auto; width: 100%; min-width: 0; }

  .my-row { flex-wrap: wrap; gap: 6px 10px; padding: 10px 14px; }
  .my-title { flex: 1 1 100%; order: -1; font-weight: 500; }
  .my-due { width: auto; text-align: left; }
  .member-list li { flex-wrap: wrap; }
  .invite-banner { flex-wrap: wrap; }
  .who-sep { display: none; }
}
@media (display-mode: standalone) {
  .head .sub { user-select: none; }
}
@media (max-width: 760px) {
  /* Dziś na telefonie: najpierw timer i to, co teraz, potem plan i liczby */
  .ep-dashboard .main > .row, .ep-dashboard .main > .row > .col-2, .ep-dashboard .main > .row > .col-1 { display: contents; }
  .ep-dashboard .col-2 > *, .ep-dashboard .col-1 > * { order: 6; }
  .ep-dashboard .hero, .ep-dashboard #focus { order: 1; }
  .ep-dashboard .next-card { order: 2; }
  .ep-dashboard [aria-label="Plan na dziś"] { order: 3; }
  .ep-dashboard [aria-label="Do zrobienia dziś"] { order: 4; }
  .ep-dashboard .main > .kpis { order: 5; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .ep-dashboard .kpi { padding: 12px 14px; }
  .ep-dashboard .kpi .k-v { font-size: 19px; }
  .ep-dashboard .kpi .xs { font-size: 11px; }
  .ep-dashboard #note, .ep-dashboard .head .btns a[href="#note"] { display: none; }
  .ep-roadmap .head .sub { display: none; }
}
@media (max-width: 760px) {
  form.check { flex-wrap: wrap; row-gap: 4px; padding-top: 10px; padding-bottom: 10px; }
  form.check > a { flex: 1 1 calc(100% - 90px) !important; font-weight: 500; }
  form.check > .icon-btn { order: 0; }
  form.check > .xs, form.check > .chip { order: 2; }
  form.check > .xs { margin-left: 34px; }
  .ep-dashboard .head .btns { display: none; }
}
@media (max-width: 760px) {
  .ax-hcol, .ax-hours { width: 44px; }
  .ax-lhead, .ax-lane { flex: 3 1 0; min-width: 0; }
  .ax-dhead, .ax-done { flex: 2 1 0; min-width: 0; }
  .ax-heads .small, .ax-heads .muted { display: none; }
  .day-axis { padding: 10px 8px 14px; }
  .blk { padding: 3px 6px; font-size: 12px; }
}
@media (max-width: 760px) {
  .timer-row { flex-wrap: wrap; gap: 8px 12px; }
  .timer-row > div { flex: 1 1 calc(100% - 30px) !important; }
  .timer-row .focus-title { font-size: 19px; }
  .timer-row .clock { font-size: 26px; margin-right: auto; }
  #focus .card-h { flex-wrap: wrap; gap: 8px; }
}

/* --- Dziś: zwijane „Do zrobienia”, filtr projektów, godziny pracy pod „i” ------------------------- */
a.st-blk, a.st-done { text-decoration: none; cursor: pointer; }
a.st-blk:hover, a.st-done:hover { filter: brightness(1.08); outline: 2px solid var(--ink); outline-offset: -1px; }
.todo-toggle { display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 4px 0; margin: 0; cursor: pointer;
  color: inherit; font: inherit; min-height: 36px; }
.todo-toggle .chev { transition: transform .15s; }
.todo-toggle[aria-expanded="false"] .chev { transform: rotate(-90deg); }
[data-todo-body][hidden] { display: none; }
.todo-filter { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.todo-filter::-webkit-scrollbar { display: none; }
.tf-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: 17px;
  border: 1px solid var(--line-3); background: var(--surface); color: var(--ink-2); font: 500 13px var(--font); cursor: pointer; white-space: nowrap; }
.tf-chip .dot { width: 9px; height: 9px; border-radius: 3px; }
.tf-chip .mono { font-size: 11px; color: var(--muted); }
.tf-chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.tf-chip.on .mono { color: #C9CCD0; }
form.check[hidden] { display: none; }
.hours-i { display: none; }
@media (max-width: 760px) {
  .hours-i { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; min-height: 36px; padding: 0 12px 0 8px; border-radius: 18px;
    border: 1px solid var(--line-3); background: var(--surface); color: var(--ink-2); font: 500 13px var(--font); cursor: pointer; }
  .hours-i.ot { border-color: #F0D3A8; background: var(--warn-bg); color: var(--warn-ink); }
  .hours-i[aria-expanded="true"] { background: var(--ground); }
  .hours-bar { display: none; margin-top: 8px; }
  .hours-bar.open { display: flex; }
}
.ax-entry.openable { cursor: pointer; }
.tf-chip, .todo-toggle, .hours-i, .mtab a, .mtab-fab button { -webkit-tap-highlight-color: transparent; }
.ax-lane { touch-action: manipulation; }   /* podwójne stuknięcie nie powiększa strony na iPhonie */
.new-dlg form { display: flex; flex-direction: column; gap: 10px; }
.new-dlg .form-grid { gap: 10px; }

/* --- plan dnia: panel wybranego bloku (na telefonie wysuwany od dołu) ----------------------------- */
.sel-card-h { display: flex; align-items: center; justify-content: space-between; }
.sel-close { display: none; }
.sel-grid .sm { display: none; }
@media (max-width: 760px) {
  .day-side .sel-card { display: none; }
  .has-sel .day-side .sel-card { display: block; position: fixed; left: 8px; right: 8px; bottom: calc(80px + env(safe-area-inset-bottom));
    z-index: 40; border-radius: 18px; box-shadow: 0 -6px 30px rgba(21,24,28,.25); padding: 14px 16px; max-height: 60vh; overflow-y: auto; }
  .has-sel .sel-card h2 { font-size: 13px; color: var(--muted); font-weight: 600; }
  .sel-close { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px;
    border: 0; background: var(--ground); color: var(--ink); cursor: pointer; }
  .sel-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sel-grid .btn { min-height: 46px; justify-content: center; padding: 0 4px; }
  .sel-grid .lg { display: none; }
  .sel-grid .sm { display: inline; }
  .sel-card [data-sel-title] { font-size: 17px; }
  .sel-card [data-sel] .btns .btn { min-height: 48px; }
  .has-sel .day-axis { padding-bottom: 260px; }
}

/* --- roadmapa na telefonie (kwartał / miesiąc / tydzień) -------------------------------------------- */
.m-road { display: none; }
@media (max-width: 760px) {
  .d-road { display: none !important; }
  .m-road { display: flex; flex-direction: column; gap: 10px; }
  .ep-roadmap .head { gap: 10px; }
  .ep-roadmap .head h1 { font-size: 20px; }
  .ep-roadmap .head .btns { width: 100%; display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px; }
  .ep-roadmap .head .seg { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); }
  .ep-roadmap .head .seg a { justify-content: center; min-height: 40px; }
  .ep-roadmap .head .btns > .btn { justify-content: center; min-height: 40px; }
  .road-filter { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .road-filter::-webkit-scrollbar { display: none; }
  .road-filter .btn { flex: none; border-radius: 16px; }
  .mr-sum { margin: 0; font-size: 12px; color: var(--muted); }
  .mr-sum .late, .m-road .late { color: var(--crit); }
  /* kwartał */
  .mr-months { position: sticky; top: 64px; z-index: 5; display: flex; background: var(--surface); border: 1px solid var(--line);
    border-radius: 10px; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; }
  .mr-months a { padding: 7px 8px; color: inherit; text-decoration: none; border-left: 1px solid var(--line-2); }
  .mr-months a:first-child { border-left: 0; }
  .mr-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--crit); }
  .mr-now i { position: absolute; top: -14px; left: -10px; font: normal 9px var(--mono); color: var(--crit); }
  .mr-proj { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
  .mr-proj > summary { list-style: none; padding: 10px 12px 9px; cursor: pointer; display: flex; flex-direction: column; gap: 8px; }
  .mr-proj > summary::-webkit-details-marker { display: none; }
  .mr-ph { display: flex; align-items: center; gap: 8px; }
  .mr-ph b { flex: 1; font-size: 15px; }
  .mr-ph .chev, .mr-wday .chev { transition: transform .15s; flex: none; color: var(--muted); }
  details[open] > summary .chev { transform: rotate(90deg); }
  .mr-track, .mr-ttrack { position: relative; display: block; height: 10px; border-radius: 5px; background: var(--ground); }
  .mr-span { position: absolute; top: 0; bottom: 0; border-radius: 5px; opacity: .85; }
  .mr-today { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--crit); border-radius: 1px; }
  .mr-task { display: block; padding: 8px 12px; border-top: 1px solid var(--line-2); color: var(--ink); text-decoration: none; }
  .mr-tt { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
  .mr-tt .t { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mr-tt .mono { flex: none; }
  .mr-ttrack { height: 14px; margin-top: 5px; background: repeating-linear-gradient(to right, transparent 0, transparent calc(33.33% - 1px), var(--line-2) calc(33.33% - 1px), var(--line-2) 33.33%); }
  .mr-bar { position: absolute; top: 2px; height: 10px; border-radius: 4px; background: var(--c); }
  .mr-bar.plan { opacity: .5; } .mr-bar.done { opacity: .3; } .mr-bar.late { background: var(--crit); opacity: 1; }
  .mr-add { display: flex; align-items: center; justify-content: center; min-height: 44px; border-top: 1px solid var(--line-2); font-size: 13px; font-weight: 600; text-decoration: none; }
  /* miesiąc */
  .mr-cal { padding: 8px; }
  .mr-wd, .mr-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
  .mr-wd { text-align: center; font-size: 10px; font-weight: 600; color: var(--muted); padding: 2px 0 6px; }
  .mr-wd .we { color: var(--faint); }
  .mr-day { min-height: 54px; border: 0; border-radius: 10px; padding: 4px 2px; display: flex; flex-direction: column; align-items: center; gap: 3px;
    background: var(--surface); font-family: inherit; color: var(--ink); cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .mr-day.out { background: none; cursor: default; }
  .mr-day.we { background: var(--soft); color: var(--faint); }
  .mr-day .n { font-size: 14px; font-weight: 500; }
  .mr-day.today { box-shadow: inset 0 0 0 2px var(--ink); }
  .mr-day.today .n { font-weight: 700; }
  .mr-day.due { box-shadow: inset 0 0 0 2px var(--crit); }
  .mr-day .dots { display: flex; gap: 2px; min-height: 6px; }
  .mr-day .dots i { width: 6px; height: 6px; border-radius: 50%; }
  .mr-day .ld { width: 70%; height: 3px; border-radius: 2px; background: var(--ink); }
  .mr-day.on { background: var(--ink); color: #fff; box-shadow: none; }
  .mr-day.on .ld { background: #E8B331; }
  .mr-day.on .dots i { outline: 1.5px solid #fff; }
  .mr-legend { display: flex; gap: 12px; justify-content: center; font-size: 10px; color: var(--muted); padding: 8px 0 2px; }
  .mr-legend span { display: flex; align-items: center; gap: 4px; }
  .mr-legend .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
  .mr-legend .ln { width: 10px; height: 3px; border-radius: 2px; background: var(--ink); }
  .mr-legend .dd { width: 8px; height: 8px; border-radius: 2px; box-shadow: inset 0 0 0 2px var(--crit); }
  .mr-ah { display: flex; align-items: baseline; justify-content: space-between; padding: 12px 14px 8px; }
  .mr-ah h2 { font-size: 16px; }
  .mr-ag { display: flex; flex-direction: column; gap: 3px; padding: 9px 14px 9px 18px; border-top: 1px solid var(--line-2); color: var(--ink);
    text-decoration: none; position: relative; }
  .mr-ag::before { content: ""; position: absolute; left: 8px; top: 8px; bottom: 8px; width: 4px; border-radius: 2px; background: var(--c); }
  .mr-ag .t { font-size: 14px; font-weight: 500; }
  .mr-ag .m { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
  .mr-ag .chip { height: 20px; font-size: 11px; }
  .mr-ag .chip.due { background: var(--crit-bg); color: var(--crit-ink); }
  /* tydzień */
  .mh-wbars { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; align-items: end; height: 60px; background: var(--side);
    border-radius: 12px; padding: 8px 8px 6px; }
  .mh-wbars a { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; height: 100%; text-decoration: none; color: #A3A8AE; font-size: 10px; }
  .mh-wbars .b { width: 100%; max-width: 28px; border-radius: 4px 4px 0 0; background: #5C7FC9; min-height: 3px; }
  .mh-wbars .b.past { background: #C9CCD0; }
  .mh-wbars a.today { color: #E8B331; font-weight: 700; }
  .mh-wbars a.today .b { box-shadow: 0 0 0 2px #E8B331; }
  .mr-deadlines { background: var(--warn-bg); border: 1px solid #F0D3A8; border-radius: 12px; padding: 10px 12px; font-size: 13px; color: var(--warn-ink); }
  .mr-deadlines a { color: inherit; font-weight: 500; }
  .mr-wday { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; scroll-margin-top: 70px; }
  .mr-wday.today { border: 2px solid var(--ink); }
  .mr-wday > summary { list-style: none; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 12px; cursor: pointer; }
  .mr-wday > summary::-webkit-details-marker { display: none; }
  .mr-badge { width: 42px; height: 42px; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; background: var(--line-2); }
  .mr-badge span { font-size: 10px; font-weight: 600; } .mr-badge b { font-size: 16px; line-height: 1; }
  .mr-wday.today .mr-badge { background: var(--ink); color: #fff; }
  .mr-wt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .mr-wt b { font-size: 14px; }
  .mr-wbody { padding: 0 12px 10px; display: flex; flex-direction: column; gap: 6px; }
  .mr-wit { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 8px 4px 14px; border-radius: 10px; border: 1px solid var(--line);
    color: var(--ink); text-decoration: none; position: relative; font-size: 13px; }
  .mr-wit::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 4px; border-radius: 2px; background: var(--c); }
  .mr-wit.past { background: var(--soft); border-color: transparent; }
  .mr-wit.past::before { background: transparent; box-shadow: inset 0 0 0 2px var(--c); }
  .mr-wit .mono { width: 82px; flex: none; color: var(--ink-2); }
  .mr-wit .t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
  .mr-plan-empty { display: flex; align-items: center; justify-content: center; min-height: 44px; border: 1px dashed var(--line-3); border-radius: 10px; font-size: 13px; text-decoration: none; }
  .mr-open { align-self: flex-end; font-size: 12px; text-decoration: none; padding: 4px 2px; }
}

/* ===== telefon 1:1 z makietą: nagłówek strony, dolny pasek, wspólne elementy ===================== */
.m-only { display: none !important; }
@media (max-width: 760px) {
  :root { --mh-bg: #15181C; --mh-2: #22262C; --mh-line: #3A4048; --mh-ink: #A3A8AE; --m-accent: #15181C; --m-pill: #ECEDE8; --m-ground: #F2F2EE; }
  body.space-private { --mh-bg: #1D1A2B; --mh-2: #2A2540; --mh-line: #4A4170; --mh-ink: #B9B2D3; --m-accent: #6A4BC4; --m-pill: #F1EEFB; --m-ground: #F4F2F8; }
  .m-only { display: flex !important; flex-direction: column; gap: 12px; }
  .m-only.m-block { display: block !important; }
  .d-only { display: none !important; }
  body { background: var(--m-ground); }
  .main { background: var(--m-ground); padding: 14px 14px 22px; gap: 12px; }
  .ep-dashboard .main > .head, .ep-projects .main > .head, .ep-roadmap .main > .head, .ep-time_view .main > .head,
  .ep-my_tasks .main > .head, .ep-task_detail .main > .head { display: none; }

  .mtop { display: flex; flex-direction: column; align-items: stretch; gap: 12px; padding: calc(16px + env(safe-area-inset-top)) 16px 14px; background: var(--mh-bg);
    color: #fff; position: relative; top: auto; }
  .mh-row { display: flex; align-items: center; gap: 10px; min-height: 36px; }
  .mh-title { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: 0; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mtop .space-switch { margin-left: 0; border-radius: 9px; border-color: var(--mh-line); background: #1E2228; flex: none; }
  body.space-private .mtop .space-switch { background: #262138; }
  .mtop .space-switch button { min-height: 34px; padding: 0 12px; font-size: 12px; color: var(--mh-ink); }
  .mtop .space-switch button.on { background: #fff; color: #15181C; }
  body.space-private .mtop .space-switch button.on { background: #CDBEFF; color: #1D1A2B; }
  .mtop-menu { width: 36px; height: 36px; flex: none; }
  .mtop-menu .av { width: 36px; height: 36px; font-size: 14px; background: #2B3038; }
  body.space-private .mtop-menu .av { background: #372F55; }
  .mh-brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-size: 16px; font-weight: 700; flex: 1; }
  .mh-brand .logo { width: 30px; height: 30px; }
  .mh-brand .brand-dev { font-weight: 400; color: #C9CCD0; }
  .mh-date { font: 12px var(--mono); color: var(--mh-ink); }
  .mh-hello { margin: 4px 0 0; font-size: 24px; font-weight: 600; letter-spacing: -0.01em; }
  .mh-ib { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--mh-line); background: transparent; color: #fff; display: flex;
    align-items: center; justify-content: center; flex: none; text-decoration: none; }
  .mh-nav { display: flex; align-items: center; gap: 8px; }
  .mh-nav .mid { flex: 1; text-align: center; min-width: 0; }
  .mh-nav .mid b { display: block; font-size: 15px; font-weight: 600; }
  .mh-nav .mid span { font: 11px var(--mono); color: var(--mh-ink); }
  .mh-vseg { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--mh-2); border-radius: 10px; padding: 3px; gap: 2px; }
  .mh-vseg a { min-height: 34px; display: flex; align-items: center; justify-content: center; border-radius: 8px; color: #C9CCD0; font-size: 13px;
    font-weight: 600; text-decoration: none; }
  .mh-vseg a.on { background: #fff; color: #15181C; }
  .mh-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
  .mh-chips::-webkit-scrollbar { display: none; }
  .mh-chip { flex: none; min-height: 36px; padding: 0 14px; border-radius: 18px; border: 1px solid var(--mh-line); background: transparent; color: #C9CCD0;
    font: 600 13px var(--font); white-space: nowrap; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
  .mh-chip.on { background: #fff; border-color: #fff; color: #15181C; }
  .mh-search { position: relative; display: block; }
  .mh-search input { width: 100%; min-height: 44px; border-radius: 12px; border: 1px solid var(--mh-line); background: var(--mh-2); color: #fff;
    padding: 0 14px 0 40px; font: 15px var(--font); }
  .mh-search input::placeholder { color: var(--mh-ink); }
  .mh-search svg { position: absolute; left: 12px; top: 13px; color: var(--mh-ink); }

  /* dolny pasek jak w makiecie: aktywna zakładka w „pigułce” */
  .mtab { padding: 6px 8px calc(22px + env(safe-area-inset-bottom)); gap: 0; }
  .mtab a { gap: 3px; min-height: 52px; border-radius: 12px; font-size: 11px; color: #565D66; }
  .mtab a[aria-current="page"] { background: var(--m-pill); color: var(--m-accent); font-weight: 600; }
  .mtab-fab button { width: 52px; height: 52px; border-radius: 16px; background: var(--m-accent); }
  body { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }

  /* karty i wiersze w stylu makiety */
  .mcard { background: #fff; border: 1px solid #DCDDD7; border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
  .mcard h2 { margin: 0; font-size: 16px; font-weight: 600; }
  .mbtn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 10px;
    font: 600 14px var(--font); border: 1px solid #C4C6C0; background: #fff; color: #15181C; cursor: pointer; text-decoration: none; }
  .mbtn.dark { background: #15181C; border-color: #15181C; color: #fff; }
  body.space-private .mbtn.dark { background: #6A4BC4; border-color: #6A4BC4; }
  .mchip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11px; font-weight: 600; white-space: nowrap;
    background: #ECEDE8; color: #33383E; }
  .mchip.st-wtoku { background: #15181C; color: #fff; }
  .mchip.st-zrobione { background: #E3F1E8; color: #1F5C38; }
  .mchip.st-backlog { background: #F2F2EE; color: #565D66; }
  .mchip.st-zablokowane { background: #FBE4E1; color: #8E1B12; }
}
@media (max-width: 760px) {
  .ep-dashboard #focus { display: none !important; }
  .ep-dashboard .m-dash { order: 0; }
  .m-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .m-kpis .mcard { padding: 10px 12px; border-radius: 12px; gap: 2px; }
  .m-kpis .k { font-size: 11px; color: #565D66; }
  .m-kpis .v { font-size: 17px; font-weight: 500; white-space: nowrap; }
  .m-kpis .s { font-size: 11px; color: #565D66; }
  .m-kpis .kb { display: block; height: 4px; border-radius: 2px; background: #ECEDE8; margin-top: 4px; overflow: hidden; }
  .m-kpis .kb span { display: block; height: 4px; background: var(--m-accent); }
  .m-timers { background: var(--mh-bg); color: #fff; border-radius: 18px; padding: 14px 14px 12px; display: flex; flex-direction: column; gap: 10px; }
  .mt-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 600; }
  .mt-par { font-size: 11px; font-weight: 400; background: #2B3038; border-radius: 6px; padding: 3px 8px; }
  .mt-par.ot { background: #6B3D00; }
  .mt-row { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px; border-radius: 12px; background: var(--mh-2); }
  .mt-dot { width: 9px; height: 9px; border-radius: 50%; background: #3FB86B; box-shadow: 0 0 0 4px rgba(63,184,107,.2); flex: none; }
  .mt-info { flex: 1; min-width: 0; color: #fff; text-decoration: none; display: flex; flex-direction: column; }
  .mt-info b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mt-info span { font-size: 11px; color: var(--mh-ink); display: flex; align-items: center; gap: 5px; }
  .mt-info i { width: 8px; height: 8px; border-radius: 2px; }
  .mt-clock { font-size: 18px; font-weight: 500; }
  .mt-pause { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--mh-line); background: transparent; color: #fff;
    display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
  .mt-none { font-size: 13px; color: #C9CCD0; padding: 4px 2px; }
  .mt-btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .mt-btns .mbtn { background: #fff; border-color: #fff; }
  body.space-private .mt-btns .mbtn:not(.ghost) { background: #CDBEFF; border-color: #CDBEFF; color: #1D1A2B; }
  .mt-btns .mbtn.ghost { background: transparent; color: #fff; border-color: var(--mh-line); }
  .m-next { background: #EEF3FC; border: 1px solid #C9D7F2; border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
  body.space-private .m-next { background: #F1EEFB; border-color: #D9D0F5; }
  .mn-h { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; color: #163F8A; }
  body.space-private .mn-h, body.space-private .mn-m .a { color: #4B3299; }
  .mn-t { font-size: 16px; font-weight: 600; color: var(--ink); text-decoration: none; }
  .mn-m { font-size: 12px; color: #33383E; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
  .mn-m i { width: 9px; height: 9px; border-radius: 2px; }
  .mn-m .a { color: #163F8A; }
  .mn-b { display: grid; grid-template-columns: 2fr 1fr; gap: 8px; margin-top: 4px; }
  /* „Do zrobienia dziś” jak w makiecie: tytuł, pod nim podpowiedź, strzałka do zadania */
  .ep-dashboard .todo-card { border-radius: 16px; padding: 14px 16px 6px; }
  .ep-dashboard form.check { display: grid; grid-template-columns: 22px 1fr 44px; column-gap: 12px; row-gap: 0; min-height: 52px; padding: 6px 0; }
  .ep-dashboard form.check > input[type=checkbox] { width: 22px; height: 22px; grid-row: 1 / 3; }
  .ep-dashboard form.check > a { grid-column: 2; font-size: 15px; font-weight: 400 !important; line-height: 1.3; }
  .ep-dashboard form.check > .xs { grid-column: 2; margin-left: 0 !important; font-size: 11px; }
  .ep-dashboard form.check > .chip, .ep-dashboard form.check > .icon-btn { display: none; }
  .ep-dashboard form.check::after { content: ""; grid-column: 3; grid-row: 1 / 3; align-self: center; justify-self: center; width: 9px; height: 9px;
    border-right: 2px solid #8C9198; border-top: 2px solid #8C9198; transform: rotate(45deg); pointer-events: none; }
}
@media (max-width: 760px) {
  .ep-roadmap .main > .head + .flash { margin-top: 0; }
  .mh-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
  .mh-week a { min-height: 56px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
    background: var(--mh-2); color: #C9CCD0; text-decoration: none; }
  .mh-week a.we { color: #8C9198; }
  .mh-week .wd { font-size: 10px; } .mh-week b { font-size: 15px; font-weight: 600; }
  .mh-week i { width: 5px; height: 5px; border-radius: 50%; background: transparent; }
  .mh-week i.p { background: #8FB3F5; }
  .mh-week a.on { background: #fff; color: #15181C; }
  .mh-week a.on i.p { background: #1F55B8; }
  .mh-week a.today:not(.on) { box-shadow: inset 0 0 0 1px #E8B331; }
  body.space-private .mh-week i.p { background: #CDBEFF; }
  body.space-private .mh-week a.on i.p { background: #6A4BC4; }
  /* plan dnia: tylko oś + przycisk planowania; lista zadań jako arkusz */
  .ep-roadmap .dayplan { gap: 0; }
  .day-axis { border: 0; background: transparent; padding: 0 0 70px; box-shadow: none; }
  .day-axis .ax-heads { font-size: 11px; color: #565D66; }
  .day-axis .ax-heads .ax-lhead b, .day-axis .ax-heads .ax-dhead b { font-weight: 400; }
  .ax-lane { background: #fff; border: 1px solid #DCDDD7 !important; border-radius: 12px; }
  .ax-dhead, .ax-done { flex: 0 0 40px !important; min-width: 0; border-right: 0 !important; }
  .ax-dhead { font-size: 0; } .ax-dhead::after { content: "wykonane"; font-size: 11px; color: #565D66; margin-left: -18px; }
  .ax-entry { left: 4px !important; width: 12px !important; padding: 0; border-radius: 6px; }
  .ax-entry > * { display: none; }
  .blk { border-radius: 10px; padding: 6px 10px; }
  .day-tasks { display: none !important; }
  .show-tasks .day-tasks { display: flex !important; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; max-height: 78vh; overflow-y: auto;
    border-radius: 22px 22px 0 0; padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 30px rgba(0,0,0,.25); }
  .show-tasks::before { content: ""; position: fixed; inset: 0; background: rgba(21,24,28,.45); z-index: 44; }
  .m-close { display: inline-flex !important; margin-left: auto; }
  .m-tasks-hint { margin: 0; }
  .dt-task .grip { display: none; }
  .m-plan-fab { position: fixed; right: 16px; bottom: calc(100px + env(safe-area-inset-bottom)); z-index: 30; min-height: 52px; padding: 0 20px;
    border-radius: 26px; border: 0; background: var(--m-accent); color: #fff; font: 600 15px var(--font); box-shadow: 0 8px 20px rgba(21,24,28,.3); cursor: pointer; }
  .has-sel .m-plan-fab, .show-tasks .m-plan-fab { display: none; }
  .has-sel .day-side .sel-card { bottom: calc(94px + env(safe-area-inset-bottom)); left: 10px; right: 10px; }
}
@media (min-width: 761px) { .m-plan-fab, .m-tasks-hint, .m-close { display: none; } }
@media (max-width: 760px) {
  .mr-months { top: 0; }
  .mh-wbars { background: transparent !important; padding: 0 !important; height: 46px !important; }
}
@media (max-width: 760px) {
  .m-projects { gap: 10px !important; }
  .mp-card { background: #fff; border: 1px solid #DCDDD7; border-radius: 16px; overflow: hidden; }
  .mp-card[hidden] { display: none; }
  .mp-card > summary { list-style: none; min-height: 56px; display: flex; align-items: center; gap: 10px; padding: 0 14px; cursor: pointer; }
  .mp-card > summary::-webkit-details-marker { display: none; }
  .mp-card .chev { color: #565D66; transition: transform .15s; flex: none; }
  .mp-card[open] > summary .chev { transform: rotate(90deg); }
  .mp-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .mp-name b { font-size: 15px; font-weight: 600; }
  .mp-name .mono { font-size: 11px; color: #565D66; }
  .mp-name .mchip { height: 18px; font-size: 10px; margin-left: 4px; }
  .mp-tasks { border-top: 1px solid #ECEDE8; }
  .mp-task { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 8px 14px; border-bottom: 1px solid #ECEDE8; text-decoration: none; color: #15181C; }
  .mp-task[hidden] { display: none; }
  .mp-tt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
  .mp-tt .t { font-size: 14px; line-height: 1.3; }
  .mp-tt .m { display: flex; gap: 6px; align-items: center; }
  .mp-tt .mono { font-size: 11px; color: #565D66; }
  .mp-tt .mono.hot { color: #8E1B12; }
  .mp-empty { margin: 0; padding: 12px 14px; font-size: 13px; color: #565D66; }
  .mp-empty[hidden] { display: none; }
  .mp-foot { display: flex; background: #F7F7F4; }
  .mp-add { flex: 1; min-height: 48px; border: 0; background: transparent; color: #1F55B8; font: 600 14px var(--font); cursor: pointer; }
  body.space-private .mp-add { color: #4B3299; }
  .mp-manage { width: 52px; display: flex; align-items: center; justify-content: center; color: #565D66; border-left: 1px solid #ECEDE8; }
  .mp-new { min-height: 52px; border-radius: 16px; border: 1px dashed #C4C6C0; display: flex; align-items: center; justify-content: center;
    color: #33383E; font: 600 14px var(--font); text-decoration: none; }
}
@media (max-width: 760px) {
  .mh-back, .mh-more { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: #fff; border-radius: 12px;
    border: 0; background: transparent; cursor: pointer; flex: none; text-decoration: none; }
  .mh-more { margin-left: auto; }
  .mh-crumb { font-size: 13px; color: var(--mh-ink); display: flex; align-items: center; gap: 6px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mh-crumb i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
  .mh-task { margin: 0 4px; font-size: 22px; font-weight: 600; line-height: 1.25; }
  .mh-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 4px; }
  .mh-tags .mchip.on-dark.st-wtoku { background: #fff; color: #15181C; }
  .mh-tags .mchip.due { background: #2B3038; color: #fff; }
  .mh-tags .mchip.due.late { background: #B42318; }
  .mh-tags .pr-wysoki, .mh-tags .pr-pilny { background: #FBEBD3; color: #6B3D00; }
  .ep-task_detail .mtab { display: none; }
  .ep-task_detail { padding-bottom: calc(86px + env(safe-area-inset-bottom)); }
  .m-task { gap: 10px !important; }
  .mcard .mc-h { display: flex; justify-content: space-between; align-items: baseline; }
  .mcard .mc-h .mono { font-size: 12px; color: #565D66; }
  .mcard h2 { font-size: 15px; }
  .mt-status { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .mt-status form { display: contents; }
  .mt-status button { min-height: 44px; border-radius: 10px; border: 1px solid #C4C6C0; background: #fff; color: #15181C; font: 600 13px var(--font); cursor: pointer; }
  .mt-status button.on { background: var(--m-accent); border-color: var(--m-accent); color: #fff; }
  .mt-dates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .mt-dates label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #565D66; }
  .mt-dates input { min-height: 44px; border: 1px solid #C4C6C0; border-radius: 10px; padding: 0 10px; font: 15px var(--font); }
  .mt-2btn { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .m-timerbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid !important; grid-template-columns: 1fr auto; gap: 8px;
    align-items: center; padding: 10px 12px calc(14px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid #DCDDD7; }
  .mtb-btn { min-height: 52px; border-radius: 14px; border: 0; background: var(--m-accent); color: #fff; font: 600 16px var(--font); cursor: pointer; }
  .mtb-btn.on { background: #fff; color: #15181C; box-shadow: inset 0 0 0 2px #15181C; }
  .mtb-clock { font-size: 18px; font-weight: 500; min-width: 84px; text-align: right; }
  .msheet-linkbtn { width: 100%; min-height: 48px; border: 0; border-bottom: 1px solid var(--line-2); background: none; text-align: left;
    font: 15px var(--font); color: var(--ink); cursor: pointer; padding: 0; }
  /* sekcje karty zadania w kolejności z makiety */
  .ep-task_detail .row { gap: 10px; }
  .ep-task_detail .col-2, .ep-task_detail .col-1 { gap: 10px; flex-basis: 100%; }
  .ep-task_detail .col-2 .card, .ep-task_detail .col-1 .card { border-radius: 16px; padding: 14px 16px; }
  .ep-task_detail #subtasks { order: 1; } .ep-task_detail #links { order: 2; } .ep-task_detail #log { order: 3; } .ep-task_detail .t-desc { order: 4; }
  .ep-task_detail #subtasks .check { min-height: 50px; }
  .ep-task_detail #subtasks .check input[type=checkbox] { width: 22px; height: 22px; }
  .ep-task_detail form.btns input { flex: 1 1 100% !important; }
}
@media (max-width: 760px) {
  .mh-time { display: flex; align-items: flex-end; justify-content: space-between; }
  .mh-ink { font-size: 12px; color: var(--mh-ink); }
  .mh-total { font-size: 30px; font-weight: 500; margin-top: 2px; }
  .mh-nav2 { display: flex; gap: 6px; }
  .m-time .mcard { border-radius: 16px; }
  .mtc-bars { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; align-items: end; height: 130px; border-bottom: 1px solid #C4C6C0; }
  .mtc-bars button { height: 100%; border: 0; background: none; padding: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; cursor: pointer; }
  .mtc-bars .v { font-size: 10px; color: #565D66; }
  .mtc-bars .b { display: flex; flex-direction: column; justify-content: flex-start; width: 100%; max-width: 30px; border-radius: 6px 6px 0 0; background: #C9CCD0; overflow: hidden; }
  body.space-private .mtc-bars .b { background: #CDBEFF; }
  .mtc-bars .b i { display: block; width: 100%; background: var(--warn); }
  .mtc-bars button.on .b { background: var(--m-accent); }
  .mtc-lbl { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-top: 6px; text-align: center; font-size: 11px; color: #565D66; }
  .mtc-lbl .on { color: var(--m-accent); font-weight: 600; }
  .mtp .r { display: flex; justify-content: space-between; font-size: 14px; }
  .mtp .r span { display: flex; align-items: center; gap: 8px; }
  .mtp i { width: 10px; height: 10px; border-radius: 3px; }
  .mtp .bg { height: 6px; border-radius: 3px; background: #ECEDE8; margin-top: 5px; }
  .mtp .bg div { height: 6px; border-radius: 3px; }
  .mte { display: flex; align-items: center; gap: 10px; min-height: 56px; border-top: 1px solid #ECEDE8; }
  .mte[hidden] { display: none; }
  .mte > i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
  .mte .t { flex: 1; min-width: 0; display: flex; flex-direction: column; color: var(--ink); text-decoration: none; }
  .mte .t b { font-size: 14px; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mte .t span { font-size: 11px; color: #565D66; }
  .mte .d { font-size: 13px; }
  .mte .ed { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: #8C9198; flex: none; }
  .mt-add { min-height: 52px; border-radius: 16px; border-color: var(--m-accent); color: var(--m-accent); }
  body.space-private .mt-add { color: #4B3299; border-color: #6A4BC4; }
}
@media (max-width: 760px) {
  .auth-page .auth-wrap { flex-direction: column; gap: 22px; justify-content: flex-start; padding-top: calc(48px + env(safe-area-inset-top)); }
  .m-install { flex-direction: row !important; gap: 12px !important; align-items: flex-start; background: #22262C; border: 1px solid #3A4048; border-radius: 18px;
    padding: 14px 16px; color: #fff; font-size: 13px; line-height: 1.45; max-width: 420px; width: 100%; box-sizing: border-box; }
  .m-install svg { flex: none; margin-top: 2px; }
  .m-install span { color: #C9CCD0; }
}
@media (max-width: 760px) { .mp-name b .mchip { vertical-align: 2px; } .ax-dhead::after { margin-left: -24px; } }

/* telefon: przytrzymanie palca 2 s na bloku osi dnia → tryb przesuwania */
.blk.holding { animation: blk-hold 2s linear forwards; }
@keyframes blk-hold { 0%, 15% { box-shadow: 0 0 0 0 rgba(233,185,73,0); } 100% { box-shadow: 0 0 0 3px #E9B949; } }
.blk.editing { touch-action: none; transform: scale(1.03); box-shadow: 0 8px 22px rgba(21,24,28,.35), 0 0 0 3px #E9B949; z-index: 6;
  transition: transform .12s, box-shadow .12s; overflow: visible; }
.blk.editing .blk-rs { height: 26px; bottom: -13px; cursor: ns-resize; }
.blk.editing .blk-rs::after { opacity: 1; width: 36px; height: 8px; margin-left: -18px; bottom: 9px; border-radius: 4px;
  background: #E9B949; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
@media (prefers-reduced-motion: reduce) { .blk.holding { animation-duration: 0s; animation-delay: 1.9s; } }

/* --- zadania cykliczne -------------------------------------------------------------------------- */
.recur-mark { color: var(--accent, #2457B5); font-weight: 700; }
.recur-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 600;
  background: #E7EEFB; color: #1F4A99; text-decoration: none; white-space: nowrap; }
.mchip.recur-mchip { background: #E7EEFB; color: #1F4A99; }
.recur-card .card-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.recur-card .recur-info { margin: 6px 0 10px; line-height: 1.45; }
.recur-acts { margin-bottom: 10px; }
.recur-form { display: flex; flex-direction: column; gap: 10px; }
.recur-form .rf-row { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink-2, #565D66); border: 0; padding: 0; margin: 0; min-width: 0; }
.recur-form .rf-row > span:first-child, .recur-form legend { font-weight: 600; font-size: 12px; padding: 0; margin-bottom: 4px; }
.recur-form select, .recur-form input[type=number], .recur-form input[type=time] { min-height: 40px; }
.recur-form .rf-inline { display: flex; align-items: center; gap: 8px; }
.recur-form .rf-inline input { width: 84px; }
.recur-form [hidden] { display: none !important; }
.rf-days { display: flex !important; flex-direction: row !important; flex-wrap: wrap; gap: 6px !important; }
.rf-days legend { width: 100%; }
.rf-day { position: relative; }
.rf-day input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.rf-day span { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 36px; padding: 0 8px; border-radius: 8px;
  border: 1px solid var(--line, #DCDDD7); background: #fff; color: var(--ink, #15181C); font-weight: 600; font-size: 13px; }
.rf-day input:checked + span { background: var(--ink, #15181C); border-color: var(--ink, #15181C); color: #fff; }
.rf-day input:focus-visible + span { outline: 2px solid var(--accent, #2457B5); outline-offset: 2px; }
.rf-check { display: flex; align-items: center; gap: 8px; font-size: 13px; min-height: 36px; }
.rf-check input { width: 18px; height: 18px; accent-color: var(--ink, #15181C); }
.rf-plan { display: flex; flex-direction: column; gap: 6px; padding-top: 4px; border-top: 1px solid var(--line-2, #ECEDE8); }
.rf-plan-fields { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rf-plan-fields input[type=time] { width: 136px; }
.recur-edit > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--accent, #2457B5); min-height: 36px; display: flex; align-items: center; }
.recur-edit[open] > summary { margin-bottom: 8px; }
.rf-plan-fields select { width: auto; }

/* pasek postępu i natychmiastowa reakcja na klik */
.dd-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 9999; pointer-events: none; opacity: 0;
  background: var(--m-accent, #E9B949); box-shadow: 0 0 6px rgba(233,185,73,.6); }
.dd-progress.on { opacity: 1; width: 80%; transition: width 6s cubic-bezier(.1,.7,.2,1), opacity .1s; }
.dd-progress.done { width: 100%; opacity: 0; transition: width .15s, opacity .25s .1s; }
.dd-pressed { opacity: .65; }
@media (prefers-reduced-motion: reduce) { .dd-progress.on { transition: none; width: 60%; } }

/* diagnostyka szybkości */
.diag { display: flex; flex-direction: column; gap: 10px; }
.diag-result { font-size: 14px; padding: 10px 12px; border-radius: 8px; background: var(--line-2, #ECEDE8); }
.diag-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.diag-kpi { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line, #DCDDD7); border-radius: 10px; }
.diag-kpi b { font-size: 18px; }
.diag-verdict { grid-column: 1 / -1; margin: 4px 0 0; font-weight: 600; }
.diag-wrap { overflow-x: auto; }
.diag-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.diag-table th, .diag-table td { text-align: left; padding: 6px 8px; border-top: 1px solid var(--line-2, #ECEDE8); white-space: nowrap; }
.diag-table td:nth-child(2) { white-space: normal; max-width: 260px; overflow-wrap: anywhere; }

/* okno „Dodaj do planu”: nowe albo istniejące zadanie */
.new-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 3px; margin-bottom: 12px; border-radius: 10px; background: var(--line-2, #ECEDE8); }
.new-tabs button { min-height: 38px; border: 0; border-radius: 8px; background: transparent; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink-2, #565D66); cursor: pointer; }
.new-tabs button[aria-selected="true"] { background: #fff; color: var(--ink, #15181C); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.new-dlg [data-mode-pane] { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.new-dlg label[data-mode-pane] { display: flex; }
.new-dlg [data-mode-pane][hidden] { display: none !important; }
.pick-tools { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.pick-tools input, .pick-tools select { min-height: 40px; min-width: 0; }
.pick-tools select { max-width: 150px; }
.pick-list { max-height: min(42vh, 340px); overflow-y: auto; border: 1px solid var(--line, #DCDDD7); border-radius: 10px; -webkit-overflow-scrolling: touch; }
.pick-row { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 12px; border-top: 1px solid var(--line-2, #ECEDE8); cursor: pointer; }
.pick-row:first-child { border-top: 0; }
.pick-row[hidden] { display: none; }
.pick-row input { width: 18px; height: 18px; flex: none; accent-color: var(--ink, #15181C); }
.pick-row i { width: 4px; align-self: stretch; border-radius: 2px; flex: none; }
.pick-row:has(input:checked) { background: #EEF3FC; }
.pick-tt { display: flex; flex-direction: column; min-width: 0; }
.pick-tt b { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-empty { padding: 12px; margin: 0; }
.pick-tools input[type=search] { border: 1px solid var(--line, #DCDDD7); border-radius: 8px; padding: 0 10px; font: inherit; background: #fff; -webkit-appearance: none; appearance: none; }
