:root {
  color-scheme: dark;
  --bg: #070A0F;
  --surface: #0E131E;
  --surface-elevated: #141B2A;
  --surface-card: #111724;
  --border: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.05);
  --border-gold: rgba(212, 184, 120, 0.28);
  --border-cyan: rgba(112, 197, 212, 0.25);
  --border-green: rgba(34, 197, 94, 0.28);
  --text: #F3F4F6;
  --text-muted: #94A3B8;
  --text-dim: #64748B;
  --gold: #D4B878;
  --gold-light: #E5CE96;
  --gold-glow: rgba(212, 184, 120, 0.15);
  --cyan: #70C5D4;
  --cyan-light: #90DCE8;
  --cyan-glow: rgba(112, 197, 212, 0.15);
  --green: #22C55E;
  --green-light: #4ADE80;
  --green-glow: rgba(34, 197, 94, 0.15);
  --amber: #F59E0B;
  --red: #EF4444;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  background: var(--bg);
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(212, 184, 120, 0.07) 0%, transparent 50%),
    radial-gradient(circle at 10% 20%, rgba(112, 197, 212, 0.05) 0%, transparent 40%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--cyan);
  text-decoration: none;
  transition: all 0.2s ease;
}
a:hover {
  color: var(--cyan-light);
  text-decoration: underline;
}

/* NAVBAR */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(7, 10, 15, 0.85);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
}
.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand-logo {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}
.brand-title {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 2px;
}
.brand-title .w { color: var(--gold); }
.brand-title .r { color: var(--cyan); }
.brand-tag {
  background: rgba(212, 184, 120, 0.12);
  color: var(--gold-light);
  border: 1px solid rgba(212, 184, 120, 0.25);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 2px 7px;
  border-radius: 4px;
  margin-left: 6px;
}

.badge-official {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid var(--border-green);
  color: var(--green-light);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.15);
}
.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.btn-nav {
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-nav-ghost {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-nav-ghost:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  text-decoration: none;
}
.btn-nav-logout {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #F87171;
  cursor: pointer;
}
.btn-nav-logout:hover {
  background: rgba(239, 68, 68, 0.2);
}

/* MAIN CONTAINER */
main {
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  padding: 24px;
  flex: 1;
}

/* SYSTEM NOTIFICATION / STATUS */
#message {
  padding: 12px 18px;
  border-radius: 10px;
  background: rgba(14, 25, 38, 0.9);
  border: 1px solid var(--border-cyan);
  color: #BAE6FD;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
#message::before {
  content: 'ℹ️';
  font-size: 15px;
}

/* LOGIN SECTION (STATE AWAL) */
.auth-hero-card {
  background: linear-gradient(180deg, rgba(20, 27, 42, 0.8) 0%, rgba(14, 19, 30, 0.95) 100%);
  border: 1px solid var(--border-gold);
  border-radius: 20px;
  padding: 48px 40px;
  text-align: center;
  max-width: 760px;
  margin: 32px auto;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), 0 0 32px rgba(212, 184, 120, 0.08);
  position: relative;
  overflow: hidden;
}
.auth-hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), var(--cyan), transparent);
}
.eyebrow {
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: block;
}
h1 {
  font-size: clamp(26px, 4.5vw, 42px);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -1px;
  color: #FFF;
  margin-bottom: 16px;
}
.hero-desc {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 28px;
  line-height: 1.6;
}

