/* Hub visual contract: la-solucion-ia PlatformHeader and dashboard AppCard.
   Keep the tenant's public quiz, preview and creative artwork independent. */
body:not(.public-route) {
  --hub-font: "Geist", Arial, Helvetica, sans-serif;
  --bg: #fafafa;
  --surface: #fff;
  --ink: #1d1d1f;
  --navy: #1d1d1f;
  --muted: #6e6e73;
  --line: #d2d2d7;
  --orange: #1d1d1f;
  --orange-2: #f5f5f7;
  --shadow: none;
  --radius: 6px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--hub-font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* These surfaces belong to the quiz designer, not to the management theme. */
body:not(.public-route) :is(.creative-preview, .mobile-preview, .style-preview, .public-quiz-card) {
  --bg: #f7f8fb;
  --ink: #1e2430;
  --muted: #737b8b;
  --line: #e8ebf1;
  --orange: #f26b3a;
  --orange-2: #fff1eb;
  --navy: #1e2940;
  --shadow: 0 14px 36px rgba(24, 35, 57, .07);
  --radius: 18px;
  font-family: "DM Sans", sans-serif;
}

body:not(.public-route) .topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  height: auto;
  min-height: 64px;
  padding: 12px max(24px, calc((100vw - 1232px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(20px);
}
body:not(.public-route) .topbar-leading { gap: 0; }
body:not(.public-route) .topbar :is(.mobile-menu, .crumb, .brand-mark, .topbar-brand span) { display: none; }
body:not(.public-route) .topbar-brand strong {
  color: var(--ink);
  font: 600 15px/1.4 var(--hub-font);
  letter-spacing: -.025em;
  white-space: nowrap;
}
body:not(.public-route) .top-nav {
  display: flex;
  justify-content: flex-end;
  min-width: 0;
  width: 100%;
  gap: 4px;
}
body:not(.public-route) .tenant-hub-nav { gap: 4px; max-width: none; }
body:not(.public-route) .topbar :is(.nav-item, .tenant-hub-nav .tenant-product-nav) {
  flex: 0 0 auto;
  width: auto;
  height: auto;
  min-height: 40px;
  padding: 9px 12px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  box-shadow: none;
  font: 400 14px/1.4 var(--hub-font);
}
body:not(.public-route) .topbar .nav-item > span { display: none; }
body:not(.public-route) .topbar .tenant-product-nav > span { display: block; font-size: 18px; }
body:not(.public-route) .topbar .nav-item:is(:hover, .active) {
  color: var(--ink);
  background: #f5f5f7;
  box-shadow: none;
}
body:not(.public-route) .topbar .nav-item.active { font-weight: 500; }
body:not(.public-route) .top-actions { gap: 12px; margin-left: 0; }
body:not(.public-route) .auth-session-link {
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  font: 500 13px/1.4 var(--hub-font);
  text-decoration: none;
  white-space: nowrap;
}
body:not(.public-route) .auth-session-link:hover { background: #f5f5f7; border-color: var(--ink); }

body:not(.public-route) .view { max-width: 1280px; padding: 36px 24px 64px; }
body:not(.public-route) :is(.tenant-simple-heading, .tenant-simple-catalog, .tenant-work-section) { max-width: none; }
body:not(.public-route) :is(.page-heading, .project-hero) { gap: 20px; margin-bottom: 28px; }
body:not(.public-route) :is(.page-heading h1, .project-hero h1, .login-card h1) {
  color: var(--ink);
  font-family: var(--hub-font);
  font-size: clamp(26px, 2.5vw, 32px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}
body:not(.public-route) :is(.panel-head h2, .project-link-intro h2, .entry-copy-heading h3, .info-card h3,
  .interview-question h3, .interview-summary h3, .settings-card h2, .question-editor-head strong,
  .modal h2, .modal h3) {
  font-family: var(--hub-font);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -.02em;
}
body:not(.public-route) :is(.page-heading p, .project-hero p, .panel-head p, .project-link-intro p,
  .simple-course-hint, .entry-copy-heading p, .settings-card p) {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
body:not(.public-route) .eyebrow { color: var(--muted); font-size: 11px; letter-spacing: .09em; }
body:not(.public-route) :is(.panel, .stat-card, .tenant-work-card, .settings-card, .login-card, .modal) {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: none;
}
body:not(.public-route) :is(.tenant-work-card, .quick-action, .settings-card) {
  transition: border-color .2s, background-color .2s;
}
body:not(.public-route) :is(.tenant-work-card:hover, .quick-action:hover) {
  border-color: var(--ink);
  background: #fafafa;
  transform: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .07);
}
body:not(.public-route) .tenant-work-card.featured { border-color: var(--line); background: #fff; }
body:not(.public-route) .project-action-button {
  border-color: var(--line);
  border-radius: 6px;
  background: #fff;
}
body:not(.public-route) .project-action-button:hover { border-color: var(--ink); background: #fafafa; }
body:not(.public-route) .project-action-button strong { font-size: 14px; font-weight: 600; }
body:not(.public-route) .project-action-button small { color: var(--muted); font-size: 13px; }
body:not(.public-route) :is(.tenant-work-icon, .stat-icon, .settings-icon, .source-icon, .question-number, .info-icon) {
  border-radius: 6px;
  color: #52525b;
  background: #f5f5f7;
  box-shadow: none;
}
body:not(.public-route) :is(.tenant-work-card strong, .tenant-quiz-copy strong) { font-size: 16px; }
body:not(.public-route) :is(.tenant-work-card small, .tenant-quiz-copy small, .settings-card small) {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
body:not(.public-route) :is(.studio-card, .project-section-panel, .project-action-panel, .tenant-simple-catalog,
  .appearance-settings, .style-preview-panel, .recent-panel, .quick-panel) { padding: 24px; }
body:not(.public-route) .project-ad-copy-workbench { padding: 0; }
body:not(.public-route) .info-card { color: var(--ink); background: #f5f5f7; }
body:not(.public-route) .info-card h3 { color: var(--ink); }
body:not(.public-route) .info-card p { color: var(--muted); font-size: 14px; }
body:not(.public-route) .info-list { color: var(--ink); border-color: var(--line); font-size: 13px; }

body:not(.public-route) :is(.primary, .secondary) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: 500 14px/1.4 var(--hub-font);
  text-align: center;
  box-shadow: none;
  text-decoration: none;
  transition: background-color .2s, border-color .2s;
}
body:not(.public-route) .primary { color: #fff; background: #1d1d1f; border-color: #1d1d1f; }
body:not(.public-route) .primary:hover { background: #000; border-color: #000; transform: none; box-shadow: none; }
body:not(.public-route) .secondary { color: var(--ink); background: #fff; }
body:not(.public-route) .secondary:hover { color: var(--ink); background: #f5f5f7; border-color: var(--ink); }
body:not(.public-route) :is(.primary, .secondary):disabled { opacity: .45; cursor: not-allowed; transform: none; }
body:not(.public-route) .text-btn { color: var(--ink); font-weight: 500; }
body:not(.public-route) :is(.primary, .secondary, .text-btn, .nav-item, .project-tab-button):focus-visible {
  outline: 2px solid #52525b;
  outline-offset: 3px;
}
body:not(.public-route) .required { color: var(--muted); background: #f5f5f7; font-size: 12px; }
body:not(.public-route) .project-nav {
  gap: 4px;
  padding: 4px;
  margin: 0 0 24px;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  background: #f5f5f7;
}
body:not(.public-route) .project-tab-button {
  min-height: 40px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  font: 500 13px/1.4 var(--hub-font);
}
body:not(.public-route) .project-tab-button.active {
  border-color: var(--line);
  color: var(--ink);
  background: #fff;
  box-shadow: none;
}
body:not(.public-route) :is(.project-url-box, .project-link-status-row, .project-note, .appearance-save-bar,
  .entry-copy-section, .entry-gender-toggle, .creative-strategy-note, .ad-ai-notes, .ad-variant-note,
  .ad-carousel-toolbar, .ad-config-accordion, .interview-summary, .ad-favorites, .ad-favorite-item,
  .creative-placement-controls, .creative-style-controls) {
  border-color: var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #fafafa;
  box-shadow: none;
}
body:not(.public-route) :is(.creative-strategy-note, .ad-ai-notes, .ad-variant-note) :is(strong, small, p) {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
body:not(.public-route) :is(.creative-strategy-note, .ad-ai-notes, .ad-variant-note) strong { color: var(--ink); }
body:not(.public-route) :is(.ad-favorites-head, .ad-favorites-empty, .ad-favorite-item) :is(strong, small, p, span) {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
body:not(.public-route) :is(.ad-favorites-head, .ad-favorites-empty, .ad-favorite-item) strong { color: var(--ink); }
body:not(.public-route) .ad-favorites-head > span { background: #f5f5f7; }
body:not(.public-route) .ad-config-accordion summary { color: var(--ink); font-size: 12px; font-weight: 500; }
body:not(.public-route) .entry-optional { border-color: var(--line); color: var(--muted); background: #fff; }
body:not(.public-route) .entry-toggle-control input:checked + i { background: var(--ink); }
body:not(.public-route) .appearance-save-status { color: var(--muted) !important; }
body:not(.public-route) .field-label { color: #52525b; font-size: 13px; font-weight: 500; }
body:not(.public-route) :is(.copy-grid label, .appearance-row strong, .control-section-head strong,
  .login-form label, .ad-variant-card label, .question-feedback-wrap .field-label) {
  color: #52525b;
  font-size: 13px;
  font-weight: 500;
}
body:not(.public-route) :is(.copy-grid input, .copy-grid textarea, .ad-variant-card input,
  .ad-variant-card textarea, .ad-variant-card select, .creative-placement-controls select,
  .input-with-icon, .interview-input, .interview-textarea, .question-feedback, .login-form input,
  .ad-ai-notes textarea, .ad-variant-note textarea, .project-entry-copy-panel input,
  .project-entry-copy-panel textarea, .tracking-card input, .modal input, .modal select) {
  border-color: var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  font-family: var(--hub-font);
  font-size: 14px;
  line-height: 1.5;
}
body:not(.public-route) :is(input, textarea, select):focus-visible {
  outline: 2px solid #a1a1aa;
  outline-offset: 2px;
  box-shadow: none;
}
body:not(.public-route) :is(.copy-grid input, .copy-grid textarea, .ad-variant-card input,
  .ad-variant-card textarea, .ad-ai-notes textarea, .ad-variant-note textarea, .login-form input,
  .question-feedback):focus { border-color: #52525b; box-shadow: none; }
body:not(.public-route) :is(input[type="checkbox"], input[type="radio"]) { accent-color: #1d1d1f; }
body:not(.public-route) :is(.quiz-template, .source-card, .entry-gender-visual, .question-editor-card) {
  border-radius: 6px;
  border-color: var(--line);
  box-shadow: none;
}
body:not(.public-route) :is(.quiz-template.active, .source-card.selected) {
  border-color: #52525b;
  background: #f5f5f7;
  box-shadow: none;
}
body:not(.public-route) #view-studio .question-prompt { font-family: var(--hub-font); font-size: 16px; background: #fafafa; }
body:not(.public-route) #view-studio .regenerate-question { color: var(--ink); border-color: var(--line); background: #fff; }

body:not(.public-route) .ad-carousel .ad-variant-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: none;
}
body:not(.public-route) .ad-carousel .ad-variant-card:is(.carousel-active, .selected) {
  border-color: #52525b;
  box-shadow: none;
}
body:not(.public-route) .ad-variant-head > span { color: var(--muted); font-size: 11px; }
body:not(.public-route) .creative-actions { display: grid; grid-template-columns: 1fr; gap: 8px; }
body:not(.public-route) .creative-actions :is(.primary, .secondary) { width: 100%; font-size: 12px; white-space: normal; }
body:not(.public-route) .favorite-ad.is-favorite { color: var(--ink); border-color: var(--ink); background: #f5f5f7; }
body:not(.public-route) :is(.creative-note, .creative-scene-direction, .creative-placement-controls > small) {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}
body:not(.public-route) .tenant-simple-catalog .tenant-quiz-row-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
}
body:not(.public-route) .tenant-simple-catalog .tenant-quiz-row-actions :is(button, a) {
  grid-area: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  font-size: 13px;
  line-height: 1.4;
  text-decoration: none;
  white-space: normal;
}
body:not(.public-route) .tenant-simple-catalog .tenant-quiz-row-actions .tenant-quiz-delete-action { color: #b42318; }

body.login-route { background: #fff; }
body:not(.public-route) .login-brand .brand-mark { display: none; }
body:not(.public-route) .login-brand strong { font: 600 20px/1.4 var(--hub-font); letter-spacing: -.03em; }
body:not(.public-route) .login-card { padding: 32px; }
body:not(.public-route) .login-methods { border-color: var(--line); border-radius: 6px; background: #f5f5f7; }
body:not(.public-route) .login-method { border-radius: 6px; font-size: 13px; font-weight: 500; }
body:not(.public-route) .login-method.active { color: var(--ink); box-shadow: none; }
body:not(.public-route) .login-lead { font-size: 14px; }

@media (max-width: 1050px) {
  body:not(.public-route) .topbar { gap: 12px 20px; }
  body:not(.public-route) .topbar :is(.nav-item, .tenant-hub-nav .tenant-product-nav) { padding: 9px; font-size: 13px; }
}
@media (max-width: 760px) {
  body:not(.public-route) .topbar { grid-template-columns: minmax(0, 1fr) auto; padding: 12px 20px 8px; }
  body:not(.public-route) .topbar-leading { grid-column: 1; grid-row: 1; }
  body:not(.public-route) .top-actions { grid-column: 2; grid-row: 1; }
  body:not(.public-route) .top-nav { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; overflow-x: auto; }
  body:not(.public-route) .tenant-hub-nav { width: 100%; max-width: none; overflow-x: auto; }
  body:not(.public-route) .topbar :is(.nav-item, .tenant-hub-nav .tenant-product-nav) { min-height: 44px; padding: 11px 10px; font-size: 13px; }
  body:not(.public-route) .view { padding: 28px 20px 48px; }
  body:not(.public-route) :is(.studio-card, .project-section-panel, .project-action-panel, .tenant-simple-catalog,
    .appearance-settings, .style-preview-panel, .recent-panel, .quick-panel) { padding: 20px; }
  body:not(.public-route) .project-ad-copy-workbench { padding: 0; }
  body:not(.public-route) .ad-carousel .ad-variant-card { flex-basis: min(82vw, calc(100vw - 104px)); padding: 14px; }
  body:not(.public-route) .tenant-simple-catalog .tenant-quiz-row-actions {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    margin-top: 16px;
  }
  body:not(.public-route) .entry-copy-sections { grid-template-columns: 1fr; }
  body:not(.public-route) :is(.copy-grid input, .copy-grid textarea, .ad-variant-card input,
    .ad-variant-card textarea, .ad-variant-card select, .input-with-icon input, .interview-input,
    .interview-textarea, .question-feedback, .login-form input, .ad-ai-notes textarea,
    .project-entry-copy-panel input, .project-entry-copy-panel textarea) { font-size: 16px; }
  body:not(.public-route) .login-card { padding: 24px 20px; }
}
