/* ============================================================
   HyRizz V14 — Nero One Design System
   Theme: #2196f3 blue, Lexend Deca, aliceblue bg, white cards
   ============================================================ */

/* ============================================================
   FONTS
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Lexend+Deca:wght@300;400;500;600;700&family=Orbitron:wght@500;700&display=swap');

/* ============================================================
   CSS VARIABLES (Design Tokens)
   ============================================================ */
:root {
  /* Colors — Light theme (default) */
  --primary: #2196f3;
  --primary-dark: #1976d2;
  --primary-light: #64b5f6;
  --primary-bg: #e3f2fd;

  --success: #4caf50;
  --success-bg: #e8f5e9;
  --warning: #ff9800;
  --warning-bg: #fff3e0;
  --danger: #f44336;
  --danger-bg: #ffebee;
  --info: #00bcd4;
  --info-bg: #e0f7fa;

  --bg: #aliceblue;
  --bg-page: #f0f8ff;
  --card: #ffffff;
  --border: #e3eef9;
  --border-strong: #f1f1f1;
  --hover: #f7fbff;

  --text: #2c3e50;
  --text-muted: #7a8a99;
  --text-light: #aab4bf;

  /* Typography */
  --font-main: 'Lexend Deca', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --font-display: 'Orbitron', 'Lexend Deca', sans-serif;

  /* Sizes */
  --radius: 15px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow: 0 2px 8px rgba(33, 150, 243, 0.08);
  --shadow-lg: 0 8px 24px rgba(33, 150, 243, 0.12);

  --border-bottom: 3px solid #f1f1f1;

  /* Layout */
  --header-h: 60px;
  --sidebar-w: 260px;
  --container: 1200px;

  /* Transitions */
  --transition: 0.25s ease;
}

/* Dark mode override */
[data-theme="dark"] {
  --bg: #0e1620;
  --bg-page: #0a1019;
  --card: #1a2332;
  --border: #2a3848;
  --border-strong: #2a3848;
  --hover: #20303f;

  --text: #e8eef5;
  --text-muted: #8a99a8;
  --text-light: #5a6878;

  --primary-bg: #1c3a5a;
  --success-bg: #1a3a1f;
  --warning-bg: #3a2a14;
  --danger-bg: #3a1a1a;
  --info-bg: #14323a;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);

  --border-bottom: 3px solid #1a2332;
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  background: var(--bg-page);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }
img, svg { max-width: 100%; height: auto; vertical-align: middle; }
button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
}
.container-narrow {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 16px;
}
.page-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.main-content {
  flex: 1;
  padding: 24px 0;
}

/* ============================================================
   AUTH PAGES (login, daftar, lupa-password, reset-password)
   ============================================================ */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: linear-gradient(135deg, #e3f2fd 0%, #f0f8ff 100%);
}
[data-theme="dark"] .auth-wrap {
  background: linear-gradient(135deg, #0e1620 0%, #1a2332 100%);
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border-radius: var(--radius-lg);
  border-bottom: var(--border-bottom);
  padding: 32px 28px;
  box-shadow: var(--shadow-lg);
}
.auth-logo {
  text-align: center;
  margin-bottom: 24px;
}
.auth-logo img {
  width: 80px;
  height: 80px;
  border-radius: var(--radius);
}
.auth-logo h1 {
  font-family: var(--font-display);
  color: var(--primary);
  font-size: 28px;
  letter-spacing: 1px;
  margin-top: 12px;
}
.auth-logo p {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 4px;
}
.auth-title {
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 24px;
  color: var(--text);
}
.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-muted);
}
.auth-footer a { font-weight: 500; }

/* ============================================================
   FORM
   ============================================================ */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text);
}
.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-page);
  color: var(--text);
  transition: var(--transition);
  font-size: 14px;
}
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--card);
  box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}
