/* ============================================================
   ГРАФИК v425: месяц таблицей, итоги, покрытие дня, карточки дня и
   клетки, правила центра, заявки, печать на А4. Свой слой, классы sg-,
   подключается последним.
   ============================================================ */

:root {
  --sg-duty-bg: #fff0a8; --sg-duty-br: #efc53f; --sg-duty-ink: #5f4400;
  --sg-wk: rgba(15, 23, 42, .028);
  --sg-closed: rgba(15, 23, 42, .06);
  --sg-today: rgba(160, 28, 76, .07);
  --sg-warn-bg: #fde7e7; --sg-warn-ink: #c0342b; --sg-warn-br: #f3b4b0;
  --sg-row-line: color-mix(in srgb, var(--line) 70%, transparent);
}
[data-theme=dark] {
  --sg-duty-bg: rgba(245, 190, 64, .26); --sg-duty-br: rgba(245, 190, 64, .55); --sg-duty-ink: #ffe08a;
  --sg-wk: rgba(255, 255, 255, .025);
  --sg-closed: rgba(255, 255, 255, .055);
  --sg-today: rgba(255, 110, 150, .09);
  --sg-warn-bg: rgba(230, 80, 80, .2); --sg-warn-ink: #ff9a94; --sg-warn-br: rgba(230, 80, 80, .45);
}

/* ---- Своё одной строкой (руководитель) ---- */
.sg-me {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px;
  padding: 11px 16px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--surface-card); box-shadow: var(--shadow); font-size: 13px;
}
.sg-me b { font-weight: 800; }
.sg-me-k { color: var(--muted); font-weight: 600; }
.sg-me button {
  margin-left: auto; padding: 6px 10px; border: 0; border-radius: 9px; background: transparent;
  color: var(--brand); font: inherit; font-weight: 750; cursor: pointer;
}
.sg-me button:hover { background: var(--surface-hover); }

