.fd-shell {
  display: flex;
  flex-direction: column;
}

.fd-shell__body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
}

.fd-shell__footer {
  padding: 1rem;
  border-top: 1px solid var(--app-border, #e5e7eb);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.fd-shell__btn {
  min-height: 2.25rem;
  padding: 0 0.9rem;
  border-radius: 0.65rem;
  border: 1px solid var(--app-border, #e5e7eb);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.fd-shell__btn--ghost {
  background: var(--app-surface, #fff);
  color: var(--app-text-muted, #475569);
}

.fd-shell__btn--ghost:hover {
  border-color: var(--app-accent, #10b981);
  color: var(--app-accent-strong, #047857);
}

.fd-shell__btn--primary {
  background: var(--app-accent, #10b981);
  border-color: var(--app-accent, #10b981);
  color: #fff;
  box-shadow: 0 8px 22px rgba(16, 185, 129, 0.22);
}

.fd-shell__btn--primary:hover {
  background: var(--app-accent-strong, #047857);
  border-color: var(--app-accent-strong, #047857);
}

.fd-fieldset {
  display: grid;
  gap: 0.7rem;
  align-content: start;
  align-items: start;
}

.fd-fieldset + .fd-fieldset {
  padding-top: 1rem;
  border-top: 1px solid var(--app-border, #e5e7eb);
}

.fd-fieldset__title {
  color: var(--app-text-soft, #94a3b8);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fd-field {
  display: grid;
  gap: 0.38rem;
}

.fd-field--fill {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.fd-field__label {
  color: var(--app-text, #0f172a);
  font-size: 0.76rem;
  font-weight: 700;
}

.fd-field__hint {
  color: var(--app-text-soft, #94a3b8);
  font-size: 0.68rem;
}

.fd-input,
.fd-select {
  width: 100%;
  min-height: 2.35rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--app-border, #e5e7eb);
  border-radius: 0.7rem;
  background: color-mix(in srgb, var(--app-surface, #fff) 90%, #f8fafc);
  color: var(--app-text, #0f172a);
  font-size: 0.8rem;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.fd-input:focus,
.fd-select:focus {
  border-color: var(--app-accent, #10b981);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
  background: var(--app-surface, #fff);
}

.fd-options {
  display: grid;
  gap: 0.45rem;
  padding: 0.3rem;
  border: 1px solid var(--app-border, #e5e7eb);
  border-radius: 0.8rem;
  background: color-mix(in srgb, var(--app-surface, #fff) 94%, #f8fafc);
  max-height: 14rem;
  overflow-y: auto;
}

.fd-options--fill {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  align-content: start;
}

.fd-options-search {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem;
  margin-bottom: 0.2rem;
  border: 1px solid var(--app-border, #e5e7eb);
  border-radius: 0.7rem;
  background: var(--app-surface, #fff);
}

.fd-options-search .material-symbols-outlined {
  font-size: 0.95rem;
  color: var(--app-text-soft, #94a3b8);
}

.fd-options-search-input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--app-text, #0f172a);
  font-size: 0.78rem;
  outline: none;
}

.fd-option {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 2.15rem;
  padding: 0.45rem 0.55rem;
  border-radius: 0.6rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.fd-option:hover {
  background: rgba(16, 185, 129, 0.08);
}

.fd-option__text {
  display: grid;
  gap: 0.12rem;
}

.fd-option__label {
  color: var(--app-text, #0f172a);
  font-size: 0.78rem;
  font-weight: 600;
}

.fd-option__meta {
  color: var(--app-text-soft, #94a3b8);
  font-size: 0.68rem;
}

.fd-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--app-border, #e5e7eb);
  border-radius: 0.8rem;
  background: color-mix(in srgb, var(--app-surface, #fff) 94%, #f8fafc);
}

.fd-switch__copy {
  display: grid;
  gap: 0.14rem;
}

.fd-switch__label {
  color: var(--app-text, #0f172a);
  font-size: 0.8rem;
  font-weight: 700;
}

.fd-switch__hint {
  color: var(--app-text-soft, #94a3b8);
  font-size: 0.68rem;
}

.fd-switch__control {
  appearance: none;
  width: 2.4rem;
  height: 1.4rem;
  border-radius: 999px;
  background: #cbd5e1;
  position: relative;
  cursor: pointer;
  transition: background-color 0.16s ease;
}

.fd-switch__control::before {
  content: '';
  position: absolute;
  top: 0.14rem;
  left: 0.16rem;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.2);
  transition: transform 0.16s ease;
}

.fd-switch__control:checked {
  background: var(--app-accent, #10b981);
}

.fd-switch__control:checked::before {
  transform: translateX(0.98rem);
}
