/* Login + admin pages. Built on app.css (glass, .btn, .input, .seg, .chip, .t) — only layout lives here. */

/* ---------- Login ---------- */
body.auth-page { height: auto; overflow-x: hidden; overflow-y: auto; min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 24px 16px; }
.auth-card { width: min(420px, 100%); min-width: 0; border-radius: 24px; padding: 28px 26px 22px; animation: popIn .25s var(--ease-out); }
.auth-brand { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; margin-bottom: 22px; }
.auth-brand img { width: 72px; height: 72px; border-radius: 20px; box-shadow: 0 0 0 1px rgba(227, 181, 58, .28), 0 12px 32px -10px rgba(227, 181, 58, .35); }
.auth-brand h1 { margin: 0; font: 800 26px/1.1 var(--display); font-stretch: 88%; letter-spacing: -.01em; }
.auth-brand p { margin: 0; color: var(--muted); font-size: 13.5px; }
.auth-tabs { display: flex; width: 100%; margin-bottom: 18px; }
.auth-tabs button { flex: 1; }
.auth-form { display: grid; gap: 14px; }
.auth-form .input input { font-family: var(--sans); }
.auth-form .btn { width: 100%; height: 44px; margin-top: 4px; font-size: 14px; }
.auth-form .hint { margin: -6px 0 0; font-size: 12px; color: var(--dim); }
.auth-error { margin: 0; padding: 10px 14px; border-radius: 12px; font-size: 13px; background: var(--down-bg); color: var(--down); border: 1px solid rgba(224, 112, 107, .25); }
.auth-foot { margin-top: 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 12px; color: var(--dim); }
.auth-foot .lang { margin: 0; }
.pw-toggle { background: none; border: 0; color: var(--dim); cursor: pointer; padding: 4px; display: grid; place-items: center; }
.auth-switch { margin-top: 16px; text-align: center; font-size: 13px; color: var(--muted); }
.auth-switch a { color: var(--gold); font-weight: 650; }
.auth-switch a:hover { text-decoration: underline; }
.auth-wide { width: 100%; height: 44px; }

/* ---------- Sign up ---------- */
.signup-step { display: flex; align-items: center; gap: 10px; margin: 6px 0 10px; font-size: 14px; }
.step-n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; font: 800 12px var(--sans);
  color: var(--on-gold); background: linear-gradient(180deg, var(--gold-hi), var(--gold)); }
.step-hint { margin: -4px 0 12px !important; font-size: 12.5px; color: var(--muted); }
.ex-list { display: grid; gap: 8px; margin-bottom: 22px; }
.ex-btn {
  display: flex; align-items: center; gap: 12px; height: 58px; padding: 0 14px; border-radius: 14px;
  background: rgba(255, 226, 140, .04); border: 1px solid var(--line-2); transition: border-color .15s, background .2s, transform .15s;
}
a.ex-btn:hover { border-color: var(--gold-line); background: rgba(227, 181, 58, .07); }
a.ex-btn:active { transform: scale(.985); }
.ex-btn.off { opacity: .55; }
.ex-name { font-weight: 700; font-size: 14.5px; white-space: nowrap; }
.ex-go { margin-left: auto; min-width: 0; display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--gold); text-align: right; line-height: 1.3; }
.ex-go svg { flex: none; }
.ex-btn.off .ex-go { color: var(--dim); }
.ex-logo { width: 34px; height: 34px; border-radius: 10px; object-fit: contain; flex: none; background: rgba(255, 255, 255, .06); }
.ex-mono { display: grid; place-items: center; font: 800 12px var(--sans); color: var(--gold); box-shadow: inset 0 0 0 1px var(--line-2); }
.ex-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.ex-pick button {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px; border-radius: 12px; cursor: pointer;
  background: rgba(0, 0, 0, .3); border: 1px solid var(--line-2); font-size: 12px; font-weight: 650; color: var(--muted);
  transition: border-color .15s, color .15s, background .15s;
}
.ex-pick button .ex-logo { width: 26px; height: 26px; border-radius: 8px; }
.ex-pick button:hover { color: var(--text); border-color: var(--dim); }
.ex-pick button.on { color: var(--text); border-color: var(--gold); background: rgba(227, 181, 58, .1); box-shadow: 0 0 0 3px rgba(227, 181, 58, .1); }
.signup-done .done-mark { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; color: var(--up);
  background: var(--up-bg); box-shadow: inset 0 0 0 1px rgba(92, 192, 141, .35); }
