/* =====================================================================
   АЦ «ПРОЕКТ»: вкладка «Календарь встреч» (admin-ac-calendar.js) и срочные предупреждения вкладки «Встречи» (admin-ac.js).
   Токены (--cyan, --lav, --green, --amber, --red, --muted, --line…) — из admin-hub.css. Все правила живут внутри
   #pd-admin-hub. Подключается перед admin-ac.js. Текст на полосах и в подписях — не слабее 4.5:1: приглушённые состояния
   сделаны прозрачностью заливки и рамки, а не прозрачностью всей полосы.
   ===================================================================== */

/* ---------- срочно: счётчик в меню, полоса над разделом, строка встречи (вкладка «Встречи») ---------- */
#pd-admin-hub .pa-badge.pa-badge-urgent { color: #04060f; background: var(--red); box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.2); }
#pd-admin-hub .ac-urgent-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; margin-bottom: 16px; padding: 12px 18px; border-radius: 16px; background: var(--red-soft); box-shadow: inset 0 0 0 1px rgba(255, 107, 107, 0.5); }
#pd-admin-hub .ac-urgent-banner-text { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; min-width: 0; color: var(--text); font-size: 14px; line-height: 1.4; }
#pd-admin-hub .ac-urgent-banner-text strong { margin-right: 2px; font-family: "Tektur", sans-serif; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
#pd-admin-hub .ac-urgent-banner-actions { display: flex; flex-wrap: wrap; gap: 8px; }
#pd-admin-hub .ac-urgent-mark,
#pd-admin-hub .pr-chip.ac-chip-urgent,
#pd-admin-hub .pr-chip.acal-chip-red { color: #04060f; background: var(--red); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
#pd-admin-hub .ac-urgent-mark { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; line-height: 1.3; }
#pd-admin-hub .ac-urgent { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 6px; }
#pd-admin-hub .ac-urgent-line { color: #ffb3b3; font-size: 12px; font-weight: 600; line-height: 1.4; }
#pd-admin-hub .ac-table tr.ac-row.is-urgent { box-shadow: inset 3px 0 0 var(--red); }
#pd-admin-hub .ac-card.is-urgent { box-shadow: inset 0 0 0 1px rgba(255, 107, 107, 0.6); }
#pd-admin-hub .ac-card.is-highlight { animation: acal-highlight 2.6s ease; }
@keyframes acal-highlight {
  0%, 60% { box-shadow: inset 0 0 0 2px var(--cyan), 0 0 0 5px rgba(146, 213, 255, 0.22); }
  100% { box-shadow: inset 0 0 0 1px var(--line), 0 0 0 0 rgba(146, 213, 255, 0); }
}

/* ---------- подтверждения встреч (sql/28): чипы «Готовность» / «Проведена», пометка «Внимание», блок в окне встречи,
   фильтр «Подтверждения» (разметку строит admin-ac.js) ---------- */
#pd-admin-hub .ac-conf { display: flex; flex-wrap: wrap; gap: 6px 8px; margin-top: 8px; }
/* чип в две строки: название сверху, «лидер ✓ · наставник —» снизу — так он одинаково узкий в колонке таблицы и в карточке */
#pd-admin-hub .ac-conf-chip { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 4px 10px 5px; border-radius: 12px; color: var(--muted); background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px var(--line); font-size: 11px; line-height: 1.4; cursor: default; }
#pd-admin-hub .ac-conf-chip b { color: var(--text); font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
#pd-admin-hub .ac-conf-chip.is-yes { box-shadow: inset 0 0 0 1px rgba(52, 211, 153, 0.45); }
#pd-admin-hub .ac-conf-chip.is-no { box-shadow: inset 0 0 0 1px rgba(255, 107, 107, 0.5); }
#pd-admin-hub .ac-conf-line { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 5px; max-width: 100%; }
#pd-admin-hub .ac-conf-sep { color: var(--faint, rgba(238, 241, 255, 0.35)); }
#pd-admin-hub .ac-conf-who { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
#pd-admin-hub .ac-conf-ico { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; color: var(--muted); background: rgba(255, 255, 255, 0.08); font-family: "Tektur", sans-serif; font-size: 10px; font-style: normal; font-weight: 900; line-height: 1; }
#pd-admin-hub .ac-conf-ico.is-yes { color: #04060f; background: var(--green); }
#pd-admin-hub .ac-conf-ico.is-no { color: #04060f; background: var(--red); }
#pd-admin-hub .ac-conf-attn { flex: 1 1 100%; color: var(--amber); font-size: 12px; font-weight: 600; line-height: 1.4; }
#pd-admin-hub .ac-conf-attn b { font-weight: 800; }
#pd-admin-hub .ac-conf-attn.is-info { color: var(--muted); font-weight: 500; }
#pd-admin-hub .ac-conf-done { flex: 1 1 100%; color: var(--green); font-size: 12px; font-weight: 600; line-height: 1.4; }
#pd-admin-hub .ac-table tr.ac-row.is-attention:not(.is-urgent) { box-shadow: inset 3px 0 0 var(--amber); }
#pd-admin-hub .ac-card.is-attention:not(.is-urgent) { box-shadow: inset 0 0 0 1px rgba(255, 183, 3, 0.45); }
#pd-admin-hub .ac-conf-block { margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.04); box-shadow: inset 0 0 0 1px var(--line); }
#pd-admin-hub .ac-conf-block .ac-card-label { margin-bottom: 8px; }
#pd-admin-hub .ac-conf-block .ac-conf-attn, #pd-admin-hub .ac-conf-block .ac-conf-done { margin-top: 8px; }
#pd-admin-hub .ac-conf-block .ac-sub { margin-top: 8px; }
#pd-admin-hub .ac-conf-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) minmax(0, 1fr); gap: 6px 12px; padding: 6px 0; border-top: 1px solid rgba(255, 255, 255, 0.06); font-size: 13px; line-height: 1.45; }
#pd-admin-hub .ac-conf-row:first-of-type { border-top: 0; }
#pd-admin-hub .ac-conf-row-label { color: var(--muted); font-weight: 700; }
#pd-admin-hub .ac-conf-cell { display: flex; align-items: flex-start; gap: 7px; min-width: 0; overflow-wrap: anywhere; }
#pd-admin-hub .ac-conf-cell .ac-conf-ico { flex: 0 0 auto; margin-top: 2px; }
#pd-admin-hub .ac-conf-cell b { font-weight: 700; }
#pd-admin-hub .ac-conf-filter[hidden] { display: none; }

