/* BurnDrop application shell */
:root {
  --bd-accent: #2563eb;
  --bd-accent-hover: #1d4ed8;
  --bd-accent-muted: rgba(37, 99, 235, 0.14);
  --bd-on-accent: #ffffff;
  --bd-alt: #14b8a6;
  --bd-alt-hover: #0f766e;
  --bd-alt-border: #0f766e;
  --bd-on-alt: #06201e;
  --bd-alt-muted: rgba(20, 184, 166, 0.15);
  --bd-sidebar-bg: #ffffff;
  --bd-sidebar-border: rgba(15, 23, 42, 0.1);
  --bd-sidebar-text: #334155;
  --bd-sidebar-muted: #94a3b8;
  --bd-sidebar-heading: #64748b;
  --bd-sidebar-active-bg: #eff6ff;
  --bd-sidebar-active-text: #1d4ed8;
  --bd-main-bg: #f8fafc;
  --bd-card-bg: #ffffff;
  --bd-card-border: rgba(15, 23, 42, 0.1);
  --bd-text: #111827;
  --bd-muted: #64748b;
  --bd-footer-bg: rgba(255, 255, 255, 0.86);
  --bd-footer-text: #64748b;
  --bd-footer-link: #2563eb;
  --bd-footer-link-hover: #1d4ed8;
  --bd-radius: 8px;
  --bd-sidebar-width: 16.75rem;
  --bd-topbar-h: 4rem;
  --bd-content-max: 88rem;
  --bd-panel-shadow: 0 14px 35px rgba(15, 23, 42, 0.06);
}

html[data-bd-theme="warm-teal"] {
  --bd-accent: #0f766e;
  --bd-accent-hover: #115e59;
  --bd-accent-muted: rgba(15, 118, 110, 0.16);
  --bd-on-accent: #ffffff;
  --bd-alt: #2dd4bf;
  --bd-alt-hover: #14b8a6;
  --bd-alt-border: #14b8a6;
  --bd-on-alt: #06201e;
  --bd-alt-muted: rgba(45, 212, 191, 0.2);
  --bd-sidebar-bg: #0f3d3e;
  --bd-sidebar-border: rgba(255, 255, 255, 0.1);
  --bd-sidebar-text: #f8f5ef;
  --bd-sidebar-muted: rgba(248, 245, 239, 0.62);
  --bd-sidebar-heading: rgba(248, 245, 239, 0.52);
  --bd-sidebar-active-bg: rgba(45, 212, 191, 0.16);
  --bd-sidebar-active-text: #ffffff;
  --bd-main-bg: #f8f5ef;
  --bd-card-border: rgba(15, 61, 62, 0.14);
  --bd-muted: #64748b;
}

html[data-bd-theme="navy-enterprise"] {
  --bd-accent: #1d4ed8;
  --bd-accent-hover: #1e40af;
  --bd-accent-muted: rgba(29, 78, 216, 0.16);
  --bd-alt: #60a5fa;
  --bd-alt-hover: #3b82f6;
  --bd-alt-border: #3b82f6;
  --bd-on-alt: #071a2d;
  --bd-alt-muted: rgba(96, 165, 250, 0.18);
  --bd-sidebar-bg: #071a2d;
  --bd-sidebar-border: rgba(255, 255, 255, 0.1);
  --bd-sidebar-text: #f8fafc;
  --bd-sidebar-muted: rgba(248, 250, 252, 0.62);
  --bd-sidebar-heading: rgba(248, 250, 252, 0.5);
  --bd-sidebar-active-bg: rgba(96, 165, 250, 0.16);
  --bd-sidebar-active-text: #ffffff;
  --bd-main-bg: #f8fafc;
}

html[data-bd-theme="dark-mint"] {
  --bd-accent: #14b8a6;
  --bd-accent-hover: #2dd4bf;
  --bd-accent-muted: rgba(20, 184, 166, 0.18);
  --bd-on-accent: #06201e;
  --bd-alt: #5eead4;
  --bd-alt-hover: #99f6e4;
  --bd-alt-border: #14b8a6;
  --bd-on-alt: #06201e;
  --bd-alt-muted: rgba(94, 234, 212, 0.18);
  --bd-sidebar-bg: #0d1117;
  --bd-sidebar-border: rgba(255, 255, 255, 0.08);
  --bd-sidebar-text: #e5e7eb;
  --bd-sidebar-muted: rgba(229, 231, 235, 0.62);
  --bd-sidebar-heading: rgba(229, 231, 235, 0.5);
  --bd-sidebar-active-bg: rgba(20, 184, 166, 0.16);
  --bd-sidebar-active-text: #f8fafc;
  --bd-main-bg: #0f172a;
  --bd-card-bg: #111827;
  --bd-card-border: rgba(148, 163, 184, 0.22);
  --bd-text: #f8fafc;
  --bd-muted: #9ca3af;
  --bd-footer-bg: #0d1117;
  --bd-footer-text: #cbd5e1;
  --bd-footer-link: #5eead4;
  --bd-footer-link-hover: #99f6e4;
  --bd-panel-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
}

