/* JB SOLUTIONS - WhatsApp Number Searcher · VIP gold theme */
:root {
  --bg: #070a10;
  --bg2: #0b101c;
  --card: rgba(255, 255, 255, .035);
  --card-border: rgba(245, 197, 24, .13);
  --text: #f2f4f8;
  --muted: #9aa3b2;
  --green: #25d366;
  --green-d: #1da851;
  --gold: #f5c518;
  --gold-lt: #ffe27a;
  --gold-dk: #b8860b;
  --indigo: #6366f1;
  --cyan: #22d3ee;
  --red: #f43f5e;
  --amber: #fbbf24;
  --radius: 18px;
  --sidebar-w: 248px;
  --header-h: 64px;
  --ease: cubic-bezier(.2,.7,.3,1.15);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background:
    radial-gradient(1000px 520px at 85% -8%, rgba(245, 197, 24, .06), transparent),
    radial-gradient(900px 500px at -10% 25%, rgba(37, 211, 102, .05), transparent),
    radial-gradient(700px 420px at 50% 110%, rgba(245, 197, 24, .04), transparent),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
::selection { background: rgba(37, 211, 102, .3); }

/* ---------- auth / landing shells ---------- */
.center-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-card {
  width: 100%; max-width: 420px; background: var(--card); border: 1px solid var(--card-border);
  border-radius: 22px; padding: 36px 30px; backdrop-filter: blur(14px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo {
  width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--gold-lt), var(--gold) 45%, var(--gold-dk));
  font-weight: 800; font-size: 19px; color: #241a02;
  box-shadow: 0 6px 20px rgba(245, 197, 24, .35);
  position: relative; overflow: hidden; flex-shrink: 0;
}
.brand-logo::after { content:''; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.55) 50%, transparent 60%);
  transform: translateX(-120%); animation: logoShine 4.5s ease-in-out infinite; }
@keyframes logoShine { 0%,55% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.brand-name { font-weight: 800; letter-spacing: .4px; font-size: 19px; }
.brand-name small { display: block; font-size: 11px; color: var(--gold); font-weight: 700; letter-spacing: 1.8px; }

/* ---------- app layout ---------- */
.app-header {
  position: fixed; top: 0; left: var(--sidebar-w); right: 0; height: var(--header-h); z-index: 40;
  display: flex; align-items: center; gap: 14px; padding: 0 22px;
  background: rgba(7, 10, 16, .85); backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(245, 197, 24, .12);
}
.app-header .page-title { font-size: 18px; font-weight: 800; letter-spacing: -.2px; }
.hamburger { display: none; background: none; border: 1px solid var(--card-border); color: var(--text);
  width: 40px; height: 40px; border-radius: 11px; font-size: 19px; cursor: pointer; }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); display: inline-block; }
.status-dot.on { background: var(--green); box-shadow: 0 0 10px var(--green); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .55; } }
.user-chip { display: flex; align-items: center; gap: 9px; background: var(--card); border: 1px solid var(--card-border);
  padding: 7px 13px 7px 8px; border-radius: 99px; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.user-chip .avatar { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, var(--indigo), var(--cyan));
  display: grid; place-items: center; font-size: 13px; font-weight: 800; }
/* modern logout button */
.logout-btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 12px;
  background: rgba(244, 63, 94, .08); border: 1px solid rgba(244, 63, 94, .28); color: #fda4af;
  font-family: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer;
  transition: background .2s, border-color .2s, transform .15s, box-shadow .2s; white-space: nowrap; }
.logout-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.logout-btn:hover { background: rgba(244, 63, 94, .18); border-color: rgba(244, 63, 94, .5);
  box-shadow: 0 4px 16px rgba(244, 63, 94, .2); transform: translateY(-1px); }
.logout-btn:active { transform: translateY(0); box-shadow: none; }

.app-sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--sidebar-w); z-index: 50;
  background: rgba(9, 13, 22, .97); border-right: 1px solid rgba(245, 197, 24, .12);
  display: flex; flex-direction: column; padding: 20px 14px; transition: transform .28s ease;
}
.app-sidebar .brand { padding: 4px 8px 18px; }
.nav { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; scrollbar-width: thin; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px;
  color: var(--muted); font-weight: 600; font-size: 14.5px; transition: .2s var(--ease);
}
.nav a .ico { font-size: 18px; width: 24px; text-align: center; }
.nav a:hover { background: rgba(245, 197, 24, .07); color: var(--text); transform: translateX(3px); }
.nav a.active { background: linear-gradient(135deg, rgba(245, 197, 24, .18), rgba(245, 197, 24, .06));
  color: var(--gold-lt); box-shadow: inset 0 0 0 1px rgba(245, 197, 24, .35); }