/* календарь: метка подтверждений на полосе (внимание — янтарная точка, held_partial — приглушённая, «готовы оба» — зелёная), обозначения, карточка */
#pd-admin-hub .acal-cmark { position: absolute; right: 4px; bottom: 3px; z-index: 1; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 2px rgba(11, 14, 28, 0.85); pointer-events: none; }
#pd-admin-hub .acal-bar.is-attn-info .acal-cmark { background: rgba(255, 183, 3, 0.5); }
#pd-admin-hub .acal-bar.is-ready .acal-cmark { background: var(--green); }
#pd-admin-hub .acal-bar.has-attn:not(.is-urgent) { box-shadow: inset 0 0 0 1px rgba(255, 183, 3, 0.55); }
#pd-admin-hub .acal-bar.is-attn-info:not(.is-urgent) { box-shadow: inset 0 0 0 1px rgba(255, 183, 3, 0.3); }
#pd-admin-hub .acal-mini .acal-cmark { right: 2px; bottom: 2px; width: 6px; height: 6px; }
#pd-admin-hub .acal-swatch.has-attn { position: relative; border-left: 0; background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px rgba(255, 183, 3, 0.55); }
#pd-admin-hub .acal-swatch.has-attn::after, #pd-admin-hub .acal-swatch.is-ready::after { content: ""; position: absolute; right: 2px; bottom: 1px; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }
#pd-admin-hub .acal-swatch.is-ready { position: relative; }
#pd-admin-hub .acal-swatch.is-ready::after { background: var(--green); }
#pd-admin-hub .acal-conf-attn { color: var(--amber); font-weight: 600; }
#pd-admin-hub .acal-conf-attn.is-info { color: var(--muted); font-weight: 500; }
#pd-admin-hub .acal-conf-done { color: var(--green); font-weight: 600; }

