/* ═══════════════════════════════════════════════════════════
   FLIP LABS — Complete Design System
   Black · Cyan · Purple · Modern SaaS
═══════════════════════════════════════════════════════════ */

/* ── Reset ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, textarea, select { font: inherit; }
img, svg { display: block; }
ul, ol { list-style: none; }
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }

/* ── Variables ────────────────────────────────────────── */
:root {
  /* Colors */
  --cyan:        #00e5ff;
  --cyan-soft:   #67f0ff;
  --cyan-dim:    rgba(0, 229, 255, 0.10);
  --cyan-glow:   rgba(0, 229, 255, 0.35);
  --cyan-dark:   #00b8cc;

  --purple:      #a855f7;
  --purple-dim:  rgba(168, 85, 247, 0.12);
  --purple-glow: rgba(168, 85, 247, 0.30);

  --pink:        #ec4899;
  --green:       #10ffb0;
  --red:         #ff4d6a;
  --yellow:      #fbbf24;

  --accent:        var(--cyan);
  --accent-soft:   var(--cyan-soft);
  --accent-dim:    var(--cyan-dim);
  --accent-glow:   var(--cyan-glow);
  --accent-hover:  var(--cyan-soft);
  --border-focus:  var(--cyan);

  /* Background */
  --bg:          #000000;
  --bg-1:        #04060d;
  --bg-2:        #080d1a;

  /* Surfaces */
  --surface:     rgba(8, 12, 24, 0.70);
  --surface-2:   rgba(12, 18, 36, 0.80);
  --surface-3:   rgba(16, 24, 46, 0.60);
  --surface-solid: #080c18;

  /* Text */
  --text:        #e8eaf2;
  --text-muted:  #7a82a0;
  --text-faint:  #3d4560;

  /* Borders */
  --border:      rgba(0, 229, 255, 0.08);
  --border-2:    rgba(0, 229, 255, 0.16);
  --border-3:    rgba(0, 229, 255, 0.28);

  /* Shadows */
  --shadow-sm:   0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow:      0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-lg:   0 20px 60px rgba(0, 0, 0, 0.6);

  /* Sizing */
  --radius-sm:   10px;
  --radius:      14px;
  --radius-lg:   20px;
  --radius-xl:   28px;

  /* Topbar */
  --topbar-h:    60px;

  /* Fonts */
  --font-sans:   'DM Sans', 'Inter', system-ui, sans-serif;
  --font-display:'Bricolage Grotesque', 'DM Sans', system-ui, sans-serif;
  --font-mono:   'JetBrains Mono', 'Fira Code', monospace;

  /* Easing */
  --ease:        cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1.0);
  --ease-out:    cubic-bezier(0.0, 0.0, 0.2, 1.0);
}

/* ── Base ─────────────────────────────────────────────── */
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* ── Background layers ────────────────────────────────── */
.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  will-change: transform;
}
.ambient-orb--1 {
  width: 800px; height: 800px;
  top: -30%; left: -15%;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.18) 0%, transparent 70%);
  animation: drift1 20s ease-in-out infinite alternate;
}
.ambient-orb--2 {
  width: 600px; height: 600px;
  bottom: -20%; right: -10%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.18) 0%, transparent 70%);
  animation: drift2 24s ease-in-out infinite alternate;
}
.ambient-orb--3 {
  width: 400px; height: 400px;
  top: 50%; left: 60%;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.08) 0%, transparent 70%);
  animation: drift3 18s ease-in-out infinite alternate;
}
@keyframes drift1 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(80px, 50px) scale(1.2); }
}
@keyframes drift2 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-60px, -40px) scale(1.15); }
}
@keyframes drift3 {
  from { transform: translate(-50%, -50%) scale(0.8); opacity: 0.5; }
  to   { transform: translate(-48%, -52%) scale(1.2); opacity: 1; }
}
.ambient-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 229, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 30%, transparent 100%);
}