.signup-done p b { color: var(--text); }

/* Admin: requests + referral links */
.req-row td { vertical-align: top; }
.req-msg { display: block; color: var(--muted); font-size: 12px; max-width: 280px; white-space: normal; }
.plat { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.plat .ex-logo { width: 20px; height: 20px; border-radius: 6px; }
.links-grid { display: grid; gap: 12px; }
.link-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; }
.link-row .input input { font-family: var(--sans); font-size: 13px; }
.link-row .plat { font-size: 14px; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
@media (max-width: 760px) { .link-row { grid-template-columns: minmax(0, 1fr) auto; } .link-row .input { grid-column: 1 / -1; grid-row: 2; } }
.pw-toggle:hover { color: var(--text); }

/* ---------- Trial-ending warning (js/trialwarn.js) ---------- */
.main.has-trialwarn { grid-template-rows: 58px auto minmax(0, 1fr) 36px; }
.trialwarn {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 14px; border-radius: 16px;
  box-shadow: inset 0 0 0 1px rgba(227, 181, 58, .38), 0 10px 30px -12px rgba(227, 181, 58, .25);
  animation: popIn .3s var(--ease-out);
}
.trialwarn .tw-ico { width: 36px; height: 36px; flex: none; border-radius: 11px; display: grid; place-items: center; color: var(--gold); background: var(--gold-soft); }
.trialwarn .tw-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.trialwarn .tw-text b { font-size: 13.5px; }
.trialwarn .tw-text span { font-size: 12.5px; color: var(--muted); }
.trialwarn .btn { flex: none; }
.trialwarn.urgent { box-shadow: inset 0 0 0 1px rgba(224, 112, 107, .5), 0 10px 30px -12px rgba(224, 112, 107, .3); }
.trialwarn.urgent .tw-ico { color: var(--down); background: var(--down-bg); }
.trialwarn.urgent .tw-text b { color: var(--down); }
@media (max-width: 760px) {
  .main.has-trialwarn { grid-template-rows: auto auto minmax(0, 1fr); }
  .trialwarn { margin: 10px 10px 0; flex-wrap: wrap; padding: 10px 12px; gap: 10px; }
  .trialwarn .tw-text { flex-basis: calc(100% - 90px); }
  .trialwarn .btn { margin-left: 46px; }
}

/* ---------- First-login welcome tour (js/onboarding.js) ---------- */
.onb {
  position: fixed; inset: 0; z-index: 500; opacity: 0; transition: opacity .35s ease;
  background: rgba(10, 9, 7, .38);
  backdrop-filter: blur(14px) saturate(1.35) brightness(.78); -webkit-backdrop-filter: blur(14px) saturate(1.35) brightness(.78);
}
.onb.in { opacity: 1; }
/* clear window over the highlighted part: full layer minus a rect (mask composite) */
.onb.has-hole {
  -webkit-mask: linear-gradient(#000 0 0) 0 0 / 100% 100% no-repeat, linear-gradient(#000 0 0) var(--hx) var(--hy) / var(--hw) var(--hh) no-repeat;
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) 0 0 / 100% 100% no-repeat exclude, linear-gradient(#000 0 0) var(--hx) var(--hy) / var(--hw) var(--hh) no-repeat;
}
.onb-ring {
  position: fixed; z-index: 501; border-radius: 22px; pointer-events: none;
  box-shadow: 0 0 0 2px var(--gold), 0 0 0 7px rgba(227, 181, 58, .18), 0 0 40px rgba(227, 181, 58, .25);
  transition: left .35s var(--ease-out), top .35s var(--ease-out), width .35s var(--ease-out), height .35s var(--ease-out);
  animation: onbPulse 2.4s ease-in-out infinite;
}
@keyframes onbPulse { 50% { box-shadow: 0 0 0 2px var(--gold-hi), 0 0 0 10px rgba(227, 181, 58, .12), 0 0 56px rgba(227, 181, 58, .32); } }
.onb-card {
  position: fixed; z-index: 502; left: 50%; top: 50%; translate: -50% -50%; width: min(440px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px); overflow-y: auto; scrollbar-width: none; border-radius: 24px; padding: 22px 22px 18px;
  transition: left .35s var(--ease-out), translate .35s var(--ease-out);
}
.onb-card.step-in .onb-body, .onb-card.step-in h2 { animation: popIn .25s var(--ease-out); }
.onb-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.onb-dots { display: flex; gap: 6px; }
.onb-dots i { width: 7px; height: 7px; border-radius: 999px; background: var(--line-2); transition: width .25s, background .25s; }
.onb-dots i.on { width: 22px; background: var(--gold); }
.onb-card h2 { margin: 0 0 10px; font: 800 24px/1.15 var(--display); font-stretch: 88%; letter-spacing: -.01em; }
.onb-body p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.onb-rule { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; padding: 14px; border-radius: 16px;
  background: rgba(227, 181, 58, .08); border: 1px solid rgba(227, 181, 58, .3); }
.onb-rule-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--gold); background: rgba(227, 181, 58, .14); }
.onb-rule b { display: block; font-size: 14.5px; line-height: 1.4; margin-bottom: 6px; }
.onb-trial { margin-top: 12px !important; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px !important; }
.onb-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.onb-actions .btn.ghost { margin-right: auto; }
@media (max-width: 760px) {
  .onb-card { top: auto; bottom: 16px; translate: -50% 0; padding: 18px 16px 14px; }
  .onb-card h2 { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) { .onb-ring { animation: none; } }

/* ---------- Sidebar: language switch + Log out ---------- */
.side-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.side-logout {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; cursor: pointer;
  background: none; border: 1px solid var(--line-2); color: var(--dim); font-size: 11.5px; font-weight: 700;
  transition: color .15s, border-color .15s, background .15s;
}
.side-logout:hover { color: var(--down); border-color: rgba(224, 112, 107, .45); background: var(--down-bg); }
.side-logout svg { flex: none; }
/* collapsed (icon-only) sidebar: stack, icon only */
@media (max-width: 1100px) {
  .side-actions { flex-direction: column; }
  .side-logout { width: 34px; padding: 0; justify-content: center; }
  .side-logout span { display: none; }
}

/* ---------- Account row in the terminal's bell menu ---------- */
.account-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-top: 12px; margin-top: 4px; border-top: 1px solid var(--line); }
.account-row small { display: block; color: var(--dim); font-size: 11px; }
.account-row b { display: block; font-size: 13px; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-btns { display: flex; gap: 6px; }

/* ---------- Live chat over the mascot card (js/chat.js) ---------- */
.b-coin.has-chat { min-height: 380px; }
.b-coin .coin-stage { transition: opacity .5s ease, filter .5s ease; }
.b-coin.chatting .coin-stage { opacity: .42; filter: saturate(.9); }   /* mascot becomes the backdrop */
.mchat { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; padding: 14px; gap: 8px; pointer-events: none; }
.mchat > * { pointer-events: auto; }
.mchat-list {
  flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 4px 2px;
  scrollbar-width: none; mask-image: linear-gradient(180deg, transparent 0, #000 28px);
}
.mchat-list::-webkit-scrollbar { display: none; }
.mchat-list > :first-child { margin-top: auto; }   /* newest messages sit just above the bar */
.mchat-msg {
  max-width: 82%; padding: 8px 12px 6px; border-radius: 16px; font-size: 13px; line-height: 1.45;
  backdrop-filter: blur(10px) saturate(1.2); -webkit-backdrop-filter: blur(10px) saturate(1.2);
  animation: popIn .2s var(--ease-out); overflow-wrap: anywhere;
}
.mchat-msg p { margin: 0; }
.mchat-msg .at { display: block; margin-top: 2px; font-size: 10.5px; color: var(--dim); text-align: right; }
.mchat-msg .who { display: block; font-size: 11px; font-weight: 700; color: var(--gold); margin-bottom: 1px; }
.mchat-msg.me { align-self: flex-end; background: rgba(227, 181, 58, .16); border: 1px solid rgba(227, 181, 58, .32); border-bottom-right-radius: 6px; }
.mchat-msg.team { align-self: flex-start; background: rgba(16, 15, 11, .72); border: 1px solid var(--line-2); border-bottom-left-radius: 6px; }
.mchat-hello {
  align-self: center; text-align: center; max-width: 290px; padding: 10px 14px; border-radius: 14px;
  background: rgba(10, 9, 7, .55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid var(--line);
}
.mchat-hello b { display: block; font-size: 13px; margin-bottom: 2px; }
.mchat-hello span { font-size: 12px; color: var(--muted); }
.mchat-bar {
  display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 5px 0 16px; border-radius: 999px;
  background: rgba(10, 9, 7, .7); border: 1px solid var(--line-2);
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  transition: border-color .15s, box-shadow .15s;
}
.mchat-bar:focus-within { border-color: var(--gold-line); box-shadow: 0 0 0 3px rgba(227, 181, 58, .1); }
.mchat-bar input { flex: 1; min-width: 0; background: none; border: 0; outline: none; font-size: 13.5px; }
.mchat-bar input::placeholder { color: var(--dim); }
.mchat-send {
  width: 36px; height: 36px; flex: none; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer;
  color: var(--on-gold); background: linear-gradient(180deg, var(--gold-hi), var(--gold)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35);
  transition: transform .15s, opacity .15s;
}
.mchat-send:active:not(:disabled) { transform: scale(.92); }
.mchat-send:disabled { opacity: .5; cursor: progress; }
.mchat-err { margin: 0; font-size: 12px; color: var(--down); text-align: center; }
.mchat-admin { margin-top: auto; align-self: center; display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px;
  font-size: 12px; color: var(--muted); background: rgba(10, 9, 7, .6); border: 1px solid var(--line-2); backdrop-filter: blur(8px); }
.mchat-admin:hover { color: var(--gold); border-color: var(--gold-line); }

/* ---------- Admin panel: chats ---------- */
.chats { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; min-height: 520px; }
.thread-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; max-height: 620px; }
.thread-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 11px 16px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .12s; }
.thread-list li:hover { background: rgba(255, 226, 140, .04); }
.thread-list li.on { background: var(--gold-soft); }
.thread-list b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-list .last { grid-column: 1 / -1; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-list .when { color: var(--dim); font-size: 11px; }
.unread-dot { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--gold); color: var(--on-gold); font-size: 10.5px; font-weight: 800; }
.convo { display: flex; flex-direction: column; min-height: 520px; }
.convo-msgs { flex: 1; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; max-height: 560px; }
.convo-msgs > :first-child { margin-top: auto; }
.convo-msgs .mchat-msg { backdrop-filter: none; }
.convo-msgs .mchat-msg.me { align-self: flex-start; background: rgba(255, 255, 255, .04); border-color: var(--line-2); border-radius: 16px 16px 16px 6px; }  /* member, on the left */
.convo-msgs .mchat-msg.team { align-self: flex-end; background: rgba(227, 181, 58, .14); border-color: rgba(227, 181, 58, .3); border-radius: 16px 16px 6px 16px; }  /* team, on the right */
.convo .mchat-bar { margin: 0 14px 14px; }
.tab-badge { margin-left: 6px; }

/* ---------- Admin panel ---------- */
body.admin-page { overflow: hidden; }
.admin-shell { height: 100vh; height: 100dvh; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 14px; padding: 14px; }
.admin-top { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 18px; flex-wrap: wrap; }
.admin-top .brand { padding: 0; }
.admin-top .brand b { font-size: 15px; }
.admin-top .who { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.admin-top .who b { color: var(--text); }
.admin-main { overflow-y: auto; overflow-x: hidden; min-height: 0; padding: 4px 2px 24px; scrollbar-gutter: stable; }
.admin-main > * { max-width: 1400px; margin-left: auto; margin-right: auto; }
/* tab bar: never wider than the screen; on phones it's a strip you swipe sideways (the page itself stays put) */
.admin-main > .admin-tabs { display: flex; width: max-content; max-width: 100%; margin: 0 0 16px max(0px, calc((100% - 1400px) / 2)); overscroll-behavior-x: contain; }
.admin-tabs button { flex: none; }

.add-form { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1.2fr) auto; gap: 12px; align-items: end; }
.add-form .input input { font-family: var(--sans); }
.add-form.five { grid-template-columns: minmax(120px, .8fr) minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1.2fr) auto; }
.input select { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: none; font-size: 13.5px; cursor: pointer; }
.input select option { background: var(--panel-solid); color: var(--text); }
.form-msg { margin: 12px 0 0; font-size: 13px; }
.form-msg.ok { color: var(--up); }
.form-msg.err { color: var(--down); }

.stat-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat-tile { border-radius: 16px; padding: 14px 16px; cursor: pointer; text-align: left; border: 0; color: inherit; font: inherit; }
.stat-tile span { display: block; font-size: 12px; color: var(--muted); font-weight: 550; }
.stat-tile b { display: block; font: 700 24px/1.2 var(--mono); margin-top: 4px; }
.stat-tile.on { box-shadow: inset 0 0 0 1px var(--gold-line); }
.stat-tile.review b { color: var(--warn); }
.stat-tile.kicked b { color: var(--down); }
.stat-tile.active b { color: var(--up); }

.members-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.members-tools .input { height: 36px; min-width: 220px; flex: 1; max-width: 320px; }
.members-tools .input input { font-family: var(--sans); font-size: 13px; }
.t td.actions { white-space: nowrap; text-align: right; }
.t td.actions .btn + .btn { margin-left: 6px; }
.t tr.review-row td { background: rgba(227, 154, 85, .05); }
.t td .note { color: var(--dim); font-size: 12px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; display: block; }
.t td .copy { cursor: copy; }
.btn.danger { color: var(--down); }
.btn.danger:hover { border-color: rgba(224, 112, 107, .45); }
.btn.good { color: var(--up); }
.btn.good:hover { border-color: rgba(92, 192, 141, .45); }

.audit-list { list-style: none; margin: 0; padding: 0; }
.audit-list li { display: grid; grid-template-columns: 150px 110px minmax(0, 1fr); gap: 12px; padding: 10px 18px; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.audit-list li:last-child { border-bottom: 0; }
.audit-list .when { color: var(--dim); font-family: var(--mono); font-size: 12px; }
.audit-list .target { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.confirm-bg { position: fixed; inset: 0; z-index: 200; background: rgba(0, 0, 0, .55); display: grid; place-items: center; padding: 16px; animation: fade .15s ease-out; }
.confirm { width: min(400px, 100%); border-radius: 20px; padding: 20px; }
.confirm h4 { margin: 0 0 6px; font-size: 16px; }
.confirm p { margin: 0 0 18px; color: var(--muted); font-size: 13px; }
.confirm .row { display: flex; justify-content: flex-end; gap: 8px; }

@media (max-width: 900px) {
  .chats { grid-template-columns: minmax(0, 1fr); }
  .thread-list { max-height: 260px; }
  .add-form, .add-form.five { grid-template-columns: minmax(0, 1fr); }
  .stat-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .audit-list li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
@media (max-width: 760px) {
  .admin-shell { padding: 10px; gap: 10px; }
  .admin-top .brand div { display: none; }
  .members-tools .input { max-width: none; min-width: 0; }
}

@media (max-width: 480px) {
  body.auth-page { padding: 16px 12px; place-items: start center; }
  .auth-card { padding: 22px 16px 18px; border-radius: 20px; }
  .auth-brand h1 { font-size: 23px; }
  .ex-btn { height: auto; min-height: 54px; padding: 8px 12px; gap: 10px; }
  .ex-go { font-size: 12px; }
  .ex-pick button { padding: 9px 4px; font-size: 11.5px; }
  .auth-foot { flex-wrap: wrap; }
}

/* ---------- Admin: Telegram tab ---------- */
.tg-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.tg-row .input { min-width: 0; }
.tg-steps { margin: 0 0 4px; padding-left: 18px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.tg-steps li + li { margin-top: 4px; }
.tg-admins { list-style: none; margin: 0; padding: 0; }
.tg-admins li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.tg-admins li b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.tg-admins li.dim { color: var(--dim); font-size: 13px; }

/* ---------- Signals (terminal tab + admin panel) ---------- */
.sec-title { margin: 22px 0 10px; font: 700 14px/1.2 var(--sans); color: var(--muted); letter-spacing: .02em; text-transform: uppercase; }
.sig-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); }
.sig { padding: 16px; display: flex; flex-direction: column; align-items: stretch; text-align: left; gap: 12px; min-width: 0; border-left: 3px solid var(--up); }
.sig.short { border-left-color: var(--down); }
.sig.done { opacity: .78; border-left-color: var(--line-2); }
.sig.flash { animation: sigflash 1.6s ease-out; }
@keyframes sigflash { from { box-shadow: 0 0 0 2px var(--gold-line), 0 0 28px rgba(227, 181, 58, .25); } to { box-shadow: 0 0 0 0 transparent; } }
.sig-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sig-coin { display: inline-flex; align-items: center; gap: 8px; margin-right: 4px; color: var(--text); text-decoration: none; }
.sig-coin b { font: 700 18px/1 var(--display); }
.sig-status { margin-left: auto; }
.sig-nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.sig-nums > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 8px 10px; border-radius: var(--r-md); background: var(--panel-2); }
.sig-nums small { font-size: 11px; color: var(--dim); }
.sig-nums b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sig-nums em { font-style: normal; font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sig-res b { font-size: 17px; }
.ladder { position: relative; height: 34px; margin: 2px 10px 0; }
.ladder::before { content: ""; position: absolute; left: 0; right: 0; top: 9px; height: 4px; border-radius: 4px; background: var(--panel-3); }
.lad-loss, .lad-win { position: absolute; top: 9px; height: 4px; border-radius: 4px; }
.lad-loss { background: var(--down); opacity: .55; }
.lad-win { background: var(--up); opacity: .55; }
.lad-mark { position: absolute; top: 5px; width: 2px; height: 12px; margin-left: -1px; background: var(--muted); }
.lad-mark span { position: absolute; top: 15px; left: 50%; transform: translateX(-50%); font: 600 9.5px/1 var(--mono); color: var(--dim); white-space: nowrap; }
.lad-mark.sl { background: var(--down); } .lad-mark.sl span { color: var(--down); }
.lad-mark.en { background: var(--text); } .lad-mark.en span { color: var(--text); }
.lad-mark.tp { background: var(--up); } .lad-mark.tp.hit span { color: var(--up); }
.lad-now { position: absolute; top: 4px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px rgba(227, 181, 58, .25), 0 0 14px rgba(227, 181, 58, .6); transition: left .6s var(--ease-out); }
.sig-tps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.sig-tps li { display: grid; grid-template-columns: 34px 1fr auto 44px auto; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 9px; font-size: 13px; background: rgba(255, 255, 255, .02); }
.sig-tps li > span:first-child { color: var(--dim); font-weight: 600; font-size: 12px; }
.sig-tps li.hit { background: var(--up-bg); }
.sig-tps li .muted { text-align: right; }
.sig-note { margin: 0; padding: 8px 10px; border-radius: 9px; background: var(--gold-soft); color: var(--text); font-size: 13px; overflow-wrap: anywhere; }
.sig-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 11.5px; color: var(--dim); }
.sig-actions { display: flex; gap: 6px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--line); }
.sig-disclaimer { margin: 22px 0 6px; font-size: 12px; color: var(--dim); max-width: 760px; }
.sub-line { margin: 5px 0 0; color: var(--muted); font-size: 13.5px; }
.sig-list { display: grid; gap: 12px; }
.sig-list .sig { background: rgba(255, 255, 255, .015); }