/* ---------- календарь: размеры ---------- */
#pd-admin-hub #pa-pane-calendar { --acal-left: 300px; --acal-hour: 112px; --acal-bg: #0b0e1c; --acal-bg-alt: #0d1122; }
#pd-admin-hub .acal-board { margin-top: 0; padding: 18px 20px 16px; }
#pd-admin-hub .acal-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- панель инструментов: период, переходы, счётчики; ниже — фильтры ---------- */
#pd-admin-hub .acal-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
#pd-admin-hub .acal-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px var(--line); }
#pd-admin-hub .acal-seg-btn { min-height: 30px; padding: 0 16px; border: 0; border-radius: 999px; color: var(--muted); background: transparent; font-size: 13px; font-weight: 700; cursor: pointer; transition: background-color 0.2s ease, color 0.2s ease; }
#pd-admin-hub .acal-seg-btn:hover { color: var(--text); }
#pd-admin-hub .acal-seg-btn.is-active { color: var(--cyan); background: var(--cyan-soft); box-shadow: inset 0 0 0 1px rgba(146, 213, 255, 0.4); }
#pd-admin-hub .acal-nav { display: inline-flex; align-items: center; gap: 6px; }
#pd-admin-hub .acal-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 0 14px; border: 0; border-radius: 999px; color: var(--text); background: rgba(255, 255, 255, 0.07); font-size: 13px; font-weight: 600; cursor: pointer; transition: background-color 0.2s ease; }
#pd-admin-hub .acal-btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.14); }
#pd-admin-hub .acal-btn:disabled { color: var(--muted); background: rgba(255, 255, 255, 0.04); cursor: default; }
#pd-admin-hub .acal-btn-icon { flex: 0 0 34px; width: 34px; padding: 0 0 2px; font-size: 19px; line-height: 1; }
#pd-admin-hub .acal-input { min-height: 34px; padding: 0 14px; border: 0; border-radius: 999px; outline: none; color: var(--text); background-color: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; font-weight: 500; }
#pd-admin-hub .acal-input::placeholder { color: var(--muted); }
#pd-admin-hub .acal-input[type="date"], #pd-admin-hub .acal-input[type="time"] { color-scheme: dark; padding-right: 10px; font-variant-numeric: tabular-nums; }
#pd-admin-hub .acal-period { font-family: "Tektur", sans-serif; font-size: 17px; font-weight: 700; line-height: 1.2; }
#pd-admin-hub .acal-today-mark { display: inline-block; margin-left: 6px; padding: 2px 9px; border-radius: 999px; color: var(--cyan); background: var(--cyan-soft); font-family: "Exo 2", sans-serif; font-size: 11px; font-weight: 700; line-height: 1.4; vertical-align: middle; }
#pd-admin-hub .acal-counters { margin-left: auto; color: var(--muted); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
#pd-admin-hub .acal-counters b { color: var(--text); font-family: "Tektur", sans-serif; font-weight: 700; }
#pd-admin-hub .acal-count-urgent, #pd-admin-hub .acal-count-urgent b { color: #ff9c9c; }
#pd-admin-hub .acal-count-conflict, #pd-admin-hub .acal-count-conflict b { color: var(--amber); }

#pd-admin-hub .acal-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
#pd-admin-hub .acal-search { flex: 1 1 200px; max-width: 250px; min-width: 0; }
#pd-admin-hub .acal-select { flex: 0 1 172px; min-width: 0; max-width: 200px; text-overflow: ellipsis; }
#pd-admin-hub .acal-chips { display: inline-flex; flex-wrap: wrap; gap: 6px; }
#pd-admin-hub .acal-chip { display: inline-flex; align-items: center; min-height: 30px; padding: 0 12px; border: 0; border-radius: 999px; color: var(--muted); background: transparent; box-shadow: inset 0 0 0 1px var(--line-hi); font-size: 12px; font-weight: 700; cursor: pointer; transition: background-color 0.2s ease, color 0.2s ease; }
/* включён или нет — видно не только по цвету: точка залита или пустая */
#pd-admin-hub .acal-chip::before { content: ""; flex: 0 0 8px; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px currentColor; }
#pd-admin-hub .acal-chip.is-on::before { background: currentColor; }
#pd-admin-hub .acal-chip:hover { color: var(--text); }
#pd-admin-hub .acal-chip.is-on { color: var(--cyan); background: var(--cyan-soft); box-shadow: inset 0 0 0 1px rgba(146, 213, 255, 0.45); }
#pd-admin-hub .acal-chip[data-status="done"].is-on { color: var(--green); background: var(--green-soft); box-shadow: inset 0 0 0 1px rgba(52, 211, 153, 0.45); }
#pd-admin-hub .acal-chip[data-status="cancelled"].is-on { color: var(--text); background: rgba(255, 255, 255, 0.08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3); }
#pd-admin-hub .acal-chip-urgent.is-on { color: #ffb3b3; background: var(--red-soft); box-shadow: inset 0 0 0 1px rgba(255, 107, 107, 0.6); }
#pd-admin-hub .acal-seg-btn:focus-visible, #pd-admin-hub .acal-btn:focus-visible, #pd-admin-hub .acal-chip:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* ---------- диаграмма: свой контейнер прокрутки, шапка и левый столбец прилипают ---------- */
#pd-admin-hub .acal-scroll { position: relative; z-index: 0; isolation: isolate; margin-top: 14px; max-height: min(72vh, 780px); overflow: auto; border: 1px solid var(--line); border-radius: 16px; background: rgba(5, 7, 15, 0.5); overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.24) transparent; }
#pd-admin-hub .acal-scroll:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
#pd-admin-hub .acal-gantt { position: relative; min-width: 960px; }
#pd-admin-hub .acal-day { width: max(100%, calc(var(--acal-left) + var(--acal-hours) * var(--acal-hour))); }
#pd-admin-hub .acal-week { width: 100%; }

