/* ─────────────────────────────────────────────────────────────────
 * tokens.css — shared design tokens + truly-cross-tab primitives.
 * Loaded BEFORE the inline <style> in index.html so the inline rules
 * still win when they need to override a token (same cascade as today).
 *
 * Step 2 of the cockpit per-tab architecture
 * (_arch/cockpit-architecture-proposal.md §2).
 *
 * Selectors in this file are intentionally GLOBAL — they're matched
 * by elements from multiple tabs (Board, Archive, Tasks, Activity,
 * Pipeline, etc.). Per-tab overrides land in each tab's own CSS file
 * (Steps 3-6) scoped via #view-<tab>.
 *
 * Net visual diff vs. pre-Step-2: ZERO. All rules below are copied
 * verbatim from public/index.html (L9-45, L218-235, L264-275, L281-308,
 * L331-346, L555-560, L563-597, L620-628 as of commit 759f5d4).
 *
 * What stays inline in index.html (Step 2 deferred / out of scope):
 *   - Foundational base resets (*, html, body, body::before/::after, buttons, inputs)
 *   - .author-btn family (modal-specific, not a true cross-tab primitive)
 *   - .card.dragging and .card .project-badge.* (Board-internal card variants)
 *   - .board, .column*, .drawer*, .focus-*, .project-*, .conv-*, .task-*, .link-*
 *     (all tab-owned — extracted to per-tab CSS in Steps 3-6)
 *   - @media (max-width: 1100px) block — references rules that stay inline,
 *     so the media query stays with them (per a11y-lead 2026-06-07).
 * ─────────────────────────────────────────────────────────────── */

/* ── AURORA — cinematic glass, Rei × Natalia v1.1.0 ── */
:root {
  --bg:            #030308;
  --bg-deep:       #020206;
  --bg-elev:       #0b0d14;
  --bg-card:       rgba(15, 18, 30, 0.72);
  --bg-card-solid: #0f1220;
  --bg-hover:      rgba(30, 28, 54, 0.75);
  --border:        rgba(167, 139, 250, 0.10);
  --border-strong: rgba(167, 139, 250, 0.22);
  --text:          #f0f2f7;
  --text-dim:      #9aa3b2;
  --text-faint:    #5c6575;
  --accent:        #a78bfa;
  --accent-dim:    #6b46c1;
  --accent-cyan:   #6ee7ff;
  --accent-grad:   linear-gradient(135deg, #6ee7ff 0%, #a78bfa 100%);
  --accent-grad-strong: linear-gradient(135deg, #38bdf8 0%, #8b5cf6 100%);
  --rei:           #6ee7ff;
  --natalia:       #f472b6;
  --vladi:         #34d399;
  --pervin:        #fbbf24;
  --phase-deprioritized:    #6b7280;
  --phase-identified:       #5c6575;
  --phase-researched:       #38bdf8;
  --phase-engaged:          #fbbf24;
  --phase-power_identified: #a78bfa;
  --phase-ideation:         #8b5cf6;
  --phase-active_discussion:#34d399;
  --phase-solution_matched: #22d3ee;
  --warning:       #fbbf24;
  --danger:        #f87171;
  --ok:            #34d399;
  --glass-blur:    blur(14px) saturate(1.1);
  --elev-1:        0 1px 0 rgba(255,255,255,0.04) inset, 0 8px 24px rgba(0,0,0,0.4);
  --elev-2:        0 1px 0 rgba(255,255,255,0.06) inset, 0 20px 60px rgba(0,0,0,0.6);
  --glow-accent:   0 0 0 1px rgba(167,139,250,0.25), 0 8px 32px rgba(167,139,250,0.12);
}

/* ── CHIP (filter pills, Board + Activity) ── */
.chip {
  padding: 6px 13px;
  background: rgba(15, 18, 30, 0.55);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 11.5px; color: var(--text-dim); cursor: pointer;
  user-select: none;
  backdrop-filter: blur(8px);
  font-weight: 500;
  transition: all 0.15s ease;
}
.chip.active {
  background: linear-gradient(135deg, rgba(110,231,255,0.15), rgba(167,139,250,0.22));
  border-color: rgba(167, 139, 250, 0.5);
  color: #f0f2f7;
  box-shadow: 0 0 0 1px rgba(167, 139, 250, 0.15), 0 4px 16px rgba(167, 139, 250, 0.15);
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }

/* ── PHASE DOT (Board columns, Team phase strip, Pipeline strategic view) ── */
.phase-dot {
  width: 8px; height: 8px; border-radius: 50%; display: inline-block;
  box-shadow: 0 0 8px currentColor;
}
.phase-dot.deprioritized    { background: var(--phase-deprioritized);    color: var(--phase-deprioritized); }
.phase-dot.identified       { background: var(--phase-identified);       color: var(--phase-identified); }
.phase-dot.researched       { background: var(--phase-researched);       color: var(--phase-researched); }
.phase-dot.engaged          { background: var(--phase-engaged);          color: var(--phase-engaged); }
.phase-dot.power_identified { background: var(--phase-power_identified); color: var(--phase-power_identified); }
.phase-dot.ideation         { background: var(--phase-ideation);         color: var(--phase-ideation); }
.phase-dot.active_discussion{ background: var(--phase-active_discussion);color: var(--phase-active_discussion); }
.phase-dot.solution_matched { background: var(--phase-solution_matched); color: var(--phase-solution_matched); }

/* ── CARD baseline (Board, Archive, Pipeline drawer) ──
   Variants like .card.dragging and .card .project-badge.* stay
   in index.html under Board's section (Board-internal). */
.card {
  background: linear-gradient(135deg, rgba(15, 18, 30, 0.85), rgba(12, 14, 26, 0.75));
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 14px;
  margin-bottom: 10px;
  cursor: grab;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 2px 8px rgba(0,0,0,0.2);
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.15s ease,
              box-shadow 0.18s ease,
              background 0.15s ease;
}
.card::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px;
  background: var(--accent-grad); border-radius: 2px;
  opacity: 0; transition: opacity 0.2s ease;
}
.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset, 0 8px 24px rgba(0,0,0,0.35), 0 0 0 1px rgba(167,139,250,0.12);
}
.card:hover::before { opacity: 1; }
.card:active { cursor: grabbing; }