/* ---- Месяц таблицей ---- */
.sg-month { padding: 4px 0 10px; overflow: hidden; }
.sg-scroll { overflow-x: auto; }
.sg-table { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.sg-col-who { width: 176px; }
.sg-col-tot { width: 46px; }
.sg-table th, .sg-table td { padding: 0; }
.sg-corner, .sg-who, .sg-grp th, .sg-cov th {
  position: sticky; left: 0; z-index: 1; background: var(--surface-card);
}
.sg-corner { padding: 10px 14px 8px; text-align: left; color: var(--muted); font-size: 11px; font-weight: 700; }
.sg-d { border-bottom: 1px solid var(--line); text-align: center; }
.sg-d button {
  display: block; width: 100%; padding: 7px 0 6px; border: 0; background: transparent;
  color: var(--text); font: inherit; cursor: pointer; border-radius: 8px 8px 0 0;
}
.sg-d b { display: block; font-size: 12.5px; font-weight: 800; line-height: 1.1; }
.sg-d small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; font-weight: 650; }
.sg-d.is-wk small { color: #b0763a; }
.sg-d button:hover { background: var(--surface-hover); }
.sg-d.is-today button { color: var(--brand); box-shadow: inset 0 -2px 0 var(--brand); }
.sg-d.is-today b { color: var(--brand); }
.sg-th-tot {
  border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10.5px; font-weight: 700;
  line-height: 1.2; text-align: center; vertical-align: bottom; padding-bottom: 7px !important;
}

.sg-grp th { padding: 12px 14px 6px; text-align: left; }
.sg-grp-in { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.sg-grp-in b {
  color: var(--center-color, var(--brand)); font-size: 11.5px; font-weight: 850;
  letter-spacing: .07em; text-transform: uppercase;
}
.sg-grp-in span { color: var(--muted); font-size: 12px; font-weight: 600; }
.sg-norm { padding: 2px 8px; border-radius: 999px; background: var(--surface-hover); }
.sg-rules-btn {
  padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-card);
  color: var(--brand); font: inherit; font-size: 11.5px; font-weight: 750; cursor: pointer;
}
.sg-rules-btn:hover { border-color: var(--brand); }

.sg-who { border-bottom: 1px solid var(--sg-row-line); }
.sg-who button {
  display: flex; align-items: center; gap: 9px; width: 100%; min-height: 40px; padding: 4px 10px 4px 14px;
  border: 0; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.sg-who button:hover b { color: var(--brand); }
.sg-who .sch-ava { width: 26px; height: 26px; flex: none; font-size: 10px; }
.sg-who span { min-width: 0; }
.sg-who b { display: block; overflow: hidden; font-size: 12.5px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.sg-who b em, .sg-day-who b em { margin-left: 4px; padding: 1px 5px; border-radius: 6px; background: var(--brand); color: #fff; font-size: 9.5px; font-style: normal; font-weight: 800; vertical-align: 1px; }
.sg-who small { display: block; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.sg-person.is-me .sg-who, .sg-person.is-me td { background-image: linear-gradient(var(--sg-today), var(--sg-today)); }

.sg-c { height: 40px; padding: 3px 1px !important; border-bottom: 1px solid var(--sg-row-line); text-align: center; }
.sg-c.is-wk, .sg-k.is-wk { background: var(--sg-wk); }
.sg-c.is-closed, .sg-k.is-closed { background: var(--sg-closed); }
.sg-c.is-today, .sg-k.is-today { box-shadow: inset 1px 0 0 color-mix(in srgb, var(--brand) 35%, transparent), inset -1px 0 0 color-mix(in srgb, var(--brand) 35%, transparent); }

.sg-t {
  position: relative; display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; max-width: 32px; height: 32px; padding: 0; border: 1px solid; border-radius: 7px;
  font: inherit; line-height: 1.05; cursor: pointer;
}
.sg-t b { font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums; }
.sg-t b + b { font-size: 10px; font-weight: 700; opacity: .85; }
.sg-t.sg-usual { background: var(--sch-usual-bg); border-color: var(--sch-usual-br); color: var(--sch-usual-ink); }
.sg-t.sg-evening { background: var(--sch-eve-bg); border-color: var(--sch-eve-br); color: var(--sch-eve-ink); }
.sg-t.sg-short { background: var(--sch-short-bg); border-color: var(--sch-short-br); color: var(--sch-short-ink); }
.sg-t.sg-duty { background: var(--sg-duty-bg); border-color: var(--sg-duty-br); color: var(--sg-duty-ink); }
.sg-t:hover, .sg-x:hover, .sg-vac:hover { filter: brightness(.96); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 30%, transparent); }
.sg-dtag, .sg-away {
  position: absolute; display: grid; place-items: center; width: 13px; height: 13px; border-radius: 50%;
  font-size: 8px; font-style: normal; font-weight: 850; line-height: 1;
}
.sg-dtag { top: -5px; right: -5px; background: #d99a00; color: #fff; }
.sg-away { bottom: -5px; left: -5px; background: var(--brand); color: #fff; }
.sg-note { position: absolute; top: 2px; left: 2px; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .55; }
.sg-x {
  display: inline-grid; place-items: center; width: 100%; max-width: 32px; height: 32px; padding: 0;
  border: 1px solid transparent; border-radius: 7px; background: transparent;
  color: color-mix(in srgb, var(--muted) 70%, transparent); font: inherit; font-size: 10px; font-weight: 800; cursor: pointer;
}
.sg-x.sg-off { font-size: 16px; }
.sg-x.sg-none { font-size: 12px; opacity: .6; }
.sg-x.sg-sick { background: var(--sch-sick-bg); border-color: var(--sch-sick-br); color: var(--sch-sick-ink); }
.sg-x.sg-other { background: var(--sch-vac-bg); border-color: var(--sch-vac-br); color: var(--sch-vac-ink); }
.sg-vac-cell { padding: 3px 2px !important; }
.sg-vac {
  display: block; width: 100%; height: 32px; overflow: hidden; padding: 0 6px; border: 1px solid var(--sch-vac-br);
  border-radius: 8px; background: var(--sch-vac-bg); color: var(--sch-vac-ink);
  font: inherit; font-size: 11px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; cursor: pointer;
}

.sg-tot { border-bottom: 1px solid var(--sg-row-line); font-size: 12.5px; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
.sg-tot-eve { color: var(--sch-eve-ink); }
.sg-tot-duty { color: #a07400; }
[data-theme=dark] .sg-tot-duty { color: #f0c64a; }
.sg-tot.is-warn { color: var(--sg-warn-ink); background: var(--sg-warn-bg); box-shadow: inset 0 0 0 1px var(--sg-warn-br); border-radius: 8px; }

.sg-cov th { padding: 5px 14px; color: var(--muted); font-size: 11px; font-weight: 700; text-align: left; }
.sg-k { padding: 4px 0 !important; color: color-mix(in srgb, var(--text) 80%, transparent); font-size: 11.5px; font-weight: 800; text-align: center; }
.sg-cov-eve .sg-k, .sg-cov-eve th { padding-bottom: 8px !important; }
.sg-ev {
  display: inline-block; min-width: 20px; padding: 2px 0; border-radius: 6px; background: var(--sch-eve-bg);
  color: var(--sch-eve-ink); font-size: 11px; font-style: normal; font-weight: 800; text-align: center;
}
.sg-ev.is-warn { background: var(--sg-warn-bg); color: var(--sg-warn-ink); box-shadow: 0 0 0 1px var(--sg-warn-br); }

.sg-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 12px 16px 2px; color: var(--muted); font-size: 11.5px; }
.sg-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sg-legend .sg-demo { width: 24px; height: 28px; cursor: default; }
.sg-sw { display: inline-block; width: 14px; height: 14px; border: 1px solid; border-radius: 4px; }
.sg-sw.sg-evening { background: var(--sch-eve-bg); border-color: var(--sch-eve-br); }
.sg-sw.sg-short { background: var(--sch-short-bg); border-color: var(--sch-short-br); }
.sg-sw.sg-duty { background: var(--sg-duty-bg); border-color: var(--sg-duty-br); }
.sg-sw.sg-vacation { background: var(--sch-vac-bg); border-color: var(--sch-vac-br); }
.sg-dot { color: var(--muted); font-size: 16px; line-height: 1; }
.sg-legend-hint { flex-basis: 100%; }
/* Подсказку под своим месяцем прятали на компьютере: нажатие на день там
   ничего не показывало. Теперь день открывается карточкой. */
@media (min-width: 721px) { .sch-mine-month .sch-cal-hint { display: block; } }
.sg-print-title { display: none; }

/* ---- Панель инструментов: Excel и печать ---- */
.sg-tools { display: inline-flex; gap: 6px; }
.sg-tools button { white-space: nowrap; }

/* ---- Правила центра ---- */
.sg-rules fieldset { margin: 12px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; }
.sg-rules legend { padding: 0 6px; font-size: 12.5px; font-weight: 800; }
.sg-rules-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.sg-rules-days label { display: grid; gap: 4px; justify-items: center; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.sg-rules-days input { width: 100%; max-width: 64px; text-align: center; }
.sg-rules fieldset small, .sg-rules .checkline small { display: block; color: var(--muted); font-size: 11.5px; font-weight: 500; line-height: 1.45; }
dialog .sg-rules .checkline { display: flex; align-items: flex-start; gap: 10px; }
dialog .sg-rules .checkline input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; }
dialog .sg-rules .checkline b { display: block; margin-bottom: 2px; font-size: 13px; }

/* ---- Кто работает в день ---- */
/* Окна портала — 440px без отступов, отступы есть только у форм. Карточки
   дня и клетки — не формы: ширину и отступы задаём им сами. */
dialog:has(> .sg-daycard) { width: min(560px, 100% - 30px); }
.sg-daycard, .sg-cellcard { padding: 20px 22px; }
.sg-day-head small { color: var(--muted); font-size: 11.5px; font-weight: 700; }
.sg-day-head h2 { margin: 2px 0 10px; }
.sg-day-group { padding: 10px 0 4px; border-top: 1px solid var(--line); }
.sg-day-group:first-of-type { border-top: 0; }
.sg-day-group header { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.sg-day-group header b { color: var(--center-color, var(--brand)); font-size: 11.5px; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.sg-day-group header span { color: var(--muted); font-size: 12px; font-weight: 650; }
.sg-day-group h4 { margin: 10px 0 6px; color: var(--muted); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.sg-day-group ul { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.sg-day-group li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; column-gap: 8px; row-gap: 4px; min-height: 38px; }
.sg-day-group li.is-me { border-radius: 10px; background: var(--sg-today); }
.sg-day-group ul.is-off li { min-height: 32px; opacity: .8; }
.sg-day-alert { margin: 0 0 8px; padding: 8px 10px; border-radius: 10px; background: var(--sg-warn-bg); color: var(--sg-warn-ink); font-size: 12.5px; font-weight: 750; }
.sg-day-who {
  display: flex; align-items: center; gap: 9px; flex: 1 1 auto; min-width: 0; padding: 3px 4px; border: 0;
  background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.sg-day-who .sch-ava { width: 28px; height: 28px; flex: none; }
.sg-day-who span { min-width: 0; }
.sg-day-who b { display: block; overflow: hidden; font-size: 13px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.sg-day-who small { display: block; color: var(--muted); font-size: 11px; }
.sg-pill {
  flex: none; padding: 4px 9px; border: 1px solid transparent; border-radius: 9px; font-size: 12px; font-weight: 800;
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
.sg-pill.sg-usual { background: var(--sch-usual-bg); border-color: var(--sch-usual-br); color: var(--sch-usual-ink); }
.sg-pill.sg-evening { background: var(--sch-eve-bg); border-color: var(--sch-eve-br); color: var(--sch-eve-ink); }
.sg-pill.sg-short { background: var(--sch-short-bg); border-color: var(--sch-short-br); color: var(--sch-short-ink); }
.sg-pill.sg-duty { background: var(--sg-duty-bg); border-color: var(--sg-duty-br); color: var(--sg-duty-ink); }
.sg-pill.sg-vacation { background: var(--sch-vac-bg); border-color: var(--sch-vac-br); color: var(--sch-vac-ink); }
.sg-pill.sg-sick { background: var(--sch-sick-bg); border-color: var(--sch-sick-br); color: var(--sch-sick-ink); }
.sg-pill.sg-off { background: var(--sch-off-bg); border-color: var(--sch-off-br); color: var(--sch-off-ink); }
.sg-swap {
  flex: none; padding: 5px 10px; border: 1px solid var(--brand); border-radius: 9px; background: transparent;
  color: var(--brand); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer;
}
.sg-swap:hover { background: var(--brand); color: #fff; }
.sg-daylist { padding: 14px 16px; }
.sg-daylist .sg-day-head h2 { font-size: 18px; }

/* ---- Клетка ---- */
.sg-cellcard header .sg-day-who { padding: 0; }
.sg-cellcard header .sg-day-who b { font-size: 15px; white-space: normal; }
.sg-cell-date { margin: 14px 0 6px; color: var(--muted); font-size: 12.5px; font-weight: 700; }
.sg-cell-main { margin: 0 0 8px; }
.sg-cell-main .sg-pill { display: inline-block; padding: 7px 12px; font-size: 15px; }
.sg-cell-details { margin: 0 0 10px; padding-left: 18px; color: var(--text); font-size: 13px; line-height: 1.5; }
.sg-cell-note { margin: 4px 0 10px; color: var(--muted); font-size: 12.5px; }
.sg-cell-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }

/* ---- Команда на телефоне у руководителя ---- */
.sg-tcal { gap: 2px; }
.sg-tcal .sg-tcal-on { font-size: 14px; font-weight: 850; }
.sg-tcal .sg-ev { min-width: 18px; font-size: 10.5px; }
.sg-tcal { position: relative; }
.sg-tcal.is-closed { opacity: .55; }
.sg-tcal-dot { position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--sg-warn-ink); }

/* ---- Заявки ---- */
.sg-req-page { display: grid; gap: 14px; align-content: start; }
.sg-req-head h2 { margin: 0 0 4px; font-size: 20px; }
.sg-req-head p { margin: 0; color: var(--muted); font-size: 13px; }
.sg-req-block { padding: 14px 16px; }
.sg-req-block h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 14px; }
.sg-req-block h3 b { padding: 1px 8px; border-radius: 999px; background: #f3b23a; color: #3b2a00; font-size: 12px; }
.sg-req-empty { margin: 4px 0; color: var(--muted); font-size: 13px; }
.sg-req { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.sg-req:first-of-type { border-top: 0; }
.sg-req-ico {
  display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 10px;
  background: var(--surface-hover); color: var(--brand); font-size: 16px; font-style: normal; font-weight: 800;
}
.sg-req-main { display: grid; gap: 5px; flex: 1 1 auto; min-width: 0; }
.sg-req-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.sg-req-top b { font-size: 13.5px; }
.sg-req-when { color: var(--muted); font-size: 12.5px; font-weight: 650; }
.sg-req-status { margin-left: auto; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 800; white-space: nowrap; }
.sg-req-status.is-wait { background: #fff1d6; color: #8a5a00; }
.sg-req-status.is-ok { background: var(--sch-usual-bg); color: var(--sch-usual-ink); }
.sg-req-status.is-no { background: var(--sg-warn-bg); color: var(--sg-warn-ink); }
.sg-req-status.is-off { background: var(--sch-off-bg); color: var(--sch-off-ink); }
[data-theme=dark] .sg-req-status.is-wait { background: rgba(243, 178, 58, .2); color: #f3c46a; }
.sg-req-swap { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; }
.sg-req-swap span { display: inline-flex; align-items: baseline; gap: 6px; }
.sg-req-swap em { color: var(--muted); font-style: normal; font-variant-numeric: tabular-nums; }
.sg-req-swap i { color: var(--brand); font-style: normal; font-weight: 800; }
.sg-req-who { margin: 0; font-size: 13px; }
.sg-req-comment { margin: 0; padding: 6px 10px; border-radius: 10px; background: var(--surface-hover); color: var(--text); font-size: 12.5px; }
.sg-req .exchange-actions, .sg-req .schedule-request-actions { margin-top: 4px; }
.sg-req-more {
  margin-top: 8px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-card);
  color: var(--brand); font: inherit; font-size: 12.5px; font-weight: 750; cursor: pointer;
}

@media (max-width: 720px) {
  .sg-me { gap: 4px 10px; padding: 10px 12px; font-size: 12.5px; }
  .sg-me button { margin-left: 0; padding-left: 0; }
  .sg-rules-days { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sg-day-group li { grid-template-columns: minmax(0, 1fr) auto; }
  .sg-day-group li .sg-swap { grid-column: 2; justify-self: end; }
  .sg-req-status { margin-left: 0; }
}

/* ---- Неделя таблицей (v426): клетка шире, время целиком ---- */
.sg-week .sg-c.sg-cw { height: 50px; padding: 4px 3px !important; }
.sg-dw button { padding: 8px 0 7px; }
.sg-dw small { font-size: 11px; }
.sg-w {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  width: 100%; min-height: 40px; padding: 4px 6px; border: 1px solid; border-radius: 9px;
  font: inherit; font-size: 12.5px; font-weight: 800; line-height: 1.15; cursor: pointer; font-variant-numeric: tabular-nums;
}
.sg-w small { font-size: 10.5px; font-weight: 700; opacity: .85; }
.sg-w.sg-usual { background: var(--sch-usual-bg); border-color: var(--sch-usual-br); color: var(--sch-usual-ink); }
.sg-w.sg-evening { background: var(--sch-eve-bg); border-color: var(--sch-eve-br); color: var(--sch-eve-ink); }
.sg-w.sg-short { background: var(--sch-short-bg); border-color: var(--sch-short-br); color: var(--sch-short-ink); }
.sg-w.sg-duty { background: var(--sg-duty-bg); border-color: var(--sg-duty-br); color: var(--sg-duty-ink); }
.sg-w.sg-off { border-color: transparent; background: transparent; color: var(--muted); font-size: 12px; font-weight: 650; }
.sg-w.sg-none { border-style: dashed; border-color: var(--line); background: transparent; color: var(--muted); font-size: 11.5px; font-weight: 600; }
.sg-w.sg-sick { background: var(--sch-sick-bg); border-color: var(--sch-sick-br); color: var(--sch-sick-ink); }
.sg-w.sg-other { background: var(--sch-vac-bg); border-color: var(--sch-vac-br); color: var(--sch-vac-ink); }
.sg-w:hover { box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 30%, transparent); }
.sg-vac.sg-vac-w { height: 40px; font-size: 12px; }
.sg-legend .sg-demo-w { display: inline-flex; width: auto; min-height: 26px; padding: 2px 8px; font-size: 11.5px; cursor: default; }

/* Метка «вы» остаётся видна: многоточием сокращается фамилия. */
.sg-who b, .sg-day-who b { display: flex; align-items: center; gap: 4px; }
.sg-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-who b em, .sg-day-who b em { flex: none; margin-left: 0; }

/* Своя неделя: день нажимается — на телефоне список ниже, на компьютере карточка. */
button.sch-daycard { width: 100%; font: inherit; color: inherit; cursor: pointer; }
button.sch-daycard:hover { border-color: var(--brand); }
.sch-daycard.is-selected { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }

/* Телефон руководителя: семь дней полосой. */
.sg-wp-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.sg-wp-day {
  position: relative; display: grid; justify-items: center; gap: 2px; padding: 8px 2px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface-card);
  color: var(--text); font: inherit; cursor: pointer;
}
.sg-wp-day small { color: var(--muted); font-size: 10.5px; font-weight: 750; }
.sg-wp-day b { font-size: 15px; font-weight: 850; }
.sg-wp-day .sg-tcal-on { font-size: 13px; font-weight: 850; }
.sg-wp-day .sg-ev { min-width: 18px; font-size: 10.5px; }
.sg-wp-day.is-today b { color: var(--brand); }
.sg-wp-day.is-selected { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.sg-wp-day.is-closed { opacity: .55; }

/* ---- Печать: месяц таблицей на А4 альбомом ---- */
@media print {
  @page { size: A4 landscape; margin: 8mm; }
  html, body { background: #fff !important; }
  .sidebar, header.top, .bottom-nav, .nav-scrim, #toast, dialog,
  .schedule-section-tabs, .sch-controls-wide, .sch-controls-narrow, .sg-me, .sch-mine,
  .sch-only-narrow, .sg-legend-hint, .sg-rules-btn, .ui-load-notice { display: none !important; }
  .shell, .main, main.content, .sch-board { display: block !important; margin: 0 !important; padding: 0 !important; max-width: none !important; }
  .sch-only-wide { display: block !important; }
  .sg-month {
    --sch-usual-bg: #e6f7ef; --sch-usual-br: #9fd8bf; --sch-usual-ink: #0f5c3f;
    --sch-eve-bg: #dbe9fb; --sch-eve-br: #a9c8f0; --sch-eve-ink: #134f8f;
    --sch-short-bg: #fbf0d4; --sch-short-br: #e8cf8f; --sch-short-ink: #6f510e;
    --sch-vac-bg: #ebe4fb; --sch-vac-br: #c9b8f0; --sch-vac-ink: #4d3499;
    --sch-sick-bg: #fbe3e8; --sch-sick-br: #eeb9c4; --sch-sick-ink: #9e2f41;
    --sg-duty-bg: #fff176; --sg-duty-br: #d8b21f; --sg-duty-ink: #3f2d00;
    --sg-wk: #f6f6f6; --sg-closed: #ececec; --sg-today: transparent;
    --surface-card: #fff; --surface-hover: #f1f3f6; --text: #111; --muted: #555; --line: #c9ced6;
    border: 0 !important; box-shadow: none !important; padding: 0 !important; background: #fff !important; color: #111;
  }
  .sg-scroll { overflow: visible !important; }
  .sg-corner, .sg-who, .sg-grp th, .sg-cov th { position: static; }
  .sg-table { min-width: 0 !important; width: 100% !important; }
  .sg-col-who { width: 150px; }
  .sg-col-tot { width: 38px; }
  .sg-print-title { display: block; margin: 0 0 6px; color: #000; font: 800 14px/1.3 Manrope, Arial, sans-serif; }
  .sg-c { height: 30px; }
  .sg-t, .sg-x, .sg-vac { height: 26px; }
  .sg-who button { min-height: 30px; }
  .sg-who .sch-ava { display: none; }
  .sg-t, .sg-x, .sg-vac, .sg-ev, .sg-tot, .sg-c, .sg-k, .sg-dtag, .sg-away, .sg-sw {
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .sg-person, .sg-cov { break-inside: avoid; }
}