html[data-bd-theme="mono-accent"] {
  --bd-accent: #00c2a8;
  --bd-accent-hover: #009983;
  --bd-accent-muted: rgba(0, 194, 168, 0.16);
  --bd-on-accent: #06201e;
  --bd-alt: #111827;
  --bd-alt-hover: #000000;
  --bd-alt-border: #111827;
  --bd-on-alt: #ffffff;
  --bd-alt-muted: rgba(17, 24, 39, 0.08);
  --bd-sidebar-bg: #0a0a0a;
  --bd-sidebar-border: rgba(255, 255, 255, 0.09);
  --bd-sidebar-text: #ffffff;
  --bd-sidebar-muted: rgba(255, 255, 255, 0.58);
  --bd-sidebar-heading: rgba(255, 255, 255, 0.48);
  --bd-sidebar-active-bg: rgba(0, 194, 168, 0.16);
  --bd-sidebar-active-text: #ffffff;
  --bd-main-bg: #f3f4f6;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 15px;
  -webkit-text-size-adjust: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.bd-body {
  margin: 0;
  min-height: 100vh;
  color: var(--bd-text);
  background: var(--bd-main-bg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
}

.bd-app {
  display: flex;
  min-height: 100vh;
}

.bd-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: min(100vw - 3rem, var(--bd-sidebar-width));
  max-width: var(--bd-sidebar-width);
  transform: translateX(-100%);
  transition: transform 0.2s ease;
  background: var(--bd-sidebar-bg);
  color: var(--bd-sidebar-text);
  border-right: 1px solid var(--bd-sidebar-border);
  display: flex;
  flex-direction: column;
}

.bd-app.bd-menu-open .bd-sidebar {
  transform: translateX(0);
}

@media (min-width: 900px) {
  .bd-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    transform: none;
    flex-shrink: 0;
    width: var(--bd-sidebar-width);
    max-width: var(--bd-sidebar-width);
  }

  .bd-backdrop {
    display: none !important;
  }

  .bd-menu-toggle {
    display: none !important;
  }
}

.bd-sidebar-inner {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 1.15rem 0.9rem;
  overflow-y: auto;
}

.bd-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.55rem 1.1rem;
  margin-bottom: 0.35rem;
  text-decoration: none;
  color: var(--bd-sidebar-text);
  font-weight: 850;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.bd-brand:hover {
  color: var(--bd-sidebar-active-text);
}

.bd-brand-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--bd-accent) 0%, var(--bd-alt) 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 10px 20px rgba(15, 23, 42, 0.14);
}

.bd-brand-text {
  line-height: 1.2;
}

.bd-nav-section {
  margin-top: 1rem;
}

.bd-nav-section:first-child {
  margin-top: 0;
}

.bd-nav-section-title {
  padding: 0 0.65rem;
  margin: 0 0 0.4rem;
  color: var(--bd-sidebar-heading);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bd-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.bd-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.58rem 0.65rem;
  margin-bottom: 0.2rem;
  border-radius: 7px;
  color: var(--bd-sidebar-text);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 650;
  border-left: 3px solid transparent;
}

.bd-nav-link:hover,
.bd-nav-link-active {
  background: var(--bd-sidebar-active-bg);
  color: var(--bd-sidebar-active-text);
}

.bd-nav-link-active {
  border-left-color: var(--bd-accent);
}

.bd-nav-count {
  min-width: 1.35rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: var(--bd-accent);
  color: var(--bd-on-accent);
  font-size: 0.72rem;
  font-weight: 850;
  text-align: center;
}

.bd-nav-link:focus-visible {
  outline: 2px solid var(--bd-accent);
  outline-offset: 2px;
}

.bd-sidebar-spacer {
  flex: 1;
  min-height: 1rem;
}

.bd-sidebar-account {
  padding-top: 0.75rem;
  border-top: 1px solid var(--bd-sidebar-border);
  font-size: 0.88rem;
}

.bd-sidebar-account ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.bd-sidebar-account li {
  margin-bottom: 0.35rem;
}

.bd-sidebar-account a,
.bd-sidebar-account button {
  color: var(--bd-sidebar-muted);
  text-decoration: none;
  background: none;
  border: none;
  padding: 0.35rem 0.5rem;
  display: inline-block;
  width: 100%;
  text-align: left;
  cursor: pointer;
  border-radius: 7px;
  font-size: 0.9rem;
}

.bd-sidebar-account a:hover,
.bd-sidebar-account button:hover {
  color: var(--bd-sidebar-active-text);
  background: var(--bd-sidebar-active-bg);
}

.bd-sidebar-hello {
  color: var(--bd-sidebar-muted);
  padding: 0.35rem 0.5rem 0.5rem;
  font-size: 0.82rem;
  word-break: break-word;
}

