@charset "UTF-8";
.global-loader__overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.55);
  z-index: 9998;
  pointer-events: all;
  animation: global-loader-fade-in 0.2s ease-out forwards;
}
.global-loader__spinner {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  border: 4px solid #eee;
  border-top: 4px solid #da0000;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  margin: auto;
  z-index: 9999;
  opacity: 0;
  animation: global-loader-spin 0.9s linear 0.3s infinite;
}

@keyframes global-loader-spin {
  0% {
    opacity: 0;
    transform: rotate(0deg);
  }
  1% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: rotate(360deg);
  }
}
@keyframes global-loader-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.rsb-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.rsb-header__bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: 3.5rem;
  padding: 0 1.25rem;
  max-width: 100%;
}
.rsb-header__brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  flex-shrink: 0;
}
.rsb-header__brand:hover {
  opacity: 0.85;
}
.rsb-header__logo {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}
.rsb-header__title {
  font-family: Rubik-Bold, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a2e;
  letter-spacing: -0.02em;
}
.rsb-header__breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  min-width: 0;
  overflow: hidden;
}
.rsb-header__breadcrumb-sep {
  width: 6px;
  height: 10px;
  color: #a9a9a9;
  flex-shrink: 0;
}
.rsb-header__breadcrumb-link {
  color: #888;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 12rem;
  transition: color 150ms ease;
}
.rsb-header__breadcrumb-link:hover {
  color: #da0000;
}
.rsb-header__breadcrumb-current {
  color: #1a1a2e;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 14rem;
}
.rsb-header__spacer {
  flex: 1;
}
.rsb-header__tenant-switch {
  position: relative;
  flex-shrink: 0;
}
.rsb-header__tenant-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem 0.4rem 0.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  font-family: Rubik, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 0.9rem;
  color: #1a1a2e;
  transition: all 200ms ease;
}
.rsb-header__tenant-trigger:hover {
  border-color: rgba(218, 0, 0, 0.35);
  background: rgba(218, 0, 0, 0.03);
  box-shadow: 0 0 0 3px rgba(218, 0, 0, 0.06);
}
.rsb-header__tenant-trigger--active {
  border-color: #da0000;
  background: rgba(218, 0, 0, 0.04);
  box-shadow: 0 0 0 3px rgba(218, 0, 0, 0.1);
}
.rsb-header__tenant-trigger-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 0.375rem;
  background: linear-gradient(135deg, #da0000, #9d0000);
  color: #fff;
  flex-shrink: 0;
}
.rsb-header__tenant-label {
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}
.rsb-header__tenant-arrow {
  width: 10px;
  height: 8px;
  color: #888;
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
  margin-left: 0.15rem;
}
.rsb-header__tenant-arrow--open {
  transform: rotate(180deg);
}
.rsb-header__tenant-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  width: 22rem;
  max-height: calc(100vh - 3.5rem - 2rem);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 12px 24px -4px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.03);
  z-index: 200;
  animation: rsb-dropdown-in 200ms cubic-bezier(0.16, 1, 0.3, 1);
}
.rsb-header__dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: linear-gradient(180deg, rgba(218, 0, 0, 0.03) 0%, transparent 100%);
}
.rsb-header__dropdown-title {
  font-family: Rubik-Bold, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: #1a1a2e;
  letter-spacing: -0.01em;
}
.rsb-header__dropdown-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 0.4rem;
  border-radius: 10rem;
  background: linear-gradient(135deg, #da0000, #b10000);
  color: #fff;
  font-family: Rubik-Bold, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.rsb-header__tenant-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  color: #a9a9a9;
  background: rgba(0, 0, 0, 0.015);
}
.rsb-header__tenant-search input {
  flex: 1;
  border: none;
  outline: none;
  font-family: Rubik, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 0.9rem;
  background: transparent;
  color: #1a1a2e;
}
.rsb-header__tenant-search input::placeholder {
  color: #a9a9a9;
}
.rsb-header__tenant-list {
  list-style: none;
  padding: 0.35rem;
  margin: 0;
  overflow-y: auto;
  flex: 1;
}
.rsb-header__tenant-list::-webkit-scrollbar {
  width: 4px;
}
.rsb-header__tenant-list::-webkit-scrollbar-track {
  background: transparent;
}
.rsb-header__tenant-list::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.12);
  border-radius: 10px;
}
.rsb-header__tenant-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  background: none;
  cursor: pointer;
  font-family: Rubik, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 0.9rem;
  text-align: left;
  transition: all 180ms ease;
}
.rsb-header__tenant-item:hover {
  background: rgba(218, 0, 0, 0.04);
  border-color: rgba(218, 0, 0, 0.12);
}
.rsb-header__tenant-item:hover .rsb-header__tenant-item-icon {
  background: linear-gradient(135deg, #da0000, #a70000);
  color: #fff;
  transform: scale(1.05);
}
.rsb-header__tenant-item:hover .rsb-header__tenant-item-name {
  color: #c10000;
}
.rsb-header__tenant-item--active {
  background: rgba(218, 0, 0, 0.06);
  border-color: rgba(218, 0, 0, 0.18);
}
.rsb-header__tenant-item--active .rsb-header__tenant-item-icon {
  background: linear-gradient(135deg, #da0000, #9d0000);
  color: #fff;
  box-shadow: 0 2px 6px rgba(218, 0, 0, 0.3);
}
.rsb-header__tenant-item--active .rsb-header__tenant-item-name {
  color: #da0000;
  font-weight: 600;
}
.rsb-header__tenant-item--active:hover {
  background: rgba(218, 0, 0, 0.08);
}
.rsb-header__tenant-item-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.5rem;
  background: rgba(218, 0, 0, 0.08);
  color: #da0000;
  flex-shrink: 0;
  transition: all 200ms ease;
}
.rsb-header__tenant-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.rsb-header__tenant-item-name {
  color: #1a1a2e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
  font-weight: 500;
  transition: color 180ms ease;
}
.rsb-header__tenant-item-id {
  font-size: 0.68rem;
  color: #94a3b8;
  line-height: 1.3;
  letter-spacing: 0.01em;
}
.rsb-header__tenant-item-active {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #da0000, #a70000);
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(218, 0, 0, 0.25);
  animation: rsb-check-pop 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.rsb-header__tenant-empty {
  padding: 1.25rem 0.75rem;
  text-align: center;
  color: #94a3b8;
  font-size: 0.9rem;
}
.rsb-header__overlay {
  position: fixed;
  inset: 0;
  z-index: calc(200 - 1);
  cursor: default;
}
.rsb-header__logout {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border: none;
  border-radius: 999px;
  background: none;
  color: #888;
  cursor: pointer;
  font-family: Rubik, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 0.9rem;
  transition: all 150ms ease;
  flex-shrink: 0;
}
.rsb-header__logout:hover {
  background: rgba(218, 0, 0, 0.06);
  color: #da0000;
}
@media (max-width: 640px) {
  .rsb-header__logout-text {
    display: none;
  }
}

@keyframes rsb-dropdown-in {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes rsb-check-pop {
  0% {
    opacity: 0;
    transform: scale(0);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}
.rsb-header + .rsb-page-content {
  min-height: calc(100vh - 3.5rem);
}

.login-page {
  min-height: 100vh;
  display: flex;
  position: relative;
  overflow: hidden;
  font-family: Rubik, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
}
.login-page__bg {
  position: absolute;
  inset: 0;
  background: url("../../assets/images/rsb-login-bg.png") center center/cover no-repeat;
  z-index: 0;
}
.login-page__bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, transparent 40%, rgba(10, 10, 20, 0.3) 100%);
  z-index: 1;
}
.login-page__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, transparent 35%, rgba(10, 10, 25, 0.5) 55%, rgba(10, 10, 25, 0.85) 75%, rgba(10, 10, 25, 0.95) 100%);
  z-index: 2;
}
.login-page__panel {
  position: relative;
  z-index: 3;
  margin-left: auto;
  width: 480px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2.5rem;
  background: linear-gradient(165deg, rgba(15, 15, 35, 0.6) 0%, rgba(20, 20, 45, 0.45) 50%, rgba(15, 15, 35, 0.6) 100%);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: -30px 0 60px rgba(0, 0, 0, 0.3), inset 1px 0 0 rgba(255, 255, 255, 0.05);
  animation: rsb-panel-slide 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.login-page__content {
  width: 100%;
  max-width: 380px;
  animation: rsb-fade-up 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}
.login-page__header {
  text-align: center;
  margin-bottom: 2.25rem;
}
.login-page__logo {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
  position: relative;
}
.login-page__roomle-wordmark {
  width: 140px;
  height: auto;
  color: #da0000;
  filter: drop-shadow(0 0 20px rgba(218, 0, 0, 0.4));
  animation: rsb-logo-pulse 3s ease-in-out infinite;
}
.login-page__title {
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.625rem;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}
.login-page__subtitle {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 300;
  letter-spacing: 0.02em;
  line-height: 1.5;
}
.login-page__accent-line {
  width: 48px;
  height: 3px;
  margin: 0 auto 2.25rem;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, #da0000, transparent);
  animation: rsb-line-glow 2.5s ease-in-out infinite;
}
.login-page__card {
  background: rgba(255, 255, 255, 0.97);
  border-radius: 16px;
  overflow: hidden;
  padding: 2rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35), 0 0 1px rgba(255, 255, 255, 0.15), 0 0 40px rgba(218, 0, 0, 0.06);
  animation: rsb-card-enter 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}
.login-page__card-accent {
  height: 3px;
  margin: -2rem -2rem 1.75rem;
  background: linear-gradient(90deg, #da0000 0%, #ff0e0e 50%, #da0000 100%);
  background-size: 200% 100%;
  animation: rsb-accent-shimmer 3s ease-in-out infinite;
}
.login-page__error {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem 1rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 4px;
  color: #991b1b;
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
  animation: rsb-shake 0.4s ease;
}
.login-page__error-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #da0000;
}
.login-page__form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.login-page__field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.login-page__label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #1a1a2e;
  letter-spacing: 0.02em;
}
.login-page__input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.login-page__input-icon {
  position: absolute;
  left: 0.875rem;
  width: 18px;
  height: 18px;
  color: #94a3b8;
  pointer-events: none;
  transition: color 150ms ease;
}
.login-page__input {
  width: 100%;
  height: 48px;
  padding: 0 1rem 0 2.75rem;
  font-family: Rubik, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 0.9375rem;
  color: #1a1a2e;
  background: #f9f9f9;
  border: 2px solid transparent;
  border-radius: 4px;
  outline: none;
  transition: all 150ms ease;
}
.login-page__input::placeholder {
  color: #94a3b8;
}
.login-page__input:hover {
  background: #f7f7f7;
}
.login-page__input:focus {
  background: #fff;
  border-color: #da0000;
  box-shadow: 0 0 0 3px rgba(218, 0, 0, 0.08);
}
.login-page__input:focus ~ .login-page__input-icon {
  color: #da0000;
}
.login-page__submit {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  height: 48px;
  margin-top: 0.5rem;
  padding: 0 1.5rem;
  font-family: Rubik, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #fff;
  background: linear-gradient(135deg, #da0000 0%, #b10000 100%);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 250ms ease;
  letter-spacing: 0.02em;
  overflow: hidden;
}
.login-page__submit::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.15) 50%, transparent 60%);
  background-size: 250% 100%;
  animation: rsb-btn-shimmer 4s ease-in-out infinite;
}
.login-page__submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(218, 0, 0, 0.4), 0 0 0 1px rgba(218, 0, 0, 0.2);
}
.login-page__submit:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(218, 0, 0, 0.3);
}
.login-page__submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
.login-page__submit:disabled::after {
  display: none;
}
.login-page__submit--loading {
  background: linear-gradient(135deg, #f30000 0%, #da0000 100%);
}
.login-page__spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: rsb-spin 0.6s linear infinite;
  position: relative;
  z-index: 1;
}
.login-page__submit-text {
  position: relative;
  z-index: 1;
}
.login-page__footer {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.01em;
  animation: rsb-fade-up 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.6s both;
}
.login-page__footer strong {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}
.login-page__particles {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}
.login-page__particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: rgba(218, 0, 0, 0.4);
  border-radius: 50%;
  animation: rsb-float 8s ease-in-out infinite;
}
.login-page__particle:nth-child(1) {
  top: 20%;
  left: 10%;
  animation-delay: 0s;
  animation-duration: 7s;
}
.login-page__particle:nth-child(2) {
  top: 60%;
  left: 25%;
  width: 3px;
  height: 3px;
  background: rgba(255, 255, 255, 0.15);
  animation-delay: -2s;
  animation-duration: 9s;
}
.login-page__particle:nth-child(3) {
  top: 35%;
  left: 70%;
  animation-delay: -4s;
  animation-duration: 6s;
}
.login-page__particle:nth-child(4) {
  top: 80%;
  left: 55%;
  width: 3px;
  height: 3px;
  background: rgba(218, 0, 0, 0.25);
  animation-delay: -1s;
  animation-duration: 10s;
}
.login-page__particle:nth-child(5) {
  top: 10%;
  left: 85%;
  animation-delay: -3s;
  animation-duration: 8s;
}

@keyframes rsb-panel-slide {
  from {
    opacity: 0;
    transform: translateX(60px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes rsb-fade-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes rsb-card-enter {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes rsb-logo-pulse {
  0%, 100% {
    filter: drop-shadow(0 0 20px rgba(218, 0, 0, 0.5));
  }
  50% {
    filter: drop-shadow(0 0 30px rgba(218, 0, 0, 0.75));
  }
}
@keyframes rsb-line-glow {
  0%, 100% {
    opacity: 0.5;
    width: 48px;
  }
  50% {
    opacity: 1;
    width: 72px;
  }
}
@keyframes rsb-accent-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}
@keyframes rsb-btn-shimmer {
  0% {
    background-position: 250% 0;
  }
  50% {
    background-position: -50% 0;
  }
  100% {
    background-position: -50% 0;
  }
}
@keyframes rsb-shake {
  0%, 100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-8px);
  }
  40% {
    transform: translateX(6px);
  }
  60% {
    transform: translateX(-4px);
  }
  80% {
    transform: translateX(2px);
  }
}
@keyframes rsb-spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes rsb-float {
  0%, 100% {
    transform: translate(0, 0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  50% {
    transform: translate(30px, -40px);
    opacity: 0.6;
  }
  90% {
    opacity: 0;
  }
}
@media (max-width: 768px) {
  .login-page__panel {
    width: 100%;
    padding: 2rem 1.5rem;
  }
  .login-page__bg::after {
    background: rgba(10, 10, 25, 0.8);
  }
}
.tenant-selector {
  min-height: calc(100vh - 3.75rem);
  background: #f5f5f7;
  position: relative;
}
.tenant-selector__hero {
  position: relative;
  background: linear-gradient(135deg, #4b0000 0%, #7e0000 40%, #b10000 100%);
  padding: 3.5rem 2rem 4.5rem;
  text-align: center;
  overflow: hidden;
}
.tenant-selector__hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}
.tenant-selector__hero::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent, #f5f5f7);
  pointer-events: none;
}
.tenant-selector__hero-glow {
  position: absolute;
  top: -60%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(218, 0, 0, 0.25) 0%, transparent 70%);
  pointer-events: none;
  animation: ts-glow-pulse 4s ease-in-out infinite;
}
.tenant-selector__hero-content {
  position: relative;
  z-index: 1;
  animation: ts-fade-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.tenant-selector__hero-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  margin-bottom: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}
.tenant-selector__hero-icon svg {
  width: 28px;
  height: 28px;
  color: #fff;
}
.tenant-selector__hero-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}
.tenant-selector__hero-subtitle {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 300;
  max-width: 400px;
  margin: 0 auto;
}
.tenant-selector__content {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin: -2rem auto 0;
  padding: 0 2rem 3rem;
}
.tenant-selector__search {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1.25rem;
  height: 52px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 999px;
  margin-bottom: 1.5rem;
  transition: all 150ms ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
}
.tenant-selector__search:focus-within {
  border-color: #da0000;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), 0 0 0 3px rgba(218, 0, 0, 0.1);
}
.tenant-selector__search svg {
  color: #94a3b8;
  flex-shrink: 0;
}
.tenant-selector__search input {
  flex: 1;
  border: none;
  outline: none;
  font-family: Rubik, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 0.9375rem;
  background: transparent;
  color: #1a1a2e;
}
.tenant-selector__search input::placeholder {
  color: #a9a9a9;
}
.tenant-selector__search-count {
  font-size: 0.75rem;
  color: #94a3b8;
  white-space: nowrap;
  padding: 0.2rem 0.6rem;
  background: #f9f9f9;
  border-radius: 999px;
}
.tenant-selector__loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 4rem 2rem;
  color: #64748b;
}
.tenant-selector__loading .rsb-loading__spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(218, 0, 0, 0.15);
  border-top-color: #da0000;
  border-radius: 50%;
  animation: ts-spin 0.7s linear infinite;
}
.tenant-selector__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.875rem;
}
.tenant-selector__card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.125rem 1.25rem;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
  font-family: Rubik, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
  animation: ts-card-enter 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.tenant-selector__card:nth-child(1) {
  animation-delay: 0.04s;
}
.tenant-selector__card:nth-child(2) {
  animation-delay: 0.08s;
}
.tenant-selector__card:nth-child(3) {
  animation-delay: 0.12s;
}
.tenant-selector__card:nth-child(4) {
  animation-delay: 0.16s;
}
.tenant-selector__card:nth-child(5) {
  animation-delay: 0.2s;
}
.tenant-selector__card:nth-child(6) {
  animation-delay: 0.24s;
}
.tenant-selector__card:nth-child(7) {
  animation-delay: 0.28s;
}
.tenant-selector__card:nth-child(8) {
  animation-delay: 0.32s;
}
.tenant-selector__card:nth-child(9) {
  animation-delay: 0.36s;
}
.tenant-selector__card:nth-child(10) {
  animation-delay: 0.4s;
}
.tenant-selector__card:nth-child(11) {
  animation-delay: 0.44s;
}
.tenant-selector__card:nth-child(12) {
  animation-delay: 0.48s;
}
.tenant-selector__card:nth-child(13) {
  animation-delay: 0.52s;
}
.tenant-selector__card:nth-child(14) {
  animation-delay: 0.56s;
}
.tenant-selector__card:nth-child(15) {
  animation-delay: 0.6s;
}
.tenant-selector__card:nth-child(16) {
  animation-delay: 0.64s;
}
.tenant-selector__card:nth-child(17) {
  animation-delay: 0.68s;
}
.tenant-selector__card:nth-child(18) {
  animation-delay: 0.72s;
}
.tenant-selector__card:nth-child(19) {
  animation-delay: 0.76s;
}
.tenant-selector__card:nth-child(20) {
  animation-delay: 0.8s;
}
.tenant-selector__card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: #da0000;
  border-radius: 0 2px 2px 0;
  transition: height 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.tenant-selector__card:hover {
  border-color: rgba(218, 0, 0, 0.25);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(218, 0, 0, 0.08);
  transform: translateY(-3px);
}
.tenant-selector__card:hover::before {
  height: 60%;
}
.tenant-selector__card:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.tenant-selector__card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  flex-shrink: 0;
  position: relative;
  background: rgba(218, 0, 0, 0.06);
  color: #da0000;
  transition: all 250ms ease;
}
.tenant-selector__card-icon svg {
  width: 22px;
  height: 22px;
}
.tenant-selector__card:hover .tenant-selector__card-icon {
  background: linear-gradient(135deg, #da0000 0%, #b10000 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(218, 0, 0, 0.25);
}
.tenant-selector__card-info {
  flex: 1;
  min-width: 0;
}
.tenant-selector__card-name {
  display: block;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #1a1a2e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.tenant-selector__card-id {
  display: block;
  font-size: 0.7rem;
  color: #94a3b8;
  margin-top: 0.2rem;
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", monospace;
  letter-spacing: 0.02em;
}
.tenant-selector__card-arrow {
  width: 18px;
  height: 18px;
  color: rgba(148, 163, 184, 0.5);
  flex-shrink: 0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.tenant-selector__card:hover .tenant-selector__card-arrow {
  color: #da0000;
  transform: translateX(4px);
}
.tenant-selector__empty {
  grid-column: 1/-1;
  text-align: center;
  padding: 3rem 2rem;
  color: #64748b;
  background: #fff;
  border: 1px dashed rgba(0, 0, 0, 0.1);
  border-radius: 14px;
}
.tenant-selector__empty svg {
  width: 40px;
  height: 40px;
  color: #94a3b8;
  margin-bottom: 0.75rem;
}
.tenant-selector__empty p {
  margin: 0;
  font-size: 0.9rem;
}

@keyframes ts-fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes ts-card-enter {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes ts-glow-pulse {
  0%, 100% {
    opacity: 0.6;
    transform: translateX(-50%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translateX(-50%) scale(1.05);
  }
}
@keyframes ts-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (max-width: 640px) {
  .tenant-selector__hero {
    padding: 2.5rem 1.5rem 3.5rem;
  }
  .tenant-selector__hero-title {
    font-size: 1.375rem;
  }
  .tenant-selector__content {
    padding: 0 1rem 2rem;
  }
  .tenant-selector__grid {
    grid-template-columns: 1fr;
  }
}
.catalog-browser {
  min-height: calc(100vh - 3.5rem);
  background: linear-gradient(180deg, #f8fafc 0%, #f9f9f9 100%);
}
.catalog-browser__content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
}
.catalog-browser__toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.catalog-browser__intro h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 0.25rem;
}
.catalog-browser__intro p {
  font-size: 0.9375rem;
  color: #64748b;
}
.catalog-browser__search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0.75rem;
  height: 2.25rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  color: #a9a9a9;
  min-width: 14rem;
  transition: border-color 150ms ease;
}
.catalog-browser__search:focus-within {
  border-color: #da0000;
  box-shadow: 0 0 0 2px rgba(218, 0, 0, 0.08);
}
.catalog-browser__search input {
  flex: 1;
  border: none;
  outline: none;
  font-family: Rubik, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 0.9rem;
  background: transparent;
  color: #1a1a2e;
}
.catalog-browser__search input::placeholder {
  color: #a9a9a9;
}
.catalog-browser__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}
.catalog-browser__card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 250ms ease;
  text-decoration: none;
  color: inherit;
}
.catalog-browser__card:hover {
  border-color: #da0000;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}
.catalog-browser__card-image {
  height: 140px;
  background: #f7f7f7;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.catalog-browser__card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.catalog-browser__card-image--placeholder {
  color: #94a3b8;
}
.catalog-browser__card-image--placeholder svg {
  width: 40px;
  height: 40px;
}
.catalog-browser__card-body {
  padding: 1rem;
}
.catalog-browser__card-name {
  display: block;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #1a1a2e;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.catalog-browser__card-id {
  display: block;
  font-size: 0.75rem;
  color: #94a3b8;
}
.catalog-browser__empty {
  text-align: center;
  padding: 3rem;
  color: #64748b;
  background: #fff;
  border: 1px dashed #e2e8f0;
  border-radius: 12px;
}

.component-browser {
  min-height: calc(100vh - 3.5rem);
  background: linear-gradient(180deg, #f8fafc 0%, #f9f9f9 100%);
}
.component-browser__content {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
}
.component-browser__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.component-browser__toolbar h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a2e;
}
.component-browser__search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0.75rem;
  height: 2.25rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  color: #a9a9a9;
  min-width: 14rem;
  transition: border-color 150ms ease;
}
.component-browser__search:focus-within {
  border-color: #da0000;
  box-shadow: 0 0 0 2px rgba(218, 0, 0, 0.08);
}
.component-browser__search input {
  flex: 1;
  border: none;
  outline: none;
  font-family: Rubik, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 0.9rem;
  color: #1a1a2e;
  background: transparent;
}
.component-browser__search input::placeholder {
  color: #a9a9a9;
}
.component-browser__list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.component-browser__item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: all 150ms ease;
}
.component-browser__item:hover {
  border-color: #da0000;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}
.component-browser__item-thumb {
  width: 48px;
  height: 48px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
  background: #f7f7f7;
}
.component-browser__item-thumb--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
}
.component-browser__item-thumb--empty svg {
  width: 24px;
  height: 24px;
}
.component-browser__item-info {
  flex: 1;
  min-width: 0;
}
.component-browser__item-name {
  display: block;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #1a1a2e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.component-browser__item-id {
  display: block;
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 0.125rem;
  font-family: monospace;
}
.component-browser__item-arrow {
  width: 18px;
  height: 18px;
  color: #94a3b8;
  flex-shrink: 0;
  transition: all 150ms ease;
}
.component-browser__item:hover .component-browser__item-arrow {
  color: #da0000;
  transform: translateX(2px);
}
.component-browser__empty {
  text-align: center;
  padding: 3rem;
  color: #64748b;
  background: #fff;
  border: 1px dashed #e2e8f0;
  border-radius: 12px;
}

.sdk-preview {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #fff;
  display: flex;
  flex-direction: column;
}
.sdk-preview__back {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 1010;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background 0.15s ease;
}
.sdk-preview__back:hover {
  background: rgba(0, 0, 0, 0.85);
}
.sdk-preview__back svg {
  flex-shrink: 0;
}
.sdk-preview__badge {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1010;
  padding: 6px 16px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  pointer-events: none;
}
.sdk-preview__badge-label {
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 400px;
  display: inline-block;
}
.sdk-preview__loading {
  position: absolute;
  inset: 0;
  z-index: 1020;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.85);
  color: #1a1a2e;
  font-size: 14px;
  animation: sdk-preview-fadein 0.3s ease both;
  animation-delay: 0.2s;
  opacity: 0;
}
.sdk-preview__spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e7e7e7;
  border-top-color: #da0000;
  border-radius: 50%;
  animation: sdk-preview-spin 0.8s linear infinite;
}
.sdk-preview__error {
  position: absolute;
  inset: 0;
  z-index: 1020;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #fff;
  color: #1a1a2e;
  padding: 32px;
  text-align: center;
}
.sdk-preview__error p {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}
.sdk-preview__error code {
  display: block;
  max-width: 600px;
  padding: 12px 16px;
  border-radius: 6px;
  background: #f7f7f7;
  color: #da0000;
  font-size: 12px;
  word-break: break-all;
  overflow: auto;
  max-height: 200px;
}
.sdk-preview__error-back {
  margin-top: 12px;
  padding: 10px 20px;
  border: 1px solid #bdbdbd;
  border-radius: 6px;
  background: #fff;
  color: #1a1a2e;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.sdk-preview__error-back:hover {
  background: #f7f7f7;
}
.sdk-preview__sdk-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.sdk-preview__sdk-container iframe {
  width: 100% !important;
  height: 100% !important;
  border: none;
}

@keyframes sdk-preview-spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes sdk-preview-fadein {
  to {
    opacity: 1;
  }
}
.ai-thinking {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}
.rsb-editor-hints {
  margin-top: 8px;
  padding: 8px;
  background: #f5f5f5;
  border-radius: 4px;
  font-size: 12px;
  color: #666;
}

.rsb-editor-hints kbd {
  padding: 2px 6px;
  background: white;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-family: monospace;
  font-size: 11px;
}

.ghost-text-decoration {
  opacity: 0.4;
  font-style: italic;
  color: #888;
}

.monaco-editor .ghost-text-decoration::after {
  color: #666;
  font-style: italic;
}

.ghost-text-widget {
  position: absolute;
  font-family: "Fira Code", "Monaco", "Menlo", "Consolas", monospace;
  font-size: 14px;
  line-height: 22px;
  opacity: 0.4 !important;
  color: #888 !important;
  font-style: italic;
  pointer-events: none;
  user-select: none;
  z-index: 1;
}

/* Global Monaco hover styling */
.monaco-hover {
  max-width: 600px !important;
}

.monaco-hover .hover-contents {
  padding: 12px 16px;
}

.monaco-hover code {
  background: rgba(100, 100, 100, 0.2);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: "Fira Code", monospace;
}

.monaco-hover pre {
  background: #1e1e1e;
  padding: 12px;
  border-radius: 4px;
  border-left: 3px solid #4ec9b0;
  margin: 8px 0;
}

.monaco-hover strong {
  color: #4ec9b0;
}

.monaco-hover h3 {
  color: #dcdcaa;
  font-size: 13px;
  margin: 12px 0 6px 0;
  border-bottom: 1px solid #3e3e3e;
  padding-bottom: 4px;
}

.script-builder__heading {
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.roomle-script-builder {
  --rsb-accent: #da0000;
  --rsb-accent-hover: #ff1a1a;
  --rsb-primary: #da0000;
  --rsb-primary-hover: #b80000;
  --rsb-primary-light: #ff3333;
  --rsb-primary-bg: #fef2f2;
  --rsb-text: #1a1a2e;
  --rsb-text-secondary: #64748b;
  --rsb-text-muted: #94a3b8;
  --rsb-surface: #f8fafc;
  --rsb-surface-hover: #f3f4f6;
  --rsb-surface-raised: #f9fafb;
  --rsb-border: #e2e8f0;
  --rsb-border-light: #e5e7eb;
  --rsb-border-strong: #d1d5db;
  --rsb-info: #3b82f6;
  --rsb-info-dark: #1e40af;
  --rsb-info-light: #dbeafe;
  --rsb-info-bg: #eff6ff;
  --rsb-success: #3dac43;
  --rsb-success-dark: #065f46;
  --rsb-success-light: #d1fae5;
  --rsb-success-bg: #f0fdf4;
  --rsb-warning: #f59e0b;
  --rsb-warning-dark: #92400e;
  --rsb-warning-light: #fef3c7;
  --rsb-warning-bg: #fffbeb;
  --rsb-danger: #da0000;
  --rsb-danger-dark: #991b1b;
  --rsb-danger-light: #fee2e2;
  --rsb-danger-bg: #fef2f2;
  --success: var(--rsb-success);
  --danger: var(--rsb-danger);
  --warning: var(--rsb-warning);
  --primary: var(--rsb-primary);
  --secondary: #888;
  --light: #f7f7f7;
  --border: #e5e7eb;
  background: #f9f9f9;
}
.roomle-script-builder .rsb-box {
  padding: 12px 16px;
  border-radius: 4px;
  border: 1px solid;
  margin-bottom: 12px;
  font-size: 0.8rem;
  line-height: 1.5;
}
.roomle-script-builder .rsb-box strong {
  display: block;
  margin-bottom: 4px;
}
.roomle-script-builder .rsb-box ul {
  margin: 8px 0 0 20px;
  padding: 0;
}
.roomle-script-builder .rsb-box--info {
  background: #dbeafe;
  border-color: #3b82f6;
  color: #1e40af;
}
.roomle-script-builder .rsb-box--warning {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #92400e;
}
.roomle-script-builder .rsb-box--success {
  background: #d1fae5;
  border-color: #3dac43;
  color: #065f46;
}
.roomle-script-builder .rsb-box--danger {
  background: #fee2e2;
  border-color: #da0000;
  color: #991b1b;
}
.roomle-script-builder .rsb-box--info-subtle {
  background: #eff6ff;
  border-color: #dbeafe;
  color: #1e40af;
}
.roomle-script-builder .rsb-box--warning-subtle {
  background: #fffbeb;
  border-color: #fef3c7;
  color: #92400e;
}
.roomle-script-builder .rsb-box--success-subtle {
  background: #f0fdf4;
  border-color: #d1fae5;
  color: #065f46;
}
.roomle-script-builder .rsb-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1.4;
}
.roomle-script-builder .rsb-badge--info {
  background: #dbeafe;
  color: #1e40af;
}
.roomle-script-builder .rsb-badge--success {
  background: #d1fae5;
  color: #065f46;
}
.roomle-script-builder .rsb-badge--warning {
  background: #fef3c7;
  color: #92400e;
}
.roomle-script-builder .rsb-badge--danger {
  background: #fee2e2;
  color: #991b1b;
}
.roomle-script-builder .rsb-badge--neutral {
  background: #f3f4f6;
  color: #64748b;
}
.roomle-script-builder .rsb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.4;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}
.roomle-script-builder .rsb-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.roomle-script-builder .rsb-btn--primary {
  background: #da0000;
  color: #fff;
  border-color: #da0000;
}
.roomle-script-builder .rsb-btn--primary:hover:not(:disabled) {
  background: rgb(177.2, 0, 0);
}
.roomle-script-builder .rsb-btn--secondary {
  background: #fff;
  color: #1a1a2e;
  border-color: #e5e7eb;
}
.roomle-script-builder .rsb-btn--secondary:hover:not(:disabled) {
  background: #f3f4f6;
  border-color: #d1d5db;
}
.roomle-script-builder .rsb-btn--danger {
  background: #da0000;
  color: #fff;
  border-color: #da0000;
}
.roomle-script-builder .rsb-btn--danger:hover:not(:disabled) {
  background: #991b1b;
}
.roomle-script-builder .rsb-btn--ghost {
  background: transparent;
  color: #64748b;
  border-color: transparent;
}
.roomle-script-builder .rsb-btn--ghost:hover:not(:disabled) {
  background: #f3f4f6;
  color: #1a1a2e;
}
.roomle-script-builder .rsb-btn--sm {
  padding: 4px 10px;
  font-size: 0.7rem;
}
.roomle-script-builder .rsb-btn--xs {
  padding: 2px 8px;
  font-size: 0.7rem;
}
.roomle-script-builder .rsb-divider {
  margin: 16px 0;
  border: none;
  border-top: 1px solid #e5e7eb;
}
.roomle-script-builder .rsb-code-block {
  font-family: monospace;
  white-space: pre-wrap;
  background: #f8fafc;
  padding: 12px;
  border-radius: 4px;
  line-height: 1.6;
  font-size: 0.7rem;
  overflow-x: auto;
}
.roomle-script-builder .rsb-container {
  display: flex;
  max-width: 1920px;
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
}
.roomle-script-builder .rsb-sidebar {
  width: 280px;
  background: #fff;
  color: #363636;
  padding: 1rem 0;
  overflow-y: auto;
  border-right: 1px solid #888;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 3.75rem);
}
.roomle-script-builder .rsb-sidebar .rsb-sidebar-section {
  margin-bottom: 1.5rem;
}
.roomle-script-builder .rsb-sidebar .rsb-sidebar-section .rsb-sidebar-section-title {
  padding: 8px 20px;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: Rubik-Bold, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #bdbdbd;
}
.roomle-script-builder .rsb-sidebar .rsb-sidebar-section .rsb-sidebar-item {
  padding: 12px 20px;
  cursor: pointer;
  transition: all 0.4s;
  display: flex;
  align-items: center;
  gap: 12px;
  border-left: 3px solid transparent;
}
.roomle-script-builder .rsb-sidebar .rsb-sidebar-section .rsb-sidebar-item:hover {
  background: rgba(0, 0, 0, 0.1);
  border-left-color: #da0000;
}
.roomle-script-builder .rsb-sidebar .rsb-sidebar-section .rsb-sidebar-item.active {
  background: rgba(0, 0, 0, 0.2);
  border-left-color: #da0000;
  color: #da0000;
}
.roomle-script-builder .rsb-sidebar .rsb-sidebar-section .rsb-sidebar-item .rsb-sidebar-icon {
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.roomle-script-builder .rsb-main-content {
  flex: 1;
  overflow: hidden;
}
.roomle-script-builder .rsb-content-area {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 3.75rem);
}
.roomle-script-builder .rsb-properties-panel {
  background: #fff;
  padding: 1.5rem;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  min-height: 0;
}
.roomle-script-builder .rsb-panel-section {
  margin-bottom: 1.5rem;
}
.roomle-script-builder .rsb-panel-section .rsb-panel-section-title {
  font-size: 1rem;
  font-weight: 700;
  font-family: Rubik-Bold, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  margin-bottom: 1rem;
  padding-bottom: 8px;
  border-bottom: 2px solid #dfdfdf;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.roomle-script-builder .rsb-form-group {
  margin-bottom: 1rem;
}
.roomle-script-builder .rsb-form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: Rubik-Medium, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  margin-bottom: 6px;
  color: #000;
}
.roomle-script-builder .rsb-form-input,
.roomle-script-builder .rsb-form-select,
.roomle-script-builder .rsb-form-textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #dfdfdf;
  border-radius: 0.4rem;
  font-size: 1rem;
  font-family: Rubik, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  transition: all 0.4s;
  background: #fff;
  line-height: 1.5rem;
  box-sizing: border-box;
}
.roomle-script-builder .rsb-form-input:focus,
.roomle-script-builder .rsb-form-select:focus,
.roomle-script-builder .rsb-form-textarea:focus {
  outline: none;
  border-color: #da0000;
  box-shadow: 0 0 0 3px rgba(218, 0, 0, 0.1);
}
.roomle-script-builder .rsb-form-textarea {
  resize: vertical;
  min-height: 80px;
  font-family: "Courier New", monospace;
  font-size: 0.8rem;
}
.roomle-script-builder .rsb-form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.125rem;
}
.roomle-script-builder .rsb-form-row-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.roomle-script-builder .rsb-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}
.roomle-script-builder .rsb-form-grid .rsb-form-grid-full {
  grid-column: 1/-1;
}
.roomle-script-builder .rsb-btn {
  padding: 8px 1rem;
  border: none;
  border-radius: 1.714rem;
  font-size: 1rem;
  font-weight: 500;
  font-family: Rubik-Medium, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  cursor: pointer;
  transition: all 0.4s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  white-space: nowrap;
}
.roomle-script-builder .rsb-btn.rsb-btn-primary {
  background: #da0000;
  color: #fff;
}
.roomle-script-builder .rsb-btn.rsb-btn-primary:hover {
  background: #c10000;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(218, 0, 0, 0.3);
}
.roomle-script-builder .rsb-btn.rsb-btn-secondary {
  background: #02af2e;
  color: #fff;
}
.roomle-script-builder .rsb-btn.rsb-btn-secondary:hover {
  background: rgb(1.4237288136, 124.5762711864, 32.7457627119);
}
.roomle-script-builder .rsb-btn.rsb-btn-success {
  background: #da0000;
  color: #fff;
}
.roomle-script-builder .rsb-btn.rsb-btn-success:hover {
  background: #a70000;
}
.roomle-script-builder .rsb-btn.rsb-btn-outline {
  background: transparent;
  border: 1px solid #dfdfdf;
  color: #000;
}
.roomle-script-builder .rsb-btn.rsb-btn-outline:hover {
  background: #f8f8f8;
  border-color: #da0000;
  color: #da0000;
}
.roomle-script-builder .rsb-btn.rsb-btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #dfdfdf;
  color: #000;
}
.roomle-script-builder .rsb-btn.rsb-btn-icon:hover {
  background: #f8f8f8;
  border-color: #da0000;
  color: #da0000;
}
.roomle-script-builder .rsb-btn.rsb-btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}
.roomle-script-builder .rsb-geometry-item {
  padding: 12px;
  background: #f9f9f9;
  border: 1px solid #dfdfdf;
  border-radius: 0.4rem;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.4s;
}
.roomle-script-builder .rsb-geometry-item:hover {
  border-color: #da0000;
  box-shadow: 0 2px 8px rgba(218, 0, 0, 0.15);
}
.roomle-script-builder .rsb-geometry-item .rsb-geometry-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.roomle-script-builder .rsb-geometry-item .rsb-geometry-item-header .rsb-geometry-item-title {
  font-weight: 500;
  font-family: Rubik-Medium, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 0.9rem;
}
.roomle-script-builder .rsb-geometry-item .rsb-geometry-item-header .rsb-geometry-item-actions {
  display: flex;
  gap: 4px;
}
.roomle-script-builder .rsb-geometry-primitives {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 1rem;
}
.roomle-script-builder .rsb-primitive-btn {
  padding: 12px;
  background: #fff;
  border: 2px solid #dfdfdf;
  border-radius: 0.4rem;
  cursor: pointer;
  transition: all 0.4s;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 500;
  font-family: Rubik-Medium, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
}
.roomle-script-builder .rsb-primitive-btn:hover {
  border-color: #da0000;
  background: rgba(218, 0, 0, 0.05);
  transform: translateY(-2px);
}
.roomle-script-builder .rsb-primitive-btn .rsb-primitive-icon {
  font-size: 1.8rem;
  margin-bottom: 4px;
}
.roomle-script-builder .rsb-parameter-item {
  padding: 12px;
  background: #f9f9f9;
  border: 1px solid #dfdfdf;
  border-radius: 0.4rem;
  margin-bottom: 8px;
}
.roomle-script-builder .rsb-parameter-item .rsb-parameter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.roomle-script-builder .rsb-parameter-item .rsb-parameter-header .rsb-parameter-name {
  font-weight: 500;
  font-family: Rubik-Medium, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 0.9rem;
}
.roomle-script-builder .rsb-parameter-item .rsb-parameter-header .rsb-parameter-type {
  font-size: 0.7rem;
  color: #fff;
  font-weight: bold;
  background: #da0000;
  padding: 2px 8px;
  border-radius: 0.125rem;
  height: max-content;
  justify-content: baseline;
}
.roomle-script-builder .rsb-logic-node {
  background: #fff;
  border: 2px solid #dfdfdf;
  border-radius: 0.4rem;
  padding: 12px;
  margin-bottom: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.roomle-script-builder .rsb-logic-node .rsb-logic-node-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #dfdfdf;
}
.roomle-script-builder .rsb-logic-node .rsb-logic-node-header .rsb-logic-node-type {
  font-weight: 700;
  font-family: Rubik-Bold, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 0.8rem;
  color: #da0000;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.roomle-script-builder .rsb-code-preview {
  background: #363636;
  color: #eee;
  padding: 1rem;
  border-radius: 0.4rem;
  font-family: "Courier New", monospace;
  font-size: 0.8rem;
  line-height: 1.6;
  overflow-x: auto;
  max-height: 300px;
  overflow-y: auto;
}
.roomle-script-builder .rsb-code-preview .keyword {
  color: #c678dd;
}
.roomle-script-builder .rsb-code-preview .string {
  color: #98c379;
}
.roomle-script-builder .rsb-code-preview .number {
  color: #d19a66;
}
.roomle-script-builder .rsb-code-preview .comment {
  color: #888;
  font-style: italic;
}
.roomle-script-builder .rsb-code-preview .function {
  color: #61afef;
}
.roomle-script-builder .rsb-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 500;
  font-family: Rubik-Medium, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
}
.roomle-script-builder .rsb-badge.rsb-badge-primary {
  background: rgba(218, 0, 0, 0.1);
  color: #da0000;
}
.roomle-script-builder .rsb-badge.rsb-badge-success {
  background: rgba(218, 0, 0, 0.1);
  color: #da0000;
}
.roomle-script-builder .rsb-badge.rsb-badge-warning {
  background: #fef3c7;
  color: #a16207;
}
.roomle-script-builder .rsb-badge.rsb-badge-danger {
  background: #ffc5c5;
  color: #df0300;
}
.roomle-script-builder .rsb-badge.rsb-badge-info {
  background: #dbeafe;
  color: #da0000;
}
.roomle-script-builder .rsb-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1500;
}
.roomle-script-builder .rsb-modal-overlay-nested {
  z-index: 1100;
  background: rgba(0, 0, 0, 0.7);
}
.roomle-script-builder .rsb-modal-nested {
  z-index: 1101;
}
.roomle-script-builder .rsb-modal {
  background: #fff;
  border-radius: 1rem;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  animation: modalSlideIn 0.3s ease-out;
}
@keyframes modalSlideIn {
  from {
    transform: scale(0.9) translateY(-20px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}
.roomle-script-builder .rsb-modal .rsb-modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid #dfdfdf;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #da0000;
  color: #fff;
}
.roomle-script-builder .rsb-modal .rsb-modal-header .rsb-modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  font-family: Rubik-Bold, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  color: #fff;
  margin: 0;
}
.roomle-script-builder .rsb-modal .rsb-modal-body {
  padding: 0 1.5rem;
  overflow-y: auto;
  max-height: 70vh;
}
.roomle-script-builder .rsb-modal .rsb-modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid #dfdfdf;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: #f9f9f9;
}
.roomle-script-builder .rsb-modal .rsb-close-modal {
  background: rgba(255, 255, 255, 0.55);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.55);
}
.roomle-script-builder .rsb-modal .rsb-close-modal:hover {
  background: rgba(255, 255, 255, 0.9);
}
.roomle-script-builder .rsb-empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #888;
}
.roomle-script-builder .rsb-empty-state .rsb-empty-state-icon {
  font-size: 48px;
  margin-bottom: 1rem;
  opacity: 0.5;
}
.roomle-script-builder .rsb-text-muted {
  color: #888;
}
.roomle-script-builder .rsb-text-small {
  font-size: 0.8rem;
}
.roomle-script-builder .rsb-mb-2 {
  margin-bottom: 8px;
}
.roomle-script-builder .rsb-mb-3 {
  margin-bottom: 12px;
}
.roomle-script-builder .rsb-mb-4 {
  margin-bottom: 1rem;
}
.roomle-script-builder .rsb-mt-2 {
  margin-top: 8px;
}
.roomle-script-builder .rsb-mt-3 {
  margin-top: 12px;
}
.roomle-script-builder .rsb-mt-4 {
  margin-top: 1rem;
}
.roomle-script-builder .rsb-flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.roomle-script-builder .rsb-gap-2 {
  gap: 8px;
}
.roomle-script-builder .rsb-w-full {
  width: 100%;
}
.roomle-script-builder input[type=range] {
  width: 100%;
  height: 6px;
  border-radius: 0.125rem;
  background: #dfdfdf;
  outline: none;
  -webkit-appearance: none;
}
.roomle-script-builder input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #da0000;
  cursor: pointer;
}
.roomle-script-builder input[type=range]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #da0000;
  cursor: pointer;
  border: none;
}
.roomle-script-builder .rsb-checkbox-group {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
}
.roomle-script-builder .rsb-checkbox-group input[type=checkbox] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}
.roomle-script-builder .rsb-checkbox-group label {
  margin: 0;
  cursor: pointer;
  user-select: none;
}
.roomle-script-builder .rsb-section-divider {
  margin: 1.5rem 0;
  border: none;
  border-top: 2px solid #dfdfdf;
}
.roomle-script-builder .rsb-helper-text {
  font-size: 0.8rem;
  color: #888;
  margin-top: 4px;
  font-style: italic;
}
.roomle-script-builder ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.roomle-script-builder ::-webkit-scrollbar-track {
  background: #f9f9f9;
}
.roomle-script-builder ::-webkit-scrollbar-thumb {
  background: #dfdfdf;
  border-radius: 0.125rem;
}
.roomle-script-builder ::-webkit-scrollbar-thumb:hover {
  background: #888;
}

