.navbar-text {
  font-weight: 600;
}

.ac-empty-state {
  border: 1px dashed #d9e2e9;
  border-radius: 0.65rem;
  background: #f8fbfd;
  color: #607080;
  text-align: center;
  padding: 1rem 0.85rem;
  font-size: 0.88rem;
}

.ac-empty-state--table {
  margin: 0.75rem;
}

.ac-truncate-260 {
  max-width: 260px;
}

.ac-pre-scroll {
  max-height: 320px;
  overflow: auto;
  white-space: pre-wrap;
}

.ac-pre-scroll--sm {
  max-height: 300px;
  overflow-y: auto;
  white-space: pre-wrap;
}

.ac-image-thumb-card {
  background: #fff;
}

.ac-image-thumb {
  max-height: 140px;
}

.ac-break-all {
  word-break: break-all;
}

.ac-toast {
  position: fixed;
  right: 24px;
  top: 24px;
  min-width: 320px;
  max-width: min(560px, calc(100vw - 2rem));
  padding: 0.7rem 0.85rem;
  border-radius: 0.6rem;
  font-size: 0.9rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.2);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1050;
  pointer-events: auto;
}

.ac-toast__body {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.ac-toast__message {
  flex: 1;
  line-height: 1.35;
}

.ac-toast__close {
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0;
  margin: 0;
  cursor: pointer;
  opacity: 0.8;
}

.ac-toast__close:hover {
  opacity: 1;
}

.ac-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.ac-toast--success {
  background-color: #d1fae5;
  color: #0f5132;
  border: 1px solid #34d399;
}

.ac-toast--error {
  background-color: #fee2e2;
  color: #842029;
  border: 1px solid #f87171;
}

.ac-toast--warning {
  background-color: #fef3c7;
  color: #7c2d12;
  border: 1px solid #f59e0b;
}

.ac-wizard__steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

@media (max-width: 767.98px) {
  .ac-wizard {
    padding: 0.1rem;
  }

  .ac-wizard__steps {
    gap: 0.35rem;
    margin-bottom: 0.75rem;
  }

  .ac-wizard__step {
    padding: 0.28rem 0.62rem;
    font-size: 0.74rem;
    line-height: 1.2;
  }

  .ac-wizard__panel {
    margin-top: 0.75rem;
  }

  .ac-wizard__panel .row {
    row-gap: 0.7rem;
  }

  .ac-wizard__panel .form-row {
    row-gap: 0.5rem;
  }

  .ac-wizard__panel .form-row .col-auto {
    margin-top: 0.1rem;
  }

  .ac-wizard__panel .mt-3 {
    margin-top: 0.9rem !important;
  }

  .ac-select-card,
  .ac-format-card,
  .ac-result-card,
  .ac-progress-card,
  .ac-preview-block,
  .ac-generation-panel {
    margin-bottom: 0.7rem;
  }

  .ac-usecase-card {
    align-items: flex-start;
  }

  .ac-usecase-card h5 {
    margin-bottom: 0.2rem;
    font-size: 1rem;
  }

  .ac-usecase-card p {
    margin-bottom: 0;
  }

  .ac-image-options {
    gap: 0.6rem;
    padding: 0.75rem;
  }

  .ac-channel-preview {
    gap: 0.7rem;
    margin-bottom: 0.8rem;
  }
}
.ac-wizard__step {
  border-radius: 999px;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-color: #cbd5f5;
  color: #1e3a8a;
  background: #f8fafc;
}

.ac-wizard__step.btn-outline-primary:not(:disabled):hover,
.ac-wizard__step.btn-outline-primary:not(.disabled):hover {
  background-color: #1e3a8a;
  border-color: #1e3a8a;
  color: #ffffff;
}

.ac-wizard__step.is-active {
  background-color: #1e3a8a;
  color: #fff;
  border-color: #1e3a8a;
}

.ac-wizard__step:disabled {
  opacity: 1;
  color: #94a3b8;
  background: #f1f5f9;
  border-color: #dbe4f2;
  cursor: not-allowed;
}

.ac-wizard__step:disabled:hover,
.ac-wizard__step.disabled:hover {
  color: #94a3b8;
  background: #f1f5f9;
  border-color: #dbe4f2;
}

.ac-wizard__panel {
  margin-top: 1rem;
}

.ac-wizard__panel .text-muted {
  margin-top: 1rem;
}

.ac-refine-checks .ac-checkbox-label .text-muted {
  margin-top: 0;
}

.ac-wizard__panel h4 {
  margin-top: 1rem;
}

.ac-article-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
  background-color: #fff;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.ac-article-row:hover {
  border-color: #cbd5f5;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.ac-article-row.is-selected {
  border-color: #1e3a8a;
  box-shadow: 0 0 0 1px #1e3a8a;
  background-color: rgba(30, 58, 138, 0.05);
}

