/* Kolory firmy: czerwień, czerń, biel */
:root {
  --red: #d71920;
  --red-dark: #a51117;
  --black: #0d0d0d;
  --gray: #1f1f1f;
  --light: #f4f4f4;
  --white: #ffffff;
}

* { box-sizing: border-box; }

/* Element z atrybutem hidden ma być zawsze ukryty */
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--light);
  color: var(--black);
  -webkit-tap-highlight-color: transparent;
}

/* Górny pasek */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  padding-top: calc(14px + env(safe-area-inset-top));
  background: var(--black);
  color: var(--white);
  border-bottom: 4px solid var(--red);
}
.logo { font-size: 20px; font-weight: 800; letter-spacing: 0.5px; }
.logo span { color: var(--red); }
.clock { font-size: 18px; font-variant-numeric: tabular-nums; }

main {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Karta statusu – kolor zależy od stanu */
.status {
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  color: var(--white);
  background: var(--gray);
  transition: background 0.2s;
}
.status[data-state="work"]  { background: var(--red); }
.status[data-state="break"] { background: var(--black); outline: 3px solid var(--red); }
.status-label { font-size: 22px; font-weight: 800; }
.status-project { margin-top: 4px; font-size: 15px; opacity: 0.9; }
.status-timer {
  margin-top: 12px;
  font-size: 44px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Zwykła biała karta */
.card {
  background: var(--white);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.card h2 { margin: 0 0 12px; font-size: 18px; }
.field-label { display: block; font-weight: 700; margin-bottom: 8px; }

select {
  width: 100%;
  font-size: 17px;
  padding: 14px;
  border: 2px solid var(--black);
  border-radius: 12px;
  background: var(--white);
  color: var(--black);
}
select:focus { outline: none; border-color: var(--red); }

/* Przyciski – duże, łatwe do kliknięcia palcem */
.actions { display: flex; flex-direction: column; gap: 12px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.btn {
  width: 100%;
  min-height: 60px;
  font-size: 18px;
  font-weight: 700;
  border-radius: 14px;
  border: 2px solid var(--black);
  cursor: pointer;
  transition: transform 0.05s, opacity 0.2s;
}
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled { opacity: 0.35; cursor: not-allowed; }

.btn-start { background: var(--red); border-color: var(--red); color: var(--white); }
.btn-dark  { background: var(--black); color: var(--white); }
.btn-light { background: var(--white); color: var(--black); }
.btn-light.active { background: var(--red); border-color: var(--red); color: var(--white); }
.btn-end   { background: var(--white); color: var(--red); border-color: var(--red); }

/* Podsumowanie i lista zdarzeń */
.summary { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.summary div {
  background: var(--light);
  border-radius: 12px;
  padding: 10px;
  text-align: center;
}
.summary span { display: block; font-size: 13px; color: #666; }
.summary strong { font-size: 22px; font-variant-numeric: tabular-nums; }

.log { list-style: none; margin: 0; padding: 0; }
.log li {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid #eee;
  font-size: 15px;
}
.log time { font-weight: 700; color: var(--red); font-variant-numeric: tabular-nums; }
.log .empty { color: #888; }

.link-btn {
  margin-top: 12px;
  background: none;
  border: none;
  color: #888;
  text-decoration: underline;
  font-size: 14px;
  padding: 0;
  cursor: pointer;
}

/* Pasek z imieniem pracownika */
.who {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 480px;
  margin: 0 auto;
  padding: 10px 16px 0;
  font-size: 15px;
}
.link-btn.light { margin: 0; color: var(--red); font-weight: 700; }

/* Informacja o zapisie w bazie */
.sync {
  font-size: 14px;
  text-align: center;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--white);
}
.sync[data-state="ok"] { color: #1a7f37; }
.sync[data-state="wait"] { color: #555; }
.sync[data-state="error"] { color: var(--white); background: var(--red); }

/* Okienko z imieniem */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.75);
}
.modal[hidden] { display: none; }
.modal-box {
  width: 100%;
  max-width: 400px;
  background: var(--white);
  border-radius: 16px;
  border-top: 6px solid var(--red);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.modal-box h2 { margin: 0; }
.modal-box p { margin: 0; color: #555; }

/* Logowanie PIN-em */
.pin-input {
  width: 100%;
  font-size: 30px;
  letter-spacing: 10px;
  text-align: center;
  padding: 10px;
  border: 2px solid var(--black);
  border-radius: 10px;
}
.pin-input:focus { outline: 3px solid var(--red); }
.modal-box .login-msg { color: var(--red); font-weight: 700; }
.modal-box .login-msg.info { color: #333; font-weight: 400; }
.who-tag { font-size: 12px; color: #777; font-weight: 400; }
.who-tag.ok { color: #1a7f37; }

/* Panel szefa: PIN i logowanie */
.pin-card { border: 2px solid var(--black); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.pin-card h3 { margin: 0; font-size: 16px; }
.pin-show { font-size: 40px; font-weight: 800; letter-spacing: 8px; text-align: center; background: var(--black); color: var(--white); border-radius: 10px; padding: 10px; font-family: monospace; }
.acc-tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 8px; background: #eee; color: #555; }
.acc-tag.on { background: #1a7f37; color: #fff; }
.acc-tag.pin { background: var(--black); color: #fff; }
.acc-tag.lock, .acc-tag.none { background: var(--red); color: #fff; }
.legacy-card { display: flex; flex-direction: column; gap: 8px; }
.legacy-card .btn { margin: 0; }

/* ================= Panel szefa ================= */
.top-sub { font-size: 14px; color: #ccc; }
.muted { color: #777; }
.small { font-size: 13px; }
.center { text-align: center; }
.form-error { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--red); color: var(--white); font-size: 14px; }
.form-error[hidden] { display: none; }

.login { display: flex; flex-direction: column; gap: 8px; }
.login h2, .login p { margin: 0; }
.login input {
  font-size: 17px;
  padding: 14px;
  border: 2px solid var(--black);
  border-radius: 12px;
  margin-bottom: 6px;
}
.login input:focus { outline: none; border-color: var(--red); }

.toolbar { display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.toolbar .link-btn { margin: 0 0 0 14px; }

/* Wybór okresu */
.periods {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  position: sticky;
  top: 58px;
  z-index: 5;
  padding: 6px 0;
  background: var(--light);
}
.periods button {
  min-height: 46px;
  padding: 4px;
  font-size: 13px;
  font-weight: 700;
  border: 2px solid var(--black);
  border-radius: 10px;
  background: var(--white);
  color: var(--black);
  cursor: pointer;
}
.periods button.active { background: var(--red); border-color: var(--red); color: var(--white); }
.period-label { margin: -8px 0 0; text-align: center; font-weight: 700; }
.warn-banner {
  display: block;
  padding: 12px;
  border-radius: 12px;
  background: var(--black);
  color: var(--white);
  text-align: center;
  font-weight: 700;
  text-decoration: none;
  border-left: 6px solid var(--red);
}
.warn-banner[hidden] { display: none; }

/* Wiersze listy */
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { padding: 10px 0; border-top: 1px solid #eee; }
.rows li:first-child { border-top: none; }
.row-main { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.badge.work { background: var(--red); color: var(--white); }
.badge.break { background: var(--black); color: var(--white); }
.badge.off { background: #e6e6e6; color: #555; }
.badge.mini { padding: 1px 6px; font-size: 11px; }

/* Rozwijane grupy */
.group { border-top: 1px solid #eee; }
.group:first-child { border-top: none; }
.group summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  cursor: pointer;
  list-style: none;
}
.group summary::-webkit-details-marker { display: none; }
.group summary > span:first-child::before {
  content: '▸ ';
  color: var(--red);
}
.group[open] summary > span:first-child::before { content: '▾ '; }
.right { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

.sub { list-style: none; margin: 0 0 10px; padding: 0 0 0 14px; border-left: 3px solid var(--red); }
.sub li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; font-size: 14px; }

.total {
  display: flex;
  justify-content: space-between;
  padding: 12px 0 0;
  margin-top: 4px;
  border-top: 2px solid var(--black);
  font-weight: 700;
}

/* Ostrzeżenia */
.warn { padding: 10px 12px !important; margin-bottom: 8px; border-radius: 10px; border: none !important; font-size: 14px; }
.warn.red { background: #fde8e8; border-left: 5px solid var(--red) !important; }
.warn.orange { background: #fff3e0; border-left: 5px solid #e67700 !important; }
.warn.grey { background: var(--light); border-left: 5px solid #999 !important; }
.warn-mark { color: var(--red); font-weight: 700; }
.ok-msg { color: #1a7f37; font-weight: 700; }

/* Link do panelu szefa na ekranie pracownika */
.boss-link { display: block; text-align: center; color: #999; font-size: 13px; margin: 0 0 24px; }

/* ================= Panel szefa: zarządzanie ================= */
.tabs { display: flex; flex-wrap: wrap; background: var(--black); border-radius: 12px; padding: 4px; gap: 4px; }
.tabs button {
  min-height: 44px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--white);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
.tabs button.active { background: var(--red); }
#viewTab, #planTab, #manageTab, #entriesTab, #tasksTab { display: flex; flex-direction: column; gap: 16px; }
.periods.three { grid-template-columns: repeat(3, 1fr); }
.periods.three button { font-size: 15px; }

.rows li.tap { cursor: pointer; }
.rows li.tap:active { background: var(--light); }
a.tel { color: var(--red); font-weight: 700; text-decoration: none; }
#inactiveBox { margin-top: 8px; }
#inactiveBox summary { color: #777; }

/* Formularz w okienku */
.form-box { max-height: 92vh; overflow-y: auto; gap: 6px; }
.form-box .field-label { margin: 8px 0 4px; }
.form-box input, .form-box textarea, .form-box select {
  width: 100%;
  font-size: 17px;
  padding: 12px;
  border: 2px solid var(--black);
  border-radius: 12px;
  background: var(--white);
  font-family: inherit;
}
.form-box textarea { resize: vertical; }
.form-box input:focus, .form-box textarea:focus, .form-box select:focus { outline: none; border-color: var(--red); }
.form-box .btn { margin-top: 6px; }
.hint { margin: 4px 0 0 !important; }
.center-btn { display: block; margin: 10px auto 0; font-size: 16px; }
#rateFromBox { background: #fff3e0; border-radius: 12px; padding: 4px 10px 10px; margin-top: 8px; }

/* ================= Panel szefa: plan pracy ================= */
.periods.two { grid-template-columns: 1fr 1fr; }
.small-btn { min-height: 52px; font-size: 15px; }

.week-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.nav-btn {
  width: 52px;
  height: 52px;
  flex: none;
  font-size: 30px;
  line-height: 1;
  font-weight: 700;
  border: 2px solid var(--black);
  border-radius: 12px;
  background: var(--white);
  cursor: pointer;
}
.week-label { text-align: center; display: flex; flex-direction: column; gap: 2px; }
.week-label .link-btn { margin: 0; font-size: 13px; }

/* Siatka: przewijana w bok, kolumna z imionami stoi w miejscu */
.grid-wrap { overflow-x: auto; margin: 8px -12px 0; padding: 0 2px; -webkit-overflow-scrolling: touch; }
.plan-grid { border-collapse: separate; border-spacing: 2px; min-width: 100%; }
.plan-grid th { font-size: 12px; font-weight: 700; padding: 2px 0; text-align: center; }
.plan-grid th span { font-weight: 400; color: #777; }
.plan-grid th.today { color: var(--red); }
.plan-grid th.today span { color: var(--red); }
.plan-grid .name-col {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--white);
  text-align: left;
  font-size: 13px;
  min-width: 66px;
  max-width: 84px;
  padding-right: 6px;
  line-height: 1.2;
}
.plan-grid td { padding: 0; }
.plan-grid td.today .cell { box-shadow: inset 0 0 0 2px var(--red); }

.cell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 37px;
  height: 40px;
  border-radius: 7px;
  border: 2px solid transparent;
  font-size: 11px;
  letter-spacing: -0.3px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  padding: 0;
}
.cell.empty { background: var(--light); color: #bbb; border-color: #e3e3e3; }
.cell.s0 { background: var(--red); color: var(--white); }
.cell.s1 { background: var(--black); color: var(--white); }
.cell.s2 { background: #6b6b6b; color: var(--white); }
.cell.s3 { background: #8b0f14; color: var(--white); }
.cell.s4 { background: var(--white); color: var(--red); border-color: var(--red); }
.cell.s5 { background: var(--white); color: var(--black); border-color: var(--black); }
.cell.s6 { background: #f6c9cb; color: #8b0f14; }
.cell.s7 { background: #d9d9d9; color: var(--black); }
.cell.ended { opacity: 0.55; text-decoration: line-through; }
.note-dot { position: absolute; top: -3px; right: 1px; font-style: normal; font-size: 11px; }
.cell.empty .note-dot { color: var(--black); }

.legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 12px; font-size: 13px; }
.chip { display: inline-flex; align-items: center; gap: 6px; }
.chip .cell, .proj-block .cell { width: auto; min-width: 40px; height: 24px; padding: 0 6px; cursor: default; }

.proj-block { padding: 10px 0; border-top: 1px solid #eee; }
.proj-block:first-child { border-top: none; }
.proj-block h3 { margin: 0 0 6px; font-size: 16px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.plan-days { list-style: none; margin: 0; padding: 0; }
.plan-days li { display: flex; gap: 10px; padding: 4px 0; font-size: 14px; }
.plan-days .day { flex: none; width: 62px; font-weight: 700; color: #555; }
.plan-days .day.today { color: var(--red); }

/* Zaznaczanie dni w okienku */
.day-checks { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.day-check { position: relative; }
.day-check input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.day-check span {
  display: block;
  text-align: center;
  padding: 8px 0;
  border: 2px solid var(--black);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}
.day-check input:checked + span { background: var(--red); border-color: var(--red); color: var(--white); }
.day-check input:focus-visible + span { outline: 3px solid var(--black); }

/* ================= Aplikacja pracownika: Mój plan ================= */
.plan-list { list-style: none; margin: 0; padding: 0; }
.plan-list li { padding: 10px 0; border-top: 1px solid #eee; }
.plan-list li:first-child { border-top: none; }
.plan-list .plan-day { font-size: 13px; color: #777; font-weight: 700; }
.plan-list .plan-day.today { color: var(--red); }
.plan-list .plan-what { font-size: 17px; font-weight: 800; }
.plan-list .plan-what.free { color: #999; font-weight: 600; }
.plan-list .plan-note { font-size: 14px; color: #444; margin-top: 2px; }
.plan-hint { margin: 8px 0 0; font-size: 13px; color: #1a7f37; font-weight: 700; }

/* ================= Panel szefa: wpisy i poprawki ================= */
.tabs button { flex: 1 1 auto; font-size: 15px; padding: 0 8px; }
.entries-pick { display: flex; flex-direction: column; gap: 8px; }
.day-input { flex: 1; min-width: 0; font-size: 17px; padding: 10px; border: 2px solid var(--black); border-radius: 10px; text-align: center; }
.entry-row { display: grid; grid-template-columns: 56px 1fr; gap: 8px; align-items: start; }
.entry-time { font-weight: 800; font-size: 17px; }
.entry-what strong { display: block; }
.entry-tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 6px; background: var(--black); color: #fff; margin-left: 4px; vertical-align: middle; }
.entry-old .entry-time, .entry-old .entry-what strong { text-decoration: line-through; color: #888; }
.entry-missing { color: var(--red); font-weight: 700; }
.fix-link { margin-left: 6px; font-size: 14px; }
.form-box .row { gap: 8px; }
.form-box .row > div { min-width: 0; }
.form-box input[type="date"], .form-box input[type="time"] { min-width: 0; padding: 12px 8px; }

/* ================= Plan a godziny ================= */
.cell.cmp-ok { background: #1a7f37; color: #fff; }
.cell.cmp-part { background: #fff; color: #1a7f37; border: 2px solid #1a7f37; }
.cell.cmp-diff { background: #e67700; color: #fff; }
.cell.cmp-miss { background: var(--red); color: #fff; }
.cell.cmp-extra { background: var(--white); color: var(--black); border: 2px dashed var(--black); }
.cell.cmp-plan { background: var(--light); color: #777; border-color: #ccc; }
.cell.cmp-none { background: transparent; border-color: #eee; }
.cell[disabled] { cursor: default; }
.cmp-sum { font-size: 12px; font-weight: 800; text-align: center; padding: 0 2px; }
.cmp-legend .cell { font-size: 12px; }
#cmpDiffs .warn { padding: 8px 10px; border-radius: 8px; margin-top: 6px; }

/* ================= Zadania ================= */
.task-list { list-style: none; margin: 0; padding: 0; }
.task { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px solid #eee; cursor: pointer; }
.task:first-child { border-top: none; }
.task:active { background: var(--light); }
.task-check { flex: 0 0 26px; height: 26px; border: 2px solid var(--black); border-radius: 7px; display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; }
.task.done .task-check { background: #1a7f37; border-color: #1a7f37; }
.task.done .task-main strong { text-decoration: line-through; color: #888; }
.task-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.task-main strong { overflow-wrap: anywhere; }
.task-mine { color: var(--red); font-weight: 700; }
.note-hide { margin-top: 4px; font-size: 13px; }
.task-late { color: var(--red); font-weight: 700; }
.task-today { color: #e67700; font-weight: 700; }
.task-ok { color: #1a7f37; font-weight: 700; }
.task-box { max-height: 92vh; overflow-y: auto; }
.task-box h2 { overflow-wrap: anywhere; }
.task-box h3 { margin: 12px 0 4px; font-size: 16px; }
.task-desc { white-space: pre-wrap; background: var(--light); border-radius: 10px; padding: 10px; margin: 4px 0; }
.subtasks { margin: 4px 0 8px; padding-left: 8px; border-left: 3px solid var(--red); }
.subtasks .subs-title { padding: 0 0 4px; border: none; }
.back-btn { align-self: flex-start; font-size: 15px; }
.notes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.note { background: var(--light); border-radius: 10px; padding: 8px 10px; }
.note.boss { background: #fde8e8; }
.note-head { display: flex; justify-content: space-between; gap: 8px; }
.note-body { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 2px; }
.note-photo img, .photo-preview img { display: block; max-width: 100%; max-height: 260px; border-radius: 8px; margin-top: 6px; cursor: zoom-in; }
.photo-preview { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.file-btn { display: flex; align-items: center; justify-content: center; cursor: pointer; margin: 0; }
.photo-view { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,0.92); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 10px; }
.photo-view img { max-width: 100%; max-height: 88vh; border-radius: 6px; }
.photo-view span { color: #ccc; font-size: 14px; }
.notes-title { border-top: 1px solid #eee; padding-top: 10px; }
.owner-sub { padding-left: 36px; }
.task-archived .task-main strong { color: #888; }

/* Długie okienka (np. zadanie): pola nie mogą się ściskać, tylko okienko się przewija */
.form-box > *, .form-box #otMore > * { flex-shrink: 0; }
.form-box .row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.form-box input[type="date"] { width: 100%; max-width: 100%; min-height: 52px; display: block; -webkit-appearance: none; appearance: none; }

/* =====================================================================
   NOWY WYGLĄD (grudzień 2026): mniejsze napisy, cieńsze ramki,
   spokojniejszy, nowoczesny styl. Kolory bez zmian: czerwony, czarny, biały.
   (Pola wpisywania zostają 16px – mniejsze iPhone powiększa przy pisaniu.)
   ===================================================================== */
:root {
  --line: #e4e4e7;
  --line-strong: #c9c9cf;
  --muted: #6b6b73;
  --bg: #f4f4f5;
  --radius: 12px;
}
body { background: var(--bg); color: #111113; font-size: 15px; line-height: 1.4; -webkit-font-smoothing: antialiased; }

/* Górny pasek */
.top { padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top)); border-bottom-width: 3px; }
.logo { font-size: 17px; letter-spacing: 0.2px; display: flex; align-items: center; gap: 8px; }
.logo-crown { height: 22px; width: auto; display: block; }
.clock, .top-sub { font-size: 14px; color: #d4d4d8; }
main { gap: 12px; padding: 12px 14px 16px; }

/* Imię pracownika */
.who { font-size: 14px; padding: 10px 14px 0; color: var(--muted); }
.who strong { color: #111113; }
.who-tag { font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 6px; background: #e4e4e7; color: var(--muted); margin-left: 4px; }
.who-tag.ok { background: #e7f4ea; color: #1a7f37; }
.link-btn { font-size: 13px; }
.link-btn.light { font-size: 14px; font-weight: 600; text-decoration: none; }

/* Karty */
.card { border-radius: var(--radius); padding: 14px; border: 1px solid var(--line); box-shadow: none; }
.card h2 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 0 0 10px; }
.field-label { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 6px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }

/* Status pracy */
.status { border-radius: 14px; padding: 14px 16px; }
.status[data-state="break"] { outline-width: 2px; }
.status-label { font-size: 15px; font-weight: 700; letter-spacing: 0.02em; }
.status-project { font-size: 13px; margin-top: 2px; }
.status-timer { font-size: 34px; margin-top: 6px; font-weight: 700; letter-spacing: 0.5px; }
.sync { font-size: 12.5px; padding: 6px 10px; border: 1px solid var(--line); }

/* Pola wyboru i wpisywania */
select, .login input, .form-box input, .form-box textarea, .form-box select, .day-input {
  font-size: 16px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 10px; min-height: 44px;
}
select:focus, .login input:focus, .form-box input:focus, .form-box textarea:focus, .form-box select:focus, .day-input:focus {
  border-color: var(--red); box-shadow: 0 0 0 3px rgba(215, 25, 32, 0.15);
}
.form-box input[type="date"] { min-height: 44px; }
.form-box .field-label, .modal-box .field-label { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 600; color: #3f3f46; margin: 8px 0 4px; }

/* Przyciski */
.actions { gap: 8px; }
.row { gap: 8px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; font-size: 15px; font-weight: 600; border-radius: 10px; border-width: 1px; padding: 0 14px; letter-spacing: 0.1px;
}
.btn-light { border-color: var(--line-strong); }
.btn-end { border-width: 1.5px; }
.btn:disabled { opacity: 0.3; }
.small-btn { min-height: 40px; font-size: 14px; }
.file-btn { display: flex; }

/* Podsumowanie dnia i lista zdarzeń */
.summary { gap: 8px; margin-bottom: 8px; }
.summary div { border-radius: 10px; padding: 8px; }
.summary span { font-size: 12px; color: var(--muted); }
.summary strong { font-size: 19px; }
.log li { font-size: 14px; padding: 7px 0; border-color: var(--line); }

/* Okienka */
.modal { background: rgba(0, 0, 0, 0.6); padding: 16px; }
.modal-box { border-radius: 14px; border-top-width: 4px; padding: 18px; gap: 10px; }
.modal-box h2 { font-size: 18px; }
.modal-box p { font-size: 14px; }
.pin-input { font-size: 24px; letter-spacing: 8px; padding: 8px; border: 1px solid var(--line-strong); }
.pin-input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(215, 25, 32, 0.15); }

/* Plan pracownika */
.plan-list li { padding: 8px 0; border-color: var(--line); }
.plan-list .plan-day { font-size: 12px; }
.plan-list .plan-what { font-size: 15px; font-weight: 700; }
.plan-list .plan-note { font-size: 13px; }
.plan-hint { font-size: 12.5px; }

/* Panel szefa */
.toolbar { font-size: 13px; color: var(--muted); }
.toolbar .link-btn { font-size: 13px; text-decoration: none; font-weight: 600; }
.tabs { background: #e4e4e7; border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { min-height: 34px; font-size: 13.5px; font-weight: 600; color: #3f3f46; border-radius: 8px; padding: 0 8px; white-space: nowrap; }
.tabs button.active { background: var(--white); color: var(--red); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }
.periods { gap: 4px; padding: 4px 0; top: 47px; background: var(--bg); }
.periods button { min-height: 34px; font-size: 12.5px; font-weight: 600; border: 1px solid var(--line-strong); border-radius: 8px; }
.periods.three button { font-size: 13px; }
.periods button.active { background: var(--black); border-color: var(--black); }
.period-label { font-size: 14px; margin: -4px 0 0; }
.warn-banner { padding: 10px 12px; border-radius: 10px; font-size: 14px; border-left-width: 4px; }

.rows li { padding: 9px 0; border-color: var(--line); }
.rows li strong { font-size: 15px; font-weight: 600; }
.rows .muted, .rows .small { font-size: 13px; }
.badge { font-size: 11px; font-weight: 600; padding: 2px 8px; }
.badge.off { background: #f0f0f2; color: var(--muted); }
.acc-tag { font-size: 11px; font-weight: 600; border-radius: 6px; }
.group { border-color: var(--line); }
.group summary { padding: 10px 0; font-size: 14px; }
.sub li { font-size: 13px; padding: 4px 0; }
.sub { border-left-width: 2px; }
.total { font-size: 14px; border-top-width: 1px; }
.warn { font-size: 13px; padding: 8px 10px !important; border-radius: 8px; }
.warn.red, .warn.orange, .warn.grey { border-left-width: 3px !important; }
.form-error { font-size: 13px; padding: 8px 10px; }
.pin-card { border: 1px solid var(--line-strong); }
.pin-card h3 { font-size: 14px; }
.pin-show { font-size: 30px; letter-spacing: 6px; padding: 8px; }
.center-btn { font-size: 14px; }
.boss-link { font-size: 12px; }

/* Plan w panelu */
.nav-btn { width: 40px; height: 40px; font-size: 22px; border: 1px solid var(--line-strong); border-radius: 10px; }
.week-label { font-size: 14px; }
.legend { font-size: 12px; gap: 6px 12px; }
.proj-block { border-color: var(--line); }
.proj-block h3 { font-size: 14px; }
.plan-days li { font-size: 13px; }
.day-check span { border: 1px solid var(--line-strong); font-size: 11.5px; padding: 7px 0; }

/* Wpisy */
.entry-time { font-size: 15px; font-weight: 700; }
.fix-link { font-size: 13px; }

/* Zadania */
.task { padding: 9px 0; border-color: var(--line); gap: 10px; }
.task-main strong { font-size: 15px; font-weight: 600; }
.task-main .small, .task-main .muted { font-size: 12.5px; }
.task-check { flex-basis: 20px; height: 20px; border: 1.5px solid var(--line-strong); border-radius: 6px; font-size: 13px; margin-top: 1px; }
.task-box h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.task-desc { font-size: 14px; }
.note { font-size: 14px; }
.notes-title { border-color: var(--line); }
.subtasks { border-left-width: 2px; }
.back-btn { font-size: 14px; }

/* Ikony: proste, jednokolorowe (kolor = kolor tekstu). Użycie: class="ic ic-coffee" */
.ic::before, .ic-i { content: ''; display: inline-block; flex: none; width: 1.1em; height: 1.1em; background: currentColor; -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat; vertical-align: -0.17em; }
.ic::before { margin-right: 8px; }
.ic-i { width: 1em; height: 1em; margin-right: 3px; vertical-align: -0.12em; }
.ic-play { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 4.5v15l12-7.5z' fill='black' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.ic-stop { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='5' y='5' width='14' height='14' rx='2.5' fill='black'/%3E%3C/svg%3E"); }
.ic-swap { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M16 3l4 4-4 4M20 7H5M8 21l-4-4 4-4M4 17h15'/%3E%3C/svg%3E"); }
.ic-coffee { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M17 8h1a4 4 0 010 8h-1M3 8h14v8a5 5 0 01-5 5H8a5 5 0 01-5-5zM7 2v3M11 2v3M15 2v3'/%3E%3C/svg%3E"); }
.ic-food { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M3 2v7a2 2 0 002 2h4a2 2 0 002-2V2M7 2v20M21 15V2a5 5 0 00-5 5v6a2 2 0 002 2h3v7'/%3E%3C/svg%3E"); }
.ic-bell { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M6 8a6 6 0 0112 0c0 7 3 9 3 9H3s3-2 3-9M10.3 21a2 2 0 003.4 0'/%3E%3C/svg%3E"); }
.ic-camera { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M14.5 4h-5L7 7H4a2 2 0 00-2 2v9a2 2 0 002 2h16a2 2 0 002-2V9a2 2 0 00-2-2h-3z'/%3E%3Ccircle fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' cx='12' cy='13' r='3.5'/%3E%3C/svg%3E"); }
.ic-check { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='M20 6L9 17l-5-5'/%3E%3C/svg%3E"); }
.ic-download { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4M7 10l5 5 5-5M12 15V3'/%3E%3C/svg%3E"); }
.ic-undo { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M3 7v6h6M21 17a9 9 0 00-15-6.7L3 13'/%3E%3C/svg%3E"); }
.ic-lock { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M8 11V7a4 4 0 018 0v4'/%3E%3C/svg%3E"); }
.ic-chat { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z'/%3E%3C/svg%3E"); }
.ic-list { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M9 6h11M9 12h11M9 18h11'/%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M4 6l1 1 2-2M4 12l1 1 2-2M4 18l1 1 2-2'/%3E%3C/svg%3E"); }
.ic-alert { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M10.3 3.9L1.8 18a2 2 0 001.7 3h17a2 2 0 001.7-3L13.7 3.9a2 2 0 00-3.4 0zM12 9v4M12 17h.01'/%3E%3C/svg%3E"); }
.ic-pen { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M17 3l4 4L8 20H4v-4z'/%3E%3C/svg%3E"); }


/* =====================================================================
   CIEMNY WYGLĄD (jak nowoczesne panele): prawie czarne tło, ciemne karty
   z cienką ramką, czerwone akcenty, białe napisy.
   ===================================================================== */
:root {
  color-scheme: dark;
  --bg: #0b0b0d;
  --surface: #141417;
  --surface-2: #1b1b1f;
  --inset: #0e0e11;
  --line: #26262c;
  --line-strong: #34343c;
  --text: #ededf0;
  --muted: #8d8d98;
  --red-text: #ff5a61;
  --green: #3fbf6a;
}
body { background: var(--bg); color: var(--text); }
.top { background: #0e0e11; border-bottom: 2px solid var(--red); }
.logo { color: #fff; }

.who { color: var(--muted); }
.who strong { color: var(--text); }
.who-tag { background: var(--surface-2); color: var(--muted); }
.who-tag.ok { background: rgba(63, 191, 106, 0.14); color: var(--green); }
.link-btn { color: var(--muted); }
.link-btn.light, a.tel, .warn-mark, .entry-missing, .task-late, .task-mine { color: var(--red-text); }
.muted, .summary span { color: var(--muted); }

.card { background: var(--surface); border: 1px solid var(--line); }
.card h2, .field-label { color: var(--muted); }
.form-box .field-label, .modal-box .field-label { color: #b4b4bd; }

/* Status */
.status { background: var(--surface-2); border: 1px solid var(--line); }
.status[data-state="work"] { background: linear-gradient(160deg, #e0242b, #a8121a); border-color: #e0242b; box-shadow: 0 8px 28px rgba(215, 25, 32, 0.25); }
.status[data-state="break"] { background: var(--surface-2); outline: none; border: 1px solid var(--red); }
.status[data-state="break"] .status-timer { color: var(--red-text); }
.sync { background: var(--surface); border-color: var(--line); }
.sync[data-state="ok"] { color: var(--green); }
.sync[data-state="wait"] { color: var(--muted); }

/* Pola */
select, .login input, .form-box input, .form-box textarea, .form-box select, .day-input, .pin-input {
  background: var(--inset); color: var(--text); border-color: var(--line-strong);
}
select option { background: var(--surface); color: var(--text); }
::placeholder { color: #5f5f69; }

/* Przyciski */
.btn-dark { background: var(--surface-2); border-color: var(--line-strong); color: var(--text); }
.btn-light { background: transparent; border-color: var(--line-strong); color: var(--text); }
.btn-light.active { background: var(--red); border-color: var(--red); color: #fff; }
.btn-end { background: rgba(215, 25, 32, 0.08); border-color: var(--red); color: var(--red-text); }
.btn-start { box-shadow: 0 4px 14px rgba(215, 25, 32, 0.25); }
.btn-start:disabled { box-shadow: none; }

/* Dzień i lista */
.summary div { background: var(--inset); border: 1px solid var(--line); }
.log li, .plan-list li, .rows li, .group, .proj-block, .task, .notes-title { border-color: var(--line); }
.log time, .plan-list .plan-day.today, .plan-days .day.today { color: var(--red-text); }
.plan-list .plan-what.free { color: #6b6b75; }
.plan-list .plan-note { color: #a8a8b2; }
.plan-days .day { color: var(--muted); }
.plan-hint, .ok-msg, .task-ok { color: var(--green); }

/* Okienka */
.modal { background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.modal-box { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--red); color: var(--text); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6); }
.modal-box p { color: #a8a8b2; }
.modal-box .login-msg { color: var(--red-text); }
.modal-box .login-msg.info { color: #c4c4cc; }

/* Panel szefa */
.top-sub, .toolbar { color: var(--muted); }
.tabs { background: var(--surface); border: 1px solid var(--line); }
.tabs button { color: #a8a8b2; }
.tabs button.active { background: var(--red); color: #fff; box-shadow: 0 2px 10px rgba(215, 25, 32, 0.35); }
.periods { background: var(--bg); }
.periods button { background: var(--surface); border-color: var(--line); color: #c9c9d0; }
.periods button.active { background: var(--text); border-color: var(--text); color: #0b0b0d; }
.warn-banner { background: rgba(215, 25, 32, 0.12); color: #ffb3b6; border: 1px solid rgba(215, 25, 32, 0.4); border-left: 4px solid var(--red); }

.badge.work { background: rgba(215, 25, 32, 0.16); color: var(--red-text); border: 1px solid rgba(215, 25, 32, 0.45); }
.badge.break { background: rgba(230, 160, 0, 0.14); color: #f0b43c; border: 1px solid rgba(230, 160, 0, 0.4); }
.badge.off { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.acc-tag { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.acc-tag.on { background: rgba(63, 191, 106, 0.14); color: var(--green); border-color: rgba(63, 191, 106, 0.4); }
.acc-tag.pin { background: #000; color: #e4e4e7; border-color: var(--line-strong); }
.acc-tag.lock, .acc-tag.none { background: rgba(215, 25, 32, 0.16); color: var(--red-text); border-color: rgba(215, 25, 32, 0.45); }
.entry-tag { background: var(--surface-2); color: #c9c9d0; }
.total { border-top-color: var(--line-strong); }
.sub, .subtasks { border-left-color: var(--red); }
#inactiveBox summary { color: var(--muted); }

.warn.red { background: rgba(215, 25, 32, 0.1); color: #ffc9cb; }
.warn.orange { background: rgba(230, 119, 0, 0.1); color: #ffd29e; }
.warn.grey { background: var(--surface-2); color: #c4c4cc; }
.pin-card { border-color: var(--line-strong); background: var(--inset); }
.pin-show { background: #000; border: 1px solid var(--line-strong); }
#rateFromBox { background: rgba(230, 119, 0, 0.1); }
.task-today { color: #f0a03c; }

/* Plan w panelu */
.nav-btn { background: var(--surface); color: var(--text); border-color: var(--line-strong); }
.plan-grid th span { color: var(--muted); }
.plan-grid th.today, .plan-grid th.today span { color: var(--red-text); }
.plan-grid .name-col { background: var(--surface); }
.cell.empty { background: var(--inset); color: #4a4a52; border-color: var(--line); }
.cell.s1 { background: #000; border-color: #4a4a52; }
.cell.s5 { background: #e9e9ec; }
.cell.empty .note-dot { color: var(--text); }
.cell.cmp-part { background: transparent; color: var(--green); border-color: var(--green); }
.cell.cmp-ok { background: #1f8f45; }
.cell.cmp-extra { background: transparent; color: var(--text); border-color: var(--text); }
.cell.cmp-plan { background: var(--surface-2); color: var(--muted); border-color: var(--line-strong); }
.cell.cmp-none { border-color: var(--line); }
.day-check span { border-color: var(--line-strong); color: #c9c9d0; }
.day-check input:focus-visible + span { outline-color: var(--text); }

/* Zadania */
.task:active, .rows li.tap:active { background: var(--surface-2); }
.task-check { border-color: var(--line-strong); }
.task.done .task-check { background: #1f8f45; border-color: #1f8f45; }
.task.done .task-main strong, .task-archived .task-main strong, .entry-old .entry-time, .entry-old .entry-what strong { color: #6b6b75; }
.task-desc { background: var(--inset); border: 1px solid var(--line); }
.note { background: var(--surface-2); border: 1px solid var(--line); }
.note.boss { background: rgba(215, 25, 32, 0.1); border-color: rgba(215, 25, 32, 0.35); }
.boss-link { color: #5f5f69; }

/* ===== Jeszcze trochę mniejsze napisy i przyciski ===== */
body { font-size: 14px; }
.logo { font-size: 16px; }
.logo-crown { height: 20px; }
.card { padding: 12px 13px; }
.card h2, .field-label { font-size: 11.5px; margin-bottom: 8px; }
.status { padding: 12px 14px; }
.status-label { font-size: 14px; }
.status-project { font-size: 12.5px; }
.status-timer { font-size: 30px; margin-top: 4px; }
.btn { min-height: 44px; font-size: 14px; border-radius: 9px; }
.small-btn { min-height: 38px; font-size: 13px; }
select, .login input, .form-box input, .form-box textarea, .form-box select, .day-input { min-height: 42px; padding: 8px 11px; }
.summary strong { font-size: 17px; }
.summary span { font-size: 11.5px; }
.log li, .plan-days li { font-size: 13px; }
.tabs button { min-height: 32px; font-size: 13px; }
.periods button { min-height: 32px; font-size: 12px; }
.periods.three button { font-size: 12.5px; }
.rows li strong, .task-main strong { font-size: 14px; }
.rows .muted, .rows .small, .task-main .small { font-size: 12px; }
.plan-list .plan-what { font-size: 14px; }
.who { font-size: 13px; }
.sync { font-size: 12px; padding: 5px 10px; }
.nav-btn { width: 36px; height: 36px; font-size: 20px; }
.modal-box h2 { font-size: 17px; }
.modal-box p { font-size: 13.5px; }
.form-box .field-label, .modal-box .field-label { font-size: 12.5px; }

/* ===== Plan: wykres z paskami (Gantt) ===== */
#planSpan, #planModes { position: static; padding: 0; }
.gantt-wrap { overflow-x: auto; margin: 6px -13px 0; padding: 0 13px 4px; -webkit-overflow-scrolling: touch; }
.gantt { --g-name: 104px; --g-day: 34px; display: flex; flex-direction: column; min-width: 100%; width: max-content; }
.gantt.g7 { width: 100%; --g-day: 28px; }
.gantt.g14 { --g-day: 30px; }
.gantt.g28 { --g-day: 30px; }
.g-row { display: grid; grid-auto-rows: 36px; align-items: center; position: relative; border-bottom: 1px solid var(--line); }
.g-row > * { grid-row: 1; }
.g-head { grid-auto-rows: 34px; border-bottom: 1px solid var(--line-strong); }
.g-name {
  grid-column: 1; position: sticky; left: 0; z-index: 3; height: 100%;
  display: flex; align-items: center; gap: 7px; padding-right: 6px;
  background: var(--surface); font-size: 12.5px; font-weight: 600; min-width: 0;
}
.g-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-av {
  flex: none; width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-style: normal; font-size: 9.5px; font-weight: 800; color: #fff; letter-spacing: 0.2px;
}
.g-day { text-align: center; font-size: 11.5px; font-weight: 700; line-height: 1.15; color: #c9c9d0; height: 100%; display: flex; flex-direction: column; justify-content: center; }
.g-day span { display: block; font-size: 9.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.g-day.we { color: var(--muted); }
.g-day.today { color: var(--red-text); }
.g-day.today span { color: var(--red-text); }
.g-cell {
  height: 100%; border: none; border-left: 1px solid rgba(255, 255, 255, 0.04); background: transparent;
  padding: 0; cursor: pointer; position: relative;
}
.g-cell.we { background: rgba(255, 255, 255, 0.025); }
.g-cell.mon { border-left-color: var(--line-strong); }
.g-cell.today { background: rgba(215, 25, 32, 0.09); box-shadow: inset 1px 0 0 rgba(215, 25, 32, 0.5), inset -1px 0 0 rgba(215, 25, 32, 0.5); }
.g-cell:hover { background: rgba(255, 255, 255, 0.06); }
.g-note { position: absolute; left: 50%; bottom: 3px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: #f0b43c; z-index: 2; }
.g-bar {
  height: 24px; margin: 0 2px; border-radius: 6px; pointer-events: none; z-index: 1; min-width: 0; contain: inline-size;
  background: color-mix(in srgb, var(--c) 24%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 60%, transparent);
  border-left: 3px solid var(--c);
  display: flex; align-items: center; padding: 0 6px; overflow: hidden;
}
.g-bar span { font-size: 11px; font-weight: 600; color: #f4f4f5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-bar.ended { opacity: 0.5; }
.dot { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; font-style: normal; vertical-align: -1px; }
#planLegend .chip { font-size: 12px; color: #c9c9d0; }
.proj-block h3 { margin-bottom: 4px; }
.proj-block .gantt-wrap, .proj-block .gantt { margin-top: 2px; }
#planByProject .proj-block { overflow-x: auto; }

/* ===== Panel szefa na komputerze: szerszy układ (telefon bez zmian) ===== */
@media (min-width: 900px) {
  body.boss main#panelView { max-width: 1280px; padding: 20px 28px; }
  body.boss .top { padding-left: max(28px, calc((100vw - 1280px) / 2 + 28px)); padding-right: max(28px, calc((100vw - 1280px) / 2 + 28px)); }
  body.boss .tabs { max-width: 760px; width: 100%; margin: 0 auto; }

  /* Podgląd: karty obok siebie */
  #viewTab { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
  #viewTab > * { grid-column: 1 / -1; }
  #viewTab > section.card:nth-of-type(2),
  #viewTab > section.card:nth-of-type(3),
  #viewTab > section.card:nth-of-type(4) { grid-column: auto; }
  #viewTab > #warnings { grid-column: 1 / 3; }
  #viewTab > #exportCard { grid-column: 3 / 4; }
  #viewTab > .periods { max-width: 760px; width: 100%; justify-self: center; }

  /* Plan: większe kratki */
  .plan-grid { border-spacing: 4px; }
  .plan-grid th { font-size: 14px; }
  .plan-grid .name-col { font-size: 15px; min-width: 120px; max-width: 200px; }
  .plan-grid td .cell { width: 100%; min-width: 60px; height: 52px; font-size: 14px; }
  .week-nav, #planSpan, #planModes, #planButtons { max-width: 760px; width: 100%; margin-left: auto; margin-right: auto; }
  #planTab { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
  #planTab > * { grid-column: 1 / -1; }
  .gantt { --g-name: 170px; }
  .gantt.g7 { --g-day: 90px; }
  .gantt.g14 { width: 100%; --g-day: 50px; }
  .gantt.g28 { width: 100%; --g-day: 32px; }
  .g-row { grid-auto-rows: 40px; }
  .g-name { font-size: 13.5px; }
  #planTab > #planCompareProjects { grid-column: 1 / 2; }
  #planTab > #planCompareDiffs { grid-column: 2 / 3; }

  /* Wpisy, Zadania, Zarządzanie: wygodna szerokość listy */
  #entriesTab, #tasksTab, #manageTab { max-width: 900px; width: 100%; margin: 0 auto; }
}
