/* =============================================================================
   FLU - SISTEMA COMPLETO DE DARK/LIGHT MODE
   ============================================================================= */

/* =============================================================================
   1. FORMULARIOS Y CONTROLES
   ============================================================================= */

/* Form Controls Base */
.form-control,
.form-select,
.form-control:focus,
.form-select:focus {
  background-color: var(--card-bg-dark);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-dark);
  transition: all 0.3s ease;
}

.assistant-info {
  color: var(--brand-color-dark);
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

body.light-mode .assistant-info {
  color: var(--brand-color-light, #9147ff);
}

body.light-mode .form-control,
body.light-mode .form-select,
body.light-mode .form-control:focus,
body.light-mode .form-select:focus {
  background-color: var(--card-bg-light);
  border-color: rgba(0, 0, 0, 0.15);
  color: var(--text-light);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--brand-color-dark);
  box-shadow: 0 0 0 0.25rem rgba(187, 134, 252, 0.25);
}

body.light-mode .form-control:focus,
body.light-mode .form-select:focus {
  border-color: var(--brand-color-light);
  box-shadow: 0 0 0 0.25rem rgba(225, 48, 108, 0.25);
}

/* Form Labels */
.form-label,
label {
  color: var(--text-dark);
  font-weight: 500;
}

body.light-mode .form-label,
body.light-mode label {
  color: var(--text-light);
}

/* Floating Labels */
.form-floating>label {
  color: rgba(var(--text-dark-rgb), 0.7);
}

body.light-mode .form-floating>label {
  color: rgba(var(--text-light-rgb), 0.7);
}

.form-floating>.form-control:focus~label,
.form-floating>.form-control:not(:placeholder-shown)~label {
  color: var(--brand-color-dark);
}

body.light-mode .form-floating>.form-control:focus~label,
body.light-mode .form-floating>.form-control:not(:placeholder-shown)~label {
  color: var(--brand-color-light);
}

/* Checkboxes & Radio Buttons */
.form-check-input {
  background-color: var(--card-bg-dark);
  border-color: rgba(255, 255, 255, 0.3);
}

body.light-mode .form-check-input {
  background-color: var(--card-bg-light);
  border-color: rgba(0, 0, 0, 0.25);
}

.form-check-input:checked {
  background-color: var(--brand-color-dark);
  border-color: var(--brand-color-dark);
}

body.light-mode .form-check-input:checked {
  background-color: var(--brand-color-light);
  border-color: var(--brand-color-light);
}

/* Form Text & Help */
.form-text {
  color: rgba(var(--text-dark-rgb), 0.7);
}

body.light-mode .form-text {
  color: rgba(var(--text-light-rgb), 0.7);
}

/* Select Option Elements */
.form-select option {
  background-color: var(--card-bg-dark);
  color: var(--text-dark);
}

body.light-mode .form-select option {
  background-color: var(--card-bg-light);
  color: var(--text-light);
}

/* Multi-image uploader */
.multi-preview-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.multi-thumb {
  position: relative;
  width: 120px;
  height: 120px;
  border: 1px dashed rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
}

body.light-mode .multi-thumb {
  border-color: rgba(0, 0, 0, 0.15);
  background: rgba(0, 0, 0, 0.03);
}

.multi-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.multi-thumb-order {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
}

.multi-thumb-actions {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 6px;
  background: rgba(0, 0, 0, 0.55);
}

.multi-thumb-btn {
  border: none;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 12px;
  cursor: pointer;
}

body.light-mode .multi-thumb-actions {
  background: rgba(0, 0, 0, 0.3);
}

body.light-mode .multi-thumb-btn {
  background: rgba(255, 255, 255, 0.8);
  color: #000;
}

.multi-upload-footer {
  display: none;
  gap: 8px;
}

/* =============================================================================
   2. MODALES Y OVERLAYS
   ============================================================================= */

.modal-content {
  background-color: var(--card-bg-dark);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-dark);
}

body.light-mode .modal-content {
  background-color: var(--card-bg-light);
  border-color: rgba(0, 0, 0, 0.125);
  color: var(--text-light);
}

.modal-header {
  border-bottom-color: rgba(255, 255, 255, 0.15);
}

body.light-mode .modal-header {
  border-bottom-color: rgba(0, 0, 0, 0.125);
}

.modal-footer {
  border-top-color: rgba(255, 255, 255, 0.15);
}

body.light-mode .modal-footer {
  border-top-color: rgba(0, 0, 0, 0.125);
}

.modal-title {
  color: var(--text-dark);
}

body.light-mode .modal-title {
  color: var(--text-light);
}

/* Backdrop */
.modal-backdrop {
  background-color: rgba(0, 0, 0, 0.6);
}

body.light-mode .modal-backdrop {
  background-color: rgba(0, 0, 0, 0.5);
}

/* =============================================================================
   3. TABLAS Y LISTAS
   ============================================================================= */

.table {
  --bs-table-bg: var(--card-bg-dark);
  --bs-table-color: var(--text-dark);
  --bs-table-border-color: rgba(255, 255, 255, 0.15);
  --bs-table-striped-bg: rgba(255, 255, 255, 0.05);
  --bs-table-hover-bg: rgba(255, 255, 255, 0.1);
}

body.light-mode .table {
  --bs-table-bg: var(--card-bg-light);
  --bs-table-color: var(--text-light);
  --bs-table-border-color: rgba(0, 0, 0, 0.125);
  --bs-table-striped-bg: rgba(0, 0, 0, 0.025);
  --bs-table-hover-bg: rgba(0, 0, 0, 0.05);
}

.table-dark {
  --bs-table-bg: var(--bg-dark);
  --bs-table-color: var(--text-dark);
}

body.light-mode .table-dark {
  --bs-table-bg: var(--bg-light);
  --bs-table-color: var(--text-light);
}

/* List Groups */
.list-group-item {
  background-color: var(--card-bg-dark);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-dark);
}

body.light-mode .list-group-item {
  background-color: var(--card-bg-light);
  border-color: rgba(0, 0, 0, 0.125);
  color: var(--text-light);
}

.list-group-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

body.light-mode .list-group-item:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

/* =============================================================================
   4. ALERTS Y NOTIFICACIONES
   ============================================================================= */

.alert {
  border-width: 1px;
  border-style: solid;
}

/* Alert Success */
.alert-success {
  background-color: rgba(40, 167, 69, 0.15);
  border-color: rgba(40, 167, 69, 0.3);
  color: #28a745;
}

body.light-mode .alert-success {
  background-color: rgba(40, 167, 69, 0.1);
  border-color: rgba(40, 167, 69, 0.2);
  color: #155724;
}

/* Alert Danger */
.alert-danger {
  background-color: rgba(220, 53, 69, 0.15);
  border-color: rgba(220, 53, 69, 0.3);
  color: #dc3545;
}

body.light-mode .alert-danger {
  background-color: rgba(220, 53, 69, 0.1);
  border-color: rgba(220, 53, 69, 0.2);
  color: #721c24;
}

/* Alert Warning */
.alert-warning {
  background-color: rgba(255, 193, 7, 0.15);
  border-color: rgba(255, 193, 7, 0.3);
  color: #ffc107;
}

body.light-mode .alert-warning {
  background-color: rgba(255, 193, 7, 0.1);
  border-color: rgba(255, 193, 7, 0.2);
  color: #856404;
}

/* Alert Info */
.alert-info {
  background-color: rgba(13, 202, 240, 0.15);
  border-color: rgba(13, 202, 240, 0.3);
  color: #0dcaf0;
}

body.light-mode .alert-info {
  background-color: rgba(13, 202, 240, 0.1);
  border-color: rgba(13, 202, 240, 0.2);
  color: #055160;
}

/* =============================================================================
   5. BADGES Y TAGS
   ============================================================================= */

.badge {
  color: #fff;
}

.badge.bg-primary {
  background-color: var(--brand-color-dark) !important;
}

body.light-mode .badge.bg-primary {
  background-color: var(--brand-color-light) !important;
}

.badge.bg-secondary {
  background-color: #6c757d !important;
}

.badge.bg-dark {
  background-color: var(--bg-dark) !important;
  color: var(--text-dark);
}

body.light-mode .badge.bg-dark {
  background-color: var(--text-light) !important;
  color: var(--bg-light);
}

/* =============================================================================
   6. SPINNERS Y LOADERS
   ============================================================================= */

.spinner-border {
  color: var(--brand-color-dark);
}

body.light-mode .spinner-border {
  color: var(--brand-color-light);
}

.spinner-grow {
  color: var(--brand-color-dark);
}

body.light-mode .spinner-grow {
  color: var(--brand-color-light);
}

/* Custom Loading Overlay */
.loading-overlay {
  background-color: rgba(0, 0, 0, 0.8);
}

body.light-mode .loading-overlay {
  background-color: rgba(255, 255, 255, 0.8);
}

/* =============================================================================
   7. COMPONENTES CUSTOM FLU
   ============================================================================= */

/* Platform Specific Forms */
.platform-specific-form {
  background-color: var(--card-bg-dark);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-dark);
}

body.light-mode .platform-specific-form {
  background-color: var(--card-bg-light);
  border: 1px solid rgba(0, 0, 0, 0.125);
  color: var(--text-light);
}

/* Profile Components */
.bg-gradient-violet {
  background: var(--primary-gradient-dark) !important;
}

body.light-mode .bg-gradient-violet {
  background: var(--primary-gradient-light) !important;
}

.text-violet {
  color: var(--brand-color-dark) !important;
}

body.light-mode .text-violet {
  color: var(--brand-color-light) !important;
}

.text-purple {
  color: var(--brand-color-dark) !important;
}

body.light-mode .text-purple {
  color: var(--brand-color-light) !important;
}

.bg-light {
  background-color: var(--card-bg-dark) !important;
}

body.light-mode .bg-light {
  background-color: #f0e6d2 !important;
}

.text-dark {
  color: var(--text-dark) !important;
}

body.light-mode .text-dark {
  color: var(--text-light) !important;
}

.text-muted {
  color: rgba(var(--text-dark-rgb), 0.6) !important;
}

body.light-mode .text-muted {
  color: rgba(var(--text-light-rgb), 0.6) !important;
}

/* Custom Card Styles */
.hover-shadow {
  transition: box-shadow 0.3s ease;
}

.hover-shadow:hover {
  box-shadow: var(--card-shadow-dark) !important;
}

body.light-mode .hover-shadow:hover {
  box-shadow: var(--card-shadow-light) !important;
}

/* Instagram Form Specific */
.form-instagram {
  background: linear-gradient(135deg, var(--card-bg-dark) 0%, rgba(187, 134, 252, 0.1) 100%);
}

body.light-mode .form-instagram {
  background: linear-gradient(135deg, var(--card-bg-light) 0%, rgba(225, 48, 108, 0.05) 100%);
}

.instagram-icon {
  color: #E1306C;
}

.instagram-title {
  color: var(--text-dark);
}

body.light-mode .instagram-title {
  color: var(--text-light);
}

/* Style Buttons */
.style-button {
  background-color: var(--card-bg-dark);
  color: var(--text-dark);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

body.light-mode .style-button {
  background-color: var(--card-bg-light);
  color: var(--text-light);
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.style-button:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

body.light-mode .style-button:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.style-button.selected-style {
  background-color: var(--brand-color-dark) !important;
  color: white !important;
  border-color: var(--brand-color-dark) !important;
}

body.light-mode .style-button.selected-style {
  background-color: var(--brand-color-light) !important;
  color: white !important;
  border-color: var(--brand-color-light) !important;
}

/* Step Components */
.step-number {
  background-color: var(--brand-color-dark);
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

body.light-mode .step-number {
  background-color: var(--brand-color-light);
}

/* === Override Step Number Gradient === */
.step-number {
  background: #4a4a4a !important;
  /* Neutral gray */
  animation: none !important;
  /* Disable pulse animation */
}

body.light-mode .step-number {
  background: #4a4a4a !important;
  /* Same in light mode for consistency */
}

.step-title {
  color: var(--text-dark);
}

body.light-mode .step-title {
  color: var(--text-light);
}

/* =============================================================================
   8. NAVEGACIÓN Y BREADCRUMBS
   ============================================================================= */

.nav-pills .nav-link {
  color: var(--text-dark);
  background-color: transparent;
}

body.light-mode .nav-pills .nav-link {
  color: var(--text-light);
}

.nav-pills .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

body.light-mode .nav-pills .nav-link:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.nav-pills .nav-link.active {
  background-color: var(--brand-color-dark);
  color: white;
}

body.light-mode .nav-pills .nav-link.active {
  background-color: var(--brand-color-light);
  color: white;
}

/* Pagination */
.pagination .page-link {
  background-color: var(--card-bg-dark);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-dark);
}

body.light-mode .pagination .page-link {
  background-color: var(--card-bg-light);
  border-color: rgba(0, 0, 0, 0.125);
  color: var(--text-light);
}

.pagination .page-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: var(--brand-color-dark);
}

body.light-mode .pagination .page-link:hover {
  background-color: rgba(0, 0, 0, 0.05);
  border-color: var(--brand-color-light);
}

.pagination .page-item.active .page-link {
  background-color: var(--brand-color-dark);
  border-color: var(--brand-color-dark);
}

body.light-mode .pagination .page-item.active .page-link {
  background-color: var(--brand-color-light);
  border-color: var(--brand-color-light);
}

/* =============================================================================
   9. DROPDOWN Y POPOVERS
   ============================================================================= */

/* Modern Glassmorphism Dropdown */
.modern-dropdown {
  position: relative;
}

.modern-dropdown-btn {
  background: rgba(17, 17, 17, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 12px !important;
  color: white !important;
  padding: 12px 20px;
  font-weight: 600;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modern-dropdown-btn:hover {
  background: rgba(17, 17, 17, 0.95) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.2) !important;
}

.modern-dropdown-btn:focus {
  box-shadow: 0 0 0 3px rgba(187, 134, 252, 0.3), 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Chevron Animation */
.dropdown-chevron {
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  font-size: 0.8em;
}

.modern-dropdown-btn[aria-expanded="true"] .dropdown-chevron {
  transform: rotate(180deg);
}

/* Modern Dropdown Menu */
.modern-dropdown-menu {
  background: rgba(17, 17, 17, 0.95) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 12px !important;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2) !important;
  padding: 8px !important;
  margin-top: 8px;
  min-width: 280px;
  animation: dropdownFadeIn 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  transform-origin: top center;
  /* Fix positioning - force dropdown to appear below */
  top: 100% !important;
  transform: translateY(0) !important;
}

/* Ensure dropdown stays below button */
.modern-dropdown {
  position: relative;
}

.modern-dropdown .dropdown-menu {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  transform: none !important;
}

/* End-aligned menus respect end alignment */
.modern-dropdown .dropdown-menu.dropdown-menu-end {
  left: auto !important;
  right: 0 !important;
}

/* Default alignment for non-end menus */
.modern-dropdown .dropdown-menu:not(.dropdown-menu-end) {
  left: 0 !important;
  right: auto !important;
}

/* ==============================================
   Image History Dropdown - Fresh Styles
   ============================================== */
.image-history-dropdown {
  padding: 0 !important;
  overflow: hidden !important;
  min-width: 360px !important;
  max-width: 520px !important;
  max-height: 70vh !important;
  width: max-content;
  animation: dropdownFadeIn 0.3s ease !important;
}

.image-history-dropdown::before {
  display: none !important;
}

.image-history-dropdown .dropdown-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: linear-gradient(135deg, rgba(145, 71, 255, 0.08), rgba(107, 70, 193, 0.08));
  border-bottom: 1px solid rgba(145, 71, 255, 0.2);
  padding: 0.9rem 1.1rem;
  color: #fff;
}

.image-history-dropdown .dropdown-header small {
  color: rgba(255, 255, 255, 0.65);
}

.image-history-content {
  max-height: 58vh;
  overflow-y: auto;
}

.image-history-section {
  margin-bottom: 0.75rem;
}

.image-history-thumbnail {
  width: 90px;
  height: 90px;
  border-radius: 16px;
  object-fit: cover;
  cursor: pointer;
  transition: all 0.25s ease;
  border: 2px solid transparent;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.image-history-thumbnail:hover {
  transform: scale(1.06) translateY(-2px);
  border-color: rgba(145, 71, 255, 0.45);
  box-shadow: 0 8px 20px rgba(145, 71, 255, 0.25), 0 4px 12px rgba(0, 0, 0, 0.25);
}

.image-history-thumbnail::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(145, 71, 255, 0.12), rgba(107, 70, 193, 0.12));
  opacity: 0;
  transition: opacity .25s ease;
  z-index: 1;
}

.image-history-thumbnail:hover::before {
  opacity: 1;
}

.image-history-grid-item {
  border-radius: 14px;
  overflow: hidden;
  position: relative;
}

.image-history-grid-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .25s ease;
}

.image-history-grid-item:hover img {
  transform: scale(1.03);
}

.image-history-grid-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, .35), rgba(0, 0, 0, 0));
  opacity: 0;
  transition: opacity .25s ease;
}

.image-history-grid-item:hover .image-history-grid-overlay {
  opacity: 1;
}

