@font-face {
  font-family: "General Sans";
  src: url("assets/fonts/GeneralSans-Variable.woff2") format("woff2");
  font-weight: 200 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #1c1c0d;
  --ink-soft: #2b2b17;
  --ink-line: #36361f;
  --lime: #d6f60c;
  --lime-dark: #bfdc00;
  --lime-tint: #f1f9c8;
  --forest: #244000;
  --stone: #dedddf;
  --bg: #f4f4f2;
  --panel: #ffffff;
  --text: #1c1c0d;
  --muted: #66665a;
  --muted-dark: #a5a591;
  --line: #dedddf;
  --ok: #244000;
  --warn: #8a5a00;
  --bad: #b3261e;
  --warn-on-dark: #f0a030;

  --steel-1: var(--muted);
  --hazard: var(--warn);
  --go: var(--ok);
  --safety: var(--lime-dark);
  --ink-2: var(--bg);

  --accent: #244000;
  --notice-bg: #eef7c4;
  --chip-bg: #dedddf;
  --chip-fg: #4d4d42;
  --ok-bg: #e4f2b8;
  --ok-fg: #244000;
  --warn-bg: #fdf0d0;
  --warn-fg: #8a5a00;
  --bad-bg: #fbe1de;
  --bad-fg: #b3261e;
  --bad-line: #e8bcb8;
  --press: #ebebe6;
  --float: rgba(255, 255, 255, 0.85);
  --cur-border: #1c1c0d;
  color-scheme: light;

  --radius: 6px;
  --radius-btn: 8px;
  --sans: "General Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}


:root[data-theme="dark"] {
  --bg: #1c1c0d;
  --panel: #2b2b17;
  --text: #dedddf;
  --muted: #a5a591;
  --line: #42422a;
  --accent: #d6f60c;
  --lime-tint: #2f3410;
  --notice-bg: #2a3010;
  --chip-bg: #36361f;
  --chip-fg: #dedddf;
  --ok: #d6f60c;
  --ok-bg: #244000;
  --ok-fg: #d6f60c;
  --warn: #f0a030;
  --warn-bg: #3d2f0a;
  --warn-fg: #f0a030;
  --bad: #ff8a80;
  --bad-bg: #3f1a17;
  --bad-fg: #ff8a80;
  --bad-line: #6b2a25;
  --press: #36361f;
  --float: rgba(43, 43, 23, 0.9);
  --cur-border: #d6f60c;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: contain;
}
body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
::selection { background: var(--lime); color: var(--ink); }

button { font-family: inherit; }

#topbar {
  background: var(--ink);
  padding: 10px 14px;
  padding-top: max(10px, env(safe-area-inset-top));
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
#topbar .brand {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lime);
  line-height: 1.15;
}
.brand-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
#brand-logo {
  height: 34px;
  width: auto;
  flex-shrink: 0;
}
#topbar-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}
#syncstate {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted-dark);
}
#syncstate.is-online { color: var(--lime); }
#syncstate.is-offline { color: var(--warn-on-dark); }
#appversion {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-dark);
}
.version-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  letter-spacing: 0;
  text-transform: none;
}
#project-name-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-dark);
  max-width: 42vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.whatsnew-btn {
  width: 16px;
  height: 16px;
  padding: 0;
  border: 1px solid #6b6b52;
  border-radius: 50%;
  background: transparent;
  color: var(--muted-dark);
  font-size: 10px;
  font-weight: 700;
  font-family: inherit;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.whatsnew-btn:active {
  border-color: var(--lime);
  color: var(--lime);
}
.release-notes-version {
  font-weight: 700;
  font-size: 14px;
  margin-top: 14px;
}
.release-notes-version:first-child { margin-top: 0; }
.release-notes-date {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 500;
  margin-left: 6px;
}
.release-notes-items {
  margin: 6px 0 0;
  padding-left: 18px;
}
.release-notes-items li {
  font-size: 14px;
  margin-bottom: 6px;
  line-height: 1.4;
}

#current-strip {
  background: var(--ink);
  border-top: 1px solid var(--ink-line);
  padding: 12px 16px;
  display: none;
  flex-shrink: 0;
}
#current-strip.show { display: block; }
#current-strip .label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-dark);
  margin-bottom: 2px;
}
#current-strip .row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
#current-strip .name {
  font-size: 20px;
  font-weight: 700;
  color: var(--lime);
}
#current-strip .since {
  font-size: 16px;
  font-weight: 600;
  color: var(--stone);
}

