@charset "UTF-8";
/* ========================================
   BLENNY DIALOGS — ToolKit popups + Bootstrap modals
   Source: Styles/blenny-dialogs.scss
   Build:  npm run build:css

   Applied automatically via blenny-dialogs.js (class .blenny-dialog)
   ======================================== */
.modal.blenny-dialog .modal-content,
.blenny-dialog.modal-content {
  background: var(--color-surface);
  color: var(--color-text);
  border: var(--blenny-shell-border-width, 1px) solid var(--color-border-default);
  border-radius: var(--blenny-surface-radius, 28px);
  box-shadow: var(--shadow-elevated);
  overflow: hidden;
}

.modal.blenny-dialog .modal-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border-subtle);
  padding: 1rem 1.25rem;
  align-items: center;
}

.modal.blenny-dialog .modal-title {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--color-text);
  margin: 0;
}

.modal.blenny-dialog .modal-header .btn-close {
  opacity: 0.55;
}

.modal.blenny-dialog .modal-header .btn-close:hover {
  opacity: 0.9;
}

.modal.blenny-dialog .modal-body {
  padding: 1rem 1.25rem 0.5rem;
  color: var(--color-text);
  background: var(--color-surface);
}

.modal.blenny-dialog .modal-footer {
  background: var(--color-canvas);
  border-top: 1px solid var(--color-border-subtle);
  padding: 0.85rem 1.25rem;
  gap: 0.5rem;
}

.modal.blenny-dialog .modal-footer .btn,
.modal.blenny-dialog .modal-footer .o-pbtn {
  border-radius: var(--blenny-cell-radius, 14px);
  font-weight: 600;
  font-size: 0.78rem;
  min-height: 2.15rem;
  padding: 0.4rem 1rem;
}

.modal.blenny-dialog .modal-footer .btn-primary,
.modal.blenny-dialog .modal-footer .kit-ok,
.modal.blenny-dialog .modal-footer .o-pbtn.btn-primary {
  background: var(--blenny-celestial);
  border-color: var(--blenny-celestial);
  color: #fff;
}

.modal.blenny-dialog .modal-footer .btn-primary:hover:not(:disabled):not(.disabled),
.modal.blenny-dialog .modal-footer .kit-ok:hover:not(:disabled):not(.disabled) {
  filter: brightness(1.05);
}

.modal.blenny-dialog .modal-footer .btn-secondary,
.modal.blenny-dialog .modal-footer .o-pbtn:not(.btn-primary):not(.kit-ok) {
  background: var(--color-surface);
  border: 1px solid var(--color-border-default);
  color: var(--color-text);
}

.modal.blenny-dialog .modal-footer .btn:disabled,
.modal.blenny-dialog .modal-footer .btn.disabled,
.modal.blenny-dialog .modal-footer .o-pbtn:disabled,
.modal.blenny-dialog .modal-footer .o-pbtn.disabled,
.modal.blenny-dialog .modal-footer .kit-ok:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  pointer-events: none;
  filter: grayscale(0.35);
}

.modal.blenny-dialog .modal-footer .blenny-dialog-busy {
  opacity: 0.7;
  cursor: wait;
  filter: grayscale(0.35);
}

.modal.blenny-dialog .modal-footer .btn-primary:disabled,
.modal.blenny-dialog .modal-footer .btn-primary.disabled,
.modal.blenny-dialog .modal-footer .btn-primary.blenny-dialog-busy,
.modal.blenny-dialog .modal-footer .kit-ok:disabled,
.modal.blenny-dialog .modal-footer .kit-ok.disabled,
.modal.blenny-dialog .modal-footer .o-pbtn.btn-primary:disabled,
.modal.blenny-dialog .modal-footer .o-pbtn.btn-primary.disabled,
.modal.blenny-dialog .modal-footer .btn-success:disabled,
.modal.blenny-dialog .modal-footer .btn-success.disabled,
.modal.blenny-dialog .modal-footer .btn-success.blenny-dialog-busy {
  background: #94a3b8 !important;
  border-color: #94a3b8 !important;
  color: #fff !important;
  filter: none;
  opacity: 0.9;
}

.blenny-dialog-form,
.modal.blenny-dialog form.form,
.modal.blenny-dialog fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.modal.blenny-dialog fieldset {
  background: transparent;
  box-shadow: none;
}

.modal.blenny-dialog .blenny-dialog-form > fieldset,
.modal.blenny-dialog form.form > fieldset {
  padding: 0.15rem 0.15rem 0.75rem;
}

.modal.blenny-dialog .form-label,
.modal.blenny-dialog fieldset .form-label,
.modal.blenny-dialog label.form-label {
  font-size: var(--blenny-type-label, 0.625rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 0.15rem;
}

.modal.blenny-dialog .form-control,
.modal.blenny-dialog .form-select,
.modal.blenny-dialog select.form-select,
.modal.blenny-dialog select.form-select-sm,
.modal.blenny-dialog textarea.form-control {
  border: 1px solid var(--color-border-default);
  border-radius: var(--blenny-cell-radius, 14px);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--blenny-type-body, 0.78rem);
  min-height: 2.15rem;
}