/* ── Topbar ───────────────────────────────────────────── */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  z-index: 100;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(24px) saturate(1.8);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1300px;
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  transition: opacity 0.2s;
}
.topbar-brand:hover { opacity: 0.85; }
.brand-mark {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--cyan) 0%, var(--purple) 100%);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 12px; font-weight: 800;
  color: #000;
  letter-spacing: -0.04em;
  flex-shrink: 0;
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.30);
  transition: box-shadow 0.3s, transform 0.3s var(--ease-spring);
}
.brand-mark:hover {
  box-shadow: 0 0 32px rgba(0, 229, 255, 0.55);
  transform: scale(1.08);
}
.topbar-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.topbar-brand-text strong {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.topbar-user {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-muted);
}
.status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse-dot 2.5s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px var(--green); }
  50%       { opacity: 0.7; box-shadow: 0 0 14px var(--green); }
}
.topbar-nav {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}
.topbar-nav-track {
  display: flex;
  align-items: center;
  gap: 2px;
}
.topbar-link {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
  position: relative;
}
.topbar-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}
.topbar-link.active {
  color: var(--cyan);
  background: var(--cyan-dim);
  font-weight: 600;
}
.topbar-link.active::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 14px; right: 14px;
  height: 2px;
  background: var(--cyan);
  border-radius: 99px;
  box-shadow: 0 0 8px var(--cyan);
}
.nav-label-short { display: none; }
.btn-logout {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-faint);
  transition: color 0.2s, background 0.2s;
}
.btn-logout:hover {
  color: var(--red);
  background: rgba(255, 77, 106, 0.08);
}

/* ── Page scaffold ────────────────────────────────────── */
.app-body > *:not(.ambient):not(.topbar) {
  position: relative;
  z-index: 1;
}
.container {
  max-width: 860px;
  margin: 0 auto;
  padding: calc(var(--topbar-h) + 40px) 24px 60px;
  animation: page-in 0.45s var(--ease) both;
}
.container-home {
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  justify-content: center;
  padding-top: calc(var(--topbar-h) + 20px);
}
@keyframes page-in {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Page header ──────────────────────────────────────── */
.page-header {
  margin-bottom: 32px;
}
.page-header--hero {
  text-align: center;
  margin-bottom: 40px;
}
.page-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 10px;
  opacity: 0.8;
}
.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text);
}
.accent-text {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 18px rgba(0, 229, 255, 0.35));
}
.subtitle {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.6;
}

/* ── Cards ────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  margin-bottom: 20px;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.card:hover {
  border-color: var(--border-2);
}
.card h2 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

/* ── Home hub ─────────────────────────────────────────── */
.home-hub {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  perspective: 1000px;
  margin-top: 12px;
}
.home-hub-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.35s var(--ease-spring), border-color 0.25s, box-shadow 0.35s, background 0.25s;
  transform-style: preserve-3d;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.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: 0; left: -100%;
  width: 80%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  transition: left 0.5s var(--ease);
}
.home-hub-card:hover {
  transform: translateY(-6px) rotateX(4deg) scale(1.02);
  border-color: var(--border-3);
  box-shadow:
    var(--shadow-lg),
    0 0 40px rgba(0, 229, 255, 0.10);
  background: var(--surface-2);
}
.home-hub-card:hover::before { opacity: 1; }
.home-hub-card:hover::after { left: 100%; }
.home-hub-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--cyan-dim);
  border: 1px solid var(--border-2);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 4px;
  transition: background 0.3s, box-shadow 0.3s;
}
.home-hub-card:hover .home-hub-icon {
  background: rgba(0, 229, 255, 0.15);
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.20);
}
.home-hub-icon svg {
  width: 20px; height: 20px;
  stroke: var(--cyan);
}
.home-hub-label {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  transition: color 0.2s;
}
.home-hub-card:hover .home-hub-label { color: var(--cyan); }
.home-hub-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}
.home-hub-card--badge::before {
  opacity: 0.6;
}

