/* ==========================================================================
   BidShield — Zero-Ban Upwork High-Ticket Radar & Due-Diligence Copilot
   Zero External CDN · Precision Dark Radar UI · Fully Responsive
   ========================================================================== */

:root {
  --bg-base: #070b14;
  --bg-elevated: #0d1424;
  --bg-surface: #111a2e;
  --bg-surface-2: #16223b;
  --bg-hover: #1a2845;
  --bg-glass: rgba(13, 20, 36, 0.86);

  --border-subtle: rgba(148, 163, 184, 0.14);
  --border-default: rgba(148, 163, 184, 0.22);
  --border-strong: rgba(148, 163, 184, 0.34);

  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #8b9bb4;
  --text-dim: #64748b;

  --emerald: #10b981;
  --emerald-soft: rgba(16, 185, 129, 0.14);
  --emerald-border: rgba(16, 185, 129, 0.36);

  --sky: #38bdf8;
  --sky-soft: rgba(56, 189, 248, 0.14);
  --sky-border: rgba(56, 189, 248, 0.36);

  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.14);
  --amber-border: rgba(245, 158, 11, 0.38);

  --rose: #f43f5e;
  --rose-soft: rgba(244, 63, 94, 0.14);
  --rose-border: rgba(244, 63, 94, 0.38);

  --indigo: #818cf8;

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.36);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.48);

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Inter", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", monospace;

  --topbar-h: 64px;
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100%;
  background: var(--bg-base);
}

body {
  margin: 0;
  min-height: 100vh;
  max-width: 100%;
  overflow-x: hidden;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-primary);
  background:
    radial-gradient(900px 520px at 14% -8%, rgba(16, 185, 129, 0.11), transparent 60%),
    radial-gradient(840px 500px at 88% -6%, rgba(56, 189, 248, 0.10), transparent 58%),
    var(--bg-base);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

p {
  margin: 0;
}

a {
  color: var(--sky);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.ico {
  display: inline-block;
  flex-shrink: 0;
  vertical-align: middle;
}

.ico-xs { width: 14px; height: 14px; }
.ico-sm { width: 16px; height: 16px; }
.ico-md { width: 20px; height: 20px; }
.ico-lg { width: 24px; height: 24px; }

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.hidden {
  display: none !important;
}

.mt-xs { margin-top: 8px; }
.mt-sm { margin-top: 12px; }
.mt-md { margin-top: 18px; }

.muted-sm {
  font-size: 13px;
  color: var(--text-muted);
}

.muted-xs {
  font-size: 12px;
  color: var(--text-dim);
}

.container {
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   Buttons, Inputs & Badges
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.12s ease, opacity 0.16s ease;
  white-space: nowrap;
  text-decoration: none;
}

.btn:hover:not(:disabled) {
  text-decoration: none;
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

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

.btn-primary {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #03150e;
  border-color: rgba(16, 185, 129, 0.55);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.24);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #34d399, #10b981);
}

.btn-secondary {
  background: var(--sky-soft);
  color: var(--sky);
  border-color: var(--sky-border);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(56, 189, 248, 0.22);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  border-color: var(--border-default);
}

.btn-outline:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--border-strong);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-subtle);
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(148, 163, 184, 0.10);
  color: var(--text-primary);
  border-color: var(--border-default);
}

.btn-danger-ghost {
  background: transparent;
  color: var(--rose);
  border-color: rgba(244, 63, 94, 0.28);
}

.btn-danger-ghost:hover:not(:disabled) {
  background: var(--rose-soft);
}

.btn-lg {
  padding: 12px 22px;
  font-size: 14.5px;
  border-radius: 11px;
}

.btn-sm {
  padding: 7px 13px;
  font-size: 13px;
}

.btn-xs {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 8px;
}

.btn-icon {
  padding: 7px;
  width: 34px;
  height: 34px;
}

.btn-block {
  width: 100%;
}

.btn-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.input,
.select,
.textarea {
  width: 100%;
  min-width: 0;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  background: rgba(7, 11, 20, 0.72);
  color: var(--text-primary);
  font-size: 13.5px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.16);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--text-dim);
}

.textarea {
  resize: vertical;
  line-height: 1.55;
}

.select-compact {
  width: auto;
  min-width: 88px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  white-space: nowrap;
}

.badge-emerald {
  background: var(--emerald-soft);
  color: #34d399;
  border-color: var(--emerald-border);
}

.badge-amber {
  background: var(--amber-soft);
  color: #fbbf24;
  border-color: var(--amber-border);
}

.badge-rose {
  background: var(--rose-soft);
  color: #fb7185;
  border-color: var(--rose-border);
}