.rsb--fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  background: #1a1a2e;
  animation: rsb-fullscreen-enter 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.rsb--fullscreen .rsb-container {
  flex: 1;
  max-width: none;
  width: 100%;
  min-height: 0;
  margin: 0;
  box-shadow: none;
}
.rsb--fullscreen .rsb-sidebar {
  height: 100%;
  max-height: none;
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  border-right: 1px solid #e2e8f0;
}
.rsb--fullscreen .rsb-main-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.rsb--fullscreen .rsb-content-area {
  flex: 1;
  display: flex;
  flex-direction: row;
  min-height: 0;
}
.rsb--fullscreen .rsb-properties-panel {
  flex: 1;
  max-height: none;
  min-width: 0;
  overflow-y: auto;
}

@keyframes rsb-fullscreen-enter {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.rsb-fullscreen-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  background: linear-gradient(135deg, #1a1a2e 0%, #1a1a2e 50%, #1a1a2e 100%);
  color: #fff;
  border-bottom: 1px solid rgba(99, 102, 241, 0.2);
  flex-shrink: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.rsb-fullscreen-bar__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.rsb-fullscreen-bar__icon {
  font-size: 18px;
  animation: rsb-fs-icon-glow 3s ease-in-out infinite;
}

@keyframes rsb-fs-icon-glow {
  0%, 100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.3);
  }
}
.rsb-fullscreen-bar__id {
  font-weight: 400;
  color: #94a3b8;
  font-size: 13px;
  padding: 2px 10px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 20px;
  border: 1px solid rgba(99, 102, 241, 0.15);
}

.rsb-fullscreen-bar__exit {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 8px;
  color: #fee2e2;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.rsb-fullscreen-bar__exit:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}
.rsb-fullscreen-bar__exit span:first-child {
  font-size: 14px;
}

.rsb-sidebar-footer {
  margin-top: auto;
  padding: 12px 16px;
  border-top: 1px solid #888;
}

.rsb-sidebar-fullscreen-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  background: linear-gradient(135deg, #1a1a2e 0%, #1a1a2e 100%);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}
.rsb-sidebar-fullscreen-btn:hover {
  background: linear-gradient(135deg, #1a1a2e 0%, #1a1a2e 100%);
  border-color: rgba(99, 102, 241, 0.5);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.rsb-sidebar-fullscreen-icon {
  font-size: 16px;
  line-height: 1;
}

.rsb-fs-preview-pane {
  width: 420px;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #1a1a2e 0%, #1a1a2e 100%);
  border-left: 1px solid rgba(99, 102, 241, 0.15);
  position: relative;
  overflow: hidden;
}
.rsb-fs-preview-pane::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent 0%, rgba(99, 102, 241, 0.4) 30%, rgba(139, 92, 246, 0.4) 70%, transparent 100%);
  z-index: 1;
}

.rsb-fs-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(99, 102, 241, 0.1);
  flex-shrink: 0;
}

.rsb-fs-preview-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
  letter-spacing: 0.3px;
}

.rsb-fs-preview-icon {
  font-size: 14px;
}

.rsb-fs-preview-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rsb-fs-preview-ctrl {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: #94a3b8;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.rsb-fs-preview-ctrl:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
  color: #e2e8f0;
}
.rsb-fs-preview-ctrl.rsb-fs-preview-ctrl--active {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.4);
  color: #da0000;
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.2);
}

.rsb-fs-preview-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
}

.rsb-fs-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #64748b;
  flex-shrink: 0;
}
.rsb-fs-status-dot--active {
  background: #3dac43;
  box-shadow: 0 0 6px rgba(52, 211, 153, 0.5);
  animation: rsb-fs-dot-pulse 2s ease-in-out infinite;
}

@keyframes rsb-fs-dot-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
.rsb-fs-preview-canvas {
  flex: 1;
  min-height: 0;
  position: relative;
  background: linear-gradient(135deg, #1a1a2e 0%, #1a1a2e 50%, #16213e 100%);
}
.rsb-fs-preview-canvas::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(99, 102, 241, 0.06) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
  z-index: 0;
}
.rsb-fs-preview-canvas::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(15, 23, 42, 0.4) 100%);
  pointer-events: none;
  z-index: 1;
}
.rsb-fs-preview-canvas canvas,
.rsb-fs-preview-canvas > div {
  position: relative;
  z-index: 2;
  width: 100% !important;
  height: 100% !important;
}

.rsb-sdk-preview-container {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
}
.rsb-sdk-preview-container canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.rsb-fs-preview-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(99, 102, 241, 0.1);
  flex-shrink: 0;
}

.rsb-fs-preview-stat {
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}
.rsb-fs-preview-stat:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
  color: #1a1a2e;
}

.rsb-fs-preview-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 40px;
  position: relative;
  z-index: 2;
}

.rsb-fs-preview-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.4;
  animation: rsb-fs-float 3s ease-in-out infinite;
}

@keyframes rsb-fs-float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}
.rsb-fs-preview-empty-text {
  font-size: 15px;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 6px;
}

.rsb-fs-preview-empty-hint {
  font-size: 12px;
  color: #1a1a2e;
  text-align: center;
  max-width: 200px;
  line-height: 1.4;
}

.rsb-modal-large {
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
}

.rsb-alert {
  padding: 12px 1rem;
  border-radius: 0.4rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.rsb-alert-info {
  background: #dbeafe;
  border-left: 4px solid #da0000;
}

.rsb-alert-warning {
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
}

.rsb-modal-xlarge {
  max-width: 1200px;
  max-height: 90vh;
  width: 90vw;
}

.rsb-template-card {
  display: flex;
  gap: 12px;
  padding: 12px;
  border: 1px solid #dfdfdf;
  border-radius: 0.4rem;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.4s;
  background: #fff;
}
.rsb-template-card:hover {
  background: rgba(218, 0, 0, 0.05);
  border-color: #da0000;
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.rsb-template-card:active {
  transform: translateX(2px);
  background: rgba(218, 0, 0, 0.1);
}

.rsb-template-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.rsb-template-name {
  font-weight: 700;
  font-family: Rubik-Bold, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 0.9rem;
  margin-bottom: 4px;
  color: #000;
}

.rsb-template-desc {
  font-size: 0.7rem;
  color: #888;
  line-height: 1.4;
}

/* Suggestions Dropdown */
.rsb-suggestions-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #da0000;
  border-radius: 0.4rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  margin-top: 4px;
}

.rsb-suggestions-header {
  padding: 8px 12px;
  background: #f9f9f9;
  border-bottom: 1px solid #dfdfdf;
  font-weight: 700;
  font-family: Rubik-Bold, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 0.8rem;
  color: #da0000;
  position: sticky;
  top: 0;
  z-index: 1;
}

.rsb-suggestion-item {
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid #dfdfdf;
  transition: background 0.4s;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.rsb-suggestion-item:hover {
  background: rgba(218, 0, 0, 0.1);
}
.rsb-suggestion-item:last-child {
  border-bottom: none;
}

.rsb-suggestion-key {
  font-weight: 700;
  font-family: "Courier New", monospace;
  color: #da0000;
  font-size: 0.9rem;
}

.rsb-suggestion-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
}

.rsb-suggestion-empty {
  padding: 1rem;
  text-align: center;
  color: #888;
  font-size: 0.8rem;
}

/* Parameter Badges */
.rsb-param-badge {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(218, 0, 0, 0.1);
  border: 1px solid #da0000;
  border-radius: 0.125rem;
  font-size: 0.7rem;
  font-weight: 700;
  font-family: "Courier New", monospace;
  color: #da0000;
}

/* Validation Error */
.rsb-validation-error {
  margin-top: 4px;
  padding: 6px 10px;
  background: #ffc5c5;
  border: 1px solid #df0300;
  border-radius: 0.125rem;
  color: #df0300;
  font-size: 0.8rem;
  font-weight: 500;
  font-family: Rubik-Medium, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
}

/* Badge variants by type */
.rsb-badge-sm {
  font-size: 9px;
  padding: 2px 6px;
}

/* Smart input highlight */
.rsb-smart-input:focus {
  border-color: #da0000;
  box-shadow: 0 0 0 3px rgba(218, 0, 0, 0.1);
}

/* ==================== FLOATING LIVE PREVIEW ==================== */
.rsb-floating-preview {
  position: fixed;
  background: #363636;
  border-radius: 1rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2), 0 0 0 1px #dfdfdf;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.rsb-floating-preview:hover {
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4), 0 0 0 1px #888;
}
.rsb-floating-preview.rsb-dragging {
  cursor: grabbing !important;
  transform: scale(1.02);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.rsb-floating-preview.rsb-resizing {
  transition: none;
}

/* Preview Header */
.rsb-preview-header {
  background: #da0000;
  padding: 12px 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: grab;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  user-select: none;
}
.rsb-preview-header:active {
  cursor: grabbing;
}

.rsb-preview-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 700;
  font-family: Rubik-Bold, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 1rem;
}

.rsb-preview-icon {
  font-size: 1.2rem;
}

.rsb-preview-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  opacity: 0.9;
}

.rsb-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

.rsb-status-active {
  background: #da0000;
  box-shadow: 0 0 8px #da0000;
}

.rsb-status-inactive {
  background: #df0300;
  box-shadow: 0 0 8px #df0300;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
/* Preview Controls */
.rsb-preview-controls {
  display: flex;
  gap: 4px;
  align-items: center;
}

.rsb-preview-control-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 6px 10px;
  transition: all 0.4s;
}
.rsb-preview-control-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}
.rsb-preview-control-btn.rsb-active {
  background: rgba(255, 255, 255, 0.3);
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.2);
}

/* Dropdown Menu */
.rsb-dropdown {
  position: relative;
}
.rsb-dropdown:hover .rsb-dropdown-menu {
  display: block;
}

.rsb-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: #fff;
  border: 1px solid #dfdfdf;
  border-radius: 0.4rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  min-width: 200px;
  z-index: 10001;
  overflow: hidden;
}

.rsb-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  background: #fff;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: background 0.4s;
  font-size: 0.9rem;
  color: #000;
}
.rsb-dropdown-item:hover {
  background: #f8f8f8;
}

/* Preview Content */
.rsb-preview-content {
  flex: 1;
  background: #363636;
  position: relative;
  overflow: hidden;
  min-height: 200px;
}
.rsb-preview-content .m-preview,
.rsb-preview-content .m-preview__content,
.rsb-preview-content .m-preview__sdkcontent,
.rsb-preview-content .roomle-configurator-canvas-container {
  width: 100% !important;
  height: 100% !important;
}
.rsb-preview-content .m-preview__selector {
  display: none;
}

.rsb-preview-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #888;
  padding: 40px 20px;
}

.rsb-preview-empty-icon {
  font-size: 48px;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.rsb-preview-empty-text {
  font-weight: 700;
  font-family: Rubik-Bold, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 1rem;
  margin-bottom: 8px;
}

.rsb-preview-empty-hint {
  font-size: 0.8rem;
  opacity: 0.7;
}

/* Preview Footer */
.rsb-preview-footer {
  background: #da0000;
  padding: 8px 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.rsb-preview-stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.rsb-preview-stat {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #fff;
  font-size: 0.7rem;
  opacity: 0.9;
}

.rsb-preview-stat-icon {
  font-size: 1rem;
}

/* Resize Handle */
.rsb-preview-resize-handle {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 20px;
  height: 20px;
  cursor: nwse-resize;
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  user-select: none;
}
.rsb-preview-resize-handle:hover {
  color: rgba(255, 255, 255, 0.9);
}

/* Toggle Button (when preview is hidden) */
.rsb-floating-preview-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #da0000;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 12px 1.5rem;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-family: Rubik-Bold, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(218, 0, 0, 0.4);
  z-index: 10000;
  transition: all 0.3s ease;
}
.rsb-floating-preview-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(218, 0, 0, 0.6);
}
.rsb-floating-preview-toggle:active {
  transform: translateY(0);
}

/* Animations */
@keyframes slideInFromRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
.rsb-floating-preview {
  animation: slideInFromRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== DOCKING SYSTEM - COMPLETE STYLES ==================== */
/* Main Docking Panel Section */
.rsb-panel-section {
  background: white;
  border-radius: 8px;
  padding: 20px;
}

.rsb-panel-section-title {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.rsb-panel-section-title span {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Docking Overview Stats */
.rsb-docking-overview {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.rsb-docking-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.rsb-stat-card {
  background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
  border: 2px solid #3b82f6;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.rsb-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(59, 130, 246, 0.2);
}

.rsb-stat-icon {
  font-size: 32px;
  margin-bottom: 8px;
  display: block;
}

.rsb-stat-value {
  font-size: 36px;
  font-weight: bold;
  color: #3b82f6;
  line-height: 1;
  margin-bottom: 8px;
}

.rsb-stat-label {
  font-size: 13px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

/* Alert Styles */
.rsb-alert {
  padding: 16px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rsb-alert-success {
  background: #d1fae5;
  border: 2px solid #da0000;
  color: #065f46;
}

.rsb-alert-warning {
  background: #fef3c7;
  border: 2px solid #f59e0b;
  color: #92400e;
}

.rsb-alert-info {
  background: #dbeafe;
  border: 2px solid #3b82f6;
  color: #1e40af;
}

.rsb-alert strong {
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
}

.rsb-alert-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ==================== Collapsible Sections ==================== */
.rsb-clickable {
  cursor: pointer;
  user-select: none;
}

.rsb-chevron {
  display: inline-block;
  font-size: 10px;
  transition: transform 0.25s ease;
  margin-right: 6px;
  color: #64748b;
}

.rsb-chevron-open {
  transform: rotate(90deg);
}

.rsb-collapsible-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.25s ease;
  opacity: 0;
}

.rsb-collapsible-open {
  max-height: 5000px;
  opacity: 1;
}

.rsb-collapsible-alert .rsb-alert-header {
  margin-bottom: 0;
}

.rsb-collapsible-alert .rsb-collapsible-open {
  margin-top: 12px;
}

.rsb-alert-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
}

.rsb-alert-toggle strong {
  display: inline;
  margin-bottom: 0;
}

/* ==================== Docking Blueprint Chart ==================== */
.rsb-chart-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 20px;
}

.rsb-chart-legend-title {
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
}

.rsb-chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #1a1a2e;
  font-family: "Monaco", "Menlo", "Courier New", monospace;
}

.rsb-chart-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.08);
}

/* Blueprint layout: 3-column grid */
.rsb-blueprint {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr;
  gap: 20px;
  align-items: start;
  margin-bottom: 20px;
}

.rsb-blueprint-rail {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rsb-blueprint-rail-title {
  font-weight: 700;
  font-size: 14px;
  color: #1a1a2e;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.rsb-blueprint-rail-subtitle {
  font-size: 11px;
  color: #94a3b8;
  margin-bottom: 8px;
  line-height: 1.4;
}

.rsb-blueprint-point {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.rsb-blueprint-point:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.rsb-blueprint-point-header {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.rsb-blueprint-point-meta {
  margin-bottom: 4px;
}

.rsb-blueprint-pos {
  font-size: 11px;
  color: #64748b;
  background: #f8fafc;
  padding: 2px 6px;
  border-radius: 4px;
}

.rsb-blueprint-indicators {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.rsb-indicator {
  font-size: 14px;
  cursor: default;
}

.rsb-blueprint-empty {
  color: #94a3b8;
  font-size: 13px;
  font-style: italic;
  padding: 16px;
  text-align: center;
  border: 2px dashed #e2e8f0;
  border-radius: 10px;
}

/* Center column: component box + connections */
.rsb-blueprint-center {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.rsb-blueprint-component {
  background: linear-gradient(135deg, #1a1a2e 0%, #1a1a2e 100%);
  color: white;
  border-radius: 16px;
  padding: 24px 32px;
  text-align: center;
  min-width: 200px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  position: relative;
}

.rsb-blueprint-component-icon {
  font-size: 36px;
  margin-bottom: 8px;
}

.rsb-blueprint-component-label {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.3px;
}

.rsb-blueprint-component-id {
  font-size: 11px;
  font-family: "Monaco", "Menlo", "Courier New", monospace;
  opacity: 0.7;
  margin-top: 4px;
  word-break: break-all;
}

/* Connection lines */
.rsb-blueprint-connections {
  width: 100%;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 16px;
}

.rsb-blueprint-conn-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.rsb-blueprint-conn-line {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}

.rsb-blueprint-conn-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.rsb-blueprint-conn-mask {
  font-weight: 700;
  font-family: "Monaco", "Menlo", "Courier New", monospace;
  font-size: 13px;
  color: #1a1a2e;
}

.rsb-blueprint-conn-arrow {
  font-size: 11px;
  color: #94a3b8;
  margin-left: auto;
}

/* Unmatched mask warnings */
.rsb-blueprint-unmatched {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  color: #92400e;
  width: 100%;
}

.rsb-blueprint-unmatched code {
  font-weight: 700;
  background: rgba(0, 0, 0, 0.08);
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 2px;
}

/* Possible children list */
.rsb-blueprint-children-list {
  width: 100%;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 16px;
}

.rsb-blueprint-child-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  font-size: 12px;
}

.rsb-blueprint-child-item code {
  font-weight: 600;
  color: #1a1a2e;
  word-break: break-all;
}

/* Bottom row: siblings + ranges */
.rsb-blueprint-bottom-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.rsb-blueprint-bottom-section {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
}

.rsb-blueprint-sibling-grid,
.rsb-blueprint-range-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.rsb-blueprint-sibling,
.rsb-blueprint-range {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
}

.rsb-blueprint-sibling:hover,
.rsb-blueprint-range:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.rsb-blueprint-range-detail {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11px;
  color: #64748b;
  margin-top: 6px;
}

/* How-it-works legend */
.rsb-blueprint-howto {
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
  border: 1px solid #da0000;
  border-radius: 12px;
  padding: 20px;
}

.rsb-blueprint-howto-title {
  font-weight: 800;
  font-size: 15px;
  color: #1a1a2e;
  margin-bottom: 16px;
}

.rsb-blueprint-howto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.rsb-blueprint-howto-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.rsb-blueprint-howto-icon {
  font-size: 24px;
  flex-shrink: 0;
  width: 36px;
  text-align: center;
}

.rsb-blueprint-howto-item strong {
  display: block;
  font-size: 13px;
  color: #1a1a2e;
  margin-bottom: 2px;
}

.rsb-blueprint-howto-item p {
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
  margin: 0;
}

.rsb-blueprint-howto-item code {
  background: rgba(99, 102, 241, 0.1);
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 11px;
  color: #da0000;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .rsb-blueprint {
    grid-template-columns: 1fr;
  }
  .rsb-blueprint-bottom-row {
    grid-template-columns: 1fr;
  }
}
.rsb-warning-list {
  margin: 8px 0 0 20px;
  padding: 0;
  list-style: none;
}

.rsb-warning-list li {
  margin-bottom: 4px;
  font-size: 13px;
  line-height: 1.5;
}

.rsb-warning-list li::before {
  content: "• ";
  margin-right: 8px;
}

/* Docking Section */
.rsb-docking-section {
  margin-bottom: 32px;
}

.rsb-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e5e7eb;
}

.rsb-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  color: #1a1a2e;
}

.rsb-section-title .rsb-text-muted {
  font-weight: 400;
}

/* Docking Points Grid */
.rsb-docking-points-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 16px;
}

.rsb-docking-point-card {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.rsb-docking-point-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
  transform: translateY(-2px);
}

.rsb-range-card {
  border-color: #f59e0b;
}

.rsb-range-card:hover {
  border-color: #92400e;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
}

.rsb-card-header {
  background: #f9fafb;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e5e7eb;
}

.rsb-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.rsb-card-actions {
  display: flex;
  gap: 4px;
}

.rsb-btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: white;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 16px;
}

.rsb-btn-icon:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.rsb-btn-danger:hover {
  background: #fee2e2;
  border-color: #fee2e2;
  color: #da0000;
}

.rsb-card-body {
  padding: 16px;
}

.rsb-docking-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rsb-info-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
}

.rsb-info-label {
  font-weight: 600;
  color: #64748b;
  min-width: 100px;
  flex-shrink: 0;
}

.rsb-info-row code {
  background: #f3f4f6;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-family: "Monaco", "Menlo", "Courier New", monospace;
  flex: 1;
  word-break: break-all;
  color: #1a1a2e;
}

.rsb-condition-code {
  color: #f59e0b;
  font-weight: 600;
  background: #fef3c7;
}

.rsb-assignment-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Mask Badges */
.rsb-mask-badge {
  background: #3b82f6;
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  font-family: "Monaco", "Menlo", "Courier New", monospace;
}

.rsb-mask-secondary {
  background: #da0000;
}

.rsb-mask-warning {
  background: #f59e0b;
}

.rsb-mask-info {
  background: #3b82f6;
}

/* Sibling Card Styling */
.rsb-sibling-card {
  border-left: 4px solid #3b82f6;
}

/* Sibling Add Assignment Row */
.rsb-add-assignment {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.rsb-add-assignment .rsb-form-input {
  flex: 1;
}

/* Badge Variations */
.rsb-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.rsb-badge-sm {
  padding: 3px 8px;
  font-size: 10px;
}

.rsb-badge-primary {
  background: #dbeafe;
  color: #1e40af;
}

.rsb-badge-secondary {
  background: #da0000;
  color: #fff;
}

.rsb-badge-success {
  background: #d1fae5;
  color: #065f46;
}

.rsb-badge-warning {
  background: #fef3c7;
  color: #92400e;
}

.rsb-badge-info {
  background: #dbeafe;
  color: #1e40af;
}

.rsb-badge-danger {
  background: #fee2e2;
  color: #991b1b;
}

/* Button Styles */
.rsb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}

.rsb-btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