main {
  flex: 1;
  overflow-y: auto;
  padding: 16px 16px 24px;
  display: flex;
  flex-direction: column;
}
.view { display: none; }
.view.active { display: block; flex: 1 0 auto; }

h1 {
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  line-height: 1.15;
  margin: 4px 0 6px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--lime);
}
.subtitle {
  color: var(--muted);
  font-size: 13.5px;
  margin: 0 0 18px;
}

#activity-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}
.act-btn {
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  padding: 20px 10px;
  min-height: 76px;
  text-align: left;
  line-height: 1.25;
  display: flex;
  align-items: flex-end;
}
.act-btn:active {
  border-color: var(--lime);
  background: var(--lime);
  color: var(--ink);
}
.act-btn.is-current {
  border-color: var(--cur-border);
  background: var(--ink);
  color: var(--lime);
}
.act-btn.is-current .stop-hint {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.85;
  margin-left: 6px;
}
.act-btn.manage-add {
  border-style: dashed;
  border-color: #9a9a88;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  align-items: center;
  justify-content: center;
}
.act-btn-wrap { position: relative; }
.act-btn-wrap .act-btn { width: 100%; }
.act-delete-btn {
  position: absolute;
  top: 6px; right: 6px;
  width: 26px; height: 26px;
  background: var(--float);
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  padding: 0;
}
.act-btn.is-current + .act-delete-btn {
  background: rgba(28, 28, 13, 0.6);
  border-color: var(--ink-line);
  color: var(--stone);
}
.act-delete-btn:active { border-color: var(--bad); color: var(--bad); }

.wk-day-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 10px;
}
.wk-day-head { display: flex; align-items: baseline; gap: 8px; font-size: 14.5px; }
.wk-day-date { color: var(--muted); font-size: 12.5px; }
.wk-day-hours { margin-left: auto; color: var(--text); font-weight: 700; font-size: 14px; }
.wk-travel-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 6px;
  flex-wrap: wrap;
}
.wk-checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 13.5px;
  color: var(--text);
  cursor: pointer;
}
.wk-checkbox-label input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); }
.wk-travel-amt { flex: 1; min-width: 110px; margin-bottom: 0 !important; }

