/* FB 3-Tier Architecture & 4-Layer Correlation Styles */
html {
  scroll-behavior: smooth;
}
body {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  height: auto !important;
  min-height: 100vh;
  user-select: auto !important;
}
body::-webkit-scrollbar {
  width: 8px;
}
body::-webkit-scrollbar-track {
  background: #070b14;
}
body::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}
body::-webkit-scrollbar-thumb:hover {
  background: #38bdf8;
}

.main-container {
  max-width: 1300px;
  margin: 58px auto 30px;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hero-banner {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.7));
  border: 1px solid #1e293b;
  border-radius: 12px;
  padding: 18px 22px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.hero-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #10b981, #f59e0b, #38bdf8);
}
.hero-title {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero-desc {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 6px;
  line-height: 1.55;
  max-width: 980px;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 16px;
}

.tier-card {
  background: #090e1a;
  border: 1px solid #1e293b;
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.tier-card:hover {
  border-color: #38bdf8;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}
.tier-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  border-bottom: 1px solid #1e293b;
  padding-bottom: 8px;
}
.tier-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}
.tier-t1 { border-top: 3px solid #10b981; }
.tier-t1 .tier-badge { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.tier-t2 { border-top: 3px solid #f59e0b; }
.tier-t2 .tier-badge { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.tier-t3 { border-top: 3px solid #38bdf8; }
.tier-t3 .tier-badge { background: rgba(56, 189, 248, 0.15); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.3); }
.tier-title {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  margin-top: 2px;
}
.tier-sub {
  font-size: 10px;
  color: #64748b;
  font-family: monospace;
}

.plg-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 6px;
  padding: 6px 9px;
  font-size: 11px;
}
.plg-tog {
  width: 32px;
  height: 16px;
  background: #334155;
  border-radius: 10px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}
.plg-tog.on {
  background: #10b981;
}
.plg-tog::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  transition: left 0.2s;
}
.plg-tog.on::after {
  left: 18px;
}

.pipeline-box {
  background: #090e1a;
  border: 1px solid #1e293b;
  border-radius: 10px;
  padding: 14px;
}
.pipe-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 0;
}
.pipe-step {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 8px 12px;
  text-align: center;
  min-width: 120px;
  flex: 1;
}
.pipe-arrow {
  color: #64748b;
  font-size: 15px;
  font-weight: 800;
  flex-shrink: 0;
}

.obj-grid-box {
  background: #090e1a;
  border: 1px solid #1e293b;
  border-radius: 10px;
  padding: 16px;
}

/* SaaS Filter Bar with Modern Droplists */
.filter-bar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid #1e293b;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 14px;
}
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 170px;
}
.filter-lbl {
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.saas-select {
  width: 100%;
  height: 32px;
  background: #090e1a;
  border: 1px solid #334155;
  border-radius: 6px;
  color: #f8fafc;
  font-size: 11px;
  font-weight: 600;
  padding: 0 26px 0 10px;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11.5l-5-5h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color 0.15s, background-color 0.15s;
}
.saas-select:hover {
  border-color: #475569;
  background-color: #0f172a;
}
.saas-select:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.3);
}
.filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  height: 32px;
}
.count-pill {
  font-size: 10px;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 4px 8px;
  border-radius: 12px;
  white-space: nowrap;
}
.btn-reset {
  height: 32px;
  background: #0f172a;
  border: 1px solid #334155;
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 600;
  padding: 0 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-reset:hover {
  background: #1e293b;
  border-color: #38bdf8;
  color: #fff;
}

.obj-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 10px;
}
.obj-card {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 6px;
  padding: 8px 10px;
  cursor: pointer;
  transition: all 0.12s;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.obj-card:hover {
  border-color: #38bdf8;
  background: #1e293b;
  transform: translateY(-1px);
}
.obj-card.active {
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}
.badge-crit {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}
.badge-critical {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.badge-vital {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.badge-addon {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.obj-drawer {
  position: fixed;
  top: 48px;
  right: -480px;
  width: 460px;
  max-width: 92vw;
  height: calc(100vh - 48px);
  background: rgba(11, 15, 25, 0.98);
  backdrop-filter: blur(12px);
  border-left: 1px solid #1e293b;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: right 0.22s ease;
  z-index: 900;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.8);
  overflow-y: auto;
}
.obj-drawer.open {
  right: 0;
}