.ac-select-card {
  cursor: pointer;
  border: 1px solid #e5e7eb;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  min-height: 140px;
  display: flex;
  align-items: stretch;
  height: 100%;
  border-radius: 0.75rem;
  background: #fff;
}

.ac-select-card .card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

.ac-usecase-card {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.ac-usecase-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(30, 58, 138, 0.1);
  color: #1e3a8a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.ac-select-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.ac-select-card:focus-visible,
.ac-select-card:focus-within {
  outline: 0;
  border-color: #1e3a8a;
  box-shadow: 0 0 0 2px rgba(30, 58, 138, 0.18), 0 8px 20px rgba(15, 23, 42, 0.08);
}

.ac-select-card.is-selected {
  border-color: #1e3a8a;
  box-shadow: 0 0 0 1px #1e3a8a;
}

.ac-format-card {
  display: block;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1rem;
  min-height: 140px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  background-color: #fff;
  position: relative;
  height: 100%;
  border-radius: 0.9rem;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.ac-format-card:focus-within {
  border-color: #1e3a8a;
  box-shadow: 0 0 0 2px rgba(30, 58, 138, 0.16), 0 4px 14px rgba(15, 23, 42, 0.06);
}

.ac-article-row:focus-visible {
  outline: 0;
  border-color: #1e3a8a;
  box-shadow: 0 0 0 2px rgba(30, 58, 138, 0.16), 0 6px 18px rgba(15, 23, 42, 0.08);
}

.ac-image-options {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  border: 1px solid #dbe4f2;
  border-radius: 0.9rem;
  background: #f8fafc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.ac-image-options__header {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e2e8f0;
}

.ac-image-options__title {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 700;
  color: #0f172a;
}

.ac-image-options__subtitle {
  margin: 0;
  font-size: 0.82rem;
  color: #64748b;
}

.ac-image-options__grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.25fr) minmax(220px, 0.95fr);
  gap: 0.9rem 1rem;
  align-items: start;
}

.ac-image-options__left {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  justify-self: stretch;
}

@media (max-width: 992px) {
  .ac-image-options__grid {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}

.ac-image-options__toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: #0f172a;
  margin: 0;
  cursor: pointer;
  justify-self: stretch;
  min-height: 44px;
}

.ac-image-options__toggle span,
.ac-image-options__compare span {
  line-height: 1.2;
  display: inline-block;
}

.ac-image-options__toggle .form-check-input {
  margin-top: 0;
}

.ac-version-controls {
  margin-top: 0.75rem;
}

.ac-version-controls.card {
  border: 1px solid #dbe3f1;
  border-radius: 0.75rem;
  background: #f8fafc;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.ac-version-controls h6 {
  font-weight: 700;
  color: #1f2937;
}

.ac-version-controls__row .btn {
  min-width: 122px;
}

.ac-version-controls__prompts details {
  margin-top: 0.55rem;
  border-top: 1px solid #e2e8f0;
  padding-top: 0.5rem;
}

.ac-version-controls__prompts summary {
  cursor: pointer;
  font-weight: 600;
}

