/* ============================================================
   LikeeDiamond Authentication Platform — Design System
   Premium dark fintech UI. Applies globally; no JS coupling.
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, monospace;

    /* Brand */
    --brand-500: #ec4899;
    --brand-600: #db2777;
    --brand-400: #f472b6;
    --accent-violet: #8b5cf6;
    --accent-cyan: #22d3ee;

    /* Surfaces */
    --bg-base: #080b16;
    --surface-1: rgba(17, 24, 39, 0.72);
    --surface-2: rgba(23, 31, 48, 0.85);
    --border-soft: rgba(148, 163, 184, 0.12);
    --border-strong: rgba(148, 163, 184, 0.2);

    --radius: 16px;
    --shadow-card: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px -12px rgba(0,0,0,.65);
    --shadow-glow: 0 8px 30px -8px rgba(236, 72, 153, 0.35);
}

* { -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    letter-spacing: -0.011em;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    background-color: var(--bg-base);
    background-image:
        radial-gradient(1200px 600px at 12% -8%, rgba(236, 72, 153, 0.10), transparent 60%),
        radial-gradient(1000px 520px at 100% 0%, rgba(139, 92, 246, 0.10), transparent 55%),
        radial-gradient(900px 600px at 50% 120%, rgba(34, 211, 238, 0.06), transparent 60%);
    background-attachment: fixed;
}

.font-mono { font-family: var(--font-mono); font-feature-settings: "tnum" 1; }

/* Headings a touch tighter for a premium feel */
h1, h2, h3 { letter-spacing: -0.02em; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(148,163,184,.35), rgba(100,116,139,.25));
    border-radius: 9999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(236, 72, 153, 0.55); background-clip: padding-box; }
* { scrollbar-width: thin; scrollbar-color: rgba(148,163,184,.35) transparent; }

::selection { background: var(--brand-500); color: #fff; }

/* ---------- Glass cards ---------- */
.glass-card {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0) 40%),
        var(--surface-1);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-card);
    transition: transform .25s cubic-bezier(.2,.7,.3,1), border-color .25s, box-shadow .25s;
}
.glass-card:hover { border-color: var(--border-strong); }

.glass-card-hover { transition: transform .25s cubic-bezier(.2,.7,.3,1), border-color .25s, box-shadow .25s; }
.glass-card-hover:hover {
    transform: translateY(-3px);
    border-color: rgba(236, 72, 153, 0.35);
    box-shadow: var(--shadow-glow);
}

/* Stat cards: subtle animated top accent on hover */
.grid > .glass-card { position: relative; overflow: hidden; }
.grid > .glass-card::before {
    content: "";
    position: absolute; inset: 0 0 auto 0; height: 2px;
    background: linear-gradient(90deg, transparent, var(--brand-500), var(--accent-violet), transparent);
    opacity: 0; transition: opacity .3s;
}
.grid > .glass-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-glow); }
.grid > .glass-card:hover::before { opacity: 1; }

/* ---------- Buttons: micro-interactions (complements Tailwind colors) ---------- */
button { transition: transform .12s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease; }
button:not(:disabled):active { transform: translateY(1px) scale(.985); }
button:disabled { opacity: .5; cursor: not-allowed; }

/* Primary pink buttons get a richer gradient + glow without changing markup */
button.bg-pink-600, a.bg-pink-600, button.bg-pink-500 {
    background-image: linear-gradient(135deg, var(--brand-500), var(--brand-600));
    box-shadow: 0 6px 18px -6px rgba(236, 72, 153, 0.5);
}
button.bg-pink-600:hover, button.bg-pink-500:hover {
    box-shadow: 0 10px 26px -6px rgba(236, 72, 153, 0.65);
}

/* ---------- Form fields: consistent focus ring (box-shadow wins over TW border) ---------- */
input, select, textarea { transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease; }
input:focus, select:focus, textarea:focus,
input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.25);
    border-color: var(--brand-500) !important;
}
::placeholder { color: rgba(148, 163, 184, 0.55); }
select option { background: #0f172a; color: #e2e8f0; }

/* ---------- Tables ---------- */
table thead th { position: sticky; top: 0; backdrop-filter: blur(6px); }
tbody tr { transition: background-color .15s ease; }

/* ---------- Nav items ---------- */
.nav-item { position: relative; transition: background-color .2s, color .2s, border-color .2s, transform .15s; }
.nav-item:hover { transform: translateX(2px); }
.nav-item.bg-pink-500\/10 { box-shadow: inset 0 0 0 1px rgba(236,72,153,.18), 0 6px 18px -10px rgba(236,72,153,.5); }

/* ---------- Modals ---------- */
[id^="modal"] { animation: fadeIn .2s ease; }
[id^="modal"] > div { animation: popIn .22s cubic-bezier(.2,.8,.2,1); }

/* ---------- Animations ---------- */
@keyframes softPulse { 0%,100% { opacity: 1; transform: scale(1);} 50% { opacity: .7; transform: scale(.97);} }
.animate-soft-pulse { animation: softPulse 2s cubic-bezier(.4,0,.6,1) infinite; }

@keyframes spinSlow { to { transform: rotate(360deg); } }
.animate-spin-slow { animation: spinSlow 4s linear infinite; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

@keyframes fadeUp { from { opacity: 0; transform: translateY(10px);} to { opacity: 1; transform: translateY(0);} }
section[id^="view-"]:not(.hidden) { animation: fadeUp .35s ease both; }

/* ---------- Loading shimmer skeleton ---------- */
.skeleton {
    background: linear-gradient(90deg, rgba(148,163,184,.08) 25%, rgba(148,163,184,.18) 37%, rgba(148,163,184,.08) 63%);
    background-size: 400% 100%;
    animation: shimmer 1.4s ease infinite;
    border-radius: 8px;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