.feature-pill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 28px 0;
  text-align: left;
}
.feature-pill {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  padding: 14px 16px;
  border-radius: 12px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.feature-pill-icon {
  font-size: 20px;
  line-height: 1;
}
.feature-pill-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.feature-pill-desc {
  font-size: 11px;
  color: var(--text-dim);
}

.login-cta-box {
  background: rgba(11, 15, 23, 0.9);
  border: 1px solid var(--border-cyan);
  border-radius: 14px;
  padding: 24px;
  margin-top: 28px;
}
.login-cta-box p {
  font-size: 14px;
  color: #E2E8F0;
  margin-bottom: 16px;
}
.btn-primary-tg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #D4B878 0%, #C5A457 50%, #A58332 100%);
  color: #080B10;
  font-weight: 800;
  font-size: 15px;
  padding: 14px 28px;
  border-radius: 12px;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(212, 184, 120, 0.3);
  transition: all 0.2s ease;
}
.btn-primary-tg:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(212, 184, 120, 0.45);
  color: #080B10;
  text-decoration: none;
}

/* ACTIVATE SECTION */
.activate-card {
  max-width: 640px;
  margin: 32px auto;
  background: var(--surface-card);
  border: 1px solid var(--border-gold);
  border-radius: 18px;
  padding: 36px 32px;
  box-shadow: var(--shadow);
}
.terms-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  font-size: 13px;
  color: var(--text-muted);
  margin: 20px 0;
  max-height: 180px;
  overflow-y: auto;
}
.check-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #E2E8F0;
  margin: 20px 0;
  cursor: pointer;
}
.check-label input {
  width: 20px;
  height: 20px;
  accent-color: var(--gold);
}

/* DASHBOARD */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
  padding: 12px 0 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}
.dash-title-group h1 {
  font-size: clamp(24px, 3.5vw, 36px);
  margin-bottom: 6px;
}
.dash-subtitle {
  color: var(--text-muted);
  font-size: 14px;
}
.btn-admin-link {
  background: rgba(212, 184, 120, 0.12);
  border: 1px solid var(--border-gold);
  color: var(--gold-light);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.btn-admin-link:hover {
  background: rgba(212, 184, 120, 0.22);
  text-decoration: none;
}

/* METRICS GRID */
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.metrics article {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 18px;
  position: relative;
  transition: all 0.2s ease;
  overflow: hidden;
}
.metrics article:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
}
.metrics span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.metrics strong {
  display: block;
  font-family: var(--font);
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 800;
  color: #FFF;
  margin-top: 8px;
  letter-spacing: -0.5px;
}

/* Specific highlight cards */
.metrics article:nth-child(1) { /* Saldo Tersedia / Siap Cair */
  border-color: var(--border-green);
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.08) 0%, var(--surface-card) 100%);
}
.metrics article:nth-child(1) strong {
  color: #4ADE80;
  text-shadow: 0 0 16px rgba(74, 222, 128, 0.3);
}
.metrics article:nth-child(2) { /* Ditahan / Dalam Proses */
  border-color: rgba(245, 158, 11, 0.25);
}
.metrics article:nth-child(2) strong {
  color: #FBBF24;
}
.metrics article:nth-child(3) { /* Total Komisi */
  border-color: var(--border-gold);
}
.metrics article:nth-child(3) strong {
  color: var(--gold-light);
}
.metrics article:nth-child(4) { /* Sudah Ditransfer */
  border-color: var(--border-cyan);
}
.metrics article:nth-child(4) strong {
  color: var(--cyan-light);
}

/* PANELS & GRIDS */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 28px;
}
article {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  position: relative;
}
h2 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: #FFF;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
p.card-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 18px;
  line-height: 1.5;
}

/* FORMS & INPUTS */
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 14px;
  margin-bottom: 6px;
}
input, select, button {
  font-family: var(--font);
  font-size: 14px;
  border-radius: 10px;
}
input, select {
  width: 100%;
  padding: 12px 14px;
  background: #0B0F17;
  color: #FFF;
  border: 1px solid rgba(255, 255, 255, 0.12);
  outline: none;
  transition: all 0.2s ease;
}
input:focus, select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 184, 120, 0.15);
}
input[readonly] {
  background: rgba(255, 255, 255, 0.03);
  color: var(--cyan-light);
  font-family: var(--mono);
  font-size: 13px;
}