.bd-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(0, 0, 0, 0.45);
}

.bd-app.bd-menu-open .bd-backdrop {
  display: block;
}

.bd-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
}

.bd-topbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: var(--bd-topbar-h);
  padding: 0 1.15rem;
  background: var(--bd-card-bg);
  border-bottom: 1px solid var(--bd-card-border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.bd-topbar-title {
  font-size: 1.02rem;
  font-weight: 700;
  margin: 0;
  color: var(--bd-text);
  letter-spacing: -0.02em;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bd-topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
  margin-left: auto;
}

.bd-topbar-cta {
  display: none;
}

@media (min-width: 720px) {
  .bd-topbar-cta {
    display: inline-block;
  }
}

.bd-theme-picker {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.bd-theme-picker-label {
  color: var(--bd-muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.bd-theme-select {
  min-width: 8rem;
  max-width: 10rem;
  border: 1px solid var(--bd-card-border);
  border-radius: 7px;
  background: var(--bd-card-bg);
  color: var(--bd-text);
  padding: 0.42rem 0.55rem;
  font-size: 0.86rem;
}

.bd-theme-select:focus {
  outline: none;
  border-color: var(--bd-accent);
  box-shadow: 0 0 0 3px var(--bd-accent-muted);
}

@media (max-width: 620px) {
  .bd-theme-picker-label {
    display: none;
  }

  .bd-theme-select {
    min-width: 6.8rem;
    max-width: 7rem;
  }
}

.bd-topbar-auth {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  margin-left: 0;
}

.bd-workspace-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.82rem;
  color: var(--bd-muted);
  max-width: min(14rem, 38vw);
  overflow: hidden;
  white-space: nowrap;
}

.bd-workspace-chip-name {
  font-weight: 500;
  color: var(--bd-text);
  overflow: hidden;
  text-overflow: ellipsis;
}

.bd-topbar-auth-sep {
  color: var(--bd-card-border);
  flex-shrink: 0;
}

.bd-topbar-auth-link {
  display: inline-block;
  padding: 0.4rem 0.65rem;
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--bd-muted);
  border-radius: 6px;
  white-space: nowrap;
}

.bd-topbar-auth-link:hover {
  color: var(--bd-text);
  background: rgba(0, 0, 0, 0.05);
}

.bd-topbar-auth-link--primary {
  color: var(--bd-on-accent);
  background: var(--bd-accent);
}

.bd-topbar-auth-link--primary:hover {
  color: var(--bd-on-accent);
  background: var(--bd-accent-hover);
}

.bd-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--bd-text);
  cursor: pointer;
}

.bd-icon-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.bd-icon-btn:focus-visible {
  outline: 2px solid var(--bd-accent);
  outline-offset: 2px;
}

.bd-burger {
  display: block;
  width: 1.15rem;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  position: relative;
}

.bd-burger::before,
.bd-burger::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

.bd-burger::before {
  top: -6px;
}

.bd-burger::after {
  top: 6px;
}

.bd-content {
  flex: 1;
  padding: 1.35rem 1rem 2rem;
  max-width: none;
  width: 100%;
  margin: 0;
}

.bd-footer {
  padding: 0.75rem 1rem;
  font-size: 0.82rem;
  color: var(--bd-footer-text);
  border-top: 1px solid var(--bd-card-border);
  background: var(--bd-footer-bg);
}

.bd-footer a {
  color: var(--bd-footer-link);
  text-decoration: none;
}

.bd-footer a:hover {
  color: var(--bd-footer-link-hover);
  text-decoration: underline;
}

.bd-footer-sep {
  margin: 0 0.35rem;
  opacity: 0.6;
}

.bd-panel {
  background: var(--bd-card-bg);
  border: 1px solid var(--bd-card-border);
  border-radius: var(--bd-radius);
  padding: 1.35rem 1.25rem;
  box-shadow: var(--bd-panel-shadow);
}

.bd-lead {
  color: var(--bd-muted);
  margin: 0 0 1rem;
  font-size: 0.98rem;
}

kbd {
  font-family: ui-monospace, monospace;
  font-size: 0.85em;
  padding: 0.1rem 0.35rem;
  border: 1px solid var(--bd-card-border);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.05);
}

.bd-form-field {
  margin-bottom: 0.5rem;
}

.bd-textarea {
  width: 100%;
  min-height: 8rem;
  resize: vertical;
  font-family: inherit;
  line-height: 1.45;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--bd-card-border);
  border-radius: 8px;
  background: var(--bd-card-bg);
  color: var(--bd-text);
}

.bd-textarea:focus {
  outline: none;
  border-color: var(--bd-accent);
  box-shadow: 0 0 0 3px var(--bd-accent-muted);
}

.bd-font-monospace {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.bd-drop-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: stretch;
}

.bd-drop-link-row .bd-form-control {
  flex: 1;
  min-width: 12rem;
}