#pd-admin-hub .acal-head { position: sticky; top: 0; z-index: 6; display: flex; height: 36px; background: var(--acal-bg); box-shadow: 0 1px 0 var(--line-hi); }
#pd-admin-hub .acal-corner { position: sticky; left: 0; z-index: 2; flex: 0 0 var(--acal-left); display: flex; align-items: center; min-width: 0; padding: 0 16px; color: var(--muted); background: var(--acal-bg); box-shadow: 1px 0 0 var(--line-hi); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
#pd-admin-hub .acal-hours { position: relative; flex: 1 1 auto; min-width: 0; }
#pd-admin-hub .acal-hour { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; padding-left: 8px; border-left: 1px solid rgba(255, 255, 255, 0.14); color: var(--muted); font-family: "Tektur", sans-serif; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
#pd-admin-hub .acal-hour:first-child { border-left-color: transparent; }

#pd-admin-hub .acal-body { position: relative; }
#pd-admin-hub .acal-grid { position: absolute; top: 0; right: 0; bottom: 0; left: var(--acal-left); z-index: 1; pointer-events: none; }
#pd-admin-hub .acal-line { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(255, 255, 255, 0.045); }
#pd-admin-hub .acal-line.is-hour { background: rgba(255, 255, 255, 0.11); }
#pd-admin-hub .acal-row { position: relative; display: flex; min-height: 44px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
#pd-admin-hub .acal-row:last-child { border-bottom: 0; }
#pd-admin-hub .acal-row:nth-child(even) { background: rgba(255, 255, 255, 0.018); }
#pd-admin-hub .acal-team { position: sticky; left: 0; z-index: 4; flex: 0 0 var(--acal-left); display: flex; flex-direction: column; justify-content: center; gap: 2px; min-width: 0; padding: 0 16px; background: var(--acal-bg); box-shadow: 1px 0 0 var(--line-hi); }
#pd-admin-hub .acal-row:nth-child(even) .acal-team { background: var(--acal-bg-alt); }
#pd-admin-hub .acal-row.is-urgent .acal-team { box-shadow: inset 3px 0 0 var(--red), 1px 0 0 var(--line-hi); }
#pd-admin-hub .acal-team-top { display: flex; align-items: center; min-width: 0; font-size: 13px; line-height: 1.3; }
#pd-admin-hub .acal-team-top .pdm-id { flex: 0 0 auto; }
#pd-admin-hub .acal-team-top b { min-width: 0; overflow: hidden; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
#pd-admin-hub .acal-team-sub { overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
#pd-admin-hub .acal-track { position: relative; z-index: 2; flex: 1 1 auto; min-width: 0; }

/* ---------- полоса встречи ---------- */
#pd-admin-hub .acal-bar { position: absolute; container-type: inline-size; height: 28px; min-width: 28px; margin: 0; padding: 0; border: 0; border-left: 3px solid var(--cyan); border-radius: 8px; color: var(--text); background: rgba(146, 213, 255, 0.22); font: inherit; font-size: 12px; font-weight: 600; line-height: 28px; text-align: left; cursor: pointer; -webkit-user-select: none; user-select: none; touch-action: manipulation; transition: background-color 0.15s ease; }
#pd-admin-hub .acal-bar[data-drag] { cursor: grab; }
#pd-admin-hub .acal-bar:hover { background: rgba(146, 213, 255, 0.33); }
#pd-admin-hub .acal-bar.is-offline { border-left-color: var(--lav); background: rgba(233, 195, 255, 0.2); }
#pd-admin-hub .acal-bar.is-offline:hover { background: rgba(233, 195, 255, 0.31); }
#pd-admin-hub .acal-bar:focus-visible { z-index: 5; outline: 2px solid #fff; outline-offset: 2px; }
/* подпись: время и длительность; организация заказчика остаётся в строке, только если ей хватает места, иначе уходит
   на вторую строку, которая обрезана высотой полосы (полный текст — во всплывающей подсказке) */
