/* ============================================================
   Sokół Milenium — design system
   Recreated from the Claude Design "Sokol Milenium" prototype.
   ============================================================ */

:root {
  color-scheme: dark;

  --bg: #080c18;
  --s1: #0f1426;
  --s2: #161d33;
  --bd: rgba(150, 170, 220, .13);
  --tx: #eef2fb;
  --mut: #8e9bba;
  --acc: #5b8def;

  --inset: #0b1020;
  --sidebar: #0a0f1d;
  --on-acc: #06122e;
  --link: #9fbcff;
  --soft: #c6cfe3;

  --green: #46c08a;
  --gold: #f5c451;
  --red: #e0697a;

  /* Theme-adaptive tokens — overridden in the light theme below.
     Anything that was a hardcoded white/black overlay or a pale "text-on-tint"
     colour lives here so both themes stay legible. */
  --acc-soft: rgba(91, 141, 255, .15);   /* accent-tinted backgrounds (active nav, chips) */
  --acc-strong: #cdd9ff;                 /* text/icon sitting on an accent tint */
  --hover: rgba(255, 255, 255, .05);     /* subtle row hover */
  --hover-2: rgba(255, 255, 255, .06);
  --soft-fill: rgba(255, 255, 255, .1);  /* neutral filled circles/badges */
  --ph: #566179;                         /* input placeholder */
  --shadow: rgba(0, 0, 0, .55);          /* popover / modal / toast shadow */
  --gold-text: #f0d28f;                  /* readable gold on a gold tint */
  --red-text: #f0a8b2;                   /* readable red on a red tint */
  --toast-bg: #11203f;
  --toast-tx: #ffffff;
}

/* ---------------- Light theme (TRYB: JASNY) ----------------
   High-contrast palette tuned for use in bright sunlight: white surfaces,
   dark navy text, deeper accent/status colours and clearly visible borders. */
[data-theme="light"] {
  color-scheme: light;

  --bg: #eef1f8;
  --s1: #ffffff;
  --s2: #ffffff;
  --bd: rgba(33, 54, 99, .17);
  --tx: #16223d;
  --mut: #5c6986;
  --acc: #2f6fe0;

  --inset: #f1f4fb;
  --sidebar: #ffffff;
  --on-acc: #ffffff;
  --link: #2257c5;
  --soft: #3b4866;

  --green: #1f9d6b;
  --gold: #b8830f;
  --red: #d2425c;

  --acc-soft: rgba(47, 111, 224, .12);
  --acc-strong: #1b4fb8;
  --hover: rgba(20, 40, 80, .05);
  --hover-2: rgba(20, 40, 80, .06);
  --soft-fill: rgba(20, 40, 80, .07);
  --ph: #97a0b5;
  --shadow: rgba(23, 42, 84, .16);
  --gold-text: #8a6510;
  --red-text: #b32f46;
  --toast-bg: #16223d;
  --toast-tx: #ffffff;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--tx);
  font-family: 'Space Grotesk', system-ui, -apple-system, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(150, 170, 220, .18); border-radius: 6px; }
::-webkit-scrollbar-track { background: transparent; }
.nav::-webkit-scrollbar { display: none; }

input, select, textarea, button { font-family: inherit; }
input::placeholder, textarea::placeholder { color: var(--ph); }
a { color: inherit; }
/* The hidden attribute wins over any display a class sets — views and panes are switched with it. */
[hidden] { display: none !important; }