/* ── AVATAR (author chips — used by Board, Tasks, Activity, Team, Pipeline) ── */
.avatar {
  width: 20px; height: 20px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: #0a0a14;
  letter-spacing: 0;
  position: relative;
}
.avatar.rei { background: linear-gradient(135deg, #6ee7ff 0%, #38bdf8 100%); box-shadow: 0 0 10px rgba(56,189,248,0.3); }
.avatar.natalia { background: linear-gradient(135deg, #f472b6 0%, #e879f9 100%); box-shadow: 0 0 10px rgba(244,114,182,0.3); }
.avatar.vladi { background: linear-gradient(135deg, #34d399 0%, #10b981 100%); box-shadow: 0 0 10px rgba(52,211,153,0.3); }
.avatar.pervin { background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%); box-shadow: 0 0 10px rgba(251,191,36,0.3); color: #1a0f00; }
.avatar.lee-anne { background: linear-gradient(135deg, #c4b5fd 0%, #a78bfa 100%); box-shadow: 0 0 10px rgba(167,139,250,0.3); }
.avatar.fede { background: linear-gradient(135deg, #fda4af 0%, #fb7185 100%); box-shadow: 0 0 10px rgba(251,113,133,0.3); }
.avatar.oriol { background: linear-gradient(135deg, #a5b4fc 0%, #818cf8 100%); box-shadow: 0 0 10px rgba(129,140,248,0.3); }
.avatar.carla { background: linear-gradient(135deg, #5eead4 0%, #2dd4bf 100%); box-shadow: 0 0 10px rgba(45,212,191,0.3); color: #0f3a35; }
.avatar.lg { width: 28px; height: 28px; font-size: 11px; }

/* ── FORM GRID (every tab's add-form) ── */
.form-grid { display: grid; gap: 12px; }
.form-grid label {
  font-size: 10px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.11em;
  display: block; margin-bottom: 5px; font-weight: 600;
}
.form-grid input, .form-grid select, .form-grid textarea { width: 100%; }

/* ── MODAL (every flow uses these — confirmation, author selection, CRM handoff) ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: radial-gradient(ellipse at center, rgba(20, 16, 40, 0.8) 0%, rgba(0, 0, 0, 0.85) 100%);
  backdrop-filter: blur(12px) saturate(1.2);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  animation: modalFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: linear-gradient(180deg, rgba(15, 18, 30, 0.96) 0%, rgba(7, 9, 18, 0.98) 100%);
  border: 1px solid rgba(167, 139, 250, 0.28);
  border-radius: 16px;
  padding: 32px 36px;
  max-width: 480px;
  width: 92vw;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(167, 139, 250, 0.12), 0 1px 0 rgba(255,255,255,0.05) inset;
  backdrop-filter: blur(24px);
  animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}
.modal::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(167,139,250,0.6), rgba(110,231,255,0.4), transparent);
}
@keyframes modalSlideUp { from { transform: translateY(16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal h2 {
  font-size: 20px; margin-bottom: 10px; font-weight: 600; letter-spacing: -0.018em;
  background: linear-gradient(135deg, #ffffff, #c4b5fd);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.modal p { color: var(--text-dim); font-size: 13px; line-height: 1.6; margin-bottom: 22px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }
.modal-actions button { min-width: 104px; }

/* ── EMPTY STATES (every tab uses this for zero-data placeholders) ── */
.empty {
  padding: 48px 24px; text-align: center; color: var(--text-faint);
  background: rgba(15, 18, 30, 0.4);
  border: 1px dashed rgba(167, 139, 250, 0.2);
  border-radius: 12px;
  backdrop-filter: blur(6px);
}
.empty h3 { color: var(--text); margin-bottom: 8px; font-weight: 600; font-size: 13px; letter-spacing: -0.005em; }
.empty p { font-size: 12px; line-height: 1.6; max-width: 440px; margin: 0 auto; }