.image-history-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: inherit;
  padding: .75rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.image-history-actions .btn {
  border-radius: 10px !important;
}

@keyframes dropdownFadeIn {
  0% {
    opacity: 0;
    transform: translateY(-4px) scale(.98)
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1)
  }
}

/* Light mode adjustments */
body.light-mode .image-history-dropdown {
  background: #fff !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

body.light-mode .image-history-dropdown .dropdown-header {
  color: #1f2937;
  border-bottom-color: rgba(0, 0, 0, 0.12);
}

body.light-mode .image-history-thumbnail {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

body.light-mode .image-history-actions {
  border-top-color: rgba(0, 0, 0, 0.08);
}

/* Modern Dropdown Items */
.modern-dropdown-item {
  background: transparent !important;
  border: none !important;
  border-radius: 8px !important;
  color: white !important;
  padding: 12px 16px !important;
  margin: 4px 0 !important;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1) !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  text-decoration: none !important;
  font-size: 0.9em;
  font-weight: 500;
}

.modern-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  color: white !important;
  transform: scale(0.98);
}

.modern-dropdown-item:focus {
  background: rgba(255, 255, 255, 0.15) !important;
  color: white !important;
  box-shadow: 0 0 0 2px rgba(187, 134, 252, 0.3);
}

/* Social Platform Icons */
.social-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Connection Status */
.connection-status {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.connection-badge {
  background: rgba(34, 197, 94, 0.2) !important;
  color: #22c55e !important;
  border: 1px solid rgba(34, 197, 94, 0.3);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.7em;
  font-weight: 600;
  width: fit-content;
}

.connection-name {
  font-size: 0.75em;
  color: rgba(255, 255, 255, 0.7) !important;
  margin: 0;
}

.disconnect-btn {
  background: rgba(239, 68, 68, 0.2) !important;
  color: #ef4444 !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
  border-radius: 8px !important;
  padding: 4px 12px !important;
  font-size: 0.75em !important;
  font-weight: 600 !important;
  transition: all 0.3s ease !important;
  margin-left: auto;
}

.disconnect-btn:hover {
  background: rgba(239, 68, 68, 0.3) !important;
  color: #ef4444 !important;
  transform: scale(0.95);
}

/* =============================================================================
   SOCIAL CONNECTIONS - NEW TAILWIND-STYLE DESIGN
   ============================================================================= */

/* Header icon - violet color */
.social-header-icon {
  color: var(--brand-color-dark, #bb86fc) !important;
}

body.light-mode .social-header-icon {
  color: var(--brand-color-light, #e1306c) !important;
}

/* Card body padding for social connections section */
.card .card-body.p-2 {
  padding: 8px !important;
}

/* Animated pulse dot for header */
@keyframes socialPulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(1.1);
  }
}

.social-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-color-dark, #bb86fc);
  animation: socialPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  flex-shrink: 0;
}

body.light-mode .social-pulse-dot {
  background: var(--brand-color-light, #e1306c);
}

/* Individual network item */
.social-network-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-radius: 12px;
  transition: background-color 0.2s ease;
  margin-bottom: 4px;
  gap: 12px;
}

.social-network-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

body.light-mode .social-network-item:hover {
  background: rgba(0, 0, 0, 0.03);
}

/* Connected state has permanent background */
.social-network-item.connected {
  background: rgba(255, 255, 255, 0.05);
}

body.light-mode .social-network-item.connected {
  background: rgba(0, 0, 0, 0.03);
}

/* Network info section (left side) */
.social-network-info {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

/* Ensure buttons don't shrink */
.social-network-item>div:last-child {
  flex-shrink: 0;
}

/* Network icon container */
.social-network-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white !important;
  flex-shrink: 0;
}

.social-network-icon i {
  color: white !important;
  font-size: 1.5rem;
}

/* Platform-specific icon colors */
.social-network-icon.linkedin {
  background: #0077B5;
}

.social-network-icon.facebook {
  background: #1877F2;
}