/* ── Auth ─────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: rgba(5, 8, 18, 0.90);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-xl);
  padding: 40px 36px;
  box-shadow:
    var(--shadow-lg),
    0 0 80px rgba(0, 229, 255, 0.07),
    0 0 0 1px rgba(0, 229, 255, 0.04) inset;
  backdrop-filter: blur(32px);
  animation: auth-in 0.5s var(--ease) both;
  position: relative;
  z-index: 1;
}
@keyframes auth-in {
  from { opacity: 0; transform: translateY(30px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.auth-header {
  text-align: center;
  margin-bottom: 32px;
}
.brand-mark-lg {
  width: 64px; height: 64px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--cyan) 0%, var(--purple) 100%);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 22px; font-weight: 800;
  color: #000;
  letter-spacing: -0.04em;
  margin: 0 auto 16px;
  box-shadow: 0 0 40px rgba(0, 229, 255, 0.35), 0 0 80px rgba(168, 85, 247, 0.15);
  animation: brand-breathe 3s ease-in-out infinite;
}
@keyframes brand-breathe {
  0%, 100% { box-shadow: 0 0 30px rgba(0, 229, 255, 0.30), 0 0 60px rgba(168, 85, 247, 0.10); }
  50%       { box-shadow: 0 0 50px rgba(0, 229, 255, 0.50), 0 0 80px rgba(168, 85, 247, 0.25); }
}
.auth-header h1 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 6px;
}
.auth-header .subtitle {
  font-size: 14px;
  color: var(--text-muted);
}

/* ── Forms ────────────────────────────────────────────── */
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.hint {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: 11px;
  color: var(--text-faint);
}
input[type="text"],
input[type="number"],
input[type="password"],
input[type="search"],
input[type="email"],
textarea,
select {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(0, 229, 255, 0.03);
  border: 1px solid var(--border-2);
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  outline: none;
}
input[type="text"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.12);
  background: rgba(0, 229, 255, 0.05);
}
input::placeholder, textarea::placeholder {
  color: var(--text-faint);
}
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237a82a0' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}
textarea { resize: vertical; line-height: 1.7; }
input[type="checkbox"] {
  width: auto;
  accent-color: var(--cyan);
  cursor: pointer;
}
.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.input-prefix {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  background: rgba(0, 229, 255, 0.03);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input-prefix:focus-within {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.12);
}
.input-prefix > span {
  padding: 0 12px;
  color: var(--cyan);
  font-weight: 600;
  font-size: 14px;
  background: rgba(0, 229, 255, 0.06);
  border-right: 1px solid var(--border-2);
  align-self: stretch;
  display: flex; align-items: center;
  flex-shrink: 0;
}
.input-prefix input {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  flex: 1;
  border-radius: 0 !important;
}
.input-prefix:focus-within { background: rgba(0, 229, 255, 0.05); }

/* ── Buttons ──────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #00c8e0 0%, var(--cyan) 60%, #33eeff 100%);
  color: #000;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.01em;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 229, 255, 0.30);
  transition: transform 0.2s var(--ease-spring), box-shadow 0.2s, opacity 0.2s;
  position: relative;
  overflow: hidden;
  width: 100%;
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.18) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.2s;
}
.btn-primary:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 8px 28px rgba(0, 229, 255, 0.45);
}
.btn-primary:hover::before { opacity: 1; }
.btn-primary:active { transform: translateY(0) scale(0.99); }
.btn-primary:disabled { opacity: 0.5; pointer-events: none; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  background: var(--cyan-dim);
  border: 1px solid var(--border-2);
  color: var(--cyan);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.btn-secondary:hover {
  background: rgba(0, 229, 255, 0.16);
  border-color: var(--border-3);
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.12);
  transform: translateY(-1px);
}

.btn-text {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 10px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.btn-text:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}
.btn-small { padding: 6px 12px; font-size: 12.5px; }
.btn-danger { color: var(--red) !important; }
.btn-danger:hover { background: rgba(255, 77, 106, 0.10) !important; }

/* ── Generate bar ─────────────────────────────────────── */
.generate-bar {
  padding: 8px 0 4px;
  display: flex;
  justify-content: flex-end;
}
.generate-bar .btn-primary {
  width: auto;
  min-width: 180px;
  animation: btn-glow-pulse 2.5s ease-in-out infinite;
}
@keyframes btn-glow-pulse {
  0%,100% { box-shadow: 0 4px 20px rgba(0, 229, 255, 0.30); }
  50%      { box-shadow: 0 4px 30px rgba(0, 229, 255, 0.55), 0 0 50px rgba(0, 229, 255, 0.15); }
}
.generate-bar .btn-primary:hover { animation: none; }

