.flt-builder {
  font-family: Inter, system-ui, sans-serif;
  color: #0f172a;
}

.flt-builder * {
  box-sizing: border-box;
}

.flt-builder ::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

.flt-builder ::-webkit-scrollbar-track {
  background: #eef2f6;
}

.flt-builder ::-webkit-scrollbar-thumb {
  background: #b9c7d9;
  border-radius: 12px;
}

.flt-shell {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.flt-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 2rem;
  padding: 2rem;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.flt-panel:hover {
  box-shadow: 0 20px 30px -15px rgba(0, 35, 75, 0.12);
  border-color: #b9d1f0;
}

.flt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.flt-heading {
  font-size: 1.75rem;
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: #1e293b;
}

.flt-subheading {
  margin-top: 0.45rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #94a3b8;
}

.flt-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.flt-btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 1.3rem;
  border-radius: 0.95rem;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.flt-btn:hover {
  transform: translateY(-1px);
}

.flt-btn:active {
  transform: translateY(0);
}

.flt-btn i {
  width: 1rem;
  height: 1rem;
}

.flt-btn-import {
  background: #059669;
  color: #ffffff;
}

.flt-btn-primary {
  background: #4f46e5;
  color: #ffffff;
}

.flt-btn-preview {
  background: #f1f5f9;
  color: #0f172a;
}

.flt-btn-outline {
  background: #ffffff;
  color: #334155;
  border: 1px solid #dbe4ee;
}

.flt-btn-dark {
  background: #0f172a;
  color: #ffffff;
}

.flt-btn-select {
  min-width: 7.25rem;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  background: #e0e7ff;
  color: #3730a3;
  font-size: 0.82rem;
  font-weight: 900;
}

.flt-panel-title {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  font-weight: 900;
  color: #1e293b;
}

.flt-panel-title::before {
  content: "";
  width: 0.3rem;
  height: 1.6rem;
  border-radius: 999px;
  background: #4f46e5;
}

.flt-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.flt-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.flt-field-label {
  margin-left: 0.1rem;
  font-size: 0.62rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #94a3b8;
}

.flt-input,
.flt-select {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 0.95rem;
  background: #f8fafc;
  color: #0f172a;
  padding: 0.9rem 1rem;
  font-size: 0.92rem;
  font-weight: 700;
  outline: none;
}

.flt-input:focus,
.flt-select:focus {
  border-color: #818cf8;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.flt-input[readonly] {
  color: #475569;
  background: #ffffff;
}

.flt-timing {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.flt-timing-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #475569;
}

.flt-radio {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #334155;
}

.flt-radio input {
  width: 1rem;
  height: 1rem;
}

.flt-duration-wrap {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.flt-duration-label {
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #94a3b8;
}

.flt-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.flt-section-grid,
.flt-section-grid-head {
  display: grid;
  grid-template-columns: 2.5fr 1fr 1fr 1fr 1fr 0.5fr;
  gap: 0.75rem;
  align-items: center;
}

.flt-section-grid-head {
  padding: 0 0.5rem;
  margin-bottom: 0.55rem;
  font-size: 0.62rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #94a3b8;
}

.flt-section-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.flt-section-card {
  border: 1px solid #e2e8f0;
  border-radius: 1.5rem;
  background: rgba(248, 250, 252, 0.7);
  padding: 1.25rem;
}

.flt-section-card.is-active {
  border-color: #818cf8;
  box-shadow: 0 18px 30px -20px rgba(79, 70, 229, 0.45);
}

.flt-section-meta {
  margin-top: 0.65rem;
  font-size: 0.7rem;
  font-weight: 800;
  color: #4f46e5;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.flt-inline-select,
.flt-inline-number {
  border: 1px solid #dbe4ee;
  background: #ffffff;
  border-radius: 999px;
  color: #334155;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 0.35rem 0.75rem;
  outline: none;
}

.flt-inline-number {
  width: 4.5rem;
}

.flt-icon-btn {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  width: 2.4rem;
  height: 2.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  border-radius: 0.9rem;
}

.flt-icon-btn:hover {
  background: #fee2e2;
  color: #dc2626;
}

.flt-bank-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.flt-badge-soft {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 700;
}

.flt-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.flt-question-list {
  border: 1px solid #f1f5f9;
  border-radius: 1.5rem;
  padding: 0.55rem;
  max-height: 26rem;
  overflow-y: auto;
  background: #ffffff;
}

.flt-question-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.9rem;
  border-radius: 1rem;
}

.flt-question-row:hover {
  background: #f8fafc;
}

.flt-question-check {
  width: 1.1rem;
  height: 1.1rem;
}

.flt-question-text {
  flex: 1 1 18rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: #1e293b;
  min-width: 12rem;
}

.flt-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: #e9f0fc;
  color: #1e4b8f;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

.flt-tag-muted {
  background: #e2e8f0;
  color: #475569;
}

.flt-question-actions {
  margin-top: 1.25rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.flt-show-more {
  margin-top: 1.25rem;
  display: flex;
  justify-content: center;
}

.flt-show-more .flt-btn {
  border: 1px solid #c7d2fe;
  background: #ffffff;
  color: #4338ca;
}

.flt-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
  align-items: center;
}

.flt-stat-label {
  font-size: 0.62rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #94a3b8;
}

.flt-stat-value {
  margin-top: 0.3rem;
  font-size: 1.7rem;
  font-weight: 900;
  color: #0f172a;
}

.flt-stat-value-small {
  margin-top: 0.3rem;
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
}

.flt-selected-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.flt-series-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.flt-series-card {
  border: 1px solid #e2e8f0;
  border-radius: 1.5rem;
  background: #f8fafc;
  padding: 1.1rem 1.2rem;
}

.flt-series-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.flt-series-title {
  font-size: 1rem;
  font-weight: 900;
  color: #1e293b;
}

.flt-series-subtitle {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 700;
}

.flt-series-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.flt-tests-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.flt-test-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  background: #ffffff;
  padding: 0.9rem 1rem;
}

.flt-test-meta {
  flex: 1 1 18rem;
}

.flt-test-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
}