button {
  background: linear-gradient(135deg, #D4B878 0%, #C5A457 100%);
  color: #080B10;
  font-weight: 800;
  border: none;
  padding: 12px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
button:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  filter: none;
}
button.secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text);
}
button.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #FFF;
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

/* FUNNEL & LISTS */
.list, #funnel {
  border: 1px solid var(--border-subtle);
  background: rgba(11, 15, 23, 0.6);
  border-radius: 12px;
  overflow: hidden;
}
.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 13px;
}
.row:last-child {
  border-bottom: none;
}
.row span {
  color: var(--text-muted);
}
.row strong {
  color: #FFF;
  font-weight: 700;
  font-family: var(--mono);
}

/* REKENING PILLS */
#destinations p {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
#destinations p button {
  padding: 4px 10px;
  font-size: 11px;
  border-radius: 6px;
  margin-left: auto;
}

.section-log {
  margin-top: 32px;
}
.section-log h2 {
  margin-bottom: 14px;
}

.muted {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 10px;
  line-height: 1.5;
}

/* FOOTER */
footer {
  border-top: 1px solid var(--border);
  background: rgba(7, 10, 15, 0.9);
  padding: 24px;
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  margin-top: auto;
}
footer a {
  color: var(--text-muted);
}
footer a:hover {
  color: var(--cyan);
}

[hidden] {
  display: none !important;
}

@media (max-width: 820px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .auth-hero-card {
    padding: 32px 20px;
  }
}


/* ========================================================
   ADMIN DASHBOARD ULTRA-POLISH (OBSIDIAN / EMAS / CYAN)
   ======================================================== */
.admin-title-row {
  padding: 18px 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.section-block {
  margin-bottom: 28px;
}
.section-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.section-tag {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--cyan);
  background: rgba(112, 197, 212, 0.1);
  border: 1px solid var(--border-cyan);
  padding: 2px 8px;
  border-radius: 4px;
}

/* 6-Metric Executive Cards */
.admin-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.metric-card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: all 0.2s ease;
}
.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}
.metric-card.stat-gold {
  border-color: var(--border-gold);
}
.metric-card.stat-cyan {
  border-color: var(--border-cyan);
}
.metric-card.stat-blue {
  border-color: rgba(96, 165, 250, 0.3);
}
.metric-card.stat-green {
  border-color: var(--border-green);
}
.metric-card.stat-gold-glow {
  border-color: var(--border-gold);
  background: linear-gradient(180deg, rgba(212, 184, 120, 0.1) 0%, var(--surface-card) 100%);
}
.metric-card.stat-amber {
  border-color: rgba(245, 158, 11, 0.3);
}

.metric-icon {
  font-size: 26px;
  line-height: 1;
  flex-shrink: 0;
}
.metric-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.metric-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.metric-value {
  font-size: 20px;
  font-weight: 800;
  color: #FFF;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.font-mono {
  font-family: var(--mono);
}

/* Two Column Responsive Admin Grid */
.admin-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}
@media (max-width: 960px) {
  .admin-grid-2col {
    grid-template-columns: 1fr;
  }
}