/* ── Messages ─────────────────────────────────────────── */
.error {
  color: var(--red);
  font-size: 13.5px;
  padding: 10px 14px;
  background: rgba(255, 77, 106, 0.08);
  border: 1px solid rgba(255, 77, 106, 0.20);
  border-radius: var(--radius-sm);
  margin-top: 6px;
}
.success {
  color: var(--green);
  font-size: 13.5px;
  padding: 8px 14px;
  background: rgba(16, 255, 176, 0.06);
  border: 1px solid rgba(16, 255, 176, 0.16);
  border-radius: var(--radius-sm);
  margin-top: 6px;
}
[hidden] { display: none !important; }

/* ── Presets ──────────────────────────────────────────── */
.presets-card {
  background: rgba(0, 229, 255, 0.03);
  border: 1px solid var(--border);
}
.presets-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.presets-toolbar-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.preset-select {
  flex: 1;
  min-width: 180px;
}
.presets-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.preset-save-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s var(--ease), padding 0.3s;
}
.preset-save-panel.is-open {
  max-height: 100px;
  padding-top: 14px;
}
.preset-save-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
}
.preset-save-row input { flex: 1; }
.preset-save-row .btn-primary {
  width: auto;
  padding: 8px 16px;
  font-size: 13px;
  animation: none;
}

/* ── VAT summary ──────────────────────────────────────── */
.summary {
  background: linear-gradient(135deg,
    rgba(0, 229, 255, 0.04) 0%,
    rgba(168, 85, 247, 0.04) 100%);
  border: 1px solid rgba(0, 229, 255, 0.14);
}
.summary-compact { margin-bottom: 8px; }
.summary-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 14px;
  color: var(--text-muted);
}
.summary-row strong { color: var(--text); font-weight: 600; }
.summary-row-hero {
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  margin-bottom: 4px;
  font-size: 15px;
}
.summary-row-hero strong {
  font-size: 24px;
  font-weight: 800;
  color: var(--cyan);
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  text-shadow: 0 0 20px rgba(0, 229, 255, 0.40);
}
.summary-vat-meta {
  font-size: 12.5px;
  color: var(--text-faint);
}
.summary-vat-meta strong { color: var(--text-muted); }
.summary-details summary {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--cyan);
  opacity: 0.7;
  transition: opacity 0.2s;
}
.summary-details summary:hover { opacity: 1; }
.summary-grid {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.presets-card--compact .card { margin-bottom: 0; }

/* ── Search ───────────────────────────────────────────── */
.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(0, 229, 255, 0.03);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-field:focus-within {
  border-color: rgba(0, 229, 255, 0.30);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.06);
}
.search-field-icon {
  width: 16px; height: 16px;
  flex-shrink: 0;
  color: var(--text-faint);
}
.search-field input {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  font-size: 14px;
  color: var(--text) !important;
}
.search-field input::placeholder { color: var(--text-faint) !important; }

