/* FlukeBase Dashboard — Precision Noir design system */

/* ─── Fonts ──────────────────────────────────────────────────── */
/* IBM Plex Mono loaded via base.html for technical data */

/* ─── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #475569; }

/* ─── Nav link base ──────────────────────────────────────────── */
.nav-link {
  transition: background-color 0.12s ease, color 0.12s ease, border-color 0.12s ease;
  border-left: 2px solid transparent;
}
.nav-link.nav-active {
  border-left-color: #6366f1;
}

/* ─── Live session pulse indicator ──────────────────────────── */
@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.45; transform: scale(0.8); }
}
.live-dot { animation: live-pulse 2s ease-in-out infinite; }

@keyframes live-ring {
  0%   { transform: scale(0.85); opacity: 0.6; }
  100% { transform: scale(2.4);  opacity: 0; }
}
.live-ring { animation: live-ring 2.2s ease-out infinite; }

/* ─── Stat cards — colored top accent line ───────────────────── */
.stat-card { position: relative; overflow: hidden; }
.stat-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  border-radius: 999px 999px 0 0;
}
.stat-card-projects::after { background: linear-gradient(90deg, #6366f1, #818cf8); }
.stat-card-tasks::after    { background: linear-gradient(90deg, #10b981, #34d399); }
.stat-card-sessions::after { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.stat-card-memories::after { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.stat-card-agents::after   { background: linear-gradient(90deg, #f59e0b, #fbbf24); }

/* ─── Waitlist pipeline column accents ──────────────────────── */
[data-wl-column="pending"]  { border-top: 2px solid rgba(234, 179, 8, 0.4); }
[data-wl-column="approved"] { border-top: 2px solid rgba(16, 185, 129, 0.4); }
[data-wl-column="invited"]  { border-top: 2px solid rgba(59, 130, 246, 0.4); }
[data-wl-column="rejected"] { border-top: 2px solid rgba(239, 68, 68, 0.3); }

[data-wl-drop].drop-active {
  background-color: rgba(99, 102, 241, 0.05) !important;
  border-color: rgba(99, 102, 241, 0.3) !important;
  border-radius: 8px;
}

/* ─── HTMX loading indicator ─────────────────────────────────── */
.htmx-indicator { opacity: 0; transition: opacity 200ms ease-in; }
.htmx-request .htmx-indicator { opacity: 1; }

/* ─── Drag & Drop ────────────────────────────────────────────── */
[draggable="true"] {
  transition: opacity 0.12s ease, transform 0.12s ease;
  cursor: grab;
}
[draggable="true"]:active { cursor: grabbing; }
.task-dragging { opacity: 0.35; transform: scale(0.97) rotate(0.8deg); }
.drop-active {
  border-color: #6366f1 !important;
  background-color: rgba(99, 102, 241, 0.05) !important;
}
.kanban-placeholder {
  border: 2px dashed rgba(99, 102, 241, 0.4);
  border-radius: 8px;
  height: 56px;
  margin: 4px 0;
  transition: all 0.12s ease;
}

/* ─── Memory type badges ─────────────────────────────────────── */
.badge-default {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.2);
}
.badge-factual {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.25);
}
.badge-procedural {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}
.badge-episodic {
  background: rgba(168, 85, 247, 0.12);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.25);
}
.badge-conversation {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.2);
}
.badge-context {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
}
.badge-shared {
  background: rgba(6, 182, 212, 0.12);
  color: #22d3ee;
  border: 1px solid rgba(6, 182, 212, 0.25);
}

/* ─── Modal animations ───────────────────────────────────────── */
[data-modal-backdrop] { animation: fadeIn 0.15s ease-out; }
[data-modal-backdrop] > div { animation: slideUp 0.2s ease-out; }

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* ─── Toast ──────────────────────────────────────────────────── */
#toast-container > div { pointer-events: auto; }

/* ─── Command palette ────────────────────────────────────────── */
#cmd-palette:not(.hidden) { animation: fadeIn 0.1s ease-out; }
#cmd-palette:not(.hidden) > div:last-child { animation: slideUp 0.15s ease-out; }

.cmd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 0.1s ease;
}
.cmd-item:hover, .cmd-item.active {
  background-color: rgba(99, 102, 241, 0.08);
}
.dark .cmd-item:hover, .dark .cmd-item.active {
  background-color: rgba(99, 102, 241, 0.15);
}
.cmd-item.active { color: #6366f1; }

/* ─── Auth animated background ───────────────────────────────── */
@keyframes gradient-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.auth-bg {
  background: linear-gradient(-45deg, #0f172a, #1e1b4b, #0f0f1a, #172554);
  background-size: 400% 400%;
  animation: gradient-shift 14s ease infinite;
}
.auth-grid {
  background-image:
    linear-gradient(rgba(99, 102, 241, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.07) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* ─── Monospace data class ───────────────────────────────────── */
.mono {
  font-family: 'IBM Plex Mono', 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
}

/* ─── Section dividers in sidebar ────────────────────────────── */
.nav-section-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #475569;
  padding: 8px 12px 4px;
  user-select: none;
  display: flex;
  align-items: center;
}

.nav-section-sublabel {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #3f3f46;
  padding: 4px 12px 2px;
  user-select: none;
}

/* ─── Conversation view ─────────────────────────────────────── */

/* Message reveal animation */
@keyframes conv-reveal {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.conv-msg {
  animation: conv-reveal 0.25s ease-out both;
  border-bottom: 1px solid rgba(148, 163, 184, 0.06);
}
.dark .conv-msg {
  border-bottom-color: rgba(63, 63, 70, 0.15);
}

/* Agent message left border glow on hover */
.conv-msg-agent:hover .border-l-2 {
  border-color: rgba(99, 102, 241, 0.35);
  transition: border-color 0.2s ease;
}
.dark .conv-msg-agent:hover .border-l-2 {
  border-color: rgba(99, 102, 241, 0.25);
}

/* Tool pills */
.conv-tool-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 500;
  background: rgba(16, 185, 129, 0.06);
  color: rgba(16, 185, 129, 0.65);
  border: 1px solid rgba(16, 185, 129, 0.12);
  transition: all 0.15s ease;
}
.conv-tool-pill:hover {
  background: rgba(16, 185, 129, 0.1);
  color: rgba(16, 185, 129, 0.8);
}
.dark .conv-tool-pill {
  background: rgba(16, 185, 129, 0.08);
  color: rgba(52, 211, 153, 0.5);
  border-color: rgba(16, 185, 129, 0.1);
}
.dark .conv-tool-pill:hover {
  background: rgba(16, 185, 129, 0.12);
  color: rgba(52, 211, 153, 0.7);
}

/* Thinking block body reveal */
.conv-thinking-body {
  animation: conv-reveal 0.2s ease-out both;
}

/* Thinking scrollbar */
.conv-thinking-body pre::-webkit-scrollbar { width: 3px; }
.conv-thinking-body pre::-webkit-scrollbar-thumb { background: rgba(245, 158, 11, 0.2); border-radius: 2px; }

/* Scroll area */
.conv-scroll-area {
  scroll-behavior: smooth;
}
.conv-scroll-area::-webkit-scrollbar { width: 4px; }
.conv-scroll-area::-webkit-scrollbar-thumb { background: rgba(99, 102, 241, 0.15); border-radius: 2px; }
.conv-scroll-area::-webkit-scrollbar-thumb:hover { background: rgba(99, 102, 241, 0.3); }

/* Live bar pulse */
.conv-live-bar {
  animation: conv-live-breathe 3s ease-in-out infinite;
}
@keyframes conv-live-breathe {
  0%, 100% { opacity: 0.7; }
  50%      { opacity: 1; }
}

/* Jump-to-bottom button */
#conv-jump-bottom {
  transition: opacity 0.2s ease, transform 0.2s ease;
}
#conv-jump-bottom:not(.hidden) {
  animation: conv-reveal 0.15s ease-out both;
}

/* ─── Importance bar shimmer ─────────────────────────────────── */
@keyframes shimmer {
  0%   { opacity: 0.7; }
  50%  { opacity: 1; }
  100% { opacity: 0.7; }
}
.importance-bar-high { animation: shimmer 2s ease-in-out infinite; }

/* ═══════════════════════════════════════════════════════════════ */
/* Landing page                                                   */
/* ═══════════════════════════════════════════════════════════════ */

/* ─── Scan-line sweep ──────────────────────────────────────── */
@keyframes scanline {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}
.landing-scanline::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(99,102,241,0.15), transparent);
  animation: scanline 8s linear infinite;
}

/* ─── Staggered reveal on load ─────────────────────────────── */
@keyframes landing-reveal {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.landing-reveal {
  opacity: 0;
  animation: landing-reveal 0.8s ease-out forwards;
}
.landing-delay-1 { animation-delay: 0.15s; }
.landing-delay-2 { animation-delay: 0.3s; }
.landing-delay-3 { animation-delay: 0.45s; }
.landing-delay-4 { animation-delay: 0.6s; }
.landing-delay-5 { animation-delay: 0.75s; }

/* ─── Blinking cursor after subtitle ───────────────────────── */
@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}
.landing-cursor {
  animation: cursor-blink 1s step-end infinite;
  color: #6366f1;
  font-weight: 100;
}

/* ─── Waitlist modal overlay ───────────────────────────────── */
#waitlist-overlay:not(.hidden) {
  display: flex;
  animation: fadeIn 0.2s ease-out;
}
#waitlist-overlay:not(.hidden) > .relative {
  animation: slideUp 0.25s ease-out;
}