.rsb-btn-primary {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

.rsb-btn-primary:hover {
  background: #da0000;
  border-color: #da0000;
}

.rsb-btn-secondary {
  background: #da0000;
  color: white;
  border-color: #da0000;
}

.rsb-btn-secondary:hover {
  background: #da0000;
  border-color: #da0000;
}

.rsb-btn-success {
  background: #da0000;
  color: white;
  border-color: #da0000;
}

.rsb-btn-success:hover {
  background: #3dac43;
  border-color: #3dac43;
}

.rsb-btn-warning {
  background: #f59e0b;
  color: white;
  border-color: #f59e0b;
}

.rsb-btn-warning:hover {
  background: #92400e;
  border-color: #92400e;
}

.rsb-btn-outline {
  background: white;
  color: #64748b;
  border-color: #d1d5db;
}

.rsb-btn-outline:hover {
  background: #f9fafb;
  border-color: #94a3b8;
  color: #1a1a2e;
}

/* Possible Children List */
.rsb-possible-children-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rsb-possible-child-card {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  transition: all 0.2s ease;
}

.rsb-possible-child-card:hover {
  border-color: #da0000;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1);
}

.rsb-child-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.rsb-child-header > div {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.rsb-child-header strong {
  font-family: "Monaco", "Menlo", "Courier New", monospace;
  color: #1a1a2e;
  font-size: 14px;
}

.rsb-child-actions {
  display: flex;
  gap: 4px;
}

.rsb-child-condition {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rsb-child-condition code {
  background: #f3f4f6;
  padding: 4px 8px;
  border-radius: 4px;
  font-family: "Monaco", "Menlo", "Courier New", monospace;
  flex: 1;
}

/* Empty State */
.rsb-empty-state {
  text-align: center;
  padding: 60px 20px;
  background: #f9fafb;
  border: 2px dashed #d1d5db;
  border-radius: 12px;
}

.rsb-empty-state-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.rsb-empty-state > div:nth-child(2) {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 8px;
}

.rsb-empty-state-small {
  text-align: center;
  padding: 32px 16px;
  color: #64748b;
  background: #f9fafb;
  border-radius: 8px;
}

/* ── Raw Geometry Notice ── */
.rsb-raw-geometry-notice {
  display: flex;
  gap: 16px;
  padding: 20px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fef3cd 0%, #fff8e1 100%);
  border: 1px solid #f0d68a;
  border-left: 4px solid #f0ad4e;
  border-radius: 8px;
}

.rsb-raw-geometry-notice__icon {
  font-size: 32px;
  flex-shrink: 0;
}

.rsb-raw-geometry-notice__content {
  flex: 1;
  min-width: 0;
}

.rsb-raw-geometry-notice__title {
  font-size: 15px;
  font-weight: 600;
  color: #856404;
  margin-bottom: 6px;
}

.rsb-raw-geometry-notice__text {
  font-size: 13px;
  color: #6c5700;
  line-height: 1.5;
  margin-bottom: 12px;
}
.rsb-raw-geometry-notice__text code {
  background: rgba(0, 0, 0, 0.08);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 12px;
  font-family: "SF Mono", Monaco, "Cascadia Code", monospace;
}

.rsb-raw-geometry-notice__actions {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.rsb-raw-geometry-notice__details summary {
  font-size: 12px;
  color: #856404;
  cursor: pointer;
  user-select: none;
}
.rsb-raw-geometry-notice__details summary:hover {
  color: #533f03;
}

.rsb-raw-geometry-notice__code {
  margin-top: 8px;
  max-height: 300px;
  overflow: auto;
  padding: 12px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 6px;
  font-size: 11px;
  font-family: "SF Mono", Monaco, "Cascadia Code", monospace;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  color: #3d3100;
}

/* Mask Matrix */
.rsb-mask-matrix {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rsb-mask-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: #f9fafb;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
}

.rsb-mask-label {
  font-family: "Monaco", "Menlo", "Courier New", monospace;
  font-weight: 600;
  font-size: 13px;
}

.rsb-mask-connections {
  display: flex;
  gap: 6px;
}

/* Docking Template Grid */
.rsb-docking-template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 16px;
}

.rsb-docking-template-card {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.rsb-docking-template-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
  transform: translateY(-4px);
}

.rsb-template-card-header {
  background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #e5e7eb;
}

.rsb-template-icon {
  font-size: 48px;
  line-height: 1;
}

.rsb-template-difficulty {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.rsb-template-card-body {
  padding: 20px;
  flex: 1;
}

.rsb-template-name {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 8px;
  color: #1a1a2e;
}

.rsb-template-description {
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 12px;
}

.rsb-template-usecases {
  font-size: 12px;
  color: #64748b;
}

.rsb-template-usecases strong {
  display: block;
  margin-bottom: 4px;
  color: #1a1a2e;
}

.rsb-template-usecases ul {
  margin: 0;
  padding-left: 20px;
}

.rsb-template-usecases li {
  margin-bottom: 2px;
}

.rsb-template-card-footer {
  padding: 16px 20px;
  border-top: 1px solid #e5e7eb;
}

/* Divider */
.rsb-divider {
  text-align: center;
  margin: 32px 0;
  position: relative;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
}

.rsb-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #e5e7eb;
  z-index: 0;
}

.rsb-divider::after {
  content: attr(data-text);
  position: relative;
  background: white;
  padding: 0 16px;
  z-index: 1;
}

/* Advanced Options */
.rsb-advanced-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.rsb-btn-lg {
  padding: 20px 24px;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
}

.rsb-btn-lg > span {
  flex-shrink: 0;
}

.rsb-btn-lg > div {
  flex: 1;
}

/* Utility Classes */
.rsb-mt-1 {
  margin-top: 4px;
}

.rsb-mt-2 {
  margin-top: 8px;
}

.rsb-mt-3 {
  margin-top: 16px;
}

.rsb-mb-2 {
  margin-bottom: 8px;
}

.rsb-mb-3 {
  margin-bottom: 16px;
}

.rsb-w-full {
  width: 100%;
}

.rsb-flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rsb-gap-2 {
  gap: 8px;
}

.rsb-text-small {
  font-size: 13px;
}

.rsb-text-muted {
  color: #64748b;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .rsb-docking-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .rsb-docking-points-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}
@media (max-width: 768px) {
  .rsb-docking-stats {
    grid-template-columns: 1fr;
  }
  .rsb-docking-points-grid {
    grid-template-columns: 1fr;
  }
  .rsb-docking-template-grid {
    grid-template-columns: 1fr;
  }
}
/* ==================== DOCKING MODAL PREVIEW SECTION ==================== */
/* Modal Layout */
.rsb-docking-modal-layout {
  margin-top: 1rem;
  gap: 32px;
  max-height: calc(90vh - 180px);
}

.rsb-docking-form {
  overflow-y: auto;
  padding-right: 16px;
}

.rsb-docking-form::-webkit-scrollbar {
  width: 8px;
}

.rsb-docking-form::-webkit-scrollbar-track {
  background: #f3f4f6;
  border-radius: 4px;
}

.rsb-docking-form::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 4px;
}

.rsb-docking-form::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Preview Section */
.rsb-preview-title {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 16px;
  color: #1a1a2e;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e5e7eb;
}

/* Form Sections in Modal */
.rsb-form-section {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e5e7eb;
}

.rsb-form-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.rsb-form-section-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
  color: #1a1a2e;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rsb-form-group {
  margin-bottom: 20px;
}

.rsb-form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 8px;
}

.rsb-form-input {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #e5e7eb;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s ease;
  background: white;
}

.rsb-form-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.rsb-form-input::placeholder {
  color: #94a3b8;
}

.rsb-form-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

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

.rsb-helper-text {
  font-size: 12px;
  color: #64748b;
  margin-top: 6px;
  line-height: 1.5;
}

/* Preset Buttons */
.rsb-preset-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Modal Specific */
.rsb-modal-xlarge {
  max-width: 1200px;
  width: 95vw;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.rsb-modal-body {
  flex: 1;
  overflow: hidden;
}

/* Responsive for Preview */
@media (max-width: 1024px) {
  .rsb-docking-modal-layout {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  .rsb-form-row-3 {
    grid-template-columns: 1fr;
  }
}
/* ==================== DOCKING EXAMPLES ==================== */
.rsb-example-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.rsb-example-card {
  background: white;
  border: 3px solid #da0000;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.rsb-example-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.25);
  border-color: #3dac43;
}

.rsb-example-header {
  background: linear-gradient(135deg, #d1fae5 0%, #d1fae5 100%);
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #da0000;
}

.rsb-example-title {
  font-size: 16px;
  font-weight: 700;
  color: #065f46;
}

.rsb-example-difficulty {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.rsb-example-body {
  padding: 20px;
  flex: 1;
}

.rsb-example-description {
  font-size: 14px;
  color: #1a1a2e;
  line-height: 1.6;
  margin-bottom: 16px;
}

.rsb-example-features {
  font-size: 13px;
  color: #64748b;
}

.rsb-example-features strong {
  display: block;
  margin-bottom: 8px;
  color: #1a1a2e;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.rsb-example-features ul {
  margin: 0;
  padding-left: 20px;
  list-style: none;
}

.rsb-example-features li {
  margin-bottom: 6px;
  padding-left: 20px;
  position: relative;
}

.rsb-example-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #da0000;
  font-weight: 700;
}

.rsb-example-footer {
  padding: 16px 20px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
}

/* ==================== VALUE OBJECTS STYLES ==================== */
.rsb-value-objects-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rsb-value-object-card {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  transition: all 0.2s ease;
}

.rsb-value-object-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.rsb-vo-header {
  display: flex;
  gap: 16px;
  align-items: center;
}

.rsb-vo-preview {
  flex-shrink: 0;
}

.rsb-vo-thumbnail {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid #e5e7eb;
}

.rsb-vo-icon {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  border-radius: 6px;
  font-size: 32px;
}

.rsb-vo-info {
  flex: 1;
  min-width: 0;
}

.rsb-vo-value {
  font-size: 16px;
  margin-bottom: 4px;
  font-family: "Monaco", "Menlo", "Courier New", monospace;
}

.rsb-vo-label {
  color: #64748b;
  font-size: 14px;
  margin-bottom: 8px;
}

.rsb-vo-condition {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.rsb-vo-condition code {
  background: #fef3c7;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  color: #92400e;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rsb-vo-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

/* Helper functions */
.rsb-helper-text {
  font-size: 12px;
  color: #64748b;
  margin-top: 6px;
  line-height: 1.5;
}

/* ==================== VALID VALUES STYLES ==================== */
.rsb-valid-values-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rsb-valid-value-card {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
}

.rsb-valid-value-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.rsb-vv-content {
  flex: 1;
  min-width: 0;
}

.rsb-vv-value {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.rsb-vv-value .rsb-badge {
  font-size: 14px;
  padding: 6px 12px;
}

.rsb-vv-condition {
  margin-top: 8px;
}

.rsb-vv-condition code {
  background: #fef3c7;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 11px;
  color: #92400e;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: "Monaco", "Menlo", "Courier New", monospace;
}

.rsb-vv-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  margin-left: 16px;
}

.rsb-info-box {
  background: #eff6ff;
  border: 2px solid #3b82f6;
  border-radius: 8px;
  padding: 16px;
  font-size: 13px;
  line-height: 1.6;
}

.rsb-info-box strong {
  color: #1e40af;
}

.rsb-info-box code {
  background: white;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 12px;
  color: #1e40af;
}

/* ==================== SUPERSEDINGS STYLES ==================== */
.rsb-supersedings-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rsb-superseding-card {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  transition: all 0.2s ease;
}

.rsb-superseding-card:hover {
  border-color: #da0000;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

.rsb-ss-content {
  flex: 1;
  min-width: 0;
}

.rsb-ss-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.rsb-ss-header strong {
  font-size: 15px;
  color: #1a1a2e;
}

.rsb-ss-overrides {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rsb-ss-override {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: #f9fafb;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
}

.rsb-ss-label {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  min-width: 60px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.rsb-ss-override code {
  background: white;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 13px;
  font-family: "Monaco", "Menlo", "Courier New", monospace;
  color: #da0000;
  font-weight: 600;
  flex: 1;
}

.rsb-ss-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  margin-left: 16px;
}

/* ==================== ASSIGNMENT STYLES ==================== */
.rsb-assignment-group {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.rsb-assignment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.rsb-assignment-value {
  background: #d1fae5;
  color: #065f46;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 13px;
  font-family: "Monaco", "Menlo", "Courier New", monospace;
  font-weight: 600;
  flex: 1;
}

/* ==================== ASSIGNMENT WIZARD STYLES ==================== */
.rsb-wizard-scenarios {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.rsb-wizard-card {
  background: white;
  border: 3px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.rsb-wizard-card:hover {
  border-color: #3b82f6;
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.2);
}

.rsb-wizard-card.selected {
  border-color: #da0000;
  background: #d1fae5;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.rsb-wizard-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.rsb-wizard-card strong {
  display: block;
  font-size: 16px;
  margin-bottom: 8px;
  color: #1a1a2e;
}

.rsb-wizard-card p {
  margin: 0 0 12px 0;
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
}

.rsb-wizard-example {
  background: #f3f4f6;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  color: #64748b;
  font-style: italic;
}

/* ==================== FIXED DOCKING PREVIEW ==================== */
/* Mask matching table */
.rsb-mask-matching {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px;
  margin-top: 24px;
}

.rsb-mask-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.rsb-mask-table th {
  background: #f9fafb;
  padding: 12px;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid #e5e7eb;
}

.rsb-mask-table td {
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.rsb-mask-table code {
  background: #f3f4f6;
  padding: 4px 8px;
  border-radius: 4px;
  font-family: "Monaco", monospace;
  font-size: 12px;
  color: #1a1a2e;
}

.rsb-text-muted {
  color: #94a3b8;
  font-style: italic;
}

/* ==================== CLEAN SCHEMATIC DIAGRAM ==================== */
.rsb-schematic-container {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.rsb-schematic-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e5e7eb;
}

.rsb-schematic-header strong {
  font-size: 16px;
  color: #1a1a2e;
}

.rsb-schematic-header span {
  font-family: "Monaco", monospace;
  font-size: 14px;
  color: #64748b;
}

.rsb-schematic-box {
  position: relative;
  width: 100%;
  height: 400px;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 4px solid #da0000;
  border-radius: 8px;
  margin-bottom: 20px;
}

.rsb-edge {
  position: absolute;
}

.rsb-edge-top {
  top: 0;
  left: 0;
  right: 0;
  height: 0;
}

.rsb-edge-bottom {
  bottom: 0;
  left: 0;
  right: 0;
  height: 0;
}

.rsb-edge-left {
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
}

.rsb-edge-right {
  right: 0;
  top: 0;
  bottom: 0;
  width: 0;
}

.rsb-point-marker {
  position: absolute;
  transform: translate(-50%, -50%);
}

.rsb-edge-top .rsb-point-marker {
  top: -20px;
}

.rsb-edge-bottom .rsb-point-marker {
  bottom: -20px;
  top: auto;
}

.rsb-edge-left .rsb-point-marker {
  left: -20px;
}

.rsb-edge-right .rsb-point-marker {
  right: -20px;
  left: auto;
}

.rsb-marker {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  border: 3px solid white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  cursor: help;
  transition: all 0.2s ease;
}

.rsb-marker:hover {
  transform: scale(1.2);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.rsb-marker-parent {
  background: #3b82f6;
}

.rsb-marker-child {
  background: #3dac43;
}

.rsb-marker-both {
  background: linear-gradient(135deg, #3b82f6 0%, #3dac43 100%);
}

.rsb-schematic-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
}

.rsb-schematic-label > div:first-child {
  font-size: 24px;
  font-weight: 700;
  color: rgba(31, 41, 55, 0.3);
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.rsb-schematic-dims {
  font-size: 16px;
  font-family: "Monaco", monospace;
  color: rgba(107, 114, 128, 0.5);
}

.rsb-schematic-legend {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
}

.rsb-legend-item-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #64748b;
}

.rsb-legend-item-inline .rsb-marker {
  width: 32px;
  height: 32px;
  font-size: 16px;
  flex-shrink: 0;
}

/* ==================== POINTS TABLE ==================== */
.rsb-points-table-container {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.rsb-points-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.rsb-points-table th {
  background: #f9fafb;
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid #e5e7eb;
  color: #1a1a2e;
}

.rsb-points-table td {
  padding: 16px;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
}

.rsb-points-table tbody tr:hover {
  background: #f9fafb;
}

.rsb-row-selfdock {
  background: #fef3c7 !important;
}

.rsb-row-selfdock:hover {
  background: #fef3c7 !important;
}

.rsb-mask-code {
  background: #f3f4f6;
  padding: 4px 8px;
  border-radius: 4px;
  font-family: "Monaco", monospace;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
  margin: 2px;
}

.rsb-mask-parent {
  background: #dbeafe;
  color: #1e40af;
}

.rsb-mask-child {
  background: #d1fae5;
  color: #065f46;
}

.rsb-coords {
  font-family: "Monaco", monospace;
  color: #64748b;
  font-size: 12px;
}

.rsb-details-cell {
  color: #64748b;
  font-size: 13px;
}

/* ==================== MASK MATCHING TABLE ==================== */
.rsb-mask-matching {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
}

.rsb-section-title {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e5e7eb;
}

/* ==================== ASSIGNMENT FORM UI ==================== */
.rsb-assignment-types {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.rsb-assignment-type-btn {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.rsb-assignment-type-btn:hover {
  border-color: #3b82f6;
  background: #eff6ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.rsb-assignment-type-btn.active {
  border-color: #3b82f6;
  background: #dbeafe;
  border-width: 3px;
}

.rsb-type-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.rsb-type-label {
  font-weight: 700;
  font-size: 14px;
  color: #1a1a2e;
  margin-bottom: 4px;
}

.rsb-type-desc {
  font-size: 12px;
  color: #64748b;
}

/* Assignments List */
.rsb-assignments-container {
  margin-bottom: 24px;
}

.rsb-assignments-list {
  display: grid;
  gap: 12px;
}

.rsb-assignment-card {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
}

.rsb-assignment-ondock {
  border-left: 4px solid #f59e0b;
}

.rsb-assignment-onupdate {
  border-left: 4px solid #3b82f6;
}

.rsb-assignment-onupdatesilent {
  border-left: 4px solid #da0000;
}

.rsb-assignment-onundock {
  border-left: 4px solid #da0000;
}

.rsb-assignment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.rsb-assignment-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  background: #f3f4f6;
  color: #64748b;
}

.rsb-assignment-content {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Monaco", monospace;
  font-size: 13px;
}

.rsb-assignment-target {
  background: #fef3c7;
  color: #92400e;
  padding: 6px 10px;
  border-radius: 4px;
  font-weight: 600;
}

.rsb-assignment-arrow {
  color: #3b82f6;
  font-size: 18px;
  font-weight: 700;
}

.rsb-assignment-value {
  background: #dbeafe;
  color: #1e40af;
  padding: 6px 10px;
  border-radius: 4px;
  font-weight: 600;
}

.rsb-btn-remove {
  background: #fee2e2;
  color: #da0000;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
}

.rsb-btn-remove:hover {
  background: #da0000;
  color: white;
}

/* Add Form */
.rsb-add-assignment-form {
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
}

.rsb-form-header {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e5e7eb;
}

.rsb-form-header strong {
  font-size: 16px;
  color: #1a1a2e;
}

.rsb-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.rsb-form-field label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-weight: 600;
  font-size: 14px;
  color: #1a1a2e;
  margin-bottom: 8px;
}

.rsb-field-hint {
  font-weight: 400;
  font-size: 12px;
  color: #64748b;
}

.rsb-input {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  font-family: "Monaco", monospace;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.rsb-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Preview */
.rsb-form-preview {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.rsb-form-preview strong {
  display: block;
  margin-bottom: 12px;
  color: #1a1a2e;
}

.rsb-preview-code {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.rsb-preview-label {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
}

.rsb-preview-target {
  background: #fef3c7;
  color: #92400e;
  padding: 8px 12px;
  border-radius: 6px;
  font-family: "Monaco", monospace;
  font-size: 14px;
  font-weight: 700;
}

.rsb-preview-arrow {
  color: #3b82f6;
  font-size: 24px;
  font-weight: 700;
}

.rsb-preview-value {
  background: #dbeafe;
  color: #1e40af;
  padding: 8px 12px;
  border-radius: 6px;
  font-family: "Monaco", monospace;
  font-size: 14px;
  font-weight: 700;
}

/* Form Actions */
.rsb-form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-bottom: 16px;
}

.rsb-btn {
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.rsb-btn-primary {
  background: #3b82f6;
  color: white;
}

.rsb-btn-primary:hover:not(:disabled) {
  background: #da0000;
}

.rsb-btn-primary:disabled {
  background: #d1d5db;
  cursor: not-allowed;
}

.rsb-btn-secondary {
  background: white;
  color: #1a1a2e;
  border: 2px solid #d1d5db;
}

.rsb-btn-secondary:hover {
  background: #f3f4f6;
}

/* Examples Section */
.rsb-examples-section {
  margin-top: 16px;
}

.rsb-examples-section summary {
  cursor: pointer;
  padding: 12px;
  background: white;
  border-radius: 6px;
  margin-bottom: 12px;
}

.rsb-examples-section summary:hover {
  background: #f9fafb;
}

.rsb-examples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  padding: 12px;
  background: white;
  border-radius: 6px;
}

.rsb-example-btn {
  padding: 12px;
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.rsb-example-btn:hover {
  border-color: #3b82f6;
  background: #eff6ff;
}

.rsb-example-title {
  font-weight: 600;
  font-size: 12px;
  color: #1a1a2e;
  margin-bottom: 6px;
}

.rsb-example-btn code {
  font-size: 11px;
  color: #64748b;
}

/* Empty State */
.rsb-empty-assignments {
  text-align: center;
  padding: 40px 20px;
  background: #f9fafb;
  border-radius: 8px;
  border: 2px dashed #d1d5db;
}

.rsb-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.rsb-empty-assignments p {
  margin: 0 0 4px 0;
  color: #64748b;
  font-weight: 600;
}

.rsb-empty-assignments small {
  color: #94a3b8;
}

/* ==================== DOCKING RANGES ==================== */
.rsb-range-type-indicator {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.rsb-indicator-item {
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  transition: all 0.2s ease;
}

.rsb-indicator-item.active {
  background: #dbeafe;
  border-color: #3b82f6;
  border-width: 3px;
}

.rsb-indicator-icon {
  font-size: 32px;
  margin-bottom: 8px;
  color: #64748b;
}

.rsb-indicator-item.active .rsb-indicator-icon {
  color: #da0000;
}

.rsb-indicator-label {
  font-weight: 700;
  font-size: 14px;
  color: #1a1a2e;
  margin-bottom: 4px;
}

.rsb-indicator-count {
  font-size: 12px;
  color: #64748b;
}

.rsb-ranges-list {
  display: grid;
  gap: 16px;
  margin-bottom: 20px;
}

.rsb-range-card {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  transition: all 0.2s ease;
}

.rsb-range-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.rsb-range-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f3f4f6;
}

.rsb-range-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rsb-range-badge {
  background: #3b82f6;
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
}

.rsb-range-mask {
  font-family: "Monaco", monospace;
  font-size: 14px;
  font-weight: 600;
  color: #1a1a2e;
}

.rsb-range-actions {
  display: flex;
  gap: 8px;
}

.rsb-btn-icon {
  background: #f3f4f6;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s ease;
}

.rsb-btn-icon:hover {
  background: #e5e7eb;
  transform: scale(1.1);
}

.rsb-btn-icon.rsb-btn-danger:hover {
  background: #fee2e2;
  color: #da0000;
}

.rsb-range-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.rsb-range-detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rsb-detail-label {
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
}

.rsb-range-detail-item code {
  background: #f3f4f6;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-family: "Monaco", monospace;
}

.rsb-range-detail-item strong {
  color: #3b82f6;
  font-size: 18px;
}

/* Range Editor Modal */
.rsb-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.rsb-modal-content {
  background: white;
  border-radius: 16px;
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.rsb-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 2px solid #e5e7eb;
}

.rsb-modal-header h3 {
  margin: 0;
  font-size: 20px;
  color: #1a1a2e;
}

.rsb-btn-close {
  background: none;
  border: none;
  font-size: 32px;
  color: #94a3b8;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 32px;
  height: 32px;
}

.rsb-btn-close:hover {
  color: #1a1a2e;
}

.rsb-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #94a3b8;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  border-radius: 4px;
  transition: color 150ms ease, background 150ms ease;
}
.rsb-modal-close:hover {
  color: #1a1a2e;
  background: #f7f7f7;
}

.rsb-modal-body {
  padding: 24px;
  overflow-y: auto;
}

.rsb-modal-footer {
  padding: 16px 24px;
  border-top: 2px solid #e5e7eb;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.rsb-form-section h4 {
  margin: 0 0 12px 0;
  font-size: 16px;
  color: #1a1a2e;
}

.rsb-section-hint {
  font-size: 13px;
  color: #64748b;
  margin: 0 0 16px 0;
}

.rsb-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.rsb-form-row-3 {
  grid-template-columns: repeat(3, 1fr);
}

.rsb-required {
  color: #da0000;
}

.rsb-range-preview-box {
  background: #eff6ff;
  border: 2px solid #3b82f6;
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
}

.rsb-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.rsb-preview-type-badge {
  background: #3b82f6;
  color: white;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 700;
}

.rsb-preview-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.rsb-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rsb-stat-label {
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
}

.rsb-stat-value {
  font-size: 24px;
  color: #da0000;
}

.rsb-warning-box {
  background: #fef3c7;
  border: 2px solid #f59e0b;
  border-radius: 8px;
  padding: 12px;
  margin-top: 12px;
  font-size: 13px;
  color: #92400e;
}

.rsb-advanced-section {
  margin-top: 24px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
}

.rsb-advanced-section summary {
  cursor: pointer;
  font-weight: 600;
  color: #1a1a2e;
}

.rsb-advanced-section summary:hover {
  color: #1a1a2e;
}

.rsb-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #d1d5db;
  border-radius: 6px;
  font-family: "Monaco", monospace;
  font-size: 13px;
  resize: vertical;
}

.rsb-textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.rsb-examples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.rsb-example-icon {
  font-size: 32px;
  margin-bottom: 8px;
  color: #3b82f6;
}

.rsb-example-title {
  font-weight: 600;
  font-size: 13px;
  color: #1a1a2e;
  margin-bottom: 4px;
}

.rsb-example-btn small {
  font-size: 11px;
  color: #64748b;
}

.roomle-editor-wrapper {
  border: 2px solid #1a1a2e;
  border-radius: 8px;
  overflow: hidden;
}

.roomle-editor-wrapper:focus-within {
  border-color: #007acc;
  box-shadow: 0 0 0 3px rgba(0, 122, 204, 0.1);
}

.roomle-editor-container {
  border: 2px solid #1a1a2e;
  border-radius: 8px;
  overflow: hidden;
}

.roomle-editor-container:focus-within {
  border-color: #007acc;
  box-shadow: 0 0 0 3px rgba(0, 122, 204, 0.1);
}

.roomle-editor-wrapper {
  border: 2px solid #1a1a2e;
  border-radius: 8px;
  overflow: hidden;
}

.roomle-editor-wrapper:focus-within {
  border-color: #007acc;
  box-shadow: 0 0 0 3px rgba(0, 122, 204, 0.1);
}

.roomle-editor-toolbar {
  background: #252526;
  padding: 6px 12px;
  border-bottom: 1px solid #1a1a2e;
  display: flex;
  gap: 8px;
}

.roomle-editor-toolbar .rsb-btn-icon {
  background: #1a1a2e;
  color: #d1d5db;
  border: none;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.roomle-editor-toolbar .rsb-btn-icon:hover {
  background: #64748b;
}

.roomle-editor-container {
  width: 100%;
}

/* ── Mode Toggle ───────────────────────────────────────── */
.rsb-mode-toggle {
  display: inline-flex;
  border: 1px solid #64748b;
  border-radius: 6px;
  overflow: hidden;
}

.rsb-mode-btn {
  background: transparent;
  color: #d1d5db;
  border: none;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.rsb-mode-btn:hover {
  background: #1a1a2e;
}
.rsb-mode-btn--active {
  background: #3b82f6;
  color: #fff;
  font-weight: 600;
}

/* ── Visual Canvas Container ───────────────────────────── */
.rsb-visual-canvas-container {
  margin: 8px 0;
  border: 1px solid #1a1a2e;
  border-radius: 8px;
  overflow: hidden;
  /* Fixed height so the 3D viewport is always visible without scrolling */
  height: 600px;
  min-height: 480px;
  max-height: 75vh;
}

/* ── Compact Geometry List (visual mode) ───────────────── */
.rsb-geometry-list--compact {
  max-height: 180px;
  overflow-y: auto;
  margin-top: 6px;
}

.rsb-geometry-item--compact {
  display: flex;
  flex-direction: column;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.rsb-geometry-item--compact:hover {
  background: #1a1a2e;
}

.rsb-geometry-item--selected {
  background: #1a1a2e;
  border-color: #3b82f6;
}

.rsb-geometry-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rsb-geometry-item-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #e5e7eb;
}

.rsb-geometry-item-actions {
  display: flex;
  gap: 2px;
}

.rsb-geo-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.rsb-empty-state--compact {
  padding: 12px;
  text-align: center;
  font-size: 12px;
  color: #888;
}

/* ── Geometry Tree View (group-aware) ──────────────────── */
.rsb-geometry-tree {
  max-height: 240px;
  overflow-y: auto;
  margin-top: 6px;
  font-size: 12px;
}

.rsb-geometry-tree__toolbar {
  display: flex;
  gap: 6px;
  padding: 4px 6px;
  border-bottom: 1px solid #1a1a2e;
  margin-bottom: 4px;
}

.rsb-tree-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
  min-height: 28px;
  /* Indent based on data-depth attribute */
}
.rsb-tree-row[data-depth="0"] {
  padding-left: 8px;
}
.rsb-tree-row[data-depth="1"] {
  padding-left: 28px;
}
.rsb-tree-row[data-depth="2"] {
  padding-left: 48px;
}
.rsb-tree-row[data-depth="3"] {
  padding-left: 68px;
}
.rsb-tree-row[data-depth="4"] {
  padding-left: 88px;
}
.rsb-tree-row[data-depth="5"] {
  padding-left: 108px;
}

.rsb-tree-row--group {
  color: #d1d5db;
  font-weight: 600;
}
.rsb-tree-row--group:hover {
  background: #1a1a2e;
}

.rsb-tree-row--shape {
  color: #e5e7eb;
}
.rsb-tree-row--shape:hover {
  background: #1a1a2e;
}

.rsb-tree-row--selected {
  background: #1a1a2e;
  border-color: #3b82f6;
}

.rsb-tree-row--in-selection:not(.rsb-tree-row--selected) {
  background: #1a1a2e;
  border-color: #3b82f6;
}

.rsb-tree-selection-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 10px;
  background: #1e40af;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.rsb-tree-toggle {
  background: none;
  border: none;
  color: #888;
  cursor: pointer;
  font-size: 10px;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
}
.rsb-tree-toggle:hover {
  color: #fff;
}

.rsb-tree-group-icon {
  flex-shrink: 0;
}

.rsb-tree-group-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rsb-tree-child-count {
  color: #666;
  font-size: 11px;
  font-weight: 400;
}

.rsb-tree-loop-badge {
  font-size: 11px;
  margin-left: 4px;
  opacity: 0.85;
  cursor: default;
}

/* ── Inline Rename Input ─────────────────────────────── */
.rsb-tree-rename-input {
  flex: 1;
  min-width: 0;
  padding: 2px 6px;
  border: 1px solid #64748b;
  border-radius: 3px;
  background: #1a1a2e;
  color: #eee;
  font-size: 12px;
  outline: none;
}
.rsb-tree-rename-input:focus {
  border-color: #94a3b8;
  box-shadow: 0 0 0 1px rgba(122, 155, 181, 0.3);
}

/* ── Active button indicator ─────────────────────────── */
.rsb-btn--active {
  background: rgba(122, 155, 181, 0.25) !important;
  color: #3b82f6 !important;
  border-radius: 3px;
}

/* ── Group Loop Editor Panel ─────────────────────────── */
.rsb-group-loop-editor {
  background: #1e2228;
  border: 1px solid #1a1a2e;
  border-radius: 6px;
  margin: 2px 0 4px calc(var(--depth, 0) * 16px + 8px);
  padding: 10px 12px;
  animation: rsb-slide-down 0.15s ease-out;
}
.rsb-group-loop-editor[data-depth="0"] {
  margin-left: 8px;
}
.rsb-group-loop-editor[data-depth="1"] {
  margin-left: 24px;
}
.rsb-group-loop-editor[data-depth="2"] {
  margin-left: 40px;
}
.rsb-group-loop-editor[data-depth="3"] {
  margin-left: 56px;
}

@keyframes rsb-slide-down {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.rsb-group-loop-editor__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.rsb-group-loop-editor__title {
  font-size: 12px;
  font-weight: 600;
  color: #d1d5db;
}

.rsb-group-loop-editor__close {
  background: none;
  border: none;
  color: #888;
  cursor: pointer;
  font-size: 14px;
  padding: 2px 4px;
  border-radius: 3px;
}
.rsb-group-loop-editor__close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #d1d5db;
}

.rsb-group-loop-editor__active-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(122, 155, 181, 0.12);
  border: 1px solid rgba(122, 155, 181, 0.25);
  border-radius: 4px;
  padding: 6px 8px;
  margin-bottom: 8px;
  font-size: 11px;
  color: #3b82f6;
}

.rsb-group-loop-editor__remove-btn {
  background: none;
  border: 1px solid rgba(200, 80, 80, 0.4);
  color: #da0000;
  cursor: pointer;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 3px;
  white-space: nowrap;
}
.rsb-group-loop-editor__remove-btn:hover {
  background: rgba(200, 80, 80, 0.15);
  border-color: rgba(200, 80, 80, 0.6);
}

.rsb-group-loop-editor__field {
  margin-bottom: 6px;
}

.rsb-group-loop-editor__field--half {
  flex: 1;
  min-width: 0;
}

.rsb-group-loop-editor__row {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}

.rsb-group-loop-editor__label {
  display: block;
  font-size: 10px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 3px;
}

.rsb-group-loop-editor__input {
  width: 100%;
  padding: 4px 8px;
  border: 1px solid #1a1a2e;
  border-radius: 4px;
  background: #1a1a2e;
  color: #e5e7eb;
  font-size: 12px;
  outline: none;
  box-sizing: border-box;
}
.rsb-group-loop-editor__input:focus {
  border-color: #94a3b8;
}
.rsb-group-loop-editor__input::placeholder {
  color: #64748b;
}

.rsb-group-loop-editor__axis-btns {
  display: flex;
  gap: 4px;
}

.rsb-group-loop-editor__axis-btn {
  flex: 1;
  padding: 4px 8px;
  border: 1px solid #1a1a2e;
  border-radius: 4px;
  background: #1a1a2e;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition: all 0.12s;
}
.rsb-group-loop-editor__axis-btn:hover {
  background: #1a1a2e;
  border-color: #64748b;
  color: #d1d5db;
}
.rsb-group-loop-editor__axis-btn--active {
  background: rgba(122, 155, 181, 0.2);
  border-color: #94a3b8;
  color: #3b82f6;
}

.rsb-group-loop-editor__checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #94a3b8;
  margin-bottom: 8px;
  cursor: pointer;
}
.rsb-group-loop-editor__checkbox input[type=checkbox] {
  accent-color: #94a3b8;
}

.rsb-group-loop-editor__actions {
  display: flex;
  gap: 6px;
}

.rsb-group-loop-editor__apply-btn {
  flex: 1;
  padding: 5px 10px;
  border: none;
  border-radius: 4px;
  background: #94a3b8;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s;
}
.rsb-group-loop-editor__apply-btn:hover {
  background: #3b82f6;
}

.rsb-group-loop-editor__cancel-btn {
  padding: 5px 10px;
  border: 1px solid #1a1a2e;
  border-radius: 4px;
  background: none;
  color: #94a3b8;
  font-size: 11px;
  cursor: pointer;
}
.rsb-group-loop-editor__cancel-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #d1d5db;
}

/* ═══════ Condition Badge (tree) ═══════ */
.rsb-tree-condition-badge {
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 8px;
  background: rgba(147, 51, 234, 0.2);
  color: #da0000;
  border: 1px solid rgba(147, 51, 234, 0.35);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
  flex-shrink: 0;
}

/* ═══════ Boolean Operation Styles ═══════ */
.rsb-tree-row--subtract {
  border-left: 3px solid #da0000;
  background: rgba(231, 76, 60, 0.06);
}

.rsb-tree-row--subtract.rsb-tree-row--selected {
  background: rgba(231, 76, 60, 0.15);
  border-color: #da0000;
}

.rsb-tree-bool-badge {
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

.rsb-tree-bool-badge--sub {
  background: rgba(231, 76, 60, 0.2);
  color: #da0000;
  border: 1px solid rgba(231, 76, 60, 0.35);
}

.rsb-geo-color-dot--sub {
  border: 2px dashed rgba(231, 76, 60, 0.7);
  box-sizing: border-box;
}

.rsb-btn--danger {
  background: rgba(231, 76, 60, 0.15) !important;
  border-color: rgba(231, 76, 60, 0.5) !important;
  color: #da0000 !important;
}

.rsb-btn--danger:hover {
  background: rgba(231, 76, 60, 0.25) !important;
  border-color: #da0000 !important;
}

/* ═══════ Formula Badge (tree) ═══════ */
.rsb-tree-formula-badge {
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.2);
  color: #da0000;
  border: 1px solid rgba(99, 102, 241, 0.35);
  white-space: nowrap;
  flex-shrink: 0;
  cursor: help;
}

/* ═══════ Inline Formula Bindings Editor ═══════ */
.rsb-formula-editor {
  background: #fff;
  border: 2px solid #da0000;
  border-radius: 4px;
  padding: 0;
  margin: 4px 0 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  animation: rsb-slide-down 0.15s ease-out;
  overflow: hidden;
}
.rsb-formula-editor[data-depth="0"] {
  margin-left: 8px;
}
.rsb-formula-editor[data-depth="1"] {
  margin-left: 28px;
}
.rsb-formula-editor[data-depth="2"] {
  margin-left: 48px;
}
.rsb-formula-editor[data-depth="3"] {
  margin-left: 68px;
}

.rsb-formula-editor__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #da0000;
  color: #fff;
}

.rsb-formula-editor__title {
  font-size: 0.8rem;
  font-weight: 600;
}

.rsb-formula-editor__close {
  background: none;
  border: none;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1;
  opacity: 0.8;
  transition: opacity 150ms ease;
}
.rsb-formula-editor__close:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.2);
}

.rsb-formula-editor__fields {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rsb-formula-editor__row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rsb-formula-editor__label {
  font-size: 0.7rem;
  font-weight: 500;
  color: #64748b;
  min-width: 70px;
  text-align: right;
  flex-shrink: 0;
}

.rsb-formula-editor__input-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.rsb-formula-editor__input {
  flex: 1;
  padding: 5px 8px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  font-size: 0.7rem;
  font-family: monospace;
  background: #fff;
  color: #1a1a2e;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.rsb-formula-editor__input:focus {
  outline: none;
  border-color: #da0000;
  box-shadow: 0 0 0 2px rgba(218, 0, 0, 0.15);
}
.rsb-formula-editor__input::placeholder {
  color: #94a3b8;
}

.rsb-formula-editor__input--expr {
  border-color: #da0000;
  background: rgba(218, 0, 0, 0.04);
  color: #da0000;
  font-weight: 500;
}

.rsb-formula-editor__clear-btn {
  background: none;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 11px;
  color: #94a3b8;
  cursor: pointer;
  line-height: 1;
  transition: all 150ms ease;
}
.rsb-formula-editor__clear-btn:hover {
  color: #da0000;
  border-color: #da0000;
  background: #fef2f2;
}

.rsb-formula-editor__params {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 6px 12px 8px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
}

.rsb-formula-editor__params-label {
  font-size: 0.7rem;
  color: #94a3b8;
  margin-right: 4px;
}

.rsb-formula-editor__param-chip {
  display: inline-block;
  padding: 2px 8px;
  font-size: 10px;
  font-family: monospace;
  background: rgba(218, 0, 0, 0.08);
  color: #da0000;
  border: 1px solid rgba(218, 0, 0, 0.2);
  border-radius: 999px;
  cursor: pointer;
  transition: all 150ms ease;
  user-select: none;
}
.rsb-formula-editor__param-chip:hover {
  background: rgba(218, 0, 0, 0.15);
  border-color: #da0000;
}

.rsb-formula-editor__actions {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
  justify-content: flex-end;
}

.rsb-formula-editor__apply-btn {
  padding: 5px 14px;
  font-size: 0.7rem;
  font-weight: 500;
  background: #da0000;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 150ms ease;
}
.rsb-formula-editor__apply-btn:hover {
  background: rgb(177.2, 0, 0);
}

.rsb-formula-editor__cancel-btn {
  padding: 5px 14px;
  font-size: 0.7rem;
  font-weight: 500;
  background: #fff;
  color: #64748b;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  cursor: pointer;
  transition: all 150ms ease;
}
.rsb-formula-editor__cancel-btn:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
  color: #1a1a2e;
}

/* ═══════ Inline Condition Editor ═══════ */
.rsb-condition-editor {
  background: #1a1a2e;
  border: 1px solid rgba(147, 51, 234, 0.35);
  border-radius: 6px;
  padding: 8px 10px;
  margin: 2px 0 4px;
  animation: rsb-slide-down 0.15s ease-out;
}
.rsb-condition-editor[data-depth="0"] {
  margin-left: 8px;
}
.rsb-condition-editor[data-depth="1"] {
  margin-left: 28px;
}
.rsb-condition-editor[data-depth="2"] {
  margin-left: 48px;
}
.rsb-condition-editor[data-depth="3"] {
  margin-left: 68px;
}

.rsb-condition-editor__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.rsb-condition-editor__title {
  font-size: 11px;
  font-weight: 600;
  color: #da0000;
}

.rsb-condition-editor__close {
  background: none;
  border: none;
  color: #888;
  cursor: pointer;
  padding: 2px 5px;
  font-size: 13px;
  border-radius: 3px;
}
.rsb-condition-editor__close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #d1d5db;
}

.rsb-condition-editor__active-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(147, 51, 234, 0.15);
  border: 1px solid rgba(147, 51, 234, 0.3);
  font-size: 10px;
  color: #da0000;
  margin-bottom: 8px;
}
.rsb-condition-editor__active-badge span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rsb-condition-editor__remove-btn {
  background: none;
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 4px;
  color: #da0000;
  font-size: 9px;
  padding: 2px 6px;
  cursor: pointer;
  white-space: nowrap;
}
.rsb-condition-editor__remove-btn:hover {
  background: rgba(239, 68, 68, 0.15);
}

.rsb-condition-editor__field {
  margin-bottom: 6px;
}

.rsb-condition-editor__label {
  display: block;
  font-size: 10px;
  color: #888;
  margin-bottom: 3px;
}
.rsb-condition-editor__label code {
  background: rgba(147, 51, 234, 0.15);
  color: #da0000;
  padding: 0 3px;
  border-radius: 2px;
  font-size: 10px;
}

.rsb-condition-editor__input {
  width: 100%;
  padding: 5px 8px;
  border: 1px solid #1a1a2e;
  border-radius: 4px;
  background: #0a0a14;
  color: #e5e7eb;
  font-size: 12px;
  font-family: "JetBrains Mono", "Fira Code", monospace;
}
.rsb-condition-editor__input:focus {
  outline: none;
  border-color: #da0000;
  box-shadow: 0 0 0 2px rgba(147, 51, 234, 0.2);
}

.rsb-condition-editor__hint {
  font-size: 9px;
  color: #666;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.rsb-condition-editor__param-chip {
  display: inline-block;
  background: rgba(74, 144, 217, 0.15);
  color: #3b82f6;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 9px;
  font-family: "JetBrains Mono", "Fira Code", monospace;
  cursor: pointer;
}
.rsb-condition-editor__param-chip:hover {
  background: rgba(74, 144, 217, 0.3);
}

.rsb-condition-editor__actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.rsb-condition-editor__apply-btn {
  padding: 5px 12px;
  border: none;
  border-radius: 4px;
  background: #da0000;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.rsb-condition-editor__apply-btn:hover {
  background: #da0000;
}

.rsb-condition-editor__cancel-btn {
  padding: 5px 10px;
  border: 1px solid #1a1a2e;
  border-radius: 4px;
  background: none;
  color: #94a3b8;
  font-size: 11px;
  cursor: pointer;
}
.rsb-condition-editor__cancel-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #d1d5db;
}

/* ═══════ Variant Wizard Modal ═══════ */
.rsb-modal--variant-wizard {
  max-width: 620px;
}

.rsb-variant-wizard__intro {
  font-size: 12px;
  color: #888;
  margin-bottom: 12px;
  line-height: 1.5;
  padding: 8px 12px;
  background: rgba(147, 51, 234, 0.08);
  border: 1px solid rgba(147, 51, 234, 0.2);
  border-radius: 6px;
}

.rsb-variant-wizard__new-param {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rsb-variant-wizard__new-param-row {
  display: flex;
  gap: 8px;
}
.rsb-variant-wizard__new-param-row .rsb-form-input--sm {
  flex: 1;
}

.rsb-variant-wizard__existing-param {
  display: flex;
  align-items: center;
  gap: 8px;
}
.rsb-variant-wizard__existing-param .rsb-form-select {
  flex: 1;
}

.rsb-variant-wizard__mappings {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}

.rsb-variant-wizard__mapping-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid #1a1a2e;
  border-radius: 4px;
}
.rsb-variant-wizard__mapping-row .rsb-form-select--sm {
  flex: 2;
  min-width: 0;
}
.rsb-variant-wizard__mapping-row .rsb-form-input--sm {
  flex: 1;
  min-width: 0;
}

.rsb-variant-wizard__arrow {
  color: #da0000;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}

.rsb-variant-wizard__preview {
  margin-top: 12px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid #1a1a2e;
  border-radius: 4px;
}

.rsb-variant-wizard__preview-title {
  font-size: 10px;
  color: #888;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.rsb-variant-wizard__preview-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  font-size: 11px;
}
.rsb-variant-wizard__preview-item code {
  background: rgba(147, 51, 234, 0.12);
  color: #da0000;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-family: "JetBrains Mono", "Fira Code", monospace;
}

.rsb-variant-wizard__preview-shape {
  color: #d1d5db;
  font-weight: 500;
  min-width: 80px;
}

/* Small form input variant */
.rsb-form-input--sm {
  padding: 4px 8px;
  font-size: 12px;
}

/* Small form select variant */
.rsb-form-select--sm {
  padding: 4px 8px;
  font-size: 12px;
}

/* Extra-small button */
.rsb-btn-xs {
  padding: 3px 8px;
  font-size: 10px;
  border-radius: 3px;
}

.rsb-tree-shape-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #94a3b8;
}

.rsb-tree-row-actions {
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.12s;
  margin-left: auto;
  flex-shrink: 0;
}
.rsb-tree-row:hover .rsb-tree-row-actions {
  opacity: 1;
}

/* ── Group Picker Dropdown ─────────────────────────────── */
.rsb-group-picker-wrapper {
  position: relative;
}

.rsb-group-picker {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 100;
  min-width: 220px;
  margin-top: 4px;
  background: #1a1a2e;
  border: 1px solid #1a1a2e;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  padding: 4px 0;
  animation: groupPickerFadeIn 0.15s ease-out;
}
@keyframes groupPickerFadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.rsb-group-picker__header {
  padding: 6px 12px;
  font-size: 11px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.rsb-group-picker__item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 12px;
  background: none;
  border: none;
  color: #e5e7eb;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  transition: background 0.1s;
}
.rsb-group-picker__item:hover {
  background: #1a1a2e;
}

.rsb-group-picker__item--create {
  color: #3b82f6;
}
.rsb-group-picker__item--create:hover {
  background: #1a1a2e;
}

.rsb-group-picker__icon {
  flex-shrink: 0;
  font-size: 14px;
}

.rsb-group-picker__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rsb-group-picker__divider {
  height: 1px;
  background: #1a1a2e;
  margin: 4px 0;
}

/* ============================================================
   DOCKING MAP — OVERVIEW CHART
   ============================================================ */
/* Stats Dashboard */
.rsb-overview-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.rsb-overview-stat {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rsb-overview-stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.rsb-overview-stat-value {
  font-size: 28px;
  font-weight: 800;
  color: #1a1a2e;
  line-height: 1;
  margin-bottom: 4px;
}

.rsb-overview-stat-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
}

.rsb-overview-stat-hint {
  font-size: 10px;
  color: #94a3b8;
  margin-top: 2px;
  line-height: 1.3;
}

/* Component Box Section */
.rsb-overview-box-section {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 24px;
}

.rsb-overview-box-title {
  font-weight: 800;
  font-size: 15px;
  color: #1a1a2e;
  margin-bottom: 4px;
}

.rsb-overview-box-subtitle {
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 24px;
  line-height: 1.4;
}

.rsb-overview-box-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
}

/* Isometric 3D Box */
.rsb-isobox {
  position: relative;
  width: 280px;
  height: 220px;
  perspective: 600px;
}

.rsb-isobox-face {
  position: absolute;
  border: 2px solid #1a1a2e;
  transition: opacity 0.2s ease;
}

.rsb-isobox-top {
  width: 200px;
  height: 80px;
  background: linear-gradient(135deg, #da0000 0%, #da0000 100%);
  border-color: #da0000;
  transform: skewX(-30deg);
  left: 80px;
  top: 0;
  border-radius: 4px 4px 0 0;
  opacity: 0.6;
}

.rsb-isobox-front {
  width: 200px;
  height: 120px;
  background: linear-gradient(180deg, #da0000 0%, #da0000 100%);
  border-color: #da0000;
  left: 40px;
  top: 60px;
  border-radius: 0 0 4px 4px;
  position: relative;
}

.rsb-isobox-side {
  width: 80px;
  height: 120px;
  background: linear-gradient(135deg, #da0000 0%, #da0000 100%);
  border-color: #da0000;
  transform: skewY(-30deg);
  left: 200px;
  top: 20px;
  border-radius: 0 4px 4px 0;
  opacity: 0.7;
}

.rsb-isobox-face-label {
  position: absolute;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #da0000;
  opacity: 0.5;
  pointer-events: none;
}

.rsb-isobox-top .rsb-isobox-face-label {
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
}

.rsb-isobox-front .rsb-isobox-face-label {
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
}

.rsb-isobox-side .rsb-isobox-face-label {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Dots on the isometric box (absolute within front face) */
.rsb-isobox-dot {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 2.5px solid white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.1);
  z-index: 2;
  cursor: default;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rsb-isobox-dot:hover {
  transform: translate(-50%, -50%) scale(1.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35), 0 0 0 2px rgba(0, 0, 0, 0.15);
  z-index: 10;
}

.rsb-isobox-dot-label {
  font-size: 9px;
  font-weight: 900;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  line-height: 1;
}

/* Dot type outlines */
.rsb-isobox-dot--parent {
  border-style: solid;
}

.rsb-isobox-dot--child {
  border-style: dashed;
}

.rsb-isobox-dot--sibling {
  border-style: dotted;
  border-width: 2px;
}

/* Legend dots (inline, not positioned absolutely) */
.rsb-isobox-dot--legend {
  position: static;
  display: inline-flex;
  transform: none;
  background: #64748b !important;
  flex-shrink: 0;
}

.rsb-isobox-dot--legend:hover {
  transform: none;
}

/* Axis labels */
.rsb-isobox-axes {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 4px;
}

.rsb-isobox-axis {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 3px 8px;
  border-radius: 4px;
  background: #f8fafc;
  color: #64748b;
}

.rsb-isobox-axis-x {
  color: #da0000;
  background: #fef2f2;
}

.rsb-isobox-axis-z {
  color: #3dac43;
  background: #f0fdf4;
}

.rsb-isobox-axis-y {
  color: #3b82f6;
  background: #eff6ff;
}

/* Point type legend below the box */
.rsb-overview-box-legend {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 12px 16px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.rsb-overview-box-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}

/* Connection Flow Section */
.rsb-overview-flow {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 24px;
}

.rsb-overview-flow-title {
  font-weight: 800;
  font-size: 15px;
  color: #1a1a2e;
  margin-bottom: 4px;
}

.rsb-overview-flow-subtitle {
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 16px;
  line-height: 1.4;
}

.rsb-overview-flow-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rsb-overview-flow-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  transition: background 0.15s ease;
}

.rsb-overview-flow-row:hover {
  background: #f8fafc;
}

.rsb-overview-flow-mask {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 120px;
  font-family: "Monaco", "Menlo", "Courier New", monospace;
  font-size: 13px;
}

.rsb-overview-flow-detail {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.rsb-overview-flow-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
}

.rsb-overview-flow-tag--parent {
  background: #dbeafe;
  color: #1e40af;
}

.rsb-overview-flow-tag--child {
  background: #eff6ff;
  color: #da0000;
}

.rsb-overview-flow-tag--sibling {
  background: #dbeafe;
  color: #3b82f6;
}

.rsb-overview-flow-status {
  font-size: 11px;
  font-weight: 600;
  margin-left: 4px;
}

.rsb-overview-flow-status--matched {
  color: #3dac43;
}

.rsb-overview-flow-status--sibling {
  color: #3b82f6;
}

.rsb-overview-flow-status--partial {
  color: #92400e;
}

/* Possible Children */
.rsb-overview-children {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 24px;
}

.rsb-overview-children-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rsb-overview-child-card {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 12px;
}

.rsb-overview-child-card code {
  font-weight: 600;
  color: #1a1a2e;
  word-break: break-all;
}

/* Point Details — Plain English */
.rsb-overview-details {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 24px;
}

.rsb-overview-detail-group {
  margin-bottom: 20px;
}

.rsb-overview-detail-group:last-child {
  margin-bottom: 0;
}

.rsb-overview-detail-group-title {
  font-weight: 700;
  font-size: 14px;
  color: #1a1a2e;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
}

.rsb-overview-detail-row {
  padding: 12px 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: 8px;
  transition: box-shadow 0.15s ease;
}

.rsb-overview-detail-row:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.rsb-overview-detail-row:last-child {
  margin-bottom: 0;
}

.rsb-overview-detail-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.rsb-overview-face-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: #eff6ff;
  border: 1px solid #da0000;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #da0000;
}

.rsb-overview-detail-summary {
  margin: 0;
  padding: 0 0 0 20px;
  list-style: none;
}

.rsb-overview-detail-summary li {
  position: relative;
  font-size: 12px;
  color: #64748b;
  line-height: 1.6;
  padding-left: 4px;
}

.rsb-overview-detail-summary li::before {
  content: "→";
  position: absolute;
  left: -16px;
  color: #94a3b8;
}

/* ============================================================
   MINI-BOX — Per-card position visualizer
   ============================================================ */
.rsb-minibox-container {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: 12px;
  cursor: default;
}

.rsb-minibox {
  position: relative;
  width: 56px;
  height: 48px;
  flex-shrink: 0;
  perspective: 300px;
}

.rsb-minibox-face {
  position: absolute;
  border: 1.5px solid #da0000;
}

.rsb-minibox-top {
  width: 36px;
  height: 14px;
  background: #da0000;
  transform: skewX(-30deg);
  left: 16px;
  top: 0;
  border-radius: 2px 2px 0 0;
  opacity: 0.5;
}

.rsb-minibox-front {
  width: 36px;
  height: 28px;
  background: #da0000;
  left: 6px;
  top: 12px;
  border-radius: 0 0 2px 2px;
  position: relative;
}

.rsb-minibox-side {
  width: 14px;
  height: 28px;
  background: #da0000;
  transform: skewY(-30deg);
  left: 36px;
  top: 5px;
  border-radius: 0 2px 2px 0;
  opacity: 0.6;
}

.rsb-minibox-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid white;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  z-index: 2;
}

.rsb-minibox-dot--parent {
  background: #3b82f6;
}

.rsb-minibox-dot--child {
  background: #da0000;
  border-style: dashed;
}

.rsb-minibox-label {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  white-space: nowrap;
}

/* Responsive */
@media (max-width: 900px) {
  .rsb-overview-stats {
    grid-template-columns: repeat(3, 1fr);
  }
  .rsb-isobox {
    width: 220px;
    height: 180px;
  }
  .rsb-overview-flow-row {
    flex-direction: column;
    align-items: flex-start;
  }
}
/* ═══════ TOAST NOTIFICATIONS ═══════ */
.rsb-toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 10100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: 400px;
}

.rsb-toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 10px;
  background: #1a1a2e;
  border: 1px solid rgba(99, 102, 241, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.1);
  pointer-events: auto;
  animation: rsb-toast-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(12px);
  min-width: 300px;
}
.rsb-toast--success {
  border-color: rgba(34, 197, 94, 0.3);
}
.rsb-toast--warning {
  border-color: rgba(234, 179, 8, 0.3);
}
.rsb-toast--error {
  border-color: rgba(239, 68, 68, 0.3);
}
.rsb-toast--info {
  border-color: rgba(99, 102, 241, 0.3);
}

@keyframes rsb-toast-in {
  from {
    opacity: 0;
    transform: translateX(100%) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}
.rsb-toast-icon {
  flex-shrink: 0;
  font-size: 18px;
  line-height: 1;
  margin-top: 1px;
}

.rsb-toast-content {
  flex: 1;
  min-width: 0;
}

.rsb-toast-title {
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.3;
  margin-bottom: 4px;
}

.rsb-toast-message {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.45;
  white-space: pre-line;
}

.rsb-toast-dismiss {
  flex-shrink: 0;
  background: none;
  border: none;
  color: #64748b;
  font-size: 14px;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.rsb-toast-dismiss:hover {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.08);
}

/* ═══════ SMART DIALOG (confirm replacement) ═══════ */
.rsb-smart-dialog-overlay {
  backdrop-filter: blur(4px);
}

.rsb-smart-dialog {
  background: #1a1a2e;
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 0, 0, 0.15);
  max-width: 420px;
  width: 90%;
  animation: rsb-dialog-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

@keyframes rsb-dialog-in {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
.rsb-smart-dialog-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px 0;
}

.rsb-smart-dialog-icon {
  font-size: 22px;
  line-height: 1;
}

.rsb-smart-dialog-title {
  font-size: 15px;
  font-weight: 700;
  color: #f8fafc;
  margin: 0;
}

.rsb-smart-dialog-body {
  padding: 12px 20px 4px;
}

.rsb-smart-dialog-message {
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.55;
  margin: 0;
  white-space: pre-line;
}

.rsb-smart-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 20px 18px;
}

.rsb-smart-dialog-btn {
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.15s, transform 0.1s;
}
.rsb-smart-dialog-btn:active {
  transform: scale(0.97);
}
.rsb-smart-dialog-btn--cancel {
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
}
.rsb-smart-dialog-btn--cancel:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
}
.rsb-smart-dialog-btn--confirm {
  background: #da0000;
  color: #fff;
}
.rsb-smart-dialog-btn--confirm:hover {
  background: #da0000;
}

.rsb-ai-config-panel {
  padding: 16px;
  background: rgba(218, 0, 0, 0.05);
  border: 1px solid rgba(218, 0, 0, 0.2);
  border-radius: 8px;
  margin-bottom: 16px;
}
.rsb-ai-config-panel__title {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.rsb-ai-intents {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rsb-ai-intent-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  border: 1px solid #888;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: all 0.4s;
}
.rsb-ai-intent-btn:hover {
  border-color: rgba(218, 0, 0, 0.4);
  background: rgba(218, 0, 0, 0.05);
}
.rsb-ai-intent-btn--active {
  border-color: #da0000;
  background: rgba(218, 0, 0, 0.1);
  box-shadow: 0 0 0 1px rgba(218, 0, 0, 0.3);
}
.rsb-ai-intent-btn__label {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 2px;
  color: #363636;
}
.rsb-ai-intent-btn__desc {
  font-size: 0.8rem;
  color: #bdbdbd;
  line-height: 1.4;
}

.rsb-ai-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(218, 0, 0, 0.2);
  border-top-color: #da0000;
  border-radius: 50%;
  margin: 0 auto;
  animation: rsb-spin 0.8s linear infinite;
}

@keyframes rsb-spin {
  to {
    transform: rotate(360deg);
  }
}
.rsb-ai-review {
  margin-top: 8px;
}

.rsb-ai-proposal {
  padding: 10px 12px;
  border: 1px solid #888;
  border-radius: 6px;
  margin-bottom: 8px;
  transition: all 0.4s;
}
.rsb-ai-proposal--accepted {
  border-color: rgba(61, 172, 67, 0.3);
  background: rgba(61, 172, 67, 0.04);
}
.rsb-ai-proposal--rejected {
  border-color: rgba(218, 0, 0, 0.2);
  background: rgba(218, 0, 0, 0.02);
  opacity: 0.6;
}
.rsb-ai-proposal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.rsb-ai-proposal__toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 12px;
}
.rsb-ai-proposal__toggle input[type=checkbox] {
  accent-color: #da0000;
}
.rsb-ai-proposal__category {
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #da0000;
}
.rsb-ai-proposal__confidence {
  font-size: 11px;
  color: #bdbdbd;
}
.rsb-ai-proposal__desc {
  font-size: 12px;
  line-height: 1.5;
  color: #363636;
  margin-bottom: 4px;
}
.rsb-ai-proposal__diff {
  font-size: 11px;
  color: #bdbdbd;
}

.rsb-btn-lg {
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 600;
}

.rsb-btn-xs {
  padding: 2px 8px;
  font-size: 11px;
}

.rsb-btn-ghost {
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #94a3b8;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
}
.rsb-btn-ghost:hover {
  background: rgba(148, 163, 184, 0.1);
  color: #e2e8f0;
}

.rsb-token-usage {
  margin-top: 16px;
  border: 1px solid rgba(218, 0, 0, 0.2);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(218, 0, 0, 0.03);
  font-size: 0.8rem;
}
.rsb-token-usage__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 12px;
  background: rgba(218, 0, 0, 0.06);
  border: none;
  border-bottom: 1px solid rgba(218, 0, 0, 0.1);
  cursor: pointer;
  color: inherit;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  transition: background 0.4s;
}
.rsb-token-usage__header:hover {
  background: rgba(218, 0, 0, 0.1);
}
.rsb-token-usage__header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.rsb-token-usage__header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.rsb-token-usage__total-cost {
  font-family: "SF Mono", "Fira Code", monospace;
  font-weight: 700;
  color: #da0000;
}
.rsb-token-usage__cache-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(61, 172, 67, 0.15);
  color: #3dac43;
}
.rsb-token-usage__chevron {
  display: inline-block;
  transition: transform 0.2s ease;
  font-size: 10px;
  color: #bdbdbd;
}
.rsb-token-usage__chevron--open {
  transform: rotate(90deg);
}
.rsb-token-usage__body {
  padding: 10px 12px;
}
.rsb-token-usage__summary {
  margin-bottom: 12px;
}
.rsb-token-usage__summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 0;
}
.rsb-token-usage__summary-row--cached .rsb-token-usage__value {
  color: #3dac43;
}
.rsb-token-usage__summary-row--total {
  font-weight: 700;
}
.rsb-token-usage__summary-row--total .rsb-token-usage__value {
  font-family: "SF Mono", "Fira Code", monospace;
  color: #da0000;
  font-size: 13px;
}
.rsb-token-usage__summary-row--savings .rsb-token-usage__label {
  color: #3dac43;
}
.rsb-token-usage__label {
  color: #bdbdbd;
  font-size: 11px;
}
.rsb-token-usage__value {
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 11px;
  color: #363636;
}
.rsb-token-usage__value--strikethrough {
  text-decoration: line-through;
  opacity: 0.5;
}
.rsb-token-usage__value--savings {
  color: #3dac43;
  font-weight: 700;
}
.rsb-token-usage__divider {
  height: 1px;
  background: rgba(218, 0, 0, 0.1);
  margin: 8px 0;
}
.rsb-token-usage__calls-title {
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #bdbdbd;
  margin-bottom: 8px;
}
.rsb-token-usage__call {
  padding: 8px 10px;
  background: rgba(218, 0, 0, 0.02);
  border: 1px solid rgba(136, 136, 136, 0.5);
  border-radius: 6px;
  margin-bottom: 6px;
}
.rsb-token-usage__call-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.rsb-token-usage__call-label {
  font-weight: 600;
  font-size: 11px;
  color: #363636;
  display: flex;
  align-items: center;
  gap: 6px;
}
.rsb-token-usage__cache-hit {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(61, 172, 67, 0.15);
  color: #3dac43;
  letter-spacing: 0.3px;
}
.rsb-token-usage__call-cost {
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 11px;
  font-weight: 600;
  color: #da0000;
}
.rsb-token-usage__call-details {
  display: flex;
  gap: 10px;
  font-size: 10px;
  color: #bdbdbd;
}
.rsb-token-usage__detail--cached {
  color: #3dac43;
}
.rsb-token-usage__call-model {
  font-size: 10px;
  color: #bdbdbd;
  opacity: 0.7;
  margin-top: 3px;
}
.rsb-token-usage__lifetime-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 6px 0;
  background: none;
  border: none;
  cursor: pointer;
  color: #bdbdbd;
  font-size: 11px;
  font-weight: 600;
}
.rsb-token-usage__lifetime-toggle:hover {
  color: #363636;
}
.rsb-token-usage__lifetime {
  padding-top: 6px;
}

.rsb-modal--wide {
  max-width: 800px;
  width: 90%;
}

.rsb-form-grid--3 {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
}

.rsb-docking-assignment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: var(--bg-secondary, #f3f4f6);
  border-radius: 6px;
  font-size: 13px;
}

.rsb-items-center {
  align-items: center;
}

.rsb-flex {
  display: flex;
}

.rsb-restrictions-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rsb-restriction-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.rsb-restriction-toggle:hover {
  background: var(--rsb-surface, #f4f4f4);
}
.rsb-restriction-toggle input[type=checkbox] {
  width: 18px;
  height: 18px;
  accent-color: var(--rsb-primary, #da0000);
  flex-shrink: 0;
  cursor: pointer;
}

.rsb-restriction-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rsb-restriction-label {
  font-weight: 500;
  font-size: 13px;
}

/* ── Script Analyzer Results ── */
.rsb-sa-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 8px;
  margin-bottom: 12px;
}

.rsb-sa-status--success {
  background: rgba(61, 172, 67, 0.1);
  color: var(--success, #3dac43);
}

.rsb-sa-status--loading {
  background: var(--light, #f3f4f6);
  color: var(--text-muted, #64748b);
}

.rsb-sa-status--idle {
  background: var(--light, #f3f4f6);
  padding: 12px 16px;
}

.rsb-sa-status-icon {
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}

.rsb-sa-status-label {
  font-size: 13px;
  font-weight: 500;
}

.rsb-sa-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-top-color: var(--primary, #3b82f6);
  border-radius: 50%;
  animation: rsb-sa-spin 0.6s linear infinite;
}

@keyframes rsb-sa-spin {
  to {
    transform: rotate(360deg);
  }
}
.rsb-sa-group {
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid transparent;
}

.rsb-sa-group--error {
  background: rgba(218, 0, 0, 0.05);
  border-color: rgba(218, 0, 0, 0.15);
}

.rsb-sa-group--warning {
  background: rgba(245, 158, 11, 0.05);
  border-color: rgba(245, 158, 11, 0.15);
}

.rsb-sa-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 13px;
}

.rsb-sa-group--error .rsb-sa-group-header {
  color: var(--danger, #da0000);
}

.rsb-sa-group--warning .rsb-sa-group-header {
  color: var(--warning, #92400e);
}

.rsb-sa-group-icon {
  font-size: 14px;
  line-height: 1;
}

.rsb-sa-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 14px;
  font-size: 12px;
  line-height: 1.5;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.rsb-sa-item-loc {
  flex-shrink: 0;
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-muted, #64748b);
  white-space: nowrap;
  margin-top: 1px;
}

.rsb-sa-item-msg {
  flex: 1;
  word-break: break-word;
}

.rsb-sv-summary {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.rsb-sv-badge {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 4px;
  border-radius: 8px;
  border: 2px solid transparent;
  background: var(--light, #f9fafb);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  font-size: inherit;
}
.rsb-sv-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.rsb-sv-badge--error {
  border-color: #fee2e2;
  background: #fef2f2;
}
.rsb-sv-badge--error.rsb-sv-badge--active {
  border-color: #da0000;
  background: #fef2f2;
  box-shadow: 0 0 0 1px #da0000;
}

.rsb-sv-badge--warning {
  border-color: #fef3c7;
  background: #fffbeb;
}
.rsb-sv-badge--warning.rsb-sv-badge--active {
  border-color: #f59e0b;
  background: #fffbeb;
  box-shadow: 0 0 0 1px #f59e0b;
}

.rsb-sv-badge--info {
  border-color: #dbeafe;
  background: #eff6ff;
}
.rsb-sv-badge--info.rsb-sv-badge--active {
  border-color: #3b82f6;
  background: #eff6ff;
  box-shadow: 0 0 0 1px #3b82f6;
}

.rsb-sv-badge-icon {
  font-size: 16px;
  line-height: 1;
}

.rsb-sv-badge-count {
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}

.rsb-sv-badge--error .rsb-sv-badge-count {
  color: #da0000;
}

.rsb-sv-badge--warning .rsb-sv-badge-count {
  color: #f59e0b;
}

.rsb-sv-badge--info .rsb-sv-badge-count {
  color: #3b82f6;
}

.rsb-sv-badge-label {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
}

.rsb-sv-category-group {
  margin-bottom: 8px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
}

.rsb-sv-category-header {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  background: #f9fafb;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #1a1a2e;
  transition: background 0.15s;
}
.rsb-sv-category-header:hover {
  background: #f3f4f6;
}

.rsb-sv-category-icon {
  font-size: 16px;
  line-height: 1;
}

.rsb-sv-category-label {
  flex: 1;
  text-align: left;
}

.rsb-sv-category-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: #e5e7eb;
  color: #1a1a2e;
  font-size: 11px;
  font-weight: 700;
}

.rsb-sv-category-chevron {
  font-size: 12px;
  color: #94a3b8;
  transition: transform 0.2s;
}

.rsb-sv-category-chevron--collapsed {
  transform: rotate(-90deg);
}

.rsb-sv-category-body {
  border-top: 1px solid #e5e7eb;
}

.rsb-sv-issue {
  padding: 10px 12px;
  border-bottom: 1px solid #f3f4f6;
}
.rsb-sv-issue:last-child {
  border-bottom: none;
}

.rsb-sv-issue--error {
  border-left: 3px solid #da0000;
}

.rsb-sv-issue--warning {
  border-left: 3px solid #f59e0b;
}

.rsb-sv-issue--info {
  border-left: 3px solid #3b82f6;
}

.rsb-sv-issue-header {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.rsb-sv-issue-severity {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  margin-top: 1px;
}

.rsb-sv-severity--error {
  background: #fef2f2;
  color: #da0000;
}

.rsb-sv-severity--warning {
  background: #fffbeb;
  color: #f59e0b;
}

.rsb-sv-severity--info {
  background: #eff6ff;
  color: #3b82f6;
}

.rsb-sv-issue-message {
  font-size: 13px;
  font-weight: 500;
  color: #1a1a2e;
  word-break: break-word;
}

.rsb-sv-issue-detail {
  margin-top: 4px;
  padding-left: 26px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
}

.rsb-sv-issue-suggestion {
  margin-top: 6px;
  margin-left: 26px;
  padding: 6px 10px;
  background: #f0fdf4;
  border-radius: 6px;
  font-size: 12px;
  color: #065f46;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  line-height: 1.4;
}

.rsb-sv-suggestion-icon {
  flex-shrink: 0;
  font-size: 12px;
  line-height: 1.4;
}

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

.rsb-picker-info {
  padding: 6px 12px;
  background: #f0fdf4;
  border-radius: 6px;
  margin-bottom: 8px;
}

.rsb-empty-state-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.rsb-child-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.rsb-child-thumb {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
}

.rsb-child-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.rsb-picker-dropdown {
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  background: white;
}

.rsb-picker-search {
  border: none !important;
  border-bottom: 2px solid #e5e7eb !important;
  border-radius: 0 !important;
  padding: 10px 12px !important;
  font-size: 13px !important;
}
.rsb-picker-search:focus {
  border-bottom-color: #da0000 !important;
  box-shadow: none !important;
}

.rsb-picker-list {
  max-height: 280px;
  overflow-y: auto;
}

.rsb-picker-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
  font-size: 13px;
  color: #1a1a2e;
  border-bottom: 1px solid #f3f4f6;
}
.rsb-picker-item:hover {
  background: #f0fdf4;
}
.rsb-picker-item:last-child {
  border-bottom: none;
}

.rsb-picker-item-added {
  background: #f0fdf4;
  opacity: 0.7;
}

.rsb-picker-item-self {
  border-left: 3px solid #f59e0b;
}

.rsb-picker-thumb {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
}

.rsb-picker-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.rsb-picker-item-info {
  flex: 1;
  min-width: 0;
}

.rsb-picker-item-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.rsb-picker-item-id {
  font-size: 11px;
  color: #64748b;
  font-family: "Monaco", "Menlo", "Courier New", monospace;
}

.rsb-picker-empty {
  padding: 20px;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
}

.rsb-picker-manual {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-top: 2px solid #e5e7eb;
  background: #f9fafb;
}
.rsb-picker-manual span {
  white-space: nowrap;
}
.rsb-picker-manual input {
  flex: 1;
}

.rsb-picker-selected {
  margin-bottom: 8px;
}

.rsb-picker-selected-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 2px solid #da0000;
  border-radius: 8px;
  background: #f0fdf4;
}

.rsb-picker-selected-info {
  flex: 1;
  min-width: 0;
}
.rsb-picker-selected-info strong {
  display: block;
  font-size: 14px;
  color: #1a1a2e;
}

.rsb-picker-id {
  font-size: 11px;
  color: #64748b;
  font-family: "Monaco", "Menlo", "Courier New", monospace;
  background: rgba(0, 0, 0, 0.05);
  padding: 1px 4px;
  border-radius: 3px;
}

.rsb-anim-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 10px;
  overflow: hidden;
  transition: border-color 0.15s ease;
}
.rsb-anim-card:hover {
  border-color: #da0000;
}
.rsb-anim-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: #eff6ff;
  border-bottom: 1px solid #eff6ff;
}
.rsb-anim-card__info {
  flex: 1;
  min-width: 0;
}
.rsb-anim-card__title {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.rsb-anim-card__key {
  font-weight: 600;
  font-size: 14px;
  color: #1a1a2e;
  font-family: "Monaco", "Menlo", "Courier New", monospace;
}
.rsb-anim-card__actions {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}
.rsb-anim-card__body {
  padding: 10px 14px;
}

.rsb-anim-actions-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rsb-anim-action-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
}
.rsb-anim-action-chip__type {
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.rsb-anim-action-chip__key {
  font-family: "Monaco", "Menlo", "Courier New", monospace;
  font-size: 12px;
  color: #1a1a2e;
}
.rsb-anim-action-chip--origin {
  background: #f0fdf4;
  border-color: #d1fae5;
}
.rsb-anim-action-chip--origin .rsb-anim-action-chip__type {
  color: #3dac43;
}
.rsb-anim-action-chip--matrix {
  background: #eff6ff;
  border-color: #dbeafe;
}
.rsb-anim-action-chip--matrix .rsb-anim-action-chip__type {
  color: #da0000;
}

.rsb-anim-example-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.rsb-anim-example-card:hover {
  border-color: #da0000;
  box-shadow: 0 2px 8px rgba(167, 139, 250, 0.15);
}
.rsb-anim-example-card__icon {
  font-size: 32px;
  margin-bottom: 8px;
}
.rsb-anim-example-card__title {
  font-weight: 600;
  font-size: 14px;
  color: #1a1a2e;
  margin-bottom: 4px;
}
.rsb-anim-example-card__desc {
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
}

.rsb-anim-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 12px 0;
}

.rsb-anim-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 13px;
  color: #1a1a2e;
}
.rsb-anim-toggle input[type=checkbox] {
  width: 16px;
  height: 16px;
  accent-color: #da0000;
  cursor: pointer;
}

.rsb-anim-actions-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.rsb-anim-actions-header strong {
  font-size: 14px;
  color: #1a1a2e;
}

.rsb-anim-action-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 8px 10px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  margin-bottom: 6px;
}
.rsb-anim-action-row__fields {
  display: flex;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.rsb-anim-action-row__fields .rsb-form-group {
  margin-bottom: 0;
}
.rsb-anim-action-row__remove {
  flex-shrink: 0;
  margin-bottom: 2px;
}

.rsb-anim-bindings-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-weight: 600;
  font-size: 14px;
  color: #1a1a2e;
}

.rsb-anim-binding-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: #eff6ff;
  border: 1px solid #eff6ff;
  border-radius: 6px;
  margin-bottom: 6px;
}
.rsb-anim-binding-card__info {
  flex: 1;
  min-width: 0;
}
.rsb-anim-binding-card__key {
  font-weight: 600;
  font-size: 13px;
  font-family: "Monaco", "Menlo", "Courier New", monospace;
  color: #1a1a2e;
  margin-bottom: 2px;
}
.rsb-anim-binding-card__detail {
  display: flex;
  align-items: center;
  gap: 8px;
}
.rsb-anim-binding-card__actions {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}

.rsb-anim-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.rsb-anim-type-badge--move {
  background: #dbeafe;
  color: #1e40af;
}
.rsb-anim-type-badge--rotate {
  background: #fef3c7;
  color: #92400e;
}
.rsb-anim-type-badge--scale {
  background: #eff6ff;
  color: #da0000;
}

.rsb-anim-type-selector {
  display: flex;
  gap: 8px;
}

.rsb-anim-type-btn {
  flex: 1;
  padding: 10px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
  transition: all 0.15s ease;
}
.rsb-anim-type-btn:hover {
  border-color: #d1d5db;
  background: #f9fafb;
}
.rsb-anim-type-btn--active {
  font-weight: 600;
  color: #fff;
}
.rsb-anim-type-btn--move {
  border-color: #3b82f6;
  background: #3b82f6;
}
.rsb-anim-type-btn--move:hover {
  background: #da0000;
  border-color: #da0000;
}
.rsb-anim-type-btn--rotate {
  border-color: #f59e0b;
  background: #f59e0b;
}
.rsb-anim-type-btn--rotate:hover {
  background: #92400e;
  border-color: #92400e;
}
.rsb-anim-type-btn--scale {
  border-color: #da0000;
  background: #da0000;
}
.rsb-anim-type-btn--scale:hover {
  background: #da0000;
  border-color: #da0000;
}

.rsb-xyz-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

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

.rsb-xyz-label {
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.rsb-xyz-label--x {
  color: #da0000;
}
.rsb-xyz-label--y {
  color: #3dac43;
}
.rsb-xyz-label--z {
  color: #3b82f6;
}

.rsb-anim-quick-bind {
  margin-top: 10px;
}
.rsb-anim-quick-bind__label {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.rsb-anim-quick-bind__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.rsb-anim-quick-bind__btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  color: #1a1a2e;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.rsb-anim-quick-bind__btn:hover {
  background: #da0000;
  border-color: #da0000;
  color: #da0000;
}
.rsb-anim-quick-bind__bound {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  color: #065f46;
  background: #d1fae5;
  border: 1px solid #d1fae5;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.rsb-anim-quick-bind__bound:hover {
  background: #d1fae5;
  border-color: #3dac43;
}

.rsb-collapsible-section {
  border: 1px solid var(--rsb-border, #e5e7eb);
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}
.rsb-collapsible-section[open] {
  border-color: var(--rsb-primary, #da0000);
}
.rsb-collapsible-section[open] .rsb-collapsible-header::after {
  transform: rotate(90deg);
}
.rsb-collapsible-section .rsb-collapsible-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--rsb-text, #1a1a2e);
  cursor: pointer;
  background: var(--rsb-surface, #f9fafb);
  user-select: none;
  list-style: none;
  transition: background 0.15s ease;
}
.rsb-collapsible-section .rsb-collapsible-header:hover {
  background: var(--rsb-surface-hover, #f3f4f6);
}
.rsb-collapsible-section .rsb-collapsible-header::after {
  content: "▸";
  margin-left: auto;
  font-size: 14px;
  transition: transform 0.2s ease;
  color: var(--rsb-text-muted, #94a3b8);
}
.rsb-collapsible-section .rsb-collapsible-header::-webkit-details-marker {
  display: none;
}
.rsb-collapsible-section .rsb-collapsible-body {
  padding: 12px 14px;
  border-top: 1px solid var(--rsb-border, #e5e7eb);
  max-height: none;
  opacity: 1;
  overflow: visible;
}

.rsb-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
  padding: 6px 0;
}
.rsb-checkbox-label input[type=checkbox] {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  accent-color: var(--rsb-primary, #da0000);
  cursor: pointer;
}
.rsb-checkbox-label span {
  color: var(--rsb-text, #1a1a2e);
  font-weight: 500;
}

.rsb-geometry-primitives {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.rsb-geometry-primitives .rsb-primitive-btn {
  min-width: 70px;
  flex: 0 0 auto;
}

.rsb-badge-primary {
  background: var(--rsb-primary, #da0000);
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.rsb-blender-bridge-btn {
  background: #da0000;
  color: #fff;
  border: 1px solid #da0000;
  font-weight: 500;
  font-family: Rubik-Medium, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  transition: all 0.4s;
  padding: 8px 1rem;
  border-radius: 1.714rem;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.rsb-blender-bridge-btn:hover {
  background: rgb(177.2, 0, 0);
  box-shadow: 0 4px 12px rgba(218, 0, 0, 0.3);
  transform: translateY(-1px);
}
.rsb-blender-bridge-btn--active {
  box-shadow: 0 0 0 3px rgba(218, 0, 0, 0.2);
}

.rsb-blender-bridge {
  background: #f9f9f9;
  border: 1px solid #dfdfdf;
  border-left: 4px solid #da0000;
  border-radius: 0.4rem;
  padding: 1.5rem;
  margin-bottom: 1rem;
  animation: rsb-blender-bridge-enter 0.25s ease-out;
}

@keyframes rsb-blender-bridge-enter {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.rsb-blender-bridge__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.rsb-blender-bridge__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.2rem;
  font-weight: 700;
  font-family: Rubik-Bold, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  color: #da0000;
}

.rsb-blender-bridge__icon {
  font-size: 1.2rem;
}

.rsb-blender-bridge__close {
  background: #fff;
  border: 1px solid #dfdfdf;
  color: #888;
  cursor: pointer;
  font-size: 1rem;
  padding: 4px 8px;
  border-radius: 0.4rem;
  transition: all 0.4s;
}
.rsb-blender-bridge__close:hover {
  color: #da0000;
  border-color: #da0000;
  background: rgba(218, 0, 0, 0.05);
}

.rsb-blender-bridge__description {
  font-size: 0.8rem;
  font-family: Rubik, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  color: #666;
  line-height: 1.5;
  margin-bottom: 1rem;
}
.rsb-blender-bridge__description strong {
  color: #da0000;
  font-weight: 700;
  font-family: Rubik-Bold, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
}

.rsb-blender-bridge__mode {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 1rem;
}

.rsb-blender-bridge__mode-label {
  font-size: 0.8rem;
  color: #888;
  font-weight: 500;
  font-family: Rubik-Medium, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  margin-right: 4px;
}

.rsb-blender-bridge__mode-btn {
  background: #fff;
  border: 1px solid #dfdfdf;
  border-radius: 1.714rem;
  padding: 4px 12px;
  font-size: 0.8rem;
  font-family: Rubik, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  color: #888;
  cursor: pointer;
  transition: all 0.4s;
}
.rsb-blender-bridge__mode-btn:hover {
  background: rgba(218, 0, 0, 0.05);
  border-color: #da0000;
  color: #da0000;
}
.rsb-blender-bridge__mode-btn--active {
  background: #da0000;
  border-color: #da0000;
  color: #fff;
  font-weight: 500;
  font-family: Rubik-Medium, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
}

.rsb-blender-bridge__input-wrap {
  margin-bottom: 1rem;
}

.rsb-blender-bridge__textarea {
  width: 100%;
  min-height: 120px;
  max-height: 300px;
  padding: 10px 12px;
  font-family: "Courier New", monospace;
  font-size: 0.8rem;
  line-height: 1.6;
  color: #000;
  background: #fff;
  border: 1px solid #dfdfdf;
  border-radius: 0.4rem;
  resize: vertical;
  box-sizing: border-box;
  transition: all 0.4s;
}
.rsb-blender-bridge__textarea::placeholder {
  color: #a9a9a9;
  font-size: 0.8rem;
}
.rsb-blender-bridge__textarea:focus {
  outline: none;
  border-color: #da0000;
  box-shadow: 0 0 0 3px rgba(218, 0, 0, 0.1);
}

.rsb-blender-bridge__error {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #ffc5c5;
  border: 1px solid #df0300;
  border-radius: 0.4rem;
  font-size: 0.8rem;
  font-family: Rubik, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  color: #df0300;
  margin-bottom: 1rem;
}

.rsb-blender-bridge__preview {
  background: #fff;
  border: 1px solid #dfdfdf;
  border-radius: 0.4rem;
  padding: 1rem;
  margin-bottom: 1rem;
}

.rsb-blender-bridge__preview-title {
  font-size: 0.9rem;
  font-weight: 700;
  font-family: Rubik-Bold, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  color: #000;
  margin-bottom: 1rem;
}

.rsb-blender-bridge__preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
}

.rsb-blender-bridge__preview-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 8px;
  background: #f9f9f9;
  border-radius: 0.4rem;
  border: 1px solid #dfdfdf;
}

.rsb-blender-bridge__preview-value {
  font-size: 1.8rem;
  font-weight: 700;
  font-family: Rubik-Bold, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  color: #da0000;
  line-height: 1;
}
.rsb-blender-bridge__preview-value--text {
  font-size: 0.8rem;
  font-weight: 500;
  font-family: Rubik-Medium, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  word-break: break-all;
  text-align: center;
}

.rsb-blender-bridge__preview-label {
  font-size: 0.7rem;
  color: #888;
  font-weight: 500;
  font-family: Rubik-Medium, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.rsb-blender-bridge__options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 1rem;
}

.rsb-blender-bridge__option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-family: Rubik, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  color: #000;
  cursor: pointer;
  transition: color 0.4s;
}
.rsb-blender-bridge__option:hover {
  color: #da0000;
}
.rsb-blender-bridge__option input[type=checkbox] {
  accent-color: #da0000;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.rsb-blender-bridge__actions {
  display: flex;
  justify-content: flex-end;
  gap: 1.125rem;
}

.rsb-blender-bridge__cancel-btn {
  padding: 8px 1rem;
  background: #fff;
  border: 1px solid #dfdfdf;
  border-radius: 1.714rem;
  color: #888;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: Rubik-Medium, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  cursor: pointer;
  transition: all 0.4s;
}
.rsb-blender-bridge__cancel-btn:hover {
  background: #f9f9f9;
  border-color: #888;
  color: #000;
}

.rsb-blender-bridge__import-btn {
  padding: 8px 1rem;
  background: #da0000;
  border: 1px solid #da0000;
  border-radius: 1.714rem;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: Rubik-Bold, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  cursor: pointer;
  transition: all 0.4s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.rsb-blender-bridge__import-btn:hover:not(:disabled) {
  background: rgb(177.2, 0, 0);
  box-shadow: 0 4px 12px rgba(218, 0, 0, 0.3);
}
.rsb-blender-bridge__import-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: #b3b3b3;
  border-color: #b3b3b3;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ArticleNr Matrix Builder
   ═══════════════════════════════════════════════════════════════════════════ */
.rsb-anr-section {
  background: #f7f7f7;
  border: 1px solid #e7e7e7;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 12px;
}

.rsb-anr-section-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  font-family: Rubik-Medium, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  color: #1a1a2e;
  margin-bottom: 10px;
}
.rsb-anr-section-title small {
  font-weight: 400;
  font-family: Rubik, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 11px;
}

/* ── Chips ── */
.rsb-anr-param-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.rsb-anr-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-family: Rubik, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}
.rsb-anr-chip small {
  opacity: 0.65;
  font-weight: 400;
}

.rsb-anr-chip--param {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #3b82f6;
}

.rsb-anr-chip--output {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #d1fae5;
}

.rsb-anr-chip--missing {
  background: #fefce8;
  color: #854d0e;
  border: 1px solid #fef08a;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 8px;
}

.rsb-anr-chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.1);
  color: inherit;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  margin-left: 2px;
  transition: background 0.4s;
}
.rsb-anr-chip-remove:hover {
  background: rgba(0, 0, 0, 0.2);
}

/* ── Add-param / Add-col controls ── */
.rsb-anr-add-param,
.rsb-anr-add-col {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* ── Coverage indicator ── */
.rsb-anr-coverage {
  background: #f7f7f7;
  border: 1px solid #e7e7e7;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 12px;
}

.rsb-anr-coverage-bar {
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}

.rsb-anr-coverage-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}

.rsb-anr-coverage-fill--complete {
  background: #3dac43;
}

.rsb-anr-coverage-fill--partial {
  background: #f59e0b;
}

.rsb-anr-coverage-fill--low {
  background: #da0000;
}

.rsb-anr-coverage-text {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #64748b;
  font-family: Rubik, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
}

/* ── Missing combinations list ── */
.rsb-anr-missing-list {
  margin-top: 8px;
  max-height: 200px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rsb-anr-missing-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 8px;
  border-radius: 4px;
  background: #fff;
  border: 1px solid #e7e7e7;
}
.rsb-anr-missing-row > span {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* ── Validation issues ── */
.rsb-anr-issues {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

/* ── Actions bar ── */
.rsb-anr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
  padding: 10px 0;
  border-top: 1px solid #e7e7e7;
  border-bottom: 1px solid #e7e7e7;
}

.rsb-anr-import-btn {
  cursor: pointer;
}
.rsb-anr-import-btn input[type=file] {
  display: none;
}

/* ── CSV Paste area ── */
.rsb-anr-paste-area {
  margin-bottom: 12px;
}
.rsb-anr-paste-area textarea {
  width: 100%;
  font-family: monospace;
  font-size: 12px;
  border: 1px solid #e7e7e7;
  border-radius: 6px;
  padding: 10px;
  resize: vertical;
  transition: border-color 0.4s;
}
.rsb-anr-paste-area textarea:focus {
  border-color: #da0000;
  outline: none;
  box-shadow: 0 0 0 3px rgba(218, 0, 0, 0.1);
}
.rsb-anr-paste-area small {
  display: block;
  margin-top: 4px;
}

/* ── Table ── */
.rsb-anr-table-wrapper {
  overflow-x: auto;
  margin-bottom: 12px;
  border: 1px solid #e7e7e7;
  border-radius: 8px;
}

.rsb-anr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  font-family: Rubik, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
}

.rsb-anr-th {
  position: sticky;
  top: 0;
  background: #f3f4f6;
  padding: 8px 10px;
  text-align: left;
  font-weight: 600;
  font-family: Rubik-Medium, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
  border-bottom: 2px solid #e7e7e7;
  white-space: nowrap;
  user-select: none;
}

.rsb-anr-th--row-num {
  width: 36px;
  text-align: center;
  color: #94a3b8;
}

.rsb-anr-th--param {
  background: #eff6ff;
  color: #1e40af;
}

.rsb-anr-th--output {
  background: #f0fdf4;
  color: #065f46;
}

.rsb-anr-th--actions {
  width: 40px;
}

/* ── Table rows & cells ── */
.rsb-anr-row {
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.4s;
}
.rsb-anr-row:hover {
  background: #f8fafc;
}
.rsb-anr-row:last-child {
  border-bottom: none;
}

.rsb-anr-row--error {
  background: rgba(218, 0, 0, 0.04);
}
.rsb-anr-row--error:hover {
  background: rgba(218, 0, 0, 0.07);
}

.rsb-anr-cell {
  padding: 4px 8px;
  vertical-align: middle;
  border-right: 1px solid #f3f4f6;
}
.rsb-anr-cell:last-child {
  border-right: none;
}

.rsb-anr-cell--row-num {
  text-align: center;
  font-size: 10px;
  color: #94a3b8;
  font-weight: 500;
  width: 36px;
  background: #f8fafc;
}

.rsb-anr-cell--param {
  cursor: pointer;
  background: rgba(239, 246, 255, 0.3);
}
.rsb-anr-cell--param:hover {
  background: rgba(219, 234, 254, 0.3);
}

.rsb-anr-cell--output {
  cursor: pointer;
  background: rgba(240, 253, 244, 0.3);
}
.rsb-anr-cell--output:hover {
  background: rgba(209, 250, 229, 0.3);
}

.rsb-anr-cell--actions {
  text-align: center;
  width: 40px;
}

/* ── Cell editing ── */
.rsb-anr-cell-input {
  width: 100%;
  min-width: 80px;
  padding: 3px 6px;
  font-size: 12px;
  font-family: Rubik, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  border: 1px solid #da0000;
  border-radius: 3px;
  box-shadow: 0 0 0 2px rgba(218, 0, 0, 0.15);
  outline: none;
  background: #fff;
}
.rsb-anr-cell-input:focus {
  border-color: #da0000;
}

.rsb-anr-cell-value {
  display: block;
  padding: 3px 4px;
  min-height: 22px;
  font-size: 12px;
  border-radius: 3px;
  transition: background 0.4s;
  word-break: break-all;
}

.rsb-anr-cell-value--empty {
  color: #d1d5db;
  font-style: italic;
}

/* ── Empty state ── */
.rsb-anr-empty {
  text-align: center;
  padding: 32px 24px;
  color: #64748b;
}
.rsb-anr-empty h3 {
  margin: 8px 0 4px;
  font-size: 16px;
  font-weight: 600;
  color: #1a1a2e;
}
.rsb-anr-empty p {
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 16px;
}

.rsb-anr-empty-icon {
  font-size: 48px;
  line-height: 1;
  margin-bottom: 8px;
  opacity: 0.6;
}

.rsb-anr-features {
  text-align: left;
  list-style: none;
  padding: 0;
  margin: 16px auto;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}
.rsb-anr-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #1a1a2e;
}

/* ── Generate button area ── */
.rsb-anr-generate {
  display: flex;
  gap: 10px;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid #e7e7e7;
}

.rsb-partlist-tree {
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
  font-size: 0.8rem;
}
.rsb-partlist-tree__card {
  border-bottom: 1px solid #e2e8f0;
  transition: background 150ms ease;
}
.rsb-partlist-tree__card:last-child {
  border-bottom: none;
}
.rsb-partlist-tree__card:hover {
  background: #f7f7f7;
}
.rsb-partlist-tree__card--root {
  background: #fff;
}
.rsb-partlist-tree__card--child {
  background: #f9f9f9;
}
.rsb-partlist-tree__card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  gap: 8px;
}
.rsb-partlist-tree__card-left {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
}
.rsb-partlist-tree__card-right {
  flex-shrink: 0;
}
.rsb-partlist-tree__name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rsb-partlist-tree__id {
  font-family: "Fira Code", monospace;
  font-size: 0.72rem;
  color: #64748b;
  background: #f7f7f7;
  padding: 2px 6px;
  border-radius: 3px;
}
.rsb-partlist-tree__detail {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 0 12px 8px;
  padding-left: 40px;
}
.rsb-partlist-tree__detail-label {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  min-width: 110px;
  padding-top: 3px;
}
.rsb-partlist-tree__detail-code {
  display: block;
  font-family: "Fira Code", monospace;
  font-size: 0.72rem;
  line-height: 1.5;
  color: #1a1a2e;
  background: rgba(0, 0, 0, 0.04);
  padding: 3px 8px;
  border-radius: 3px;
  word-break: break-word;
  white-space: pre-wrap;
  flex: 1;
  min-width: 0;
}
.rsb-partlist-tree__toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 10px;
  padding: 2px 4px;
  border-radius: 2px;
  color: #64748b;
  transition: background 150ms ease;
  flex-shrink: 0;
}
.rsb-partlist-tree__toggle:hover {
  background: #e2e8f0;
}
.rsb-partlist-tree__icon {
  font-size: 14px;
  flex-shrink: 0;
}
.rsb-partlist-tree__connector {
  color: #bdbdbd;
  font-family: monospace;
  flex-shrink: 0;
}
.rsb-partlist-tree__empty {
  padding: 16px;
  text-align: center;
  color: #94a3b8;
  font-size: 0.8rem;
  font-style: italic;
}

.rsb-mesh-id-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.rsb-mesh-id-row .rsb-mesh-id-input {
  flex: 1;
  min-width: 0;
}

.rsb-mesh-browse-btn {
  white-space: nowrap;
  flex-shrink: 0;
  padding: 6px 12px;
  font-size: 0.7rem;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  background: #f3f4f6;
  color: #1a1a2e;
  cursor: pointer;
  transition: all 0.15s ease;
}
.rsb-mesh-browse-btn:hover {
  background: #da0000;
  color: #fff;
  border-color: #da0000;
}

.rsb-mesh-library {
  margin: 12px 0;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f8fafc;
  overflow: hidden;
}

.rsb-mesh-library-header {
  padding: 10px 12px 8px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

.rsb-mesh-library-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}

.rsb-mesh-library-tab {
  flex: 1;
  padding: 6px 10px;
  font-size: 0.7rem;
  font-weight: 500;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
}
.rsb-mesh-library-tab:hover {
  background: #f3f4f6;
  color: #1a1a2e;
}
.rsb-mesh-library-tab--active {
  background: #da0000;
  color: #fff;
  border-color: #da0000;
}
.rsb-mesh-library-tab--active:hover {
  background: #ff1a1a;
}

.rsb-mesh-library-search {
  width: 100%;
  padding: 6px 10px;
  font-size: 0.7rem;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #f8fafc;
}
.rsb-mesh-library-search:focus {
  border-color: #da0000;
  outline: none;
}

.rsb-mesh-library-list {
  max-height: 240px;
  overflow-y: auto;
  padding: 4px;
}

.rsb-mesh-library-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: default;
  transition: background 0.1s ease;
}
.rsb-mesh-library-item:hover {
  background: #f3f4f6;
}
.rsb-mesh-library-item + .rsb-mesh-library-item {
  border-top: 1px solid #e5e7eb;
}

.rsb-mesh-library-item-info {
  flex: 1;
  min-width: 0;
  margin-right: 8px;
}

.rsb-mesh-library-item-name {
  font-size: 0.8rem;
  font-weight: 500;
  color: #1a1a2e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rsb-mesh-library-item-id {
  font-size: 0.7rem;
  color: #94a3b8;
  font-family: monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rsb-mesh-library-item-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.rsb-mesh-library-empty {
  padding: 24px 16px;
  text-align: center;
  color: #94a3b8;
  font-size: 0.8rem;
  font-style: italic;
}

.rsb-scale-preset-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  padding: 8px;
}

.rsb-scale-preset-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 8px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}
.rsb-scale-preset-card:hover {
  border-color: #da0000;
  background: #f3f4f6;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.rsb-scale-preset-card:active {
  transform: translateY(0);
  box-shadow: none;
}

.rsb-scale-preset-icon {
  font-size: 20px;
  margin-bottom: 4px;
  line-height: 1;
}

.rsb-scale-preset-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 2px;
}

