@font-face {
  font-family: "Source Sans 3";
  src: url("fonts/source-sans-cyrillic.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("fonts/source-sans-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
:root {
  --ink: #172e3c;
  --navy: #193948;
  --soft-ink: #4f6570;
  --accent: #116658;
  --line: #ccd9da;
  --paper: #f2f6f6;
  --white: #fff;
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 17px;
  line-height: 1.44;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
a { color: var(--accent); text-underline-offset: .18em; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .6; cursor: default; }
:focus-visible { outline: 3px solid #df9c25; outline-offset: 3px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(2.05rem, 4.4vw, 3.3rem); line-height: 1.05; letter-spacing: -.045em; font-weight: 650; overflow-wrap: anywhere; }
h2 { font-size: 1.36rem; line-height: 1.2; font-weight: 630; letter-spacing: -.025em; }
.topbar { background: var(--navy); color: var(--white); }
.top-inner, .shell { max-width: 1240px; margin: auto; padding-inline: clamp(18px, 4.4vw, 60px); }
.top-inner { min-height: 70px; display: flex; align-items: center; gap: clamp(20px, 5vw, 80px); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--white); font-weight: 620; font-size: 1.23rem; letter-spacing: -.035em; text-decoration: none; white-space: nowrap; }
.brand-mark { position: relative; width: 31px; height: 32px; flex: 0 0 auto; display: inline-block; }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; width: 21px; height: 24px; border-radius: 2px 5px 3px 3px; }
.brand-mark::before { top: 1px; left: 1px; background: #70a8ab; }
.brand-mark::after { bottom: 1px; right: 1px; border-left: 4px solid var(--navy); background: #c9e8dc; }
.topbar nav { display: flex; align-self: stretch; gap: 25px; }
.topbar nav a { color: #d7e5e6; align-content: center; position: relative; text-decoration: none; font-size: .97rem; padding: 8px 0; }
.topbar nav a[aria-current] { color: var(--white); font-weight: 600; }
.topbar nav a[aria-current]::after { content: ""; position: absolute; background: #a9ddc8; height: 3px; bottom: 0; inset-inline: 0; }
.topbar nav a:hover { color: white; text-decoration: underline; }
.account { margin-left: auto; display: flex; align-items: center; gap: 16px; font-size: .91rem; }
.account span { max-width: 170px; overflow-wrap: anywhere; }
.signout { color: #e7f0f1; background: transparent; border: 1px solid #68808b; padding: 5px 12px; border-radius: 4px; }
.shell { padding-block: clamp(30px, 5vw, 65px) 75px; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin: 0 0 30px; }
.count { display: inline-block; vertical-align: middle; color: var(--soft-ink); font-size: .35em; font-weight: 550; line-height: 1.45; letter-spacing: 0; padding: 1px 9px; margin-left: 5px; border: 1px solid var(--line); border-radius: 4px; }
.primary, .secondary { display: inline-flex; justify-content: center; align-items: center; gap: 9px; min-height: 44px; padding: 9px 19px; border-radius: 5px; font-weight: 620; text-decoration: none; line-height: 1.25; }
.primary { border: 1px solid var(--accent); background: var(--accent); color: var(--white); }
.primary:hover { background: #0d5147; text-decoration: none; }
.secondary { border: 1px solid #91aaa8; background: var(--white); color: var(--accent); }
.secondary:hover { background: #e9f1ee; text-decoration: none; }
.plus { font-size: 1.35rem; line-height: 16px; font-weight: 400; }
.filterbar { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; padding: 20px 0 24px; border-top: 1px solid var(--line); }
.filter-name { flex: 1 1 260px; max-width: 440px; }
.filterbar > div:not(.filter-name) { flex: 1 1 205px; max-width: 320px; }
label { display: block; margin-bottom: 5px; font-weight: 600; font-size: .91rem; }
input:not([type=hidden]), select, textarea { color: var(--ink); background: var(--white); border: 1px solid #93a8ad; border-radius: 4px; width: 100%; min-height: 44px; padding: 8px 11px; line-height: 1.4; }
textarea { resize: vertical; }
input::placeholder { color: #697c84; }
.text-link { padding: 9px 3px; }
.register { background: var(--white); border-top: 3px solid var(--navy); overflow: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { color: var(--soft-ink); font-size: .9rem; font-weight: 600; background: #e9efef; }
th, td { padding: 14px clamp(12px, 1.5vw, 23px); vertical-align: top; border-bottom: 1px solid var(--line); }
tbody tr:hover { background: #f6faf9; }
.person-link { font-weight: 650; color: var(--ink); text-decoration-color: #aecac4; }
.sub, .reference-list small, .change small { display: block; font-size: .91rem; color: var(--soft-ink); }
.date, time, .count { font-variant-numeric: tabular-nums; }
.date { white-space: nowrap; }
.empty { background: var(--white); border-top: 3px solid var(--navy); padding: 36px 30px; }
.empty p { margin-top: 8px; color: var(--soft-ink); }
.pagination, .form-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 24px; }
.back { text-decoration: none; display: inline-block; margin: 0 0 18px; font-weight: 580; }
.profile-grid { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(0, 1.3fr); gap: clamp(20px, 3vw, 44px); align-items: start; }
.assignment { background: #dfefea; padding: clamp(20px, 3vw, 34px); border-top: 4px solid var(--accent); border-radius: 0 0 5px 5px; overflow-wrap: anywhere; }
.assignment h2 { color: #365e55; font-size: 1rem; letter-spacing: 0; }
.role-title { margin: 12px 0 22px; line-height: 1.12; letter-spacing: -.025em; font-size: clamp(1.65rem, 3vw, 2.3rem); font-weight: 630; }
.assignment dl { margin: 0; }
.assignment dt, .hire-date span { font-size: .89rem; color: #405d59; }
.assignment dd { margin: 1px 0 14px; font-weight: 600; }
.hire-date { padding-top: 15px; margin-top: 16px; border-top: 1px solid #b1ccc4; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 18px; }
.history { padding: 5px 0; }
.timeline { list-style: none; padding: 0; margin: 20px 0 0; }
.event { border-left: 2px solid #c2d2d1; margin-left: 6px; padding: 0 0 25px 22px; position: relative; overflow-wrap: anywhere; }
.event::before { content: ""; position: absolute; top: 7px; left: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.event:last-child { border-color: transparent; }
.event.planned::before { background: var(--white); border: 2px solid var(--accent); }
.event-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.event-name { font-size: 1.16rem; font-weight: 650; }
.event-head time, .byline, .muted { color: var(--soft-ink); }
.planned-label { display: inline-block; background: #e4eaf6; color: #385270; font-size: .85rem; padding: 1px 8px; margin-bottom: 7px; border-radius: 3px; }
.change { display: grid; grid-template-columns: 88px 1fr; gap: 8px; padding: 7px 0; }
.change > span { color: var(--soft-ink); font-size: .9rem; }
.change > div { font-weight: 600; }
.change small { font-weight: 400; }
.old { border-bottom: 1px solid var(--line); }
.comment { white-space: pre-wrap; margin: 7px 0; padding: 7px 12px; border-left: 3px solid #96b9b2; }
.byline { font-size: .85rem; margin-top: 6px; }
.form-panel, .login-panel { background: var(--white); padding: clamp(22px, 3.4vw, 40px); border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: 0 0 6px 6px; }
.form-panel { max-width: 685px; }
.field { margin-bottom: 17px; }
.optional { font-size: .84rem; color: var(--soft-ink); font-weight: 400; margin-left: 8px; }
.login-panel { max-width: 440px; margin: clamp(14px, 5vh, 56px) auto; position: relative; }
.login-panel h1 { font-size: 2.45rem; margin: 15px 0 24px; }
.login-mark::before { background: #a9c7bf; }
.login-mark::after { background: var(--accent); border-color: var(--white); }
.login-panel .primary { width: 100%; margin-top: 7px; }
.login-example { text-align: center; margin-top: 20px; }
.sample-report { max-width: 54rem; margin: 0 auto; background: var(--white); border-top: 4px solid var(--accent); padding: clamp(22px, 5vw, 58px); }
.sample-heading { padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.sample-heading p, .sample-report footer span { color: var(--soft-ink); }
.sample-heading h1 { margin: 12px 0; }
.sample-summary { display: grid; grid-template-columns: 1fr 2fr; gap: clamp(24px, 5vw, 60px); padding: 36px 0; }
.sample-total strong { display: block; font-size: clamp(3rem, 7vw, 5.5rem); line-height: 1.05; color: var(--accent); }
.sample-breakdown h2 { margin-bottom: 16px; }
.sample-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; margin-top: 12px; }
.sample-row meter { grid-column: 1 / -1; width: 100%; height: 10px; accent-color: var(--accent); }
.sample-row meter::-webkit-meter-optimum-value { background: var(--accent); }
.sample-report footer { padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
@media (max-width: 560px) { .sample-summary { grid-template-columns: 1fr; } }
.reference-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; align-items: start; }
.reference-grid > section { border-top: 3px solid var(--navy); background: var(--white); padding: 21px; }
.reference-list { list-style: none; margin: 16px 0 20px; padding: 0; }
.reference-list li { border-bottom: 1px solid var(--line); padding: 8px 0; overflow-wrap: anywhere; }
.notice { color: #164f41; background: #deeee4; border-left: 3px solid var(--accent); margin: 0 0 18px; padding: 10px 15px; }
.error { color: #8a2533; font-size: .94rem; margin: 6px 0 12px; }
.error ul { list-style: none; padding: 0; margin: 0; }
.invalid :is(input,select,textarea) { border-color: #9d424b; }
.import-layout { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(230px,1fr); gap: clamp(20px,4vw,52px); align-items: start; }
.import-help, .batch-date { color: var(--soft-ink); margin: 12px 0 22px; }
.import-log { padding-block: 16px; border-top: 3px solid var(--navy); }
.batch-list { list-style: none; padding: 0; margin: 13px 0; }
.batch-list li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.batch-list span, .row-refs span { display: block; color: var(--soft-ink); font-size: .92rem; }
.import-counts { display: flex; flex-wrap: wrap; gap: 16px 34px; padding: 16px 0; margin: 0 0 26px; border-block: 1px solid var(--line); }
.import-counts dt { color: var(--soft-ink); font-size: .92rem; }
.import-counts dd { margin: 0; font-size: 1.55rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.report-heading { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.import-register td { overflow-wrap: anywhere; }
.import-register td:last-child { width: 30%; }
.import-state { font-weight: 650; color: var(--accent); }
.state-review { color: #80521c; }
.state-known { color: var(--soft-ink); }
.card-leaves, .following-section { margin-top: 36px; }
.card-leaves { padding-top: 22px; border-top: 1px solid var(--line); }
.card-leaves > p { margin-block: 5px; }
.current-leave { margin-top: 10px; font-weight: 620; color: var(--accent); }
.period-summary { color: var(--soft-ink); margin: -4px 0 14px; }
.month-links { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .94rem; }
.employee-links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; }
nav.employee-links { margin-bottom: 18px; }
.filterbar.report-filter > div { flex: 1 1 130px; }
.filterbar.report-filter > div:first-child { flex: 0 1 102px; }
.filterbar.report-filter > div:has([name=department]) { flex: 2 1 230px; }
.month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); padding: 1px; }
.weekday { padding: 5px 9px; font-size: .88rem; color: var(--soft-ink); background: #eef3f3; }
.calendar-day { min-height: 78px; padding: 5px 9px; background: var(--white); font-variant-numeric: tabular-nums; }
.calendar-day.outside { background: #edf2f2; }
.calendar-day.occupied { background: #e0f0e9; }
.calendar-day.concurrent { background: #f8e7cc; }
.calendar-day time { font-weight: 610; }
.calendar-day time[aria-current] { background: var(--navy); color: white; border-radius: 3px; padding: 0 4px; }
.day-person { display: block; color: var(--ink); font-size: .78rem; line-height: 1.2; margin-top: 3px; overflow-wrap: anywhere; }
.mobile-count { display: none; }
.calendar-key { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 9px 0 28px; color: var(--soft-ink); font-size: .86rem; }
.calendar-key span::before { content: ""; display: inline-block; width: 11px; height: 11px; background: #d7eae1; border: 1px solid #82aa99; margin-right: 6px; }
.calendar-key span + span::before { background: #f8e7cc; border-color: #c59a59; }
.year-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 28px; }
.year-grid a { display: block; padding: 12px 16px; background: var(--white); text-decoration: none; }
.year-grid a:hover strong { text-decoration: underline; }
.year-grid span { display: block; font-size: .88rem; color: var(--soft-ink); }
.preview { padding: 15px 0; margin-bottom: 16px; border-block: 1px solid var(--line); }
.preview h2, .preview p { margin-bottom: 6px; }
.conflict-note { color: #69450e; background: #fff0d9; border-left: 3px solid #ab7730; margin-block: 10px; padding: 10px 14px; }
.conflict-note ul { padding-left: 20px; margin: 4px 0; }
.warning-text { color: #78511d; }
.report-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border-block: 1px solid var(--line); margin: 0 0 30px; }
.report-metrics > div { padding: 14px 12px; }
.report-metrics dt { color: var(--soft-ink); font-size: .93rem; }
.report-metrics dd { margin: 4px 0 0; font-weight: 630; font-size: 2rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.priority-summary { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 0 0 14px; }
.priority-summary div { display: flex; gap: 6px; }
.priority-summary dt { color: var(--soft-ink); }
.priority-summary dd { margin: 0; font-weight: 630; }
.report-table td { overflow-wrap: anywhere; }
.skip, .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { z-index: 3; top: 8px; left: 8px; width: auto; height: auto; clip-path: none; padding: 10px; background: var(--white); }
@media (max-width: 780px) {
  .import-layout { grid-template-columns: minmax(0,1fr); }
  .profile-grid { grid-template-columns: 1fr; }
  .reference-grid { grid-template-columns: 1fr; }
  .top-inner { gap: 18px; }
  .topbar nav { gap: 16px; }
  .account span { display: none; }
}
@media (max-width: 590px) {
  .import-register td:last-child { width: auto; margin-top: 3px; }
  .top-inner { flex-wrap: wrap; justify-content: space-between; gap: 0 10px; padding-block: 10px 0; }
  .topbar nav { order: 3; width: 100%; min-height: 42px; }
  .brand { min-height: 38px; }
  .top-inner:not(:has(nav)) { padding-bottom: 10px; }
  .page-heading { align-items: start; gap: 16px; margin-bottom: 22px; }
  .filterbar > div, .filterbar > div:not(.filter-name) { max-width: none; flex-basis: 100%; }
  .register { background: transparent; }
  table, tbody, tr, td { display: block; }
  thead { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
  tbody tr { background: var(--white); padding: 13px 16px; border-bottom: 1px solid var(--line); }
  td { border: none; padding: 2px 0; }
  .date { color: var(--soft-ink); font-size: .9rem; }
  .date::before { content: "Приём "; }
  .change { grid-template-columns: 5.25rem minmax(0,1fr); }
}
@media (max-width: 940px) {
  .top-inner:has(nav) { flex-wrap: wrap; justify-content: space-between; gap: 0 10px; padding-block: 9px 0; }
  .topbar nav { flex-wrap: wrap; order: 3; width: 100%; gap: 0 16px; min-height: 40px; }
  .topbar nav a { padding-block: 7px; }
}
@media (max-width: 650px) {
  .calendar-day { min-height: 50px; padding: 4px; }
  .calendar-day time { font-size: .9rem; }
  .weekday { padding-inline: 4px; }
  .day-person { display: none; }
  .mobile-count { display: block; font-size: .72rem; line-height: 1.15; }
  .year-grid, .report-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .filterbar.report-filter > div:has([name=department]) { flex-basis: 100%; }
}
@media (max-width: 590px) {
  .report-table td[data-label]::before { content: attr(data-label) " · "; color: var(--soft-ink); font-size: .9rem; }
}
