/* ============================================================
   QAD Calidad — Módulo strategic-plan
   Estilos exclusivos de este módulo. Reutiliza tokens.css y
   components/* antes de declarar algo nuevo aquí.
   ============================================================ */

/* ─── Lista de planes existentes ────────────────────────────────── */
.plan-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--color-border-row);
  text-decoration: none;
  transition: background 0.15s;
}
.plan-row:hover { background: var(--color-surface-alt); }

.plan-year-badge {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  flex-shrink: 0;
  background: var(--color-bg);
  color: var(--color-text-muted);
}
.plan-year-badge-active   { background: var(--color-success-bg); color: var(--color-success-text); }
.plan-year-badge-approved { background: var(--color-info-bg); color: var(--color-accent); }
.plan-year-badge-archived { background: var(--color-bg); color: var(--color-text-faint); }

.plan-row-body { flex: 1; min-width: 0; }
.plan-row-head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 5px; }
.plan-row-title { font-size: 0.875rem; font-weight: 600; color: var(--color-text); }

.plan-status-pill { font-size: 0.68rem; padding: 2px 8px; border-radius: var(--radius-pill); font-weight: 500; background: var(--color-bg); color: var(--color-text-muted); }

/* ─── Objetivos del plan (workspace) ─────────────────────────────── */
.objectives-list { display: flex; flex-direction: column; gap: 0.75rem; }
.objective-item { display: flex; align-items: flex-start; gap: 0.75rem; }
.objective-number {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--color-bg);
  color: var(--color-text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.objective-text { font-size: 0.875rem; color: var(--color-text-body); }
.objective-indicator { font-size: 0.75rem; color: var(--color-text-faint); margin-top: 0.125rem; }
.plan-status-pill-active   { background: var(--color-success-bg); color: var(--color-success-text); }
.plan-status-pill-approved { background: var(--color-info-bg); color: var(--color-info-text); }
.plan-status-pill-archived { background: var(--color-bg); color: var(--color-text-muted); }

.plan-row-progress { display: flex; align-items: center; gap: 0.5rem; }
.plan-row-progress-track { flex: 1; max-width: 160px; height: 4px; background: var(--color-border-subtle); border-radius: 2px; overflow: hidden; }
.plan-row-progress-fill { height: 100%; border-radius: 2px; background: var(--color-text-faint); }
.plan-row-progress-fill-active   { background: var(--color-success); }
.plan-row-progress-fill-approved { background: var(--color-accent); }
.plan-row-progress-label { font-size: 0.7rem; color: var(--color-text-faint); }

.plan-row-chevron { color: var(--color-border); }

/* ─── Selector de año para crear plan ───────────────────────────── */
.year-picker-label { font-size: 0.72rem; font-weight: 600; color: var(--color-text-faint); letter-spacing: 0.05em; margin-bottom: 0.75rem; }
.year-picker-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 1.5rem; }

.year-option-existing {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem 1rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  background: var(--color-surface-alt);
  gap: 4px;
  transition: border-color 0.15s;
}
.year-option-existing:hover { border-color: var(--color-text-faint); }
.year-option-existing-year { font-size: 1.5rem; font-weight: 700; color: var(--color-text-muted); }
.year-option-existing-note { font-size: 0.7rem; color: var(--color-text-faint); }
.year-option-existing-link { font-size: 0.7rem; color: var(--color-accent); margin-top: 2px; }

.year-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem 1rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  gap: 4px;
  transition: all 0.15s;
  background: var(--color-surface);
}
.year-option-selected { border-color: var(--color-accent); background: var(--color-info-bg); }
.year-option-year { font-size: 1.5rem; font-weight: 700; color: var(--color-text); }
.year-option-selected .year-option-year { color: var(--color-accent); }
.year-option-hint { font-size: 0.7rem; color: var(--color-text-faint); }
.year-option-selected .year-option-hint { color: var(--color-accent); }

.year-option-sm { padding: 1rem; }
.year-option-sm .year-option-year { font-size: 1.1rem; }
.year-option-existing.year-option-sm .year-option-existing-year { font-size: 1.1rem; }

.historical-toggle { display: flex; align-items: center; gap: 6px; font-size: 0.72rem; font-weight: 600; color: var(--color-text-faint); letter-spacing: 0.05em; background: none; border: none; cursor: pointer; padding: 0; margin-bottom: 0.75rem; }
.historical-toggle-chevron { transition: transform 0.2s; }
.historical-toggle-chevron.is-open { transform: rotate(90deg); }

.year-error { color: var(--color-danger); font-size: 0.85rem; margin-bottom: 1rem; }

.year-form-actions { display: flex; gap: 0.75rem; margin-top: 0.5rem; }
.year-submit-btn { flex: 1; }
.year-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }
