

:root {
  --bld-brand-color: #8b5cf6;
  --bld-bg-card: rgba(14, 18, 30, 0.75);
  --bld-border: rgba(255, 255, 255, 0.05);
  --bld-border-hi: rgba(139, 92, 246, 0.35);
  --bld-text: #f8fafc;
  --bld-muted: #94a3b8;
  --bld-violet: #8b5cf6;
  --bld-ease: cubic-bezier(.16, 1, .3, 1);
}

.bld-workspace {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 1280px;
  margin: 0 auto 60px;
  color: var(--bld-text);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}

.bld-hero-card {
  background: rgba(14, 18, 30, 0.78);
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  border: 1px solid var(--bld-border);
  border-top: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 20px;
  padding: 28px 32px;
  box-shadow: 0 14px 40px -10px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.bld-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.35);
  color: #c4b5fd;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.bld-hero-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  background: linear-gradient(135deg, #ffffff 40%, #c4b5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.bld-hero-desc {
  font-size: 14px;
  color: var(--bld-muted);
  line-height: 1.6;
  max-width: 820px;
  margin: 0 0 20px;
}

.bld-prompt-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.bld-prompt-input {
  flex: 1;
  min-width: 280px;
  background: rgba(9, 12, 20, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 13px 18px;
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.bld-prompt-input:focus {
  border-color: var(--bld-violet);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25), inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.bld-btn-synthesize {
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
  color: #fff;
  border: 1px solid rgba(139, 92, 246, 0.5);
  border-radius: 14px;
  padding: 13px 24px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(139, 92, 246, 0.35);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.bld-btn-synthesize:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.5);
}

.bld-archetypes-list {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.bld-archetype-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--bld-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-right: 4px;
}

.bld-archetype-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 6px 14px;
  color: #e2e8f0;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.bld-archetype-chip:hover {
  background: rgba(139, 92, 246, 0.18);
  border-color: rgba(139, 92, 246, 0.4);
  color: #fff;
  transform: translateY(-1px);
}

.bld-studio-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
}

@media (max-width: 980px) {
  .bld-studio-grid {
    grid-template-columns: 1fr;
  }
}

.bld-panel {
  background: rgba(14, 18, 30, 0.72);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--bld-border);
  border-radius: 20px;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.bld-panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(10, 13, 22, 0.5);
}

.bld-tab-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.bld-tab-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 8px 14px;
  color: var(--bld-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.bld-tab-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.bld-tab-btn.active {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.4);
  color: #fff;
}

.bld-panel-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 640px;
  overflow-y: auto;
}

.bld-channels-tree {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bld-cat-card {
  background: rgba(10, 13, 22, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 14px;
  padding: 12px 14px;
}

.bld-cat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.bld-cat-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #cbd5e1;
}

.bld-count-pill {
  font-size: 10px;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: var(--bld-muted);
}

.bld-btn-del {
  background: transparent;
  border: 0;
  color: #94a3b8;
  font-size: 16px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}

.bld-btn-del:hover {
  color: #f87171;
  background: rgba(248, 113, 113, 0.12);
}

.bld-cat-channels {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bld-ch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  transition: background 0.15s ease;
}

.bld-ch-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.bld-ch-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.bld-ch-icon {
  color: #94a3b8;
  font-size: 14px;
}

.bld-ch-name {
  font-size: 13.5px;
  font-weight: 500;
  color: #f1f5f9;
}

.bld-ch-topic {
  font-size: 11px;
  color: #64748b;
  margin-left: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bld-btn-del-item {
  background: transparent;
  border: 0;
  color: #64748b;
  font-size: 15px;
  cursor: pointer;
}

.bld-btn-del-item:hover {
  color: #f87171;
}

.bld-roles-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bld-role-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(10, 13, 22, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-left: 3px solid var(--role-color, #8b5cf6);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
}

.bld-role-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.bld-role-name {
  font-weight: 600;
  color: #f8fafc;
}

.bld-role-tag {
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
}

.bld-role-tag.admin {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.bld-btn-del-role {
  background: transparent;
  border: 0;
  color: #94a3b8;
  font-size: 14px;
  cursor: pointer;
  margin-left: 4px;
}

.bld-btn-del-role:hover {
  color: #f87171;
}

.bld-systems-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bld-system-card {
  background: rgba(10, 13, 22, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 12px 14px;
}

.bld-system-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bld-system-icon {
  font-size: 20px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
}

.bld-system-meta {
  flex: 1;
}

.bld-system-meta strong {
  display: block;
  font-size: 13.5px;
  margin-bottom: 2px;
}

.bld-system-meta p {
  margin: 0;
  font-size: 11.5px;
  color: var(--bld-muted);
  line-height: 1.4;
}

.bld-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bld-field-group label {
  font-size: 12px;
  font-weight: 600;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.bld-input, .bld-textarea {
  background: rgba(9, 12, 20, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 14px;
  color: #fff;
  font-size: 13.5px;
  outline: none;
}

.bld-input:focus, .bld-textarea:focus {
  border-color: var(--bld-violet);
}

.bld-emblems-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.bld-emblem-thumb {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(9, 12, 20, 0.85);
  border: 2px solid rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.18s ease;
}

.bld-emblem-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bld-emblem-thumb.selected {
  border-color: var(--bld-violet);
  box-shadow: 0 0 14px rgba(139, 92, 246, 0.4);
}

.bld-banner-preview {
  background: linear-gradient(135deg, rgba(14, 18, 30, 0.95), rgba(8, 10, 16, 0.95));
  border: 1px solid var(--bld-brand-color);
  border-radius: 14px;
  padding: 18px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 25px rgba(139, 92, 246, 0.15);
}

.bld-banner-tag {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  color: var(--bld-brand-color);
}

.bld-banner-h4 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 4px 0 6px;
  color: #fff;
}

#bld-banner-desc {
  font-size: 12px;
  color: var(--bld-muted);
  margin: 0;
}

.bld-banner-picker-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 12px;
  color: #cbd5e1;
}

.bld-banner-picker-row input[type="color"] {
  border: 0;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

.bld-safety-card {
  background: rgba(10, 13, 22, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bld-safety-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bld-safety-item strong {
  display: block;
  font-size: 13px;
}

.bld-safety-item small {
  font-size: 11px;
  color: var(--bld-muted);
}

.bld-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.bld-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.bld-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  transition: .25s ease;
}

.bld-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: .25s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.bld-switch input:checked + .bld-slider {
  background: var(--bld-violet);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.4);
}

.bld-switch input:checked + .bld-slider:before {
  transform: translateX(20px);
}

.bld-action-bar {
  position: sticky;
  bottom: 20px;
  background: rgba(10, 13, 22, 0.88);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.7);
  z-index: 10;
}

.bld-action-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.bld-stat-pill {
  font-size: 12px;
  font-weight: 600;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px 10px;
  border-radius: 6px;
}

.bld-action-buttons {
  display: flex;
  gap: 10px;
}

.bld-btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.bld-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.bld-btn-primary {
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
  border: 1px solid rgba(139, 92, 246, 0.5);
  color: #fff;
  padding: 10px 24px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(139, 92, 246, 0.35);
  transition: all 0.18s ease;
}

.bld-btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.5);
}