/* admin: form + preview */
.sig-admin { grid-template-columns: minmax(0, 440px) minmax(0, 1fr); align-items: start; }
.sig-form { display: flex; flex-direction: column; gap: 14px; }
.sig-row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.sig-form .seg { width: 100%; }
.sig-form .seg button { flex: 1; }
.sig-side button[data-side="long"].on { background: var(--up-bg); color: var(--up); }
.sig-side button[data-side="short"].on { background: var(--down-bg); color: var(--down); }
.sig-tps-edit { display: grid; gap: 6px; }
.tp-edit { display: grid; grid-template-columns: 34px minmax(0, 1fr) 84px 28px; gap: 6px; align-items: center; }
.tp-edit .input.pct span { margin-left: 2px; }
.sig-tg-hint { margin: 0; font-size: 11.5px; line-height: 1.5; }
.sig-tg-hint code { font-family: var(--mono); color: var(--muted); overflow-wrap: anywhere; }
.sig-preview { display: flex; flex-direction: column; gap: 14px; }
.sig-warn { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--warn-bg); color: var(--warn); font-size: 13px; }
.sig-example h4 { margin: 0 0 4px; font-size: 13px; color: var(--muted); }
@media (max-width: 1000px) { .sig-admin { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) {
  .sig-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sig-tps li { grid-template-columns: 30px 1fr auto 38px; }
  .sig-tps li .chip { display: none; }
}

/* chat box: clear */
.mchat-clear {
  position: absolute; top: 12px; right: 12px; z-index: 2; display: inline-flex; align-items: center; gap: 5px;
  height: 28px; padding: 0 10px; border-radius: 999px; font-size: 11.5px; color: var(--muted); cursor: pointer;
  background: rgba(10, 9, 7, .62); border: 1px solid var(--line-2); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: color .15s, border-color .15s;
}
.mchat-clear:hover { color: var(--down); border-color: rgba(224, 112, 107, .45); }
.mchat-clear[hidden], .mchat-ask[hidden] { display: none; }
.mchat-ask {
  position: absolute; top: 12px; left: 12px; right: 12px; z-index: 4; display: flex; flex-direction: column; gap: 6px;
  padding: 14px; border-radius: 16px; background: rgba(12, 11, 8, .9); border: 1px solid var(--line-2);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); animation: popIn .18s var(--ease-out);
}
.mchat-ask b { font-size: 13.5px; }
.mchat-ask span { font-size: 12px; color: var(--muted); line-height: 1.45; }
.mchat-ask div { display: flex; justify-content: flex-end; gap: 6px; margin-top: 4px; }
/* admin conversation: where the member cleared */
.convo-cleared { align-self: stretch; display: flex; flex-direction: column; align-items: center; gap: 1px; margin: 6px 0; padding: 7px 0;
  border-top: 1px dashed var(--line-2); border-bottom: 1px dashed var(--line-2); text-align: center; }
.convo-cleared span { font-size: 11.5px; font-weight: 600; color: var(--warn); }
.convo-cleared small { font-size: 11px; color: var(--dim); }