.admin-card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.card-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}
.count-badge {
  background: rgba(212, 184, 120, 0.12);
  color: var(--gold-light);
  border: 1px solid var(--border-gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

/* Partner List Container */
.partner-list-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 4px;
}
.partner-card-row {
  background: rgba(11, 15, 23, 0.75);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
}
.partner-card-row:hover, .partner-card-row.active {
  border-color: var(--border-cyan);
  background: rgba(14, 25, 38, 0.9);
  box-shadow: 0 0 16px rgba(112, 197, 212, 0.1);
}
.partner-card-row.is-owner {
  border-color: var(--border-gold);
  background: linear-gradient(90deg, rgba(212, 184, 120, 0.08) 0%, rgba(11, 15, 23, 0.8) 100%);
}
.partner-info-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.partner-id-badge {
  display: flex;
  align-items: center;
  gap: 8px;
}
.tg-id-text {
  font-size: 13px;
  color: #E2E8F0;
}
.owner-pill {
  background: rgba(212, 184, 120, 0.15);
  border: 1px solid var(--border-gold);
  color: var(--gold-light);
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
}
.partner-code-pill code {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--cyan-light);
  background: rgba(112, 197, 212, 0.1);
  border: 1px solid rgba(112, 197, 212, 0.25);
  padding: 3px 8px;
  border-radius: 6px;
}
.partner-metrics-col {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.metric-pill {
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
}
.metric-pill strong {
  color: #FFF;
}
.metric-pill.pill-gold {
  border-color: rgba(212, 184, 120, 0.25);
  background: rgba(212, 184, 120, 0.06);
  color: var(--gold-light);
}
.metric-pill.pill-gold strong {
  color: var(--gold-light);
  font-family: var(--mono);
}

.btn-detail-partner {
  background: rgba(112, 197, 212, 0.12);
  border: 1px solid var(--border-cyan);
  color: var(--cyan-light);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-detail-partner:hover {
  background: var(--cyan);
  color: #070A0F;
}

@media (max-width: 600px) {
  .partner-card-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .partner-action-col {
    width: 100%;
  }
  .btn-detail-partner {
    width: 100%;
    text-align: center;
    padding: 10px;
  }
}

/* Detail Panel Styling */
.partner-detail-view {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.p-detail-header {
  background: rgba(11, 15, 23, 0.8);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.p-detail-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
}
.code-highlight {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--cyan-light);
  background: rgba(112, 197, 212, 0.12);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--border-cyan);
}
.p-detail-sub {
  font-size: 12px;
  color: var(--text-dim);
}
.share-link-small {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--cyan);
  word-break: break-all;
}