/* ── History ──────────────────────────────────────────── */
.history-page-card { padding: 20px; }
.history-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.history-select-all {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
}
.history-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
  animation: item-in 0.3s var(--ease) both;
}
.history-item:hover {
  background: rgba(0, 229, 255, 0.04);
  border-color: var(--border);
  transform: translateX(4px);
}
@keyframes item-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.history-info {
  flex: 1;
  min-width: 0;
}
.history-item-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.history-item-sub {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.preset-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

/* ── Pipeline ─────────────────────────────────────────── */
.pipeline-card { padding: 20px; }
.pipeline-search { margin-bottom: 14px; }
.pipeline-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.pipeline-toolbar-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.pipeline-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
  white-space: nowrap;
}
.pipeline-filter select {
  font-size: 13px;
  padding: 6px 30px 6px 10px;
}
.pipeline-meta {
  font-size: 12.5px;
  color: var(--text-faint);
  white-space: nowrap;
}
.pipeline-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pipeline-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: rgba(0, 229, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
  animation: item-in 0.3s var(--ease) both;
}
.pipeline-item:hover {
  border-color: var(--border-2);
  background: rgba(0, 229, 255, 0.04);
  transform: translateX(3px);
}
.pipeline-item-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.pipeline-item-head { display: flex; align-items: center; gap: 10px; }
.pipeline-item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}
.pipeline-item-sub,
.pipeline-item-meta {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pipeline-item-meta { color: var(--text-faint); }
.pipeline-tracking-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 4px;
}
.pipeline-tracking-label span { white-space: nowrap; }
.pipeline-tracking-input {
  flex: 1;
  padding: 5px 10px !important;
  font-size: 12.5px !important;
  border-radius: 7px !important;
}
.pipeline-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
}
.pipeline-status-label {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  font-size: 12px;
  color: var(--text-faint);
}
.pipeline-status-select {
  padding: 5px 28px 5px 10px !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  border-radius: 7px !important;
}
.pipeline-status--email  { color: var(--cyan) !important; }
.pipeline-status--ftid   { color: var(--purple) !important; }
.pipeline-status--lit    { color: var(--pink) !important; }
.pipeline-status--failed { color: var(--red) !important; }
.pipeline-status--completed { color: var(--green) !important; }
.pipeline-reminder {
  background: rgba(168, 85, 247, 0.08);
  border: 1px solid rgba(168, 85, 247, 0.20);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--purple);
}

/* ── Notepad ──────────────────────────────────────────── */
.notepad-page {
  max-width: 860px;
  margin: 0 auto;
  padding: calc(var(--topbar-h) + 40px) 24px 60px;
  animation: page-in 0.4s var(--ease) both;
}
.notepad-card { padding: 20px; }
.notepad-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.notepad-status {
  font-size: 12px;
  color: var(--text-faint);
  transition: color 0.3s;
}
.notepad-input {
  width: 100%;
  min-height: 400px;
  padding: 16px !important;
  background: rgba(0, 229, 255, 0.02) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  font-family: var(--font-mono) !important;
  font-size: 13.5px !important;
  line-height: 1.8 !important;
  color: var(--text) !important;
  resize: vertical;
}
.notepad-input:focus {
  border-color: rgba(0, 229, 255, 0.22) !important;
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.04) !important;
}

/* ── Empty states ─────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.empty-state-icon {
  width: 56px; height: 56px;
  margin-bottom: 8px;
  opacity: 0.4;
}
.empty-state-icon svg {
  width: 100%; height: 100%;
  stroke: var(--cyan);
}
.empty-state-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
}
.empty-state-hint {
  font-size: 13px;
  color: var(--text-faint);
}

/* ── Scrollbar ────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(0, 229, 255, 0.18);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(0, 229, 255, 0.35); }

/* ── Utility ──────────────────────────────────────────── */
.spot { animation: item-in 0.3s var(--ease) both; }
.reveal { opacity: 0; animation: item-in 0.35s var(--ease) forwards; }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 640px) {
  .topbar-inner { padding: 0 16px; gap: 12px; }
  .topbar-brand-text { display: none; }
  .topbar-link { padding: 6px 10px; font-size: 12.5px; }
  .nav-label-full { display: none; }
  .nav-label-short { display: inline; }
  .container, .notepad-page { padding: calc(var(--topbar-h) + 24px) 16px 40px; }
  .home-hub { grid-template-columns: 1fr; gap: 12px; }
  .home-hub-card:hover { transform: translateY(-3px) scale(1.01); }
  .card { padding: 18px; }
  .auth-card { padding: 28px 22px; }
  .row { grid-template-columns: 1fr; }
  .pipeline-item { flex-direction: column; gap: 12px; }
  .pipeline-item-actions { flex-direction: row; align-items: center; }
  .pipeline-status-label { flex-direction: row; align-items: center; }
  .page-header h1 { font-size: 26px; }
  .presets-toolbar { flex-direction: column; align-items: stretch; }
  .preset-select { min-width: 0; }
}
@media (max-width: 480px) {
  .generate-bar .btn-primary { width: 100%; }
  .pipeline-toolbar-controls { flex-direction: column; align-items: stretch; }
  .history-item-title { font-size: 13px; }
}
