/* ── Invalid phone countdown ── */
.portal-error {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.err-text {
  font-size: 12px;
  line-height: 1.5;
}

.countdown-block {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border: 1px solid rgba(255, 77, 106, 0.5);
  background: rgba(255, 77, 106, 0.08);
  border-radius: 2px;
  animation: countdown-pulse 0.6s ease;
}

.countdown-num {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
  color: #ff4d6a;
  line-height: 1;
}

@keyframes countdown-pulse {
  0% { transform: scale(1.25); opacity: 0.5; }
  100% { transform: scale(1); opacity: 1; }
}

/* ── Support terminal overlay ── */
.term-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.72);
  display: grid;
  place-items: center;
  padding: 16px;
}

.term-overlay.hidden { display: none; }

.term-window {
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  background: rgba(4, 8, 16, 0.96);
  border: 1px solid var(--border-glow);
  box-shadow: 0 0 40px rgba(0, 255, 170, 0.12);
  font-family: var(--mono);
}

.term-titlebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-dim);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.term-close {
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.term-close:hover { color: var(--accent); }

.term-log {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  min-height: 220px;
  max-height: 50vh;
  font-size: 12px;
  line-height: 1.65;
}

.term-line {
  margin-bottom: 10px;
  word-break: break-word;
}

.term-prefix {
  color: var(--text-dim);
  margin-right: 8px;
}

.term-sys .term-text { color: rgba(0, 255, 170, 0.55); }
.term-agent .term-text { color: var(--accent); }
.term-user .term-text { color: var(--text-primary); }

.term-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--border-dim);
}

.term-prompt {
  color: var(--accent);
  font-size: 14px;
}

.term-input-row input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--mono);
  font-size: 13px;
}

.term-input-row input::placeholder {
  color: var(--text-dim);
}

.term-log-inline {
  min-height: 180px;
  max-height: 260px;
  padding: 0;
  overflow-y: auto;
  font-size: 12px;
  line-height: 1.65;
}

.portal-dashboard .term-sys .term-text { color: rgba(160, 220, 195, 0.5); }
.portal-dashboard .term-agent .term-text { color: rgba(0, 255, 170, 0.72); }

.auth-forgot {
  display: block;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  text-decoration: none;
  letter-spacing: 0.04em;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.auth-forgot:hover { color: var(--accent); }

/* ── Dashboard layout (portal-home style) ── */
.dash-hero {
  max-width: 620px;
  min-height: 100dvh;
  padding: 56px 28px 40px;
  justify-content: flex-start;
}

.dash-block {
  margin-bottom: 16px;
}

.dash-block:last-of-type {
  margin-bottom: 20px;
}

.dash-label {
  margin: 0;
  padding: 22px 24px 0;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  color: rgba(160, 220, 195, 0.55);
}

.dash-body {
  padding: 14px 24px 22px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
}

.support-inline-body {
  display: flex;
  flex-direction: column;
  padding-bottom: 16px;
}

.dash-input-form {
  margin-top: 12px;
}

.term-window .dash-input-form {
  margin-top: 0;
  padding: 12px 14px;
  border-top: 1px solid var(--border-dim);
}

.dash-input-form .phone-row {
  margin: 0;
}

.dash-input-form .phone-field {
  flex: 1;
  display: flex;
  align-items: center;
  min-width: 0;
}

.chat-compose-img {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  padding: 0;
  border: none;
  border-left: 1px solid rgba(0, 255, 170, 0.22);
  background: transparent;
  color: rgba(0, 255, 170, 0.55);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.chat-compose-img:hover {
  background: rgba(0, 255, 170, 0.08);
  color: rgba(0, 255, 170, 0.88);
}

.chat-compose-img svg {
  opacity: 0.85;
  transition: opacity 0.2s;
}

.chat-compose-img:hover svg {
  opacity: 1;
}

.dash-input-form .term-input {
  flex: 1;
  width: 0;
  min-width: 0;
  border: none;
  background: transparent;
  outline: none;
  padding: 18px 16px 18px 10px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-primary);
}

.dash-input-form .term-input::placeholder {
  color: rgba(160, 220, 195, 0.3);
}

.dash-signout {
  display: block;
  width: 100%;
  padding: 14px 20px;
  border: 1px solid rgba(0, 255, 170, 0.22);
  background: rgba(0, 255, 170, 0.05);
  color: rgba(0, 255, 170, 0.62);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.dash-signout:hover {
  background: rgba(0, 255, 170, 0.12);
  color: rgba(0, 255, 170, 0.88);
}

.term-kv {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.term-kv .kv-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: rgba(160, 220, 195, 0.45);
}

.term-kv .kv-val {
  color: rgba(232, 255, 244, 0.88);
  text-align: right;
}

.term-kv .kv-val.accent { color: rgba(0, 255, 170, 0.75); }
.term-kv .kv-val.warn { color: rgba(255, 120, 140, 0.9); }
.term-kv .kv-val.ok { color: rgba(0, 255, 170, 0.75); }

.term-timeline {
  list-style: none;
}

.term-timeline li,
.term-timeline .tl-entry {
  padding: 14px 0;
  border-bottom: 1px solid rgba(0, 255, 170, 0.06);
}

.term-timeline li:last-child,
.term-timeline .tl-entry:last-child { border-bottom: none; }

#dash-paid-intel .tl-head,
.term-timeline .tl-head {
  color: rgba(160, 220, 195, 0.58);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-align: center;
  margin-bottom: 8px;
  line-height: 1.35;
}

.tl-wave-num {
  font-size: 11px;
  font-weight: 400;
  color: rgba(160, 220, 195, 0.42);
}

.term-timeline .tl-pred {
  color: rgba(232, 255, 244, 0.88);
  font-size: 13px;
  letter-spacing: 0.03em;
  margin-bottom: 4px;
}

#dash-paid-intel .tl-inside {
  margin-bottom: 5px;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0.03em;
}

#dash-paid-intel .tl-inside-tag {
  letter-spacing: 0.12em;
  color: rgba(0, 255, 170, 0.78);
  font-weight: 500;
}