@keyframes tw { 0%, 100% { opacity: .12; } 50% { opacity: .85; } }
@keyframes fu { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes sp { to { transform: rotate(360deg); } }

.fade-up { animation: fu .3s ease; }

/* ---------------- App shell ---------------- */
.app { display: flex; flex-direction: row; min-height: 100vh; }

.sidebar {
  width: 248px; flex: none; background: var(--sidebar);
  border-right: 1px solid var(--bd); padding: 20px 16px;
  display: flex; flex-direction: column; gap: 6px;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; justify-content: space-between; gap: 11px; padding: 4px 6px; }
.brand-left { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand img { width: 38px; height: 38px; object-fit: contain; flex: none; }
.brand-name { font-weight: 700; font-size: 14px; letter-spacing: .02em; line-height: 1.15; }
.brand-sub { font-size: 11px; color: var(--mut); }
.menu-toggle {
  display: none; flex: none; background: var(--inset); border: 1px solid var(--bd);
  color: var(--tx); border-radius: 9px; width: 40px; height: 40px; font-size: 17px; cursor: pointer;
}

/* Theme switch (TRYB: JASNY / CIEMNY) — sits in the sidebar just under the brand */
.theme-switch { display: flex; align-items: center; gap: 9px; padding: 2px 6px; margin-top: 4px; flex-wrap: wrap; }
.theme-switch-label { font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--mut); flex: none; }
.theme-seg { flex: 1; min-width: 0; }
.theme-seg .seg-btn { flex: 1; padding: 6px 8px; font-size: 12px; justify-content: center; }

.nav { display: flex; flex-direction: column; gap: 2px; margin-top: 16px; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
.nav-item {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  background: transparent; border: none; border-radius: 10px; padding: 8px 12px;
  color: var(--mut); font-size: 14px; font-weight: 600; cursor: pointer; white-space: normal;
  text-decoration: none;
}
.nav-item svg { flex: none; }
.nav-item:hover { background: var(--hover); }
.nav-item.active { background: var(--acc-soft); color: var(--acc-strong); font-weight: 700; }
.nav-item.active svg { stroke: var(--acc); }

/* Menu sections — tree in Services/Nav.cs, markup in _Menu.cshtml, folding in app.js. The header
   only folds and unfolds; the section holding the open screen is always unfolded (aria-disabled). */
.nav-sekcja { margin-top: 6px; }
.nav-naglowek {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  background: transparent; border: none; border-radius: 10px; padding: 6px 12px;
  color: var(--mut); font-family: inherit; font-size: 11px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; cursor: pointer;
}
.nav-naglowek svg { flex: none; }
.nav-naglowek:hover { background: var(--hover); color: var(--tx); }
.nav-naglowek[aria-disabled="true"] { cursor: default; }
.nav-naglowek[aria-disabled="true"]:hover { background: transparent; color: var(--mut); }
.nav-chevron { margin-left: auto; transition: transform .14s ease; }
.nav-sekcja.zwinieta .nav-chevron { transform: rotate(-90deg); }
.nav-naglowek[aria-disabled="true"] .nav-chevron { opacity: .35; }
/* Folding animates the row track 1fr → 0fr; visibility keeps folded entries out of the Tab order.
   .animuj is switched on after load, so the state restored from storage just appears. */
.nav-cialo { display: grid; grid-template-rows: 1fr; }
.nav-cialo-wnetrze { min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 2px; }
.nav-sekcja .nav-item { padding-left: 22px; }
.nav-sekcja.zwinieta .nav-cialo { grid-template-rows: 0fr; visibility: hidden; }
.nav.animuj .nav-cialo { transition: grid-template-rows .14s ease, visibility 0s linear 0s; }
.nav.animuj .nav-sekcja.zwinieta .nav-cialo { transition: grid-template-rows .14s ease, visibility 0s linear .14s; }
.nav-item:focus-visible, .nav-naglowek:focus-visible { outline: 2px solid var(--acc); outline-offset: -2px; }
@media (prefers-reduced-motion: reduce) {
  .nav-chevron, .nav.animuj .nav-cialo, .nav.animuj .nav-sekcja.zwinieta .nav-cialo { transition: none; }
}
.nav-badge {
  margin-left: auto; flex: none; min-width: 20px; height: 20px; padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--acc); color: var(--on-acc); border-radius: 999px;
  font-size: 11px; font-weight: 700; line-height: 1;
}

.main { flex: 1; min-width: 0; padding: 32px 32px 56px; }
.container { max-width: 1180px; margin: 0 auto; }

.page-header {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  margin-bottom: 24px; flex-wrap: wrap;
}
.page-title { margin: 0; font-size: 23px; font-weight: 700; letter-spacing: -.01em; }
.page-sub { color: var(--mut); font-size: 14px; margin-top: 3px; }
.header-user { display: flex; align-items: center; gap: 12px; }
.header-user .uname { font-size: 14px; font-weight: 600; text-align: right; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  border-radius: 10px; padding: 11px 16px; font-size: 14px; font-weight: 600;
  cursor: pointer; white-space: nowrap; border: 1px solid var(--bd);
  background: transparent; color: var(--tx); text-decoration: none;
}
.btn-primary { background: var(--acc); color: var(--on-acc); border: none; border-radius: 11px; font-weight: 700; }
.btn-ghost { color: var(--mut); }
.btn-ghost:hover { color: var(--tx); }
.btn-add { background: rgba(91, 141, 255, .15); color: var(--acc); border: none; border-radius: 9px; font-weight: 700; font-size: 13px; padding: 9px 14px; }
.btn-danger { background: transparent; border: 1px solid rgba(224, 105, 122, .4); color: var(--red); border-radius: 8px; font-size: 13px; padding: 8px 12px; }
.btn-danger-solid { background: var(--red); color: #1a0608; border: none; border-radius: 10px; font-weight: 700; padding: 11px 18px; }
.btn-sm { padding: 7px 12px; font-size: 12px; border-radius: 8px; }
.btn-link { background: transparent; border: none; color: var(--link); cursor: pointer; font-weight: 600; font-size: 13px; padding: 8px 12px; text-decoration: none; }
.btn:disabled, .btn.off { opacity: .4; cursor: not-allowed; }
.btn-block { width: 100%; }

/* ---------------- Cards / panels ---------------- */
.card { background: var(--s1); border: 1px solid var(--bd); border-radius: 16px; padding: 20px; }
.tile { background: var(--s1); border: 1px solid var(--bd); border-radius: 16px; padding: 18px 20px; }
.entity-card { background: var(--s1); border: 1px solid var(--bd); border-radius: 14px; padding: 18px; }
.section-title { font-size: 15px; font-weight: 700; }
.muted { color: var(--mut); }
.soft { color: var(--soft); }

.tile .tile-label { font-size: 12px; color: var(--mut); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.tile .tile-value { font-size: 30px; font-weight: 700; margin-top: 6px; }

/* stat grids */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.dict-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.summary-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }

/* ---------------- Forms ---------------- */
.field { margin-bottom: 16px; }
.label {
  display: block; font-size: 11px; letter-spacing: .05em; text-transform: uppercase;
  color: var(--mut); margin-bottom: 7px; font-weight: 600;
}
.label-req { color: var(--acc); }
.input, .select, .textarea {
  width: 100%; background: var(--inset); border: 1px solid var(--bd); border-radius: 10px;
  padding: 11px 13px; color: var(--tx); font-size: 14px; outline: none;
}
.select { appearance: none; cursor: pointer; }
.textarea { resize: vertical; }
.input.accent, .select.accent { border-color: var(--acc); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.help { font-size: 12px; color: var(--mut); margin-top: 6px; }

/* Walidacja pól obowiązkowych po stronie klienta — patrz wwwroot/js/validate.js */
.field.invalid .input, .field.invalid .select, .field.invalid .textarea, .field.invalid .combo-input,
.input.invalid, .select.invalid, .textarea.invalid { border-color: var(--red); }
.field-error { color: var(--red); font-size: 12px; font-weight: 600; margin-top: 6px; }
.form-errors {
  background: rgba(224, 105, 122, .12); border: 1px solid rgba(224, 105, 122, .4);
  border-radius: 11px; padding: 11px 14px; color: var(--red-text); font-size: 13px; font-weight: 600;
  margin-bottom: 16px;
}

/* Wyszukiwalna lista rozwijalna (combobox) — patrz wwwroot/js/combobox.js */
.combo { position: relative; display: block; }
.combo-native {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); border: 0; opacity: 0; pointer-events: none;
}
.combo-input { width: 100%; padding-right: 34px; }
.combo::after {
  content: ""; position: absolute; right: 14px; top: 50%; width: 8px; height: 8px;
  border-right: 2px solid var(--mut); border-bottom: 2px solid var(--mut);
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}
.combo-panel {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 120;
  background: var(--s2); border: 1px solid var(--bd); border-radius: 12px; padding: 6px;
  max-height: 280px; overflow-y: auto; box-shadow: 0 20px 60px var(--shadow);
}
.combo-panel-up { top: auto; bottom: calc(100% + 6px); }
.combo-opt {
  display: block; width: 100%; text-align: left; border-radius: 8px; padding: 8px 10px;
  color: var(--tx); font-size: 13px; font-weight: 600; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.combo-opt:hover, .combo-opt.active { background: rgba(91, 141, 255, .14); }
.combo-opt[aria-disabled="true"] { opacity: .4; cursor: not-allowed; }
.combo-opt[aria-disabled="true"]:hover { background: transparent; }
.combo-mark { background: transparent; color: var(--acc); font-weight: 700; }
.combo-empty { padding: 8px 10px; color: var(--mut); font-size: 13px; }

/* ---------------- Pills / chips / badges ---------------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
  border: 1px solid color-mix(in srgb, var(--c, var(--acc)) 33%, transparent);
  background: color-mix(in srgb, var(--c, var(--acc)) 12%, transparent);
  color: var(--c, var(--acc));
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--acc)); flex: none; display: inline-block; }

/* Quick status change (Misje): a <details> dropdown whose summary is the status pill */
.status-pop { position: relative; display: inline-block; }
.status-pop > summary { list-style: none; cursor: pointer; }
.status-pop > summary::-webkit-details-marker { display: none; }
.status-pop > summary .caret { font-size: 9px; opacity: .65; margin-left: 2px; }
.status-menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 40;
  background: var(--s2); border: 1px solid var(--bd); border-radius: 12px; padding: 6px;
  min-width: 195px; display: flex; flex-direction: column; gap: 2px;
  box-shadow: 0 20px 60px var(--shadow);
}
.status-menu form { margin: 0; }
.status-opt {
  width: 100%; text-align: left; display: flex; align-items: center; gap: 8px;
  background: transparent; border: none; border-radius: 8px; padding: 8px 10px;
  color: var(--tx); font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.status-opt:hover { background: var(--hover-2); }
.status-opt.active { background: rgba(91, 141, 255, .14); }

/* Row actions behind a hamburger: the same <details> dropdown as above, but anchored to the
   right because it sits at the end of a list row and would otherwise run off the card. What
   goes in it are the rarer moves — the everyday ones stay as visible buttons. */
.row-menu { position: relative; display: inline-block; }
.row-menu > summary { list-style: none; cursor: pointer; }
.row-menu > summary::-webkit-details-marker { display: none; }
.row-menu-pop {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 40;
  background: var(--s2); border: 1px solid var(--bd); border-radius: 12px; padding: 6px;
  min-width: 180px; display: flex; flex-direction: column; gap: 2px;
  box-shadow: 0 20px 60px var(--shadow);
}
.row-menu-pop form { margin: 0; }
.row-menu-opt {
  width: 100%; text-align: left; display: flex; align-items: center; gap: 8px;
  background: transparent; border: none; border-radius: 8px; padding: 8px 10px;
  color: var(--tx); font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
  text-decoration: none;
}
.row-menu-opt:hover { background: var(--hover-2); }

.role-badge {
  display: inline-block; margin-top: 3px; padding: 2px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .03em;
}
.role-badge.admin { background: rgba(91, 141, 255, .18); color: var(--link); }
.role-badge.pracownik { background: rgba(150, 170, 220, .12); color: var(--mut); }

.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 999px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--bd); background: var(--inset); color: var(--mut);
}
.chip.active {
  border-color: var(--c, var(--acc));
  background: color-mix(in srgb, var(--c, var(--acc)) 13%, transparent);
  color: #fff;
}
/* On a pale tint white text is invisible — use the chip's own hue in light mode. */
[data-theme="light"] .chip.active { color: var(--c, var(--acc)); }
.fchip {
  padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--bd); background: transparent; color: var(--mut); text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
}
.fchip.active {
  border-color: var(--c, var(--acc));
  background: color-mix(in srgb, var(--c, var(--acc)) 13%, transparent);
  color: var(--acc-strong);
}
.kind-pill { font-size: 11px; color: var(--mut); border: 1px solid var(--bd); border-radius: 999px; padding: 2px 9px; }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.toolbar { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.toolbar-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* active filter pill */
.filter-pill {
  display: inline-flex; align-items: center; gap: 8px; background: rgba(91, 141, 255, .12);
  border: 1px solid var(--acc); border-radius: 999px; padding: 6px 12px; font-size: 13px; align-self: flex-start;
}
.filter-pill a, .filter-pill button { color: var(--mut); background: none; border: none; cursor: pointer; font-size: 15px; text-decoration: none; }

/* ---------------- Segmented control ---------------- */
.seg { display: inline-flex; background: var(--inset); border: 1px solid var(--bd); border-radius: 9px; padding: 3px; }
.seg-btn { background: transparent; color: var(--mut); border: none; border-radius: 8px; padding: 7px 16px; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.seg-btn.active { background: var(--acc); color: var(--on-acc); font-weight: 700; }
.seg.lg { border-radius: 11px; padding: 4px; }

/* ---------------- Checkbox ---------------- */
.check {
  flex: none; width: 24px; height: 24px; border-radius: 7px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700;
  border: 1px solid var(--bd); background: transparent; color: var(--on-acc);
}
.check.done { border-color: var(--green); background: var(--green); }
.strike { text-decoration: line-through; color: var(--mut); }

/* ---------------- Avatar ---------------- */
.avatar {
  width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; flex: none; background: rgba(91, 141, 255, .15); color: var(--acc);
}
.avatar.mut { background: rgba(150, 170, 220, .12); color: var(--mut); }

/* ---------------- Info / note / error boxes ---------------- */
.info-box { background: var(--inset); border: 1px solid var(--bd); border-radius: 12px; padding: 14px 16px; }
.info-box.dashed { border-style: dashed; }
.info-row { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.info-row + .info-row { margin-top: 8px; }
.divider { height: 1px; background: var(--bd); margin: 14px 0; border: none; }

.admin-note { background: rgba(245, 196, 81, .08); border: 1px solid rgba(245, 196, 81, .2); border-radius: 10px; padding: 11px 13px; font-size: 13px; color: var(--gold-text); }
.error-box { background: rgba(224, 105, 122, .12); border: 1px solid rgba(224, 105, 122, .4); border-radius: 11px; padding: 11px 14px; color: var(--red-text); font-size: 13px; }
.lost-box { background: rgba(224, 105, 122, .1); border: 1px solid rgba(224, 105, 122, .25); border-radius: 9px; padding: 9px 12px; font-size: 12px; color: var(--red-text); }

.empty { text-align: center; color: var(--mut); padding: 50px 20px; background: var(--s1); border: 1px dashed var(--bd); border-radius: 14px; }

/* list row */
.list-row { display: flex; align-items: center; gap: 12px; background: var(--inset); border: 1px solid var(--bd); border-radius: 10px; padding: 10px 12px; }
.list { display: flex; flex-direction: column; gap: 8px; }

/* colors helpers */
.c-acc { color: var(--acc); } .c-gold { color: var(--gold); } .c-green { color: var(--green); } .c-red { color: var(--red); } .c-link { color: var(--link); }
.fw7 { font-weight: 700; } .fw6 { font-weight: 600; }
.f11 { font-size: 11px; } .f12 { font-size: 12px; } .f13 { font-size: 13px; } .f14 { font-size: 14px; }
.cap { text-transform: uppercase; letter-spacing: .05em; }
.right { text-align: right; } .nowrap { white-space: nowrap; } .ellip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row { display: flex; align-items: center; gap: 10px; } .wrap { flex-wrap: wrap; } .between { justify-content: space-between; } .grow { flex: 1; min-width: 0; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt22 { margin-top: 22px; }
.mb10 { margin-bottom: 10px; } .mb14 { margin-bottom: 14px; } .mb16 { margin-bottom: 16px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }

/* ---------------- Modal ---------------- */
.modal {
  position: fixed; inset: 0; background: rgba(4, 7, 15, .7); backdrop-filter: blur(3px);
  display: flex; align-items: flex-start; justify-content: center; padding: 40px 20px; z-index: 100; overflow-y: auto;
}
.modal.small { align-items: center; padding: 20px; z-index: 300; }
.modal-card {
  background: var(--s1); border: 1px solid var(--bd); border-radius: 18px; padding: 24px; width: 100%;
  max-width: 520px; box-shadow: 0 30px 80px var(--shadow); animation: fu .25s ease;
}
.modal.small .modal-card { border-radius: 16px; animation: fu .2s ease; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.modal-title { font-size: 18px; font-weight: 700; }
.modal-close { background: transparent; border: none; color: var(--mut); font-size: 22px; line-height: 1; cursor: pointer; text-decoration: none; }
.modal-foot { display: flex; gap: 10px; margin-top: 20px; }
.modal-foot .btn-primary { flex: 1; }

/* ---------------- Weather popup (IMGW forecast) ---------------- */
.wx-card { max-width: 1080px; }
.wx-loading { display: flex; flex-direction: column; align-items: center; padding: 30px 0; }
.wx-error { text-align: center; padding: 18px 0 8px; }
.wx-scroll { overflow-x: auto; padding-bottom: 4px; }
.wx-grid { display: grid; gap: 6px 8px; }
.wx-day-head { text-align: center; padding: 4px 0 6px; }
.wx-day-head .wx-tag {
  display: inline-block; margin-top: 4px; border-radius: 999px; padding: 2px 8px; white-space: nowrap;
  font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.wx-day-head.in .wx-tag { background: var(--acc-soft); color: var(--acc-strong); }
.wx-day-head.out .wx-tag { border: 1px solid var(--bd); color: var(--mut); }
.wx-day-head.out .fw7, .wx-day-head.out .muted { color: var(--mut); opacity: .8; }
/* mission-term columns get an accent tint so the term stands out from the context days */
.wx-part.wx-in {
  border-color: color-mix(in srgb, var(--acc) 35%, transparent);
  background: color-mix(in srgb, var(--acc) 6%, var(--inset));
}
.wx-part {
  display: flex; align-items: center; gap: 8px; background: var(--inset);
  border: 1px solid var(--bd); border-radius: 10px; padding: 8px 10px; font-size: 12px; min-height: 54px;
}
.wx-part.wx-label {
  background: transparent; border-color: transparent; justify-content: flex-end;
  color: var(--mut); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
}
.wx-part.wx-empty { justify-content: center; color: var(--mut); }
.wx-ico { width: 30px; height: 30px; flex: none; }
.wx-ico svg { width: 100%; height: 100%; display: block; }
.wx-vals { display: flex; flex-direction: column; gap: 1px; color: var(--mut); white-space: nowrap; }
.wx-temp { color: var(--tx); font-weight: 700; font-size: 13px; }

/* Weather warning above the calendar: mission days in the coming week that the forecast says may
   bring rain or strong wind (thresholds live in Ustawienia → Alerty pogodowe). */
.wx-alert {
  border: 1px solid color-mix(in srgb, var(--red) 55%, transparent);
  background: color-mix(in srgb, var(--red) 12%, var(--s1));
  border-left: 4px solid var(--red);
  border-radius: 14px; padding: 14px 16px; margin-bottom: 16px;
}
.wx-alert-head {
  display: flex; align-items: center; gap: 9px;
  color: var(--red-text); font-weight: 700; font-size: 14px;
}
.wx-alert-ico {
  width: 20px; height: 20px; flex: none; border-radius: 50%; background: var(--red);
  color: var(--on-acc); font-size: 13px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.wx-alert-rows { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.wx-alert-row {
  display: block; font-size: 13px; color: var(--tx); text-decoration: none;
  border-radius: 8px; padding: 5px 8px; background: color-mix(in srgb, var(--red) 8%, transparent);
}
a.wx-alert-row:hover { background: color-mix(in srgb, var(--red) 18%, transparent); }
.wx-alert-foot { font-size: 12px; color: var(--mut); margin-top: 10px; }

/* collapsible */
.collapsible > summary {
  list-style: none; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--inset); border: 1px solid var(--bd); border-radius: 10px; padding: 11px 13px;
  color: var(--tx); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; cursor: pointer;
}
.collapsible > summary::-webkit-details-marker { display: none; }
.collapsible[open] > summary .hint::after { content: 'Ukryj ▲'; }
.collapsible > summary .hint::after { content: 'Pokaż ▼'; }
.collapsible .hint { color: var(--mut); text-transform: none; font-weight: 400; }

/* ---------------- Calendar ---------------- */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-weekday { text-align: center; font-size: 11px; color: var(--mut); font-weight: 600; }
.cal-cell {
  position: relative; min-height: 30px; border-radius: 8px; padding: 5px 6px; display: flex;
  justify-content: space-between; align-items: flex-start; gap: 3px; background: var(--inset);
  border: 1px solid var(--bd); cursor: pointer; text-decoration: none; color: var(--tx);
}
.cal-cell.out { opacity: .4; } .cal-cell.past { opacity: .65; }
.cal-cell.today { border-color: var(--acc); background: rgba(91, 141, 255, .10); }
/* Wybrany dzień: sama gruba, neutralna obramówka (kolor tekstu) — celowo inny akcent niż
   niebieski „dziś", żeby dwóch oznaczeń nie dało się pomylić. */
.cal-cell.selected { outline: 3px solid var(--tx); outline-offset: -3px; }
.cal-num { font-size: 12px; font-weight: 600; }
.cal-cell.today .cal-num { font-weight: 700; }
.cal-pill { font-size: 9px; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: rgba(91, 141, 255, .22); color: var(--link); }
.cal-pill.overdue { background: rgba(224, 105, 122, .25); color: var(--red-text); }
/* One grid per week: row 1 holds the day numbers, rows below hold mission bars, plus a
   trailing spacer row. Row tracks are set inline per week (from its lane count); day cells
   span every row (grid-row: 1 / -1) so bars sit fully inside their cells. */
.cal-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px 6px; margin-bottom: 6px; }
.cal-bar {
  position: relative; z-index: 2; margin: 0 2px;
  height: 19px; display: flex; align-items: center; gap: 5px; padding: 0 8px; font-size: 11px; font-weight: 700;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: pointer; text-decoration: none;
  color: var(--c, var(--acc));
  background: color-mix(in srgb, var(--c, var(--acc)) 13%, transparent);
  border-left: 3px solid var(--c, var(--acc)); border-radius: 7px;
}
/* Absences: diagonal darker/lighter stripes so they read differently from mission bars. */
.cal-bar.absence, .swatch.absence {
  background: repeating-linear-gradient(45deg,
    color-mix(in srgb, var(--c, var(--acc)) 30%, transparent) 0 6px,
    color-mix(in srgb, var(--c, var(--acc)) 10%, transparent) 6px 12px);
}
/* Confirmed treatment date (TerminPotwierdzony): a second solid rail along the bottom edge —
   a "locked-in" bracket in the status hue, orthogonal to colour. Rendered per-segment so it
   shows on label-less multi-day continuation bars too; overflow:hidden clips it to the
   per-segment border-radius. Scoped :not(.absence) so it never touches absence stripes. */
.cal-bar.confirmed:not(.absence)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: var(--c, var(--acc)); pointer-events: none;
}
/* Legend swatch mirrors the bar: faint fill + bottom rail. */
.swatch.confirmed {
  position: relative;
  background: color-mix(in srgb, var(--c, var(--acc)) 15%, transparent);
}
.swatch.confirmed::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--c, var(--acc)); border-radius: 0 0 3px 3px;
}
/* Selected-day list tile echoes the same bottom rail (status hue via inline --c). */
.day-mission.confirmed { position: relative; }
.day-mission.confirmed::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: var(--c, var(--acc)); border-radius: 0 0 10px 10px; pointer-events: none;
}
.cal-legend { display: flex; gap: 16px; margin-top: 14px; flex-wrap: wrap; font-size: 12px; color: var(--mut); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.day-mission { display: flex; align-items: center; gap: 12px; background: rgba(91, 141, 255, .10); border: 1px solid rgba(91, 141, 255, .35); border-radius: 10px; padding: 11px 13px; cursor: pointer; text-decoration: none; color: var(--tx); }

/* wizard */
.step-btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px; border-radius: 10px; font-size: 13px; font-weight: 600; cursor: pointer; border: 1px solid var(--bd); background: var(--inset); color: var(--mut); text-decoration: none; }
.step-btn.active { border-color: var(--acc); background: var(--acc-soft); color: var(--acc-strong); }
.step-num { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; background: var(--soft-fill); color: var(--mut); }
.step-btn.active .step-num { background: var(--acc); color: var(--on-acc); }
.group-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.group-num { width: 26px; height: 26px; border-radius: 8px; background: rgba(91, 141, 255, .15); color: var(--acc); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.plan-layout { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr) 300px; }
.recap { position: sticky; top: 20px; }

/* dict rows */
.dict-row { display: flex; justify-content: space-between; align-items: center; background: var(--inset); border: 1px solid var(--bd); border-radius: 9px; padding: 9px 12px; font-size: 14px; }
.dict-ctrl { background: transparent; border: none; color: var(--mut); cursor: pointer; padding: 0 3px; font-size: 12px; }
.dict-ctrl.x { font-size: 16px; }
.dict-ctrl.x:hover { color: var(--red); }
.dict-ctrl.x.locked { opacity: .3; cursor: not-allowed; }
.dict-ctrl.x.locked:hover { color: var(--mut); }
.color-input { width: 54px; height: 40px; background: var(--inset); border: 1px solid var(--bd); border-radius: 9px; padding: 3px; cursor: pointer; }

/* toast */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--toast-bg); border: 1px solid var(--acc); color: var(--toast-tx); padding: 12px 22px; border-radius: 11px; font-size: 14px; font-weight: 600; z-index: 200; box-shadow: 0 14px 40px var(--shadow); animation: fu .25s ease; }