.bd-drop-result {
  padding-top: 0.75rem;
  margin-top: 0.75rem;
  border-top: 1px solid var(--bd-card-border);
}

@keyframes bd-create-success-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(40, 120, 60, 0.35);
  }
  100% {
    box-shadow: 0 0 0 14px rgba(40, 120, 60, 0);
  }
}

.bd-drop-result.bd-create-just-generated {
  animation: bd-create-success-ring 0.9s ease-out 1;
}

#copy-feedback.bd-copy-feedback-success {
  color: #1e7a42;
}

#copy-feedback.bd-copy-feedback-danger {
  color: #b42a2a;
}

/* Default link accent — sidebar and footer links override separately. */
.bd-content a,
.bd-panel a {
  color: var(--bd-accent);
}

.bd-content a:hover,
.bd-panel a:hover {
  color: var(--bd-accent-hover);
}

/* ----- Identity / forms (Bootstrap-free bd-* utilities) ----- */
.bd-row {
  display: flex;
  flex-wrap: wrap;
  margin-left: -0.5rem;
  margin-right: -0.5rem;
}

[class^="bd-col-"],
[class*=" bd-col-"] {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  width: 100%;
}

@media (min-width: 768px) {
  .bd-col-md-3 { flex: 0 0 25%; max-width: 25%; }
  .bd-col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
  .bd-col-md-6 { flex: 0 0 50%; max-width: 50%; }
  .bd-col-md-9 { flex: 0 0 75%; max-width: 75%; }
  .bd-offset-md-2 { margin-left: 16.666667%; }
}

.bd-col-12 { flex: 0 0 100%; max-width: 100%; }

.bd-mb-0 { margin-bottom: 0 !important; }
.bd-mb-2 { margin-bottom: 0.5rem !important; }
.bd-mb-3 { margin-bottom: 1rem !important; }
.bd-mb-4 { margin-bottom: 1.5rem !important; }
.bd-mt-1 { margin-top: 0.25rem !important; }
.bd-mt-3 { margin-top: 1rem !important; }
.bd-mt-4 { margin-top: 1.5rem !important; }
.bd-ms-1 { margin-left: 0.25rem !important; }
.bd-me-1 { margin-right: 0.25rem !important; }
.bd-ps-3 { padding-left: 1rem !important; }
.bd-w-100 { width: 100% !important; }
.bd-h-100 { height: 100% !important; }

.bd-h3 { font-size: 1.35rem; font-weight: 600; line-height: 1.25; margin: 0 0 0.75rem; }
.bd-h4 { font-size: 1.2rem; font-weight: 600; line-height: 1.3; margin: 0 0 0.75rem; }
.bd-h5 { font-size: 1.05rem; font-weight: 600; line-height: 1.35; margin: 0 0 0.5rem; }
.bd-h6 { font-size: 0.95rem; font-weight: 600; line-height: 1.4; margin: 0 0 0.5rem; }
.bd-display-4 { font-size: 2.25rem; font-weight: 300; line-height: 1.2; }
.bd-small { font-size: 0.875rem; }

.bd-text-danger { color: #b42a2a !important; }
.bd-text-muted { color: var(--bd-muted) !important; }
.bd-text-info { color: #0b6e99 !important; }
.bd-text-success { color: #1e7a42 !important; }
.bd-fw-bold { font-weight: 600 !important; }

.bd-flex { display: flex !important; }
.bd-align-center { align-items: center !important; }
.bd-justify-center { justify-content: center !important; }
.bd-justify-between { justify-content: space-between !important; }
.bd-md-block { display: none !important; }
@media (min-width: 768px) {
  .bd-md-block { display: block !important; }
}
.bd-inline { display: inline !important; }

.bd-form-horizontal {
  display: block;
}

.bd-form-inline {
  display: inline;
}

.bd-form-floating {
  position: relative;
  margin-bottom: 0;
}

.bd-form-floating.bd-mb-3 {
  margin-bottom: 1rem;
}

.bd-form-control {
  display: block;
  width: 100%;
  padding: 0.65rem 0.75rem;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--bd-text);
  background-color: var(--bd-card-bg);
  border: 1px solid var(--bd-card-border);
  border-radius: 8px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.bd-form-control:focus {
  outline: none;
  border-color: var(--bd-accent);
  box-shadow: 0 0 0 3px var(--bd-accent-muted);
}

.bd-form-floating > .bd-form-control:not(:placeholder-shown) ~ .bd-form-label,
.bd-form-floating > .bd-form-control:focus ~ .bd-form-label {
  transform: scale(0.82) translateY(-0.45rem);
  opacity: 0.95;
}

.bd-form-floating > .bd-form-label,
.bd-form-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--bd-text);
}

.bd-form-floating > .bd-form-label {
  position: absolute;
  left: 0.75rem;
  top: 0.7rem;
  pointer-events: none;
  transform-origin: left top;
  transition: transform 0.15s ease, opacity 0.15s ease;
  margin: 0;
}

.bd-form-check-input {
  width: 1rem;
  height: 1rem;
  margin-right: 0.4rem;
  vertical-align: middle;
  accent-color: var(--bd-accent);
}

.bd-checkbox .bd-form-label {
  display: inline-flex;
  align-items: center;
  width: auto;
  cursor: pointer;
}

/* Inline field + addon (e.g. verified email) */
.bd-input-group-inline {
  display: flex;
  align-items: stretch;
  width: 100%;
}

.bd-input-group-inline .bd-form-control--grouped {
  flex: 1;
  min-width: 0;
  border-radius: 8px 0 0 8px;
  border-right: none;
}

.bd-input-addon {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  padding: 0 0.6rem;
  border: 1px solid var(--bd-card-border);
  border-radius: 0 8px 8px 0;
  background: rgba(0, 0, 0, 0.03);
  font-size: 1.1rem;
  line-height: 1;
}

.bd-input-addon--verified {
  background: rgba(30, 122, 66, 0.12);
  border-color: rgba(30, 122, 66, 0.35);
  color: #1e7a42;
  font-weight: 700;
}

.bd-field-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--bd-muted);
  margin: 0 0 0.4rem;
}