#pd-admin-hub .acal-bar-in { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 0 8px; height: 28px; padding: 0 8px 0 7px; overflow: hidden; border-radius: inherit; white-space: nowrap; }
#pd-admin-hub .acal-bar-time { flex: 0 0 auto; height: 28px; font-variant-numeric: tabular-nums; }
#pd-admin-hub .acal-bar-org { flex: 1 1 64px; min-width: 64px; height: 28px; overflow: hidden; color: rgba(238, 241, 255, 0.78); font-weight: 500; text-overflow: ellipsis; }
@container (max-width: 46px) { #pd-admin-hub .acal-bar-time { visibility: hidden; } }

/* состоялась: приглушённая серо-зелёная; отменена: пустая, пунктир, зачёркнутое время */
#pd-admin-hub .acal-bar.is-done, #pd-admin-hub .acal-bar.is-done:hover { border-left-color: rgba(52, 211, 153, 0.6); color: rgba(238, 241, 255, 0.74); background: rgba(126, 168, 148, 0.17); }
#pd-admin-hub .acal-bar.is-done:hover { background: rgba(126, 168, 148, 0.26); }
#pd-admin-hub .acal-bar.is-cancelled, #pd-admin-hub .acal-bar.is-cancelled:hover { border: 1px dashed rgba(238, 241, 255, 0.4); color: rgba(238, 241, 255, 0.66); background: transparent; line-height: 26px; }
#pd-admin-hub .acal-bar.is-cancelled:hover { background: rgba(255, 255, 255, 0.05); }
#pd-admin-hub .acal-bar.is-cancelled .acal-bar-in, #pd-admin-hub .acal-bar.is-cancelled .acal-bar-time, #pd-admin-hub .acal-bar.is-cancelled .acal-bar-org { height: 26px; }
#pd-admin-hub .acal-bar.is-cancelled .acal-bar-time { text-decoration: line-through; }
#pd-admin-hub .acal-bar.is-done .acal-bar-org, #pd-admin-hub .acal-bar.is-cancelled .acal-bar-org { color: inherit; }

/* срочно: красный контур, знак «!», мягкая пульсация; пересечение: янтарный уголок */
#pd-admin-hub .acal-bar.is-urgent { box-shadow: 0 0 0 1.5px var(--red); animation: acal-pulse 1.9s ease-in-out infinite; }
@keyframes acal-pulse {
  0%, 100% { box-shadow: 0 0 0 1.5px var(--red), 0 0 0 0 rgba(255, 107, 107, 0.5); }
  55% { box-shadow: 0 0 0 1.5px var(--red), 0 0 0 7px rgba(255, 107, 107, 0); }
}
#pd-admin-hub .acal-flag { position: absolute; top: -7px; right: -7px; z-index: 1; display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; color: #04060f; background: var(--red); box-shadow: 0 0 0 2px #0b0e1c; font-family: "Tektur", sans-serif; font-size: 11px; font-weight: 900; line-height: 1; pointer-events: none; }
#pd-admin-hub .acal-mark { position: absolute; top: 0; left: -3px; width: 11px; height: 11px; border-top-left-radius: 8px; background: var(--amber); clip-path: polygon(0 0, 100% 0, 0 100%); pointer-events: none; }

/* перенос: исходная полоса бледнеет, тень показывает новое место, рядом — новое время */
#pd-admin-hub .acal-bar.is-moving { opacity: 0.35; animation: none; }
#pd-admin-hub .acal-ghost { position: absolute; z-index: 6; height: 28px; min-width: 28px; border: 1.5px dashed var(--cyan); border-radius: 8px; background: rgba(146, 213, 255, 0.2); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45); pointer-events: none; }
#pd-admin-hub .acal-ghost.is-offline { border-color: var(--lav); background: rgba(233, 195, 255, 0.2); }
#pd-admin-hub .acal-ghost.is-saving { opacity: 0.55; }
#pd-admin-hub .acal-ghost-label { position: absolute; top: 50%; left: calc(100% + 8px); padding: 3px 9px; border-radius: 999px; color: #04060f; background: var(--cyan); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5); font-family: "Tektur", sans-serif; font-size: 11px; font-weight: 700; line-height: 1.3; white-space: nowrap; transform: translateY(-50%); }
#pd-admin-hub .acal-ghost.is-flip .acal-ghost-label { right: calc(100% + 8px); left: auto; }
#pd-admin-hub.acal-dragging, #pd-admin-hub.acal-dragging * { cursor: grabbing !important; -webkit-user-select: none; user-select: none; }

/* линия «сейчас» */
#pd-admin-hub .acal-now { position: absolute; top: 0; bottom: 0; z-index: 3; width: 2px; margin-left: -1px; background: var(--red); box-shadow: 0 0 10px rgba(255, 107, 107, 0.55); pointer-events: none; }
#pd-admin-hub .acal-now.is-week { width: 1px; margin-left: 0; box-shadow: none; opacity: 0.8; }
#pd-admin-hub .acal-now-label { position: absolute; top: 50%; z-index: 1; padding: 2px 7px; border-radius: 999px; color: #04060f; background: var(--red); font-family: "Tektur", sans-serif; font-size: 11px; font-weight: 700; line-height: 1.3; font-variant-numeric: tabular-nums; transform: translate(-50%, -50%); pointer-events: none; }

/* ---------- неделя ---------- */
#pd-admin-hub .acal-days, #pd-admin-hub .acal-cells { flex: 1 1 auto; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); min-width: 0; }
#pd-admin-hub .acal-cells { position: relative; z-index: 2; }
#pd-admin-hub .acal-dayhead { display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; margin: 0; padding: 0 6px; border: 0; border-left: 1px solid var(--line); color: var(--muted); background: transparent; font: inherit; font-size: 12px; cursor: pointer; transition: background-color 0.2s ease, color 0.2s ease; }
#pd-admin-hub .acal-dayhead:first-child { border-left-color: transparent; }
#pd-admin-hub .acal-dayhead-dow { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
#pd-admin-hub .acal-dayhead b { color: var(--text); font-family: "Tektur", sans-serif; font-size: 14px; font-weight: 700; }
#pd-admin-hub .acal-dayhead small { min-width: 18px; padding: 1px 5px; border-radius: 999px; color: var(--text); background: rgba(255, 255, 255, 0.1); font-size: 10px; font-weight: 700; line-height: 1.4; text-align: center; }
#pd-admin-hub .acal-dayhead:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
#pd-admin-hub .acal-dayhead.is-weekend b { color: var(--muted); }
#pd-admin-hub .acal-dayhead.is-today, #pd-admin-hub .acal-dayhead.is-today b { color: var(--cyan); }
#pd-admin-hub .acal-dayhead.is-today { background: var(--cyan-soft); box-shadow: inset 0 -2px 0 var(--cyan); }
#pd-admin-hub .acal-dayhead:focus-visible { outline: 2px solid var(--cyan); outline-offset: -2px; }
/* ячейка дня — мини-шкала того же окна; деления 12:00 и 16:00 (--acal-t1, --acal-t2 ставит скрипт) */
#pd-admin-hub .acal-cell { position: relative; min-width: 0; border-left: 1px solid rgba(255, 255, 255, 0.07);
  background-image:
    linear-gradient(90deg, transparent calc(var(--acal-t1) - 0.5px), rgba(255, 255, 255, 0.07) calc(var(--acal-t1) - 0.5px), rgba(255, 255, 255, 0.07) calc(var(--acal-t1) + 0.5px), transparent calc(var(--acal-t1) + 0.5px)),
    linear-gradient(90deg, transparent calc(var(--acal-t2) - 0.5px), rgba(255, 255, 255, 0.07) calc(var(--acal-t2) - 0.5px), rgba(255, 255, 255, 0.07) calc(var(--acal-t2) + 0.5px), transparent calc(var(--acal-t2) + 0.5px)); }
