:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --line: #dfe3e8;
  --line-strong: #9aa4b0;
  --text: #1f2937;
  --muted: #6b7280;
  --primary: #1f4e79;
  --primary-soft: #e8f0f7;
  --danger: #c0392b;
  --warn: #b7791f;
  --ok: #2e7d32;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "IBM Plex Sans", "Segoe UI", Roboto, Arial, sans-serif;
  font-feature-settings: "kern" 1;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
}

.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
code { background: #eef1f4; padding: 1px 4px; border-radius: 4px; font-size: 12px; }

/* ---------------- вход ---------------- */
.auth-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(140deg, #1f4e79 0%, #2e7d8a 100%); padding: 24px;
}
.auth-card {
  background: #fff; border-radius: 12px; padding: 28px 30px; width: 100%; max-width: 380px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
}
.auth-card h1 { margin: 0 0 6px; font-size: 20px; }
.auth-card form { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.auth-card label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: #374151; }
.auth-card input { padding: 9px 11px; border: 1px solid var(--line); border-radius: 6px; font-size: 14px; }
.auth-card input:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }

/* ---------------- шапка ---------------- */
.topbar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: #fff; border-bottom: 1px solid var(--line);
  padding: 9px 18px; position: sticky; top: 0; z-index: 40; box-shadow: var(--shadow);
}
.topbar-left { display: flex; align-items: center; gap: 8px; }
.logo { font-size: 18px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tab {
  border: 1px solid transparent; background: transparent; padding: 6px 12px;
  border-radius: 6px; cursor: pointer; font-size: 13px; color: var(--muted);
}
.tab:hover { background: #eef1f4; color: var(--text); }
.tab.active { background: var(--primary); color: #fff; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.badge {
  font-size: 11px; padding: 2px 8px; border-radius: 10px;
  background: var(--primary-soft); color: var(--primary); font-weight: 600;
}
.badge.role-admin { background: #fdeaea; color: var(--danger); }
.badge.role-editor { background: #e8f5e9; color: var(--ok); }

main { padding: 16px 18px 60px; }
.view { display: flex; flex-direction: column; gap: 14px; }

.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow);
}
.panel h2 { margin: 0 0 10px; font-size: 16px; }
.panel h3 { margin: 14px 0 8px; font-size: 14px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
@media (max-width: 1100px) { .split { grid-template-columns: 1fr; } }

/* ---------------- кнопки, поля ---------------- */
.btn {
  border: 1px solid var(--line); background: #fff; padding: 6px 12px; border-radius: 6px;
  cursor: pointer; font-size: 13px; color: var(--text);
}
.btn:hover:not(:disabled) { background: #f0f2f5; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: #17395a; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn-ghost:hover { background: #eef1f4; }
.btn-danger { border-color: #f0c8c4; color: var(--danger); }
.btn-danger:hover { background: #fdeaea; }
input[type=text], input[type=password], input[type=search], input[type=date],
input[type=number], select, textarea {
  padding: 6px 9px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px;
  font-family: inherit; background: #fff; color: var(--text);
}
input:focus, select:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
label.inline { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #374151; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 8px 0; }
.toolbar-group { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #4b5563; }
.form-grid .wide { grid-column: 1 / -1; }

/* ---------------- следующее служение ---------------- */
.next-card {
  background: linear-gradient(120deg, #1f4e79, #2b6c8f); color: #fff;
  border-radius: var(--radius); padding: 14px 18px; box-shadow: var(--shadow);
}
.next-card h2 { margin: 0 0 2px; font-size: 14px; font-weight: 500; opacity: .85; }
.next-card .date { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.next-grid { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.next-item { font-size: 13px; }
.next-item .label { opacity: .75; display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; }
.next-item .value { font-weight: 600; }
.next-item.empty .value { opacity: .5; font-weight: 400; }

/* ---------------- легенда ---------------- */
.legend { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.legend-item {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px;
  border: 1px solid var(--line); border-radius: 20px; padding: 3px 10px 3px 4px; background: #fff;
}
.legend-swatch { width: 15px; height: 15px; border-radius: 50%; border: 1px solid rgba(0,0,0,.18); }

/* ---------------- таблица графика ---------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table.schedule { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; table-layout: fixed; font-size: 13px; }
table.schedule col { width: 138px; }
.schedule-wrap { max-height: calc(100vh - 310px); min-height: 330px; overflow: auto; overscroll-behavior: contain; }
table.schedule th, table.schedule td {
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 4px 7px; vertical-align: middle; text-align: center; min-width: 0; line-height: 1.2;
}
table.schedule thead th {
  background: #f2f4f7; font-size: 11px; font-weight: 600; color: #374151; line-height: 1.15;
  position: sticky; top: 0; z-index: 30; white-space: nowrap;
}
table.schedule thead tr.group-row th { top: 0; z-index: 32; height: 30px; padding-top: 3px; padding-bottom: 3px; }
table.schedule thead tr.role-row th { top: 30px; z-index: 31; height: 30px; padding-top: 3px; padding-bottom: 3px; }
table.schedule thead th[data-width-key] { position: sticky; }
table.schedule th { position: relative; }
table.schedule th.grp { font-size: 11px; letter-spacing: .3px; text-transform: uppercase; }
th.grp-lead, td.col-lead { border-right: 2px solid var(--line-strong) !important; }
th.grp-preach, td.col-preach { border-right: 2px solid var(--line-strong) !important; }
th.grp-music, td.col-music { border-right: 2px solid var(--line-strong) !important; }
th.grp-vsh, td.col-vsh { border-right: 2px solid var(--line-strong) !important; }
table.schedule tbody tr:last-child td { border-bottom: none; }
table.schedule td.date-cell, table.schedule th.date-col {
  position: sticky; left: 0; background: #fff; z-index: 20; text-align: left;
  width: var(--date-col-width, 168px); min-width: var(--date-col-width, 168px); max-width: var(--date-col-width, 168px);
  border-right: 2px solid var(--line-strong) !important;
}
table.schedule td.topic-cell, table.schedule th.topic-col {
  position: sticky; left: var(--date-col-width, 168px); background: #fff; z-index: 19; text-align: left;
  width: var(--topic-col-width, 200px); min-width: var(--topic-col-width, 200px); max-width: var(--topic-col-width, 200px);
  white-space: normal; overflow-wrap: anywhere;
  border-right: 2px solid var(--line-strong) !important;
}
table.schedule thead th.date-col, table.schedule thead th.topic-col {
  z-index: 60 !important; background: #f2f4f7; top: 0;
}
table.schedule thead th.grp { z-index: 32; }
table.schedule .admin-edit { cursor: pointer; }
table.schedule .admin-edit:hover { box-shadow: inset 0 0 0 2px var(--primary-soft); }
.col-resize-handle {
  position: absolute; top: 0; right: -3px; bottom: 0; width: 7px; z-index: 90;
  cursor: col-resize; touch-action: none; background: transparent;
}
.col-resize-handle:hover { background: rgba(31, 78, 121, .25); }
.resizing-columns, .resizing-columns * { cursor: col-resize !important; user-select: none !important; }
.date-main { font-weight: 600; }
.date-sub { font-size: 11px; color: var(--muted); }
tr.row-active td { background: #fffbe8; }
tr.row-active td.date-cell, tr.row-active td.topic-cell { background: #fff6d6; }
tr.row-next td { background: #eaf5ff; }
tr.row-next td.date-cell, tr.row-next td.topic-cell { background: #d8ecff; }
tr.row-past td { color: #6b7280; background: #fbfbfc; }
tr.row-past td.date-cell, tr.row-past td.topic-cell { background: #f7f8f9; }
tr.row-special td.date-cell, tr.row-special td.topic-cell { font-style: italic; }
.row-label { font-size: 10px; color: var(--muted); display: block; }

td.action-cell { white-space: nowrap; }
td.slot { cursor: pointer; position: relative; overflow-wrap: anywhere; }
td.slot:hover { background: #eef6ff !important; outline: 2px solid var(--primary-soft); outline-offset: -2px; }
td.slot.readonly { cursor: default; }
td.slot.readonly:hover { outline: none; }
.cell-person { display: block; font-weight: 600; line-height: 1.35; }
.cell-person + .cell-person { margin-top: 2px; }
.cell-empty { color: #c3c9d1; }
.cell-free { color: var(--muted); font-style: italic; font-weight: 400; }
.cell-flags { position: absolute; top: 1px; right: 2px; font-size: 10px; }
.missing-people { color: var(--warn); font-size: 11px; }

/* ---------------- настройки колонок и цветовые поля ---------------- */
.group-title-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; margin-bottom: 14px; }
.group-title-grid label, .family-editor-body > label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #4b5563; }
#schedule-columns-table input[type="text"] { min-width: 120px; width: 100%; }
#schedule-columns-table select { min-width: 130px; }
#schedule-columns-table input[type="checkbox"] { width: 17px; height: 17px; }
.family-modal-card { max-width: 560px; }
.family-editor-body { padding: 14px 16px; overflow: auto; display: flex; flex-direction: column; gap: 12px; }
.family-editor-body input[type="text"] { width: 100%; }
.color-input-row { display: flex; align-items: center; gap: 10px; }
.color-input-row select { min-width: 0; flex: 1; }
.family-color-preview { display: inline-block; width: 22px; height: 22px; border: 1px solid rgba(0,0,0,.18); border-radius: 5px; flex: 0 0 22px; }
input[type="color"] { width: 50px; height: 36px; border: 1px solid var(--line); border-radius: 6px; padding: 3px; background: #fff; cursor: pointer; }
.family-member-heading { font-size: 12px; font-weight: 600; color: #374151; }
.family-members-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; max-height: 230px; overflow: auto; }
.family-member-option { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); padding: 6px 8px; border-radius: 6px; font-size: 12px; }
.family-member-option:has(input:checked) { background: #eef6ff; border-color: #9fc5e8; }
.family-member-option .swatch { flex: 0 0 auto; margin: 0; }

/* ---------------- обычные таблицы ---------------- */
table.grid { border-collapse: collapse; width: 100%; font-size: 13px; }
table.grid th, table.grid td { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; }
table.grid th { background: #f2f4f7; font-size: 12px; font-weight: 600; position: sticky; top: 0; }
table.grid tr:hover td { background: #fafbfc; }
table.grid td.num { text-align: right; font-variant-numeric: tabular-nums; }
.chip { display: inline-block; padding: 1px 7px; border-radius: 10px; font-size: 11px;
        background: #eef1f4; color: #374151; margin: 1px 3px 1px 0; }
.chip.role { background: var(--primary-soft); color: var(--primary); }
.chip.pool { background: #fff3d6; color: #7a5300; border: 1px solid #f0dfae;
             display: inline-flex; align-items: center; gap: 4px; padding-right: 4px; }
.chip-x { border: none; background: transparent; cursor: pointer; color: #a1761f;
          font-size: 11px; line-height: 1; padding: 0 2px; }
.chip-x:hover { color: var(--danger); }
.pool-add { margin-top: 8px; }
.pool-add select { width: 100%; }
.pool-group { margin-bottom: 14px; }
.pool-group-title { font-size: 12px; font-weight: 700; text-transform: uppercase;
                    letter-spacing: .5px; color: var(--muted); margin: 10px 0 6px; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px;
          border: 1px solid rgba(0,0,0,.18); vertical-align: -1px; margin-right: 6px; }
.name-colored { font-weight: 600; }

/* ---------------- прочее ---------------- */
.alert { padding: 8px 12px; border-radius: 6px; font-size: 13px; margin: 8px 0; }
.alert-error { background: #fdeaea; color: #8c1d13; border: 1px solid #f0c8c4; }
.alert-warn { background: #fff8e6; color: #7a5300; border: 1px solid #f0dfae; }
.alert-ok { background: #e8f5e9; color: #1b5e20; border: 1px solid #b9dfbc; }
.alert ul { margin: 6px 0 0; padding-left: 18px; }

.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.stat-card .k { font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.stat-card .v { font-size: 22px; font-weight: 700; }

.families-list { display: flex; flex-direction: column; gap: 8px; max-height: 520px; overflow-y: auto; }
.family-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; background: #fff; }
.family-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.family-name { font-weight: 600; flex: 1; }

.conflicts-bar { display: flex; flex-direction: column; gap: 6px; }
.conflict-item { font-size: 12px; padding: 6px 10px; border-radius: 6px; border: 1px solid; }
.conflict-item.error { background: #fdeaea; border-color: #f0c8c4; color: #8c1d13; }
.conflict-item.warning { background: #fff8e6; border-color: #f0dfae; color: #7a5300; }
.diagnostic-counts { display: grid; grid-template-columns: repeat(2, minmax(120px, 1fr)); gap: 8px; margin-bottom: 10px; }
.diagnostic-count { display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: #fff; }
.diagnostic-count b { font-size: 20px; }
.diagnostic-count.error { border-color: #f0c8c4; color: #8c1d13; }
.diagnostic-count.warning { border-color: #f0dfae; color: #7a5300; }
.conflict-list { display: flex; flex-direction: column; gap: 6px; }

/* ---------------- модальное окно ---------------- */
.modal { position: fixed; inset: 0; background: rgba(16, 24, 40, .45); display: flex;
         align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal-card { background: #fff; border-radius: 10px; width: 100%; max-width: 520px;
              max-height: 88vh; display: flex; flex-direction: column; overflow: hidden;
              box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal-card header { display: flex; align-items: center; justify-content: space-between;
                     padding: 12px 16px; border-bottom: 1px solid var(--line); }
.modal-card header h3 { margin: 0; font-size: 15px; }
.modal-card > input[type=search] { margin: 10px 16px 0; }
.picker-list { overflow-y: auto; padding: 8px 8px 12px; flex: 1; }
.picker-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px;
              border-radius: 6px; cursor: pointer; }
.picker-row:hover { background: var(--primary-soft); }
.picker-row .pname { font-weight: 600; flex: 1; }
.picker-row .pmeta { font-size: 11px; color: var(--muted); text-align: right; }
.picker-row.blocked { opacity: .55; cursor: not-allowed; }
.picker-row.blocked:hover { background: #fdeaea; }
.modal-card footer { display: flex; gap: 8px; justify-content: flex-end;
                     padding: 10px 16px; border-top: 1px solid var(--line); background: #fafbfc; }
.swap-box { margin: 0 16px 10px; padding: 10px; background: #f0f7ff;
            border: 1px solid #cfe4f7; border-radius: 6px; font-size: 12px; }
.swap-box h4 { margin: 0 0 6px; font-size: 12px; }
.swap-item { padding: 5px 0; border-top: 1px solid #dbeafe; display: flex; gap: 8px; align-items: center; }
.swap-item:first-of-type { border-top: none; }
.swap-actions { margin-left: auto; }

/* ---------------- уведомления ---------------- */
.toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column;
          gap: 8px; z-index: 200; max-width: 380px; }
.toast { background: #1f2937; color: #fff; padding: 10px 14px; border-radius: 8px;
         font-size: 13px; box-shadow: 0 8px 24px rgba(0,0,0,.25); animation: slidein .18s ease-out; }
.toast.ok { background: #1b5e20; }
.toast.error { background: #8c1d13; }
.toast.warn { background: #7a5300; }
@keyframes slidein { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }

@media (max-width: 700px) {
  .schedule-wrap { max-height: calc(100vh - 260px); min-height: 250px; }
  .family-members-editor { grid-template-columns: 1fr; }
  #schedule-columns-table input[type="text"] { min-width: 100px; }
}

@media print {
  .topbar, .toolbar, .toasts, .conflicts-bar, .legend { display: none !important; }
  body { background: #fff; }
  table.schedule th, table.schedule td { font-size: 10px; }
}

/* Фиксированные заголовки, редактор всех полей служения и управление колонками */
.fixed-title-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; margin: 0 0 14px; }
.fixed-title-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #4b5563; }
.service-modal-card { max-width: 560px; }
.service-modal-card .inline-check { display: flex; flex-direction: row; align-items: center; gap: 8px; }
.service-modal-card textarea { width: 100%; resize: vertical; }
#schedule-columns-table td:last-child { white-space: nowrap; }

.person-color-modal-card { max-width: 520px; }
#person-color-name { font-weight: 600; font-size: 14px; }

/* ---------------- музыкальные группы ---------------- */
.music-groups-panel { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.music-groups-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.music-groups-heading h2 { margin-top: 0; margin-bottom: 4px; }
.music-groups-heading p { max-width: 820px; margin-top: 0; }
.music-groups-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.music-group-card { border: 1px solid var(--line); background: #fff; border-radius: var(--radius); padding: 12px; min-width: 0; }
.music-group-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.music-group-card-head > div { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.music-group-member-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.music-group-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 8px; }
.music-group-modal-card { max-width: 620px; }
.music-group-members-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; max-height: 320px; overflow-y: auto; border: 1px solid var(--line); border-radius: 7px; padding: 8px; }
.music-group-member-option { display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; font-size: 12px; min-width: 0; }
.music-group-member-option:has(input:checked) { background: #eef6ff; border-color: #9fc5e8; }
.music-group-member-option .swatch { flex: 0 0 auto; margin: 0; }
.picker-music-groups { margin: 10px 16px; padding: 10px; border: 1px solid #cfe4f7; background: #f0f7ff; border-radius: 7px; }
.picker-music-groups label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; margin-bottom: 8px; }
.picker-music-groups select { width: 100%; }
.picker-music-groups p { margin: 7px 0 0; }
.cell-person { position: relative; padding-right: 16px; }
.person-remove { position: absolute; right: -1px; top: 0; border: 0; padding: 0 2px; background: transparent; color: #8b949e; cursor: pointer; font-size: 13px; line-height: 1.25; border-radius: 3px; }
.person-remove:hover { color: #b42318; background: #fdeaea; }
@media (max-width: 700px) {
  .music-group-members-editor { grid-template-columns: 1fr; }
  .music-groups-heading { align-items: stretch; }
  .music-groups-heading .btn { align-self: flex-start; }
}

.conflicts-pagination { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 12px 0 2px; }

/* ---------------- Назидания и уведомления ---------------- */
.topbar-left strong {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .005em;
}
.topbar .badge {
  font-weight: 500;
  letter-spacing: .01em;
}
.reading-toolbar { align-items: flex-start; gap: 12px; }
.reading-toolbar h2 { margin-bottom: 4px; }
.reading-toolbar p { margin: 0; max-width: 800px; }
.readings-table { min-width: 650px; }
.readings-table th:first-child, .readings-table td:first-child { width: 132px; white-space: nowrap; }
.readings-table th:last-child, .readings-table td:last-child { width: 220px; }
.readings-table td { vertical-align: middle; }
.readings-table .reading-text { min-width: 240px; line-height: 1.55; }
.readings-table .reading-text a { color: var(--primary); text-decoration: underline; text-decoration-color: #b5c7dd; text-underline-offset: 2px; }
.readings-table .reading-text a:hover { text-decoration-color: currentColor; }
.reading-person-select { width: 100%; min-width: 160px; padding: 6px 8px; font-size: 13px; }
.reading-date { font-variant-numeric: tabular-nums; }
.reading-edit { margin-left: 6px; padding: 2px 5px; min-height: 23px; font-size: 12px; }
.pagination-bar { display: flex; align-items: center; justify-content: center; gap: 12px; padding-top: 14px; }
.btn-small { padding: 2px 6px; font-size: 12px; }
.notify-channel { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fafbfc; }
.notify-channel p { margin: 3px 0 0; }
.notify-help { padding-left: 22px; line-height: 1.65; }
.notification-link { display: inline-block; margin: 4px 0; font-weight: 500; }
.status-ok { color: var(--ok); font-weight: 500; }
.status-error { color: var(--danger); font-weight: 500; }
.check-label { display: flex !important; flex-direction: row !important; align-items: center; gap: 8px !important; }
.check-label input { width: auto; }
@media (max-width: 720px) {
  .notify-channel { align-items: flex-start; flex-direction: column; }
  .readings-table { min-width: 580px; }
  .reading-toolbar { flex-direction: column; align-items: stretch; }
}


/* Компактная таблица чтения с индивидуальной настройкой ширины у каждого пользователя. */
#readings-table.readings-table { width: max-content !important; min-width: 0; table-layout: fixed; }
#readings-table.readings-table th, #readings-table.readings-table td { overflow-wrap: anywhere; vertical-align: top; }
#readings-table.readings-table th { position: sticky; top: 0; z-index: 2; }
#readings-table .reading-date { white-space: nowrap; }
#readings-table .reading-text { line-height: 1.4; }
#readings-table .reading-person-select { min-width: 0; max-width: 100%; width: 100%; }
.notification-inactive { opacity: .55; }
.notify-master { font-size: 15px; font-weight: 650; }
#notify-settings-form input:disabled, #notify-settings-form select:disabled { opacity: .6; cursor: not-allowed; }
#import-xlsx-file { max-width: 100%; }
.col-resize-handle { cursor: col-resize; }