.badge-info {
  background: var(--sky-soft);
  color: #7dd3fc;
  border-color: var(--sky-border);
}

.badge-neutral {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-secondary);
  border-color: var(--border-subtle);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  flex-shrink: 0;
}

.is-live .status-dot,
.dot-ok {
  background: var(--emerald);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.22);
}

.dot-warn {
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.22);
}

.dot-err {
  background: var(--rose);
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.22);
}

.dot-neutral {
  background: var(--text-dim);
}

/* ==========================================================================
   Top Navigation Bar
   ========================================================================== */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}

.topbar-inner {
  min-height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: left;
  min-width: 0;
  flex-shrink: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: var(--emerald);
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.20), rgba(56, 189, 248, 0.10));
  border: 1px solid var(--emerald-border);
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  white-space: nowrap;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.brand-tag {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.primary-tabs {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  padding: 4px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-subtle);
  gap: 2px;
}

.primary-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 9px;
  border-radius: 9px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
}

.primary-tab:hover {
  color: var(--text-primary);
}

.primary-tab.is-active {
  background: var(--bg-surface-2);
  color: var(--text-primary);
  box-shadow: inset 0 0 0 1px var(--border-default);
}

.primary-tab-link {
  text-decoration: none;
}

.primary-tab-link:hover {
  text-decoration: none;
  background: rgba(30, 41, 59, 0.55);
}

.primary-tools-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.primary-tools-menu > summary {
  list-style: none;
}

.primary-tools-menu > summary::-webkit-details-marker {
  display: none;
}

.primary-tools-menu[open] > summary {
  background: var(--bg-surface-2);
  color: var(--text-primary);
  box-shadow: inset 0 0 0 1px var(--border-default);
}

.primary-tools-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 90;
  min-width: 270px;
  padding: 6px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid var(--border-default);
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.65);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.primary-tools-dropdown a {
  display: block;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
}

.primary-tools-dropdown a:hover {
  background: rgba(16, 185, 129, 0.14);
  color: var(--text-primary);
  text-decoration: none;
}

@media (max-width: 760px) {
  .primary-tools-dropdown {
    left: auto;
    right: 0;
    min-width: 240px;
    max-width: calc(100vw - 32px);
  }

  .primary-tools-dropdown a {
    white-space: normal;
  }
}

.tab-pill {
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  background: var(--emerald-soft);
  color: #34d399;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tg-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  background: rgba(245, 158, 11, 0.11);
  border: 1px solid var(--amber-border);
  color: #fbbf24;
  white-space: nowrap;
}

.tg-chip.is-live {
  background: var(--emerald-soft);
  border-color: var(--emerald-border);
  color: #34d399;
}

/* ==========================================================================
   Views
   ========================================================================== */

.view-section {
  display: none;
}

.view-section.is-active {
  display: block;
}

/* ==========================================================================
   VIEW 1: LANDING PAGE
   ========================================================================== */

.hero {
  position: relative;
  padding: 58px 0 54px;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.25;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.12) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 75% 75% at 50% 25%, #000 35%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 75% 75% at 50% 25%, #000 35%, transparent 100%);
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.85fr);
  gap: 36px;
  align-items: center;
}

.guarantee-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: rgba(16, 185, 129, 0.11);
  border: 1px solid var(--emerald-border);
  color: #6ee7b7;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
  max-width: 100%;
}

.hero-title {
  margin-top: 20px;
  font-size: clamp(32px, 4.2vw, 50px);
  line-height: 1.1;
  font-weight: 800;
}

.text-gradient {
  background: linear-gradient(120deg, #34d399 0%, #38bdf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  margin-top: 18px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 640px;
}

.hero-subtitle strong {
  color: var(--text-primary);
}

.hero-cta-row {
  margin-top: 26px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-trust-row {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
}

.trust-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}

.trust-item svg {
  color: var(--emerald);
}

/* Hero Right Telemetry Panel */
.hero-panel {
  background: linear-gradient(180deg, rgba(17, 26, 46, 0.94), rgba(11, 18, 34, 0.96));
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-lg);
}

.hero-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.panel-title-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.22);
}

.panel-kicker {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.telemetry-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.telemetry-metric {
  padding: 13px 14px;
  border-radius: var(--radius-sm);
  background: rgba(7, 11, 20, 0.56);
  border: 1px solid var(--border-subtle);
}

.telemetry-metric.is-emerald {
  border-color: rgba(16, 185, 129, 0.28);
}

.telemetry-metric.is-rose {
  border-color: rgba(244, 63, 94, 0.25);
}

.telemetry-metric.is-sky {
  border-color: rgba(56, 189, 248, 0.25);
}

.metric-label {
  display: block;
  font-size: 11.5px;
  color: var(--text-muted);
}

.metric-value {
  display: block;
  margin-top: 4px;
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
}

.telemetry-metric.is-emerald .metric-value { color: #34d399; }
.telemetry-metric.is-rose .metric-value { color: #fb7185; }
.telemetry-metric.is-sky .metric-value { color: #7dd3fc; }

.shield-checklist {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.shield-check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-subtle);
}

.check-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--emerald-soft);
  color: #34d399;
  flex-shrink: 0;
  margin-top: 1px;
}

.shield-check-item strong {
  display: block;
  font-size: 13px;
  color: var(--text-primary);
}

.shield-check-item p {
  margin-top: 2px;
  font-size: 12.2px;
  color: var(--text-muted);
}

/* Landing Sections */
.section {
  padding: 64px 0;
}

.section-alt {
  background: rgba(13, 20, 36, 0.56);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 38px;
}

.section-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.section-head-row > div:first-child {
  max-width: 720px;
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.eyebrow {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #34d399;
  margin-bottom: 8px;
}

.section h2 {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.18;
}

.section-desc {
  margin-top: 10px;
  font-size: 14.8px;
  color: var(--text-muted);
}

/* 4-Step Workflow */
.workflow-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.step-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.step-card:hover {
  border-color: var(--emerald-border);
  transform: translateY(-2px);
}

.step-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.step-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--sky);
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  background: var(--sky-soft);
}

.step-ico {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
}

.step-card h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.step-card p {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Live Verified High-Ticket Samples Grid */
.samples-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.sample-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.16s ease, box-shadow 0.18s ease;
  text-align: left;
  width: 100%;
  min-width: 0;
}

.sample-card:hover {
  border-color: var(--emerald-border);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.sample-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sample-title {
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.sample-budget-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.budget-pill {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 700;
  color: #34d399;
}

.sample-client-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 12.2px;
  color: var(--text-muted);
}

.sample-summary {
  font-size: 12.8px;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sample-footer {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--sky);
  font-weight: 600;
}

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  max-width: 960px;
  margin: 0 auto;
}

.pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.pricing-card.is-featured {
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.09), rgba(17, 26, 46, 0.98) 34%);
  border-color: var(--emerald-border);
  box-shadow: 0 18px 46px rgba(16, 185, 129, 0.14);
}

.featured-ribbon {
  display: inline-block;
  align-self: flex-start;
  margin-bottom: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--emerald);
  color: #03150e;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.plan-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--sky);
}

.price-line {
  margin-top: 10px;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.price-usd {
  font-size: 44px;
  font-weight: 800;
  line-height: 1;
}

.price-period {
  font-size: 15px;
  color: var(--text-muted);
}

.price-cn {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.10);
  border: 1px solid rgba(56, 189, 248, 0.24);
  font-size: 12.8px;
  color: var(--text-secondary);
}

.price-cn strong {
  color: #7dd3fc;
}

.plan-desc {
  margin-top: 12px;
  font-size: 13.5px;
  color: var(--text-muted);
}

.plan-features {
  list-style: none;
  margin: 22px 0 26px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
  flex: 1;
}

.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.plan-features li svg {
  color: var(--emerald);
  margin-top: 3px;
}

.compliance-banner {
  margin: 28px auto 0;
  max-width: 960px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
  gap: 20px;
  padding: 20px 24px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  align-items: center;
}

.compliance-divider {
  height: 100%;
  background: var(--border-subtle);
}

.compliance-badge {
  display: inline-block;
  margin-bottom: 6px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  background: var(--sky-soft);
  color: #7dd3fc;
}

.compliance-badge.is-emerald {
  background: var(--emerald-soft);
  color: #34d399;
}

.compliance-item p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
}

.compliance-item strong {
  color: var(--text-primary);
}

.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 26px 0;
  background: rgba(7, 11, 20, 0.8);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--text-secondary);
}

.footer-brand svg {
  color: var(--emerald);
}

.footer-meta {
  font-size: 12.2px;
  color: var(--text-dim);
}

/* ==========================================================================
   VIEW 2: RADAR CONSOLE
   ========================================================================== */

.console-shell {
  padding-top: 20px;
  padding-bottom: 44px;
}

/* Top Status Strip */
.status-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  flex-wrap: wrap;
}

.status-kpis {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  min-width: 0;
}

.kpi-tile {
  display: flex;
  flex-direction: column;
  padding-right: 18px;
  border-right: 1px solid var(--border-subtle);
}

.kpi-tile:last-child {
  border-right: 0;
  padding-right: 0;
}

.kpi-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.kpi-val {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.25;
}

