/* =========================================================
   Конкурсний відбір НПП ІФНМУ – стилі
   Характер: строгий офіційний бланк. Прямі кути, графітові
   лінії, нумеровані розділи, червоний ІФНМУ як акцент.
   Konkurs 1.0 · © 2026 Любомир ГАВРИЩУК (розробник системи)
   ========================================================= */

@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans:wght@400;500;600&display=swap");

@font-face { font-family: "Akrobat"; src: url("../fonts/Akrobat-Light.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Akrobat"; src: url("../fonts/Akrobat-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Akrobat"; src: url("../fonts/Akrobat-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Akrobat"; src: url("../fonts/Akrobat-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Akrobat"; src: url("../fonts/Akrobat-ExtraBold.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Akrobat"; src: url("../fonts/Akrobat-Black.woff2") format("woff2"); font-weight: 900; font-display: swap; }


:root {
  --accent: #BE1622;
  --accent-dark: #941119;
  --accent-tint: #FBEDEE;
  --accent-rgb: 190,22,34;
  --ink: #1D1D1B;
  --ink-2: #3B3B38;
  --muted: #6B6A65;
  --faint: #9A9893;
  --paper: #ECEAE4;
  --sheet: #FFFFFF;
  --line: #1D1D1B;
  --rule: #CFCCC4;
  --rule-2: #E4E2DC;
  --field: #FFFFFF;
  --ok: #1E6B3A;
  --ok-bg: #E7F1EA;
  --fail: #B3141F;
  --fail-bg: #FBE9EA;
  --manual: #9A5800;
  --manual-bg: #FCF1DE;
  --info: #2B4767;
  --info-bg: #E9EFF5;
  --f-display: "Akrobat", "Arial Narrow", "Roboto Condensed", sans-serif;
  --f-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "Consolas", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-dark); }
h1, h2, h3, h4 { font-family: var(--f-display); margin: 0; letter-spacing: .01em; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(var(--accent-rgb), .18); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mono { font-family: var(--f-mono); font-size: .92em; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }

/* ---------- Верхня смуга ---------- */
.topbar { background: var(--ink); color: #fff; border-bottom: 4px solid var(--accent); }
.topbar-inner {
  max-width: 1040px; margin: 0 auto; padding: 7px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.topbar-org { font-family: var(--f-display); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 13px; }
.topbar-nav a {
  color: #fff; text-decoration: none; font-family: var(--f-display); font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; font-size: 13px;
  border: 1px solid rgba(255,255,255,.35); padding: 3px 10px;
}
.topbar-nav a:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
/* непомітний вхід для адміністратора – лише ключик */
.topbar-nav a.key-link { display: inline-flex; align-items: center; justify-content: center; border: 0; padding: 4px; opacity: .45; }
.topbar-nav a.key-link:hover, .topbar-nav a.key-link:focus-visible { opacity: 1; background: transparent; color: #fff; }
.demo-strip {
  background: repeating-linear-gradient(-45deg, #FCF1DE 0 12px, #F7E6C4 12px 24px);
  color: var(--manual); text-align: center; font-family: var(--f-display); font-weight: 700;
  letter-spacing: .04em; padding: 6px 16px; border-bottom: 1px solid #E8CF9C; font-size: 14px;
}

/* ---------- Шапка ---------- */
.masthead { background: var(--sheet); border-bottom: 1px solid var(--line); }
.masthead-inner {
  max-width: 1040px; margin: 0 auto; padding: 22px 20px;
  display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center;
}
.masthead-logo { width: 76px; height: 76px; object-fit: contain; }
.eyebrow {
  font-family: var(--f-display); font-weight: 700; font-size: 13px; text-transform: uppercase;
  letter-spacing: .12em; color: var(--accent); margin-bottom: 4px;
}
.masthead-title { font-size: 30px; line-height: 1.08; font-weight: 800; text-transform: uppercase; letter-spacing: .015em; max-width: 640px; }
.req-btn { margin-top: 10px; }
.phase-stamp {
  border: 2px solid currentColor; padding: 10px 16px 9px; text-align: center; min-width: 190px;
  font-family: var(--f-display); text-transform: uppercase; position: relative;
}
.phase-stamp::after { content: ""; position: absolute; inset: 3px; border: 1px solid currentColor; opacity: .45; pointer-events: none; }
.phase-stamp .ps-label { display: block; font-weight: 800; font-size: 16px; letter-spacing: .05em; line-height: 1.1; }
.phase-stamp .ps-dates { display: block; font-family: var(--f-mono); text-transform: none; font-size: 13px; margin-top: 4px; font-weight: 500; }
.phase-stamp .ps-note { display: block; text-transform: none; font-family: var(--f-body); font-size: 11px; opacity: .75; margin-top: 3px; }
.phase-stamp.is-open { color: var(--ok); }
.phase-stamp.is-wait { color: var(--manual); }
.phase-stamp.is-closed { color: var(--fail); }

/* ---------- Каркас ---------- */
main.shell { width: 100%; max-width: 1040px; margin: 0 auto; padding: 26px 20px 60px; flex: 1; }
.sheet {
  background: var(--sheet); border: 1px solid var(--line);
  box-shadow: 6px 6px 0 rgba(29,29,27,.10);
}
.sheet + .sheet { margin-top: 26px; }
.sheet-pad { padding: 26px 30px; }

/* Інформаційна стрічка над формою */
.notice {
  border-left: 4px solid var(--accent); background: var(--sheet); border-top: 1px solid var(--rule);
  border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  padding: 14px 18px; margin-bottom: 22px; font-size: 14.5px;
}
.notice strong { font-family: var(--f-display); font-size: 17px; letter-spacing: .02em; }
.notice.is-ok { border-left-color: var(--ok); }
.notice.is-warn { border-left-color: var(--manual); background: var(--manual-bg); }
.notice.is-fail { border-left-color: var(--fail); background: var(--fail-bg); }
.notice.is-info { border-left-color: var(--info); }
.notice p { margin: 6px 0 0; }
.notice ul { margin: 6px 0 0; padding-left: 20px; }

.period-bar {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); border: 1px solid var(--line); background: var(--sheet); margin-bottom: 22px;
}
.period-bar > div { padding: 10px 16px; border-right: 1px solid var(--rule); }
.period-bar > div:last-child { border-right: 0; }
.period-bar .k { font-family: var(--f-display); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 12px; color: var(--muted); }
.period-bar .v { font-family: var(--f-mono); font-size: 15px; font-weight: 600; }

/* ---------- Розділ анкети ---------- */
.section { border-top: 2px solid var(--line); }
.section:first-child { border-top: 0; }
.section-head {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: start;
  padding: 20px 30px 4px;
}
.section-no {
  font-family: var(--f-display); font-weight: 900; font-size: 44px; line-height: .85; color: var(--accent);
  letter-spacing: -.02em;
}
.section-title { font-size: 22px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; line-height: 1.1; padding-top: 2px; }
.section-sub { font-size: 13.5px; color: var(--muted); margin-top: 5px; max-width: 680px; }
.section-body { padding: 10px 30px 24px; }
.section.is-locked .section-body, .section.is-locked .section-head { opacity: .35; pointer-events: none; user-select: none; }
.lock-overlay {
  margin: 0 30px 26px; padding: 18px 20px; border: 1px dashed var(--muted);
  background: repeating-linear-gradient(-45deg, #F5F4F0 0 10px, #EFEDE7 10px 20px);
  font-family: var(--f-display); font-size: 17px; font-weight: 700; letter-spacing: .02em; color: var(--ink-2);
}

/* Рядок поля: підпис ліворуч, поле праворуч */
.frow {
  display: grid; grid-template-columns: 240px 1fr; gap: 6px 22px;
  padding: 13px 0; border-bottom: 1px solid var(--rule-2);
}
.frow:last-child { border-bottom: 0; }
.flabel { font-family: var(--f-display); font-weight: 700; font-size: 16.5px; line-height: 1.2; padding-top: 9px; letter-spacing: .01em; }
.flabel .req { color: var(--accent); margin-left: 3px; }
.flabel .opt { display: block; font-family: var(--f-body); font-weight: 400; font-size: 12px; color: var(--muted); letter-spacing: 0; margin-top: 2px; }
.fctl { min-width: 0; }
.fhint { font-size: 12.8px; color: var(--muted); margin-top: 5px; line-height: 1.45; }
.fhint b { color: var(--ink-2); font-weight: 600; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.fgrid.three { grid-template-columns: 1fr 1fr 1fr; }
.fgrid .sublabel { display: block; font-family: var(--f-display); font-weight: 600; font-size: 13.5px; color: var(--ink-2); margin-bottom: 4px; letter-spacing: .02em; }
.fgrid .full { grid-column: 1 / -1; }

input[type=text], input[type=email], input[type=date], input[type=number], input[type=password],
input[type=url], input[type=datetime-local], select, textarea {
  width: 100%; height: 40px; padding: 8px 11px; background: var(--field);
  border: 1px solid #8F8D87; border-radius: 0; color: var(--ink);
  transition: border-color .12s ease, box-shadow .12s ease;
}
textarea { height: auto; min-height: 96px; resize: vertical; line-height: 1.5; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 17px) 17px, calc(100% - 12px) 17px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
input:hover, select:hover, textarea:hover { border-color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink), 0 0 0 3px rgba(var(--accent-rgb), .18); }
input.mono, .doi-input { font-family: var(--f-mono); font-size: 14px; }
input.is-fail, select.is-fail, textarea.is-fail { border-color: var(--fail); box-shadow: inset 3px 0 0 var(--fail); }
input.is-ok, select.is-ok { box-shadow: inset 3px 0 0 var(--ok); }
input.is-manual, input.is-warn { box-shadow: inset 3px 0 0 var(--manual); }
input:disabled, select:disabled, textarea:disabled { background: #F3F2EE; color: var(--muted); }

/* Радіо-картки вибору посади */
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); }
.choice { position: relative; display: block; padding: 16px 18px 16px 50px; cursor: pointer; border-right: 1px solid var(--line); background: var(--sheet); }
.choice:last-child { border-right: 0; }
.choice input { position: absolute; left: 18px; top: 19px; width: 18px; height: 18px; accent-color: var(--accent); }
.choice .c-title { font-family: var(--f-display); font-weight: 800; font-size: 22px; text-transform: uppercase; letter-spacing: .04em; }
.choice .c-sub { font-size: 12.8px; color: var(--muted); margin-top: 4px; line-height: 1.45; }
.choice:hover { background: #F7F6F2; }
.choice:has(input:checked) { background: var(--accent-tint); box-shadow: inset 0 -4px 0 var(--accent); }
.choice-grid.four { grid-template-columns: repeat(4, 1fr); }
.choice-grid.four .choice { padding: 14px 14px 14px 44px; }
.choice-grid.compact .choice { padding: 12px 14px 12px 44px; }
.choice-grid.compact .choice input { left: 16px; top: 14px; }
.choice-grid.compact .c-title { font-size: 15px; }
.pw-dates { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 10px; }
.pw-dates label { display: flex; align-items: center; gap: 8px; }
.pw-dates input { max-width: 200px; }
.choice-grid.four .choice input { left: 14px; top: 17px; }
.choice-grid.four .c-title { font-size: 18px; line-height: 1.15; }

/* Досягнення (п. 38 Ліцензійних умов) */
.ach-list { border: 1px solid var(--line); }
.ach { display: grid; grid-template-columns: 22px 34px 1fr; gap: 8px; align-items: start; padding: 9px 12px; border-bottom: 1px solid var(--rule); cursor: pointer; background: var(--sheet); }
.ach:last-child { border-bottom: 0; }
.ach:hover { background: #F7F6F2; }
.ach.on { background: var(--accent-tint); }
.ach input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); }
.ach-no { font-family: var(--f-display); font-weight: 800; font-size: 17px; line-height: 22px; color: var(--accent); }
.ach-text { font-size: 14px; line-height: 1.45; }
.ach-req { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.ach-count { margin-top: 10px; font-family: var(--f-display); font-size: 16px; letter-spacing: .02em; }
.ach-count.ok { color: var(--ok); }
.ach-count.fail { color: var(--fail); }
.opt-badge { font-family: var(--f-display); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border: 1px solid var(--rule); padding: 2px 8px; white-space: nowrap; }

/* Документи про мову: дві частини в одному розділі */
.lang-part + .lang-part { margin-top: 26px; padding-top: 20px; border-top: 1px dashed var(--rule); }
.part-title { font-size: 18px; font-weight: 800; letter-spacing: .02em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.part-title .req { color: var(--accent); margin-left: -7px; }
.part-sub { font-size: 13.5px; color: var(--muted); margin: 4px 0 12px; max-width: 720px; }
.state-lang .check-line .cl-text { font-size: 14.5px; line-height: 1.45; }
.state-lang .sl-none:has(input:checked) { border-color: var(--fail); background: var(--fail-bg); }
.extra-examples { margin: 0 0 12px; padding-left: 20px; font-size: 13.5px; color: var(--muted); columns: 2; column-gap: 32px; }
.extra-examples li { margin: 0 0 4px; break-inside: avoid; }
@media (max-width: 700px) { .extra-examples { columns: 1; } }

.check-line { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--rule); background: #FAFAF8; cursor: pointer; }
.check-line + .check-line { margin-top: 10px; }
.check-line input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.check-line .cl-text { font-size: 14px; }
.check-line .cl-text b { font-family: var(--f-display); font-size: 16px; letter-spacing: .01em; }
.check-line:has(input:checked) { border-color: var(--ink); background: var(--sheet); }

/* ---------- Статуси-штампи ---------- */
.fstatus { margin-top: 7px; display: flex; gap: 8px; align-items: flex-start; font-size: 13.3px; line-height: 1.4; }
.fstatus:empty { display: none; }
.fstatus.reserve { min-height: 24px; }
.fstatus.reserve:empty { display: flex; }
.stamp {
  flex: none; display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--f-display); font-weight: 800; font-size: 12.5px; letter-spacing: .07em; text-transform: uppercase;
  padding: 2px 7px 1px; border: 1.5px solid currentColor; line-height: 1.35; white-space: nowrap;
}
.stamp .sym { font-family: var(--f-body); font-weight: 700; font-size: 13px; letter-spacing: 0; }
.stamp.s-ok { color: var(--ok); background: var(--ok-bg); }
.stamp.s-fail { color: var(--fail); background: var(--fail-bg); }
.stamp.s-manual, .stamp.s-warn { color: var(--manual); background: var(--manual-bg); }
.stamp.s-info { color: var(--info); background: var(--info-bg); }
.stamp.s-pending { color: var(--muted); background: #F1F0EC; }
.stamp.s-empty { color: var(--faint); background: transparent; }
.stamp.s-ru { color: #fff; background: var(--fail); border-color: var(--fail); }
.fstatus .msg { padding-top: 1px; }
.fstatus.st-ok .msg { color: var(--ok); }
.fstatus.st-fail .msg { color: var(--fail); }
.fstatus.st-manual .msg, .fstatus.st-warn .msg { color: var(--manual); }
.spin { display: inline-block; width: 11px; height: 11px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--f-display); font-weight: 800; font-size: 15px; letter-spacing: .07em; text-transform: uppercase;
  padding: 10px 18px 9px; border: 1.5px solid var(--ink); background: var(--sheet); color: var(--ink);
  cursor: pointer; text-decoration: none; border-radius: 0; line-height: 1.2;
  transition: background .12s ease, color .12s ease, transform .06s ease;
}
.btn:hover { background: var(--ink); color: #fff; }
.btn:active { transform: translate(1px, 1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 4px 4px 0 var(--ink); }
.btn-primary:hover:not(:disabled) { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn-primary:active:not(:disabled) { box-shadow: 2px 2px 0 var(--ink); transform: translate(2px, 2px); }
.btn-outline { background: transparent; }
.btn-sm { font-size: 13px; padding: 6px 11px 5px; }
.btn-xs { font-size: 12px; padding: 3px 8px 2px; letter-spacing: .05em; }
.btn-danger { color: var(--fail); border-color: var(--fail); }
.btn-danger:hover { background: var(--fail); color: #fff; }
.btn-ok { color: var(--ok); border-color: var(--ok); }
.btn-ok:hover { background: var(--ok); color: #fff; }
.btn-block { width: 100%; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: #EDECE7; color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ---------- Списки публікацій ---------- */
.counter-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); margin: 6px 0 16px; background: var(--sheet);
}
.counter-strip > div { padding: 9px 14px; border-right: 1px solid var(--rule); }
.counter-strip > div:last-child { border-right: 0; }
.counter-strip .k { font-family: var(--f-display); font-weight: 700; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.counter-strip .v { font-family: var(--f-display); font-weight: 900; font-size: 26px; line-height: 1.05; }
.counter-strip .v small { font-family: var(--f-body); font-weight: 400; font-size: 12.5px; color: var(--muted); margin-left: 4px; }
.counter-strip .v.ok { color: var(--ok); }
.counter-strip .v.fail { color: var(--fail); }
.counter-strip .v.manual { color: var(--manual); }

.item-list { counter-reset: item; }
.item {
  border: 1px solid var(--rule); border-left: 4px solid var(--rule); background: var(--sheet);
  margin-bottom: 12px;
}
.item.st-ok { border-left-color: var(--ok); }
.item.st-fail { border-left-color: var(--fail); }
.item.st-manual, .item.st-warn { border-left-color: var(--manual); }
.item.has-ru { border-color: var(--fail); border-left-width: 8px; }
.item-head { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; }
.item-no { font-family: var(--f-display); font-weight: 900; font-size: 22px; color: var(--muted); text-align: center; }
.item-tools { display: flex; gap: 6px; align-items: center; }
.icon-btn {
  width: 34px; height: 34px; border: 1px solid var(--rule); background: var(--sheet); cursor: pointer;
  font-size: 18px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-2);
}
.icon-btn:hover { border-color: var(--ink); color: var(--ink); }
.icon-btn.del:hover { border-color: var(--fail); color: var(--fail); background: var(--fail-bg); }
.item-body { padding: 0 14px 12px 58px; }
.item-body .fstatus { margin-top: 0; }
.meta-card { margin-top: 10px; padding: 10px 12px; background: #F8F7F4; border: 1px solid var(--rule-2); font-size: 13.5px; }
.meta-card .m-title { font-weight: 600; font-size: 14.5px; line-height: 1.35; }
.meta-card .m-line { color: var(--ink-2); margin-top: 3px; }
.meta-card .m-line .lbl { color: var(--muted); }
.steps { list-style: none; margin: 8px 0 0; padding: 0; font-size: 13px; }
.steps li { display: grid; grid-template-columns: 18px 1fr; gap: 6px; padding: 2px 0; }
.steps li .ic { font-weight: 700; text-align: center; }
.steps li.ok .ic { color: var(--ok); }
.steps li.fail .ic, .steps li.fail { color: var(--fail); }
.steps li.manual .ic, .steps li.warn .ic { color: var(--manual); }
.steps li.info .ic { color: var(--ink); font-family: var(--f-display); font-weight: 800; }
.steps li.info { color: var(--ink); font-weight: 600; }
.qbadge { display: inline-block; margin-left: 6px; padding: 0 6px; border: 1px solid var(--ink); font-family: var(--f-display); font-weight: 800; font-size: 12.5px; line-height: 18px; letter-spacing: .03em; text-transform: uppercase; color: var(--ink); background: #fff; vertical-align: 1px; }
.qbadge.q1 { background: var(--ink); color: #fff; }
.steps li.sub { padding-left: 14px; color: var(--muted); }
.steps li.ru { color: var(--fail); font-weight: 600; }
.steps .src { display: block; color: var(--faint); font-size: 11.8px; font-family: var(--f-mono); overflow-wrap: anywhere; word-break: break-word; }
.steps li > span { min-width: 0; overflow-wrap: anywhere; }
.add-row { display: flex; gap: 10px; align-items: center; margin-top: 4px; }
.book-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; padding: 4px 14px 12px 58px; }
.book-grid .full { grid-column: 1 / -1; }
.book-grid .sublabel { display: block; font-family: var(--f-display); font-weight: 600; font-size: 13.5px; color: var(--ink-2); margin-bottom: 4px; letter-spacing: .02em; }
.book-grid .sublabel .req { color: var(--accent); }

/* ---------- Зведення ---------- */
.summary-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.summary-table th, .summary-table td { border: 1px solid var(--rule); padding: 8px 10px; text-align: left; vertical-align: top; }
.summary-table th { font-family: var(--f-display); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: 12.5px; background: #F4F3EF; }
.summary-table td.st { width: 1%; white-space: nowrap; }
.summary-table td:not(.st) { overflow-wrap: anywhere; }
@media (max-width: 480px) {
  .summary-table { font-size: 13px; }
  .summary-table th, .summary-table td { padding: 6px 6px; }
}
.overall {
  display: flex; gap: 14px; align-items: center; padding: 14px 16px; margin-bottom: 14px; border: 2px solid currentColor;
  font-family: var(--f-display); font-weight: 800; font-size: 19px; text-transform: uppercase; letter-spacing: .04em;
}
.overall.ok { color: var(--ok); background: var(--ok-bg); }
.overall.manual { color: var(--manual); background: var(--manual-bg); }
.overall.fail { color: var(--fail); background: var(--fail-bg); }
.overall .o-sub { font-family: var(--f-body); font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--ink-2); }

/* Велике попередження про РФ */
.ru-alert {
  border: 3px solid var(--fail); background: var(--fail-bg); color: var(--ink); padding: 0; margin-bottom: 22px;
  box-shadow: 6px 6px 0 rgba(179,20,31,.18);
}
.ru-alert .ru-head {
  background: var(--fail); color: #fff; padding: 9px 16px; font-family: var(--f-display); font-weight: 900;
  font-size: 20px; letter-spacing: .06em; text-transform: uppercase; display: flex; gap: 10px; align-items: center;
}
.ru-alert .ru-body { padding: 12px 18px 14px; font-size: 14px; }
.ru-alert ul { margin: 6px 0 0; padding-left: 20px; }
.ru-alert li { margin: 2px 0; }
.ru-alert li b { font-weight: 600; }

.submit-zone { padding: 22px 30px 30px; border-top: 2px solid var(--line); background: #FAF9F6; }
.submit-zone .actions { margin-top: 16px; }

/* ---------- Успішна подача ---------- */
.done { text-align: center; padding: 50px 30px; }
.done .big-stamp {
  display: inline-block; border: 3px solid var(--ok); color: var(--ok); padding: 12px 26px; transform: rotate(-3deg);
  font-family: var(--f-display); font-weight: 900; font-size: 30px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 18px;
}
.done p { max-width: 560px; margin: 8px auto; }

/* ---------- Підвал ---------- */
.site-footer { background: var(--ink); color: #CFCDC6; border-top: 4px solid var(--accent); }
.site-footer-inner {
  max-width: 1040px; margin: 0 auto; padding: 14px 20px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 13px;
}
.site-footer .dev { font-family: var(--f-display); font-size: 15px; letter-spacing: .03em; color: #fff; }
.site-footer .dev strong { font-weight: 800; }

/* ---------- Спливні повідомлення ---------- */
#toast-box { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 1000; }
.toast { background: var(--ink); color: #fff; padding: 10px 14px; border-left: 4px solid var(--accent); font-size: 14px; max-width: 360px; box-shadow: 4px 4px 0 rgba(0,0,0,.15); transition: opacity .4s ease, transform .4s ease; }
.toast-ok { border-left-color: #4CAF6E; }
.toast-fail { border-left-color: #FF5A5F; }
.toast.out { opacity: 0; transform: translateY(8px); }

/* =========================================================
   АДМІНПАНЕЛЬ
   ========================================================= */
.gate { max-width: 420px; margin: 8vh auto 0; }
.gate .sheet-pad h2 { font-size: 26px; text-transform: uppercase; font-weight: 800; letter-spacing: .04em; margin-bottom: 4px; }

.tabs { display: flex; border: 1px solid var(--line); background: var(--sheet); margin-bottom: 22px; overflow-x: auto; }
.tab {
  flex: 1; padding: 12px 16px 11px; border: 0; border-right: 1px solid var(--line); background: transparent; cursor: pointer;
  font-family: var(--f-display); font-weight: 800; font-size: 15px; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap;
}
.tab:last-child { border-right: 0; }
.tab:hover { background: #F4F3EF; }
.tab.active { background: var(--ink); color: #fff; box-shadow: inset 0 -4px 0 var(--accent); }
.tab .cnt { font-family: var(--f-mono); font-size: 12px; margin-left: 6px; opacity: .8; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.toolbar input[type=text] { max-width: 280px; }
.toolbar select { width: auto; min-width: 170px; }
.toolbar .spacer { flex: 1; }

.app-list { border: 1px solid var(--line); background: var(--sheet); }
.app-row { border-bottom: 1px solid var(--rule); }
.app-row:last-child { border-bottom: 0; }
.app-row > summary {
  list-style: none; cursor: pointer; display: grid; grid-template-columns: 132px 1fr auto; gap: 14px; align-items: center; padding: 11px 16px;
}
.app-row > summary::-webkit-details-marker { display: none; }
.app-row > summary:hover { background: #F7F6F2; }
.app-row[open] > summary { background: #F2F1EC; border-bottom: 1px solid var(--rule); }
.app-row.is-old > summary { opacity: .62; }
.app-row.has-ru > summary { box-shadow: inset 6px 0 0 var(--fail); }
.ar-date { font-family: var(--f-mono); font-size: 13px; color: var(--ink-2); }
.ar-name { font-family: var(--f-display); font-weight: 800; font-size: 18px; letter-spacing: .02em; }
.ar-name .pos { font-family: var(--f-display); font-weight: 700; font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-left: 8px; }
.ar-meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.ar-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.app-detail { padding: 18px 20px 22px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 16px; border-bottom: 1px solid var(--rule); margin-bottom: 16px; }
.dl { display: grid; grid-template-columns: 230px 1fr; border-top: 1px solid var(--rule); }
.dl > div { padding: 7px 10px; border-bottom: 1px solid var(--rule-2); font-size: 14px; }
.dl > .dk { font-family: var(--f-display); font-weight: 700; font-size: 14.5px; color: var(--ink-2); background: #FAF9F6; }
.detail-h { font-family: var(--f-display); font-weight: 800; font-size: 17px; text-transform: uppercase; letter-spacing: .05em; margin: 20px 0 8px; display: flex; gap: 10px; align-items: center; }
.detail-h .rule { flex: 1; height: 1px; background: var(--rule); }
.pub-table { width: 100%; border-collapse: collapse; font-size: 13.2px; }
.pub-table th, .pub-table td { border: 1px solid var(--rule); padding: 6px 8px; text-align: left; vertical-align: top; }
.pub-table { table-layout: fixed; }
.pub-table th:first-child { width: 36px; }
.pub-table th:nth-child(2) { width: 30%; }
.pub-table th:last-child { width: 170px; }
.pub-table td { overflow-wrap: anywhere; word-break: break-word; }
.pub-table th { background: #F4F3EF; font-family: var(--f-display); font-weight: 700; letter-spacing: .04em; font-size: 12.5px; text-transform: uppercase; }
.pub-table tr.ru td { background: var(--fail-bg); }
.verdict-btns { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.verdict-note { font-size: 12px; color: var(--muted); margin-top: 3px; }
.empty-box { padding: 40px 20px; text-align: center; color: var(--muted); }

.list-card { border: 1px solid var(--line); background: var(--sheet); margin-bottom: 18px; }
.list-card .lc-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--rule); background: #FAF9F6; }
.list-card .lc-title { font-family: var(--f-display); font-weight: 800; font-size: 19px; text-transform: uppercase; letter-spacing: .03em; }
.list-card .lc-body { padding: 14px 18px 18px; }
.list-card .lc-stat { font-family: var(--f-mono); font-size: 13.5px; overflow-wrap: anywhere; }
.list-card .log { margin-top: 10px; font-family: var(--f-mono); font-size: 12.5px; background: #F6F5F1; border: 1px solid var(--rule-2); padding: 8px 10px; white-space: pre-wrap; max-height: 220px; overflow: auto; }
.list-card .log:empty { display: none; }
.list-card .log { max-height: 320px; }
.list-card textarea[data-src] { font-size: 12.5px; line-height: 1.5; white-space: pre; overflow-x: auto; }
.src-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 4px; font-size: 13px; color: var(--ink-2); }
.color-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.swatch { width: 34px; height: 34px; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--rule); cursor: pointer; padding: 0; }
.swatch.sel { box-shadow: 0 0 0 2px var(--ink); }
.logo-prev { width: 64px; height: 64px; object-fit: contain; border: 1px solid var(--rule); background: #fff; }
.th-table { border-collapse: collapse; width: 100%; font-size: 14px; }
.th-table th, .th-table td { border: 1px solid var(--rule); padding: 6px 8px; }
.th-table th { background: #F4F3EF; font-family: var(--f-display); font-weight: 700; text-align: left; }
.th-table input { height: 34px; max-width: 110px; }
.toggle-row { display: flex; gap: 18px; flex-wrap: wrap; }
.toggle-row label { display: inline-flex; gap: 7px; align-items: center; font-family: var(--f-display); font-weight: 700; font-size: 15.5px; cursor: pointer; }
.toggle-row input { width: 18px; height: 18px; accent-color: var(--accent); }
.danger { border: 2px dashed var(--fail); padding: 16px 18px; background: var(--fail-bg); }

/* ---------- Адаптивність ---------- */
@media (max-width: 820px) {
  .choice-grid.four { grid-template-columns: 1fr 1fr; }
  .choice-grid.four .choice:nth-child(2) { border-right: 0; }
  .choice-grid.four .choice:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .masthead-inner { grid-template-columns: auto 1fr; }
  .phase-stamp { grid-column: 1 / -1; justify-self: start; }
  .frow { grid-template-columns: 1fr; }
  .flabel { padding-top: 0; }
  .counter-strip { grid-template-columns: 1fr 1fr; }
  .counter-strip > div:nth-child(2) { border-right: 0; }
  .counter-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
  .dl { grid-template-columns: 1fr; }
  .dl > .dk { border-bottom: 0; padding-bottom: 0; }
}
@media (max-width: 600px) {
  body { font-size: 14.5px; }
  .topbar-org { font-size: 11px; letter-spacing: .04em; }
  .masthead-inner { padding: 16px; gap: 14px; }
  .masthead-logo { width: 56px; height: 56px; }
  .masthead-title { font-size: 22px; }
  main.shell { padding: 16px 12px 40px; }
  .section-head { grid-template-columns: 44px 1fr; padding: 16px 16px 2px; }
  .section-head > :nth-child(3) { grid-column: 1 / -1; }
  .section-no { font-size: 34px; }
  .section-title { font-size: 19px; }
  .section-body { padding: 8px 16px 18px; }
  .lock-overlay { margin: 0 16px 18px; }
  .choice-grid, .choice-grid.four { grid-template-columns: 1fr; }
  .choice { border-right: 0; border-bottom: 1px solid var(--line); }
  .choice:last-child { border-bottom: 0; }
  .fgrid, .fgrid.three, .book-grid { grid-template-columns: 1fr; }
  .item-body, .book-grid { padding-left: 14px; }
  .period-bar { grid-template-columns: 1fr; }
  .period-bar > div { border-right: 0; border-bottom: 1px solid var(--rule); }
  .submit-zone { padding: 18px 16px 22px; }
  .app-row > summary { grid-template-columns: 1fr; gap: 4px; }
  .ar-tags { justify-content: flex-start; }
  .sheet-pad { padding: 18px 16px; }
}

@media print {
  .topbar, .site-footer, .btn, .icon-btn, .tabs, .toolbar { display: none !important; }
  body { background: #fff; }
  .sheet { box-shadow: none; }
}

/* Адмінка: досягнення, мовні сертифікати, обов'язковість профілів за посадами */
.ach-admin { font-family: var(--f-display); font-size: 16px; margin: 4px 0 6px; }
.ach-admin.ok { color: var(--ok); }
.ach-admin.fail { color: var(--fail); }
.ach-admin-list { margin: 0 0 12px 22px; padding: 0; font-size: 14px; }
.ach-admin-list li { margin: 3px 0; }
.ach-admin-list li::marker { font-family: var(--f-display); font-weight: 800; color: var(--accent); }
.req-matrix td, .req-matrix th { text-align: center; }
.req-matrix td:first-child, .req-matrix th:first-child { text-align: left; }
.req-cell { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); cursor: pointer; }
.req-cell input { width: 16px; height: 16px; accent-color: var(--accent); }
.pub-table.prof-table th:first-child { width: 150px; }
.pub-table.prof-table th:nth-child(2) { width: 32%; }
.fhint, .fstatus .msg { overflow-wrap: anywhere; }

/* посилання «відкрити профіль» біля статусу перевірки */
.fstatus .msg-link { font-size: 12.5px; color: var(--accent); text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