.form-input.has-error,
.form-textarea.has-error,
.form-select.has-error {
  border-color: var(--danger);
}
.form-input::placeholder { color: var(--text-light); }
.form-textarea { min-height: 90px; resize: vertical; }
.form-help {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}
.form-error {
  font-size: 12px;
  color: var(--danger);
  margin-top: 4px;
}

/* Input dengan icon */
.input-group {
  position: relative;
}
.input-group .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.input-group .form-input { padding-left: 42px; }
.input-group .input-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}
.input-group:has(.input-toggle) .form-input { padding-right: 40px; }

/* Checkbox */
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
}
.checkbox-row input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
}
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover:not(:disabled) { background: var(--primary); color: #fff; }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover:not(:disabled) { background: var(--hover); }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 14px; font-size: 12px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-pill { border-radius: var(--radius-pill); }
.btn-loading { position: relative; color: transparent !important; }
.btn-loading::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 16px; height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  color: #fff;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   ALERTS / TOAST
   ============================================================ */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-left: 3px solid;
}
.alert-icon { flex-shrink: 0; }
.alert-success { background: var(--success-bg); color: #2e7d32; border-color: var(--success); }
.alert-danger  { background: var(--danger-bg); color: #c62828; border-color: var(--danger); }
.alert-warning { background: var(--warning-bg); color: #ef6c00; border-color: var(--warning); }
.alert-info    { background: var(--info-bg); color: #00838f; border-color: var(--info); }

/* Toast (floating notif) */
.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: calc(100vw - 32px);
}
.toast {
  background: var(--card);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  font-size: 13px;
  animation: toastIn 0.3s ease;
}
.toast.toast-success { border-color: var(--success); }
.toast.toast-danger  { border-color: var(--danger); }
.toast.toast-warning { border-color: var(--warning); }
@keyframes toastIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
.toast.toast-out {
  animation: toastOut 0.3s ease forwards;
}
@keyframes toastOut {
  to { transform: translateX(100%); opacity: 0; }
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--card);
  border-radius: var(--radius);
  border-bottom: var(--border-bottom);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.card-header {
  margin: -20px -20px 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-body { /* default */ }
.card-footer {
  margin: 16px -20px -20px;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-page);
  border-radius: 0 0 var(--radius) var(--radius);
}

/* ============================================================
   HEADER / NAVBAR
   ============================================================ */
.navbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 16px;
  max-width: var(--container);
  margin: 0 auto;
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  color: var(--primary);
}
.navbar-brand img { width: 32px; height: 32px; border-radius: 8px; }
.navbar-nav { display: flex; align-items: center; gap: 6px; }
.navbar-link {
  padding: 8px 14px;
  color: var(--text);
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: var(--transition);
}
.navbar-link:hover { background: var(--hover); color: var(--primary); }
.navbar-link.active { background: var(--primary-bg); color: var(--primary); font-weight: 500; }

/* Saldo badge */
.saldo-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
}

/* User dropdown */
.user-dropdown {
  position: relative;
}
.user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  padding: 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text);
}
.user-btn:hover { background: var(--hover); }
.user-avatar {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
}
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 220px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: var(--transition);
  z-index: 200;
  overflow: hidden;
}
.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  color: var(--text);
  font-size: 13px;
  transition: var(--transition);
}
.dropdown-item:hover { background: var(--hover); color: var(--primary); }
.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* Notif bell */
.notif-bell {
  position: relative;
  background: none;
  border: none;
  padding: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text);
}
.notif-bell:hover { background: var(--hover); }
.notif-badge {
  position: absolute;
  top: 4px; right: 4px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: var(--radius-pill);
  min-width: 16px;
  text-align: center;
}

/* ============================================================
   LANDING PAGE
   ============================================================ */
