/* Оперативный дашборд: структура как у прода, без «матрёшки» рамок */

.dash-draft-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 8px 20px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.dash-draft-section-head {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px 14px;
  margin-bottom: 8px;
  min-width: 0;
}

.dash-draft-section-title {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent, #d81818);
  flex-shrink: 0;
}

.dash-draft-period {
  border-left: none;
  padding-left: 0;
  flex-shrink: 0;
  margin-left: auto;
}

.dash-period-short {
  display: none;
}

/* Дни — отдельные блоки с зазором, без общей «коробки» */
.dash-draft-days {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
}

.dash-draft-day {
  background: #f8fafc;
  border: none;
  border-radius: 12px;
  box-shadow: none;
  overflow: hidden;
}

.dash-draft-day--today {
  position: relative;
  border: none;
  border-radius: 12px;
  background: #f8fafc;
  box-shadow: none;
  overflow: hidden;
}

.dash-draft-day--today::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #93c5fd;
  border-radius: 0;
  pointer-events: none;
}

.dash-draft-day--yesterday {
  box-shadow: none;
  background: transparent;
}

.dash-draft-day-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text, #1f2937);
  background: transparent;
  border-bottom: 1px solid #eef2f7;
}

.dash-draft-day--today .dash-draft-day-head,
.dash-draft-day-head--today {
  background: rgba(147, 197, 253, 0.18);
  border-bottom-color: rgba(147, 197, 253, 0.45);
  color: #1f2937;
}

.dash-draft-day-head--muted {
  color: #94a3b8;
  background: #fafafa;
  border-bottom: 1px solid #f3f4f6;
}

.dash-draft-day-head-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.dash-draft-day-head-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto;
}

.dash-draft-yesterday-link {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  line-height: 1.3;
  cursor: pointer;
  padding: 2px 0;
  white-space: nowrap;
}

.dash-draft-yesterday-link:hover {
  color: #334155;
  text-decoration: underline;
}

.dash-draft-yesterday-link-short {
  display: none;
}

.dash-draft-risk-ok-short {
  display: none;
}

.dash-draft-day-date {
  font-weight: 700;
}

.dash-draft-yesterday-panel {
  margin: 10px 12px 0;
}

.dash-draft-yesterday-panel[hidden] {
  display: none !important;
}

.dash-draft-yesterday-panel-inner {
  padding: 14px;
  background: #f8fafc;
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 16px;
  animation: dash-yesterday-in 0.2s ease;
}

@keyframes dash-yesterday-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dash-draft-yesterday-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.dash-draft-yesterday-panel-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.dash-draft-yesterday-collapse {
  border: none;
  background: transparent;
  padding: 2px 4px;
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  color: #94a3b8;
  cursor: pointer;
  white-space: nowrap;
}

.dash-draft-yesterday-collapse:hover {
  color: #475569;
}

.dash-draft-yesterday-panel .dash-draft-day-grid {
  padding: 0;
  gap: 10px;
}

.dash-draft-yesterday-panel .dash-draft-dept {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(226, 232, 240, 0.65);
  border-radius: 12px;
  box-shadow: none;
  padding: 8px 10px;
  gap: 6px;
}

.dash-draft-yesterday-panel .dash-draft-col-head {
  font-size: 10px;
}

.dash-draft-yesterday-panel .dash-draft-slot {
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 11px;
}

.dash-draft-yesterday-panel .dash-draft-slot-title {
  font-size: 10px;
}

.dash-draft-yesterday-panel .dash-draft-emp-name,
.dash-draft-yesterday-panel .dash-draft-emp-list,
.dash-draft-yesterday-panel .dash-draft-absent-names {
  font-size: 11px;
}

.dash-draft-today-badge {
  display: inline-block;
  background: #dbeafe;
  color: #1d4ed8;
  border: none;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  margin-right: 8px;
  letter-spacing: 0.4px;
}

