/* ═══════════════════════════════════════════════════
   SAFR PROJECT — CSS: Fitur Keagenan
   Tambahkan ke css/components.css
   ═══════════════════════════════════════════════════ */

/* ── Badge Tier ───────────────────────────────────── */
.badge-tier {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge-mitra    { background: #f1f5f9; color: #475569; }
.badge-silver   { background: #e2e8f0; color: #1e293b; border: 1px solid #cbd5e1; }
.badge-gold     { background: #fef9c3; color: #a16207; border: 1px solid #fde68a; }
.badge-platinum { background: #f3e8ff; color: #7e22ce; border: 1px solid #d8b4fe; }

/* ── Badge Status (generic) ──────────────────────── */
.badge-status {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 600;
}

/* ── Stat Card (Keagenan) ───────────────────────── */
.agen-stat-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  box-shadow: 0 1px 3px 0 rgba(0,0,0,.06);
}

/* ── Form helpers ─────────────────────────────────── */
.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: #6b7280;
  margin-bottom: 0.25rem;
}
.form-input {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.form-input:focus {
  border-color: #E8593C;
  box-shadow: 0 0 0 3px rgba(232,89,60,0.15);
}

/* ── Tier progress bar ────────────────────────────── */
.tier-progress-track {
  height: 6px;
  background: #e5e7eb;
  border-radius: 9999px;
  overflow: hidden;
}
.tier-progress-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.6s ease;
}
.tier-fill-mitra    { background: #94a3b8; }
.tier-fill-silver   { background: #64748b; }
.tier-fill-gold     { background: #eab308; }
.tier-fill-platinum { background: #a855f7; }

/* ── Layout helpers untuk view Keagenan ──────────────────────── */
#agen-root {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.agen-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.agen-page-title {
  font-family: var(--fh);
  font-size: 20px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: 0.5px;
}

.agen-page-sub {
  font-size: 12px;
  color: var(--w4);
  margin-top: 2px;
}

/* Toolbar filter row */
.agen-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

/* Table wrapper with dark card style */
.agen-table-wrap {
  background: var(--black3);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

/* Tier badge overrides for dark theme */
.badge-tier {
  font-family: var(--fh);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 10px;
}
.badge-mitra    { background: var(--w5); color: var(--w3); }
.badge-silver   { background: rgba(100,116,139,0.15); color: #94a3b8; border: 1px solid rgba(100,116,139,0.3); }
.badge-gold     { background: var(--amber-dim); color: var(--amber); border: 1px solid rgba(251,191,36,0.3); }
.badge-platinum { background: var(--purple-dim); color: var(--purple); border: 1px solid rgba(167,139,250,0.3); }

/* Modal shim dark theme override */
.modal-shim-overlay .modal-shim-confirm {
  background: var(--orange) !important;
  color: #fff !important;
}

/* Search input full-width variant */
.agen-toolbar .search-input {
  width: 100%;
}

/* Metric card responsive */
@media (max-width: 600px) {
  .metrics-row { grid-template-columns: repeat(2,1fr); }
  .agen-page-header { flex-direction: column; align-items: flex-start; }
}