.ac-refine-block {
  margin-top: 1rem;
  padding: 0.9rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.65rem;
  background: #f8fafc;
}

.ac-refine-block h6 {
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.ac-unstructured-warning {
  margin: 0.35rem 0 0.8rem;
  color: #92400e;
  font-size: 0.82rem;
  line-height: 1.35;
}

.ac-refine-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 0.75rem;
}

.ac-refine-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.6rem;
  padding: 0.75rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.ac-refine-card__title {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 0.5rem;
}

.ac-refine-checks {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.ac-refine-ratios {
  margin-top: 0.5rem;
}

.ac-refine-options {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.35rem;
}

.ac-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
}

.ac-refine-options label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 500;
  color: #334155;
}

.ac-refine-block input[type="checkbox"] {
  width: 18px;
  height: 18px;
  transform: scale(1.15);
  transform-origin: center;
  margin: 0;
}

.ac-slide-edit {
  border-bottom: 1px dashed #e2e8f0;
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
}

.ac-slide-edit:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.ac-checkbox-cell {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 38px;
}

.ac-checkbox-lg {
  width: 18px;
  height: 18px;
  transform: scale(1.2);
  transform-origin: center;
}

.ac-image-preview {
  display: block;
  border-radius: 6px;
}

.ac-image-preview-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  background: #f1f5f9;
  min-height: 44px;
}

.ac-image-preview--loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(241, 245, 249, 0.8), rgba(226, 232, 240, 0.9), rgba(241, 245, 249, 0.8));
  animation: ac-shimmer 1.2s infinite;
}

@keyframes ac-shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.ac-image-options__style {
  min-width: 180px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  justify-self: stretch;
}

.ac-image-options__mode {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 220px;
}

.ac-image-options__label {
  font-size: 0.8rem;
  color: #475569;
  font-weight: 600;
  margin: 0;
  letter-spacing: 0.01em;
}

.ac-image-options__label--emphasis {
  font-size: 0.95rem;
  color: #334155;
}

.ac-image-options__templates {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  padding-left: 1.7rem;
}

#canva-template-selectors {
  display: grid;
  gap: 0.55rem;
}

.ac-image-options__template-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.ac-image-options__template-item .form-control {
  width: 100%;
}

.ac-image-options__compare {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  color: #334155;
  margin: 0;
  cursor: pointer;
  justify-self: start;
  grid-column: 1 / -1;
}

.ac-image-options__compare .form-check-input {
  margin-top: 0;
}

.ac-image-options__toggle,
.ac-image-options__compare {
  min-height: 44px;
}

.ac-image-options .form-check-input {
  width: 18px;
  height: 18px;
  margin: 0;
  flex: 0 0 auto;
  position: relative;
  top: 0;
}

.ac-wizard input[type="checkbox"] {
  width: 18px;
  height: 18px;
  transform: scale(1.2);
  transform-origin: center;
}

.ac-image-options__style select.form-control {
  height: 42px;
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
  min-width: 220px;
}

.ac-image-options__templates select.form-control {
  height: 42px;
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
  min-width: 220px;
}

.ac-image-options__mode select.form-control {
  height: 42px;
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
  min-width: 220px;
}

.ac-image-options__style .form-control {
  border-radius: 0.55rem;
  border-color: #cbd5e1;
}

.ac-image-options__templates .form-control {
  border-radius: 0.55rem;
  border-color: #cbd5e1;
}

.ac-image-options__mode .form-control {
  border-radius: 0.55rem;
  border-color: #cbd5e1;
}

.ac-image-options .form-control:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 0.16rem rgba(59, 130, 246, 0.16);
}

.ac-status-badge {
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  font-weight: 600;
}

.ac-status--tagged {
  background: rgba(16, 185, 129, 0.15);
  color: #0f766e;
}

.ac-status--fresh {
  background: rgba(59, 130, 246, 0.15);
  color: #1d4ed8;
}