.social-network-icon.instagram {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.social-network-icon.x {
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-network-icon.gcal {
  background: linear-gradient(135deg, #4285F4, #34A853, #FBBC05, #EA4335);
}

/* Network text section */
.social-network-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

/* Network name */
.social-network-name {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-dark, #f8f8f8);
  margin: 0;
}

body.light-mode .social-network-name {
  color: var(--text-light, #212529);
}

/* Network status */
.social-network-status-text {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}

body.light-mode .social-network-status-text {
  color: rgba(0, 0, 0, 0.5);
}

/* Connected status with green dot */
.social-network-status-connected {
  display: flex;
  align-items: center;
  gap: 6px;
}

.social-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  flex-shrink: 0;
}

.social-network-status-connected .social-network-status-text {
  color: #10b981;
  font-weight: 500;
}

/* Network buttons */
.social-network-btn {
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 6px;
  border: none;
  color: white;
  cursor: pointer;
  transition: opacity 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.social-network-btn:hover {
  opacity: 0.9;
  color: white;
}

/* Connect buttons with brand colors */
.social-network-btn.btn-linkedin {
  background: #0077B5;
}

.social-network-btn.btn-facebook {
  background: #1877F2;
}

.social-network-btn.btn-instagram {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.social-network-btn.btn-x {
  background: #000000;
}

.social-network-btn.btn-gcal {
  background: linear-gradient(135deg, #4285F4, #34A853, #FBBC05, #EA4335);
}

/* Disconnect button - transparent with red border/text */
.social-network-btn.btn-disconnect {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #ef4444 !important;
}

.social-network-btn.btn-disconnect:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.7);
  color: #ef4444 !important;
}

/* Manage button - for X connected state */
.social-network-btn.btn-manage {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-dark, #f8f8f8);
}

body.light-mode .social-network-btn.btn-manage {
  border-color: rgba(0, 0, 0, 0.15);
  color: var(--text-light, #212529);
}

.social-network-btn.btn-manage:hover {
  background: rgba(255, 255, 255, 0.1);
}

body.light-mode .social-network-btn.btn-manage:hover {
  background: rgba(0, 0, 0, 0.08);
}

/* Social connections footer */
.social-connections-footer {
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.05);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

body.light-mode .social-connections-footer {
  background: rgba(0, 0, 0, 0.02);
  border-top-color: rgba(0, 0, 0, 0.1);
}

.social-footer-icon {
  color: var(--brand-color-dark, #bb86fc);
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 2px;
}

body.light-mode .social-footer-icon {
  color: var(--brand-color-light, #e1306c);
}

.social-footer-text {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
  margin: 0;
}

body.light-mode .social-footer-text {
  color: rgba(0, 0, 0, 0.6);
}

.social-footer-text strong {
  color: var(--brand-color-dark, #bb86fc);
  font-weight: 600;
}

body.light-mode .social-footer-text strong {
  color: var(--brand-color-light, #e1306c);
}

/* Google Calendar toggle section */
.social-gcal-toggle {
  margin-top: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
}

body.light-mode .social-gcal-toggle {
  background: rgba(0, 0, 0, 0.03);
}

/* Mobile responsive */
@media (max-width: 576px) {
  .social-network-item {
    padding: 12px;
  }

  .social-network-icon {
    width: 36px;
    height: 36px;
  }

  .social-network-btn {
    padding: 6px 12px;
    font-size: 0.7rem;
  }
}

/* Light Mode Styles */
body.light-mode .modern-dropdown-btn {
  background: rgba(255, 255, 255, 0.95) !important;
  color: #1f2937 !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
}

body.light-mode .modern-dropdown-btn:hover {
  background: rgba(255, 255, 255, 1) !important;
  border-color: rgba(0, 0, 0, 0.15) !important;
}

body.light-mode .modern-dropdown-menu {
  background: rgba(255, 255, 255, 0.98) !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
}

body.light-mode .modern-dropdown-item {
  color: #1f2937 !important;
}

body.light-mode .modern-dropdown-item:hover {
  background: rgba(0, 0, 0, 0.05) !important;
  color: #1f2937 !important;
}

body.light-mode .connection-name {
  color: rgba(0, 0, 0, 0.6) !important;
}

/* Override specific styles for image-history-dropdown to use modern style */
.modern-dropdown-menu.image-history-dropdown {
  background: rgba(17, 17, 17, 0.95) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25) !important;
  min-width: 360px !important;
  max-width: 520px !important;
  max-height: 70vh !important;
}

.modern-dropdown-menu.image-history-dropdown::before {
  display: none !important;
}

body.light-mode .modern-dropdown-menu.image-history-dropdown {
  background: rgba(255, 255, 255, 1) !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
}

/* Modern Calendar Card Styles ONLY (excludes home overview calendar) */
.feature-card.calendar-card:not(.home-calendar-card) {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 24px !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !important;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
  overflow: hidden !important;
  position: relative !important;
}

.feature-card.calendar-card:not(.home-calendar-card)::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(145, 71, 255, 0.05), rgba(107, 70, 193, 0.05));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.feature-card.calendar-card:not(.home-calendar-card):hover {
  border-color: rgba(145, 71, 255, 0.2) !important;
}

.feature-card.calendar-card:not(.home-calendar-card):hover::before {
  opacity: 1;
}

/* Light mode styles for calendar card only */
body.light-mode .feature-card.calendar-card:not(.home-calendar-card) {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7)) !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
}

body.light-mode .feature-card.calendar-card:not(.home-calendar-card):hover {
  border-color: rgba(225, 48, 108, 0.2) !important;
}

/* Calendar Card Internal Content Harmony */
.calendar-card:not(.home-calendar-card) .card-body {
  color: #ffffff !important;
}

.calendar-card:not(.home-calendar-card) .upcoming-posts-header h5 {
  color: #ffffff !important;
}

.calendar-card:not(.home-calendar-card) .table-modern {
  color: #EAEAEA !important;
}

.calendar-card:not(.home-calendar-card) .table-modern thead th {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 0 !important;
  font-weight: 600 !important;
  font-size: 0.9rem !important;
  padding: 12px 16px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.calendar-card:not(.home-calendar-card) .table-modern thead th:first-child {
  border-radius: 8px 0 0 0 !important;
  border-left: none !important;
}

.calendar-card:not(.home-calendar-card) .table-modern thead th:last-child {
  border-radius: 0 8px 0 0 !important;
  border-right: none !important;
}

.calendar-card:not(.home-calendar-card) .table-modern thead {
  border-radius: 8px 8px 0 0 !important;
  overflow: hidden !important;
}

.calendar-card:not(.home-calendar-card) .table-modern tbody td {
  color: #EAEAEA !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.calendar-card:not(.home-calendar-card) .loading-row td {
  color: #ffffff !important;
}

.calendar-card:not(.home-calendar-card) .text-muted {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* Light mode harmony for calendar card content */
body.light-mode .calendar-card:not(.home-calendar-card) .card-body {
  color: #1f2937 !important;
}

body.light-mode .calendar-card:not(.home-calendar-card) .upcoming-posts-header h5 {
  color: #1f2937 !important;
}

/* FA icons: background-clip text is unreliable in light mode */
body.light-mode .calendar-card:not(.home-calendar-card) .upcoming-posts-header .text-gradient {
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  color: #e1306c !important;
  -webkit-text-fill-color: #e1306c !important;
}

body.light-mode .calendar-card:not(.home-calendar-card) .table-modern {
  color: #374151 !important;
}

body.light-mode .calendar-card:not(.home-calendar-card) .table-modern thead th {
  color: #1f2937 !important;
  background: rgba(0, 0, 0, 0.05) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.15) !important;
  border-right: 1px solid rgba(0, 0, 0, 0.1) !important;
}

body.light-mode .calendar-card:not(.home-calendar-card) .table-modern thead th:first-child {
  border-left: none !important;
}

body.light-mode .calendar-card:not(.home-calendar-card) .table-modern thead th:last-child {
  border-right: none !important;
}

body.light-mode .calendar-card:not(.home-calendar-card) .table-modern tbody td {
  color: #374151 !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
}

body.light-mode .calendar-card:not(.home-calendar-card) .loading-row td {
  color: #1f2937 !important;
}

body.light-mode .calendar-card:not(.home-calendar-card) .text-muted {
  color: rgba(0, 0, 0, 0.6) !important;
}

/* Calendar Card Buttons Harmony */
.calendar-card:not(.home-calendar-card) .btn-primary-custom {
  background: var(--primary-gradient-dark) !important;
  border: 1px solid rgba(187, 134, 252, 0.3) !important;
  box-shadow: 0 0 15px rgba(187, 134, 252, 0.2) !important;
}

.calendar-card:not(.home-calendar-card) .btn-primary-custom:hover {
  box-shadow: 0 0 20px rgba(187, 134, 252, 0.4) !important;
  transform: translateY(-1px) !important;
}

/* Status badges and other elements */
.calendar-card:not(.home-calendar-card) .badge {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.calendar-card:not(.home-calendar-card) .spinner-border {
  color: #bb86fc !important;
}

/* Light mode buttons in calendar card */
body.light-mode .calendar-card:not(.home-calendar-card) .btn-primary-custom {
  background: var(--primary-gradient-light) !important;
  border: 1px solid rgba(225, 48, 108, 0.3) !important;
  box-shadow: 0 0 15px rgba(225, 48, 108, 0.2) !important;
}

body.light-mode .calendar-card:not(.home-calendar-card) .btn-primary-custom:hover {
  box-shadow: 0 0 20px rgba(225, 48, 108, 0.4) !important;
}

body.light-mode .calendar-card:not(.home-calendar-card) .badge {
  background: rgba(0, 0, 0, 0.1) !important;
  color: #1f2937 !important;
  border: 1px solid rgba(0, 0, 0, 0.2) !important;
}

body.light-mode .calendar-card:not(.home-calendar-card) .spinner-border {
  color: #e1306c !important;
}

/* Status Badges Colors in Calendar Card */
.calendar-card:not(.home-calendar-card) .badge.status-published {
  background: rgba(34, 197, 94, 0.2) !important;
  color: #22c55e !important;
  border: 1px solid rgba(34, 197, 94, 0.4) !important;
  font-weight: 600 !important;
  padding: 4px 8px !important;
  border-radius: 6px !important;
}

.calendar-card:not(.home-calendar-card) .badge.status-failed {
  background: rgba(239, 68, 68, 0.2) !important;
  color: #ef4444 !important;
  border: 1px solid rgba(239, 68, 68, 0.4) !important;
  font-weight: 600 !important;
  padding: 4px 8px !important;
  border-radius: 6px !important;
}

.calendar-card:not(.home-calendar-card) .badge.status-pending {
  background: rgba(251, 191, 36, 0.2) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(251, 191, 36, 0.4) !important;
  font-weight: 600 !important;
  padding: 4px 8px !important;
  border-radius: 6px !important;
}

.calendar-card:not(.home-calendar-card) .badge.status-processing {
  background: rgba(59, 130, 246, 0.2) !important;
  color: #3b82f6 !important;
  border: 1px solid rgba(59, 130, 246, 0.4) !important;
  font-weight: 600 !important;
  padding: 4px 8px !important;
  border-radius: 6px !important;
}

/* Light mode status badges */
body.light-mode .calendar-card:not(.home-calendar-card) .badge.status-published {
  background: rgba(34, 197, 94, 0.15) !important;
  color: #16a34a !important;
  border: 1px solid rgba(34, 197, 94, 0.3) !important;
}

body.light-mode .calendar-card:not(.home-calendar-card) .badge.status-failed {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #dc2626 !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
}

body.light-mode .calendar-card:not(.home-calendar-card) .badge.status-pending {
  background: rgba(251, 191, 36, 0.15) !important;
  color: #d97706 !important;
  border: 1px solid rgba(251, 191, 36, 0.3) !important;
}

body.light-mode .calendar-card:not(.home-calendar-card) .badge.status-processing {
  background: rgba(59, 130, 246, 0.15) !important;
  color: #2563eb !important;
  border: 1px solid rgba(59, 130, 246, 0.3) !important;
}

/* Animations */
@keyframes dropdownFadeIn {
  0% {
    opacity: 0;
    transform: translateY(-5px) scale(0.95) !important;
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1) !important;
  }
}

/* Staggered Animation for Items */
.modern-dropdown-item {
  animation: itemFadeIn 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  animation-fill-mode: both;
}

.modern-dropdown-item:nth-child(1) {
  animation-delay: 0.1s;
}

.modern-dropdown-item:nth-child(2) {
  animation-delay: 0.15s;
}

.modern-dropdown-item:nth-child(3) {
  animation-delay: 0.2s;
}

.modern-dropdown-item:nth-child(4) {
  animation-delay: 0.25s;
}

@keyframes itemFadeIn {
  0% {
    opacity: 0;
    transform: translateX(10px) scale(0.95);
  }

  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

/* Legacy dropdown styles for compatibility */
.dropdown-menu {
  background-color: var(--card-bg-dark);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: var(--card-shadow-dark);
}

body.light-mode .dropdown-menu {
  background-color: var(--card-bg-light);
  border-color: rgba(0, 0, 0, 0.125);
  box-shadow: var(--card-shadow-light);
}

.dropdown-item {
  color: var(--text-dark);
}

body.light-mode .dropdown-item {
  color: var(--text-light);
}

.dropdown-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-dark);
}

body.light-mode .dropdown-item:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--text-light);
}

.dropdown-item.active {
  background-color: var(--brand-color-dark);
  color: white;
}

body.light-mode .dropdown-item.active {
  background-color: var(--brand-color-light);
  color: white;
}

.dropdown-divider {
  border-color: rgba(255, 255, 255, 0.15);
}

body.light-mode .dropdown-divider {
  border-color: rgba(0, 0, 0, 0.125);
}

/* =============================================================================
   10. ACORDEONES Y COLLAPSE
   ============================================================================= */

.accordion-item {
  background-color: var(--card-bg-dark);
  border-color: rgba(255, 255, 255, 0.15);
}

body.light-mode .accordion-item {
  background-color: var(--card-bg-light);
  border-color: rgba(0, 0, 0, 0.125);
}

.accordion-header button {
  background-color: var(--card-bg-dark);
  color: var(--text-dark);
  border-color: rgba(255, 255, 255, 0.15);
}

body.light-mode .accordion-header button {
  background-color: var(--card-bg-light);
  color: var(--text-light);
  border-color: rgba(0, 0, 0, 0.125);
}

.accordion-body {
  background-color: var(--card-bg-dark);
  color: var(--text-dark);
}

body.light-mode .accordion-body {
  background-color: var(--card-bg-light);
  color: var(--text-light);
}

/* =============================================================================
   11. TOOLTIPS Y POPOVERS
   ============================================================================= */

.tooltip .tooltip-inner {
  background-color: rgba(0, 0, 0, 0.9);
  color: white;
}

body.light-mode .tooltip .tooltip-inner {
  background-color: rgba(255, 255, 255, 0.95);
  color: var(--text-light);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.popover {
  background-color: var(--card-bg-dark);
  border-color: rgba(255, 255, 255, 0.15);
}

body.light-mode .popover {
  background-color: var(--card-bg-light);
  border-color: rgba(0, 0, 0, 0.125);
}

.popover-header {
  background-color: var(--bg-dark);
  border-bottom-color: rgba(255, 255, 255, 0.15);
  color: var(--text-dark);
}

body.light-mode .popover-header {
  background-color: var(--bg-light);
  border-bottom-color: rgba(0, 0, 0, 0.125);
  color: var(--text-light);
}

.popover-body {
  color: var(--text-dark);
}

body.light-mode .popover-body {
  color: var(--text-light);
}

/* =============================================================================
   12. ANIMACIONES Y TRANSICIONES MEJORADAS
   ============================================================================= */

.form-section-fade-in {
  animation: fadeInUp 0.6s ease-out;
}

.delay-1 {
  animation-delay: 0.1s;
}

.delay-2 {
  animation-delay: 0.2s;
}

.delay-3 {
  animation-delay: 0.3s;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Theme transition for all elements */
* {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* =============================================================================
   13. RESPONSIVE DESIGN DARK MODE
   ============================================================================= */

@media (max-width: 768px) {
  .modal-dialog {
    margin: 1rem;
  }

  .platform-specific-form {
    margin: 0.5rem;
    padding: 1rem;
  }

  .style-button-group {
    gap: 0.25rem;
  }

  .style-button {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }
}

@media (max-width: 576px) {
  .form-floating>label {
    font-size: 0.875rem;
  }

  .step-number {
    width: 25px;
    height: 25px;
    font-size: 0.875rem;
  }

  .step-title {
    font-size: 1rem;
  }
}

/* =============================================================================
   14. UTILIDADES ADICIONALES
   ============================================================================= */

/* =============================================================================
   SOCIAL FORMS V2 (Unified, polished look for all platform forms)
   Applied when container has `.sf-unified` class.
   Uses per-platform variables for accents and gradients.
   ============================================================================= */

/* Per-platform accents and gradients */
.platform-specific-form.sf-unified.form-instagram {
  --sf-accent: #E1306C;
  --sf-accent-rgb: 225, 48, 108;
  --sf-gradient: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.platform-specific-form.sf-unified.form-facebook {
  --sf-accent: #1877F2;
  --sf-accent-rgb: 24, 119, 242;
  --sf-gradient: linear-gradient(90deg, #1877F2, #0D6EFD);
}

.platform-specific-form.sf-unified.form-linkedin {
  --sf-accent: #0A66C2;
  --sf-accent-rgb: 10, 102, 194;
  --sf-gradient: linear-gradient(90deg, #0077B5, #0A66C2);
}

.platform-specific-form.sf-unified.form-x {
  --sf-accent: #1DA1F2;
  --sf-accent-rgb: 29, 161, 242;
  --sf-gradient: linear-gradient(135deg, #1DA1F2 0%, #19212D 100%);
}

/* Card container */
.platform-specific-form.sf-unified {
  border-radius: 16px !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18) !important;
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(10px);
  overflow: visible !important;
  position: relative;
}

body:not(.light-mode) .platform-specific-form.sf-unified {
  border-color: rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45) !important;
  background: rgba(30, 30, 30, 0.95) !important;
}

/* Platform title (H2) */
.platform-specific-form.sf-unified .form-platform-header {
  font-weight: 800 !important;
  letter-spacing: .2px;
  margin-bottom: 1.75rem !important;
  position: relative;
}

.platform-specific-form.sf-unified .form-platform-header::after {
  content: "";
  display: block;
  height: 4px;
  width: 120px;
  margin: .6rem auto 0;
  background: var(--sf-gradient);
  border-radius: 999px;
}

/* Optional header band (Instagram already uses .form-header) */
.platform-specific-form.sf-unified .form-header {
  background: var(--sf-gradient) !important;
  position: relative;
  overflow: hidden;
  border-radius: 16px 16px 0 0 !important;
}

.platform-specific-form.sf-unified .form-header::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05), transparent 40%);
  transform: rotate(15deg);
  opacity: 0.2;
  pointer-events: none;
}

/* Step header */
.platform-specific-form.sf-unified .step-header {
  background: rgba(var(--sf-accent-rgb), 0.05) !important;
  border: 1px solid rgba(var(--sf-accent-rgb), 0.12) !important;
  padding: .9rem 1rem !important;
  border-radius: 12px !important;
  transition: all 0.3s ease;
}

.platform-specific-form.sf-unified .step-header:hover {
  background: rgba(var(--sf-accent-rgb), 0.08) !important;
  border-color: rgba(var(--sf-accent-rgb), 0.2) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(var(--sf-accent-rgb), 0.1) !important;
}

/* Segmented auto/manual toggle */
.platform-specific-form.sf-unified .sf-segmented {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(var(--sf-accent-rgb), 0.22) !important;
  background: rgba(var(--sf-accent-rgb), 0.08);
}

.platform-specific-form.sf-unified .sf-segmented-btn {
  border: none;
  background: transparent;
  color: inherit;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  transition: transform .18s ease, box-shadow .18s ease, color .18s ease;
}

.platform-specific-form.sf-unified .sf-segmented-btn:hover {
  transform: translateY(-1px);
  color: var(--sf-accent);
}

.platform-specific-form.sf-unified .sf-segmented-btn.is-active {
  background: var(--sf-gradient);
  color: #fff;
  box-shadow: 0 8px 16px rgba(var(--sf-accent-rgb), .25) !important;
}

.platform-specific-form.sf-unified .step-title {
  font-weight: 700 !important;
}

.platform-specific-form.sf-unified .step-number {
  background: #4a4a4a !important;
  color: #fff !important;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
}

/* Style chip buttons */
.platform-specific-form.sf-unified .style-button-group {
  gap: .6rem !important;
}

.platform-specific-form.sf-unified .style-button-group.is-disabled {
  opacity: 0.45;
  filter: grayscale(0.2);
  pointer-events: none;
}

.platform-specific-form.sf-unified .style-button {
  background: transparent !important;
  color: var(--sf-accent) !important;
  border: 2px solid rgba(var(--sf-accent-rgb), .3) !important;
  border-radius: 999px !important;
  padding: .45rem 1rem !important;
  font-weight: 700 !important;
  transition: all .25s ease;
  position: relative;
  overflow: hidden;
}

.platform-specific-form.sf-unified .style-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s;
}

.platform-specific-form.sf-unified .style-button:hover {
  transform: translateY(-2px);
  background: rgba(var(--sf-accent-rgb), .06) !important;
  border-color: rgba(var(--sf-accent-rgb), .5) !important;
  box-shadow: 0 4px 12px rgba(var(--sf-accent-rgb), .15) !important;
}

.platform-specific-form.sf-unified .style-button:hover::before {
  left: 100%;
}

.platform-specific-form.sf-unified .style-button.selected-style {
  background: var(--sf-gradient) !important;
  color: #fff !important;
  border-color: transparent !important;
  box-shadow: 0 6px 16px rgba(var(--sf-accent-rgb), .25) !important;
}

/* Textarea */
.platform-specific-form.sf-unified .caption-input {
  border-radius: 12px !important;
  padding: 0.85rem 1rem !important;
  border: 1px solid rgba(var(--sf-accent-rgb), .25) !important;
  background: transparent !important;
}

.platform-specific-form.sf-unified .caption-input:focus {
  border-color: rgba(var(--sf-accent-rgb), .55) !important;
  box-shadow: 0 0 0 3px rgba(var(--sf-accent-rgb), .15) !important;
}

.platform-specific-form.sf-unified .char-counter {
  right: 14px;
  bottom: 10px;
  opacity: .8;
  font-weight: 600;
}

/* Improve input legibility (bg + placeholder) */
body:not(.light-mode) .platform-specific-form.sf-unified .caption-input {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.28) !important;
}

body.light-mode .platform-specific-form.sf-unified .caption-input {
  background: rgba(0, 0, 0, 0.02) !important;
  color: var(--text-light) !important;
  border-color: rgba(0, 0, 0, 0.18) !important;
}

.platform-specific-form.sf-unified .caption-input::placeholder {
  color: rgba(var(--text-dark-rgb), 0.65) !important;
}

body.light-mode .platform-specific-form.sf-unified .caption-input::placeholder {
  color: rgba(var(--text-light-rgb), 0.55) !important;
}

/* Image dropzone */
.platform-specific-form.sf-unified .image-upload-container,
.platform-specific-form.sf-unified .image-upload-area {
  background: transparent !important;
  border: 2px dashed rgba(var(--sf-accent-rgb), .35) !important;
  border-radius: 14px !important;
  padding: 1.25rem !important;
  text-align: center;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background-color .18s ease;
  position: relative;
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 120px;
}

.platform-specific-form.sf-unified .sf-upload-area {
  border: 2px dashed rgba(255, 255, 255, 0.35) !important;
  border-radius: 12px !important;
  cursor: pointer;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04) !important;
  min-height: 150px;
}

body.light-mode .platform-specific-form.sf-unified .sf-upload-area {
  border-color: rgba(0, 0, 0, 0.35) !important;
  background: rgba(0, 0, 0, 0.04) !important;
}

.platform-specific-form.sf-unified .sf-upload-area:hover,
.platform-specific-form.sf-unified .sf-upload-area.drag-over {
  border-color: rgba(255, 255, 255, 0.7) !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

body.light-mode .platform-specific-form.sf-unified .sf-upload-area:hover,
body.light-mode .platform-specific-form.sf-unified .sf-upload-area.drag-over {
  border-color: rgba(0, 0, 0, 0.7) !important;
  background: rgba(0, 0, 0, 0.06) !important;
}

.platform-specific-form.sf-unified .sf-upload-area::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(circle at 20% 20%, rgba(var(--sf-accent-rgb), .10), transparent 40%),
    radial-gradient(circle at 80% 0%, rgba(var(--sf-accent-rgb), .06), transparent 40%);
  transform: rotate(12deg);
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}

.platform-specific-form.sf-unified .sf-upload-area:hover::before,
.platform-specific-form.sf-unified .sf-upload-area.drag-over::before {
  opacity: 1;
}

.platform-specific-form.sf-unified .sf-upload-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.platform-specific-form.sf-unified .sf-upload-content .upload-icon {
  font-size: 24px;
  color: rgba(var(--text-dark-rgb), .6);
}

body.light-mode .platform-specific-form.sf-unified .sf-upload-content .upload-icon {
  color: rgba(var(--text-light-rgb), .6);
}

.platform-specific-form.sf-unified .sf-upload-content .upload-text {
  font-size: 14px;
  color: rgba(var(--text-dark-rgb), .75);
  margin: 0;
}

body.light-mode .platform-specific-form.sf-unified .sf-upload-content .upload-text {
  color: rgba(var(--text-light-rgb), .75);
}

.platform-specific-form.sf-unified .sf-upload-content .upload-hint {
  font-size: 12px;
  color: rgba(var(--text-dark-rgb), .55);
}

body.light-mode .platform-specific-form.sf-unified .sf-upload-content .upload-hint {
  color: rgba(var(--text-light-rgb), .55);
}

.platform-specific-form.sf-unified .image-upload-container.drag-over,
.platform-specific-form.sf-unified .image-upload-area.drag-over {
  background: rgba(var(--sf-accent-rgb), .08) !important;
  border-color: rgba(var(--sf-accent-rgb), .6) !important;
}

.platform-specific-form.sf-unified .image-upload-container.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 32px;
  height: 32px;
  margin: -16px 0 0 -16px;
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-top: 3px solid rgba(var(--sf-accent-rgb), 1);
  border-radius: 50%;
  animation: sf-rotate 1s linear infinite;
}

@keyframes sf-rotate {
  from {
    transform: rotate(0);
  }

  to {
    transform: rotate(360deg);
  }
}

.platform-specific-form.sf-unified .image-upload-container:hover,
.platform-specific-form.sf-unified .image-upload-area:hover {
  border-color: rgba(var(--sf-accent-rgb), .6) !important;
  background: rgba(var(--sf-accent-rgb), .05) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .18);
}

.platform-specific-form.sf-unified .image-upload-container .upload-icon {
  color: var(--sf-accent) !important;
}

.platform-specific-form.sf-unified .image-preview,
.platform-specific-form.sf-unified .preview-image {
  border-radius: 12px !important;
  border: 1px solid rgba(var(--sf-accent-rgb), .25) !important;
  max-width: 100%;
  max-height: 260px;
  object-fit: contain;
}

/* Emoji chip spacing */
.platform-specific-form.sf-unified .style-button .emoji {
  margin-right: .45rem;
}

/* Match Universal upload-area look for social forms */
.platform-specific-form.sf-unified .upload-label {
  display: block;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 15px;
  font-size: 16px;
  transition: color 0.3s;
}

body.light-mode .platform-specific-form.sf-unified .upload-label {
  color: var(--text-light);
}

.platform-specific-form.sf-unified .upload-area {
  border: 2px dashed rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  padding: 18px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  display: block;
  width: 100%;
  min-height: 150px;
  box-sizing: border-box;
}

body.light-mode .platform-specific-form.sf-unified .upload-area {
  border: 2px dashed rgba(0, 0, 0, 0.3);
}

.platform-specific-form.sf-unified .upload-area:hover {
  border-color: var(--brand-color-dark);
  background: rgba(187, 134, 252, 0.05);
}

body.light-mode .platform-specific-form.sf-unified .upload-area:hover {
  border-color: var(--brand-color-light);
  background: rgba(225, 48, 108, 0.05);
}

.platform-specific-form.sf-unified .upload-area::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 20% 20%, rgba(187, 134, 252, 0.08), transparent 40%),
    radial-gradient(circle at 80% 0%, rgba(225, 48, 108, 0.08), transparent 40%);
  transform: rotate(15deg);
  opacity: 0;
  transition: opacity .3s ease;
}

.platform-specific-form.sf-unified .upload-area:hover::before,
.platform-specific-form.sf-unified .upload-area.dragging::before {
  opacity: 1;
}

.platform-specific-form.sf-unified .upload-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.platform-specific-form.sf-unified .upload-icon {
  font-size: 24px;
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.3s;
}

body.light-mode .platform-specific-form.sf-unified .upload-icon {
  color: rgba(0, 0, 0, 0.6);
}

.platform-specific-form.sf-unified .upload-text {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  margin: 0;
  transition: color 0.3s;
}

body.light-mode .platform-specific-form.sf-unified .upload-text {
  color: rgba(0, 0, 0, 0.7);
}

.platform-specific-form.sf-unified .upload-hint {
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  margin-top: 8px;
  display: block;
  transition: color 0.3s;
}

body.light-mode .platform-specific-form.sf-unified .upload-hint {
  color: rgba(0, 0, 0, 0.5);
}


/* Primary action buttons */
.platform-specific-form.sf-unified .btn-primary,
.platform-specific-form.sf-unified .btn-generate,
.platform-specific-form.sf-unified .btn-generate-ig {
  background: var(--sf-gradient) !important;
  border: none !important;
  color: #fff !important;
  border-radius: 999px !important;
  padding: .7rem 1.6rem !important;
  font-weight: 800 !important;
  letter-spacing: .2px;
  box-shadow: 0 10px 24px rgba(var(--sf-accent-rgb), .35) !important;
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
  position: relative;
  overflow: hidden;
}

