/* JB SOLUTIONS - WhatsApp Number Searcher theme */
:root {
  --bg: #0a0e17;
  --bg2: #0d1322;
  --card: rgba(255, 255, 255, .035);
  --card-border: rgba(255, 255, 255, .08);
  --text: #eef1f7;
  --muted: #8b93a9;
  --green: #25d366;
  --green-d: #1da851;
  --indigo: #6366f1;
  --cyan: #22d3ee;
  --red: #f43f5e;
  --amber: #fbbf24;
  --radius: 16px;
  --sidebar-w: 248px;
  --header-h: 64px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: radial-gradient(1200px 600px at 80% -10%, rgba(37, 211, 102, .07), transparent),
              radial-gradient(900px 500px at -10% 20%, rgba(99, 102, 241, .08), 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(--green), #0ea5a5); font-weight: 800; font-size: 20px; color: #04240f;
  box-shadow: 0 6px 18px rgba(37, 211, 102, .35);
}
.brand-name { font-weight: 800; letter-spacing: .4px; font-size: 19px; }
.brand-name small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: 1.5px; }

/* ---------- 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(10, 14, 23, .82); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--card-border);
}
.app-header .page-title { font-size: 18px; font-weight: 700; }
.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; }

.app-sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--sidebar-w); z-index: 50;
  background: rgba(13, 19, 34, .96); border-right: 1px solid var(--card-border);
  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; }
.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: .18s;
}
.nav a .ico { font-size: 18px; width: 24px; text-align: center; }
.nav a:hover { background: rgba(255, 255, 255, .05); color: var(--text); }
.nav a.active { background: linear-gradient(135deg, rgba(37, 211, 102, .18), rgba(37, 211, 102, .06));
  color: var(--green); box-shadow: inset 0 0 0 1px rgba(37, 211, 102, .25); }
.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: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 22px; backdrop-filter: blur(10px); }
.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; }
.stat .lbl { color: var(--muted); font-size: 13px; font-weight: 600; }
.stat .big-ico { position: absolute; right: 14px; top: 14px; font-size: 30px; opacity: .25; }
.stat.green .num { color: var(--green); }

.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: .18s; color: #fff;
}
.btn-primary { background: linear-gradient(135deg, var(--green), var(--green-d)); color: #052b14; box-shadow: 0 8px 22px rgba(37, 211, 102, .3); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(37, 211, 102, .4); }
.btn-ghost { background: rgba(255, 255, 255, .06); border: 1px solid var(--card-border); color: var(--text); }
.btn-ghost:hover { background: rgba(255, 255, 255, .1); }
.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: .18s;
}
.input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(37, 211, 102, .15); }
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: #111829; border: 1px solid var(--card-border); border-radius: 20px; padding: 28px; width: 100%; max-width: 460px;
  max-height: 92vh; overflow-y: auto; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.modal h3 { margin-bottom: 6px; } .modal .sub { color: var(--muted); font-size: 13.5px; margin-bottom: 18px; }
.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(37, 211, 102, .14); color: var(--green); border-color: rgba(37, 211, 102, .4); }

.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; }

/* 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; }
}