.hero {
  text-align: center;
  padding: 60px 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
}
.hero-logo {
  width: 100px; height: 100px;
  margin: 0 auto 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.hero h1 {
  font-family: var(--font-display);
  font-size: 36px;
  letter-spacing: 2px;
  margin-bottom: 12px;
}
.hero p {
  font-size: 16px;
  opacity: 0.95;
  margin-bottom: 28px;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}
.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero .btn-primary { background: #fff; color: var(--primary); }
.hero .btn-primary:hover { background: #f0f8ff; color: var(--primary-dark); }
.hero .btn-outline { color: #fff; border-color: rgba(255,255,255,0.6); }
.hero .btn-outline:hover { background: rgba(255,255,255,0.1); border-color: #fff; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  padding: 40px 0;
}
.feature-card {
  background: var(--card);
  border-radius: var(--radius);
  border-bottom: var(--border-bottom);
  padding: 24px 20px;
  text-align: center;
  transition: var(--transition);
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.feature-icon {
  width: 56px; height: 56px;
  margin: 0 auto 12px;
  background: var(--primary-bg);
  color: var(--primary);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.feature-card h3 {
  font-size: 16px;
  margin-bottom: 6px;
  color: var(--text);
}
.feature-card p {
  font-size: 13px;
  color: var(--text-muted);
}

/* ============================================================
   BADGE / TAG / CHIP
   ============================================================ */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 500;
}
.badge-primary { background: var(--primary-bg); color: var(--primary-dark); }
.badge-success { background: var(--success-bg); color: #2e7d32; }
.badge-danger  { background: var(--danger-bg); color: #c62828; }
.badge-warning { background: var(--warning-bg); color: #ef6c00; }
.badge-info    { background: var(--info-bg); color: #00838f; }
.badge-muted   { background: var(--hover); color: var(--text-muted); }

/* ============================================================
   TABLE
   ============================================================ */
.table-wrap {
  background: var(--card);
  border-radius: var(--radius);
  overflow-x: auto;
  border-bottom: var(--border-bottom);
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.table th, .table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.table th {
  background: var(--bg-page);
  font-weight: 600;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.table tbody tr:hover { background: var(--hover); }
.table tbody tr:last-child td { border-bottom: 0; }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  backdrop-filter: blur(4px);
}
.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}
.modal {
  background: var(--card);
  border-radius: var(--radius-lg);
  border-bottom: var(--border-bottom);
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
  transform: scale(0.96);
  transition: var(--transition);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-overlay.show .modal { transform: scale(1); }
.modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: 16px;
}
.modal-close {
  background: none;
  border: none;
  font-size: 22px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.modal-body { padding: 20px 22px; }
.modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ============================================================
   LOADING & SKELETON
   ============================================================ */
.spinner {
  display: inline-block;
  width: 20px; height: 20px;
  border: 2.5px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.spinner-lg { width: 40px; height: 40px; border-width: 4px; }
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, var(--hover) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: skeleton 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}
.empty-icon {
  font-size: 56px;
  margin-bottom: 12px;
  opacity: 0.4;
}
.empty h3 {
  font-size: 16px;
  color: var(--text);
  margin-bottom: 6px;
}
.empty p {
  font-size: 13px;
}

/* ============================================================
   UTILITIES
   ============================================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-bold { font-weight: 600; }
.text-sm { font-size: 12px; }
.text-lg { font-size: 16px; }
.text-xl { font-size: 18px; }
.text-2xl { font-size: 22px; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.w-full { width: 100%; }
.hidden { display: none; }
.divider { height: 1px; background: var(--border); margin: 16px 0; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
  .navbar-link { padding: 6px 10px; font-size: 13px; }
  .navbar-brand { font-size: 18px; }
  .hero h1 { font-size: 28px; }
  .hero p { font-size: 14px; }
  .auth-card { padding: 24px 20px; }
  .container { padding: 0 12px; }
  .saldo-badge { font-size: 12px; padding: 6px 10px; }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  .navbar, .footer, .btn, .no-print { display: none !important; }
  .card { box-shadow: none; border: 1px solid #ddd; }
}