.platform-specific-form.sf-unified .btn-primary:hover,
.platform-specific-form.sf-unified .btn-generate:hover,
.platform-specific-form.sf-unified .btn-generate-ig:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 14px 28px rgba(var(--sf-accent-rgb), .4) !important;
}

.platform-specific-form.sf-unified .btn-primary::before,
.platform-specific-form.sf-unified .btn-generate::before,
.platform-specific-form.sf-unified .btn-generate-ig::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s;
}

.platform-specific-form.sf-unified .btn-primary:hover::before,
.platform-specific-form.sf-unified .btn-generate:hover::before,
.platform-specific-form.sf-unified .btn-generate-ig:hover::before {
  left: 100%;
}

/* Secondary/back buttons */
.platform-specific-form.sf-unified .btn-back,
.platform-specific-form.sf-unified .btn-outline-secondary {
  border-radius: 999px !important;
  border: 1px solid rgba(var(--sf-accent-rgb), .25) !important;
  color: inherit !important;
  background: transparent !important;
}

.platform-specific-form.sf-unified .btn-back:hover,
.platform-specific-form.sf-unified .btn-outline-secondary:hover {
  background: rgba(var(--sf-accent-rgb), .08) !important;
  border-color: rgba(var(--sf-accent-rgb), .45) !important;
}

/* Section spacing and subtle hover lift */
.platform-specific-form.sf-unified .form-step {
  border: 1px solid rgba(var(--sf-accent-rgb), .14) !important;
  border-radius: 14px !important;
  padding: 1.1rem !important;
  position: relative;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.platform-specific-form.sf-unified .form-step:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .16);
}

/* Brighter step cards */
body:not(.light-mode) .platform-specific-form.sf-unified .form-step {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
}

body.light-mode .platform-specific-form.sf-unified .form-step {
  background: rgba(0, 0, 0, 0.03) !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
}

/* Divider above actions */
.platform-specific-form.sf-unified .form-actions-divider {
  border-top: 1px solid rgba(var(--sf-accent-rgb), .18) !important;
  margin-top: 1.25rem !important;
  padding-top: 1.25rem !important;
}

/* Mobile tweaks */
@media (max-width: 576px) {
  .platform-specific-form.sf-unified {
    border-radius: 0 !important;
  }

  .platform-specific-form.sf-unified .btn-primary,
  .platform-specific-form.sf-unified .btn-generate,
  .platform-specific-form.sf-unified .btn-generate-ig {
    width: 100%;
  }

  .platform-specific-form.sf-unified .form-actions-divider {
    position: sticky;
    bottom: 0;
    z-index: 20;
    margin-top: 1rem !important;
    padding: 0.85rem 0.75rem 1rem;
    background: rgba(22, 22, 22, 0.92);
    backdrop-filter: blur(10px);
    box-shadow: 0 -8px 18px rgba(0, 0, 0, .25);
  }

  body.light-mode .platform-specific-form.sf-unified .form-actions-divider {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 -8px 18px rgba(0, 0, 0, .12);
  }
}

/* === Exact match of universal upload-area styles (global) === */
.upload-label {
  display: block;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 15px;
  font-size: 16px;
  transition: color 0.3s;
}

body.light-mode .upload-label {
  color: var(--text-light);
}

.platform-specific-form.sf-unified .upload-area {
  border: 2px dashed rgba(var(--sf-accent-rgb), 0.3) !important;
  border-radius: 12px !important;
  padding: 18px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  display: block;
  width: 100%;
  min-height: 150px;
  box-sizing: border-box;
  background: rgba(var(--sf-accent-rgb), 0.03) !important;
}

.platform-specific-form.sf-unified .upload-area:hover {
  border-color: rgba(var(--sf-accent-rgb), 0.6) !important;
  background: rgba(var(--sf-accent-rgb), 0.08) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .18);
}

.platform-specific-form.sf-unified .upload-area::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(circle at 20% 20%, rgba(var(--sf-accent-rgb), 0.1), transparent 40%),
    radial-gradient(circle at 80% 0%, rgba(var(--sf-accent-rgb), 0.08), transparent 40%);
  transform: rotate(15deg);
  opacity: 0;
  transition: opacity .3s ease;
}

.platform-specific-form.sf-unified .upload-area:hover::before,
.platform-specific-form.sf-unified .upload-area.dragging::before {
  opacity: 1;
}

.platform-specific-form.sf-unified .upload-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.platform-specific-form.sf-unified .upload-icon {
  font-size: 24px;
  color: rgba(var(--sf-accent-rgb), 0.7);
  transition: color 0.3s;
}

.platform-specific-form.sf-unified .upload-text {
  color: rgba(var(--sf-accent-rgb), 0.85);
  font-size: 14px;
  margin: 0;
  transition: color 0.3s;
}

.platform-specific-form.sf-unified .upload-hint {
  color: rgba(var(--sf-accent-rgb), 0.6);
  font-size: 12px;
  margin-top: 8px;
  display: block;
  transition: color 0.3s;
}


.bg-gradient-custom {
  background: var(--primary-gradient-dark) !important;
}

body.light-mode .bg-gradient-custom {
  background: var(--primary-gradient-light) !important;
}

.text-brand {
  color: var(--brand-color-dark) !important;
}

body.light-mode .text-brand {
  color: var(--brand-color-light) !important;
}

.border-brand {
  border-color: var(--brand-color-dark) !important;
}

body.light-mode .border-brand {
  border-color: var(--brand-color-light) !important;
}

/* Override Bootstrap's white backgrounds in dark mode */
body:not(.light-mode) .bg-white {
  background-color: var(--card-bg-dark) !important;
}

body:not(.light-mode) .text-black {
  color: var(--text-dark) !important;
}

/* Custom scrollbar for dark mode */
body:not(.light-mode) ::-webkit-scrollbar {
  width: 8px;
}

body:not(.light-mode) ::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

body:not(.light-mode) ::-webkit-scrollbar-thumb {
  background: var(--brand-color-dark);
  border-radius: 4px;
}

body:not(.light-mode) ::-webkit-scrollbar-thumb:hover {
  background: #985eff;
}

/* Light mode scrollbar */
body.light-mode ::-webkit-scrollbar {
  width: 8px;
}

body.light-mode ::-webkit-scrollbar-track {
  background: var(--bg-light);
}

body.light-mode ::-webkit-scrollbar-thumb {
  background: var(--brand-color-light);
  border-radius: 4px;
}

body.light-mode ::-webkit-scrollbar-thumb:hover {
  background: #c7258f;
}

/* =============================================================================
   ICONOS DE PLATAFORMA X (TWITTER) - ADAPTACIÓN DARK/LIGHT MODE
   ============================================================================= */

/* Icono X/Twitter en modo oscuro (default) - blanco */
.fa-x-twitter,
.x-icon {
  color: #ffffff !important;
  fill: #ffffff !important;
  transition: color 0.3s ease, fill 0.3s ease;
}

/* Icono X/Twitter en modo claro - negro */
body.light-mode .fa-x-twitter,
body.light-mode .x-icon {
  color: #000000 !important;
  fill: #000000 !important;
}

/* Estados hover para iconos X */
.fa-x-twitter:hover,
.x-icon:hover {
  opacity: 0.8;
  transform: scale(1.05);
  transition: all 0.3s ease;
}

/* Para botones que contienen iconos X */
.btn .fa-x-twitter,
.btn .x-icon,
.platform-card .fa-x-twitter,
.platform-card .x-icon {
  color: inherit !important;
  fill: inherit !important;
}

/* Asegurar que los SVG de X respeten el modo */
.x-bg .x-icon,
.x-bg .fa-x-twitter {
  color: #ffffff !important;
  fill: #ffffff !important;
}

body.light-mode .x-bg .x-icon,
body.light-mode .x-bg .fa-x-twitter {
  color: #ffffff !important;
  fill: #ffffff !important;
}

/* =============================================================================
   MEJORAS GENERALES DE UI/UX - FLU
   ============================================================================= */

/* Animaciones mejoradas para formularios */
@keyframes smoothFadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes buttonPulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.02);
  }

  100% {
    transform: scale(1);
  }
}

/* Fade in/out animations for manual style section */
@keyframes fadeInManualStyle {
  from {
    opacity: 0;
    transform: translateY(-10px);
    visibility: hidden;
  }

  to {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
  }
}

@keyframes fadeOutManualStyle {
  from {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
  }

  to {
    opacity: 0;
    transform: translateY(-10px);
    visibility: hidden;
  }
}

.manual-style-section {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.manual-style-section.fade-in {
  animation: fadeInManualStyle 0.3s ease forwards;
}

.manual-style-section.fade-out {
  animation: fadeOutManualStyle 0.3s ease forwards;
}

/* Clases de animación para elementos de formulario */
.form-section-fade-in {
  animation: smoothFadeIn 0.6s ease forwards;
  opacity: 0;
}

.form-section-fade-in.delay-1 {
  animation-delay: 0.1s;
}

.form-section-fade-in.delay-2 {
  animation-delay: 0.2s;
}

.form-section-fade-in.delay-3 {
  animation-delay: 0.3s;
}

.form-section-fade-in.delay-4 {
  animation-delay: 0.4s;
}

/* Botones mejorados con mejor feedback */
.btn {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 8px;
  font-weight: 500;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s;
}

.btn:hover::before {
  left: 100%;
}

/* Disable shimmer effect for notification bell */
.notif-bell::before {
  display: none !important;
}

.notif-bell:hover::before {
  display: none !important;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Botones de formulario específicos */
.btn-primary {
  background: linear-gradient(135deg, var(--brand-color-dark), #9147ff);
  border: none;
  color: white;
}

body.light-mode .btn-primary {
  background: linear-gradient(135deg, var(--brand-color-light), #e91e63);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #9147ff, #7c4dff);
  color: white;
}

body.light-mode .btn-primary:hover {
  background: linear-gradient(135deg, #e91e63, #d81b60);
  color: white;
}

/* Mejoras para campos de entrada */
.form-control:focus {
  box-shadow: 0 0 0 0.25rem rgba(var(--brand-color-dark-rgb, 187, 134, 252), 0.25);
  border-color: var(--brand-color-dark);
  transform: scale(1.01);
}

body.light-mode .form-control:focus {
  box-shadow: 0 0 0 0.25rem rgba(var(--brand-color-light-rgb, 225, 48, 108), 0.25);
  border-color: var(--brand-color-light);
}

/* Indicadores de progreso mejorados */
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--brand-color-dark), #9147ff);
  color: white;
  border-radius: 50%;
  font-weight: 600;
  font-size: 0.9rem;
  margin-right: 10px;
  animation: buttonPulse 2s infinite;
}

body.light-mode .step-number {
  background: linear-gradient(135deg, var(--brand-color-light), #e91e63);
}

/* Loading states mejorados */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
}

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

/* Mejoras responsive */
@media (max-width: 768px) {
  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }

  .form-control {
    padding: 0.75rem;
    font-size: 1rem;
  }

  .step-number {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }
}

/* Tooltips mejorados */
.tooltip-inner {
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Estados de hover para elementos interactivos */
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mejoras para selects y dropdowns */
.form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
  background-size: 16px 12px;
  background-position: right 12px center;
  background-repeat: no-repeat;
}

body.light-mode .form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23000000' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
}

/* Feedback visual mejorado para validaciones */
.was-validated .form-control:invalid {
  border-color: #dc3545;
  animation: shake 0.5s ease-in-out;
}

.was-validated .form-control:valid {
  border-color: #28a745;
  animation: successPulse 0.5s ease-in-out;
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-5px);
  }

  75% {
    transform: translateX(5px);
  }
}

@keyframes successPulse {
  0% {
    border-color: #28a745;
  }

  50% {
    border-color: #20c997;
  }

  100% {
    border-color: #28a745;
  }
}

/* Mejoras para elementos de carga */
.btn.loading {
  pointer-events: none;
  opacity: 0.8;
}

.btn.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  margin: -10px 0 0 -10px;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* =============================================================================
   PLATFORM SELECTION CARDS
   ============================================================================= */

.platforms-selection {
  margin-bottom: 1.5rem;
}

.platforms-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}

.platform-card {
  background: var(--card-bg-dark);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.25rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  min-height: 100px;
  width: 100%;
}

body.light-mode .platform-card {
  background: var(--card-bg-light);
  border-color: rgba(0, 0, 0, 0.1);
}

.platform-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.2);
}

body.light-mode .platform-card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border-color: rgba(0, 0, 0, 0.2);
}

.platform-card.connected {
  border-left: 4px solid var(--success-color);
}

.platform-card.disconnected {
  border-left: 4px solid var(--warning-color);
  opacity: 0.7;
}

.platform-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.platform-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.platform-icon i {
  color: white;
}

.platform-icon.instagram {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.platform-icon.facebook {
  background: #3b5998;
}

.platform-icon.linkedin {
  background: #0e76a8;
}

.platform-icon.x {
  background: #000000;
}

.platform-info {
  flex: 1;
}

.platform-name {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-dark);
  margin-bottom: 0.3rem;
}

body.light-mode .platform-name {
  color: var(--text-light);
}

.connection-status {
  font-size: 0.95rem;
  color: var(--text-muted-dark);
  font-weight: 500;
}

body.light-mode .connection-status {
  color: var(--text-muted-light);
}