.modal.blenny-dialog .form-control:focus,
.modal.blenny-dialog .form-select:focus,
.modal.blenny-dialog select.form-select:focus {
  border-color: var(--blenny-celestial);
  box-shadow: 0 0 0 3px var(--blenny-celestial-soft);
}

.modal.blenny-dialog .form-control::placeholder {
  color: var(--color-text-muted);
  opacity: 0.85;
}

.modal.blenny-dialog .form-text,
.modal.blenny-dialog .form-text.text-muted,
.modal.blenny-dialog small.text-muted {
  color: var(--color-text-muted) !important;
  font-size: var(--blenny-type-body-sm, 0.6875rem);
}

.modal.blenny-dialog .text-danger,
.modal.blenny-dialog .field-validation-error,
.modal.blenny-dialog .validation-summary-errors {
  color: var(--blenny-danger) !important;
  font-size: var(--blenny-type-body-sm, 0.6875rem);
}

.modal.blenny-dialog .validation-summary-errors {
  margin: 0.5rem 0 0;
  padding: 0.65rem 0.75rem;
  border-radius: var(--blenny-cell-radius, 14px);
  background: var(--blenny-danger-soft);
  border: 1px solid var(--blenny-danger-glow);
}

.modal.blenny-dialog .row.mb-3 {
  margin-bottom: 0.85rem !important;
  align-items: center;
}

.modal.blenny-dialog .blenny-dialog-check {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-height: 2.15rem;
  margin: 0;
  padding-top: 0;
}

.modal.blenny-dialog .blenny-dialog-check .form-check-input {
  margin: 0;
  float: none;
}

.modal.blenny-dialog .blenny-dialog-check .form-check-label {
  font-size: var(--blenny-type-label, 0.625rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.modal.blenny-dialog .blenny-dialog-check .repeat-icon {
  width: 0.95rem;
  height: 0.95rem;
  opacity: 0.75;
}

.modal.blenny-dialog .custom-dropdown-wrapper > .form-select,
.modal.blenny-dialog .custom-dropdown-wrapper > div.form-select {
  border-radius: var(--blenny-cell-radius, 14px) !important;
}

.modal.blenny-dialog .custom-dropdown-list {
  background: var(--color-surface);
  border: 1px solid var(--color-border-default);
  border-radius: var(--blenny-nested-radius, 16px);
  box-shadow: var(--shadow-elevated);
}

.modal.blenny-dialog .custom-dropdown-option {
  color: var(--color-text);
}

.modal.blenny-dialog .custom-dropdown-option:hover {
  background: var(--blenny-slate-soft);
}

.modal.blenny-dialog .custom-dropdown-option.selected {
  background: var(--blenny-celestial-soft);
  color: var(--color-text);
}

html[data-theme=dark] .custom-dropdown-list.custom-dropdown-list--portal {
  background-color: var(--color-surface-warm, var(--color-surface));
  border-color: var(--color-border-hover);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.modal.blenny-dialog .alert {
  border-radius: var(--blenny-cell-radius, 14px);
  font-size: var(--blenny-type-body, 0.78rem);
}

.modal.blenny-dialog .alert-info {
  background: var(--blenny-celestial-soft);
  border-color: var(--color-border-accent);
  color: var(--color-text);
}

.modal.blenny-dialog .alert-warning {
  background: var(--blenny-cream-soft);
  border-color: var(--color-border-default);
  color: var(--color-text);
}

#confirmationModal.blenny-dialog .modal-content {
  border-radius: var(--blenny-nested-radius, 20px);
}

.blenny-bg-tasks-dialog {
  max-width: 440px;
}

.blenny-bg-tasks-modal {
  border: 1px solid var(--color-border-default);
  border-radius: var(--blenny-nested-radius, 16px);
  overflow: hidden;
  box-shadow: var(--shadow-elevated);
  background: var(--color-surface);
  color: var(--color-text);
}

.blenny-bg-tasks-body {
  padding: 1.35rem 1.35rem 1.25rem;
}

.blenny-bg-tasks-header {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  margin-bottom: 1rem;
}

.blenny-bg-tasks-icon {
  flex: 0 0 auto;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--blenny-cream);
  color: var(--blenny-slate);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.blenny-bg-tasks-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 0.25rem;
}

.blenny-bg-tasks-lead,
.blenny-bg-tasks-footnote {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin: 0;
}

.blenny-bg-tasks-footnote {
  margin-bottom: 1.1rem;
}

.blenny-bg-tasks-card {
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--blenny-cell-radius, 12px);
  background: var(--color-canvas);
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.85rem;
  max-height: 9rem;
  overflow: auto;
}

.blenny-bg-tasks-card:empty {
  display: none;
}

.blenny-bg-tasks-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.4rem 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
}

.blenny-bg-tasks-item + .blenny-bg-tasks-item {
  border-top: 1px solid var(--color-border-subtle);
}

.blenny-bg-tasks-item-icon {
  flex: 0 0 auto;
  width: 1rem;
  text-align: center;
  color: var(--blenny-celestial);
  font-size: 0.875rem;
}