.rsb-scale-preset-desc {
  font-size: 10px;
  color: #94a3b8;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rsb-btn--accent {
  background: #da0000;
  color: #fff;
  border: 1px solid #da0000;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.15s ease;
}
.rsb-btn--accent:hover {
  background: #ff1a1a;
  border-color: #ff1a1a;
}

.rsb-btn--tiny {
  padding: 2px 8px;
  font-size: 11px;
  border-radius: 4px;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  transition: all 0.12s ease;
}
.rsb-btn--tiny:hover {
  border-color: #d1d5db;
}

.rsb-btn--small {
  padding: 4px 10px;
  font-size: 0.7rem;
}

.rsb-mesh-bounds-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin: 8px 0;
  border-radius: 6px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  font-size: 0.8rem;
  color: #64748b;
  animation: rsb-fade-in 0.2s ease;
}

.rsb-mesh-bounds-loading-spinner {
  display: inline-block;
  font-size: 16px;
  animation: rsb-spin 1s linear infinite;
}

@keyframes rsb-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
@keyframes rsb-fade-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.rsb-mci-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.rsb-mci-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 16px;
  gap: 12px;
}

.rsb-mci-loading-spinner {
  font-size: 32px;
  animation: rsb-mci-pulse 1.5s ease-in-out infinite;
}

.rsb-mci-loading-text {
  font-size: 0.9rem;
  color: #64748b;
}

@keyframes rsb-mci-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.7;
  }
}
.rsb-mci-stats {
  display: flex;
  gap: 8px;
  padding: 8px 0;
  flex-wrap: wrap;
}