#dash-paid-intel .tl-inside-sep {
  color: rgba(160, 220, 195, 0.35);
}

#dash-paid-intel .tl-inside-val {
  font-size: 16px;
  letter-spacing: 0.05em;
  color: rgba(232, 255, 244, 0.94);
}

.tl-fixture {
  text-align: center;
  margin-bottom: 10px;
}

.tl-fixture-title {
  margin: 0;
  font-family: "Orbitron", var(--mono);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.4;
  color: rgba(232, 255, 244, 0.92);
}

.tl-wave-badge {
  display: inline-block;
  margin-top: 6px;
  font-size: 10px;
  letter-spacing: 0.12em;
  padding: 2px 8px;
  color: rgba(0, 255, 170, 0.55);
}

.tl-intel {
  padding: 10px 12px;
  border-left: 2px solid rgba(0, 255, 170, 0.32);
  background: rgba(0, 0, 0, 0.22);
}

.tl-intel.is-live {
  border-left-color: rgba(0, 255, 170, 0.6);
}

.tl-intel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.tl-intel-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(160, 220, 195, 0.55);
}

.tl-badge {
  font-size: 10px;
  letter-spacing: 0.12em;
  flex-shrink: 0;
}

.tl-badge-live {
  color: rgba(0, 255, 170, 0.78);
  animation: tl-live-pulse 2.2s ease-in-out infinite;
}

.tl-badge-hit {
  color: rgba(0, 255, 170, 0.7);
}

.tl-badge-miss {
  color: rgba(245, 158, 11, 0.68);
}

@keyframes tl-live-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.tl-intel-value {
  margin: 0;
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.4;
  color: rgba(0, 255, 170, 0.88);
}

.tl-result {
  font-size: 11px;
  letter-spacing: 0.03em;
}

.tl-result.settled { color: rgba(0, 255, 170, 0.75); }
.tl-result.pending { color: rgba(160, 220, 195, 0.45); }

.paywall-msg {
  color: rgba(232, 255, 244, 0.82);
  font-size: 12px;
  margin-bottom: 10px;
  line-height: 1.5;
}

.paywall-reject-notice {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.08);
  border-radius: 4px;
}

.paywall-reject-title {
  color: #f59e0b;
  font-size: 12px;
  font-weight: 600;
  margin: 0 0 8px;
  line-height: 1.4;
}

.paywall-reject-detail {
  color: rgba(255, 236, 200, 0.88);
  font-size: 12px;
  margin: 0;
  line-height: 1.55;
}

.paywall-amount {
  color: rgba(0, 255, 170, 0.75);
  font-size: 13px;
  margin-bottom: 14px;
}

.paywall-qr-wrap {
  display: flex;
  justify-content: center;
  padding: 8px 0 4px;
}

.tl-result.miss { color: rgba(248, 113, 113, 0.88); }
.tl-note { color: var(--muted); font-size: 12px; margin-top: 4px; }
#dash-paid-intel .paid-current-block {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(0, 255, 170, 0.08);
}

#dash-paid-intel .paid-current-block .term-empty {
  text-align: center;
}

.paid-current-block {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.paid-current-block.is-live {
  padding-top: 16px;
  border-top-color: rgba(0, 255, 170, 0.12);
}

.paywall-qr {
  border: 1px solid rgba(0, 255, 170, 0.2);
  background: #fff;
  border-radius: 4px;
}

.paywall-address-row {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: 10px 0;
  border: 1px solid rgba(0, 255, 170, 0.18);
  background: rgba(0, 0, 0, 0.25);
}

.paywall-address {
  flex: 1;
  padding: 10px 12px;
  font-size: 11px;
  word-break: break-all;
  color: rgba(232, 255, 244, 0.88);
}

.btn-copy-addr {
  flex-shrink: 0;
  min-width: 64px;
  border-left: 1px solid rgba(0, 255, 170, 0.22);
}

.pay-chain-select {
  margin: 12px 0 14px;
}

.pay-chain-select-label {
  margin-bottom: 8px;
}

.pay-chain-row {
  display: flex;
  flex-direction: row;
  gap: 10px;
}

.pay-chain-option {
  flex: 1;
  min-width: 0;
  position: relative;
  cursor: pointer;
}

.pay-chain-option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
}