#entries-list { margin-top: 6px; }
.entry-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.entry-row .times {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  width: 92px;
  flex-shrink: 0;
}
.entry-row .times .end.open { color: var(--accent); font-weight: 700; }
.entry-row .info { flex: 1; min-width: 0; }
.entry-row .aname { font-weight: 700; font-size: 14.5px; }
.entry-row .aname .nonwork-badge { font-weight: 500; font-size: 11.5px; color: var(--muted); }
.entry-row .comment { color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.entry-row .edit-btn {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: var(--radius-btn);
  padding: 6px 10px;
  font-size: 12.5px;
  font-weight: 500;
}
.entry-row .entry-move {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
}
.entry-row .entry-move-btn {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 6px;
  width: 26px; height: 22px;
  font-size: 12px;
  line-height: 1;
  padding: 0;
}
.entry-row .entry-move-btn:disabled { opacity: 0.3; }

.btn {
  display: block;
  width: 100%;
  border: 1px solid transparent;
  border-radius: var(--radius-btn);
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}
.btn-primary { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.btn-primary:active { background: var(--lime-dark); border-color: var(--lime-dark); }
.btn-secondary { background: var(--panel); color: var(--text); border-color: var(--line); font-weight: 600; }
.btn-secondary:active { background: var(--press); }
.btn-danger { background: var(--panel); color: var(--bad); border: 1px solid var(--bad-line); }
.btn-block-row { display: flex; gap: 10px; }
.btn-block-row .btn { flex: 1; }

#end-day-bar {
  position: sticky;
  bottom: 0;
  padding-top: 14px;
  background: linear-gradient(to top, var(--bg) 60%, transparent);
}

.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 5px;
  font-weight: 600;
}
.field input, .field textarea, .field select {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: var(--radius-btn);
  padding: 11px 12px;
  font-size: 16px;
  font-family: inherit;
}
.field textarea { resize: vertical; min-height: 60px; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.proj-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 4px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
}
.proj-card.is-active { border-left-color: var(--accent); background: var(--lime-tint); }
.proj-card .pname { font-weight: 700; font-size: 15.5px; }
.proj-card .pmeta { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.proj-card .pactions { display: flex; gap: 8px; margin-top: 10px; }
.proj-card .pactions button {
  background: var(--panel); border: 1px solid var(--line); color: var(--text);
  border-radius: var(--radius-btn); padding: 7px 10px; font-size: 12.5px; font-weight: 500;
}

.hist-row {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 14px; margin-bottom: 8px;
}
.hist-row .date { font-weight: 700; font-size: 14.5px; }
.hist-row .hours { color: var(--muted); font-size: 13.5px; font-weight: 600; }
.hist-row-actions { display: flex; gap: 6px; }
.hist-row button, .hist-row-actions button {
  background: var(--panel); border: 1px solid var(--line); color: var(--text);
  border-radius: var(--radius-btn); padding: 7px 10px; font-size: 12.5px; font-weight: 500;
}
.hist-row-actions button.btn-danger { border-color: var(--bad-line); color: var(--bad); }
.hist-row.clickable { cursor: pointer; }
.hist-row.clickable:active { background: var(--press); }
.status-badge {
  display: inline-block; font-size: 11px; font-weight: 600;
  padding: 2px 9px; border-radius: 99px; margin-left: 6px;
  background: var(--chip-bg); color: var(--chip-fg); vertical-align: middle;
  white-space: nowrap;
}
.status-badge.locked { background: var(--ok-bg); color: var(--ok-fg); }
.hist-project-badge {
  display: inline-block; font-size: 11px; font-weight: 600;
  padding: 2px 9px; border-radius: 99px; margin-left: 6px;
  background: var(--ink); color: var(--lime); vertical-align: middle;
}

.week-nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 8px;
}
.week-nav-arrow {
  background: var(--panel); border: 1px solid var(--line); color: var(--text);
  border-radius: var(--radius-btn); width: 42px; height: 42px; font-size: 20px;
  line-height: 1; flex-shrink: 0;
}
.week-nav-arrow:active { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.week-nav-label {
  flex: 1; text-align: center; font-weight: 700; font-size: 15px;
  line-height: 1.3;
}
.week-nav-label .week-range { font-weight: 500; font-size: 12.5px; color: var(--muted); }
.week-nav-today { width: 100%; margin-bottom: 14px; }

.edit-day-banner {
  background: var(--notice-bg); color: var(--accent); font-size: 13.5px; font-weight: 600;
  border-left: 4px solid var(--lime);
  border-radius: var(--radius); padding: 10px 12px; margin-bottom: 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.edit-day-banner button {
  background: var(--ink); color: var(--lime); border: none;
  border-radius: var(--radius-btn); padding: 6px 10px; font-size: 12.5px; font-weight: 700;
}

.week-total {
  background: var(--panel); border: 1px solid var(--line);
  border-top: 4px solid var(--lime);
  border-radius: var(--radius); padding: 14px; margin-bottom: 14px;
  display: flex; justify-content: space-between; align-items: baseline;
}
.week-total .num { font-size: 26px; line-height: 1.15; font-weight: 700; color: var(--text); }

.month-perdiem-toggle {
  font-size: 13px; color: var(--accent); font-weight: 600; cursor: pointer;
  margin-top: -8px; margin-bottom: 14px; user-select: none;
}
.month-perdiem-detail {
  font-size: 13.5px; color: var(--text);
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 10px 14px; margin-top: -8px; margin-bottom: 14px;
}

nav#bottomnav {
  flex-shrink: 0;
  display: flex;
  background: var(--ink);
  border-top: 1px solid var(--ink-line);
  padding-bottom: env(safe-area-inset-bottom);
}
nav#bottomnav button {
  flex: 1;
  background: none;
  border: none;
  color: var(--muted-dark);
  padding: 10px 2px 12px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
nav#bottomnav button#theme-btn {
  flex: 0 0 58px;
  border-left: 1px solid var(--ink-line);
}
nav#bottomnav button#theme-btn:active { color: var(--lime); }
nav#bottomnav button.active { color: var(--lime); }
nav#bottomnav button .icn { display: block; font-size: 19px; margin-bottom: 2px; }