.kpi-tile.is-emerald .kpi-val { color: #34d399; }
.kpi-tile.is-rose .kpi-val { color: #fb7185; }
.kpi-tile.is-sky .kpi-val { color: #7dd3fc; }

.kpi-mode-row {
  margin-top: 2px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.kpi-mode-text {
  font-size: 13px;
  font-weight: 700;
  color: #fbbf24;
}

.kpi-mode-row.is-live .kpi-mode-text {
  color: #34d399;
}

.upstream-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.upstream-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}

.upstream-dots {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.upstream-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  background: rgba(7, 11, 20, 0.56);
  border: 1px solid var(--border-subtle);
  font-size: 11.5px;
  color: var(--text-secondary);
}

/* Sub-tabs */
.subtabs {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 10px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.subtab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.subtab:hover {
  color: var(--text-primary);
  background: rgba(148, 163, 184, 0.08);
}

.subtab.is-active {
  background: var(--bg-surface-2);
  color: var(--text-primary);
  border-color: var(--border-default);
}

.subtab-count {
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  background: rgba(148, 163, 184, 0.16);
  color: var(--text-secondary);
}

.subtab.is-active .subtab-count {
  background: var(--emerald-soft);
  color: #34d399;
}

.subtab-panel {
  display: none;
  margin-top: 16px;
}

.subtab-panel.is-active {
  display: block;
}

/* Feed Toolbar */
.feed-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  flex: 1 1 520px;
  min-width: 0;
}

.verdict-pills {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 10px;
  background: rgba(7, 11, 20, 0.72);
  border: 1px solid var(--border-subtle);
  gap: 3px;
  flex-wrap: wrap;
}

.pill-btn {
  padding: 6px 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.14s ease;
  white-space: nowrap;
}

.pill-btn:hover {
  color: var(--text-primary);
}

.pill-btn.is-active {
  background: var(--bg-surface-2);
  color: var(--text-primary);
  box-shadow: inset 0 0 0 1px var(--border-default);
}

.pill-btn[data-verdict="BID_NOW"].is-active {
  background: var(--emerald-soft);
  color: #34d399;
  box-shadow: inset 0 0 0 1px var(--emerald-border);
}

.pill-btn[data-verdict="WATCH"].is-active {
  background: var(--amber-soft);
  color: #fbbf24;
  box-shadow: inset 0 0 0 1px var(--amber-border);
}

.pill-btn[data-verdict="SKIP_GHOST"].is-active {
  background: var(--rose-soft);
  color: #fb7185;
  box-shadow: inset 0 0 0 1px var(--rose-border);
}

.score-slider-wrap {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  background: rgba(7, 11, 20, 0.56);
  border: 1px solid var(--border-subtle);
}

.slider-label {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.slider-label strong {
  color: var(--emerald);
  margin-left: 3px;
}

input[type="range"] {
  accent-color: var(--emerald);
  width: 96px;
  cursor: pointer;
}

.search-input-wrap {
  position: relative;
  flex: 1 1 200px;
  min-width: 160px;
}

.search-input-wrap .input-ico {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

.search-input-wrap .input {
  padding-left: 34px;
}

.scan-form {
  flex: 1 1 390px;
  min-width: 0;
}

.scan-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.scan-input-group .input {
  flex: 1 1 180px;
}

.warnings-banner {
  margin-top: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  background: var(--amber-soft);
  border: 1px solid var(--amber-border);
  color: #fde68a;
  font-size: 12.8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Feed Two-Column Workspace */
.feed-workspace {
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(340px, 430px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.feed-list-col,
.feed-detail-col {
  min-width: 0;
}

.col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 0 4px;
}

.col-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.col-meta {
  font-size: 12px;
  color: var(--text-dim);
}

.opportunity-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: calc(100vh - 250px);
  overflow-y: auto;
  padding-right: 4px;
}

.opp-card {
  width: 100%;
  text-align: left;
  padding: 14px 15px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.12s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.opp-card:hover {
  background: var(--bg-surface-2);
  border-color: var(--border-strong);
}

.opp-card.is-selected {
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.10), rgba(22, 34, 59, 0.96));
  border-color: var(--emerald-border);
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.24);
}

.opp-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.opp-head-main {
  flex: 1;
  min-width: 0;
}

.opp-badges-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 5px;
}

.opp-title {
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.opp-meta-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.opp-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.is-verified {
  color: #34d399;
  font-weight: 600;
}

.is-unverified {
  color: #fbbf24;
  font-weight: 600;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  background: rgba(148, 163, 184, 0.11);
  color: var(--text-secondary);
  border: 1px solid rgba(148, 163, 184, 0.14);
  max-width: 100%;
  overflow-wrap: anywhere;
}

.tag-rule {
  background: rgba(56, 189, 248, 0.12);
  color: #7dd3fc;
  border-color: rgba(56, 189, 248, 0.28);
}

.tag-skill {
  background: rgba(129, 140, 248, 0.12);
  color: #c7d2fe;
  border-color: rgba(129, 140, 248, 0.26);
}

/* Circular SVG Score Ring */
.score-ring {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.score-ring.is-lg {
  width: 68px;
  height: 68px;
}

.score-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.score-ring-bg {
  fill: none;
  stroke: rgba(148, 163, 184, 0.18);
  stroke-width: 4.5;
}

.score-ring-fg {
  fill: none;
  stroke-width: 4.5;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.35s ease;
}

.score-ring-val {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 800;
}

.score-ring.is-lg .score-ring-val {
  font-size: 19px;
}

.score-emerald .score-ring-fg { stroke: var(--emerald); }
.score-emerald .score-ring-val { color: #34d399; }

.score-amber .score-ring-fg { stroke: var(--amber); }
.score-amber .score-ring-val { color: #fbbf24; }

.score-rose .score-ring-fg { stroke: var(--rose); }
.score-rose .score-ring-val { color: #fb7185; }

/* Detail Panel */
.detail-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.detail-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 20px;
  min-width: 0;
}

.detail-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.detail-title {
  font-size: 20px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.detail-meta-strip {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  background: rgba(7, 11, 20, 0.52);
  border: 1px solid var(--border-subtle);
  font-size: 12.8px;
  color: var(--text-secondary);
}

.detail-actions-bar {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.section-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.section-subhead h3 {
  font-size: 15.5px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* BidScore 5D Breakdown */
.score-overview-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: rgba(7, 11, 20, 0.56);
  border: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.score-summary-copy {
  flex: 1;
  min-width: 200px;
}

.score-summary-copy p {
  margin-top: 6px;
  font-size: 13.2px;
  color: var(--text-secondary);
}

.components-list {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.comp-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.comp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}

.comp-label {
  font-weight: 600;
  color: var(--text-primary);
}

.comp-nums {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-secondary);
}

.progress-track {
  height: 7px;
  border-radius: var(--radius-pill);
  background: rgba(148, 163, 184, 0.14);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  transition: width 0.35s ease;
}

.progress-fill.is-emerald { background: linear-gradient(90deg, #059669, #34d399); }
.progress-fill.is-amber { background: linear-gradient(90deg, #d97706, #fbbf24); }
.progress-fill.is-rose { background: linear-gradient(90deg, #e11d48, #fb7185); }

.comp-reason {
  font-size: 12px;
  color: var(--text-muted);
}

.reasons-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.reason-box {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(7, 11, 20, 0.45);
  border: 1px solid var(--border-subtle);
}

.reason-box.is-pass { border-color: rgba(16, 185, 129, 0.25); }
.reason-box.is-warn { border-color: rgba(244, 63, 94, 0.28); }

.reason-box h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.reason-box.is-pass h4 { color: #34d399; }
.reason-box.is-warn h4 { color: #fb7185; }

.reason-list {
  margin: 0;
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12.6px;
  color: var(--text-secondary);
}

.job-desc-details {
  margin-top: 14px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
}

.job-desc-details summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--sky);
  user-select: none;
}

.job-desc-body {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(7, 11, 20, 0.56);
  border: 1px solid var(--border-subtle);
  font-size: 13px;
  color: var(--text-secondary);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 280px;
  overflow-y: auto;
}

/* Employer Due-Diligence Card */
.pii-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
  border: 1px solid var(--emerald-border);
}

.dd-headline-box {
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  background: rgba(7, 11, 20, 0.52);
  border: 1px solid var(--border-subtle);
}

.dd-headline-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dd-headline-box strong {
  font-size: 14.5px;
}

.dd-headline-box p {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.intel-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.intel-card {
  padding: 12px;
  border-radius: var(--radius-sm);
  background: rgba(7, 11, 20, 0.5);
  border: 1px solid var(--border-subtle);
  min-width: 0;
}

.intel-card h4 {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--sky);
  margin-bottom: 8px;
}

.kv-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12.2px;
}

.kv-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.10);
  padding-bottom: 4px;
}

.kv-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.kv-k {
  color: var(--text-muted);
  text-transform: capitalize;
  flex-shrink: 0;
}

.kv-v {
  color: var(--text-primary);
  text-align: right;
  overflow-wrap: anywhere;
}

.web-snippet {
  padding: 7px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.web-snippet:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.web-snippet-title {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--sky);
  overflow-wrap: anywhere;
}

.web-snippet p {
  margin-top: 3px;
  font-size: 12px;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

/* Proposal Card */
.hitl-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid var(--amber-border);
  color: #fde68a;
  font-size: 12.8px;
  font-weight: 600;
  margin-bottom: 14px;
}

.hitl-notice svg {
  color: var(--amber);
  margin-top: 2px;
}

.proposal-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.proposal-text-box {
  padding: 16px;
  border-radius: var(--radius-sm);
  background: rgba(7, 11, 20, 0.72);
  border: 1px solid var(--border-default);
  font-size: 13.8px;
  line-height: 1.68;
  color: var(--text-primary);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.strategy-note {
  margin-top: 12px;
  padding: 10px 13px;
  border-radius: var(--radius-sm);
  background: rgba(56, 189, 248, 0.09);
  border: 1px solid rgba(56, 189, 248, 0.25);
  font-size: 12.6px;
  color: #bae6fd;
}

/* ==========================================================================
   Sub-tab 2 & 3: Rules & Profile Panels
   ========================================================================== */

.two-col-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 18px;
  align-items: start;
}

.profile-layout {
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
}

.panel-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 20px;
  min-width: 0;
}

.panel-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.panel-card-head h3 {
  font-size: 16px;
}

.rules-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rule-card {
  padding: 15px;
  border-radius: var(--radius-sm);
  background: rgba(7, 11, 20, 0.56);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rule-card.is-disabled {
  opacity: 0.65;
}

.rule-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.rule-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.rule-name {
  font-size: 15px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.rule-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 14px;
  font-size: 12.2px;
  color: var(--text-muted);
}

.rule-specs strong {
  color: var(--text-primary);
}

.rule-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

/* Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-pill);
  background: rgba(148, 163, 184, 0.25);
  border: 1px solid var(--border-default);
  cursor: pointer;
  transition: background-color 0.18s ease;
}

.switch-slider::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 2px;
  top: 2px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.18s ease;
}

.switch input:checked + .switch-slider {
  background: var(--emerald);
  border-color: var(--emerald);
}

.switch input:checked + .switch-slider::before {
  transform: translateX(16px);
}

/* Forms */
.stacked-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.form-field label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.req {
  color: var(--rose);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 6px 2px;
}

.check-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}

.check-label input {
  accent-color: var(--emerald);
  width: 16px;
  height: 16px;
}

/* Tone Cards */
.tone-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.tone-option {
  position: relative;
  cursor: pointer;
}

.tone-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tone-card {
  height: 100%;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  background: rgba(7, 11, 20, 0.56);
  border: 1px solid var(--border-default);
  transition: all 0.15s ease;
}

.tone-card strong {
  display: block;
  font-size: 13px;
  color: var(--text-primary);
}

.tone-card span {
  display: block;
  margin-top: 4px;
  font-size: 11.8px;
  color: var(--text-muted);
  line-height: 1.4;
}

.tone-option input:checked + .tone-card {
  background: var(--emerald-soft);
  border-color: var(--emerald-border);
}

.bullet-list {
  margin: 14px 0 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
}

.callout-box {
  padding: 13px 14px;
  border-radius: var(--radius-sm);
  background: rgba(56, 189, 248, 0.10);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.callout-box strong {
  display: block;
  font-size: 12.5px;
  color: #7dd3fc;
  margin-bottom: 4px;
}

.callout-box p {
  font-size: 12.5px;
  color: var(--text-secondary);
}

/* ==========================================================================
   Sub-tab 4: Telegram & Dry-Run Queue
   ========================================================================== */

.tg-status-card {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  margin-bottom: 16px;
}

.tg-status-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.tg-setup-steps {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.tg-step {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(7, 11, 20, 0.56);
  border: 1px solid var(--border-subtle);
  font-size: 12.2px;
  color: var(--text-secondary);
}

.tg-step strong {
  display: block;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.tg-step code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.10);
  padding: 1px 5px;
  border-radius: 4px;
}

.tg-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 18px;
  align-items: start;
}

.tg-alerts-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-height: 540px;
  overflow-y: auto;
}

.tg-alert-item {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(7, 11, 20, 0.56);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all 0.14s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tg-alert-item:hover {
  background: var(--bg-surface-2);
  border-color: var(--border-strong);
}

.tg-alert-item.is-selected {
  background: rgba(56, 189, 248, 0.11);
  border-color: var(--sky-border);
}

.tg-alert-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.tg-alert-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

/* Telegram Dark Chat Bubble Preview */
.tg-preview-shell {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-default);
  background: #0e1621;
  box-shadow: var(--shadow-md);
}

.tg-phone-header {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 16px;
  background: #17212b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.tg-bot-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #10b981, #0ea5e9);
  color: #03150e;
  flex-shrink: 0;
}

.tg-bot-meta {
  flex: 1;
  min-width: 0;
}

.tg-bot-meta strong {
  display: block;
  font-size: 14px;
  color: #f8fafc;
}

.tg-bot-meta span {
  display: block;
  font-size: 11.8px;
  color: #7d92a8;
}

.tg-chat-canvas {
  min-height: 440px;
  padding: 20px 18px;
  background:
    radial-gradient(circle at 20% 25%, rgba(56, 189, 248, 0.06), transparent 45%),
    radial-gradient(circle at 80% 75%, rgba(16, 185, 129, 0.06), transparent 45%),
    #0e1621;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 12px;
}

.tg-bubble {
  max-width: 100%;
  background: #182533;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 14px 14px 14px 4px;
  padding: 14px 16px;
  color: #eaf2fb;
  font-size: 13.5px;
  line-height: 1.62;
  overflow-wrap: anywhere;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
}

.tg-bubble strong {
  color: #ffffff;
}

.tg-bubble code {
  font-family: var(--font-mono);
  font-size: 12.2px;
  background: rgba(56, 189, 248, 0.14);
  color: #7dd3fc;
  padding: 1px 5px;
  border-radius: 4px;
}

.tg-bubble a {
  color: #5eb5f7;
  text-decoration: underline;
}

.tg-bubble-footer {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: #6c8299;
}

.tg-inline-kb {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.tg-kb-btn {
  padding: 9px 12px;
  border-radius: 9px;
  border: 0;
  background: rgba(94, 181, 247, 0.15);
  color: #7cc7ff;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.15s ease;
}

.tg-kb-btn:hover {
  background: rgba(94, 181, 247, 0.24);
}

/* ==========================================================================
   Empty / Error / Skeleton States & Toast
   ========================================================================== */

.state-box {
  padding: 36px 20px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px dashed var(--border-default);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.state-box h4 {
  font-size: 15.5px;
}

.state-box p {
  font-size: 13.2px;
  color: var(--text-muted);
  max-width: 420px;
}

.skeleton {
  border-radius: var(--radius-md);
  background: linear-gradient(90deg, rgba(22, 34, 59, 0.65) 25%, rgba(36, 54, 90, 0.85) 50%, rgba(22, 34, 59, 0.65) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite linear;
}

.skeleton-card {
  height: 148px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.spin {
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.toast-container {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(380px, calc(100vw - 32px));
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 15px;
  border-radius: var(--radius-sm);
  background: #131f36;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  color: var(--text-primary);
  animation: toast-in 0.2s ease;
}

.toast.is-success { border-color: var(--emerald-border); }
.toast.is-error { border-color: var(--rose-border); }
.toast.is-warning { border-color: var(--amber-border); }

.toast-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
  background: var(--sky);
}

.toast.is-success .toast-dot { background: var(--emerald); }
.toast.is-error .toast-dot { background: var(--rose); }
.toast.is-warning .toast-dot { background: var(--amber); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Responsive Breakpoints (Zero Horizontal Overflow)
   ========================================================================== */

@media (max-width: 1120px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .workflow-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .samples-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feed-workspace {
    grid-template-columns: 1fr;
  }

  .opportunity-list {
    max-height: 420px;
  }

  .two-col-panel,
  .profile-layout,
  .tg-workspace {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .container {
    padding: 0 16px;
  }

  .topbar-inner {
    flex-wrap: wrap;
    row-gap: 10px;
  }

  .primary-tabs {
    order: 3;
    width: 100%;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .primary-tab {
    flex: 1 1 auto;
    justify-content: center;
    padding: 7px 10px;
    font-size: 12.5px;
  }

  .pricing-grid,
  .compliance-banner,
  .reasons-grid,
  .intel-grid,
  .tg-setup-steps,
  .tone-grid {
    grid-template-columns: 1fr;
  }

  .compliance-divider {
    height: 1px;
    width: 100%;
  }

  .status-kpis {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 12px;
  }

  .kpi-tile {
    border-right: 0;
    padding-right: 0;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(7, 11, 20, 0.45);
  }
}

@media (max-width: 560px) {
  .samples-grid,
  .workflow-grid,
  .form-row-2,
  .tg-inline-kb {
    grid-template-columns: 1fr;
  }

  .topbar-actions .btn {
    display: none;
  }

  .hero {
    padding: 36px 0 38px;
  }

  .section {
    padding: 44px 0;
  }

  .scan-input-group {
    flex-direction: column;
    align-items: stretch;
  }

  .scan-input-group .select-compact,
  .scan-input-group .btn {
    width: 100%;
  }

  .score-slider-wrap {
    width: 100%;
    justify-content: space-between;
  }

  .score-slider-wrap input[type="range"] {
    flex: 1;
    max-width: 180px;
  }

  .detail-card,
  .panel-card,
  .pricing-card {
    padding: 16px;
  }

  .toast-container {
    right: 12px;
    left: 12px;
    bottom: 12px;
    max-width: none;
  }
}


/* ========================================================================
   Creem Compliance Links & Domestic WeChat Pay Order Modal
   ======================================================================== */
.pricing-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}

.btn-wechat {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.42);
  color: #6ee7b7;
  font-weight: 600;
}

.btn-wechat:hover {
  background: rgba(16, 185, 129, 0.22);
  border-color: rgba(16, 185, 129, 0.72);
  color: #ecfdf5;
}

.inline-legal-link {
  color: #38bdf8;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-muted, #94a3b8);
}

.footer-links a {
  color: #cbd5e1;
  text-decoration: none;
}

.footer-links a:hover {
  color: #38bdf8;
  text-decoration: underline;
}

.footer-eco {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(31, 43, 71, 0.55);
  font-size: 12px;
  color: var(--text-muted, #94a3b8);
}

.footer-eco-label {
  color: #64748b;
  font-weight: 600;
}

.footer-eco a {
  color: #94a3b8;
  text-decoration: none;
}

.footer-eco a:hover {
  color: #38bdf8;
  text-decoration: underline;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(4, 8, 16, 0.78);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.modal-backdrop.hidden {
  display: none;
}

.modal-card {
  width: min(720px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  background: #0d1424;
  border: 1px solid #22304f;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.modal-head h3 {
  margin: 4px 0 0;
  font-size: 20px;
  color: #f8fafc;
}

.wechat-plan-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.wechat-plan-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #243252;
  background: #111a2e;
  color: #cbd5e1;
  cursor: pointer;
  font-size: 14px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.wechat-plan-btn strong {
  color: #f8fafc;
}

.wechat-plan-btn.is-active {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.14);
  color: #a7f3d0;
}

.wechat-modal-grid {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.wechat-pay-box {
  background: #090f1d;
  border: 1px dashed #2b3c61;
  border-radius: 12px;
  padding: 14px;
  text-align: center;
}

.wechat-qr-img {
  width: 180px;
  height: 180px;
  object-fit: contain;
  border-radius: 8px;
  background: #ffffff;
  padding: 6px;
  margin: 0 auto 10px;
  display: block;
}

.wechat-qr-placeholder {
  width: 100%;
  min-height: 152px;
  border-radius: 10px;
  background: #10192d;
  border: 1px solid #1e2c4a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  margin-bottom: 10px;
  color: #94a3b8;
  font-size: 13px;
}

.wechat-qr-placeholder strong {
  color: #e2e8f0;
  font-size: 14px;
}

.wechat-contact-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #111b30;
  border: 1px solid #243356;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  color: #cbd5e1;
  margin-top: 8px;
  text-align: left;
  word-break: break-all;
}

.wechat-order-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wechat-order-form .form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wechat-order-form label {
  font-size: 13px;
  color: #cbd5e1;
}

.wechat-order-form input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid #243356;
  background: #0a101e;
  color: #f8fafc;
  font-size: 14px;
}

.wechat-legal-hint {
  margin: 0;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.5;
}

.wechat-legal-hint a {
  color: #38bdf8;
}

.wechat-order-result {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #d1fae5;
  font-size: 14px;
}

.wechat-order-result.hidden {
  display: none;
}

.wechat-order-code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin: 10px 0 6px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #07131e;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.wechat-order-code-row code {
  font-size: 16px;
  font-weight: 700;
  color: #34d399;
  letter-spacing: 0.04em;
}

.activate-modal-card {
  width: min(560px, 100%);
}

.activate-modal-sub {
  margin: -6px 0 16px;
  font-size: 13.5px;
  line-height: 1.55;
  color: #94a3b8;
}

.activate-plan-summary {
  margin: -4px 0 16px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid #1e2d4d;
  font-size: 12.5px;
  color: #cbd5e1;
  line-height: 1.5;
}

.label-optional {
  color: #64748b;
  font-weight: 400;
}

.activate-form-error {
  padding: 10px 12px;
  border-radius: 9px;
  background: rgba(244, 63, 94, 0.14);
  border: 1px solid rgba(244, 63, 94, 0.45);
  color: #fecdd3;
  font-size: 13px;
}

.activate-form-error.hidden {
  display: none;
}

.activate-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

#activate-submit-btn {
  white-space: normal;
  text-align: center;
  line-height: 1.35;
  height: auto;
  min-height: 44px;
  padding: 10px 14px;
}

@media (max-width: 680px) {
  .wechat-modal-grid {
    grid-template-columns: 1fr;
  }
  .modal-card {
    padding: 18px;
  }
  .wechat-plan-switch {
    grid-template-columns: 1fr;
  }
}