.rsb-mci-stat {
  flex: 1;
  min-width: 60px;
  text-align: center;
  padding: 8px 6px;
  background: var(--rsb-surface, #f5f5f5);
  border-radius: 6px;
  border: 1px solid var(--rsb-border-light, #eee);
}
.rsb-mci-stat--issues {
  border-color: var(--rsb-warning, #f59e0b);
  background: var(--rsb-warning-bg, #fff8e1);
}
.rsb-mci-stat--duration {
  background: var(--rsb-info-bg, #e3f2fd);
  border-color: var(--rsb-info-light, #90caf9);
}

.rsb-mci-stat-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--rsb-text, #333);
}

.rsb-mci-stat-label {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 2px;
}

.rsb-mci-view-tabs {
  display: flex;
  gap: 4px;
  padding: 8px 0;
  border-bottom: 1px solid var(--rsb-border-light, #eee);
  margin-bottom: 8px;
}

.rsb-mci-view-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s ease;
}
.rsb-mci-view-tab:hover {
  background: var(--rsb-surface, #f5f5f5);
  color: var(--rsb-text, #333);
}
.rsb-mci-view-tab--active {
  background: var(--rsb-primary-bg, #f0f4ff);
  color: var(--rsb-primary, #da0000);
  border-color: var(--rsb-primary, #da0000);
  font-weight: 600;
}

.rsb-mci-view-tab-icon {
  font-size: 14px;
}

.rsb-mci-view-tab-count {
  font-size: 10px;
  font-weight: 700;
  background: var(--rsb-danger, #da0000);
  color: #fff;
  padding: 1px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

.rsb-mci-component-filter {
  padding: 8px 0;
}

.rsb-mci-filter-label {
  font-size: 0.8rem;
  color: #64748b;
  margin-bottom: 6px;
}

.rsb-mci-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.rsb-mci-chip {
  font-size: 0.8rem;
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid var(--rsb-border, #ddd);
  background: var(--rsb-surface-raised, #fff);
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rsb-mci-chip:hover {
  border-color: var(--rsb-primary, #da0000);
  color: var(--rsb-primary, #da0000);
}
.rsb-mci-chip--active {
  background: var(--rsb-primary, #da0000);
  color: #fff;
  border-color: var(--rsb-primary, #da0000);
}

.rsb-mci-issue-components {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.rsb-mci-issue-comp {
  font-size: 0.8rem;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: monospace;
  white-space: nowrap;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rsb-mci-issue-comp--source {
  background: var(--rsb-info-bg, #e3f2fd);
  color: var(--rsb-info-dark, #1565c0);
  border: 1px solid var(--rsb-info-light, #90caf9);
}
.rsb-mci-issue-comp--target {
  background: var(--rsb-warning-bg, #fff8e1);
  color: var(--rsb-warning-dark, #e65100);
  border: 1px solid var(--rsb-warning-light, #ffcc80);
}

.rsb-mci-issue-arrow {
  color: #64748b;
  font-size: 12px;
}

.rsb-mci-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 16px;
  text-align: center;
}

.rsb-mci-empty-icon {
  font-size: 32px;
  margin-bottom: 8px;
  animation: rsb-mci-pulse 2s ease-in-out infinite;
}

.rsb-mci-empty-text {
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.5;
  max-width: 360px;
}

.rsb-mci-matrix-header {
  padding: 8px 0;
}

.rsb-mci-matrix-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--rsb-text, #333);
}

.rsb-mci-matrix-scroll {
  overflow-x: auto;
  margin: 8px 0;
}

.rsb-mci-matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.rsb-mci-matrix-th {
  padding: 8px 10px;
  background: var(--rsb-surface, #f5f5f5);
  border: 1px solid var(--rsb-border-light, #eee);
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}
.rsb-mci-matrix-th--corner {
  position: sticky;
  left: 0;
  z-index: 1;
}

.rsb-mci-matrix-row:hover {
  background: var(--rsb-surface-hover, #fafafa);
}

.rsb-mci-matrix-td {
  padding: 6px 10px;
  border: 1px solid var(--rsb-border-light, #eee);
  white-space: nowrap;
}
.rsb-mci-matrix-td--comp {
  font-family: monospace;
  font-weight: 500;
  position: sticky;
  left: 0;
  background: var(--rsb-surface-raised, #fff);
}
.rsb-mci-matrix-td--mask code {
  padding: 1px 6px;
  background: var(--rsb-info-bg, #e3f2fd);
  border-radius: 3px;
  font-size: 11px;
}
.rsb-mci-matrix-td--count {
  text-align: center;
  font-weight: 600;
}

.rsb-mci-graph {
  padding: 8px 0;
}

.rsb-mci-graph-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--rsb-text, #333);
  margin-bottom: 8px;
}

.rsb-mci-graph-edge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  margin-bottom: 4px;
  background: var(--rsb-surface, #f5f5f5);
  border: 1px solid var(--rsb-border-light, #eee);
}
.rsb-mci-graph-edge--cycle {
  background: var(--rsb-danger-bg, #fde8e8);
  border-color: var(--rsb-danger, #da0000);
}

.rsb-mci-graph-node {
  font-family: monospace;
  font-size: 0.8rem;
  padding: 2px 8px;
  border-radius: 4px;
}
.rsb-mci-graph-node--from {
  background: var(--rsb-info-bg, #e3f2fd);
  color: var(--rsb-info-dark, #1565c0);
}
.rsb-mci-graph-node--to {
  background: var(--rsb-success-bg, #e8f5e9);
  color: var(--rsb-success-dark, #2e7d32);
}

.rsb-mci-graph-arrow {
  color: #64748b;
  font-size: 16px;
}

.rsb-mci-graph-cycle-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--rsb-danger, #da0000);
  margin-left: auto;
}

.rsb-mci-autofix-btn {
  background: linear-gradient(135deg, #3dac43, #065f46);
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.rsb-mci-autofix-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(61, 172, 67, 0.35);
}
.rsb-mci-autofix-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.rsb-mci-autofix-spinner {
  display: inline-block;
  animation: rsb-spin 1s linear infinite;
}

.rsb-mci-issue-actions {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--rsb-border-light, #eee);
  display: flex;
  align-items: center;
  gap: 8px;
}

.rsb-mci-fix-btn {
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  border: 1px solid transparent;
}
.rsb-mci-fix-btn--auto {
  background: var(--rsb-success-bg, #e8f5e9);
  color: var(--rsb-success-dark, #2e7d32);
  border-color: var(--rsb-success-light, #a5d6a7);
}
.rsb-mci-fix-btn--auto:hover {
  background: var(--rsb-success-light, #a5d6a7);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(61, 172, 67, 0.25);
}
.rsb-mci-fix-btn--choose {
  background: var(--rsb-info-bg, #e3f2fd);
  color: var(--rsb-info-dark, #1565c0);
  border-color: var(--rsb-info-light, #90caf9);
}
.rsb-mci-fix-btn--choose:hover {
  background: var(--rsb-info-light, #90caf9);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

.rsb-mci-fix-badge {
  font-size: 0.8rem;
  padding: 3px 10px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}
.rsb-mci-fix-badge--done {
  background: var(--rsb-success-bg, #e8f5e9);
  color: var(--rsb-success-dark, #2e7d32);
}
.rsb-mci-fix-badge--readonly {
  background: var(--rsb-surface, #f5f5f5);
  color: var(--rsb-text-muted, #999);
  font-style: italic;
}

.rsb-mci-fix-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1000;
  backdrop-filter: blur(2px);
  animation: rsb-mci-fade-in 0.15s ease-out;
}

.rsb-mci-fix-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1001;
  width: 520px;
  max-width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
  background: var(--rsb-surface-raised, #fff);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 0, 0, 0.05);
  animation: rsb-mci-slide-up 0.2s ease-out;
}

.rsb-mci-fix-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--rsb-border-light, #eee);
}

.rsb-mci-fix-dialog-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--rsb-text, #333);
}

.rsb-mci-fix-dialog-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--rsb-surface, #f5f5f5);
  color: var(--rsb-text-muted, #999);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.15s ease;
}
.rsb-mci-fix-dialog-close:hover {
  background: var(--rsb-danger-bg, #fde8e8);
  color: var(--rsb-danger, #da0000);
}

.rsb-mci-fix-dialog-message {
  padding: 12px 20px;
  font-size: 0.9rem;
  color: var(--rsb-text-secondary, #666);
  background: var(--rsb-surface, #f9f9f9);
  border-bottom: 1px solid var(--rsb-border-light, #eee);
  line-height: 1.5;
}

.rsb-mci-fix-dialog-choices {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rsb-mci-fix-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--rsb-border-light, #eee);
  border-radius: 8px;
  background: var(--rsb-surface-raised, #fff);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
  width: 100%;
}
.rsb-mci-fix-choice:hover {
  border-color: var(--rsb-primary, #da0000);
  background: var(--rsb-primary-bg, #f0f4ff);
  transform: translateX(2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.rsb-mci-fix-choice--recommended {
  border-color: var(--rsb-success, #3dac43);
  background: var(--rsb-success-bg, #e8f5e9);
}
.rsb-mci-fix-choice--recommended:hover {
  border-color: var(--rsb-success-dark, #2e7d32);
  background: var(--rsb-success-light, #c8e6c9);
  box-shadow: 0 2px 12px rgba(61, 172, 67, 0.2);
}

.rsb-mci-fix-choice-icon {
  font-size: 20px;
  flex-shrink: 0;
  width: 32px;
  text-align: center;
}

.rsb-mci-fix-choice-content {
  flex: 1;
  min-width: 0;
}

.rsb-mci-fix-choice-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--rsb-text, #333);
  margin-bottom: 2px;
}

.rsb-mci-fix-choice-desc {
  font-size: 0.8rem;
  color: var(--rsb-text-secondary, #666);
  line-height: 1.4;
}

.rsb-mci-fix-choice-badge {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--rsb-success-dark, #2e7d32);
  background: var(--rsb-success-light, #a5d6a7);
  padding: 3px 8px;
  border-radius: 10px;
}

.rsb-mci-fix-dialog-footer {
  display: flex;
  justify-content: flex-end;
  padding: 12px 20px;
  border-top: 1px solid var(--rsb-border-light, #eee);
}

@keyframes rsb-mci-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes rsb-mci-slide-up {
  from {
    opacity: 0;
    transform: translate(-50%, -48%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}
.rsb-mci-fixable-hint {
  font-size: 11px;
  color: #8b949e;
  padding: 2px 8px;
  background: rgba(139, 148, 158, 0.08);
  border-radius: 10px;
  white-space: nowrap;
}

.rsb-diff-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(6px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: rsb-diff-fade-in 0.2s ease-out;
}

@keyframes rsb-diff-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.rsb-diff-modal {
  position: relative;
  z-index: 10001;
  width: min(96vw, 960px);
  max-height: 92vh;
  background: #fff;
  border: 2px solid #da0000;
  border-radius: 12px;
  box-shadow: 0 0 0 4px rgba(218, 0, 0, 0.08), 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1), 0 0 60px rgba(218, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: rsb-diff-slide-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes rsb-diff-slide-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.rsb-diff-danger-banner {
  position: relative;
  display: flex;
  align-items: center;
  padding: 14px 20px;
  background: #fef2f2;
  border-bottom: 1px solid #fee2e2;
  overflow: hidden;
}

.rsb-diff-danger-pulse {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #da0000, #f59e0b, #da0000, transparent);
  background-size: 200% 100%;
  animation: rsb-diff-pulse 2.5s ease-in-out infinite;
}

@keyframes rsb-diff-pulse {
  0%, 100% {
    background-position: 200% 0;
  }
  50% {
    background-position: -200% 0;
  }
}
.rsb-diff-danger-stripe {
  position: absolute;
  top: 0;
  left: -80px;
  bottom: 0;
  width: 60px;
  background: repeating-linear-gradient(-45deg, transparent, transparent 8px, rgba(218, 0, 0, 0.04) 8px, rgba(218, 0, 0, 0.04) 16px);
  animation: rsb-diff-stripe-move 2s linear infinite;
}

@keyframes rsb-diff-stripe-move {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(32px);
  }
}
.rsb-diff-danger-content {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.rsb-diff-danger-icon {
  flex-shrink: 0;
  color: #da0000;
  display: flex;
  align-items: center;
}
.rsb-diff-danger-icon svg {
  filter: drop-shadow(0 0 4px rgba(218, 0, 0, 0.3));
}

.rsb-diff-danger-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.rsb-diff-danger-title {
  font-family: Rubik-Medium, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #991b1b;
  letter-spacing: 0.2px;
}

.rsb-diff-danger-subtitle {
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
}

.rsb-diff-close-btn {
  flex-shrink: 0;
  background: none;
  border: 1px solid transparent;
  color: #94a3b8;
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 150ms ease;
}
.rsb-diff-close-btn:hover {
  color: #da0000;
  background: #fef2f2;
  border-color: #fee2e2;
}

.rsb-diff-header {
  padding: 16px 20px 12px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.rsb-diff-title {
  font-family: Rubik-Medium, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #1a1a2e;
  margin: 0 0 10px;
  line-height: 1.3;
}

.rsb-diff-stats-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.rsb-diff-stat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
}
.rsb-diff-stat svg {
  opacity: 0.7;
}
.rsb-diff-stat--components {
  color: #1e40af;
}
.rsb-diff-stat--components svg {
  color: #3b82f6;
}
.rsb-diff-stat--fixes {
  color: #4f46e5;
}
.rsb-diff-stat--fixes svg {
  color: #4f46e5;
}
.rsb-diff-stat--added {
  color: #3dac43;
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  font-weight: 700;
}
.rsb-diff-stat--removed {
  color: #da0000;
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  font-weight: 700;
}

.rsb-diff-stat-bar {
  display: flex;
  height: 8px;
  width: 120px;
  border-radius: 4px;
  overflow: hidden;
  background: #e2e8f0;
}
.rsb-diff-stat-bar__added {
  background: #3dac43;
  min-width: 2px;
}
.rsb-diff-stat-bar__removed {
  background: #da0000;
  min-width: 2px;
}

.rsb-diff-description {
  margin: 8px 0 0;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.5;
  white-space: pre-line;
}

.rsb-diff-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  max-height: 55vh;
  background: #fff;
}
.rsb-diff-body::-webkit-scrollbar {
  width: 8px;
}
.rsb-diff-body::-webkit-scrollbar-track {
  background: transparent;
}
.rsb-diff-body::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 4px;
}
.rsb-diff-body::-webkit-scrollbar-thumb:hover {
  background: #888;
}

.rsb-diff-file {
  border-bottom: 1px solid #e2e8f0;
}
.rsb-diff-file:last-child {
  border-bottom: none;
}

.rsb-diff-file-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  cursor: pointer;
  user-select: none;
  transition: background 150ms ease;
  position: sticky;
  top: 0;
  z-index: 1;
}
.rsb-diff-file-header:hover {
  background: #f3f4f6;
}
.rsb-diff-file--collapsed .rsb-diff-file-header {
  border-bottom-color: transparent;
}

.rsb-diff-file-chevron {
  flex-shrink: 0;
  color: #94a3b8;
  display: flex;
  align-items: center;
  transition: transform 0.15s ease;
}

.rsb-diff-file-image {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  object-fit: cover;
  border: 1px solid #e2e8f0;
  background: #fff;
  flex-shrink: 0;
}
.rsb-diff-file-image--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  background: #f8fafc;
}

.rsb-diff-file-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.rsb-diff-file-name {
  font-family: Rubik-Medium, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #1a1a2e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rsb-diff-file-id {
  font-size: 11px;
  color: #94a3b8;
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rsb-diff-file-badge {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.rsb-diff-file-badge--self {
  color: #1e40af;
  background: #dbeafe;
  border: 1px solid rgba(59, 130, 246, 0.2);
}
.rsb-diff-file-badge--remote {
  color: #92400e;
  background: #fef3c7;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.rsb-diff-file-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.rsb-diff-file-stat {
  font-size: 12px;
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  font-weight: 700;
}
.rsb-diff-file-stat--added {
  color: #3dac43;
}
.rsb-diff-file-stat--removed {
  color: #da0000;
}

.rsb-diff-file-content {
  overflow-x: auto;
  background: #fff;
}

.rsb-diff-table {
  width: 100%;
  border-collapse: collapse;
  font-family: "SF Mono", "Fira Code", "Consolas", "Monaco", monospace;
  font-size: 12px;
  line-height: 20px;
  table-layout: fixed;
}

.rsb-diff-row--added {
  background: rgba(61, 172, 67, 0.08);
}
.rsb-diff-row--added .rsb-diff-gutter {
  color: #3dac43;
  background: rgba(61, 172, 67, 0.12);
}
.rsb-diff-row--added .rsb-diff-code {
  color: #065f46;
}
.rsb-diff-row--added .rsb-diff-code-indicator {
  color: #3dac43;
}
.rsb-diff-row--added:hover {
  background: rgba(61, 172, 67, 0.14);
}
.rsb-diff-row--removed {
  background: rgba(218, 0, 0, 0.05);
}
.rsb-diff-row--removed .rsb-diff-gutter {
  color: #da0000;
  background: rgba(218, 0, 0, 0.08);
}
.rsb-diff-row--removed .rsb-diff-code {
  color: #991b1b;
}
.rsb-diff-row--removed .rsb-diff-code-indicator {
  color: #da0000;
}
.rsb-diff-row--removed:hover {
  background: rgba(218, 0, 0, 0.1);
}
.rsb-diff-row--context .rsb-diff-gutter {
  color: #94a3b8;
  background: #f8fafc;
}
.rsb-diff-row--context .rsb-diff-code {
  color: #64748b;
}
.rsb-diff-row--context .rsb-diff-code-indicator {
  color: transparent;
}
.rsb-diff-row--separator {
  background: #eff6ff;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}
.rsb-diff-row--separator .rsb-diff-gutter--sep {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.06);
  text-align: center;
  font-size: 14px;
}
.rsb-diff-row--separator .rsb-diff-code--sep {
  color: #3b82f6;
  font-style: italic;
  font-size: 11px;
  padding: 3px 16px;
}

.rsb-diff-gutter {
  width: 48px;
  min-width: 48px;
  max-width: 48px;
  padding: 0 8px;
  text-align: right;
  user-select: none;
  font-size: 11px;
  vertical-align: top;
  border-right: 1px solid #e2e8f0;
  color: #94a3b8;
}
.rsb-diff-gutter--old {
  border-right: none;
}
.rsb-diff-gutter--new {
  border-right: 1px solid #e2e8f0;
}

.rsb-diff-code {
  padding: 0 12px;
  white-space: pre;
  overflow: visible;
  word-break: keep-all;
  color: #1a1a2e;
}

.rsb-diff-code-indicator {
  display: inline-block;
  width: 16px;
  font-weight: 700;
  user-select: none;
  text-align: center;
}

.rsb-diff-code-text {
  white-space: pre;
}

.rsb-diff-footer {
  padding: 16px 20px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rsb-diff-footer-warning {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: #fffbeb;
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 0.4rem;
  font-size: 12px;
  color: #92400e;
  line-height: 1.5;
}
.rsb-diff-footer-warning svg {
  flex-shrink: 0;
  color: #f59e0b;
  margin-top: 1px;
}
.rsb-diff-footer-warning strong {
  font-weight: 600;
  color: #854d0e;
}

.rsb-diff-footer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.rsb-diff-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  font-family: Rubik, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 13px;
  font-weight: 600;
  border-radius: 0.4rem;
  cursor: pointer;
  transition: all 150ms ease;
  border: 1px solid transparent;
  line-height: 1.3;
}
.rsb-diff-btn svg {
  flex-shrink: 0;
}
.rsb-diff-btn--cancel {
  color: #64748b;
  background: #fff;
  border-color: #d1d5db;
}
.rsb-diff-btn--cancel:hover {
  color: #1a1a2e;
  background: #f3f4f6;
  border-color: #888;
}
.rsb-diff-btn--save {
  color: #fff;
  background: #da0000;
  border-color: #da0000;
  box-shadow: 0 2px 8px rgba(218, 0, 0, 0.25);
}
.rsb-diff-btn--save:hover:not(:disabled) {
  background: #b80000;
  border-color: #b80000;
  box-shadow: 0 4px 16px rgba(218, 0, 0, 0.35), 0 0 20px rgba(218, 0, 0, 0.1);
  transform: translateY(-1px);
}
.rsb-diff-btn--save:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(218, 0, 0, 0.2);
}
.rsb-diff-btn--save:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.rsb-diff-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: rsb-diff-spin 0.6s linear infinite;
}

@keyframes rsb-diff-spin {
  to {
    transform: rotate(360deg);
  }
}
.rsb-sv-summary-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 2px solid transparent;
  background: rgba(139, 148, 158, 0.06);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  min-width: 0;
}
.rsb-sv-summary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.rsb-sv-summary-btn--error {
  border-color: rgba(248, 81, 73, 0.25);
  background: rgba(248, 81, 73, 0.06);
}
.rsb-sv-summary-btn--error .rsb-sv-summary-count {
  color: #f85149;
}
.rsb-sv-summary-btn--error.rsb-sv-summary-btn--active {
  border-color: #f85149;
  background: rgba(248, 81, 73, 0.1);
  box-shadow: 0 0 0 1px #f85149;
}
.rsb-sv-summary-btn--warning {
  border-color: rgba(210, 153, 34, 0.25);
  background: rgba(210, 153, 34, 0.06);
}
.rsb-sv-summary-btn--warning .rsb-sv-summary-count {
  color: #d29922;
}
.rsb-sv-summary-btn--warning.rsb-sv-summary-btn--active {
  border-color: #d29922;
  background: rgba(210, 153, 34, 0.1);
  box-shadow: 0 0 0 1px #d29922;
}
.rsb-sv-summary-btn--info {
  border-color: rgba(121, 192, 255, 0.25);
  background: rgba(121, 192, 255, 0.06);
}
.rsb-sv-summary-btn--info .rsb-sv-summary-count {
  color: #79c0ff;
}
.rsb-sv-summary-btn--info.rsb-sv-summary-btn--active {
  border-color: #79c0ff;
  background: rgba(121, 192, 255, 0.1);
  box-shadow: 0 0 0 1px #79c0ff;
}

.rsb-sv-summary-count {
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}

.rsb-sv-summary-label {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #8b949e;
}

.rsb-geo-subtab-bar {
  display: flex;
  gap: 4px;
  padding: 0 4px 12px;
  border-bottom: 1px solid var(--rsb-border, #e5e7eb);
  margin-bottom: 12px;
}

.rsb-geo-subtab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--rsb-text-muted, #94a3b8);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.rsb-geo-subtab:hover {
  color: var(--rsb-text, #1a1a2e);
  background: var(--rsb-surface-hover, #f3f4f6);
}
.rsb-geo-subtab--active {
  color: var(--rsb-primary, #da0000);
  background: var(--rsb-surface, #f8fafc);
  border-color: var(--rsb-primary, #da0000);
  font-weight: 600;
}

.rsb-geo-subtab-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rsb-success, #3dac43);
  margin-left: 2px;
}

.rsb-dock-subtab-bar {
  display: flex;
  gap: 2px;
  padding: 4px;
  margin-bottom: 16px;
  background: var(--rsb-surface, #f8fafc);
  border-radius: 10px;
  border: 1px solid var(--rsb-border, #e5e7eb);
}

.rsb-dock-subtab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  justify-content: center;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--rsb-text-muted, #94a3b8);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.rsb-dock-subtab:hover {
  color: var(--rsb-text, #1a1a2e);
  background: var(--rsb-surface-hover, #f3f4f6);
}
.rsb-dock-subtab--active {
  color: #fff;
  background: var(--rsb-primary, #da0000);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.rsb-dock-subtab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 5px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.15);
  color: inherit;
}
.rsb-dock-subtab--active .rsb-dock-subtab-count {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.rsb-dock-subtab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 9px;
}
.rsb-dock-subtab-badge--warning {
  background: var(--rsb-warning, #f59e0b);
  color: #000;
  animation: rsb-pulse-badge 2s ease-in-out infinite;
}

@keyframes rsb-pulse-badge {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}
.rsb-secondary-geo {
  margin-top: 0;
}

.rsb-sec-geo-block:not(:last-of-type) {
  margin-bottom: 10px;
}
.rsb-sec-geo-block .rsb-collapsible-header {
  gap: 6px;
}

.rsb-sec-geo-icon {
  font-size: 15px;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}

.rsb-sec-geo-help {
  margin-bottom: 10px;
  line-height: 1.55;
}
.rsb-sec-geo-help strong {
  color: var(--rsb-text, #1a1a2e);
}
.rsb-sec-geo-help em {
  color: var(--rsb-warning, #f59e0b);
  font-style: normal;
  font-weight: 600;
}

.rsb-sec-geo-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  gap: 8px;
}

.rsb-sec-geo-snippets {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.rsb-badge-muted {
  background: var(--rsb-surface-hover, #f3f4f6);
  color: var(--rsb-text-muted, #94a3b8);
}

.rsb-text-danger {
  color: var(--rsb-danger, #da0000) !important;
}

.rsb-vision-upload-zone {
  position: relative;
  border: 2px dashed var(--rsb-border-color, #555);
  border-radius: 12px;
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.rsb-vision-upload-zone:hover {
  border-color: var(--rsb-accent, #4fc3f7);
  background: rgba(79, 195, 247, 0.05);
}

.rsb-vision-upload-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.rsb-vision-upload-text {
  margin-bottom: 8px;
  font-size: 14px;
}

.rsb-vision-upload-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.rsb-vision-preview {
  border: 1px solid var(--rsb-border-color, #444);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}

.rsb-vision-preview-img {
  max-width: 100%;
  max-height: 300px;
  border-radius: 6px;
  margin-bottom: 8px;
  object-fit: contain;
}

.rsb-vision-preview-info {
  font-size: 12px;
  color: var(--rsb-text-muted, #888);
  margin-bottom: 8px;
}

.rsb-vision-analysis {
  border: 1px solid var(--rsb-border-color, #444);
  border-radius: 8px;
  padding: 12px;
}

.rsb-chat-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.rsb-chat-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.rsb-chat-quick-actions .rsb-btn {
  font-size: 12px;
  padding: 4px 10px;
}

.rsb-chat-messages {
  flex: 1;
  overflow-y: auto;
  min-height: 200px;
  max-height: 450px;
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rsb-chat-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
  text-align: center;
  color: var(--rsb-text-muted, #888);
}

.rsb-chat-empty-icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.4;
}

.rsb-chat-message {
  display: flex;
  gap: 8px;
  padding: 8px;
  border-radius: 8px;
}
.rsb-chat-message--user {
  background: rgba(79, 195, 247, 0.08);
}
.rsb-chat-message--assistant {
  background: rgba(255, 255, 255, 0.04);
}

.rsb-chat-message-avatar {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.rsb-chat-message-content {
  flex: 1;
  min-width: 0;
}

.rsb-chat-message-text {
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.rsb-chat-message-changes {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.rsb-chat-typing-indicator {
  display: flex;
  gap: 4px;
  padding: 4px 0;
}
.rsb-chat-typing-indicator span {
  width: 8px;
  height: 8px;
  background: var(--rsb-text-muted, #888);
  border-radius: 50%;
  animation: rsb-chat-bounce 1.4s infinite ease-in-out;
}
.rsb-chat-typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}
.rsb-chat-typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes rsb-chat-bounce {
  0%, 80%, 100% {
    transform: scale(0.6);
    opacity: 0.4;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}
.rsb-chat-input-area {
  border-top: 1px solid var(--rsb-border-color, #444);
  padding-top: 10px;
  margin-top: 8px;
}

.rsb-chat-input {
  width: 100%;
  background: var(--rsb-input-bg, #2a2a2a);
  border: 1px solid var(--rsb-border-color, #555);
  border-radius: 8px;
  color: var(--rsb-text-color, #e0e0e0);
  padding: 8px 12px;
  font-size: 13px;
  font-family: inherit;
  resize: none;
  outline: none;
}
.rsb-chat-input:focus {
  border-color: var(--rsb-accent, #4fc3f7);
}

.rsb-chat-input-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.rsb-docs-options {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.rsb-docs-generate-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rsb-docs-section-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rsb-docs-result {
  border: 1px solid var(--rsb-border-color, #444);
  border-radius: 8px;
  overflow: hidden;
}

.rsb-docs-result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--rsb-border-color, #444);
  flex-wrap: wrap;
  gap: 8px;
}

.rsb-docs-result-actions {
  display: flex;
  gap: 6px;
}

.rsb-docs-output {
  padding: 16px;
  font-size: 12px;
  line-height: 1.6;
  max-height: 500px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "SF Mono", "Cascadia Code", "Fira Code", monospace;
  background: var(--rsb-input-bg, #1e1e1e);
  margin: 0;
  color: #fff;
}

.rsb-badge--ai {
  background: linear-gradient(135deg, #7c4dff, #448aff);
  color: white;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
  margin-left: 8px;
}

.rsb-form-label--checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.rsb-form-label--checkbox input[type=checkbox] {
  width: 16px;
  height: 16px;
}
.rsb-form-label--checkbox .rsb-dev-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 1px 5px;
  border-radius: 3px;
  background: #f59e0b;
  color: #1a1a1a;
  vertical-align: middle;
  margin-left: 4px;
  line-height: 1.4;
}
.rsb-form-label--checkbox .rsb-dev-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
  border-radius: 6px;
  border: 1px solid #f59e0b;
  background: rgba(245, 158, 11, 0.08);
  color: #92400e;
}
.rsb-form-label--checkbox .rsb-dev-banner .rsb-dev-banner__icon {
  font-size: 20px;
  flex-shrink: 0;
  line-height: 1;
}
.rsb-form-label--checkbox .rsb-dev-banner strong {
  display: block;
  font-size: 13px;
  margin-bottom: 2px;
}
.rsb-form-label--checkbox .rsb-dev-banner p {
  font-size: 11px;
  margin: 0;
  line-height: 1.4;
  opacity: 0.85;
}

.rsb-piv {
  padding: 0 !important;
}

.rsb-piv-hero {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  margin: 20px 24px 0;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4338ca 100%);
  color: #fff;
}

.rsb-piv-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.rsb-piv-hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.35;
}
.rsb-piv-hero-orb--1 {
  width: 200px;
  height: 200px;
  background: #818cf8;
  top: -60px;
  right: -40px;
  animation: piv-orb-drift 8s ease-in-out infinite alternate;
}
.rsb-piv-hero-orb--2 {
  width: 140px;
  height: 140px;
  background: #c084fc;
  bottom: -30px;
  left: 20%;
  animation: piv-orb-drift 6s ease-in-out infinite alternate-reverse;
}
.rsb-piv-hero-orb--3 {
  width: 100px;
  height: 100px;
  background: #f472b6;
  top: 30%;
  left: -20px;
  animation: piv-orb-drift 10s ease-in-out infinite alternate;
}

@keyframes piv-orb-drift {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(12px, -10px) scale(1.15);
  }
}
.rsb-piv-hero-content {
  position: relative;
  padding: 28px 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rsb-piv-hero-icon {
  position: relative;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rsb-piv-hero-icon-inner {
  font-size: 28px;
  position: relative;
  z-index: 1;
}

.rsb-piv-hero-icon-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  animation: piv-ring-pulse 3s ease-in-out infinite;
}

@keyframes piv-ring-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.4;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.1;
  }
}
.rsb-piv-hero-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.3px;
}

.rsb-piv-hero-subtitle {
  font-size: 12px;
  line-height: 1.6;
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  max-width: 520px;
}

.rsb-piv-hero-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.rsb-piv-analyze-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff !important;
  color: #312e81 !important;
  border: none !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  padding: 8px 18px !important;
  font-size: 13px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}
.rsb-piv-analyze-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.rsb-piv-analyze-btn-icon {
  font-size: 14px;
}

.rsb-piv-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 16px 24px;
}

.rsb-piv-stat {
  text-align: center;
  padding: 16px 8px;
  border-radius: 10px;
  border: 1px solid var(--rsb-border-light, #e5e7eb);
  background: var(--rsb-surface, #f8fafc);
  transition: all 0.25s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.rsb-piv-stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}
.rsb-piv-stat--params {
  border-color: rgba(59, 130, 246, 0.25);
  background: linear-gradient(135deg, #eff6ff 0%, #fff 100%);
}
.rsb-piv-stat--impacts {
  border-color: rgba(245, 158, 11, 0.25);
  background: linear-gradient(135deg, #fffbeb 0%, #fff 100%);
}
.rsb-piv-stat--categories {
  border-color: rgba(124, 58, 237, 0.2);
  background: linear-gradient(135deg, #f5f3ff 0%, #fff 100%);
}
.rsb-piv-stat--depth {
  border-color: rgba(236, 72, 153, 0.2);
  background: linear-gradient(135deg, #fdf2f8 0%, #fff 100%);
}

.rsb-piv-stat-icon {
  font-size: 24px;
  margin-bottom: 4px;
}

.rsb-piv-stat-value {
  font-size: 28px;
  font-weight: 800;
  color: #1a1a2e;
  line-height: 1;
  margin-bottom: 4px;
}

.rsb-piv-stat-label {
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.rsb-piv-section {
  padding: 20px 24px;
  border-top: 1px solid var(--rsb-border-light, #e5e7eb);
}

.rsb-piv-section-header {
  margin-bottom: 14px;
}

.rsb-piv-section-title {
  font-size: 15px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rsb-piv-section-icon {
  font-size: 16px;
}

.rsb-piv-section-desc {
  font-size: 12px;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

.rsb-piv-title-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  font-size: 11px;
  font-weight: 700;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--rsb-primary, #da0000);
  color: #fff;
}

.rsb-piv-code {
  font-family: "SF Mono", "Fira Code", "Cascadia Code", monospace;
  font-size: 0.92em;
  background: #f1f5f9;
  color: #4338ca;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
}

.rsb-piv-param-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}

.rsb-piv-param {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--rsb-surface-raised, #f9fafb);
  border: 1.5px solid var(--rsb-border-light, #e5e7eb);
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  color: #1a1a2e;
  transition: all 0.2s ease;
  text-align: left;
  overflow: hidden;
}
.rsb-piv-param:hover {
  border-color: var(--rsb-primary, #da0000);
  background: #fff;
  box-shadow: 0 2px 8px rgba(218, 0, 0, 0.08);
}
.rsb-piv-param--selected {
  border-color: var(--rsb-primary, #da0000);
  background: linear-gradient(135deg, #fef2f2 0%, #fff 100%);
  box-shadow: 0 0 0 3px rgba(218, 0, 0, 0.1), 0 2px 8px rgba(218, 0, 0, 0.12);
}
.rsb-piv-param--selected .rsb-piv-param-name {
  color: var(--rsb-primary, #da0000);
  font-weight: 700;
}
.rsb-piv-param--selected .rsb-piv-param-badge {
  background: var(--rsb-primary, #da0000);
  color: #fff;
}

.rsb-piv-param-name {
  font-size: 12px;
  font-weight: 600;
  font-family: "SF Mono", "Fira Code", "Cascadia Code", monospace;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rsb-piv-param-badge {
  font-size: 10px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border-radius: 10px;
  background: #e2e8f0;
  color: #64748b;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.rsb-piv-param-badge--has {
  background: #dbeafe;
  color: #1e40af;
}

.rsb-piv-param-active-indicator {
  position: absolute;
  bottom: 0;
  left: 10%;
  right: 10%;
  height: 3px;
  background: var(--rsb-primary, #da0000);
  border-radius: 3px 3px 0 0;
  animation: piv-indicator-in 0.2s ease-out;
}

@keyframes piv-indicator-in {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}
.rsb-piv-sim {
  background: linear-gradient(180deg, #f5f3ff 0%, var(--rsb-surface, #f8fafc) 100%);
}

.rsb-piv-sim-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rsb-piv-sim-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  flex-shrink: 0;
}

.rsb-piv-sim-input {
  width: 160px;
  padding: 8px 12px;
  background: #fff;
  border: 1.5px solid var(--rsb-border, #e2e8f0);
  border-radius: 6px;
  color: #1a1a2e;
  font-size: 13px;
  font-family: "SF Mono", "Fira Code", "Cascadia Code", monospace;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.rsb-piv-sim-input:focus {
  border-color: #4338ca;
  box-shadow: 0 0 0 3px rgba(67, 56, 202, 0.1);
}
.rsb-piv-sim-input::placeholder {
  color: #cbd5e1;
}

.rsb-piv-sim-hint {
  font-size: 11px;
  color: #94a3b8;
  font-style: italic;
}

.rsb-piv-chip-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.rsb-piv-chip-divider {
  width: 1px;
  height: 20px;
  background: #e5e7eb;
  margin: 0 4px;
}

.rsb-piv-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 16px;
  background: var(--rsb-surface-raised, #f9fafb);
  border: 1px solid var(--rsb-border-light, #e5e7eb);
  color: #64748b;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.rsb-piv-chip:hover {
  background: #fff;
  border-color: #d1d5db;
  color: #1a1a2e;
}
.rsb-piv-chip--on {
  background: #1a1a2e;
  border-color: #1a1a2e;
  color: #fff;
  font-weight: 600;
}
.rsb-piv-chip--geometry.rsb-piv-chip--on {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #fff;
}
.rsb-piv-chip--geometry-group.rsb-piv-chip--on {
  background: #6366f1;
  border-color: #6366f1;
  color: #fff;
}
.rsb-piv-chip--docking.rsb-piv-chip--on {
  background: #ec4899;
  border-color: #ec4899;
  color: #fff;
}
.rsb-piv-chip--docking-range.rsb-piv-chip--on {
  background: #f472b6;
  border-color: #f472b6;
  color: #fff;
}
.rsb-piv-chip--onUpdate-write.rsb-piv-chip--on {
  background: #f59e0b;
  border-color: #f59e0b;
  color: #fff;
}
.rsb-piv-chip--onUpdate-read.rsb-piv-chip--on {
  background: #d97706;
  border-color: #d97706;
  color: #fff;
}
.rsb-piv-chip--valid.rsb-piv-chip--on {
  background: #da0000;
  border-color: #da0000;
  color: #fff;
}
.rsb-piv-chip--articleNr.rsb-piv-chip--on {
  background: #3dac43;
  border-color: #3dac43;
  color: #fff;
}
.rsb-piv-chip--label.rsb-piv-chip--on {
  background: #059669;
  border-color: #059669;
  color: #fff;
}
.rsb-piv-chip--possibleChildren.rsb-piv-chip--on {
  background: #0891b2;
  border-color: #0891b2;
  color: #fff;
}
.rsb-piv-chip--subComponent.rsb-piv-chip--on {
  background: #7c3aed;
  border-color: #7c3aed;
  color: #fff;
}
.rsb-piv-chip--onValueChange.rsb-piv-chip--on {
  background: #ca8a04;
  border-color: #ca8a04;
  color: #fff;
}
.rsb-piv-chip--condition.rsb-piv-chip--on {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
}
.rsb-piv-chip--packaging.rsb-piv-chip--on {
  background: #6b7280;
  border-color: #6b7280;
  color: #fff;
}
.rsb-piv-chip--dimensioning.rsb-piv-chip--on {
  background: #78716c;
  border-color: #78716c;
  color: #fff;
}
.rsb-piv-chip--addOnSpot.rsb-piv-chip--on {
  background: #a3a3a3;
  border-color: #a3a3a3;
  color: #fff;
}
.rsb-piv-chip--secondary-geometry.rsb-piv-chip--on {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #fff;
}
.rsb-piv-chip--function.rsb-piv-chip--on {
  background: #9ca3af;
  border-color: #9ca3af;
  color: #fff;
}
.rsb-piv-chip--changed.rsb-piv-chip--on {
  background: #f59e0b;
  border-color: #f59e0b;
  color: #fff;
}

.rsb-piv-chip-icon {
  font-size: 12px;
}

.rsb-piv-chip-count {
  font-size: 10px;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.08);
  padding: 0 5px;
  border-radius: 8px;
  min-width: 16px;
  text-align: center;
}
.rsb-piv-chip--on .rsb-piv-chip-count {
  background: rgba(255, 255, 255, 0.25);
}

.rsb-piv-tree {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rsb-piv-row {
  border-radius: 8px;
  border: 1px solid transparent;
  overflow: hidden;
  transition: all 0.2s ease;
  animation: piv-row-in 0.25s ease-out both;
  border-left: 3px solid #e2e8f0;
}
.rsb-piv-row--info {
  border-left-color: #3b82f6;
}
.rsb-piv-row--mutation {
  border-left-color: #f59e0b;
}
.rsb-piv-row--warning {
  border-left-color: #f97316;
}
.rsb-piv-row--critical {
  border-left-color: #da0000;
}
.rsb-piv-row--delta {
  background: #fffbeb;
  border-color: rgba(245, 158, 11, 0.2);
}
.rsb-piv-row--open {
  background: var(--rsb-surface, #f8fafc);
  border-color: var(--rsb-border-light, #e5e7eb);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  margin-bottom: 4px;
}

@keyframes piv-row-in {
  from {
    opacity: 0;
    transform: translateX(-6px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
.rsb-piv-row:nth-child(1) {
  animation-delay: 0.03s;
}

.rsb-piv-row:nth-child(2) {
  animation-delay: 0.06s;
}

.rsb-piv-row:nth-child(3) {
  animation-delay: 0.09s;
}

.rsb-piv-row:nth-child(4) {
  animation-delay: 0.12s;
}

.rsb-piv-row:nth-child(5) {
  animation-delay: 0.15s;
}

.rsb-piv-row:nth-child(6) {
  animation-delay: 0.18s;
}

.rsb-piv-row:nth-child(7) {
  animation-delay: 0.21s;
}

.rsb-piv-row:nth-child(8) {
  animation-delay: 0.24s;
}

.rsb-piv-row:nth-child(9) {
  animation-delay: 0.27s;
}

.rsb-piv-row:nth-child(10) {
  animation-delay: 0.3s;
}

.rsb-piv-row:nth-child(11) {
  animation-delay: 0.33s;
}

.rsb-piv-row:nth-child(12) {
  animation-delay: 0.36s;
}

.rsb-piv-row:nth-child(13) {
  animation-delay: 0.39s;
}

.rsb-piv-row:nth-child(14) {
  animation-delay: 0.42s;
}

.rsb-piv-row:nth-child(15) {
  animation-delay: 0.45s;
}

.rsb-piv-row:nth-child(16) {
  animation-delay: 0.48s;
}

.rsb-piv-row:nth-child(17) {
  animation-delay: 0.51s;
}

.rsb-piv-row:nth-child(18) {
  animation-delay: 0.54s;
}

.rsb-piv-row:nth-child(19) {
  animation-delay: 0.57s;
}

.rsb-piv-row:nth-child(20) {
  animation-delay: 0.6s;
}

.rsb-piv-row:nth-child(21) {
  animation-delay: 0.63s;
}

.rsb-piv-row:nth-child(22) {
  animation-delay: 0.66s;
}

.rsb-piv-row:nth-child(23) {
  animation-delay: 0.69s;
}

.rsb-piv-row:nth-child(24) {
  animation-delay: 0.72s;
}

.rsb-piv-row:nth-child(25) {
  animation-delay: 0.75s;
}

.rsb-piv-row:nth-child(26) {
  animation-delay: 0.78s;
}

.rsb-piv-row:nth-child(27) {
  animation-delay: 0.81s;
}

.rsb-piv-row:nth-child(28) {
  animation-delay: 0.84s;
}

.rsb-piv-row:nth-child(29) {
  animation-delay: 0.87s;
}

.rsb-piv-row:nth-child(30) {
  animation-delay: 0.9s;
}

.rsb-piv-row:nth-child(31) {
  animation-delay: 0.93s;
}

.rsb-piv-row:nth-child(32) {
  animation-delay: 0.96s;
}

.rsb-piv-row:nth-child(33) {
  animation-delay: 0.99s;
}

.rsb-piv-row:nth-child(34) {
  animation-delay: 1.02s;
}

.rsb-piv-row:nth-child(35) {
  animation-delay: 1.05s;
}

.rsb-piv-row:nth-child(36) {
  animation-delay: 1.08s;
}

.rsb-piv-row:nth-child(37) {
  animation-delay: 1.11s;
}

.rsb-piv-row:nth-child(38) {
  animation-delay: 1.14s;
}

.rsb-piv-row:nth-child(39) {
  animation-delay: 1.17s;
}

.rsb-piv-row:nth-child(40) {
  animation-delay: 1.2s;
}

.rsb-piv-row-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.rsb-piv-row-head:hover {
  background: var(--rsb-surface-hover, #f3f4f6);
}

.rsb-piv-row-chevron {
  width: 16px;
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
  flex-shrink: 0;
}

.rsb-piv-row-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.rsb-piv-row-tag {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  flex-shrink: 0;
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.rsb-piv-tag--geometry {
  background: rgba(59, 130, 246, 0.08);
  color: #3b82f6;
  border-color: rgba(59, 130, 246, 0.2);
}

.rsb-piv-tag--geometry-group {
  background: rgba(99, 102, 241, 0.08);
  color: #6366f1;
  border-color: rgba(99, 102, 241, 0.2);
}

.rsb-piv-tag--docking {
  background: rgba(236, 72, 153, 0.08);
  color: #ec4899;
  border-color: rgba(236, 72, 153, 0.2);
}

.rsb-piv-tag--docking-range {
  background: rgba(244, 114, 182, 0.08);
  color: #f472b6;
  border-color: rgba(244, 114, 182, 0.2);
}

.rsb-piv-tag--onUpdate-write {
  background: rgba(245, 158, 11, 0.08);
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.2);
}

.rsb-piv-tag--onUpdate-read {
  background: rgba(217, 119, 6, 0.08);
  color: #d97706;
  border-color: rgba(217, 119, 6, 0.2);
}

.rsb-piv-tag--valid {
  background: rgba(218, 0, 0, 0.08);
  color: #da0000;
  border-color: rgba(218, 0, 0, 0.2);
}

.rsb-piv-tag--articleNr {
  background: rgba(61, 172, 67, 0.08);
  color: #3dac43;
  border-color: rgba(61, 172, 67, 0.2);
}

.rsb-piv-tag--label {
  background: rgba(5, 150, 105, 0.08);
  color: #059669;
  border-color: rgba(5, 150, 105, 0.2);
}

.rsb-piv-tag--possibleChildren {
  background: rgba(8, 145, 178, 0.08);
  color: #0891b2;
  border-color: rgba(8, 145, 178, 0.2);
}

.rsb-piv-tag--subComponent {
  background: rgba(124, 58, 237, 0.08);
  color: #7c3aed;
  border-color: rgba(124, 58, 237, 0.2);
}

.rsb-piv-tag--onValueChange {
  background: rgba(202, 138, 4, 0.08);
  color: #ca8a04;
  border-color: rgba(202, 138, 4, 0.2);
}

.rsb-piv-tag--condition {
  background: rgba(220, 38, 38, 0.08);
  color: #dc2626;
  border-color: rgba(220, 38, 38, 0.2);
}

.rsb-piv-tag--packaging {
  background: rgba(107, 114, 128, 0.08);
  color: #6b7280;
  border-color: rgba(107, 114, 128, 0.2);
}

.rsb-piv-tag--dimensioning {
  background: rgba(120, 113, 108, 0.08);
  color: #78716c;
  border-color: rgba(120, 113, 108, 0.2);
}

.rsb-piv-tag--addOnSpot {
  background: rgba(163, 163, 163, 0.08);
  color: #a3a3a3;
  border-color: rgba(163, 163, 163, 0.2);
}

.rsb-piv-tag--secondary-geometry {
  background: rgba(79, 70, 229, 0.08);
  color: #4f46e5;
  border-color: rgba(79, 70, 229, 0.2);
}

.rsb-piv-tag--function {
  background: rgba(156, 163, 175, 0.08);
  color: #9ca3af;
  border-color: rgba(156, 163, 175, 0.2);
}

.rsb-piv-row-label {
  font-size: 12px;
  color: #1a1a2e;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rsb-piv-row-delta-dot {
  font-size: 12px;
  animation: piv-delta-pulse 1.5s ease-in-out infinite;
}

@keyframes piv-delta-pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.85);
  }
}
.rsb-piv-row-severity {
  font-size: 9px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  flex-shrink: 0;
}
.rsb-piv-row-severity.rsb-piv-sev--info {
  background: #eff6ff;
  color: #1e40af;
}
.rsb-piv-row-severity.rsb-piv-sev--mutation {
  background: #fffbeb;
  color: #92400e;
}
.rsb-piv-row-severity.rsb-piv-sev--warning {
  background: #fff7ed;
  color: #9a3412;
}
.rsb-piv-row-severity.rsb-piv-sev--critical {
  background: #fef2f2;
  color: #991b1b;
}

.rsb-piv-detail {
  padding: 10px 12px 14px 38px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: piv-detail-in 0.2s ease-out;
  border-top: 1px solid var(--rsb-border-light, #e5e7eb);
}

@keyframes piv-detail-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.rsb-piv-detail-path {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
}

.rsb-piv-crumb {
  font-size: 10px;
  color: #64748b;
  padding: 2px 6px;
  background: var(--rsb-surface, #f8fafc);
  border-radius: 3px;
  border: 1px solid #e5e7eb;
}
.rsb-piv-crumb + .rsb-piv-crumb::before {
  content: "→ ";
  color: #94a3b8;
  margin-right: 2px;
}

.rsb-piv-detail-kv {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.rsb-piv-detail-key {
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  flex-shrink: 0;
  min-width: 80px;
}

.rsb-piv-detail-val {
  font-size: 12px;
  color: #1a1a2e;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.rsb-piv-detail-param {
  font-size: 10px;
  font-family: "SF Mono", "Fira Code", "Cascadia Code", monospace;
  color: #7c3aed;
  background: #f5f3ff;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #ede9fe;
}

.rsb-piv-diff {
  display: flex;
  align-items: stretch;
  gap: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  background: #fff;
}

.rsb-piv-diff-side {
  flex: 1;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rsb-piv-diff-side--before {
  background: #fef2f2;
  border-right: 1px solid #e5e7eb;
}
.rsb-piv-diff-side--before .rsb-piv-diff-val {
  color: #da0000;
  text-decoration: line-through;
  text-decoration-color: rgba(218, 0, 0, 0.3);
}
.rsb-piv-diff-side--after {
  background: #f0fdf4;
}
.rsb-piv-diff-side--after .rsb-piv-diff-val {
  color: #64748b;
}
.rsb-piv-diff-side--changed {
  background: #dcfce7;
}
.rsb-piv-diff-side--changed .rsb-piv-diff-val {
  color: #3dac43;
  font-weight: 700;
}

.rsb-piv-diff-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  color: #94a3b8;
}

.rsb-piv-diff-val {
  font-size: 12px;
  font-family: "SF Mono", "Fira Code", "Cascadia Code", monospace;
  word-break: break-all;
}

.rsb-piv-diff-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  background: var(--rsb-surface, #f8fafc);
  font-size: 14px;
  color: #94a3b8;
  flex-shrink: 0;
  border-left: 1px solid #e5e7eb;
  border-right: 1px solid #e5e7eb;
}

.rsb-piv-children {
  padding-top: 8px;
  border-top: 1px dashed var(--rsb-border-light, #e5e7eb);
}

.rsb-piv-children-title {
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 6px;
}

.rsb-piv-child {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  margin-left: 8px;
  border-left: 2px solid #e5e7eb;
  transition: background 0.15s ease;
}
.rsb-piv-child:hover {
  background: var(--rsb-surface-hover, #f3f4f6);
}

.rsb-piv-child-expr {
  font-size: 10px;
  font-family: "SF Mono", "Fira Code", "Cascadia Code", monospace;
  color: #6366f1;
  background: #eef2ff;
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 4px;
}

.rsb-piv-child-delta {
  font-size: 10px;
  font-family: "SF Mono", "Fira Code", "Cascadia Code", monospace;
  color: #3dac43;
  font-weight: 600;
  margin-left: auto;
}

.rsb-piv-depgraph {
  background: var(--rsb-surface, #f8fafc);
}

.rsb-piv-graph {
  max-height: 400px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rsb-piv-graph-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}
.rsb-piv-graph-row:hover {
  background: #fff;
  border-color: var(--rsb-border-light, #e5e7eb);
}
.rsb-piv-graph-row--active {
  background: linear-gradient(135deg, #fef2f2 0%, #fff 100%);
  border-color: rgba(218, 0, 0, 0.2);
  box-shadow: 0 1px 4px rgba(218, 0, 0, 0.06);
}

.rsb-piv-graph-src {
  font-size: 12px;
  font-weight: 600;
  font-family: "SF Mono", "Fira Code", "Cascadia Code", monospace;
  color: var(--rsb-primary, #da0000);
  min-width: 110px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  transition: color 0.15s ease;
}
.rsb-piv-graph-src:hover {
  color: var(--rsb-primary-hover, #b80000);
  text-decoration: underline;
}

.rsb-piv-graph-edge {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}

.rsb-piv-graph-line {
  width: 28px;
  height: 2px;
  background: linear-gradient(90deg, var(--rsb-primary, #da0000), rgba(218, 0, 0, 0.2));
  border-radius: 1px;
  position: relative;
  overflow: hidden;
}
.rsb-piv-graph-line::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  animation: piv-line-shimmer 2s ease-in-out infinite;
}

@keyframes piv-line-shimmer {
  from {
    left: -100%;
  }
  to {
    left: 200%;
  }
}
.rsb-piv-graph-arrow {
  color: var(--rsb-primary, #da0000);
  font-size: 12px;
}

.rsb-piv-graph-targets {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.rsb-piv-graph-tgt {
  font-size: 11px;
  font-family: "SF Mono", "Fira Code", "Cascadia Code", monospace;
  color: #1a1a2e;
  background: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  transition: all 0.15s ease;
}
.rsb-piv-graph-tgt:hover {
  background: var(--rsb-primary-bg, #fef2f2);
  border-color: var(--rsb-primary, #da0000);
  color: var(--rsb-primary, #da0000);
}

.rsb-piv-graph-leaf {
  font-size: 11px;
  color: #94a3b8;
  font-style: italic;
}

.rsb-piv-empty {
  text-align: center;
  padding: 32px 24px;
}
.rsb-piv-empty-icon {
  font-size: 28px;
  margin-bottom: 6px;
}
.rsb-piv-empty p {
  font-size: 13px;
  color: #64748b;
  margin: 0;
}
.rsb-piv-empty small {
  font-size: 11px;
  color: #94a3b8;
}

.rsb-piv-welcome {
  text-align: center;
  padding: 48px 32px;
}

.rsb-piv-welcome-icon {
  margin-bottom: 16px;
}

.rsb-piv-welcome-emoji {
  font-size: 56px;
  display: inline-block;
  animation: piv-float 3s ease-in-out infinite;
}

@keyframes piv-float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-6px) rotate(-3deg);
  }
  75% {
    transform: translateY(2px) rotate(2deg);
  }
}
.rsb-piv-welcome-title {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 8px;
}

.rsb-piv-welcome-text {
  font-size: 13px;
  color: #64748b;
  line-height: 1.6;
  max-width: 460px;
  margin: 0 auto 24px;
}

.rsb-piv-welcome-features {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  text-align: left;
}

.rsb-piv-welcome-feat {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #64748b;
  padding: 8px 14px;
  background: var(--rsb-surface, #f8fafc);
  border: 1px solid var(--rsb-border-light, #e5e7eb);
  border-radius: 8px;
  transition: all 0.2s ease;
}
.rsb-piv-welcome-feat:hover {
  border-color: var(--rsb-primary, #da0000);
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.rsb-piv-avatar {
  margin: 0 24px;
  border-radius: 12px;
  overflow: hidden;
  animation: piv-avatar-enter 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  border: 2px solid #e5e7eb;
  background: #fff;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}
.rsb-piv-avatar--ok {
  border-color: rgba(61, 172, 67, 0.3);
  background: linear-gradient(135deg, #f0fdf4 0%, #fff 100%);
}
.rsb-piv-avatar--warning {
  border-color: rgba(245, 158, 11, 0.3);
  background: linear-gradient(135deg, #fffbeb 0%, #fff 100%);
}
.rsb-piv-avatar--danger {
  border-color: rgba(218, 0, 0, 0.3);
  background: linear-gradient(135deg, #fef2f2 0%, #fff 100%);
}
.rsb-piv-avatar--neutral {
  border-color: rgba(59, 130, 246, 0.2);
  background: linear-gradient(135deg, #eff6ff 0%, #fff 100%);
}
.rsb-piv-avatar--minimized .rsb-piv-avatar-main {
  padding: 8px 14px;
}

@keyframes piv-avatar-enter {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.rsb-piv-avatar-main {
  display: flex;
  gap: 14px;
  padding: 16px 18px;
  align-items: flex-start;
}

.rsb-piv-avatar-face {
  flex-shrink: 0;
  width: 64px;
}

.rsb-piv-avatar-char {
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: piv-avatar-bob 3s ease-in-out infinite;
}

@keyframes piv-avatar-bob {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}
.rsb-piv-avatar-head {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #312e81 0%, #4338ca 50%, #6366f1 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  position: relative;
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(99, 102, 241, 0.25), 0 0 20px rgba(99, 102, 241, 0.2), 0 6px 16px rgba(67, 56, 202, 0.3);
}

.rsb-piv-avatar-eyes {
  display: flex;
  gap: 8px;
  margin-top: 2px;
}

.rsb-piv-avatar-eye {
  width: 8px;
  height: 9px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.6);
  animation: piv-avatar-blink 4s ease-in-out infinite;
}
.rsb-piv-avatar-eye--l {
  animation-delay: 0s;
}
.rsb-piv-avatar-eye--r {
  animation-delay: 0.1s;
}

@keyframes piv-avatar-blink {
  0%, 42%, 46%, 100% {
    transform: scaleY(1);
  }
  44% {
    transform: scaleY(0.1);
  }
}
.rsb-piv-avatar-mouth {
  width: 12px;
  height: 6px;
  border-radius: 0 0 12px 12px;
  background: rgba(255, 255, 255, 0.9);
  transition: all 0.3s ease;
}
.rsb-piv-avatar-mouth--ok {
  background: #4ade80;
  width: 12px;
  height: 6px;
  border-radius: 0 0 12px 12px;
}
.rsb-piv-avatar-mouth--warning {
  background: #fbbf24;
  height: 3px;
  border-radius: 2px;
}
.rsb-piv-avatar-mouth--danger {
  background: #f87171;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.rsb-piv-avatar-body {
  width: 36px;
  height: 16px;
  background: linear-gradient(135deg, #312e81, #4338ca);
  border-radius: 0 0 14px 14px;
  margin-top: -2px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  position: relative;
}

.rsb-piv-avatar-badge {
  font-size: 13px;
  margin-top: -4px;
}

.rsb-piv-avatar-speech {
  flex: 1;
  min-width: 0;
}

.rsb-piv-avatar-bubble {
  position: relative;
}

.rsb-piv-avatar-controls {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  gap: 2px;
}

.rsb-piv-avatar-ctrl {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 11px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.rsb-piv-avatar-ctrl:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #1a1a2e;
}

.rsb-piv-avatar-ctrl--voice {
  font-size: 13px;
}

.rsb-piv-avatar-greeting {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a2e;
  line-height: 1.5;
  margin-bottom: 6px;
  padding-right: 50px;
  animation: piv-text-reveal 0.6s ease-out both;
}

@keyframes piv-text-reveal {
  from {
    opacity: 0;
    clip-path: inset(0 100% 0 0);
  }
  to {
    opacity: 1;
    clip-path: inset(0 0 0 0);
  }
}
.rsb-piv-avatar-summary {
  font-size: 12px;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 12px;
  animation: piv-text-reveal 0.6s ease-out 0.3s both;
}

.rsb-piv-avatar-flow {
  animation: piv-fade-up 0.4s ease-out 0.5s both;
}

@keyframes piv-fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.rsb-piv-avatar-flow-title {
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.rsb-piv-avatar-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.rsb-piv-avatar-step {
  position: relative;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid #e5e7eb;
  margin-bottom: 0;
  animation: piv-step-cascade 0.4s ease-out both;
}
.rsb-piv-avatar-step:nth-child(1) {
  animation-delay: 0.6s;
}
.rsb-piv-avatar-step:nth-child(2) {
  animation-delay: 0.75s;
}
.rsb-piv-avatar-step:nth-child(3) {
  animation-delay: 0.9s;
}
.rsb-piv-avatar-step:nth-child(4) {
  animation-delay: 1.05s;
}
.rsb-piv-avatar-step:nth-child(5) {
  animation-delay: 1.2s;
}
.rsb-piv-avatar-step:nth-child(6) {
  animation-delay: 1.35s;
}
.rsb-piv-avatar-step:nth-child(7) {
  animation-delay: 1.5s;
}
.rsb-piv-avatar-step:nth-child(8) {
  animation-delay: 1.65s;
}
.rsb-piv-avatar-step:nth-child(9) {
  animation-delay: 1.8s;
}
.rsb-piv-avatar-step:nth-child(10) {
  animation-delay: 1.95s;
}
.rsb-piv-avatar-step:nth-child(11) {
  animation-delay: 2.1s;
}
.rsb-piv-avatar-step:nth-child(12) {
  animation-delay: 2.25s;
}
.rsb-piv-avatar-step:nth-child(13) {
  animation-delay: 2.4s;
}
.rsb-piv-avatar-step--info {
  border-left: 3px solid #3b82f6;
}
.rsb-piv-avatar-step--mutation {
  border-left: 3px solid #f59e0b;
}
.rsb-piv-avatar-step--warning {
  border-left: 3px solid #f97316;
}
.rsb-piv-avatar-step--critical {
  border-left: 3px solid #da0000;
}
.rsb-piv-avatar-step--critical {
  background: rgba(218, 0, 0, 0.03);
}

@keyframes piv-step-cascade {
  from {
    opacity: 0;
    transform: translateX(-12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
.rsb-piv-avatar-step-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
}

.rsb-piv-avatar-step-icon {
  font-size: 14px;
}

.rsb-piv-avatar-step-cat {
  font-size: 11px;
  font-weight: 700;
  color: #1a1a2e;
}

.rsb-piv-avatar-step-count {
  font-size: 10px;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.06);
  color: #64748b;
  padding: 0 6px;
  border-radius: 8px;
  min-width: 16px;
  text-align: center;
}

.rsb-piv-avatar-step-desc {
  font-size: 11px;
  color: #64748b;
  line-height: 1.5;
}

.rsb-piv-avatar-step-connector {
  position: absolute;
  bottom: -1px;
  left: 20px;
  width: 2px;
  height: 0;
  background: linear-gradient(180deg, #e5e7eb, transparent);
}
.rsb-piv-avatar-step:not(:last-child) .rsb-piv-avatar-step-connector {
  height: 10px;
  bottom: -10px;
  animation: piv-connector-grow 0.3s ease-out both;
}

@keyframes piv-connector-grow {
  from {
    height: 0;
  }
  to {
    height: 10px;
  }
}
.rsb-piv-avatar-warnings {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  animation: piv-fade-up 0.4s ease-out 1s both;
}

.rsb-piv-avatar-warn {
  font-size: 11px;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 6px;
  padding: 6px 10px;
  line-height: 1.5;
}

.rsb-piv-avatar-verdict {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
  animation: piv-fade-up 0.4s ease-out 1.2s both;
}
.rsb-piv-avatar-verdict--ok {
  background: #f0fdf4;
  color: #065f46;
  border: 1px solid rgba(61, 172, 67, 0.2);
}
.rsb-piv-avatar-verdict--warning {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid rgba(245, 158, 11, 0.2);
}
.rsb-piv-avatar-verdict--danger {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid rgba(218, 0, 0, 0.2);
}
.rsb-piv-avatar-verdict--neutral {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.rsb-piv-avatar-recall {
  padding: 8px 24px;
}

.rsb-piv-avatar-recall-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  background: #fff;
  color: #64748b;
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.rsb-piv-avatar-recall-btn:hover {
  border-color: var(--rsb-primary, #da0000);
  color: var(--rsb-primary, #da0000);
  background: var(--rsb-primary-bg, #fef2f2);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.rsb-piv-avatar-recall-face {
  font-size: 16px;
  animation: piv-avatar-bob 3s ease-in-out infinite;
}

.rsb-piv-cascade-graph {
  margin-top: 10px;
  position: relative;
}

.rsb-piv-title-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #0ea5e9;
  background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
  border: 1px solid rgba(14, 165, 233, 0.15);
  vertical-align: middle;
  animation: pivBadgePulse 3s ease-in-out infinite;
}

@keyframes pivBadgePulse {
  0%, 100% {
    opacity: 0.85;
  }
  50% {
    opacity: 1;
  }
}
.rsb-piv-d3-container {
  background: linear-gradient(178deg, #fafbfe 0%, #f6f8fb 40%, #f2f4f8 100%);
  border: 1px solid rgba(203, 213, 225, 0.18);
  border-radius: 16px;
  padding: 0;
  min-height: 150px;
  overflow: hidden;
  max-height: none;
  position: relative;
}
.rsb-piv-d3-container svg {
  display: block;
  width: 100%;
  overflow: visible;
}
.rsb-piv-d3-container svg text {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.rsb-docking-preview-wrapper {
  position: relative;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: #080d1a;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(79, 70, 229, 0.12);
}

.rsb-docking-preview {
  width: 100%;
  height: 680px;
  position: relative;
  overflow: hidden;
}
.rsb-docking-preview canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.rsb-docking-preview--compact {
  height: 440px;
}

.rsb-dp-legend {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(8, 13, 26, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(79, 70, 229, 0.2);
  border-radius: 10px;
  padding: 12px 16px;
  color: #cbd5e1;
  font: 500 10.5px/1.5 Rubik, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  z-index: 10;
  pointer-events: none;
  max-width: 220px;
}

.rsb-dp-legend-title {
  font-weight: 800;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #da0000;
  margin-bottom: 8px;
}

.rsb-dp-legend-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 6px;
}

.rsb-dp-legend-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.rsb-dp-legend-text strong {
  font-size: 10.5px;
  font-weight: 700;
  color: #e2e8f0;
}

.rsb-dp-legend-desc {
  font-size: 9px;
  font-weight: 500;
  color: #64748b;
  line-height: 1.3;
}

.rsb-dp-legend-hint {
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid rgba(79, 70, 229, 0.15);
  font-size: 9px;
  font-weight: 600;
  color: #64748b;
  font-style: italic;
}

.rsb-dp-legend-shape {
  flex-shrink: 0;
  margin-top: 2px;
}

.rsb-dp-legend-shape--slot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 3px solid #3b82f6;
  background: transparent;
  box-shadow: 0 0 4px rgba(59, 130, 246, 0.4);
}

.rsb-dp-legend-shape--plug {
  width: 10px;
  height: 10px;
  background: #a855f7;
  transform: rotate(45deg);
  border-radius: 2px;
  box-shadow: 0 0 4px rgba(168, 85, 247, 0.4);
}

.rsb-dp-legend-shape--peer {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2.5px solid #06b6d4;
  background: transparent;
  box-shadow: 0 0 4px rgba(6, 182, 212, 0.3);
}

.rsb-dp-legend-shape--range {
  width: 16px;
  height: 3px;
  background: #f59e0b;
  border-radius: 1px;
  margin-top: 5px;
  box-shadow: 0 0 4px rgba(245, 158, 11, 0.4);
}

.rsb-dp-legend-shape--connection {
  width: 16px;
  height: 0;
  border-top: 2px dashed #94a3b8;
  margin-top: 6px;
  opacity: 0.6;
}

.rsb-dp-info {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(8, 13, 26, 0.88);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(79, 70, 229, 0.18);
  border-radius: 10px;
  padding: 10px 14px;
  color: #94a3b8;
  font: 500 10px/1.5 Rubik, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  z-index: 10;
  pointer-events: none;
  max-width: 200px;
}

.rsb-dp-info-title {
  font-weight: 800;
  font-size: 10px;
  color: #e2e8f0;
  margin-bottom: 4px;
}

.rsb-dp-info-body {
  font-size: 9.5px;
  line-height: 1.4;
  color: #64748b;
  margin-bottom: 4px;
}

.rsb-dp-info-body--tip {
  color: #da0000;
  margin-bottom: 0;
}

.rsb-dp-tooltip {
  position: absolute;
  z-index: 15;
  pointer-events: none;
  transform: translate(16px, -120%);
  background: rgba(8, 13, 26, 0.92);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(79, 70, 229, 0.35);
  border-radius: 8px;
  padding: 5px 12px;
  color: #e2e8f0;
  font: 600 11px Rubik, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  letter-spacing: 0.2px;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  animation: rsb-dp-tooltip-in 0.1s ease;
}

@keyframes rsb-dp-tooltip-in {
  from {
    opacity: 0;
    transform: translate(16px, -120%) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translate(16px, -120%) scale(1);
  }
}
.rsb-dp-controls {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(8, 13, 26, 0.7);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(79, 70, 229, 0.18);
  border-radius: 20px;
  padding: 5px 18px;
  color: #64748b;
  font: 600 10px Rubik, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  letter-spacing: 0.3px;
  z-index: 10;
  pointer-events: none;
  white-space: nowrap;
}

.rsb-dp-drawer-backdrop {
  position: absolute;
  inset: 0;
  z-index: 25;
  background: rgba(0, 0, 0, 0.25);
  cursor: pointer;
  animation: rsb-dp-fade-in 0.2s ease;
}

@keyframes rsb-dp-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.rsb-dp-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 360px;
  max-width: 90%;
  z-index: 30;
  background: rgba(10, 15, 30, 0.97);
  backdrop-filter: blur(24px);
  border-left: 1px solid rgba(79, 70, 229, 0.25);
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.5), inset 1px 0 0 rgba(255, 255, 255, 0.03);
  overflow-y: auto;
  padding: 0 0 24px;
  font-family: Rubik, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  color: #e2e8f0;
  animation: rsb-dp-drawer-in 0.25s cubic-bezier(0.32, 0.72, 0, 1);
}
.rsb-dp-drawer::-webkit-scrollbar {
  width: 4px;
}
.rsb-dp-drawer::-webkit-scrollbar-track {
  background: transparent;
}
.rsb-dp-drawer::-webkit-scrollbar-thumb {
  background: rgba(79, 70, 229, 0.2);
  border-radius: 2px;
}

@keyframes rsb-dp-drawer-in {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
.rsb-dp-drawer-close {
  position: sticky;
  top: 0;
  float: right;
  z-index: 5;
  margin: 14px 14px 0 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(79, 70, 229, 0.2);
  background: rgba(8, 13, 26, 0.8);
  color: #94a3b8;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.rsb-dp-drawer-close:hover {
  background: rgba(79, 70, 229, 0.15);
  color: #fff;
}

.rsb-dp-drawer-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 28px 24px 20px;
  border-bottom: 1px solid rgba(79, 70, 229, 0.12);
}

.rsb-dp-drawer-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex-shrink: 0;
}

.rsb-dp-drawer-header-text {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rsb-dp-drawer-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(79, 70, 229, 0.15);
  border: 2px solid rgba(79, 70, 229, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.rsb-dp-drawer-kind {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.rsb-dp-drawer-section {
  padding: 18px 24px 4px;
}

.rsb-dp-drawer-section-title {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #da0000;
  margin-bottom: 12px;
}

.rsb-dp-drawer-field {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 10px;
  line-height: 1.4;
}

.rsb-dp-drawer-field-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #64748b;
  flex-shrink: 0;
}

.rsb-dp-drawer-field-value {
  font-size: 13px;
  font-weight: 600;
  color: #cbd5e1;
  text-align: right;
  word-break: break-all;
}

.rsb-dp-drawer-field-value--mono {
  font-family: "Monaco", "Menlo", "Courier New", monospace;
  font-size: 12px;
  color: #000;
}

.rsb-dp-drawer-condition {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 8px;
  padding: 10px 14px;
  font-family: "Monaco", "Menlo", "Courier New", monospace;
  font-size: 11px;
  font-weight: 600;
  color: #f59e0b;
  line-height: 1.5;
  word-break: break-all;
  white-space: pre-wrap;
}

.rsb-dp-drawer-summary-item {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  line-height: 1.5;
}

.rsb-dp-drawer-summary-bullet {
  color: #4f46e5;
  font-weight: 900;
  font-size: 14px;
  flex-shrink: 0;
  line-height: 1.35;
}

.rsb-dp-drawer-summary-item > span:last-child {
  font-size: 12.5px;
  font-weight: 500;
  color: #94a3b8;
}

.rsb-preview-canvas {
  width: 100%;
  height: 100%;
  min-height: 200px;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
}
.rsb-preview-canvas canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* ═══════════════════════════════════════════════════════
   Visual Canvas 3D  –  Three.js editor styles
   ═══════════════════════════════════════════════════════ */
.vc3-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 480px;
  background: #f0f0f0;
  border-radius: 8px;
  overflow: hidden;
  outline: none;
}

/* ── Toolbar ── */
.vc3-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: #ffffff;
  border-bottom: 1px solid #e0e0e0;
  flex-wrap: wrap;
  min-height: 40px;
}

.vc3-toolbar-group {
  display: flex;
  align-items: center;
  gap: 3px;
}

.vc3-toolbar-right {
  margin-left: auto;
}

.vc3-toolbar-sep {
  width: 1px;
  height: 22px;
  background: #ddd;
  margin: 0 4px;
}

.vc3-tool-btn {
  background: #f5f5f5;
  color: #555;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.12s ease;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.vc3-tool-btn:hover {
  background: #e8e8e8;
  color: #333;
  border-color: #bbb;
}
.vc3-tool-btn--active {
  background: #e74c3c;
  color: #fff;
  border-color: #c0392b;
}
.vc3-tool-btn--toggle {
  min-width: 28px;
  justify-content: center;
}
.vc3-tool-btn--disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}
.vc3-tool-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.vc3-selection-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 10px;
  background: #2266aa;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.vc3-tool-icon {
  font-size: 14px;
}

.vc3-tool-text {
  font-size: 11px;
}

.vc3-tool-label {
  color: #777;
  font-size: 11px;
  margin-right: 2px;
}

.vc3-tool-select {
  background: #fff;
  color: #444;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 11px;
  cursor: pointer;
}

.vc3-add-btn {
  color: #2d8a4e;
  border-color: #b5dfc5;
}
.vc3-add-btn:hover {
  background: #e8f5ee;
  border-color: #2d8a4e;
}

.vc3-sub-btn {
  color: #e74c3c;
  border-color: rgba(231, 76, 60, 0.35);
  background: rgba(231, 76, 60, 0.06);
}
.vc3-sub-btn:hover {
  background: rgba(231, 76, 60, 0.15);
  border-color: #e74c3c;
}

.vc3-smart-btn {
  background: #f3f0fa;
  color: #6b4fa0;
  border-color: #d5c8e8;
}
.vc3-smart-btn:hover {
  background: #e8e0f5;
}

.vc3-props-btn {
  background: #eef3fa;
  color: #3a6a9a;
  border-color: #c8d8ea;
}
.vc3-props-btn:hover {
  background: #dde8f5;
}

/* ── Workspace (viewport + smart panel side-by-side) ── */
.vc3-workspace {
  display: flex;
  flex: 1;
  position: relative;
  overflow: hidden;
}

/* ── 3D Viewport ── */
.vc3-viewport {
  flex: 1;
  position: relative;
  overflow: hidden;
  min-height: 400px;
}
.vc3-viewport canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* ── Selection Info Overlay (bottom-left) ── */
.vc3-info-overlay {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  padding: 10px 14px;
  color: #333;
  font-size: 12px;
  pointer-events: auto;
  z-index: 10;
  backdrop-filter: blur(8px);
  min-width: 200px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.vc3-info-name {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.vc3-info-name strong {
  font-size: 13px;
  color: #1a1a1a;
}

.vc3-info-type {
  background: #e8e8e8;
  color: #666;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10px;
  text-transform: uppercase;
}

.vc3-info-dims,
.vc3-info-pos {
  color: #777;
  font-size: 11px;
  margin-top: 2px;
}

.vc3-info-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.vc3-info-btn {
  background: #f0f0f0;
  color: #555;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 3px 10px;
  font-size: 11px;
  cursor: pointer;
}
.vc3-info-btn:hover {
  background: #e0e0e0;
  color: #333;
}
.vc3-info-btn--danger {
  border-color: #e8a0a0;
}
.vc3-info-btn--danger:hover {
  background: #fde8e8;
  color: #c0392b;
}

/* ── Parametric badge in info overlay ── */
.vc3-info-param-badge {
  background: #e8f5ee;
  color: #2d8a4e;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 600;
  border: 1px solid #b5dfc5;
}

/* ── Parametric stats badge (top-left of viewport) ── */
.vc3-param-badge-overlay {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255, 255, 255, 0.9);
  color: #2d8a4e;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(45, 138, 78, 0.3);
  z-index: 8;
  pointer-events: none;
  backdrop-filter: blur(6px);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

/* ── Keyboard Hints (bottom-right) ── */
.vc3-hints {
  position: absolute;
  bottom: 8px;
  right: 8px;
  display: flex;
  gap: 8px;
  color: #999;
  font-size: 10px;
  pointer-events: none;
  z-index: 5;
}
.vc3-hints span {
  background: rgba(255, 255, 255, 0.7);
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

/* ── Smart Placement Side Panel ── */
.vc3-smart-panel {
  width: 280px;
  background: #ffffff;
  border-left: 1px solid #e0e0e0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.vc3-smart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #e0e0e0;
  color: #333;
  font-size: 13px;
  font-weight: 600;
}

.vc3-smart-close {
  background: none;
  border: none;
  color: #999;
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
}
.vc3-smart-close:hover {
  color: #333;
}

.vc3-smart-section {
  border-bottom: 1px solid #eee;
}

.vc3-smart-section-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  user-select: none;
}
.vc3-smart-section-header:hover {
  background: #f5f5f5;
}

.vc3-smart-section-icon {
  font-size: 14px;
}

.vc3-smart-section-title {
  flex: 1;
}

.vc3-smart-section-toggle {
  font-size: 10px;
  color: #aaa;
}

.vc3-smart-list {
  padding: 4px 8px 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.vc3-smart-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: #f8f8f8;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  transition: all 0.12s;
  text-align: left;
  color: #444;
}
.vc3-smart-item:hover {
  background: #eef3fa;
  border-color: #4a90d9;
}

.vc3-smart-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

.vc3-smart-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.vc3-smart-label {
  font-size: 11px;
  font-weight: 500;
  color: #333;
}

.vc3-smart-desc {
  font-size: 10px;
  color: #888;
}

.vc3-smart-empty {
  padding: 20px 12px;
  text-align: center;
  color: #999;
  font-size: 12px;
}

.vc3-smart-tip {
  padding: 10px 12px;
  border-top: 1px solid #e0e0e0;
  color: #888;
  font-size: 10px;
  line-height: 1.4;
}

.vc3-smart-align-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  padding: 4px 8px 8px;
}

.vc3-smart-align-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: #f8f8f8;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  padding: 5px 4px;
  cursor: pointer;
  transition: all 0.12s;
  color: #555;
}
.vc3-smart-align-btn:hover {
  background: #eef3fa;
  border-color: #4a90d9;
}

.vc3-smart-align-icon {
  font-size: 16px;
}

.vc3-smart-align-text {
  font-size: 9px;
  color: #888;
  white-space: nowrap;
}

.vc3-loop-panel {
  padding: 8px 12px 12px;
}

.vc3-loop-active-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: #e8f4e8;
  border: 1px solid #a8d4a8;
  border-radius: 5px;
  padding: 6px 8px;
  font-size: 11px;
  color: #2e7d32;
  margin-bottom: 8px;
}

.vc3-loop-remove-btn {
  background: none;
  border: none;
  color: #c62828;
  cursor: pointer;
  font-size: 14px;
  padding: 0 2px;
  line-height: 1;
}
.vc3-loop-remove-btn:hover {
  color: #b71c1c;
}

.vc3-loop-field {
  margin-bottom: 8px;
}

.vc3-loop-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 4px;
}

.vc3-loop-axis-btns {
  display: flex;
  gap: 4px;
}

.vc3-loop-axis-btn {
  flex: 1;
  padding: 5px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #f8f8f8;
  font-size: 11px;
  font-weight: 500;
  color: #555;
  cursor: pointer;
  transition: all 0.12s;
}
.vc3-loop-axis-btn:hover {
  border-color: #4a90d9;
  background: #f0f6ff;
}
.vc3-loop-axis-btn--active {
  background: #4a90d9;
  color: #fff;
  border-color: #4a90d9;
}

.vc3-loop-input-row {
  display: flex;
  gap: 4px;
}

.vc3-loop-input {
  width: 100%;
  padding: 5px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 12px;
  font-family: "SF Mono", "Fira Code", monospace;
  background: #fff;
  color: #333;
}
.vc3-loop-input:focus {
  outline: none;
  border-color: #4a90d9;
  box-shadow: 0 0 0 2px rgba(74, 144, 217, 0.15);
}

.vc3-loop-param-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 4px;
}

.vc3-loop-chip {
  padding: 2px 7px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #f5f5f5;
  font-size: 10px;
  font-family: "SF Mono", "Fira Code", monospace;
  color: #666;
  cursor: pointer;
  transition: all 0.12s;
}
.vc3-loop-chip:hover {
  border-color: #4a90d9;
  background: #eef3fa;
  color: #4a90d9;
}
.vc3-loop-chip--active {
  background: #4a90d9;
  color: #fff;
  border-color: #4a90d9;
}

.vc3-loop-toggle-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #555;
  cursor: pointer;
}
.vc3-loop-toggle-row input[type=checkbox] {
  accent-color: #4a90d9;
}

.vc3-loop-preview-label {
  font-size: 10px;
  color: #888;
  padding: 4px 0 8px;
  line-height: 1.3;
  font-style: italic;
}

.vc3-loop-apply-btn {
  width: 100%;
  padding: 7px 12px;
  background: #4a90d9;
  color: #fff;
  border: none;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s;
}
.vc3-loop-apply-btn:hover {
  background: #3a7bc8;
}

.vc3-loop-empty {
  padding: 12px 0;
  text-align: center;
  color: #999;
  font-size: 11px;
}

/* ── CSS2D Labels (rendered by Three.js CSS2DRenderer) ── */
/* The label stack is a single positioned element with flex-column children.
   CSS handles spacing in screen-space (pixel-perfect, camera-independent). */
.vc3-label-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  pointer-events: none;
  user-select: none;
  /* Anchor point is bottom-center so the stack grows upward from the shape */
  transform: translateY(-100%);
}

.vc3-name-label {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: #333;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.75);
  padding: 2px 7px;
  border-radius: 3px;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.vc3-name-label--selected {
  font-size: 13px;
  font-weight: 700;
  color: #1a1a1a;
  background: rgba(255, 255, 255, 0.9);
  padding: 3px 10px;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.vc3-name-label--ghost {
  opacity: 0.35;
  font-style: italic;
  border: 1px dashed rgba(147, 51, 234, 0.3);
  background: rgba(147, 51, 234, 0.08);
  color: #9333ea;
}

.vc3-dim-label {
  font-family: "SF Mono", "Monaco", "Cascadia Code", monospace;
  font-size: 10px;
  color: #555;
  text-shadow: none;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.8);
  padding: 2px 8px;
  border-radius: 3px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.vc3-param-label {
  font-family: "SF Mono", "Monaco", "Cascadia Code", monospace;
  font-size: 9px;
  color: #665500;
  text-shadow: none;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.8);
  padding: 2px 8px;
  border-radius: 3px;
  border: 1px solid rgba(200, 160, 20, 0.25);
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ═══════════════════════════════════════════════════════
   Properties + Parameters Side Panel
   ═══════════════════════════════════════════════════════ */
.vc3-properties-panel {
  width: 300px;
  min-width: 300px;
  background: #ffffff;
  border-left: 1px solid #e0e0e0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 100%;
}

.vc3-props-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #e0e0e0;
  color: #333;
  font-size: 13px;
  font-weight: 600;
  background: #fafafa;
}

/* ── Sections ── */
.vc3-props-section {
  border-bottom: 1px solid #e8e8e8;
}

.vc3-props-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  color: #444;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}
.vc3-props-section-header:hover {
  background: #f5f5f5;
}

.vc3-props-toggle {
  color: #999;
  font-size: 10px;
}

.vc3-props-type-badge {
  background: #e8e8e8;
  color: #666;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10px;
  text-transform: uppercase;
  font-weight: normal;
}

/* ── Parameter Sliders ── */
.vc3-param-sliders {
  padding: 6px 12px;
}

.vc3-param-slider-row {
  margin-bottom: 8px;
}

.vc3-param-label-text {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3px;
}

.vc3-param-key {
  color: #e74c3c;
  font-family: "SF Mono", "Monaco", "Cascadia Code", monospace;
  font-size: 11px;
  font-weight: 600;
}

.vc3-param-value {
  color: #555;
  font-size: 10px;
  font-family: "SF Mono", "Monaco", "Cascadia Code", monospace;
}

.vc3-param-range {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: #1a1a1a;
  border-radius: 3px;
  cursor: pointer;
}
.vc3-param-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  background: #e74c3c;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.vc3-param-range::-webkit-slider-thumb:hover {
  background: #c0392b;
  transform: scale(1.2);
}

.vc3-param-hint {
  padding: 6px 12px;
  color: #999;
  font-size: 10px;
  line-height: 1.4;
  border-top: 1px solid #e8e8e8;
}

/* ── Range Slider min/max bounds ── */
.vc3-param-range-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.vc3-param-range-bound {
  color: #999;
  font-size: 9px;
  font-family: "SF Mono", "Monaco", "Cascadia Code", monospace;
  min-width: 28px;
  text-align: center;
  flex-shrink: 0;
}

/* ── Boolean Toggle Pills ── */
.vc3-param-toggle-row {
  margin-bottom: 8px;
}

.vc3-param-toggle-pills {
  display: flex;
  gap: 0;
  margin-top: 3px;
}

.vc3-param-pill {
  flex: 1;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 500;
  border: 1px solid #ddd;
  background: #f5f5f5;
  color: #888;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}
.vc3-param-pill:first-child {
  border-radius: 4px 0 0 4px;
}
.vc3-param-pill:last-child {
  border-radius: 0 4px 4px 0;
}
.vc3-param-pill:not(:first-child) {
  border-left: none;
}
.vc3-param-pill:hover {
  background: #e8e8e8;
  color: #555;
}
.vc3-param-pill--active {
  background: #e74c3c;
  color: #fff;
  border-color: #e74c3c;
  font-weight: 600;
}
.vc3-param-pill--active:hover {
  background: #c0392b;
  color: #fff;
}

/* ── Option Pills / Dropdown ── */
.vc3-param-option-row {
  margin-bottom: 8px;
}

.vc3-param-option-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 3px;
}
.vc3-param-option-pills .vc3-param-pill {
  flex: 0 1 auto;
  border-radius: 4px;
  padding: 3px 10px;
  font-size: 10px;
}
.vc3-param-option-pills .vc3-param-pill:not(:first-child) {
  border-left: 1px solid #ddd;
}
.vc3-param-option-pills .vc3-param-pill--active:not(:first-child) {
  border-left-color: #e74c3c;
}

.vc3-param-select {
  width: 100%;
  margin-top: 3px;
  padding: 4px 8px;
  font-size: 11px;
  font-family: "SF Mono", "Monaco", "Cascadia Code", monospace;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  color: #333;
  cursor: pointer;
  appearance: auto;
}
.vc3-param-select:focus {
  outline: none;
  border-color: #e74c3c;
  box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.15);
}

/* ── Material Parameter Display ── */
.vc3-param-material-row {
  margin-bottom: 8px;
}

.vc3-param-material-info {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
}

.vc3-param-color-swatch {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

.vc3-param-material-id {
  color: #666;
  font-size: 10px;
  font-family: "SF Mono", "Monaco", "Cascadia Code", monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════
   Roomle-UI–style Parameter Panel
   Matches the responsive-sidebar-wrapper__content skin
   ═══════════════════════════════════════════════════ */
.vc3-params-panel {
  font-family: "Lato", -apple-system, BlinkMacSystemFont, sans-serif;
  position: relative;
}

.vc3-params-list {
  padding: 0;
}

/* ── Sidebar Item (each parameter section) ── */
.vc3-sidebar-item {
  padding: 0 1rem;
}

.vc3-sidebar-item__label {
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 300;
  color: #121212;
  letter-spacing: 0.02em;
  padding-top: 1.25rem;
  padding-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.vc3-sidebar-separator {
  border: none;
  border-top: 1px solid #e0e0e0;
  margin: 0.75rem 0 0 0;
}

/* ── Range Slider (roomle-ui style) ── */
.vc3-range-container {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-gap: 0 0.75rem;
  align-items: start;
}

.vc3-range-slider-col {
  min-width: 0;
}

.vc3-range-track-wrap {
  position: relative;
  display: flex;
  align-items: center;
  height: 2rem;
}

.vc3-range-input {
  width: 100%;
  height: 2px;
  -webkit-appearance: none;
  appearance: none;
  background: #8f8f8f;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  margin: 0;
  outline: none;
}
.vc3-range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 1.25rem;
  height: 1.25rem;
  background: #282828;
  border: 2px solid #fff;
  border-radius: 100%;
  cursor: pointer;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.07);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  /* Center thumb vertically on the 2px track */
  margin-top: calc((2px - 1.25rem) / 2);
}
.vc3-range-input::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.13);
}
.vc3-range-input::-moz-range-thumb {
  width: 1.25rem;
  height: 1.25rem;
  background: #282828;
  border: 2px solid #fff;
  border-radius: 100%;
  cursor: pointer;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.07);
}
.vc3-range-input {
  /* Filled track (left side) for webkit */
}
.vc3-range-input::-webkit-slider-runnable-track {
  height: 2px;
  background: #8f8f8f;
  border: 0;
  border-radius: 0;
}
.vc3-range-input::-moz-range-track {
  height: 2px;
  background: #8f8f8f;
  border: 0;
}
.vc3-range-input::-moz-range-progress {
  height: 2px;
  background: #282828;
}

.vc3-range-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 2px;
}

.vc3-range-label {
  color: #8f8f8f;
  font-size: 0.625rem;
  font-weight: 300;
}

/* ── Numeric Input Pill (rounded input next to slider) ── */
.vc3-numeric-input {
  height: 2rem;
  min-width: 4.5rem;
  border: 1px solid #d3d3d3;
  border-radius: 1rem;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0 0.6rem;
}
.vc3-numeric-input .vc3-param-value {
  color: #2e2e2e;
  font-size: 0.875rem;
  font-weight: 400;
  font-family: "Lato", -apple-system, BlinkMacSystemFont, sans-serif;
  text-align: right;
}
.vc3-numeric-input .vc3-param-unit {
  color: #8f8f8f;
  font-size: 0.75rem;
  font-weight: 300;
}

/* ── Options / Boolean Toggles (Yes/No buttons) ── */
.vc3-options-container {
  padding: 0;
}

.vc3-options-preview {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  grid-gap: 0.4rem;
}

.vc3-option-value {
  border: 1px solid #d3d3d3;
  border-radius: 0;
  cursor: pointer;
  background: #fff;
  padding: 0;
  transition: all 0.15s ease;
}
.vc3-option-value:hover {
  border-color: #bababa;
}
.vc3-option-value--selected {
  border-color: rgba(40, 40, 40, 0.4);
}
.vc3-option-value--selected .vc3-option-label {
  background-color: #282828;
  color: #fff;
}

.vc3-option-label {
  display: block;
  height: 1.8rem;
  min-width: 2rem;
  line-height: 1.8rem;
  text-align: center;
  padding: 0 1rem;
  font-size: 0.875rem;
  color: #121212;
  background-color: #fff;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

/* ── Select Dropdown (for many options) ── */
.vc3-select-dropdown {
  width: 100%;
  font-size: 0.875rem;
  color: #121212;
  padding: 0.5rem 1.4rem 0.5rem 0.8rem;
  border: 1px solid #d3d3d3;
  border-radius: 0;
  background: #fff;
  cursor: pointer;
  appearance: auto;
}
.vc3-select-dropdown:focus {
  outline: none;
  border-color: #282828;
}

/* ── Material Circle Picker (inline preview: 3 items) ── */
.vc3-material-preview {
  display: flex;
  flex-wrap: nowrap;
  padding: 0;
  gap: 0.75rem;
}

.vc3-material-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  padding: 0.25rem 0;
  width: 4.5rem;
  flex-shrink: 0;
}
.vc3-material-item--selected .vc3-material-label {
  font-weight: 700;
}

.vc3-material-circle {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 100%;
  box-shadow: inset 0 8px 12px 0 rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background-color: #d3d3d3;
  background-size: cover;
  background-position: center;
  transition: transform 0.15s ease;
}
.vc3-material-circle:hover {
  transform: scale(1.08);
}

.vc3-material-check {
  width: 50%;
  height: 50%;
  filter: drop-shadow(1px -1px 2px rgba(0, 0, 0, 0.5));
}

.vc3-material-label {
  font-size: 0.7rem;
  color: #121212;
  text-align: center;
  margin-top: 0.3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  font-weight: 400;
  padding: 0 0.15rem;
}

/* ── Show All button ── */
.vc3-material-show-all {
  display: block;
  margin-top: 0.5rem;
  background: none;
  border: 1px solid #d3d3d3;
  border-radius: 1rem;
  color: #282828;
  font-size: 0.75rem;
  font-family: "Lato", sans-serif;
  font-weight: 400;
  padding: 0.3rem 1rem;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.vc3-material-show-all:hover {
  background-color: #282828;
  color: #fff;
}

/* ── Material Drawer Overlay ── */
.vc3-material-drawer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  z-index: 20;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.vc3-material-drawer__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e0e0e0;
  flex-shrink: 0;
}

.vc3-material-drawer__back {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: none;
  border: none;
  color: #282828;
  font-size: 0.8rem;
  font-family: "Lato", sans-serif;
  font-weight: 400;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  transition: background-color 0.1s ease;
}
.vc3-material-drawer__back:hover {
  background-color: #f5f5f5;
}
.vc3-material-drawer__back svg {
  flex-shrink: 0;
}

.vc3-material-drawer__title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #121212;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.vc3-material-drawer__grid {
  display: flex;
  flex-wrap: wrap;
  padding: 0.75rem 0.5rem;
  gap: 0.25rem;
  overflow-y: auto;
  flex: 1;
}
.vc3-material-drawer__grid .vc3-material-item {
  width: 33.3333333333%;
}

/* ── Property Fields ── */
.vc3-props-fields {
  padding: 8px 12px;
}

.vc3-prop-field {
  margin-bottom: 8px;
}

.vc3-prop-field-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
}

.vc3-prop-field-label {
  color: #666;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-width: 50px;
}

.vc3-prop-expr-chip {
  background: #e8f5ee;
  color: #2d8a4e;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-family: "SF Mono", "Monaco", "Cascadia Code", monospace;
  border: 1px solid #b5dfc5;
  white-space: nowrap;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vc3-prop-bind-btn {
  background: #f0f0f0;
  color: #4a7aaa;
  border: 1px solid #ddd;
  border-radius: 3px;
  padding: 1px 6px;
  font-size: 10px;
  cursor: pointer;
  margin-left: auto;
  white-space: nowrap;
}
.vc3-prop-bind-btn:hover {
  background: #e0e8f5;
  color: #2a5a8a;
  border-color: #aac0dd;
}

.vc3-prop-unbind-btn {
  background: none;
  color: #999;
  border: none;
  font-size: 12px;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
}
.vc3-prop-unbind-btn:hover {
  color: #e74c3c;
}

.vc3-prop-field-value {
  display: flex;
  align-items: center;
  gap: 6px;
}

.vc3-prop-input {
  background: #1a2a33;
  color: #e0e0e0;
  border: 1px solid #3a4a55;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 11px;
  font-family: "SF Mono", "Monaco", "Cascadia Code", monospace;
  width: 100%;
  min-width: 0;
}
.vc3-prop-input:focus {
  border-color: #e74c3c;
  outline: none;
  color: #fff;
}
.vc3-prop-input--parametric {
  border-color: #3d8a5f;
  color: #5ddb8f;
  background: #1a2a22;
}
.vc3-prop-input--parametric:focus {
  border-color: #5ddb8f;
}

.vc3-prop-resolved {
  color: #999;
  font-size: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

.vc3-prop-divider {
  height: 1px;
  background: #e8e8e8;
  margin: 10px 0;
}

/* ── Expression Binding Popup ── */
.vc3-bind-popup {
  background: #fafafa;
  border: 1px solid #4a90d9;
  border-radius: 8px;
  margin: 8px 10px;
  overflow: hidden;
}

.vc3-bind-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #f0f0f0;
  border-bottom: 1px solid #ddd;
  color: #555;
  font-size: 12px;
}
.vc3-bind-header strong {
  color: #2d8a4e;
}

.vc3-bind-suggestions {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 200px;
  overflow-y: auto;
}

.vc3-bind-suggestion {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 6px 10px;
  cursor: pointer;
  text-align: left;
  color: #444;
  transition: all 0.1s;
}
.vc3-bind-suggestion:hover {
  background: #eef3fa;
  border-color: #4a90d9;
}

.vc3-bind-sug-expr {
  font-family: "SF Mono", "Monaco", "Cascadia Code", monospace;
  font-size: 11px;
  color: #2d8a4e;
  font-weight: 600;
  flex-shrink: 0;
}

.vc3-bind-sug-label {
  font-size: 10px;
  color: #777;
  flex: 1;
  min-width: 0;
}

.vc3-bind-sug-value {
  font-size: 10px;
  color: #999;
  flex-shrink: 0;
  font-family: "SF Mono", "Monaco", "Cascadia Code", monospace;
}

.vc3-bind-empty {
  padding: 12px;
  text-align: center;
  color: #999;
  font-size: 11px;
}

.vc3-bind-custom {
  padding: 8px 12px;
  border-top: 1px solid #e0e0e0;
}

.vc3-bind-hint {
  color: #777;
  font-size: 10px;
  margin-bottom: 6px;
}

.vc3-bind-hint-sm {
  color: #999;
  font-size: 9px;
}

.vc3-bind-input-row {
  display: flex;
  gap: 6px;
}

.vc3-bind-input {
  flex: 1;
  background: #fff;
  color: #333;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 5px 8px;
  font-size: 11px;
  font-family: "SF Mono", "Monaco", "Cascadia Code", monospace;
}
.vc3-bind-input:focus {
  border-color: #4a90d9;
  outline: none;
}
.vc3-bind-input::placeholder {
  color: #bbb;
}

.vc3-bind-apply-btn {
  background: #4a90d9;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 5px 12px;
  font-size: 11px;
  cursor: pointer;
  flex-shrink: 0;
}
.vc3-bind-apply-btn:hover {
  background: #5aa0e9;
}

.vc3-bind-param-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
  align-items: center;
}

.vc3-bind-param-chip {
  background: #e8f5ee;
  color: #2d8a4e;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-family: "SF Mono", "Monaco", "Cascadia Code", monospace;
  border: 1px solid #b5dfc5;
  cursor: default;
}

/* ═══════ Formula Builder ═══════ */
.vc3-formula-builder {
  background: #fafafa;
  border: 1px solid #6366f1;
  border-radius: 8px;
  margin: 8px 10px;
  overflow: hidden;
}

.vc3-formula-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: #eef2ff;
  border-bottom: 1px solid #c7d2fe;
  color: #4338ca;
  font-size: 12px;
  font-weight: 600;
}
.vc3-formula-header strong {
  color: #6366f1;
}

.vc3-formula-header-icon {
  font-size: 14px;
}

/* ── Live preview bar ── */
.vc3-formula-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: #f0fdf4;
  border-bottom: 1px solid #bbf7d0;
  font-size: 11px;
}

.vc3-formula-preview-label {
  color: #666;
  flex-shrink: 0;
}

.vc3-formula-preview-expr {
  font-family: "SF Mono", "Monaco", "Cascadia Code", monospace;
  font-size: 12px;
  color: #15803d;
  font-weight: 600;
  background: #dcfce7;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid #bbf7d0;
}

.vc3-formula-preview-value {
  font-family: "SF Mono", "Monaco", "Cascadia Code", monospace;
  font-size: 11px;
  color: #16a34a;
  margin-left: auto;
  flex-shrink: 0;
}

/* ── Steps ── */
.vc3-formula-step {
  padding: 8px 12px;
  border-bottom: 1px solid #f0f0f0;
}

.vc3-formula-step-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 11px;
  color: #555;
  font-weight: 500;
}

.vc3-formula-step-num {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #6366f1;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}

.vc3-formula-step-hint {
  color: #aaa;
  font-size: 10px;
  font-weight: 400;
}

/* ── Parameter grid (Step 1) ── */
.vc3-formula-param-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.vc3-formula-param-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5px 10px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  min-width: 56px;
}
.vc3-formula-param-btn:hover {
  background: #eef2ff;
  border-color: #6366f1;
}
.vc3-formula-param-btn--active {
  background: #eef2ff;
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}
.vc3-formula-param-btn--fixed {
  border-style: dashed;
}

.vc3-formula-param-key {
  font-family: "SF Mono", "Monaco", "Cascadia Code", monospace;
  font-size: 11px;
  font-weight: 600;
  color: #4338ca;
}

.vc3-formula-param-val {
  font-size: 9px;
  color: #999;
}

/* ── Operator grid (Step 2) ── */
.vc3-formula-op-grid {
  display: flex;
  gap: 4px;
  margin-bottom: 6px;
}

.vc3-formula-op-btn {
  flex: 1;
  padding: 6px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #555;
  text-align: center;
  transition: all 0.15s;
}
.vc3-formula-op-btn:hover {
  background: #f5f3ff;
  border-color: #8b5cf6;
}
.vc3-formula-op-btn--active {
  background: #f5f3ff;
  border-color: #8b5cf6;
  color: #7c3aed;
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

.vc3-formula-negate-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: #777;
  cursor: pointer;
  margin-top: 2px;
}
.vc3-formula-negate-row input[type=checkbox] {
  margin: 0;
}

/* ── Quick number buttons (Step 3) ── */
.vc3-formula-quick-nums {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-bottom: 6px;
}

.vc3-formula-quick-num {
  padding: 3px 8px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  font-family: "SF Mono", "Monaco", "Cascadia Code", monospace;
  color: #555;
  transition: all 0.1s;
}
.vc3-formula-quick-num:hover {
  background: #fef3c7;
  border-color: #f59e0b;
}
.vc3-formula-quick-num--active {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #92400e;
  font-weight: 600;
}

/* ── Modifier params ── */
.vc3-formula-mod-params {
  margin-bottom: 6px;
}

.vc3-formula-mod-label {
  font-size: 10px;
  color: #999;
  display: block;
  margin-bottom: 3px;
}

.vc3-formula-mod-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.vc3-formula-mod-chip {
  padding: 2px 8px;
  background: #e8f5ee;
  border: 1px solid #b5dfc5;
  border-radius: 4px;
  cursor: pointer;
  font-size: 10px;
  font-family: "SF Mono", "Monaco", "Cascadia Code", monospace;
  color: #2d8a4e;
  transition: all 0.1s;
}
.vc3-formula-mod-chip:hover {
  background: #d1fae5;
  border-color: #2d8a4e;
}
.vc3-formula-mod-chip--active {
  background: #d1fae5;
  border-color: #2d8a4e;
  font-weight: 600;
}

/* ── Custom modifier input ── */
.vc3-formula-custom-mod {
  margin-top: 4px;
}

.vc3-formula-mod-input {
  width: 100%;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 11px;
  font-family: "SF Mono", "Monaco", "Cascadia Code", monospace;
  color: #333;
  box-sizing: border-box;
}
.vc3-formula-mod-input:focus {
  border-color: #6366f1;
  outline: none;
}
.vc3-formula-mod-input::placeholder {
  color: #ccc;
}
.vc3-formula-mod-input--wide {
  font-size: 14px;
  padding: 8px 12px;
  text-align: center;
}

/* ── Apply button ── */
.vc3-formula-apply-btn {
  display: block;
  width: calc(100% - 24px);
  margin: 8px 12px;
  padding: 8px;
  background: #16a34a;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s;
}
.vc3-formula-apply-btn code {
  font-family: "SF Mono", "Monaco", "Cascadia Code", monospace;
  background: rgba(255, 255, 255, 0.2);
  padding: 1px 6px;
  border-radius: 3px;
  margin-left: 4px;
}
.vc3-formula-apply-btn:hover {
  background: #15803d;
}

/* ── Divider ── */
.vc3-formula-divider {
  height: 1px;
  background: #e5e7eb;
  margin: 4px 12px;
}

/* ── Smart suggestions (compact) ── */
.vc3-formula-suggestions {
  padding: 6px 12px;
}

.vc3-formula-suggestions-header {
  font-size: 10px;
  color: #6366f1;
  font-weight: 600;
  margin-bottom: 4px;
}

.vc3-formula-suggestions-list {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.vc3-formula-sug-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  cursor: pointer;
  font-size: 10px;
  transition: all 0.1s;
}
.vc3-formula-sug-btn code {
  font-family: "SF Mono", "Monaco", "Cascadia Code", monospace;
  color: #2d8a4e;
  font-weight: 600;
}
.vc3-formula-sug-btn:hover {
  background: #eef3fa;
  border-color: #4a90d9;
}

.vc3-formula-sug-value {
  color: #999;
  font-size: 9px;
}

/* ── Presets ── */
.vc3-formula-presets {
  padding: 6px 12px;
}

.vc3-formula-presets-header {
  font-size: 10px;
  color: #92400e;
  font-weight: 600;
  margin-bottom: 4px;
}

.vc3-formula-presets-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  max-height: 130px;
  overflow-y: auto;
}

.vc3-formula-preset-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 4px;
  cursor: pointer;
  font-size: 10px;
  color: #555;
  transition: all 0.1s;
  text-align: left;
}
.vc3-formula-preset-btn:hover {
  background: #fef3c7;
  border-color: #f59e0b;
}

.vc3-formula-preset-icon {
  font-size: 12px;
  flex-shrink: 0;
}

.vc3-formula-preset-label {
  font-weight: 500;
  color: #444;
  white-space: nowrap;
}

.vc3-formula-preset-desc {
  color: #999;
  font-size: 9px;
  white-space: nowrap;
}

/* ── Manual expression fallback ── */
.vc3-formula-manual {
  padding: 6px 12px 10px;
}

.vc3-formula-manual-header {
  font-size: 10px;
  color: #777;
  font-weight: 500;
  margin-bottom: 4px;
}

.vc3-formula-manual-row {
  display: flex;
  gap: 4px;
}

.vc3-formula-manual-input {
  flex: 1;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 11px;
  font-family: "SF Mono", "Monaco", "Cascadia Code", monospace;
  color: #333;
}
.vc3-formula-manual-input:focus {
  border-color: #6366f1;
  outline: none;
}
.vc3-formula-manual-input::placeholder {
  color: #ccc;
}

.vc3-formula-manual-apply {
  background: #4a90d9;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 11px;
  cursor: pointer;
  flex-shrink: 0;
}
.vc3-formula-manual-apply:hover {
  background: #5aa0e9;
}

.vc3-formula-empty {
  padding: 12px;
  text-align: center;
  color: #999;
  font-size: 11px;
}

.vc3-formula-hint {
  padding: 8px 12px;
  color: #888;
  font-size: 11px;
  line-height: 1.4;
  background: #fffbe6;
  border-radius: 4px;
  margin-top: 6px;
}

/* ── Empty state ── */
.vc3-props-empty {
  padding: 30px 20px;
  text-align: center;
  color: #999;
  font-size: 12px;
}

.vc3-props-empty-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.vc3-props-empty-hint {
  margin-top: 6px;
  font-size: 10px;
  color: #bbb;
}

/* ═══════════════════════════════════════════════════════
   Dock Mode — visual dock point placement
   ═══════════════════════════════════════════════════════ */
/* Toolbar button */
.vc3-dock-btn {
  font-weight: 600;
}

.vc3-dock-btn--active {
  background: #da0000 !important;
  color: #fff !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}

/* Dock mode banner (top of viewport) */
.vc3-dock-banner {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 10px;
  padding: 6px 16px;
  color: #333;
  font-size: 12px;
  white-space: nowrap;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  animation: vc3-dock-slide-in 0.2s ease;
}

.vc3-dock-banner-icon {
  font-size: 16px;
}

.vc3-dock-banner-actions {
  display: flex;
  gap: 6px;
  margin-left: 8px;
}

.vc3-dock-banner-btn {
  background: #eef3ff;
  border: 1px solid #c7d2fe;
  border-radius: 6px;
  padding: 2px 10px;
  color: #4338ca;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.vc3-dock-banner-btn:hover {
  background: #dde5ff;
}
.vc3-dock-banner-btn.vc3-dock-banner-btn--active {
  background: #c7d2fe;
  border-color: #da0000;
  color: #3730a3;
}

.vc3-dock-banner-exit {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 6px;
  padding: 2px 10px;
  color: #dc2626;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.vc3-dock-banner-exit:hover {
  background: #fde8e8;
}

@keyframes vc3-dock-slide-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}
/* Hovered face hint (follows cursor area, bottom-center) */
.vc3-dock-face-hint {
  position: absolute;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  padding: 4px 14px;
  color: #4338ca;
  font-size: 11px;
  font-weight: 600;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Dock count badge (bottom-left) */
.vc3-dock-count {
  position: absolute;
  bottom: 8px;
  left: 8px;
  z-index: 15;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #c7d2fe;
  border-radius: 6px;
  padding: 3px 10px;
  color: #4338ca;
  font-size: 10px;
  font-weight: 700;
  pointer-events: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

/* Dock point labels (CSS2D) */
.vc3-dock-label {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  pointer-events: auto;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: 0.3px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  animation: vc3-dock-label-pop 0.2s ease;
  transition: transform 0.12s, box-shadow 0.12s;
}
.vc3-dock-label:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.vc3-dock-label--parent {
  color: #da0000;
  border: 1px solid #93c5fd;
}

.vc3-dock-label--child {
  color: #7c3aed;
  border: 1px solid #c4b5fd;
}

/* ── Dock Drawer (stacks over properties panel from right) ── */
.vc3-dock-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 300px;
  min-width: 300px;
  background: #ffffff;
  border-left: 1px solid #e0e0e0;
  display: flex;
  flex-direction: column;
  z-index: 20;
  box-shadow: -2px 0 12px rgba(0, 0, 0, 0.06);
  animation: vc3-dock-drawer-in 0.2s ease;
}

@keyframes vc3-dock-drawer-in {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
.vc3-dock-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: #fafafa;
  border-bottom: 1px solid #e0e0e0;
  flex-shrink: 0;
}

.vc3-dock-drawer-title {
  font-size: 13px;
  font-weight: 700;
  color: #1a1a1a;
}

.vc3-dock-drawer-body {
  flex: 1;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
}

.vc3-dock-popover-close {
  background: none;
  border: none;
  color: #999;
  font-size: 14px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}
.vc3-dock-popover-close:hover {
  background: #fde8e8;
  color: #dc2626;
}

.vc3-dock-popover-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vc3-dock-popover-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #666;
}

.vc3-dock-popover-input {
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 6px 10px;
  color: #333;
  font-size: 12px;
  font-weight: 500;
  outline: none;
  transition: border-color 0.15s;
}
.vc3-dock-popover-input:focus {
  border-color: #4a90d9;
}

.vc3-dock-popover-input--mono {
  font-family: "Monaco", "Menlo", "Courier New", monospace;
  font-size: 11px;
  color: #4338ca;
}

/* ── Mini Code Editor ── */
/* Type toggle */
.vc3-dock-type-toggle {
  display: flex;
  gap: 4px;
}

.vc3-dock-type-btn {
  flex: 1;
  padding: 5px 0;
  border-radius: 6px;
  border: 1px solid #ddd;
  background: #f5f5f5;
  color: #666;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.vc3-dock-type-btn:hover {
  background: #e8e8e8;
}

.vc3-dock-type-btn--active.vc3-dock-type-btn--parent {
  background: #eef3ff;
  border-color: #93c5fd;
  color: #da0000;
}

.vc3-dock-type-btn--active.vc3-dock-type-btn--child {
  background: #f3edff;
  border-color: #c4b5fd;
  color: #7c3aed;
}

/* Face badge */
.vc3-dock-face-badge {
  display: inline-block;
  background: #eef3ff;
  border: 1px solid #c7d2fe;
  border-radius: 4px;
  padding: 2px 8px;
  color: #4338ca;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  width: fit-content;
}

/* Position display — row-based with expression + resolved */
.vc3-dock-pos-display {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.vc3-dock-pos-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.vc3-dock-pos-label {
  width: 14px;
  font-size: 10px;
  font-weight: 700;
  color: #888;
  text-align: center;
  flex-shrink: 0;
}

.vc3-dock-pos-expr {
  flex: 1;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 2px 6px;
  font-family: "Monaco", "Menlo", "Courier New", monospace;
  font-size: 10px;
  font-weight: 600;
  color: #4338ca;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vc3-dock-pos-resolved {
  font-family: "Monaco", "Menlo", "Courier New", monospace;
  font-size: 9px;
  color: #888;
  flex-shrink: 0;
  min-width: 50px;
  text-align: right;
}

/* Rotation grid */
.vc3-dock-rot-grid {
  display: flex;
  gap: 4px;
}

.vc3-dock-rot-field {
  display: flex;
  align-items: center;
  gap: 3px;
  flex: 1;
}

.vc3-dock-rot-label {
  font-size: 10px;
  font-weight: 700;
  color: #888;
}

.vc3-dock-popover-input--sm {
  width: 100%;
  padding: 3px 5px !important;
  font-size: 10px !important;
  text-align: center;
}

.vc3-dock-popover-hint {
  font-weight: 400;
  font-size: 9px;
  color: #999;
  margin-left: 4px;
}

/* Action buttons */
.vc3-dock-popover-actions {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  border-top: 1px solid #e0e0e0;
  flex-shrink: 0;
  flex-wrap: wrap;
  background: #fafafa;
}

.vc3-dock-popover-btn {
  flex: 1;
  padding: 7px 0;
  border-radius: 6px;
  border: none;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}

.vc3-dock-popover-btn--confirm {
  background: #da0000;
  color: #fff;
}
.vc3-dock-popover-btn--confirm:hover {
  background: #1d4ed8;
}

.vc3-dock-popover-btn--cancel {
  background: #f0f0f0;
  color: #666;
}
.vc3-dock-popover-btn--cancel:hover {
  background: #e5e5e5;
}

.vc3-dock-popover-btn--delete {
  background: #fef2f2;
  color: #dc2626;
}
.vc3-dock-popover-btn--delete:hover {
  background: #fde8e8;
}

/* ── Dock Drawer Section Divider ── */
.vc3-dock-section-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid #e8e8e8;
}

.vc3-dock-section-divider-text {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #4a90d9;
  white-space: nowrap;
}

.vc3-dock-section-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #eef3ff;
  color: #4338ca;
  font-size: 9px;
  font-weight: 700;
}

.vc3-dock-section-desc {
  margin: 0;
  font-size: 9px;
  color: #888;
  line-height: 1.4;
}
.vc3-dock-section-desc strong {
  color: #555;
}

/* ── Assignment Sections ── */
.vc3-dock-assign-section {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
}

.vc3-dock-assign-section-header {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 5px 8px;
  background: #f5f5f5;
  border: none;
  color: #555;
  cursor: pointer;
  font-size: 10px;
  text-align: left;
}
.vc3-dock-assign-section-header:hover {
  background: #ececec;
  color: #333;
}

.vc3-dock-assign-section-name {
  font-weight: 600;
  flex: 1;
  font-family: "Monaco", "Menlo", "Courier New", monospace;
  font-size: 10px;
}

.vc3-dock-assign-section-count {
  font-size: 9px;
  color: #999;
}

.vc3-dock-assign-toggle {
  font-size: 9px;
  color: #999;
  flex-shrink: 0;
}

.vc3-dock-assign-entries {
  padding: 4px 6px 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  border-top: 1px solid #ececec;
}

.vc3-dock-assign-entry {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  border-radius: 4px;
  background: #f8f8f8;
}

.vc3-dock-assign-key {
  font-family: "Monaco", "Menlo", "Courier New", monospace;
  font-size: 10px;
  font-weight: 600;
  color: #4338ca;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vc3-dock-assign-eq {
  color: #aaa;
  font-size: 10px;
  flex-shrink: 0;
}

.vc3-dock-assign-value {
  flex: 1;
  font-family: "Monaco", "Menlo", "Courier New", monospace;
  font-size: 10px;
  color: #b45309;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vc3-dock-assign-remove {
  background: none;
  border: none;
  color: #bbb;
  cursor: pointer;
  font-size: 10px;
  padding: 1px 4px;
  border-radius: 3px;
  flex-shrink: 0;
}
.vc3-dock-assign-remove:hover {
  background: #fef2f2;
  color: #dc2626;
}

.vc3-dock-assign-add-row {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 2px;
}

.vc3-dock-assign-add-btn {
  background: #eef3ff;
  border: none;
  color: #4a90d9;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.12s;
}
.vc3-dock-assign-add-btn:hover {
  background: #dde8ff;
  color: #da0000;
}

/* ── Quick Actions Bar ── */
.vc3-dock-quick-actions {
  display: flex;
  gap: 4px;
  padding: 6px 14px 10px;
  border-top: 1px solid #e8e8e8;
  flex-shrink: 0;
}

.vc3-dock-quick-btn {
  flex: 1;
  padding: 5px 0;
  border-radius: 5px;
  border: 1px solid #ddd;
  background: #f5f5f5;
  color: #666;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s;
}
.vc3-dock-quick-btn:hover {
  background: #eef3ff;
  border-color: #93c5fd;
  color: #da0000;
}

/* ── Filter Chips (dock list) ── */
.vc3-dock-filter-chips {
  display: flex;
  gap: 4px;
  padding: 4px 12px 2px;
}

.vc3-dock-filter-chip {
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid #ddd;
  background: transparent;
  color: #888;
  font-size: 9px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s;
}
.vc3-dock-filter-chip:hover {
  background: #f5f5f5;
  color: #555;
}

.vc3-dock-filter-chip--active {
  background: #eef3ff;
  border-color: #93c5fd;
  color: #da0000;
}

/* ── Assignment Badge (dock list items) ── */
.vc3-dock-list-assign-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 1px 5px;
  border-radius: 6px;
  background: #eef3ff;
  color: #4a90d9;
  font-size: 9px;
  font-weight: 600;
  flex-shrink: 0;
}

.vc3-dock-list-item-right {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

/* ── Phase 3: Batch mode ── */
.vc3-dock-list-checkbox {
  font-size: 14px;
  color: #bbb;
  flex-shrink: 0;
  cursor: pointer;
  user-select: none;
}

.vc3-dock-list-checkbox--checked {
  color: #4a90d9;
}

.vc3-dock-list-item--batch-selected {
  background: #eef3ff !important;
}

.vc3-dock-batch-toolbar {
  padding: 6px 10px;
  border-bottom: 1px solid #e8e8e8;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vc3-dock-batch-select-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.vc3-dock-batch-count {
  font-size: 9px;
  color: #4a90d9;
  font-weight: 600;
  margin-left: auto;
}

.vc3-dock-batch-btn {
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid #ddd;
  background: #f5f5f5;
  color: #666;
  font-size: 9px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s;
}
.vc3-dock-batch-btn:hover {
  background: #eef3ff;
  border-color: #93c5fd;
  color: #da0000;
}

.vc3-dock-batch-btn--danger:hover {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #dc2626;
}

.vc3-dock-batch-ops {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.vc3-dock-batch-mask-row {
  display: flex;
  align-items: center;
  gap: 3px;
  flex: 1;
  min-width: 120px;
}

/* ── Phase 3: List action buttons (header) ── */
.vc3-dock-list-action-btn {
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #ddd;
  background: transparent;
  color: #888;
  font-size: 9px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s;
  white-space: nowrap;
}
.vc3-dock-list-action-btn:hover {
  background: #f5f5f5;
  color: #555;
}

.vc3-dock-list-action-btn--active {
  background: #eef3ff;
  border-color: #93c5fd;
  color: #da0000;
}

.vc3-dock-list-action-btn--paste {
  border-color: #86efac;
  color: #16a34a;
}
.vc3-dock-list-action-btn--paste:hover {
  background: #f0fdf4;
  color: #15803d;
}

/* ── Phase 3: Import / Export overlay ── */
.vc3-dock-io-overlay {
  position: absolute;
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
  width: 360px;
  max-width: calc(100% - 32px);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  z-index: 25;
  animation: vc3-dock-slide-in 0.18s ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
}

.vc3-dock-io-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid #e0e0e0;
}

.vc3-dock-io-title {
  font-size: 13px;
  font-weight: 700;
  color: #1a1a1a;
}

.vc3-dock-io-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.vc3-dock-io-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vc3-dock-io-btn {
  padding: 7px 12px;
  border-radius: 6px;
  border: none;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  background: #eef3ff;
  color: #4a90d9;
  transition: background 0.15s;
}
.vc3-dock-io-btn:hover {
  background: #dde8ff;
}

.vc3-dock-io-btn--import {
  background: #f0fdf4;
  color: #16a34a;
}
.vc3-dock-io-btn--import:hover {
  background: #dcfce7;
}

/* ═══════ DOCK LIST PANEL ═══════ */
.vc3-dock-list-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 300px;
  min-width: 300px;
  z-index: 19;
  background: #ffffff;
  backdrop-filter: blur(10px);
  border-left: 1px solid #e0e0e0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: vc3-dock-drawer-in 0.2s ease;
  box-shadow: -2px 0 12px rgba(0, 0, 0, 0.06);
}

.vc3-dock-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-bottom: 1px solid #e0e0e0;
  gap: 6px;
}

.vc3-dock-list-header-actions {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.vc3-dock-list-title {
  font-size: 12px;
  font-weight: 700;
  color: #1a1a1a;
}

.vc3-dock-list-close {
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  font-size: 14px;
  padding: 2px;
}
.vc3-dock-list-close:hover {
  color: #dc2626;
}

.vc3-dock-list-items {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
}
.vc3-dock-list-items::-webkit-scrollbar {
  width: 4px;
}
.vc3-dock-list-items::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 2px;
}

.vc3-dock-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 7px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.12s;
}
.vc3-dock-list-item:hover {
  background: #f5f5f5;
}
.vc3-dock-list-item.vc3-dock-list-item--selected {
  background: #eef3ff;
  border: 1px solid #93c5fd;
}

.vc3-dock-list-item-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.vc3-dock-list-type-badge {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  flex-shrink: 0;
}

.vc3-dock-list-type-badge--parent {
  background: #eef3ff;
  color: #da0000;
  border: 1px solid #93c5fd;
}

.vc3-dock-list-type-badge--child {
  background: #f3edff;
  color: #7c3aed;
  border: 1px solid #c4b5fd;
}

.vc3-dock-list-item-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.vc3-dock-list-item-mask {
  font-size: 11px;
  font-weight: 600;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vc3-dock-list-item-meta {
  font-size: 9px;
  color: #999;
}

.vc3-dock-list-item-actions {
  display: none;
  gap: 2px;
  flex-shrink: 0;
}

.vc3-dock-list-item:hover .vc3-dock-list-item-actions {
  display: flex;
}

.vc3-dock-list-action {
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  font-size: 12px;
  padding: 2px 4px;
  border-radius: 4px;
  transition: background 0.12s, color 0.12s;
}
.vc3-dock-list-action:hover {
  background: #f0f0f0;
  color: #333;
}

.vc3-dock-list-action--delete:hover {
  background: #fef2f2;
  color: #dc2626;
}

.vc3-dock-list-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  color: #999;
  text-align: center;
}

.vc3-dock-list-empty-icon {
  font-size: 28px;
  margin-bottom: 8px;
  opacity: 0.5;
}

.vc3-dock-list-empty p {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: #666;
}

.vc3-dock-list-empty-hint {
  font-size: 10px !important;
  font-weight: 400 !important;
  color: #999 !important;
  margin-top: 4px !important;
}

/* ═══════ DOCK TEMPLATE PICKER ═══════ */
.vc3-dock-template-overlay {
  position: absolute;
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
  width: 380px;
  max-width: calc(100% - 32px);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 0;
  z-index: 22;
  animation: vc3-dock-slide-in 0.18s ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.vc3-dock-template-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid #e0e0e0;
}

.vc3-dock-template-title {
  font-size: 13px;
  font-weight: 700;
  color: #1a1a1a;
}

.vc3-dock-template-close {
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  font-size: 14px;
  padding: 2px 4px;
  border-radius: 4px;
}
.vc3-dock-template-close:hover {
  color: #dc2626;
  background: #fef2f2;
}

.vc3-dock-template-desc {
  margin: 0;
  padding: 6px 14px 4px;
  font-size: 10px;
  color: #888;
}

.vc3-dock-template-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px 14px 14px;
}

.vc3-dock-template-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px 10px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  background: #fafafa;
  cursor: pointer;
  transition: all 0.15s ease;
  color: #333;
}
.vc3-dock-template-card:hover {
  background: #eef3ff;
  border-color: #93c5fd;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.vc3-dock-template-card:active {
  transform: translateY(0);
}

.vc3-dock-template-card-icon {
  font-size: 22px;
  line-height: 1;
}

.vc3-dock-template-card-name {
  font-size: 10px;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
}

.vc3-dock-template-card-count {
  font-size: 9px;
  color: #888;
  background: #f0f0f0;
  padding: 1px 6px;
  border-radius: 8px;
}

/* ═══════ DOCK LIST CLEAR BUTTON ═══════ */
.vc3-dock-list-clear-btn {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 5px;
  border: 1px solid #fca5a5;
  background: #fef2f2;
  color: #dc2626;
  cursor: pointer;
  transition: all 0.12s;
  font-weight: 600;
}
.vc3-dock-list-clear-btn:hover {
  background: #fde8e8;
  border-color: #f87171;
}

/* ═══════ DOCK CLEAR-ALL CONFIRMATION ═══════ */
.vc3-dock-confirm-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 30;
  animation: vc3-fade-in 0.15s ease;
}

.vc3-dock-confirm-dialog {
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid #fca5a5;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  max-width: 280px;
  animation: vc3-dock-slide-in 0.18s ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.vc3-dock-confirm-icon {
  font-size: 32px;
  display: block;
  margin-bottom: 8px;
}

.vc3-dock-confirm-text {
  font-size: 13px;
  color: #1a1a1a;
  margin: 0 0 4px;
}

.vc3-dock-confirm-hint {
  font-size: 10px;
  color: #888;
  margin: 0 0 16px;
}

.vc3-dock-confirm-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.vc3-dock-confirm-btn {
  font-size: 11px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.12s;
}

.vc3-dock-confirm-btn--danger {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fca5a5;
}
.vc3-dock-confirm-btn--danger:hover {
  background: #fde8e8;
}

.vc3-dock-confirm-btn--cancel {
  background: #f0f0f0;
  color: #666;
}
.vc3-dock-confirm-btn--cancel:hover {
  background: #e5e5e5;
  color: #333;
}

@keyframes vc3-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
/* ═══════ DOCK KEYBOARD HINTS ═══════ */
.vc3-dock-kbd-hints {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 15;
  opacity: 0.45;
  transition: opacity 0.2s;
  pointer-events: none;
}
.vc3-dock-kbd-hints:hover {
  opacity: 0.8;
}

.vc3-dock-kbd {
  font-size: 9px;
  color: #888;
  display: flex;
  align-items: center;
  gap: 4px;
}
.vc3-dock-kbd kbd {
  display: inline-block;
  padding: 1px 5px;
  font-size: 9px;
  font-family: inherit;
  border: 1px solid #ddd;
  border-radius: 3px;
  background: #ffffff;
  color: #555;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* ═══════ DOCK FACE SUMMARY CHIPS ═══════ */
.vc3-dock-face-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px 12px;
  border-bottom: 1px solid #e8e8e8;
}

.vc3-dock-face-chip {
  font-size: 9px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 8px;
  background: #eef3ff;
  color: #4338ca;
  border: 1px solid #c7d2fe;
}

/* ═══════ DOCK VALIDATION BAR ═══════ */
.vc3-dock-validation-bar {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 10px;
  border-bottom: 1px solid #e8e8e8;
  max-height: 80px;
  overflow-y: auto;
}
.vc3-dock-validation-bar::-webkit-scrollbar {
  width: 3px;
}
.vc3-dock-validation-bar::-webkit-scrollbar-thumb {
  background: #e5c07b;
  border-radius: 2px;
}

.vc3-dock-validation-item {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  font-size: 9px;
  line-height: 1.3;
  color: #666;
  padding: 2px 4px;
  border-radius: 4px;
}

.vc3-dock-validation-item--error {
  color: #dc2626;
  background: #fef2f2;
}

.vc3-dock-validation-item--warning {
  color: #b45309;
  background: #fffbeb;
}

.vc3-dock-validation-item--info {
  color: #da0000;
  background: #eef3ff;
}

/* ═══════ DOCK LIST ITEM WARNING STATE ═══════ */
.vc3-dock-list-item--warning {
  border-left: 2px solid #f59e0b;
}

/* ═══════ DOCK LABEL ANIMATION ═══════ */
@keyframes vc3-dock-label-pop {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
/* ═══════ DOCKING WIZARD DRAWER ═══════ */
.vc3-dock-wizard-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 360px;
  min-width: 360px;
  background: #ffffff;
  border-left: 1px solid #e0e0e0;
  display: flex;
  flex-direction: column;
  z-index: 20;
  animation: vc3-dock-wizard-slide-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.06);
}

@keyframes vc3-dock-wizard-slide-in {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
.vc3-dock-wizard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #fafafa;
  border-bottom: 1px solid #e0e0e0;
  flex-shrink: 0;
}

.vc3-dock-wizard-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vc3-dock-wizard-header-icon {
  font-size: 22px;
  line-height: 1;
}

.vc3-dock-wizard-header-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.vc3-dock-wizard-title {
  font-size: 14px;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: 0.3px;
}

.vc3-dock-wizard-subtitle {
  font-size: 11px;
  color: #888;
  font-weight: 400;
}

.vc3-dock-wizard-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px 14px 14px;
  /* Custom scrollbar */
}
.vc3-dock-wizard-body::-webkit-scrollbar {
  width: 5px;
}
.vc3-dock-wizard-body::-webkit-scrollbar-track {
  background: transparent;
}
.vc3-dock-wizard-body::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

/* ─── Section grouping (Linear, Spatial, Advanced) ─── */
.vc3-dock-wizard-section {
  margin-bottom: 14px;
}
.vc3-dock-wizard-section:nth-child(1) .vc3-dock-wizard-section-label {
  animation-delay: 0.08s;
}
.vc3-dock-wizard-section:nth-child(2) .vc3-dock-wizard-section-label {
  animation-delay: 0.22s;
}
.vc3-dock-wizard-section:nth-child(3) .vc3-dock-wizard-section-label {
  animation-delay: 0.36s;
}
.vc3-dock-wizard-section:last-of-type {
  margin-bottom: 0;
}

.vc3-dock-wizard-section-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #888;
  padding: 6px 2px 8px;
  animation: vc3-dock-wizard-section-enter 0.3s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

/* ─── Card grid ─── */
.vc3-dock-wizard-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ─── Individual preset card ─── */
.vc3-dock-wizard-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px 12px;
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  text-align: left;
  color: #333;
  position: relative;
  overflow: hidden;
  /* Staggered entrance animation */
  animation: vc3-dock-wizard-card-enter 0.3s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}
.vc3-dock-wizard-card:nth-child(1) {
  animation-delay: 0.04s;
}
.vc3-dock-wizard-card:nth-child(2) {
  animation-delay: 0.08s;
}
.vc3-dock-wizard-card:nth-child(3) {
  animation-delay: 0.12s;
}
.vc3-dock-wizard-card:nth-child(4) {
  animation-delay: 0.16s;
}
.vc3-dock-wizard-card:nth-child(5) {
  animation-delay: 0.2s;
}
.vc3-dock-wizard-card:nth-child(6) {
  animation-delay: 0.24s;
}
.vc3-dock-wizard-card:nth-child(7) {
  animation-delay: 0.28s;
}
.vc3-dock-wizard-card:nth-child(8) {
  animation-delay: 0.32s;
}
.vc3-dock-wizard-card:nth-child(9) {
  animation-delay: 0.36s;
}
.vc3-dock-wizard-card:nth-child(10) {
  animation-delay: 0.4s;
}
.vc3-dock-wizard-card {
  /* Hover glow effect */
}
.vc3-dock-wizard-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(74, 144, 217, 0.04) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
}
.vc3-dock-wizard-card:hover {
  background: #eef3ff;
  border-color: #93c5fd;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.vc3-dock-wizard-card:hover::before {
  opacity: 1;
}
.vc3-dock-wizard-card:active {
  transform: translateY(0);
  transition-duration: 0.05s;
}

/* Top row: icon + name + difficulty badge */
.vc3-dock-wizard-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vc3-dock-wizard-card-icon {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}

.vc3-dock-wizard-card-name {
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a;
  flex: 1;
  min-width: 0;
}

.vc3-dock-wizard-card-difficulty {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 3px;
  line-height: 1.3;
  flex-shrink: 0;
}
.vc3-dock-wizard-card-difficulty--Easy {
  color: #34d399;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.25);
}
.vc3-dock-wizard-card-difficulty--Medium {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.25);
}
.vc3-dock-wizard-card-difficulty--Advanced {
  color: #f87171;
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.25);
}

/* Description */
.vc3-dock-wizard-card-desc {
  font-size: 11px;
  color: #888;
  line-height: 1.45;
}

/* "Generates" meta line */
.vc3-dock-wizard-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.vc3-dock-wizard-card-generates {
  font-size: 10px;
  color: #4a90d9;
  font-weight: 500;
  letter-spacing: 0.1px;
}

/* Required params tags */
.vc3-dock-wizard-card-req {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}

.vc3-dock-wizard-card-req-label {
  font-size: 10px;
  color: #888;
  font-weight: 500;
}

.vc3-dock-wizard-card-req-param {
  font-size: 9px;
  font-family: "SF Mono", "Fira Code", monospace;
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 3px;
  padding: 1px 5px;
}

/* ─── Footer / Skip button ─── */
.vc3-dock-wizard-footer {
  margin-top: 10px;
  flex-shrink: 0;
}

.vc3-dock-wizard-footer-divider {
  height: 1px;
  background: #e8e8e8;
  margin-bottom: 10px;
}

.vc3-dock-wizard-skip {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  background: #fafafa;
  border: 1px dashed #ddd;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  color: #888;
  text-align: left;
}
.vc3-dock-wizard-skip:hover {
  background: #f0f0f0;
  border-color: #bbb;
  color: #333;
}

.vc3-dock-wizard-skip-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.vc3-dock-wizard-skip-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
}
.vc3-dock-wizard-skip-text strong {
  font-size: 12px;
  font-weight: 600;
  color: #333;
}
.vc3-dock-wizard-skip-text span {
  font-size: 10px;
  color: #999;
}

.vc3-dock-wizard-skip-arrow {
  font-size: 14px;
  color: #4a90d9;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}
.vc3-dock-wizard-skip:hover .vc3-dock-wizard-skip-arrow {
  transform: translateX(2px);
}

/* ─── Staggered card entrance keyframe ─── */
@keyframes vc3-dock-wizard-card-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* ─── Section label entrance ─── */
@keyframes vc3-dock-wizard-section-enter {
  from {
    opacity: 0;
    transform: translateX(-6px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
.vc3-dock-drag-hint {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(59, 130, 246, 0.9);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 6px;
  z-index: 20;
  pointer-events: none;
  animation: vc3-dock-drag-hint-pulse 1.5s ease-in-out infinite;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

@keyframes vc3-dock-drag-hint-pulse {
  0%, 100% {
    opacity: 0.9;
  }
  50% {
    opacity: 1;
  }
}
.vc3-dock-label {
  cursor: grab;
}

.vc3-dock-label:active {
  cursor: grabbing;
}

.vc3-dock-simulator-strip {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  padding: 5px 14px;
  z-index: 20;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  animation: vc3-dock-sim-fade-in 0.2s ease;
  pointer-events: auto;
}

@keyframes vc3-dock-sim-fade-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}
.vc3-dock-simulator-strip-icon {
  font-size: 14px;
  line-height: 1;
}

.vc3-dock-simulator-strip-text {
  font-size: 11px;
  font-weight: 500;
  color: #444;
  white-space: nowrap;
}

.vc3-dock-simulator-strip-close {
  background: none;
  border: none;
  font-size: 12px;
  color: #888;
  cursor: pointer;
  padding: 1px 4px;
  border-radius: 4px;
  line-height: 1;
}
.vc3-dock-simulator-strip-close:hover {
  background: #eee;
  color: #333;
}

/* ═══════════════════════════════════════════════════
   BOUNDING-BOX DIMENSION LABELS
   ═══════════════════════════════════════════════════ */
.vc3-bounding-dim-label {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 0;
  border-radius: 6px;
  background: rgba(59, 130, 246, 0.92);
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.1);
  pointer-events: none;
  white-space: nowrap;
  font-family: "SF Mono", "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  line-height: 1;
  transform: translateY(-50%);
  overflow: hidden;
}
.vc3-bounding-dim-label .vc3-bounding-dim-axis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 6px;
  font-size: 10px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(0, 0, 0, 0.2);
  letter-spacing: 0.05em;
  min-width: 20px;
}
.vc3-bounding-dim-label .vc3-bounding-dim-value {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.02em;
  padding: 4px 3px 4px 6px;
}
.vc3-bounding-dim-label .vc3-bounding-dim-unit {
  font-size: 9px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  padding-right: 7px;
}
.vc3-bounding-dim-label {
  /* Axis-specific accent colors */
}
.vc3-bounding-dim-label[data-axis=width] {
  background: rgba(239, 68, 68, 0.88);
  box-shadow: 0 1px 4px rgba(239, 68, 68, 0.25), 0 0 0 1px rgba(239, 68, 68, 0.3);
}
.vc3-bounding-dim-label[data-axis=depth] {
  background: rgba(59, 130, 246, 0.88);
  box-shadow: 0 1px 4px rgba(59, 130, 246, 0.25), 0 0 0 1px rgba(59, 130, 246, 0.3);
}
.vc3-bounding-dim-label[data-axis=height] {
  background: rgba(34, 197, 94, 0.88);
  box-shadow: 0 1px 4px rgba(34, 197, 94, 0.25), 0 0 0 1px rgba(34, 197, 94, 0.3);
}

/* Mini Code Editor — compact Monaco wrapper */
.mce-wrapper {
  border-radius: 6px;
  overflow: auto;
  resize: vertical;
  border: 1px solid #313244;
  min-height: 36px;
  transition: border-color 0.15s;
}
.mce-wrapper:focus-within {
  border-color: #89b4fa;
  box-shadow: 0 0 0 2px rgba(137, 180, 250, 0.12);
}
.mce-wrapper {
  /* Override Monaco internals for compact look */
}
.mce-wrapper .monaco-editor {
  border-radius: 6px;
  width: 100% !important;
  height: 100% !important;
}
.mce-wrapper {
  /* Monaco's wrapper also needs to fill the container */
}
.mce-wrapper > div {
  width: 100% !important;
  height: 100% !important;
}
.mce-wrapper .monaco-editor .margin {
  border-radius: 6px 0 0 6px;
}
.mce-wrapper {
  /* Make line numbers subtler */
}
.mce-wrapper .monaco-editor .line-numbers {
  color: #585b70 !important;
  font-size: 10px !important;
}
.mce-wrapper .monaco-editor .active-line-number {
  color: #a6adc8 !important;
}
.mce-wrapper {
  /* Scrollbar styling */
}
.mce-wrapper .monaco-editor .scrollbar .slider {
  background: rgba(166, 173, 200, 0.15) !important;
  border-radius: 3px;
}
.mce-wrapper .monaco-editor .scrollbar .slider:hover {
  background: rgba(166, 173, 200, 0.25) !important;
}

/* Placeholder overlay */
.mce-placeholder {
  color: #585b70;
  font-style: italic;
  font-family: "Monaco", "Menlo", "Courier New", monospace;
  font-size: 12px;
  pointer-events: none;
  user-select: none;
  white-space: pre;
  padding-left: 2px;
}

.rsb-save-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3.75rem;
  background: #fff;
  z-index: 10000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
}
.rsb-save-banner::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: #da0000;
}

.rsb-save-banner__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  padding: 0 1.5rem;
}

.rsb-save-banner__info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.rsb-save-banner__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #da0000;
  flex-shrink: 0;
  animation: rsb-save-banner-pulse 1.5s ease-in-out infinite;
}

@keyframes rsb-save-banner-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}
.rsb-save-banner__text {
  font-size: 0.9rem;
  font-weight: 500;
  color: #1a1a2e;
}

.rsb-save-banner__error {
  font-size: 0.8rem;
  color: #da0000;
  margin: 0 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}

.rsb-save-banner__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.rsb-save-banner__btn {
  padding: 0.4rem 1.25rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  line-height: 1.4;
}
.rsb-save-banner__btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.rsb-save-banner__btn--discard {
  background: transparent;
  border-color: #e2e8f0;
  color: #1a1a2e;
}
.rsb-save-banner__btn--discard:hover:not(:disabled) {
  background: #f9f9f9;
  border-color: #888;
}
.rsb-save-banner__btn--save {
  background: #da0000;
  color: #fff;
}
.rsb-save-banner__btn--save:hover:not(:disabled) {
  background: #ff1a1a;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100%;
  font-family: Rubik, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-weight: 400;
  color: #1a1a2e;
  background-color: #f9f9f9;
  line-height: 1.6;
}

a {
  color: #da0000;
  cursor: pointer;
  text-decoration: none;
}
a:hover {
  color: #ff1a1a;
}

.rsb-app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.rsb-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.rsb-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}
.rsb-loading__spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e2e8f0;
  border-top-color: #da0000;
  border-radius: 50%;
  animation: rsb-spin 0.8s linear infinite;
}

@keyframes rsb-spin {
  to {
    transform: rotate(360deg);
  }
}
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #bdbdbd;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #888;
}

.flex {
  display: flex;
  justify-content: center;
  align-items: center;
}