#modal-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(28, 28, 13, 0.62);
  z-index: 50;
  align-items: flex-end;
}
#modal-backdrop.show { display: flex; }
#modal {
  background: var(--panel);
  border-top: 4px solid var(--lime);
  border-radius: 12px 12px 0 0;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25);
}
#modal h2 { font-size: 16px; font-weight: 700; margin: 0 0 14px; }

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 40px 20px;
  font-size: 14px;
}
.empty-state .btn { margin-top: 16px; }

.update-banner {
  flex-shrink: 0;
  background: var(--lime); color: var(--ink); font-size: 13.5px; font-weight: 600;
  padding: 10px 12px;
  padding-top: calc(10px + env(safe-area-inset-top));
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.update-banner span { flex: 1; line-height: 1.3; }
.update-banner button {
  flex-shrink: 0;
  background: var(--ink); color: var(--lime); border: none;
  border-radius: var(--radius-btn); padding: 8px 12px; font-size: 12.5px; font-weight: 700;
}

.toast {
  position: fixed; left: 16px; right: 16px; bottom: 76px;
  background: var(--ink); color: var(--lime);
  padding: 12px 16px; border-radius: var(--radius-btn);
  font-weight: 700; font-size: 14px;
  text-align: center;
  z-index: 60;
  box-shadow: 0 0 0 2px var(--lime);
  animation: toastin 0.15s ease-out;
}
@keyframes toastin { from { opacity:0; transform: translateY(6px);} to { opacity:1; transform: translateY(0);} }

.chip-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip {
  background: var(--panel); border: 1px solid var(--line);
  padding: 6px 10px; border-radius: 20px; font-size: 13px;
  display: flex; align-items: center; gap: 6px;
}
.chip button { background:none; border:none; color: var(--bad); font-weight: 700; padding: 0; font-size: 14px; }
.chip button.chip-move {
  color: var(--muted); font-weight: 700; font-size: 13px;
  padding: 4px 5px; margin: -4px 0;
}
.chip button.chip-move:disabled { opacity: 0.3; }

#view-login {
  display: none;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
#view-login.active { display: flex; }
#view-login .login-card {
  width: 100%;
  max-width: 360px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 6px solid var(--lime);
  border-radius: var(--radius);
  padding: 24px;
}
#view-login .login-card h1 {
  text-align: center;
  text-transform: none;
  letter-spacing: 0;
  font-size: 20px;
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 4px;
}
#view-login .subtitle { text-align: center; }
#login-error {
  color: var(--bad);
  font-size: 13px;
  min-height: 18px;
  margin: 4px 0 10px;
  text-align: center;
}

#view-setpin {
  display: none;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
#view-setpin.active { display: flex; }
#view-setpin .login-card {
  width: 100%;
  max-width: 360px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 6px solid var(--lime);
  border-radius: var(--radius);
  padding: 24px;
}
#view-setpin .login-card h1 {
  text-align: center;
  text-transform: none;
  letter-spacing: 0;
  font-size: 20px;
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 4px;
}
#view-setpin .subtitle { text-align: center; }
#setpin-error {
  color: var(--bad);
  font-size: 13px;
  min-height: 18px;
  margin: 4px 0 10px;
  text-align: center;
}