#pd-admin-hub .acal-cell:first-child { border-left-color: transparent; }
#pd-admin-hub .acal-cell.is-weekend { background-color: rgba(0, 0, 0, 0.24); }
#pd-admin-hub .acal-cell.is-today { background-color: rgba(146, 213, 255, 0.06); }
#pd-admin-hub .acal-mini { width: 56px; min-width: 0; height: 18px; border-radius: 6px; font-size: 11px; line-height: 18px; container-type: normal; }
#pd-admin-hub .acal-mini .acal-bar-in, #pd-admin-hub .acal-mini .acal-bar-time { height: 18px; }
#pd-admin-hub .acal-mini .acal-bar-in { padding: 0 4px; }
#pd-admin-hub .acal-mini.is-cancelled, #pd-admin-hub .acal-mini.is-cancelled:hover { line-height: 16px; }
#pd-admin-hub .acal-mini.is-cancelled .acal-bar-in, #pd-admin-hub .acal-mini.is-cancelled .acal-bar-time { height: 16px; }
#pd-admin-hub .acal-mini .acal-flag { top: -6px; right: -6px; width: 14px; height: 14px; font-size: 10px; }
#pd-admin-hub .acal-mini .acal-mark { width: 9px; height: 9px; border-top-left-radius: 6px; }

/* неделя на узком экране: список по дням */
#pd-admin-hub .acal-scroll.is-list { max-height: none; overflow: visible; border: 0; border-radius: 0; background: transparent; }
#pd-admin-hub .acal-list { display: grid; gap: 16px; }
#pd-admin-hub .acal-list-day h3 { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 0 8px; }
#pd-admin-hub .acal-list-day h3 span { color: var(--muted); font-size: 12px; font-weight: 500; }
#pd-admin-hub .acal-list-dayhead { padding: 0; border: 0; color: var(--text); background: none; font-family: "Tektur", sans-serif; font-size: 15px; font-weight: 700; cursor: pointer; }
#pd-admin-hub .acal-list-day.is-today .acal-list-dayhead { color: var(--cyan); }
#pd-admin-hub .acal-list-item { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 6px 12px; width: 100%; margin: 0 0 8px; padding: 10px 12px; border: 0; border-left: 3px solid var(--cyan); border-radius: 12px; color: var(--text); background: rgba(146, 213, 255, 0.12); font: inherit; text-align: left; cursor: pointer; }
#pd-admin-hub .acal-list-item.is-offline { border-left-color: var(--lav); background: rgba(233, 195, 255, 0.12); }
#pd-admin-hub .acal-list-item.is-done { border-left-color: rgba(52, 211, 153, 0.6); color: rgba(238, 241, 255, 0.78); background: rgba(126, 168, 148, 0.12); }
#pd-admin-hub .acal-list-item.is-cancelled { border: 1px dashed rgba(238, 241, 255, 0.4); color: rgba(238, 241, 255, 0.7); background: transparent; }
#pd-admin-hub .acal-list-item.is-cancelled .acal-list-time { text-decoration: line-through; }
#pd-admin-hub .acal-list-item.is-urgent { box-shadow: 0 0 0 1.5px var(--red); }
#pd-admin-hub .acal-list-item:focus-visible, #pd-admin-hub .acal-list-dayhead:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
#pd-admin-hub .acal-list-time { font-family: "Tektur", sans-serif; font-size: 16px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
#pd-admin-hub .acal-list-time small { display: block; margin-top: 2px; color: var(--muted); font-family: "Exo 2", sans-serif; font-size: 11px; font-weight: 500; }
#pd-admin-hub .acal-list-main { min-width: 0; }
#pd-admin-hub .acal-list-main b { display: block; font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
#pd-admin-hub .acal-list-sub { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; line-height: 1.35; }
#pd-admin-hub .acal-list-tags { grid-column: 2; display: flex; flex-wrap: wrap; gap: 5px; }