/* ---------------- Login ---------------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; position: relative; overflow: hidden; background: radial-gradient(900px 520px at 50% -5%, rgba(91, 141, 255, .12), transparent 60%); }
.login-card-wrap { position: relative; z-index: 2; width: 100%; max-width: 400px; text-align: center; animation: fu .5s ease; }
.login-logo { width: 132px; height: 132px; object-fit: contain; display: block; margin: 0 auto 4px; }
.login-eyebrow { font-size: 12px; color: var(--mut); letter-spacing: .22em; text-transform: uppercase; margin-bottom: 28px; }
.login-card { background: var(--s1); border: 1px solid var(--bd); border-radius: 18px; padding: 26px; text-align: left; box-shadow: 0 24px 70px var(--shadow); }
.login-divider { display: flex; align-items: center; gap: 10px; margin: 20px 0 14px; color: var(--mut); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; }
.login-divider .ln { flex: 1; height: 1px; background: var(--bd); }
.star { position: absolute; border-radius: 50%; background: #dfe8ff; animation: tw 3s ease-in-out infinite; }
[data-theme="light"] .star { display: none; }
.login-hint { font-size: 12px; color: var(--mut); margin-top: 14px; text-align: center; }

.spinner { width: 30px; height: 30px; border: 3px solid rgba(150, 170, 220, .2); border-top-color: var(--acc); border-radius: 50%; animation: sp .8s linear infinite; }

/* ---------------- Responsive ---------------- */
@media (max-width: 979px) {
  .plan-layout { grid-template-columns: 1fr; }
  .recap { position: static; }
}
@media (max-width: 899px) {
  .app { flex-direction: column; }
  .sidebar { width: auto; height: auto; border-right: none; border-bottom: 1px solid var(--bd); padding: 12px 14px; gap: 10px; z-index: 30; }
  .menu-toggle { display: flex; align-items: center; justify-content: center; }
  .nav { display: none; margin-top: 12px; gap: 6px; }
  .sidebar.open .nav { display: flex; }
  .nav-item { padding: 9px 13px; font-size: 13px; }
  .main { padding: 20px 16px 40px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .dict-grid { grid-template-columns: 1fr; }
  .summary-3 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  /* Wiersze pracowników i kosztów (Planowanie misji): sztywne min-width/width kontrolek
     sumują się do ~420–450px i w tych wierszach BEZ zawijania — na telefonie (≈343px
     szerokości treści) wypychały stronę w poziomie. Efekt: całą stronę dało się przesuwać
     na boki, a dotknięcia „uciekały" jako gest przewijania i nie dawało się trafić w przyciski
     (np. „Zapisz zmiany"). Zawinięcie wierszy usuwa poziomy nadmiar. */
  .worker-row, .cost-row { flex-wrap: wrap; }
}

/* ---------------- Misje: widok mapy ---------------- */
.map-layout { display: flex; gap: 14px; align-items: stretch; }
.map-canvas {
  flex: 1; height: 68vh; min-height: 420px; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--bd);
  /* Own stacking context so Leaflet's internal z-indexes (panes/controls/popups up to ~1000)
     stay contained and never paint over the app modal/toast (z-index 100/200). */
  position: relative; isolation: isolate; z-index: 0;
}
.map-side {
  width: 300px; flex: none; background: var(--s1); border: 1px solid var(--bd); border-radius: 14px;
  padding: 14px; overflow-y: auto; max-height: 68vh;
}
.map-side-head { font-weight: 700; font-size: 14px; margin-bottom: 10px; }