/* ─── Waitlist step transitions ────────────────────────────── */
.wl-step { transition: opacity 0.2s ease, transform 0.2s ease; }
.wl-step.hidden { display: none; }

/* ─── Waitlist progress dots & lines ───────────────────────── */
.wl-step-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid rgba(255,255,255,0.1);
  background: transparent;
  transition: all 0.3s ease;
  flex-shrink: 0;
}
.wl-step-dot span {
  font-size: 11px;
  font-family: 'IBM Plex Mono', monospace;
  color: rgba(255,255,255,0.3);
  transition: color 0.3s ease;
}
.wl-step-dot.active {
  border-color: #6366f1;
  background: rgba(99,102,241,0.15);
}
.wl-step-dot.active span { color: #818cf8; }
.wl-step-dot.done {
  border-color: #10b981;
  background: rgba(16,185,129,0.15);
}
.wl-step-dot.done span { color: #34d399; }

.wl-step-line {
  flex: 1;
  height: 2px;
  background: rgba(255,255,255,0.06);
  transition: background 0.3s ease;
}
.wl-step-line.done { background: rgba(16,185,129,0.4); }

/* ─── Radio card styling ───────────────────────────────────── */
.wl-radio-card input:checked + div {
  border-color: rgba(99,102,241,0.4);
  background: rgba(99,102,241,0.08);
}
.wl-radio-dot {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.15);
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.wl-radio-card input:checked + div .wl-radio-dot {
  border-color: #6366f1;
  background: #6366f1;
  box-shadow: inset 0 0 0 3px rgba(15,23,42,0.9);
}

/* ─── Chip toggles ─────────────────────────────────────────── */
.wl-chip span {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 9999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: #94a3b8;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.wl-chip span:hover {
  border-color: rgba(99,102,241,0.3);
  background: rgba(99,102,241,0.05);
}
.wl-chip input:checked + span {
  border-color: rgba(99,102,241,0.5);
  background: rgba(99,102,241,0.12);
  color: #818cf8;
}

/* ─── Range slider ─────────────────────────────────────────── */
.wl-range {
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  outline: none;
}
.wl-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #6366f1;
  cursor: pointer;
  border: 2px solid #818cf8;
  box-shadow: 0 0 10px rgba(99,102,241,0.3);
}
.wl-range::-moz-range-thumb {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #6366f1;
  cursor: pointer;
  border: 2px solid #818cf8;
  box-shadow: 0 0 10px rgba(99,102,241,0.3);
}