/* ---------- пустое состояние, обозначения ---------- */
#pd-admin-hub .acal-empty { margin-top: 14px; padding: 34px 20px; border: 1px dashed var(--line-hi); border-radius: 16px; color: var(--muted); text-align: center; }
#pd-admin-hub .acal-empty strong { display: block; color: var(--text); font-family: "Tektur", sans-serif; font-size: 17px; font-weight: 700; }
#pd-admin-hub .acal-empty p { margin: 6px 0 0; font-size: 13px; line-height: 1.5; }
#pd-admin-hub .acal-empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; margin-top: 12px; }
#pd-admin-hub .acal-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 12px; color: var(--muted); font-size: 12px; line-height: 1.45; }
#pd-admin-hub .acal-legend-item { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
#pd-admin-hub .acal-legend-hint { flex: 1 1 100%; }
#pd-admin-hub .acal-legend-hint:empty { display: none; }
#pd-admin-hub .acal-swatch { position: relative; flex: 0 0 auto; display: inline-block; width: 20px; height: 11px; border-left: 3px solid var(--cyan); border-radius: 4px; background: rgba(146, 213, 255, 0.22); }
#pd-admin-hub .acal-swatch.is-offline { border-left-color: var(--lav); background: rgba(233, 195, 255, 0.2); }
#pd-admin-hub .acal-swatch.is-done { border-left-color: rgba(52, 211, 153, 0.6); background: rgba(126, 168, 148, 0.17); }
#pd-admin-hub .acal-swatch.is-cancelled { border: 1px dashed rgba(238, 241, 255, 0.4); background: transparent; }
#pd-admin-hub .acal-swatch.is-urgent { border-left: 0; background: rgba(255, 255, 255, 0.06); box-shadow: 0 0 0 1.5px var(--red); }
#pd-admin-hub .acal-swatch.has-conflict { border-left: 0; background: rgba(255, 255, 255, 0.1); }
#pd-admin-hub .acal-swatch.has-conflict::before { content: ""; position: absolute; top: 0; left: 0; width: 8px; height: 8px; border-top-left-radius: 4px; background: var(--amber); clip-path: polygon(0 0, 100% 0, 0 100%); }

/* ---------- карточка встречи: панель справа (скрипт переносит её и окно подтверждения в корень #pd-admin-hub,
   чтобы шапка панели не ложилась поверх) ---------- */
