:root {
  color-scheme: light;
  --nav: #17243b;
  --nav-text: #bfcbdf;
  --ac: #474fbd;
  --ac-hover: #363da6;
  --ac2: #eef0ff;
  --tx: #1b2940;
  --mu: #53617a;
  --bg: #f3f5fa;
  --surface: #fff;
  --bd: #dce2ed;
  --line: #e8ecf3;
  --we: #f3f5fa;
  --hol: #fff0ee;
  --holt: #a1383b;
  --off: #fff5dd;
  --offt: #79550b;
  --shadow: 0 2px 6px #17243b06, 0 12px 30px #17243b07;
  font-family: "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  color: var(--tx);
  background: var(--bg);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 290px; }
body:has(.modal:not([hidden])) { overflow: hidden; }
[hidden] { display: none !important; }
body[data-role="public"] [data-admin], body[data-role="admin"] [data-public] { display: none !important; }
body[aria-busy="true"] .rail nav, body[aria-busy="true"] .account,
body[aria-busy="true"] .yearNav, body[aria-busy="true"] .pageHeader .actions { visibility: hidden; }

button, input, select, textarea { font: inherit; color: inherit; }
button {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .53rem .8rem; min-height: 2.4rem; border: 1px solid var(--bd);
  border-radius: .55rem; background: var(--surface); font-size: .875rem;
  font-weight: 600; cursor: pointer; white-space: nowrap;
}
button:hover:not(:disabled) { background: #f4f6fb; border-color: #b9c3d6; }
button.pri { border-color: var(--ac); background: var(--ac); color: #fff; }
button.pri:hover:not(:disabled) { border-color: var(--ac-hover); background: var(--ac-hover); }
button.danger { color: var(--holt); border-color: #efc6c8; }
button.danger:hover:not(:disabled) { background: var(--hol); border-color: #de9ea2; }
button:disabled { opacity: .46; cursor: default; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
[tabindex]:focus-visible { outline: 2px solid #6c75e8; outline-offset: 3px; }

input:not([type="checkbox"]):not([type="hidden"]):not([type="file"]), select, textarea {
  min-width: 0; min-height: 2.4rem; padding: .45rem .65rem;
  border: 1px solid #ccd4e3; border-radius: .55rem; background: #fff;
  font-size: .875rem;
}
select {
  appearance: none; padding-right: 1.65rem; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, #52617b 50%), linear-gradient(135deg, #52617b 50%, transparent 50%);
  background-position: calc(100% - 13px) 52%, calc(100% - 9px) 52%;
  background-size: 4px 4px; background-repeat: no-repeat;
}
input[type="checkbox"] { accent-color: var(--ac); width: 1rem; height: 1rem; }
textarea { resize: vertical; }

.icon { display: inline-block; flex: none; position: relative; width: 16px; height: 16px; }
.icon::before, .icon::after { content: ""; position: absolute; }
.calendarIcon::before { inset: 3px 1px 1px; border: 1.5px solid currentColor; border-radius: 2px; }
.calendarIcon::after { left: 3px; right: 3px; top: 7px; height: 1px; background: currentColor; box-shadow: 0 -5px 0 -0.15px currentColor; }
.gridIcon::before { top: 1px; left: 1px; width: 5px; height: 5px; background: currentColor; border-radius: 1px; box-shadow: 8px 0 currentColor, 0 8px currentColor, 8px 8px currentColor; }
.chartIcon::before { left: 2px; bottom: 1px; width: 3px; height: 5px; background: currentColor; border-radius: 1px; }
.chartIcon::after { left: 7px; bottom: 1px; width: 3px; height: 9px; background: currentColor; border-radius: 1px; box-shadow: 5px -2px 0 currentColor; }
.listIcon::before { inset: 1px 2px; border: 1.5px solid currentColor; border-radius: 2px; }
.listIcon::after { left: 5px; top: 5px; width: 6px; height: 1px; background: currentColor; box-shadow: 0 3px currentColor, 0 6px currentColor; }
.personIcon::before { top: 1px; left: 5px; width: 6px; height: 6px; border: 1.5px solid currentColor; border-radius: 50%; }
.personIcon::after { inset: 9px 2px 1px; border: 1.5px solid currentColor; border-radius: 5px 5px 2px 2px; }
.slidersIcon::before { top: 4px; left: 1px; width: 14px; height: 1px; background: currentColor; box-shadow: 0 7px currentColor; }
.slidersIcon::after { top: 2px; left: 5px; width: 3px; height: 5px; background: currentColor; border-radius: 1px; box-shadow: 5px 7px currentColor; }
.fileIcon::before { inset: 1px 3px; border: 1.5px solid currentColor; border-radius: 2px; }
.fileIcon::after { top: 6px; left: 6px; width: 4px; height: 1px; background: currentColor; box-shadow: 0 3px currentColor; }
.folderIcon::before { inset: 5px 1px 2px; border: 1.5px solid currentColor; border-radius: 2px; }
.folderIcon::after { top: 3px; left: 2px; width: 7px; height: 3px; border: 1.5px solid currentColor; border-bottom: 0; border-radius: 2px 2px 0 0; }
.printIcon::before { inset: 5px 1px 4px; border: 1.5px solid currentColor; border-radius: 2px; }
.printIcon::after { inset: 1px 4px; border: 1.5px solid currentColor; border-radius: 1px; }
.plusIcon::before, .plusIcon::after { background: currentColor; border-radius: 1px; }
.plusIcon::before { inset: 7px 2px; }
.plusIcon::after { inset: 2px 7px; }

.app { min-height: 100dvh; display: grid; grid-template-columns: 220px minmax(0, 1fr); align-items: start; }
.rail {
  position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 1.25rem;
  padding: 1.65rem 1rem 1.15rem; overflow: auto; background: var(--nav); color: var(--nav-text);
}
.brand { display: flex; align-items: center; gap: .75rem; min-height: 42px; margin: 0 .45rem .85rem; font-size: 1.15rem; font-weight: 720; letter-spacing: -.025em; color: #fff; white-space: nowrap; }
.brandMark { width: 39px; height: 39px; flex: none; display: inline-grid; place-items: center; border-radius: 11px; background: #8188f4; color: #131d37; }
.brandMark .icon { transform: scale(1.15); }
.railNav { display: grid; gap: 1.25rem; }
.viewNav, .railTools { display: grid; gap: 4px; }
.railTools, .account { border-top: 1px solid #344057; padding-top: 1rem; }
.account { margin-top: auto; }
.rail button { justify-content: flex-start; width: 100%; gap: .72rem; color: inherit; background: transparent; border-color: transparent; padding: .6rem .72rem; }
.rail button .icon { opacity: .84; }
.rail button:hover:not(:disabled), .rail button.on { color: #fff; border-color: transparent; background: #2a3956; }
.rail button.on { box-shadow: inset 3px 0 #8e95ff; }
#pendingCount:not(:empty) { margin-left: auto; min-width: 23px; padding: .1rem .32rem; border-radius: 7px; background: #4a56a9; color: #fff; text-align: center; font-size: .75rem; }

.workspace { width: 100%; max-width: 1640px; margin-inline: auto; padding: 1.25rem clamp(1.25rem, 3vw, 3.25rem) 2.75rem; min-width: 0; }
.workspaceTop, .pageHeader { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.workspaceTop { padding-bottom: 1rem; border-bottom: 1px solid var(--bd); }
.connection { display: flex; align-items: center; gap: .6rem; color: var(--mu); font-size: .875rem; }
.connection button { border-color: transparent; background: transparent; color: var(--ac); min-height: 2rem; padding: .32rem .5rem; }
#connection::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: .48rem; vertical-align: 2px; background: #4a58c3; border-radius: 50%; }
body[aria-busy="true"] #connection::before { background: #818c9e; }
.yearNav, .monthStepper { display: inline-flex; align-items: center; overflow: hidden; flex: none; border: 1px solid var(--bd); border-radius: .55rem; background: #fff; }
.yearNav button, .monthStepper button { min-width: 2.35rem; padding: 0 .55rem; border: 0; border-radius: 0; font-size: 1.45rem; line-height: 1; }
.yearNav select { min-width: 4.65rem; padding-left: .7rem; border: 0; border-inline: 1px solid var(--line); border-radius: 0; font-weight: 650; }
.yearNav :focus-visible, .monthStepper :focus-visible { outline-offset: -3px; }
.monthStepper button + button { border-left: 1px solid var(--line); }
.pageHeader { padding-block: 1.5rem 1.35rem; flex-wrap: wrap; }
h1, h2, h3, h4 { margin: 0; }
.pageHeader h1 { font-size: clamp(2rem, 4vw, 3.15rem); letter-spacing: -.053em; font-weight: 750; line-height: 1.07; }
.actions, .dialogActions { display: flex; gap: .55rem; align-items: center; flex-wrap: wrap; }
.actions button { min-height: 2.62rem; }
.banner { padding: .85rem 1rem; color: #634709; background: var(--off); border: 1px solid #eddbad; border-radius: .8rem; font-size: .85rem; }
.banner h2 { font-size: .95rem; }
.banner p { margin: .4rem 0 .65rem; line-height: 1.4; }
.banner .actions { gap: .4rem; }
.banner button { min-height: 2rem; padding: .3rem .55rem; font-size: .8rem; }

.monthLayout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(215px, 250px); gap: 1.1rem; align-items: start; }
.calendarPanel, .sideCard, .box, .yearWrap, .yearEmpty, .toolbar {
  min-width: 0; border: 1px solid var(--bd); border-radius: 1rem; background: var(--surface); box-shadow: var(--shadow);
}
.calendarPanel { overflow: hidden; }
.monNav { display: flex; gap: .65rem; align-items: center; justify-content: space-between; padding: 1.05rem 1.2rem; }
.monNav h2 { font-size: clamp(1.12rem, 2vw, 1.5rem); letter-spacing: -.032em; line-height: 1.15; font-weight: 720; }
.monNav h2 span { color: var(--mu); font-weight: 540; white-space: nowrap; }
.monthControls { display: flex; align-items: center; gap: .5rem; }
.monthControls > button { color: var(--ac); }
.monthLayout .monNav { padding-block: .62rem; }
.calHead, .calGrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calHead { background: #f5f7fc; border-block: 1px solid var(--line); }
.calHead div { padding: .48rem .25rem; text-align: center; color: #475671; font-size: .81rem; font-weight: 700; }
.calHead div:nth-child(n+6) { color: #5e6885; background: #edf0f7; }
.cell {
  min-height: clamp(48px, calc((100dvh - 300px) / 6), 84px); padding: .38rem; min-width: 0; position: relative;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.cell:nth-child(7n) { border-right: 0; }
.cell.empty { background: #f9faff; cursor: default; }
.cell.we { background: var(--we); }
.cell.hol { background: var(--hol); }
.cell.off { background: var(--off); }
.cell:not(.empty):hover { background-image: linear-gradient(#6f78dd0d, #6f78dd0d); }
.cell:focus-visible { z-index: 1; outline-offset: -3px; }
.cell.over { box-shadow: inset 0 0 0 2px #c84854; }
.cell.anchor { box-shadow: inset 0 0 0 2px var(--ac); }
.dn { display: inline-grid; min-width: 25px; height: 25px; padding-inline: 2px; place-items: center; font-weight: 670; font-size: .875rem; border-radius: 8px; font-variant-numeric: tabular-nums; }
.today .dn { color: #fff; background: var(--ac); }
.hn { margin-top: .13rem; color: var(--holt); font-size: .72rem; line-height: 1.15; font-weight: 650; overflow-wrap: anywhere; }
.hn.offn { color: var(--offt); }
.chips { display: grid; gap: 3px; margin-top: .24rem; }
.chip {
  display: flex; align-items: center; gap: 3px; min-width: 0; padding: .12rem .34rem;
  border-radius: 5px; border-inline-start: 3px solid var(--c);
  color: #23314b; background: color-mix(in srgb, var(--c), white 83%);
  font-size: .73rem; font-weight: 650; line-height: 1.35;
}
.chip i { font-style: normal; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip .ini { display: none; }
.chip b { font-size: .62rem; flex: none; }
.chip.ok, .yearNames > .ok { background-color: #dcf3e2; color: #1d4d2c; }
.chip.wait, .yearNames > .wait { background-color: #eceef2; color: #5d6676; border-inline-start-style: dashed; }
.chip.ok::before, .yearNames > .ok::before, .statusKey.ok::before, .dayStatus.ok::before {
  content: "✓"; display: inline-grid; place-items: center; flex: none; width: 1.15em; height: 1.15em; margin-right: .3em;
  border-radius: 50%; background: #2f8a4c; color: #fff; font-size: .8em; font-weight: 800; line-height: 1; vertical-align: -.1em;
}
.chip.wait::before, .yearNames > .wait::before, .statusKey.wait::before, .dayStatus.wait::before {
  content: ""; display: inline-block; flex: none; width: .85em; height: .85em; margin-right: .3em;
  border: 2px dashed #8b93a3; border-radius: 50%; vertical-align: -.1em;
}
.statusKey::before { margin-right: 0 !important; }
.statusKey { display: inline-flex; font-size: .85rem; font-style: normal; }
.statusLegend { display: inline-flex; flex-wrap: wrap; gap: .3rem .9rem; color: var(--mu); font-size: .85rem; }
.statusLegend > span { display: inline-flex; align-items: center; gap: .35rem; }
.dayAdd { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .8rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.dayAdd select { flex: 1 1 9rem; min-width: 0; }
.dayStatus { display: inline-flex; align-items: center; font-size: .85rem; }
.dayStatus.ok { color: #1d4d2c; }
.dayStatus.wait { color: #5d6676; }
.chip.l4 { background-image: repeating-linear-gradient(45deg, #ffffff50 0 3px, transparent 3px 7px); }
.calendarLegend, .peopleLegend, .calendarEmpty { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem 1rem; padding: .7rem 1.2rem; font-size: .81rem; color: var(--mu); }
.peopleLegend, .calendarEmpty { border-top: 1px solid var(--line); }
.calendarLegend span, .peopleLegend span { display: inline-flex; align-items: center; gap: .35rem; }
.calendarEmpty { justify-content: space-between; }
.calendarEmpty button { min-height: 2rem; padding: .25rem .55rem; color: var(--ac); }
.calendarKey { width: 11px; height: 11px; border: 1px solid #d5dbea; border-radius: 3px; }
.weekendKey { background: var(--we); }
.holidayKey { background: var(--hol); border-color: #edb5b4; }
.companyKey { background: var(--off); border-color: #e4cf97; }
.overKey { border-color: #c84854; background: #fff; }

.monthAside { display: grid; gap: 1rem; }
.sideCard { padding: 1rem 1.05rem; }
.sideCard h2 { display: flex; align-items: center; gap: .55rem; font-size: 1rem; font-weight: 720; letter-spacing: -.013em; }
.asideIcon { display: grid; place-items: center; width: 33px; height: 33px; flex: none; color: var(--ac); background: var(--ac2); border-radius: 9px; }
.holidayIcon { color: var(--holt); background: var(--hol); }
.monthMetrics { margin: .55rem 0 0; }
.monthMetrics div { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .72rem 0; border-bottom: 1px solid var(--line); }
.monthMetrics div:last-child { padding-bottom: .12rem; border: 0; }
.monthMetrics dt { font-size: .85rem; color: var(--mu); }
.monthMetrics dt small { white-space: nowrap; }
.monthMetrics dd { margin: 0; font-size: 1.25rem; font-weight: 720; font-variant-numeric: tabular-nums; line-height: 1; }
.warn, .monthMetrics .warn dt, .neg { color: var(--holt); font-weight: 680; }
.holidayList { display: grid; gap: .5rem; padding: 0; margin: .85rem 0 0; list-style: none; }
.holidayList li { display: flex; align-items: center; gap: .58rem; font-size: .88rem; font-weight: 600; }
.holidayList time { flex: none; display: grid; width: 41px; min-height: 43px; padding: .32rem 0; place-items: center; border-radius: 8px; background: #f4f6fc; line-height: 1; }
.holidayList time strong { font-size: .94rem; font-variant-numeric: tabular-nums; }
.holidayList time small { font-size: .67rem; font-weight: 500; color: var(--mu); }
.sideEmpty { margin: .8rem 0 0; color: var(--mu); font-size: .875rem; line-height: 1.4; }

.yearMetrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .9rem; margin: 0; }
.yearMetrics > div { padding: .85rem 1rem; border: 1px solid var(--bd); border-radius: .9rem; background: var(--surface); box-shadow: var(--shadow); }
.yearMetrics > div:last-child { background: var(--ac2); border-color: #d3d8fb; }
.yearMetrics dt { color: var(--mu); font-size: .86rem; font-weight: 630; }
.yearMetrics dd { margin: .25rem 0 0; font-size: 1.65rem; font-weight: 720; font-variant-numeric: tabular-nums; letter-spacing: -.035em; }
.yearMetrics dd span { color: var(--mu); font-size: .78rem; font-weight: 550; letter-spacing: normal; }
.box { overflow-x: auto; margin: 1.15rem 0 0; padding: 1.1rem 1.2rem; }
.box h2, .box h3 { margin: 0 0 .8rem; font-size: 1rem; font-weight: 720; }
.t { width: 100%; border-collapse: collapse; font-size: .875rem; }
.t th, .t td { border-bottom: 1px solid var(--line); padding: .5rem .65rem; text-align: center; white-space: nowrap; }
.t th { color: var(--mu); background: #f3f5fb; font-weight: 670; }
.t td.l, .t th.l { text-align: left; }
.t input[type="text"] { width: 100%; min-width: 10rem; }
.t input[type="number"] { width: 4.2rem; text-align: center; }
.dot { display: inline-block; width: 10px; height: 10px; margin-right: .34rem; border-radius: 50%; background: var(--c); flex: none; }
.peopleLegend .dot { margin-right: 0; }
.note { margin: .6rem 0 0; color: var(--mu); font-size: .81rem; line-height: 1.5; }
.yearControls { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .8rem; margin-bottom: .65rem; }
.yearControls label { display: inline-flex; align-items: center; gap: .4rem; color: var(--mu); font-size: .85rem; }
.yearControls .note { margin: 0; }
.yearControls select { max-width: min(60vw, 15rem); }
.yearWrap { max-height: max(14rem, calc(100dvh - 11.5rem)); overflow: auto; }
.yearWrap:focus-visible { outline-offset: -3px; }
.yearCalendar { width: 100%; min-width: 1080px; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.yearCalendar th, .yearCalendar td { border-right: 1px solid var(--bd); border-bottom: 1px solid var(--line); padding: 0; }
.yearCalendar tr > :last-child { border-right: 0; }
.yearCalendar tbody tr:last-child td { border-bottom: 0; }
.yearCalendar thead th { position: sticky; top: 0; z-index: 1; padding: .55rem .65rem; background: #edf0f8; text-align: left; font-size: .92rem; }
.yearCalendar .currentMonth { color: var(--ac); background: var(--ac2); box-shadow: inset 0 -2px var(--ac); }
.yearCalendar td { vertical-align: top; background: #fff; }
.yearCalendar td.we { background: var(--we); }
.yearCalendar td.hol { background: var(--hol); color: var(--holt); }
.yearCalendar td.off { background: var(--off); color: var(--offt); }
.yearCalendar .yearBlank { background: #edf0f7; }
.yearDay {
  display: flex; align-items: flex-start; justify-content: flex-start; gap: .2rem;
  width: 100%; height: 100%; min-height: 2.6rem; min-width: 0; padding: .3rem .3rem; border: 0; border-radius: 0;
  background: transparent; color: inherit; text-align: left; font-size: .9rem; line-height: 1.25; font-variant-numeric: tabular-nums;
}
.yearDate { display: inline-flex; align-items: baseline; gap: .1rem; flex: 0 0 2.1rem; }
body[data-screen="year"] .workspace { max-width: none; padding-inline: clamp(.75rem, 1.5vw, 1.5rem); }
.yearDate > span { min-width: 1.07rem; text-align: right; font-weight: 680; }
.yearDate small { color: var(--mu); font-size: .69rem; font-weight: 500; }
.yearCalendar td.yearToday { background: var(--ac2); color: var(--ac); }
.yearToday .yearDate > span { border-radius: 3px; background: var(--ac); color: white; text-align: center; }
.yearBooked { background: var(--ac2); box-shadow: inset 0 0 0 1px #d5daf8; }
button.yearBooked:hover:not(:disabled) { background: #e0e5ff; }
.yearBooked:focus-visible { outline-offset: -1px; z-index: 1; }
.yearNames { min-width: 0; flex: 1; display: grid; gap: 3px; }
.yearNames > span {
  min-width: 0; padding: 2px 4px; border-inline-start: 3px solid var(--c); border-radius: 4px;
  background: color-mix(in srgb, var(--c), white 80%); color: var(--tx);
  font-size: .85rem; font-weight: 600; line-height: 1.3; white-space: normal; overflow-wrap: break-word;
}
.yearCalendar td.yearEdit { cursor: pointer; }
.yearCalendar td.yearEdit:hover { box-shadow: inset 0 0 0 2px var(--ac); }
.yearCalendar td.anchor { box-shadow: inset 0 0 0 2px var(--ac); background: var(--ac2); }
.yearEmpty { margin-top: .9rem; padding: clamp(1.25rem, 3vw, 2rem); }
.yearEmpty h2 { font-size: 1.2rem; }
.yearEmpty p { margin: .55rem 0 0; color: var(--mu); }
.yearEmpty .actions { margin-top: .9rem; }

.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: .2rem .65rem; margin: 0 0 .65rem; padding: .4rem .65rem; }
.tbRow, .typeLabel, .rg { display: flex; align-items: center; gap: .55rem; }
.tbRow { flex-wrap: wrap; }
.tbRow.emps { flex: 1 1 210px; min-width: 0; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: thin; padding: .15rem; }
.editOptions { padding-inline: .5rem .15rem; border-left: 1px solid var(--line); }
.ec { min-height: 2.2rem; flex: none; border-radius: 99px; padding: .34rem .65rem; }
.ec .dot { margin: 0; }
.ec.on { border-color: var(--ac); color: var(--ac); background: var(--ac2); }
.ec.firma { color: var(--offt); }
.ec.firma.on { border-color: #e0c58c; background: var(--off); }
.typeLabel, .rg { font-size: .84rem; color: var(--mu); }
.rg input { margin: 0; }
.hint { color: var(--mu); font-size: .8rem; padding: .15rem; }

.modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 1rem; background: #121b34a6; }
.card {
  width: min(525px, 100%); max-height: calc(100dvh - 2rem); overflow: auto; overflow-x: hidden;
  padding: 0 1.35rem 1.35rem; border: 1px solid #d4dbea; border-radius: 1.15rem; background: #fff;
  box-shadow: 0 20px 70px #11192f40;
}
.card.wide { width: min(860px, 100%); }
.cardHead {
  position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  margin: 0 -1.35rem 1rem; padding: .9rem 1.35rem; border-bottom: 1px solid var(--line); background: #fff;
}
.cardHead b { font-size: 1.2rem; line-height: 1.2; letter-spacing: -.025em; }
.x { flex: none; width: 2rem; min-height: 2rem; padding: 0; font-size: 1.25rem; color: var(--mu); }
.form { display: grid; gap: .72rem; }
.form > *, .form label { min-width: 0; }
.form label { display: grid; gap: .25rem; font-size: .875rem; font-weight: 620; color: var(--mu); }
.form label input:not([type="checkbox"]), .form label select, .form label textarea { width: 100%; font-weight: 450; color: var(--tx); }
.two, .three { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .72rem; }
.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rInfo { margin: .65rem 0 0; padding: .58rem .7rem; border-radius: .65rem; background: #f2f4fc; font-size: .85rem; line-height: 1.45; }
.rInfo .bad { color: var(--holt); font-weight: 650; }
.rInfo:empty, .feedback:empty { display: none; }
.feedback { color: var(--ac); font-size: .875rem; line-height: 1.45; white-space: pre-line; overflow-wrap: anywhere; }
.requestCard { margin: 0 0 .75rem; padding: .85rem; border: 1px solid var(--bd); border-radius: .8rem; background: #fbfcff; }
.dialogActions { margin-top: .6rem; }
.empItems { list-style: none; margin: 0 0 .75rem; padding: 0; border: 1px solid var(--bd); border-radius: .8rem; overflow: hidden; }
.empItem { display: flex; align-items: center; gap: .3rem; padding-right: .45rem; border-bottom: 1px solid var(--line); background: #fff; }
.empItem:last-child { border-bottom: 0; }
.empItem > button:not(.empOpen) { flex: none; min-height: 2rem; padding: .2rem .45rem; }
.empOpen { flex: 1; min-width: 0; justify-content: flex-start; gap: .7rem; padding: .7rem .85rem; border: 0; border-radius: 0; background: none; text-align: left; }
.empOpen:hover:not(:disabled) { background: var(--ac2); }
.empOpen .dot { flex: none; width: 12px; height: 12px; }
.empMain { display: grid; gap: .1rem; min-width: 0; }
.empMain b { font-size: .98rem; }
.empMain small { color: var(--mu); font-size: .8rem; }
.empForm input[type="color"] { padding: .2rem; height: 2.4rem; cursor: pointer; }
.empActions .danger { margin-right: auto; }
.empActions { justify-content: flex-end; }
.sub { margin: .65rem 0 .25rem; color: var(--mu); font-size: .8rem; font-weight: 600; }
.blk { display: flex; flex-wrap: wrap; gap: .3rem; }
.bk, .form label.bk { display: inline-flex; align-items: center; gap: .3rem; padding: .23rem .55rem; border: 1px solid var(--bd); border-radius: 99px; font-size: .81rem; cursor: pointer; }
.bk input { margin: 0; }
.bk:has(input:checked) { color: var(--ac); background: var(--ac2); border-color: #b5bafa; }
.dayRow, .filterRow, .requestHead { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem; }
.linkDay { min-height: 0; padding: 0 .2rem; border: 0; background: none; color: var(--ac); font-weight: 650; text-decoration: underline; }
.dayRow, .filterRow, .requestHead { justify-content: space-between; }
.dayRow { padding: .55rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.dayRow span { display: inline-flex; align-items: center; }
.filterRow { margin-bottom: .8rem; }
.filterRow select { margin-left: .25rem; }
.btnCol { display: grid; gap: .55rem; }
.btnCol button { display: block; text-align: left; padding: .65rem .75rem; white-space: normal; }
.btnCol small { display: block; margin-top: .12rem; color: var(--mu); font-size: .8rem; font-weight: 500; }
.wnItems { list-style: none; margin: .8rem 0 0; padding: 0; border: 1px solid var(--bd); border-radius: .8rem; overflow: hidden; }
.wnItem { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .7rem .85rem; border-bottom: 1px solid var(--line); background: #fff; }
.wnItem:last-child { border-bottom: 0; }
.wnItem > span { display: grid; gap: .1rem; min-width: 0; }
.wnItem small { color: var(--mu); font-size: .82rem; }
.wnItem button { flex: none; }
.requestCard p { margin: .5rem 0; font-size: .88rem; }
.requestStatus { padding: .22rem .45rem; border-radius: 99px; font-size: .77rem; font-weight: 670; }
.requestStatus.pending { color: var(--offt); background: var(--off); }
.requestStatus.approved { color: #21634f; background: #dff3ea; }
.requestStatus.rejected { color: var(--holt); background: var(--hol); }
.messageText { white-space: pre-wrap; overflow-wrap: anywhere; }
.decisionForm, .ruleForm { padding-top: .75rem; margin-top: .75rem; border-top: 1px solid var(--line); }
.ruleSentence { display: grid; grid-template-columns: 2fr 1fr 2fr; gap: .65rem; }
fieldset { min-width: 0; margin: 0; padding: .55rem; border: 1px solid var(--bd); border-radius: .6rem; }
legend { padding: 0 .25rem; color: var(--mu); font-size: .85rem; }
.emptyState { padding: .72rem; color: var(--mu); border: 1px dashed #cbd4e4; border-radius: .55rem; font-size: .875rem; }
.legacyImport { margin-top: .65rem; }
.toast {
  position: fixed; z-index: 90; left: 50%; bottom: max(1.2rem, env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: max-content; max-width: min(90vw, 560px); padding: .65rem .9rem;
  border: 1px solid #485674; border-radius: .65rem; color: #fff; background: var(--nav); box-shadow: var(--shadow);
  font-size: .87rem; text-align: center; pointer-events: none; opacity: 0; transition: opacity .16s ease;
}
.toast.on { opacity: 1; }
#printArea { display: none; }

@media (max-width: 1150px) {
  .app { grid-template-columns: 192px minmax(0, 1fr); }
  .rail { padding-inline: .75rem; }
  .monthLayout { grid-template-columns: minmax(0, 1fr); }
  .monthAside { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .monthAside .banner { grid-column: 1 / -1; }
}
@media (min-width: 1000px) {
  body:is([data-screen="month"], [data-screen="year"]) .workspaceHeader {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: .25rem .7rem;
    margin-bottom: .65rem;
  }
  body:is([data-screen="month"], [data-screen="year"]) :is(.workspaceTop, .pageHeader) { display: contents; }
  body:is([data-screen="month"], [data-screen="year"]) .pageHeader h1 { grid-area: 1 / 1; font-size: clamp(1.7rem, 3vw, 2.35rem); }
  body:is([data-screen="month"], [data-screen="year"]) .yearNav { grid-area: 1 / 2; }
  body:is([data-screen="month"], [data-screen="year"]) .pageHeader .actions { grid-area: 1 / 3; }
  body:is([data-screen="month"], [data-screen="year"]) .connection { grid-area: 2 / 1 / 3 / -1; }
}
@media (max-width: 760px) {
  .app { display: block; }
  .rail {
    position: static; height: auto; display: grid; grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "brand account" "views views" "tools tools"; align-items: center;
    gap: .45rem .4rem; padding: .7rem .9rem; overflow: hidden;
  }
  .brand { grid-area: brand; margin: 0; font-size: 1.06rem; }
  .brandMark { width: 34px; height: 34px; }
  .account { grid-area: account; margin: 0; padding: 0; border: 0; }
  .railNav { display: contents; }
  .viewNav, .railTools { display: flex; min-width: 0; overflow: auto; padding: .1rem; scrollbar-width: thin; }
  .viewNav { grid-area: views; }
  .railTools { grid-area: tools; border: 0; }
  .rail button { min-height: 2.2rem; flex: none; width: auto; padding: .43rem .59rem; gap: .38rem; font-size: .82rem; }
  .rail button.on { box-shadow: inset 0 -2px #8e95ff; }
  .workspace { padding: .75rem .8rem 1.6rem; }
  .workspaceTop { padding-bottom: .75rem; }
  .connection { gap: .27rem; font-size: .8rem; }
  .connection button { font-size: .8rem; }
  .pageHeader { padding-block: 1rem .9rem; }
  .pageHeader h1 { font-size: clamp(1.8rem, 7vw, 2.45rem); }
  .actions button { min-height: 2.45rem; }
  .yearMetrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
  body[data-screen="month"] .rail { grid-template-areas: "brand account" "views views"; }
  body[data-screen="month"] .railNav { grid-area: views; display: flex; min-width: 0; overflow-x: auto; gap: .3rem; scrollbar-width: thin; }
  body[data-screen="month"] .railNav nav { flex: none; overflow: visible; }
  body[data-screen="month"] .workspaceTop { padding-bottom: .35rem; }
  body[data-screen="month"] .pageHeader { padding-block: .4rem .5rem; }
  .monthLayout .monNav { padding-block: .4rem; }
  .cell { min-height: clamp(46px, calc((100dvh - 480px) / 6), 63px); }
  .yearWrap { max-height: 63dvh; }
  .yearDay { min-height: 2.4rem; }
  .editOptions { flex: 1 1 100%; padding: .3rem .15rem .1rem; border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 495px) {
  .monthLayout { gap: .75rem; }
  .monthAside { grid-template-columns: minmax(0, 1fr); gap: .75rem; }
  .calendarPanel, .sideCard, .box, .yearWrap, .yearEmpty, .toolbar { border-radius: .75rem; }
  .monNav { padding: .68rem .65rem; }
  .monthControls { gap: .3rem; }
  .monthControls > button { padding-inline: .45rem; font-size: .79rem; }
  .monthControls button { min-height: 2.15rem; }
  .monthStepper button, .yearNav button { min-width: 1.95rem; padding: 0 .25rem; }
  .calHead div { padding-block: .47rem; font-size: .69rem; }
  .cell { padding: .17rem; }
  .typeLabel span { display: none; }
  .typeLabel select { max-width: 10.1rem; }
  .dn { min-width: 20px; height: 22px; font-size: .75rem; }
  .hn { font-size: .58rem; }
  .chip { padding: .09rem .13rem; gap: 2px; border-inline-start-width: 2px; font-size: .63rem; }
  .chip .full { display: none; }
  .chip .ini { display: block; text-align: center; }
  .chip b { font-size: .55rem; }
  .calendarLegend, .peopleLegend, .calendarEmpty { padding: .57rem .65rem; gap: .4rem .67rem; font-size: .75rem; }
  .card { padding-inline: .9rem; }
  .cardHead { margin-inline: -.9rem; padding-inline: .9rem; }
  .ruleSentence, .three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }
.toolbar .addDone { margin-left: auto; flex: none; }
/* Przed instalacją widać tylko instalator */
body.setupMode .app { display: none; }
body.setupMode #mSetup { background: var(--nav); }
/* Hasła: oczko, siła hasła, kod odzyskiwania */
.pw { position: relative; display: block; }
.pw input { width: 100%; padding-right: 2.8rem; }
.eye { position: absolute; top: 50%; right: .3rem; transform: translateY(-50%); width: 2.2rem; min-height: 2rem; padding: 0; border: 0; background: none; color: var(--mu); }
.eye::before { content: ""; position: absolute; inset: 0; margin: auto; width: 20px; height: 20px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat; }
.eye.on::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M3 3l18 18'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M3 3l18 18'/%3E%3C/svg%3E"); color: var(--ac); }
.eye:hover:not(:disabled) { background: none; color: var(--tx); }
.strength { min-height: 1.1em; margin-top: -.3rem; color: var(--holt); font-size: .82rem; }
.strength.ok { color: #2f8a4c; }
.linkBtn { justify-self: start; min-height: 0; padding: .2rem 0; border: 0; background: none; color: var(--ac); text-decoration: underline; }
.linkBtn:hover:not(:disabled) { background: none; }
.recoveryCode { margin: .8rem 0; padding: .9rem; border: 2px dashed var(--ac); border-radius: .6rem; background: var(--ac2); text-align: center; font: 700 1.15rem/1.4 ui-monospace, Consolas, monospace; letter-spacing: .06em; user-select: all; overflow-wrap: anywhere; }
#mSecurity .form + .form { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--line); }
@media print {
  @page { size: A4 portrait; margin: 10mm; }
  @page wn { size: A4 portrait; margin: 0; }
  html, body { background: #fff; }
  body > *:not(#printArea) { display: none !important; }
  #printArea { display: block; }
  * { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .wnPg { page: wn; width: 210mm; height: 296mm; overflow: hidden; }
  .wnPg img { display: block; width: 210mm; height: 297mm; }
  .pg { break-after: page; font-size: 11px; }
  .pg:last-child { break-after: auto; }
  .pg h1 { margin: 0 0 2px; color: var(--ac); font-size: 18px; }
  .pg .ps { margin-bottom: 6px; color: var(--mu); font-size: 10px; }
  .plg { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 8px; font-size: 10px; }
  .plg span { display: flex; align-items: center; }
  .plg .dot { width: 9px; height: 9px; margin-right: 4px; }
  .pc, .ps2 { width: 100%; border-collapse: collapse; table-layout: fixed; }
  .pc th { padding: 4px; color: #fff; background: var(--ac); font-size: 10px; }
  .pc td { height: 24mm; padding: 2px 3px; border: 1px solid #cfd6db; vertical-align: top; }
  .pc td.we { background: var(--we); }
  .pc td.hol { background: var(--hol); }
  .pc td.off { background: var(--off); }
  .pc .dn { height: auto; min-width: 0; padding: 0; }
  .pc .chip { margin-top: 1px; padding: 0 3px; font-size: 8.5px; }
  .pc .chip .ini { display: none; }
  .pc .chip .full { display: block; }
  .pg h2 { margin: 10px 0 4px; font-size: 12px; }
  .ps2 { font-size: 10px; }
  .ps2 th, .ps2 td { padding: 3px 5px; border: 1px solid #cfd6db; text-align: center; overflow: hidden; }
  .ps2 th { background: #eef2f5; }
  .ps2 td.l { text-align: left; }
}