.dash-draft-holiday {
  color: #b91c1c;
  font-size: 11px;
  font-weight: 650;
}

.dash-draft-text-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  font-size: 10px;
  font-weight: 650;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.dash-draft-text-btn:hover {
  color: var(--color-accent, #d81818);
}

/* Сетка отделов */
.dash-draft-day-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 1.1fr) minmax(0, 1.1fr) minmax(0, 1.1fr);
  gap: 12px;
  padding: 12px;
  align-items: stretch;
  width: 100%;
  box-sizing: border-box;
}

/* Отдел: белая карточка на сером дне */
.dash-draft-dept {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  min-width: 0;
  min-height: 100%;
  background: #ffffff;
  border: none;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.dash-draft-dept--absent {
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.dash-draft-col-head {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 9.5px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

/* Слоты поддержки в ряд — тянутся по высоте */
.dash-draft-slots {
  display: flex;
  gap: 8px;
  flex: 1;
  align-items: stretch;
  min-width: 0;
  min-height: 0;
}

/* Слот смены: заливка по риску, заполняет высоту колонки */
.dash-draft-slot {
  flex: 1;
  min-width: 0;
  min-height: 45px;
  padding: 6px 8px;
  font-size: 11px;
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  border: none;
  border-radius: 8px;
  box-sizing: border-box;
}

.dash-draft-slot--ok {
  background: #f0fdf4;
  color: #166534;
}

.dash-draft-slot--warn {
  background: #fef9c3;
  color: #854d0e;
}

.dash-draft-slot--crit {
  background: #fee2e2;
  color: #991b1b;
}

.dash-draft-slot--muted {
  background: #f1f5f9;
  color: #64748b;
}

.dash-draft-slot-title {
  font-weight: 600;
  font-size: 10px;
  color: #1e293b;
  opacity: 1;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-draft-emp-name {
  color: #0f172a;
  font-weight: 600;
  font-size: 11px;
  line-height: 1.4;
}

.dash-draft-status--duty {
  color: #1d4ed8 !important;
  font-weight: 700;
}

.dash-draft-status--work {
  color: #15803d !important;
  font-weight: 700;
}

.dash-draft-empty {
  opacity: 0.55;
  font-style: italic;
  font-size: 11px;
  color: #6b7280;
  text-align: center;
  margin-top: 6px;
}

/* НЕТ: плашки той же высоты, что слоты «Состав» в ряду */
.dash-draft-absent-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.dash-draft-absent-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-height: 0;
}

.dash-draft-absent-row {
  flex: 1;
  padding: 6px 8px;
  border: 1px solid rgba(254, 205, 211, 0.8);
  border-radius: 8px;
  background: #fffcfc;
  box-sizing: border-box;
}

.dash-draft-absent-body > .dash-draft-absent-row {
  flex: 1;
}

.dash-draft-absent-status {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 3px;
  color: #e11d48;
  background: #ffe4e6;
  padding: 0 4px;
  border-radius: 3px;
  line-height: 1.25;
}

.dash-draft-absent-row--rest {
  background: #fffcfc;
  border-color: rgba(254, 205, 211, 0.8);
}

.dash-draft-absent-row--rest .dash-draft-absent-status {
  color: #e11d48;
  background: #ffe4e6;
}

.dash-draft-absent-row--empty {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.dash-draft-absent-row--empty .dash-draft-absent-status {
  color: #64748b;
  background: #e2e8f0;
}

.dash-draft-absent-names {
  font-size: 11px;
  font-weight: 500;
  color: #334155;
  line-height: 1.35;
}

.dash-draft-emp-list {
  margin-top: 2px;
  line-height: 1.45;
}

/* Вчера */
.dash-draft-yesterday-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  background: #fff;
  border: none;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.dash-draft-yesterday-bar:hover {
  background: #f9fafb;
}

.dash-draft-yesterday-sep {
  font-size: 11px;
  color: #cbd5e1;
  flex-shrink: 0;
}

.dash-draft-yesterday-summary {
  font-size: 11.5px;
  color: #64748b;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.4;
}

.dash-draft-yesterday-label {
  font-weight: 700;
  color: #94a3b8;
}

.dash-draft-yesterday-action {
  font-size: 10px;
  color: #94a3b8;
  font-weight: 650;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.dash-draft-yesterday-expanded {
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

/* Риск — в одной строке с заголовком «Анализ смен» */
.dash-draft-risk {
  display: flex;
  align-items: center;
  gap: 6px 8px;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  width: auto;
  font-size: 12px;
  line-height: 1.35;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
}

.dash-draft-risk--ok {
  color: #6b7280;
  flex: 0 1 auto;
}

.dash-draft-risk-ok-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-draft-risk-mark {
  color: #16a34a;
  font-weight: 700;
  flex-shrink: 0;
}

.dash-draft-risk--bad {
  flex-direction: row;
  align-items: center;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  gap: 8px;
}

.dash-draft-risk-title {
  color: #b91c1c;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.dash-draft-risk-chips {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px 10px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding-bottom: 1px;
}

.dash-draft-risk-chip {
  background: transparent;
  border: none;
  padding: 0 2px;
  font-size: 11px;
  color: #9f1239;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
  flex-shrink: 0;
}

.dash-draft-risk-chip:hover {
  color: var(--color-accent, #d81818);
}

/* Okdesk */
.okdesk-dashboard--ops {
  border-radius: 12px;
  margin-bottom: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border: none;
}

.okdesk-dashboard--compact {
  padding: 14px 16px 16px;
}

.okdesk-dashboard--compact .okdesk-dashboard-head {
  margin-bottom: 0;
  align-items: center;
}

.okdesk-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0 0;
  cursor: pointer;
  flex-wrap: wrap;
}

.okdesk-summary--compact {
  display: block;
  width: 100%;
  cursor: default;
  padding: 0;
  margin-top: 14px;
}

.okdesk-summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  align-items: stretch;
}

.okdesk-metric-chip {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  min-height: 78px;
  padding: 14px;
  background: rgba(248, 250, 252, 0.7);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.okdesk-metric-chip:hover {
  background: rgba(241, 245, 249, 0.6);
}

.okdesk-metric-chip--alarm {
  border-color: rgba(248, 113, 113, 0.55);
  background: rgba(254, 242, 242, 0.55);
}

.okdesk-metric-chip--cta {
  text-decoration: none;
  background: rgba(239, 246, 255, 0.6);
  border-color: rgba(147, 197, 253, 0.8);
  cursor: pointer;
}

.okdesk-metric-chip--cta:hover {
  background: rgba(219, 234, 254, 0.7);
  border-color: rgba(147, 197, 253, 0.95);
}

.okdesk-metric-chip--cta:hover .okdesk-metric-chip-cta-text {
  transform: translateX(2px);
}

.okdesk-metric-chip-label {
  display: block;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
  line-height: 1.25;
  margin-bottom: 0;
}

.okdesk-metric-chip-label--cta {
  color: #2563eb;
  font-weight: 700;
}

.okdesk-metric-chip-value {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.2;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.okdesk-metric-chip-cta-text {
  display: block;
  font-size: 12px;
  font-weight: 650;
  color: #1e40af;
  line-height: 1.35;
  transition: transform 0.15s ease;
}

.okdesk-metric-value--good {
  color: #059669 !important;
  font-weight: 700;
}

.okdesk-metric-value--bad {
  color: #b91c1c !important;
  font-weight: 700;
}

@media (max-width: 1280px) {
  .okdesk-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .okdesk-metric-chip--cta {
    grid-column: span 3;
    min-height: 64px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
}

@media (max-width: 720px) {
  .okdesk-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .okdesk-metric-chip--cta {
    grid-column: span 2;
  }
}

@media (max-width: 480px) {
  .okdesk-summary-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .okdesk-metric-chip--cta {
    grid-column: auto;
    flex-direction: column;
    align-items: flex-start;
  }
}

.sla-analytics-page .sla-analytics-root {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sla-analytics-page .okdesk-dashboard--analytics {
  margin-bottom: 0;
}

.sla-filters-panel {
  margin: 0 0 18px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.sla-filters-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 12px;
}

.sla-filter-field {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.sla-filter-field > label {
  text-transform: none;
  letter-spacing: 0;
  font-size: 11px;
  font-weight: 700;
  color: #4b5563;
}

.sla-filter-field > .form-control,
.sla-filter-field > select,
.sla-filter-field > input[type="month"] {
  height: 36px;
  min-width: 148px;
  width: auto;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: rgba(248, 250, 252, 0.55);
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  padding: 0 12px;
}

.sla-filter-select {
  min-width: 200px;
}

.sla-filter-month {
  min-width: 148px;
}

.sla-period-presets {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  margin-bottom: 1px;
}

.sla-period-presets .staff-period-btn {
  height: 30px;
  border: none;
  background: transparent;
  box-shadow: none;
}

.sla-period-presets .staff-period-btn:hover {
  background: rgba(255, 255, 255, 0.55);
  color: #0f172a;
}

.sla-period-presets .staff-period-btn.active {
  background: var(--color-accent-light, #fceded);
  color: var(--color-accent, #d81818);
  border: 1px solid #f5c2c2;
  font-weight: 700;
}

.sla-filter-actions {
  margin-left: auto;
  display: flex;
  align-items: flex-end;
}

.sla-filter-apply {
  height: 36px;
  padding: 0 16px;
  border: none;
  border-radius: 12px;
  background: #2563eb;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.25);
  transition: background 0.15s ease;
}

.sla-filter-apply:hover:not(:disabled) {
  background: #1d4ed8;
}

.sla-filter-apply:disabled {
  opacity: 0.65;
  cursor: wait;
}

@media (max-width: 900px) {
  .sla-filter-actions {
    margin-left: 0;
    width: 100%;
  }

  .sla-filter-apply {
    width: 100%;
  }

  .sla-period-presets {
    width: 100%;
    flex-wrap: wrap;
  }
}

.sla-engineer-block {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #f3f4f6;
}

.sla-engineer-hint {
  margin: 4px 0 12px;
  font-size: 12px;
  color: #64748b;
}

.sla-engineer-table-wrap {
  margin-top: 0;
}

.sla-engineer-table th,
.sla-engineer-table td {
  white-space: nowrap;
}

.okdesk-summary-metrics {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 2px;
  font-size: 11.5px;
  color: var(--color-text, #1f2937);
  line-height: 1.4;
}

.okdesk-metric b {
  font-weight: 700;
}

.okdesk-metric-sep {
  color: #94a3b8;
  margin: 0 4px;
}

.okdesk-metric--alarm {
  color: #b91c1c;
}

.okdesk-summary-action {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: #6b7280;
  flex-shrink: 0;
}

.okdesk-details {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #f3f4f6;
}

.okdesk-details-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
  padding-top: 6px;
  border-top: 1px solid #f3f4f6;
}

.okdesk-details-foot .okdesk-summary-action {
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.okdesk-cache-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 650;
  font-family: inherit;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  max-width: 160px;
}

.okdesk-cache-pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.okdesk-cache-pill-text {
  overflow: hidden;
  text-overflow: ellipsis;
}

.okdesk-cache-pill--ok {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}
.okdesk-cache-pill--ok .okdesk-cache-pill-dot { background: #22c55e; }

.okdesk-cache-pill--warn {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}
.okdesk-cache-pill--warn .okdesk-cache-pill-dot { background: #eab308; }

.okdesk-cache-pill--bad {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}
.okdesk-cache-pill--bad .okdesk-cache-pill-dot { background: #ef4444; }

.okdesk-cache-pill--muted {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #64748b;
}
.okdesk-cache-pill--muted .okdesk-cache-pill-dot { background: #94a3b8; }

.okdesk-cache-modal {
  border: none;
  border-radius: 12px;
  padding: 0;
  max-width: min(440px, calc(100vw - 32px));
  background: transparent;
}
.okdesk-cache-modal::backdrop {
  background: rgba(15, 23, 42, 0.35);
}
.okdesk-cache-modal-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
  overflow: hidden;
}
.okdesk-cache-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #f3f4f6;
}
.okdesk-cache-modal-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #1f2937;
}
.okdesk-cache-modal-close {
  border: none;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: #6b7280;
  padding: 0 4px;
}
.okdesk-cache-modal-body {
  padding: 14px 16px 16px;
  font-size: 12px;
  color: #374151;
  line-height: 1.45;
}
.okdesk-cache-verdict {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 8px;
  font-weight: 650;
}
.okdesk-cache-verdict--ok {
  background: #ecfdf5;
  color: #065f46;
}
.okdesk-cache-verdict--warn {
  background: #fffbeb;
  color: #92400e;
}
.okdesk-cache-verdict--bad {
  background: #fef2f2;
  color: #991b1b;
}
.okdesk-cache-explain {
  margin: 0 0 12px;
  color: #6b7280;
  font-size: 12px;
}
.okdesk-cache-checks {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.okdesk-cache-check {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 6px 8px;
  border-radius: 8px;
  background: #f9fafb;
}
.okdesk-cache-check-mark {
  font-weight: 800;
  flex-shrink: 0;
  width: 14px;
  text-align: center;
}
.okdesk-cache-check--ok .okdesk-cache-check-mark { color: #16a34a; }
.okdesk-cache-check--warn .okdesk-cache-check-mark { color: #ca8a04; }
.okdesk-cache-check--bad .okdesk-cache-check-mark { color: #dc2626; }
.okdesk-cache-meta {
  font-size: 11px;
  color: #6b7280;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.okdesk-cache-meta b {
  color: #1f2937;
  font-weight: 650;
}

/* Events */
.dash-draft-events-empty {
  color: #94a3b8;
  font-style: italic;
  text-align: center;
  padding: 16px;
  font-size: 12px;
  background: #fff;
  border: none;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.dash-draft-events-wrap {
  margin: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border: none;
}

.dash-draft-events-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.dash-draft-events-table thead th {
  background: #f9fafb;
  color: #6b7280;
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid #f3f4f6;
}

.dash-draft-events-table tbody td {
  padding: 8px 12px;
  border-bottom: 1px solid #f3f4f6;
  color: var(--color-text, #1f2937);
  vertical-align: middle;
}

.dash-draft-events-table tbody tr:last-child td {
  border-bottom: none;
}

.dash-draft-event-type {
  display: inline-block;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #4b5563;
  background: #f3f4f6;
  border-radius: 4px;
}

.dash-draft-event-status {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

/* Сводка отсутствий — компактная плашка под Okdesk */
.dash-draft-absences {
  width: 100%;
}

.dash-draft-absences-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  background: #fffcfc;
  border: 1px solid rgba(254, 205, 211, 0.8);
  border-left: 3px solid #fda4af;
  border-radius: 8px;
  padding: 8px 16px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.dash-draft-absences-bar:hover {
  background: #fff5f5;
  border-color: rgba(253, 164, 175, 0.95);
  border-left-color: #fb7185;
}

.dash-draft-absences-text {
  flex: 1;
  min-width: 0;
  font-size: 10.5px;
  line-height: 1.4;
  color: #1f2937;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-draft-absences-part {
  white-space: nowrap;
}

.dash-draft-absences-sep {
  color: #cbd5e1;
  margin: 0 4px;
  font-weight: 400;
}

.dash-draft-absences-toggle {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: #6b7280;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0;
  white-space: nowrap;
  font-family: inherit;
  align-self: flex-end;
}

.dash-draft-absences-toggle:hover {
  background: transparent;
  color: #4b5563;
}

.dash-draft-absences-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.28s ease;
}

.dash-draft-absences.is-open .dash-draft-absences-panel {
  grid-template-rows: 1fr;
}

.dash-draft-absences-panel-inner {
  overflow: hidden;
  min-height: 0;
}

.dash-draft-absences.is-open .dash-draft-absences-panel-inner {
  padding-top: 10px;
}

.dash-draft-absences-panel-title {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent, #d81818);
}

.dash-draft-absences .dash-draft-events-wrap {
  background: #fff;
  border-radius: 8px;
}

.dashboard-ops-banner {
  margin: 12px 20px 0;
  padding: 8px 14px;
  background: #fff;
  border: 1px solid var(--color-border, #e5e7eb);
  border-left: 3px solid var(--color-accent, #d81818);
  border-radius: 12px;
  font-size: 12px;
  color: var(--color-text-secondary, #6b7280);
  line-height: 1.4;
}

.dashboard-ops-banner a {
  color: var(--color-accent, #d81818);
}

.dash-header-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.dash-mobile-menu {
  display: none;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  margin-top: 0;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  color: #1f2937;
  font-size: 16px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.dash-mobile-menu:hover {
  background: #f9fafb;
}

.dash-mobile-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(15, 23, 42, 0.4);
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
}

.dash-mobile-backdrop.is-visible {
  display: block;
}

@media (max-width: 1100px) {
  .dash-draft-day-grid {
    grid-template-columns: 1fr 1fr;
  }
  .dash-draft-dept--sup {
    grid-column: 1 / -1;
  }
}

/* —— Смартфон / узкий экран —— */
@media (max-width: 768px) {
  .dash-mobile-menu {
    display: inline-flex;
  }

  .main-content {
    width: 100% !important;
    margin-left: 0;
  }

  .content-body {
    padding: 6px 0 18px;
    overflow-x: hidden;
  }

  .main-header {
    padding: 8px 12px;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
  }

  .main-header .header-title {
    flex: 1 1 auto;
    min-width: 0;
  }

  .dash-header-row {
    align-items: center;
  }

  .main-header h1 {
    font-size: 13px;
    line-height: 1.2;
  }

  .staff-header-sub {
    display: none;
  }

  .header-status {
    width: auto;
    flex-shrink: 0;
    justify-content: flex-end;
    padding-left: 0;
    gap: 6px !important;
    font-size: 11px;
  }

  .header-status #current-user {
    max-width: 28vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .header-status #logout-btn {
    padding: 3px 6px !important;
    font-size: 10px !important;
  }

  .dashboard-ops-banner {
    display: none;
  }

  .dash-draft-page {
    padding: 6px 10px 20px;
    gap: 10px;
  }

  /* Шапка анализа смен: заголовок + компактный 7|14|30, риски ниже */
  .dash-draft-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    margin-bottom: 6px;
  }

  .dash-draft-section-title {
    flex: 0 0 auto;
    font-size: 10.5px;
    margin: 0;
  }

  .dash-draft-section-days {
    display: none;
  }

  .dash-draft-period {
    display: inline-flex;
    flex: 0 0 auto;
    width: auto;
    margin-left: auto;
    gap: 0;
    padding: 2px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
  }

  .dash-draft-period .staff-period-btn {
    flex: 0 0 auto;
    min-width: 32px;
    min-height: 28px;
    height: 28px;
    padding: 0 9px;
    font-size: 11px;
    font-weight: 700;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #6b7280;
    box-shadow: none;
  }

  .dash-draft-period .staff-period-btn + .staff-period-btn {
    margin-left: 1px;
  }

  .dash-draft-period .staff-period-btn.active,
  .dash-draft-period .staff-period-btn.active:hover {
    background: var(--color-accent-light, #fceded) !important;
    color: var(--color-accent, #d81818) !important;
    border: none !important;
  }

  .dash-period-full {
    display: none;
  }

  .dash-period-short {
    display: inline;
  }

  .dash-draft-risk {
    flex: 1 1 100%;
    order: 3;
    justify-content: flex-start;
    max-width: 100%;
    min-width: 0;
  }

  .dash-draft-risk-ok-full {
    display: none;
  }

  .dash-draft-risk-ok-short {
    display: inline;
  }

  .dash-draft-risk--bad {
    width: 100%;
  }

  .dash-draft-risk-chips {
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Отсутствия */
  .dash-draft-absences-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px 12px;
  }

  .dash-draft-absences-text {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    font-size: 11px;
    line-height: 1.45;
  }

  .dash-draft-absences-part {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dash-draft-absences-sep {
    display: block;
    height: 0;
    margin: 6px 0;
    overflow: hidden;
    border-top: 1px solid rgba(167, 139, 250, 0.35);
  }

  .dash-draft-absences-toggle {
    align-self: flex-end;
    min-height: 32px;
    padding: 0;
    text-align: right;
    border-top: none;
    display: inline-flex;
    align-items: center;
  }

  .dash-draft-events-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .dash-draft-events-table {
    min-width: 480px;
  }

  .dash-draft-events-table thead th,
  .dash-draft-events-table tbody td {
    padding: 8px 10px;
  }

  /* Okdesk */
  .okdesk-dashboard--ops {
    padding: 10px 12px !important;
  }

  .okdesk-dashboard--ops .okdesk-dashboard-head {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
  }

  .okdesk-dashboard--ops .okdesk-dashboard-head-left {
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: nowrap;
    overflow: hidden;
  }

  .okdesk-dashboard--ops .okdesk-dashboard-title {
    font-size: 12.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .okdesk-dashboard--ops .okdesk-dashboard-sub {
    display: none;
  }

  .okdesk-dashboard--ops .okdesk-dashboard-head-actions {
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 4px;
    flex-shrink: 0;
  }

  .okdesk-dashboard--ops .okdesk-refresh-btn {
    padding: 3px 7px;
    font-size: 10px;
    min-height: 28px;
  }

  .okdesk-dashboard--ops .okdesk-cache-pill {
    padding: 3px 7px;
    font-size: 10px;
    max-width: 110px;
  }

  .okdesk-summary {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .okdesk-summary-metrics {
    font-size: 11px;
    row-gap: 6px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .okdesk-dashboard--compact .okdesk-dashboard-head-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .okdesk-metric-sep {
    display: none;
  }

  .okdesk-metric {
    display: inline-block;
    margin-right: 10px;
    margin-bottom: 2px;
  }

  .okdesk-summary-action {
    align-self: flex-end;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
  }

  .okdesk-dashboard--ops .okdesk-kpi-row {
    flex-wrap: wrap;
    overflow-x: visible;
  }

  .okdesk-dashboard--ops .okdesk-kpi-card {
    flex: 1 1 100%;
    min-width: 100%;
    min-height: 0;
  }

  /* Смены */
  .dash-draft-days {
    gap: 10px;
  }

  .dash-draft-day-grid {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 8px;
  }

  .dash-draft-dept--sup {
    grid-column: auto;
  }

  .dash-draft-slots {
    flex-direction: column;
  }

  .dash-draft-day-head {
    padding: 10px 12px;
    font-size: 12px;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px 8px;
  }

  .dash-draft-day-iso {
    display: none;
  }

  .dash-draft-day-head-left {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
  }

  .dash-draft-day-head-right {
    width: auto;
    justify-content: flex-end;
    margin-left: auto;
    order: 0;
    flex-shrink: 0;
  }

  .dash-draft-yesterday-link {
    font-size: 11px;
    white-space: nowrap;
    text-align: right;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
  }

  .dash-draft-yesterday-link-full {
    display: none;
  }

  .dash-draft-yesterday-link-short {
    display: inline;
  }

  .dash-draft-yesterday-panel {
    margin: 8px 8px 0;
  }

  .dash-draft-yesterday-panel-inner {
    padding: 12px;
  }
}

@media (max-width: 420px) {
  .header-status #current-user {
    max-width: 22vw;
  }

  .dash-draft-section-title {
    font-size: 10px;
  }

  .dash-draft-today-badge {
    margin-right: 4px;
  }

  .okdesk-dashboard--ops .okdesk-refresh-btn {
    padding: 3px 5px;
  }
}

/* --- VPS backup status (header chip + modal, like personal-reports trust) --- */
.dash-backup {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
  max-width: min(220px, 42vw);
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  font-family: inherit;
  vertical-align: middle;
  border: 1px solid transparent;
  background: #f8fafc;
  color: #64748b;
}
.dash-backup-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
#dash-backup-text {
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.dash-backup--ok {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}
.dash-backup--ok .dash-backup-dot { background: #22c55e; }
.dash-backup--warn {
  background: #fffbeb;
  border-color: #f59e0b;
  color: #92400e;
}
.dash-backup--warn .dash-backup-dot { background: #f59e0b; }
.dash-backup--bad {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}
.dash-backup--bad .dash-backup-dot { background: #ef4444; }
.dash-backup--muted {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #64748b;
}
.dash-backup--muted .dash-backup-dot { background: #94a3b8; }
.dash-backup > .dash-backup-hint {
  flex-shrink: 0;
  opacity: 0.65;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: underline;
  text-underline-offset: 2px;
  margin: 0;
  padding: 0;
  align-self: center;
}

.dash-backup-modal {
  border: none;
  padding: 0;
  background: transparent;
  max-width: calc(100vw - 24px);
}
.dash-backup-modal::backdrop {
  background: rgba(15, 23, 42, 0.45);
}
.dash-backup-modal-card {
  width: min(440px, 100%);
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
  padding: 16px 18px 18px;
}
.dash-backup-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.dash-backup-modal-head h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-accent, #d81818);
}
.dash-backup-close {
  border: none;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  padding: 0 4px;
}
.dash-backup-verdict {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
}
.dash-backup-verdict--ok { background: #ecfdf5; color: #065f46; }
.dash-backup-verdict--warn { background: #fffbeb; color: #92400e; }
.dash-backup-verdict--bad { background: #fef2f2; color: #991b1b; }
.dash-backup-verdict--muted { background: #f8fafc; color: #64748b; }
.dash-backup-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
.dash-backup-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
}
.dash-backup-row--ok { border-left: 3px solid #22c55e; }
.dash-backup-row--warn { border-left: 3px solid #f59e0b; }
.dash-backup-row--bad { border-left: 3px solid #ef4444; }
.dash-backup-row--muted { border-left: 3px solid #94a3b8; }
.dash-backup-mark {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
  background: #94a3b8;
}
.dash-backup-row--ok .dash-backup-mark { background: #22c55e; }
.dash-backup-row--warn .dash-backup-mark { background: #f59e0b; }
.dash-backup-row--bad .dash-backup-mark { background: #ef4444; }
.dash-backup-row-label {
  font-size: 12px;
  font-weight: 700;
  color: #1f2937;
}
.dash-backup-row-state {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}
.dash-backup-meta {
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
}
.dash-backup-meta code {
  font-size: 11px;
  background: #f1f5f9;
  padding: 1px 4px;
  border-radius: 4px;
}
.dash-backup-err { color: #b91c1c; margin-top: 6px; }
.dash-backup-meta-hint { margin-top: 8px; opacity: 0.85; font-size: 12px; color: #64748b; }
