/* Общая основа портала и админки. Шрифт Montserrat (OFL) хранится у нас: внешние CDN не нужны. */
@font-face { font-family: Montserrat; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/montserrat-cyrillic-400-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Montserrat; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/montserrat-cyrillic-500-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Montserrat; font-style: normal; font-weight: 600; font-display: swap; src: url(/assets/fonts/montserrat-cyrillic-600-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Montserrat; font-style: normal; font-weight: 700; font-display: swap; src: url(/assets/fonts/montserrat-cyrillic-700-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Montserrat; font-style: normal; font-weight: 800; font-display: swap; src: url(/assets/fonts/montserrat-cyrillic-800-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Montserrat; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/montserrat-latin-400-normal.woff2) format('woff2'); 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; }
@font-face { font-family: Montserrat; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/montserrat-latin-500-normal.woff2) format('woff2'); 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; }
@font-face { font-family: Montserrat; font-style: normal; font-weight: 600; font-display: swap; src: url(/assets/fonts/montserrat-latin-600-normal.woff2) format('woff2'); 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; }
@font-face { font-family: Montserrat; font-style: normal; font-weight: 700; font-display: swap; src: url(/assets/fonts/montserrat-latin-700-normal.woff2) format('woff2'); 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; }
@font-face { font-family: Montserrat; font-style: normal; font-weight: 800; font-display: swap; src: url(/assets/fonts/montserrat-latin-800-normal.woff2) format('woff2'); 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; }

/* Оформление «Стройплощадка»: тёмно-синий, стальной серый, сигнальный жёлтый, строгие прямые углы.
   Админка переопределяет эти переменные в admin.css. */
:root {
  --font: Montserrat, "Segoe UI", system-ui, -apple-system, sans-serif;
  --bg: #ffffff; --surface: #ffffff; --text: #1e2230; --muted: #5d6371; --steel: #7a808c;
  --accent: #1b2a5b; --accent-hover: #2f4ab3; --accent-soft: #eef1fa; --link: #1b2a5b; --focus: #4a68f0;
  --border: #e1e4ea; --border-strong: #c9ced9; --mist: #f4f5f9;
  --ok: #1c6b3a; --ok-bg: #e3f2e8; --danger: #b3261e; --danger-bg: #fbe9e7; --warn: #7a5300; --warn-bg: #fff4d6;
  --yellow: #f2c12e;
  --radius: 0px; --radius-sm: 0px;
  --pad-btn: 12px 22px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.5; }
a { color: var(--link); }
a:hover { color: var(--accent-hover); }
h1 { font-size: 30px; line-height: 1.25; font-weight: 700; margin: 0 0 16px; color: var(--accent); }
h2 { font-size: 22px; line-height: 1.3; font-weight: 600; margin: 0 0 12px; }
h3 { font-size: 18px; line-height: 1.35; font-weight: 600; margin: 0 0 8px; }
p { margin: 0 0 12px; }
main { max-width: 1344px; margin: 0 auto; padding: 36px 48px 64px; }
main.narrow { max-width: 480px; }
main.wide { max-width: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.card + .card { margin-top: 20px; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.center { text-align: center; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.status-ok { color: var(--ok); } .status-error { color: var(--danger); }
[hidden] { display: none !important; }

/* --- формы --- */
label { display: flex; flex-direction: column; gap: 6px; font-weight: 500; }
input, select, textarea {
  font: inherit; font-size: 16px; color: var(--text); padding: 11px 14px; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); background: #fff; min-height: 44px;
}
textarea { min-height: 0; }
input[type=checkbox], input[type=radio] { min-height: 0; width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: transparent; }
button, a.button {
  font: inherit; font-weight: 600; cursor: pointer; padding: var(--pad-btn); border-radius: var(--radius-sm);
  border: 1.5px solid var(--accent); background: #fff; color: var(--accent); text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; line-height: 1.25;
}
button:hover, a.button:hover { background: var(--accent-soft); color: var(--accent); }
button:disabled { opacity: 0.55; cursor: default; }
button.primary, a.button.primary, a.primary-link { background: var(--accent); border-color: var(--accent); color: #fff; }
button.primary:hover, a.button.primary:hover, a.primary-link:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
button.danger { color: var(--danger); border-color: var(--danger); }
button.danger:hover { background: var(--danger-bg); }
button.link { border: 0; background: none; color: var(--link); padding: 0; text-decoration: underline; font-weight: 500; }
button.link:hover { background: none; color: var(--accent-hover); }
.error { background: var(--danger-bg); color: var(--danger); border-radius: var(--radius-sm); padding: 10px 14px; }
.error p { margin: 0; } .error ul { margin: 4px 0 0; padding-left: 20px; }
.ok { color: var(--ok); margin: 0; font-weight: 500; }
.notice { background: var(--warn-bg); color: var(--warn); border-radius: var(--radius-sm); padding: 12px 14px; margin: 8px 0; }

.tabs { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 0 0 20px; border-bottom: 1px solid var(--border); }
.tab { border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: none; padding: 10px 2px; color: var(--muted); font-weight: 600; }
.tab:hover { background: none; color: var(--accent); }
.tab.is-active { border-bottom-color: var(--accent); color: var(--accent); }

.props { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; margin: 0; }
.props dt { color: var(--muted); } .props dd { margin: 0; font-weight: 500; }

.badge { display: inline-block; padding: 3px 10px; font-size: 0.8125rem; font-weight: 600; background: var(--mist); color: var(--muted); white-space: nowrap; border-radius: var(--radius-sm); }
.badge--passed, .badge--active, .badge--published { background: var(--ok-bg); color: var(--ok); }
.badge--failed, .badge--blocked { background: var(--danger-bg); color: var(--danger); }
.badge--invited, .badge--draft { background: var(--warn-bg); color: var(--warn); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 700px) {
  main { padding: 24px 16px 48px; }
  h1 { font-size: 24px; }
  .card { padding: 18px 16px; }
  .props { grid-template-columns: 1fr; gap: 2px; }
  .props dd { margin-bottom: 10px; }
}

/* диалоги и строки кнопок — общие для портала и админки */
dialog { border: 0; border-radius: var(--radius); padding: 24px; width: min(540px, 95vw); color: var(--text); box-shadow: 0 20px 50px rgba(15, 20, 35, .25); }
dialog::backdrop { background: rgba(20, 25, 35, 0.5); }
.actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }

/* --- уведомления (колокольчик): общая часть для портала и админки --- */
.bell-wrap { position: relative; display: inline-flex; }
.bell { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.bell__badge { position: absolute; top: -6px; right: -8px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: #d63638; color: #fff; font-size: 11px; font-weight: 700; line-height: 20px; text-align: center; box-sizing: border-box; }
.bell-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; width: min(380px, calc(100vw - 24px));
  background: #fff; color: var(--text); border: 1px solid var(--border-strong); box-shadow: 0 8px 24px rgba(16, 24, 40, .16); }
.bell-panel__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.bell-panel__head .link { font-size: 13px; }
.bell-panel .notice-list { max-height: min(420px, 60vh); overflow-y: auto; }
.bell-panel__all { display: block; padding: 11px 16px; border-top: 1px solid var(--border); text-align: center; font-weight: 600; text-decoration: none; }
.notice-list { list-style: none; margin: 0; padding: 0; }
.notice-item + .notice-item { border-top: 1px solid var(--border); }
.notice-item__link { display: flex; gap: 12px; padding: 12px 16px; color: var(--text); text-decoration: none; }
.notice-item__link:hover { background: var(--mist); color: var(--text); }
.notice-item__dot { flex: none; width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: transparent; }
.notice-item.is-unread .notice-item__dot { background: #d63638; }
.notice-item.is-unread .notice-item__title { font-weight: 700; }
.notice-item__text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.notice-item__title { font-weight: 500; overflow-wrap: anywhere; }
.notice-item__body { color: var(--muted); font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.notice-item__body.is-clamped { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; }
.notice-item__time { color: var(--steel); font-size: 12px; }
.notice-empty { padding: 16px; color: var(--muted); font-size: 14px; }
.notice-list--page { border: 1px solid var(--border); background: #fff; }

/* --- выпадающий список с поиском (combo.js) --- */
.combo { position: relative; }
.combo__input { width: 100%; box-sizing: border-box; padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2350575e' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; }
.combo__list { position: absolute; left: 0; right: 0; top: calc(100% + 2px); z-index: 60; max-height: 260px; overflow-y: auto; margin: 0; padding: 4px 0;
  list-style: none; background: #fff; border: 1px solid var(--border-strong); box-shadow: 0 6px 16px rgba(16, 24, 40, .14); font-weight: 400; }
.combo__option { padding: 7px 12px; cursor: pointer; }
.combo__option:hover, .combo__option.is-active { background: var(--accent-soft); }
.combo__option[aria-selected="true"] { font-weight: 600; }
.combo__empty { padding: 7px 12px; color: var(--muted); }

/* Страница загрузилась не полностью (api.js): плашка внизу экрана с кнопкой «Обновить» */
.load-failure { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 1000; display: flex; gap: 12px;
  align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px 16px;
  background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger); font-size: 15px; }
.load-failure button { flex: none; }

/* Переключатель языка RU | TR (все страницы сотрудника) */
.lang-switch { display: inline-flex; border: 1px solid var(--border, #e1e4ea); border-radius: 8px; overflow: hidden; }
.lang-switch button { border: 0; border-radius: 0; background: transparent; padding: 5px 10px; font-size: 13px;
  font-weight: 600; line-height: 1.2; color: inherit; cursor: pointer; min-height: 0; box-shadow: none; }
.lang-switch button + button { border-left: 1px solid var(--border, #e1e4ea); }
.lang-switch button[aria-pressed="true"] { background: var(--accent, #1f4fd1); color: #fff; }
.lang-switch--dark { border-color: rgba(255,255,255,.45); }
.lang-switch--dark button { color: #fff; }
.lang-switch--dark button + button { border-left-color: rgba(255,255,255,.45); }
.lang-switch--dark button:hover { background: rgba(255,255,255,.12); color: #fff; }
.lang-switch--dark button[aria-pressed="true"] { background: #fff; color: var(--accent, #1f4fd1); }
