/* =====================
   RESET & BASE
   ===================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f4f6f9;
  color: #1a1a2e;
  font-size: 15px;
  line-height: 1.6;
}

a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

/* =====================
   NAVBAR
   ===================== */
.navbar {
  background: #1e3a5f;
  color: #fff;
  display: flex;
  align-items: center;
  padding: 0 24px;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.navbar-brand {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-right: 32px;
  letter-spacing: 0.5px;
}

.navbar-links {
  display: flex;
  gap: 4px;
  flex: 1;
}

.navbar-links a {
  color: rgba(255,255,255,0.8);
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 14px;
  transition: background 0.15s, color 0.15s;
}

.navbar-links a:hover, .navbar-links a.nav-active {
  background: rgba(255,255,255,0.15);
  color: #fff;
  text-decoration: none;
}

.navbar-links a.nav-logout {
  color: #fca5a5;
  margin-left: auto;
}

.navbar-links a.nav-logout:hover {
  background: rgba(239,68,68,0.2);
  color: #fca5a5;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  margin-left: auto;
}

.nav-mobile {
  display: none;
  flex-direction: column;
  background: #1e3a5f;
  padding: 8px 16px 16px;
}

.nav-mobile a {
  color: rgba(255,255,255,0.85);
  padding: 10px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  font-size: 15px;
}

@media (max-width: 640px) {
  .navbar-links { display: none; }
  .nav-toggle { display: block; }
}

/* =====================
   CONTAINER
   ===================== */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 28px 20px;
}

.page-header {
  margin-bottom: 24px;
}

.page-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: #1e3a5f;
}

.page-header p {
  color: #6b7280;
  margin-top: 4px;
  font-size: 14px;
}

/* =====================
   AUTH PAGE
   ===================== */
.auth-page {
  background: #eef2f7;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-container {
  width: 100%;
  max-width: 440px;
  padding: 16px;
}

.auth-card {
  background: #fff;
  border-radius: 12px;
  padding: 36px 32px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.10);
}

.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}

.auth-logo h1 {
  font-size: 26px;
  font-weight: 800;
  color: #1e3a5f;
}

.auth-logo p {
  color: #6b7280;
  font-size: 13px;
  margin-top: 4px;
}

.auth-note {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 12px;
  text-align: center;
}

.link-back {
  font-size: 13px;
  color: #2563eb;
}

/* =====================
   TABS
   ===================== */
.tab-bar {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
}

.tab-btn {
  flex: 1;
  padding: 10px 8px;
  border: none;
  background: #f9fafb;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  transition: background 0.15s, color 0.15s;
}

.tab-btn.active {
  background: #1e3a5f;
  color: #fff;
}

.tab-btn:hover:not(.active) {
  background: #e5e7eb;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* =====================
   FORMS
   ===================== */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  color: #111827;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

.form-group input:disabled {
  background: #f3f4f6;
  color: #6b7280;
}

/* =====================
   BUTTONS
   ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.15s, transform 0.1s;
}

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

.btn-primary { background: #1e3a5f; color: #fff; }
.btn-primary:hover { background: #163051; }

.btn-secondary { background: #e5e7eb; color: #374151; }
.btn-secondary:hover { background: #d1d5db; }

.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; }

.btn-block { width: 100%; }

/* =====================
   ALERTS
   ===================== */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}

.alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.alert-info { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }

/* =====================
   CARDS
   ===================== */
.card {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 8px rgba(0,0,0,0.07);
  margin-bottom: 20px;
}

.card h3 {
  font-size: 16px;
  font-weight: 700;
  color: #1e3a5f;
  margin-bottom: 6px;
}

.card p {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 16px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 8px;
}

.card-grid-sm {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.info-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px;
}

.info-card.highlight {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.info-card-label {
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-card-value {
  font-size: 18px;
  font-weight: 700;
  color: #1e3a5f;
}

/* =====================
   QUICK LINKS
   ===================== */
.quick-links {
  margin-top: 28px;
}

.quick-links h3 {
  font-size: 15px;
  font-weight: 700;
  color: #1e3a5f;
  margin-bottom: 12px;
}

.quick-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 12px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  text-align: center;
  color: #374151;
  font-size: 13px;
  font-weight: 500;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.quick-card:hover {
  border-color: #2563eb;
  box-shadow: 0 2px 8px rgba(37,99,235,0.1);
  text-decoration: none;
  color: #1e3a5f;
}

.quick-icon { font-size: 24px; }

/* =====================
   TOKEN CARD
   ===================== */
.token-card {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 8px rgba(0,0,0,0.07);
  margin-bottom: 24px;
  border-left: 4px solid #1e3a5f;
}

.token-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: #1e3a5f;
  margin-bottom: 4px;
}

.token-note {
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 14px;
}

.token-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 10px 14px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: #374151;
  word-break: break-all;
  flex-wrap: wrap;
}

.token-box span { flex: 1; }

.btn-copy {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: #1e3a5f;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s;
}

.btn-copy:hover { background: #163051; }

.copy-msg {
  margin-top: 8px;
  font-size: 12px;
  color: #15803d;
  font-weight: 500;
}

.token-meta {
  margin-top: 10px;
  font-size: 13px;
  color: #6b7280;
}

/* =====================
   DETAIL TABLE
   ===================== */
.detail-table {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 8px rgba(0,0,0,0.07);
}

.section-title {
  font-size: 15px;
  font-weight: 700;
  color: #1e3a5f;
  margin-bottom: 10px;
}

.detail-row {
  display: flex;
  padding: 10px 16px;
  border-bottom: 1px solid #f3f4f6;
  font-size: 13px;
}

.detail-row:last-child { border-bottom: none; }

.detail-key {
  width: 180px;
  flex-shrink: 0;
  color: #6b7280;
  text-transform: capitalize;
}

.detail-val {
  color: #111827;
  font-weight: 500;
  word-break: break-all;
}

/* =====================
   DATA TABLE
   ===================== */
.table-wrapper {
  overflow-x: auto;
  border-radius: 12px;
  box-shadow: 0 1px 8px rgba(0,0,0,0.07);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 13px;
}

.data-table th {
  background: #1e3a5f;
  color: #fff;
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}

.data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid #f3f4f6;
  color: #374151;
  white-space: nowrap;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #f9fafb; }

.table-count {
  font-size: 13px;
  color: #6b7280;
  margin-top: 10px;
}

/* =====================
   FILTER CARD
   ===================== */
.filter-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px 24px;
  box-shadow: 0 1px 8px rgba(0,0,0,0.07);
  margin-bottom: 20px;
}

.filter-form {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

.filter-form .form-group {
  margin-bottom: 0;
  flex: 1;
  min-width: 160px;
}

/* =====================
   TWO COLUMN
   ===================== */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 700px) {
  .two-col { grid-template-columns: 1fr; }
}

/* =====================
   QRIS RESULT
   ===================== */
.qris-result {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

.qris-img-wrap {
  text-align: center;
  margin-bottom: 16px;
}

.qris-img {
  max-width: 220px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  padding: 8px;
  background: #fff;
}

.qris-info .detail-row { padding: 8px 0; }

/* =====================
   RAW BOX
   ===================== */
.raw-box {
  background: #1e1e2e;
  color: #cdd6f4;
  border-radius: 8px;
  padding: 14px 16px;
  margin-top: 12px;
  overflow-x: auto;
}

.raw-box pre {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-all;
}

/* =====================
   EMPTY STATE
   ===================== */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: #9ca3af;
  font-size: 14px;
  background: #fff;
  border-radius: 12px;
  border: 1px dashed #d1d5db;
}
