/* ==========================================================================
   PhoneBoard CAD — SaaS Paywall, Telegram Stars, Web Login & Owner Studio
   File: frontend/saas_ui.css
   Zero-Overlap Topbar Pill · High-Converting CAD Modal · Responsive Dark UI
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Zero-Overlap Topbar Account / PRO Pill (#btnSaasAccount)
   -------------------------------------------------------------------------- */
#btnSaasAccount.saas-account-pill {
  height: 28px !important;
  padding: 0 9px !important;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-shrink: 0;
  white-space: nowrap;
  cursor: pointer;
  font-family: var(--sans, "Inter", system-ui, sans-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fde68a;
  background: linear-gradient(180deg, rgba(220, 160, 58, 0.24) 0%, rgba(44, 165, 104, 0.12) 100%);
  border: 1px solid rgba(220, 160, 58, 0.65);
  box-shadow: 0 0 12px rgba(220, 160, 58, 0.14), inset 0 1px 0 rgba(255, 240, 195, 0.16);
  transition: background 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease, transform 0.1s ease;
}

#btnSaasAccount.saas-account-pill:hover {
  background: linear-gradient(180deg, rgba(220, 160, 58, 0.34) 0%, rgba(44, 165, 104, 0.2) 100%);
  border-color: #f5b84b;
  color: #fffbeb;
  box-shadow: 0 0 16px rgba(220, 160, 58, 0.26), inset 0 1px 0 rgba(255, 245, 210, 0.24);
}

#btnSaasAccount.saas-account-pill.is-pro-active {
  color: #d1fae5;
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.28) 0%, rgba(16, 185, 129, 0.12) 100%);
  border-color: rgba(52, 211, 153, 0.68);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.2), inset 0 1px 0 rgba(167, 243, 208, 0.18);
}

#btnSaasAccount.saas-account-pill.is-pro-active:hover {
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.38) 0%, rgba(16, 185, 129, 0.18) 100%);
  border-color: #34d399;
  color: #ecfdf5;
}

#btnSaasAccount .saas-pill-star {
  color: #fbbf24;
  font-size: 12px;
  line-height: 1;
  flex-shrink: 0;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.45);
}

#btnSaasAccount.is-pro-active .saas-pill-star {
  color: #34d399;
  text-shadow: 0 0 8px rgba(52, 211, 153, 0.5);
}

#btnSaasAccount .saas-pill-label {
  font-family: var(--mono, "JetBrains Mono", monospace);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1;
}

/* Collapse label to crisp "★" on <= 1380px so .topbar NEVER overflows on 1123px screens */
@media (max-width: 1380px) {
  #btnSaasAccount.saas-account-pill {
    width: 28px !important;
    min-width: 28px !important;
    padding: 0 !important;
    gap: 0 !important;
  }
  #btnSaasAccount .saas-pill-label {
    display: none !important;
  }
}

/* --------------------------------------------------------------------------
   2. High-Converting CAD Paywall & Studio Modal (#saasModal, z-index: 6500)
   -------------------------------------------------------------------------- */
#saasModal.saas-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 6500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  background: rgba(6, 9, 14, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: saasFadeIn 0.15s ease-out;
}

#saasModal.saas-modal-overlay.hidden {
  display: none !important;
}

@keyframes saasFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes saasSlideUp {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.saas-dialog {
  width: min(880px, calc(100vw - 24px));
  max-height: min(860px, calc(100vh - 24px));
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #151b26 0%, #0e131b 100%);
  border: 1px solid #2e3b50;
  border-radius: 10px;
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.78), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: var(--text, #e8edf5);
  font-family: var(--sans, "Inter", system-ui, sans-serif);
  overflow: hidden;
  animation: saasSlideUp 0.17s ease-out;
}

/* Modal Header */
.saas-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 16px;
  background: linear-gradient(180deg, #192130 0%, #131924 100%);
  border-bottom: 1px solid #263246;
  flex-shrink: 0;
}

.saas-head-left {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.saas-head-badge {
  font-family: var(--mono, monospace);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 3px 7px;
  border-radius: 4px;
  color: #fde68a;
  background: linear-gradient(180deg, rgba(220, 160, 58, 0.25) 0%, rgba(220, 160, 58, 0.1) 100%);
  border: 1px solid rgba(220, 160, 58, 0.55);
  flex-shrink: 0;
}

.saas-head-title {
  font-size: 14px;
  font-weight: 700;
  color: #f4f7fc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.saas-head-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.saas-user-chip {
  font-family: var(--mono, monospace);
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 12px;
  background: #0d121a;
  border: 1px solid #2a364b;
  color: #9fb0c7;
  max-width: 210px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.saas-user-chip.is-auth {
  border-color: rgba(52, 211, 153, 0.45);
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.1);
}

.saas-close-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid #2c384d;
  background: #161d29;
  color: #9fb0c7;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s ease;
}

.saas-close-btn:hover {
  background: #242f42;
  border-color: #4b5e7d;
  color: #ffffff;
}

/* Segmented Tabs Bar */
.saas-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 7px 16px;
  background: #111620;
  border-bottom: 1px solid #232d3f;
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.saas-tabs::-webkit-scrollbar {
  display: none;
}

.saas-tab-btn {
  height: 30px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: #8f9fb5;
  font-family: var(--sans, sans-serif);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.12s ease;
}

.saas-tab-btn:hover {
  color: #e8eef7;
  background: rgba(255, 255, 255, 0.04);
}

.saas-tab-btn.active {
  color: #ffefd0;
  background: linear-gradient(180deg, rgba(220, 160, 58, 0.22) 0%, rgba(220, 160, 58, 0.09) 100%);
  border-color: rgba(220, 160, 58, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 232, 184, 0.14);
}

.saas-tab-pill {
  font-family: var(--mono, monospace);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 9px;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(52, 211, 153, 0.45);
  color: #6ee7b7;
}

/* Modal Body */
.saas-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.saas-pane {
  display: none;
  flex-direction: column;
  gap: 14px;
}

.saas-pane.active {
  display: flex;
}

/* --------------------------------------------------------------------------
   3. Contextual Paywall Target Banner & Free Unlock CTA
   -------------------------------------------------------------------------- */
.saas-target-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(220, 160, 58, 0.14) 0%, rgba(19, 25, 36, 0.95) 100%);
  border: 1px solid rgba(220, 160, 58, 0.48);
}

.saas-target-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 200px;
  flex: 1;
}

.saas-target-kicker {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #f5b84b;
}

.saas-target-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.saas-target-code {
  font-family: var(--mono, monospace);
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(11, 14, 19, 0.75);
  border: 1px solid #2d3a4f;
  color: #93c5fd;
}

.saas-target-sub {
  font-size: 11.5px;
  color: #9fb0c7;
}

.saas-btn-free-unlock {
  height: 36px;
  padding: 0 15px;
  border-radius: 6px;
  border: 1px solid #34d399;
  background: linear-gradient(180deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  font-family: var(--sans, sans-serif);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.32);
  transition: filter 0.12s ease, transform 0.1s ease;
  white-space: nowrap;
}

.saas-btn-free-unlock:hover:not(:disabled) {
  filter: brightness(1.08);
}

.saas-btn-free-unlock:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* --------------------------------------------------------------------------
   4. Desktop 2-Click Telegram Login & Live Invoice Waiting Banners
   -------------------------------------------------------------------------- */
.saas-auth-box,
.saas-invoice-wait {
  padding: 12px 14px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.13) 0%, rgba(15, 21, 31, 0.96) 100%);
  border: 1px solid rgba(59, 130, 246, 0.48);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.saas-invoice-wait {
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.13) 0%, rgba(15, 21, 31, 0.96) 100%);
  border-color: rgba(52, 211, 153, 0.48);
}

.saas-auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.saas-auth-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.saas-auth-sub {
  font-size: 11.5px;
  color: #9fb0c7;
  line-height: 1.45;
}

.saas-cmd-copy-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.saas-cmd-code {
  font-family: var(--mono, monospace);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 5px;
  background: #090d13;
  border: 1px solid #2e3c52;
  color: #fde68a;
  user-select: all;
}

.saas-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
  animation: saasPulse 1.25s ease-in-out infinite;
  flex-shrink: 0;
}

.saas-invoice-wait .saas-pulse-dot {
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
}

@keyframes saasPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* --------------------------------------------------------------------------
   5. Pricing Cards Grid (3 High-Converting Engineering Plans)
   -------------------------------------------------------------------------- */
.saas-plans-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

@media (max-width: 780px) {
  .saas-plans-grid {
    grid-template-columns: 1fr;
  }
}

.saas-plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 14px;
  border-radius: 9px;
  background: linear-gradient(180deg, #161d29 0%, #10151f 100%);
  border: 1px solid #293548;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: border-color 0.14s ease, transform 0.14s ease, box-shadow 0.14s ease;
}

.saas-plan-card:hover {
  border-color: #425573;
  transform: translateY(-1px);
}

.saas-plan-card.is-featured {
  background: linear-gradient(180deg, rgba(220, 160, 58, 0.13) 0%, rgba(16, 185, 129, 0.07) 55%, #111722 100%);
  border-color: rgba(220, 160, 58, 0.68);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.42), 0 0 20px rgba(220, 160, 58, 0.1), inset 0 1px 0 rgba(255, 232, 185, 0.16);
}

.saas-plan-ribbon {
  position: absolute;
  top: -1px;
  right: 12px;
  padding: 2px 8px;
  border-radius: 0 0 5px 5px;
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
  color: #090d13;
  font-family: var(--mono, monospace);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.saas-plan-top {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.saas-plan-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #f3f6fc;
  line-height: 1.3;
  padding-right: 54px;
}

.saas-plan-price-row {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin: 2px 0;
}

.saas-plan-stars {
  font-family: var(--mono, monospace);
  font-size: 23px;
  font-weight: 800;
  color: #fbbf24;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.saas-plan-card.is-featured .saas-plan-stars {
  color: #fde68a;
  text-shadow: 0 0 14px rgba(251, 191, 36, 0.28);
}

.saas-plan-period {
  font-size: 11px;
  color: #8b9bb3;
  font-weight: 500;
}

.saas-plan-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
  padding: 0;
}

.saas-plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 11.5px;
  color: #cbd5e1;
  line-height: 1.38;
}

.saas-plan-features li::before {
  content: "✓";
  color: #34d399;
  font-weight: 800;
  font-family: var(--mono, monospace);
  flex-shrink: 0;
}

/* Buttons */
.saas-btn {
  height: 34px;
  padding: 0 13px;
  border-radius: 6px;
  border: 1px solid #35455e;
  background: linear-gradient(180deg, #212b3d 0%, #18202e 100%);
  color: #eef3fa;
  font-family: var(--sans, sans-serif);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  transition: all 0.12s ease;
  white-space: nowrap;
}

.saas-btn:hover:not(:disabled) {
  background: linear-gradient(180deg, #2a374f 0%, #1f293b 100%);
  border-color: #51688c;
  color: #ffffff;
}

.saas-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.saas-btn-gold {
  background: linear-gradient(180deg, #eab308 0%, #ca8a04 100%);
  border-color: #facc15;
  color: #0b0f17;
  box-shadow: 0 4px 16px rgba(234, 179, 8, 0.24);
}

.saas-btn-gold:hover:not(:disabled) {
  background: linear-gradient(180deg, #facc15 0%, #eab308 100%);
  border-color: #fde047;
  color: #05070b;
}

.saas-btn-tg {
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  border-color: #60a5fa;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
}

.saas-btn-tg:hover:not(:disabled) {
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  border-color: #93c5fd;
  color: #ffffff;
}

.saas-btn-emerald {
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.26) 0%, rgba(16, 185, 129, 0.12) 100%);
  border-color: rgba(52, 211, 153, 0.62);
  color: #d1fae5;
}

.saas-btn-emerald:hover:not(:disabled) {
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.38) 0%, rgba(16, 185, 129, 0.2) 100%);
  border-color: #34d399;
  color: #ffffff;
}

.saas-plan-cta {
  width: 100%;
  height: 36px;
}

/* --------------------------------------------------------------------------
   6. Free Demo Boards Bar (1-Click Instant Test)
   -------------------------------------------------------------------------- */
.saas-demo-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 13px;
  border-radius: 8px;
  background: #0d121a;
  border: 1px solid #232f42;
}

.saas-demo-label {
  font-size: 11.5px;
  color: #9fb0c7;
  font-weight: 600;
}

.saas-demo-label strong {
  color: #6ee7b7;
}

.saas-demo-btns {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.saas-demo-btn {
  height: 27px;
  padding: 0 10px;
  border-radius: 5px;
  border: 1px solid rgba(52, 211, 153, 0.4);
  background: rgba(16, 185, 129, 0.1);
  color: #a7f3d0;
  font-family: var(--mono, monospace);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s ease;
}

.saas-demo-btn:hover {
  background: rgba(16, 185, 129, 0.22);
  border-color: #34d399;
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   7. Profile, Referral & Promo Code Tab + Admin Revenue Studio Tab
   -------------------------------------------------------------------------- */
.saas-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 720px) {
  .saas-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.saas-kpi-card {
  padding: 11px 12px;
  border-radius: 8px;
  background: #121823;
  border: 1px solid #263347;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.saas-kpi-lbl {
  font-size: 10.5px;
  font-weight: 600;
  color: #8b9bb3;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.saas-kpi-val {
  font-family: var(--mono, monospace);
  font-size: 17px;
  font-weight: 800;
  color: #f3f6fc;
}

.saas-kpi-val.gold {
  color: #fbbf24;
}

.saas-kpi-val.emerald {
  color: #34d399;
}

.saas-kpi-val.blue {
  color: #60a5fa;
}

.saas-kpi-sub {
  font-size: 10.5px;
  color: #6e7f99;
}

.saas-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 720px) {
  .saas-two-col {
    grid-template-columns: 1fr;
  }
}

.saas-card {
  padding: 13px 14px;
  border-radius: 8px;
  background: #121823;
  border: 1px solid #273449;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.saas-card.referral-highlight {
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.1) 0%, #121823 100%);
  border-color: rgba(52, 211, 153, 0.42);
}

.saas-card-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #f1f5fb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.saas-card-desc {
  font-size: 11.5px;
  color: #9fb0c7;
  line-height: 1.45;
}

.saas-input-row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.saas-input {
  flex: 1;
  min-width: 140px;
  height: 34px;
  padding: 0 10px;
  border-radius: 6px;
  background: #090d14;
  border: 1px solid #2c394e;
  color: #eef3fa;
  font-family: var(--sans, sans-serif);
  font-size: 12px;
  outline: none;
  transition: border-color 0.12s ease;
}

.saas-input.mono {
  font-family: var(--mono, monospace);
}

.saas-input:focus {
  border-color: #dca03a;
  box-shadow: 0 0 0 2px rgba(220, 160, 58, 0.16);
}

.saas-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.saas-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.saas-field.span-2 {
  grid-column: span 2;
}

.saas-field label {
  font-size: 10.5px;
  font-weight: 600;
  color: #8b9bb3;
}

.saas-msg {
  font-size: 11.5px;
  padding: 7px 10px;
  border-radius: 6px;
  line-height: 1.4;
}

.saas-msg.ok {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(52, 211, 153, 0.45);
  color: #a7f3d0;
}

.saas-msg.err {
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(248, 113, 113, 0.45);
  color: #fecaca;
}

.saas-msg.info {
  background: rgba(59, 130, 246, 0.13);
  border: 1px solid rgba(96, 165, 250, 0.42);
  color: #bfdbfe;
}

.saas-unlocked-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-height: 92px;
  overflow-y: auto;
}

/* Admin Payments Table */
.saas-table-wrap {
  overflow-x: auto;
  border: 1px solid #243044;
  border-radius: 6px;
  background: #0c1018;
}

.saas-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
}

.saas-table th,
.saas-table td {
  padding: 7px 10px;
  text-align: left;
  border-bottom: 1px solid #1c2536;
  white-space: nowrap;
}

.saas-table th {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #8b9bb3;
  background: #131a26;
}

.saas-table tr:last-child td {
  border-bottom: none;
}

.saas-table td.mono {
  font-family: var(--mono, monospace);
}

.saas-ref-note {
  font-size: 11px;
  color: #7f91ab;
  line-height: 1.42;
}

/* --------------------------------------------------------------------------
   8. Owner Traffic (Proof-of-Human) & Search Engine Bot SEO Radar
   -------------------------------------------------------------------------- */
.saas-human-radar-card {
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.07) 0%, #121823 42%, #10151f 100%);
  border-color: rgba(52, 211, 153, 0.36);
  gap: 12px;
}

.saas-seo-radar-card {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.08) 0%, #121823 44%, #10151f 100%);
  border-color: rgba(96, 165, 250, 0.38);
  gap: 12px;
}

.saas-seo-radar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.saas-indexnow-btn {
  height: auto;
  min-height: 34px;
  padding: 6px 12px;
  font-size: 11.5px;
  line-height: 1.3;
  white-space: normal;
  text-align: center;
}

.saas-human-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.saas-seo-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

@media (max-width: 720px) {
  .saas-human-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .saas-seo-kpi-grid {
    grid-template-columns: 1fr;
  }
}

.saas-kpi-card.is-online-card {
  border-color: rgba(52, 211, 153, 0.48);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.13) 0%, #121823 100%);
}

.saas-subpanel {
  padding: 10px 12px;
  border-radius: 7px;
  background: #0c1119;
  border: 1px solid #202c3e;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.saas-subpanel-lbl {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #93a6c2;
}

/* 7-Day Daily Human Visitors Flex Bar Chart */
.saas-daily-chart {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 8px;
  height: 132px;
  padding: 6px 4px 2px;
}

.saas-chart-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.saas-chart-badge {
  font-family: var(--mono, monospace);
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 8px;
  background: #141c29;
  border: 1px solid #26344b;
  color: #7d8fa8;
  line-height: 1.3;
  flex-shrink: 0;
}

.saas-chart-badge.is-nonzero {
  color: #d1fae5;
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(52, 211, 153, 0.52);
}

.saas-chart-track {
  flex: 1;
  width: 100%;
  max-width: 46px;
  min-height: 54px;
  background: #101723;
  border: 1px solid #1f2b3d;
  border-radius: 5px;
  display: flex;
  align-items: flex-end;
  padding: 2px;
  overflow: hidden;
}

.saas-chart-bar {
  width: 100%;
  border-radius: 3px;
  background: linear-gradient(180deg, #34d399 0%, #059669 100%);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
  transition: height 0.24s ease;
}

.saas-chart-bar.is-zero {
  background: #223044;
  box-shadow: none;
}

.saas-chart-date {
  font-family: var(--mono, monospace);
  font-size: 10.5px;
  font-weight: 600;
  color: #8b9db7;
  flex-shrink: 0;
}

/* Breakdown Chips (Sources, GeoIP Countries, Devices, Search Bots) */
.saas-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.saas-stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 6px;
  background: #111824;
  border: 1px solid #233146;
  font-size: 11.5px;
  color: #7f91ab;
}

.saas-stat-chip.is-active {
  background: #162030;
  border-color: #364b6b;
  color: #eaf0f8;
}

.saas-stat-chip.src-google.is-active {
  border-color: rgba(96, 165, 250, 0.55);
}

.saas-stat-chip.src-yandex.is-active {
  border-color: rgba(251, 191, 36, 0.55);
}

.saas-stat-chip.src-bing.is-active {
  border-color: rgba(56, 189, 248, 0.55);
}

.saas-stat-chip.src-tg.is-active {
  border-color: rgba(59, 130, 246, 0.6);
}

.saas-stat-chip.src-yt.is-active {
  border-color: rgba(248, 113, 113, 0.55);
}

.saas-stat-chip.bot-chip.is-active {
  border-color: rgba(52, 211, 153, 0.5);
  background: rgba(16, 185, 129, 0.1);
}

.saas-chip-lbl {
  font-weight: 600;
}

.saas-chip-val {
  font-family: var(--mono, monospace);
  font-size: 11px;
  font-weight: 800;
  color: #6e7f99;
}

.saas-stat-chip.is-active .saas-chip-val {
  color: #fbbf24;
}

.saas-stat-chip.bot-chip.is-active .saas-chip-val {
  color: #6ee7b7;
}

.saas-geo-badge {
  font-family: var(--mono, monospace);
  font-size: 10px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(59, 130, 246, 0.16);
  border: 1px solid rgba(96, 165, 250, 0.44);
  color: #93c5fd;
}

.saas-muted-empty {
  font-size: 11.5px;
  color: #6e7f99;
}

/* Top Clicked Boards / BIOS / PDFs (24h) */
.saas-top-targets-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.saas-top-target-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 9px;
  border-radius: 5px;
  background: #121926;
  border: 1px solid #223047;
}

.saas-top-target-left {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  flex-wrap: wrap;
}

.saas-target-rank {
  font-family: var(--mono, monospace);
  font-size: 10.5px;
  font-weight: 700;
  color: #7c8ea8;
}

.saas-target-kind {
  font-family: var(--mono, monospace);
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  background: rgba(52, 211, 153, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.42);
  color: #6ee7b7;
}

.saas-target-kind.kind-bios {
  background: rgba(251, 191, 36, 0.15);
  border-color: rgba(251, 191, 36, 0.45);
  color: #fde68a;
}

.saas-target-kind.kind-pdf {
  background: rgba(96, 165, 250, 0.15);
  border-color: rgba(96, 165, 250, 0.45);
  color: #93c5fd;
}

.saas-target-kind.kind-search,
.saas-target-kind.kind-ai {
  background: rgba(192, 132, 252, 0.15);
  border-color: rgba(192, 132, 252, 0.45);
  color: #d8b4fe;
}

.saas-top-target-name {
  font-size: 11.5px;
  font-weight: 600;
  color: #e8eef7;
}

.saas-top-target-code {
  font-family: var(--mono, monospace);
  font-size: 10.5px;
  color: #8ba2c4;
  background: #0a0e15;
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid #233146;
}

.saas-top-target-cnt {
  font-family: var(--mono, monospace);
  font-size: 11.5px;
  font-weight: 800;
  color: #34d399;
  flex-shrink: 0;
}

/* Recent Crawled URLs Table */
.saas-crawls-table-wrap {
  max-height: 215px;
  overflow-y: auto;
}

.saas-bot-pill {
  font-family: var(--mono, monospace);
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(96, 165, 250, 0.14);
  border: 1px solid rgba(96, 165, 250, 0.42);
  color: #93c5fd;
}

.saas-crawl-url-cell {
  max-width: 440px;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 560px) {
  #saasModal.saas-modal-overlay {
    padding: 6px;
  }
  .saas-dialog {
    width: calc(100vw - 12px);
    max-height: calc(100vh - 12px);
  }
  .saas-head {
    padding: 9px 12px;
  }
  .saas-body {
    padding: 12px;
  }
  .saas-form-grid {
    grid-template-columns: 1fr;
  }
  .saas-field.span-2 {
    grid-column: span 1;
  }
  .saas-human-kpi-grid {
    grid-template-columns: 1fr;
  }
  .saas-daily-chart {
    gap: 4px;
    height: 118px;
  }
}