.bd-field-hint {
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
}

.bd-validation-summary {
  padding: 0.65rem 0.85rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  background: rgba(180, 42, 42, 0.08);
  border: 1px solid rgba(180, 42, 42, 0.2);
  font-size: 0.9rem;
}

.bd-validation-summary:empty {
  display: none;
  padding: 0;
  margin: 0;
  border: none;
}

.bd-validation-summary ul {
  margin: 0;
  padding-left: 1.1rem;
}

/* Account / Manage chrome */
.bd-manage-shell {
  margin-bottom: 0.5rem;
}

.bd-manage-header {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--bd-card-border);
}

.bd-manage-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
  color: var(--bd-text);
}

.bd-manage-subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: var(--bd-muted);
}

.bd-manage-row {
  align-items: flex-start;
}

.bd-manage-sidebar {
  position: sticky;
  top: calc(var(--bd-topbar-h) + 0.75rem);
  align-self: flex-start;
  padding: 0.5rem 0.4rem 0.75rem 0;
  margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
  .bd-manage-sidebar {
    padding-right: 0.75rem;
    border-right: 1px solid var(--bd-card-border);
    margin-bottom: 0;
  }
}

.bd-manage-main {
  min-width: 0;
}

.bd-manage-main > h3:first-child,
.bd-manage-section-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 1rem;
  letter-spacing: -0.01em;
  color: var(--bd-text);
}

.bd-auth-panel {
  max-width: var(--bd-content-max);
  margin-left: auto;
  margin-right: auto;
  padding: 1.5rem 1.35rem 1.75rem;
}

.bd-auth-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 1.35rem;
  color: var(--bd-text);
}

.bd-auth-section-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--bd-muted);
}

.bd-auth-columns {
  align-items: flex-start;
}

.bd-auth-local {
  min-width: 0;
}

.bd-auth-external {
  min-width: 0;
}

@media (min-width: 768px) {
  .bd-auth-external {
    padding-left: 1.5rem;
    border-left: 1px solid var(--bd-card-border);
    min-height: 10rem;
  }
}

.bd-auth-links {
  list-style: none;
  margin: 1.15rem 0 0;
  padding: 0;
  font-size: 0.92rem;
}

.bd-auth-links li {
  margin-bottom: 0.45rem;
}

.bd-external-login-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
}

.bd-external-login-form .bd-btn {
  margin-right: 0;
}

.bd-btn {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  border: 1px solid transparent;
  vertical-align: middle;
}

.bd-btn:focus-visible {
  outline: 2px solid var(--bd-accent);
  outline-offset: 2px;
}

.bd-btn.bd-btn-alt:focus-visible {
  outline-color: var(--bd-alt);
}

.bd-btn-lg {
  padding: 0.65rem 1rem;
  font-size: 1rem;
}

.bd-btn-sm {
  padding: 0.35rem 0.6rem;
  font-size: 0.85rem;
}

.bd-btn-primary {
  background-color: var(--bd-accent);
  border-color: var(--bd-accent-hover);
  color: var(--bd-on-accent);
}

.bd-btn-primary:hover {
  background-color: var(--bd-accent-hover);
  border-color: var(--bd-accent-hover);
  color: var(--bd-on-accent);
}

.bd-btn-alt {
  background-color: var(--bd-alt);
  border-color: var(--bd-alt-border);
  color: var(--bd-on-alt);
}

.bd-btn-alt:hover {
  background-color: var(--bd-alt-hover);
  border-color: var(--bd-alt-border);
  color: var(--bd-on-alt);
}

a.bd-btn {
  text-decoration: none;
  display: inline-block;
}

a.bd-btn-primary {
  color: var(--bd-on-accent);
}

a.bd-btn-primary:hover {
  color: var(--bd-on-accent);
}

