/* ─── SwiftCard — Dark Blue & Purple Fintech Theme ────── */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:wght@300;400;500&display=swap');

:root {
  --bg:          #080b1a;
  --bg2:         #0d1024;
  --panel:       #111428;
  --border:      #1e2340;
  --blue:        #2563eb;
  --blue-l:      #3b82f6;
  --purple:      #7c3aed;
  --purple-l:    #a78bfa;
  --indigo:      #4f46e5;
  --teal:        #0d9488;
  --green:       #16a34a;
  --red:         #dc2626;
  --amber:       #d97706;
  --text:        #e2e8f0;
  --text-muted:  #64748b;
  --sidebar-w:   240px;
  --radius:      12px;
  --radius-sm:   8px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}

h1,h2,h3,h4,h5 { font-family: 'Syne', sans-serif; }

a { color: var(--purple-l); text-decoration: none; }
a:hover { color: var(--purple-l); text-decoration: underline; }

code { font-family: 'Courier New', monospace; font-size: 12px; background: #1e2340; padding: 2px 6px; border-radius: 4px; }

/* ─── Auth ──────────────────────────────────────────────── */
.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: var(--bg);
}

.auth-bg {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
}
.auth-glow {
  position: absolute; border-radius: 50%; filter: blur(100px); opacity: .35;
}
.g1 { width: 500px; height: 500px; background: var(--purple); top: -100px; left: -100px; }
.g2 { width: 400px; height: 400px; background: var(--blue); bottom: -80px; right: -80px; }

.auth-wrap {
  position: relative; z-index: 1;
  width: 100%; max-width: 520px; padding: 1.5rem;
  display: flex; flex-direction: column; align-items: center; gap: 1.5rem;
}

.auth-brand {
  font-family: 'Syne', sans-serif; font-weight: 800; font-size: 1.7rem;
  color: var(--text); display: flex; align-items: center; gap: .5rem;
  text-decoration: none;
}
.brand-icon { font-size: 1.5rem; }
.brand-text { font-family: 'Syne', sans-serif; font-weight: 800; }

.auth-card {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 0 60px rgba(124,58,237,.12);
}

.auth-card h2 { font-size: 1.6rem; margin-bottom: .25rem; }
.auth-sub { color: var(--text-muted); margin-bottom: 1.5rem; }
.auth-switch { margin-top: 1.25rem; text-align: center; color: var(--text-muted); font-size: .9rem; }

