/* ============ DZPay core stylesheet ============ */
:root {
  --bg:        #0f172a;
  --bg-soft:   #1e293b;
  --panel:     #ffffff;
  --panel-2:   #f8fafc;
  --text:      #0f172a;
  --muted:     #64748b;
  --border:    #e2e8f0;
  --primary:   #2563eb;
  --primary-d: #1d4ed8;
  --accent:    #06b6d4;
  --success:   #16a34a;
  --warn:      #d97706;
  --danger:    #dc2626;
  --radius:    12px;
  --shadow:    0 1px 3px rgba(15,23,42,.06), 0 8px 24px -12px rgba(15,23,42,.18);
  --mono:      'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
  color: var(--text);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Top bar ---- */
.topbar {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #fff;
  padding: 14px 0;
  border-bottom: 3px solid var(--primary);
}
.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  color: #fff;
  font-weight: 700;
  font-size: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: .3px;
}
.brand-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent);
}
.nav-links {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}
.nav-links a {
  color: #cbd5e1;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  transition: all .15s;
}
.nav-links a:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.nav-links .btn-ghost { background: rgba(220,38,38,.15); color: #fecaca; }

/* ---- Container ---- */
.container { max-width: 1180px; margin: 32px auto; padding: 0 20px; }

/* ---- Cards ---- */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 18px;
}
.card-title {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  display: flex; align-items: center; justify-content: space-between;
}
.card-title .badge { font-size: 11px; padding: 3px 8px; border-radius: 999px; }

/* ---- Forms ---- */
.form-group { margin-bottom: 14px; }
.form-group label { display:block; font-weight: 600; margin-bottom: 6px; font-size: 13px; color: var(--muted); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
.form-group .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  border: 0;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
  background: var(--primary);
  color: #fff;
  gap: 6px;
}
.btn:hover { background: var(--primary-d); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-secondary { background: #e2e8f0; color: var(--text); }
.btn-secondary:hover { background: #cbd5e1; }
.btn-success { background: var(--success); }
.btn-danger { background: var(--danger); }
.btn-warn { background: var(--warn); }
.btn-sm { padding: 6px 10px; font-size: 12px; border-radius: 6px; }
.btn-block { width: 100%; }

/* ---- Alerts ---- */
.alert {
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 14px;
  font-size: 14px;
  border: 1px solid transparent;
}
.alert-success { background: #dcfce7; color: #166534; border-color: #86efac; }
.alert-danger  { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.alert-warn    { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.alert-info    { background: #dbeafe; color: #1e40af; border-color: #93c5fd; }

/* ---- Tables ---- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table.table { width: 100%; border-collapse: collapse; background: #fff; font-size: 14px; }
table.table th, table.table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border); }
table.table th { background: #f8fafc; font-weight: 600; color: #475569; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
table.table tr:last-child td { border-bottom: 0; }
table.table tr:hover td { background: #f8fafc; }

/* ---- Badges ---- */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
}
.badge-PENDING   { background: #fef3c7; color: #92400e; }
.badge-COMPLETED { background: #dcfce7; color: #166534; }
.badge-FAILED    { background: #fee2e2; color: #991b1b; }
.badge-CANCELED  { background: #f1f5f9; color: #475569; }
.badge-EXPIRED   { background: #f1f5f9; color: #64748b; }

/* ---- Stat grid ---- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.stat {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.stat-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.stat-value { font-size: 26px; font-weight: 700; margin-top: 6px; }
.stat-foot  { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ---- Footer ---- */
.footer {
  text-align: center;
  padding: 28px 0;
  color: var(--muted);
  font-size: 13px;
}

/* ---- Code blocks ---- */
pre.code, code.code {
  background: #0f172a; color: #e2e8f0;
  padding: 14px; border-radius: 8px;
  font-family: var(--mono); font-size: 13px;
  overflow-x: auto; display: block;
  line-height: 1.55;
}
code.inline { background: #e2e8f0; padding: 2px 6px; border-radius: 4px; font-family: var(--mono); font-size: 13px; }

/* ---- Pagination ---- */
.pagination { display: flex; gap: 4px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.pagination a, .pagination span {
  padding: 6px 12px; border-radius: 6px; border: 1px solid var(--border);
  font-size: 13px; background: #fff;
}
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---- Misc ---- */
.muted { color: var(--muted); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 14px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.mono { font-family: var(--mono); }
.copy-btn {
  background: transparent; border: 0; cursor: pointer; color: var(--muted);
  font-size: 12px; padding: 2px 6px;
}
.copy-btn:hover { color: var(--primary); }

/* ---- Login / auth pages ---- */
.auth-wrap {
  min-height: calc(100vh - 60px);
  display: flex; align-items: center; justify-content: center;
  padding: 32px 16px;
}
.auth-card {
  width: 100%; max-width: 420px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: var(--shadow);
  padding: 32px;
}
.auth-card h1 { margin: 0 0 6px; font-size: 26px; }
.auth-card .sub { color: var(--muted); margin: 0 0 24px; font-size: 14px; }
.auth-card .alt { text-align: center; margin-top: 18px; font-size: 13px; color: var(--muted); }

/* ---- Landing / hero ---- */
.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  color: #fff;
  border-radius: 16px;
  padding: 56px 36px;
  margin-bottom: 24px;
}
.hero h1 { font-size: 38px; margin: 0 0 12px; }
.hero p { font-size: 17px; opacity: .92; margin: 0 0 22px; max-width: 580px; }
.hero .cta-row { display: flex; gap: 12px; flex-wrap: wrap; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.feature {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow);
}
.feature h3 { margin: 0 0 8px; font-size: 16px; }
.feature p { margin: 0; color: var(--muted); font-size: 14px; }
.feature .icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(37,99,235,.12); color: var(--primary);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; margin-bottom: 10px;
}
