/* Checklist avvio PMI — pannello taskbar */

.taskbar-tray {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  flex-shrink: 0;
}

.taskbar-checklist-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  color: var(--text-1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s;
}

.taskbar-checklist-btn:hover,
.taskbar-checklist-btn.active {
  background: var(--bg-hover);
}

.taskbar-checklist-btn.is-complete {
  color: #81c784;
}

.taskbar-checklist-btn svg {
  width: 18px;
  height: 18px;
}

.taskbar-checklist-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 16px;
  text-align: center;
  pointer-events: none;
}

.checklist-panel {
  position: absolute;
  bottom: calc(var(--taskbar-h) + 8px);
  right: 8px;
  width: min(380px, calc(100vw - 16px));
  max-height: min(520px, calc(100dvh - var(--taskbar-h) - 24px));
  background: rgba(36, 36, 36, 0.96);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-window);
  display: none;
  flex-direction: column;
  z-index: 250;
  overflow: hidden;
}

.checklist-panel.open {
  display: flex;
  animation: checklist-enter 0.22s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes checklist-enter {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.checklist-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.checklist-panel-title {
  margin: 0 0 4px;
  font-size: 0.9375rem;
  font-weight: 600;
}

.checklist-panel-sub {
  margin: 0;
  font-size: 0.6875rem;
  color: var(--text-2);
  line-height: 1.35;
}

.checklist-panel-close {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-2);
  font-size: 1.2rem;
  cursor: pointer;
  flex-shrink: 0;
}

.checklist-panel-close:hover {
  background: var(--bg-hover);
  color: var(--text-1);
}

.checklist-progress {
  position: relative;
  height: 28px;
  background: rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0 12px;
}

.checklist-progress-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #6ccb5f));
  opacity: 0.35;
  transition: width 0.3s ease;
}

.checklist-progress-label {
  position: relative;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-1);
}

.checklist-items {
  overflow-y: auto;
  padding: 6px;
  flex: 1;
  min-height: 0;
}

.checklist-item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  grid-template-rows: auto auto;
  gap: 0 10px;
  width: 100%;
  padding: 10px;
  margin-bottom: 4px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  text-align: left;
  color: inherit;
  font: inherit;
  transition: background 0.1s, border-color 0.1s;
}

.checklist-item.is-clickable {
  cursor: pointer;
}

.checklist-item.is-clickable:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.08);
}

.checklist-item.is-done {
  opacity: 0.72;
}

.checklist-item.is-done .checklist-item-title {
  text-decoration: line-through;
  text-decoration-color: rgba(255, 255, 255, 0.35);
}

.checklist-item-check {
  grid-row: 1 / span 2;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #81c784;
  align-self: center;
}

.checklist-item.is-done .checklist-item-check {
  border-color: #81c784;
  background: rgba(129, 199, 132, 0.15);
}

.checklist-item-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.checklist-item-title {
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.3;
}

.checklist-item-hint {
  font-size: 0.6875rem;
  color: var(--text-2);
  line-height: 1.35;
}

.checklist-item-cat {
  font-size: 0.625rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.checklist-item-action-icon {
  grid-row: 1;
  grid-column: 3;
  color: var(--accent);
  font-size: 0.875rem;
  align-self: center;
}

.checklist-manual-toggle {
  grid-column: 2 / 4;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 0.6875rem;
  color: var(--text-2);
  cursor: pointer;
}

.checklist-manual-toggle input {
  accent-color: var(--accent);
}

/* Finestra guida PMI */
.pmi-guide {
  padding: 16px 20px 24px;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-1);
}

.pmi-guide h3 {
  margin: 16px 0 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.pmi-guide ul {
  margin: 0;
  padding-left: 1.2rem;
}

.pmi-guide li {
  margin-bottom: 6px;
  color: var(--text-2);
}

.pmi-guide-note {
  margin-top: 16px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(0, 120, 212, 0.12);
  font-size: 0.8125rem;
  color: var(--text-2);
}

.pmi-guide-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 20px 20px;
  margin-top: -8px;
}

.pmi-guide-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-1);
  transition: background 0.12s, border-color 0.12s;
}

.pmi-guide-link:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
}

.pmi-guide-link.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.pmi-guide-link.primary:hover {
  filter: brightness(1.08);
}
