/* ================================================================
   HLR Lookup Pro — Global Theme
   Modern, colorful, glassy UI on top of Tailwind.
   ================================================================ */

:root {
  color-scheme: light;
  --brand-50:  #eef2ff;
  --brand-100: #e0e7ff;
  --brand-500: #6366f1;
  --brand-600: #4f46e5;
  --brand-700: #4338ca;
  --brand-900: #312e81;
  --accent:    #ec4899;
  --accent-2:  #06b6d4;
  --ink:       #0f172a;
}

html, body { -webkit-font-smoothing: antialiased; }

/* App background — subtle gradient mesh so no page is flat white/gray. */
body {
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(99, 102, 241, .12), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(236, 72, 153, .10), transparent 60%),
    radial-gradient(700px 400px at 50% -20%, rgba(6, 182, 212, .08), transparent 60%),
    #f8fafc;
  background-attachment: fixed;
}

/* ---------- Spinner ---------- */
.spinner {
  border: 2px solid #e2e8f0;
  border-top-color: #4f46e5;
  border-radius: 9999px;
  width: 1rem; height: 1rem;
  animation: spin .6s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Animations ---------- */
.fade-in { animation: fade .35s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.slide-up { animation: slideUp .4s cubic-bezier(.2,.7,.3,1); }
@keyframes slideUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.pop { animation: pop .35s cubic-bezier(.2,.9,.4,1.3); }
@keyframes pop { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: scale(1); } }

/* Reveal on scroll (added by jQuery). */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Card & surface ---------- */
.card {
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(6px);
  border: 1px solid rgb(226 232 240 / .8);
  border-radius: 1rem;
  box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px -12px rgba(15,23,42,.08);
  transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease;
}
.card:hover { box-shadow: 0 4px 6px rgba(15,23,42,.05), 0 20px 40px -18px rgba(79,70,229,.18); }

/* ---------- Buttons ---------- */
.btn-primary {
  background-image: linear-gradient(135deg, #6366f1 0%, #4f46e5 55%, #7c3aed 100%);
  color: #fff;
  font-weight: 600;
  border-radius: .75rem;
  padding: .625rem 1.1rem;
  box-shadow: 0 6px 14px -6px rgba(79,70,229,.55), inset 0 -2px 0 rgba(0,0,0,.08);
  transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border: none;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -8px rgba(79,70,229,.6); filter: brightness(1.06); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.btn-ghost {
  background: #fff;
  border: 1px solid rgb(203 213 225);
  color: #334155;
  border-radius: .75rem;
  padding: .55rem 1rem;
  font-weight: 600;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
}
.btn-ghost:hover { background: #f8fafc; border-color: #94a3b8; }

/* ---------- Inputs ---------- */
.input, .textarea, .select {
  width: 100%;
  border-radius: .75rem;
  border: 1px solid rgb(203 213 225);
  background: #fff;
  padding: .6rem .85rem;
  transition: border-color .15s ease, box-shadow .15s ease;
  font-size: .925rem;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,.18);
}

/* ---------- Tables ---------- */
table.data td, table.data th { white-space: nowrap; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .875rem; }
.tbl thead th {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  color: #64748b;
  font-weight: 600;
  text-align: left;
  padding: .75rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.tbl tbody td { padding: .8rem 1rem; border-bottom: 1px solid #f1f5f9; }
.tbl tbody tr:hover { background: rgba(238, 242, 255, .5); }
.tbl tbody tr:last-child td { border-bottom: 0; }

/* Status pills */
.pill { display: inline-flex; align-items: center; gap: .35rem; font-size: .72rem; font-weight: 600; padding: .2rem .55rem; border-radius: 9999px; letter-spacing: .02em; }
.pill-ok   { background: #ecfdf5; color: #047857; }
.pill-bad  { background: #fef2f2; color: #b91c1c; }
.pill-warn { background: #fffbeb; color: #b45309; }
.pill-info { background: #eff6ff; color: #1d4ed8; }
.pill-muted{ background: #f1f5f9; color: #475569; }

/* ---------- Nav ---------- */
.nav-glass {
  background: rgba(255,255,255,.75);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid rgba(226,232,240,.75);
}
.nav-link { position: relative; padding: .5rem .85rem; border-radius: .6rem; color: #334155; font-weight: 500; transition: background .15s ease, color .15s ease; }
.nav-link:hover { background: #eef2ff; color: #4338ca; }
.nav-link.active { color: #4338ca; background: #eef2ff; }

.credit-chip {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff; font-weight: 700; font-size: .75rem;
  padding: .35rem .75rem; border-radius: 9999px;
  box-shadow: 0 4px 12px -4px rgba(16,185,129,.5);
  display: inline-flex; align-items: center; gap: .35rem;
}

/* Admin sub-nav pills */
.subnav-tab {
  display: inline-block; padding: .75rem 1rem; font-weight: 600;
  color: #64748b; border-bottom: 2px solid transparent; transition: all .15s ease;
}
.subnav-tab:hover { color: #4338ca; }
.subnav-tab.active { color: #4338ca; border-color: #4f46e5; }

/* ---------- Flash toasts ---------- */
.toast-wrap { position: fixed; top: 5.5rem; right: 1rem; z-index: 60; display: flex; flex-direction: column; gap: .5rem; max-width: 24rem; }
.toast {
  padding: .85rem 1rem; border-radius: .8rem;
  box-shadow: 0 10px 30px -10px rgba(15,23,42,.25);
  font-size: .875rem; font-weight: 500;
  display: flex; align-items: flex-start; gap: .55rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  animation: slideUp .3s ease;
}
.toast-ok  { border-color: #a7f3d0; background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%); color: #065f46; }
.toast-err { border-color: #fecaca; background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%); color: #991b1b; }
.toast-icon { flex-shrink: 0; width: 1.25rem; height: 1.25rem; }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(15,23,42,.55);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  animation: fade .2s ease;
}
.modal-panel {
  background: #fff; border-radius: 1rem; max-width: 32rem; width: 100%;
  box-shadow: 0 25px 80px -20px rgba(15,23,42,.5);
  animation: pop .3s cubic-bezier(.2,.9,.4,1.3);
  overflow: hidden;
}

/* ---------- Utility ---------- */
.gradient-text {
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-blob {
  position: absolute; border-radius: 9999px; filter: blur(60px); opacity: .5;
  pointer-events: none; z-index: 0;
}
.divider { height: 1px; background: linear-gradient(90deg, transparent, #cbd5e1, transparent); }

/* Progress bar */
.progress { height: .5rem; background: #e2e8f0; border-radius: 9999px; overflow: hidden; }
.progress > span { display:block; height: 100%; background: linear-gradient(90deg, #6366f1 0%, #ec4899 100%); transition: width .4s ease; }

/* Mobile menu */
.mobile-menu { display: none; }
.mobile-menu.open { display: block; }

/* Prefer-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Scrollbar polish */
::-webkit-scrollbar { height: 10px; width: 10px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