.sidebar-foot { margin-top: auto; padding: 12px 8px 2px; color: var(--muted); font-size: 12px; }

.app-main { margin-left: var(--sidebar-w); margin-top: var(--header-h); padding: 26px; min-height: calc(100vh - var(--header-h)); padding-bottom: 90px; }
.app-footer {
  position: fixed; bottom: 0; left: var(--sidebar-w); right: 0; z-index: 40;
  padding: 12px 22px; font-size: 12.5px; color: var(--muted);
  background: rgba(10, 14, 23, .85); backdrop-filter: blur(12px); border-top: 1px solid var(--card-border);
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
}
.scrim { display: none; }

/* ---------- components ---------- */
.card { background: linear-gradient(165deg, rgba(255,255,255,.045), rgba(255,255,255,.015));
  border: 1px solid var(--card-border); border-radius: var(--radius); padding: 22px;
  backdrop-filter: blur(10px); transition: transform .3s var(--ease), border-color .3s, box-shadow .3s; }
.card:hover { border-color: rgba(245, 197, 24, .3); box-shadow: 0 14px 34px rgba(0,0,0,.35); }
.card h3 { font-size: 16px; margin-bottom: 14px; }
.grid { display: grid; gap: 18px; }
.grid.stats { grid-template-columns: repeat(4, 1fr); }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.stat { position: relative; overflow: hidden; }
.stat .num { font-size: 30px; font-weight: 800; margin: 4px 0 2px;
  background: linear-gradient(135deg, var(--gold-lt), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat .lbl { color: var(--muted); font-size: 13px; font-weight: 600; }
.stat .big-ico { position: absolute; right: 14px; top: 14px; font-size: 30px; opacity: .22; }
.stat.green .num { background: linear-gradient(135deg, #7bf0a4, var(--green)); -webkit-background-clip: text; background-clip: text; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; cursor: pointer; font-weight: 700; font-size: 14.5px; font-family: inherit;
  padding: 12px 22px; border-radius: 13px; transition: .22s var(--ease); color: #fff;
  position: relative; overflow: hidden;
}
.btn-primary { background: linear-gradient(135deg, var(--gold-lt), var(--gold) 55%, #d9a410); color: #241a02;
  box-shadow: 0 8px 24px rgba(245, 197, 24, .32); }
.btn-primary::after { content:''; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.55) 50%, transparent 60%);
  transform: translateX(-130%); transition: transform .65s; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(245, 197, 24, .42); }
.btn-primary:hover::after { transform: translateX(130%); }
.btn-ghost { background: rgba(255, 255, 255, .06); border: 1px solid var(--card-border); color: var(--text); }
.btn-ghost:hover { background: rgba(245, 197, 24, .08); border-color: rgba(245, 197, 24, .35); transform: translateY(-1px); }
.btn-danger { background: rgba(244, 63, 94, .14); border: 1px solid rgba(244, 63, 94, .4); color: #fda4af; }
.btn-danger:hover { background: rgba(244, 63, 94, .22); }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.field { margin-bottom: 15px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 7px; }
.input, select.input, textarea.input {
  width: 100%; background: rgba(255, 255, 255, .05); border: 1px solid var(--card-border);
  border-radius: 12px; padding: 12px 15px; color: var(--text); font-size: 15px; font-family: inherit; outline: none; transition: .22s;
}
.input:focus { border-color: rgba(245, 197, 24, .6); box-shadow: 0 0 0 3px rgba(245, 197, 24, .13); background: rgba(255,255,255,.07); }
textarea.input { resize: vertical; min-height: 90px; }
select.input option { background: #141b2e; }

.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 99px; }
.badge.ok { background: rgba(37, 211, 102, .14); color: var(--green); border: 1px solid rgba(37, 211, 102, .35); }
.badge.warn { background: rgba(251, 191, 36, .12); color: var(--amber); border: 1px solid rgba(251, 191, 36, .35); }
.badge.err { background: rgba(244, 63, 94, .12); color: #fda4af; border: 1px solid rgba(244, 63, 94, .35); }
.badge.dim { background: rgba(255, 255, 255, .06); color: var(--muted); border: 1px solid var(--card-border); }

.table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--card-border); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--card-border); white-space: nowrap; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .8px; background: rgba(255, 255, 255, .02); }
tr:last-child td { border-bottom: none; }

.qr-box { background: #fff; border-radius: 18px; padding: 18px; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 14px 40px rgba(0, 0, 0, .4); min-width: 276px; min-height: 276px; box-sizing: border-box; }
.qr-box img { width: 240px; height: 240px; display: none; }
.qr-box img.ready { display: block; }
.qr-loader { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: #64748b; font-size: 13.5px; font-weight: 600; }
.qr-loader .spinner { width: 46px; height: 46px; border: 4px solid #e2e8f0; border-top-color: #22c55e; border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pair-code { font-size: 34px; font-weight: 800; letter-spacing: 8px; color: var(--green); background: rgba(37, 211, 102, .08);
  border: 1px dashed rgba(37, 211, 102, .5); border-radius: 14px; padding: 16px 10px; text-align: center; }

.session-card { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.session-card .wa-ico { width: 52px; height: 52px; border-radius: 15px; background: linear-gradient(135deg, #25d366, #128c7e);
  display: grid; place-items: center; font-size: 26px; flex-shrink: 0; }
.session-card .info { flex: 1; min-width: 180px; }
.session-card .info .num { font-weight: 800; font-size: 17px; }
.session-card .info .sub { color: var(--muted); font-size: 13px; }
.session-card .actions { display: flex; gap: 8px; flex-wrap: wrap; }

.feed { display: flex; flex-direction: column; gap: 10px; max-height: 480px; overflow-y: auto; }
.feed-item { display: flex; gap: 12px; padding: 12px 14px; background: rgba(255, 255, 255, .025); border: 1px solid var(--card-border); border-radius: 12px; font-size: 13.5px; }
.feed-item .dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.feed-item .dot.f { background: var(--green); } .feed-item .dot.n { background: var(--amber); }
.feed-item .meta { color: var(--muted); font-size: 12px; }

.modal-scrim { position: fixed; inset: 0; background: rgba(4, 7, 14, .7); backdrop-filter: blur(4px); z-index: 100;
  display: none; align-items: center; justify-content: center; padding: 18px; }
.modal-scrim.show { display: flex; }
.modal { background: #101623; border: 1px solid rgba(245, 197, 24, .2); border-radius: 22px; padding: 28px; width: 100%; max-width: 460px;
  max-height: 92vh; overflow-y: auto; box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 40px rgba(245, 197, 24, .05);
  animation: modalIn .35s var(--ease); }
@keyframes modalIn { from { opacity: 0; transform: translateY(24px) scale(.97); } to { opacity: 1; transform: none; } }
.modal h3 { margin-bottom: 6px; } .modal .sub { color: var(--muted); font-size: 13.5px; margin-bottom: 18px; }
.modal-actions { position: sticky; bottom: -28px; background: #101623; padding: 16px 0 0; margin-top: 6px; border-top: 1px solid rgba(245,197,24,.15); box-shadow: 0 -8px 20px rgba(16,22,35,.9); }
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tabs button { flex: 1; padding: 10px; border-radius: 11px; border: 1px solid var(--card-border); background: rgba(255,255,255,.04);
  color: var(--muted); font-weight: 700; cursor: pointer; font-family: inherit; font-size: 13.5px; }
.tabs button.active { background: rgba(245, 197, 24, .14); color: var(--gold-lt); border-color: rgba(245, 197, 24, .45); }

.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px); z-index: 200;
  background: #16202f; border: 1px solid var(--card-border); padding: 13px 22px; border-radius: 13px; font-size: 14px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: .25s; box-shadow: 0 14px 40px rgba(0,0,0,.5); max-width: 92vw; text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { border-color: rgba(244, 63, 94, .5); color: #fda4af; }

.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .big { font-size: 44px; margin-bottom: 10px; }

/* ---- Manage senders modal ---- */
.modal-manage { max-width: 520px; }
.mg-mode-card { margin: 0 0 14px; padding: 16px; }
.mg-mode-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mg-hint { color: var(--muted); font-size: 12.5px; }
.mg-mode-row .input { width: auto; flex-shrink: 0; }
.mg-add-row { display: flex; gap: 8px; }
.mg-add-row .input { flex: 1; min-width: 0; }
.mg-add-row .btn { white-space: nowrap; flex-shrink: 0; }
.mg-list { max-height: 46vh; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.mg-row { display: flex; gap: 12px; padding: 12px 14px; background: rgba(255,255,255,.025);
  border: 1px solid var(--card-border); border-radius: 12px; font-size: 13.5px; align-items: center; }
.mg-row .who { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.mg-row .meta { color: var(--muted); font-size: 12px; }
.mg-row .ops { display: flex; gap: 6px; align-items: center; flex-shrink: 0; flex-wrap: wrap; }

/* ---- GB Features page ---- */
.gb-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.gb-form { display: flex; flex-direction: column; gap: 4px; max-height: 60vh; overflow-y: auto; padding-right: 2px; }
.gb-sec { font-weight: 800; font-size: 14px; margin: 12px 0 2px; padding-top: 10px; border-top: 1px solid var(--card-border); }
.gb-sec:first-child { border-top: none; margin-top: 0; padding-top: 0; }
.gb-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 2px; }
.gb-row-info { flex: 1; min-width: 0; }
.gb-row .input.gb-tgl { width: auto; flex-shrink: 0; min-width: 110px; }
.gb-time { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 2px 10px 18px; }
.gb-time-inputs { display: flex; align-items: center; gap: 6px; }
.gb-time-inputs label { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.gb-time-inputs .input { width: 64px; padding: 8px 10px; }

/* landing */
.hero { max-width: 1080px; margin: 0 auto; padding: 90px 22px 60px; text-align: center; }
.hero h1 { font-size: clamp(32px, 6vw, 58px); font-weight: 800; line-height: 1.15; margin: 22px 0 16px; }
.hero h1 .grad { background: linear-gradient(135deg, var(--green), var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); font-size: clamp(15px, 2.4vw, 18px); max-width: 640px; margin: 0 auto 30px; }
.hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.feat-grid { max-width: 1080px; margin: 0 auto; padding: 20px 22px 80px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feat { padding: 26px 22px; }
.feat .ico { font-size: 32px; margin-bottom: 12px; }
.feat h4 { margin-bottom: 8px; font-size: 16px; }
.feat p { color: var(--muted); font-size: 13.5px; }
.landing-nav { max-width: 1080px; margin: 0 auto; padding: 20px 22px; display: flex; align-items: center; justify-content: space-between; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .grid.stats { grid-template-columns: repeat(2, 1fr); }
  .feat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .app-sidebar { transform: translateX(-105%); }
  body.nav-open .app-sidebar { transform: translateX(0); }
  .scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 45; opacity: 0; pointer-events: none; transition: .25s; }
  body.nav-open .scrim { opacity: 1; pointer-events: auto; }
  .app-header, .app-footer { left: 0; }
  .app-main { margin-left: 0; padding: 18px 14px 100px; }
  .hamburger { display: block; }
  .grid.two { grid-template-columns: 1fr; }
  .feat-grid { grid-template-columns: 1fr; }
  .user-chip .uname { display: none; }
  .session-card .actions { width: 100%; }
  .session-card .actions .btn { flex: 1; }
  .qr-box img { width: 210px; height: 210px; }
  .qr-box { min-width: 246px; min-height: 246px; }
  th, td { padding: 10px 10px; font-size: 13px; }
}
@media (max-width: 520px) {
  .grid.stats { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .stat .num { font-size: 24px; }
  .card { padding: 17px; }
  .auth-card { padding: 28px 22px; }
  .logout-btn span { display: none; }
  .logout-btn { padding: 9px 11px; border-radius: 11px; }
  /* manage senders modal */
  .modal { padding: 20px 16px; border-radius: 16px; }
  .modal-scrim { padding: 12px; align-items: flex-start; overflow-y: auto; }
  .modal-actions { bottom: -20px; }
  .mg-mode-row { flex-direction: column; align-items: stretch; }
  .mg-mode-row .input { width: 100%; }
  .mg-add-row { flex-direction: column; }
  .mg-add-row .btn { width: 100%; }
  .mg-row { flex-direction: column; align-items: stretch; gap: 10px; }
  .mg-row .ops .btn-sm { flex: 1; text-align: center; }
  /* GB features page */
  .gb-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .gb-row .input.gb-tgl { width: 100%; }
  .gb-time { flex-direction: column; align-items: stretch; padding-left: 2px; }
  .gb-time-inputs { justify-content: flex-start; }
}