/* ─── Forms ─────────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: .85rem; color: var(--text-muted); margin-bottom: .4rem; font-weight: 500; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: .65rem .9rem;
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-family: 'DM Sans', sans-serif;
  transition: border-color .2s;
}
.form-group input:focus,
.form-group select:focus { outline: none; border-color: var(--purple); }
.form-group small { color: var(--text-muted); font-size: .8rem; margin-top: .3rem; display: block; }

.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.select-sm, .input-sm {
  background: var(--bg2); border: 1px solid var(--border); color: var(--text);
  padding: .4rem .7rem; border-radius: var(--radius-sm); font-size: .85rem; font-family: 'DM Sans',sans-serif;
}

/* ─── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .4rem; padding: .65rem 1.4rem;
  border-radius: var(--radius-sm); border: none; cursor: pointer;
  font-family: 'Syne', sans-serif; font-weight: 600; font-size: .9rem;
  transition: all .2s; text-decoration: none;
}
.btn-primary   { background: linear-gradient(135deg, var(--purple), var(--blue)); color: #fff; }
.btn-primary:hover { opacity: .88; transform: translateY(-1px); text-decoration: none; color: #fff; }
.btn-ghost     { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--purple-l); color: var(--purple-l); text-decoration: none; }
.btn-warn      { background: var(--amber); color: #000; }
.btn-success   { background: var(--green); color: #fff; }
.btn-danger    { background: var(--red); color: #fff; }
.btn-sm        { padding: .35rem .9rem; font-size: .82rem; }
.btn-full      { width: 100%; margin-top: .75rem; }

/* ─── Alerts ────────────────────────────────────────────── */
.alert {
  padding: .8rem 1rem; border-radius: var(--radius-sm);
  margin-bottom: 1rem; font-size: .9rem; border-left: 3px solid;
}
.alert-success { background: rgba(22,163,74,.12); border-color: var(--green); color: #4ade80; }
.alert-error   { background: rgba(220,38,38,.12); border-color: var(--red); color: #f87171; }
.alert-warning { background: rgba(217,119,6,.12); border-color: var(--amber); color: #fbbf24; }

/* ─── Dashboard layout ──────────────────────────────────── */
.dash-body { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: var(--panel);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 100;
  transition: transform .3s;
}
.sidebar-brand {
  padding: 1.4rem 1.2rem;
  display: flex; align-items: center; gap: .5rem;
  font-family: 'Syne',sans-serif; font-weight: 800; font-size: 1.2rem;
  border-bottom: 1px solid var(--border);
}
.sidebar-nav { flex: 1; padding: 1rem .75rem; display: flex; flex-direction: column; gap: .25rem; }
.nav-link {
  display: flex; align-items: center; gap: .7rem;
  padding: .6rem .8rem; border-radius: var(--radius-sm);
  color: var(--text-muted); font-size: .9rem;
  transition: all .2s; text-decoration: none;
}
.nav-link:hover { background: rgba(124,58,237,.12); color: var(--purple-l); text-decoration: none; }
.nav-link.active { background: rgba(124,58,237,.2); color: var(--purple-l); font-weight: 600; }
.nav-icon { font-size: 1rem; }
.nav-divider { color: var(--text-muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; padding: .8rem .8rem .3rem; }
.sidebar-logout {
  margin: 1rem .75rem;
  display: flex; align-items: center; gap: .7rem;
  padding: .6rem .8rem; border-radius: var(--radius-sm);
  color: var(--red); font-size: .9rem; text-decoration: none;
  border: 1px solid rgba(220,38,38,.2);
}
.sidebar-logout:hover { background: rgba(220,38,38,.1); text-decoration: none; }

.dash-main { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
  background: var(--panel); border-bottom: 1px solid var(--border);
  padding: .9rem 1.5rem; display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
}
.topbar-right { display: flex; align-items: center; gap: 1rem; }
.topbar-user { color: var(--text-muted); font-size: .9rem; }
.sidebar-toggle { display: none; background: none; border: none; color: var(--text); font-size: 1.3rem; cursor: pointer; }

.dash-content { padding: 1.75rem; flex: 1; }

/* ─── Stats ─────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.stats-5    { grid-template-columns: repeat(5, 1fr); }

.stat-card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem 1.5rem;
  position: relative; overflow: hidden;
}
.stat-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
}
.accent-blue::before   { background: var(--blue); }
.accent-purple::before { background: var(--purple); }
.accent-indigo::before { background: var(--indigo); }
.accent-teal::before   { background: var(--teal); }
.accent-green::before  { background: var(--green); }

.stat-label { color: var(--text-muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: .4rem; }
.stat-value { font-family: 'Syne',sans-serif; font-size: 1.8rem; font-weight: 700; margin-bottom: .5rem; }
.stat-action { font-size: .82rem; color: var(--purple-l); }

/* ─── Section header ─────────────────────────────────────── */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.section-header h3 { font-size: 1.1rem; }

/* ─── Virtual Cards ──────────────────────────────────────── */
.cards-row  { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.25rem; }

.vcard, .vcard-big {
  background: linear-gradient(135deg, #1a1f4e 0%, #0f1535 60%, #1a0a3e 100%);
  border: 1px solid rgba(124,58,237,.25);
  border-radius: 16px; padding: 1.25rem; position: relative;
  overflow: hidden; transition: transform .2s, box-shadow .2s;
}
.vcard:hover, .vcard-big:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(124,58,237,.2);
}
.vcard.blocked, .vcard-big.blocked { opacity: .6; }
.vcard.terminated, .vcard-big.terminated { opacity: .4; filter: grayscale(.7); }

.vcard-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: .9rem; }
.vcard-chip { font-family: 'Syne',sans-serif; font-weight: 700; font-size: .9rem; color: var(--purple-l); }
.vcard-badge {
  font-size: .72rem; padding: .2rem .6rem; border-radius: 20px; font-weight: 600; text-transform: uppercase;
}
.vcard-badge.active    { background: rgba(22,163,74,.2); color: #4ade80; }
.vcard-badge.blocked   { background: rgba(217,119,6,.2); color: #fbbf24; }
.vcard-badge.terminated{ background: rgba(220,38,38,.2); color: #f87171; }

.vcard-pan {
  font-family: 'Courier New', monospace; font-size: 1.15rem; letter-spacing: .15em;
  margin-bottom: .9rem; color: #c7d2fe;
}
.vcard-bottom, .vcard-row {
  display: flex; gap: 1.5rem; flex-wrap: wrap;
}
.vcard-meta-label { font-size: .68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.vcard-meta-val   { font-family: 'Syne',sans-serif; font-size: .9rem; font-weight: 600; }
.vcard-meta-val.highlight { color: var(--purple-l); }

.vcard-actions { margin-top: 1rem; display: flex; gap: .5rem; flex-wrap: wrap; }

/* ─── Tables ─────────────────────────────────────────────── */
.table-wrap {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); overflow-x: auto;
}
.data-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.data-table thead th {
  background: var(--bg2); padding: .8rem 1rem; text-align: left;
  color: var(--text-muted); font-size: .78rem; text-transform: uppercase;
  letter-spacing: .06em; border-bottom: 1px solid var(--border);
}
.data-table tbody td { padding: .75rem 1rem; border-bottom: 1px solid var(--border); }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: rgba(255,255,255,.02); }

.empty-row { padding: 2rem; text-align: center; color: var(--text-muted); }

.text-green { color: #4ade80; font-weight: 600; }
.text-red   { color: #f87171; font-weight: 600; }
.text-muted { color: var(--text-muted); }

/* ─── Badges ─────────────────────────────────────────────── */
.badge {
  display: inline-block; font-size: .73rem; padding: .2rem .6rem;
  border-radius: 20px; font-weight: 600; text-transform: capitalize;
}
.badge-success { background: rgba(22,163,74,.15); color: #4ade80; }
.badge-pending  { background: rgba(217,119,6,.15); color: #fbbf24; }
.badge-failed   { background: rgba(220,38,38,.15); color: #f87171; }
.badge-type     { background: rgba(79,70,229,.15); color: #a5b4fc; }

/* ─── Panel ─────────────────────────────────────────────── */
.panel {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
}
.panel-title { font-size: 1rem; margin-bottom: .4rem; }
.panel-sub   { color: var(--text-muted); font-size: .88rem; margin-bottom: 1.25rem; }

.fund-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }

/* ─── Empty state ────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 3rem 1rem;
  color: var(--text-muted);
}
.empty-icon { font-size: 3rem; margin-bottom: 1rem; }

/* ─── Modal ──────────────────────────────────────────────── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.6); z-index: 200;
  align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); width: 100%; max-width: 460px;
  margin: 1rem; box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border);
}
.modal-header h4 { font-size: 1rem; }
.modal-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1.1rem; }
.modal-body { padding: 1.5rem; }

/* ─── Pagination ─────────────────────────────────────────── */
.pagination { display: flex; gap: .4rem; margin-top: 1rem; }
.page-link {
  padding: .35rem .75rem; border-radius: var(--radius-sm);
  background: var(--panel); border: 1px solid var(--border);
  color: var(--text-muted); font-size: .85rem;
}
.page-link.active { background: var(--purple); color: #fff; border-color: var(--purple); }
.page-link:hover  { border-color: var(--purple); text-decoration: none; }

/* ─── Landing page ───────────────────────────────────────── */
.landing { overflow-x: hidden; }
.hero {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 2rem; position: relative; overflow: hidden;
  background: radial-gradient(ellipse at center, #1a1040 0%, var(--bg) 70%);
}
.hero-badge { display: inline-flex; align-items: center; gap: .5rem; background: rgba(124,58,237,.15); border: 1px solid rgba(124,58,237,.3); padding: .4rem 1rem; border-radius: 20px; color: var(--purple-l); font-size: .85rem; margin-bottom: 1.5rem; }
.hero h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 1.1; margin-bottom: 1.25rem; }
.hero h1 span { background: linear-gradient(135deg, var(--blue-l), var(--purple-l)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-sub { color: var(--text-muted); font-size: 1.15rem; max-width: 560px; margin-bottom: 2.5rem; }
.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }

.features { padding: 5rem 2rem; text-align: center; }
.features h2 { font-size: 2rem; margin-bottom: 3rem; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.5rem; max-width: 960px; margin: 0 auto; }
.feature-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.75rem; text-align: left; }
.feature-icon { font-size: 2rem; margin-bottom: 1rem; }
.feature-card h4 { margin-bottom: .5rem; }
.feature-card p { color: var(--text-muted); font-size: .9rem; }

.nav-bar { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 2.5rem; border-bottom: 1px solid var(--border); background: rgba(8,11,26,.8); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 50; }
.nav-links { display: flex; gap: 2rem; }
.nav-links a { color: var(--text-muted); font-size: .92rem; }
.nav-links a:hover { color: var(--text); text-decoration: none; }

.ref { font-size: .75rem; }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .stats-5 { grid-template-columns: repeat(2, 1fr); }
  .fund-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-toggle { display: block; }
  .dash-main { margin-left: 0; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-row-2 { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .dash-content { padding: 1rem; }
}