#account-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--ink);
  border-top: 1px solid var(--ink-line);
  padding: 8px 16px;
  font-size: 13px;
  flex-shrink: 0;
}
#account-bar #account-name { font-weight: 700; color: var(--stone); }
#account-bar .account-actions { display: flex; gap: 8px; align-items: center; }
#account-bar button, #account-bar a.btn-link {
  background: transparent;
  border: 1px solid #4a4a30;
  color: var(--stone);
  font-size: 12.5px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: var(--radius-btn);
  cursor: pointer;
}
#account-bar button:active { background: var(--ink-soft); }
#admin-link { display: none; }

.status-badge.status-submitted { background: var(--warn-bg); color: var(--warn-fg); }
.status-badge.status-returned { background: var(--bad-bg); color: var(--bad-fg); }
.status-badge.status-signed { background: var(--ok-bg); color: var(--ok-fg); }

#admin-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}
#admin-tabs button {
  flex: 1;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 10px 6px;
  border-radius: var(--radius-btn);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
#admin-tabs button.active { background: var(--lime); color: var(--ink); border-color: var(--lime); font-weight: 700; }

.chip-filter {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
}
.chip-filter.is-active { background: var(--lime); color: var(--ink); border-color: var(--lime); font-weight: 700; }

/* Chmurki z objaśnieniami pól (Weekly) */
.wk-info {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; margin: 0 4px; border-radius: 50%;
  background: var(--lime); color: var(--ink); font-size: 11px; font-weight: 700;
  font-style: italic; cursor: help; vertical-align: middle;
}
.wk-day-card { position: relative; }
.wk-info:hover::after, .wk-info:focus::after {
  content: attr(data-tip);
  position: absolute; left: 12px; right: 12px; transform: translateY(calc(-100% - 22px));
  padding: 8px 10px; border-radius: 8px;
  background: var(--ink); color: #fff; font-size: 12px; font-weight: 400; font-style: normal;
  line-height: 1.35; text-align: left; white-space: normal; z-index: 50;
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
}
.wk-summary-line { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin: 6px 0 2px; }
.wk-summary-line b { color: var(--text); margin-left: 4px; }

.mo-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px; margin-bottom: 14px;
}
.mo-card h2 { margin: 0 0 6px; font-size: 16px; }
.mo-rate-row { display: flex; gap: 8px; align-items: flex-end; }
.mo-rate-row .field { flex: 1; margin-bottom: 10px; }
.mo-rate-del { flex: 0 0 auto; width: 44px; margin-bottom: 10px; }
.mo-warn {
  background: var(--warn-bg); color: var(--warn-fg);
  border-radius: var(--radius); padding: 10px 14px; margin-bottom: 14px; font-size: 13.5px;
}
.mo-warn ul { margin: 6px 0 0; padding-left: 18px; }
.mo-pre {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px; margin: 0;
  font-family: var(--sans); font-size: 14px; line-height: 1.5;
  white-space: pre-wrap; word-break: break-word; color: var(--text);
}

[hidden] { display: none !important; }

/* stopka: jedna dyskretna linia — Seabrine (link) · Powered by Maticly; kolory z motywu */
.app-footer { flex-shrink: 0; margin: 20px -16px -24px; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 7px 12px; background: var(--panel); color: var(--muted); border-top: 1px solid var(--line); font-size: 10px; line-height: 1; white-space: nowrap; opacity: .75; }
.app-footer a { display: inline-flex; align-items: center; gap: 5px; color: inherit; text-decoration: none; border-radius: 4px; }
.app-footer a:hover { opacity: .7; }
.app-footer a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.footer-left { display: none; }
.footer-center img { height: 14px; width: auto; display: block; opacity: .8; }
.footer-wordmark { --wm: url("assets/brand/seabrine-wordmark.png"); display: block; height: 8px; aspect-ratio: 492 / 89; background-color: currentColor; -webkit-mask: var(--wm) center / contain no-repeat; mask: var(--wm) center / contain no-repeat; }
.footer-powered { display: flex; align-items: center; gap: 5px; }
.footer-powered::before { content: "·"; margin-right: 5px; }
.footer-powered a { gap: 0; }
.footer-powered img { height: 11px; width: auto; display: block; }
.footer-powered .logo-on-dark { display: none; }
:root[data-theme="dark"] .footer-powered .logo-on-light { display: none; }
:root[data-theme="dark"] .footer-powered .logo-on-dark { display: block; }
@media print { .no-print { display: none !important; } }

