/**
 * Стили компонентов модуля «Проверки» (Светлая тема / Light Theme)
 */

/* ==========================================================================
   1. ИНДИКАТОР ШАГОВ МАСТЕРА (WIZARD STEPS)
   ========================================================================== */
.wizard-steps-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  background: #FFFFFF;
  padding: 16px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid #E2E8F0;
  box-shadow: var(--shadow-sm);
}

.step-badge-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text-muted);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.step-badge-item .step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: #475569;
}

.step-badge-item.active {
  color: #0F172A;
}
.step-badge-item.active .step-num {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  box-shadow: 0 4px 12px var(--color-primary-glow);
}

.step-badge-item.completed {
  color: var(--color-success);
}
.step-badge-item.completed .step-num {
  background: #ECFDF5;
  border-color: #A7F3D0;
  color: var(--color-success);
}

.step-divider {
  flex: 1;
  height: 2px;
  background: #E2E8F0;
  margin: 0 16px;
}

/* ==========================================================================
   2. ВЫБОР ТИПА ПРОВЕРКИ (TYPE CARDS)
   ========================================================================== */
.inspection-type-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 10px;
}

.type-card-option {
  cursor: pointer;
  position: relative;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.type-card-option input {
  position: absolute;
  opacity: 0;
}

.type-card-inner {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-lg);
  padding: 20px;
  height: 100%;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all 0.22s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.type-card-option:hover .type-card-inner {
  border-color: #CBD5E1;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
}

.type-card-option.selected .type-card-inner {
  border-color: var(--color-primary);
  background: #FFFFFF;
  box-shadow: 0 4px 16px rgba(228, 0, 43, 0.08), 0 0 0 1px var(--color-primary);
}

.type-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.gko-planned-icon { background: #FEF2F2; color: var(--color-primary); border: 1px solid #FEE2E2; }
.gko-unplanned-icon { background: #F5F3FF; color: #7C3AED; border: 1px solid #EDE9FE; }
.rnk-icon { background: #FFFBEB; color: #D97706; border: 1px solid #FEF3C7; }

.type-info h4 {
  font-size: 1.05rem;
  margin-bottom: 6px;
  color: #0F172A;
}
.type-info p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

/* ==========================================================================
   3. КОМПЛАЕНС-ПРОВЕРКА И ПРЕДУПРЕЖДЕНИЯ (COMPLIANCE ALERTS & GUIDELINES)
   ========================================================================== */
.compliance-alert-box {
  display: flex;
  gap: 16px;
  padding: 18px 22px;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  align-items: flex-start;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.alert-danger-glow {
  border-left: 4px solid var(--color-danger);
  background: #FFFFFF;
}
.alert-danger-glow .alert-icon-big {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: var(--radius-md);
  background: #FEF2F2;
  border: 1px solid #FEE2E2;
  display: flex;
  align-items: center;
  justify-content: center;
}
.alert-danger-glow h4 { color: #991B1B; font-weight: 700; font-size: 1rem; }
.alert-danger-glow p { color: #475569; font-size: 0.9rem; }

.alert-warning-glow {
  border-left: 4px solid #F59E0B;
  background: #FFFFFF;
}
.alert-warning-glow .alert-icon-big {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: var(--radius-md);
  background: #FFFBEB;
  border: 1px solid #FEF3C7;
  display: flex;
  align-items: center;
  justify-content: center;
}
.alert-warning-glow h4 { color: #92400E; font-weight: 700; font-size: 1rem; }
.alert-warning-glow p { color: #475569; font-size: 0.9rem; }

.alert-success-glow {
  border-left: 4px solid #10B981;
  background: #FFFFFF;
}
.alert-success-glow .alert-icon-big {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: var(--radius-md);
  background: #ECFDF5;
  border: 1px solid #D1FAE5;
  display: flex;
  align-items: center;
  justify-content: center;
}
.alert-success-glow h4 { color: #065F46; font-weight: 700; font-size: 1rem; }
.alert-success-glow p { color: #475569; font-size: 0.9rem; }

.alert-content h4 {
  font-size: 1rem;
  margin-bottom: 6px;
}
.alert-content p {
  font-size: 0.88rem;
  margin-bottom: 6px;
  line-height: 1.45;
}

/* Карточка гайдлайнов и регламентов (Guideline Card) */
.guideline-card {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 20px 22px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-left: 4px solid #F59E0B;
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.guideline-icon-box {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: var(--radius-md);
  background: #FFFBEB;
  color: #D97706;
  border: 1px solid #FEF3C7;
  display: flex;
  align-items: center;
  justify-content: center;
}

.guideline-body {
  flex: 1;
}

.guideline-header-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.guideline-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 6px;
}

.guideline-desc {
  font-size: 0.92rem;
  color: #475569;
  line-height: 1.5;
  margin-bottom: 12px;
}

.guideline-highlight-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: #1E293B;
  line-height: 1.45;
}

.guideline-highlight-box strong {
  color: #0F172A;
}

.alert-action-suggestion {
  background: #FFFFFF;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-top: 10px;
  font-size: 0.88rem;
  border-left: 3px solid var(--color-primary);
  box-shadow: var(--shadow-sm);
  color: #334155;
}

/* ==========================================================================
   4. ЧЕК-ЛИСТЫ (ГКО И РНК)
   ========================================================================== */
.checklist-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  background: #F8FAFC;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  border: 1px solid #E2E8F0;
}

.checklist-progress-box {
  width: 240px;
}
.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 6px;
  color: #475569;
}

.checklist-items-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checklist-item-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.checklist-item-card:hover {
  border-color: #CBD5E1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.checklist-item-card.is-critical {
  border-left: 4px solid var(--color-primary);
}

.checklist-item-card.item-completed {
  background: #F0FDF4;
  border-color: #BBF7D0;
}

.checklist-item-content {
  flex: 1;
}

.item-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 4px;
  color: #0F172A;
}
.item-number {
  color: var(--color-text-dim);
  font-size: 0.85rem;
}

.item-meta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}
.item-law {
  color: var(--color-primary);
  font-weight: 600;
}

/* Стили шагов РНК */
.rnk-steps-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rnk-step-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.rnk-step-card.step-completed {
  background: #F0FDF4;
  border-color: #BBF7D0;
}

.stop-gate-card {
  border: 2px solid var(--color-danger);
  background: #FEF2F2;
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.12);
  position: relative;
  overflow: hidden;
}

.rnk-step-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.step-badge {
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

.step-role {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-weight: 500;
}
.step-law {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--color-text-dim);
}

.rnk-step-body h5 {
  font-size: 1.05rem;
  margin-bottom: 8px;
  color: #0F172A;
}
.rnk-step-body p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.4;
  margin-bottom: 14px;
}

/* Калькулятор кассы */
.cash-calculator-box {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
}

.calc-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 12px;
  color: #B45309;
}

.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: 16px;
  align-items: center;
}

.calc-input {
  width: 100%;
  padding: 10px 14px;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: var(--radius-sm);
  color: #0F172A;
  font-size: 1rem;
  font-weight: 600;
}

.calc-result-box {
  background: #FFFFFF;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid #E2E8F0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.calc-diff-text {
  font-size: 0.8rem;
  line-height: 1.3;
}

/* ==========================================================================
   5. ЗАГРУЗКА МЕДИА И ФАЙЛОВ
   ========================================================================= */
.dropzone-box {
  border: 2px dashed #CBD5E1;
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  background: #F8FAFC;
  transition: all 0.2s ease;
  cursor: pointer;
}
.dropzone-box:hover, .dropzone-box.dragover {
  border-color: var(--color-primary);
  background: #FEF2F2;
}
.dropzone-icon {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

.uploaded-files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.file-preview-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-md);
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.file-thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: center;
}
.file-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-details {
  flex: 1;
  overflow: hidden;
}
.file-name {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #0F172A;
}
.file-meta {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.btn-remove-file {
  background: transparent;
  border: none;
  color: var(--color-text-dim);
  cursor: pointer;
  padding: 4px;
  font-size: 0.9rem;
}
.btn-remove-file:hover { color: var(--color-danger); }

/* ==========================================================================
   6. ЭСКАЛАЦИЯ И РЕШЕНИЯ (ESCALATION & DECISIONS)
   ========================================================================== */
.escalation-chain-card {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
}

.chain-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 16px;
  color: #2563EB;
}

.chain-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chain-node {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chain-node .node-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #475569;
}

.chain-node.active .node-icon {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 2px 8px var(--color-primary-glow);
}

.node-text {
  display: flex;
  flex-direction: column;
}
.node-text strong { font-size: 0.88rem; color: #0F172A; }
.node-text span { font-size: 0.75rem; color: var(--color-text-muted); }

.chain-arrow {
  color: #94A3B8;
  font-size: 1.2rem;
}

.decision-options-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 14px;
}

.decision-card-btn {
  cursor: pointer;
  position: relative;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.decision-card-btn input {
  position: absolute;
  opacity: 0;
}

.decision-content {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-lg);
  padding: 18px;
  height: 100%;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.decision-card-btn:hover .decision-content {
  border-color: #CBD5E1;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
}

.decision-card-btn.selected .decision-content {
  border-color: var(--color-primary);
  background: #FFFFFF;
  box-shadow: 0 4px 16px rgba(228, 0, 43, 0.08), 0 0 0 1px var(--color-primary);
}

.decision-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.admit-icon { background: #ECFDF5; color: #059669; border: 1px solid #D1FAE5; }
.reject-icon { background: #FEF2F2; color: #DC2626; border: 1px solid #FEE2E2; }
.legal-icon { background: #FFFBEB; color: #D97706; border: 1px solid #FEF3C7; }

/* ==========================================================================
   7. ИТОГИ И ПОСТАНОВКА ЗАДАЧ (TASKS CREATOR)
   ========================================================================== */
.result-toggle-box {
  display: flex;
  gap: 16px;
  margin-top: 8px;
}

.result-radio-btn {
  flex: 1;
  padding: 16px;
  background: #FFFFFF;
  border: 2px solid #E2E8F0;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
  color: #334155;
}
.result-radio-btn input { display: none; }

.result-radio-btn.active {
  border-color: var(--color-primary);
  background: #FEF2F2;
  color: var(--color-primary);
}

.task-creator-panel {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 20px;
}

.b24-task-preview-hint {
  background: #FFFFFF;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  color: #334155;
  border-left: 3px solid #2563EB;
  margin-top: 14px;
  box-shadow: var(--shadow-sm);
}

.wizard-footer-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid #E2E8F0;
}

.knowledge-subtabs-nav {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  overflow: visible;
}

.subtab-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 8px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-md);
  color: #475569;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-align: center;
}

.subtab-btn i, .subtab-btn svg {
  width: 16px;
  height: 16px;
  min-width: 16px;
}

.subtab-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.subtab-btn:hover {
  color: #0F172A;
  background: #FFFFFF;
  border-color: #CBD5E1;
}
.subtab-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  box-shadow: 0 4px 14px var(--color-primary-glow);
}

.category-pills-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.category-pill-btn {
  padding: 6px 14px;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 999px;
  color: #475569;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.category-pill-btn:hover { color: #0F172A; border-color: #94A3B8; }
.category-pill-btn.active {
  background: #FEF2F2;
  border-color: var(--color-primary);
  color: var(--color-primary);
  font-weight: 700;
}

.scripts-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 16px;
}

.script-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.script-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.script-situation {
  font-size: 0.95rem;
  color: #0F172A;
}

.script-phrase-box {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.phrase-text {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: #0F172A;
  line-height: 1.4;
}

.script-comment {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  border-top: 1px solid #E2E8F0;
  padding-top: 8px;
}

/* Шаблоны актов */
.templates-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.template-card {
  display: flex;
  flex-direction: column;
}

.template-textarea {
  font-family: monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  background: #F8FAFC;
  color: #0F172A;
  resize: vertical;
}

/* Документы */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

.doc-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.doc-icon-box {
  font-size: 2.2rem;
}
.doc-title {
  font-size: 1.05rem;
  margin-bottom: 6px;
  color: #0F172A;
}
.doc-desc {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.4;
  flex: 1;
}

.doc-meta-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  border-top: 1px solid #E2E8F0;
  padding-top: 10px;
}

/* Контакты */
.contacts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.contact-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: 22px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.contact-card:hover {
  transform: translateY(-2px);
  border-color: #CBD5E1;
  box-shadow: var(--shadow-card);
}

.contact-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.contact-avatar-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 50%;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.contact-header-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0F172A;
  margin: 0;
}