a.bd-btn-alt {
  color: var(--bd-on-alt);
}

a.bd-btn-alt:hover {
  color: var(--bd-on-alt);
}

a.bd-btn-danger {
  color: #fff;
}

.bd-btn-secondary {
  background: color-mix(in srgb, var(--bd-card-bg), var(--bd-main-bg) 42%);
  border-color: var(--bd-card-border);
  color: var(--bd-text);
}

.bd-btn-secondary:hover {
  background: var(--bd-accent-muted);
  border-color: var(--bd-accent);
  color: var(--bd-text);
}

.bd-topbar-cta {
  background-color: var(--bd-accent);
  border-color: var(--bd-accent-hover);
  color: var(--bd-on-accent);
}

.bd-topbar-cta:hover {
  background-color: var(--bd-accent-hover);
  border-color: var(--bd-accent-hover);
  color: var(--bd-on-accent);
}

.bd-btn-danger {
  background: #a93226;
  border-color: #8f2a20;
  color: #fff;
}

.bd-btn-danger:hover {
  background: #8f2a20;
  color: #fff;
}

/* Link-styled danger buttons live inside .bd-content/.bd-panel; default link:hover uses accent red and disappears on red fill. */
a.bd-btn-danger:hover {
  color: #fff;
}

.bd-btn-link {
  background: none;
  border: none;
  color: var(--bd-accent);
  padding: 0.35rem 0;
  text-decoration: underline;
}

.bd-btn-link:hover {
  color: var(--bd-accent-hover);
}

.bd-logout-btn {
  color: var(--bd-muted) !important;
}

.bd-alert {
  padding: 0.85rem 1rem;
  border-radius: var(--bd-radius);
  margin-bottom: 1rem;
  position: relative;
  border: 1px solid transparent;
}

.bd-alert-dismissible {
  padding-right: 2.5rem;
}

.bd-alert-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  border: none;
  background: transparent;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: inherit;
  opacity: 0.7;
}

.bd-alert-close:hover {
  opacity: 1;
}

.bd-alert-danger {
  background: rgba(180, 42, 42, 0.1);
  border-color: rgba(180, 42, 42, 0.25);
  color: #6a1e1e;
}

.bd-alert-warning {
  background: rgba(180, 120, 30, 0.12);
  border-color: rgba(160, 100, 20, 0.25);
  color: #5c4510;
}

.bd-alert-success {
  background: rgba(40, 120, 60, 0.1);
  border-color: rgba(40, 120, 60, 0.25);
  color: #1a4d28;
}

.bd-alert-info {
  background: rgba(20, 100, 140, 0.08);
  border-color: rgba(20, 100, 140, 0.2);
  color: #0b4a63;
}

.bd-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: 0.92rem;
}

.bd-table th,
.bd-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--bd-card-border);
  text-align: left;
}

.bd-table th {
  background: color-mix(in srgb, var(--bd-card-bg), var(--bd-main-bg) 48%);
  color: var(--bd-muted);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bd-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--bd-card-border);
  border-radius: var(--bd-radius);
  background: var(--bd-card-bg);
}

.bd-table-wrap .bd-table {
  margin-bottom: 0;
}

.bd-page-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.bd-action-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.bd-actions-cell {
  white-space: nowrap;
}

.bd-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 1.5rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 750;
  border: 1px solid transparent;
}

.bd-badge[class*="bd-badge-status-"]::before {
  content: "";
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 0.18rem color-mix(in srgb, currentColor, transparent 84%);
}

.bd-badge-neutral {
  color: var(--bd-muted);
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.08);
}

.bd-badge-info {
  color: #0b4a63;
  background: rgba(20, 100, 140, 0.08);
  border-color: rgba(20, 100, 140, 0.18);
}

.bd-badge-success {
  color: #1a4d28;
  background: rgba(40, 120, 60, 0.1);
  border-color: rgba(40, 120, 60, 0.22);
}

.bd-badge-warning {
  color: #5c4510;
  background: rgba(180, 120, 30, 0.12);
  border-color: rgba(160, 100, 20, 0.22);
}

.bd-badge-danger {
  color: #6a1e1e;
  background: rgba(180, 42, 42, 0.1);
  border-color: rgba(180, 42, 42, 0.22);
}

.bd-badge-status-created {
  color: #334155;
  background: rgba(100, 116, 139, 0.13);
  border-color: rgba(100, 116, 139, 0.26);
}

.bd-badge-status-sent {
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.28);
}

.bd-badge-status-opened {
  color: #0f766e;
  background: rgba(15, 118, 110, 0.13);
  border-color: rgba(15, 118, 110, 0.3);
}

.bd-badge-status-responded {
  color: #166534;
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(22, 101, 52, 0.34);
  box-shadow: inset 0 0 0 1px rgba(22, 101, 52, 0.08);
}

.bd-badge-status-expired {
  color: #92400e;
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(146, 64, 14, 0.32);
}

