/* ============================================================
   Billify — design system
   Deep-navy premium fintech · glassmorphism · indigo→cyan
   ============================================================ */

:root {
  /* surfaces */
  --bg-0: #07090F;          /* page void */
  --bg-1: #0A0E1A;          /* base navy */
  --bg-2: #0E1424;          /* raised */
  --surface: rgba(20, 27, 46, 0.66);
  --surface-solid: #121A2E;
  --hairline: rgba(150, 165, 210, 0.12);
  --hairline-strong: rgba(150, 165, 210, 0.22);

  /* brand */
  --indigo: #6366F1;
  --indigo-bright: #818CF8;
  --cyan: #22D3EE;
  --grad: linear-gradient(105deg, #6366F1 0%, #4F8CF7 45%, #22D3EE 100%);
  --grad-soft: linear-gradient(135deg, rgba(99,102,241,0.18), rgba(34,211,238,0.10));

  /* semantic */
  --emerald: #34D399;
  --emerald-dim: rgba(52, 211, 153, 0.14);
  --amber: #FBBF24;
  --amber-dim: rgba(251, 191, 36, 0.14);
  --red: #FB7185;
  --red-dim: rgba(251, 113, 133, 0.14);
  --slate: #94A3B8;
  --slate-dim: rgba(148, 163, 184, 0.12);

  /* text */
  --ink: #F4F6FE;
  --ink-2: #AEB6D2;
  --ink-3: #6B7596;

  /* type */
  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, sans-serif;

  /* radii */
  --r-card: 20px;
  --r-md: 14px;
  --r-sm: 10px;
  --r-pill: 999px;

  /* shadow */
  --shadow-card: 0 1px 0 rgba(255,255,255,0.04) inset, 0 24px 60px -28px rgba(0,0,0,0.8);
  --glow-indigo: 0 14px 40px -12px rgba(99, 102, 241, 0.55);

  --accent: var(--indigo);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
  background: var(--bg-0);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#root { min-height: 100vh; }

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; }

::selection { background: rgba(99,102,241,0.35); }

/* ambient page background — soft aurora */
.app-bg {
  position: fixed; inset: 0; z-index: 0; overflow: hidden;
  background:
    radial-gradient(900px 520px at 78% -8%, rgba(99,102,241,0.22), transparent 60%),
    radial-gradient(760px 560px at 8% 12%, rgba(34,211,238,0.12), transparent 55%),
    radial-gradient(1200px 700px at 50% 120%, rgba(79,140,247,0.10), transparent 60%),
    var(--bg-1);
}
.app-bg::after {
  /* fine grain to kill banding */
  content: ""; position: absolute; inset: 0; opacity: 0.04; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.app-bg::before {
  content: ""; position: absolute; width: 62vw; height: 62vw; left: 52%; top: -22%;
  background: radial-gradient(circle, rgba(99,102,241,0.20), transparent 62%);
  filter: blur(30px); pointer-events: none;
  animation: drift 20s ease-in-out infinite;
}
@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-7%, 9%) scale(1.12); }
}

.screen { position: relative; z-index: 1; }

/* ---- glass card ---- */
.glass {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--shadow-card);
}

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 24px; border-radius: var(--r-md);
  font-size: 15px; font-weight: 600; letter-spacing: -0.01em;
  transition: transform .18s cubic-bezier(.2,.8,.2,1), box-shadow .25s, background .2s, border-color .2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.995); }
.btn-primary { background: var(--grad); color: #0A0E1A; box-shadow: var(--glow-indigo); font-weight: 700; }
.btn-primary:hover { box-shadow: 0 18px 52px -10px rgba(99,102,241,0.7); }
.btn-ghost { background: rgba(255,255,255,0.04); color: var(--ink); border: 1px solid var(--hairline); }
.btn-ghost:hover { background: rgba(255,255,255,0.08); border-color: var(--hairline-strong); }
.btn-google {
  background: #fff; color: #1f2937; height: 56px; border-radius: var(--r-md);
  font-weight: 600; font-size: 16px; box-shadow: 0 14px 40px -16px rgba(0,0,0,0.6);
  width: 100%;
}
.btn-google:hover { background: #f6f7f9; }

/* ---- pill / badges ---- */
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  height: 28px; padding: 0 12px; border-radius: var(--r-pill);
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.01em; white-space: nowrap;
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; }
.badge-found   { background: rgba(99,102,241,0.16); color: #B7BDFF; }
.badge-found .dot { background: var(--indigo-bright); box-shadow: 0 0 8px var(--indigo-bright); }
.badge-active  { background: var(--emerald-dim); color: #6EE7B7; }
.badge-active .dot { background: var(--emerald); box-shadow: 0 0 8px var(--emerald); }
.badge-potential { background: var(--amber-dim); color: #FCD34D; }
.badge-potential .dot { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.badge-inactive { background: var(--slate-dim); color: #9AA6BE; }
.badge-inactive .dot { background: var(--slate); }

/* ---- merchant monogram tile ---- */
.mono {
  display: grid; place-items: center; flex: none;
  border-radius: 12px; font-weight: 800; color: #fff;
  font-family: var(--sans); position: relative; overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.14), 0 6px 16px -8px rgba(0,0,0,0.7);
}
.mono::after { content:""; position:absolute; inset:0; background: linear-gradient(160deg, rgba(255,255,255,0.22), transparent 55%); }
.mono-logo { position: relative; z-index: 2; display: block; object-fit: contain; }
/* light logo chip holding a real favicon */
.mtile { background: linear-gradient(160deg, #ffffff, #eceff5); }
.mtile::after { background: linear-gradient(160deg, rgba(255,255,255,0.5), transparent 60%); }

/* ---- chip / category pill ---- */
.chip {
  display:inline-flex; align-items:center; gap:6px; height:26px; padding:0 10px;
  border-radius: var(--r-pill); font-size:12px; font-weight:600; color: var(--ink-2);
  background: rgba(255,255,255,0.05); border:1px solid var(--hairline);
}

/* ---- numbers ---- */
.tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.serif { font-family: var(--serif); }

/* eyebrow */
.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-3);
}

/* scrollbar */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: rgba(150,165,210,0.18); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-track { background: transparent; }

/* utility */
.row { display: flex; align-items: center; }
.muted { color: var(--ink-2); }
.dim { color: var(--ink-3); }

/* entrance */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop  { 0% { opacity:0; transform: scale(.9);} 60%{opacity:1; transform: scale(1.03);} 100%{transform: scale(1);} }
.rise { animation: rise .6s cubic-bezier(.2,.8,.2,1) both; }
.fade { animation: fade .5s ease both; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001s !important; }
}