.p-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}
.p-stat-item {
  background: rgba(11, 15, 23, 0.6);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.p-stat-item.border-green { border-color: rgba(34, 197, 94, 0.3); }
.p-stat-item.border-cyan { border-color: rgba(112, 197, 212, 0.3); }
.p-stat-item.border-gold { border-color: rgba(212, 184, 120, 0.3); }
.p-stat-item.border-white { border-color: rgba(255, 255, 255, 0.15); }

.p-stat-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}
.p-stat-val {
  font-size: 15px;
  font-weight: 800;
}
.text-green { color: #4ADE80; }
.text-cyan { color: var(--cyan-light); }
.text-gold { color: var(--gold-light); }
.text-white { color: #FFF; }

.p-funnel-bar {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  color: var(--text-muted);
}
.p-funnel-bar strong {
  color: #FFF;
}

.p-section-sub {
  margin-top: 6px;
}
.p-section-sub h4 {
  font-size: 13px;
  font-weight: 700;
  color: #E2E8F0;
  margin-bottom: 8px;
}
.p-dest-list, .p-refs-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.p-dest-item, .p-ref-row {
  background: rgba(11, 15, 23, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.badge-tx {
  margin-left: auto;
  background: rgba(212, 184, 120, 0.1);
  color: var(--gold-light);
  border: 1px solid var(--border-gold);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
}
.muted-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border-subtle);
  border-radius: 8px;
  padding: 12px;
  font-size: 12px;
  color: var(--text-dim);
  text-align: center;
}
.p-raw-json {
  margin-top: 8px;
}
.p-raw-json summary {
  font-size: 12px;
  color: var(--cyan);
  cursor: pointer;
  margin-bottom: 6px;
}
.p-raw-json pre {
  background: #070A0F;
  border: 1px solid var(--border);
  padding: 12px;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 11px;
  color: #94A3B8;
  max-height: 200px;
  overflow: auto;
}

/* Institutions Grid */
.institutions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}
.institution-card-item {
  background: rgba(11, 15, 23, 0.7);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.institution-card-item.disabled {
  opacity: 0.45;
  background: rgba(0, 0, 0, 0.4);
}
.inst-icon-name {
  display: flex;
  align-items: center;
  gap: 10px;
}
.inst-icon {
  font-size: 20px;
}
.inst-name-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.inst-name {
  font-size: 13px;
  font-weight: 700;
  color: #FFF;
}
.inst-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
}
.badge-type {
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
}
.badge-type.bank {
  background: rgba(96, 165, 250, 0.15);
  color: #93C5FD;
}
.badge-type.ewallet {
  background: rgba(192, 132, 252, 0.15);
  color: #D8B4FE;
}
.status-dot.active {
  color: #4ADE80;
  font-weight: 600;
}
.status-dot.disabled {
  color: #94A3B8;
}
.btn-inst-disable {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #F87171;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}
.btn-inst-disable:hover {
  background: rgba(239, 68, 68, 0.25);
}

.institution-add-form {
  border-top: 1px solid var(--border);
  padding-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.form-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--gold-light);
  letter-spacing: 0.5px;
}
.form-row-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 12px;
}
@media (max-width: 600px) {
  .form-row-grid {
    grid-template-columns: 1fr;
  }
}
.btn-submit-gold {
  background: linear-gradient(135deg, #D4B878 0%, #C5A457 100%);
  color: #080B10;
  font-weight: 800;
  border: none;
  padding: 12px 18px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}
.btn-submit-gold:hover {
  filter: brightness(1.1);
}

/* Withdrawal List Items */
.withdrawal-list-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 4px;
}
.withdrawal-card-item {
  background: rgba(11, 15, 23, 0.75);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.w-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.w-amount {
  font-size: 19px;
  font-weight: 800;
  color: #4ADE80;
  font-family: var(--mono);
}
.w-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}
.w-badge.pending {
  background: rgba(245, 158, 11, 0.15);
  color: #FBBF24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.w-badge.processing {
  background: rgba(112, 197, 212, 0.15);
  color: var(--cyan-light);
  border: 1px solid var(--border-cyan);
}
.w-badge.paid {
  background: rgba(34, 197, 94, 0.15);
  color: #4ADE80;
  border: 1px solid var(--border-green);
}
.w-badge.rejected {
  background: rgba(239, 68, 68, 0.15);
  color: #F87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.w-meta {
  font-size: 12px;
  color: var(--text-muted);
}
.w-meta code {
  color: var(--cyan-light);
  font-family: var(--mono);
}
.w-dest-detail {
  background: rgba(14, 25, 38, 0.9);
  border: 1px solid var(--border-cyan);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.5;
  margin-top: 4px;
}
.w-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.btn-action-ghost {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.btn-action-amber {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #FBBF24;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.btn-action-green {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid var(--border-green);
  color: #4ADE80;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.btn-action-red {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #F87171;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
}

/* Audit Log Container */
.audit-log-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
}
.audit-log-item {
  background: rgba(11, 15, 23, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}
.audit-time {
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 11px;
  white-space: nowrap;
}
.audit-body {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.audit-id code {
  color: var(--cyan-light);
  font-family: var(--mono);
}
.audit-status {
  font-weight: 800;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}
.audit-status.green {
  background: rgba(34, 197, 94, 0.15);
  color: #4ADE80;
}
.audit-status.amber {
  background: rgba(245, 158, 11, 0.15);
  color: #FBBF24;
}
.audit-status.red {
  background: rgba(239, 68, 68, 0.15);
  color: #F87171;
}
.audit-reason {
  color: var(--text-muted);
  font-style: italic;
}

.loading-state {
  padding: 24px;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
}
.btn-nav-gold {
  background: rgba(212, 184, 120, 0.12);
  border: 1px solid var(--border-gold);
  color: var(--gold-light);
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-nav-gold:hover {
  background: rgba(212, 184, 120, 0.22);
}
