:root {
  --bg: #f3f6f8;
  --card: #ffffff;
  --text: #17232e;
  --muted: #6c7a86;
  --line: #dce4ea;
  --franek: #44b8df;
  --iwona: #b783d7;
  --holiday: #ffe768;
  --olv-only: #ffb45a;
  --mencia-only: #78c98d;
  --pending: #f2a65a;
  --primary: #0b6ea8;
  --selected: #159447;
  --danger: #b83232;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Inter, system-ui, -apple-system, Segoe UI, sans-serif; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .85rem 1.1rem; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(8px); }
h1 { margin: 0; font-size: 1.25rem; }
.version { font-size: .68rem; font-weight: 700; color: var(--muted); vertical-align: middle; }
h2 { margin: 0; font-size: 1.05rem; }
h4 { margin: 0; }
#subtitle { margin: .12rem 0 0; color: var(--muted); font-size: .82rem; }
main { max-width: 1480px; margin: 0 auto; padding: .9rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 4px 18px rgba(34,58,76,.04); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .65rem; margin-bottom: .7rem; }
.stat-card { padding: .85rem; }
.label { color: var(--muted); display: block; font-size: .76rem; }
.stat-card strong { display: block; font-size: 1.42rem; margin: .25rem 0; }
.stat-card small { color: var(--muted); }
.progress { height: 6px; background: #eaf0f4; border-radius: 999px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--primary); width: 0; }
.franek-card .progress span { background: var(--franek); }
.iwona-card .progress span { background: var(--iwona); }
.toolbar { display: grid; grid-template-columns: auto auto auto 1fr; align-items: center; gap: .75rem; padding: .7rem; margin-bottom: .7rem; }
.year-nav, .toolbar-actions { display: flex; gap: .4rem; align-items: center; }
.toolbar-actions { flex-wrap: wrap; }
select, input { min-width: 0; border: 1px solid var(--line); border-radius: 9px; padding: .62rem .7rem; background: white; color: var(--text); font: inherit; }
button { border: 0; border-radius: 9px; padding: .65rem .82rem; font-weight: 700; cursor: pointer; font: inherit; }
button:focus-visible, select:focus-visible, input:focus-visible { outline: 3px solid rgba(11,110,168,.25); outline-offset: 1px; }
button:disabled { cursor: not-allowed; opacity: .5; }
.primary { background: var(--primary); color: white; }
.secondary { background: #eef3f6; color: var(--text); }
.danger { background: #fff0f0; color: var(--danger); }
.legend { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .6rem; font-size: .75rem; color: var(--muted); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: .22rem; }
.dot.franek { background: var(--franek); }.dot.iwona { background: var(--iwona); }.dot.holiday { background: var(--holiday); }.dot.pending { background: var(--pending); }
.mini-badge { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; margin-right: .18rem; font-style: normal; font-size: .65rem; font-weight: 900; color: #26323b; }
.mini-badge.olv { background: rgba(255,180,90,.4); border: 1px solid var(--olv-only); }
.mini-badge.mencia { background: rgba(120,201,141,.35); border: 1px solid var(--mencia-only); }
.mini-badge.rijk, .school-marker .r { background: #fff0a8; border: 1px solid #c9a82b; color: #4d4314; }
.calendar-grid { display: grid; grid-template-columns: repeat(4, minmax(250px, 1fr)); gap: .65rem; }
.month { background: white; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
.month h3 { margin: 0; padding: .62rem .75rem; background: linear-gradient(180deg,#138ac7,#086497); color: white; font-size: .93rem; }
.weekdays, .days { display: grid; grid-template-columns: repeat(7, 1fr); }
.weekdays span { text-align: center; padding: .36rem .05rem; font-size: .64rem; color: var(--muted); font-weight: 700; }
.day { width: 100%; min-height: 43px; border-top: 1px solid #eef2f5; border-right: 1px solid #eef2f5; padding: .25rem; position: relative; font-size: .74rem; font-weight: 400; text-align: left; border-radius: 0; background: white; cursor: pointer; user-select: none; }
.day:nth-child(7n) { border-right: 0; }
.day.empty { background: #fafcfd; cursor: default; }
.day:not(.empty):hover { box-shadow: inset 0 0 0 1px rgba(11,110,168,.28); }
.day.today { outline: 2px solid var(--primary); outline-offset: -2px; }
.day.common-free { background: color-mix(in srgb, var(--holiday) 44%, white); }
.day.vacation-approved-franek { background: color-mix(in srgb, var(--franek) 34%, white); }
.day.vacation-approved-iwona { background: color-mix(in srgb, var(--iwona) 34%, white); }
.day.olv-only { background: linear-gradient(135deg, rgba(255,180,90,.2) 0 33%, white 33%); }
.day.mencia-only { background: linear-gradient(135deg, rgba(120,201,141,.18) 0 33%, white 33%); }
.day.selected-vacation { box-shadow: inset 0 0 0 3px var(--selected); background-image: linear-gradient(rgba(21,148,71,.1), rgba(21,148,71,.1)); }
.day.range-start { box-shadow: inset 0 0 0 3px #5b46d6; }
.day.conflict { box-shadow: inset 0 0 0 3px var(--danger); }
.day.manual-school::after { content: '✎'; position: absolute; right: 3px; bottom: 11px; color: #4f5b64; font-size: .62rem; }
.school-marker { position: absolute; top: 3px; right: 3px; display: flex; gap: 2px; }
.school-marker b { display: grid; place-items: center; width: 14px; height: 14px; border-radius: 4px; font-size: .55rem; line-height: 1; }
.school-marker .o { background: rgba(255,180,90,.55); }.school-marker .m { background: rgba(120,201,141,.55); }
.owner { position: absolute; left: 4px; right: 4px; bottom: 4px; height: 5px; border-radius: 999px; opacity: .96; }
.owner.franek { background: var(--franek); }.owner.iwona { background: var(--iwona); }
.pending-mark { position: absolute; top: 4px; left: 4px; width: 7px; height: 7px; border-radius: 50%; background: var(--pending); }
.pending-vacation-mark { position: absolute; top: 4px; left: 4px; width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(255,255,255,.9); }
.pending-vacation-mark.franek { background: var(--franek); }
.pending-vacation-mark.iwona { background: var(--iwona); }
.selection-bar { position: sticky; top: 70px; z-index: 15; padding: .75rem; margin-bottom: .7rem; border-color: rgba(21,148,71,.35); }
.hidden { display: none !important; }
.selection-main { display: flex; justify-content: space-between; gap: .8rem; align-items: center; }
.selection-help { display: block; color: var(--muted); font-size: .76rem; margin-top: .1rem; }
.inline-label { display: flex; align-items: center; gap: .4rem; font-size: .76rem; font-weight: 700; }
.selection-counters { display: grid; grid-template-columns: repeat(5, 1fr); gap: .45rem; margin-top: .6rem; }
.selection-counters > div { background: #f6f9fb; border: 1px solid var(--line); border-radius: 10px; padding: .5rem .6rem; }
.selection-counters span { display: block; color: var(--muted); font-size: .66rem; }
.selection-counters strong { font-size: 1rem; }
.selection-actions { display: flex; gap: .4rem; justify-content: flex-end; flex-wrap: wrap; margin-top: .6rem; }
.selection-warning { margin-top: .55rem; border: 1px solid #f2c56d; background: #fff9e9; border-radius: 9px; padding: .5rem .65rem; font-size: .75rem; }
.range-active { background: #5b46d6 !important; color: white !important; }
.quick-actions { display: flex; align-items: center; gap: .65rem; margin: .7rem 0; }
.quick-note { color: var(--muted); font-size: .78rem; }
.content-card { padding: .9rem; margin-top: .7rem; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: .6rem; }
.compact-head { margin-top: .8rem; }
.badge { background: #eef3f6; border-radius: 999px; padding: .18rem .5rem; font-size: .75rem; }
.list { display: grid; gap: .5rem; margin-top: .7rem; }
.list-item { border: 1px solid var(--line); border-radius: 11px; padding: .65rem; display: flex; justify-content: space-between; gap: .6rem; align-items: center; }
.list-item small { color: var(--muted); display: block; margin-top: .12rem; }
.list-actions { display: flex; gap: .3rem; flex-wrap: wrap; }
dialog { width: min(500px, calc(100vw - 1.5rem)); border: 0; border-radius: 15px; padding: 0; box-shadow: 0 18px 60px rgba(0,0,0,.2); }
dialog.wide-dialog { width: min(760px, calc(100vw - 1.5rem)); }
dialog::backdrop { background: rgba(10,20,30,.4); }
dialog form { padding: 1rem; display: grid; gap: .72rem; }
dialog h3 { margin: 0; }
.dialog-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: .7rem; }
.icon-btn { padding: .15rem .5rem; font-size: 1.6rem; line-height: 1; background: transparent; color: var(--muted); }
label { display: grid; gap: .28rem; font-size: .82rem; font-weight: 700; }
.dialog-actions { display: flex; justify-content: flex-end; gap: .4rem; flex-wrap: wrap; }
.hint { font-size: .76rem; color: var(--muted); margin: 0; }
.day-status { display: grid; gap: .4rem; }
.status-row { display: flex; justify-content: space-between; gap: .6rem; padding: .5rem .6rem; background: #f6f9fb; border-radius: 9px; font-size: .78rem; }
.status-row strong { text-align: right; }
.day-history-section { border-top: 1px solid var(--line); padding-top: .65rem; }
.day-history-section h4 { font-size: .82rem; margin-bottom: .4rem; }
.day-history { display: grid; gap: .42rem; }
.day-history > small { color: var(--muted); }
.day-history-item { display: grid; grid-template-columns: 165px 1fr; gap: .55rem; align-items: start; padding: .48rem .55rem; border-radius: 9px; background: #f6f9fb; font-size: .75rem; }
.day-history-item time { color: var(--muted); font-weight: 700; }
.day-history-item span { line-height: 1.35; }
.day-actions { display: grid; gap: .45rem; }
.date-pair { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; }
.source-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.source-grid article { border: 1px solid var(--line); border-radius: 10px; padding: .65rem; }
.source-grid small { display: block; color: var(--muted); margin-top: .18rem; }
.info-box { margin: 0; padding: .6rem; background: #f6f9fb; border: 1px solid var(--line); border-radius: 9px; font-size: .76rem; }
@media (max-width: 1100px) {
  .calendar-grid { grid-template-columns: repeat(3,1fr); }
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .toolbar { grid-template-columns: 1fr auto; }
  .legend { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 760px) {
  main { padding: .55rem; }
  .topbar { padding: .65rem .7rem; }
  .topbar #todayBtn { padding: .55rem .65rem; }
  h1 { font-size: 1.05rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: .45rem; }
  .stat-card { padding: .65rem; }
  .stat-card strong { font-size: 1.15rem; }
  .toolbar { grid-template-columns: 1fr; align-items: stretch; }
  .year-nav, .toolbar-actions { justify-content: space-between; }
  .toolbar-actions button { flex: 1; }
  .calendar-grid { grid-template-columns: 1fr; }
  .selection-bar { top: 59px; }
  .selection-main { align-items: stretch; flex-direction: column; }
  .inline-label { justify-content: space-between; }
  .selection-counters { grid-template-columns: repeat(2, 1fr); }
  .selection-counters > div:last-child { grid-column: 1 / -1; }
  .selection-actions button { flex: 1 1 45%; }
  .quick-actions { align-items: stretch; flex-direction: column; }
  .quick-note { padding: 0 .2rem; }
  .date-pair, .source-grid { grid-template-columns: 1fr; }
  .list-item { align-items: stretch; flex-direction: column; }
  .list-actions button { flex: 1; }
  .day-history-item { grid-template-columns: 1fr; gap: .18rem; }
}

/* v0.3: tryb wyboru wakacji i zamiany */
.day.selection-disabled {
  background: #f2f4f5 !important;
  color: #6f7b84;
  cursor: not-allowed;
}
/* Zwykłe nieklikalne dni są tylko lekko wygaszone; pasek nadal pokazuje,
   u kogo są dziewczyny przed/po wakacjach. */
.day.selection-disabled .owner { opacity: .82; height: 6px; }
.day.selection-disabled .school-marker,
.day.selection-disabled .pending-mark { opacity: .55; }
/* Status wakacyjny ma pozostać czytelny nawet wtedy, gdy dnia nie można już wybrać. */
.day.selection-disabled.common-free:not(.vacation-approved-franek):not(.vacation-approved-iwona) {
  background: color-mix(in srgb, var(--holiday) 38%, #eef2f4) !important;
}
.day.selection-disabled.vacation-approved-franek {
  background: color-mix(in srgb, var(--franek) 30%, #eef2f4) !important;
}
.day.selection-disabled.vacation-approved-iwona {
  background: color-mix(in srgb, var(--iwona) 30%, #eef2f4) !important;
}
.day.selection-disabled .pending-vacation-mark { opacity: .9; }
.day.selection-available { cursor: pointer; }
.day.selection-available:hover { box-shadow: inset 0 0 0 2px rgba(21,148,71,.35); }
.day.selection-assigned { color: #6f7b84; }
.day.swap-source { box-shadow: inset 0 0 0 3px #5b46d6; background-image: linear-gradient(rgba(91,70,214,.09), rgba(91,70,214,.09)); }
.day.swap-target { cursor: pointer; }
.day.swap-target:hover { box-shadow: inset 0 0 0 2px rgba(91,70,214,.35); }
.day.swap-disabled { background: #eef2f4 !important; color: #9aa5ad; cursor: not-allowed; filter: grayscale(.5); }
.day.swap-disabled .owner { opacity: .28; }
.swap-selection-bar { position: sticky; top: 70px; z-index: 15; padding: .75rem; margin-bottom: .7rem; border-color: rgba(91,70,214,.35); display:flex; justify-content:space-between; gap:.75rem; align-items:center; }
.exchange-summary { display:grid; gap:.45rem; }
.exchange-summary .status-row { background:#f6f9fb; }
@media (max-width: 760px) {
  .swap-selection-bar { top:59px; align-items:stretch; flex-direction:column; }
  .swap-selection-bar button { width:100%; }
}

/* v0.4.1 — tymczasowa tożsamość użytkownika przed wdrożeniem logowania */
.user-switch { display:flex; align-items:center; gap:.4rem; font-size:.72rem; color:var(--muted); white-space:nowrap; }
.user-switch select { min-width:92px; }
.current-user-badge { display:none; }
.list-item .withdraw { min-width:82px; }
@media (max-width: 980px){ .user-switch { justify-content:flex-start; } }
@media (max-width: 700px){ .user-switch { justify-content:space-between; width:100%; } }


/* v0.4.3 — decyzje bezpośrednio z dnia + godzina zdarzeń */
.day-pending-section { border-top: 1px solid var(--line); padding-top: .65rem; }
.day-pending-section h4 { font-size: .82rem; margin-bottom: .4rem; }
.day-pending-list { display: grid; gap: .45rem; }
.day-pending-item { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .58rem .62rem; background: #fff9e9; border: 1px solid #f2d18a; border-radius: 10px; }
.day-pending-copy { min-width: 0; }
.day-pending-copy strong { display: block; font-size: .78rem; line-height: 1.35; }
.day-pending-copy small { display: block; color: var(--muted); font-size: .7rem; margin-top: .15rem; line-height: 1.35; }
.day-pending-actions { display: flex; gap: .35rem; flex-wrap: wrap; flex: 0 0 auto; }
.day-pending-actions button { padding: .5rem .65rem; }
@media (max-width: 760px) {
  .day-pending-item { align-items: stretch; flex-direction: column; }
  .day-pending-actions button { flex: 1; }
}


/* v0.4.4 — branding, centered logo and stronger controls */
:root {
  --primary: #07558f;
  --primary-dark: #053f72;
  --accent: #13a9df;
  --accent-soft: #e9f7fd;
  --accent-border: #9fd6ea;
  --logo-violet: #8d4bd3;
  --logo-pink: #ef5ca8;
}
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.topbar {
  display: grid;
  grid-template-columns: 1fr minmax(220px, auto) 1fr;
  align-items: center;
  min-height: 96px;
  padding: .55rem 1.1rem;
  background: rgba(255,255,255,.97);
}
.topbar-balance { min-width: 0; }
.brand-lockup {
  justify-self: center;
  display: grid;
  justify-items: center;
  min-width: 0;
}
.brand-logo {
  display: block;
  width: min(330px, 42vw);
  max-height: 64px;
  object-fit: contain;
}
.brand-caption {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: .42rem;
  margin-top: .1rem;
  color: var(--muted);
  font-size: .72rem;
  text-align: center;
}
#subtitle { margin: 0; font-size: inherit; }
.version {
  padding: .1rem .36rem;
  border: 1px solid #cce5ef;
  border-radius: 999px;
  background: #f3fbfe;
  color: var(--primary-dark);
  line-height: 1.2;
}
.today-button { justify-self: end; }

.primary {
  background: linear-gradient(135deg, var(--primary-dark), var(--accent));
  color: #fff;
  border: 1px solid #0876ac;
  box-shadow: 0 3px 9px rgba(5,85,143,.16);
}
.primary:hover { filter: brightness(1.04); }
.secondary {
  background: linear-gradient(180deg, #f7fcff, var(--accent-soft));
  color: var(--primary-dark);
  border: 1px solid var(--accent-border);
}
.secondary:hover { background: #ddf3fb; }
button:focus-visible, select:focus-visible, input:focus-visible {
  outline: 3px solid rgba(19,169,223,.28);
}
.toolbar {
  border-color: #c9e1eb;
  box-shadow: 0 5px 18px rgba(5,63,114,.05);
}
.year-nav {
  gap: .5rem;
  padding: .18rem;
  border-radius: 12px;
  background: #f2f9fc;
  border: 1px solid #d6e9f1;
}
.year-nav .secondary {
  min-width: 44px;
  min-height: 44px;
  padding: .55rem .7rem;
  background: linear-gradient(135deg, #0878b5, #17aee2);
  border-color: #0877ad;
  color: white;
  font-size: 1.08rem;
  font-weight: 900;
  box-shadow: 0 2px 7px rgba(5,85,143,.16);
}
#yearSelect {
  min-width: 106px;
  min-height: 44px;
  padding: .55rem 2rem .55rem .8rem;
  border: 2px solid #55bade;
  background: #fff;
  color: var(--primary-dark);
  font-size: 1rem;
  font-weight: 850;
  text-align: center;
  box-shadow: 0 2px 7px rgba(5,85,143,.08);
}
#schoolDataBtn { background: #eef8fc; }
#assignVacationBtn { min-height: 44px; }
.user-switch select { border-color: #b9ddea; }
.month h3 { background: linear-gradient(180deg, #128fc6, #075885); }
.difference-card #schoolDifferenceHint {
  display: block;
  margin-top: .28rem;
  color: #4f6674;
  line-height: 1.35;
  font-size: .69rem;
}
@media (max-width: 760px) {
  .topbar {
    grid-template-columns: 44px 1fr auto;
    min-height: 80px;
    padding: .45rem .55rem;
  }
  .brand-logo { width: min(230px, 58vw); max-height: 52px; }
  .brand-caption { font-size: .62rem; gap: .25rem; }
  .today-button { padding: .5rem .58rem !important; }
  .year-nav { width: 100%; justify-content: center; }
  #yearSelect { flex: 1; max-width: 160px; }
}

/* v0.5 — logowanie, panel kont, branding produkcyjny */
:root {
  --primary: #064d87;
  --primary-dark: #033963;
  --accent: #18aee4;
  --accent-soft: #e9f8fd;
  --accent-border: #8dd7ef;
  --franek: #25aeda;
  --iwona: #a56bd6;
  --logo-pink: #ef5ca8;
  --logo-violet: #8d4bd3;
}
body:not(.app-ready) .topbar,
body:not(.app-ready) main,
body:not(.app-ready) dialog:not(#installHelpDialog) { display:none; }
.auth-gate { min-height: 100vh; display:grid; place-items:center; padding:1rem; background:linear-gradient(180deg,#f6fbfe,#eef4f8); }
body.app-ready .auth-gate { display:none; }
.auth-card { width:min(440px,100%); background:#fff; border:1px solid var(--line); border-radius:20px; padding:1.2rem; box-shadow:0 16px 55px rgba(3,57,99,.13); }
.auth-logo { display:block; width:min(330px,82%); max-height:105px; object-fit:contain; margin:0 auto .65rem; }
.auth-card h2 { text-align:center; margin:.25rem 0; color:var(--primary-dark); }
.auth-subtitle { color:var(--muted); text-align:center; margin:.2rem 0 .9rem; font-size:.88rem; line-height:1.45; }
.auth-form { display:grid; gap:.72rem; }
.auth-form input { min-height:46px; font-size:1rem; }
.auth-submit { min-height:48px; font-size:1rem; margin-top:.15rem; }
.auth-security { display:block; color:var(--muted); line-height:1.35; text-align:center; margin-top:.85rem; }
.form-error { color:#a62828; background:#fff0f0; border:1px solid #f1bcbc; border-radius:9px; padding:.55rem .65rem; margin:0; font-size:.78rem; }

.topbar { grid-template-columns:1fr minmax(280px,auto) 1fr; min-height:102px; padding:.5rem 1rem; border-bottom:1px solid var(--line); }
.brand-logo { width:min(390px,46vw); max-height:72px; object-fit:contain; }
.brand-caption { margin-top:-.25rem; }
.account-area { justify-self:end; }
.account-button { display:flex; align-items:center; gap:.45rem; padding:.42rem .6rem; background:#fff; border:1.5px solid #b9ddea; color:var(--primary-dark); border-radius:999px; box-shadow:0 2px 8px rgba(3,57,99,.06); font-weight:800; }
.account-button:hover { border-color:var(--accent); background:var(--accent-soft); }
.account-avatar { width:31px; height:31px; border-radius:50%; display:grid; place-items:center; color:#fff; font-size:.78rem; font-weight:900; }
.account-avatar.franek { background:linear-gradient(145deg,#0d88c4,#19b5e4); }
.account-avatar.iwona { background:linear-gradient(145deg,#b36ade,#ef5ca8); }
.account-menu { display:grid; gap:.5rem; }
.account-menu button { width:100%; text-align:left; min-height:44px; }

button.primary { background:linear-gradient(180deg,#0b79bb,#05588f); border-color:#05588f; color:white; box-shadow:0 2px 6px rgba(5,88,143,.16); }
button.primary:hover { background:linear-gradient(180deg,#1088c9,#064d87); }
button.secondary { background:#f2f9fc; border:1.5px solid #abdced; color:var(--primary-dark); }
button.secondary:hover { background:#e5f6fc; border-color:#5fc6e6; }
button.danger { background:#fff1f4; color:#a31f45; border:1.5px solid #f0b4c5; }
.year-nav { padding:.18rem; border-radius:14px; background:#eef8fc; border:1px solid #cae9f4; gap:.38rem; }
.year-nav button { width:46px; min-height:46px; border-radius:11px; font-size:1.25rem; font-weight:900; background:#fff; border:2px solid #75c9e5; color:var(--primary-dark); box-shadow:0 2px 6px rgba(3,57,99,.08); }
#yearSelect { min-height:46px; min-width:118px; border:2px solid #75c9e5; border-radius:11px; background:#fff; color:var(--primary-dark); font-weight:900; font-size:1rem; text-align:center; }
.toolbar { grid-template-columns:auto auto 1fr; gap:.75rem 1rem; }
.toolbar-actions { align-items:center; }
.month h3 { background:linear-gradient(180deg,#0e8dc4,#075987); }

.admin-create { border:1px solid var(--line); background:#f8fbfd; border-radius:12px; padding:.75rem; }
.admin-create h4 { margin:0 0 .55rem; }
.admin-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.55rem; }
.admin-password-field { grid-column:1/-1; }
.admin-users-list { display:grid; gap:.55rem; margin-top:.6rem; }
.admin-user-row { border:1px solid var(--line); border-radius:12px; padding:.65rem; display:grid; grid-template-columns:1fr auto; gap:.7rem; align-items:center; }
.admin-user-meta strong { display:block; }
.admin-user-meta small { display:block; color:var(--muted); margin-top:.14rem; }
.admin-user-actions { display:flex; gap:.35rem; flex-wrap:wrap; justify-content:flex-end; }
.admin-user-actions button { padding:.48rem .62rem; }
.install-help { display:grid; gap:.35rem; line-height:1.45; }
.app-toast { position:fixed; right:1rem; bottom:1rem; z-index:120; max-width:min(430px,calc(100vw - 2rem)); background:#073f6e; color:#fff; border-radius:12px; padding:.7rem .85rem; box-shadow:0 12px 34px rgba(0,0,0,.22); font-size:.82rem; }
.app-toast.error { background:#8b2232; }

@media (max-width:760px) {
  .topbar { grid-template-columns:44px 1fr auto; min-height:84px; padding:.4rem .5rem; }
  .brand-logo { width:min(260px,58vw); max-height:58px; }
  .brand-caption { font-size:.6rem; }
  .account-button #accountName { display:none; }
  .account-button { padding:.35rem; }
  .toolbar { grid-template-columns:1fr; }
  .year-nav { justify-content:center; }
  #yearSelect { flex:1; max-width:180px; }
  .admin-form-grid { grid-template-columns:1fr; }
  .admin-password-field { grid-column:auto; }
  .admin-user-row { grid-template-columns:1fr; }
  .admin-user-actions { justify-content:stretch; }
  .admin-user-actions button { flex:1; }
}

/* v0.5.2 — informacja o trwałym logowaniu urządzenia */
.auth-device-note{margin:.35rem 0 .8rem;padding:.55rem .7rem;border-radius:10px;background:#eef6ff;color:#315a78;font-size:.86rem;line-height:1.35;}

/* v0.5.2 — markery wniosków, pełne nazwy szkół i start na bieżącym miesiącu */
.month { scroll-margin-top: 112px; }
.school-marker { max-width: calc(100% - 4px); align-items: center; }
.school-marker b { width: auto; min-width: 18px; height: 15px; padding: 0 3px; border-radius: 4px; font-size: .48rem; white-space: nowrap; letter-spacing: -.01em; }
.school-marker .o { background: rgba(255,180,90,.68); border: 1px solid #dc8f2e; color:#684317; }
.school-marker .m { background: rgba(120,201,141,.56); border: 1px solid #5bac72; color:#285d38; }
.mini-badge.wide { width:auto; min-width:28px; padding:0 5px; }
.mini-badge.mencia.wide { min-width:46px; }

.request-marker { position:absolute; top:4px; left:4px; width:9px; height:9px; z-index:3; box-sizing:border-box; }
.request-marker.vacation { border-radius:50%; box-shadow:0 0 0 1px rgba(255,255,255,.95); }
.request-marker.vacation.franek { background:var(--franek); }
.request-marker.vacation.iwona { background:var(--logo-pink); }
.request-marker.takeover { border-radius:50%; background:#fff; border:2px solid; box-shadow:0 0 0 1px rgba(255,255,255,.9); }
.request-marker.takeover.franek { border-color:var(--franek); }
.request-marker.takeover.iwona { border-color:var(--logo-pink); }
.request-marker.swap { width:8px; height:8px; top:5px; left:5px; transform:rotate(45deg); border-radius:1px; box-shadow:0 0 0 1px rgba(255,255,255,.95); }
.request-marker.swap.franek { background:var(--franek); }
.request-marker.swap.iwona { background:var(--logo-pink); }

.request-symbol { display:inline-block; width:10px; height:10px; margin-right:.18rem; vertical-align:-1px; box-sizing:border-box; }
.request-symbol.vacation { border-radius:50%; }
.request-symbol.vacation.franek { background:var(--franek); }
.request-symbol.vacation.iwona { background:var(--logo-pink); }
.request-symbol.takeover { border-radius:50%; background:#fff; border:2px solid; }
.request-symbol.takeover.franek { border-color:var(--franek); }
.request-symbol.takeover.iwona { border-color:var(--logo-pink); }
.request-symbol.swap { width:8px; height:8px; transform:rotate(45deg); margin-left:1px; margin-right:.28rem; border-radius:1px; }
.request-symbol.swap.franek { background:var(--franek); }
.request-symbol.swap.iwona { background:var(--logo-pink); }
.day.selection-disabled .request-marker { opacity:.78; }
.account-status { display:block; color:var(--muted); font-size:.72rem; line-height:1.35; padding:.05rem .15rem .2rem; }

@media (max-width:760px) {
  .month { scroll-margin-top: 92px; }
  .school-marker b { font-size:.46rem; padding:0 2px; }
  .school-marker .m { max-width:38px; overflow:hidden; text-overflow:ellipsis; }
}
