/* ============================================================
   RankoGroup Affiliate — Slate Night + Gold accent
   ============================================================ */

:root {
  --bg-base:    #020617;
  --bg-card:    #0f172a;
  --bg-hover:   #1e293b;
  --border:     #334155;
  --text-primary:   #f8fafc;
  --text-secondary: #94a3b8;
  --accent:     #eab308;
  --accent-hover: #ca8a04;
  --success:    #22c55e;
  --warning:    #eab308;
  --danger:     #ef4444;
  --font:       -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius:     10px;
  --shadow:     0 4px 24px rgba(0,0,0,0.4);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
  border: none;
  text-decoration: none;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-hover);
  text-decoration: none;
}
.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--bg-hover);
  text-decoration: none;
}
.btn-lg {
  padding: 0.85rem 2rem;
  font-size: 1rem;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

/* Form elements */
label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}
input,
select,
textarea {
  width: 100%;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.95rem;
  padding: 0.6rem 0.9rem;
  transition: border-color 0.15s;
  outline: none;
  font-family: var(--font);
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
}
input::placeholder {
  color: #555;
}

.field {
  margin-bottom: 1.1rem;
}

/* Badge */
.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-pending  { background: rgba(234,179,8,0.15);  color: var(--warning); }
.badge-approved { background: rgba(34,197,94,0.15);  color: var(--success); }
.badge-paid     { background: rgba(234,179,8,0.15); color: var(--accent); }
.badge-refunded { background: rgba(239,68,68,0.15);  color: var(--danger); }

/* Alert */
.alert {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.alert-error   { background: rgba(239,68,68,0.12);   border: 1px solid rgba(239,68,68,0.3);   color: #fca5a5; }
.alert-success { background: rgba(34,197,94,0.12);   border: 1px solid rgba(34,197,94,0.3);   color: #86efac; }

/* Table */
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
th {
  text-align: left;
  padding: 0.6rem 0.8rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  font-weight: 500;
}
td {
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg-hover); }

/* Utilities */
.text-accent    { color: var(--accent); }
.text-secondary { color: var(--text-secondary); }
.text-success   { color: var(--success); }
.text-center    { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }
.gap-2 { gap: 1rem; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }

/* Stat card */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}
.stat-card .label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.stat-card .value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 0.25rem;
}
.stat-card .value.accent { color: var(--accent); }

/* Page heading */
.page-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

/* Code / copy */
.copy-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.copy-field input {
  flex: 1;
  font-family: "Courier New", monospace;
  font-size: 0.85rem;
  color: var(--accent);
}
.copy-btn {
  padding: 0.5rem 0.8rem;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.8rem;
  white-space: nowrap;
  transition: color 0.15s;
}
.copy-btn:hover { color: var(--accent); }

/* Responsive */
@media (max-width: 640px) {
  .btn-lg { width: 100%; }
  .hide-mobile { display: none !important; }
}