.ac-status--changed {
  background: rgba(251, 146, 60, 0.2);
  color: #c2410c;
}

.ac-status--stale {
  background: rgba(239, 68, 68, 0.18);
  color: #b91c1c;
}

.ac-status--parsed,
.ac-status--fetched,
.ac-status--discovered {
  background: rgba(148, 163, 184, 0.2);
  color: #475569;
}

.ac-status--generated {
  background: rgba(16, 185, 129, 0.2);
  color: #0f766e;
}

.ac-generation-panel {
  border: 1px solid #e5e7eb;
  border-radius: 0.6rem;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
  background: #f8fafc;
}

.ac-generation-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.35rem 0;
  border-bottom: 1px dashed #e2e8f0;
}

.ac-asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.75rem;
  margin-top: 0.5rem;
  align-items: start;
  justify-items: start;
}

.ac-asset-item {
  border: 1px solid #e2e8f0;
  border-radius: 0.6rem;
  padding: 0.5rem;
  background: #fff;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  align-self: start;
}

.ac-asset-item img {
  width: 100%;
  max-width: 420px;
  height: auto;
  display: block;
  border-radius: 0.4rem;
  margin: 0 auto 0.4rem;
}

.ac-asset-item video,
.ac-asset-item .ac-asset-item__video {
  width: 100%;
  max-width: 420px;
  height: auto;
  display: block;
  border-radius: 0.4rem;
  margin: 0 auto 0.4rem;
  background: #000;
}

.ac-version-images-layout {
  display: grid;
  grid-template-columns: minmax(320px, 1.25fr) minmax(320px, 1fr);
  gap: 0.9rem;
  margin-top: 0.5rem;
  align-items: start;
}

.ac-version-images-layout__history {
  border-left: 1px dashed #dbe4f0;
  padding-left: 0.75rem;
}

.ac-version-images-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 0.45rem;
}

.ac-asset-item--selected {
  border-color: #cbd5f5;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.ac-version-thumb-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 0.55rem;
}

.ac-version-thumb-item {
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.4rem;
  background: #fff;
}

.ac-version-thumb-item__label {
  font-size: 0.72rem;
  color: #64748b;
  margin-bottom: 0.3rem;
}

.ac-version-thumb-item img {
  width: 100%;
  height: auto;
  border-radius: 0.4rem;
  display: block;
}

.ac-version-thumb-item video,
.ac-version-thumb-item .ac-version-thumb-item__video {
  width: 100%;
  height: auto;
  border-radius: 0.4rem;
  display: block;
  background: #000;
}

.ac-version-thumb-item__carousel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
}

.ac-version-thumb-item__carousel img {
  width: 100%;
  height: auto;
  border-radius: 0.35rem;
  display: block;
}

.ac-version-thumb-item__carousel video,
.ac-version-thumb-item__carousel .ac-version-thumb-item__video {
  width: 100%;
  height: auto;
  border-radius: 0.35rem;
  display: block;
  background: #000;
}

@media (max-width: 1280px) {
  .ac-version-images-layout {
    grid-template-columns: minmax(300px, 1.2fr) minmax(280px, 1fr);
  }

  .ac-version-thumb-list {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }
}

.ac-channel-preview {
  display: grid;
  grid-template-columns: minmax(240px, 360px) 1fr;
  gap: 1rem;
  align-items: start;
  margin-bottom: 1rem;
}

.ac-channel-preview__media {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ac-channel-preview__ratio {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.ac-channel-preview__image {
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 0.5rem;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  min-height: 220px;
}

.ac-channel-preview__image-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 0.16rem 0.5rem;
  width: fit-content;
  margin-bottom: 0.4rem;
}

.ac-channel-preview__image img {
  width: 100%;
  height: auto;
  border-radius: 0.6rem;
}

.ac-channel-preview__image--story {
  min-height: 320px;
}

.ac-channel-preview__image--email {
  min-height: 160px;
}

.ac-channel-preview__actions {
  display: flex;
  gap: 0.5rem;
}

.ac-channel-preview__copy .ac-preview-block {
  margin-bottom: 0.75rem;
}

.ac-preview-placeholder {
  width: 100%;
  border: 1px dashed #cbd5f5;
  border-radius: 0.6rem;
  background: #f8fafc;
  padding: 1rem;
  text-align: center;
  color: #475569;
}

.ac-preview-placeholder__label {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

@media (max-width: 992px) {
  .ac-channel-preview {
    grid-template-columns: 1fr;
  }

  .ac-version-images-layout {
    grid-template-columns: 1fr;
  }

  .ac-version-images-layout__history {
    border-left: none;
    border-top: 1px dashed #dbe4f0;
    padding-left: 0;
    padding-top: 0.65rem;
  }

  .ac-version-thumb-list {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }
}

@media (max-width: 640px) {
  .ac-version-thumb-list {
    grid-template-columns: 1fr;
  }
}

.ac-asset-placeholder {
  background: #f8fafc;
  border: 1px dashed #cbd5f5;
  color: #475569;
  min-height: 220px;
  justify-content: center;
}

.ac-asset-placeholder__box {
  width: 100%;
  max-width: 420px;
  border-radius: 0.5rem;
  border: 1px dashed #cbd5f5;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: #64748b;
}

.ac-asset-placeholder__box--1-1 {
  aspect-ratio: 1 / 1;
}

.ac-asset-placeholder__box--4-5 {
  aspect-ratio: 4 / 5;
}

.ac-asset-placeholder__box--9-16 {
  aspect-ratio: 9 / 16;
}

.ac-asset-placeholder__box--2-3 {
  aspect-ratio: 2 / 3;
}

.ac-asset-placeholder__box--3-2 {
  aspect-ratio: 3 / 2;
}

.ac-carousel-image {
  display: flex;
  justify-content: center;
}

.ac-carousel-image img {
  width: 100%;
  max-width: 420px;
  height: auto;
  display: block;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
}

.ac-carousel-controls {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.ac-loading {
  position: relative;
  opacity: 0.75;
  pointer-events: none;
}

.ac-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.62);
  border-radius: 0.5rem;
}

.ac-loading::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1.2rem;
  height: 1.2rem;
  margin-left: -0.6rem;
  margin-top: -0.6rem;
  border-radius: 50%;
  border: 2px solid rgba(0, 136, 188, 0.22);
  border-top-color: #0088bc;
  animation: ac-spin 0.7s linear infinite;
  z-index: 2;
}

.ac-loading-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #64748b;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.ac-loading-indicator::before,
.ac-inline-spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(100, 116, 139, 0.3);
  border-top-color: rgba(59, 130, 246, 0.9);
  animation: ac-spin 0.8s linear infinite;
  display: inline-block;
}

.ac-loading-indicator::before {
  content: "";
}

.ac-inline-spinner {
  margin-right: 0.35rem;
}

@keyframes ac-spin {
  to {
    transform: rotate(360deg);
  }
}

.ac-preview-text {
  white-space: normal;
  line-height: 1.5;
}

.ac-preview-block .ac-preview-text + .btn,
.ac-preview-block .ac-generation-taglist + .btn {
  margin-top: 0.65rem;
}

.ac-preview-block .ac-generation-taglist {
  margin-top: 0.15rem;
}

.ac-carousel-slide {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ac-login {
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.04), rgba(15, 23, 42, 0.02)),
    linear-gradient(135deg, #eef2ff, #f8fafc 55%, #eef7f9);
}

.ac-login__shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
  gap: 1.5rem;
}

.ac-login__brand {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ac-login__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ac-login__logo-img {
  width: auto;
  max-width: min(78vw, 300px);
  display: block;
}

.ac-login__tagline {
  color: #64748b;
  margin-bottom: 0;
}

@media (max-width: 575.98px) {
  .ac-login__logo-img {
  }
}

.ac-login__card {
  width: 100%;
  max-width: 420px;
  border: none;
  border-radius: 1rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.ac-login__header {
  margin-bottom: 1.25rem;
  text-align: left;
}

.ac-login__title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: #0f172a;
}

.ac-login__subtitle {
  color: #64748b;
  margin-bottom: 0;
}

.ac-login__label {
  font-weight: 600;
  color: #1f2937;
}

.ac-login__submit {
  margin-top: 0.5rem;
  font-weight: 600;
}

.ac-login__help {
  margin-top: 1rem;
  font-size: 0.85rem;
}

.ac-article-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.ac-article-divider {
  width: 1px;
  height: 18px;
  background: #e2e8f0;
  margin: 0 0.25rem;
}

.ac-generation-preview {
  border: 1px solid #e5e7eb;
  border-radius: 0.6rem;
  padding: 0.75rem;
  margin-top: 0.5rem;
  background: #fff;
}

.ac-generation-preview h6 {
  margin-bottom: 0.35rem;
}

.ac-generation-taglist {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.ac-generation-tag {
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
}

.ac-hashtag-editor .ac-generation-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.ac-generation-tag__remove {
  border: 0;
  background: transparent;
  color: inherit;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  font-size: 0.8rem;
  width: 1rem;
  height: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ac-generation-tag__remove:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
  border-radius: 999px;
}

@media (max-width: 767.98px) {
  .ac-generation-taglist {
    gap: 0.4rem;
  }

  .ac-generation-tag {
    font-size: 0.72rem;
    line-height: 1.25;
    padding: 0.2rem 0.5rem;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .ac-hashtag-editor [data-hashtag-input] {
    min-width: 0;
  }

  .ac-hashtag-editor .input-group-append .btn {
    padding-left: 0.7rem;
    padding-right: 0.7rem;
  }
}

@media (max-width: 479.98px) {
  .ac-hashtag-editor .input-group {
    flex-wrap: wrap;
  }

  .ac-hashtag-editor .input-group-append {
    width: 100%;
    margin-top: 0.4rem;
  }

  .ac-hashtag-editor .input-group-append .btn {
    width: 100%;
  }
}

@media (max-width: 390px) {
  .ac-channel-preview {
    gap: 0.6rem;
  }

  .ac-channel-preview__image {
    min-height: 180px;
    padding: 0.4rem;
  }

  .ac-channel-preview__image--story {
    min-height: 260px;
  }

  .ac-channel-preview__ratio {
    gap: 0.3rem;
  }

  .ac-channel-preview__ratio .btn {
    padding: 0.28rem 0.55rem;
    font-size: 0.74rem;
  }

  .ac-channel-preview__actions {
    display: grid;
    gap: 0.4rem;
  }

  .ac-channel-preview__actions .btn {
    width: 100%;
  }

  .ac-preview-header {
    align-items: flex-start;
    gap: 0.35rem;
    flex-wrap: wrap;
  }

  .ac-preview-header .text-muted {
    font-size: 0.78rem;
  }

  .ac-preview-text {
    line-height: 1.45;
  }

  .ac-preview-block .btn {
    width: 100%;
  }
}

@media (max-width: 375px) {
  .ac-wizard__steps {
    gap: 0.3rem;
  }

  .ac-wizard__step {
    padding: 0.24rem 0.5rem;
    font-size: 0.7rem;
  }

  .ac-channel-preview__copy .ac-preview-block {
    margin-bottom: 0.6rem;
  }

  .ac-preview-block {
    padding: 0.65rem;
  }

  .ac-generation-tag {
    font-size: 0.7rem;
    padding: 0.18rem 0.45rem;
  }
}

.ac-generation-item:last-child {
  border-bottom: none;
}

.ac-generation-json {
  background: #0f172a;
  color: #e2e8f0;
  padding: 0.6rem;
  border-radius: 0.4rem;
  font-size: 0.85rem;
  overflow-x: auto;
}

.ac-prompt-preview {
  background: #0f172a;
  color: #e2e8f0;
  padding: 0.75rem;
  border-radius: 0.5rem;
  white-space: pre-wrap;
  font-size: 0.85rem;
}

.ac-format-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ac-format-card__content {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.ac-format-card__icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(30, 58, 138, 0.1);
  color: #1e3a8a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.ac-format-card h5 {
  margin-bottom: 0.25rem;
}

.ac-format-card p {
  margin-bottom: 0;
  color: #64748b;
  font-size: 0.9rem;
}

.ac-format-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.ac-format-card.is-selected {
  border-color: #1e3a8a;
  box-shadow: 0 0 0 1px #1e3a8a;
}

.ac-format-card.is-selected .ac-format-card__icon {
  background: #1e3a8a;
  color: #fff;
}

.ac-format-card.is-selected h5 {
  color: #1e3a8a;
}

.ac-result-card {
  border-radius: 0.9rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  border: 1px solid #e5e7eb;
}

.ac-preview-block {
  background: #fff;
  box-shadow: inset 0 0 0 1px #eef2ff;
}

/* Button polish */
.btn {
  border-radius: 0.6rem;
  font-weight: 600;
  padding: 0.45rem 0.95rem;
  box-shadow: none;
}

.btn-primary {
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  border: none;
}

.btn-primary:hover {
  filter: brightness(0.98);
}

.btn-outline-primary {
  color: #1e3a8a;
  border-color: #cbd5f5;
}

.btn-outline-primary:hover {
  background: #1e3a8a;
  border-color: #1e3a8a;
  color: #ffffff;
}

.btn-outline-secondary {
  border-color: #cbd5f5;
  color: #475569;
}

.btn-outline-secondary:hover {
  background: #e2e8f0;
  border-color: #cbd5f5;
  color: #334155;
}

.btn-outline-danger:hover {
  color: #ffffff;
}

.btn-outline-primary:disabled,
.btn-outline-secondary:disabled,
.btn-outline-danger:disabled,
.btn-outline-primary.disabled,
.btn-outline-secondary.disabled,
.btn-outline-danger.disabled {
  opacity: 1;
}

.btn-outline-primary:disabled:hover,
.btn-outline-primary.disabled:hover {
  background: transparent;
  border-color: #cbd5f5;
  color: #94a3b8;
}

.btn-outline-secondary:disabled:hover,
.btn-outline-secondary.disabled:hover {
  background: transparent;
  border-color: #dbe4f2;
  color: #94a3b8;
}

.btn-outline-danger:disabled:hover,
.btn-outline-danger.disabled:hover {
  background: transparent;
  border-color: #f5c2c7;
  color: #94a3b8;
}

.ac-progress-card {
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
}

.ac-result-card {
  margin-bottom: 1rem;
}

.ac-preview-block {
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
}

.ac-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.ac-email-body {
  background-color: #f8fafc;
  padding: 0.75rem;
  border-radius: 0.5rem;
}

.ac-carousel {
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 0.75rem;
}

.ac-carousel-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 0.5rem;
}

.ac-field-help {
  margin-top: 0.35rem;
  color: #64748b;
}

.ac-error-text {
  font-size: 0.82rem;
  margin-top: 0.35rem;
}

.form-control.is-invalid,
.form-control.is-invalid:focus {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.18rem rgba(220, 53, 69, 0.15);
}

form[data-accessible-form] .form-control:focus-visible,
form[data-accessible-form] .form-check-input:focus-visible,
form[data-accessible-form] .custom-control-input:focus-visible + .custom-control-label::before {
  outline: 0;
  box-shadow: 0 0 0 0.18rem rgba(37, 99, 235, 0.18);
}

.ac-table-action:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 0.18rem rgba(37, 99, 235, 0.22);
}

.ac-htmx-pending {
  opacity: 0.7;
  pointer-events: none;
}

@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;
  }
}