.pay-chain-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 56px;
  padding: 10px 8px;
  border: 1px solid rgba(0, 255, 170, 0.18);
  background: rgba(0, 0, 0, 0.25);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.pay-chain-option:hover .pay-chain-card {
  border-color: rgba(0, 255, 170, 0.32);
  background: rgba(0, 255, 170, 0.04);
}

.pay-chain-option:has(input:checked) .pay-chain-card {
  border-color: rgba(0, 255, 170, 0.55);
  background: rgba(0, 255, 170, 0.08);
  box-shadow: 0 0 14px rgba(0, 255, 170, 0.12), inset 0 0 0 1px rgba(0, 255, 170, 0.08);
}

.pay-chain-option:has(input:focus-visible) .pay-chain-card {
  outline: 1px solid rgba(0, 255, 170, 0.65);
  outline-offset: 2px;
}

.pay-chain-net {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(220, 255, 245, 0.88);
  text-transform: uppercase;
  line-height: 1.3;
  text-align: center;
}

.pay-chain-token {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: rgba(0, 255, 170, 0.92);
  line-height: 1.2;
}

.pay-chain-option:has(input:checked) .pay-chain-token {
  color: rgba(0, 255, 170, 1);
  text-shadow: 0 0 8px rgba(0, 255, 170, 0.35);
}

@media (max-width: 380px) {
  .pay-chain-row {
    flex-direction: column;
  }
}

.pay-txid-field {
  margin-top: 12px;
  margin-bottom: 12px;
}

.pay-confirm-btn {
  width: 100%;
  min-height: 52px;
  padding: 16px 20px;
  border: 1px solid rgba(0, 255, 170, 0.28);
  border-top: 1px solid rgba(0, 255, 170, 0.28);
  background: rgba(0, 255, 170, 0.08);
  font-size: 11px;
  letter-spacing: 0.16em;
}

.pay-confirm-btn:hover:not(:disabled) {
  background: rgba(0, 255, 170, 0.16);
  color: rgba(0, 255, 170, 0.95);
}

.pay-confirmed-notice {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  max-width: min(92vw, 420px);
  padding: 12px 18px;
  border: 1px solid rgba(0, 255, 170, 0.45);
  background: rgba(0, 20, 14, 0.92);
  color: rgba(0, 255, 170, 0.95);
  font-size: 12px;
  text-align: center;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.pay-confirmed-notice.hidden {
  display: none;
}

.pay-confirm-window {
  max-width: 440px;
}

.pay-confirm-body {
  padding: 18px 16px 8px;
}

.pay-confirm-actions {
  display: flex;
  gap: 0;
  border-top: 1px solid rgba(0, 255, 170, 0.15);
}

.pay-confirm-btn-secondary,
.pay-confirm-btn-primary {
  flex: 1;
  min-height: 48px;
  padding: 14px 16px;
  border: none;
  border-left: 1px solid rgba(0, 255, 170, 0.15);
  font-size: 10px;
  letter-spacing: 0.14em;
}

.pay-confirm-btn-secondary {
  background: rgba(0, 0, 0, 0.2);
  color: rgba(160, 220, 195, 0.65);
}

.pay-confirm-btn-primary {
  background: rgba(0, 255, 170, 0.1);
  color: rgba(0, 255, 170, 0.88);
}

.pay-confirm-btn-primary:hover:not(:disabled) {
  background: rgba(0, 255, 170, 0.18);
}

.pay-confirm-actions .pay-confirm-btn-secondary:first-child {
  border-left: none;
}

.term-empty {
  color: var(--text-dim);
  font-size: 12px;
  padding: 8px 0;
}

@media (max-width: 520px) {
  .dash-hero { padding: 48px 18px 32px; }
  .dash-label { padding: 18px 16px 0; }
  .dash-body { padding: 12px 16px 18px; }
}

.chat-route-hint {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--accent, #00ffaa);
  margin: 0 0 8px;
  opacity: 0.85;
}

.chat-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.dash-link-btn {
  background: none;
  border: 1px solid rgba(0, 255, 170, 0.35);
  color: var(--accent, #7ee787);
  font-size: 11px;
  padding: 6px 10px;
  cursor: pointer;
  border-radius: 4px;
}

.dash-link-btn:hover { border-color: #00ffaa; }

.chat-img {
  max-width: min(220px, 100%);
  max-height: 180px;
  border-radius: 6px;
  margin-top: 4px;
  display: block;
}