.blenny-bg-tasks-heading {
  min-width: 0;
  flex: 1 1 auto;
}

.blenny-bg-tasks-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.625rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.blenny-bg-tasks-btn {
  appearance: none;
  border-radius: var(--blenny-cell-radius, 14px);
  font-weight: 600;
  font-size: 0.78rem;
  min-height: 2.15rem;
  padding: 0.4rem 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
}

.blenny-bg-tasks-btn-secondary {
  background: var(--color-surface);
  border-color: var(--color-border-default);
  color: var(--color-text);
}

.blenny-bg-tasks-btn-secondary:hover,
.blenny-bg-tasks-btn-secondary:focus {
  border-color: var(--color-border-hover);
  background: var(--color-canvas);
}

.blenny-bg-tasks-btn-primary {
  background: var(--blenny-celestial);
  border-color: var(--blenny-celestial);
  color: #fff;
}

.blenny-bg-tasks-btn-primary:hover,
.blenny-bg-tasks-btn-primary:focus {
  filter: brightness(1.05);
}

.blenny-popup-host {
  min-height: 100vh;
  background: var(--color-canvas);
  color: var(--color-text);
  padding: 0.75rem 1rem 1.25rem;
}

html[data-borders=off] .modal.blenny-dialog .modal-content {
  border-color: transparent;
}

html[data-borders=strong] .modal.blenny-dialog .modal-content {
  border-width: 2px;
  border-color: var(--color-border-default);
}

html[data-theme=dark][data-theme-scope=dashboard] .modal.blenny-dialog .modal-content,
html[data-theme=dark][data-theme-scope=dashboard] .blenny-dialog.modal-content,
html[data-theme=dark][data-theme-scope=dashboard] .blenny-bg-tasks-modal {
  background: var(--color-surface) !important;
  border-color: var(--color-border-default) !important;
  color: var(--color-text) !important;
}
html[data-theme=dark][data-theme-scope=dashboard] .modal.blenny-dialog .modal-header {
  background: var(--color-surface) !important;
  border-bottom-color: var(--color-border-subtle) !important;
}
html[data-theme=dark][data-theme-scope=dashboard] .modal.blenny-dialog .modal-title,
html[data-theme=dark][data-theme-scope=dashboard] .modal.blenny-dialog .modal-body,
html[data-theme=dark][data-theme-scope=dashboard] .blenny-bg-tasks-title {
  color: var(--color-text) !important;
}
html[data-theme=dark][data-theme-scope=dashboard] .modal.blenny-dialog .modal-body {
  background: var(--color-surface) !important;
}
html[data-theme=dark][data-theme-scope=dashboard] .modal.blenny-dialog .modal-footer {
  background: var(--color-canvas) !important;
  border-top-color: var(--color-border-subtle) !important;
}
html[data-theme=dark][data-theme-scope=dashboard] .modal.blenny-dialog .form-control,
html[data-theme=dark][data-theme-scope=dashboard] .modal.blenny-dialog .form-select,
html[data-theme=dark][data-theme-scope=dashboard] .modal.blenny-dialog select.form-select,
html[data-theme=dark][data-theme-scope=dashboard] .modal.blenny-dialog textarea.form-control {
  background: var(--color-canvas) !important;
  border-color: var(--color-border-default) !important;
  color: var(--color-text) !important;
  color-scheme: dark;
}
html[data-theme=dark][data-theme-scope=dashboard] .modal.blenny-dialog .form-control option,
html[data-theme=dark][data-theme-scope=dashboard] .modal.blenny-dialog .form-select option {
  background: var(--color-surface);
  color: var(--color-text);
}
html[data-theme=dark][data-theme-scope=dashboard] .modal.blenny-dialog .form-label,
html[data-theme=dark][data-theme-scope=dashboard] .modal.blenny-dialog label.form-label,
html[data-theme=dark][data-theme-scope=dashboard] .modal.blenny-dialog .blenny-dialog-check .form-check-label {
  color: var(--color-text-muted) !important;
}
html[data-theme=dark][data-theme-scope=dashboard] .modal.blenny-dialog .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}
html[data-theme=dark][data-theme-scope=dashboard] .modal.blenny-dialog .modal-footer .btn-secondary,
html[data-theme=dark][data-theme-scope=dashboard] .modal.blenny-dialog .modal-footer .o-pbtn:not(.btn-primary):not(.kit-ok) {
  background: var(--color-surface) !important;
  border-color: var(--color-border-default) !important;
  color: var(--color-text) !important;
}
html[data-theme=dark][data-theme-scope=dashboard] .modal.blenny-dialog .modal-footer .btn-primary:disabled,
html[data-theme=dark][data-theme-scope=dashboard] .modal.blenny-dialog .modal-footer .btn-primary.disabled,
html[data-theme=dark][data-theme-scope=dashboard] .modal.blenny-dialog .modal-footer .btn-primary.blenny-dialog-busy,
html[data-theme=dark][data-theme-scope=dashboard] .modal.blenny-dialog .modal-footer .kit-ok:disabled,
html[data-theme=dark][data-theme-scope=dashboard] .modal.blenny-dialog .modal-footer .o-pbtn.btn-primary:disabled,
html[data-theme=dark][data-theme-scope=dashboard] .modal.blenny-dialog .modal-footer .btn-success:disabled,
html[data-theme=dark][data-theme-scope=dashboard] .modal.blenny-dialog .modal-footer .btn-success.disabled {
  background: #64748b !important;
  border-color: #64748b !important;
  color: #e2e8f0 !important;
}
html[data-theme=dark][data-theme-scope=dashboard] .blenny-bg-tasks-card {
  background: var(--color-canvas);
  border-color: var(--color-border-subtle);
}
html[data-theme=dark][data-theme-scope=dashboard] .blenny-bg-tasks-icon {
  background: var(--blenny-slate-soft);
  color: var(--color-text);
}
html[data-theme=dark][data-theme-scope=dashboard] .blenny-popup-host {
  background: var(--color-canvas);
  color: var(--color-text);
}

