/* Widoki: plan stażysty, urlop, wnioski, oddział, raport, zarządzanie. */
.hide-sm {}
.print-only { display: none; }
.over-txt, .over { color: var(--danger); font-weight: 650; }
.big-num { font-size: var(--fs-md); margin-bottom: .4rem; }
.big-num strong { font-size: var(--fs-xl); }

/* moduły programu */
.modules { list-style: none; margin: 0; padding: 0; display: grid; gap: .85rem; }
.mod-head { display: flex; justify-content: space-between; gap: .75rem; align-items: baseline; margin-bottom: .3rem; font-size: var(--fs-sm); }
.mod-name { font-weight: 600; }
.mod-num { white-space: nowrap; color: var(--ink-2); display: inline-flex; gap: .4rem; align-items: center; }
.mod-blocks { margin-top: .25rem; }
.module.is-bad .mod-name { color: var(--danger); }

/* listy wniosków */
.req-list { list-style: none; margin: 0; padding: 0; }
.req-list li { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .55rem 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.req-list li:last-child { border-bottom: 0; }
.req-list a { text-decoration: none; display: grid; gap: .1rem; }
.req-list a:hover .req-kind { text-decoration: underline; }
.req-kind { font-weight: 600; color: var(--ink); }
.req-list form { margin: 0; }

/* podgląd skutków */
.impact { display: grid; gap: .6rem; margin-bottom: .75rem; }
.impact-sec h3 { font-size: var(--fs-sm); margin: 0 0 .25rem; display: flex; gap: .35rem; align-items: center; }
.impact-sec ul { margin: 0; padding-left: 1.1rem; font-size: var(--fs-sm); }
.impact-sec.is-warn { background: var(--warn-soft); border: 1px solid #e5c56d; border-radius: var(--radius); padding: .5rem .7rem; color: #4d3100; }
.impact-box { background: var(--surface-2); box-shadow: none; }
[data-field][hidden] { display: none; }

/* urlop */
.leave-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin: 0 0 .75rem; }
.leave-stats div { padding: .35rem .5rem; border-left: 1px solid var(--line); }
.leave-stats div:first-child { border-left: 0; padding-left: 0; }
.leave-stats dt { font-size: var(--fs-xs); color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.leave-stats dd { margin: 0; font-size: var(--fs-xl); font-weight: 650; }
.leave-stats .is-neg dd { color: var(--danger); }
.meter-lg { height: 14px; }
.leave-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1rem; margin-top: 1rem; align-items: start; }
.leave-side { position: sticky; top: 64px; display: grid; gap: 1rem; }
.months { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .75rem; }
.month { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem .6rem .4rem; }
.month-h { margin: 0 0 .35rem; font-size: var(--fs-sm); text-transform: capitalize; }
.past-months { margin-bottom: .75rem; }
.past-months summary { cursor: pointer; font-weight: 600; font-size: var(--fs-sm); padding: .4rem 0; color: var(--accent); }
table.cal { width: 100%; border-collapse: collapse; table-layout: fixed; }
table.cal th { font-size: 10px; font-weight: 600; color: var(--ink-3); padding: 0 0 2px; text-align: center; }
table.cal th.we { color: #9a3b33; }
table.cal td { padding: 1px; }
.day {
  position: relative; width: 100%; aspect-ratio: 1 / 1.05; min-height: 34px; border: 1px solid transparent; border-radius: 4px;
  background: var(--surface); font: 600 var(--fs-xs)/1 var(--font); color: var(--ink); cursor: pointer; padding: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
}
.day:hover:not([disabled]) { border-color: var(--ink-3); }
.day[disabled] { cursor: default; color: #a5aca8; }
.day.is-off { background: #f3f0ee; color: #8a3b33; }
.day.is-off[disabled] { color: #c3a9a5; }
.day .dbar { position: absolute; left: 3px; right: 3px; bottom: 2px; height: 4px; border-radius: 2px; background: var(--dc, transparent); }
.day .dabs { font-size: 8px; font-weight: 700; padding: 0 2px; border-radius: 2px; background: #fff4c2; color: #4d3100; border: 1px solid #c79a2a; line-height: 10px; }
.day.is-pend { background: repeating-linear-gradient(135deg, #fff4c2 0 3px, #fff 3px 6px); }
.day.is-today { border-color: var(--focus); border-width: 2px; }
.day.is-sel { background: var(--accent); color: #fff; }
.day.is-sel.is-off { background: #4f8c90; }
.day.is-sel-edge { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); z-index: 1; }
.sel-sum { font-size: var(--fs-sm); margin: 0; }

/* oddział */
.dept-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .6rem; }
.dept-link { display: grid; gap: .25rem; padding: .8rem .9rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.dept-link:hover { border-color: var(--accent); color: var(--ink); }
.dept-link .dept-chip { justify-self: start; }
.dept-chip-lg { font-size: var(--fs-md); padding: .15rem .55rem; vertical-align: .1em; }
.load-table tr.is-current td { background: var(--accent-soft); }
.load-table tr.is-over td.load-cell { background: var(--danger-soft); }
.load-cell { min-width: 140px; }
.load-num { font-weight: 700; font-size: var(--fs-base); display: block; margin-bottom: .25rem; }
.who-list { margin: 0; padding-left: 1rem; }
.abs-note { display: block; font-size: var(--fs-xs); color: var(--warn); font-weight: 600; }
/* telefon: obłożenie jako karty tygodni — tydzień + licznik w wierszu, nazwiska pod spodem, zawijanie po słowach */
@media (max-width: 640px) {
  .load-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .load-table, .load-table tbody { display: block; }
  .load-table tr { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .15rem .75rem; padding: .6rem .7rem;
    border-bottom: 1px solid var(--line); }
  .load-table tr.is-current { background: var(--accent-soft); }
  .load-table tr.is-over { box-shadow: inset 4px 0 0 var(--danger); }
  table.data.load-table td { display: block; padding: 0; border: 0; background: none; }
  .load-table .load-cell { min-width: 0; }
  .load-table .load-num { display: inline-block; margin: 0 .4rem .2rem 0; }
  .load-table .load-who { grid-column: 1 / -1; margin-top: .3rem; }
  .load-table .who-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem; }
  .load-table .who-list li { padding: .1rem .45rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
    background: var(--surface); overflow-wrap: normal; word-break: normal; hyphens: manual; }
  .load-table .who-sup { display: none; }
}

/* raport */
.iss-group { border-bottom: 1px solid var(--line); padding: .45rem 0; }
.iss-group summary { cursor: pointer; font-size: var(--fs-sm); }
.iss-group ul { margin: .4rem 0 .2rem; padding-left: 1.2rem; }
.compliance-wrap { max-height: 70vh; }
table.compliance { font-size: var(--fs-xs); }
table.compliance td.cmp { text-align: center; white-space: nowrap; }
.cmp-ok { color: var(--ok); }
.cmp-bad { background: var(--danger-soft); color: var(--danger); font-weight: 700; }
.stk-l { position: sticky; left: 0; background: var(--surface); z-index: 1; white-space: nowrap; }
thead .stk-l { z-index: 3; background: var(--surface-2); }
.mod-col { min-width: 84px; white-space: normal !important; }

/* zarządzanie */
.manage-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .75rem; }
.manage-link { display: grid; gap: .3rem; padding: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); box-shadow: var(--shadow-1); }
.manage-link strong { font-size: var(--fs-md); color: var(--accent); }
.manage-link span { font-size: var(--fs-sm); color: var(--ink-2); }
.manage-link:hover { border-color: var(--accent); color: var(--ink); }
.group-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .75rem; align-items: start; }
.group-col { transition: box-shadow .15s var(--ease); }
.group-col.is-drop { box-shadow: 0 0 0 3px var(--focus); }
.group-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.group-head h2 { margin: 0; font-size: var(--fs-md); }
.group-list { margin: .5rem 0 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.g-intern { display: flex; align-items: center; gap: .35rem; padding: .3rem .35rem; border-radius: 4px; font-size: var(--fs-sm); cursor: grab; }
.g-intern:hover { background: var(--surface-2); }
.g-intern.is-dragging { opacity: .4; }
.g-intern .grip { color: var(--ink-3); }
.g-move { margin-left: auto; }
.color-preview { display: flex; gap: .75rem; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; }
.color-preview .blk { height: 32px; }
.err-list li { color: var(--danger); }

@media (max-width: 900px) {
  .leave-layout { grid-template-columns: 1fr; }
  .leave-side { position: static; order: -1; }
}
@media (max-width: 640px) {
  .hide-sm { display: none; }
  .page, .page-narrow { padding: 1rem .75rem 2.5rem; }
  .page-head { align-items: flex-start; }
  .page-head .actions { width: 100%; }
  .leave-stats { grid-template-columns: repeat(2, 1fr); }
  .leave-stats div:nth-child(3) { border-left: 0; padding-left: 0; }
  .months { grid-template-columns: 1fr; }
  .day { min-height: 40px; font-size: var(--fs-sm); }
  .panel { padding: .85rem; }
  dl.kv { grid-template-columns: 1fr; gap: .1rem; }
  dl.kv dd { margin-bottom: .4rem; }
  .mod-head { flex-direction: column; gap: .15rem; }
}
@media print {
  .print-only { display: block; }
  .leave-side, .past-months summary { display: none; }
  .leave-layout { display: block; }
  .months { grid-template-columns: repeat(3, 1fr); }
  .load-table tr { break-inside: avoid; }
  .timeline { flex-wrap: wrap; overflow: visible; }
}
.cols > .panel + .panel { margin-top: 0; }

/* strona startowa usługi (lekarski.eu) */
.landing-hero { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 2rem 1.75rem; box-shadow: var(--shadow-1); }
.landing-hero h1 { font-size: clamp(1.4rem, 3.2vw, 2rem); max-width: 30ch; margin-bottom: .75rem; }
.landing-hero .lead { color: #d9e2e8; font-size: var(--fs-md); max-width: 64ch; }
.landing-hero code { color: #fff; }
.landing-brand { display: flex; align-items: center; gap: .5rem; font-weight: 650; color: #7fd3cf; margin-bottom: 1rem; }
.landing-brand .brand-mark { width: 26px; height: 26px; color: #7fd3cf; }
.landing-hero .btn-primary { background: #7fd3cf; border-color: #7fd3cf; color: var(--ink); }
.landing-hero .btn-primary:hover { background: #a6e3e0; border-color: #a6e3e0; color: var(--ink); }
.landing-hero .landing-ghost { color: #fff; border-color: rgba(255, 255, 255, .45); }
.landing-hero .landing-ghost:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.landing-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.landing-grid .panel + .panel { margin-top: 0; }
.landing-grid h3 { margin-top: 0; color: var(--accent); }
.landing-grid p { margin: 0; color: var(--ink-2); }
.landing-contact { margin-top: 1.5rem; }

/* dane szpitala: podgląd logo */
.logo-preview { display: inline-block; padding: .75rem; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius); margin-bottom: .5rem; }
.logo-preview img { display: block; max-height: 120px; max-width: 100%; width: auto; height: auto; }

/* ---------- zaproszenia QR i rejestracja stażysty ---------- */
.hp-field { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.join-form .field-check label a { text-decoration: underline; }
.join-form input:not([type="checkbox"]) { font-size: 16px; min-height: 44px; } /* bez zoomu na iOS, cel dotyku */
.join-form .field-check input { width: 22px; height: 22px; flex: none; }
@media (max-width: 480px) {
  .auth { padding: .75rem; place-items: start center; }
  .auth-card { padding: 1.25rem 1rem; }
}
.invite-form { max-width: none; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); align-items: start; }
.invite-form .form-actions { grid-column: 1 / -1; }
.invite-card { display: grid; grid-template-columns: 168px 1fr; gap: 1.1rem; align-items: start; }
.invite-card h3 { margin: 0 0 .2rem; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.invite-qr svg { width: 168px; height: 168px; display: block; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.invite-qr-off { width: 168px; height: 168px; display: grid; place-items: center; text-align: center;
  background: var(--surface-2); color: var(--ink-3); border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); }
.invite-meta { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; margin: .4rem 0 .75rem; }
.invite-meta dt { font-size: var(--fs-xs); color: var(--ink-3); }
.invite-meta dd { margin: 0; font-weight: 560; }
.invite-link { display: flex; gap: .5rem; margin-bottom: .75rem; }
.invite-link input { flex: 1 1 auto; min-width: 0; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: var(--fs-sm); }
@media (max-width: 640px) {
  .invite-card { grid-template-columns: 1fr; }
  .invite-qr svg, .invite-qr-off { width: 140px; height: 140px; }
}
.reg-card h2 { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.reg-sub { font-size: var(--fs-base); margin: .75rem 0 .4rem; }
.reg-matches { list-style: none; margin: 0 0 .75rem; padding: 0; display: grid; gap: .4rem; }
.reg-match { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: space-between;
  padding: .5rem .65rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.reg-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; border-top: 1px solid var(--line); padding-top: .75rem; }
.reg-reject summary { list-style: none; cursor: pointer; }
.reg-reject summary::-webkit-details-marker { display: none; }
.reg-reject[open] { flex-basis: 100%; }

/* logowanie Google/Apple, bezpieczeństwo konta, strona aplikacji */
.oauth-login { margin-top: 1rem; display: grid; gap: .5rem; }
.oauth-sep { text-align: center; margin: 0; }
.oauth-btn { justify-content: center; width: 100%; }
.identity-list { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .5rem; }
.identity { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: .5rem 0; border-bottom: 1px solid var(--line, #e5e7eb); }
.app-stores { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.app-stores [aria-disabled="true"] { opacity: .6; cursor: default; }
.app-qr { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.app-qr .qr-box { width: 160px; height: 160px; }
.app-qr .qr-box svg { width: 100%; height: 100%; }
