/* =======================================================================
   NurOs.id — Stylesheet bersama untuk dashboard Admin & Member.
   Dipakai oleh: login.php, dashboard.php, pendaftar_detail.php,
   admin_transaksi.php, member_login.php, member_aktivasi.php,
   member_dashboard.php. Satu sumber warna/tipografi supaya semua
   halaman terasa satu produk.
   ======================================================================= */

:root{
  --bg:#070C0A; --panel:#0E1614; --panel-2:#121C19; --line:rgba(255,255,255,0.09);
  --teal:#2FD9C0; --teal-deep:#123A34; --gold:#E3B04B; --warn:#D89A6B;
  --text:#F1F5F2; --text-soft:#93A19A; --text-dim:#5E6D67;
}
*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
html, body{ overflow-x:hidden; max-width:100%; }
body{ margin:0; background:var(--bg); color:var(--text); font-family:'Manrope',sans-serif; line-height:1.5; }
h1,h2,h3{ font-family:'Sora',sans-serif; margin:0; }
.mono{ font-family:'IBM Plex Mono',monospace; }
.wrap{ max-width:1140px; margin:0 auto; padding:0 24px; }
a{ color:inherit; }

/* ---------- NAV ---------- */
nav{ padding:20px 0; border-bottom:1px solid var(--line); margin-bottom:32px; }
nav .wrap{ display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px; }
.brand{ font-weight:800; font-size:16px; font-family:'Sora',sans-serif; white-space:nowrap; }
.brand .dot{ color:var(--teal); }
.brand .sub{ font-weight:500; color:var(--text-soft); font-size:13px; margin-left:8px; font-family:'Manrope',sans-serif; }
.nav-mid{ display:flex; align-items:center; gap:4px; font-size:13px; flex-wrap:wrap; }
.nav-mid a{ text-decoration:none; padding:8px 14px; border-radius:8px; color:var(--text-soft); }
.nav-mid a:hover{ color:var(--text); }
.nav-mid a.active{ background:var(--panel); color:var(--teal); }
.nav-right{ display:flex; align-items:center; gap:14px; font-size:13px; color:var(--text-soft); flex-wrap:wrap; }
.nav-right a{ text-decoration:none; padding:8px 14px; border:1px solid var(--line); border-radius:8px; }
.nav-right a:hover{ border-color:var(--teal); color:var(--teal); }

/* ---------- LAYOUT ---------- */
.grid-2{ display:grid; grid-template-columns:1fr 1.6fr; gap:20px; align-items:start; }
@media (max-width:860px){ .grid-2{ grid-template-columns:1fr; } }
.card{ background:var(--panel); border:1px solid var(--line); border-radius:14px; padding:22px; margin-bottom:20px; }
.card h3{ font-size:15px; margin-bottom:16px; display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.card h3 .muted{ color:var(--text-soft); font-weight:500; font-size:12.5px; font-family:'Manrope',sans-serif; }
.section-gap{ height:6px; }

/* ---------- STAT CARDS ---------- */
.stats-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(155px,1fr)); gap:16px; margin-bottom:28px; }
.stat-card{ background:var(--panel); border:1px solid var(--line); border-radius:14px; padding:20px; }
a.stat-card{ text-decoration:none; display:block; transition:border-color .15s ease; }
a.stat-card:hover{ border-color:var(--teal); }
.stat-label{ font-size:12px; color:var(--text-soft); margin-bottom:8px; }
.stat-value{ font-family:'IBM Plex Mono',monospace; font-size:26px; font-weight:600; color:var(--teal); overflow-wrap:break-word; }
.stat-value.gold{ color:var(--gold); }

/* ---------- FIELD ROWS (profil ringkas) ---------- */
.field-row{ display:flex; justify-content:space-between; gap:8px 12px; padding:9px 0; border-bottom:1px solid var(--line); font-size:13.5px; flex-wrap:wrap; }
.field-row:last-child{ border-bottom:none; }
.field-row .k{ color:var(--text-soft); }
.field-row .v{ text-align:right; font-weight:600; }
.field-row .v a{ color:var(--teal); text-decoration:none; }
.field-row .v a:hover{ text-decoration:underline; }
.rekening-info{ padding:11px 14px; background:var(--panel-2); border-radius:9px; }
.rekening-info-label{ font-size:11.5px; color:var(--text-soft); margin-bottom:4px; }
.rekening-info-value{ font-size:13.5px; font-weight:600; word-break:break-word; }

