/* ==========================================================
   TRADER REBAHAN - Member Web Theme
   Vibe: trading santai tapi premium. Dark + aksen amber hangat.
   ========================================================== */
:root {
  --bg: #0b1120;
  --bg-2: #0f1830;
  --surface: #141e3a;
  --surface-2: #1b2950;
  --border: #25325a;
  --text: #e7ecf6;
  --muted: #93a0bd;
  --amber: #f5b942;
  --amber-2: #ffcd5e;
  --cyan: #43d6c4;
  --red: #ff6b6b;
  --green: #46d18a;
  --vip: #f5b942;
  --scalper: #43d6c4;
  --free: #8a96ad;
  --radius: 14px;
  --shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.7);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  background:
    radial-gradient(1100px 600px at 85% -10%, rgba(245, 185, 66, 0.08), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(67, 214, 196, 0.07), transparent 55%),
    var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .4em; font-weight: 700; }
img { max-width: 100%; }

/* ---------------- Layout shell ---------------- */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 256px;
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  border-right: 1px solid var(--border);
  padding: 22px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.brand {
  display: flex; align-items: center; gap: 11px;
  padding: 4px 8px 20px;
  font-weight: 800; font-size: 1.15rem; letter-spacing: -.3px;
}
.brand .logo {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, var(--amber), #e0892b);
  display: grid; place-items: center;
  color: #2a1a00; font-weight: 900; font-size: 1.1rem;
  box-shadow: 0 6px 18px -6px rgba(245, 185, 66, .6);
}
.brand small { display: block; font-size: .68rem; color: var(--muted); font-weight: 500; }

.nav { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 11px;
  color: var(--muted); font-weight: 600; font-size: .94rem;
  transition: .15s;
}
.nav a svg { width: 19px; height: 19px; opacity: .85; }
.nav a:hover { background: var(--surface); color: var(--text); }
.nav a.active {
  background: linear-gradient(135deg, rgba(245, 185, 66, .18), rgba(245, 185, 66, .05));
  color: var(--amber-2);
  box-shadow: inset 0 0 0 1px rgba(245, 185, 66, .25);
}
.nav-sep { color: #56627f; padding: 16px 14px 6px; font-size: .68rem; text-transform: uppercase; letter-spacing: 1.2px; font-weight: 700; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 26px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 30;
  background: rgba(11, 17, 32, .82); backdrop-filter: blur(10px);
}
.topbar .hamb { display: none; background: none; border: 0; color: var(--text); cursor: pointer; }
.topbar h1 { font-size: 1.18rem; margin: 0; }

.userbadge {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  padding: 6px 12px 6px 6px; border-radius: 40px;
}
.userbadge .av {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), #2f9e8f);
  display: grid; place-items: center; font-weight: 800; color: #042722; font-size: .85rem;
}
.userbadge .uinfo { font-size: .8rem; line-height: 1.15; }
.userbadge .uinfo b { display: block; }

.content { padding: 26px; max-width: 1180px; width: 100%; margin: 0 auto; }