.flt-test-subtitle {
  margin-top: 0.25rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
}

.flt-selected-card {
  border: 1px solid #e2e8f0;
  border-radius: 1.2rem;
  background: #ffffff;
  padding: 1rem 1.1rem;
}

.flt-selected-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.flt-selected-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #1e293b;
}

.flt-selected-subtitle {
  margin-top: 0.35rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.flt-empty {
  padding: 1.25rem;
  text-align: center;
  color: #94a3b8;
  font-weight: 700;
}

.flt-hidden {
  display: none !important;
}

.flt-modal-shell {
  background: #ffffff;
  width: min(960px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 2rem;
  padding: 2rem;
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.18);
}

.flt-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.flt-modal-copy h2 {
  font-size: 1.6rem;
  font-weight: 900;
  color: #1e293b;
}

.flt-modal-copy p {
  margin-top: 0.35rem;
  color: #94a3b8;
  font-size: 0.92rem;
}

.flt-modal-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.flt-import-tabs,
.flt-import-scope {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.flt-import-tab,
.flt-import-scope-btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  border-radius: 0.9rem;
  padding: 0.8rem 1rem;
  font-weight: 800;
}

.flt-import-tab {
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.78rem;
}

.flt-import-tab.is-active,
.flt-import-scope-btn.is-active {
  background: #0f172a;
  color: #ffffff;
}

.flt-import-scope-btn {
  flex: 1 1 14rem;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.92rem;
}

.flt-import-textarea,
.flt-import-file {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 1.5rem;
  background: #f8fafc;
  padding: 1.25rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  outline: none;
}

.flt-import-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

@media (max-width: 1180px) {
  .flt-section-grid,
  .flt-section-grid-head {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 820px) {
  .flt-panel {
    padding: 1.4rem;
    border-radius: 1.5rem;
  }

  .flt-grid-2 {
    grid-template-columns: 1fr;
  }

  .flt-duration-wrap {
    margin-left: 0;
  }

  .flt-summary {
    grid-template-columns: 1fr;
  }

  .flt-question-row {
    align-items: flex-start;
  }
}
