@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
  --accent: #16a34a;
  --accent-light: rgba(22, 163, 74, 0.15);
}

* { font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }

.sop-panel {
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1), opacity 0.3s ease;
}
.sop-panel.open { max-height: 2000px; opacity: 1; }

.check-item.checked .item-title { text-decoration: line-through; color: #94a3b8; }

.section-collapse {
  max-height: 5000px; overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1);
}
.section-collapse.collapsed { max-height: 0; }

.progress-ring-circle {
  transition: stroke-dashoffset 0.5s ease;
  transform: rotate(-90deg); transform-origin: 50% 50%;
}

input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  width: 22px; height: 22px; border: 2px solid #cbd5e1;
  border-radius: 6px; cursor: pointer; transition: all 0.2s ease;
  flex-shrink: 0; position: relative;
}
input[type="checkbox"]:checked { background: var(--accent); border-color: var(--accent); }
input[type="checkbox"]:checked::after {
  content: ''; position: absolute; left: 5px; top: 2px;
  width: 6px; height: 10px; border: solid white;
  border-width: 0 2px 2px 0; transform: rotate(45deg);
}
input[type="checkbox"]:hover { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }

/* Единообразные списки */
.md-list { list-style: none; padding: 0; margin: 0 0 8px; }
.md-list li {
  display: flex; gap: 8px; margin-bottom: 6px;
  line-height: 1.6;
}
.md-list li::before {
  content: '';
  flex-shrink: 0;
  width: 6px; height: 6px;
  margin-top: 9px;
  border-radius: 50%;
  background: #9ca3af;
}
.md-list--check li::before {
  width: 16px; height: 16px;
  margin-top: 3px;
  border-radius: 4px;
  background: white;
  border: 2px solid #d1d5db;
}

.priority-high { border-left: 3px solid #ef4444; }
.priority-medium { border-left: 3px solid #f59e0b; }
.priority-low { border-left: 3px solid #22c55e; }

.fade-in { animation: fadeIn 0.3s ease forwards; }
@keyframes fadeIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }

@media print {
  .no-print { display: none !important; }
  .sop-panel { max-height: none !important; opacity: 1 !important; }
  .section-collapse { max-height: none !important; }
}