html[data-theme=dark][data-theme-scope=account-profile] .modal.blenny-dialog .modal-content,
html[data-theme=dark][data-theme-scope=account-profile] .blenny-dialog.modal-content,
html[data-theme=dark][data-theme-scope=account-profile] .blenny-bg-tasks-modal {
  background: var(--color-surface) !important;
  border-color: var(--color-border-default) !important;
  color: var(--color-text) !important;
}
html[data-theme=dark][data-theme-scope=account-profile] .modal.blenny-dialog .modal-header {
  background: var(--color-surface) !important;
  border-bottom-color: var(--color-border-subtle) !important;
}
html[data-theme=dark][data-theme-scope=account-profile] .modal.blenny-dialog .modal-title,
html[data-theme=dark][data-theme-scope=account-profile] .modal.blenny-dialog .modal-body,
html[data-theme=dark][data-theme-scope=account-profile] .blenny-bg-tasks-title {
  color: var(--color-text) !important;
}
html[data-theme=dark][data-theme-scope=account-profile] .modal.blenny-dialog .modal-body {
  background: var(--color-surface) !important;
}
html[data-theme=dark][data-theme-scope=account-profile] .modal.blenny-dialog .modal-footer {
  background: var(--color-canvas) !important;
  border-top-color: var(--color-border-subtle) !important;
}
html[data-theme=dark][data-theme-scope=account-profile] .modal.blenny-dialog .form-control,
html[data-theme=dark][data-theme-scope=account-profile] .modal.blenny-dialog .form-select,
html[data-theme=dark][data-theme-scope=account-profile] .modal.blenny-dialog select.form-select,
html[data-theme=dark][data-theme-scope=account-profile] .modal.blenny-dialog textarea.form-control {
  background: var(--color-canvas) !important;
  border-color: var(--color-border-default) !important;
  color: var(--color-text) !important;
  color-scheme: dark;
}
html[data-theme=dark][data-theme-scope=account-profile] .modal.blenny-dialog .form-control option,
html[data-theme=dark][data-theme-scope=account-profile] .modal.blenny-dialog .form-select option {
  background: var(--color-surface);
  color: var(--color-text);
}
html[data-theme=dark][data-theme-scope=account-profile] .modal.blenny-dialog .form-label,
html[data-theme=dark][data-theme-scope=account-profile] .modal.blenny-dialog label.form-label,
html[data-theme=dark][data-theme-scope=account-profile] .modal.blenny-dialog .blenny-dialog-check .form-check-label {
  color: var(--color-text-muted) !important;
}
html[data-theme=dark][data-theme-scope=account-profile] .modal.blenny-dialog .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}
html[data-theme=dark][data-theme-scope=account-profile] .modal.blenny-dialog .modal-footer .btn-secondary,
html[data-theme=dark][data-theme-scope=account-profile] .modal.blenny-dialog .modal-footer .o-pbtn:not(.btn-primary):not(.kit-ok) {
  background: var(--color-surface) !important;
  border-color: var(--color-border-default) !important;
  color: var(--color-text) !important;
}
html[data-theme=dark][data-theme-scope=account-profile] .modal.blenny-dialog .modal-footer .btn-primary:disabled,
html[data-theme=dark][data-theme-scope=account-profile] .modal.blenny-dialog .modal-footer .btn-primary.disabled,
html[data-theme=dark][data-theme-scope=account-profile] .modal.blenny-dialog .modal-footer .btn-primary.blenny-dialog-busy,
html[data-theme=dark][data-theme-scope=account-profile] .modal.blenny-dialog .modal-footer .kit-ok:disabled,
html[data-theme=dark][data-theme-scope=account-profile] .modal.blenny-dialog .modal-footer .o-pbtn.btn-primary:disabled,
html[data-theme=dark][data-theme-scope=account-profile] .modal.blenny-dialog .modal-footer .btn-success:disabled,
html[data-theme=dark][data-theme-scope=account-profile] .modal.blenny-dialog .modal-footer .btn-success.disabled {
  background: #64748b !important;
  border-color: #64748b !important;
  color: #e2e8f0 !important;
}
html[data-theme=dark][data-theme-scope=account-profile] .blenny-bg-tasks-card {
  background: var(--color-canvas);
  border-color: var(--color-border-subtle);
}
html[data-theme=dark][data-theme-scope=account-profile] .blenny-bg-tasks-icon {
  background: var(--blenny-slate-soft);
  color: var(--color-text);
}
html[data-theme=dark][data-theme-scope=account-profile] .blenny-popup-host {
  background: var(--color-canvas);
  color: var(--color-text);
}

/* Tax directive popup: desktop dialog, stacked form, footer never covers content.
   Global .form-control-sm / .form-select use !important pill chrome — beat it here only. */
#pnlTaxDirective-amm.modal .modal-dialog,
#pnlTaxDirective-amm.modal .modal-dialog.modal-dialog-scrollable,
.tax-directive-modal .modal-dialog,
.tax-directive-modal .modal-dialog.modal-dialog-scrollable {
  max-width: 740px !important;
  width: calc(100% - 2rem);
  height: auto !important;
  max-height: 85vh !important;
  margin: 1.5rem auto;
  display: flex;
  flex-direction: column;
}

#pnlTaxDirective-amm.modal .modal-content,
.tax-directive-modal .modal-content {
  height: auto !important;
  max-height: 85vh !important;
  display: flex !important;
  flex-direction: column;
  overflow: hidden !important;
}

#pnlTaxDirective-amm.modal .modal-header,
.tax-directive-modal .modal-header {
  position: relative;
  flex: 0 0 auto;
  padding: 0.95rem 3.25rem 0.95rem 1.5rem;
}

#pnlTaxDirective-amm.modal .modal-title,
.tax-directive-modal .modal-title {
  font-size: 0.95rem !important;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.3;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.tax-directive-modal .modal-title .section-badge-testing,
#pnlTaxDirective-amm.modal .modal-title .section-badge-testing {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  background: #fff6e5;
  color: #8a5a00;
  border: 1px solid #f0c36a;
}

.tax-directive-form .feature-testing-banner {
  margin-bottom: 1.1rem;
}

#pnlTaxDirective-amm.modal .modal-header .close,
.tax-directive-modal .modal-header .close {
  position: absolute !important;
  top: 0.55rem !important;
  right: 0.7rem !important;
  width: 2rem !important;
  height: 2rem !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 1px solid var(--color-border-default) !important;
  border-radius: 8px !important;
  background: var(--color-surface) !important;
  color: var(--color-text-muted) !important;
  font-size: 1.05rem !important;
  line-height: 1 !important;
  opacity: 1 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  box-shadow: none !important;
  text-shadow: none !important;
  cursor: pointer;
}

#pnlTaxDirective-amm.modal .modal-header .close span,
.tax-directive-modal .modal-header .close span {
  font-weight: 400 !important;
  text-shadow: none !important;
  line-height: 1;
}

#pnlTaxDirective-amm.modal .modal-header .close:hover,
.tax-directive-modal .modal-header .close:hover {
  background: var(--color-canvas) !important;
  border-color: var(--color-border-hover, var(--color-border-default)) !important;
  color: var(--color-text) !important;
}

#pnlTaxDirective-amm.modal .modal-body,
.tax-directive-modal .modal-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  /* clip (not hidden) so overflow-y:auto does not compute overflow-x to auto */
  overflow-x: clip;
  overflow-y: auto !important;
  padding: 1.1rem 1.5rem 1.35rem !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 23, 42, 0.28) transparent;
}

#pnlTaxDirective-amm.modal .modal-body::-webkit-scrollbar,
.tax-directive-modal .modal-body::-webkit-scrollbar {
  width: 6px;
}

#pnlTaxDirective-amm.modal .modal-body::-webkit-scrollbar-track,
.tax-directive-modal .modal-body::-webkit-scrollbar-track {
  background: transparent;
}

#pnlTaxDirective-amm.modal .modal-body::-webkit-scrollbar-thumb,
.tax-directive-modal .modal-body::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.22);
  border-radius: 8px;
}

#pnlTaxDirective-amm.modal .modal-footer,
.tax-directive-modal .modal-footer {
  flex: 0 0 auto !important;
  position: relative !important;
  z-index: 3;
  margin: 0 !important;
  width: 100%;
  justify-content: flex-end;
  padding: 0.9rem 1.5rem !important;
  background: var(--color-canvas) !important;
  border-top: 1px solid var(--color-border-subtle) !important;
}

#pnlTaxDirective-amm.modal .form-label,
#pnlTaxDirective-amm.modal label.form-label,
#pnlTaxDirective-amm.modal .modal-content .form .form-label,
#pnlTaxDirective-amm.modal.blenny-dialog .form-label,
.tax-directive-modal .form-label,
.tax-directive-modal label.form-label,
.tax-directive-modal .modal-content .form .form-label {
  display: block;
  font-size: 0.8125rem !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  color: var(--color-text) !important;
  margin-bottom: 0.28rem !important;
}

#pnlTaxDirective-amm.modal .form-control,
#pnlTaxDirective-amm.modal .form-control-sm,
#pnlTaxDirective-amm.modal .form-select,
#pnlTaxDirective-amm.modal .form-select-sm,
#pnlTaxDirective-amm.modal select.form-select,
#pnlTaxDirective-amm.modal select.form-select-sm,
#pnlTaxDirective-amm.modal .custom-dropdown-wrapper > div.form-select,
.tax-directive-modal .form-control,
.tax-directive-modal .form-control-sm,
.tax-directive-modal .form-select,
.tax-directive-modal .form-select-sm,
.tax-directive-modal select.form-select,
.tax-directive-modal select.form-select-sm,
.tax-directive-modal .custom-dropdown-wrapper > div.form-select {
  min-height: 2.75rem !important;
  height: 2.75rem !important;
  padding-block: 0.55rem !important;
  padding-inline: 0.85rem !important;
  border: 1px solid var(--color-border-subtle, #d7dde5) !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  background-color: var(--color-surface) !important;
  color: var(--color-text) !important;
  color-scheme: light dark;
}

#pnlTaxDirective-amm.modal select.form-select,
#pnlTaxDirective-amm.modal select.form-select-sm,
#pnlTaxDirective-amm.modal .custom-dropdown-wrapper > div.form-select,
.tax-directive-modal select.form-select,
.tax-directive-modal select.form-select-sm,
.tax-directive-modal .custom-dropdown-wrapper > div.form-select {
  padding-inline: 0.85rem 2.35rem !important;
  display: flex !important;
  align-items: center;
}

.tax-directive-form {
  padding: 0;
  margin: 0;
  max-width: 100%;
  min-width: 0;
}

.tax-directive-section + .tax-directive-section {
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border-subtle);
}

.tax-directive-section-title {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 0 0 0.7rem;
}

.tax-directive-field {
  margin-bottom: 0.85rem;
  min-width: 0;
  max-width: 100%;
}

.tax-directive-field:last-child {
  margin-bottom: 0;
}

.tax-directive-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.tax-directive-hint {
  margin: 0.28rem 0 0;
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--color-text-muted);
}

.tax-directive-check {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 0.7rem;
  padding: 0;
  border: 0;
  background: transparent;
}

.tax-directive-check .form-check-input {
  margin-top: 0.15rem;
}

.tax-directive-check .form-check-label {
  font-size: 0.8125rem !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  color: var(--color-text) !important;
  line-height: 1.35;
}

html[data-theme=dark] .tax-directive-section-title {
  color: #c5d4e4;
}

html[data-theme=dark] .tax-directive-hint {
  color: #b7c6d6;
}

html[data-theme=dark] .tax-directive-modal .modal-title .section-badge-testing,
html[data-theme=dark] #pnlTaxDirective-amm.modal .modal-title .section-badge-testing,
html[data-theme=dark] .feature-testing-banner {
  background: rgba(240, 195, 106, 0.16);
  border-color: rgba(240, 195, 106, 0.4);
  color: #f5d48a;
}

html[data-theme=dark][data-theme-scope=dashboard] #pnlTaxDirective-amm.modal .modal-content,
html[data-theme=dark][data-theme-scope=dashboard] .tax-directive-modal .modal-content {
  background: var(--color-surface) !important;
  border-color: var(--color-border-hover) !important;
  color: var(--color-text) !important;
}
html[data-theme=dark][data-theme-scope=dashboard] #pnlTaxDirective-amm.modal .modal-header,
html[data-theme=dark][data-theme-scope=dashboard] .tax-directive-modal .modal-header {
  background: var(--color-surface) !important;
  border-bottom-color: var(--color-border-hover) !important;
}
html[data-theme=dark][data-theme-scope=dashboard] #pnlTaxDirective-amm.modal .modal-title,
html[data-theme=dark][data-theme-scope=dashboard] .tax-directive-modal .modal-title {
  color: var(--color-text) !important;
}
html[data-theme=dark][data-theme-scope=dashboard] #pnlTaxDirective-amm.modal .modal-header .close,
html[data-theme=dark][data-theme-scope=dashboard] .tax-directive-modal .modal-header .close {
  background: var(--color-canvas) !important;
  border-color: var(--color-border-hover) !important;
  color: var(--color-text-muted) !important;
}
html[data-theme=dark][data-theme-scope=dashboard] #pnlTaxDirective-amm.modal .modal-header .close:hover,
html[data-theme=dark][data-theme-scope=dashboard] .tax-directive-modal .modal-header .close:hover {
  background: var(--color-border-hover) !important;
  color: var(--color-text) !important;
}
html[data-theme=dark][data-theme-scope=dashboard] #pnlTaxDirective-amm.modal .modal-body,
html[data-theme=dark][data-theme-scope=dashboard] .tax-directive-modal .modal-body {
  background: var(--color-surface) !important;
  color: var(--color-text) !important;
  scrollbar-color: rgba(175, 196, 217, 0.45) transparent;
}
html[data-theme=dark][data-theme-scope=dashboard] #pnlTaxDirective-amm.modal .modal-body::-webkit-scrollbar-thumb,
html[data-theme=dark][data-theme-scope=dashboard] .tax-directive-modal .modal-body::-webkit-scrollbar-thumb {
  background: rgba(175, 196, 217, 0.4);
}
html[data-theme=dark][data-theme-scope=dashboard] #pnlTaxDirective-amm.modal .modal-footer,
html[data-theme=dark][data-theme-scope=dashboard] .tax-directive-modal .modal-footer {
  background: var(--color-canvas) !important;
  border-top-color: var(--color-border-hover) !important;
}
html[data-theme=dark][data-theme-scope=dashboard] #pnlTaxDirective-amm.modal .form-control,
html[data-theme=dark][data-theme-scope=dashboard] #pnlTaxDirective-amm.modal .form-control-sm,
html[data-theme=dark][data-theme-scope=dashboard] #pnlTaxDirective-amm.modal .form-select,
html[data-theme=dark][data-theme-scope=dashboard] #pnlTaxDirective-amm.modal .form-select-sm,
html[data-theme=dark][data-theme-scope=dashboard] #pnlTaxDirective-amm.modal select.form-select,
html[data-theme=dark][data-theme-scope=dashboard] #pnlTaxDirective-amm.modal .custom-dropdown-wrapper > div.form-select,
html[data-theme=dark][data-theme-scope=dashboard] .tax-directive-modal .form-control,
html[data-theme=dark][data-theme-scope=dashboard] .tax-directive-modal .form-select,
html[data-theme=dark][data-theme-scope=dashboard] .tax-directive-modal .custom-dropdown-wrapper > div.form-select {
  background-color: var(--color-canvas) !important;
  border-color: var(--color-border-hover) !important;
  color: var(--color-text) !important;
  color-scheme: dark;
}
html[data-theme=dark][data-theme-scope=dashboard] #pnlTaxDirective-amm.modal .custom-dropdown-wrapper > div.form-select,
html[data-theme=dark][data-theme-scope=dashboard] .tax-directive-modal .custom-dropdown-wrapper > div.form-select {
  background-image: var(--blenny-select-caret) !important;
  background-repeat: no-repeat !important;
  background-position: right 0.75rem center !important;
  background-size: 16px 12px !important;
}
html[data-theme=dark][data-theme-scope=dashboard] #pnlTaxDirective-amm.modal .form-control::placeholder,
html[data-theme=dark][data-theme-scope=dashboard] .tax-directive-modal .form-control::placeholder {
  color: var(--color-text-muted) !important;
  opacity: 1;
}
html[data-theme=dark][data-theme-scope=dashboard] #pnlTaxDirective-amm.modal .form-check-input,
html[data-theme=dark][data-theme-scope=dashboard] .tax-directive-modal .form-check-input {
  background-color: var(--color-canvas);
  border-color: var(--color-border-hover);
}
html[data-theme=dark][data-theme-scope=dashboard] .tax-directive-section + .tax-directive-section {
  border-top-color: var(--color-border-hover);
}
html[data-theme=dark][data-theme-scope=dashboard] .ui-datepicker {
  background: var(--color-surface) !important;
  border-color: var(--color-border-hover) !important;
  color: var(--color-text) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45) !important;
}
html[data-theme=dark][data-theme-scope=dashboard] .ui-datepicker-title {
  color: var(--color-text) !important;
}
html[data-theme=dark][data-theme-scope=dashboard] .ui-datepicker-calendar thead th {
  color: var(--color-text-muted) !important;
}
html[data-theme=dark][data-theme-scope=dashboard] .ui-datepicker-calendar td a,
html[data-theme=dark][data-theme-scope=dashboard] .ui-datepicker-calendar td span {
  color: var(--color-text) !important;
  background: transparent !important;
}
html[data-theme=dark][data-theme-scope=dashboard] .ui-datepicker-calendar td a:hover {
  background: var(--blenny-celestial-soft) !important;
  color: var(--color-text) !important;
}
html[data-theme=dark][data-theme-scope=dashboard] .ui-datepicker-calendar .ui-state-active {
  background: var(--blenny-celestial) !important;
  color: #fff !important;
}

html[data-theme=dark][data-theme-scope=account-profile] #pnlTaxDirective-amm.modal .modal-content,
html[data-theme=dark][data-theme-scope=account-profile] .tax-directive-modal .modal-content {
  background: var(--color-surface) !important;
  border-color: var(--color-border-hover) !important;
  color: var(--color-text) !important;
}
html[data-theme=dark][data-theme-scope=account-profile] #pnlTaxDirective-amm.modal .modal-header,
html[data-theme=dark][data-theme-scope=account-profile] .tax-directive-modal .modal-header {
  background: var(--color-surface) !important;
  border-bottom-color: var(--color-border-hover) !important;
}
html[data-theme=dark][data-theme-scope=account-profile] #pnlTaxDirective-amm.modal .modal-title,
html[data-theme=dark][data-theme-scope=account-profile] .tax-directive-modal .modal-title {
  color: var(--color-text) !important;
}
html[data-theme=dark][data-theme-scope=account-profile] #pnlTaxDirective-amm.modal .modal-header .close,
html[data-theme=dark][data-theme-scope=account-profile] .tax-directive-modal .modal-header .close {
  background: var(--color-canvas) !important;
  border-color: var(--color-border-hover) !important;
  color: var(--color-text-muted) !important;
}
html[data-theme=dark][data-theme-scope=account-profile] #pnlTaxDirective-amm.modal .modal-header .close:hover,
html[data-theme=dark][data-theme-scope=account-profile] .tax-directive-modal .modal-header .close:hover {
  background: var(--color-border-hover) !important;
  color: var(--color-text) !important;
}
html[data-theme=dark][data-theme-scope=account-profile] #pnlTaxDirective-amm.modal .modal-body,
html[data-theme=dark][data-theme-scope=account-profile] .tax-directive-modal .modal-body {
  background: var(--color-surface) !important;
  color: var(--color-text) !important;
  scrollbar-color: rgba(175, 196, 217, 0.45) transparent;
}
html[data-theme=dark][data-theme-scope=account-profile] #pnlTaxDirective-amm.modal .modal-body::-webkit-scrollbar-thumb,
html[data-theme=dark][data-theme-scope=account-profile] .tax-directive-modal .modal-body::-webkit-scrollbar-thumb {
  background: rgba(175, 196, 217, 0.4);
}
html[data-theme=dark][data-theme-scope=account-profile] #pnlTaxDirective-amm.modal .modal-footer,
html[data-theme=dark][data-theme-scope=account-profile] .tax-directive-modal .modal-footer {
  background: var(--color-canvas) !important;
  border-top-color: var(--color-border-hover) !important;
}
html[data-theme=dark][data-theme-scope=account-profile] #pnlTaxDirective-amm.modal .form-control,
html[data-theme=dark][data-theme-scope=account-profile] #pnlTaxDirective-amm.modal .form-control-sm,
html[data-theme=dark][data-theme-scope=account-profile] #pnlTaxDirective-amm.modal .form-select,
html[data-theme=dark][data-theme-scope=account-profile] #pnlTaxDirective-amm.modal .form-select-sm,
html[data-theme=dark][data-theme-scope=account-profile] #pnlTaxDirective-amm.modal select.form-select,
html[data-theme=dark][data-theme-scope=account-profile] #pnlTaxDirective-amm.modal .custom-dropdown-wrapper > div.form-select,
html[data-theme=dark][data-theme-scope=account-profile] .tax-directive-modal .form-control,
html[data-theme=dark][data-theme-scope=account-profile] .tax-directive-modal .form-select,
html[data-theme=dark][data-theme-scope=account-profile] .tax-directive-modal .custom-dropdown-wrapper > div.form-select {
  background-color: var(--color-canvas) !important;
  border-color: var(--color-border-hover) !important;
  color: var(--color-text) !important;
  color-scheme: dark;
}
html[data-theme=dark][data-theme-scope=account-profile] #pnlTaxDirective-amm.modal .custom-dropdown-wrapper > div.form-select,
html[data-theme=dark][data-theme-scope=account-profile] .tax-directive-modal .custom-dropdown-wrapper > div.form-select {
  background-image: var(--blenny-select-caret) !important;
  background-repeat: no-repeat !important;
  background-position: right 0.75rem center !important;
  background-size: 16px 12px !important;
}
html[data-theme=dark][data-theme-scope=account-profile] #pnlTaxDirective-amm.modal .form-control::placeholder,
html[data-theme=dark][data-theme-scope=account-profile] .tax-directive-modal .form-control::placeholder {
  color: var(--color-text-muted) !important;
  opacity: 1;
}
html[data-theme=dark][data-theme-scope=account-profile] #pnlTaxDirective-amm.modal .form-check-input,
html[data-theme=dark][data-theme-scope=account-profile] .tax-directive-modal .form-check-input {
  background-color: var(--color-canvas);
  border-color: var(--color-border-hover);
}
html[data-theme=dark][data-theme-scope=account-profile] .tax-directive-section + .tax-directive-section {
  border-top-color: var(--color-border-hover);
}
html[data-theme=dark][data-theme-scope=account-profile] .ui-datepicker {
  background: var(--color-surface) !important;
  border-color: var(--color-border-hover) !important;
  color: var(--color-text) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45) !important;
}
html[data-theme=dark][data-theme-scope=account-profile] .ui-datepicker-title {
  color: var(--color-text) !important;
}
html[data-theme=dark][data-theme-scope=account-profile] .ui-datepicker-calendar thead th {
  color: var(--color-text-muted) !important;
}
html[data-theme=dark][data-theme-scope=account-profile] .ui-datepicker-calendar td a,
html[data-theme=dark][data-theme-scope=account-profile] .ui-datepicker-calendar td span {
  color: var(--color-text) !important;
  background: transparent !important;
}
html[data-theme=dark][data-theme-scope=account-profile] .ui-datepicker-calendar td a:hover {
  background: var(--blenny-celestial-soft) !important;
  color: var(--color-text) !important;
}
html[data-theme=dark][data-theme-scope=account-profile] .ui-datepicker-calendar .ui-state-active {
  background: var(--blenny-celestial) !important;
  color: #fff !important;
}

@media (max-width: 640px) {
  .tax-directive-field-row {
    grid-template-columns: 1fr;
  }
}