.status-badge.status-new { background: var(--safety); color: #111; font-weight: 800; letter-spacing: .3px; }
.admin-badge { display: inline-block; min-width: 18px; margin-left: 6px; padding: 0 6px; border-radius: 9px; background: var(--safety); color: #111; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; }

.toast-action { display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; }
.toast-action button {
  flex-shrink: 0; background: var(--lime); color: var(--ink); border: none;
  border-radius: var(--radius-btn); padding: 6px 12px; font-weight: 700; font-size: 13px;
}

.project-chip {
  display: flex; align-items: center; gap: 8px; width: 100%;
  margin: 0 0 12px; padding: 10px 12px; text-align: left;
  background: var(--lime-tint); color: var(--text);
  border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: var(--radius-btn); font-size: 15px;
}
.project-chip .chip-label { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; }
.project-chip b { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-chip .chip-caret { color: var(--muted); }

.switch-list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; max-height: 50vh; overflow-y: auto; }
.switch-item {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left;
  padding: 10px 12px; background: var(--panel); color: var(--text);
  border: 1px solid var(--line); border-left: 4px solid transparent; border-radius: var(--radius-btn);
}
.switch-item span { color: var(--muted); font-size: 12.5px; }
.switch-item.is-active { border-left-color: var(--accent); background: var(--lime-tint); }

.deadline-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 0 0 12px; padding: 10px 12px; border-radius: var(--radius-btn);
  font-size: 13.5px; line-height: 1.35;
}
.deadline-banner[hidden] { display: none; }
.deadline-banner.is-soon { background: var(--notice-bg); color: var(--text); border: 1px solid var(--line); }
.deadline-banner.is-late { background: var(--warn-bg); color: var(--warn-fg); border: 1px solid var(--warn); }
.deadline-banner button {
  flex-shrink: 0; background: var(--ink); color: var(--lime); border: none;
  border-radius: var(--radius-btn); padding: 7px 12px; font-weight: 700; font-size: 13px;
}

.day-timeline { margin: 4px 0 14px; }
.day-timeline:empty { display: none; }
.tl-track { position: relative; height: 16px; background: var(--line); border-radius: 4px; overflow: hidden; }
.tl-seg { position: absolute; top: 0; bottom: 0; box-shadow: inset -1px 0 0 var(--bg); }
.tl-seg.is-open { opacity: .75; background-image: repeating-linear-gradient(135deg, transparent 0 4px, rgba(255,255,255,.35) 4px 8px); }
.tl-scale { display: flex; justify-content: space-between; margin-top: 3px; font-size: 11px; color: var(--muted); }
.tl-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; font-size: 11.5px; color: var(--muted); }
.tl-key { display: inline-flex; align-items: center; gap: 5px; }
.tl-key i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.tl-gap { color: var(--warn-fg); font-weight: 600; }

.wk-checks {
  margin: 0 0 12px; padding: 10px 12px; border-radius: var(--radius-btn);
  background: var(--warn-bg); color: var(--warn-fg); border: 1px solid var(--warn); font-size: 13px; line-height: 1.4;
}
.wk-checks[hidden] { display: none; }
.wk-checks ul { margin: 6px 0 0; padding-left: 18px; }
.wk-day-empty { padding-top: 8px; padding-bottom: 8px; opacity: .85; }
.wk-day-empty .wk-day-head { margin: 0; align-items: center; }
.wk-expand {
  margin-left: auto; background: var(--panel); color: var(--text); border: 1px solid var(--line);
  border-radius: var(--radius-btn); padding: 5px 10px; font-size: 12.5px;
}