.bd-badge-status-deleted {
  color: #991b1b;
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(153, 27, 27, 0.34);
}

.bd-option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.65rem;
}

.bd-check-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--bd-card-border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--bd-card-bg), var(--bd-main-bg) 28%);
  cursor: pointer;
}

.bd-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.85rem;
}

.bd-tabs {
  border: 1px solid var(--bd-card-border);
  border-radius: 10px;
  background: var(--bd-card-bg);
  overflow: hidden;
}

.bd-tabs-list {
  display: flex;
  gap: 0.25rem;
  padding: 0.45rem;
  border-bottom: 1px solid var(--bd-card-border);
  background: color-mix(in srgb, var(--bd-card-bg), var(--bd-main-bg) 34%);
}

.bd-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.25rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--bd-muted);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 750;
  cursor: pointer;
}

.bd-tab:hover {
  color: var(--bd-text);
  background: color-mix(in srgb, var(--bd-card-bg), var(--bd-accent) 7%);
}

.bd-tab-active {
  color: var(--bd-text);
  background: var(--bd-card-bg);
  border-color: var(--bd-card-border);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.bd-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  min-height: 1.35rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  color: var(--bd-accent-strong);
  background: color-mix(in srgb, var(--bd-accent), transparent 84%);
  font-size: 0.76rem;
}

.bd-tab-panel {
  padding: 1rem;
}

.bd-subpanel {
  border: 1px solid var(--bd-card-border);
  border-radius: 8px;
  padding: 0.9rem;
  background: color-mix(in srgb, var(--bd-card-bg), transparent 18%);
}

.bd-form-designer-field {
  border: 1px solid var(--bd-card-border);
  border-radius: 8px;
  background: var(--bd-card-bg);
  padding: 0.85rem;
  margin-bottom: 0.75rem;
}

.bd-form-designer-field-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.bd-form-designer-grid {
  display: grid;
  grid-template-columns: minmax(14rem, 1.4fr) minmax(10rem, 1fr) minmax(7rem, 0.45fr) minmax(12rem, 1fr);
  gap: 0.75rem;
  align-items: end;
}

.bd-form-designer-grid .bd-form-field {
  margin-bottom: 0;
}

.bd-form-designer-check {
  min-height: 2.65rem;
  align-self: end;
}

.bd-form-designer-advanced {
  border-top: 1px solid var(--bd-card-border);
  padding-top: 0.75rem;
}

.bd-form-designer-advanced > summary {
  cursor: pointer;
  color: var(--bd-muted);
  font-weight: 700;
}

.bd-request-message {
  white-space: pre-wrap;
  margin: 0;
}

.bd-response-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  color: var(--bd-muted);
  font-size: 0.875rem;
}

.bd-response-field-list {
  display: grid;
  gap: 0.75rem;
}

.bd-response-field {
  border: 1px solid var(--bd-card-border);
  border-radius: 8px;
  padding: 0.8rem;
  background: color-mix(in srgb, var(--bd-card-bg), transparent 16%);
}

.bd-response-field-label {
  color: var(--bd-muted);
  font-weight: 700;
}

.bd-response-field-value {
  color: var(--bd-text);
}

.bd-public-request {
  --bd-public-primary: var(--bd-accent);
  --bd-public-accent: var(--bd-alt);
}

.bd-public-page-body {
  min-height: 100vh;
  color: var(--bd-text);
  background: var(--bd-main-bg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
}

.bd-public-shell {
  min-height: 100vh;
  background: var(--bd-main-bg);
}

.bd-public-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem clamp(1rem, 4vw, 2rem);
  background: color-mix(in srgb, var(--bd-public-primary), #0f172a 35%);
  color: #f8fafc;
}

.bd-public-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.bd-public-brand-mark {
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--bd-public-accent), #ffffff);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 12px 24px rgba(0, 0, 0, 0.16);
}

.bd-public-brand-name {
  font-size: 1.05rem;
  font-weight: 850;
  line-height: 1.25;
}

.bd-public-muted {
  color: rgba(248, 250, 252, 0.74) !important;
}

.bd-public-muted a {
  color: #ffffff;
}

.bd-public-status-pill {
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 850;
  white-space: nowrap;
}

.bd-public-main {
  display: grid;
  grid-template-columns: minmax(17rem, 28rem) minmax(20rem, 1fr);
  gap: clamp(1.25rem, 4vw, 2rem);
  max-width: none;
  width: 100%;
  margin: 0;
  padding: clamp(1.5rem, 5vw, 3rem) clamp(1rem, 4vw, 2rem);
}

.bd-public-intro {
  padding: 0.4rem 0;
}

