/* © 2026 Guy Cardinal (Beedy — en voie d'incorporation). Tous droits réservés. Code propriétaire, usage sous licence uniquement. */
/* ─── 9. SUPERVISOR WORKSPACE (Tâches & Rapports) ───────────────────── */
#page-workflows { height: calc(100vh - 70px); overflow-y: auto; background: #0a0f1a; padding: 0; }
.sw-wrap { max-width: 1240px; margin: 0 auto; padding: 28px 36px 60px; }

.sw-hero { padding: 8px 0 24px; border-bottom: 1px solid rgba(99,102,241,0.08); margin-bottom: 24px; }
.sw-serial { font-family: 'JetBrains Mono', monospace; font-size: 0.68rem; letter-spacing: 2px;
  color: #64748b; text-transform: uppercase; margin-bottom: 10px; }
.sw-kicker { display: block; font-family: 'JetBrains Mono', monospace; font-size: 0.72rem;
  letter-spacing: 2px; color: #0ea5e9; text-transform: uppercase; margin-bottom: 6px; font-weight: 400; }
.sw-title { font-family: 'Fraunces', serif; font-size: 2.4rem; font-weight: 600;
  color: #f1f5f9; margin: 0 0 8px; letter-spacing: -0.02em; line-height: 1.1; }
.sw-sub { font-size: 0.88rem; color: #94a3b8; max-width: 760px; }

.sw-tabs { display: flex; gap: 4px; border-bottom: 1px solid rgba(99,102,241,0.08);
  margin-bottom: 24px; overflow-x: auto; }
.sw-tab { display: inline-flex; align-items: center; gap: 8px; background: transparent;
  border: 0; border-bottom: 2px solid transparent; color: #64748b; padding: 11px 18px;
  font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer;
  transition: color 0.15s, border-color 0.15s; font-family: inherit; white-space: nowrap; }
.sw-tab:hover { color: #e2e8f0; }
.sw-tab.active { color: #0ea5e9; border-bottom-color: #0ea5e9; }
.sw-tab svg { stroke: currentColor; }
.sw-tab-count { background: rgba(99,102,241,0.1); color: #94a3b8;
  padding: 2px 8px; border-radius: 999px; font-size: 0.72rem;
  font-family: 'JetBrains Mono', monospace; font-weight: 700; }
.sw-tab.active .sw-tab-count { background: rgba(14,165,233,0.15); color: #0ea5e9; }

.sw-panel { display: none; animation: sw-fade 0.22s ease; }
.sw-panel.active { display: block; }
@keyframes sw-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.sw-panel-head { display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 18px; gap: 16px; flex-wrap: wrap; }
.sw-panel-head h2 { font-family: 'Fraunces', serif; font-size: 1.35rem; font-weight: 500;
  color: #e2e8f0; margin: 0; letter-spacing: -0.01em; }

.sw-empty { padding: 40px; text-align: center; color: #64748b; font-size: 0.9rem;
  background: rgba(15,23,42,0.5); border-radius: 10px; }

/* Buttons */
.sw-btn-primary, .sw-btn-secondary, .sw-btn-success, .sw-btn-sm {
  display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 8px;
  font: inherit; font-weight: 700; cursor: pointer; font-family: inherit;
  transition: filter .15s, transform .1s;
}
.sw-btn-primary { background: linear-gradient(180deg, #0ea5e9, #0284c7); color: #fff;
  padding: 10px 16px; font-size: 0.85rem; letter-spacing: 0.3px; }
.sw-btn-secondary { background: transparent; border: 1px solid #1e293b; color: #e2e8f0;
  padding: 10px 14px; font-size: 0.82rem; }
.sw-btn-success { background: linear-gradient(180deg, #10b981, #059669); color: #fff;
  padding: 10px 16px; font-size: 0.85rem; }
.sw-btn-sm { padding: 5px 10px; font-size: 0.74rem; background: #1e293b; color: #94a3b8; }
.sw-btn-sm:hover { background: #334155; color: #e2e8f0; }
.sw-btn-done { background: rgba(16,185,129,0.15); color: #10b981; }
.sw-btn-primary:hover, .sw-btn-success:hover { filter: brightness(1.08); }
.sw-btn-primary:active, .sw-btn-success:active { transform: scale(0.98); }
.sw-btn-primary:disabled, .sw-btn-secondary:disabled, .sw-btn-success:disabled { opacity: 0.55; }

/* Inputs */
.sw-inp, .sw-ta {
  width: 100%; background: #0f172a; border: 1px solid #1e293b; border-radius: 8px;
  padding: 11px 14px; color: #e2e8f0; font: inherit; font-size: 0.9rem;
  margin-bottom: 12px; box-sizing: border-box; font-family: inherit;
}
.sw-ta { min-height: 120px; resize: vertical; line-height: 1.5; font-family: 'Inter', monospace; }
.sw-ta-draft { min-height: 280px; background: #0b1221; font-family: 'Inter', sans-serif;
  line-height: 1.6; font-size: 0.92rem; }
.sw-inp:focus, .sw-ta:focus { outline: none; border-color: #0ea5e9; }

/* Task list */
.sw-task { background: #0f172a; border: 1px solid rgba(99,102,241,0.1);
  border-left: 3px solid #64748b; border-radius: 10px; padding: 14px 18px; margin-bottom: 10px; }
.sw-task.sw-pri-critical { border-left-color: #ef4444; }
.sw-task.sw-pri-high { border-left-color: #f59e0b; }
.sw-task.sw-pri-normal { border-left-color: #0ea5e9; }
.sw-task.sw-pri-low { border-left-color: #64748b; }
.sw-task-head { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.sw-task-pri { font-family: 'JetBrains Mono', monospace; font-size: 0.62rem;
  letter-spacing: 1.5px; padding: 2px 8px; border-radius: 4px; font-weight: 700; }
.sw-task-pri.sw-pri-critical { background: rgba(239,68,68,0.15); color: #ef4444; }
.sw-task-pri.sw-pri-high { background: rgba(245,158,11,0.15); color: #f59e0b; }
.sw-task-pri.sw-pri-normal { background: rgba(14,165,233,0.15); color: #0ea5e9; }
.sw-task-pri.sw-pri-low { background: rgba(100,116,139,0.15); color: #94a3b8; }
.sw-task-status { font-size: 0.72rem; color: #94a3b8; font-family: 'JetBrains Mono', monospace;
  background: #1e293b; padding: 2px 8px; border-radius: 4px; }
.sw-st-done { background: rgba(16,185,129,0.15) !important; color: #10b981 !important; }
.sw-st-in_progress { background: rgba(14,165,233,0.15) !important; color: #0ea5e9 !important; }
.sw-task-due { font-size: 0.72rem; color: #64748b; margin-left: auto;
  font-family: 'JetBrains Mono', monospace; }
.sw-task-title { font-size: 1rem; font-weight: 700; color: #e2e8f0; margin-bottom: 4px; }
.sw-task-desc { font-size: 0.85rem; color: #94a3b8; line-height: 1.5; margin-bottom: 8px; }
.sw-task-meta { display: flex; justify-content: space-between; align-items: center;
  padding-top: 8px; border-top: 1px solid rgba(99,102,241,0.06); margin-top: 6px; }
.sw-task-proj { font-size: 0.72rem; color: #0ea5e9; font-family: 'JetBrains Mono', monospace;
  background: rgba(14,165,233,0.08); padding: 2px 8px; border-radius: 4px; }
.sw-task-actions { display: flex; gap: 6px; }

/* Report list */
.sw-rpt { background: #0f172a; border: 1px solid rgba(99,102,241,0.08);
  border-radius: 10px; padding: 14px 18px; margin-bottom: 10px; }
.sw-rpt-head { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.sw-rpt-type { font-family: 'JetBrains Mono', monospace; font-size: 0.62rem;
  letter-spacing: 1.5px; padding: 2px 8px; border-radius: 4px; font-weight: 700; }
.sw-rpt-type-production { background: rgba(14,165,233,0.15); color: #0ea5e9; }
.sw-rpt-type-incident { background: rgba(239,68,68,0.15); color: #ef4444; }
.sw-rpt-type-expense { background: rgba(245,158,11,0.15); color: #f59e0b; }
.sw-rpt-type-overtime { background: rgba(167,139,250,0.15); color: #a78bfa; }
.sw-rpt-status { font-size: 0.72rem; color: #94a3b8; font-family: 'JetBrains Mono', monospace;
  background: #1e293b; padding: 2px 8px; border-radius: 4px; }
.sw-rpt-ai { font-size: 0.62rem; color: #10b981; background: rgba(16,185,129,0.12);
  padding: 1px 6px; border-radius: 3px; letter-spacing: 1px; font-weight: 700;
  font-family: 'JetBrains Mono', monospace; }
.sw-rpt-date { font-size: 0.72rem; color: #64748b; margin-left: auto;
  font-family: 'JetBrains Mono', monospace; }
.sw-rpt-author { font-size: 0.78rem; color: #e2e8f0; font-weight: 600; }
.sw-rpt-title { font-size: 0.98rem; font-weight: 700; color: #e2e8f0; margin-bottom: 4px; }
.sw-rpt details { margin-top: 6px; }
.sw-rpt summary { cursor: pointer; font-size: 0.78rem; color: #94a3b8;
  padding: 4px 0; list-style: none; }
.sw-rpt summary::-webkit-details-marker { display: none; }
.sw-rpt summary::before { content: '▸ '; color: #64748b; transition: transform 0.15s; display: inline-block; }
.sw-rpt details[open] summary::before { transform: rotate(90deg); }
.sw-rpt-body { padding: 12px; background: #0a0f1a; border-radius: 6px;
  font-size: 0.85rem; color: #cbd5e1; line-height: 1.6; }
.sw-rpt-body h2 { font-family: 'Fraunces', serif; font-size: 1.1rem; color: #e2e8f0;
  margin: 14px 0 8px; font-weight: 500; }
.sw-rpt-body h3 { font-size: 0.88rem; color: #0ea5e9; margin: 12px 0 6px;
  font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.sw-rpt-body ul, .sw-rpt-body ol { margin: 6px 0 10px; padding-left: 22px; }
.sw-rpt-body strong { color: #f1f5f9; }

/* Compose */
.sw-compose-shell { display: grid; grid-template-columns: 280px 1fr; gap: 28px; align-items: flex-start; }
@media (max-width: 900px){ .sw-compose-shell { grid-template-columns: 1fr; } }
.sw-compose-side h3 { font-size: 0.8rem; letter-spacing: 1.5px; text-transform: uppercase;
  color: #94a3b8; margin: 0 0 12px; font-weight: 700; font-family: inherit; }
.sw-rpt-types { display: flex; flex-direction: column; gap: 6px; }
.sw-rpt-type { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px;
  background: #0f172a; border: 1px solid rgba(99,102,241,0.1); border-radius: 10px;
  cursor: pointer; transition: border-color 0.15s; }
.sw-rpt-type:hover { border-color: #1e40af; }
.sw-rpt-type input { margin-top: 3px; accent-color: #0ea5e9; flex-shrink: 0; }
.sw-rpt-type input:checked ~ div { color: #0ea5e9; }
.sw-rpt-type div { flex: 1; line-height: 1.3; }
.sw-rpt-type strong { display: block; font-size: 0.88rem; color: #e2e8f0; }
.sw-rpt-type span { display: block; font-size: 0.72rem; color: #64748b; margin-top: 2px; }
.sw-rpt-type input:checked + div strong { color: #0ea5e9; }

.sw-compose-main h4 { font-size: 0.74rem; letter-spacing: 1.5px; text-transform: uppercase;
  color: #94a3b8; margin: 14px 0 8px; font-weight: 700; font-family: inherit; }
.sw-compose-main h4:first-child { margin-top: 0; }
.sw-compose-actions { display: flex; gap: 10px; margin: 4px 0 16px; flex-wrap: wrap; }
.sw-compose-meta { font-size: 0.72rem; color: #64748b; font-style: italic; margin-top: 6px; }

@keyframes spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }
