@charset "UTF-8";
.hidden {
  display: none !important;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  margin: 0;
  print-color-adjust: exact;
  scrollbar-gutter: stable;
  height: 100%;
}

html {
  height: 100%;
}

*, ::after, ::before {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

/* Fixs flash when it has focus */
li,
input,
textarea,
button,
select,
a {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

input:focus,
select:focus,
textarea:focus,
button:focus {
  outline: none;
}

/* Native controls pick their colours up from the input tokens in every theme.
   :where() keeps this at zero specificity so any component rule still wins. */
:where(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]), textarea, select) {
  background-color: var(--bt-input-bg);
  color: var(--bt-input-text);
  border-color: var(--bt-input-border);
}

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
/* Common select styles for all select elements */
select {
  padding: 8px 12px;
  border: 1px solid var(--bt-border);
  border-radius: 4px;
  font-size: 14px;
  background-color: var(--bt-input-bg);
  color: var(--bt-input-text);
  cursor: pointer;
  transition: all 0.2s;
  height: 38px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: var(--bt-select-arrow);
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 10px;
  padding-right: 35px;
  box-sizing: border-box;
}
@media (max-width: 768px) {
  select {
    font-size: 16px;
  }
}

select:hover {
  border-color: var(--bt-primary);
}

select:focus {
  outline: none;
  border-color: var(--bt-primary);
  box-shadow: 0 0 0 2px var(--bt-focus-ring);
}

/* iOS/iPad specific fixes for select height consistency */
@supports (-webkit-touch-callout: none) {
  select {
    height: 38px;
    min-height: 38px;
    line-height: 1.4;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }
  select:focus, select:active {
    height: 38px;
    min-height: 38px;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }
}
/* iPad specific fixes */
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (-webkit-min-device-pixel-ratio: 1) {
  select {
    height: 38px;
    min-height: 38px;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    background-image: var(--bt-select-arrow) !important;
    background-repeat: no-repeat !important;
    background-position: right 8px center !important;
    background-size: 10px !important;
    padding-right: 35px;
  }
  select:focus, select:active {
    height: 38px;
    min-height: 38px;
    font-size: 14px;
  }
}
.prevent-overflow {
  overflow: hidden;
}

.core-input {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid var(--bt-border);
  border-radius: 6px;
  font-size: 14px;
  background-color: var(--bt-input-bg);
  color: var(--bt-input-text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 500;
}
.core-input:focus {
  outline: none;
  border-color: var(--bt-primary);
  box-shadow: 0 0 0 2px var(--bt-focus-ring);
}
.core-input::placeholder {
  color: var(--bt-input-placeholder);
  opacity: 0.6;
}
.core-input:disabled {
  background-color: var(--bt-input-disabled-bg);
  border-color: var(--bt-input-border);
  color: var(--bt-text-disabled);
  cursor: not-allowed;
}
@media (max-width: 768px) {
  .core-input {
    font-size: 16px;
  }
}

.btn {
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  line-height: 1;
}
.btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--bt-focus-ring);
}
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn-primary {
  background-color: var(--bt-button);
  color: var(--bt-on-primary);
}
.btn-primary:hover:not(:disabled) {
  background-color: var(--bt-button-hover);
  transform: translateY(var(--bt-btn-lift));
  box-shadow: 0 4px 12px color-mix(in srgb, var(--bt-button) 30%, transparent);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background-color: var(--bt-secondary);
  color: var(--bt-on-secondary);
  box-shadow: inset 0 0 0 1px var(--bt-secondary-border);
}
.btn-secondary:hover:not(:disabled) {
  background-color: var(--bt-secondary-hover);
  transform: translateY(var(--bt-btn-lift));
  box-shadow: inset 0 0 0 1px var(--bt-secondary-border), 0 4px 12px color-mix(in srgb, var(--bt-secondary) 30%, transparent);
}
.btn-secondary:active {
  transform: translateY(0);
}

.btn-outline-secondary {
  background-color: var(--bt-surface);
  color: var(--bt-text);
  border: 1px solid var(--bt-border-strong);
}
.btn-outline-secondary:hover:not(:disabled) {
  background-color: var(--bt-surface-soft);
  color: var(--bt-text);
  transform: translateY(var(--bt-btn-lift));
}
.btn-outline-secondary:active {
  transform: translateY(0);
}

.btn-outline-primary {
  background-color: transparent;
  color: var(--bt-accent-ink);
  border: 2px solid var(--bt-accent-ink);
}
.btn-outline-primary:hover:not(:disabled) {
  background-color: var(--bt-button);
  color: var(--bt-on-primary);
  transform: translateY(var(--bt-btn-lift));
}

.core-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--bt-primary) 12%, var(--bt-surface));
  color: var(--bt-primary);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}

.core-avatar-sm {
  width: 38px;
  height: 38px;
  font-size: 15px;
  font-weight: 700;
}

.core-avatar-lg {
  width: 52px;
  height: 52px;
  font-size: 20px;
  font-weight: 700;
}

.core-filter-toolbar {
  padding: 12px;
  background: var(--bt-toolbar-bg);
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  box-shadow: var(--bt-card-shadow);
}

.core-avatar-emphasis {
  background: var(--bt-primary);
  color: var(--bt-on-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--bt-primary) 18%, transparent);
}

.core-object-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--bt-primary) 11%, var(--bt-surface));
  color: var(--bt-primary);
  font-size: 16px;
}

.core-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.core-identity-body {
  min-width: 0;
}

.core-identity-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.core-identity-heading h1,
.core-identity-heading h2,
.core-identity-heading h3 {
  margin: 0;
}

.core-identity-meta {
  margin: 5px 0 0;
  color: var(--bt-text-muted);
}

.core-action-menu {
  position: relative;
  display: inline-flex;
}

.core-action-menu-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 30;
  min-width: 190px;
  padding: 6px;
  background: var(--bt-dropdown-bg);
  border: 1px solid var(--bt-border);
  border-radius: 8px;
  box-shadow: var(--bt-overlay-shadow);
}
.core-action-menu-dropdown[hidden] {
  display: none;
}
.core-action-menu-dropdown.is-portal {
  position: fixed;
  right: auto;
  z-index: 1100;
}

.core-action-menu-item {
  width: 100%;
  border: none;
  border-radius: 6px;
  text-align: left;
}
.core-action-menu-item:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.core-action-menu-item.is-danger {
  color: var(--bt-danger);
}
.core-action-menu-item.is-danger i {
  color: var(--bt-danger);
}
.core-action-menu-item.is-danger:hover {
  background: color-mix(in srgb, var(--bt-danger) 10%, transparent);
}

.core-progress {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--bt-surface-soft);
}

.core-progress-bar {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--bt-primary);
}

.btn-outline-danger {
  background-color: transparent;
  color: var(--bt-danger);
  border: 2px solid var(--bt-danger);
}
.btn-outline-danger:hover:not(:disabled) {
  background-color: color-mix(in srgb, var(--bt-danger) 10%, transparent);
  color: var(--bt-danger);
  transform: translateY(var(--bt-btn-lift));
}

.btn-danger {
  background-color: var(--bt-danger);
  color: var(--bt-on-primary);
}
.btn-danger:hover:not(:disabled) {
  background-color: color-mix(in srgb, var(--bt-danger) 85%, black);
  transform: translateY(var(--bt-btn-lift));
  box-shadow: 0 4px 12px color-mix(in srgb, var(--bt-danger) 30%, transparent);
}
.btn-danger:active {
  transform: translateY(0);
}

.btn-success {
  background-color: var(--bt-success);
  color: var(--bt-on-primary);
}
.btn-success:hover:not(:disabled) {
  background-color: color-mix(in srgb, var(--bt-success) 85%, black);
  transform: translateY(var(--bt-btn-lift));
  box-shadow: 0 4px 12px color-mix(in srgb, var(--bt-success) 30%, transparent);
}
.btn-success:active {
  transform: translateY(0);
}

.core-spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid var(--bt-border);
  border-top-color: var(--bt-primary);
  border-radius: 50%;
  animation: core-spin 0.8s linear infinite;
}
.core-spinner-sm {
  width: 16px;
  height: 16px;
  border-width: 2.5px;
}
.core-spinner-lg {
  width: 48px;
  height: 48px;
  border-width: 6px;
  border-color: rgba(255, 255, 255, 0.8);
  border-top-color: var(--bt-primary);
}

@keyframes core-spin {
  to {
    transform: rotate(360deg);
  }
}
input.core-checkbox[type=checkbox] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--bt-primary);
}
input.core-checkbox[type=checkbox]:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.core-check {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--bt-border-strong);
  border-radius: 4px;
  background: var(--bt-input-bg);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.core-check:hover:not(:disabled) {
  border-color: var(--bt-primary);
}
.core-check:checked {
  background: var(--bt-primary);
  border-color: var(--bt-primary);
}
.core-check:checked::after {
  content: "\f00c";
  font-family: var(--fa-family-classic);
  font-weight: 900;
  font-size: 12px;
  color: var(--bt-on-primary);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.core-check:indeterminate {
  background: var(--bt-primary);
  border-color: var(--bt-primary);
}
.core-check:indeterminate::after {
  content: "\f068";
  font-family: var(--fa-family-classic);
  font-weight: 900;
  font-size: 10px;
  color: var(--bt-on-primary);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.core-check:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--bt-focus-ring);
}
.core-check:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  background: var(--bt-input-disabled-bg);
  border-color: var(--bt-border-strong);
}
.core-check:disabled:checked {
  background: var(--bt-text-disabled);
  border-color: var(--bt-text-disabled);
}
.core-check:disabled:indeterminate {
  background: var(--bt-text-disabled);
  border-color: var(--bt-text-disabled);
}
.core-check.core-check-lg {
  width: 24px;
  height: 24px;
}
.core-check.core-check-lg:checked::after {
  font-size: 14px;
}
.core-check.core-check-lg:indeterminate::after {
  font-size: 12px;
}

.core-check-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-size: 14px;
  color: var(--bt-text);
}
.core-check-label:hover .core-check:not(:disabled) {
  border-color: var(--bt-primary);
}

.core-checkbox-group {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}
.core-checkbox-group .core-checkbox {
  position: relative;
  display: inline-block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.core-checkbox-group .core-checkbox input[type=checkbox] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.core-checkbox-group .core-checkbox input[type=checkbox]:checked + .core-checkbox-icon::before {
  content: "\f00c";
  color: var(--bt-accent-ink);
}
.core-checkbox-group .core-checkbox input[type=checkbox]:not(:checked) + .core-checkbox-icon::before {
  content: "\f0c8";
  color: var(--bt-border-strong);
}
.core-checkbox-group .core-checkbox input[type=checkbox]:focus + .core-checkbox-icon {
  outline: 2px solid var(--bt-focus-ring);
  outline-offset: 1px;
  border-radius: 2px;
}
.core-checkbox-group .core-checkbox input[type=checkbox]:disabled + .core-checkbox-icon {
  opacity: 0.5;
  cursor: not-allowed;
}
.core-checkbox-group .core-checkbox .core-checkbox-icon {
  position: absolute;
  top: 0;
  left: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.core-checkbox-group .core-checkbox .core-checkbox-icon::before {
  font-family: var(--fa-family-classic);
  font-weight: 900;
  font-size: 18px;
  line-height: 1;
  text-align: center;
  transition: all 0.2s ease;
}
.core-checkbox-group .core-checkbox-label {
  font-size: 14px;
  color: var(--bt-text);
  line-height: 1.4;
  cursor: pointer;
}
.core-checkbox-group .core-checkbox-label.disabled {
  color: var(--bt-text-disabled);
  cursor: not-allowed;
}
.core-checkbox-group:hover:not(.disabled) .core-checkbox input[type=checkbox]:not(:checked) + .core-checkbox-icon::before {
  color: var(--bt-accent-ink);
}
.core-checkbox-group.core-checkbox-lg {
  gap: 12px;
}
.core-checkbox-group.core-checkbox-lg .core-checkbox {
  width: 26px;
  height: 26px;
}
.core-checkbox-group.core-checkbox-lg .core-checkbox .core-checkbox-icon {
  width: 26px;
  height: 26px;
}
.core-checkbox-group.core-checkbox-lg .core-checkbox .core-checkbox-icon::before {
  font-size: 24px;
}
.core-checkbox-group.core-checkbox-lg .core-checkbox-label {
  font-size: 16px;
}
.core-checkbox-group.core-checkbox-success .core-checkbox input[type=checkbox]:checked + .core-checkbox-icon::before {
  color: var(--bt-success);
}
.core-checkbox-group.core-checkbox-success:hover:not(.disabled) .core-checkbox input[type=checkbox]:not(:checked) + .core-checkbox-icon::before {
  color: var(--bt-success);
}
.core-checkbox-group.core-checkbox-indeterminate .core-checkbox input[type=checkbox] + .core-checkbox-icon::before {
  content: "\f146";
  color: var(--bt-accent-ink);
}
.core-checkbox-group.core-checkbox-boxed .core-checkbox {
  width: 22px;
  height: 22px;
}
.core-checkbox-group.core-checkbox-boxed .core-checkbox .core-checkbox-icon {
  width: 22px;
  height: 22px;
  border: 2px solid var(--bt-border-strong);
  border-radius: 4px;
  background: var(--bt-input-bg);
}
.core-checkbox-group.core-checkbox-boxed .core-checkbox .core-checkbox-icon::before {
  font-size: 14px;
}
.core-checkbox-group.core-checkbox-boxed .core-checkbox input[type=checkbox]:not(:checked) + .core-checkbox-icon::before {
  content: "";
}
.core-checkbox-group.core-checkbox-boxed .core-checkbox input[type=checkbox]:checked + .core-checkbox-icon {
  border-color: var(--bt-success);
  background: var(--bt-success);
}
.core-checkbox-group.core-checkbox-boxed .core-checkbox input[type=checkbox]:checked + .core-checkbox-icon::before {
  content: "\f00c";
  color: var(--bt-on-primary);
}
.core-checkbox-group.core-checkbox-boxed .core-checkbox input[type=checkbox]:disabled + .core-checkbox-icon {
  background: var(--bt-input-disabled-bg);
  border-color: var(--bt-border);
}
.core-checkbox-group.core-checkbox-boxed .core-checkbox input[type=checkbox]:indeterminate + .core-checkbox-icon {
  border-color: var(--bt-primary);
  background: var(--bt-primary);
}
.core-checkbox-group.core-checkbox-boxed .core-checkbox input[type=checkbox]:indeterminate + .core-checkbox-icon::before {
  content: "\f068";
  color: var(--bt-on-primary);
}
.core-checkbox-group.core-checkbox-boxed:hover:not(.disabled) .core-checkbox input[type=checkbox]:not(:checked):not(:disabled) + .core-checkbox-icon {
  border-color: var(--bt-success);
}

.core-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  background-color: color-mix(in srgb, var(--bt-text-muted) 18%, var(--bt-surface));
  color: var(--bt-text);
}
.core-badge.badge-primary {
  background-color: color-mix(in srgb, var(--bt-accent-ink) 15%, transparent);
  color: var(--bt-accent-ink);
}
.core-badge.badge-success {
  background-color: color-mix(in srgb, var(--bt-success) 15%, transparent);
  color: var(--bt-success);
}
.core-badge.badge-warning {
  background-color: color-mix(in srgb, var(--bt-warning) 20%, transparent);
  color: var(--bt-warning-ink);
}
.core-badge.badge-danger {
  background-color: color-mix(in srgb, var(--bt-danger) 15%, transparent);
  color: var(--bt-danger);
}
.core-badge.badge-info {
  background-color: color-mix(in srgb, var(--bt-info) 15%, transparent);
  color: var(--bt-info);
}
.core-badge[href] {
  text-decoration: none;
  cursor: pointer;
  transition: filter 0.15s;
}
.core-badge[href]:hover {
  filter: brightness(0.85);
}
.core-badge.badge-lg {
  padding: 6px 16px;
  font-size: 13px;
}
.core-badge.badge-sm {
  padding: 2px 8px;
  font-size: 11px;
}
.core-badge.badge-title-case {
  text-transform: none;
  letter-spacing: normal;
}

.core-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  cursor: pointer;
  flex-shrink: 0;
}
.core-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.core-toggle input:checked + .core-toggle-slider {
  background-color: var(--bt-success);
}
.core-toggle input:checked + .core-toggle-slider::before {
  transform: translateX(20px);
}
.core-toggle input:focus + .core-toggle-slider {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--bt-success) 25%, transparent);
}
.core-toggle input:disabled + .core-toggle-slider {
  opacity: 0.5;
  cursor: not-allowed;
}
.core-toggle .core-toggle-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bt-border-strong);
  border-radius: 24px;
  transition: background-color 0.2s ease;
}
.core-toggle .core-toggle-slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.core-toggle.core-toggle-sm {
  width: 36px;
  height: 20px;
}
.core-toggle.core-toggle-sm .core-toggle-slider::before {
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
}
.core-toggle.core-toggle-sm input:checked + .core-toggle-slider::before {
  transform: translateX(16px);
}
.core-toggle.core-toggle-primary input:checked + .core-toggle-slider {
  background-color: var(--bt-primary);
}

.core-checkbox-group.core-checkbox-compact {
  min-height: 32px;
  padding: 4px 0;
}
.core-checkbox-group.core-checkbox-compact .core-checkbox {
  width: 18px;
  height: 18px;
}
.core-checkbox-group.core-checkbox-compact .core-checkbox .core-checkbox-icon {
  width: 18px;
  height: 18px;
}
.core-checkbox-group.core-checkbox-compact .core-checkbox .core-checkbox-icon::before {
  font-size: 12px;
}
.core-checkbox-group.core-checkbox-compact .core-checkbox-label {
  color: var(--bt-text);
}

body.modal-open {
  overflow: hidden; /* Prevents scrolling */
}

.modal {
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: safe center;
  justify-content: center;
  background-color: var(--bt-backdrop);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  overflow-y: auto;
  padding: 16px;
  color: var(--bt-text);
}
.modal.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  position: relative;
  z-index: 2001;
  background-color: var(--bt-surface-elevated);
  margin: 0 auto;
  border-radius: 12px;
  box-shadow: var(--bt-shadow-lg);
  max-width: 900px;
  width: 90%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
.modal-header {
  background: var(--bt-surface-soft);
  padding: 20px 30px;
  border-bottom: 1px solid var(--bt-border);
  border-radius: 12px 12px 0 0;
  position: relative;
  z-index: 1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header h2 {
  margin: 0;
  color: var(--bt-text);
  font-size: 24px;
  font-weight: 600;
}

.modal-body {
  padding: 30px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  background: var(--bt-surface-soft);
  padding: 20px 30px;
  border-top: 1px solid var(--bt-border);
  border-radius: 0 0 12px 12px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  position: relative;
  z-index: 1;
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.15);
}

.tab-pane {
  display: none;
}
.tab-pane.active {
  display: block;
  animation: tabFadeIn 0.3s ease;
}

@keyframes tabFadeIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
.modal .form-group,
.modal-overlay .form-group {
  margin-bottom: 20px;
}
.modal .form-group:last-child,
.modal-overlay .form-group:last-child {
  margin-bottom: 0;
}
.modal .form-group label:not(.core-checkbox-group),
.modal-overlay .form-group label:not(.core-checkbox-group) {
  display: block;
  margin-bottom: 8px;
  color: var(--bt-text);
  font-weight: 500;
  font-size: 14px;
}

.form-control {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid var(--bt-border);
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.2s ease;
  background: var(--bt-input-bg);
}
.form-control:focus {
  outline: none;
  border-color: var(--bt-primary);
  box-shadow: 0 0 0 0.2rem var(--bt-focus-ring);
}
.form-control::placeholder {
  color: var(--bt-input-placeholder);
}
@media (max-width: 768px) {
  .form-control {
    font-size: 16px;
  }
}

select.form-control {
  cursor: pointer;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bt-scrim);
  z-index: 2000;
  display: flex;
  align-items: safe center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  overflow-y: auto;
  padding: 16px;
}
.modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  background: var(--bt-surface-elevated);
  border-radius: 8px;
  min-width: min(400px, 100%);
  max-width: 90vw;
  max-height: 90vh;
  box-shadow: var(--bt-shadow-xl);
  transform: scale(0.7);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-overlay.show .modal-container {
  transform: scale(1);
}

.modal-header {
  padding: 16px 24px 16px 24px;
  border-bottom: 1px solid var(--bt-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bt-surface-soft);
  position: relative;
  z-index: 1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.modal-header h2, .modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--bt-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.modal-header .modal-title-section {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
  flex: 1;
}
.modal-header .modal-title-section i {
  flex-shrink: 0;
  width: 20px;
  text-align: center;
  color: var(--bt-text);
}
.modal-header .modal-title-section .modal-subtitle {
  text-align: left;
  margin: 0;
}

.modal-close {
  text-decoration: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--bt-text-muted);
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
}
.modal-close:hover {
  background-color: var(--bt-hover);
  color: var(--bt-text);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}
.modal-body p {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--bt-text);
}
.modal-body .modal-subtitle {
  text-align: center;
  font-size: 14px;
  color: var(--bt-text-muted);
  margin-bottom: 16px;
}
.modal-body .modal-subtitle.important {
  font-size: 15px;
  font-weight: 600;
  color: var(--bt-danger);
}

.modal.modal-warning .modal-content {
  max-width: 400px;
  min-width: 350px;
}
.modal.modal-warning .modal-content .modal-body {
  padding: 16px 20px;
}
.modal.modal-warning .modal-content .modal-footer {
  padding: 12px 20px 16px 20px;
}

#pdfViewerModal {
  z-index: 3000;
}
#pdfViewerModal .modal-content {
  z-index: 3001;
}

:root {
  --notification-success-bg: var(--bt-toast-success);
  --notification-success-border: var(--bt-toast-success-border);
  --notification-error-bg: var(--bt-toast-danger);
  --notification-error-border: var(--bt-toast-danger-border);
  --notification-warning-bg: var(--bt-toast-warning);
  --notification-warning-border: var(--bt-toast-warning-border);
  --notification-info-bg: var(--bt-toast-info);
  --notification-info-border: var(--bt-toast-info-border);
  --notification-text: #ffffff;
  --notification-title-text: #ffffff;
  --notification-icon-color: #ffffff;
  --notification-close-color: #ffffff;
  --notification-close-hover: rgba(255, 255, 255, 0.8);
  --notification-shadow: var(--bt-toast-shadow);
  --notification-backdrop: rgba(0, 0, 0, 0.05);
  --notification-border-radius: 8px;
  --notification-z-index: 10000;
}

.notification-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--notification-z-index);
  pointer-events: none;
}
@media (max-width: 768px) {
  .notification-container {
    top: 10px;
    left: 10px;
    right: 10px;
    transform: none;
  }
}

.notification {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 320px;
  max-width: 420px;
  padding: 16px;
  margin-bottom: 12px;
  background: var(--notification-success-bg);
  border: 2px solid var(--notification-success-border);
  border-radius: var(--notification-border-radius);
  box-shadow: 0 4px 12px var(--notification-shadow);
  pointer-events: all;
  cursor: pointer;
  transform: translateY(-100%);
  opacity: 0;
  transition: all 0.3s ease-out;
}
.notification.show {
  transform: translateY(0);
  opacity: 1;
}
.notification.hide {
  transform: translateY(-100%);
  opacity: 0;
}
@media (max-width: 768px) {
  .notification {
    min-width: auto;
    max-width: none;
    width: 100%;
  }
}
.notification:hover {
  transform: translateY(0) scale(1.02);
  box-shadow: 0 6px 16px var(--notification-shadow);
}

.notification-success {
  background: var(--notification-success-bg);
  border-color: var(--notification-success-border);
}

.notification-error {
  background: var(--notification-error-bg);
  border-color: var(--notification-error-border);
}

.notification-warning {
  background: var(--notification-warning-bg);
  border-color: var(--notification-warning-border);
}

.notification-info {
  background: var(--notification-info-bg);
  border-color: var(--notification-info-border);
}

.notification-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.notification-icon i {
  font-size: 20px;
  color: var(--notification-icon-color);
}

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

.notification-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--notification-title-text);
  margin-bottom: 4px;
  line-height: 1.2;
}

.notification-message {
  font-size: 13px;
  color: var(--notification-text);
  line-height: 1.4;
  word-wrap: break-word;
}

.notification-close {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}
.notification-close:hover {
  background-color: var(--notification-close-hover);
}
.notification-close i {
  font-size: 12px;
  color: var(--notification-close-color);
}

.notification-loading .notification-icon i {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes slideUp {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(-100%);
    opacity: 0;
  }
}
.notification-stack-enter {
  animation: slideDown 0.3s ease-out;
}

.notification-stack-exit {
  animation: slideUp 0.3s ease-out;
}

@media (prefers-reduced-motion: reduce) {
  .notification {
    transition: opacity 0.2s ease;
  }
  .notification:hover {
    transform: none;
  }
  .notification-loading .notification-icon i {
    animation: none;
  }
}
@media (prefers-contrast: high) {
  .notification {
    border-width: 3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  }
}
.core-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 8px;
  border-left: 4px solid;
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.5;
}
.core-alert:last-child {
  margin-bottom: 0;
}
.core-alert .core-alert-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.core-alert .core-alert-content {
  flex: 1;
}
.core-alert .core-alert-content strong {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
}
.core-alert .core-alert-content p {
  margin: 0;
}
.core-alert .core-alert-close {
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: inherit;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}
.core-alert .core-alert-close:hover {
  opacity: 1;
}
.core-alert .core-alert-close i {
  font-size: 14px;
}
.core-alert.alert-info {
  background-color: var(--bt-info-soft);
  border-color: var(--bt-info);
  color: var(--bt-info-ink);
}
.core-alert.alert-info .core-alert-icon {
  color: var(--bt-info);
}
.core-alert.alert-success {
  background-color: var(--bt-success-soft);
  border-color: var(--bt-success);
  color: var(--bt-success-ink);
}
.core-alert.alert-success .core-alert-icon {
  color: var(--bt-success);
}
.core-alert.alert-warning {
  background-color: var(--bt-warning-soft);
  border-color: var(--bt-warning);
  color: var(--bt-warning-ink);
}
.core-alert.alert-warning .core-alert-icon {
  color: var(--bt-warning-ink);
}
.core-alert.alert-danger {
  background-color: var(--bt-danger-soft);
  border-color: var(--bt-danger);
  color: var(--bt-danger-ink);
}
.core-alert.alert-danger .core-alert-icon {
  color: var(--bt-danger);
}

.core-alert-compact {
  padding: 12px 16px;
  font-size: 13px;
}
.core-alert-compact .core-alert-icon {
  font-size: 14px;
}

.core-alert-no-icon .core-alert-icon {
  display: none;
}

.core-table-container {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--bt-border);
  border-radius: 8px;
  background-color: var(--bt-input-bg);
}
.core-table-container::-webkit-scrollbar {
  height: 8px;
}
.core-table-container::-webkit-scrollbar-track {
  background: var(--bt-surface-soft);
  border-radius: 4px;
}
.core-table-container::-webkit-scrollbar-thumb {
  background: var(--bt-text-muted);
  border-radius: 4px;
}
.core-table-container::-webkit-scrollbar-thumb:hover {
  background: var(--bt-text);
}

.core-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.core-table thead {
  background-color: var(--bt-surface-soft);
  position: sticky;
  top: 0;
  z-index: 10;
}
.core-table thead th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--bt-text);
  border-bottom: 2px solid var(--bt-border);
  white-space: nowrap;
}
.core-table thead th:first-child {
  padding-left: 20px;
}
.core-table thead th:last-child {
  padding-right: 20px;
}
.core-table tbody tr {
  transition: background-color 0.15s ease;
}
.core-table tbody tr:nth-child(even) {
  background-color: color-mix(in srgb, var(--bt-surface-soft) 40%, transparent);
}
.core-table tbody tr:hover {
  background-color: color-mix(in srgb, var(--bt-primary) 8%, transparent);
}
.core-table tbody tr:has(input[type=checkbox]:checked) {
  background-color: var(--bt-selected);
}
.core-table tbody tr.selected {
  background-color: var(--bt-success-soft);
}
.core-table tbody tr.declined {
  background-color: color-mix(in srgb, var(--bt-danger) 5%, transparent);
}
.core-table tbody td {
  padding: 12px 16px;
  color: var(--bt-text);
  border-bottom: 1px solid var(--bt-border);
  vertical-align: middle;
}
.core-table tbody td:first-child {
  padding-left: 20px;
}
.core-table tbody td:last-child {
  padding-right: 20px;
}
.core-table select.core-input {
  padding: 6px 10px;
}
.core-table .text-left {
  text-align: left;
}
.core-table .text-center {
  text-align: center;
}
.core-table .text-right {
  text-align: right;
}
.core-table .price {
  font-weight: 600;
  color: var(--bt-success);
  white-space: nowrap;
}
.core-table .declined-text {
  color: var(--bt-danger);
  font-weight: 600;
}

.core-table-compact .core-table thead th {
  padding: 8px 12px;
}
.core-table-compact .core-table thead th:first-child {
  padding-left: 16px;
}
.core-table-compact .core-table thead th:last-child {
  padding-right: 16px;
}
.core-table-compact .core-table tbody td {
  padding: 8px 12px;
}
.core-table-compact .core-table tbody td:first-child {
  padding-left: 16px;
}
.core-table-compact .core-table tbody td:last-child {
  padding-right: 16px;
}

.core-table-borderless .core-table-container {
  border: none;
}
.core-table-borderless .core-table tbody td {
  border-bottom: none;
}

.member-role-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.show-mobile {
  display: none;
}

@media (max-width: 768px) {
  .hide-mobile {
    display: none;
  }
  .show-mobile {
    display: inline-flex;
  }
}
@media (max-width: 768px) {
  .core-table-responsive .core-table thead {
    display: none;
  }
  .core-table-responsive .core-table tbody tr {
    display: block;
    margin-bottom: 16px;
    border: 1px solid var(--bt-border);
    border-radius: 8px;
    overflow: hidden;
  }
  .core-table-responsive .core-table tbody td {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--bt-border);
  }
  .core-table-responsive .core-table tbody td:last-child {
    border-bottom: none;
  }
  .core-table-responsive .core-table tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    margin-right: 16px;
    color: var(--bt-text-muted);
  }
}
:root {
  color-scheme: light;
  --bt-bg: #f8fafc;
  --bt-surface: #ffffff;
  --bt-surface-soft: #f8f9fa;
  --bt-surface-elevated: #ffffff;
  --bt-hover: #f5f5f5;
  --bt-selected: color-mix(in srgb, var(--bt-primary) 8%, var(--bt-surface));
  --bt-backdrop: rgba(0, 0, 0, 0.4);
  --bt-scrim: rgba(0, 0, 0, 0.6);
  --bt-text: #1f2937;
  --bt-text-muted: #6b7280;
  --bt-text-disabled: var(--bt-text-muted);
  --bt-on-primary: #ffffff;
  --bt-accent-ink: var(--bt-primary-dark);
  --bt-border: #e9ecef;
  --bt-border-strong: #ced4da;
  --bt-input-border: var(--bt-border);
  --bt-input-bg: #ffffff;
  --bt-input-text: #374151;
  --bt-input-placeholder: var(--bt-text-muted);
  --bt-input-disabled-bg: var(--bt-surface-soft);
  --bt-select-arrow: url("data:image/svg+xml;charset=US-ASCII,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'><path fill='%23666' d='M5 6L0 0h10z'/></svg>");
  --bt-primary: #109cf1;
  --bt-primary-dark: #243582;
  --bt-primary-soft: color-mix(in srgb, var(--bt-primary) 10%, transparent);
  --bt-link: var(--bt-primary);
  --bt-button: var(--bt-primary);
  --bt-button-hover: color-mix(in srgb, var(--bt-button) 80%, black);
  --bt-secondary: #6b7280;
  --bt-secondary-hover: #545b62;
  --bt-on-secondary: #ffffff;
  --bt-secondary-border: transparent;
  --bt-btn-lift: -1px;
  --bt-focus-ring: color-mix(in srgb, var(--bt-primary) 25%, transparent);
  --bt-focus-outline: var(--bt-primary);
  --bt-success: #16a34a;
  --bt-success-soft: color-mix(in srgb, var(--bt-success) 10%, transparent);
  --bt-success-ink: #155724;
  --bt-warning: #f59e0b;
  --bt-warning-soft: color-mix(in srgb, var(--bt-warning) 15%, transparent);
  --bt-warning-ink: #856404;
  --bt-danger: #dc3545;
  --bt-danger-soft: color-mix(in srgb, var(--bt-danger) 10%, transparent);
  --bt-danger-ink: #721c24;
  --bt-info: #17a2b8;
  --bt-info-soft: color-mix(in srgb, var(--bt-info) 10%, transparent);
  --bt-info-ink: #0c5460;
  --bt-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
  --bt-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
  --bt-shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.2);
  --bt-shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.3);
  --bt-card-shadow: none;
  --bt-overlay-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
  --bt-nav-bg: #1f2937;
  --bt-nav-gradient: none;
  --bt-nav-active-indicator: none;
  --bt-nav-text: #ffffff;
  --bt-nav-link: rgba(255, 255, 255, 0.8);
  --bt-nav-link-hover: rgba(255, 255, 255, 0.1);
  --bt-nav-link-active: var(--bt-nav-link-hover);
  --bt-nav-avatar-bg: var(--bt-primary);
  --bt-nav-avatar-text: #ffffff;
  --bt-nav-border: var(--bt-border);
  --bt-nav-logo-accent: #ffffff;
  --bt-nav-edge: none;
  --bt-nav-context: #82c7f1;
  --bt-dropdown-bg: var(--bt-surface-elevated);
  --bt-dropdown-border: var(--bt-border);
  --bt-dropdown-hover: var(--bt-bg);
  --bt-toast-success: #10b981;
  --bt-toast-success-border: #059669;
  --bt-toast-danger: #ef4444;
  --bt-toast-danger-border: #dc2626;
  --bt-toast-warning: #f59e0b;
  --bt-toast-warning-border: #d97706;
  --bt-toast-info: #3b82f6;
  --bt-toast-info-border: #2563eb;
  --bt-toast-shadow: rgba(0, 0, 0, 0.15);
  --bt-card-hover: color-mix(in srgb, var(--bt-primary) 4%, var(--bt-surface));
  --bt-category-badge-bg: var(--bt-primary);
  --bt-source-accent: var(--bt-text-muted);
  --bt-status-ink: var(--bt-text);
  --bt-status-tint: 15%;
  --bt-status-mix: 55%;
  --bt-status-border: transparent;
  --bt-toolbar-bg: var(--bt-surface);
  --bt-priority-high: var(--bt-danger);
  --bt-priority-medium: var(--bt-warning);
  --bt-priority-normal: var(--bt-success);
  --bt-platform-accent: #6366f1;
  --bt-chart-blue: #245bcc;
  --bt-chart-success: #14805a;
  --bt-chart-danger: #bd3547;
  --bt-chart-amber: #a66308;
  --bt-radius: 6px;
}

:root {
  --end-color: var(--bt-primary);
  --start-color: var(--bt-primary-dark);
  --accent-text-color: var(--bt-accent-ink);
  --primary-blue: var(--bt-primary);
  --color-bright-blue: var(--bt-primary);
  --color-dark-blue: var(--bt-primary-dark);
  --color-white: #ffffff;
  --color-text-gray: var(--bt-text);
  --color-medium-gray: var(--bt-text-muted);
  --color-danger-red: var(--bt-danger);
  --color-input-border: var(--bt-input-border);
  --text-primary: var(--bt-text);
  --text-secondary: var(--bt-text-muted);
  --medium-gray: var(--bt-text-muted);
  --dark-gray: var(--bt-text);
  --light-gray: var(--bt-surface-soft);
  --border-color: var(--bt-border);
  --input-background: var(--bt-input-bg);
  --input-text-color: var(--bt-input-text);
  --select-background-color: var(--bt-input-bg);
  --form-container-bg: var(--bt-surface-elevated);
  --form-header-bg: var(--bt-surface-soft);
  --modal-border: var(--bt-border);
  --modal-text-color: var(--bt-text);
  --hover-background: var(--bt-hover);
  --dropdown-background: var(--bt-surface-elevated);
  --dropdown-item-hover: var(--bt-hover);
  --subtle-info-bg: var(--bt-surface-soft);
  --success-green: var(--bt-success);
  --danger-red: var(--bt-danger);
  --warning-yellow: var(--bt-warning);
  --info-blue: var(--bt-info);
  --shadow-light: rgba(0, 0, 0, 0.2);
}

.theme-clean {
  --bt-primary: #4f6ef7;
  --bt-primary-dark: #3b5de7;
  --bt-bg: #f5f6f8;
  --bt-surface: #ffffff;
  --bt-border: #e4e7ec;
  --bt-text: #1a1d26;
  --bt-text-muted: #6b7280;
  --bt-nav-bg: #ffffff;
  --bt-nav-text: #1a1d26;
  --bt-nav-link: #4b5563;
  --bt-nav-link-hover: rgba(0, 0, 0, 0.05);
  --bt-nav-avatar-bg: #4f6ef7;
  --bt-nav-border: #e4e7ec;
  --bt-nav-edge: 0 1px 0 var(--bt-nav-border);
  --bt-nav-logo-accent: #006ab3;
  --bt-nav-context: var(--bt-primary);
  --bt-card-hover: rgba(79, 110, 247, 0.04);
  --bt-category-badge-bg: #4f6ef7;
}

.theme-slate {
  --bt-primary: #6366f1;
  --bt-primary-dark: #4f46e5;
  --bt-bg: #f1f5f9;
  --bt-surface: #f8fafc;
  --bt-border: #cbd5e1;
  --bt-text: #0f172a;
  --bt-text-muted: #64748b;
  --bt-nav-bg: #1e293b;
  --bt-nav-text: #e2e8f0;
  --bt-nav-link: #94a3b8;
  --bt-nav-link-hover: rgba(255, 255, 255, 0.08);
  --bt-nav-avatar-bg: #6366f1;
  --bt-nav-border: #334155;
  --bt-nav-edge: 0 1px 0 var(--bt-nav-border);
  --bt-card-hover: rgba(99, 102, 241, 0.04);
  --bt-category-badge-bg: #6366f1;
}

.theme-dark {
  color-scheme: dark;
  --bt-surface-elevated: var(--bt-surface);
  --bt-input-bg: var(--bt-surface);
  --bt-input-text: var(--bt-text);
  --bt-input-disabled-bg: var(--bt-surface-soft);
  --bt-hover: color-mix(in srgb, #ffffff 6%, var(--bt-surface));
  --bt-secondary: var(--bt-text-muted);
  --bt-secondary-hover: color-mix(in srgb, var(--bt-text-muted) 80%, #ffffff);
  --bt-border-strong: var(--bt-text-muted);
  --bt-accent-ink: var(--bt-primary);
  --bt-success-ink: var(--bt-success);
  --bt-warning-ink: var(--bt-warning);
  --bt-danger-ink: var(--bt-danger);
  --bt-info-ink: var(--bt-info);
  --bt-success-soft: color-mix(in srgb, var(--bt-success) 15%, var(--bt-surface));
  --bt-warning-soft: color-mix(in srgb, var(--bt-warning) 15%, var(--bt-surface));
  --bt-danger-soft: color-mix(in srgb, var(--bt-danger) 15%, var(--bt-surface));
  --bt-info-soft: color-mix(in srgb, var(--bt-info) 15%, var(--bt-surface));
  --bt-backdrop: rgba(0, 0, 0, 0.6);
  --bt-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --bt-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.45);
  --bt-shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
  --bt-shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.6);
  --bt-overlay-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  --bt-toast-success: #059669;
  --bt-toast-success-border: #047857;
  --bt-toast-danger: #dc2626;
  --bt-toast-danger-border: #b91c1c;
  --bt-toast-warning: #d97706;
  --bt-toast-warning-border: #b45309;
  --bt-toast-info: #2563eb;
  --bt-toast-info-border: #1d4ed8;
  --bt-toast-shadow: rgba(0, 0, 0, 0.3);
  --bt-chart-blue: #8baeff;
  --bt-chart-success: #65d5aa;
  --bt-chart-danger: #ff8a96;
  --bt-chart-amber: #efbd68;
  --bt-select-arrow: url("data:image/svg+xml;charset=US-ASCII,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'><path fill='%238b90a0' d='M5 6L0 0h10z'/></svg>");
  --bt-primary: #6b8aff;
  --bt-primary-dark: #5a7aff;
  --bt-success: #4ade80;
  --bt-danger: #f87171;
  --bt-warning: #fbbf24;
  --bt-bg: #0f1117;
  --bt-surface: #1a1d28;
  --bt-surface-soft: #252838;
  --bt-border: #2d3040;
  --bt-text: #e4e6ed;
  --bt-text-muted: #8b90a0;
  --bt-nav-bg: #12141d;
  --bt-nav-text: #e4e6ed;
  --bt-nav-link: #8b90a0;
  --bt-nav-link-hover: rgba(255, 255, 255, 0.08);
  --bt-nav-avatar-bg: #6b8aff;
  --bt-nav-border: #2d3040;
  --bt-card-hover: rgba(107, 138, 255, 0.06);
  --bt-category-badge-bg: #6b8aff;
  --bt-dropdown-bg: #1e2130;
  --bt-dropdown-hover: rgba(255, 255, 255, 0.06);
  --bt-dropdown-border: #2d3040;
}

html, body {
  background: var(--bt-bg);
  color: var(--bt-text);
}

body:has(.nav) {
  padding-top: 56px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.page-header h1 {
  font-size: 20px;
  margin-bottom: 0;
}
.page-header-actions {
  display: flex;
  gap: 8px;
}

.search-clear {
  position: absolute;
  right: 6px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--bt-text-muted);
  font-size: 12px;
  padding: 2px 4px;
  line-height: 1;
  display: none;
  border-radius: 2px;
}
.search-clear:hover {
  color: var(--bt-danger);
}
.search-clear.visible {
  display: block;
}

.sync-message {
  padding: 10px 16px;
  border-radius: var(--bt-radius);
  font-size: 13px;
  margin-bottom: 16px;
}
.sync-message.sync-success {
  background: color-mix(in srgb, var(--bt-success) 10%, var(--bt-surface));
  border: 1px solid var(--bt-success);
  color: var(--bt-success-ink);
}
.sync-message.sync-error {
  background: color-mix(in srgb, var(--bt-danger) 10%, var(--bt-surface));
  border: 1px solid var(--bt-danger);
  color: var(--bt-danger-ink);
}

.inline {
  display: inline;
}

code {
  background: var(--bt-bg);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 13px;
}

h1 {
  margin-bottom: 16px;
}

h2 {
  margin: 24px 0 12px;
}

.form {
  max-width: 700px;
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-group-checkbox-align {
  display: flex;
  align-items: center;
  align-self: flex-end;
}

.form-row .form-group {
  flex: 1;
}

.form-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.flex-grow {
  flex: 1;
}

.mcp-setup-code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.mcp-setup-code code {
  display: block;
  padding: 0;
}

.account-section {
  padding: 20px;
  background: var(--bt-surface);
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  margin-bottom: 20px;
}
.account-section .form-group:last-child,
.account-section .form-row:last-child .form-group {
  margin-bottom: 0;
}

.account-section-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 16px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--bt-border);
  color: var(--bt-text);
}

.account-section-title-lg {
  font-size: 16px;
}

.form-group {
  margin-bottom: 16px;
}
.form-group label:not(.core-checkbox-group) {
  display: block;
  margin-bottom: 4px;
  font-weight: 500;
  font-size: 14px;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  font-size: 14px;
  font-family: inherit;
}
@media (max-width: 768px) {
  .form-group input,
  .form-group textarea {
    font-size: 16px;
  }
}
.form-group select {
  width: 100%;
}
.form-group textarea {
  resize: vertical;
}

.filters {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.filters select {
  padding: 4px 28px 4px 8px;
  height: 30px;
  min-height: 30px;
  border-radius: 4px;
  background-size: 8px;
  background-position: right 6px center;
}
.filters input[type=text] {
  padding: 4px 8px;
  border: 1px solid var(--bt-border);
  border-radius: 4px;
  height: 30px;
  font-family: inherit;
}

.alert {
  padding: 12px 16px;
  border-radius: var(--bt-radius);
  margin-bottom: 16px;
  font-size: 14px;
}

.alert-error {
  background: var(--bt-danger-soft);
  color: var(--bt-danger-ink);
  border: 1px solid color-mix(in srgb, var(--bt-danger) 30%, transparent);
}

.alert-info {
  background: var(--bt-info-soft);
  color: var(--bt-info-ink);
  border: 1px solid color-mix(in srgb, var(--bt-info) 30%, transparent);
}

.empty {
  text-align: center;
  color: var(--bt-text-muted);
  padding: 32px;
}

.btn-sm {
  padding: 4px 10px;
  font-size: 13px;
  min-width: auto;
}

.btn-md {
  min-height: 44px;
}

.user-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--bt-text-muted);
}
.user-status.online {
  color: var(--bt-success);
  font-weight: 500;
}

.user-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bt-text-muted);
  flex-shrink: 0;
}
.online .user-status-dot {
  background: var(--bt-success);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--bt-success) 25%, transparent);
}

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: var(--bt-text-muted);
  padding: 2px 6px;
  line-height: 1;
  min-width: auto;
}
.btn-icon:hover:not(:disabled) {
  color: var(--bt-danger);
}
.btn-icon:disabled {
  cursor: not-allowed;
}

.btn-icon-neutral:hover:not(:disabled) {
  color: var(--bt-primary);
}

.settings-form {
  max-width: 600px;
}

.workspace-label-settings {
  margin-top: 20px;
}
.workspace-label-settings .form-group {
  min-width: 0;
}
@media (max-width: 480px) {
  .workspace-label-settings .form-row {
    flex-direction: column;
    gap: 0;
  }
}

.workspace-label-example {
  padding: 12px;
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  background: var(--bt-bg);
  color: var(--bt-text);
  overflow-wrap: anywhere;
}

.settings-item {
  margin-bottom: 20px;
}

.settings-description {
  margin: 6px 0 0 36px;
  font-size: 13px;
  color: var(--bt-text-muted);
  line-height: 1.4;
}

.settings-actions {
  margin-top: 24px;
}

.settings-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--bt-border);
  max-width: 600px;
}
.settings-section h2 {
  font-size: 18px;
  margin: 0 0 8px;
}

.stat-card, .dash-insight-card, .note-card, .account-section, .issue-list {
  box-shadow: var(--bt-card-shadow);
}

.logo-accent {
  fill: var(--logo-accent, #006ab3);
}

.logo-ink {
  fill: var(--logo-ink, currentColor);
}

.nav {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  height: 56px;
  background: var(--bt-nav-bg);
  background-image: var(--bt-nav-gradient);
  color: var(--bt-nav-text);
  box-shadow: var(--bt-nav-edge);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 16px;
  white-space: nowrap;
  text-decoration: none;
  color: inherit;
}

.nav-brand-img {
  display: block;
  height: 34px;
  width: auto;
  color: var(--bt-nav-text);
  --logo-accent: var(--bt-nav-logo-accent);
}

.nav-hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--bt-nav-text);
  font-size: 18px;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: var(--bt-radius);
  touch-action: manipulation;
}
.nav-hamburger:hover {
  background: var(--bt-nav-link-hover);
}
.nav-hamburger.active {
  background: var(--bt-nav-link-active);
}

.nav-version {
  font-size: 10px;
  font-weight: 400;
  opacity: 0.5;
  vertical-align: super;
}

.nav-context {
  display: flex;
  align-items: center;
  min-width: 0;
}

.nav-workspace-context {
  flex-shrink: 0;
}

.nav-context-label {
  font-size: 20px;
  font-weight: 500;
  color: var(--bt-nav-context);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 230px;
  cursor: default;
}

.nav-switcher {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  padding: 2px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9px;
  min-width: 0;
}

.nav-switcher-seg-wrap {
  position: relative;
  min-width: 0;
}

.nav-switcher-seg {
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: 230px;
  padding: 5px 10px;
  background: transparent;
  border: none;
  border-radius: 7px;
  color: var(--bt-nav-text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  user-select: none;
}
.nav-switcher-seg:not(.is-static) {
  cursor: pointer;
  transition: background 0.15s ease;
}
.nav-switcher-seg:not(.is-static):hover {
  background: rgba(255, 255, 255, 0.1);
}
.nav-switcher-seg:not(.is-static):focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: -2px;
}
.nav-switcher-seg:not(.is-static)[aria-expanded=true] {
  background: rgba(255, 255, 255, 0.16);
}
.nav-switcher-seg:not(.is-static)[aria-expanded=true] .nav-switcher-caret {
  transform: rotate(180deg);
}

.nav-switcher-icon {
  font-size: 11px;
  opacity: 0.75;
  flex-shrink: 0;
}

.nav-switcher-seg-name {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-switcher-seg-org .nav-switcher-seg-name {
  max-width: 130px;
  opacity: 0.92;
}

.nav-switcher-caret {
  font-size: 9px;
  opacity: 0.6;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.nav-switcher-div {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.16);
  flex-shrink: 0;
}

.nav-switcher-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 240px;
  max-width: min(320px, 90vw);
  background: var(--bt-surface);
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  box-shadow: var(--bt-overlay-shadow);
  padding: 6px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
  z-index: 101;
}
.nav-switcher-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-switcher-menu-list {
  max-height: 320px;
  overflow-y: auto;
}

.nav-switcher-menu-heading {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bt-text-muted);
  padding: 8px 14px 6px 14px;
}

.nav-switcher-filter {
  padding: 4px 10px 6px;
}

.nav-switcher-filter-input {
  width: 100%;
  padding: 6px 10px;
  font-size: 13px;
  font-family: inherit;
  color: var(--bt-text);
  background: var(--bt-bg);
  border: 1px solid var(--bt-border);
  border-radius: 6px;
}
.nav-switcher-filter-input:focus {
  outline: none;
  border-color: var(--bt-primary);
}

.nav-switcher-form {
  margin: 0;
}

.nav-switcher-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 14px;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 13px;
  color: var(--bt-text);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.1s ease;
}
.nav-switcher-menu-item i:first-child {
  font-size: 12px;
  color: var(--bt-text-muted);
  width: 14px;
  text-align: center;
  flex-shrink: 0;
}
.nav-switcher-menu-item span {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-switcher-menu-item:hover:not(:disabled):not(.is-current), .nav-switcher-menu-item:focus-visible:not(:disabled):not(.is-current) {
  background: color-mix(in srgb, var(--bt-primary) 8%, transparent);
  color: var(--bt-primary);
  outline: none;
}
.nav-switcher-menu-item:hover:not(:disabled):not(.is-current) i:first-child, .nav-switcher-menu-item:focus-visible:not(:disabled):not(.is-current) i:first-child {
  color: var(--bt-primary);
}
.nav-switcher-menu-item.is-current {
  background: color-mix(in srgb, var(--bt-primary) 10%, var(--bt-surface));
  border-radius: var(--bt-radius);
  color: var(--bt-primary);
  font-weight: 600;
  cursor: default;
}
.nav-switcher-menu-item.is-current i:first-child {
  color: var(--bt-primary);
}

.nav-switcher-check {
  color: var(--bt-primary);
  font-size: 11px;
  flex: 0 0 auto;
}

.nav-switcher-menu-sep {
  height: 1px;
  background: var(--bt-border);
  margin: 6px 0;
}

@media (max-width: 600px) {
  .nav-switcher-seg {
    max-width: 150px;
  }
  .nav-switcher-seg-name {
    max-width: 92px;
  }
  .nav-switcher-seg-org .nav-switcher-seg-name {
    max-width: 70px;
  }
  .nav-switcher-menu {
    position: fixed;
    left: 8px;
    right: 8px;
    top: 60px;
    min-width: 0;
    max-width: none;
  }
}
.nav-links {
  display: flex;
  gap: 4px;
  flex: 1;
}

.nav-link {
  color: var(--bt-nav-link);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--bt-radius);
  font-size: 14px;
}
.nav-link:hover {
  background: var(--bt-nav-link-hover);
  color: var(--bt-nav-text);
}
.nav-link.nav-link-active {
  color: var(--bt-nav-text);
  font-weight: 600;
  background: var(--bt-nav-link-active);
  box-shadow: var(--bt-nav-active-indicator);
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
  position: relative;
  padding: 4px 10px 4px 4px;
  border-radius: 24px;
  user-select: none;
  transition: background 0.15s ease;
}
.nav-user:hover {
  background: var(--bt-nav-link-hover);
}

.nav-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bt-nav-avatar-bg);
  color: var(--bt-nav-avatar-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.nav-username {
  white-space: nowrap;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-caret {
  font-size: 10px;
  opacity: 0.6;
  transition: transform 0.15s ease;
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: var(--bt-dropdown-bg);
  border: 1px solid var(--bt-dropdown-border);
  border-radius: 8px;
  box-shadow: var(--bt-overlay-shadow);
  display: none;
  z-index: 1000;
  max-height: calc(100dvh - 80px);
  overflow-y: auto;
}
.nav-dropdown.show {
  display: block;
}

.nav-dropdown-section {
  padding: 12px 16px;
}

.nav-dropdown-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--bt-text-muted);
  margin-bottom: 6px;
}

.nav-dropdown-select {
  width: 100%;
}

.nav-dropdown-sep {
  height: 1px;
  background: var(--bt-dropdown-border);
}

.nav-dropdown-heading {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bt-text-muted);
  padding: 10px 16px 4px 16px;
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--bt-text);
  text-decoration: none;
  transition: background 0.15s ease;
  cursor: pointer;
}
.nav-dropdown-item i {
  width: 16px;
  text-align: center;
  font-size: 13px;
}
.nav-dropdown-item:hover {
  background: var(--bt-dropdown-hover);
}

.nav-dropdown-logout i {
  color: var(--bt-danger);
}

.nav-dropdown-orgname {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--bt-text);
}
.nav-dropdown-orgname i {
  width: 16px;
  text-align: center;
  font-size: 13px;
  color: var(--bt-text-muted);
}

.nav-dropdown-orgform {
  margin: 0;
}

.nav-dropdown-org-filter {
  padding: 0 10px 6px;
}

.nav-dropdown-org-list {
  max-height: min(320px, 50vh);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.nav-dropdown-org-empty {
  margin: 0;
  padding: 10px 16px;
  font-size: 13px;
}

button.nav-dropdown-item {
  width: 100%;
  background: none;
  border: none;
  font: inherit;
  text-align: left;
}

.impersonation-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 0 16px;
  background: #b45309;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.impersonation-banner-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.impersonation-banner-text strong {
  font-weight: 800;
}

.impersonation-banner-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.22);
}

.impersonation-banner-form {
  margin: 0;
}

.impersonation-banner-exit {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: transparent;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 6px;
  cursor: pointer;
}
.impersonation-banner-exit:hover {
  background: #fff;
  color: #b45309;
}

body:has(.impersonation-banner) {
  padding-top: 100px;
}
body:has(.impersonation-banner) .nav {
  top: 44px;
}

@media (max-width: 600px) {
  .impersonation-banner {
    font-size: 13px;
    gap: 10px;
  }
  .impersonation-banner-tag {
    display: none;
  }
}
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 40px 20px;
  background: radial-gradient(1100px 620px at 50% -8%, #1e293b 0%, #0d1526 58%, #0a0f1a 100%);
}

.auth-brand {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.auth-logo {
  display: block;
  width: 150px;
  height: auto;
  color: #fff;
  --logo-accent: #fff;
}

.auth-version {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.3px;
  color: #cbd5e1;
  padding-bottom: 4px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.45);
  padding: 40px;
}
.auth-card .auth-title {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  color: #0f172a;
}
.auth-card .auth-subtitle {
  margin: 6px 0 28px;
  font-size: 15px;
  color: #64748b;
}
.auth-card .form-group {
  margin-bottom: 20px;
}
.auth-card .form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 14px;
  color: #0f172a;
}
.auth-card .password-input-wrapper {
  position: relative;
}
.auth-card .password-input-wrapper input {
  padding-right: 44px;
}
.auth-card .password-input-wrapper .password-toggle {
  position: absolute;
  right: 1px;
  top: 1px;
  bottom: 1px;
  width: 42px;
  background: none;
  border: none;
  cursor: pointer;
  color: #94a3b8;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0 var(--bt-radius) var(--bt-radius) 0;
}
.auth-card .password-input-wrapper .password-toggle:hover {
  color: #475569;
}
.auth-card .auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.auth-card .auth-row .remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #475569;
}
.auth-card .auth-row .remember-me input[type=checkbox] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}
.auth-card .auth-row .auth-forgot {
  font-size: 14px;
  font-weight: 600;
  color: var(--bt-primary);
  text-decoration: none;
}
.auth-card .auth-row .auth-forgot:hover {
  text-decoration: underline;
}
.auth-card .auth-btn {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
}
.auth-card .auth-error {
  margin-bottom: 20px;
}
.auth-card .auth-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 28px 0 20px;
}
.auth-card .auth-alt {
  margin: 0;
  text-align: center;
  font-size: 14px;
  color: #64748b;
}
.auth-card .auth-alt a {
  color: var(--bt-primary);
  font-weight: 600;
  text-decoration: none;
}
.auth-card .auth-alt a:hover {
  text-decoration: underline;
}

.auth-footer {
  font-size: 13px;
  color: #64748b;
}
.auth-footer a {
  color: #94a3b8;
  text-decoration: none;
}
.auth-footer a:hover {
  color: #cbd5e1;
}

@media (max-width: 480px) {
  .auth-card {
    padding: 28px 22px;
  }
}
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e293b 0%, #334155 50%, #1e293b 100%);
  padding: 20px;
}

.login-card {
  background: var(--bt-surface);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 420px;
  overflow: hidden;
}

.login-logo {
  background: linear-gradient(135deg, var(--bt-primary-dark), var(--bt-primary));
  padding: 32px 24px;
  text-align: center;
}

.login-logo-img,
.login-logo-mark {
  display: block;
  max-width: 100%;
  height: auto;
  color: #fff;
  --logo-accent: #fff;
}

.login-logo-img {
  width: 240px;
  margin: 0 auto;
}

.login-logo-mark {
  width: 72px;
  margin: 0 auto 12px;
}

.login-form {
  padding: 32px 24px;
}
.login-form .form-group {
  margin-bottom: 20px;
}
.login-form .form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: 13px;
  color: var(--bt-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.login-form .form-group input.core-input {
  padding: 12px 16px;
  font-size: 16px;
}
.login-form .password-input-wrapper {
  position: relative;
}
.login-form .password-input-wrapper input {
  padding-right: 44px;
}
.login-form .password-input-wrapper .password-toggle {
  position: absolute;
  right: 1px;
  top: 1px;
  bottom: 1px;
  width: 42px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--bt-text-muted);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0 var(--bt-radius) var(--bt-radius) 0;
}
.login-form .password-input-wrapper .password-toggle:hover {
  color: var(--bt-text);
}
.login-form .login-options {
  margin-bottom: 20px;
}
.login-form .login-options .remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--bt-text-muted);
}
.login-form .login-options .remember-me input[type=checkbox] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}
.login-form .login-btn {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  margin-top: 8px;
}
.login-form .login-error {
  margin-bottom: 20px;
}
.login-form .login-guest {
  text-align: center;
  margin-top: 16px;
}
.login-form .login-guest a {
  color: var(--bt-text-muted);
  text-decoration: none;
  font-size: 14px;
}
.login-form .login-guest a:hover {
  color: var(--bt-primary);
}

.setup-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 16px 24px;
  border-bottom: 1px solid var(--bt-border);
}

.setup-step {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--bt-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--bt-text-muted);
  flex-shrink: 0;
}
.setup-step.active {
  border-color: var(--bt-primary);
  background: var(--bt-button);
  color: var(--bt-on-primary);
}
.setup-step.complete {
  border-color: var(--bt-primary);
  background: var(--bt-button);
  color: var(--bt-on-primary);
  font-size: 10px;
}

.setup-step-line {
  flex: 1;
  height: 2px;
  background: var(--bt-border);
  max-width: 40px;
}
.setup-step-line.complete {
  background: var(--bt-primary);
}

.setup-intro {
  color: var(--bt-text);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 16px;
}

.setup-checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}
.setup-checklist li {
  padding: 8px 0;
  font-size: 14px;
  color: var(--bt-text);
  display: flex;
  align-items: center;
  gap: 10px;
}
.setup-checklist li i {
  color: var(--bt-primary);
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.setup-note {
  font-size: 13px;
  color: var(--bt-text-muted);
  margin: 0 0 20px;
}

.form-hint {
  display: block;
  font-size: 12px;
  color: var(--bt-text-muted);
  margin-top: 4px;
}

.setup-buttons {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
}
.setup-buttons .btn {
  flex: 1;
  text-align: center;
}

.setup-slug-preview {
  margin: -8px 0 16px;
  padding: 8px 12px;
  background: var(--bt-bg);
  border-radius: 6px;
  font-size: 13px;
  color: var(--bt-text-muted);
}
.setup-slug-preview strong {
  color: var(--bt-text);
}

.setup-template-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--bt-text-muted);
  text-transform: uppercase;
  margin: 16px 0 8px;
}

.setup-templates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 8px;
}

.setup-template-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.setup-template-card {
  border: 2px solid var(--bt-border);
  border-radius: 8px;
  padding: 14px 12px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  text-align: center;
}
.setup-template-card:hover {
  border-color: var(--bt-primary);
}

.setup-template-radio:checked + .setup-template-card {
  border-color: var(--bt-primary);
  background: color-mix(in srgb, var(--bt-primary) 5%, transparent);
  box-shadow: 0 0 0 1px var(--bt-primary);
}

.setup-template-icon {
  font-size: 24px;
  color: var(--bt-primary);
  margin-bottom: 6px;
}

.setup-template-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--bt-text);
  margin-bottom: 4px;
}

.setup-template-desc {
  font-size: 12px;
  color: var(--bt-text-muted);
  line-height: 1.4;
  margin-bottom: 8px;
}

.setup-status-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.setup-status-dot {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--bt-text-muted);
}
.setup-status-dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dot-color);
  flex-shrink: 0;
}

.setup-wide .login-card {
  max-width: 580px;
}

.setup-review-section {
  background: var(--bt-bg);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.setup-review-section h3 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--bt-text-muted);
  margin: 0 0 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.setup-review-section h3 i {
  margin-right: 6px;
}
.setup-review-section h3 a {
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--bt-primary);
  text-decoration: none;
}
.setup-review-section h3 a:hover {
  text-decoration: underline;
}

.setup-review-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  font-size: 14px;
}
.setup-review-row span {
  color: var(--bt-text-muted);
}
.setup-review-row strong {
  color: var(--bt-text);
}
.setup-review-row--block {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.setup-review-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.setup-review-tag {
  display: inline-block;
  padding: 2px 8px;
  background: var(--bt-surface);
  border: 1px solid var(--bt-border);
  border-radius: 4px;
  font-size: 12px;
  color: var(--bt-text);
}

.setup-logo-success {
  background: linear-gradient(135deg, #059669, #10b981) !important;
}

.signup-type-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 8px;
}

.signup-type-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.signup-type-card {
  border: 2px solid var(--bt-border);
  border-radius: 8px;
  padding: 20px 16px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  text-align: center;
}
.signup-type-card:hover {
  border-color: var(--bt-primary);
}

.signup-type-radio:checked + .signup-type-card {
  border-color: var(--bt-primary);
  background: color-mix(in srgb, var(--bt-primary) 5%, transparent);
  box-shadow: 0 0 0 1px var(--bt-primary);
}

.signup-type-icon {
  font-size: 28px;
  color: var(--bt-primary);
  margin-bottom: 8px;
}

.signup-type-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--bt-text);
  margin-bottom: 4px;
}

.signup-type-desc {
  font-size: 13px;
  color: var(--bt-text-muted);
  line-height: 1.4;
  margin-bottom: 12px;
}

.signup-type-features {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}
.signup-type-features li {
  font-size: 13px;
  color: var(--bt-text);
  padding: 3px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.signup-type-features li i {
  color: var(--bt-success);
  font-size: 11px;
  width: 14px;
  text-align: center;
  flex-shrink: 0;
}

.form-optional {
  font-weight: 400;
  color: var(--bt-text-muted);
  font-size: 12px;
}

.signup-tos label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--bt-text);
  cursor: pointer;
}
.signup-tos label input[type=checkbox] {
  margin-top: 2px;
  flex-shrink: 0;
}
.signup-tos label a {
  color: var(--bt-primary);
  text-decoration: none;
}
.signup-tos label a:hover {
  text-decoration: underline;
}

.signup-login-link {
  text-align: center;
  margin-top: 16px;
  font-size: 14px;
  color: var(--bt-text-muted);
}
.signup-login-link a {
  color: var(--bt-primary);
  text-decoration: none;
}
.signup-login-link a:hover {
  text-decoration: underline;
}

@media (max-width: 500px) {
  .setup-templates {
    grid-template-columns: 1fr;
  }
  .signup-type-cards {
    grid-template-columns: 1fr;
  }
  .setup-wide .login-card {
    max-width: 100%;
  }
}
.dash-layout {
  display: flex;
  gap: 24px;
}

.dash-sidebar {
  flex: 0 0 160px;
  position: sticky;
  top: 72px;
  align-self: flex-start;
  transition: flex-basis 0.2s ease;
}
.dash-sidebar.collapsed {
  flex: 0 0 40px;
}
.dash-sidebar.collapsed .dash-nav-text {
  display: none;
}
.dash-sidebar.collapsed .dash-nav-link {
  justify-content: center;
  padding: 8px;
}
.dash-sidebar.collapsed .dash-sidebar-toggle i {
  transform: rotate(180deg);
}

.dash-sidebar-toggle {
  background: none;
  border: none;
  padding: 4px 8px;
  cursor: pointer;
  color: var(--bt-text-muted);
  font-size: 11px;
  display: flex;
  justify-content: flex-end;
  width: 100%;
  margin-bottom: 4px;
}
.dash-sidebar-toggle i {
  transition: transform 0.2s ease;
}
.dash-sidebar-toggle:hover {
  color: var(--bt-text);
}

.dash-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dash-nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--bt-radius);
  font-size: 13px;
  font-weight: 500;
  color: var(--bt-text-muted);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.dash-nav-link i {
  width: 16px;
  text-align: center;
  font-size: 12px;
}
.dash-nav-link:hover {
  background: var(--bt-border);
  color: var(--bt-text);
}
.dash-nav-link.active {
  background: color-mix(in srgb, var(--bt-primary) 12%, transparent);
  color: var(--bt-primary);
  box-shadow: var(--bt-sidenav-active-indicator, none);
}

.dash-main {
  flex: 1;
  min-width: 0;
}

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

.stat-card {
  background: var(--bt-surface);
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  padding: 16px;
  text-align: center;
}

.stat-number {
  font-size: 32px;
  font-weight: 700;
  color: var(--bt-primary);
}

.stat-warning {
  color: var(--bt-warning);
}

.stat-danger {
  color: var(--bt-danger);
}

.stat-success {
  color: var(--bt-success);
}

.stat-muted {
  color: var(--bt-text-muted);
}

.stat-label {
  color: var(--bt-text-muted);
  font-size: 13px;
}

.dash-insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
  align-items: start;
}

.dash-insight-card {
  background: var(--bt-surface);
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
}

.dash-insight-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--bt-border);
  gap: 12px;
  flex-wrap: wrap;
}
.dash-insight-header h2 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  color: var(--bt-text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.dash-insight-header h2 .dash-insight-toggle {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dash-insight-header h2 .dash-insight-toggle:focus-visible {
  outline: 2px solid var(--bt-primary);
  outline-offset: 3px;
  border-radius: 3px;
}
.dash-insight-header h2 i {
  color: var(--bt-primary);
  font-size: 13px;
}

.dash-insight-meta {
  font-size: 12px;
}
.dash-insight-meta .user-status {
  font-size: 12px;
}

.dash-insight-body {
  flex: 1;
}

.dash-insight-footer-link {
  display: block;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--bt-border);
  font-size: 13px;
  color: var(--bt-primary);
  text-decoration: none;
  font-weight: 500;
}
.dash-insight-footer-link:hover {
  text-decoration: underline;
}

.dash-team-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dash-team-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: var(--bt-radius);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
}
.dash-team-item a:hover {
  background: color-mix(in srgb, var(--bt-primary) 6%, transparent);
}

.dash-team-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--bt-primary) 15%, var(--bt-surface));
  color: var(--bt-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 12px;
  flex-shrink: 0;
  border: 1px solid color-mix(in srgb, var(--bt-primary) 25%, transparent);
}

.dash-team-info {
  flex: 1;
  min-width: 0;
}

.dash-team-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--bt-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-team-role {
  font-size: 11px;
  text-transform: capitalize;
}

.dash-storage-used {
  font-size: 32px;
  font-weight: 700;
  color: var(--bt-primary);
  line-height: 1;
}

.dash-storage-max {
  font-size: 13px;
  color: var(--bt-text-muted);
  margin-top: 4px;
}

.dash-storage-bar {
  margin-top: 14px;
  height: 8px;
  background: color-mix(in srgb, var(--bt-text-muted) 15%, transparent);
  border-radius: 999px;
  overflow: hidden;
}

.dash-storage-fill {
  height: 100%;
  background: var(--bt-primary);
  border-radius: 999px;
  transition: width 0.3s ease;
}
.dash-storage-fill.warning {
  background: var(--bt-warning);
}
.dash-storage-fill.danger {
  background: var(--bt-danger);
}

.dash-storage-pct {
  margin-top: 6px;
  font-size: 12px;
  color: var(--bt-text-muted);
  text-align: right;
}

@media (max-width: 768px) {
  .dash-insights-grid {
    grid-template-columns: 1fr;
  }
}
.dash-section {
  margin-bottom: 32px;
  scroll-margin-top: 72px;
}

.dash-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.dash-section-header h2 {
  margin: 0;
  font-size: 18px;
}

.dash-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.dash-filters select {
  padding: 4px 28px 4px 8px;
  height: 30px;
  min-height: 30px;
  border-radius: 4px;
  background-size: 8px;
  background-position: right 6px center;
}

.dash-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.dash-search-wrap.dash-search-fullrow {
  flex-basis: 100%;
}
.dash-search-wrap.dash-search-fullrow .dash-search-input {
  width: 100%;
}

.dash-search-input {
  padding: 4px 24px 4px 8px;
  border: 1px solid var(--bt-border);
  border-radius: 4px;
  height: 30px;
  font-family: inherit;
  width: 140px;
}

.dash-scroll-area {
  max-height: 500px;
  overflow-y: auto;
}

.dash-section-body {
  transition: max-height 0.3s ease, opacity 0.2s ease;
  overflow: hidden;
}
.dash-section-body.collapsed {
  max-height: 0 !important;
  opacity: 0;
  margin: 0;
}
.dash-section-body .empty {
  padding: 8px;
}

.dash-section-toggle {
  cursor: pointer;
  user-select: none;
}
.dash-section-toggle:hover {
  opacity: 0.8;
}

.dash-toggle-icon {
  font-size: 14px;
  width: 16px;
  display: inline-block;
  transition: transform 0.2s ease;
}

.rich-editor-toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px 8px;
  background: var(--bt-bg);
  border: 1px solid var(--bt-border);
  border-bottom: none;
  border-radius: var(--bt-radius) var(--bt-radius) 0 0;
}
.rich-editor-toolbar button {
  background: none;
  border: 1px solid transparent;
  cursor: pointer;
  color: var(--bt-text-muted);
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 3px;
  line-height: 1;
}
.rich-editor-toolbar button:hover {
  color: var(--bt-text);
  background: var(--bt-surface);
  border-color: var(--bt-border);
}
.rich-editor-toolbar button.toolbar-active {
  color: var(--bt-primary);
  background: var(--bt-primary-soft);
  border-color: var(--bt-primary);
}
.rich-editor-toolbar select {
  width: auto;
  height: auto;
  min-height: 0;
  background-color: var(--bt-surface);
  border: 1px solid var(--bt-border);
  border-radius: 3px;
  color: var(--bt-text-muted);
  padding: 3px 24px 3px 6px;
  cursor: pointer;
}
.rich-editor-toolbar .toolbar-sep {
  width: 1px;
  height: 18px;
  background: var(--bt-border);
  margin: 0 4px;
}
.rich-editor-toolbar .toolbar-color-wrap {
  position: relative;
}
.rich-editor-toolbar .toolbar-color-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 3px 8px !important;
}
.rich-editor-toolbar .toolbar-color-indicator {
  display: block;
  width: 16px;
  height: 3px;
  border-radius: 1px;
}
.rich-editor-toolbar .toolbar-color-palette {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 100;
  background: var(--bt-surface);
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  padding: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}
.rich-editor-toolbar .toolbar-color-palette.show {
  display: grid;
}
.rich-editor-toolbar .toolbar-color-swatch {
  width: 24px;
  height: 24px;
  border: 1px solid var(--bt-border);
  border-radius: 3px;
  cursor: pointer;
  padding: 0;
}
.rich-editor-toolbar .toolbar-color-swatch:hover {
  transform: scale(1.2);
  box-shadow: 0 0 0 2px var(--bt-primary);
}
.rich-editor-toolbar .toolbar-color-reset {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 4px 8px;
  font-size: 12px;
  color: var(--bt-text-secondary);
  background: var(--bt-bg);
  border: 1px solid var(--bt-border);
  border-radius: 3px;
  cursor: pointer;
  margin-top: 2px;
}
.rich-editor-toolbar .toolbar-color-reset:hover {
  background: var(--bt-surface);
  color: var(--bt-text);
}
.rich-editor-toolbar .toolbar-highlight-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 3px 8px !important;
}
.rich-editor-toolbar .toolbar-highlight-indicator {
  display: block;
  width: 16px;
  height: 3px;
  border-radius: 1px;
}
.rich-editor-toolbar .toolbar-highlight-palette {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 100;
  background: var(--bt-surface);
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  padding: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}
.rich-editor-toolbar .toolbar-highlight-palette.show {
  display: grid;
}
.rich-editor-toolbar .toolbar-highlight-swatch {
  width: 24px;
  height: 24px;
  border: 1px solid var(--bt-border);
  border-radius: 3px;
  cursor: pointer;
  padding: 0;
  font-size: 11px;
  line-height: 24px;
  color: var(--bt-text-muted);
}
.rich-editor-toolbar .toolbar-highlight-swatch:hover {
  transform: scale(1.2);
  box-shadow: 0 0 0 2px var(--bt-primary);
}
.rich-editor-toolbar .toolbar-reset-all {
  font-size: 13px;
  color: var(--bt-text-muted);
}
.rich-editor-toolbar .toolbar-reset-all:hover {
  color: var(--bt-danger);
}

.rich-editor {
  min-height: 300px;
  overflow: auto;
  resize: vertical;
  padding: 12px;
  border: 1px solid var(--bt-border);
  border-radius: 0 0 var(--bt-radius) var(--bt-radius);
  background: var(--bt-surface);
  color: var(--bt-text);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
}
@media (max-width: 768px) {
  .rich-editor {
    font-size: 16px;
  }
}
.rich-editor:focus {
  outline: none;
  border-color: var(--bt-primary);
  box-shadow: 0 0 0 2px var(--bt-focus-ring);
}
.rich-editor div, .rich-editor p {
  margin: 0;
  padding: 0;
}
.rich-editor font[size="2"] {
  font-size: inherit;
}
.rich-editor b, .rich-editor strong {
  font-weight: 700;
}
.rich-editor i, .rich-editor em {
  font-style: italic;
}
.rich-editor u {
  text-decoration: underline;
}
.rich-editor s, .rich-editor strike {
  text-decoration: line-through;
}

.issue-page-header {
  margin-bottom: 18px;
}
.issue-page-header p {
  margin: 5px 0 0;
}

.issues-filterbar {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 12px;
  background: var(--bt-toolbar-bg);
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  margin-bottom: 18px;
  position: sticky;
  top: 56px;
  z-index: 50;
  box-shadow: var(--bt-card-shadow);
}

.filterbar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}

.filterbar-main {
  justify-content: space-between;
  flex-wrap: nowrap;
}

.filterbar-filters,
.filterbar-views {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filterbar-filters {
  flex: 1 1 auto;
  min-width: 0;
}

.filterbar-filters select,
.filterbar-views select,
.filterbar-more-btn {
  min-height: 38px;
}

.filterbar-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--bt-text-muted);
  white-space: nowrap;
}

.filterbar-views {
  flex: 0 0 auto;
  padding-left: 18px;
  border-left: 1px solid var(--bt-border);
}

.filterbar-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.filterbar-more-btn.has-filters {
  border-color: var(--bt-primary);
  color: var(--bt-primary);
}

.filterbar-chips-row {
  border-top: 1px solid var(--bt-border);
  margin-top: 8px;
  padding-top: 8px;
}

.filterbar-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 11px;
  background: color-mix(in srgb, var(--bt-primary) 10%, transparent);
  color: var(--bt-primary);
  border-radius: 12px;
  white-space: nowrap;
}
.filter-chip .filter-chip-label {
  font-weight: 600;
}
.filter-chip .filter-chip-remove {
  background: none;
  border: none;
  color: var(--bt-primary);
  cursor: pointer;
  padding: 4px;
  font-size: 12px;
  line-height: 1;
  opacity: 0.6;
  display: flex;
  align-items: center;
  min-width: 24px;
  min-height: 24px;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.filter-chip .filter-chip-remove i {
  pointer-events: none;
}
.filter-chip .filter-chip-remove:hover {
  opacity: 1;
}

.issue-filter-fields {
  display: grid;
  gap: 16px;
}
.issue-filter-fields .form-group {
  margin: 0;
  min-width: 0;
}
.issue-filter-fields select.filter-active {
  border-color: var(--bt-primary);
}

.issue-filter-section {
  margin: 8px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--bt-border);
  font-size: 14px;
}
.issue-filter-section:first-child {
  margin: 0;
  padding: 0;
  border: 0;
}

.issues-header-search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 260px;
  max-width: 300px;
  min-width: 190px;
}
.issues-header-search .issues-header-search-icon {
  position: absolute;
  left: 10px;
  font-size: 13px;
  color: var(--bt-text-muted);
  pointer-events: none;
}
.issues-header-search input {
  width: 100%;
  padding-left: 32px;
  padding-right: 30px;
  height: 38px;
}

.filterbar-group-select {
  margin-left: auto;
}

.issue-source-group {
  margin-bottom: 14px;
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  background: var(--bt-surface);
  overflow: hidden;
}

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

.source-header-text {
  font-size: 11px;
  font-weight: 700;
  color: var(--bt-source-accent);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.source-header-line {
  flex: 1;
  height: 1px;
  background: var(--bt-border);
}

.issue-category-group {
  margin-bottom: 16px;
}
.issue-category-group .category-header {
  padding-left: 16px;
}
.issue-category-group .category-abbr {
  width: 22px;
  height: 22px;
  font-size: 9px;
  border-radius: 5px;
  background: var(--bt-text-muted);
}
.issue-category-group .category-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--bt-text-muted);
}
.issue-category-group .issue-list {
  padding-left: 16px;
}

.category-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 0;
  background: var(--bt-surface);
}

.issue-group-toggle {
  cursor: pointer;
  user-select: none;
}

.issue-group-icon {
  font-size: 11px;
  width: 14px;
  text-align: center;
  color: var(--bt-text-muted);
  transition: transform 0.15s ease;
}

.issue-group-body.collapsed {
  display: none;
}

.group-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 12px;
}
.group-controls.group-controls-sub {
  margin-bottom: 8px;
  padding-left: 16px;
}

.group-controls-label {
  font-weight: 600;
  color: var(--bt-text-muted);
}

.group-controls-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: 12px;
  color: var(--bt-link);
}
.group-controls-btn:hover {
  text-decoration: underline;
}

.group-controls-sep {
  color: var(--bt-text-muted);
}

.group-controls-divider {
  width: 1px;
  height: 14px;
  background: var(--bt-border);
  margin: 0 6px;
}

.category-abbr {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--bt-category-badge-bg);
  color: var(--bt-on-primary);
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}

.category-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--bt-text);
}

.category-count {
  font-size: 11px;
  color: var(--bt-text-muted);
  margin-left: 4px;
}

.issue-count {
  font-size: 13px;
  color: var(--bt-text-muted);
}

.issue-count-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.load-more-row {
  display: flex;
  justify-content: center;
  padding: 16px 0;
}

.issue-list {
  display: block;
  background: var(--bt-surface);
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  overflow-x: auto;
}

.issue-source-group > .issue-group-body > .issue-category-group:last-child,
.issue-category-group:last-child {
  margin-bottom: 0;
}

.issue-source-group .issue-list {
  border-width: 1px 0 0;
  border-radius: 0;
}

.issue-list-header {
  display: grid;
  grid-template-columns: 36px 84px minmax(280px, 1fr) 120px 150px 110px 28px;
  align-items: center;
  min-width: 850px;
  padding: 0 12px 0 0;
  background: var(--bt-surface-soft);
  border-bottom: 1px solid var(--bt-border);
  color: var(--bt-text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.issue-list-header span {
  padding: 9px 8px;
}

.issue-card {
  display: grid;
  grid-template-columns: 84px minmax(280px, 1fr) 120px 150px 110px 28px;
  align-items: center;
  min-width: 814px;
  padding: 0 12px 0 0;
  background: var(--bt-surface);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: background 0.1s ease;
}
.issue-card:hover {
  background: var(--bt-card-hover);
}

.issue-card-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 12px 8px;
}

.issue-card-num {
  font-size: 12px;
  font-weight: 600;
  color: var(--bt-text-muted);
  min-width: 28px;
}

.issue-card-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.issue-card-body {
  flex: 1;
  min-width: 0;
  padding: 10px 8px;
}

.issue-card-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--bt-text);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.issue-desc-preview {
  margin-top: 3px;
  color: var(--bt-text-muted);
  font-size: 12px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.issue-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
  font-size: 11px;
  color: var(--bt-text-muted);
}

.issue-card-date {
  white-space: nowrap;
}

.issue-card-owner {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.issue-card-images {
  white-space: nowrap;
  opacity: 0.6;
  font-size: 10px;
}
.issue-card-images i {
  margin-right: 2px;
}

.issue-card-due {
  white-space: nowrap;
  font-size: 10px;
  color: var(--bt-text-muted);
}
.issue-card-due i {
  margin-right: 2px;
}
.issue-card-due--overdue {
  color: var(--bt-danger);
  font-weight: 600;
}
.issue-card-due--soon {
  color: var(--bt-warning);
  font-weight: 600;
}

.issue-card-right {
  flex-shrink: 0;
  padding: 10px 8px;
}

.issue-card-date-column,
.issue-card-assignee {
  min-width: 0;
  padding: 10px 8px;
  font-size: 12px;
  color: var(--bt-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.issue-card-assignee {
  color: var(--bt-text);
}

.issue-card-chevron {
  color: var(--bt-text-muted);
  font-size: 13px;
  text-align: center;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
  text-transform: capitalize;
  white-space: nowrap;
}

.badge-status {
  background: color-mix(in srgb, var(--status-color, #6b7280) var(--bt-status-tint), var(--bt-surface));
  color: color-mix(in srgb, var(--status-color, #6b7280) var(--bt-status-mix), var(--bt-status-ink));
  box-shadow: inset 0 0 0 1px var(--bt-status-border);
}

.issue-card-row:has(.bulk-check:checked),
.issue-card-row:has(.bulk-check:checked) .issue-card {
  background: var(--bt-selected);
}

.badge-orphaned {
  background: var(--bt-danger-soft);
  color: var(--bt-danger-ink);
  font-size: 10px;
}

.issue-orphaned-notice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px;
  margin-bottom: 16px;
  border-radius: 6px;
  background: var(--bt-danger-soft);
  color: var(--bt-danger-ink);
  font-weight: 600;
  font-size: 13px;
}
.issue-orphaned-notice small {
  font-weight: 400;
  font-size: 11px;
  opacity: 0.8;
}

.issue-readonly-text {
  padding: 10px 14px;
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  font-size: 14px;
  background: var(--bt-bg);
  color: var(--bt-text);
  min-height: 38px;
}

.issue-readonly-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--bt-text-muted);
}
.issue-readonly-notice i {
  color: var(--bt-warning);
}

.issue-readonly-description {
  line-height: 1.6;
  white-space: pre-wrap;
  max-height: 400px;
  overflow-y: auto;
}

.priority-high {
  color: var(--bt-danger);
  font-weight: 600;
  font-size: 11px;
}

.priority-medium {
  color: var(--bt-warning);
  font-weight: 500;
  font-size: 11px;
}

.priority-normal {
  color: var(--bt-text-muted);
  font-size: 11px;
}

.issue-group-doc {
  margin-bottom: 32px;
}
.issue-group-doc .group-header {
  font-size: 14px;
  font-weight: 700;
  color: var(--bt-text);
  padding: 8px 0 6px;
  border-bottom: 2px solid var(--bt-primary);
  margin-bottom: 0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bt-surface);
  border-radius: var(--bt-radius);
  overflow: hidden;
  border: 1px solid var(--bt-border);
}
.data-table th, .data-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--bt-border);
  font-size: 14px;
}
.data-table th {
  background: var(--bt-bg);
  font-weight: 600;
  white-space: nowrap;
}
.data-table a {
  color: var(--bt-primary);
  text-decoration: none;
}
.data-table a:hover {
  text-decoration: underline;
}

.issue-meta {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  font-size: 14px;
}

.issue-body {
  background: var(--bt-surface);
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  padding: 16px;
  margin-bottom: 24px;
  line-height: 1.6;
}

.issue-edit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.issue-edit-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.issue-edit-header-left h1 {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
}

.issue-edit-back {
  color: var(--bt-text-muted);
  text-decoration: none;
  font-size: 16px;
}
.issue-edit-back:hover {
  color: var(--bt-primary);
}

.issue-edit-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.issue-edit-header-buttons {
  display: flex;
  gap: 8px;
}

.issue-edit-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  align-items: start;
}

.issue-edit-left {
  min-width: 0;
}

.mobile-form-buttons {
  display: none;
}

.issue-edit-field {
  margin-bottom: 24px;
}

.issue-edit-field + .issue-edit-field {
  margin-top: 8px;
}

.issue-edit-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--bt-text-muted);
  margin-bottom: 6px;
}

.issue-edit-label-hint {
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
}

.issue-edit-field input[type=text],
.issue-edit-field textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  font-family: inherit;
  background: var(--bt-surface);
  color: var(--bt-text);
}
.issue-edit-field input[type=text]:focus,
.issue-edit-field textarea:focus {
  outline: none;
  border-color: var(--bt-primary);
  box-shadow: 0 0 0 2px var(--bt-focus-ring);
}

.issue-edit-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--bt-border);
  margin-bottom: 8px;
}

.issue-edit-tab {
  background: none;
  border: none;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--bt-text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
}
.issue-edit-tab:hover {
  color: var(--bt-text);
}
.issue-edit-tab.active {
  color: var(--bt-primary);
  border-bottom-color: var(--bt-primary);
}

.issue-edit-tab-count {
  font-weight: 400;
  color: var(--bt-text-muted);
}
.active .issue-edit-tab-count {
  color: var(--bt-primary);
}

.issue-edit-sidebar {
  background: var(--bt-surface);
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  padding: 20px;
}

.issue-sidebar-field {
  margin-bottom: 16px;
}
.issue-sidebar-field select {
  width: 100%;
}
.issue-sidebar-field .core-datepicker-wrap {
  width: 100%;
}

.issue-reporter-external {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}
.issue-reporter-external[hidden] {
  display: none;
}

.issue-sidebar-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--bt-primary);
  margin-bottom: 6px;
}

.issue-sidebar-meta {
  border-top: 1px solid var(--bt-border);
  padding-top: 8px;
  margin-top: 8px;
}

.issue-sidebar-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--bt-border);
}
.issue-sidebar-meta-row span {
  color: var(--bt-text-muted);
  flex-shrink: 0;
}
.issue-sidebar-meta-row strong {
  color: var(--bt-text);
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.issue-sidebar-meta-row--stacked {
  flex-direction: column;
  align-items: stretch;
  gap: 1px;
}

.issue-sidebar-meta-row-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.issue-sidebar-meta-by {
  color: var(--bt-text-muted);
  font-size: 12px;
  text-align: right;
}

.issue-sidebar-delete {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--bt-border);
  text-align: center;
}

.issue-delete-btn {
  background: none;
  border: 1px solid var(--bt-danger);
  color: var(--bt-danger);
  padding: 8px 20px;
  border-radius: var(--bt-radius);
  font-size: 13px;
  cursor: pointer;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}
.issue-delete-btn:hover {
  background: var(--bt-danger);
  color: var(--bt-on-primary);
}

.issue-edit-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  margin-bottom: 0;
}
.issue-edit-section-header .issue-edit-label {
  margin-bottom: 0;
}

.issue-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  font-size: 12px;
  color: var(--bt-primary);
  border: 1px solid var(--bt-primary);
  border-radius: 12px;
  cursor: pointer;
  background: none;
  transition: all 0.15s ease;
}
.issue-add-btn:hover {
  background: var(--bt-button);
  color: var(--bt-on-primary);
}

.issue-images-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
  margin-bottom: 12px;
}

.issue-image-item {
  position: relative;
  width: 120px;
}
.issue-image-item img {
  width: 120px;
  height: 90px;
  object-fit: cover;
  display: block;
  border-radius: var(--bt-radius);
  border: 1px solid var(--bt-border);
  cursor: pointer;
}
.issue-image-item .issue-image-name {
  margin-top: 4px;
}
.issue-image-item .issue-image-caption {
  width: 120px;
  border: none;
  padding: 2px 0;
  font-size: 11px;
  background: transparent;
  color: var(--bt-text-muted);
  font-family: inherit;
  text-align: center;
}
.issue-image-item .issue-image-caption::placeholder {
  color: var(--bt-text-muted);
}
.issue-image-item .issue-image-caption:focus {
  outline: none;
  color: var(--bt-text);
}
.issue-image-item .issue-image-delete {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.issue-image-item:hover .issue-image-delete {
  opacity: 1;
}

.issue-drop-zone {
  display: block;
  padding: 28px;
  border: 2px dashed var(--bt-border);
  border-radius: var(--bt-radius);
  text-align: center;
  color: var(--bt-text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.issue-drop-zone:hover, .issue-drop-zone.dragover {
  border-color: var(--bt-primary);
  background: color-mix(in srgb, var(--bt-primary) 4%, transparent);
  color: var(--bt-primary);
}

.issue-videos-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.issue-video-card {
  width: 200px;
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.15s;
  background: var(--bt-surface);
}
.issue-video-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.issue-video-card:hover .issue-video-play {
  opacity: 1;
}

.issue-video-thumb {
  position: relative;
  aspect-ratio: 16/9;
  background-size: cover;
  background-position: center;
  background-color: #000;
}

.issue-video-thumb-generic {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  display: flex;
  align-items: center;
  justify-content: center;
}

.issue-video-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: opacity 0.15s;
  color: #fff;
  font-size: 28px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.issue-video-info {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
}

.issue-video-name {
  flex: 1;
  font-size: 12px;
  color: var(--bt-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.issue-video-delete {
  background: none;
  border: none;
  color: var(--bt-text-muted);
  cursor: pointer;
  padding: 2px 4px;
  font-size: 13px;
  flex-shrink: 0;
}
.issue-video-delete:hover {
  color: var(--bt-danger);
}

.video-player-modal .modal-content {
  max-width: 800px;
  width: 90%;
}

.video-modal-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: var(--bt-radius);
  overflow: hidden;
}
.video-modal-wrapper iframe,
.video-modal-wrapper video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.issue-video-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bt-surface);
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  color: var(--bt-primary);
  text-decoration: none;
  font-size: 13px;
}
.issue-video-link:hover {
  background: color-mix(in srgb, var(--bt-primary) 6%, transparent);
}

.issue-comments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--bt-border);
  margin-bottom: 6px;
}
.issue-comments-header .issue-edit-label {
  margin-bottom: 0;
}

.comment-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  font-size: 11px;
  color: var(--bt-text-muted);
  border: 1px solid var(--bt-border);
  border-radius: 12px;
  cursor: pointer;
  background: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.comment-sort-btn:hover {
  border-color: var(--bt-primary);
  color: var(--bt-primary);
}

.comment-edited {
  font-style: italic;
  opacity: 0.7;
}

.issue-comment-count {
  font-weight: 400;
  color: var(--bt-text-muted);
}

.issue-comments-list {
  margin-bottom: 12px;
}
.issue-comments-list.scrollable {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  padding: 0 12px;
}

.issue-comment {
  padding: 10px 0;
  border-bottom: 1px solid var(--bt-border);
}
.issue-comment:last-child {
  border-bottom: none;
}

.issue-comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.issue-comment-header strong {
  font-size: 13px;
  color: var(--bt-text);
}
.issue-comment-header small {
  font-size: 11px;
  color: var(--bt-text-muted);
}

.issue-comment-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.issue-comment-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.issue-comment-actions button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--bt-text-muted);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 3px;
}
.issue-comment-actions button:hover {
  color: var(--bt-primary);
  background: var(--bt-bg);
}
.issue-comment-actions .comment-delete-btn:hover {
  color: var(--bt-danger);
}

.issue-comment:hover .issue-comment-actions {
  opacity: 1;
}

.issue-comment-edit-form {
  margin-top: 6px;
}
.issue-comment-edit-form textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  font-family: inherit;
  resize: vertical;
  background: var(--bt-surface);
  color: var(--bt-text);
}
.issue-comment-edit-form textarea:focus {
  outline: none;
  border-color: var(--bt-primary);
}

.issue-comment-edit-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.issue-comment-body {
  font-size: 13px;
  line-height: 1.5;
  color: var(--bt-text);
}

.issue-comment-add textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  font-family: inherit;
  resize: vertical;
  min-height: 60px;
  background: var(--bt-surface);
  color: var(--bt-text);
}
.issue-comment-add textarea::placeholder {
  color: var(--bt-text-muted);
}
.issue-comment-add textarea:focus {
  outline: none;
  border-color: var(--bt-primary);
}
.issue-comment-add .btn {
  margin-top: 8px;
}

.bulk-toolbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  background: var(--bt-button);
  color: var(--bt-on-primary);
  border-radius: var(--bt-radius);
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.bulk-toolbar.visible {
  display: flex;
}

.bulk-toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bulk-match-all-banner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.15);
  white-space: nowrap;
}

.bulk-match-all-btn {
  background: none;
  border: none;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  padding: 0;
}
.bulk-match-all-btn:hover {
  opacity: 0.85;
}

.bulk-select-all {
  margin: 0;
}
.bulk-select-all .core-checkbox-label {
  color: var(--bt-on-primary);
  font-size: 13px;
}
.bulk-select-all .core-checkbox .core-checkbox-icon {
  border-color: rgba(255, 255, 255, 0.6);
}

.bulk-count {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

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

.bulk-action-select {
  padding: 4px 24px 4px 8px;
  height: 30px;
  min-height: 30px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.15);
  color: var(--bt-on-primary);
  cursor: pointer;
}
.bulk-action-select option {
  color: var(--bt-input-text);
  background: var(--bt-input-bg);
}

.btn-danger {
  background: var(--bt-danger);
  border-color: var(--bt-danger);
  color: var(--bt-on-primary);
}
.btn-danger:hover {
  opacity: 0.9;
}

.bulk-toolbar .btn {
  height: 30px;
  min-height: 30px;
  font-size: 12px;
  padding: 4px 10px;
}

.bulk-toolbar .btn-outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--bt-on-primary);
}
.bulk-toolbar .btn-outline:hover {
  background: rgba(255, 255, 255, 0.15);
}

.issue-card-row {
  display: grid;
  grid-template-columns: 36px minmax(814px, 1fr);
  align-items: center;
  min-width: 850px;
  background: var(--bt-surface);
  border-bottom: 1px solid var(--bt-border);
}
.issue-card-row:last-child {
  border-bottom: 0;
}

.issue-checkbox {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  min-width: 36px;
  height: 100%;
  background: var(--bt-surface);
  cursor: pointer;
  flex-shrink: 0;
  margin: 0;
  gap: 0;
  padding: 0;
}
.issue-checkbox .core-checkbox {
  width: 26px;
  height: 26px;
  min-width: 26px;
  min-height: 26px;
}

.issue-card-row .issue-card {
  min-width: 0;
}

.issue-title-cell .issue-title-text {
  display: block;
  color: var(--bt-text);
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
  line-height: 1.3;
}
.issue-title-cell .issue-title-text:hover {
  color: var(--bt-primary);
  text-decoration: underline;
}
.issue-title-cell .issue-desc-preview {
  display: block;
  font-size: 11px;
  color: var(--bt-text-muted);
  margin-top: 3px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.note-sidebar-thumb:has(.issue-image-caption) {
  height: auto;
  overflow: visible;
}
.note-sidebar-thumb:has(.issue-image-caption) img {
  height: 48px;
  border-radius: 4px 4px 0 0;
}

.note-sidebar-thumb .issue-image-caption {
  width: 100%;
  font-size: 9px;
  border: none;
  padding: 2px 1px;
  background: transparent;
  color: var(--bt-text-muted);
  font-family: inherit;
  text-align: center;
  display: block;
}
.note-sidebar-thumb .issue-image-caption::placeholder {
  opacity: 0.5;
}
.note-sidebar-thumb .issue-image-caption:focus {
  outline: none;
  color: var(--bt-text);
}

.note-sidebar-files .issue-video-card {
  position: relative;
}
.note-sidebar-files .issue-video-card > .issue-video-sidebar-delete {
  position: absolute;
  top: 2px;
  right: 2px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  font-size: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 2;
}
.note-sidebar-files .issue-video-card:hover > .issue-video-sidebar-delete {
  opacity: 1;
}

.category-layout {
  max-width: 700px;
}

.text-muted {
  color: var(--bt-text-muted);
}

.actions-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.form-hint {
  display: block;
  font-size: 12px;
  color: var(--bt-text-muted);
  margin-top: 4px;
}

.drag-handle {
  cursor: grab;
  color: var(--bt-text-muted);
  text-align: center;
  user-select: none;
}
.drag-handle:active {
  cursor: grabbing;
}

tr.dragging {
  opacity: 0.4;
}

tr.drag-over {
  border-top: 2px solid var(--bt-primary);
}

.todo-filterbar {
  margin-bottom: 16px;
}

.todo-filters-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.todo-filters-row select {
  height: 36px;
  padding: 0 8px;
  min-width: 120px;
  cursor: pointer;
}

.todo-search {
  position: relative;
  flex: 0 0 200px;
}
.todo-search .todo-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--bt-text-muted);
  font-size: 13px;
  pointer-events: none;
}
.todo-search input {
  padding-left: 32px;
  height: 36px;
  width: 100%;
}

.todo-count {
  color: var(--bt-text-muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.todo-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.todo-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bt-surface);
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  cursor: pointer;
  transition: background 0.15s;
}
.todo-item:hover {
  background: var(--bt-hover);
}

.todo-status-done {
  opacity: 0.6;
}
.todo-status-done .todo-title {
  text-decoration: line-through;
  color: var(--bt-text-muted);
}

.todo-bulk-check-wrap {
  flex-shrink: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.todo-bulk-check {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.todo-status-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 50%;
  transition: background 0.15s;
  padding: 0;
}
.todo-status-btn:hover {
  background: var(--bt-hover);
}
.todo-status-btn.todo-status-open {
  color: var(--bt-text-muted);
}
.todo-status-btn.todo-status-in_progress {
  color: var(--bt-warning);
}
.todo-status-btn.todo-status-done {
  color: var(--bt-success);
}

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

.todo-title {
  font-size: 14px;
  font-weight: 500;
}

.todo-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  font-size: 12px;
  color: var(--bt-text-muted);
  flex-wrap: wrap;
}

.todo-priority-badge {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 3px;
}
.todo-priority-badge.priority-high {
  color: var(--bt-danger);
  background: color-mix(in srgb, var(--bt-danger) 12%, var(--bt-surface));
}
.todo-priority-badge.priority-medium {
  color: var(--bt-warning);
  background: color-mix(in srgb, var(--bt-warning) 12%, var(--bt-surface));
}

.todo-category-badge {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--bt-primary) 10%, var(--bt-surface));
  color: var(--bt-primary);
}

.todo-file-count {
  color: var(--bt-text-muted);
}

.todo-due {
  color: var(--bt-text-muted);
}
.todo-due.todo-overdue {
  color: var(--bt-danger);
  font-weight: 600;
}

.todo-delete-btn {
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.15s;
}

.todo-item:hover .todo-delete-btn {
  opacity: 1;
}

.todo-group {
  margin-bottom: 16px;
}

.todo-group-header {
  font-size: 14px;
  font-weight: 600;
  padding: 6px 0;
  border-bottom: 1px solid var(--bt-border);
  margin-bottom: 4px;
}

.todo-group-count {
  color: var(--bt-text-muted);
  font-weight: 400;
}

.todo-status-indicator {
  width: 24px;
  height: 24px;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.todo-status-indicator.todo-status-open {
  color: var(--bt-text-muted);
}
.todo-status-indicator.todo-status-in_progress {
  color: var(--bt-warning);
}
.todo-status-indicator.todo-status-done {
  color: var(--bt-success);
}

#todoModal .form-row {
  display: flex;
  gap: 12px;
}
#todoModal .form-row .form-group {
  flex: 1;
}
#todoModal .rich-editor-wrap {
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  overflow: hidden;
}
#todoModal .rich-editor {
  min-height: 120px;
  max-height: 300px;
  overflow-y: auto;
  padding: 8px 12px;
}
#todoModal .modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--bt-border);
}

.notes-page-header {
  margin-bottom: 12px;
}
.notes-page-header h1 {
  font-size: 20px;
  margin: 0 0 8px;
}

.notes-header-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}
.notes-header-bar .notes-filter-btn {
  display: none;
}

.notes-section-title {
  font-size: 16px;
  margin: 0 0 12px;
  cursor: pointer;
}

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

.note-card {
  background: var(--bt-surface);
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  padding: 16px;
  cursor: pointer;
  transition: border-color 0.15s ease;
  display: flex;
  flex-direction: column;
  color: var(--bt-text);
  text-decoration: none;
}
.note-card:hover {
  border-color: var(--bt-primary);
}
.note-card h3 {
  margin: 0 0 4px;
}
.note-card h3 a {
  color: var(--bt-text);
  text-decoration: none;
}
.note-card h3 a:hover {
  color: var(--bt-primary);
}
.note-card .note-card-num {
  font-size: 12px;
  font-weight: 600;
  color: var(--bt-text-muted);
  flex-shrink: 0;
}

.note-preview {
  color: var(--bt-text-muted);
  font-size: 14px;
  margin: 8px 0;
  white-space: pre-line;
  flex: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
}

.note-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--bt-text-muted);
  font-size: 14px;
}
.note-footer small {
  font-size: 13px;
}

.note-footer-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.note-category-badge {
  display: inline-block;
  padding: 2px 10px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
  background: color-mix(in srgb, var(--bt-primary) 12%, transparent);
  color: var(--bt-primary);
  white-space: nowrap;
}

.note-list-category {
  display: none;
}

html[data-notes-view=list] .notes-grid {
  opacity: 0;
}

.notes-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.notes-list .note-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 6px 12px;
  gap: 12px;
}
.notes-list .note-card h3 {
  flex: 1;
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notes-list .note-card .note-card-num {
  min-width: 36px;
}
.notes-list .note-card .note-list-category {
  display: block;
  width: 120px;
  flex-shrink: 0;
  font-size: 12px;
  color: var(--bt-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notes-list .note-card .note-preview {
  display: none;
}
.notes-list .note-card .note-category-badge {
  display: none;
}
.notes-list .note-card .note-footer {
  flex-shrink: 0;
  gap: 10px;
  margin-left: auto;
}
.notes-list .note-card .note-footer small {
  font-size: 12px;
}

.notes-search {
  position: relative;
  display: flex;
  align-items: center;
}
.notes-search .notes-search-icon {
  position: absolute;
  left: 10px;
  font-size: 13px;
  color: var(--bt-text-muted);
  pointer-events: none;
}
.notes-search input {
  width: 200px;
  padding: 6px 28px 6px 32px;
  height: 34px;
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  font-family: inherit;
  background: var(--bt-surface);
  color: var(--bt-text);
}
.notes-search input:focus {
  outline: none;
  border-color: var(--bt-primary);
  box-shadow: 0 0 0 2px var(--bt-focus-ring);
}
.notes-search input::placeholder {
  color: var(--bt-text-muted);
}

.note-cat-select-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.note-cat-select-row select {
  flex: 1;
}

.note-cat-add {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.note-cat-add input {
  flex: 1;
  height: 34px;
}

.note-cat-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.note-cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: var(--bt-radius);
  background: var(--bt-bg);
}
.note-cat-item:hover {
  background: color-mix(in srgb, var(--bt-primary) 5%, var(--bt-bg));
}

.note-cat-item-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--bt-text);
}

.note-cat-item-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.note-cat-item-actions button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--bt-text-muted);
  font-size: 12px;
  padding: 4px 6px;
  border-radius: 3px;
}
.note-cat-item-actions button:hover {
  color: var(--bt-primary);
  background: var(--bt-surface);
}
.note-cat-item-actions .note-cat-delete-btn:hover {
  color: var(--bt-danger);
}

.note-cat-item:hover .note-cat-item-actions {
  opacity: 1;
}

.shared-notes-section {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--bt-border);
}
.shared-notes-section h2 {
  font-size: 16px;
  margin: 0 0 12px;
  cursor: pointer;
}

.favorite-notes-section {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--bt-border);
}
.favorite-notes-section h2 {
  font-size: 16px;
  margin: 0 0 12px;
  cursor: pointer;
}
.favorite-notes-section h2 .fa-star {
  color: var(--bt-warning);
}

.shared-note-card {
  border-left: 3px solid color-mix(in srgb, var(--bt-primary) 40%, transparent);
}
.shared-note-card:hover {
  border-left-color: var(--bt-primary);
}
.shared-note-card a {
  color: var(--bt-text);
  text-decoration: none;
}
.shared-note-card a:hover {
  color: var(--bt-primary);
}

.note-view {
  max-width: 800px;
}

.note-view-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--bt-border);
}

.note-view-date {
  font-size: 14px;
  color: var(--bt-text-muted);
}

.note-view-body {
  background: var(--bt-surface);
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  padding: 16px 20px;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
}
.note-view-body b, .note-view-body strong {
  font-weight: 700;
}
.note-view-body u {
  text-decoration: underline;
}

.note-author {
  font-size: 14px;
  color: var(--bt-primary);
  font-weight: 500;
  white-space: nowrap;
}
.note-author i {
  font-size: 12px;
  margin-right: 3px;
}

.note-shared-badge {
  display: inline-block;
  padding: 1px 8px;
  font-size: 10px;
  font-weight: 600;
  border-radius: 10px;
  background: color-mix(in srgb, var(--bt-primary) 12%, transparent);
  color: var(--bt-primary);
  white-space: nowrap;
}
.note-shared-badge i {
  font-size: 9px;
  margin-right: 2px;
}

.container:has(.note-edit-layout) {
  max-width: none;
}

.note-edit-layout {
  width: 100%;
  max-width: 1600px;
  margin-inline: auto;
  grid-template-columns: 1fr 320px;
  gap: 28px;
  height: calc(100dvh - 170px);
  align-items: stretch;
}
.note-edit-layout .issue-edit-sidebar {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  height: 100%;
}
.note-edit-layout .issue-edit-left {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}
.note-edit-layout .issue-edit-left .issue-edit-field {
  margin-bottom: 0;
}
.note-edit-layout .issue-edit-left > .issue-tab-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.note-edit-layout .issue-edit-left > .issue-tab-panel .rich-editor {
  flex: 1;
  min-height: 0;
  resize: none;
  overflow-y: auto;
}
.note-edit-layout .issue-edit-left > .issue-tab-panel .issue-comments-list {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  max-height: none;
}
.note-edit-layout .issue-edit-left > .issue-edit-field:has(.rich-editor, .note-editor-md):not(.issue-tab-panel):not(.issue-stacked-description) {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.note-edit-layout .issue-edit-left > .issue-edit-field:has(.rich-editor, .note-editor-md):not(.issue-tab-panel):not(.issue-stacked-description) .rich-editor {
  flex: 1;
  min-height: 0;
  resize: none;
  overflow-y: auto;
}
.note-edit-layout .issue-edit-left > .issue-stacked-description {
  flex: 2;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.note-edit-layout .issue-edit-left > .issue-stacked-description .rich-editor {
  flex: 1;
  min-height: 0;
  resize: none;
  overflow-y: auto;
}
.note-edit-layout .issue-edit-left > .issue-stacked-description .issue-readonly-description {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  max-height: none;
}
.note-edit-layout .issue-edit-left > .issue-stacked-comments {
  flex: 3;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-top: 1px solid var(--bt-border);
  padding-top: 8px;
}
.note-edit-layout .issue-edit-left > .issue-stacked-comments .issue-comments-header {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  flex-shrink: 0;
  margin-bottom: 6px;
}
.note-edit-layout .issue-edit-left > .issue-stacked-comments .issue-comments-list {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  max-height: none;
}
.note-edit-layout .issue-edit-left > .issue-stacked-comments .issue-comment-add {
  flex-shrink: 0;
  border-top: 1px solid var(--bt-border);
  padding-top: 8px;
}

@media (min-width: 769px) {
  .note-edit-layout.issue-edit-layout--flow {
    height: auto;
    align-items: start;
  }
  .note-edit-layout.issue-edit-layout--flow .issue-edit-left {
    height: auto;
  }
  .note-edit-layout.issue-edit-layout--flow .issue-edit-left > .issue-stacked-description {
    flex: none;
  }
  .note-edit-layout.issue-edit-layout--flow .issue-edit-left > .issue-stacked-description .rich-editor {
    flex: none;
    min-height: 240px;
    max-height: 520px;
    resize: vertical;
    overflow-y: auto;
  }
  .note-edit-layout.issue-edit-layout--flow .issue-edit-left > .issue-stacked-description .issue-readonly-description {
    flex: none;
    min-height: 240px;
    max-height: 520px;
    overflow-y: auto;
  }
  .note-edit-layout.issue-edit-layout--flow .issue-edit-left > .issue-stacked-comments {
    flex: none;
    margin-top: 24px;
    padding-top: 16px;
  }
  .note-edit-layout.issue-edit-layout--flow .issue-edit-left > .issue-stacked-comments .issue-comments-list {
    flex: none;
    max-height: none;
    overflow: visible;
  }
  .note-edit-layout.issue-edit-layout--flow .issue-edit-left > .issue-stacked-comments .issue-comment-add {
    flex-shrink: 1;
    margin-top: 8px;
    padding-top: 16px;
  }
}
@media (max-width: 768px) {
  .note-edit-layout.issue-edit-layout--flow {
    height: auto;
    align-items: start;
  }
  .note-edit-layout.issue-edit-layout--flow .issue-edit-left {
    height: auto;
  }
  .note-edit-layout.issue-edit-layout--flow .issue-edit-left > .issue-stacked-description,
  .note-edit-layout.issue-edit-layout--flow .issue-edit-left > .issue-stacked-comments {
    flex: none;
  }
  .note-edit-layout.issue-edit-layout--flow .issue-edit-left > .issue-stacked-description .rich-editor,
  .note-edit-layout.issue-edit-layout--flow .issue-edit-left > .issue-stacked-description .issue-readonly-description {
    flex: none;
    min-height: 220px;
    max-height: 520px;
    overflow-y: auto;
  }
  .note-edit-layout.issue-edit-layout--flow .issue-edit-left > .issue-stacked-comments {
    margin-top: 20px;
  }
  .note-edit-layout.issue-edit-layout--flow .issue-edit-left > .issue-stacked-comments .issue-comments-list {
    flex: none;
    max-height: none;
    overflow: visible;
  }
  .note-edit-layout.issue-edit-layout--flow .issue-edit-left > .issue-stacked-comments .issue-comment-add {
    flex-shrink: 1;
    margin-top: 8px;
  }
}
.note-sidebar-close {
  display: none;
  justify-content: flex-end;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--bt-border);
  margin-bottom: 4px;
}

.note-sidebar-close-btn {
  background: none;
  border: none;
  color: var(--bt-text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}
.note-sidebar-close-btn:hover {
  color: var(--bt-text);
}

.note-toolbar-row {
  display: flex;
  align-items: stretch;
}
.note-toolbar-row .rich-editor-toolbar {
  flex: 1;
  border-radius: var(--bt-radius) 0 0 0;
}
.note-toolbar-row .note-editor-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: var(--bt-bg);
  border: 1px solid var(--bt-border);
  border-bottom: none;
  border-left: none;
  border-radius: 0 var(--bt-radius) 0 0;
}

.note-editor-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 11px;
  color: var(--bt-text-muted);
  border: 1px solid var(--bt-border);
  border-radius: 4px;
  background: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.note-editor-action-btn:hover {
  border-color: var(--bt-primary);
  color: var(--bt-primary);
}
.note-editor-action-btn.active {
  border-color: var(--bt-primary);
  color: var(--bt-primary);
  background: color-mix(in srgb, var(--bt-primary) 8%, transparent);
}
.note-editor-action-btn i {
  font-size: 12px;
}

.rich-editor.no-wrap {
  white-space: pre;
  overflow-x: auto;
}

.note-sidebar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--bt-text-muted);
  font-size: 18px;
  padding: 6px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.note-sidebar-toggle:hover {
  color: var(--bt-text);
}

.note-sidebar-overlay {
  display: none;
}

.note-group {
  margin-bottom: 20px;
}

.note-group-header {
  font-size: 14px;
  font-weight: 600;
  color: var(--bt-text);
  padding: 6px 0;
  margin-bottom: 8px;
  border-bottom: 2px solid var(--bt-primary);
}

.note-group-count {
  font-weight: 400;
  font-size: 12px;
  color: var(--bt-text-muted);
}

.note-editable-badge {
  display: inline-block;
  padding: 1px 8px;
  font-size: 10px;
  font-weight: 600;
  border-radius: 10px;
  background: color-mix(in srgb, var(--bt-success) 12%, transparent);
  color: var(--bt-success);
  white-space: nowrap;
}
.note-editable-badge i {
  font-size: 9px;
  margin-right: 2px;
}

.note-fav-header-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--bt-text-muted);
  font-size: 20px;
  padding: 0 4px;
  transition: all 0.15s ease;
}
.note-fav-header-btn:hover {
  color: var(--bt-warning);
}
.note-fav-header-btn.active {
  color: var(--bt-warning);
}

.note-shared-by {
  font-size: 13px;
  color: var(--bt-text-muted);
  font-weight: 400;
}

.note-sidebar .issue-edit-section-header {
  margin-top: 12px;
}

.note-share-sidebar-btn {
  width: 100%;
}
.note-share-sidebar-btn i {
  margin-right: 4px;
}
.note-share-sidebar-btn .note-share-pending-badge {
  display: inline-block;
  background: var(--bt-button);
  color: var(--bt-on-primary);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: 4px;
  vertical-align: middle;
}

.note-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  background: var(--bt-surface);
  min-height: 38px;
  cursor: text;
  position: relative;
}
.note-tags-wrap:focus-within {
  border-color: var(--bt-primary);
  box-shadow: 0 0 0 2px var(--bt-focus-ring);
}

.note-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.note-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 10px;
  background: color-mix(in srgb, var(--bt-primary) 12%, transparent);
  color: var(--bt-primary);
  white-space: nowrap;
}

.note-tag-remove {
  background: none;
  border: none;
  color: var(--bt-primary);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0 2px;
  opacity: 0.6;
}
.note-tag-remove:hover {
  opacity: 1;
}

.note-tag-input {
  flex: 1;
  min-width: 100px;
  border: none;
  outline: none;
  font-family: inherit;
  background: transparent;
  color: var(--bt-text);
  padding: 2px 0;
  position: relative;
}
.note-tag-input::placeholder {
  color: var(--bt-text-muted);
}

.note-tag-clickable {
  cursor: pointer;
  transition: background 0.15s ease;
}
.note-tag-clickable:hover {
  background: color-mix(in srgb, var(--bt-primary) 25%, transparent);
}

.note-tag-autocomplete {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bt-surface);
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-height: 180px;
  overflow-y: auto;
}

.note-tag-ac-item {
  padding: 6px 10px;
  font-size: 13px;
  cursor: pointer;
  color: var(--bt-text);
}
.note-tag-ac-item small {
  color: var(--bt-text-muted);
}
.note-tag-ac-item:hover {
  background: color-mix(in srgb, var(--bt-primary) 8%, transparent);
}

.note-tags-popular {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.note-tag-modal-hint {
  font-size: 12px;
  color: var(--bt-text-muted);
  margin: 0 0 12px;
}

.note-tag-hint {
  font-size: 10px;
  color: var(--bt-text-muted);
  font-weight: 400;
  margin-left: auto;
}

.note-fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--bt-text-muted);
  font-size: 14px;
  padding: 2px;
  opacity: 0.3;
  transition: all 0.15s ease;
}
.note-fav-btn:hover {
  opacity: 1;
  color: var(--bt-warning);
}
.note-fav-btn.active {
  opacity: 1;
  color: var(--bt-warning);
}

.notes-grid .note-card {
  position: relative;
}

.note-card-favorite {
  border-color: color-mix(in srgb, var(--bt-warning) 30%, var(--bt-border));
}

.note-file-count {
  font-size: 10px;
  color: var(--bt-text-muted);
  opacity: 0.6;
  white-space: nowrap;
}
.note-file-count i {
  margin-right: 2px;
}

.notes-list .note-fav-btn {
  position: static;
  opacity: 0.4;
  flex-shrink: 0;
  order: -1;
}
.notes-list .note-fav-btn.active {
  opacity: 1;
}

.note-tag-suggestion {
  display: inline-block;
  padding: 1px 8px;
  font-size: 11px;
  border-radius: 10px;
  border: 1px dashed var(--bt-border);
  color: var(--bt-text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
.note-tag-suggestion:hover {
  border-color: var(--bt-primary);
  color: var(--bt-primary);
  background: color-mix(in srgb, var(--bt-primary) 6%, transparent);
}

.note-share-modal {
  min-height: 200px;
}

.note-share-search {
  margin-bottom: 12px;
}
.note-share-search input {
  width: 100%;
  height: 36px;
}

.note-share-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 400px;
  overflow-y: auto;
}

.note-share-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: var(--bt-radius);
  background: var(--bt-bg);
}
.note-share-row:hover {
  background: color-mix(in srgb, var(--bt-primary) 5%, var(--bt-bg));
}

.note-share-row-muted {
  opacity: 0.4;
  pointer-events: none;
}

.note-share-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
}
.note-share-check input {
  cursor: pointer;
}
.note-share-check strong {
  font-weight: 600;
}

.note-share-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--bt-border);
}
.note-share-actions .btn {
  flex: 1;
}

.note-share-readonly {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--bt-text-muted);
  cursor: pointer;
  white-space: nowrap;
}
.note-share-readonly input {
  cursor: pointer;
}
.note-share-readonly.disabled {
  opacity: 0.3;
  pointer-events: none;
}

.note-bulk-check-wrap {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  margin: 0;
  padding: 0;
}
.note-bulk-check-wrap input[type=checkbox] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.notes-grid .note-bulk-check-wrap {
  position: absolute;
  top: 10px;
  right: 32px;
  z-index: 2;
}

.notes-grid .note-card {
  position: relative;
}

.notes-list .note-bulk-check-wrap {
  flex-shrink: 0;
}

.note-sidebar-files {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  margin-bottom: 8px;
}
.note-sidebar-files .note-sidebar-thumb {
  order: 0;
}
.note-sidebar-files .issue-video-card {
  order: 0;
  width: 64px;
  border-radius: 4px;
}
.note-sidebar-files .issue-video-card .issue-video-thumb {
  height: 48px;
  aspect-ratio: unset;
}
.note-sidebar-files .issue-video-card .issue-video-play {
  font-size: 16px;
}
.note-sidebar-files .issue-video-card .issue-video-info {
  display: none;
}
.note-sidebar-files .attachment-item {
  order: 1;
  flex-basis: 100%;
}

.note-sidebar-thumb {
  position: relative;
  width: 64px;
  height: 48px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--bt-border);
}
.note-sidebar-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: pointer;
}
.note-sidebar-thumb .note-thumb-delete {
  position: absolute;
  top: 2px;
  right: 2px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  font-size: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.note-sidebar-thumb:hover .note-thumb-delete {
  opacity: 1;
}

.note-sidebar-dropzone {
  display: block;
  padding: 10px;
  border: 2px dashed var(--bt-border);
  border-radius: var(--bt-radius);
  text-align: center;
  color: var(--bt-text-muted);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.note-sidebar-dropzone i {
  margin-right: 4px;
}
.note-sidebar-dropzone:hover, .note-sidebar-dropzone.dragover {
  border-color: var(--bt-primary);
  background: color-mix(in srgb, var(--bt-primary) 4%, transparent);
  color: var(--bt-primary);
}

.note-sidebar .attachment-item {
  padding: 5px 8px;
}
.note-sidebar .attachment-item .attachment-icon {
  font-size: 14px;
}
.note-sidebar .attachment-item .attachment-name {
  font-size: 12px;
}
.note-sidebar .attachment-item .attachment-size {
  font-size: 10px;
}

.note-editor-md {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.note-editor-md .coremd-split-editor {
  flex: 1;
  min-height: 0;
}

.coremd-split-editor {
  --coremd-text-size: 15px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  background: var(--bt-surface);
  color: var(--bt-text);
  line-height: 1.55;
}

.coremd-split-toolbar {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  padding: 0.4rem 0.5rem;
  background: color-mix(in srgb, var(--bt-text) 4%, var(--bt-surface));
  border-bottom: 1px solid var(--bt-border);
  border-radius: var(--bt-radius) var(--bt-radius) 0 0;
}

.coremd-layout-group,
.coremd-view-group {
  display: inline-flex;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  align-items: center;
  gap: 2px;
}

.coremd-layout-group {
  margin-left: auto;
}

.coremd-toolbar-sep {
  width: 1px;
  height: 1.4em;
  background: var(--bt-border);
  margin: 0 0.3rem;
}

.coremd-btn,
.coremd-view-btn {
  font: 500 0.85rem/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--bt-border);
  border-radius: 5px;
  background: var(--bt-surface);
  color: var(--bt-text);
  cursor: pointer;
  user-select: none;
  transition: background 100ms, border-color 100ms;
}
.coremd-btn:hover,
.coremd-view-btn:hover {
  background: color-mix(in srgb, var(--bt-text) 8%, var(--bt-surface));
}
.coremd-btn.is-active,
.coremd-view-btn.is-active {
  background: var(--bt-button);
  color: var(--bt-on-primary);
  border-color: var(--bt-primary);
}

.coremd-view-btn {
  margin-left: 2px;
  color: var(--bt-text-muted);
}

.coremd-btn-bold {
  font-weight: 700;
}

.coremd-btn-italic {
  font-style: italic;
}

.coremd-btn-strike {
  text-decoration: line-through;
}

.coremd-split-body {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  min-height: 0;
  background: var(--bt-bg);
  overflow: hidden;
  border-radius: 0 0 var(--bt-radius) var(--bt-radius);
}

.coremd-split-editor[data-view=source] .coremd-split-body {
  grid-template-columns: 1fr;
}

.coremd-split-editor[data-view=source] .coremd-split-preview {
  display: none;
}

.coremd-split-editor[data-view=source] .coremd-split-source {
  border-right: none;
}

.coremd-split-editor[data-view=preview] .coremd-split-body {
  grid-template-columns: 1fr;
}

.coremd-split-editor[data-view=preview] .coremd-split-source {
  display: none;
}

.coremd-split-editor[data-orient=rows][data-view=both] .coremd-split-body {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr 1fr;
}

.coremd-split-editor:not([data-view=both]) .coremd-orient-btn {
  visibility: hidden;
  pointer-events: none;
}

.coremd-split-editor[data-wrap=on] .coremd-split-source {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.coremd-split-editor[data-wrap=off] .coremd-split-source {
  white-space: pre;
  overflow-x: auto;
}

.coremd-split-editor[data-wrap=off] .coremd-split-preview pre {
  white-space: pre;
  overflow-wrap: normal;
  overflow-x: auto;
}

.coremd-overflow {
  position: relative;
  flex: 0 0 auto;
}

.coremd-overflow-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 200;
  min-width: 12rem;
  padding: 4px;
  background: var(--bt-surface);
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

.coremd-overflow.is-open .coremd-overflow-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.coremd-overflow-item {
  justify-content: flex-start;
  width: 100%;
  height: auto;
  border: none;
  background: none;
  padding: 0.4rem 0.6rem;
  font: 500 0.85rem/1.2 inherit;
  color: var(--bt-text);
}
.coremd-overflow-item:hover {
  background: color-mix(in srgb, var(--bt-text) 8%, var(--bt-surface));
}

.coremd-split-source {
  border: none;
  outline: none;
  resize: none;
  padding: 1rem 1.25rem;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: calc(var(--coremd-text-size, 15px) - 1px);
  line-height: 1.55;
  color: var(--bt-text);
  background: color-mix(in srgb, var(--bt-text) 2%, var(--bt-surface));
  min-width: 0;
}

.coremd-split-preview {
  padding: 1rem 1.25rem;
  overflow: auto;
  background: var(--bt-surface);
  min-width: 0;
}

@media (max-width: 900px) {
  .coremd-split-body {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
  }
}
.coremd-split-preview h1, .coremd-split-preview h2, .coremd-split-preview h3, .coremd-split-preview h4, .coremd-split-preview h5, .coremd-split-preview h6,
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  margin: 1.2em 0 0.4em;
  line-height: 1.25;
}
.coremd-split-preview h1:first-child, .coremd-split-preview h2:first-child, .coremd-split-preview h3:first-child,
.markdown-body h1:first-child,
.markdown-body h2:first-child,
.markdown-body h3:first-child {
  margin-top: 0;
}
.coremd-split-preview p,
.markdown-body p {
  margin: 0.6em 0;
}
.coremd-split-preview p:first-child,
.markdown-body p:first-child {
  margin-top: 0;
}
.coremd-split-preview a,
.markdown-body a {
  color: var(--bt-primary);
}
.coremd-split-preview code,
.markdown-body code {
  background: color-mix(in srgb, var(--bt-text) 8%, var(--bt-surface));
  padding: 0.1em 0.35em;
  border-radius: 3px;
  font: 0.92em ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.coremd-split-preview pre,
.markdown-body pre {
  margin: 0.8em 0;
  padding: 0.75rem 1rem;
  background: color-mix(in srgb, var(--bt-text) 10%, var(--bt-surface));
  border: 1px solid var(--bt-border);
  border-radius: 6px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.coremd-split-preview pre code,
.markdown-body pre code {
  background: transparent;
  padding: 0;
}
.coremd-split-preview blockquote,
.markdown-body blockquote {
  margin: 0.8em 0;
  padding: 0.1em 0 0.1em 1em;
  border-left: 3px solid var(--bt-border);
  color: var(--bt-text-muted);
}
.coremd-split-preview ul, .coremd-split-preview ol,
.markdown-body ul,
.markdown-body ol {
  margin: 0.6em 0;
  padding-left: 1.5em;
}
.coremd-split-preview li,
.markdown-body li {
  margin: 0.15em 0;
}
.coremd-split-preview li.task-list-item,
.markdown-body li.task-list-item {
  list-style: none;
  display: flex;
  align-items: baseline;
  gap: 0.4em;
}
.coremd-split-preview hr,
.markdown-body hr {
  border: none;
  border-top: 1px solid var(--bt-border);
  margin: 1.4em 0;
}
.coremd-split-preview table,
.markdown-body table {
  border-collapse: collapse;
  margin: 0.8em 0;
  font-size: 0.95em;
}
.coremd-split-preview th, .coremd-split-preview td,
.markdown-body th,
.markdown-body td {
  border: 1px solid var(--bt-border);
  padding: 0.4em 0.7em;
  text-align: left;
}
.coremd-split-preview th,
.markdown-body th {
  background: color-mix(in srgb, var(--bt-text) 6%, var(--bt-surface));
  font-weight: 600;
}
.coremd-split-preview img,
.markdown-body img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}
.coremd-split-preview del,
.markdown-body del {
  text-decoration: line-through;
  color: var(--bt-text-muted);
}

.comment {
  background: var(--bt-surface);
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  padding: 12px 16px;
  margin-bottom: 8px;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 13px;
}

.comment-body {
  font-size: 14px;
  color: var(--bt-text-muted);
}

.comment-form {
  margin: 16px 0;
}

.history-filters {
  margin-bottom: 16px;
}

.history-filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.history-filter-row select {
  padding: 6px 28px 6px 10px;
  height: 36px;
  border-radius: var(--bt-radius);
  border: 1px solid var(--bt-border);
  background: var(--bt-surface);
  color: var(--bt-text);
}

.history-count {
  font-size: 13px;
  color: var(--bt-text-muted);
  margin-bottom: 16px;
}

.history-date-group {
  margin-bottom: 24px;
}

.history-date-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bt-surface);
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--bt-text);
}
.history-date-header i {
  color: var(--bt-primary);
  font-size: 13px;
}

.history-date-count {
  margin-left: auto;
  font-size: 12px;
  font-weight: 400;
  color: var(--bt-text-muted);
}

.history-entries {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.history-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bt-surface);
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  text-decoration: none;
  color: var(--bt-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.history-entry:hover {
  border-color: var(--bt-primary);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.history-entry-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.history-entry-body {
  flex: 1;
  min-width: 0;
}

.history-entry-title {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-entry-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--bt-text-muted);
  margin-top: 2px;
}
.history-entry-meta i {
  font-size: 10px;
  margin-right: 2px;
}

.history-entry-right {
  flex-shrink: 0;
  margin-left: auto;
}

.issue-sidebar-history {
  padding-top: 8px;
  margin-top: 8px;
}

.status-history-timeline {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.status-history-entry {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}
.status-history-entry .badge {
  flex-shrink: 0;
  font-size: 10px;
  padding: 1px 6px;
}

.status-history-meta {
  font-size: 11px;
  color: var(--bt-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-access-tree {
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  overflow: hidden;
}

.member-access-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.8fr);
  gap: 28px;
  border: 0;
  overflow: visible;
}
.member-access-summary .member-access-org {
  padding: 0;
  border: 0;
  background: transparent;
}
.member-access-summary .member-access-header {
  align-items: flex-start;
}
.member-access-summary .member-access-icon {
  display: none;
}
.member-access-summary .member-access-role-row {
  display: block;
}
.member-access-summary .member-access-role-select {
  width: 100%;
  max-width: none;
}
.member-access-summary .member-access-desc {
  display: none;
}
.member-access-summary .member-admin-access-note {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 0;
  background: transparent;
}

.member-access-org {
  background: var(--bt-surface);
  padding: 16px 20px;
  border-bottom: 1px solid var(--bt-border);
}

.member-access-workspaces {
  background: color-mix(in srgb, var(--bt-surface) 50%, var(--bt-bg) 50%);
  padding-left: 20px;
}

.member-access-ws {
  padding: 12px 20px 12px 16px;
  border-bottom: 1px solid var(--bt-border);
  position: relative;
}
.member-access-ws::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--bt-primary);
  opacity: 0.2;
}
.member-access-ws:last-child {
  border-bottom: none;
}
.member-access-ws.member-access-empty {
  padding: 16px 20px 16px 16px;
}
.member-access-ws.member-access-empty::before {
  opacity: 0.1;
}
.member-access-ws.member-access-add {
  padding: 12px 20px 12px 16px;
  border-bottom: none;
}
.member-access-ws.member-access-add::before {
  display: none;
}

.member-access-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.member-access-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: color-mix(in srgb, var(--bt-primary) 10%, transparent);
  color: var(--bt-primary);
  font-size: 14px;
}
.member-access-ws .member-access-icon {
  width: 28px;
  height: 28px;
  font-size: 12px;
}

.member-access-info {
  flex: 1;
  min-width: 0;
}

.member-access-label {
  font-weight: 600;
  font-size: 14px;
  color: var(--bt-text);
  margin-bottom: 4px;
}

.member-access-role-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.member-access-role-select {
  width: auto;
  min-width: 120px;
  max-width: 160px;
  padding: 4px 8px;
  font-size: 13px;
}

.member-access-desc {
  font-size: 12px;
  color: var(--bt-text-muted);
}

.member-role-status {
  font-size: 13px;
  margin: 8px 0 0;
  color: var(--bt-text);
}
.member-role-status:empty {
  margin: 0;
}
.member-role-status.is-error {
  border-left: 3px solid var(--bt-danger);
  padding: 8px 12px;
  background: color-mix(in srgb, var(--bt-danger) 8%, var(--bt-surface));
}

.ws-access-row.ws-no-access .member-access-label {
  color: var(--bt-text-muted);
  font-weight: 500;
}
.ws-access-row.ws-no-access .member-access-icon {
  opacity: 0.45;
}

.ws-saved-indicator {
  font-size: 12px;
  color: var(--bt-success);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ws-override-note {
  font-size: 12px;
  font-weight: 500;
  color: var(--bt-success);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.member-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 4px;
}
.member-breadcrumb a {
  color: var(--bt-primary);
  text-decoration: none;
}
.member-breadcrumb a:hover {
  text-decoration: underline;
}
.member-breadcrumb .member-breadcrumb-sep {
  color: var(--bt-text-muted);
}
.member-breadcrumb .member-breadcrumb-current {
  color: var(--bt-text-muted);
}

.member-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--bt-primary);
  text-decoration: none;
}
.member-back-link:hover {
  text-decoration: underline;
}

.member-page-context {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
  color: var(--bt-text-muted);
  font-size: 14px;
}

.member-admin-access-note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  background: color-mix(in srgb, var(--bt-surface) 50%, var(--bt-bg) 50%);
  color: var(--bt-text-muted);
  font-size: 14px;
}
.member-admin-access-note i {
  color: var(--bt-primary);
}
.member-admin-access-note strong {
  color: var(--bt-text);
}

#profileForm .form-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 16px;
  border-top: 1px solid var(--bt-border);
}

.member-detail-section {
  padding: 24px;
  margin-bottom: 24px;
}

.member-security-row,
.member-danger-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.member-security-info {
  flex: 1;
  min-width: 220px;
}

.member-security-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.member-security-heading {
  font-weight: 600;
  font-size: 14px;
  color: var(--bt-text);
  margin-bottom: 2px;
}

.member-temp-pw {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  background: color-mix(in srgb, var(--bt-surface) 50%, var(--bt-bg) 50%);
}

.member-security-divider {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--bt-border);
}

.member-temp-pw-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.member-temp-pw-header .member-security-subtitle {
  margin: 0;
}

.member-temp-pw-body {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.member-temp-pw-body .core-input {
  flex: 1;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.member-danger-zone {
  border: 1px solid var(--bt-danger);
}
.member-danger-zone .account-section-title {
  color: var(--bt-danger);
}

.member-danger-row {
  padding: 18px 0;
  border-bottom: 1px solid var(--bt-border);
}
.member-danger-row:last-child {
  border-bottom: none;
}
.member-danger-row:first-of-type {
  padding-top: 0;
}

.member-danger-action {
  width: 220px;
  flex: 0 0 220px;
}

.people-filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(240px, 1fr) max-content;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.people-filter-bar select {
  width: auto;
  min-width: 160px;
}

.people-search-input {
  min-width: 0;
}

.people-filter-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--bt-text-muted);
}

.people-filter-bar .people-workspace-filter {
  display: flex;
  flex-direction: column;
  position: relative;
  min-width: 0;
}
.people-filter-bar .people-workspace-filter .workspace-picker-selected:empty {
  display: none;
}
.people-filter-bar .people-workspace-filter .workspace-picker-selected:not(:empty) {
  align-items: center;
  padding: 5px 8px;
}
.people-filter-bar .people-workspace-filter .workspace-picker-selected:not(:empty) + .core-input {
  display: none;
}
.people-filter-bar .people-workspace-filter .workspace-picker-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 10;
  box-shadow: var(--bt-shadow-sm);
}

.people-filter-count {
  font-size: 13px;
  color: var(--bt-text-muted);
  white-space: nowrap;
}

.people-group-header {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--bt-text-muted);
  padding: 14px 4px 6px;
  border-bottom: 1px solid var(--bt-border);
  margin-bottom: 4px;
}

.member-security-subsection {
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--bt-border);
}
.member-security-subsection:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: none;
}

.member-security-subtitle {
  font-size: 13px;
  font-weight: 600;
  color: var(--bt-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0 0 14px 0;
}

@media (max-width: 768px) {
  .member-access-summary {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .member-access-role-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .member-access-header {
    gap: 10px;
  }
  .member-access-workspaces {
    padding-left: 10px;
  }
}
.members-section-heading {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bt-text-muted);
  margin: 24px 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.members-section-heading i {
  font-size: 12px;
  opacity: 0.8;
}
.members-section-heading:first-of-type {
  margin-top: 0;
}

.members-workspace-section .members-ws-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--bt-border);
  flex-wrap: wrap;
}
.members-workspace-section .members-ws-name-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 260px;
}
.members-workspace-section .members-ws-name-form i {
  color: var(--bt-primary);
  font-size: 16px;
}
.members-workspace-section .members-ws-name-form input {
  max-width: 320px;
  font-size: 15px;
  font-weight: 600;
}
.members-workspace-section .members-ws-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.members-seat-pill {
  font-size: 12px;
  color: var(--bt-text-muted);
  padding: 4px 10px;
  background: color-mix(in srgb, var(--bt-surface) 70%, var(--bt-bg) 30%);
  border: 1px solid var(--bt-border);
  border-radius: 999px;
  white-space: nowrap;
}

.members-seat-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  margin-bottom: 20px;
  background: color-mix(in srgb, var(--bt-primary) 6%, var(--bt-surface));
  border: 1px solid color-mix(in srgb, var(--bt-primary) 20%, var(--bt-border));
  border-radius: var(--bt-radius);
  font-size: 14px;
  color: var(--bt-text);
}
.members-seat-banner > i {
  color: var(--bt-primary);
  font-size: 16px;
}
.members-seat-banner strong {
  color: var(--bt-primary);
}
.members-seat-banner .members-seat-banner-full {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--bt-warning);
}
.members-seat-banner .members-seat-banner-full strong {
  color: var(--bt-warning);
}
.members-seat-banner:has(.members-seat-banner-full) {
  background: color-mix(in srgb, var(--bt-warning) 8%, var(--bt-surface));
  border-color: color-mix(in srgb, var(--bt-warning) 30%, var(--bt-border));
}
.members-seat-banner:has(.members-seat-banner-full) > i {
  color: var(--bt-warning);
}

.members-table .core-input {
  padding: 6px 10px;
  font-size: 13px;
  min-width: 100px;
  height: 34px;
}
.members-table .ws-role-select,
.members-table .org-role-select {
  max-width: 140px;
}
.members-table td {
  vertical-align: middle;
  padding: 10px 12px;
}
.members-table td:first-child a {
  color: var(--bt-text);
  text-decoration: none;
  font-weight: 500;
}
.members-table td:first-child a:hover {
  color: var(--bt-primary);
  text-decoration: underline;
}
.members-table .btn-sm {
  padding: 7px 11px;
  font-size: 13px;
  min-width: 36px;
  min-height: 34px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.members-table .btn-sm i {
  font-size: 13px;
}

.members-row-actions {
  display: inline-flex;
  gap: 6px;
  justify-content: flex-end;
}

.members-org-badge {
  margin-left: 8px;
  vertical-align: middle;
}
.members-org-badge.owner {
  background: color-mix(in srgb, var(--bt-warning) 18%, var(--bt-surface));
  color: color-mix(in srgb, var(--bt-warning) 80%, black);
  border: 1px solid color-mix(in srgb, var(--bt-warning) 30%, transparent);
}
.members-org-badge.admin {
  background: color-mix(in srgb, var(--bt-primary) 15%, var(--bt-surface));
  color: var(--bt-primary);
  border: 1px solid color-mix(in srgb, var(--bt-primary) 25%, transparent);
}
.members-org-badge.pending {
  background: color-mix(in srgb, var(--bt-text-muted) 15%, var(--bt-surface));
  color: var(--bt-text-muted);
  border: 1px solid color-mix(in srgb, var(--bt-text-muted) 25%, transparent);
}
.members-org-badge.disabled {
  background: color-mix(in srgb, var(--bt-danger) 14%, var(--bt-surface));
  color: color-mix(in srgb, var(--bt-danger) 82%, var(--bt-text));
  border: 1px solid color-mix(in srgb, var(--bt-danger) 28%, transparent);
}
.members-org-badge.not-invited {
  background: color-mix(in srgb, var(--bt-warning) 16%, var(--bt-surface));
  color: color-mix(in srgb, var(--bt-warning) 82%, var(--bt-text));
  border: 1px solid color-mix(in srgb, var(--bt-warning) 30%, transparent);
}
.members-org-badge.platform {
  background: color-mix(in srgb, var(--bt-platform-accent) 18%, var(--bt-surface));
  color: color-mix(in srgb, var(--bt-platform-accent) 82%, var(--bt-text));
  border: 1px solid color-mix(in srgb, var(--bt-platform-accent) 32%, transparent);
}

.member-invite-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.member-invite-banner .text-muted {
  margin-left: 6px;
}

.member-invite-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.member-invite-banner-actions form {
  margin: 0;
}

.member-invite-list-link {
  display: inline-block;
  margin-left: 8px;
  font-size: 12px;
  color: var(--bt-primary);
}

.member-shield-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: color-mix(in srgb, var(--bt-platform-accent) 8%, var(--bt-surface));
  border: 1px solid color-mix(in srgb, var(--bt-platform-accent) 24%, transparent);
}
.member-shield-banner span:last-child {
  flex: 1;
  min-width: 240px;
}

.people-shield-note {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: color-mix(in srgb, var(--bt-platform-accent) 78%, var(--bt-text));
  padding: 0 6px;
}

.members-ws-header .btn-sm {
  padding: 7px 14px;
  font-size: 13px;
  min-width: auto;
  min-height: 34px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.members-new-workspace {
  margin: 20px 0 28px 0;
  text-align: center;
}

.members-unassigned-section {
  border-left: 3px solid var(--bt-warning);
}

.invite-btn:disabled,
button.invite-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.credentials-block {
  background: color-mix(in srgb, var(--bt-surface) 60%, var(--bt-bg) 40%);
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  padding: 16px 18px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
}

.credentials-row {
  display: flex;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px dashed color-mix(in srgb, var(--bt-border) 60%, transparent);
}
.credentials-row:first-child {
  padding-top: 0;
}
.credentials-row:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.credentials-label {
  flex-shrink: 0;
  width: 100px;
  color: var(--bt-text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: inherit;
}

.credentials-value {
  flex: 1;
  color: var(--bt-text);
  word-break: break-all;
  user-select: all;
}

.credentials-password {
  color: var(--bt-primary);
  font-weight: 600;
  font-size: 15px;
}

@media (max-width: 768px) {
  .members-ws-header {
    flex-direction: column;
    align-items: stretch;
  }
  .members-ws-name-form {
    min-width: 0;
  }
  .members-ws-name-form input {
    max-width: 100%;
  }
  .members-ws-actions {
    justify-content: flex-end;
    flex-wrap: wrap;
  }
  .members-table td, .members-table th {
    padding: 8px 6px;
    font-size: 13px;
  }
  .members-table .core-input {
    min-width: 70px;
    max-width: 110px;
    padding: 4px 6px;
    font-size: 12px;
    height: 30px;
  }
  .members-table .ws-role-select,
  .members-table .org-role-select {
    max-width: 100px;
  }
  .members-table .btn-sm {
    min-width: 30px;
    min-height: 30px;
    padding: 5px 8px;
    font-size: 12px;
  }
  .members-table .btn-sm i {
    font-size: 12px;
  }
  .members-row-actions {
    gap: 4px;
    flex-wrap: nowrap;
  }
}
.org-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.org-title-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.org-title-left > i {
  color: var(--bt-text-muted);
  font-size: 18px;
}

.org-title-name {
  margin: 0;
  font-size: 18px;
}

.org-type-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bt-primary) 12%, var(--bt-surface));
  color: var(--bt-primary);
}

.org-title-meta {
  font-size: 13px;
  color: var(--bt-text-muted);
  white-space: nowrap;
}

.people-roster {
  display: flex;
  flex-direction: column;
}

.people-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--bt-border);
}

.people-row-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.people-info {
  min-width: 0;
}

.people-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.people-name-row .members-org-badge {
  margin-left: 0;
}

.people-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--bt-primary);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--bt-primary) 45%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.people-name:hover {
  color: color-mix(in srgb, var(--bt-primary) 82%, var(--bt-text));
  text-decoration-color: currentColor;
}
.people-name:focus-visible {
  outline: 2px solid var(--bt-primary);
  outline-offset: 3px;
  border-radius: 2px;
}

.people-self-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border: 1px solid color-mix(in srgb, var(--bt-primary) 24%, var(--bt-border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--bt-primary) 9%, var(--bt-surface));
  color: var(--bt-primary);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}
.people-self-badge i {
  font-size: 10px;
}

.people-email {
  font-size: 13px;
  color: var(--bt-text-muted);
  margin: 2px 0 8px;
}

.people-account-pending {
  display: inline-block;
  font-size: 12px;
  color: var(--bt-warning-text, #8a5a00);
}

.people-ws-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.people-ws-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  padding: 3px 9px;
  border-radius: var(--bt-radius);
  background: var(--bt-surface);
  border: 1px solid var(--bt-border);
  color: var(--bt-text-muted);
  text-decoration: none;
}
.people-ws-badge i {
  font-size: 11px;
}
.people-ws-badge:not(.is-empty):not(.is-more):hover {
  border-color: color-mix(in srgb, var(--bt-primary) 40%, var(--bt-border));
  color: var(--bt-text);
}
.people-ws-badge.is-empty {
  font-style: italic;
  opacity: 0.75;
}
.people-ws-badge.is-more {
  cursor: default;
  font-weight: 600;
}

.people-ws-role {
  color: var(--bt-text-muted);
  opacity: 0.8;
}

.people-ws-chip {
  display: inline-flex;
  align-items: stretch;
}
.people-ws-chip .people-ws-badge {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.people-ws-remove {
  display: inline-flex;
  align-items: center;
  padding: 0 7px;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  color: var(--bt-text-muted);
  background: var(--bt-surface);
  border: 1px solid var(--bt-border);
  border-left: none;
  border-radius: 0 var(--bt-radius) var(--bt-radius) 0;
}
.people-ws-remove:hover {
  color: var(--bt-danger);
  border-color: color-mix(in srgb, var(--bt-danger) 40%, var(--bt-border));
  background: color-mix(in srgb, var(--bt-danger) 8%, var(--bt-surface));
}

.people-ws-assign {
  cursor: pointer;
  color: var(--bt-primary);
  border-style: dashed;
  border-color: color-mix(in srgb, var(--bt-primary) 45%, var(--bt-border));
  background: transparent;
}
.people-ws-assign:hover {
  background: color-mix(in srgb, var(--bt-primary) 8%, var(--bt-surface));
  color: var(--bt-primary);
}

.people-row-action {
  flex-shrink: 0;
}

.people-row-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
@media (max-width: 640px) {
  .people-row-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}

.people-you {
  font-size: 12px;
  color: var(--bt-text-muted);
  font-weight: 500;
}

.people-menu-sep {
  height: 1px;
  margin: 6px 4px;
  background: var(--bt-border);
}

.member-view-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 16px;
  border-bottom: 1px solid var(--bt-border);
  overflow-x: auto;
}

.member-view-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-bottom: 2px solid transparent;
  background: transparent;
  text-decoration: none;
  color: var(--bt-text-muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.member-view-tab:hover {
  color: var(--bt-text);
}
.member-view-tab.is-active {
  color: var(--bt-primary);
  border-bottom-color: var(--bt-primary);
  font-weight: 600;
}

.member-view-count {
  min-width: 20px;
  justify-content: center;
}

.member-view-panel[hidden] {
  display: none;
}

.member-entry-cards[hidden] {
  display: none;
}

.member-invite-card[hidden],
.member-invite-card .form-hint[hidden],
#addWorkspaceEmptyHint[hidden],
#memberDisabledNote[hidden] {
  display: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.organization-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 24px;
}
.organization-page-header h1 {
  margin: 0;
}

.organization-page-org {
  margin: 0 0 4px;
  font-size: 14px;
  color: var(--bt-text-muted);
}

.organization-page-intro {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--bt-text-muted);
  font-size: 14px;
  line-height: 1.5;
}

.people-directory-actions,
.organization-page-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.workspace-directory-filter {
  display: grid;
  grid-template-columns: minmax(240px, 600px) 1fr;
  align-items: center;
  gap: 16px;
  margin: 0 0 16px;
}
.workspace-directory-filter .core-input {
  width: 100%;
}

.workspace-directory-count {
  justify-self: end;
  color: var(--bt-text-muted);
  font-size: 13px;
  white-space: nowrap;
}

.workspace-directory-table th:last-child,
.workspace-directory-table td:last-child {
  width: 64px;
}
.workspace-directory-table td {
  vertical-align: middle;
}

.workspace-directory-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.workspace-name-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--bt-primary);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--bt-primary) 45%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.workspace-name-link i {
  font-size: 10px;
}
.workspace-name-link:hover {
  color: color-mix(in srgb, var(--bt-primary) 82%, var(--bt-text));
  text-decoration-color: currentColor;
}
.workspace-name-link:focus-visible {
  outline: 2px solid var(--bt-primary);
  outline-offset: 3px;
  border-radius: 2px;
}

.workspace-member-link {
  color: var(--bt-primary);
  font-weight: 500;
  text-decoration: none;
}
.workspace-member-link:hover {
  text-decoration: underline;
}

.organization-general-form .organization-name-field {
  max-width: 680px;
}

.organization-form-actions {
  justify-content: flex-end;
  padding-top: 16px;
  border-top: 1px solid var(--bt-border);
}

.organization-seat-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}
.organization-seat-heading > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.organization-seat-heading strong {
  font-size: 22px;
  line-height: 1.2;
}

.organization-seat-percent {
  color: var(--bt-text-muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.organization-seats-card .core-progress {
  margin-bottom: 16px;
}

.organization-seat-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.organization-seat-footer .form-hint {
  margin: 0;
}
.organization-seat-footer .btn {
  flex: 0 0 auto;
}

.member-identity-header {
  margin: 0 0 26px;
}

.admin-scope-return {
  color: var(--bt-primary);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.admin-scope-return:hover {
  text-decoration: underline;
}

.people-directory-table-wrap {
  margin-top: 16px;
}

.people-directory-table .people-row {
  display: table-row;
  padding: 0;
  border: 0;
}
.people-directory-table .people-row > td {
  vertical-align: middle;
}
.people-directory-table .people-row-main {
  align-items: center;
}
.people-directory-table .people-email {
  margin: 2px 0 0;
}
.people-directory-table .people-row-actions {
  display: table-cell;
}
.people-directory-table .members-org-badge {
  margin-left: 0;
}

.people-workspace-summary {
  color: var(--bt-text);
  text-decoration: none;
  font-weight: 500;
}
.people-workspace-summary:hover {
  color: var(--bt-primary);
  text-decoration: underline;
}

.admin-scope-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 16px;
  padding: 10px 14px;
  border: 1px solid color-mix(in srgb, var(--bt-primary) 24%, var(--bt-border));
  border-radius: var(--bt-radius);
  background: color-mix(in srgb, var(--bt-primary) 7%, var(--bt-surface));
  font-size: 13px;
}
.admin-scope-bar > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.admin-scope-bar > span > i {
  color: var(--bt-primary);
}

.people-organization-picker {
  max-width: 760px;
}

.people-organization-search {
  max-width: 620px;
}
.people-organization-search label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
}

.people-organization-search-row,
.people-org-search-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.people-organization-search-row .core-input,
.people-org-search-row .core-input {
  flex: 1;
  min-width: 0;
}

.people-organization-results-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.people-organization-results-heading .account-section-title {
  margin-top: 0;
}

.people-org-switcher {
  position: relative;
}
.people-org-switcher > summary {
  list-style: none;
  cursor: pointer;
}
.people-org-switcher > summary::-webkit-details-marker {
  display: none;
}

.people-org-switcher-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 10;
  width: min(360px, 100vw - 32px);
  padding: 14px;
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  background: var(--bt-surface);
  box-shadow: var(--bt-shadow-lg);
}

.people-org-search-form label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--bt-text-muted);
}

.people-org-search-results {
  margin-top: 12px;
  border-top: 1px solid var(--bt-border);
}

.people-org-search-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--bt-border);
  color: var(--bt-text);
  text-decoration: none;
}
.people-org-search-result:last-child {
  border-bottom: none;
}
.people-org-search-result:hover {
  color: var(--bt-primary);
}
.people-org-search-result small {
  color: var(--bt-text-muted);
  text-transform: capitalize;
}

.member-entry-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.member-invite-card {
  display: block;
  min-width: 0;
  margin: 0;
  padding: 18px 20px;
  background: color-mix(in srgb, var(--bt-primary) 5%, var(--bt-surface));
  border-color: color-mix(in srgb, var(--bt-primary) 20%, var(--bt-border));
}
.member-invite-card .account-section-title {
  margin-top: 0;
}
.member-invite-card .form-hint {
  margin-top: 4px;
}

.member-invite-summary {
  cursor: pointer;
}
.member-invite-summary .form-hint {
  display: inline;
  margin-left: 8px;
}

.member-invite-content {
  min-width: 0;
  margin-top: 14px;
}

.member-invite-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}
.member-invite-form .form-group {
  min-width: 0;
  margin: 0;
}
.member-invite-form .core-input {
  min-width: 0;
  width: 100%;
}
.member-invite-form > button {
  justify-self: start;
}

.member-invite-workspaces {
  display: flex;
  flex-wrap: wrap;
  grid-column: 1/-1;
  gap: 8px 16px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
}
.member-invite-workspaces legend {
  padding: 0 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--bt-text-muted);
}
.member-invite-workspaces .core-checkbox-group {
  margin: 0;
}

.workspace-search-picker {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.workspace-picker-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--bt-text-muted);
}

.workspace-picker-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.workspace-picker-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--bt-text);
  background: color-mix(in srgb, var(--bt-primary) 10%, var(--bt-surface));
  border: 1px solid color-mix(in srgb, var(--bt-primary) 24%, var(--bt-border));
  font-size: 12px;
}
.workspace-picker-chip button {
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.workspace-picker-results {
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  background: var(--bt-surface);
}
.workspace-picker-results.is-portal {
  position: fixed;
  right: auto;
  z-index: 1100;
  box-shadow: var(--bt-overlay-shadow);
}

.workspace-picker-option {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-bottom: 1px solid var(--bt-border);
  color: var(--bt-text);
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.workspace-picker-option:last-child {
  border-bottom: 0;
}
.workspace-picker-option:hover, .workspace-picker-option:focus-visible {
  color: var(--bt-primary);
  background: color-mix(in srgb, var(--bt-primary) 7%, var(--bt-surface));
  outline: none;
}

.member-invite-warning {
  grid-column: 1/-1;
  margin: 0;
  color: var(--bt-warning);
}

.invitation-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  overflow: hidden;
}

.invitation-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  background: var(--bt-surface);
  border-bottom: 1px solid var(--bt-border);
}
.invitation-row:last-child {
  border-bottom: 0;
}

.invitation-main {
  min-width: 0;
}

.invitation-email {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.invitation-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--bt-text-muted);
}

.invitation-meta .members-org-badge {
  margin-left: 0;
}

.invitation-meta .invitation-state {
  font-weight: 600;
}

.invitation-state-sent {
  color: var(--bt-primary);
}

.invitation-state-failed {
  color: var(--bt-danger);
}

.invitation-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}
.invitation-actions form {
  margin: 0;
}

.member-disabled-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--bt-text-muted);
  background: color-mix(in srgb, var(--bt-danger) 6%, var(--bt-surface));
  border: 1px solid color-mix(in srgb, var(--bt-danger) 18%, var(--bt-border));
  border-radius: var(--bt-radius);
}

.org-tab {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

@media (max-width: 1180px) {
  .member-entry-cards {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  .people-filter-bar {
    grid-template-columns: 1fr;
  }
  .people-filter-count {
    justify-self: start;
  }
  .organization-page-header {
    flex-direction: column;
  }
  .people-directory-actions,
  .organization-page-actions {
    justify-content: flex-start;
  }
  .workspace-directory-filter {
    grid-template-columns: 1fr;
  }
  .workspace-directory-count {
    justify-self: start;
  }
  .organization-seat-footer {
    align-items: stretch;
    flex-direction: column;
  }
  .organization-seat-footer .btn {
    width: 100%;
  }
  .member-identity-header {
    align-items: flex-start;
  }
  .member-detail-section {
    padding: 20px;
  }
  .member-security-row,
  .member-danger-row {
    align-items: stretch;
  }
  .member-security-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }
  .member-security-actions .btn,
  .member-security-action,
  .member-danger-action {
    width: 100%;
    flex-basis: auto;
  }
  .member-entry-cards {
    grid-template-columns: 1fr;
  }
  .member-invite-form {
    grid-template-columns: 1fr;
  }
  .member-invite-workspaces {
    grid-column: auto;
  }
  .invitation-row {
    align-items: flex-start;
    flex-direction: column;
  }
  .invitation-actions {
    width: 100%;
  }
}
.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.admin-stat-card {
  background: var(--bt-surface);
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  padding: 18px 20px;
}
.admin-stat-card .admin-stat-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--bt-text-muted);
  margin-bottom: 6px;
}
.admin-stat-card .admin-stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--bt-text);
  line-height: 1;
}
.admin-stat-card .admin-stat-sub {
  font-size: 12px;
  color: var(--bt-text-muted);
  margin-top: 8px;
}

.admin-org-link {
  font-weight: 600;
  color: var(--bt-text);
  text-decoration: none;
}
.admin-org-link:hover {
  color: #b91c1c;
  text-decoration: underline;
}

.admin-account-type {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.admin-account-type.business {
  background: color-mix(in srgb, #b91c1c 15%, var(--bt-surface));
  color: #b91c1c;
  border: 1px solid color-mix(in srgb, #b91c1c 25%, transparent);
}
.admin-account-type.platform {
  background: #b91c1c;
  color: white;
  border: 1px solid #b91c1c;
}
.admin-account-type.personal {
  background: color-mix(in srgb, var(--bt-text-muted) 15%, var(--bt-surface));
  color: var(--bt-text-muted);
  border: 1px solid color-mix(in srgb, var(--bt-text-muted) 25%, transparent);
}

.user-refs-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.user-refs-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 10px 12px;
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  background: var(--bt-surface);
}

.user-refs-row-main {
  min-width: 0;
  flex: 1;
}

.user-refs-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.user-refs-snippet {
  font-size: 12px;
  font-style: italic;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-refs-context {
  font-size: 12px;
}
.user-refs-context i {
  margin-right: 4px;
  opacity: 0.7;
}

.user-refs-row-actions {
  flex-shrink: 0;
}

.admin-meter {
  display: inline-block;
  min-width: 80px;
  font-variant-numeric: tabular-nums;
}
.admin-meter.is-warn {
  color: var(--bt-warning);
  font-weight: 600;
}
.admin-meter.is-full {
  color: var(--bt-danger);
  font-weight: 700;
}

.admin-tree-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.admin-tree-org {
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  background: var(--bt-surface);
  margin-bottom: 12px;
  overflow: hidden;
}
.admin-tree-org > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
  font-size: 15px;
}
.admin-tree-org > summary::-webkit-details-marker {
  display: none;
}
.admin-tree-org > summary::before {
  content: "▸";
  color: var(--bt-text-muted);
  transition: transform 0.15s ease;
  font-size: 12px;
}
.admin-tree-org[open] > summary::before {
  transform: rotate(90deg);
}
.admin-tree-org > summary:hover {
  background: color-mix(in srgb, var(--bt-primary) 6%, transparent);
}

.admin-tree-org-name {
  font-weight: 600;
}

.admin-tree-slug {
  font-size: 12px;
}

.admin-tree-counts {
  font-size: 12px;
  color: var(--bt-text-muted);
  font-variant-numeric: tabular-nums;
}

.admin-tree-actions {
  margin-left: auto;
  display: flex;
  gap: 6px;
}

.admin-tree-body {
  padding: 4px 16px 14px 30px;
}

.admin-tree-section-label {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 11px;
  font-weight: 600;
  color: var(--bt-text-muted);
  margin: 12px 0 6px;
}

.admin-tree-members {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.admin-tree-members li {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 4px 0;
}

.admin-tree-user {
  font-weight: 500;
}

.admin-tree-email {
  font-size: 12px;
}

.admin-tree-role {
  margin-left: 4px;
  text-transform: capitalize;
}
.admin-tree-role.role-owner {
  background: color-mix(in srgb, var(--bt-primary) 22%, transparent);
}
.admin-tree-role.role-admin {
  background: color-mix(in srgb, var(--bt-primary) 14%, transparent);
}

.admin-tree-ws {
  border-left: 2px solid var(--bt-border);
  margin: 6px 0 6px 4px;
  padding-left: 10px;
}
.admin-tree-ws > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 6px 0;
  cursor: pointer;
  list-style: none;
}
.admin-tree-ws > summary::-webkit-details-marker {
  display: none;
}
.admin-tree-ws > summary::before {
  content: "▸";
  color: var(--bt-text-muted);
  font-size: 11px;
  transition: transform 0.15s ease;
}
.admin-tree-ws[open] > summary::before {
  transform: rotate(90deg);
}
.admin-tree-ws .admin-tree-members {
  margin: 2px 0 8px 18px;
}

.admin-tree-ws-icon {
  color: var(--bt-text-muted);
  font-size: 12px;
}

.admin-tree-ws-name {
  font-weight: 500;
}

.admin-attention {
  margin: 8px 0 24px;
}

.admin-attention-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}
.admin-attention-head h2 {
  margin: 0;
  font-size: 16px;
}

.admin-attention-list {
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  overflow: hidden;
}

.admin-attention-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--bt-border);
}
.admin-attention-row:last-child {
  border-bottom: none;
}

.admin-attention-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  font-size: 14px;
  color: var(--bt-text-muted);
}

.admin-attention-empty-icon {
  font-size: 17px;
  color: var(--bt-success);
}

.admin-attention-icon {
  font-size: 17px;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
  color: var(--bt-text-muted);
}
.admin-attention-icon.is-warn {
  color: var(--bt-warning);
}
.admin-attention-icon.is-ok {
  color: var(--bt-success);
}

.admin-attention-text {
  flex: 1;
  min-width: 0;
  font-size: 14px;
}

.admin-attention-title {
  font-weight: 500;
}

.admin-seat-full {
  color: var(--bt-warning);
  font-weight: 600;
}

.admin-filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 16px;
}

.admin-filter-search {
  flex: 1;
  min-width: 200px;
  margin: 0;
}
.admin-filter-search .core-input {
  width: 100%;
}

.admin-filter-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.admin-chip {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  padding: 0 12px;
  height: 36px;
  border-radius: var(--bt-radius);
  border: 1px solid var(--bt-border);
  color: var(--bt-text-muted);
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.admin-chip:hover {
  color: var(--bt-text);
  border-color: color-mix(in srgb, var(--bt-primary) 40%, var(--bt-border));
}
.admin-chip.is-active {
  background: color-mix(in srgb, var(--bt-primary) 12%, var(--bt-surface));
  border-color: color-mix(in srgb, var(--bt-primary) 30%, transparent);
  color: var(--bt-primary);
  font-weight: 500;
}

.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  gap: 12px;
}

.admin-pagination-btns {
  display: flex;
  gap: 6px;
}

.admin-org-members-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.admin-org-members-summary .account-section-title {
  margin-bottom: 4px;
}
.admin-org-members-summary p {
  margin: 0;
}

.admin-recent-organizations {
  margin: -4px 0 18px;
}
.admin-recent-organizations h2 {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--bt-text-muted);
}

.admin-recent-organizations-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-recent-organization {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  color: var(--bt-text);
  background: var(--bt-surface);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.admin-recent-organization i {
  color: var(--bt-primary);
}
.admin-recent-organization:hover {
  color: var(--bt-primary);
  border-color: color-mix(in srgb, var(--bt-primary) 40%, var(--bt-border));
}

.platform-access-panel {
  max-width: 850px;
}

.platform-access-form {
  max-width: 650px;
}
.platform-access-form .form-group {
  margin-bottom: 16px;
}
.platform-access-form label:not(.core-checkbox-group) {
  display: block;
  margin-bottom: 6px;
}
.platform-access-form .platform-confirm {
  margin: 20px 0;
}
.platform-access-form .platform-confirm .core-checkbox-label {
  font-size: inherit;
}
.platform-access-form textarea, .platform-access-form select {
  width: 100%;
}

.platform-access-event {
  padding: 12px 0;
  border-bottom: 1px solid var(--bt-border);
}
.platform-access-event p {
  margin: 4px 0;
  overflow-wrap: anywhere;
}

.attachment-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 10px;
  margin-bottom: 12px;
}

.attachment-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bt-surface);
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  transition: border-color 0.15s ease;
}
.attachment-item:hover {
  border-color: var(--bt-primary);
}
.attachment-item:hover .attachment-delete {
  opacity: 1;
}

.attachment-icon {
  font-size: 18px;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
  color: var(--bt-text-muted);
}

.attachment-icon-pdf {
  color: #dc2626;
}

.attachment-icon-doc,
.attachment-icon-docx {
  color: #2563eb;
}

.attachment-icon-xls,
.attachment-icon-xlsx,
.attachment-icon-csv {
  color: #16a34a;
}

.attachment-icon-zip {
  color: #d97706;
}

.attachment-icon-xml,
.attachment-icon-json,
.attachment-icon-html {
  color: #7c3aed;
}

.attachment-icon-txt {
  color: var(--bt-text-muted);
}

.attachment-name {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: var(--bt-primary);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.attachment-name:hover {
  text-decoration: underline;
}

.attachment-size {
  font-size: 11px;
  color: var(--bt-text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.attachment-delete {
  background: none;
  border: none;
  color: var(--bt-text-muted);
  cursor: pointer;
  padding: 4px 6px;
  font-size: 13px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.attachment-delete:hover {
  color: var(--bt-danger);
}

#pdfViewerModal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.7);
  align-items: center;
  justify-content: center;
}
#pdfViewerModal.show {
  display: flex;
}

.pdf-viewer-modal {
  display: flex;
  flex-direction: column;
  width: 90vw;
  height: 90vh;
  max-width: 1200px;
  background: var(--bt-surface);
  border-radius: var(--bt-radius);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.pdf-viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bt-bg);
  border-bottom: 1px solid var(--bt-border);
  flex-shrink: 0;
}

.pdf-viewer-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--bt-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  margin-right: 12px;
}

.pdf-viewer-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pdf-viewer-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  background: var(--bt-surface);
  color: var(--bt-text-muted);
  cursor: pointer;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.15s ease;
}
.pdf-viewer-btn:hover {
  border-color: var(--bt-primary);
  color: var(--bt-primary);
}

.pdf-viewer-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: var(--bt-radius);
  background: none;
  color: var(--bt-text-muted);
  cursor: pointer;
  font-size: 18px;
  transition: all 0.15s ease;
}
.pdf-viewer-close:hover {
  color: var(--bt-danger);
}

.pdf-viewer-body {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #525659;
}

.pdf-viewer-loading,
.pdf-viewer-error {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: #ccc;
}

.pdf-viewer-error a {
  color: var(--bt-primary);
  text-decoration: underline;
}

#pdfIframe {
  width: 100%;
  height: 100%;
  border: none;
}

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  cursor: pointer;
}
.lightbox-overlay.active {
  display: flex;
}

.lightbox-image {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
  cursor: default;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.issue-image-item img {
  cursor: pointer;
}

/* =================================
   CORE DATEPICKER
   Calendar dropdown with drill-down year/month/day navigation
   Adapted for Bug Tracker theme system
   ================================= */
.core-datepicker-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.core-datepicker-wrap > .core-input {
  min-width: 0;
  flex: 1;
  padding-right: 2.5rem;
}

.core-datepicker-icon {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--bt-text-muted);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 0.9rem;
  line-height: 1;
  transition: color 0.15s ease;
}
.core-datepicker-icon:hover {
  color: var(--bt-primary);
}
.core-datepicker-icon:focus-visible {
  outline: 2px solid var(--bt-primary);
  outline-offset: 2px;
}

.core-datepicker-error {
  color: var(--bt-danger);
  font-size: 0.8rem;
  margin: 0.35rem 0 0;
}

.core-datepicker-error[hidden] {
  display: none;
}

.core-datepicker-wrap .core-input[aria-invalid=true] {
  border-color: var(--bt-danger);
}

.core-datepicker-native {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
  overflow: hidden;
}

.core-datepicker-dropdown {
  position: fixed;
  z-index: 1050;
  margin: 0;
  background: var(--bt-surface);
  border: 1px solid var(--bt-border);
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  padding: 0.75rem;
  width: 280px;
  box-sizing: border-box;
  overflow: auto;
  overscroll-behavior: contain;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  user-select: none;
}
.core-datepicker-dropdown.dp-open {
  opacity: 1;
  transform: translateY(0);
}
.core-datepicker-dropdown button:focus-visible {
  outline: 2px solid var(--bt-primary);
  outline-offset: -2px;
}
.core-datepicker-dropdown button:disabled {
  opacity: 0.4;
  cursor: default;
}

.dp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.dp-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--bt-primary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  transition: background 0.15s ease;
}
.dp-title:hover {
  background: color-mix(in srgb, var(--bt-primary) 8%, transparent);
}
.dp-title.dp-title-static {
  cursor: default;
}
.dp-title.dp-title-static:hover {
  background: none;
  color: var(--bt-text);
}

.dp-nav {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  color: var(--bt-text-muted);
  font-size: 0.75rem;
  transition: all 0.15s ease;
}
.dp-nav:hover {
  background: color-mix(in srgb, var(--bt-primary) 10%, transparent);
  color: var(--bt-primary);
}

.dp-days-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  margin-bottom: 0.25rem;
}

.dp-dow {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--bt-text-muted);
  padding: 0.2rem 0;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.dp-grid-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.dp-day {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1;
  border: none;
  border-radius: 50%;
  background: none;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--bt-text);
  padding: 0;
  transition: all 0.1s ease;
}
.dp-day:hover {
  background: color-mix(in srgb, var(--bt-primary) 12%, transparent);
  color: var(--bt-primary);
}
.dp-day.dp-other {
  color: var(--bt-border);
}
.dp-day.dp-other:hover {
  color: var(--bt-text-muted);
  background: var(--bt-bg);
}
.dp-day.dp-today {
  font-weight: 700;
  box-shadow: inset 0 0 0 1.5px var(--bt-primary);
}
.dp-day.dp-selected {
  background: var(--bt-button);
  color: var(--bt-on-primary);
  font-weight: 600;
}
.dp-day.dp-selected:hover {
  background: var(--bt-button);
  color: var(--bt-on-primary);
  opacity: 0.9;
}

.dp-grid-months {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.dp-grid-years {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.dp-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 0.25rem;
  border: none;
  border-radius: 8px;
  background: none;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--bt-text);
  transition: all 0.1s ease;
}
.dp-cell:hover {
  background: color-mix(in srgb, var(--bt-primary) 12%, transparent);
  color: var(--bt-primary);
}
.dp-cell.dp-other {
  color: var(--bt-border);
}
.dp-cell.dp-other:hover {
  color: var(--bt-text-muted);
  background: var(--bt-bg);
}
.dp-cell.dp-today {
  font-weight: 700;
  box-shadow: inset 0 0 0 1.5px var(--bt-primary);
}
.dp-cell.dp-selected {
  background: var(--bt-button);
  color: var(--bt-on-primary);
  font-weight: 600;
}
.dp-cell.dp-selected:hover {
  background: var(--bt-button);
  color: var(--bt-on-primary);
  opacity: 0.9;
}

.dp-footer {
  margin-top: 0.375rem;
  padding-top: 0.375rem;
  border-top: 1px solid var(--bt-border);
  text-align: center;
}

.dp-today-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--bt-primary);
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  transition: background 0.15s ease;
}
.dp-today-btn:hover {
  background: color-mix(in srgb, var(--bt-primary) 10%, transparent);
}

@media (max-width: 768px) {
  .dp-day {
    font-size: 0.85rem;
    min-height: 40px;
  }
  .dp-cell {
    padding: 0.75rem 0.25rem;
    font-size: 0.85rem;
  }
  .dp-nav {
    padding: 0.5rem 0.75rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .core-datepicker-dropdown, .core-datepicker-dropdown button {
    transition: none;
  }
}
@media print {
  .core-datepicker-dropdown {
    display: none !important;
  }
}
@media (max-width: 1024px) {
  .container {
    padding: 16px;
  }
}
@media (max-width: 900px) {
  .dash-sidebar {
    display: none;
  }
}
@media (max-width: 768px) {
  body {
    font-size: 16px;
  }
  .nav {
    padding: 0 12px;
    gap: 8px;
    height: auto;
    min-height: 56px;
    flex-wrap: wrap;
    padding-top: 8px;
    padding-bottom: 8px;
  }
  .nav-brand {
    order: 2;
  }
  .nav-brand-img {
    height: 28px;
  }
  .nav-hamburger {
    display: block;
    order: 1;
  }
  .nav-links {
    display: none;
    order: 4;
    flex-basis: 100%;
    flex-direction: column;
    gap: 2px;
    padding-top: 8px;
    padding-bottom: 4px;
  }
  .nav-links.show {
    display: flex;
  }
  .nav-workspace {
    order: 3;
    padding: 4px 10px;
    font-size: 12px;
  }
  .nav-workspace-name {
    max-width: 110px;
  }
}
@media (max-width: 420px) {
  .nav-workspace-name {
    display: none;
  }
  .nav-link {
    padding: 10px 12px;
    font-size: 15px;
    border-radius: var(--bt-radius);
  }
  .nav-user {
    font-size: 13px;
    gap: 6px;
    order: 3;
    margin-left: auto;
  }
  .nav-caret {
    display: none;
  }
  .nav-dropdown {
    right: -8px;
  }
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .issues-header {
    flex-wrap: wrap;
    gap: 8px;
  }
  .issues-filterbar {
    gap: 4px;
  }
  .filterbar-filters .filterbar-label {
    flex: 0 0 auto;
  }
  .filterbar-filters select {
    flex: 1;
    min-width: 0;
  }
  .filterbar-filters .filterbar-more-btn {
    flex: 0 0 auto;
  }
  .filterbar-views {
    display: none !important;
  }
  .modal-overlay {
    padding: 8px;
  }
  .modal-container {
    max-height: 95vh;
    max-width: 95vw;
  }
  .filter-chip {
    font-size: 13px;
    padding: 6px 10px;
    gap: 6px;
  }
  .filter-chip .filter-chip-remove {
    min-width: 32px;
    min-height: 32px;
    font-size: 14px;
  }
  .issue-edit-layout {
    grid-template-columns: 1fr;
  }
  .issue-edit-sidebar {
    order: -1;
  }
  .mobile-form-buttons {
    display: flex;
    gap: 10px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--bt-border);
  }
  .mobile-form-buttons .btn {
    flex: 1;
    min-width: 0;
  }
  .issue-edit-left {
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  }
  .note-sidebar-toggle {
    display: inline-flex;
  }
  .note-edit-layout {
    grid-template-columns: 1fr;
  }
  .note-edit-layout .issue-edit-sidebar {
    position: fixed;
    top: 0;
    right: -340px;
    width: 320px;
    height: 100dvh;
    z-index: 1000;
    border-radius: 0;
    border: none;
    border-left: 1px solid var(--bt-border);
    overflow-y: auto;
    transition: right 0.25s ease;
    order: unset;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .note-edit-layout .issue-edit-sidebar.note-sidebar-open {
    right: 0;
  }
  .note-sidebar-close {
    display: flex;
  }
  .note-sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 999;
    background: var(--bt-backdrop);
  }
  .issue-edit-header {
    flex-wrap: wrap;
    gap: 12px;
  }
  .issue-edit-header-buttons {
    display: none;
  }
  .issue-card {
    padding: 8px 10px;
    gap: 8px;
  }
  .issue-card-left {
    min-width: 50px;
  }
  .issue-card-title {
    font-size: 14px;
  }
  .issue-card-meta {
    font-size: 12px;
  }
  .data-table thead {
    display: none;
  }
  .data-table tbody tr {
    display: block;
    margin-bottom: 12px;
    border: 1px solid var(--bt-border);
    border-radius: var(--bt-radius);
  }
  .data-table tbody td {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
  }
  .data-table tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    margin-right: 12px;
    color: var(--bt-text-muted);
  }
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .form-row {
    flex-direction: column;
    gap: 0;
  }
  .issue-meta {
    flex-direction: column;
    gap: 8px;
  }
  .notes-grid {
    grid-template-columns: 1fr;
  }
  .notes-list .note-card .note-list-category,
  .notes-list .note-card .note-footer,
  .notes-list .note-card .note-shared-badge {
    display: none;
  }
  .notes-list .note-card h3 {
    white-space: normal;
  }
  .notes-header-bar {
    flex-wrap: wrap;
  }
  .notes-header-bar .notes-search {
    flex: 1;
    min-width: 0;
    order: 1;
  }
  .notes-header-bar .notes-search input {
    width: 100%;
  }
  .notes-header-bar .btn-primary {
    flex: 0 0 auto;
    order: 2;
  }
  .notes-header-bar #noteTagFilter,
  .notes-header-bar #noteSortFilter,
  .notes-header-bar #noteGroupFilter,
  .notes-header-bar #noteCategoryFilter {
    display: none;
  }
  .notes-header-bar .notes-filter-btn {
    display: inline-flex;
    order: 4;
    flex: 1;
    min-height: 38px;
    justify-content: center;
  }
  .notes-header-bar #manageCategoriesBtn {
    order: 5;
    min-width: 38px;
    min-height: 38px;
  }
  .notes-header-bar #manageTagsBtn {
    order: 6;
    min-width: 38px;
    min-height: 38px;
  }
  .notes-header-bar #notesViewToggle {
    order: 7;
    min-width: 38px;
    min-height: 38px;
  }
  .notes-header-bar::after {
    content: "";
    flex-basis: 100%;
    order: 3;
  }
  .login-page {
    padding: 16px;
  }
  .login-card {
    max-width: 100%;
  }
  .login-logo {
    padding: 24px 20px;
  }
  .login-logo-img {
    width: 200px;
  }
  .login-form {
    padding: 24px 20px;
  }
}
@media (max-width: 768px) and (orientation: landscape) {
  .note-sidebar-toggle {
    display: none;
  }
  .note-edit-layout {
    grid-template-columns: 1fr 260px;
    gap: 16px;
  }
  .note-edit-layout .issue-edit-sidebar {
    position: static;
    width: auto;
    height: auto;
    z-index: auto;
    border-radius: var(--bt-radius);
    border: 1px solid var(--bt-border);
    border-left: 1px solid var(--bt-border);
    overflow-y: visible;
    transition: none;
    min-height: auto;
  }
}
@media (max-width: 480px) {
  .container {
    padding: 12px;
  }
  .stat-number {
    font-size: 28px;
  }
  .issue-card-right .badge {
    font-size: 10px;
    padding: 1px 6px;
  }
}
.theme-paper-light {
  --bt-radius: 4px;
  --bt-bg: #f5f2ec;
  --bt-surface: #fffdf9;
  --bt-surface-soft: #efeae2;
  --bt-surface-elevated: #fffdf9;
  --bt-border: #ddd5c8;
  --bt-border-strong: #b8ad9c;
  --bt-input-border: #c9c0b1;
  --bt-text: #1e1b16;
  --bt-text-muted: #6b6459;
  --bt-input-text: #1e1b16;
  --bt-primary: #1f4e79;
  --bt-primary-dark: #173c5e;
  --bt-button: #1f4e79;
  --bt-button-hover: #173c5e;
  --bt-secondary: #efeae2;
  --bt-secondary-hover: #e4ddd1;
  --bt-on-secondary: #1e1b16;
  --bt-secondary-border: #c9c0b1;
  --bt-btn-lift: 0;
  --bt-success: #2f6f4f;
  --bt-warning: #9a6a12;
  --bt-danger: #a63d3d;
  --bt-info: #1f4e79;
  --bt-success-ink: #24573e;
  --bt-warning-ink: #6e4b0c;
  --bt-danger-ink: #7f2e2e;
  --bt-info-ink: #173c5e;
  --bt-hover: #f3efe7;
  --bt-selected: #ebe4d6;
  --bt-toolbar-bg: #efeae2;
  --bt-card-shadow: none;
  --bt-nav-bg: #1e1b16;
  --bt-nav-text: #f5f2ec;
  --bt-nav-link: #c9c1b3;
  --bt-nav-link-hover: rgba(255, 255, 255, 0.08);
  --bt-nav-link-active: rgba(255, 255, 255, 0.12);
  --bt-nav-active-indicator: inset 0 -2px #e3c98a;
  --bt-nav-avatar-bg: #1f4e79;
  --bt-nav-border: #3a352d;
  --bt-nav-context: #e3c98a;
  --bt-nav-logo-accent: #e3c98a;
  --bt-category-badge-bg: #1f4e79;
  --bt-source-accent: #1f4e79;
  --bt-status-ink: #1e1b16;
  --bt-status-mix: 35%;
  --bt-toast-success: #2f6f4f;
  --bt-toast-success-border: #24573e;
  --bt-toast-warning: #9a6a12;
  --bt-toast-warning-border: #6e4b0c;
  --bt-toast-danger: #a63d3d;
  --bt-toast-danger-border: #7f2e2e;
  --bt-toast-info: #1f4e79;
  --bt-toast-info-border: #173c5e;
}
.theme-paper-light .page-header h1, .theme-paper-light .issues-header h1, .theme-paper-light .notes-page-header h1 {
  letter-spacing: -0.02em;
}

.theme-paper-dark {
  color-scheme: dark;
  --bt-surface-elevated: var(--bt-surface);
  --bt-input-bg: var(--bt-surface);
  --bt-input-text: var(--bt-text);
  --bt-input-disabled-bg: var(--bt-surface-soft);
  --bt-hover: color-mix(in srgb, #ffffff 6%, var(--bt-surface));
  --bt-secondary: var(--bt-text-muted);
  --bt-secondary-hover: color-mix(in srgb, var(--bt-text-muted) 80%, #ffffff);
  --bt-border-strong: var(--bt-text-muted);
  --bt-accent-ink: var(--bt-primary);
  --bt-success-ink: var(--bt-success);
  --bt-warning-ink: var(--bt-warning);
  --bt-danger-ink: var(--bt-danger);
  --bt-info-ink: var(--bt-info);
  --bt-success-soft: color-mix(in srgb, var(--bt-success) 15%, var(--bt-surface));
  --bt-warning-soft: color-mix(in srgb, var(--bt-warning) 15%, var(--bt-surface));
  --bt-danger-soft: color-mix(in srgb, var(--bt-danger) 15%, var(--bt-surface));
  --bt-info-soft: color-mix(in srgb, var(--bt-info) 15%, var(--bt-surface));
  --bt-backdrop: rgba(0, 0, 0, 0.6);
  --bt-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --bt-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.45);
  --bt-shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
  --bt-shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.6);
  --bt-overlay-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  --bt-toast-success: #059669;
  --bt-toast-success-border: #047857;
  --bt-toast-danger: #dc2626;
  --bt-toast-danger-border: #b91c1c;
  --bt-toast-warning: #d97706;
  --bt-toast-warning-border: #b45309;
  --bt-toast-info: #2563eb;
  --bt-toast-info-border: #1d4ed8;
  --bt-toast-shadow: rgba(0, 0, 0, 0.3);
  --bt-chart-blue: #8baeff;
  --bt-chart-success: #65d5aa;
  --bt-chart-danger: #ff8a96;
  --bt-chart-amber: #efbd68;
  --bt-select-arrow: url("data:image/svg+xml;charset=US-ASCII,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'><path fill='%238b90a0' d='M5 6L0 0h10z'/></svg>");
  --bt-radius: 4px;
  --bt-bg: #1b1917;
  --bt-surface: #262320;
  --bt-surface-soft: #2e2a26;
  --bt-border: #443e37;
  --bt-border-strong: #6b6259;
  --bt-input-border: #5a524a;
  --bt-text: #ece7de;
  --bt-text-muted: #b3aa9c;
  --bt-primary: #9cc3ea;
  --bt-primary-dark: #bcd7f2;
  --bt-button: #2c5f8c;
  --bt-button-hover: #234c70;
  --bt-secondary: #2e2a26;
  --bt-secondary-hover: #3a352f;
  --bt-on-secondary: #ece7de;
  --bt-secondary-border: #5a524a;
  --bt-btn-lift: 0;
  --bt-success: #8fd0a8;
  --bt-warning: #e6bf6f;
  --bt-danger: #ee9a93;
  --bt-info: #9cc3ea;
  --bt-selected: #33302a;
  --bt-toolbar-bg: #2e2a26;
  --bt-nav-bg: #121110;
  --bt-nav-text: #ece7de;
  --bt-nav-link: #a89f91;
  --bt-nav-link-hover: rgba(255, 255, 255, 0.07);
  --bt-nav-link-active: rgba(255, 255, 255, 0.1);
  --bt-nav-active-indicator: inset 0 -2px #e3c98a;
  --bt-nav-avatar-bg: #2c5f8c;
  --bt-nav-border: #2b2825;
  --bt-nav-context: #e3c98a;
  --bt-nav-logo-accent: #e3c98a;
  --bt-category-badge-bg: #2c5f8c;
  --bt-source-accent: #9cc3ea;
  --bt-status-ink: #f4f0e8;
  --bt-status-mix: 30%;
  --bt-card-shadow: none;
}
.theme-paper-dark .page-header h1, .theme-paper-dark .issues-header h1, .theme-paper-dark .notes-page-header h1 {
  letter-spacing: -0.02em;
}

