/* TALK-SPAR TECH – pairing site
   Theme: Emerald Dark — deep green-black canvas, mint text, WhatsApp-green CTAs.
   Layout is unchanged from the Talkless family so both sites read as one brand. */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Plus Jakarta Sans', -apple-system, 'Segoe UI', Roboto, sans-serif;
  background:
    radial-gradient(760px 420px at 12% -8%, rgba(37, 211, 102, .13), transparent 62%),
    radial-gradient(680px 420px at 96% 4%, rgba(16, 185, 129, .09), transparent 58%),
    #07110D;
  background-attachment: fixed;
  color: #E8F2EC;
  min-height: 100vh;
}
.shell { max-width: 640px; margin: 0 auto; padding: 18px 16px 40px; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.topbar .brand small { display: block; font-size: 10px; letter-spacing: 3px; color: #7E9A8B; }
.topbar .brand strong { font-size: 17px; color: #F3FBF6; }
.icon-btn {
  background: #10201A; border: 1px solid #1E3A2F; color: #A9C4B6;
  padding: 7px 11px; border-radius: 9px; font-size: 15px; cursor: pointer; text-decoration: none;
}
.icon-btn:hover { background: #14291F; border-color: #2A5741; color: #D6F5E4; }
.card {
  background: #0E1C17; border: 1px solid #1E3A2F; border-radius: 16px;
  padding: 18px; margin-bottom: 14px;
  box-shadow: 0 18px 40px -30px rgba(0, 0, 0, .9);
}
/* ── hero (brand image) ─────────────────────────────────── */
.card.hero { padding: 0; overflow: hidden; border-radius: 16px; }
.hero-media { position: relative; width: 100%; aspect-ratio: 16 / 7; min-height: 210px; }
.hero-media img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 42%; display: block;
}
.hero-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(7,17,13,0) 0%, rgba(7,17,13,.10) 30%, rgba(10,26,20,.74) 72%, rgba(14,28,23,.97) 100%),
    linear-gradient(90deg, rgba(7,17,13,.42) 0%, rgba(7,17,13,0) 45%),
    linear-gradient(0deg, rgba(9,40,27,.28), rgba(9,40,27,.28));
}
.hero-copy { position: absolute; left: 16px; right: 16px; bottom: 14px; }
.hero-copy h1 { margin: 2px 0 3px; font-size: 21px; text-shadow: 0 2px 14px rgba(0,0,0,.65); }
.hero-copy .sub { margin: 0; color: #CDE7D9; font-size: 12.5px; text-shadow: 0 1px 10px rgba(0,0,0,.7); }
.hero-copy .pill { backdrop-filter: blur(4px); }
@media (max-width: 420px) {
  .hero-media { aspect-ratio: 4 / 3; }
  .hero-copy h1 { font-size: 18px; }
}
h1 { font-size: 21px; margin: 6px 0 2px; }
.sub { color: #8CA79B; font-size: 13px; margin-bottom: 14px; }
.pill {
  display: inline-block; font-size: 10px; letter-spacing: 2px; padding: 4px 10px;
  border-radius: 99px; border: 1px solid #2E6B4C; color: #A7F3D0; background: rgba(37,211,102,.09);
  margin-bottom: 6px;
}
.pill.off { border-color:#7A3540; color:#F87171; background: rgba(248,113,113,.07); }
label { display: block; font-size: 11px; letter-spacing: 1.5px; color: #7E9A8B; margin: 12px 0 6px; }
input[type=tel], input[type=text], input[type=password] {
  width: 100%; background: #08150F; border: 1px solid #26473A; color: #EAF6EF;
  padding: 12px 14px; border-radius: 10px; font-size: 15px; outline: none;
}
input:focus { border-color: #2F8F5B; box-shadow: 0 0 0 3px rgba(37,211,102,.12); }
.phone-wrap { display: flex; align-items: center; background: #08150F; border: 1px solid #26473A; border-radius: 10px; overflow: hidden; }
.phone-wrap span { padding: 0 12px; color: #8CA79B; font-size: 16px; border-right: 1px solid #1E3A2F; align-self: stretch; display: flex; align-items: center; }
.phone-wrap input { border: none; background: transparent; border-radius: 0; }
.btn {
  display: block; width: 100%; border: none; border-radius: 10px; padding: 13px;
  font-size: 15px; font-weight: 700; cursor: pointer; margin-top: 14px;
  background: linear-gradient(135deg, #0C6B3C, #17924F); color: #F2FFF7;
  box-shadow: 0 10px 26px -14px rgba(37, 211, 102, .65);
}
.btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.btn.ghost { background: #13251D; color: #B9D2C5; border: 1px solid #26473A; box-shadow: none; }
.status-box { margin-top: 14px; padding: 12px; border-radius: 10px; font-size: 14px; display: none; }
.status-box.show { display: block; }
.status-box.ok { background: rgba(37,211,102,.09); border: 1px solid #2E6B4C; color: #A7F3D0; }
.status-box.err { background: rgba(248,113,113,.08); border: 1px solid #7A3540; color: #FCA5A5; }
.status-box.info { background: rgba(56,189,168,.09); border: 1px solid #2C5C52; color: #9BE7D6; }
.code-result { text-align: center; padding: 18px; display: none; }
.code-result.show { display: block; }
.code-eyebrow { font-size: 10px; letter-spacing: 3px; color: #7E9A8B; }
.pairing-code {
  font-family: 'JetBrains Mono', Menlo, monospace; font-size: 30px; font-weight: 800;
  color: #34E27F; margin: 8px 0 12px; letter-spacing: 2px;
  text-shadow: 0 0 26px rgba(37, 211, 102, .35);
}
.copy-btn { background: #08150F; border: 1px solid #2E6B4C; color: #A7F3D0; padding: 9px 18px; border-radius: 9px; cursor: pointer; font-size: 13px; }
.copy-btn:hover { background: #0F2418; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat-card { background: #08150F; border: 1px solid #1E3A2F; border-radius: 12px; padding: 12px; text-align: center; }
.stat-card .n { font-size: 20px; font-weight: 800; }
.stat-card .l { font-size: 10px; letter-spacing: 1px; color: #7E9A8B; margin-top: 2px; }
.hidden { display: none; }
.row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid #163025; font-size: 13px; }
.row:last-child { border-bottom: none; }
.row .tag { font-size: 10px; padding: 2px 8px; border-radius: 99px; }
.tag.on { background: rgba(37,211,102,.13); color: #6EE7A8; }
.tag.off { background: rgba(148,163,184,.12); color: #94A3B8; }
.tag.x { background: rgba(248,113,113,.12); color: #F87171; }
textarea { width: 100%; background: #08150F; border: 1px solid #26473A; color: #EAF6EF; padding: 10px; border-radius: 10px; font-family: inherit; font-size: 13px; resize: vertical; min-height: 60px; }
.footer { text-align: center; color: #628073; font-size: 12px; margin-top: 18px; }
.footer a { color: #86C9A5; text-decoration: none; }
.footer a:hover { color: #A7F3D0; }
.notice-banner { display: none; background: #2A2410; border: 1px solid #7A5A20; color: #FCD34D; padding: 10px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 12px; }
.notice-banner.show { display: block; }
.mono { font-family: Menlo, Consolas, monospace; font-size: 12px; }

/* ── header actions (whatsapp + admin) ─────────────────────── */
.topbar-actions { display: flex; align-items: center; gap: 8px; }

/* ── group + secondary buttons ─────────────────────────────── */
/* .btn is built for <button>; these are <a>, so they need the link resets. */
a.btn { text-decoration: none; text-align: center; }
a.btn.ghost { color: #B9D2C5; }
.tg-btn { background: #25D366; color: #04140C; text-shadow: none; }
.tg-btn:hover { filter: brightness(1.07); }

/* ── session management ────────────────────────────────────── */
.sess-right { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.row .sess-id { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 52%; }
.del-btn {
  background: transparent; border: 1px solid #7A3540; color: #F87171;
  font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 8px;
  cursor: pointer; font-family: inherit;
}
.del-btn:hover:not(:disabled) { background: rgba(248,113,113,.1); }
.del-btn:disabled { opacity: .5; cursor: wait; }

/* ── country picker ───────────────────────────────────────── */
.country-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: #08150F; border: 1px solid #26473A; color: #EAF6EF;
  padding: 12px 14px; border-radius: 10px; font-size: 15px; font-family: inherit;
  cursor: pointer; text-align: left; transition: border-color .15s;
}
.country-trigger:hover { border-color: #2F8F5B; }
.country-trigger:focus-visible { outline: 2px solid #25D366; outline-offset: 2px; }
.country-trigger .sel-flag { font-size: 16px; margin-right: 8px; }
.country-trigger .sel-name { color: #E8F2EC; }
.country-trigger .sel-placeholder { color: #6E8579; }
.country-trigger .caret { color: #7E9A8B; font-size: 11px; }

.phone-wrap .plus { border-right: none; padding: 0 4px 0 12px; color: #7E9A8B; }
.phone-wrap .prefix {
  width: 58px; flex: 0 0 auto; text-align: center; border-right: 1px solid #1E3A2F;
  padding: 12px 6px; font-variant-numeric: tabular-nums; letter-spacing: .5px;
}
.phone-wrap input#phoneNumber { flex: 1 1 auto; min-width: 0; }

.modal {
  display: none; position: fixed; inset: 0; z-index: 60;
  background: rgba(3, 9, 6, .74); backdrop-filter: blur(4px); padding: 18px;
}
.modal.show { display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 560px) { .modal.show { align-items: center; } }
.modal-card {
  width: 100%; max-width: 520px; max-height: 78vh; display: flex; flex-direction: column;
  background: #0E1C17; border: 1px solid #1E3A2F; border-radius: 16px; padding: 14px;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .85);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.modal-head strong { font-size: 14px; }
.modal-close {
  background: #10201A; border: 1px solid #1E3A2F; color: #A9C4B6; border-radius: 8px;
  width: 30px; height: 30px; cursor: pointer; font-size: 13px; line-height: 1;
}
.modal-close:hover { background: #14291F; }
.country-list { margin-top: 10px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.country-option {
  display: flex; align-items: center; gap: 10px; padding: 11px 8px;
  border-radius: 9px; cursor: pointer; font-size: 14px;
}
.country-option:hover, .country-option:focus { background: #14291F; outline: none; }
.country-option .flag { font-size: 17px; }
.country-option .cname { flex: 1; }
.country-option .ccode { color: #7E9A8B; font-family: Menlo, Consolas, monospace; font-size: 12px; }
