/* ============================================================================
   UPI Gateway — premium dark theme
   Deep navy canvas, glassmorphism surfaces, indigo→violet→cyan accent.
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  --bg: #07080f;
  --bg-2: #0b0d18;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #eef0fa;
  --muted: #9aa1bd;
  --faint: #656b86;
  --brand: #7c6cff;
  --brand-2: #b06bff;
  --cyan: #22d3ee;
  --grad: linear-gradient(135deg, #6d6cff 0%, #a561ff 50%, #22d3ee 120%);
  --grad-soft: linear-gradient(135deg, rgba(109,108,255,.18), rgba(34,211,238,.12));
  --green: #34d399;
  --amber: #fbbf24;
  --red: #fb5b6b;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 12px 40px -12px rgba(124, 108, 255, 0.55);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Space Grotesk', var(--font);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}
/* Ambient gradient mesh */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60vw 50vh at 15% -5%, rgba(109, 108, 255, 0.22), transparent 60%),
    radial-gradient(50vw 45vh at 100% 0%, rgba(34, 211, 238, 0.14), transparent 55%),
    radial-gradient(45vw 45vh at 80% 100%, rgba(176, 107, 255, 0.14), transparent 60%),
    var(--bg);
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }

.container { width: min(1180px, 92vw); margin: 0 auto; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 12px; font-weight: 600; font-size: 14.5px;
  cursor: pointer; border: 1px solid transparent; transition: all .18s ease;
  white-space: nowrap; font-family: var(--font);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--grad); color: #0a0b12; box-shadow: var(--shadow-glow); }
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--border-strong); }
.btn-sm { padding: 7px 13px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-danger { background: rgba(251,91,107,.12); color: #ff8a95; border-color: rgba(251,91,107,.3); }

/* ---- Surfaces ------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.card-pad { padding: 22px; }

/* ---- Forms ---------------------------------------------------------------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
.input, input[type=text], input[type=email], input[type=password], input[type=number], select, textarea {
  width: 100%; padding: 12px 14px; border-radius: 11px; font-size: 14.5px;
  background: rgba(0,0,0,.28); border: 1px solid var(--border); color: var(--text);
  font-family: var(--font); transition: border-color .15s, box-shadow .15s;
}
.input:focus, input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(124,108,255,.22);
}
::placeholder { color: var(--faint); }

/* ---- Pills / badges ------------------------------------------------------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  border: 1px solid var(--border);
}
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-paid { color: var(--green); background: rgba(52,211,153,.1); border-color: rgba(52,211,153,.25); }
.pill-pending { color: var(--amber); background: rgba(251,191,36,.1); border-color: rgba(251,191,36,.25); }
.pill-expired, .pill-failed, .pill-suspended { color: var(--red); background: rgba(251,91,107,.1); border-color: rgba(251,91,107,.25); }
.pill-plain { color: var(--muted); }

/* ---- Tables --------------------------------------------------------------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 560px; }
table.table th {
  text-align: left; padding: 13px 16px; color: var(--faint); font-weight: 600;
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em;
  background: rgba(255,255,255,.02); border-bottom: 1px solid var(--border);
}
table.table td { padding: 13px 16px; border-bottom: 1px solid rgba(255,255,255,.05); }
table.table tr:last-child td { border-bottom: none; }
table.table tbody tr { transition: background .12s; }
table.table tbody tr:hover { background: rgba(255,255,255,.025); }
.mono { font-family: 'Space Grotesk', ui-monospace, monospace; }

/* ---- Stat tiles ----------------------------------------------------------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.stat { position: relative; overflow: hidden; padding: 20px; }
.stat .label { font-size: 12.5px; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 8px; }
.stat .value { font-family: var(--font-display); font-size: 28px; font-weight: 700; margin-top: 8px; letter-spacing: -0.02em; }
.stat .sub { font-size: 12px; color: var(--faint); margin-top: 4px; }
.stat .ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--grad-soft); border: 1px solid var(--border); font-size: 16px; }
.stat-accent::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--grad); }

/* ---- Toast ---------------------------------------------------------------- */
#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: #16182a; border: 1px solid var(--border-strong); color: var(--text);
  padding: 12px 18px; border-radius: 12px; font-size: 14px; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: all .25s; z-index: 999; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.err { border-color: rgba(251,91,107,.5); }

/* ---- Utilities ------------------------------------------------------------ */
.row { display: flex; gap: 12px; align-items: center; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.hidden { display: none !important; }
.mt-0{margin-top:0}.mt-1{margin-top:8px}.mt-2{margin-top:16px}.mt-3{margin-top:24px}.mt-4{margin-top:34px}
.mb-2{margin-bottom:16px}
.section-title { font-size: 20px; margin-bottom: 4px; }
.section-sub { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
