/* ================================================
   style.css — Davv7 AccountInfo
   Semua styling terpusat di satu file CSS
   ================================================ */

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --c-bg:        #000a1d;
  --c-surface:   #e2e2e2;
  --c-border:    rgba(255,255,255,0.55);
  --c-shadow:    rgba(100,110,140,0.12);
  --c-text:      #120907;
  --c-muted:     #7a7f96;
  --c-primary:   #3b6ef5;
  --c-primary-h: #2a5be0;
  --c-success:   #22c55e;
  --c-danger:    #ef4444;
  --c-danger-h:  #dc2626;
  --c-warning:   #f59e0b;
  --radius:      14px;
  --radius-sm:   8px;
  --transition:  0.22s ease;
  --font:        'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
  font-family: var(--font);
  background: var(--c-bg);
  color: var(--c-text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input  { font-family: inherit; }

/* ── Latar Dekoratif (blob) ── */
.bg-blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}
.bg-blob--1 {
  width: 420px; height: 420px;
  background: radial-gradient(circle, #b5c8ff, #dce8ff);
  top: -120px; left: -100px;
}
.bg-blob--2 {
  width: 360px; height: 360px;
  background: radial-gradient(circle, #cfd8f8, #f0e8ff);
  bottom: -80px; right: -80px;
}

/* ───────────────────────────────────────────────
   HALAMAN REGISTER / LOGIN — layout tengah layar
   ─────────────────────────────────────────────── */
.page-register {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

/* ── Glass Card ── */
.glass-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: var(--c-surface);
  backdrop-filter: blur(18px) saturate(1.6);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px var(--c-shadow);
  padding: 40px 36px 32px;
  animation: cardIn 0.45s cubic-bezier(0.22,1,0.36,1) both;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0)   scale(1);    }
}

.glass-card--success { text-align: center; }

/* ── Brand / Logo ── */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.brand__icon {
  font-size: 26px;
  color: var(--c-primary);
  line-height: 1;
}
.brand__name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--c-text);
}
.brand__name span { color: var(--c-primary); }

.card-subtitle {
  font-size: 13px;
  color: var(--c-muted);
  margin-bottom: 24px;
}
.card-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 13px;
}

/* ── Alert ── */
.alert {
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13.5px;
  margin-bottom: 16px;
  border: 1px solid transparent;
  animation: fadeIn 0.2s ease;
}
.alert--error   { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.alert--success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.hidden { display: none !important; }

/* ── Field ── */
.field { margin-bottom: 18px; }
.field__label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--c-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.field__wrap { position: relative; }
.field__input {
  width: 100%;
  padding: 11px 14px;
  background: rgba(255,255,255,0.65);
  border: 1.5px solid rgba(180,190,220,0.5);
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  color: var(--c-text);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.field__input:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(59,110,245,0.12);
  background: #fff;
}
.field__input.error { border-color: var(--c-danger); }
.field__error {
  display: block;
  font-size: 12px;
  color: var(--c-danger);
  margin-top: 4px;
  min-height: 16px;
}
.field__toggle {
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  color: var(--c-muted);
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  transition: color var(--transition);
}
.field__toggle:hover { color: var(--c-primary); }
.field__toggle svg { width: 16px; height: 16px; }
.field__wrap .field__input { padding-right: 40px; }

/* ── Tombol ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  transition: background var(--transition), opacity var(--transition), transform 0.1s;
  user-select: none;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.55; pointer-events: none; }

.btn--primary  { background: var(--c-primary);  color: #fff; width: 100%; margin-top: 4px; }
.btn--primary:hover  { background: var(--c-primary-h); }

.btn--success  { background: var(--c-success);  color: #fff; width: 100%; margin-top: 12px; }
.btn--danger   { background: var(--c-danger);   color: #fff; margin-top: 20px; }
.btn--danger:hover   { background: var(--c-danger-h); }

.btn--outline {
  background: transparent;
  border: 1.5px solid rgba(180,190,220,0.6);
  color: var(--c-text);
}
.btn--outline:hover { border-color: var(--c-primary); color: var(--c-primary); }

.btn--sm { padding: 8px 16px; font-size: 13px; }

/* Spinner di dalam tombol */
.btn__spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Link muted ── */
.link--muted {
  color: var(--c-muted);
  font-size: 13px;
  transition: color var(--transition);
}
.link--muted:hover { color: var(--c-primary); }

/* ── Halaman Sudah Terdaftar ── */
.already-icon {
  width: 60px; height: 60px;
  background: var(--c-success);
  color: #fff;
  font-size: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 20px auto 16px;
}
.already-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; text-align: center; }
.already-desc  { font-size: 13.5px; color: var(--c-muted); text-align: center; line-height: 1.6; }

/* ── Halaman Sukses ── */
.page-success {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}
.success-icon {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--c-primary), var(--c-success));
  color: #fff;
  font-size: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}