/* ---------- WIDGET ASISTEN AI (inc_ai_chat_widget.php) ---------- */
.ai-chat-btn{
  position:fixed; right:20px; bottom:20px; z-index:210; width:52px; height:52px; border-radius:50%;
  background:var(--teal); color:#04120F; display:flex; align-items:center; justify-content:center;
  cursor:pointer; box-shadow:0 6px 18px rgba(0,0,0,0.35);
}
.ai-chat-btn svg{ width:24px; height:24px; }
.ai-chat-panel{
  display:none; flex-direction:column; position:fixed; right:20px; bottom:82px; z-index:210;
  width:min(340px, calc(100vw - 40px)); height:min(460px, calc(100vh - 140px));
  background:var(--panel); border:1px solid var(--line); border-radius:14px; overflow:hidden;
  box-shadow:0 12px 32px rgba(0,0,0,0.45);
}
.ai-chat-panel.open{ display:flex; }
.ai-chat-head{ display:flex; justify-content:space-between; align-items:center; padding:14px 16px; border-bottom:1px solid var(--line); font-weight:700; font-size:14px; }
.ai-chat-head button{ background:none; border:none; color:var(--text-soft); cursor:pointer; font-size:16px; padding:2px 6px; }
.ai-chat-body{ flex:1; overflow-y:auto; padding:14px 16px; display:flex; flex-direction:column; gap:10px; }
.ai-chat-msg{ max-width:85%; padding:9px 12px; border-radius:10px; font-size:13px; line-height:1.5; white-space:pre-wrap; word-break:break-word; }
.ai-chat-msg-bot{ background:var(--panel-2); align-self:flex-start; }
.ai-chat-msg-user{ background:var(--teal); color:#04120F; align-self:flex-end; }
.ai-chat-form{ display:flex; gap:8px; padding:12px; border-top:1px solid var(--line); }
.ai-chat-form input{ flex:1; padding:9px 12px; font-size:13px; margin-bottom:0; }
.ai-chat-form button{ background:var(--teal); color:#04120F; border:none; border-radius:8px; padding:0 16px; font-weight:700; font-size:13px; cursor:pointer; }
@media (max-width:780px){
  .ai-chat-btn{ bottom:84px; }
  .ai-chat-panel{ bottom:146px; }
}

/* ---------- BOTTOM NAV MOBILE (inc_bottom_nav_admin.php + anchor nav dashboard Mitra) ---------- */
.bottom-nav{ display:none; }
@media (max-width:780px){
  .nav-mid{ display:none; }
  body{ padding-bottom:68px; }
  .bottom-nav{
    display:flex; position:fixed; left:0; right:0; bottom:0; z-index:200;
    background:var(--panel); border-top:1px solid var(--line);
    padding:6px 2px calc(6px + env(safe-area-inset-bottom, 0px));
  }
  .bottom-nav a{
    flex:1; min-width:0; display:flex; flex-direction:column; align-items:center; justify-content:center;
    gap:3px; padding:5px 2px; text-decoration:none; color:var(--text-soft); border-radius:8px; font-size:10px;
  }
  .bottom-nav a svg{ width:20px; height:20px; flex-shrink:0; }
  .bottom-nav a span{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%; }
  .bottom-nav a.active{ color:var(--teal); }
  .stat-value{ font-size:21px; }
  .wrap{ padding:0 16px; }
  .card{ padding:16px; }
}

/* ---------- TAGS / BADGES ---------- */
.tag{ font-size:11px; padding:4px 9px; border-radius:20px; font-weight:700; display:inline-block; white-space:nowrap; }
.tag-teal{ background:rgba(47,217,192,0.14); color:var(--teal); }
.tag-gold{ background:rgba(227,176,75,0.14); color:var(--gold); }
.tag-warn{ background:rgba(216,154,107,0.14); color:var(--warn); }
.tag-dim{ background:rgba(255,255,255,0.08); color:var(--text-soft); }

/* ---------- FILTER BAR (dipakai halaman list) ---------- */
.filter-bar{ display:flex; gap:10px; flex-wrap:wrap; margin-bottom:20px; }
.filter-bar input, .filter-bar select{ flex:1; min-width:160px; margin-bottom:0; }
.filter-bar .btn, .filter-bar button{ flex:none; }

/* ---------- TABLE ---------- */
.table-wrap{ background:var(--panel); border:1px solid var(--line); border-radius:14px; overflow:hidden; overflow-x:auto; }
table{ width:100%; border-collapse:collapse; font-size:13.5px; min-width:640px; }
th, td{ text-align:left; padding:13px 16px; border-bottom:1px solid var(--line); white-space:nowrap; }
th{ color:var(--text-soft); font-weight:700; font-size:11px; letter-spacing:0.03em; background:var(--panel-2); }
tbody tr:hover{ background:rgba(255,255,255,0.02); }
tbody tr:last-child td{ border-bottom:none; }
td.wa a{ color:var(--teal); text-decoration:none; }
td.wa a:hover{ text-decoration:underline; }
td.num{ font-family:'IBM Plex Mono',monospace; }
.empty-row{ text-align:center; color:var(--text-soft); padding:30px; }
.empty-state{ text-align:center; padding:34px 20px; color:var(--text-soft); font-size:13.5px; }

/* ---------- PAGINATION ---------- */
.pagination{ display:flex; gap:6px; justify-content:center; margin:24px 0 50px; flex-wrap:wrap; }
.pagination a{ padding:8px 13px; border:1px solid var(--line); border-radius:8px; text-decoration:none; font-size:13px; color:var(--text-soft); font-family:'IBM Plex Mono',monospace; }
.pagination a.active{ background:var(--teal); border-color:var(--teal); color:#04120F; font-weight:700; }
.pagination a:hover:not(.active){ border-color:var(--teal); color:var(--teal); }

/* ---------- BUTTONS ---------- */
.btn{ display:inline-flex; align-items:center; justify-content:center; gap:6px; padding:12px 20px; border-radius:8px; border:none; font-weight:700; font-size:13.5px; cursor:pointer; text-decoration:none; font-family:'Manrope',sans-serif; }
.btn-teal{ background:var(--teal); color:#04120F; }
.btn-teal:hover{ background:#54E6D0; }
.btn-outline{ background:transparent; border:1px solid var(--line); color:var(--text); }
.btn-outline:hover{ border-color:var(--teal); color:var(--teal); }
.btn-warn-outline{ background:transparent; border:1px solid rgba(216,154,107,0.4); color:var(--warn); }
.btn-warn-outline:hover{ background:rgba(216,154,107,0.12); }
.btn-sm{ padding:8px 14px; font-size:12.5px; }
.btn-block{ width:100%; }
.btn[disabled]{ opacity:0.45; cursor:not-allowed; }

/* ---------- FORMS ---------- */
.form-group{ margin-bottom:16px; }
.form-group label{ font-size:12px; color:var(--text-soft); display:block; margin-bottom:6px; }
.form-hint{ font-size:11.5px; color:var(--text-soft); margin:-10px 0 14px; }
input[type=text], input[type=password], input[type=tel], input[type=number], select, textarea{
  width:100%; padding:12px 13px; border:1px solid var(--line); border-radius:8px;
  background:var(--panel-2); color:var(--text); font-family:'Manrope',sans-serif; font-size:14px;
}
input[type=file]{
  width:100%; padding:10px 13px; border:1px solid var(--line); border-radius:8px;
  background:var(--panel-2); color:var(--text-soft); font-family:'Manrope',sans-serif; font-size:13px;
}
input[type=file]::file-selector-button{
  background:var(--teal); color:#04120F; border:none; border-radius:6px;
  padding:8px 14px; font-family:'Manrope',sans-serif; font-weight:700; font-size:13px;
  cursor:pointer; margin-right:12px;
}
input[type=file]::-webkit-file-upload-button{
  background:var(--teal); color:#04120F; border:none; border-radius:6px;
  padding:8px 14px; font-family:'Manrope',sans-serif; font-weight:700; font-size:13px;
  cursor:pointer; margin-right:12px;
}
input[type=file]::file-selector-button:hover{ background:#54E6D0; }
input[type=file]::-webkit-file-upload-button:hover{ background:#54E6D0; }
input[type=password]::-ms-reveal, input[type=password]::-ms-clear{ display:none; }

/* ---------- TOGGLE MATA PASSWORD (toggle-password.js) ---------- */
.password-wrap{ position:relative; }
.password-wrap input{ padding-right:44px; }
.password-toggle-btn{
  position:absolute; right:6px; top:50%; transform:translateY(-50%);
  background:none; border:none; padding:6px; margin:0; width:auto;
  cursor:pointer; color:var(--text-soft); display:flex; align-items:center; justify-content:center;
}
.password-toggle-btn:hover{ color:var(--teal); }
textarea{ resize:vertical; min-height:70px; }
input:focus, select:focus, textarea:focus{ outline:none; border-color:var(--teal); }
input::placeholder{ color:var(--text-dim); }
form.inline{ display:inline; }

/* ---------- AKSI PENCAIRAN (panel Keuangan) ---------- */
.aksi-pencairan{ display:flex; flex-direction:column; gap:6px; min-width:230px; }
input.keterangan-inline{ padding:7px 10px; font-size:12px; }
.aksi-btn-row{ display:flex; gap:6px; flex-wrap:wrap; }
details > summary{ list-style:none; }
details > summary::-webkit-details-marker{ display:none; }
details[open] > summary{ margin-bottom:2px; }

/* ---------- ALERTS ---------- */
.alert{ padding:12px 16px; border-radius:8px; font-size:13px; margin-bottom:18px; border:1px solid transparent; }
.alert-error{ background:rgba(216,154,107,0.12); border-color:rgba(216,154,107,0.3); color:var(--warn); }
.alert-success{ background:rgba(47,217,192,0.12); border-color:rgba(47,217,192,0.3); color:var(--teal); }

/* ---------- PROGRESS BAR ---------- */
.progress-label{ display:flex; justify-content:space-between; font-size:12.5px; color:var(--text-soft); margin-bottom:8px; flex-wrap:wrap; gap:6px; }
.progress-label strong{ color:var(--text); font-family:'IBM Plex Mono',monospace; }
.progress-track{ background:var(--panel-2); border:1px solid var(--line); border-radius:20px; height:10px; overflow:hidden; }
.progress-fill{ background:var(--teal); height:100%; border-radius:20px; }

/* ---------- AUTH BOX (login / aktivasi) ---------- */
.auth-wrap{ min-height:100vh; display:flex; align-items:center; justify-content:center; padding:24px; }
.auth-box{ background:var(--panel); border:1px solid var(--line); border-radius:16px; padding:36px; width:100%; max-width:380px; }
.auth-box h1{ font-family:'Sora',sans-serif; font-size:19px; margin:0 0 4px; font-weight:800; }
.auth-box .sub{ color:var(--text-soft); font-size:13px; margin-bottom:26px; }
.auth-foot{ margin-top:18px; text-align:center; font-size:12.5px; color:var(--text-soft); }
.auth-foot a{ color:var(--teal); text-decoration:none; }
.auth-foot a:hover{ text-decoration:underline; }

/* ---------- REFERRAL CODE BOX ---------- */
.ref-box{ display:flex; align-items:center; justify-content:space-between; gap:14px; background:var(--panel-2); border:1px dashed var(--teal); border-radius:10px; padding:16px 18px; flex-wrap:wrap; }
.ref-box .code{ font-family:'IBM Plex Mono',monospace; font-size:22px; font-weight:700; color:var(--teal); letter-spacing:0.03em; }

/* ---------- UTIL ---------- */
.muted{ color:var(--text-soft); }
.right{ text-align:right; }
.mt-8{ margin-top:8px; } .mt-16{ margin-top:16px; } .mt-24{ margin-top:24px; }
.flex-between{ display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }

/* ---------- v3: PENGATURAN / HOME / PRODUK / KABAR PUSAT ---------- */
.thumb{ width:64px; height:64px; object-fit:cover; border-radius:8px; border:1px solid var(--line); background:var(--panel-2); }
.thumb-lg{ width:100%; max-width:220px; height:120px; object-fit:cover; border-radius:10px; border:1px solid var(--line); background:var(--panel-2); display:block; }
.thumb-row{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.thumb-row > .form-group{ min-width:160px; }
.checkbox-list{ max-height:280px; overflow-y:auto; border:1px solid var(--line); border-radius:8px; padding:6px; background:var(--panel-2); }
.checkbox-row{ display:flex; align-items:center; gap:10px; padding:8px 10px; border-radius:6px; font-size:13.5px; }
.checkbox-row:hover{ background:rgba(255,255,255,0.04); }
.checkbox-row input{ width:auto; }
.toggle-row{ display:flex; align-items:center; gap:8px; font-size:13px; color:var(--text-soft); }
.toggle-row input{ width:auto; }
.nav-mid a{ white-space:nowrap; }
.recipient-link{ display:inline-flex; align-items:center; gap:6px; }