.theme-slate-light {
  --bt-bg: #eef0f3;
  --bt-surface: #ffffff;
  --bt-surface-soft: #f4f6f8;
  --bt-border: #d5dae1;
  --bt-border-strong: #a7b0bc;
  --bt-input-border: #b9c1cb;
  --bt-text: #1a1f26;
  --bt-text-muted: #5c6675;
  --bt-input-text: #1a1f26;
  --bt-primary: #1d6ff2;
  --bt-primary-dark: #1558c4;
  --bt-button: #1d6ff2;
  --bt-button-hover: #1558c4;
  --bt-secondary: #ffffff;
  --bt-secondary-hover: #f4f6f8;
  --bt-on-secondary: #1a1f26;
  --bt-secondary-border: #b9c1cb;
  --bt-btn-lift: 0;
  --bt-focus-ring: color-mix(in srgb, #1d6ff2 30%, transparent);
  --bt-success: #148a5a;
  --bt-warning: #b56b06;
  --bt-danger: #d0343f;
  --bt-info: #1d6ff2;
  --bt-success-ink: #0f6b46;
  --bt-warning-ink: #855004;
  --bt-danger-ink: #a12730;
  --bt-info-ink: #1558c4;
  --bt-hover: #f4f6f8;
  --bt-selected: #e4eefc;
  --bt-toolbar-bg: #f4f6f8;
  --bt-card-shadow: 0 1px 2px rgba(26, 31, 38, 0.06);
  --bt-nav-bg: #2a313c;
  --bt-nav-text: #f1f4f8;
  --bt-nav-link: #b6bfcb;
  --bt-nav-link-hover: rgba(255, 255, 255, 0.08);
  --bt-nav-link-active: rgba(255, 255, 255, 0.12);
  --bt-nav-active-indicator: inset 0 -2px #6ea6ff;
  --bt-nav-avatar-bg: #1d6ff2;
  --bt-nav-border: #3a424f;
  --bt-nav-context: #7fb3ff;
  --bt-category-badge-bg: #1d6ff2;
  --bt-source-accent: #5c6675;
  --bt-status-ink: #1a1f26;
  --bt-toast-success: #148a5a;
  --bt-toast-success-border: #0f6b46;
  --bt-toast-warning: #b56b06;
  --bt-toast-warning-border: #855004;
  --bt-toast-danger: #d0343f;
  --bt-toast-danger-border: #a12730;
  --bt-toast-info: #1d6ff2;
  --bt-toast-info-border: #1558c4;
}

.theme-slate-dark {
  color-scheme: dark;
  --bt-surface-elevated: var(--bt-surface);
  --bt-input-bg: var(--bt-surface);
  --bt-input-text: var(--bt-text);
  --bt-input-disabled-bg: var(--bt-surface-soft);
  --bt-hover: color-mix(in srgb, #ffffff 6%, var(--bt-surface));
  --bt-secondary: var(--bt-text-muted);
  --bt-secondary-hover: color-mix(in srgb, var(--bt-text-muted) 80%, #ffffff);
  --bt-border-strong: var(--bt-text-muted);
  --bt-accent-ink: var(--bt-primary);
  --bt-success-ink: var(--bt-success);
  --bt-warning-ink: var(--bt-warning);
  --bt-danger-ink: var(--bt-danger);
  --bt-info-ink: var(--bt-info);
  --bt-success-soft: color-mix(in srgb, var(--bt-success) 15%, var(--bt-surface));
  --bt-warning-soft: color-mix(in srgb, var(--bt-warning) 15%, var(--bt-surface));
  --bt-danger-soft: color-mix(in srgb, var(--bt-danger) 15%, var(--bt-surface));
  --bt-info-soft: color-mix(in srgb, var(--bt-info) 15%, var(--bt-surface));
  --bt-backdrop: rgba(0, 0, 0, 0.6);
  --bt-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --bt-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.45);
  --bt-shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
  --bt-shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.6);
  --bt-overlay-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  --bt-toast-success: #059669;
  --bt-toast-success-border: #047857;
  --bt-toast-danger: #dc2626;
  --bt-toast-danger-border: #b91c1c;
  --bt-toast-warning: #d97706;
  --bt-toast-warning-border: #b45309;
  --bt-toast-info: #2563eb;
  --bt-toast-info-border: #1d4ed8;
  --bt-toast-shadow: rgba(0, 0, 0, 0.3);
  --bt-chart-blue: #8baeff;
  --bt-chart-success: #65d5aa;
  --bt-chart-danger: #ff8a96;
  --bt-chart-amber: #efbd68;
  --bt-select-arrow: url("data:image/svg+xml;charset=US-ASCII,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'><path fill='%238b90a0' d='M5 6L0 0h10z'/></svg>");
  --bt-bg: #14171b;
  --bt-surface: #1d2126;
  --bt-surface-soft: #242930;
  --bt-border: #343b45;
  --bt-border-strong: #5b6573;
  --bt-input-border: #4a535f;
  --bt-text: #e6e9ee;
  --bt-text-muted: #9aa4b1;
  --bt-primary: #6ea6ff;
  --bt-primary-dark: #97c0ff;
  --bt-button: #1d6ff2;
  --bt-button-hover: #1558c4;
  --bt-secondary: #242930;
  --bt-secondary-hover: #2c323a;
  --bt-on-secondary: #e6e9ee;
  --bt-secondary-border: #4a535f;
  --bt-btn-lift: 0;
  --bt-success: #5fd39d;
  --bt-warning: #f0b64a;
  --bt-danger: #ff7b84;
  --bt-info: #6ea6ff;
  --bt-selected: #22303f;
  --bt-toolbar-bg: #242930;
  --bt-nav-bg: #0f1114;
  --bt-nav-text: #e6e9ee;
  --bt-nav-link: #8f99a6;
  --bt-nav-link-hover: rgba(255, 255, 255, 0.07);
  --bt-nav-link-active: rgba(255, 255, 255, 0.1);
  --bt-nav-active-indicator: inset 0 -2px #6ea6ff;
  --bt-nav-avatar-bg: #1d6ff2;
  --bt-nav-border: #22262c;
  --bt-nav-context: #7fb3ff;
  --bt-category-badge-bg: #1d6ff2;
  --bt-source-accent: #9aa4b1;
  --bt-status-ink: #f2f4f7;
  --bt-card-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.theme-cobalt-light {
  --bt-bg: #eef5f8;
  --bt-surface: #ffffff;
  --bt-surface-soft: #e7f0f4;
  --bt-border: #c7d8e1;
  --bt-border-strong: #93afbf;
  --bt-input-border: #9db8c7;
  --bt-text: #102a3a;
  --bt-text-muted: #557181;
  --bt-input-text: #102a3a;
  --bt-primary: #006cbd;
  --bt-primary-dark: #00528f;
  --bt-button: #006cbd;
  --bt-button-hover: #00528f;
  --bt-secondary: #e7f0f4;
  --bt-secondary-hover: #d9e8ef;
  --bt-on-secondary: #102a3a;
  --bt-secondary-border: #9db8c7;
  --bt-btn-lift: 0;
  --bt-focus-ring: color-mix(in srgb, #006cbd 30%, transparent);
  --bt-success: #008a83;
  --bt-warning: #b56b0a;
  --bt-danger: #c23f52;
  --bt-info: #006cbd;
  --bt-success-ink: #00675f;
  --bt-warning-ink: #7d4906;
  --bt-danger-ink: #963040;
  --bt-info-ink: #00528f;
  --bt-hover: #edf5f8;
  --bt-selected: #dceefa;
  --bt-toolbar-bg: #e7f0f4;
  --bt-card-shadow: 0 2px 8px rgba(16, 42, 58, 0.08);
  --bt-nav-bg: #062b45;
  --bt-nav-gradient: linear-gradient(110deg, #062b45, #006cbd);
  --bt-nav-text: #f4fbff;
  --bt-nav-link: #c6e1ef;
  --bt-nav-link-hover: #164e70;
  --bt-nav-link-active: #164e70;
  --bt-nav-active-indicator: inset 0 -2px #83ddff;
  --bt-nav-avatar-bg: #006cbd;
  --bt-nav-border: #2f6686;
  --bt-nav-context: #8fe1ff;
  --bt-nav-logo-accent: #8fe1ff;
  --bt-category-badge-bg: #006cbd;
  --bt-source-accent: #006cbd;
  --bt-status-ink: #102a3a;
  --bt-toast-success: #008a83;
  --bt-toast-success-border: #00675f;
  --bt-toast-warning: #b56b0a;
  --bt-toast-warning-border: #7d4906;
  --bt-toast-danger: #c23f52;
  --bt-toast-danger-border: #963040;
  --bt-toast-info: #006cbd;
  --bt-toast-info-border: #00528f;
}

.theme-cobalt-dark {
  color-scheme: dark;
  --bt-surface-elevated: var(--bt-surface);
  --bt-input-bg: var(--bt-surface);
  --bt-input-text: var(--bt-text);
  --bt-input-disabled-bg: var(--bt-surface-soft);
  --bt-hover: color-mix(in srgb, #ffffff 6%, var(--bt-surface));
  --bt-secondary: var(--bt-text-muted);
  --bt-secondary-hover: color-mix(in srgb, var(--bt-text-muted) 80%, #ffffff);
  --bt-border-strong: var(--bt-text-muted);
  --bt-accent-ink: var(--bt-primary);
  --bt-success-ink: var(--bt-success);
  --bt-warning-ink: var(--bt-warning);
  --bt-danger-ink: var(--bt-danger);
  --bt-info-ink: var(--bt-info);
  --bt-success-soft: color-mix(in srgb, var(--bt-success) 15%, var(--bt-surface));
  --bt-warning-soft: color-mix(in srgb, var(--bt-warning) 15%, var(--bt-surface));
  --bt-danger-soft: color-mix(in srgb, var(--bt-danger) 15%, var(--bt-surface));
  --bt-info-soft: color-mix(in srgb, var(--bt-info) 15%, var(--bt-surface));
  --bt-backdrop: rgba(0, 0, 0, 0.6);
  --bt-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --bt-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.45);
  --bt-shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
  --bt-shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.6);
  --bt-overlay-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  --bt-toast-success: #059669;
  --bt-toast-success-border: #047857;
  --bt-toast-danger: #dc2626;
  --bt-toast-danger-border: #b91c1c;
  --bt-toast-warning: #d97706;
  --bt-toast-warning-border: #b45309;
  --bt-toast-info: #2563eb;
  --bt-toast-info-border: #1d4ed8;
  --bt-toast-shadow: rgba(0, 0, 0, 0.3);
  --bt-chart-blue: #8baeff;
  --bt-chart-success: #65d5aa;
  --bt-chart-danger: #ff8a96;
  --bt-chart-amber: #efbd68;
  --bt-select-arrow: url("data:image/svg+xml;charset=US-ASCII,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'><path fill='%238b90a0' d='M5 6L0 0h10z'/></svg>");
  --bt-bg: #071923;
  --bt-surface: #0e283b;
  --bt-surface-soft: #13374e;
  --bt-border: #2a4b60;
  --bt-border-strong: #5c7c8e;
  --bt-input-border: #436579;
  --bt-text: #e7f5fb;
  --bt-text-muted: #a9c0cc;
  --bt-primary: #78d8ff;
  --bt-primary-dark: #a4e7ff;
  --bt-button: #0a73b7;
  --bt-button-hover: #085b91;
  --bt-secondary: #13374e;
  --bt-secondary-hover: #1a4661;
  --bt-on-secondary: #e7f5fb;
  --bt-secondary-border: #436579;
  --bt-btn-lift: 0;
  --bt-success: #71d6ba;
  --bt-warning: #f0c36a;
  --bt-danger: #ff9a9d;
  --bt-info: #78d8ff;
  --bt-selected: #153c58;
  --bt-toolbar-bg: #13374e;
  --bt-card-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
  --bt-nav-bg: #04131f;
  --bt-nav-gradient: linear-gradient(110deg, #04131f, #0b3552);
  --bt-nav-text: #e7f5fb;
  --bt-nav-link: #a9c3d0;
  --bt-nav-link-hover: #17445e;
  --bt-nav-link-active: #17445e;
  --bt-nav-active-indicator: inset 0 -2px #78d8ff;
  --bt-nav-avatar-bg: #0a73b7;
  --bt-nav-border: #1d4862;
  --bt-nav-context: #8fe1ff;
  --bt-nav-logo-accent: #8fe1ff;
  --bt-category-badge-bg: #0a73b7;
  --bt-source-accent: #78d8ff;
  --bt-status-ink: #f0f8fc;
}

.reports-page {
  --report-blue: var(--bt-chart-blue);
  --report-success: var(--bt-chart-success);
  --report-danger: var(--bt-chart-danger);
  --report-amber: var(--bt-chart-amber);
  color: var(--bt-text);
  padding-bottom: 2rem;
}
.reports-page h1 {
  margin: 0 0 0.35rem;
}
.reports-page h2 {
  margin: 0;
  font-size: 1.08rem;
}
.reports-page a:focus-visible, .reports-page button:focus-visible, .reports-page summary:focus-visible {
  outline: 3px solid var(--report-blue);
  outline-offset: 3px;
}
.reports-page input:not(.core-input):not(.core-datepicker-native) {
  min-height: 38px;
  width: 100%;
  color: var(--bt-text);
  background: var(--bt-bg);
  border: 1px solid var(--bt-border);
  border-radius: 6px;
  padding: 0.45rem 0.65rem;
  font: inherit;
}
.reports-page select {
  width: 100%;
}
.reports-page label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.reports-page [hidden] {
  display: none !important;
}

.reports-heading, .report-panel-heading, .reports-period-row, .reports-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.reports-heading {
  margin-bottom: 1.5rem;
}
.reports-heading p {
  margin: 0;
}

.reports-eyebrow {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--bt-text-muted);
  margin-bottom: 0.45rem !important;
}

.reports-tabs {
  display: flex;
  gap: 0.4rem;
  border-bottom: 1px solid var(--bt-border);
  margin-bottom: 1.4rem;
}
.reports-tabs a {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  padding: 0.85rem 1.1rem;
  color: var(--bt-text-muted);
  border-bottom: 3px solid transparent;
  text-decoration: none;
  font-weight: 600;
}
.reports-tabs a[aria-current] {
  color: var(--report-blue);
  border-color: var(--report-blue);
}

.reports-controls, .report-list-filters {
  display: flex;
  align-items: end;
  gap: 0.8rem;
  flex-wrap: wrap;
}
.reports-controls > div, .report-list-filters > div {
  flex: 1 1 150px;
  min-width: 0;
}
.reports-controls > div:first-of-type, .report-list-filters > div:first-of-type {
  flex-grow: 1.5;
}

.reports-controls {
  padding: 1.1rem;
  border: 1px solid var(--bt-border);
  border-radius: 10px;
  background: var(--bt-surface);
}

.reports-period-row {
  padding: 1rem 0 0.4rem;
}
.reports-period-row span {
  display: block;
  color: var(--bt-text-muted);
  font-size: 0.76rem;
  margin-top: 0.3rem;
}

.reports-period-nav {
  display: flex;
  gap: 0.35rem;
}

.reports-scope-note, .report-caption {
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--bt-text-muted);
}

.reports-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.2rem;
}

.report-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1.2rem;
  background: var(--bt-surface);
  border: 1px solid var(--bt-border);
  border-top: 3px solid var(--report-blue);
  border-radius: 10px;
  text-decoration: none !important;
  color: var(--bt-text);
}
.report-card.is-selected {
  box-shadow: 0 0 0 2px var(--report-blue);
}
.report-card > strong {
  font-size: 2rem;
  font-variant-numeric: tabular-nums;
}
.report-card:hover {
  background: var(--bt-card-hover);
}

.report-card-label {
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.report-card-label i {
  color: var(--bt-text-muted);
}

.report-card-hint {
  color: var(--bt-text-muted);
  font-size: 0.76rem;
}

.report-card-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.4rem;
}

.report-card-selection {
  min-height: 1.2em;
  min-width: 5rem;
  color: var(--report-blue);
  font-size: 0.76rem;
  font-weight: 700;
}

#reportSummary, #reportRecords {
  scroll-margin-top: calc(var(--app-nav-bottom, 100px) + 1rem);
}

.report-selection-heading {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 0.5rem 0 1rem;
}
.report-selection-heading p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--bt-text-muted);
}
.report-selection-heading a {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--report-blue);
}

.reports-secondary-metrics a[aria-current] {
  color: var(--report-blue);
  font-weight: 700;
  text-decoration: underline;
}

.report-chart-tone-blue {
  --report-chart-color: var(--report-blue);
}

.report-chart-tone-success {
  --report-chart-color: var(--report-success);
}

.report-chart-tone-danger {
  --report-chart-color: var(--report-danger);
}

.report-chart-tone-amber {
  --report-chart-color: var(--report-amber);
}

.report-metric-trend {
  overflow: visible;
  gap: 2px;
}
.report-metric-trend .report-trend-column {
  min-width: 0;
}
.report-metric-trend .report-trend-label {
  height: 36px;
  white-space: normal;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.report-chart-axis {
  display: flex;
  justify-content: space-between;
  gap: 2px;
  margin-top: 0.4rem;
  font-size: 0.65rem;
  color: var(--bt-text-muted);
}
.report-chart-axis span {
  flex: 1;
  min-width: 0;
  text-align: center;
  overflow-wrap: anywhere;
}

.report-metric-bar {
  background: var(--report-chart-color);
  border-radius: 3px 3px 0 0;
  min-height: 3px;
}

.report-metric-bar.is-selected {
  box-shadow: inset 0 0 0 2px var(--bt-text);
}

.report-stage.is-selected {
  outline: 2px solid var(--report-blue);
  outline-offset: -2px;
  border-radius: 4px;
}

.report-tone-success {
  border-top-color: var(--report-success);
}

.report-tone-danger {
  border-top-color: var(--report-danger);
}

.report-tone-amber {
  border-top-color: var(--report-amber);
}

.reports-secondary-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1.3rem;
  padding: 1.1rem 0;
}
.reports-secondary-metrics a {
  color: var(--bt-text-muted);
  font-size: 0.8rem;
}
.reports-secondary-metrics strong {
  color: var(--bt-text);
}

.reports-chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.report-panel {
  min-width: 0;
  background: var(--bt-surface);
  border: 1px solid var(--bt-border);
  border-radius: 10px;
  padding: 1.2rem;
}

.report-panel-heading {
  margin-bottom: 0.8rem;
}
.report-panel-heading p {
  font-size: 0.8rem;
  color: var(--bt-text-muted);
  margin: 0;
}

.report-wide-panel {
  margin-top: 1rem;
}

.report-legend {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  color: var(--bt-text-muted);
}

.report-dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  display: inline-block;
}

.report-dot-success {
  background: var(--report-success);
}

.report-dot-danger {
  background: var(--report-danger);
}

.report-trend {
  display: flex;
  gap: 3px;
  height: 185px;
  margin-top: 1rem;
  overflow-x: auto;
  padding: 0.2rem;
}

.report-trend-column {
  flex: 1;
  min-width: 8px;
  display: flex;
  flex-direction: column;
  text-decoration: none !important;
}

.report-trend-stack {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: end;
  border-bottom: 1px solid var(--bt-border);
}
.report-trend-stack a {
  display: block;
  flex-shrink: 0;
}

.report-trend-done {
  background: var(--report-success);
  border-radius: 2px 2px 0 0;
}

.report-trend-lost {
  background: var(--report-danger);
}

.report-trend-label {
  height: 24px;
  font-size: 0.6rem;
  padding-top: 0.35rem;
  white-space: nowrap;
  color: var(--bt-text-muted);
  text-align: center;
}

.report-chart-data, .report-method {
  font-size: 0.8rem;
  margin-top: 1rem;
}
.report-chart-data summary, .report-method summary {
  cursor: pointer;
  color: var(--bt-text-muted);
}

.report-stage-list {
  max-height: 270px;
  overflow-y: auto;
  padding-inline-end: 12px;
}

.report-stage {
  display: grid;
  grid-template-columns: minmax(85px, 1fr) 1.3fr 30px;
  align-items: center;
  gap: 0.7rem;
  color: var(--bt-text);
  padding: 0.55rem 0;
  text-decoration: none !important;
  font-size: 0.8rem;
}
.report-stage > strong {
  text-align: right;
}

.report-stage-name small {
  display: block;
  color: var(--bt-text-muted);
  font-size: 0.67rem;
  margin-top: 0.15rem;
}

.report-stage-track {
  height: 9px;
  border-radius: 4px;
  background: var(--bt-card-hover);
  overflow: hidden;
}
.report-stage-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.report-table-wrap {
  overflow-x: auto;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.82rem;
}
.report-table th, .report-table td {
  padding: 0.85rem 0.65rem;
  border-bottom: 1px solid var(--bt-border);
  vertical-align: top;
}
.report-table thead th {
  font-size: 0.72rem;
  color: var(--bt-text-muted);
  font-weight: 600;
  white-space: nowrap;
}
.report-table tbody th {
  font-weight: 500;
}
.report-table small {
  display: block;
  font-weight: normal;
  font-size: 0.7rem;
  color: var(--bt-text-muted);
  margin-top: 0.3rem;
}
.report-table tbody tr:last-child > * {
  border-bottom: 0;
}

.report-records {
  min-width: 650px;
}
.report-records th:first-child {
  width: 43%;
}

.report-record-link {
  font: inherit;
  padding: 0;
  background: none;
  border: 0;
  color: var(--bt-primary);
  cursor: pointer;
  text-align: left;
}
.report-record-link:hover {
  text-decoration: underline;
}

.report-text-danger {
  color: var(--report-danger) !important;
}

.report-health {
  white-space: nowrap;
  font-size: 0.74rem;
  color: var(--report-success);
}
.report-health.is-late {
  color: var(--report-danger);
}
.report-health.is-waiting {
  color: var(--report-amber);
}

.report-list-filters {
  border-bottom: 1px solid var(--bt-border);
  padding-bottom: 1.2rem;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
}

.report-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}
.report-status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.report-result-count {
  color: var(--bt-text-muted);
  font-weight: 400;
  margin-left: 0.35rem;
}

.reports-pagination {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--bt-text-muted);
}
.reports-pagination > div {
  display: flex;
  gap: 0.4rem;
}

.report-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--bt-text-muted);
  line-height: 1.6;
  font-size: 0.85rem;
}

.reports-notice {
  padding: 0.8rem 1rem;
  border: 1px solid var(--bt-border);
  background: var(--bt-surface);
  border-radius: 8px;
  font-size: 0.8rem;
}

.reports-pending {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 800ms cubic-bezier(0.22, 1, 0.36, 1), opacity 800ms ease-out;
}
.reports-pending > div {
  min-height: 0;
  overflow: hidden;
}
.reports-pending .reports-notice {
  margin: 0.8rem 0 0;
}
.reports-pending.is-visible {
  grid-template-rows: 1fr;
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .reports-pending {
    transition: none;
  }
}
.reports-workflow {
  max-width: 700px;
}
.reports-workflow h1 {
  margin-top: 1rem;
}

.report-outcome-field {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (max-width: 900px) {
  .reports-chart-grid {
    grid-template-columns: 1fr;
  }
  .reports-cards {
    gap: 0.7rem;
  }
  .report-card {
    padding: 0.9rem;
  }
}
@media (max-width: 600px) {
  .reports-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .reports-tabs a {
    padding: 0.75rem 0.65rem;
    font-size: 0.85rem;
  }
  .report-panel {
    padding: 0.9rem;
  }
  .reports-controls > div {
    flex-basis: 100%;
  }
  .reports-heading {
    align-items: start;
  }
  .report-list-filters > div {
    flex-basis: 45%;
  }
  .report-list-filters .btn {
    flex: 1 1 auto;
  }
}
.reports-page .report-table a, .reports-page .report-panel-heading > a, .reports-page .report-method a, .reports-page .reports-notice a, .reports-page.reports-workflow > a {
  color: var(--report-blue);
}

.reports-applied-scope {
  font-size: 0.85rem;
  color: var(--bt-text-muted);
}

.reports-filter-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  margin: 0.8rem 0;
  border: 1px solid var(--bt-border);
  border-radius: 8px;
  background: var(--bt-surface);
  font-size: 0.85rem;
}

.report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.report-print-context, .report-print-records {
  display: none;
}

.report-document-toolbar {
  max-width: 1152px;
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.report-document-toolbar > a {
  color: var(--bt-primary);
}
.report-document-toolbar .report-actions {
  margin-left: auto;
}
.report-document-toolbar p {
  flex-basis: 100%;
  margin: 0;
  color: var(--bt-text-muted);
  font-size: 0.85rem;
}

.report-document {
  max-width: 1104px;
  margin: 0 auto 2rem;
  padding: 2rem;
  background: var(--bt-surface);
  border: 1px solid var(--bt-border);
  border-radius: 10px;
}

.report-document table, .report-print-records table {
  width: 100%;
  table-layout: fixed;
}
.report-document th, .report-document td, .report-print-records th, .report-print-records td {
  overflow-wrap: anywhere;
  vertical-align: top;
}

@media (max-width: 600px) {
  .report-document {
    padding: 1rem;
    margin: 0 0.5rem 1rem;
    font-size: 0.85rem;
  }
  .report-document-toolbar {
    padding: 1rem;
  }
  .report-document-toolbar .report-actions {
    margin-left: 0;
  }
  .report-document th, .report-document td {
    padding: 0.35rem;
  }
}
@media print {
  @page tracker-report {
    size: auto;
    margin: 12mm;
  }
  body:has(.reports-page), .report-document-page {
    padding: 0 !important;
    background: white !important;
    color: #111 !important;
    --bt-bg: white;
    --bt-surface: white;
    --bt-text: #111;
    --bt-text-muted: #444;
    --bt-border: #bbb;
    --bt-primary: #174ca6;
    --bt-card-hover: #eee;
  }
  body:has(.reports-page) > :not(main), .report-document-toolbar {
    display: none !important;
  }
  body:has(.reports-page) .container > :not(.reports-page) {
    display: none !important;
  }
  body:has(.reports-page) .container {
    max-width: none;
    padding: 0;
    margin: 0;
  }
  .reports-page, .report-document {
    page: tracker-report;
    font-size: 10pt;
    --report-blue: #245bcc !important;
    --report-success: #14805a !important;
    --report-danger: #bd3547 !important;
    --report-amber: #a66308 !important;
  }
  .reports-page a, .report-document a {
    color: inherit !important;
    text-decoration: none !important;
  }
  .reports-page h1, .reports-page h2, .reports-page h3, .reports-page thead, .report-document h1, .report-document h2, .report-document h3, .report-document thead {
    break-after: avoid;
  }
  .reports-page table, .report-document table {
    width: 100%;
    border-collapse: collapse;
  }
  .reports-page thead, .report-document thead {
    display: table-header-group;
  }
  .reports-page tr, .report-document tr {
    break-inside: avoid;
  }
  .reports-page th, .reports-page td, .report-document th, .report-document td {
    font-size: 8pt;
    padding: 2mm;
    overflow-wrap: anywhere;
  }
  .report-document {
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
  }
  .reports-page .reports-heading, .reports-page .reports-tabs, .reports-page .reports-controls, .reports-page .reports-pending, .reports-page .reports-applied-scope,
  .reports-page .reports-period-row, .reports-page .reports-scope-note, .reports-page .reports-secondary-metrics, .reports-page .report-list-filters, .reports-page .reports-pagination,
  .reports-page .report-selection-heading a, .reports-page .report-selection-heading p, .reports-page .reports-filter-summary a,
  .reports-page #reportRecords, .reports-page .report-interactive {
    display: none !important;
  }
  .reports-page .report-print-context, .reports-page .report-print-records {
    display: block;
  }
  .reports-page .report-print-context {
    margin-bottom: 6mm;
  }
  .reports-page .report-print-context p {
    margin: 1.5mm 0;
    font-size: 9pt;
  }
  .reports-page .reports-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 3mm;
    break-inside: avoid;
  }
  .reports-page .report-card {
    padding: 3mm;
  }
  .reports-page .report-card > strong {
    font-size: 18pt;
  }
  .reports-page .reports-chart-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3mm;
  }
  .reports-page .report-panel {
    min-width: 0;
    padding: 3mm;
  }
  .reports-page .report-table-wrap, .reports-page .report-stage-list {
    overflow: visible;
    max-height: none;
  }
  .reports-page .report-trend {
    height: 45mm;
    break-inside: avoid;
  }
  .reports-page .report-stage {
    font-size: 8pt;
    grid-template-columns: minmax(0, 1fr) 1fr 20px;
  }
  .reports-page .report-stage-name {
    overflow-wrap: anywhere;
  }
  .reports-page .report-stage small {
    font-size: 7pt;
  }
  .reports-page .report-print-records {
    margin-top: 6mm;
  }
  .reports-page .report-chart-data summary {
    display: none;
  }
}
body:has(.nav), body:has(.impersonation-banner) {
  padding-top: var(--app-nav-bottom, 56px);
}

.issues-filterbar, .todo-filterbar {
  top: var(--app-nav-bottom, 56px);
}

.nav-user-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  padding: 4px 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.nav-user-trigger:focus-visible, .nav-hamburger:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
  border-radius: 4px;
}

.ui-scope-note {
  color: var(--bt-text-muted);
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.5;
  margin: 0.35rem 0 0.8rem;
}

.note-toolbar-row {
  flex-wrap: wrap;
  min-width: 0;
}

.rich-editor-toolbar {
  flex-wrap: wrap;
  min-width: 0;
}

.note-editor-actions {
  flex-wrap: wrap;
}

.issue-edit-left, .note-edit-main {
  min-width: 0;
}

.note-share-check {
  min-width: 0;
}

.note-share-row {
  gap: 0.75rem;
}

@media (max-width: 1100px) {
  .nav {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 6px 10px;
    height: auto;
    min-height: 56px;
    padding: 8px 12px;
  }
  .nav-hamburger {
    display: block;
    order: 1;
  }
  .nav-brand {
    order: 2;
    margin: 0;
    justify-self: start;
  }
  .nav-brand-img {
    height: 28px;
  }
  .nav-version {
    display: none;
  }
  .nav-user {
    order: 3;
    margin-left: 0;
    justify-self: end;
  }
  .nav-context {
    order: 4;
    grid-column: 1/-1;
    width: 100%;
  }
  .nav-switcher {
    width: 100%;
  }
  .nav-switcher-seg-wrap {
    width: 100%;
  }
  .nav-switcher-seg {
    max-width: 100%;
    width: 100%;
  }
  .nav-switcher-seg-name {
    max-width: none;
    flex: 1;
    text-align: left;
  }
  .nav-links {
    order: 5;
    grid-column: 1/-1;
    display: none;
    flex-direction: column;
    padding: 6px 0 0;
  }
  .nav-links.show {
    display: flex;
  }
  .nav-switcher-menu {
    position: fixed;
    top: calc(var(--app-nav-bottom, 100px) + 4px);
    left: 8px;
    right: 8px;
    max-width: none;
    min-width: 0;
    max-height: calc(100dvh - var(--app-nav-bottom, 100px) - 16px);
    overflow-y: auto;
  }
  .nav-dropdown {
    max-height: calc(100dvh - 60px);
    overflow-y: auto;
  }
}
@media (max-width: 768px) {
  .issue-edit-header-buttons {
    display: flex;
    gap: 6px;
  }
  .issue-edit-header-right {
    flex-wrap: wrap;
    gap: 0.6rem;
  }
  .rich-editor-toolbar {
    flex-basis: 100%;
  }
}
@media (max-width: 768px) and (orientation: portrait) {
  .note-edit-layout .issue-edit-sidebar:not(.note-sidebar-open) {
    visibility: hidden;
  }
  .note-edit-layout .issue-edit-sidebar.note-sidebar-open {
    visibility: visible;
  }
}
.container.core-panel-host {
  width: calc(100% - var(--core-panel-space, 0px));
  margin-left: max(0px, (100% - var(--core-panel-space, 0px) - 1200px) / 2);
  margin-right: 0;
  box-sizing: border-box;
  overflow-anchor: none;
  transition: width 500ms cubic-bezier(0.22, 1, 0.36, 1), margin-left 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

.core-side-panel {
  position: fixed;
  top: var(--core-panel-top, 56px);
  right: 0;
  bottom: 0;
  width: var(--core-panel-width, 360px);
  max-width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  background: var(--bt-surface);
  color: var(--bt-text);
  border-left: 1px solid var(--bt-border);
  z-index: 90;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 500ms cubic-bezier(0.22, 1, 0.36, 1), visibility 0s 500ms, width 500ms cubic-bezier(0.22, 1, 0.36, 1);
}
.core-side-panel.is-open {
  transform: translateX(0);
  visibility: visible;
  transition-delay: 0s;
}

.core-side-panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--bt-border);
}
.core-side-panel-header .btn-sm {
  min-height: 36px;
  min-width: 36px;
}
.core-side-panel-header h2 {
  flex: 1;
  margin: 0;
  font-size: 18px;
}

.core-side-panel-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  min-height: 0;
  flex: 1;
  padding: 20px;
}

.core-side-panel-footer {
  border-top: 1px solid var(--bt-border);
  padding: 12px 20px max(16px, env(safe-area-inset-bottom));
}
.core-side-panel-footer p {
  font-size: 13px;
  color: var(--bt-text-muted);
  min-height: 1.5em;
  margin: 0 0 8px;
}

.core-side-panel-actions {
  display: flex;
  gap: 8px;
}
.core-side-panel-actions button {
  flex: 1;
  min-width: 0;
}

.core-side-panel-resize {
  position: absolute;
  left: -5px;
  top: 0;
  bottom: 0;
  width: 10px;
  cursor: col-resize;
  touch-action: none;
}
.core-side-panel-resize:hover, .core-side-panel-resize:focus-visible {
  background: color-mix(in srgb, var(--bt-primary) 35%, transparent);
  outline: 2px solid var(--bt-primary);
}

.core-side-panel-backdrop {
  display: none;
}

.core-panel-resizing {
  cursor: col-resize;
  user-select: none;
}
.core-panel-resizing .core-panel-host, .core-panel-resizing .core-side-panel {
  transition: none;
}

@media (max-width: 1199px) {
  .core-side-panel {
    top: 0;
    z-index: 1100;
    box-shadow: -12px 0 32px rgba(0, 0, 0, 0.18);
  }
  .core-side-panel-resize {
    display: none;
  }
  .core-side-panel-header .btn-sm {
    min-height: 44px;
    min-width: 44px;
  }
  .core-side-panel-backdrop.is-open {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1090;
  }
}
@media (max-width: 600px) {
  .core-side-panel {
    width: 100%;
  }
  .core-side-panel [data-panel-expand] {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .container.core-panel-host, .core-side-panel {
    transition: none;
  }
}
@media print {
  .core-side-panel, .core-side-panel-backdrop {
    display: none;
  }
  .container.core-panel-host {
    width: 100%;
    margin: 0;
  }
}
.core-detail-layout {
  --core-detail-rail-width: 340px;
  --core-detail-rail-gap: 20px;
  --core-detail-rail-duration: 250ms;
}

@media (min-width: 769px) {
  .core-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--core-detail-rail-width);
    gap: var(--core-detail-rail-gap);
    align-items: start;
    transition: grid-template-columns var(--core-detail-rail-duration) cubic-bezier(0.22, 1, 0.36, 1), gap var(--core-detail-rail-duration) cubic-bezier(0.22, 1, 0.36, 1);
  }
  .core-detail-layout > .core-detail-rail {
    min-width: 0;
    overflow-x: hidden;
    opacity: 1;
    visibility: visible;
    transition: opacity 180ms ease, visibility 0s linear, padding-left var(--core-detail-rail-duration) cubic-bezier(0.22, 1, 0.36, 1), padding-right var(--core-detail-rail-duration) cubic-bezier(0.22, 1, 0.36, 1), border-left-width var(--core-detail-rail-duration) cubic-bezier(0.22, 1, 0.36, 1), border-right-width var(--core-detail-rail-duration) cubic-bezier(0.22, 1, 0.36, 1);
  }
  .core-detail-layout.is-details-collapsed {
    grid-template-columns: minmax(0, 1fr) 0;
    gap: 0;
  }
  .core-detail-layout.is-details-collapsed > .core-detail-rail {
    padding-left: 0;
    padding-right: 0;
    border-left-width: 0;
    border-right-width: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 140ms ease, visibility 0s linear var(--core-detail-rail-duration), padding-left var(--core-detail-rail-duration) cubic-bezier(0.22, 1, 0.36, 1), padding-right var(--core-detail-rail-duration) cubic-bezier(0.22, 1, 0.36, 1), border-left-width var(--core-detail-rail-duration) cubic-bezier(0.22, 1, 0.36, 1), border-right-width var(--core-detail-rail-duration) cubic-bezier(0.22, 1, 0.36, 1);
  }
}
@media (min-width: 769px) and (prefers-reduced-motion: reduce) {
  .core-detail-layout,
  .core-detail-layout > .core-detail-rail {
    transition: none;
  }
}
.settings-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  max-width: 1440px;
  margin: 0 auto;
  min-height: calc(100vh - 56px);
}
.settings-layout > .container {
  width: 100%;
  min-width: 0;
}

.settings-sidebar {
  padding: 24px 12px;
  border-right: 1px solid var(--bt-border);
  background: var(--bt-surface);
  align-self: start;
  position: sticky;
  top: var(--app-nav-bottom, 56px);
  max-height: calc(100vh - var(--app-nav-bottom, 56px));
  overflow-y: auto;
}

.settings-sidebar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 8px;
}

.settings-context {
  padding: 0 8px;
  overflow-wrap: anywhere;
}

.settings-nav-group-label {
  flex: 0 0 100%;
  padding: 16px 8px 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bt-text-muted);
}

.settings-nav-group-label:first-child {
  padding-top: 8px;
}

.settings-entry {
  flex-shrink: 0;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 700px) {
  .settings-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 1fr;
  }
  .settings-sidebar {
    position: static;
    max-height: none;
    padding: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--bt-border);
  }
  .settings-sidebar nav {
    display: flex;
    flex-wrap: wrap;
  }
  .settings-sidebar .nav-switcher-menu-item {
    width: auto;
  }
}
@media (max-width: 1100px) {
  .nav:has(.settings-entry) {
    grid-template-columns: auto 1fr auto auto auto;
  }
  .settings-entry {
    order: 3;
  }
  .nav:has(.settings-entry) .nav-workspace-context {
    order: 4;
    grid-column: auto;
    width: auto;
  }
  .nav:has(.settings-entry) .nav-workspace-context .nav-switcher,
  .nav:has(.settings-entry) .nav-workspace-context .nav-switcher-seg-wrap,
  .nav:has(.settings-entry) .nav-workspace-context .nav-switcher-seg {
    width: auto;
  }
  .nav:has(.settings-entry) .nav-workspace-context .nav-switcher-seg-name {
    max-width: 160px;
    flex: 0 1 auto;
    text-align: left;
  }
  .nav:has(.settings-entry) .nav-user {
    order: 4;
  }
  .nav:has(.settings-entry) .nav-context:not(.nav-workspace-context) {
    order: 5;
  }
  .nav:has(.settings-entry) .nav-links {
    order: 6;
  }
}
@media (max-width: 600px) {
  .nav:has(.settings-entry) .nav-workspace-context .nav-switcher-seg-name {
    max-width: 92px;
  }
}
@media (max-width: 420px) {
  .nav:has(.settings-entry) .nav-workspace-context .nav-switcher-seg-name,
  .nav:has(.settings-entry) .nav-user .nav-username {
    display: none;
  }
  .nav:has(.settings-entry) .nav-workspace-context .nav-switcher-seg {
    padding-left: 7px;
    padding-right: 7px;
  }
}
.contacts-page {
  min-width: 0;
}

.contacts-page h1,
.contacts-page td,
.contacts-page .contact-notes {
  overflow-wrap: anywhere;
}

.contacts-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 18px 0;
}
.contacts-filters .form-group {
  flex: 0 1 280px;
  margin: 0;
  min-width: 180px;
}
.contacts-filters input, .contacts-filters select {
  width: 100%;
}
.contacts-filters .btn {
  min-height: 38px;
}

.contact-filter-count {
  margin-left: auto;
  color: var(--bt-text-muted);
  font-size: 13px;
}

.contacts-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0;
}

.contact-status-tabs {
  display: flex;
  gap: 20px;
  border-bottom: 1px solid var(--bt-border);
  margin-top: 18px;
}

.contact-status-tab {
  padding: 10px 2px 9px;
  border-bottom: 2px solid transparent;
  color: var(--bt-text-muted);
  font-weight: 600;
  text-decoration: none;
}
.contact-status-tab:hover {
  color: var(--bt-text);
}
.contact-status-tab.active {
  color: var(--bt-primary);
  border-bottom-color: var(--bt-primary);
}

.contact-directory-table {
  min-width: 860px;
}

.contact-directory-row {
  cursor: pointer;
}

.contact-directory-table th:first-child {
  min-width: 210px;
}

.contact-directory-table th:nth-child(2) {
  min-width: 220px;
}

.contact-directory-table td > strong,
.contact-directory-table td > small {
  display: block;
}

.contact-directory-table td small,
.contact-person-cell small {
  margin-top: 3px;
  color: var(--bt-text-muted);
  font-size: 12px;
  font-weight: 400;
}

.contact-person-cell {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--bt-text);
  text-decoration: none;
}
.contact-person-cell > span:last-child {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.contact-person-cell strong {
  color: var(--bt-primary);
}
.contact-person-cell:hover strong {
  text-decoration: underline;
}

.contact-visibility-chip,
.contact-status-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bt-primary) 10%, var(--bt-surface));
  color: var(--bt-primary);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.contact-status-archived {
  background: color-mix(in srgb, var(--bt-text-muted) 12%, var(--bt-surface));
  color: var(--bt-text-muted);
}

.contacts-form-page {
  max-width: none;
}

.contact-edit-context {
  margin: 2px 0 0;
  color: var(--bt-text-muted);
  font-size: 13px;
}

.contact-edit-layout {
  grid-template-columns: minmax(0, 1fr) 320px;
}

.contact-form-section {
  margin-bottom: 28px;
}
.contact-form-section h2 {
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--bt-border);
  font-size: 16px;
}
.contact-form-section .issue-edit-field {
  margin-bottom: 16px;
}
.contact-form-section .issue-edit-field:last-child {
  margin-bottom: 0;
}
.contact-form-section input, .contact-form-section textarea {
  width: 100%;
}

.contact-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.contact-edit-sidebar {
  position: sticky;
  top: 20px;
}

.contact-custom-toggle {
  margin-top: 8px;
  width: 100%;
}

.contact-assignee-picker {
  position: relative;
}

.contact-assignee-picker .workspace-picker-selected:not(:empty) + .core-input {
  display: none;
}

.contact-assignee-picker .workspace-picker-results {
  position: absolute;
  z-index: 20;
  top: calc(100% - 24px);
  left: 0;
  right: 0;
  box-shadow: var(--bt-overlay-shadow);
}

.contact-assignee-picker .workspace-picker-chip {
  justify-content: space-between;
  width: 100%;
}

.contact-back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 20px;
  color: var(--bt-text-muted);
  text-decoration: none;
}

.contact-back-link:hover {
  color: var(--bt-primary);
}

.contact-profile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}

.contact-profile-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.contact-profile-identity h1 {
  margin: 0;
  font-size: 24px;
}

.contact-profile-identity p {
  margin: 4px 0 0;
  color: var(--bt-text-muted);
}

.contact-profile-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.contact-profile-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.contact-status-form {
  margin: 0;
}

.contact-profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
}

.contact-profile-main {
  min-width: 0;
}

.contact-profile-section {
  margin: 0 0 20px;
}

.contact-profile-section h2 {
  margin: 0 0 16px;
  font-size: 17px;
}

.contact-method-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.contact-method-grid > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.contact-method-grid a {
  overflow-wrap: anywhere;
}

.contact-detail-label {
  color: var(--bt-text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.contact-notes {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.55;
}

.contact-profile-sidebar {
  position: sticky;
  top: 20px;
}

.contact-profile-sidebar dl {
  margin: 0;
}

.contact-profile-sidebar dl > div {
  padding: 11px 0;
  border-bottom: 1px solid var(--bt-border);
}

.contact-profile-sidebar dl > div:first-child {
  padding-top: 0;
}

.contact-profile-sidebar dl > div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.contact-profile-sidebar dt {
  margin-bottom: 4px;
  color: var(--bt-primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.contact-profile-sidebar dd {
  margin: 0;
}

.contact-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.contact-section-heading .text-muted {
  font-size: 12px;
}

.contact-activity-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-activity-list li {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--bt-border);
}

.contact-activity-list time {
  display: block;
  margin-top: 3px;
  color: var(--bt-text-muted);
  font-size: 12px;
}

.contact-activity-marker {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--bt-primary);
  flex: 0 0 auto;
}

@media (max-width: 768px) {
  .contact-profile-header {
    align-items: flex-start;
    flex-direction: column;
  }
  .contact-profile-actions {
    width: 100%;
  }
  .contact-profile-actions .btn,
  .contact-status-form {
    flex: 1;
  }
  .contact-status-form .btn {
    width: 100%;
  }
  .contact-profile-layout {
    grid-template-columns: 1fr;
  }
  .contact-profile-sidebar {
    position: static;
    order: -1;
  }
  .contact-edit-sidebar {
    position: static;
    order: 0;
  }
  .contact-field-grid,
  .contact-method-grid {
    grid-template-columns: 1fr;
  }
  .contact-filter-count {
    width: 100%;
    margin-left: 0;
  }
}
.container:has(#issueForm) {
  max-width: 1280px;
}

.filterbar-more-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.issue-category-group:not(.issue-category-group--nested) .issue-list {
  padding-left: 0;
}

.issue-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 18px;
  color: var(--bt-text-muted);
  text-decoration: none;
}
.issue-detail-back:hover {
  color: var(--bt-primary);
}

.issue-edit-header {
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 22px;
}

.issue-edit-header-left {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
}

.issue-detail-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.issue-detail-kicker > strong {
  font-size: 21px;
}

.issue-detail-title {
  margin: 0;
  min-width: 0;
}

.issue-detail-title-input {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 3px 5px;
  margin-left: -6px;
  border: 1px solid transparent;
  border-radius: var(--bt-radius);
  background: transparent;
  color: var(--bt-text);
  font: inherit;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  resize: none;
  overflow: hidden;
}
.issue-detail-title-input:hover {
  border-color: var(--bt-border);
}
.issue-detail-title-input:focus {
  outline: none;
  border-color: var(--bt-primary);
  background: var(--bt-surface);
  box-shadow: 0 0 0 2px var(--bt-focus-ring);
}

.issue-detail-meta {
  margin: 5px 0 0;
  color: var(--bt-text-muted);
  font-size: 12px;
}

.issue-edit-header-right {
  flex: 0 0 auto;
  padding-top: 2px;
}

.issue-edit-header .note-sidebar-toggle {
  gap: 6px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  background: var(--bt-surface);
  color: var(--bt-text);
  font-size: 14px;
}
.issue-edit-header .note-sidebar-toggle:hover {
  border-color: var(--bt-primary);
  color: var(--bt-primary);
}

.issue-edit-layout.note-edit-layout,
.issue-edit-layout.note-edit-layout.issue-edit-layout--flow {
  height: auto;
}

.note-edit-layout .issue-edit-left,
.note-edit-layout.issue-edit-layout--flow .issue-edit-left {
  height: auto;
  min-height: 0;
}

.issue-content-card {
  display: block;
  flex: none;
  min-height: 0;
  margin: 0 0 18px;
  padding: 20px;
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  background: var(--bt-surface);
  box-shadow: var(--bt-card-shadow);
}

.note-edit-layout .issue-edit-left > .issue-content-card,
.note-edit-layout.issue-edit-layout--flow .issue-edit-left > .issue-content-card,
.note-edit-layout.issue-edit-layout--flow .issue-edit-left > .issue-stacked-description,
.note-edit-layout.issue-edit-layout--flow .issue-edit-left > .issue-stacked-comments {
  display: block;
  flex: none;
  min-height: 0;
  margin-top: 0;
  padding: 20px;
  border-top: 1px solid var(--bt-border);
}

.issue-section-heading,
.issue-comments-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 16px;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--bt-border);
}
.issue-section-heading h2,
.issue-comments-header h2 {
  margin: 0;
  font-size: 16px;
}
.issue-section-heading p,
.issue-comments-header p {
  margin: 3px 0 0;
  color: var(--bt-text-muted);
  font-size: 12px;
}

.issue-content-card .rich-editor {
  min-height: 220px;
  max-height: 520px;
  overflow-y: auto;
  resize: vertical;
}

.issue-files-list {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 14px;
}

.issue-files-list .note-sidebar-thumb {
  width: 156px;
  height: auto;
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  background: var(--bt-surface-soft);
  overflow: visible;
}
.issue-files-list .note-sidebar-thumb img {
  width: 100%;
  height: 96px;
  border-radius: var(--bt-radius) var(--bt-radius) 0 0;
  object-fit: cover;
}
.issue-files-list .note-sidebar-thumb .issue-image-caption {
  padding: 6px 8px;
  font-size: 11px;
  text-align: left;
}

.issue-files-list .issue-video-card {
  width: 190px;
  flex: 0 0 190px;
}
.issue-files-list .issue-video-card .issue-video-info {
  display: flex;
}

.issue-files-list .attachment-item {
  order: 1;
  flex: 1 1 100%;
}

.issue-file-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 18px;
}
.issue-file-dropzone > i {
  margin-bottom: 3px;
}
.issue-file-dropzone > span {
  color: var(--bt-text);
  font-weight: 600;
}

.issue-edit-sidebar {
  position: sticky;
  top: 76px;
  padding: 20px;
  box-shadow: var(--bt-card-shadow);
}

.issue-sidebar-title {
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--bt-border);
  font-size: 16px;
}

.issue-sidebar-field {
  margin-bottom: 14px;
}

.issue-comments-header {
  align-items: center;
  margin-top: 0;
}

.issue-comments-header h2 .issue-edit-tab-count {
  color: var(--bt-text-muted);
  font-size: 13px;
  font-weight: 400;
}

.issue-comment-add {
  margin-bottom: 8px;
  padding: 0 0 16px;
  border-bottom: 1px solid var(--bt-border);
}

.issue-comment-add .btn {
  display: flex;
  margin: 8px 0 0 auto;
}

.issue-comments-list,
.note-edit-layout.issue-edit-layout--flow .issue-edit-left > .issue-stacked-comments .issue-comments-list {
  max-height: none;
  margin: 0;
  overflow: visible;
}

.issue-comment {
  padding: 14px 0;
}

.issue-comment-author {
  align-items: center;
  gap: 10px;
}
.issue-comment-author > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.issue-comment-body {
  padding-left: 42px;
}

.issue-comment-edit-form {
  margin-left: 42px;
}

.notes-page-header h1 {
  margin: 0;
}

.notes-page-header p {
  margin: 5px 0 0;
}

.notes-header-bar {
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.notes-header-bar select {
  min-height: 38px;
}

.todo-filterbar {
  margin-bottom: 20px;
}

.todo-filters-row select,
.todo-search input {
  min-height: 38px;
}

@media (max-width: 1080px) {
  .filterbar-main {
    align-items: stretch;
    flex-direction: column;
  }
  .filterbar-views {
    padding: 10px 0 0;
    border-top: 1px solid var(--bt-border);
    border-left: 0;
  }
  .filterbar-views select {
    flex: 1;
  }
}
@media (max-width: 900px) {
  .issue-list-header {
    grid-template-columns: 36px 78px minmax(260px, 1fr) 130px 105px 28px;
    min-width: 690px;
  }
  .issue-list-header span:nth-child(4),
  .issue-card-date-column {
    display: none;
  }
  .issue-card-row {
    grid-template-columns: 36px minmax(654px, 1fr);
    min-width: 690px;
  }
  .issue-card {
    grid-template-columns: 78px minmax(260px, 1fr) 130px 105px 28px;
    min-width: 0;
  }
}
@media (max-width: 768px) {
  .issue-edit-header {
    flex-direction: column;
  }
  .issue-edit-header-right {
    width: 100%;
  }
  .issue-edit-header-buttons {
    flex: 1;
  }
  .issue-edit-header-buttons .btn {
    flex: 1;
  }
  .issue-detail-title-input {
    font-size: 18px;
  }
  .issue-edit-layout.note-edit-layout,
  .issue-edit-layout.note-edit-layout.issue-edit-layout--flow {
    grid-template-columns: 1fr;
  }
  .issue-edit-sidebar {
    position: fixed;
    top: 0;
  }
  .filterbar-filters {
    flex-wrap: wrap;
  }
  .issues-header-search {
    flex: 1 1 100%;
    max-width: none;
  }
  .filterbar-filters select {
    flex: 1 1 120px;
    min-width: 0;
  }
  .filterbar-views {
    display: flex !important;
    width: 100%;
    gap: 8px;
  }
  .filterbar-views select {
    min-width: 0;
  }
  .issue-list {
    overflow: visible;
  }
  .issue-list-header {
    display: none;
  }
  .issue-card-row {
    grid-template-columns: 36px minmax(0, 1fr);
    min-width: 0;
  }
  .issue-card {
    grid-template-columns: 70px minmax(0, 1fr) auto 20px;
    min-width: 0;
  }
  .issue-card-assignee {
    display: none;
  }
  .issue-card-left {
    padding-left: 4px;
  }
  .issue-card-body {
    padding-right: 4px;
  }
  .issue-card-right {
    padding-left: 4px;
    padding-right: 4px;
  }
  .issue-section-heading {
    flex-direction: column;
  }
  .issue-section-heading .btn {
    width: 100%;
  }
  .issue-files-list .note-sidebar-thumb,
  .issue-files-list .issue-video-card {
    width: calc(50% - 6px);
    flex-basis: calc(50% - 6px);
  }
  .issue-comment-body,
  .issue-comment-edit-form {
    padding-left: 0;
    margin-left: 0;
  }
}
.personal-work-header {
  align-items: flex-start;
  margin-bottom: 18px;
}
.personal-work-header h1 {
  margin: 0;
}
.personal-work-header p {
  margin: 5px 0 0;
}

.personal-filter-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.personal-filter-primary,
.personal-filter-views,
.notes-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.personal-filter-primary {
  flex: 1 1 auto;
}

.personal-filter-views {
  flex: 0 0 auto;
  padding-left: 12px;
  border-left: 1px solid var(--bt-border);
}

.personal-filter-toolbar select,
.personal-filter-toolbar .core-input {
  min-height: 38px;
}

.todo-search,
.notes-search {
  flex: 1 1 250px;
  max-width: 360px;
  min-width: 190px;
}

.todo-search input,
.notes-search input {
  width: 100%;
  height: 38px;
}

.todo-filterbar {
  margin-bottom: 20px;
}

.todo-filters-row {
  flex-wrap: nowrap;
}

.todo-filters-row select {
  min-width: 126px;
  height: 38px;
}

.personal-filter-views select {
  min-width: 155px;
}

.todo-count {
  margin: 0 0 9px;
  padding-left: 2px;
  font-size: 12px;
}

.todo-list {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  background: var(--bt-surface);
  box-shadow: var(--bt-card-shadow);
}

.todo-item {
  gap: 12px;
  min-height: 68px;
  padding: 11px 14px;
  border: 0;
  border-bottom: 1px solid var(--bt-border);
  border-radius: 0;
  background: var(--bt-surface);
}
.todo-item:last-child {
  border-bottom: 0;
}
.todo-item:hover {
  background: color-mix(in srgb, var(--bt-primary) 6%, var(--bt-surface));
}
.todo-item:focus-visible {
  position: relative;
  z-index: 1;
  outline: 2px solid var(--bt-primary);
  outline-offset: -2px;
}

.todo-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.todo-title {
  font-size: 14px;
  font-weight: 650;
  line-height: 1.3;
}

.todo-title-button {
  align-self: flex-start;
  max-width: 100%;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--bt-text);
  font-family: inherit;
  text-align: left;
  white-space: nowrap;
  text-overflow: ellipsis;
  cursor: pointer;
}
.todo-title-button:hover {
  color: var(--bt-primary);
}
.todo-title-button:focus-visible {
  outline: 2px solid var(--bt-primary);
  outline-offset: 2px;
}

.todo-description {
  display: block;
  overflow: hidden;
  color: var(--bt-text-muted);
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.todo-meta {
  gap: 6px;
  margin-top: 1px;
}

.todo-state-label,
.todo-priority-badge,
.todo-category-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  text-transform: none;
}

.todo-state-label {
  background: var(--bt-surface-soft);
  color: var(--bt-text-muted);
}

.todo-status-in_progress .todo-state-label {
  background: color-mix(in srgb, var(--bt-warning) 12%, var(--bt-surface));
  color: var(--bt-warning);
}

.todo-status-done .todo-state-label {
  background: color-mix(in srgb, var(--bt-success) 12%, var(--bt-surface));
  color: var(--bt-success);
}

.todo-bulk-check-wrap {
  width: 18px;
  height: 18px;
}

.todo-bulk-check-wrap input {
  width: 18px;
  height: 18px;
}

.todo-row-chevron {
  flex: 0 0 auto;
  color: var(--bt-text-muted);
  font-size: 11px;
}

.todo-delete-btn {
  width: 30px;
  height: 30px;
  font-size: 13px;
}

.todo-item:focus-within .todo-delete-btn {
  opacity: 1;
}

.todo-group {
  margin-bottom: 22px;
}

.todo-group-header {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 8px;
  padding: 0 2px;
  border: 0;
  font-size: 14px;
}

.todo-group-count,
.notes-section-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 20px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--bt-surface-soft);
  color: var(--bt-text-muted);
  font-size: 11px;
  font-weight: 600;
}

.todo-modal-content {
  max-width: 640px;
}

#todoModal .modal-header {
  align-items: flex-start;
}

#todoModal .modal-header h2 {
  margin: 0;
}

#todoModal .modal-header p {
  margin: 4px 0 0;
  color: var(--bt-text-muted);
  font-size: 12px;
}

#todoModal .modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: var(--bt-radius);
  background: transparent;
  color: var(--bt-text-muted);
  cursor: pointer;
}

#todoModal .modal-close:hover {
  background: var(--bt-hover);
  color: var(--bt-text);
}

#noteCatModal .modal-close,
#noteTagModal .modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: var(--bt-radius);
  background: transparent;
  color: var(--bt-text-muted);
  cursor: pointer;
  font-size: 14px;
}

#noteCatModal .modal-close:hover,
#noteTagModal .modal-close:hover {
  background: var(--bt-hover);
  color: var(--bt-text);
}

.notes-page-header {
  margin-bottom: 18px;
}

.notes-page-header h1 {
  font-size: 20px;
}

.notes-header-bar {
  flex-wrap: nowrap;
}

.notes-header-bar::after {
  display: none;
}

.notes-filter-views select {
  min-width: 170px;
}

.notes-toolbar-actions {
  gap: 4px;
}

.notes-toolbar-actions .btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  background: var(--bt-surface);
  font-size: 13px;
}

.shared-notes-section,
.favorite-notes-section {
  margin: 0 0 24px;
  padding: 0;
  border: 0;
}

.notes-section-title,
.shared-notes-section .notes-section-title,
.favorite-notes-section .notes-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 9px;
  padding: 0 2px;
  border: 0;
  font-size: 14px;
  line-height: 1.4;
}

.notes-section-title .notes-section-count {
  margin-left: 2px;
}

.notes-section-title .dash-toggle-icon {
  width: 12px;
  color: var(--bt-text-muted);
  font-size: 10px;
}

.notes-grid {
  gap: 14px;
}

.notes-grid .note-card {
  min-height: 190px;
  padding: 16px;
  border-radius: 8px;
  box-shadow: var(--bt-card-shadow);
}

.notes-grid .note-card-leading {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 20px;
  margin-bottom: 11px;
}

.notes-grid .note-bulk-check-wrap,
.notes-grid .note-fav-btn {
  position: static;
}

.notes-grid .note-fav-btn {
  margin-left: auto;
}

.notes-grid .note-card-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.notes-grid .note-card-title-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.notes-grid .note-card h3 {
  margin: 0;
  font-size: 15px;
}

.notes-grid .note-card-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  color: var(--bt-text-muted);
  font-size: 12px;
}

.notes-grid .note-list-category,
.notes-grid .note-row-chevron {
  display: none;
}

.notes-grid .note-delete-btn {
  position: absolute;
  right: 12px;
  bottom: 12px;
  opacity: 0;
  font-size: 13px;
}

.notes-grid .note-card:hover .note-delete-btn,
.notes-grid .note-card:focus-within .note-delete-btn {
  opacity: 1;
}

.notes-list {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--bt-border);
  border-radius: var(--bt-radius);
  background: var(--bt-surface);
  box-shadow: var(--bt-card-shadow);
}

.notes-list .note-card {
  display: grid;
  grid-template-columns: 54px minmax(210px, 1fr) 120px minmax(140px, auto) 16px 32px;
  gap: 12px;
  align-items: center;
  min-height: 70px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--bt-border);
  border-radius: 0;
  background: var(--bt-surface);
}

.notes-list .note-card:last-child {
  border-bottom: 0;
}

.notes-list .note-card:hover {
  background: color-mix(in srgb, var(--bt-primary) 6%, var(--bt-surface));
}

.notes-list .note-card-leading {
  display: flex;
  align-items: center;
  gap: 10px;
}

.notes-list .note-fav-btn,
.notes-list .note-bulk-check-wrap {
  position: static;
  flex: 0 0 auto;
}

.notes-list .note-card-main {
  min-width: 0;
}

.notes-list .note-card-title-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.notes-list .note-card h3 {
  min-width: 0;
  margin: 0;
  font-size: 14px;
}

.notes-list .note-card h3 a {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.notes-list .note-preview {
  display: block;
  margin: 3px 0 0;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.3;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.notes-list .note-list-category {
  display: block;
  width: auto;
  overflow: hidden;
  color: var(--bt-text-muted);
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.notes-list .note-card-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  min-width: 0;
  color: var(--bt-text-muted);
  font-size: 12px;
  white-space: nowrap;
}

.notes-list .note-card-meta .note-category-badge {
  display: none;
}

.notes-list .note-author {
  max-width: 135px;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
}

.notes-list .note-row-chevron {
  color: var(--bt-text-muted);
  font-size: 10px;
}

.notes-list .note-delete-btn {
  width: 30px;
  height: 30px;
  padding: 0;
  font-size: 12px;
  opacity: 0;
}

.notes-list .note-card:hover .note-delete-btn,
.notes-list .note-card:focus-within .note-delete-btn {
  opacity: 1;
}

.notes-list .shared-note-card .note-row-chevron {
  grid-column: 6;
}

.notes-list .shared-note-card {
  border-left: 3px solid color-mix(in srgb, var(--bt-primary) 45%, var(--bt-border));
}

.note-card-num {
  font-size: 11px;
}

.note-card-meta small {
  color: var(--bt-text-muted);
  font-size: 11px;
}

.note-card-leading .note-fav-btn {
  opacity: 0.45;
}

.note-card-leading .note-fav-btn.active {
  opacity: 1;
}

.container:has(.note-edit-layout),
.container:has(.note-view-layout) {
  max-width: 1280px;
}

.note-edit-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.note-edit-title-row h1 {
  margin: 0;
}

.note-edit-page-header .note-fav-header-btn {
  flex: 0 0 auto;
}

.note-editor-card {
  margin-bottom: 0;
}

.note-editor-card > .issue-edit-field {
  margin-bottom: 16px;
}

.note-editor-card > .issue-edit-field:last-child {
  margin-bottom: 0;
}

.note-editor-card #title {
  width: 100%;
}

.note-editor-card .note-editor-md {
  min-height: 500px;
}

.note-editor-card .coremd-split-editor {
  min-height: 500px;
}

.note-editor-card .coremd-split-body {
  min-height: 440px;
}

.note-sidebar .issue-sidebar-title {
  flex: 0 0 auto;
}

.note-view-header {
  margin-bottom: 22px;
}

.note-view-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}

.note-view-main {
  min-width: 0;
}

.note-view-content-card .note-view-body {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.note-view-files-card > .issue-edit-label {
  display: block;
  margin-bottom: 14px;
  font-size: 16px;
}

.note-view-sidebar {
  position: sticky;
  top: 76px;
}

.note-view-sidebar .issue-sidebar-field {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
}

@media (max-width: 1100px) {
  .personal-filter-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .personal-filter-views {
    justify-content: flex-end;
    padding: 10px 0 0;
    border-top: 1px solid var(--bt-border);
    border-left: 0;
  }
  .notes-list .note-card {
    grid-template-columns: 54px minmax(210px, 1fr) 110px 110px 16px 32px;
  }
  .notes-list .note-card-meta > :not(small) {
    display: none;
  }
}
@media (max-width: 768px) {
  .personal-work-header {
    align-items: stretch;
    gap: 12px;
  }
  .personal-work-header .btn {
    width: 100%;
  }
  .personal-filter-primary {
    flex-wrap: wrap;
  }
  .todo-search,
  .notes-search {
    flex: 1 1 100%;
    max-width: none;
  }
  .personal-filter-primary select {
    flex: 1 1 120px;
    min-width: 0;
  }
  .personal-filter-views {
    justify-content: stretch;
  }
  .personal-filter-views select {
    flex: 1 1 0;
    min-width: 0;
  }
  .todo-filters-row {
    display: flex;
  }
  .todo-item {
    align-items: flex-start;
    gap: 9px;
  }
  .todo-row-chevron {
    display: none;
  }
  .todo-delete-btn {
    opacity: 1;
  }
  .todo-status-btn {
    margin-top: -4px;
  }
  .notes-header-bar .notes-filter-btn {
    display: inline-flex;
    flex: 0 0 auto;
    justify-content: center;
    order: initial;
  }
  .notes-header-bar .notes-search {
    order: initial;
    flex: 1 1 auto;
    min-width: 150px;
  }
  .notes-header-bar #noteCategoryFilter,
  .notes-header-bar #noteTagFilter,
  .notes-header-bar #noteSortFilter,
  .notes-header-bar #noteGroupFilter {
    display: none;
  }
  .notes-filter-views {
    flex-direction: row;
  }
  .notes-toolbar-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .notes-list .note-card {
    grid-template-columns: 48px minmax(0, 1fr) 28px;
    gap: 9px;
    min-height: 66px;
  }
  .notes-list .note-list-category,
  .notes-list .note-card-meta,
  .notes-list .note-row-chevron {
    display: none;
  }
  .notes-list .note-delete-btn {
    grid-column: 3;
    opacity: 1;
  }
  .notes-list .shared-note-card .note-row-chevron {
    display: block;
    grid-column: 3;
  }
  .notes-grid .note-delete-btn {
    opacity: 1;
  }
  .note-editor-card {
    padding: 16px;
  }
  .note-editor-card .note-editor-md,
  .note-editor-card .coremd-split-editor {
    min-height: 560px;
  }
  .note-editor-card .coremd-split-body {
    min-height: 500px;
  }
  .note-view-layout {
    grid-template-columns: 1fr;
  }
  .note-view-sidebar {
    position: static;
  }
}
@media (max-width: 520px) {
  .personal-filter-views {
    flex-wrap: wrap;
  }
  .todo-filters-row.personal-filter-views select {
    flex: 1 1 100%;
  }
  #todoModal .form-row {
    flex-direction: column;
    gap: 0;
  }
  .todo-description {
    max-width: 56vw;
  }
  .notes-grid {
    grid-template-columns: 1fr;
  }
}

/*# sourceMappingURL=style.css.map */
