/* ═══════════════════════════════════════════════
   FLIP LABS — Custom Theme Override
   Black · Cyan · Purple · Glassmorphism · 3D
═══════════════════════════════════════════════ */

/* ── Color variables override ────────────────── */
:root {
  --accent:        #00e5ff;
  --accent-soft:   #80f4ff;
  --accent-dim:    rgba(0, 229, 255, 0.12);
  --accent-glow:   rgba(0, 229, 255, 0.40);
  --accent-hover:  #33eeff;
  --border-focus:  #00e5ff;

  --purple:        #a855f7;
  --purple-dim:    rgba(168, 85, 247, 0.15);
  --purple-glow:   rgba(168, 85, 247, 0.35);

  --pink:          #f472b6;
  --green:         #10ffb0;

  --bg:            #020408;
  --bg-elevated:   #070c14;
  --surface:       rgba(8, 14, 26, 0.75);
  --surface-solid: #080e1a;
  --surface-raised:#0d1520;

  --border:        rgba(0, 229, 255, 0.10);
  --border-strong: rgba(0, 229, 255, 0.18);

  --shadow-glow:   0 0 80px rgba(0, 229, 255, 0.12);
  --shadow-md:     0 16px 48px rgba(0, 0, 0, 0.6);

  --radius:    14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
}

/* ── Background: deep space with cyan nebula ─── */
body::before {
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(0, 229, 255, 0.18), transparent 55%),
    radial-gradient(ellipse 45% 35% at 100% 40%, rgba(168, 85, 247, 0.14), transparent 50%),
    radial-gradient(circle at 0% 80%, rgba(0, 180, 220, 0.08), transparent 42%),
    radial-gradient(circle at 88% 90%, rgba(168, 85, 247, 0.10), transparent 38%),
    linear-gradient(180deg, #020408 0%, #030810 45%, #010305 100%);
}

/* ── Ambient orbs: cyan + purple ─────────────── */
.ambient-orb--1 {
  background: radial-gradient(circle, rgba(0, 229, 255, 0.25) 0%, transparent 70%);
  width: 700px; height: 700px;
  top: -20%; left: -10%;
  animation: orb-drift-1 18s ease-in-out infinite alternate;
}
.ambient-orb--2 {
  background: radial-gradient(circle, rgba(168, 85, 247, 0.20) 0%, transparent 70%);
  width: 600px; height: 600px;
  bottom: -15%; right: -10%;
  animation: orb-drift-2 22s ease-in-out infinite alternate;
}
.ambient-orb--3 {
  background: radial-gradient(circle, rgba(0, 229, 255, 0.10) 0%, transparent 70%);
  width: 400px; height: 400px;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  animation: orb-drift-3 28s ease-in-out infinite alternate;
}

@keyframes orb-drift-1 {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(60px, 40px) scale(1.15); }
}
@keyframes orb-drift-2 {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(-50px, -30px) scale(1.10); }
}
@keyframes orb-drift-3 {
  from { transform: translate(-50%,-50%) scale(0.9); opacity: 0.5; }
  to   { transform: translate(-48%,-52%) scale(1.1); opacity: 1; }
}