.contact-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.contact-links-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #F8FAFC;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid #E2E8F0;
}

.contact-link-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  text-decoration: none;
}

.contact-duty-box {
  font-size: 0.82rem;
  line-height: 1.4;
  color: #64748B;
}

.duty-label {
  display: block;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: #94A3B8;
  margin-bottom: 2px;
}

.contact-card-footer {
  margin-top: auto;
}

.btn-call-action {
  width: 100%;
  padding: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   9. ЗАДАЧИ (TASKS)
   ========================================================================== */
.tasks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 20px;
}

.task-card {
  display: flex;
  flex-direction: column;
}

.task-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.task-id-tag {
  font-size: 0.78rem;
  color: var(--color-text-dim);
  margin-left: 6px;
}

.task-title {
  font-size: 1.1rem;
  color: #0F172A;
}

.task-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-top: 6px;
}

.checklist-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.line-through { text-decoration: line-through; }

.task-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #E2E8F0;
  padding-top: 14px;
}

/* ==========================================================================
   10. АНАЛИТИКА И ДАШБОРД (KPIS & CHARTS)
   ========================================================================== */
.kpi-cards-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.kpi-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
}

.kpi-icon-box {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.kpi-red { background: #FEE2E2; }
.kpi-blue { background: #DBEAFE; }
.kpi-gold { background: #FEF3C7; }
.kpi-green { background: #D1FAE5; }
.kpi-purple { background: #EDE9FE; }

.kpi-info {
  display: flex;
  flex-direction: column;
}
.kpi-label { font-size: 0.8rem; color: var(--color-text-muted); font-weight: 500; }
.kpi-value { font-size: 1.5rem; font-weight: 800; color: #0F172A; }
.kpi-sub { font-size: 0.72rem; color: var(--color-text-dim); }

.analytics-charts-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 20px;
}

.auth-bar-row {
  margin-bottom: 14px;
}
.auth-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 4px;
  color: #334155;
}

.table-mini {
  width: 100%;
  font-size: 0.85rem;
  border-collapse: collapse;
}
.table-mini th {
  text-align: left;
  padding: 8px;
  color: var(--color-text-muted);
  border-bottom: 1px solid #E2E8F0;
}
.table-mini td {
  padding: 10px 8px;
  border-bottom: 1px solid #F1F5F9;
}

/* ==========================================================================
   11. ИНТЕГРАЦИЯ И ЛОГИ (BITRIX24 INTEGRATION)
   ========================================================================== */
.logs-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 400px;
  overflow-y: auto;
}

.log-item-card {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 0.85rem;
}
.log-success { border-left: 4px solid var(--color-success); }
.log-error { border-left: 4px solid var(--color-danger); }

.log-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}
.log-payload code {
  display: block;
  background: #0F172A;
  padding: 8px;
  border-radius: var(--radius-sm);
  margin-top: 6px;
  font-size: 0.78rem;
  color: #93C5FD;
  white-space: pre-wrap;
}