.success-title { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.success-desc  { font-size: 14px; color: var(--c-muted); margin-bottom: 24px; line-height: 1.6; }

.credit-box {
  background: rgba(240,244,255,0.8);
  border: 1px solid rgba(180,200,255,0.5);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  text-align: left;
  margin-bottom: 8px;
}
.credit-box__title { font-size: 14px; font-weight: 700; margin-bottom: 10px; color: var(--c-primary); }
.credit-box__list  { list-style: none; }
.credit-box__list li {
  font-size: 13px;
  color: #4a4f6a;
  padding: 3px 0;
  padding-left: 16px;
  position: relative;
  line-height: 1.6;
}
.credit-box__list li::before {
  content: '•';
  position: absolute; left: 0;
  color: var(--c-primary);
}

/* ───────────────────────────────────────────────
   HALAMAN DASHBOARD
   ─────────────────────────────────────────────── */
.page-dashboard {
  background: #f0f2f7;
  min-height: 100vh;
}

/* ── Topbar ── */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(220,225,240,0.7);
  padding: 0 28px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 12px rgba(100,110,140,0.07);
}
.topbar__brand { display: flex; align-items: center; gap: 10px; }
.topbar__title { font-size: 16px; font-weight: 600; letter-spacing: -0.2px; }
.topbar__right { display: flex; align-items: center; gap: 16px; }

/* Badge admin online */
.admin-badge {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--c-muted);
}
.admin-badge__dot {
  width: 8px; height: 8px;
  background: var(--c-success);
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(34,197,94,0.25);
  animation: pulse 2s ease infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 2px rgba(34,197,94,0.25); }
  50%      { box-shadow: 0 0 0 5px rgba(34,197,94,0.08); }
}

/* ── Konten Dashboard ── */
.dashboard-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px 60px;
}

.dashboard-header { margin-bottom: 24px; }
.dashboard-header__title { font-size: 22px; font-weight: 700; letter-spacing: -0.3px; }
.dashboard-header__sub   { font-size: 13.5px; color: var(--c-muted); margin-top: 2px; }

/* ── Statistik ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(220,225,240,0.8);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: 0 2px 10px rgba(100,110,140,0.07);
  display: flex; flex-direction: column; gap: 6px;
}
.stat-card--active { border-left: 3px solid var(--c-success); }
.stat-card__label { font-size: 12px; color: var(--c-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-card__value { font-size: 28px; font-weight: 700; color: var(--c-text); }

/* ── Loading ── */
.loading-wrap {
  display: flex; align-items: center; gap: 12px;
  padding: 40px 0;
  color: var(--c-muted);
  font-size: 14px;
}
.spinner {
  width: 22px; height: 22px;
  border: 2.5px solid rgba(59,110,245,0.2);
  border-top-color: var(--c-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ── Tabel ── */
.table-wrap {
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(220,225,240,0.8);
  border-radius: var(--radius);
  box-shadow: 0 2px 14px rgba(100,110,140,0.08);
  overflow: hidden;
  overflow-x: auto;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.data-table thead tr {
  background: rgba(240,244,255,0.9);
  border-bottom: 1.5px solid rgba(200,210,235,0.7);
}
.data-table th {
  padding: 13px 16px;
  text-align: left;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(220,225,240,0.5);
  color: var(--c-text);
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: rgba(240,244,255,0.5); }

/* Badge status */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.badge--active  { background: #dcfce7; color: #15803d; }
.badge--pending { background: #fef9c3; color: #854d0e; }

/* ── Empty State ── */
.empty-state {
  padding: 60px 0;
  text-align: center;
  color: var(--c-muted);
  font-size: 14px;
}
.empty-state__icon { display: block; font-size: 40px; margin-bottom: 12px; }

/* ───────────────────────────────────────────────
   MODAL
   ─────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(20, 24, 40, 0.45);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fadeIn 0.18s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(20,24,40,0.22);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow: hidden;
  display: flex; flex-direction: column;
  animation: modalIn 0.28s cubic-bezier(0.22,1,0.36,1) both;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to   { opacity: 1; transform: scale(1)    translateY(0);    }
}

.modal__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #eef0f6;
}
.modal__title { font-size: 16px; font-weight: 700; }
.modal__close {
  background: none; border: none;
  color: var(--c-muted);
  font-size: 18px; width: 30px; height: 30px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition), color var(--transition);
}
.modal__close:hover { background: #f0f2f7; color: var(--c-text); }

.modal__body {
  overflow-y: auto;
  padding: 20px 24px;
  flex: 1;
}

/* Grid info di dalam modal */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
}
.info-item { display: flex; flex-direction: column; gap: 3px; }
.info-item__label {
  font-size: 11px; font-weight: 700;
  color: var(--c-muted); text-transform: uppercase; letter-spacing: 0.4px;
}
.info-item__value {
  font-size: 13.5px; color: var(--c-text);
  word-break: break-all;
}

.modal__footer {
  display: flex; gap: 10px;
  padding: 14px 24px 20px;
  border-top: 1px solid #eef0f6;
}

/* ───────────────────────────────────────────────
   RESPONSIVE
   ─────────────────────────────────────────────── */
@media (max-width: 640px) {
  .glass-card { padding: 30px 22px 26px; }
  .topbar { padding: 0 16px; }
  .dashboard-main { padding: 20px 14px 40px; }
  .admin-badge__label { display: none; }
  .info-grid { grid-template-columns: 1fr; }
  .modal__footer { flex-direction: column; }
  .modal__footer .btn { width: 100%; }
}