.bd-public-intro h1 {
  margin: 0 0 0.75rem;
  color: color-mix(in srgb, var(--bd-public-primary), #0f172a 28%);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.bd-public-intro p {
  margin: 0;
  color: var(--bd-muted);
  font-size: 1rem;
  line-height: 1.55;
}

.bd-public-steps {
  display: grid;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.bd-public-steps span {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--bd-text);
  font-size: 0.92rem;
  font-weight: 750;
}

.bd-public-steps i {
  display: grid;
  place-items: center;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bd-public-accent), #ffffff 66%);
  color: color-mix(in srgb, var(--bd-public-primary), #0f172a 20%);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 900;
}

.bd-public-card {
  border: 1px solid var(--bd-card-border);
  border-radius: var(--bd-radius);
  background: var(--bd-card-bg);
  padding: clamp(1rem, 3vw, 1.35rem);
  box-shadow: var(--bd-panel-shadow);
}

.bd-public-section {
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--bd-card-border);
}

.bd-public-section:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: 0;
}

.bd-public-file-list {
  display: grid;
  gap: 0.65rem;
}

.bd-public-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  border: 1px solid var(--bd-card-border);
  border-radius: 8px;
  padding: 0.75rem;
  background: color-mix(in srgb, var(--bd-card-bg), var(--bd-main-bg) 35%);
}

.bd-public-file strong,
.bd-public-file span {
  display: block;
}

.bd-public-file span {
  color: var(--bd-muted);
  font-size: 0.82rem;
}

.bd-public-request .bd-public-primary-button {
  background-color: var(--bd-public-primary);
  border-color: var(--bd-public-primary);
  color: #ffffff;
}

.bd-public-request .bd-public-primary-button:hover {
  filter: brightness(0.92);
  color: #ffffff;
}

.bd-public-footer-note {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0 clamp(1rem, 4vw, 2rem) 2rem;
  color: var(--bd-muted);
  font-size: 0.85rem;
}

@media (max-width: 820px) {
  .bd-public-main {
    grid-template-columns: 1fr;
  }

  .bd-public-hero {
    align-items: flex-start;
  }

  .bd-form-designer-grid {
    grid-template-columns: 1fr;
  }

  .bd-form-designer-field-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .bd-tabs-list {
    overflow-x: auto;
  }

  .bd-tab {
    flex: 0 0 auto;
  }
}

.bd-manage-nav {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.bd-manage-nav .bd-nav-item {
  margin: 0;
}

.bd-manage-nav .bd-nav-link {
  display: block;
  padding: 0.45rem 0.55rem;
  border-radius: 6px;
  color: var(--bd-text);
  text-decoration: none;
  font-size: 0.95rem;
}

.bd-manage-nav .bd-nav-link:hover {
  background: rgba(0, 0, 0, 0.04);
}

.bd-manage-nav .bd-nav-link.active {
  background: var(--bd-accent-muted);
  color: var(--bd-accent);
  font-weight: 600;
}

.field-validation-error,
.bd-validation-error {
  color: #b42a2a;
  font-size: 0.85rem;
}

.bd-list {
  padding-left: 1.25rem;
}

.bd-glyph-warn::before {
  content: "⚠ ";
}

code.recovery-code {
  font-family: ui-monospace, monospace;
  font-size: 0.9rem;
  background: rgba(0, 0, 0, 0.06);
  padding: 0.2rem 0.35rem;
  border-radius: 4px;
}

.bd-pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1rem;
}

.bd-pricing-card {
  border: 1px solid var(--bd-card-border);
  border-radius: var(--bd-radius);
  padding: 1rem 1.1rem;
  background: var(--bd-card-bg);
}

.bd-pricing-card--emphasis {
  border-color: var(--bd-accent);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.03);
}

.bd-pricing-price {
  font-size: 1.1rem;
  line-height: 1.4;
  color: var(--bd-text);
}

.bd-pricing-card-header {
  margin-bottom: 0.5rem;
}

.bd-pricing-dl {
  margin: 0 0 1rem;
  font-size: 0.88rem;
}

.bd-pricing-dl > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 0.75rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--bd-card-border);
}

.bd-pricing-dl > div:last-child {
  border-bottom: none;
}

.bd-pricing-dl dt {
  margin: 0;
  color: var(--bd-muted);
  font-weight: 500;
}

.bd-pricing-dl dd {
  margin: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.bd-faq {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.bd-faq-item {
  border: 1px solid var(--bd-card-border);
  border-radius: var(--bd-radius);
  padding: 0.35rem 0.65rem;
  background: var(--bd-card-bg);
}

.bd-faq-item summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.35rem 0;
  /* Disclosure marker stays inside the bordered FAQ card */
  list-style-position: inside;
}

.bd-faq-item[open] summary {
  margin-bottom: 0.35rem;
}

.bd-faq-item p {
  font-size: 0.92rem;
  color: var(--bd-muted);
}

/* Create page — busy state + spinner */
#create-btn.bd-create-btn-busy {
  cursor: not-allowed;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

#create-btn .bd-create-btn-spinner {
  display: inline-block;
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: bd-spin 0.7s linear infinite;
}

@keyframes bd-spin {
  to {
    transform: rotate(360deg);
  }
}