/* ── Grid: cyan tint ─────────────────────────── */
.ambient-grid {
  background-image:
    linear-gradient(rgba(0,229,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,255,0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
}

/* ── Top bar ─────────────────────────────────── */
.topbar {
  background: rgba(2, 4, 8, 0.85);
  backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid rgba(0,229,255,0.10);
  box-shadow: 0 1px 0 rgba(0,229,255,0.05), 0 4px 24px rgba(0,0,0,0.4);
}

.brand-mark {
  background: linear-gradient(135deg, #00e5ff 0%, #a855f7 100%);
  box-shadow: 0 0 20px rgba(0,229,255,0.35), 0 0 40px rgba(168,85,247,0.20);
  transition: box-shadow 0.3s ease, transform 0.3s var(--ease-spring);
}
.brand-mark:hover {
  box-shadow: 0 0 30px rgba(0,229,255,0.55), 0 0 60px rgba(168,85,247,0.30);
  transform: scale(1.08) rotate(-3deg);
}
.brand-mark-lg {
  background: linear-gradient(135deg, #00e5ff 0%, #a855f7 100%);
  box-shadow: 0 0 40px rgba(0,229,255,0.40), 0 0 80px rgba(168,85,247,0.25);
  animation: brand-pulse 3s ease-in-out infinite;
}
@keyframes brand-pulse {
  0%,100% { box-shadow: 0 0 40px rgba(0,229,255,0.40), 0 0 80px rgba(168,85,247,0.25); }
  50%      { box-shadow: 0 0 60px rgba(0,229,255,0.60), 0 0 100px rgba(168,85,247,0.40); }
}

.topbar-link { transition: color 0.2s, background 0.2s; }
.topbar-link:hover { color: var(--accent); }
.topbar-link.active {
  color: var(--accent);
  background: rgba(0,229,255,0.10);
  border-radius: 8px;
}
.topbar-link.active::after {
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

/* ── Cards: 3D glassmorphism ─────────────────── */
.card {
  background: linear-gradient(135deg,
    rgba(8,14,26,0.85) 0%,
    rgba(12,18,32,0.80) 100%);
  border: 1px solid rgba(0,229,255,0.12);
  border-radius: var(--radius);
  box-shadow:
    0 0 0 1px rgba(0,229,255,0.04) inset,
    0 8px 32px rgba(0,0,0,0.5),
    0 1px 0 rgba(0,229,255,0.08) inset;
  backdrop-filter: blur(16px) saturate(1.3);
  transition: transform 0.3s var(--ease), box-shadow 0.3s ease, border-color 0.3s ease;
  transform-style: preserve-3d;
}
.card:hover {
  border-color: rgba(0,229,255,0.22);
  box-shadow:
    0 0 0 1px rgba(0,229,255,0.08) inset,
    0 16px 48px rgba(0,0,0,0.6),
    0 0 40px rgba(0,229,255,0.06);
  transform: translateY(-2px);
}

/* ── Home hub cards: 3D flip effect ─────────── */
.home-hub {
  perspective: 1200px;
}
.home-hub-card {
  background: linear-gradient(135deg,
    rgba(8,14,26,0.90) 0%,
    rgba(13,21,40,0.85) 100%);
  border: 1px solid rgba(0,229,255,0.12);
  border-radius: var(--radius-lg);
  box-shadow:
    0 4px 24px rgba(0,0,0,0.5),
    0 0 0 1px rgba(0,229,255,0.04) inset;
  transition: transform 0.4s var(--ease-spring), box-shadow 0.4s ease, border-color 0.3s;
  transform-style: preserve-3d;
  position: relative;
  overflow: hidden;
}
.home-hub-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,229,255,0.06) 0%, rgba(168,85,247,0.04) 100%);
  opacity: 0;
  transition: opacity 0.3s;
}
.home-hub-card::after {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: conic-gradient(from 0deg at 50% 50%,
    transparent 0deg,
    rgba(0,229,255,0.08) 60deg,
    transparent 120deg);
  opacity: 0;
  transition: opacity 0.4s;
  animation: none;
}
.home-hub-card:hover {
  transform: translateY(-6px) rotateX(4deg) rotateY(-2deg) scale(1.02);
  border-color: rgba(0,229,255,0.30);
  box-shadow:
    0 20px 60px rgba(0,0,0,0.6),
    0 0 40px rgba(0,229,255,0.12),
    0 0 0 1px rgba(0,229,255,0.10) inset;
}
.home-hub-card:hover::before { opacity: 1; }
.home-hub-card:hover::after {
  opacity: 1;
  animation: card-shine 2s linear infinite;
}

@keyframes card-shine {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.home-hub-label {
  color: var(--accent);
  font-weight: 700;
  text-shadow: 0 0 20px rgba(0,229,255,0.50);
  transition: text-shadow 0.3s;
}
.home-hub-card:hover .home-hub-label {
  text-shadow: 0 0 30px rgba(0,229,255,0.80);
}
.home-hub-desc { color: var(--text-muted); }

/* ── Buttons ─────────────────────────────────── */
.btn-primary {
  background: linear-gradient(135deg, #00c8e0 0%, #00e5ff 50%, #33ccff 100%);
  color: #020408;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(0,229,255,0.35), 0 0 0 1px rgba(0,229,255,0.20);
  border: none;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s var(--ease-spring), box-shadow 0.2s ease;
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.2s;
}
.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 30px rgba(0,229,255,0.50), 0 0 0 1px rgba(0,229,255,0.30);
}
.btn-primary:hover::before { opacity: 1; }
.btn-primary:active { transform: translateY(0) scale(0.98); }

.btn-secondary {
  background: rgba(0,229,255,0.08);
  border: 1px solid rgba(0,229,255,0.20);
  color: var(--accent);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.btn-secondary:hover {
  background: rgba(0,229,255,0.14);
  border-color: rgba(0,229,255,0.40);
  box-shadow: 0 0 16px rgba(0,229,255,0.15);
  transform: translateY(-1px);
}

/* ── Inputs ──────────────────────────────────── */
input, textarea, select {
  background: rgba(5, 10, 20, 0.80) !important;
  border: 1px solid rgba(0,229,255,0.12) !important;
  color: var(--text) !important;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s !important;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(0,229,255,0.15), 0 0 20px rgba(0,229,255,0.08) !important;
  background: rgba(0,229,255,0.04) !important;
  outline: none !important;
}
input::placeholder, textarea::placeholder { color: rgba(180,180,200,0.35) !important; }

/* ── Auth card ───────────────────────────────── */
.auth-card {
  background: linear-gradient(145deg,
    rgba(6,12,24,0.95) 0%,
    rgba(10,16,30,0.92) 100%);
  border: 1px solid rgba(0,229,255,0.15);
  box-shadow:
    0 32px 80px rgba(0,0,0,0.7),
    0 0 0 1px rgba(0,229,255,0.06) inset,
    0 0 80px rgba(0,229,255,0.06);
  backdrop-filter: blur(24px) saturate(1.5);
  animation: card-appear 0.6s var(--ease) both;
}
@keyframes card-appear {
  from { opacity: 0; transform: translateY(30px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Page headers ────────────────────────────── */
.page-header h1 {
  animation: title-slide 0.5s var(--ease) both;
}
@keyframes title-slide {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.accent-text {
  background: linear-gradient(135deg, #00e5ff 0%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 20px rgba(0,229,255,0.35));
  animation: accent-glow 3s ease-in-out infinite alternate;
}
@keyframes accent-glow {
  from { filter: drop-shadow(0 0 15px rgba(0,229,255,0.30)); }
  to   { filter: drop-shadow(0 0 30px rgba(168,85,247,0.40)); }
}
.page-eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 11px;
  font-weight: 600;
  animation: fade-up 0.4s var(--ease) both;
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Section headings ────────────────────────── */
.card h2 {
  background: linear-gradient(135deg, #e0f8ff 0%, #a0e8f8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

/* ── Status dot ──────────────────────────────── */
.status-dot {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent), 0 0 16px rgba(0,229,255,0.4);
  animation: dot-pulse 2s ease-in-out infinite;
}
@keyframes dot-pulse {
  0%,100% { box-shadow: 0 0 6px var(--accent), 0 0 12px rgba(0,229,255,0.3); }
  50%      { box-shadow: 0 0 12px var(--accent), 0 0 24px rgba(0,229,255,0.5); }
}

/* ── VAT summary card ────────────────────────── */
.summary {
  border: 1px solid rgba(0,229,255,0.15);
  background: linear-gradient(135deg, rgba(0,229,255,0.04) 0%, rgba(168,85,247,0.04) 100%);
}
#sum-total {
  color: var(--accent);
  text-shadow: 0 0 20px rgba(0,229,255,0.40);
  font-size: 1.5em;
}
.summary-row-hero { border-bottom: 1px solid rgba(0,229,255,0.10); padding-bottom: 12px; }

/* ── Pipeline status colors ──────────────────── */
.pipeline-status--email  { color: var(--accent); }
.pipeline-status--ftid   { color: var(--purple); }
.pipeline-status--lit    { color: var(--pink); }
.pipeline-status--failed { color: var(--danger, #ff6b7a); }
.pipeline-status--completed { color: var(--green); }

/* ── History items ───────────────────────────── */
.history-item {
  border-radius: var(--radius-sm);
  transition: background 0.2s, transform 0.2s;
}
.history-item:hover {
  background: rgba(0,229,255,0.05);
  transform: translateX(4px);
}

/* ── Pipeline items ──────────────────────────── */
.pipeline-item {
  border: 1px solid rgba(0,229,255,0.08);
  border-radius: var(--radius-sm);
  background: rgba(5,10,20,0.60);
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.pipeline-item:hover {
  border-color: rgba(0,229,255,0.20);
  background: rgba(0,229,255,0.04);
  transform: translateX(3px);
}

/* ── Search field ────────────────────────────── */
.search-field {
  border: 1px solid rgba(0,229,255,0.12);
  background: rgba(0,229,255,0.04);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-field:focus-within {
  border-color: rgba(0,229,255,0.35);
  box-shadow: 0 0 20px rgba(0,229,255,0.08);
}

/* ── Notepad ─────────────────────────────────── */
.notepad-input {
  background: rgba(0,229,255,0.03) !important;
  border: 1px solid rgba(0,229,255,0.10) !important;
  color: var(--text) !important;
  font-family: var(--font-mono) !important;
  line-height: 1.7 !important;
}
.notepad-input:focus {
  border-color: rgba(0,229,255,0.25) !important;
  box-shadow: 0 0 30px rgba(0,229,255,0.06) !important;
}

/* ── Preset select ───────────────────────────── */
.preset-select {
  border: 1px solid rgba(0,229,255,0.15) !important;
  background: rgba(0,229,255,0.04) !important;
}
.preset-select:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(0,229,255,0.15) !important;
}

/* ── Danger button ───────────────────────────── */
.btn-danger { color: #ff6b7a !important; }
.btn-danger:hover {
  color: #ff4466 !important;
  text-shadow: 0 0 10px rgba(255,70,100,0.4);
}

/* ── Generate bar ────────────────────────────── */
.generate-bar {
  display: flex;
  justify-content: flex-end;
  padding: 8px 0 24px;
}

/* ── Scrollbar ───────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(0,229,255,0.03); }
::-webkit-scrollbar-thumb {
  background: rgba(0,229,255,0.20);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(0,229,255,0.40); }

/* ── Topbar brand text ───────────────────────── */
.topbar-brand-text strong {
  background: linear-gradient(90deg, #00e5ff 0%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Page entry animation ────────────────────── */
.container, .notepad-page {
  animation: page-enter 0.4s var(--ease) both;
}
@keyframes page-enter {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Spot/reveal animation ───────────────────── */
.spot { animation: spot-in 0.35s var(--ease) both; }
@keyframes spot-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Presets toolbar ─────────────────────────── */
.presets-card {
  border: 1px solid rgba(0,229,255,0.10);
  background: linear-gradient(135deg, rgba(0,229,255,0.04) 0%, rgba(168,85,247,0.03) 100%);
}

/* ── Empty state ─────────────────────────────── */
.empty-state-icon svg { stroke: rgba(0,229,255,0.30); }
.empty-state-title { color: rgba(0,229,255,0.60); }

/* ── Success message ─────────────────────────── */
.success { color: var(--green) !important; }

/* ── Input prefix (£) ────────────────────────── */
.input-prefix > span {
  color: var(--accent);
  font-weight: 600;
}

/* ── Topbar logout btn ───────────────────────── */
.btn-logout {
  color: var(--text-muted);
  transition: color 0.2s;
}
.btn-logout:hover { color: #ff6b7a; }

/* ── Auth page subtitle ──────────────────────── */
.auth-header .subtitle { color: var(--text-muted); }

/* ── 3D tilt on hover for auth card ─────────── */
.auth-page .auth-card {
  transition: transform 0.4s var(--ease);
}

/* ── Glowing border on active nav ───────────── */
.topbar-link.active {
  text-shadow: 0 0 12px rgba(0,229,255,0.50);
}

/* ── Pipeline tracking input ─────────────────── */
.pipeline-tracking-input {
  background: rgba(0,229,255,0.04) !important;
  border: 1px solid rgba(0,229,255,0.10) !important;
  border-radius: 8px;
}
.pipeline-tracking-input:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(0,229,255,0.12) !important;
}

/* ── Pipeline status select ──────────────────── */
.pipeline-status-select {
  background: rgba(0,10,20,0.8) !important;
  border-radius: 8px;
}

/* ── Card stagger animation for history ──────── */
.history-item:nth-child(1)  { animation-delay: 0.05s; }
.history-item:nth-child(2)  { animation-delay: 0.10s; }
.history-item:nth-child(3)  { animation-delay: 0.15s; }
.history-item:nth-child(4)  { animation-delay: 0.20s; }
.history-item:nth-child(5)  { animation-delay: 0.25s; }
.history-item:nth-child(6)  { animation-delay: 0.30s; }

/* ── Floating particles (decorative) ─────────── */
@keyframes float-particle {
  0%   { transform: translateY(0) translateX(0) scale(1); opacity: 0.6; }
  33%  { transform: translateY(-30px) translateX(20px) scale(1.1); }
  66%  { transform: translateY(-15px) translateX(-10px) scale(0.9); }
  100% { transform: translateY(0) translateX(0) scale(1); opacity: 0.6; }
}

/* ── Scanline effect (subtle) ────────────────── */
body::after {
  background-image:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    repeating-linear-gradient(0deg, rgba(0,229,255,0.015) 0px, transparent 1px, transparent 3px);
  background-size: 180px 180px, 100% 4px;
  opacity: 0.04;
}

/* ── Glow pulse on generate btn ─────────────── */
#generate-btn {
  animation: btn-glow 2.5s ease-in-out infinite;
}
@keyframes btn-glow {
  0%,100% { box-shadow: 0 4px 20px rgba(0,229,255,0.35); }
  50%      { box-shadow: 0 4px 30px rgba(0,229,255,0.55), 0 0 50px rgba(0,229,255,0.20); }
}
#generate-btn:hover { animation: none; }

/* ── Pipeline reminder ───────────────────────── */
.pipeline-reminder {
  background: linear-gradient(135deg, rgba(168,85,247,0.10), rgba(0,229,255,0.06));
  border: 1px solid rgba(168,85,247,0.25);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 20px;
  color: var(--purple);
}

/* ── Checkbox ────────────────────────────────── */
input[type="checkbox"] {
  accent-color: var(--accent) !important;
}

/* ── Mobile responsive ───────────────────────── */
@media (max-width: 640px) {
  .home-hub-card:hover {
    transform: translateY(-3px) scale(1.01);
  }
}