#pd-admin-hub .acal-drawer-wrap { position: fixed; inset: 0; z-index: 48; display: flex; justify-content: flex-end; background: rgba(5, 7, 15, 0.55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
#pd-admin-hub #acal-confirm { z-index: 52; }
#pd-admin-hub .acal-drawer { position: relative; display: flex; flex-direction: column; width: min(100%, 460px); height: 100%; outline: none; color: var(--text); background: #0b0e1c; box-shadow: -24px 0 70px rgba(0, 0, 0, 0.6), inset 1px 0 0 rgba(255, 255, 255, 0.1); animation: acal-drawer-in 0.22s ease; }
@keyframes acal-drawer-in { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes acal-modal-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
#pd-admin-hub .acal-drawer-head { flex: 0 0 auto; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 22px 22px 14px; border-bottom: 1px solid var(--line); }
#pd-admin-hub .acal-drawer-head h3 { margin: 0; font-family: "Tektur", sans-serif; font-size: 18px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
#pd-admin-hub .acal-drawer-body { flex: 1 1 auto; min-height: 0; padding: 16px 22px 26px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.24) transparent; }
#pd-admin-hub .acal-drawer-chips { display: flex; flex-wrap: wrap; gap: 6px; }
#pd-admin-hub .acal-alert { margin-top: 12px; padding: 12px 14px; border-radius: 14px; font-size: 13px; line-height: 1.5; }
#pd-admin-hub .acal-alert b { display: block; }
#pd-admin-hub .acal-alert p { margin: 4px 0 0; color: var(--text); overflow-wrap: anywhere; }
#pd-admin-hub .acal-alert.is-urgent { color: #ffc2c2; background: var(--red-soft); box-shadow: inset 0 0 0 1px rgba(255, 107, 107, 0.55); }
#pd-admin-hub .acal-alert.is-conflict { color: var(--amber); background: var(--amber-soft); box-shadow: inset 0 0 0 1px rgba(255, 183, 3, 0.4); }
#pd-admin-hub .acal-alert.is-note { color: var(--muted); background: rgba(255, 255, 255, 0.05); }
#pd-admin-hub .acal-alert-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
#pd-admin-hub .acal-field { margin-top: 14px; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
#pd-admin-hub .acal-field-label { margin-bottom: 3px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
#pd-admin-hub .acal-field-value a { color: var(--cyan); text-decoration: none; border-bottom: 1px dotted rgba(146, 213, 255, 0.5); }
#pd-admin-hub .acal-pre { white-space: pre-line; }
#pd-admin-hub .acal-meta { margin-top: 14px; color: var(--muted); font-size: 12px; line-height: 1.5; }
#pd-admin-hub .acal-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
#pd-admin-hub .acal-panel { margin-top: 14px; padding: 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.04); box-shadow: inset 0 0 0 1px var(--line); }
#pd-admin-hub .acal-panel-title { font-family: "Tektur", sans-serif; font-size: 15px; font-weight: 700; }
#pd-admin-hub .acal-panel-text { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
#pd-admin-hub .acal-panel-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
#pd-admin-hub .acal-label { display: grid; gap: 5px; margin-top: 10px; color: var(--muted); font-size: 12px; font-weight: 500; }
#pd-admin-hub .acal-panel-grid .acal-label { margin-top: 0; }
#pd-admin-hub .acal-label .acal-input { width: 100%; min-width: 0; border-radius: 12px; }
#pd-admin-hub .acal-textarea { min-height: 76px; padding: 10px 14px; border-radius: 12px; line-height: 1.45; resize: vertical; }
#pd-admin-hub .acal-panel-note { margin-top: 10px; padding: 9px 12px; border-radius: 10px; color: var(--amber); background: var(--amber-soft); font-size: 12px; line-height: 1.45; }
#pd-admin-hub .acal-panel-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 12px; }

/* ---------- адаптив ---------- */
@media screen and (max-width: 1320px) {
  #pd-admin-hub #pa-pane-calendar { --acal-left: 260px; }
  #pd-admin-hub .acal-week { min-width: 900px; }
}
@media screen and (max-width: 1000px) {
  #pd-admin-hub #pa-pane-calendar { --acal-left: 230px; }
  #pd-admin-hub .acal-counters { flex: 1 1 100%; margin-left: 0; white-space: normal; }
}
/* уже 900px карточка встречи — окно по центру */
@media screen and (max-width: 899px) {
  #pd-admin-hub .acal-drawer-wrap { align-items: center; justify-content: center; padding: 16px; background: rgba(5, 7, 15, 0.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
  #pd-admin-hub .acal-drawer { width: min(100%, 560px); height: auto; max-height: calc(100vh - 32px); border-radius: 22px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1); animation-name: acal-modal-in; }
}
@media screen and (max-width: 767px) {
  #pd-admin-hub #pa-pane-calendar { --acal-left: 164px; --acal-hour: 96px; }
  #pd-admin-hub .acal-board { padding: 14px 12px; }
  #pd-admin-hub .acal-period { flex: 1 1 100%; order: 5; font-size: 16px; }
  #pd-admin-hub .acal-counters { order: 6; }
  #pd-admin-hub .acal-search { flex-basis: 100%; max-width: none; }
  #pd-admin-hub .acal-select { flex: 1 1 140px; max-width: none; }
  #pd-admin-hub .acal-corner, #pd-admin-hub .acal-team { padding: 0 10px; }
  #pd-admin-hub .acal-team-top, #pd-admin-hub .acal-team-sub { font-size: 12px; }
  #pd-admin-hub .acal-panel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #pd-admin-hub .acal-drawer-head { padding: 18px 16px 12px; }
  #pd-admin-hub .acal-drawer-body { padding: 14px 16px 20px; }
  #pd-admin-hub .ac-urgent-banner { padding: 12px 14px; }
}
@media screen and (max-width: 640px) {
  #pd-admin-hub .acal-input { font-size: 16px; }   /* iOS не приближает страницу при фокусе */
  #pd-admin-hub .acal-nav { flex: 1 1 100%; }
  #pd-admin-hub .acal-date { flex: 1 1 auto; min-width: 0; }
  #pd-admin-hub .acal-actions .pd-pd-button, #pd-admin-hub .acal-alert-actions .pd-pd-button { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
  #pd-admin-hub .acal-bar.is-urgent, #pd-admin-hub .acal-drawer, #pd-admin-hub .ac-card.is-highlight { animation: none; }
  #pd-admin-hub .ac-card.is-highlight { box-shadow: inset 0 0 0 2px var(--cyan); }
  #pd-admin-hub .acal-bar, #pd-admin-hub .acal-chip, #pd-admin-hub .acal-btn, #pd-admin-hub .acal-seg-btn, #pd-admin-hub .acal-dayhead { transition: none; }
}