/* Teardrop pin (divIcon). Reuses the --c status-colour convention of .dot/.pill. */
.map-pin-wrap { background: transparent; border: none; }
.map-pin {
  display: grid; place-items: center; width: 22px; height: 22px;
  border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: var(--c, var(--acc)); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .45);
}
.map-pin b { transform: rotate(45deg); color: #fff; font-size: 11px; font-weight: 700; line-height: 1; }
.map-pin.approx { border-style: dashed; opacity: .8; }

/* Legend "approx" indicator */
.map-approx-note { display: inline-flex; align-items: center; gap: 6px; color: var(--mut); font-size: 12px; margin-left: 8px; }
.map-pin-mini { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--mut); }
.map-pin-mini.approx { background: transparent; border: 1.5px dashed var(--mut); }

/* Popups sit on Leaflet's default light chrome — use fixed neutral greys, not theme tokens. */
.map-pop-head { font-weight: 700; margin-bottom: 6px; }
.map-pop-row { padding: 4px 0; }
.map-pop-row a { font-weight: 600; }
.map-pop-meta { font-size: 12px; color: #667089; margin-left: 15px; }
.map-approx-tag { font-size: 10px; background: #eef1f7; color: #555; border-radius: 6px; padding: 1px 6px; }

/* Nearby (radius) panel */
.nearby-anchor { font-size: 12px; color: var(--mut); border-bottom: 1px solid var(--bd); padding-bottom: 8px; margin-bottom: 8px; }
.nearby-row { display: flex; gap: 10px; padding: 8px; border-radius: 10px; cursor: pointer; }
.nearby-row:hover { background: var(--hover-2); }
.nearby-km { font-weight: 700; color: var(--acc); white-space: nowrap; min-width: 56px; font-size: 13px; }
.nearby-place { font-weight: 600; font-size: 13px; margin-bottom: 3px; }
.nearby-mission { font-size: 12px; display: flex; align-items: center; gap: 6px; }
.nearby-mission a { color: var(--link); text-decoration: none; }
.nearby-mission a:hover { text-decoration: underline; }

@media (max-width: 899px) {
  .map-layout { flex-direction: column; }
  .map-side { width: auto; max-height: none; }
  .map-canvas { height: 56vh; }
}

/* Monthly report table */
.report-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.report-table th, .report-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--bd); white-space: nowrap; }
.report-table th { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--mut); font-weight: 600; }
.report-table td.wrap, .report-table th.wrap { white-space: normal; }
.report-table td.num, .report-table th.num { text-align: right; }
.report-table tbody tr:hover { background: var(--hover-2); }
.report-table .chk { width: 34px; text-align: center; }
.report-table input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; }