/* ---------------- Badges (grup) ---------------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 11px; border-radius: 30px; font-size: .72rem; font-weight: 800;
  letter-spacing: .3px; text-transform: uppercase;
}
.badge-VIP { background: rgba(245, 185, 66, .16); color: var(--vip); box-shadow: inset 0 0 0 1px rgba(245,185,66,.35); }
.badge-Scalper { background: rgba(67, 214, 196, .14); color: var(--scalper); box-shadow: inset 0 0 0 1px rgba(67,214,196,.32); }
.badge-Free { background: rgba(138, 150, 173, .15); color: var(--free); box-shadow: inset 0 0 0 1px rgba(138,150,173,.3); }
.badge-pending { background: rgba(245,185,66,.15); color: var(--amber); }
.badge-approved { background: rgba(70,209,138,.15); color: var(--green); }
.badge-rejected { background: rgba(255,107,107,.15); color: var(--red); }
.badge-aktif { background: rgba(70,209,138,.15); color: var(--green); }
.badge-nonaktif { background: rgba(255,107,107,.15); color: var(--red); }

/* ---------------- Cards / grid ---------------- */
.grid { display: grid; gap: 18px; }
.grid-stats { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.grid-ea { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

.card {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.stat .num { font-size: 1.9rem; font-weight: 800; letter-spacing: -1px; }
.stat .lbl { color: var(--muted); font-size: .85rem; font-weight: 600; }
.stat .ic { font-size: 1.4rem; margin-bottom: 6px; }

.section-title { display: flex; align-items: center; justify-content: space-between; margin: 30px 0 14px; }
.section-title h2 { font-size: 1.15rem; margin: 0; }
.eyebrow { color: var(--amber); font-size: .72rem; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; }

/* ---------------- EA card ---------------- */
.ea-card { display: flex; flex-direction: column; gap: 12px; position: relative; overflow: hidden; }
.ea-card .ea-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.ea-card h3 { font-size: 1.08rem; margin: 0; }
.ea-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.chip {
  font-size: .73rem; font-weight: 600; color: var(--muted);
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 4px 9px; border-radius: 8px;
}
.chip b { color: var(--text); }
.ea-desc { color: var(--muted); font-size: .88rem; }
.lock-flag { font-size: .7rem; color: var(--cyan); font-weight: 700; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 11px; font-weight: 700; font-size: .9rem;
  border: 1px solid transparent; cursor: pointer; transition: .15s; font-family: var(--font);
}
.btn-primary { background: linear-gradient(135deg, var(--amber), #e0922f); color: #2a1a00; }
.btn-primary:hover { filter: brightness(1.07); transform: translateY(-1px); }
.btn-ghost { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface); }
.btn-cyan { background: linear-gradient(135deg, var(--cyan), #2f9e8f); color: #042722; }
.btn-danger { background: rgba(255,107,107,.14); color: var(--red); border-color: rgba(255,107,107,.3); }
.btn-success { background: rgba(70,209,138,.16); color: var(--green); border-color: rgba(70,209,138,.3); }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 13px; font-size: .82rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-locked { background: var(--surface-2); color: var(--muted); border-color: var(--border); cursor: not-allowed; }

/* ---------------- Forms ---------------- */
.form-grid { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row.full { grid-column: 1 / -1; }
label { font-size: .85rem; font-weight: 600; color: var(--muted); }
input, select, textarea {
  width: 100%; padding: 11px 13px; border-radius: 10px;
  background: var(--bg-2); border: 1px solid var(--border); color: var(--text);
  font-family: var(--font); font-size: .92rem;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px rgba(245,185,66,.12); }
textarea { resize: vertical; min-height: 90px; }
.hint { font-size: .76rem; color: #66728f; }
.check-row { display: flex; align-items: center; gap: 9px; }
.check-row input { width: auto; }

/* ---------------- Table ---------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { background: var(--bg-2); color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .5px; }
tr:last-child td { border-bottom: 0; }
td .code { font-family: ui-monospace, monospace; background: var(--surface-2); padding: 2px 7px; border-radius: 6px; color: var(--amber-2); }

/* ---------------- Alerts ---------------- */
.alert { padding: 12px 16px; border-radius: 11px; margin-bottom: 16px; font-size: .9rem; font-weight: 600; }
.alert-success { background: rgba(70,209,138,.12); color: var(--green); border: 1px solid rgba(70,209,138,.3); }
.alert-error { background: rgba(255,107,107,.12); color: var(--red); border: 1px solid rgba(255,107,107,.3); }

/* ---------------- Login ---------------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: 100%; max-width: 410px; }
.auth-card .brand { justify-content: center; padding-top: 0; }
.auth-sub { text-align: center; color: var(--muted); margin-bottom: 22px; font-size: .92rem; }
.divider { display: flex; align-items: center; gap: 12px; color: #56627f; font-size: .78rem; margin: 20px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.contact-admin { text-align: center; }
.contact-admin .btn { width: 100%; }

/* ---------------- Footer social ---------------- */
.site-footer {
  margin-top: auto; padding: 24px 26px;
  border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
  color: var(--muted); font-size: .85rem;
}
.socials { display: flex; gap: 10px; }
.socials a {
  width: 40px; height: 40px; border-radius: 11px;
  display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--border);
  transition: .15s;
}
.socials a:hover { border-color: var(--amber); color: var(--amber); transform: translateY(-2px); }
.socials svg { width: 19px; height: 19px; }

/* ---------------- Detail EA ---------------- */
.detail-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 8px; }
.spec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 16px 0; }
.spec { background: var(--bg-2); border: 1px solid var(--border); border-radius: 11px; padding: 12px 14px; }
.spec .k { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.spec .v { font-weight: 700; margin-top: 2px; }
.block-title { font-size: .78rem; text-transform: uppercase; letter-spacing: 1px; color: var(--amber); margin: 22px 0 8px; font-weight: 800; }
.fxbook-embed { border-radius: 11px; overflow: hidden; border: 1px solid var(--border); }

/* ---------------- Modal ---------------- */
.modal-bg { position: fixed; inset: 0; background: rgba(4,8,18,.72); display: none; place-items: center; z-index: 100; padding: 20px; backdrop-filter: blur(3px); }
.modal-bg.open { display: grid; }
.modal { width: 100%; max-width: 440px; }
.modal h3 { margin-bottom: 4px; }
.modal .close { float: right; background: none; border: 0; color: var(--muted); font-size: 1.4rem; cursor: pointer; line-height: 1; }

/* ---------------- Promo / list items ---------------- */
.promo-item { display: flex; gap: 16px; align-items: flex-start; }
.promo-item img { width: 130px; border-radius: 11px; flex-shrink: 0; }
.upgrade-card { border-top: 3px solid var(--amber); }
.upgrade-card .price { font-size: 1.6rem; font-weight: 800; color: var(--amber-2); }
.empty { text-align: center; color: var(--muted); padding: 40px 20px; }
.empty .ic { font-size: 2.2rem; margin-bottom: 8px; }

/* ---------------- Mobile ---------------- */
.backdrop { display: none; }
@media (max-width: 860px) {
  .sidebar {
    position: fixed; left: 0; top: 0; z-index: 60;
    transform: translateX(-100%); transition: transform .25s;
    box-shadow: 0 0 60px rgba(0,0,0,.6);
  }
  .sidebar.open { transform: translateX(0); }
  .backdrop.open { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 55; }
  .topbar .hamb { display: block; }
  .form-grid, .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
  .content { padding: 18px; }
  .userbadge .uinfo { display: none; }
}

/* ---------------- Admin extras ---------------- */
.form-grid-2 { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.form-grid-3 { display: grid; gap: 16px; grid-template-columns: 1fr 1fr 1fr; }
.req { color: var(--red); font-weight: 700; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
hr.divider { display: block; border: 0; border-top: 1px solid var(--border); margin: 22px 0; height: 0; }
hr.divider::before, hr.divider::after { content: none; }
code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  background: var(--surface-2, var(--bg-2)); padding: 3px 8px; border-radius: 6px;
  color: var(--amber-2, var(--amber)); font-size: .85rem;
}
code.copy { cursor: pointer; border: 1px dashed transparent; transition: border-color .15s, background .15s; }
code.copy:hover { border-color: var(--amber); background: rgba(245,185,66,.12); }
.info-box {
  background: rgba(67,214,196,.08); border: 1px solid rgba(67,214,196,.28);
  color: var(--text); padding: 13px 16px; border-radius: 12px; font-size: .9rem; line-height: 1.55;
}
.info-box code { background: rgba(0,0,0,.25); }

/* ---------------- Icon integration ---------------- */
.stat .ic { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 12px; background: var(--surface-2, var(--bg-2)); color: var(--amber); margin-bottom: 12px; }
.stat .ic svg { width: 22px; height: 22px; }
.empty .ic { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 16px; background: var(--surface-2, var(--bg-2)); color: var(--muted); margin: 0 auto 14px; }
.empty .ic svg { width: 28px; height: 28px; }
/* inline icon next to text (headings, buttons, badges, info) */
.ico { display: inline-flex; align-items: center; gap: 7px; }
.ico svg { flex: 0 0 auto; }
h2 .ico svg, h3 .ico svg { vertical-align: -3px; }
.btn svg { width: 17px; height: 17px; vertical-align: -3px; margin-right: 5px; }
.btn-sm svg { width: 15px; height: 15px; margin-right: 4px; }
.info-box { display: flex; align-items: flex-start; gap: 10px; }
.info-box svg { flex: 0 0 auto; margin-top: 1px; color: var(--cyan); }
.lock-flag svg, .badge svg { width: 13px; height: 13px; vertical-align: -2px; margin-right: 3px; }
.hint-line { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .85rem; margin-top: 10px; }
.hint-line svg { flex: 0 0 auto; color: var(--amber); }
