/* ============================================
   NOVAPRISM — Glassmorphic Login Dashboard
   Tema: cahaya terpecah lewat kaca gelap — prisma
   Palet: violet → magenta → cyan di atas near-black
   ============================================ */

:root {
  --bg-base: #05060b;
  --bg-glow-1: #7c3aed;   /* violet */
  --bg-glow-2: #ec4899;   /* magenta */
  --bg-glow-3: #22d3ee;   /* cyan */
  --glass-bg: rgba(255, 255, 255, 0.045);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-highlight: rgba(255, 255, 255, 0.3);
  --prism-border: linear-gradient(135deg, rgba(124,58,237,0.7), rgba(236,72,153,0.5), rgba(34,211,238,0.6));
  --text-primary: #f2f1fb;
  --text-muted: #8b8fa8;
  --accent: #c084fc;
  --accent-2: #22d3ee;
  --accent-soft: rgba(192, 132, 252, 0.18);
  --danger: #fb7185;
  --radius-lg: 22px;
  --radius-md: 14px;
  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;

  /* Ganti nilai ini ke URL gambar kamu untuk custom background */
  --user-bg-image: none;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-primary);
  background-color: var(--bg-base);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Layer background: gradient dekoratif + gambar custom user (jika ada) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: var(--user-bg-image);
  background-size: cover;
  background-position: center;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 60% 50% at 10% 10%, var(--bg-glow-1) 0%, transparent 55%),
    radial-gradient(ellipse 55% 45% at 90% 30%, var(--bg-glow-2) 0%, transparent 55%),
    radial-gradient(ellipse 50% 45% at 50% 95%, var(--bg-glow-3) 0%, transparent 55%),
    rgba(3, 4, 9, 0.72);
  opacity: 0.4;
  mix-blend-mode: screen;
}

.glass {
  position: relative;
  z-index: 1;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(26px) saturate(150%);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 var(--glass-highlight);
}

/* Border gradient tipis ala pecahan prisma, dijalankan lewat pseudo-element
   supaya bisa dipadukan dengan border-radius + backdrop-filter */
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--prism-border);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.55;
  pointer-events: none;
}

/* Kilau tipis di sudut atas kiap-kiap, kesan cahaya kena kaca */
.glass::after {
  content: "";
  position: absolute;
  top: -30%;
  left: -20%;
  width: 60%;
  height: 60%;
  background: radial-gradient(circle, rgba(255,255,255,0.10) 0%, transparent 70%);
  pointer-events: none;
  border-radius: inherit;
}

a { color: inherit; }

/* ---------- Login page ---------- */

.login-wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 380px;
  padding: 40px 36px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

.brand-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  transform: rotate(45deg);
  background: conic-gradient(from 180deg, var(--bg-glow-1), var(--bg-glow-2), var(--bg-glow-3), var(--bg-glow-1));
  box-shadow: 0 0 14px rgba(192, 132, 252, 0.55);
}

.brand-name {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.02em;
}

.login-card h1 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  margin: 0 0 6px;
}

.login-card p.sub {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 28px;
  line-height: 1.5;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.field input::placeholder {
  color: rgba(163, 173, 194, 0.55);
}

.field input:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.09);
}

.btn-primary {
  width: 100%;
  padding: 12px 14px;
  margin-top: 8px;
  border: none;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0b0714;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn-primary:hover {
  box-shadow: 0 0 0 3px var(--accent-soft), 0 0 24px rgba(34, 211, 238, 0.25);
}

.btn-primary:active {
  transform: scale(0.98);
}

.hint {
  margin-top: 18px;
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed var(--glass-border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  line-height: 1.5;
}

.error-msg {
  display: none;
  font-size: 13px;
  color: var(--danger);
  margin-bottom: 14px;
}

.bg-picker {
  margin-top: 22px;
  font-size: 12px;
  color: var(--text-muted);
}

.bg-picker input {
  width: 100%;
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-size: 12px;
}

/* ---------- Dashboard page ---------- */

.dash-wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 28px clamp(16px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
}

.topbar .user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bg-glow-1), var(--bg-glow-2), var(--bg-glow-3));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 13px;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.stat-card {
  padding: 20px 22px;
}

.stat-card .label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.stat-card .value {
  font-family: var(--font-display);
  font-size: 28px;
}

.stat-card .value.accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.panel {
  padding: 24px 26px;
  flex: 1;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.panel-head h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 17px;
  margin: 0;
}

.panel-head p {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead th {
  text-align: left;
  font-weight: 500;
  color: var(--text-muted);
  padding: 10px 12px;
  border-bottom: 1px solid var(--glass-border);
}

tbody td {
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

tbody tr:last-child td {
  border-bottom: none;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
}

.status-pill.success {
  background: rgba(34, 211, 238, 0.15);
  color: var(--accent-2);
}

.status-pill.failed {
  background: rgba(251, 113, 133, 0.15);
  color: var(--danger);
}

.status-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 13px;
}

@media (max-width: 640px) {
  .login-card { padding: 30px 24px; }
  table { font-size: 12px; }
  thead th:nth-child(3), tbody td:nth-child(3) { display: none; }
}