/* ---------------- Budżet ---------------- */
/* These live here rather than in a page's @section Head on purpose: app.js swaps only
   .container when navigating, so <head> styles from a page never reach the browser when the
   module is opened from the sidebar — the buttons would show up unstyled. */

/* Money in, money out. The two most-used controls in the module; they should be unmistakable
   at a glance, so they get colour rather than the neutral .btn treatment. */
/* No border-radius here on purpose: these rules sit after .btn-sm in the file, so setting one
   would override the small-button radius wherever they are combined. */
.btn-przychod { background: var(--green); color: #06110c; border: none; font-weight: 700; }
.btn-wydatek { background: var(--red); color: #1a0608; border: none; font-weight: 700; }

/* Once-a-month allocation. Tinted rather than solid — it should stand out from the neutral
   buttons without shouting over the two everyday ones above. */
.btn-rozdysponuj,
.btn-podatek {
  background: rgba(245, 196, 81, .16); color: var(--gold-text);
  border: 1px solid rgba(245, 196, 81, .38); font-weight: 700;
}
.btn-rozdysponuj:hover,
.btn-podatek:hover { background: rgba(245, 196, 81, .24); }

/* The amount in a short, pre-filled dialog — big enough to read at arm's length. */
.qk-amount { font-size: 32px; font-weight: 700; text-align: center; padding: 14px; }

/* Picking a template: the whole row is the target, so it has to read as clickable without
   turning the list into a wall of link-blue text. */
.szablon-wybor { color: inherit; text-decoration: none; cursor: pointer; }
.szablon-wybor:hover { background: var(--hover-2); border-color: var(--acc); }

/* Fund progress towards its target. The bar is capped at 100% so an exceeded fund does not
   overflow its track, while the caption keeps showing the real percentage. */
.fund-bar { height: 6px; border-radius: 999px; background: var(--inset); border: 1px solid var(--bd); overflow: hidden; margin-top: 6px; }
.fund-bar > span { display: block; height: 100%; background: var(--acc); border-radius: 999px; }
.fund-bar.done > span { background: var(--green); }

/* Tags on a form: the picked ones as removable pills above the list they came from. The list
   stays one control tall no matter how many tags exist — a row of chips would not. */
.tag-wybrane { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-wybrane:not(:empty) { margin-bottom: 8px; }
.tag-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 12px;
  border-radius: 999px; font-size: 13px; font-weight: 600;
  border: 1px solid var(--acc); background: color-mix(in srgb, var(--acc) 13%, transparent);
  color: var(--acc-strong);
}
.tag-x {
  border: 0; background: transparent; cursor: pointer; line-height: 1;
  font-size: 15px; padding: 0 4px; color: inherit; opacity: .65;
}
.tag-x:hover { opacity: 1; }

/* Tag pills on the transaction list: quieter than the type pill next to them. */
.tag-pill {
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px;
  background: var(--inset); border: 1px solid var(--bd); color: var(--mut); white-space: nowrap;
}

/* ---------------- Pager ----------------
   Sits above and below every long list, so the next page is one click away wherever
   the reader stopped. Edge buttons stay in place as disabled ghosts rather than
   disappearing — the row must not shift under the cursor between pages. */
.pager {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; margin: 14px 0;
}
.pager-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pager-now {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; padding: 7px 12px; border-radius: 8px;
  font-size: 12px; font-weight: 700; background: var(--acc); color: var(--on-acc);
}
.pager-info { color: var(--mut); font-size: 12px; }

/* ---------------- Dyskusje i tematy ----------------
   Register of things the board still has to settle: the list on the left, one topic open
   beside it. Colour is carried by the status bar alone — tinting whole rows would turn the
   list into a traffic light and make the titles the second thing you read. */
.dt-layout { display: grid; gap: 18px; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); align-items: start; }
.dt-rows { display: flex; flex-direction: column; gap: 8px; }

/* The row is square on the left so the status bar can be: a 7px sliver with a 10px radius
   reads as a smudge, not as a marker. */
.dt-row {
  display: flex; align-items: stretch; gap: 0; text-decoration: none; color: inherit;
  background: var(--s1); border: 1px solid var(--bd); border-left: none;
  border-radius: 0 11px 11px 0; overflow: hidden;
}
.dt-row:hover { background: var(--hover-2); }
.dt-row.sel { background: var(--acc-soft); border-color: var(--acc); }
.dt-pasek { flex: none; width: 7px; border-radius: 0; }
.dt-row-tresc { display: flex; flex-direction: column; gap: 3px; padding: 11px 14px; min-width: 0; }
.dt-row-tytul { font-size: 14px; font-weight: 600; line-height: 1.35; }
.dt-row-meta { font-size: 12px; color: var(--mut); }

/* Status chips carry their colour in --c, the same custom property .fchip already reads. */
.dt-kropka { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dt-licznik { font-size: 11px; font-weight: 700; opacity: .75; }

.dt-tytul { font-size: 20px; font-weight: 700; margin: 10px 0 0; line-height: 1.3; }

/* Four buttons, all of them live. What a status requires is checked on the server after the
   click, so the refusal can say what is missing. */
.dt-statusy { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.dt-status {
  border: 1px solid var(--c, var(--bd)); background: transparent; color: var(--c, var(--tx));
  border-radius: 999px; padding: 7px 15px; font-size: 13px; font-weight: 600; cursor: pointer;
  font-family: inherit;
}
.dt-status:hover { background: color-mix(in srgb, var(--c, var(--acc)) 14%, transparent); }
.dt-status.on { background: var(--c, var(--acc)); color: var(--on-acc); font-weight: 700; }

.dt-pole { margin-top: 18px; }
.dt-pole-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.dt-edit {
  text-decoration: none; color: var(--mut); border: 1px solid var(--bd); border-radius: 8px;
  padding: 2px 9px; font-size: 13px; line-height: 1.6;
}
.dt-edit:hover { color: var(--acc); border-color: var(--acc); }

/* Reading mode. Clicking the text opens the editor (app.js), except on a link inside it. */
.dt-podglad { border: 1px solid transparent; border-radius: 10px; padding: 8px 10px; margin: 0 -10px; cursor: text; }
.dt-podglad:hover { border-color: var(--bd); background: var(--hover); }

/* The conclusion and its owner, set apart from the rest: the pair is what the register is for. */
.dt-wniosek {
  margin-top: 22px; background: var(--inset); border: 1px solid var(--bd);
  border-radius: 12px; padding: 14px 16px;
}
.dt-wniosek .dt-podglad { margin: 0 -10px; }

/* The one place a plain-text field becomes readable markup — see Pages/Shared/_Tekst.cshtml.
   pre-wrap is what keeps the user's line breaks; a pasted address must be able to wrap or it
   would push the panel wider than the screen. */
.tekst { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.55; }
.tekst a { color: var(--link); text-decoration: underline; }

@media (max-width: 899px) {
  .dt-layout { grid-template-columns: 1fr; }
}