.platform-toggle {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.platform-toggle .form-check-input {
  width: 1.4rem;
  height: 1.4rem;
  cursor: pointer;
  margin: 0;
}

.platform-toggle .btn {
  font-size: 0.85rem;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
}

.platform-preview {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1rem;
  min-height: 60px;
}

body.light-mode .platform-preview {
  background: rgba(0, 0, 0, 0.08);
}

.caption-preview-short {
  font-size: 0.9rem;
  color: var(--text-muted-dark);
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

body.light-mode .caption-preview-short {
  color: var(--text-muted-light);
}

/* Platform-specific styling */
.platform-card[data-platform="instagram"] .platform-icon i {
  color: #C13584;
}

.platform-card[data-platform="facebook"] .platform-icon i {
  color: #3b5998;
}

.platform-card[data-platform="linkedin"] .platform-icon i {
  color: #0e76a8;
}

.platform-card[data-platform="x"] .platform-icon i {
  color: #000000;
}

/* Responsive design */
@media (max-width: 768px) {
  .platform-card {
    padding: 1rem;
    min-height: 90px;
  }

  .platform-header {
    gap: 0.75rem;
    margin-bottom: 0.75rem;
  }

  .platform-icon {
    width: 45px;
    height: 45px;
    font-size: 1.3rem;
  }

  .platform-name {
    font-size: 1rem;
  }

  .connection-status {
    font-size: 0.85rem;
  }

  .platform-preview {
    padding: 0.75rem;
    margin-top: 0.75rem;
    min-height: 50px;
  }

  .caption-preview-short {
    font-size: 0.85rem;
    -webkit-line-clamp: 2;
  }
}

/* =============================================================================
   VISUAL BUG FIXES - Dropdown and Notification Badge
   ============================================================================= */

/* Fix for image history dropdown being cut off */
.image-collection-card {
  overflow: visible !important;
  contain: layout !important;
  z-index: 2 !important;
}

.calendar-card {
  z-index: 1 !important;
}

.image-collection-card .dropdown-menu {
  z-index: 9999 !important;
  position: absolute !important;
}

.image-collection-card .modern-dropdown-menu.image-history-dropdown {
  z-index: 99999 !important;
  position: absolute !important;
  margin-top: 0.5rem !important;
}

/* Fix for notification badge positioning */
.notif-bell {
  overflow: visible !important;
}

.notif-badge {
  position: absolute !important;
  top: -8px !important;
  right: -8px !important;
  z-index: 15 !important;
  box-shadow: none !important;
}

/* Ensure dropdown menus work properly in all contexts */
.dropdown-menu {
  z-index: 1050 !important;
}

.modern-dropdown-menu {
  z-index: 1050 !important;
}

/* Specific fix for image history dropdown in all contexts */
.image-history-dropdown {
  z-index: 9999 !important;
  position: absolute !important;
}

/* Light mode adjustments for notification badge */
body.light-mode .notif-badge {
  top: -8px !important;
  right: -8px !important;
  z-index: 15 !important;
}

/* -----------------------------------------------------------------------------
   Onboarding V2 + Brand DNA UI
----------------------------------------------------------------------------- */
body.onboarding-v2 {
  background: #151515;
}

.sf-brand-gradient {
  background: linear-gradient(135deg, #bb86fc 0%, #7c4dff 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
}

body.onboarding-v2 .navbar,
body.onboarding-v2 .footer {
  display: none !important;
}

body.onboarding-v2 > .container.mt-5.pt-5 {
  display: none !important;
}

body.onboarding-v2 main.flex-grow-1 {
  flex-grow: 0 !important;
}

body.onboarding-v2 main.flex-grow-1 > .container.mt-4 {
  width: 100%;
  max-width: none;
  margin-top: 0 !important;
  padding-right: 0;
  padding-left: 0;
}

.onboarding-start-shell {
  min-height: 78vh;
  padding: 5rem 1.5rem 6rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.onboarding-start-card {
  position: relative;
  max-width: 720px;
  width: 100%;
  border-radius: 28px;
  padding: 2.75rem 2.5rem;
  background: linear-gradient(145deg, rgba(30, 30, 30, 0.98), rgba(18, 18, 18, 0.98));
  border: 1px solid rgba(187, 134, 252, 0.25);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.onboarding-start-card::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  height: 260px;
  width: 260px;
  background: radial-gradient(circle, rgba(187, 134, 252, 0.35), transparent 65%);
  opacity: 0.8;
}

.onboarding-start-card h1 {
  font-family: "Montserrat", sans-serif;
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: #f5f5f5;
}

.onboarding-start-card p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.05rem;
}

.onboarding-start-input {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.onboarding-start-input .form-control {
  flex: 1 1 320px;
  border-radius: 16px;
  background: #141414;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f5f5f5;
  padding: 0.85rem 1rem;
}

.onboarding-start-input .form-control::placeholder {
  color: rgba(245, 245, 245, 0.55);
}

.onboarding-start-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.onboarding-start-actions .btn {
  border-radius: 999px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
}

.onboarding-start-note {
  margin-top: 1.25rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
}

.onboarding-progress-panel {
  --onb-progress-brand: var(--brand-color-dark);
  --onb-progress-brand-rgb: var(--brand-color-dark-rgb);
  --onb-progress-gradient: var(--primary-gradient-dark);
  --onb-progress-text: var(--text-dark);
  --onb-progress-text-rgb: var(--text-dark-rgb);
  --onb-progress-surface: var(--card-bg-dark);
  width: 100%;
  margin-top: 0.85rem;
  padding: 1.05rem 1.15rem 1.15rem;
  border-radius: 18px;
  background: color-mix(in srgb, var(--onb-progress-surface) 88%, transparent);
  border: 1px solid color-mix(in srgb, var(--onb-progress-brand) 22%, transparent);
  color: var(--onb-progress-text);
  display: none;
  text-align: left;
  box-shadow: 0 16px 40px rgba(var(--onb-progress-brand-rgb), 0.14);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow: hidden;
}

body.light-mode .onboarding-progress-panel {
  --onb-progress-brand: var(--brand-color-light);
  --onb-progress-brand-rgb: var(--brand-color-light-rgb);
  --onb-progress-gradient: var(--primary-gradient-light);
  --onb-progress-text: var(--text-light);
  --onb-progress-text-rgb: var(--text-light-rgb);
  --onb-progress-surface: var(--card-bg-light);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.1);
}

.onboarding-progress-panel.is-active {
  display: block;
  animation: onboarding-progress-in 0.4s cubic-bezier(0.2, 0, 0, 1);
}

@keyframes onboarding-progress-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.onboarding-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0;
}

.onboarding-progress-panel:has(.onboarding-progress-row.show) .onboarding-progress-head,
.onboarding-progress-panel:has(.onboarding-progress-row.is-visible) .onboarding-progress-head,
.onboarding-progress-panel:has(.onboarding-progress-track) .onboarding-progress-head,
.onboarding-progress-panel:has(.onboarding-progress-error:not([hidden])) .onboarding-progress-head,
.onboarding-progress-panel:has(.onboarding-progress-done:not([hidden])) .onboarding-progress-head {
  margin-bottom: 0.85rem;
}

/* Compact start: only head until track/body are in the open sheet.
   Track is always in DOM while main is visible, so keep head spacing once active main shows. */
.onboarding-progress-panel.is-active:not(.has-error):not(.is-complete) .onboarding-progress-head {
  margin-bottom: 0.85rem;
}

.onboarding-progress-status {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  color: rgba(var(--onb-progress-text-rgb), 0.72);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
}

.onboarding-progress-status [data-progress-stage-label] {
  min-width: 0;
}

.onboarding-progress-pulse {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--onb-progress-brand);
  animation: onboarding-status-pulse 1.1s ease infinite;
}

.onboarding-progress-pulse.done {
  background: #34d399;
  animation: none;
}

.onboarding-progress-pulse.error {
  background: #f87171;
  animation: none;
}

@keyframes onboarding-status-pulse {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 1;
  }
}

.onboarding-progress-badge {
  flex-shrink: 0;
  font-family: "Montserrat", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--onb-progress-brand) 95%, white);
  background: color-mix(in srgb, var(--onb-progress-brand) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--onb-progress-brand) 28%, transparent);
  border-radius: 999px;
  padding: 0.28rem 0.65rem;
  white-space: nowrap;
}

.onboarding-progress-panel.has-error .onboarding-progress-badge {
  opacity: 0.55;
}

.onboarding-progress-panel.is-complete .onboarding-progress-main {
  display: none;
}

.onboarding-progress-track {
  position: relative;
  height: 5px;
  border-radius: 999px;
  background: rgba(var(--onb-progress-text-rgb), 0.08);
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.onboarding-progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: inherit;
  background: var(--onb-progress-gradient);
  transition: width 0.28s ease;
}

.onboarding-progress-stages {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.35rem;
  padding: 0;
}

.onboarding-progress-stage {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0.22rem 0.58rem;
  border-radius: 999px;
  border: 1px solid rgba(var(--onb-progress-text-rgb), 0.1);
  background: rgba(var(--onb-progress-text-rgb), 0.04);
  color: rgba(var(--onb-progress-text-rgb), 0.48);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.onboarding-progress-stage.is-active {
  color: var(--onb-progress-text);
  border-color: color-mix(in srgb, var(--onb-progress-brand) 34%, transparent);
  background: color-mix(in srgb, var(--onb-progress-brand) 14%, transparent);
}

.onboarding-progress-stage.is-done {
  color: rgba(var(--onb-progress-text-rgb), 0.78);
  border-color: color-mix(in srgb, var(--onb-progress-brand) 22%, transparent);
  background: color-mix(in srgb, var(--onb-progress-brand) 8%, transparent);
}

.onboarding-progress-body {
  display: flex;
  flex-direction: column;
}

.onboarding-progress-row {
  display: none;
  align-items: center;
  gap: 0.85rem;
  margin: 0.55rem 0 0;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.onboarding-progress-row.show,
.onboarding-progress-row.is-visible {
  display: flex;
  opacity: 1;
  transform: none;
}

.onboarding-progress-k {
  width: 4.75rem;
  flex-shrink: 0;
  font-family: "Montserrat", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(var(--onb-progress-text-rgb), 0.45);
}

.onboarding-progress-tag {
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--onb-progress-brand) 14%, transparent);
  color: color-mix(in srgb, var(--onb-progress-brand) 82%, white);
  border: 1px solid color-mix(in srgb, var(--onb-progress-brand) 28%, transparent);
}

body.light-mode .onboarding-progress-tag {
  color: color-mix(in srgb, var(--onb-progress-brand) 88%, black);
}

.onboarding-progress-tag.papel {
  background: rgba(var(--onb-progress-text-rgb), 0.06);
  color: rgba(var(--onb-progress-text-rgb), 0.88);
  border-color: rgba(var(--onb-progress-text-rgb), 0.12);
}

.onboarding-progress-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.onboarding-result-logo {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(var(--onb-progress-text-rgb), 0.08);
  border: 1px solid rgba(var(--onb-progress-text-rgb), 0.1);
  overflow: hidden;
}

.onboarding-result-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.onboarding-result-swatch {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 0.45rem;
  border: 1px solid rgba(var(--onb-progress-text-rgb), 0.18);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
  transform: scale(0.6);
  opacity: 0;
  animation: onboarding-swatch-in 0.3s ease forwards;
}

@keyframes onboarding-swatch-in {
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.onboarding-progress-slow {
  margin: 0.75rem 0 0;
  color: rgba(var(--onb-progress-text-rgb), 0.58);
  font-size: 0.84rem;
  font-weight: 600;
}

.onboarding-progress-error,
.onboarding-progress-done {
  text-align: center;
  padding: 0.35rem 0.15rem 0.15rem;
}

.onboarding-progress-error strong,
.onboarding-progress-done {
  color: var(--onb-progress-text);
  font-size: 1rem;
  font-weight: 800;
}

.onboarding-progress-error p {
  margin: 0.35rem auto 0.9rem;
  max-width: 420px;
  color: rgba(var(--onb-progress-text-rgb), 0.62);
  font-size: 0.9rem;
}

.onboarding-progress-error-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.onboarding-progress-retry {
  border: 0;
  border-radius: 999px;
  padding: 0.62rem 1rem;
  color: var(--card-bg-light);
  background: var(--onb-progress-gradient);
  font-weight: 800;
}

.onboarding-progress-error-actions a {
  color: var(--onb-progress-brand);
  font-size: 0.9rem;
  font-weight: 750;
  text-decoration: none;
}

.onboarding-progress-error-actions a:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.onboarding-progress-done {
  animation: onboarding-progress-in 0.28s ease-out both;
}

@media (max-width: 767px) {
  .onboarding-progress-head {
    align-items: flex-start;
  }

  .onboarding-progress-row {
    align-items: flex-start;
  }

  .onboarding-progress-k {
    width: 4.2rem;
    padding-top: 0.35rem;
  }

  .onboarding-progress-error-actions {
    flex-direction: column;
  }

  .onboarding-progress-retry,
  .onboarding-progress-error-actions a {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .onboarding-progress-panel.is-active,
  .onboarding-progress-fill,
  .onboarding-progress-pulse,
  .onboarding-progress-row,
  .onboarding-result-swatch,
  .onboarding-progress-done {
    animation: none !important;
    transition: none !important;
  }

  .onboarding-progress-row.show,
  .onboarding-progress-row.is-visible {
    opacity: 1;
    transform: none;
  }

  .onboarding-result-swatch {
    opacity: 1;
    transform: none;
  }
}

.brand-dna-shell {
  padding: 3.5rem 1.5rem 8rem;
  max-width: 1200px;
  margin: 0 auto;
}

.brand-dna-header {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 2.5rem;
}

.brand-dna-kicker {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(187, 134, 252, 0.9);
}

.brand-dna-title {
  font-family: "Montserrat", sans-serif;
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 700;
  color: #f5f5f5;
}

.brand-dna-title .dna-title-accent {
  color: #bb86fc;
}

/* ===== Shared profile-tab-cards tablist (used by profile + onboarding Brand DNA) ===== */
.profile-tab-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}
.profile-tab-card {
  display: flex;
  align-items: stretch;
  gap: 1.1rem;
  padding: 1.25rem 1.4rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.25s ease, background 0.25s ease,
              box-shadow 0.25s ease;
}
.profile-tab-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.18);
}
.profile-tab-card.active {
  background: linear-gradient(135deg, var(--brand-color-dark, #bb86fc) 0%, #7c4dff 100%);
  border-color: transparent;
  box-shadow: 0 8px 24px -6px rgba(124, 77, 255, 0.4);
}
body.light-mode .profile-tab-card {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.1);
}
body.light-mode .profile-tab-card:hover {
  background: rgba(255, 255, 255, 1);
  border-color: rgba(0, 0, 0, 0.18);
}
body.light-mode .profile-tab-card.active {
  background: linear-gradient(135deg, var(--brand-color-light, #E1306C) 0%, #F77737 100%);
  box-shadow: 0 8px 24px -6px rgba(225, 48, 108, 0.35);
}
.profile-tab-card__media {
  flex: 0 0 84px;
  width: 84px;
  height: 84px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.7);
  transition: background 0.25s ease, color 0.25s ease;
}
.profile-tab-card.active .profile-tab-card__media {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}
body.light-mode .profile-tab-card__media {
  background: rgba(0, 0, 0, 0.05);
  color: rgba(17, 24, 39, 0.6);
}
body.light-mode .profile-tab-card.active .profile-tab-card__media {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}
.profile-tab-card__media img { width: 100%; height: 100%; object-fit: cover; }
.profile-tab-card__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
  min-width: 0;
}
.profile-tab-card__title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.profile-tab-card__desc {
  font-size: 0.85rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.6);
}
.profile-tab-card.active .profile-tab-card__desc { color: rgba(255, 255, 255, 0.88); }
body.light-mode .profile-tab-card__desc { color: rgba(17, 24, 39, 0.6); }
body.light-mode .profile-tab-card.active .profile-tab-card__desc { color: rgba(255, 255, 255, 0.9); }

/* Onboarding Brand DNA uses a 3-column tab strip; profile keeps its 2-column
   layout (its inline .profile-clean-personalization override still wins there). */
.brand-dna-shell .profile-tab-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 575.98px) {
  .profile-tab-cards { grid-template-columns: 1fr; }
  .brand-dna-shell .profile-tab-cards { grid-template-columns: 1fr; }
  .profile-tab-card__media { flex-basis: 64px; width: 64px; height: 64px; font-size: 1.5rem; }
  .profile-tab-card__title { font-size: 1.1rem; }
}

/* ===== Brand DNA section headers (shared) ===== */
.profile-section-header { margin-bottom: 1.25rem; }
.profile-section-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--flu-text, #fff);
  margin-bottom: 0.25rem;
}
.profile-section-desc {
  font-size: 0.9rem;
  color: var(--flu-text-muted, rgba(255, 255, 255, 0.6));
  margin: 0;
}
body.light-mode .profile-section-title { color: var(--flu-text, #1a1a2e); }
body.light-mode .profile-section-desc { color: rgba(17, 24, 39, 0.65); }

/* ===== Sugerir con IA: card actions, button, badge ===== */
.dna-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.dna-suggest-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px dashed rgba(187, 134, 252, 0.55);
  background: rgba(187, 134, 252, 0.1);
  color: var(--flu-accent, #bb86fc);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.dna-suggest-btn:hover {
  background: rgba(187, 134, 252, 0.2);
  border-color: rgba(187, 134, 252, 0.85);
  transform: translateY(-1px);
}
.dna-suggest-btn[disabled] { opacity: 0.6; cursor: progress; }
body.light-mode .dna-suggest-btn {
  border-color: rgba(225, 48, 108, 0.5);
  background: rgba(225, 48, 108, 0.08);
  color: var(--flu-accent, #E1306C);
}
body.light-mode .dna-suggest-btn:hover {
  background: rgba(225, 48, 108, 0.16);
  border-color: rgba(225, 48, 108, 0.85);
}

.dna-suggested-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(187, 134, 252, 0.18);
  color: var(--flu-accent, #bb86fc);
  border: 1px solid rgba(187, 134, 252, 0.4);
  margin-left: 0.4rem;
}
body.light-mode .dna-suggested-badge {
  background: rgba(225, 48, 108, 0.12);
  color: var(--flu-accent, #E1306C);
  border-color: rgba(225, 48, 108, 0.4);
}

/* Accent-tinted border on a card whose value came from AI suggestion */
.dna-card[data-field-source="suggested"] {
  border-color: rgba(187, 134, 252, 0.5);
  box-shadow: 0 0 0 1px rgba(187, 134, 252, 0.25) inset;
}
body.light-mode .dna-card[data-field-source="suggested"] {
  border-color: rgba(225, 48, 108, 0.5);
  box-shadow: 0 0 0 1px rgba(225, 48, 108, 0.25) inset;
}

/* ===== Language chips (read-only, ≤40-char fragments) ===== */
.dna-language-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.6rem;
}
.dna-language-chips .dna-chip {
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--flu-text, #fff);
  font-size: 0.8rem;
}
body.light-mode .dna-language-chips .dna-chip {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.12);
  color: var(--flu-text, #1a1a2e);
}

/* ===== Brand DNA review-first board (onboarding only) =====
   Bounded workspace: board (segments + bento + dock) + desktop guide rail.
   Additive — profile.html keeps its own inline layout, unaffected. */
.brand-dna-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}
@media (min-width: 1200px) {
  .brand-dna-workspace {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
}

.brand-dna-board {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.025);
  padding: 1.25rem;
  min-width: 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 5.5rem;
  max-height: calc(100vh - 7.5rem);
  overflow: hidden;
}
/* Segments + dock stay pinned; the bento scrolls inside the board. */
.brand-dna-board > .brand-dna-segments { flex-shrink: 0; }
.brand-dna-board > .tab-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.4rem;
}
.brand-dna-board > .brand-dna-dock { flex-shrink: 0; }
body.light-mode .brand-dna-board {
  border-color: rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.6);
}

/* Segmented tab strip (replaces the heavy mini-hero tab cards) */
.brand-dna-segments {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 1.25rem;
  padding-bottom: 0.25rem;
}
.brand-dna-segment {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 10px 10px 0 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.brand-dna-segment i { font-size: 0.85rem; opacity: 0.8; }
.brand-dna-segment:hover {
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.04);
}
.brand-dna-segment.active,
.brand-dna-segment[aria-selected="true"] {
  color: var(--flu-accent, #bb86fc);
  border-bottom-color: var(--flu-accent, #bb86fc);
}
body.light-mode .brand-dna-segments { border-bottom-color: rgba(0, 0, 0, 0.08); }
body.light-mode .brand-dna-segment { color: rgba(17, 24, 39, 0.55); }
body.light-mode .brand-dna-segment:hover {
  color: rgba(17, 24, 39, 0.85);
  background: rgba(0, 0, 0, 0.04);
}
body.light-mode .brand-dna-segment.active,
body.light-mode .brand-dna-segment[aria-selected="true"] {
  color: var(--flu-accent, #E1306C);
  border-bottom-color: var(--flu-accent, #E1306C);
}

/* In-board dock (replaces the floating sticky footer) */
.brand-dna-dock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
  padding: 0.9rem 1.1rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
}
.brand-dna-dock .dna-actions-hint {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}
.brand-dna-dock .dna-submit-btn {
  background: linear-gradient(135deg, #bb86fc 0%, #7c4dff 100%);
  color: #fff;
  border: none;
  padding: 0.7rem 1.8rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  box-shadow: 0 4px 15px rgba(124, 77, 255, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  min-width: 200px;
}
.brand-dna-dock .dna-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(124, 77, 255, 0.42);
  filter: brightness(1.05);
}
body.light-mode .brand-dna-dock {
  border-color: rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.7);
}
body.light-mode .brand-dna-dock .dna-actions-hint { color: rgba(17, 24, 39, 0.65); }
body.light-mode .brand-dna-dock .dna-submit-btn {
  background: linear-gradient(135deg, #E1306C 0%, #F77737 100%);
  box-shadow: 0 4px 15px rgba(225, 48, 108, 0.3);
}
body.light-mode .brand-dna-dock .dna-submit-btn:hover {
  box-shadow: 0 8px 24px rgba(225, 48, 108, 0.42);
}

/* Desktop guide rail (hidden below 1200px) */
.brand-dna-rail {
  display: none;
  position: sticky;
  top: 5.5rem;
  flex-direction: column;
  gap: 1rem;
}
@media (min-width: 1200px) {
  .brand-dna-rail { display: flex; }
}
.dna-rail-section {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.025);
}
body.light-mode .dna-rail-section {
  border-color: rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.6);
}
.dna-rail-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--flu-text, #fff);
  margin: 0 0 0.5rem;
}
.dna-rail-title i { font-size: 0.75rem; color: var(--flu-accent, #bb86fc); }
.dna-rail-count {
  margin-left: 0.35rem;
  padding: 0 0.45rem;
  border-radius: 999px;
  background: rgba(187, 134, 252, 0.2);
  color: var(--flu-accent, #bb86fc);
  font-size: 0.72rem;
}
.dna-rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.dna-rail-list li {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.3;
}
.dna-rail-item {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.35rem 0.5rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.dna-rail-item:hover {
  background: rgba(187, 134, 252, 0.14);
  color: #fff;
}
.dna-rail-item:focus-visible {
  outline: 2px solid var(--flu-accent, #bb86fc);
  outline-offset: 1px;
}
.dna-rail-empty {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
  font-style: italic;
}
body.light-mode .dna-rail-title { color: var(--flu-text, #1a1a2e); }
body.light-mode .dna-rail-title i { color: var(--flu-accent, #E1306C); }
body.light-mode .dna-rail-count {
  background: rgba(225, 48, 108, 0.14);
  color: var(--flu-accent, #E1306C);
}
body.light-mode .dna-rail-list li { color: rgba(17, 24, 39, 0.7); }
body.light-mode .dna-rail-item:hover {
  background: rgba(225, 48, 108, 0.1);
  color: #111827;
}
body.light-mode .dna-rail-item:focus-visible {
  outline-color: var(--flu-accent, #E1306C);
}
body.light-mode .dna-rail-empty { color: rgba(17, 24, 39, 0.45); }

.dna-card.is-rail-target {
  animation: dna-rail-pulse 1.3s ease;
}
@keyframes dna-rail-pulse {
  0% { box-shadow: 0 0 0 0 rgba(187, 134, 252, 0.55); }
  40% { box-shadow: 0 0 0 6px rgba(187, 134, 252, 0.22); }
  100% { box-shadow: 0 0 0 0 rgba(187, 134, 252, 0); }
}
body.light-mode .dna-card.is-rail-target {
  animation-name: dna-rail-pulse-light;
}
@keyframes dna-rail-pulse-light {
  0% { box-shadow: 0 0 0 0 rgba(225, 48, 108, 0.45); }
  40% { box-shadow: 0 0 0 6px rgba(225, 48, 108, 0.18); }
  100% { box-shadow: 0 0 0 0 rgba(225, 48, 108, 0); }
}

/* Secondary control card (e.g. emojis toggle) — lower visual weight */
.dna-card--secondary {
  background: rgba(255, 255, 255, 0.02);
  padding: 0.9rem 1rem;
}
.dna-card--secondary:hover {
  transform: none;
  box-shadow: none;
}
body.light-mode .dna-card--secondary {
  background: rgba(0, 0, 0, 0.015);
}

.brand-dna-subtitle {
  color: rgba(255, 255, 255, 0.7);
  max-width: 640px;
}

.dna-form .form-label {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
}

.dna-form .form-control,
.dna-form .form-select {
  background: #121212;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f5f5f5;
  border-radius: 16px;
  padding: 0.75rem 0.95rem;
}

.dna-form textarea {
  background: #121212;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f5f5f5;
  border-radius: 16px;
  padding: 0.75rem 0.95rem;
}

.dna-form textarea.dna-textarea-transparent {
  background: transparent;
  border: none;
  box-shadow: none;
}

.dna-form .form-control:focus,
.dna-form .form-select:focus,
.dna-form textarea:focus {
  border-color: rgba(187, 134, 252, 0.7);
  box-shadow: 0 0 0 0.2rem rgba(187, 134, 252, 0.18);
}

.dna-pill {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.25rem 1.5rem;
  border-radius: 999px;
  background: rgba(187, 134, 252, 0.12);
  border: 1px solid rgba(187, 134, 252, 0.3);
}

.dna-pill input {
  background: transparent;
  border: none;
  color: #f5f5f5;
  font-size: 1.05rem;
}

.dna-pill input:focus {
  outline: none;
  box-shadow: none;
}

.dna-logo-preview {
  width: 88px;
  height: 88px;
  border-radius: 18px;
  background: rgba(10, 10, 10, 0.6);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.6);
}

.dna-logo-preview img {
  max-width: 100%;
  max-height: 100%;
}

.dna-color-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.dna-color-chip {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

.dna-color-chip input[type="color"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.dna-color-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #1f1f1f;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.7rem;
}

.dna-color-add {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px dashed rgba(187, 134, 252, 0.5);
  background: transparent;
  color: rgba(187, 134, 252, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.dna-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.dna-chip {
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.85rem;
}

.dna-floating-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1055;
  background: rgba(18, 18, 18, 0.92);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1rem 1.5rem;
  backdrop-filter: blur(12px);
}

.dna-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  align-items: center;
}

.dna-footer-card {
  background: rgba(30, 30, 30, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 0.75rem;
}

.dna-footer-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(187, 134, 252, 0.7);
  margin-bottom: 0.4rem;
}

.dna-footer-copy {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

.dna-footer-action .btn {
  border-radius: 999px;
  padding: 0.8rem 1.8rem;
  font-weight: 600;
  width: 100%;
}

.dna-footer-spacer {
  height: 120px;
}

/* Brand DNA - New Layout */
.brand-dna-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(187, 134, 252, 0.25), rgba(225, 48, 108, 0.2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bb86fc;
  margin-bottom: 1rem;
}

.brand-dna-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.dna-half-card {
  margin-bottom: 0;
}

.dna-identity-card {
  margin-bottom: 0.5rem;
  background: #1e1e20;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.dna-brand-header {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dna-brand-name-input {
  background: transparent;
  border: none;
  font-size: 1.75rem;
  font-weight: 700;
  font-family: "Montserrat", sans-serif;
  color: #f5f5f5;
  padding: 0;
}

.dna-brand-name-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.dna-brand-name-input:focus {
  outline: none;
  box-shadow: none;
}

.dna-brand-url-input {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  max-width: 320px;
}

.dna-brand-url-input:focus {
  outline: none;
  border-color: rgba(187, 134, 252, 0.5);
}

.dna-logo-area {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dna-logo-preview {
  width: 100px;
  height: 100px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 2px dashed rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.dna-logo-placeholder {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.dna-font-preview {
  width: 100%;
  height: 80px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.dna-font-sample {
  font-size: 2.5rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.85);
  font-family: inherit;
}

/* Sticky Footer */
.brand-dna-sticky-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 180px;
  background: transparent;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 2rem;
  z-index: 99;
  pointer-events: none;
}

.brand-dna-sticky-footer .footer-content {
  pointer-events: auto;
  text-align: center;
  width: 100%;
  max-width: 1200px;
  padding: 0 1.5rem;
}

.brand-dna-sticky-footer .dna-actions-hint {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1rem;
}

.brand-dna-sticky-footer .dna-submit-btn {
  box-shadow: 0 4px 20px rgba(187, 134, 252, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  min-width: 240px;
}

.brand-dna-sticky-footer .dna-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(187, 134, 252, 0.5);
}

.brand-dna-sticky-footer .dna-submit-btn.is-saving,
.brand-dna-sticky-footer .dna-submit-btn.is-saved {
  transform: none;
}

.brand-dna-sticky-footer .dna-submit-btn.is-saving {
  animation: dna-submit-pulse 1.3s ease-in-out infinite;
  box-shadow: 0 10px 26px rgba(139, 92, 246, 0.42);
}

.brand-dna-sticky-footer .dna-submit-btn.is-saving [data-save-text] {
  display: inline-block;
  animation: dna-submit-text-float 1s ease-in-out infinite;
}

.brand-dna-sticky-footer .dna-submit-btn.is-saved {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  box-shadow: 0 12px 30px rgba(34, 197, 94, 0.32);
}

.brand-dna-sticky-footer .dna-actions-hint.is-error {
  color: #fca5a5;
}

.brand-dna-sticky-footer .dna-actions-hint.is-success {
  color: #bbf7d0;
}

/* Light Mode Sticky Footer */
body.light-mode .brand-dna-sticky-footer {
  background: transparent;
}

body.light-mode.onboarding-v2 .brand-dna-sticky-footer {
  background: transparent;
}

body.light-mode .brand-dna-sticky-footer .dna-actions-hint {
  color: #1a1a1a;
  text-shadow: none;
}

body.light-mode .brand-dna-sticky-footer .dna-submit-btn {
  box-shadow: 0 4px 20px rgba(225, 48, 108, 0.3);
}

body.light-mode .brand-dna-sticky-footer .dna-submit-btn.is-saving {
  box-shadow: 0 10px 26px rgba(225, 48, 108, 0.28);
}

body.light-mode .brand-dna-sticky-footer .dna-submit-btn.is-saved {
  box-shadow: 0 12px 30px rgba(34, 197, 94, 0.22);
}

.dna-actions-hint {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.dna-submit-btn {
  padding: 1rem 2.5rem;
  font-size: 1.05rem;
  border-radius: 999px;
  font-weight: 600;
  background-color: #8b5cf6;
  color: #fff;
  border: none;
}

.dna-submit-btn:hover {
  background-color: #7c3aed;
  color: #fff;
}

.modal .brand-dna-sticky-footer {
  position: static;
  height: auto;
  background: none;
  padding: 0;
  pointer-events: auto;
}

.modal .brand-dna-sticky-footer .footer-content {
  padding: 0;
}

.modal .brand-dna-sticky-footer .dna-actions-hint {
  display: none;
}

@media (max-width: 768px) {
  .brand-dna-row {
    grid-template-columns: 1fr;
  }

  .dna-brand-name-input {
    font-size: 1.4rem;
  }

  .dna-brand-url-input {
    max-width: 100%;
  }
}

@media (max-width: 900px) {
  .dna-footer-inner {
    grid-template-columns: 1fr;
  }

  .dna-footer-action {
    display: flex;
    justify-content: stretch;
  }

  .dna-floating-footer {
    padding-bottom: calc(1rem + env(safe-area-inset-bottom));
  }
}

body.light-mode.onboarding-v2 {
  background: #f0e6d2;
}

body.light-mode .onboarding-start-card {
  background: linear-gradient(145deg, #ffffff, #f0e6d2);
  border-color: rgba(225, 48, 108, 0.25);
}

body.light-mode .onboarding-start-card h1 {
  color: #1a1a1a;
}

body.light-mode .onboarding-start-card p,
body.light-mode .onboarding-start-note {
  color: rgba(26, 26, 26, 0.7);
}

body.light-mode .onboarding-start-input .form-control,
body.light-mode .dna-form .form-control,
body.light-mode .dna-form .form-select,
body.light-mode .dna-form textarea {
  background: #ffffff;
  color: #1a1a1a;
  border-color: rgba(0, 0, 0, 0.12);
}

body.light-mode .onboarding-start-input .form-control::placeholder {
  color: rgba(26, 26, 26, 0.5);
}

body.light-mode .brand-dna-title {
  color: #1a1a1a;
}

body.light-mode .brand-dna-title .dna-title-accent {
  color: #f77737;
}


body.light-mode .dna-pill {
  background: rgba(225, 48, 108, 0.12);
  border-color: rgba(225, 48, 108, 0.25);
}

body.light-mode .dna-chip {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.08);
  color: rgba(0, 0, 0, 0.7);
}

body.light-mode .dna-footer-card {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 0, 0, 0.08);
}

body.light-mode .dna-footer-copy {
  color: rgba(0, 0, 0, 0.6);
}

body.light-mode .dna-floating-footer {
  background: rgba(248, 240, 227, 0.95);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-mode .brand-dna-icon {
  background: linear-gradient(135deg, rgba(225, 48, 108, 0.15), rgba(187, 134, 252, 0.12));
  color: #e1306c;
}

body.light-mode .dna-identity-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .dna-brand-name-input {
  color: #1a1a1a;
}

body.light-mode .dna-brand-name-input::placeholder {
  color: rgba(0, 0, 0, 0.35);
}

body.light-mode .dna-brand-url-input {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.12);
  color: rgba(0, 0, 0, 0.7);
}

body.light-mode .dna-brand-url-input:focus {
  border-color: rgba(225, 48, 108, 0.5);
}

body.light-mode .dna-logo-preview {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.15);
}

body.light-mode .dna-logo-placeholder {
  color: rgba(0, 0, 0, 0.4);
}

body.light-mode .dna-font-preview {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.02));
  border-color: rgba(0, 0, 0, 0.08);
}

body.light-mode .dna-font-sample {
  color: rgba(0, 0, 0, 0.75);
}

body.light-mode .dna-actions-hint {
  color: rgba(0, 0, 0, 0.55);
}
/* =============================================================================
   BRAND DNA BENTO GRID (User Reference Implementation)
   ============================================================================= */

/* Main Container Override */
.brand-dna-shell {
  padding: 2rem 1rem 200px; /* Large bottom padding so footer doesn't cover content */
  max-width: 1000px;
  margin: 0 auto;
}

/* Header */
.brand-dna-header {
  text-align: center;
  margin-bottom: 3rem;
  display: block;
}

.brand-dna-header .icon {
  font-size: 24px;
  margin-bottom: 10px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.4);
}

/* Playfair .brand-dna-title override removed — Montserrat rule above wins
   (keeps profile + onboarding titles consistent, light + dark). */

.brand-dna-subtitle {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.95rem;
  font-family: "Inter", sans-serif;
  max-width: 100%;
}

/* Bento Grid System */
.dna-bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  grid-auto-rows: minmax(140px, auto);
}

/* Card Base */
.dna-card {
  background-color: #2c2c2e; /* Matches reference --card-bg */
  border: 1px solid #3a3a3c;  /* Matches reference --card-border */
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.dna-card:hover {
  border-color: #555;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.dna-card-label {
  font-size: 0.75rem;
  color: #a1a1a6; /* Matches reference --text-secondary */
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  font-family: "Inter", sans-serif;
}

/* Column Spans */
.col-span-4 { grid-column: span 4; }
.col-span-3 { grid-column: span 3; }
.col-span-2 { grid-column: span 2; }
.col-span-1 { grid-column: span 1; }

/* Responsive Grid */
@media (max-width: 992px) {
  .col-span-3 { grid-column: span 2; }
  .col-span-1 { grid-column: span 2; }
}

@media (max-width: 768px) {
  .brand-dna-shell { padding-bottom: 220px; }
  .dna-bento-grid { grid-template-columns: 1fr; }
  .col-span-4, .col-span-3, .col-span-2, .col-span-1 { grid-column: span 1; }
  .brand-dna-title { font-size: 1.8rem; }
}

/* 1. Identity Card (Top) */
.dna-identity-card {
  justify-content: center;
  min-height: 140px;
}

.dna-name-input {
  background: transparent;
  border: none;
  font-size: 2rem;
  color: #fff;
  font-family: inherit;
  width: 100%;
  padding: 0;
  margin-bottom: 0.25rem;
}

.dna-name-input:focus {
  outline: none;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
}

.dna-link-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #a1a1a6;
}

.dna-link-input {
  background: transparent;
  border: none;
  color: #a1a1a6;
  font-size: 0.9rem;
  width: 100%;
}

.dna-link-input:focus {
  outline: none;
  color: #fff;
}

/* 2. Logo Box */
.dna-logo-box {
  align-items: center;
  justify-content: center;
  background: transparent;
  padding: 0;
}

.dna-logo-preview-area {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
  border-radius: 12px;
}

body.light-mode .dna-logo-preview-area {
  background: rgba(0,0,0,0.03);
}

.dna-logo-preview-area img,
.dna-logo-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.dna-logo-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
  cursor: pointer;
}

.dna-logo-box:hover .dna-logo-overlay {
  opacity: 1;
}

.dna-logo-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}

.dna-logo-action-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0;
  cursor: pointer;
}

.dna-logo-action-btn:hover {
  color: #fff;
}

body.light-mode .dna-logo-action-btn {
  color: rgba(0, 0, 0, 0.6);
}

body.light-mode .dna-logo-action-btn:hover {
  color: #111;
}

/* Logo Crop Modal */
.dna-logo-crop-modal {
  max-width: 520px;
}

.dna-logo-crop-container {
  width: 100%;
  max-height: 380px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  margin: 1rem 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
}

.dna-logo-crop-container img {
  display: block;
  max-width: 100%;
}

.dna-logo-crop-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

body.light-mode .dna-logo-crop-container {
  background: rgba(0, 0, 0, 0.05);
}

/* 3. Fonts Box */
.dna-fonts-box {
  justify-content: center;
  align-items: center;
  text-align: center;
}

.dna-font-big-preview {
  font-size: 3rem;
  font-weight: 300;
  line-height: 1;
  margin-bottom: 0.5rem;
  color: #f5f5f5;
}

.dna-font-select {
  background: transparent;
  border: none;
  color: #a1a1a6;
  text-align: center;
  font-size: 0.9rem;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.dna-font-select:hover { color: #fff; }

/* 4. Colors Box */
.dna-colors-box {
  justify-content: flex-start;
}

.dna-palette {
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  padding-top: 10px;
}

.dna-color-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.dna-color-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.1);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  cursor: pointer;
  position: relative;
  overflow: visible;
}

.dna-color-circle input[type="color"] {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  padding: 0;
  margin: 0;
  border: none;
  cursor: pointer;
}

.dna-hex-code {
  font-family: monospace;
  color: #a1a1a6;
  font-size: 0.8rem;
  text-transform: uppercase;
}

/* 5. Text Cards (Slogan, Values, Aesthetics) */
.dna-textarea-transparent {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #fff;
  font-size: 1.05rem;
  line-height: 1.55;
  width: 100%;
  resize: vertical;
  padding: 14px 16px;
  min-height: 120px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dna-slogan-input {
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-size: 1.5rem;
}

.dna-textarea-transparent:focus {
  outline: none;
  background: rgba(255,255,255,0.06);
  border-color: rgba(187, 134, 252, 0.5);
  box-shadow: 0 0 0 3px rgba(187, 134, 252, 0.1);
}

.dna-textarea-transparent::placeholder {
  color: rgba(255,255,255,0.25);
  font-style: italic;
}

.dna-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dna-tag-input {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: #e0e0e0;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.9rem;
  min-width: 100px;
  flex-grow: 1;
}

.dna-tag-input:focus {
  outline: none;
  border-color: #777;
  background: rgba(255,255,255,0.1);
}

/* Decorative Line */
.dna-deco-line {
  margin-top: 20px;
  opacity: 0.3;
  width: 100%;
  height: 10px;
}

/* Sticky Footer */
.brand-dna-sticky-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 180px;
  background: transparent;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 2rem;
  z-index: 99;
  pointer-events: none;
}

.brand-dna-sticky-footer .footer-content {
  pointer-events: auto;
  text-align: center;
  width: 100%;
  max-width: 1200px;
  padding: 0 1.5rem;
}

.brand-dna-sticky-footer .dna-actions-hint {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1rem;
}

.brand-dna-sticky-footer .dna-submit-btn {
  background-color: #8b5cf6;
  color: #fff;
  border: none;
  padding: 12px 30px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 1rem;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
  transition: all 0.2s ease;
  min-width: 200px;
}

.brand-dna-sticky-footer .dna-submit-btn:hover {
  background-color: #7c3aed;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.4);
}

@keyframes dna-submit-pulse {
  0%,
  100% {
    transform: translateY(0);
    box-shadow: 0 8px 22px rgba(139, 92, 246, 0.28);
  }

  50% {
    transform: translateY(-1px);
    box-shadow: 0 14px 32px rgba(139, 92, 246, 0.38);
  }
}

@keyframes dna-submit-text-float {
  0%,
  100% {
    opacity: 0.92;
    transform: translateY(0);
  }

  50% {
    opacity: 1;
    transform: translateY(-0.5px);
  }
}

/* Light Mode Overrides for Bento */
body.light-mode .dna-card {
  background-color: #ffffff;
  border-color: #e5e5e5;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
body.light-mode .dna-name-input,
body.light-mode .dna-textarea-transparent {
  color: #1a1a1a;
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .dna-textarea-transparent:focus {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(225, 48, 108, 0.45);
  box-shadow: 0 0 0 3px rgba(225, 48, 108, 0.1);
}

body.light-mode .dna-textarea-transparent::placeholder {
  color: rgba(0,0,0,0.35);
}
body.light-mode .dna-textarea-transparent::placeholder {
  color: rgba(0,0,0,0.3);
}
body.light-mode .dna-card-label {
  color: #666;
}
body.light-mode .dna-tag-input {
  background: #f5f5f7;
  border-color: #e5e5e5;
  color: #333;
}
body.light-mode .dna-color-circle {
  border-color: rgba(0,0,0,0.1);
}
body.light-mode .brand-dna-title {
  color: #1a1a1a;
}

body.light-mode .brand-dna-title .dna-title-accent {
  color: #f77737;
}
body.light-mode .brand-dna-subtitle {
  color: #666;
}
body.light-mode .dna-logo-box {
  background: transparent;
}
body.light-mode .dna-link-wrapper {
  color: #666;
}
body.light-mode .dna-link-input {
  color: #666;
}

body.light-mode .brand-dna-sticky-footer {
  background: transparent;
}
body.light-mode .brand-dna-sticky-footer .dna-actions-hint {
  color: #1a1a1a;
  text-shadow: none;
}

/* =============================================================================
   BRAND DNA - MODALS & EDIT BUTTONS (Shared by onboarding and profile)
   ============================================================================= */

/* Card Header with Edit Button */
.dna-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.dna-card-header .dna-card-label {
  margin-bottom: 0;
}

/* Pencil Edit Button */
.dna-edit-btn {
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #bb86fc;
  transition: all 0.2s ease;
  opacity: 0;
  font-size: 0.8rem;
}

.dna-card:hover .dna-edit-btn {
  opacity: 1;
}

.dna-edit-btn:hover {
  background: rgba(139, 92, 246, 0.4);
  color: #d4b8ff;
  border-color: rgba(139, 92, 246, 0.5);
  transform: scale(1.05);
}

/* Edit button positioned in top-right corner for Logo and Fonts */
.dna-logo-box .dna-edit-btn,
.dna-fonts-box .dna-edit-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
}

.dna-logo-box .dna-card-header,
.dna-fonts-box .dna-card-header {
  position: static;
}

.dna-logo-box .dna-card-label,
.dna-fonts-box .dna-card-label {
  position: absolute;
  top: 15px;
  left: 15px;
}

/* Slogan Display (violet text) */
.dna-slogan-display {
  font-family: "Playfair Display", serif !important;
  color: #bb86fc;
  font-size: 1.5rem;
  font-style: italic;
  line-height: 1.5;
  white-space: pre-wrap;
}

.dna-font-big-preview {
  color: rgba(255, 255, 255, 0.85);
}

/* Font Name Display */
.dna-font-name {
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
}

/* Logo placeholder styling */
.dna-logo-placeholder {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.85rem;
}

/* Text Display (read-only view) */
.dna-text-display {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  line-height: 1.5;
  white-space: pre-wrap;
  max-height: 130px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}

body.light-mode .dna-text-display {
  color: rgba(0, 0, 0, 0.8);
}

body.light-mode .dna-slogan-display {
  color: #8b5cf6;
}

body.light-mode .dna-font-big-preview {
  color: #1f2937;
}

/* Placeholder-hint styling for read-only Brand DNA displays.
   Applied via .is-placeholder when the field is empty and the visible
   text is just a clue, so the hint no longer reads like filled content. */
.dna-text-display.is-placeholder,
.dna-font-name.is-placeholder {
  color: rgba(255, 255, 255, 0.36);
  font-style: italic;
}

.dna-slogan-display.is-placeholder {
  color: rgba(187, 134, 252, 0.45);
  opacity: 0.9;
}

body.light-mode .dna-text-display.is-placeholder,
body.light-mode .dna-font-name.is-placeholder {
  color: rgba(0, 0, 0, 0.42);
}

body.light-mode .dna-slogan-display.is-placeholder {
  color: rgba(139, 92, 246, 0.5);
}

/* Read-only chip (no ×) */
.dna-chip {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.85);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  display: inline-block;
}

body.light-mode .dna-chip {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.15);
  color: rgba(0, 0, 0, 0.8);
}

/* Editable chip in modal (with ×) */
.dna-chip-editable {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.9);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dna-chip-editable .remove-chip {
  cursor: pointer;
  opacity: 0.6;
  font-size: 1rem;
  line-height: 1;
}

.dna-chip-editable .remove-chip:hover {
  opacity: 1;
}

/* ===== UNIFIED MODAL STYLES ===== */
.dna-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  /* Short phones: allow overlay scroll so "Aplicar" stays reachable. */
  overflow-y: auto;
  padding: 16px 0;
  -webkit-overflow-scrolling: touch;
}

.dna-modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.dna-modal {
  background: #232325;
  border-radius: 20px;
  padding: 28px;
  width: 90%;
  max-width: 420px;
  position: relative;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
  /* Cap height so color composer + actions fit short viewports (568–667px). */
  max-height: 90vh;
  max-height: min(90dvh, 720px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.dna-modal-lg {
  max-width: 480px;
}

.dna-modal-text {
  max-width: 640px;
  width: 92%;
  padding: 32px;
}

.dna-modal-text .dna-modal-textarea {
  min-height: 280px;
  font-size: 1rem;
  line-height: 1.6;
  padding: 18px 22px;
}

.dna-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

.dna-modal-close:hover {
  color: #fff;
}

.dna-modal-title {
  color: #fff;
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.dna-modal-subtitle {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.dna-modal-input {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 14px 18px;
  color: #fff;
  width: 100%;
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.dna-modal-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.dna-modal-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.25);
}

.dna-modal-textarea {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 14px 18px;
  color: #fff;
  width: 100%;
  font-size: 0.95rem;
  margin-bottom: 20px;
  resize: vertical;
  min-height: 120px;
}

.dna-modal-textarea::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.dna-modal-textarea:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.25);
}

.dna-modal-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
  min-height: 40px;
}

.dna-modal-actions {
  display: flex;
  justify-content: flex-end;
}

.dna-color-modal-list {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  margin-bottom: 32px;
  padding: 20px 0;
}

.dna-color-modal-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
}

.dna-color-modal-circle {
  width: 72px;
  height: 72px;
  padding: 0;
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 2px solid transparent;
}

.dna-color-modal-circle:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.dna-color-modal-circle.has-border {
  border-color: rgba(255, 255, 255, 0.3);
}

.dna-color-modal-hex {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  font-family: monospace;
  text-transform: lowercase;
}

.dna-color-modal-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.dna-color-modal-count {
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.dna-color-modal-status {
  min-height: 1.25rem;
  margin: -0.75rem 0 0.75rem;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.82rem;
}

.dna-color-modal-status[data-status-type="error"] {
  color: #fca5a5;
}

.dna-color-modal-status[data-status-type="success"] {
  color: #86efac;
}

.dna-color-modal-empty {
  width: 100%;
  margin: 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
  text-align: center;
}

.dna-color-add-composer {
  margin: -0.5rem 0 1.5rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
}

.dna-color-add-label {
  display: block;
  margin-bottom: 0.7rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.82rem;
  font-weight: 600;
}

.dna-color-add-controls {
  display: grid;
  grid-template-columns: 48px minmax(120px, 1fr) auto auto;
  align-items: center;
  gap: 0.65rem;
}

.dna-color-add-controls input[type="color"] {
  width: 48px;
  height: 48px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
}

.dna-color-add-controls .dna-modal-input {
  margin: 0;
  padding: 0.75rem 0.9rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  text-transform: uppercase;
}

.dna-color-native-picker {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.dna-color-usage-label {
  display: block;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.76rem;
  font-weight: 600;
}

body.light-mode .dna-color-usage-label {
  color: rgba(15, 23, 42, 0.64);
}

@media (max-width: 620px) {
  .dna-color-add-controls {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .dna-color-add-controls .dna-modal-cancel,
  .dna-color-add-controls .dna-modal-apply {
    width: 100%;
  }
}

.dna-color-add-btn {
  background: transparent;
  border: none;
  color: #E1306C;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  padding: 8px 16px;
  transition: color 0.2s ease;
}

.dna-color-add-btn:hover {
  color: #F77737;
}

.dna-palette-readonly {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
  justify-content: space-around;
  align-items: center;
  flex: 1;
  min-height: 60px;
}

.dna-color-circle-readonly {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.dna-colors-box[data-edit-colors],
.dna-colors-palette-trigger[data-edit-colors] {
  cursor: default;
}

.dna-colors-box[data-edit-colors] .dna-palette-readonly,
.dna-colors-box[data-edit-colors] .dna-palette,
.dna-colors-palette-trigger[data-edit-colors] {
  cursor: pointer;
}

.dna-colors-box[data-edit-colors]:hover .dna-color-circle-readonly,
.dna-colors-palette-trigger[data-edit-colors]:hover .dna-color-circle-readonly {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
}

.calendar-card-heading {
  color: inherit;
}

.dna-color-circle,
.dna-color-circle-readonly,
.dna-color-modal-circle {
  border: 1px solid rgba(255, 255, 255, 0.18);
}

body.light-mode .dna-color-circle,
body.light-mode .dna-color-circle-readonly,
body.light-mode .dna-color-modal-circle {
  border-color: rgba(15, 23, 42, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.82);
}

.dna-color-circle.is-light-tone,
.dna-color-circle-readonly.is-light-tone,
.dna-color-modal-circle.is-light-tone,
.dna-color-modal-circle.has-border {
  border-color: rgba(15, 23, 42, 0.22) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.94), 0 0 0 1px rgba(15, 23, 42, 0.08);
}

body:not(.light-mode) .dna-color-circle.is-light-tone,
body:not(.light-mode) .dna-color-circle-readonly.is-light-tone,
body:not(.light-mode) .dna-color-modal-circle.is-light-tone,
body:not(.light-mode) .dna-color-modal-circle.has-border {
  border-color: rgba(255, 255, 255, 0.42) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.92), 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.profile-completeness {
  max-width: 320px;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.03) 100%);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(10px);
}

.profile-completeness__label {
  color: rgba(255, 255, 255, 0.68);
}

.profile-completeness__count {
  color: #f59e0b;
}

.profile-completeness__track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.profile-completeness__bar {
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #9147ff 0%, #6b46c1 100%);
  transition: width 0.35s ease;
}

.profile-completeness--is-success .profile-completeness__count {
  color: #22c55e;
}

.profile-completeness--is-warning .profile-completeness__count {
  color: #f59e0b;
}

.profile-completeness--is-danger .profile-completeness__count {
  color: #ef4444;
}

.profile-completeness--is-success .profile-completeness__bar {
  background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
}

.profile-completeness--is-warning .profile-completeness__bar {
  background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
}

.profile-completeness--is-danger .profile-completeness__bar {
  background: linear-gradient(90deg, #fb7185 0%, #ef4444 100%);
}

body.light-mode .profile-completeness {
  border-color: rgba(148, 163, 184, 0.32);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.96) 100%);
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.08);
}

body.light-mode .profile-completeness__label {
  color: rgba(15, 23, 42, 0.68);
}

body.light-mode .profile-completeness__track {
  background: rgba(148, 163, 184, 0.22);
}

body.light-mode .brand-dna-sticky-footer .dna-submit-btn {
  background: linear-gradient(135deg, var(--brand-color-light, #E1306C) 0%, #f77737 100%);
  color: #fff;
  border: none;
}

body.light-mode .brand-dna-sticky-footer .dna-submit-btn:hover {
  background: linear-gradient(135deg, #c2185b 0%, #e66a2c 100%);
  color: #fff;
}

body.light-mode .dna-slogan-display {
  color: #c0265d;
}

body.light-mode .social-network-item {
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(148, 163, 184, 0.22);
}

body.light-mode .social-network-btn:hover {
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
}

body.light-mode .social-network-icon.x {
  background: #111827;
  border-color: rgba(17, 24, 39, 0.2);
}

body.light-mode .social-connections-footer {
  color: var(--text-light, #1f2937);
}

.dna-modal-apply {
  background: rgba(139, 92, 246, 0.3);
  border: none;
  border-radius: 12px;
  padding: 12px 28px;
  color: #bb86fc;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.dna-modal-apply:hover {
  background: rgba(139, 92, 246, 0.5);
  color: #d4b8ff;
}

/* Font Modal Specific */
.dna-font-modal-preview {
  text-align: center;
  margin-bottom: 20px;
  padding: 20px;
}

.dna-font-modal-aa {
  display: block;
  font-size: 4rem;
  color: #bb86fc;
  line-height: 1;
  margin-bottom: 8px;
}

.dna-font-modal-name {
  display: block;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

.dna-font-modal-list {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 14px;
  padding: 8px;
  max-height: 220px;
  overflow-y: auto;
  margin-bottom: 20px;
}

.dna-font-option {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  padding: 12px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.15s ease;
}

.dna-font-option:hover {
  background: rgba(139, 92, 246, 0.15);
}

.dna-font-option.is-selected {
  background: rgba(139, 92, 246, 0.25);
  color: #bb86fc;
}

/* Category Modal Specific */
.dna-category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.dna-category-option {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 10px 18px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dna-category-option:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.3);
}

.dna-category-option.is-selected {
  background: rgba(139, 92, 246, 0.25);
  border-color: rgba(139, 92, 246, 0.5);
  color: #bb86fc;
}

/* Light mode — DNA modals (shared partial; includes .dna-modal-lg) */
body.light-mode .dna-modal-overlay {
  background: rgba(15, 23, 42, 0.45);
}

body.light-mode .dna-modal {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 25px 80px rgba(15, 23, 42, 0.18);
}

body.light-mode .dna-modal-close {
  color: rgba(17, 24, 39, 0.4);
}

body.light-mode .dna-modal-close:hover {
  color: #111827;
}

body.light-mode .dna-modal-title {
  color: #111827;
}

body.light-mode .dna-modal-subtitle {
  color: rgba(17, 24, 39, 0.55);
}

body.light-mode .dna-modal-input,
body.light-mode .dna-modal-textarea {
  background: rgba(17, 24, 39, 0.04);
  border-color: rgba(17, 24, 39, 0.12);
  color: #111827;
}

body.light-mode .dna-modal-input::placeholder,
body.light-mode .dna-modal-textarea::placeholder {
  color: rgba(17, 24, 39, 0.38);
}

body.light-mode .dna-modal-input:focus,
body.light-mode .dna-modal-textarea:focus {
  border-color: rgba(225, 48, 108, 0.45);
  box-shadow: 0 0 0 3px rgba(225, 48, 108, 0.12);
}

body.light-mode .dna-modal-apply {
  background: rgba(225, 48, 108, 0.12);
  color: #E1306C;
}

body.light-mode .dna-modal-apply:hover {
  background: rgba(225, 48, 108, 0.2);
  color: #c2185b;
}

body.light-mode .dna-chip-editable {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.15);
  color: rgba(0, 0, 0, 0.85);
}

body.light-mode .dna-chip-editable .remove-chip {
  color: rgba(17, 24, 39, 0.45);
}

body.light-mode .dna-chip-editable .remove-chip:hover {
  color: #111827;
}

body.light-mode .dna-color-modal-hex {
  color: rgba(17, 24, 39, 0.55);
}

body.light-mode .dna-color-modal-count,
body.light-mode .dna-color-modal-status,
body.light-mode .dna-color-modal-empty {
  color: rgba(17, 24, 39, 0.55);
}

body.light-mode .dna-color-modal-status[data-status-type="error"] {
  color: #b42318;
}

body.light-mode .dna-color-modal-status[data-status-type="success"] {
  color: #087443;
}

body.light-mode .dna-color-add-composer {
  border-color: rgba(17, 24, 39, 0.1);
  background: rgba(17, 24, 39, 0.03);
}

body.light-mode .dna-color-add-label {
  color: rgba(17, 24, 39, 0.72);
}

body.light-mode .dna-color-add-controls input[type="color"] {
  border-color: rgba(17, 24, 39, 0.15);
}

body.light-mode .dna-font-modal-aa {
  color: #E1306C;
}

body.light-mode .dna-font-modal-name {
  color: rgba(17, 24, 39, 0.5);
}

body.light-mode .dna-font-modal-list {
  background: rgba(17, 24, 39, 0.04);
  border: 1px solid rgba(17, 24, 39, 0.08);
}

body.light-mode .dna-font-option {
  color: rgba(17, 24, 39, 0.82);
}

body.light-mode .dna-font-option:hover {
  background: rgba(225, 48, 108, 0.1);
}

body.light-mode .dna-font-option.is-selected {
  background: rgba(225, 48, 108, 0.14);
  color: #E1306C;
}

body.light-mode .dna-category-option {
  background: rgba(17, 24, 39, 0.04);
  border-color: rgba(17, 24, 39, 0.12);
  color: rgba(17, 24, 39, 0.82);
}

body.light-mode .dna-category-option:hover {
  background: rgba(225, 48, 108, 0.1);
  border-color: rgba(225, 48, 108, 0.28);
}

body.light-mode .dna-category-option.is-selected {
  background: rgba(225, 48, 108, 0.14);
  border-color: rgba(225, 48, 108, 0.4);
  color: #E1306C;
}

/* Tags Container */
.dna-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 110px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}

/* Shared Brand DNA personalization controls */
.dna-colors-body {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 0.15rem;
}

.dna-colors-palette-trigger[data-edit-colors] {
  cursor: pointer;
}

.dna-colors-box .dna-palette-readonly {
  justify-content: flex-start;
  margin-top: 0;
  min-height: 0;
  flex: 0 0 auto;
}

.dna-color-usage-input {
  width: 100%;
  min-height: 4.25rem;
  margin-top: 0.15rem;
  resize: vertical;
  font-size: 0.92rem;
  line-height: 1.45;
  cursor: text;
}

.dna-social-composer-shell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  padding: 0.35rem 0.38rem 0.35rem 0.55rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.dna-social-composer-shell:focus-within {
  border-color: rgba(187, 134, 252, 0.52);
  background: rgba(255, 255, 255, 0.075);
  box-shadow: 0 0 0 3px rgba(187, 134, 252, 0.16);
}

.dna-social-composer-shell.has-error {
  border-color: rgba(255, 107, 107, 0.62);
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.12);
}

.dna-social-composer-shell.has-success {
  border-color: rgba(25, 135, 84, 0.6);
  box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.12);
}

.dna-social-composer-icon,
.dna-social-platform-icon {
  flex-shrink: 0;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(187, 134, 252, 0.16);
  color: var(--brand-color-dark, #bb86fc);
  font-size: 0.88rem;
}

.dna-social-platform-icon.is-instagram {
  background: linear-gradient(135deg, #f58529, #dd2a7b 55%, #8134af);
  color: #fff;
}

.dna-social-platform-icon.is-facebook { background: #1877f2; color: #fff; }
.dna-social-platform-icon.is-linkedin { background: #0a66c2; color: #fff; }
.dna-social-platform-icon.is-x { background: #0f0f0f; color: #fff; }
.dna-social-platform-icon.is-tiktok { background: #111827; color: #fff; }

body.light-mode .dna-social-composer-shell {
  border-color: rgba(17, 24, 39, 0.1);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 26px rgba(17, 24, 39, 0.05);
}

body.light-mode .dna-social-composer-shell:focus-within {
  border-color: rgba(225, 48, 108, 0.42);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(225, 48, 108, 0.11), 0 12px 30px rgba(17, 24, 39, 0.07);
}

body.light-mode .dna-social-composer-icon {
  background: rgba(225, 48, 108, 0.14);
  color: var(--brand-color-light, #E1306C);
}

.dna-social-url-input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.84rem;
  line-height: 1.35;
  padding: 0.42rem 0.15rem;
  box-shadow: none;
  outline: none;
  transition: color 0.2s ease;
}

.dna-social-url-input::placeholder { color: rgba(255, 255, 255, 0.35); }
.dna-social-url-input:focus { color: #fff; }
body.light-mode .dna-social-url-input { color: #111827; }
body.light-mode .dna-social-url-input::placeholder { color: rgba(17, 24, 39, 0.38); }
body.light-mode .dna-social-url-input:focus { color: #111827; }

.dna-social-url-save {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.58rem 0.72rem;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.dna-social-url-save:hover,
.dna-social-url-save:focus-visible {
  background: rgba(187, 134, 252, 0.14);
  color: #fff;
  outline: none;
}

.dna-social-url-save:active {
  transform: translateY(1px);
}

body.light-mode .dna-social-url-save {
  color: rgba(17, 24, 39, 0.58);
}

body.light-mode .dna-social-url-save:hover,
body.light-mode .dna-social-url-save:focus-visible {
  background: rgba(225, 48, 108, 0.1);
  color: #111827;
}

.dna-social-url-status {
  min-height: 1.15rem;
  margin-top: 0.45rem;
  font-size: 0.76rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.48);
}

.dna-social-url-status.is-error { color: #ff9b9b; }
.dna-social-url-status.is-success { color: #9ee6b8; }
body.light-mode .dna-social-url-status { color: rgba(17, 24, 39, 0.48); }
body.light-mode .dna-social-url-status.is-error { color: #b42318; }
body.light-mode .dna-social-url-status.is-success { color: #087443; }

.dna-social-url-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.35rem;
}

.dna-social-url-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  max-width: 100%;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.88);
  padding: 0.28rem 0.35rem 0.28rem 0.32rem;
}

.dna-social-url-chip-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.79rem;
  font-weight: 700;
}

.dna-social-url-chip-remove {
  width: 1.45rem;
  height: 1.45rem;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.72rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.dna-social-url-chip-remove:hover,
.dna-social-url-chip-remove:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  outline: none;
}

body.light-mode .dna-social-url-chip {
  border-color: rgba(17, 24, 39, 0.1);
  background: rgba(255, 255, 255, 0.76);
  color: #111827;
}

body.light-mode .dna-social-url-chip-remove {
  color: rgba(17, 24, 39, 0.52);
}

body.light-mode .dna-social-url-chip-remove:hover,
body.light-mode .dna-social-url-chip-remove:focus-visible {
  background: rgba(17, 24, 39, 0.08);
  color: #111827;
}

.dna-emojis-box {
  gap: 0.75rem;
  justify-content: flex-start;
  align-self: start;
  padding-top: 1.15rem;
  padding-bottom: 1.15rem;
}

.dna-emojis-box:hover {
  transform: none;
  border-color: rgba(187, 134, 252, 0.22);
}

body.light-mode .dna-emojis-box:hover {
  border-color: rgba(225, 48, 108, 0.18);
}

.dna-emojis-box > .dna-card-label {
  margin-bottom: 0;
  text-transform: none;
  font-size: 0.88rem;
  letter-spacing: 0;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
}

body.light-mode .dna-emojis-box > .dna-card-label {
  color: #111827;
}

.dna-emojis-box .view-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  border-radius: 999px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

body.light-mode .dna-emojis-box .view-toggle {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
}

.dna-emojis-box .view-toggle button {
  flex: 1 1 0;
  min-width: 0;
  height: 34px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: #888;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  transition: color 0.3s ease;
  touch-action: manipulation;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0 0.75rem;
  cursor: pointer;
}

.dna-emojis-box .view-toggle button.active {
  color: #ffffff;
}

.dna-emojis-box .view-toggle button:hover:not(.active) {
  color: #ccc;
}

body.light-mode .dna-emojis-box .view-toggle button:hover:not(.active) {
  color: #333;
}

.dna-emojis-box .view-toggle::before {
  content: '';
  position: absolute;
  top: 4px;
  bottom: 4px;
  width: calc((100% - 12px) / 2);
  height: auto;
  background: var(--brand-color-dark, #bb86fc);
  border-radius: 999px;
  z-index: 1;
  transition: left 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
    transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 8px 16px rgba(var(--brand-color-dark-rgb, 187, 134, 252), 0.25);
  pointer-events: none;
  left: 4px;
}

body.light-mode .dna-emojis-box .view-toggle::before {
  background: var(--brand-color-light, #E1306C);
  box-shadow: 0 8px 16px rgba(var(--brand-color-light-rgb, 225, 48, 108), 0.25);
}

.dna-emojis-box .view-toggle[data-active-view="yes"]::before {
  left: 4px;
}

.dna-emojis-box .view-toggle[data-active-view="no"]::before {
  left: calc(8px + (100% - 12px) / 2);
}

.dna-emojis-box .view-toggle.is-switching::before {
  transform: scaleX(1.04) scaleY(0.96);
}

@keyframes dnaEmojisLiquidSettle {
  0% { transform: scaleX(1.04) scaleY(0.96); }
  50% { transform: scaleX(0.98) scaleY(1.02); }
  100% { transform: scale(1); }
}

.dna-emojis-box .view-toggle.is-settling::before {
  animation: dnaEmojisLiquidSettle 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@media (max-width: 480px) {
  .dna-social-composer-shell {
    grid-template-columns: auto minmax(0, 1fr);
    border-radius: 18px;
    padding: 0.45rem;
  }

  .dna-social-url-save {
    grid-column: 1 / -1;
    width: 100%;
    background: rgba(187, 134, 252, 0.13);
    color: rgba(255, 255, 255, 0.88);
  }

  body.light-mode .dna-social-url-save {
    background: rgba(225, 48, 108, 0.1);
    color: #111827;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dna-emojis-box .view-toggle::before {
    transition: none;
  }

  .dna-emojis-box .view-toggle.is-settling::before {
    animation: none;
  }

  .dna-social-composer-shell,
  .dna-social-url-input,
  .dna-social-url-save,
  .dna-social-url-chip-remove,
  .dna-card-hint-icon {
    transition: none;
  }
}

/* ===== CONFIRMATION MODAL BUTTONS - Flu Style ===== */
.dna-modal-sm {
  max-width: 400px;
  text-align: center;
  padding: 32px;
}

.dna-confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
}

.dna-modal-cancel {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 12px 24px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dna-modal-cancel:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
  transform: translateY(-1px);
}

.dna-modal-discard {
  background: rgba(220, 53, 69, 0.2);
  border: 1px solid rgba(220, 53, 69, 0.4);
  border-radius: 12px;
  padding: 12px 24px;
  color: #ff6b6b;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dna-modal-discard:hover {
  background: rgba(220, 53, 69, 0.35);
  border-color: rgba(220, 53, 69, 0.6);
  color: #ff8585;
  transform: translateY(-1px);
}

/* Light mode for confirmation modal buttons */
body.light-mode .dna-modal-cancel {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.15);
  color: rgba(0, 0, 0, 0.8);
}

body.light-mode .dna-modal-cancel:hover {
  background: rgba(0, 0, 0, 0.12);
  border-color: rgba(0, 0, 0, 0.25);
  color: #1a1a1a;
}

body.light-mode .dna-modal-discard {
  background: rgba(220, 53, 69, 0.1);
  border-color: rgba(220, 53, 69, 0.3);
  color: #dc3545;
}

body.light-mode .dna-modal-discard:hover {
  background: rgba(220, 53, 69, 0.2);
  border-color: rgba(220, 53, 69, 0.5);
  color: #c82333;
}

/* Full-document navigation progress (MPA feedback) */
.flu-nav-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 2000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.16s ease;
}

.flu-nav-progress.is-active,
.flu-nav-progress.is-done {
  opacity: 1;
}

.flu-nav-progress.is-hidden {
  opacity: 0;
}

.flu-nav-progress-bar {
  height: 100%;
  width: 0;
  border-radius: 0 1px 1px 0;
  background: linear-gradient(90deg, #bb86fc 0%, #7c4dff 55%, #9b6dff 100%);
  box-shadow: 0 0 10px rgba(187, 134, 252, 0.45);
  transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

body.light-mode .flu-nav-progress-bar {
  background: linear-gradient(90deg, #E1306C 0%, #F77737 100%);
  box-shadow: 0 0 10px rgba(225, 48, 108, 0.35);
}

.flu-nav-progress.is-active .flu-nav-progress-bar {
  width: 38%;
}

.flu-nav-progress.is-active.is-waiting .flu-nav-progress-bar {
  width: 72%;
  transition-duration: 2.4s;
}

.flu-nav-progress.is-done .flu-nav-progress-bar {
  width: 100%;
  transition-duration: 0.18s;
}

@media (prefers-reduced-motion: reduce) {
  .flu-nav-progress {
    transition: none;
  }

  .flu-nav-progress-bar {
    transition: none;
  }
}

/* Shell navigation loading (true persistent chrome) */
#fluAppMain.is-partial-loading {
  opacity: 0.88;
  pointer-events: none;
  transition: opacity 0.16s ease;
}

@media (prefers-reduced-motion: reduce) {
  #fluAppMain.is-partial-loading {
    opacity: 1;
    transition: none;
  }
}

/* Shared htmx partial navigation states */
.flu-partial-region {
  position: relative;
  transition: opacity 0.16s ease;
}

.flu-partial-region.is-partial-loading {
  opacity: 0.56;
  pointer-events: none;
}

.flu-partial-region::after {
  content: "";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  color: var(--brand-color-dark, #bb86fc);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease 0.15s;
  animation: fluPartialSpin 0.72s linear infinite;
}

body.light-mode .flu-partial-region::after {
  color: var(--brand-color-light, #e1306c);
}

.flu-partial-region.is-partial-loading::after {
  opacity: 0.75;
}

@keyframes fluPartialSpin {
  to { transform: rotate(360deg); }
}
