/**
 * BridgeWorks — editor annunci azienda
 * Usare con company-shell.css + company-ui.css
 */

body.company-job-editor.co-ui-page {
  font-family: var(--co-font, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif);
  -webkit-font-smoothing: antialiased;
}

body.company-job-editor.co-ui-page .cje-form,
body.company-job-editor.co-ui-page .cje-assistant,
body.company-job-editor.co-ui-page .cje-ai-panel,
body.company-job-editor.co-ui-page input,
body.company-job-editor.co-ui-page textarea,
body.company-job-editor.co-ui-page select,
body.company-job-editor.co-ui-page button {
  font-family: inherit;
}

body.company-job-editor .cje-main {
  /* co-main gestisce max-width e padding */
}

.co-alert--error > div + div {
  margin-top: 0.35rem;
}

.cje-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1.25rem;
  align-items: start;
  margin-top: 1rem;
}

.cje-form {
  background: var(--co-surface, #fff);
  border: 1px solid var(--co-border, rgba(11, 18, 32, 0.1));
  border-radius: var(--co-radius-lg, 10px);
  box-shadow: var(--co-shadow, 0 1px 3px rgba(11, 18, 32, 0.06));
  overflow: hidden;
}

.cje-section {
  padding: 1.35rem 1.4rem;
  border-bottom: 1px solid var(--co-border, rgba(11, 18, 32, 0.1));
  scroll-margin-top: 6rem;
  transition: background 0.2s ease;
}

.cje-section.is-active {
  background: var(--co-surface-muted, #f8fafc);
}

.cje-section:last-of-type {
  border-bottom: none;
}

.cje-section__head {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  margin-bottom: 1.15rem;
}

.cje-section__num {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--co-radius-sm, 6px);
  background: var(--co-surface-inset, #f1f5f9);
  color: var(--co-ink-soft, #334155);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.cje-section.is-active .cje-section__num {
  background: rgba(54, 61, 75, 0.12);
  color: var(--co-btn, #363d4b);
}

.cje-section__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--co-ink, #0b1220);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.cje-section__lead {
  margin: 0.2rem 0 0;
  font-size: 0.8125rem;
  color: var(--co-ink-muted, #64748b);
  line-height: 1.45;
}

.cje-field {
  margin-bottom: 1rem;
  position: relative;
}

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

.cje-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--co-ink-soft, #334155);
}

.cje-hint {
  margin: 0.4rem 0 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--co-ink-muted, #64748b);
}

.cje-input,
.cje-textarea,
.cje-select {
  width: 100%;
  box-sizing: border-box;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--co-border-strong, rgba(11, 18, 32, 0.16));
  border-radius: var(--co-radius-sm, 6px);
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--co-ink, #0b1220);
  background: var(--co-surface, #fff);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cje-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.5;
}

.cje-input:focus,
.cje-textarea:focus,
.cje-select:focus:not(:focus-visible) {
  outline: none;
  border-color: var(--co-btn, #363d4b);
  box-shadow: 0 0 0 3px rgba(54, 61, 75, 0.12);
}

.cje-input.is-ok,
.cje-textarea.is-ok,
.cje-select.is-ok {
  border-color: var(--co-success-border, rgba(61, 114, 96, 0.35));
}

.cje-input.is-warn,
.cje-textarea.is-warn,
.cje-select.is-warn {
  border-color: #fcd34d;
}

.cje-input.is-err,
.cje-textarea.is-err,
.cje-select.is-err {
  border-color: var(--co-danger-border, #fecdca);
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.1);
}

.cje-meta {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--co-ink-muted, #64748b);
  text-align: right;
}

.cje-checkboxes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.5rem;
}

.cje-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--co-border, rgba(11, 18, 32, 0.1));
  border-radius: var(--co-radius-sm, 6px);
  background: var(--co-surface-muted, #f8fafc);
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--co-ink-soft, #334155);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.cje-check:hover {
  border-color: var(--co-border-strong, rgba(11, 18, 32, 0.16));
  background: var(--co-surface, #fff);
}

.cje-check input {
  width: auto;
  margin: 0;
  accent-color: var(--co-btn, #363d4b);
}

.cje-benefit-categories {
  display: grid;
  gap: 0.85rem;
}

.cje-benefit-group {
  margin: 0;
  padding: 0.85rem;
  border: 1px solid var(--co-border, rgba(11, 18, 32, 0.1));
  border-radius: var(--co-radius, 8px);
  background: var(--co-surface-muted, #f8fafc);
}

.cje-benefit-group legend {
  padding: 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--co-ink, #0b1220);
}

.cje-checkboxes--benefits {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.cje-check--benefit {
  background: var(--co-surface, #fff);
}

.cje-salary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.cje-salary-grid.is-piva {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cje-salary-opt[hidden] {
  display: none !important;
}

.cje-salary-opt {
  padding: 0.85rem 0.65rem;
  border: 1px solid var(--co-border, rgba(11, 18, 32, 0.1));
  border-radius: var(--co-radius, 8px);
  background: var(--co-surface-muted, #f8fafc);
  text-align: center;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.cje-salary-opt strong {
  display: block;
  font-size: 0.8125rem;
  color: var(--co-ink, #0b1220);
  margin-bottom: 0.2rem;
}

.cje-salary-opt small {
  font-size: 0.75rem;
  color: var(--co-ink-muted, #64748b);
}

.cje-salary-opt:hover {
  border-color: rgba(54, 61, 75, 0.35);
}

.cje-salary-opt.is-selected {
  border-color: var(--co-btn, #363d4b);
  background: rgba(54, 61, 75, 0.06);
  box-shadow: 0 0 0 1px var(--co-btn, #363d4b);
}

.cje-soft-skills-toggle {
  margin: 0 1.4rem 0.85rem;
}

.cje-soft-skills-panel {
  padding: 0 1.4rem 0.5rem;
}

.cje-soft-skills-note {
  margin: 0 0 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--co-radius, 8px);
  background: var(--co-accent-soft, rgba(61, 114, 96, 0.12));
  border: 1px solid var(--co-accent-line, rgba(61, 114, 96, 0.32));
  color: var(--co-accent-dark, #2a5c47);
  font-size: 0.8125rem;
  line-height: 1.45;
}

.company-job-editor .co-ss-section,
.company-job-editor .co-ss-culture {
  margin-top: 1rem;
}

.cje-submit-wrap {
  padding: 1.25rem 1.4rem;
  background: var(--co-surface-muted, #f8fafc);
  border-top: 1px solid var(--co-border, rgba(11, 18, 32, 0.1));
}

.cje-submit-wrap .cje-submit {
  width: 100%;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  font-size: 0.9375rem;
}

.cje-role-picker__search {
  position: relative;
  margin-bottom: 0.45rem;
}

.cje-role-picker .cje-autocomplete {
  max-height: 16rem;
  z-index: 30;
}

.cje-autocomplete button small {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--co-ink-muted, #64748b);
}

.cje-autocomplete button.is-active {
  background: var(--co-surface-muted, #f8fafc);
}

.cje-role-empty {
  padding: 0.6rem 0.8rem;
  font-size: 0.8125rem;
  color: var(--co-ink-muted, #64748b);
}

.cje-autocomplete {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 0.25rem;
  background: var(--co-surface, #fff);
  border: 1px solid var(--co-border, rgba(11, 18, 32, 0.1));
  border-radius: var(--co-radius-sm, 6px);
  box-shadow: var(--co-shadow-md, 0 6px 18px rgba(11, 18, 32, 0.08));
  max-height: 200px;
  overflow-y: auto;
  z-index: 20;
  display: none;
}

.cje-autocomplete.is-open {
  display: block;
}

.cje-autocomplete button {
  display: block;
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: none;
  border-bottom: 1px solid var(--co-border, rgba(11, 18, 32, 0.1));
  background: none;
  text-align: left;
  font-size: 0.875rem;
  font-family: inherit;
  cursor: pointer;
  color: var(--co-ink, #0b1220);
}

.cje-autocomplete button:hover {
  background: var(--co-surface-muted, #f8fafc);
}

.cje-autocomplete button:last-child {
  border-bottom: none;
}

/* Assistente laterale */
.cje-assistant {
  position: sticky;
  top: 4.5rem;
  background: var(--co-surface, #fff);
  border: 1px solid var(--co-border, rgba(11, 18, 32, 0.1));
  border-radius: var(--co-radius-lg, 10px);
  box-shadow: var(--co-shadow-md, 0 6px 18px rgba(11, 18, 32, 0.08));
  overflow: hidden;
}

.cje-assistant__head {
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--co-border, rgba(11, 18, 32, 0.1));
  background: var(--co-surface-muted, #f8fafc);
}

.cje-assistant__title {
  margin: 0 0 0.75rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--co-ink, #0b1220);
}

.cje-assistant__progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--co-ink-muted, #64748b);
  margin-bottom: 0.35rem;
}

.cje-assistant__progress-label strong {
  color: var(--co-btn, #363d4b);
  font-weight: 700;
}

.cje-assistant__bar {
  height: 6px;
  background: var(--co-surface-inset, #f1f5f9);
  border-radius: 999px;
  overflow: hidden;
}

.cje-assistant__bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--co-btn, #363d4b), #525a68);
  border-radius: 999px;
  transition: width 0.35s ease;
}

.cje-assistant__focus {
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--co-border, rgba(11, 18, 32, 0.1));
}

.cje-assistant__focus-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--co-ink-muted, #64748b);
  margin-bottom: 0.25rem;
}

.cje-assistant__focus-title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--co-ink, #0b1220);
}

.cje-assistant__checks {
  padding: 0.75rem 1.1rem;
  max-height: 220px;
  overflow-y: auto;
}

.cje-assistant__checks:empty::after {
  content: "Compila i campi per vedere i suggerimenti in tempo reale.";
  font-size: 0.8125rem;
  color: var(--co-ink-muted, #64748b);
  line-height: 1.45;
}

.cje-tip {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  padding: 0.55rem 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  border-bottom: 1px solid var(--co-surface-muted, #f8fafc);
}

.cje-tip:last-child {
  border-bottom: none;
}

.cje-tip__dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 0.35rem;
}

.cje-tip--ok .cje-tip__dot { background: #10b981; }
.cje-tip--warn .cje-tip__dot { background: #f59e0b; }
.cje-tip--err .cje-tip__dot { background: #ef4444; }
.cje-tip--info .cje-tip__dot { background: var(--co-ink-muted, #64748b); }

.cje-tip--ok .cje-tip__text { color: var(--co-success-ink, #1e4536); }
.cje-tip--warn .cje-tip__text { color: #92400e; }
.cje-tip--err .cje-tip__text { color: var(--co-error-ink, #912018); }
.cje-tip--info .cje-tip__text { color: var(--co-ink-soft, #334155); }

.cje-assistant__examples {
  padding: 0 1.1rem 0.85rem;
  display: none;
}

.cje-assistant__examples.is-visible {
  display: block;
}

.cje-assistant__examples-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--co-ink-muted, #64748b);
  margin-bottom: 0.45rem;
}

.cje-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.cje-chip {
  padding: 0.3rem 0.55rem;
  border: 1px solid var(--co-border, rgba(11, 18, 32, 0.1));
  border-radius: var(--co-radius-sm, 6px);
  background: var(--co-surface-muted, #f8fafc);
  font-size: 0.75rem;
  color: var(--co-ink-soft, #334155);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.cje-chip:hover {
  border-color: rgba(54, 61, 75, 0.28);
  background: rgba(54, 61, 75, 0.06);
  color: var(--co-btn, #363d4b);
}

.cje-assistant__nav {
  padding: 0.75rem 1.1rem 1rem;
  border-top: 1px solid var(--co-border, rgba(11, 18, 32, 0.1));
  background: var(--co-surface-muted, #f8fafc);
}

.cje-assistant__nav-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--co-ink-muted, #64748b);
  margin-bottom: 0.5rem;
}

.cje-nav-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.4rem 0;
  border: none;
  background: none;
  text-align: left;
  font-size: 0.8125rem;
  color: var(--co-ink-soft, #334155);
  cursor: pointer;
  font-family: inherit;
}

.cje-nav-item:hover {
  color: var(--co-btn, #363d4b);
}

.cje-nav-item.is-active {
  color: var(--co-ink, #0b1220);
  font-weight: 600;
}

.cje-nav-item__status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--co-surface-inset, #f1f5f9);
  flex-shrink: 0;
}

.cje-nav-item.is-ok .cje-nav-item__status { background: #10b981; }
.cje-nav-item.is-warn .cje-nav-item__status { background: #f59e0b; }
.cje-nav-item.is-err .cje-nav-item__status { background: #ef4444; }

/* Generazione AI */
.cje-ai-wrap {
  margin-bottom: 1.25rem;
}

.cje-ai-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--co-border-strong, rgba(11, 18, 32, 0.16));
  border-radius: var(--co-radius-lg, 10px);
  background: var(--co-surface, #fff);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  gap: 0.75rem;
  box-shadow: var(--co-shadow, 0 1px 3px rgba(11, 18, 32, 0.06));
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cje-ai-toggle:hover {
  border-color: rgba(54, 61, 75, 0.28);
  box-shadow: var(--co-shadow-md, 0 6px 18px rgba(11, 18, 32, 0.08));
}

.cje-ai-toggle strong {
  display: block;
  font-size: 0.9375rem;
  color: var(--co-ink, #0b1220);
}

.cje-ai-toggle span {
  font-size: 0.8125rem;
  color: var(--co-ink-muted, #64748b);
}

.cje-ai-toggle__action {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--co-btn, #363d4b);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cje-ai-panel {
  display: none;
  margin-top: 0.65rem;
  padding: 1.15rem 1.2rem;
  border: 1px solid var(--co-border, rgba(11, 18, 32, 0.1));
  border-radius: var(--co-radius-lg, 10px);
  background: var(--co-surface, #fff);
  box-shadow: var(--co-shadow, 0 1px 3px rgba(11, 18, 32, 0.06));
}

.cje-ai-panel.is-open {
  display: block;
}

.cje-ai-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.cje-ai-field--full {
  grid-column: 1 / -1;
}

.cje-ai-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--co-ink-soft, #334155);
  margin-bottom: 0.3rem;
}

.cje-ai-input,
.cje-ai-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--co-border-strong, rgba(11, 18, 32, 0.16));
  border-radius: var(--co-radius-sm, 6px);
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--co-ink, #0b1220);
  background: var(--co-surface, #fff);
}

.cje-ai-input:focus,
.cje-ai-textarea:focus:not(:focus-visible) {
  outline: none;
  border-color: var(--co-btn, #363d4b);
  box-shadow: 0 0 0 3px rgba(54, 61, 75, 0.12);
}

.cje-ai-textarea {
  min-height: 72px;
  resize: vertical;
}

.cje-ai-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.cje-ai-generate {
  font-size: 0.875rem;
}

.cje-ai-status {
  font-size: 0.8125rem;
  color: var(--co-ink-muted, #64748b);
  flex: 1;
  min-width: 12rem;
}

.cje-ai-status--ok { color: var(--co-success-ink, #1e4536); }
.cje-ai-status--warn { color: #92400e; }
.cje-ai-status--err { color: var(--co-error-ink, #912018); }
.cje-ai-status--loading { color: var(--co-btn, #363d4b); }

.cje-ai-legal {
  margin: 0.75rem 0 0;
  font-size: 0.75rem;
  color: var(--co-ink-muted, #64748b);
  line-height: 1.45;
}

.cje-ai-draft-banner {
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  border-radius: var(--co-radius, 8px);
  border: 1px solid #fcd34d;
  background: #fffbeb;
  font-size: 0.875rem;
  color: #92400e;
  line-height: 1.45;
}

.cje-ai-draft-banner strong {
  display: block;
  margin-bottom: 0.35rem;
  color: #78350f;
}

.cje-ai-draft-banner a {
  color: var(--co-btn, #363d4b);
  font-weight: 600;
}

.cje-ai-draft-banner ul {
  margin: 0.35rem 0 0 1.1rem;
  padding: 0;
}

.cje-ai-draft-banner[hidden] {
  display: none !important;
}

.cje-ai-unavailable {
  padding: 0.85rem 1rem;
  border-radius: var(--co-radius, 8px);
  background: var(--co-surface-muted, #f8fafc);
  border: 1px solid var(--co-border, rgba(11, 18, 32, 0.1));
  font-size: 0.875rem;
  color: var(--co-ink-muted, #64748b);
  margin-bottom: 1rem;
}

/* Wizard modale annuncio (test) */
.cje-wizard-launch-wrap {
  margin-top: 1.75rem;
  margin-bottom: 1.35rem;
}

.cje-wizard-launch {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  width: fit-content;
  max-width: min(36rem, 100%);
  padding: 0.85rem 1rem 0.85rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(61, 114, 96, 0.2);
  border-left: 4px solid #3d7260;
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 45%, #f8fafc 100%);
  box-shadow: 0 4px 16px rgba(61, 114, 96, 0.1);
}

.cje-wizard-launch__icon {
  flex-shrink: 0;
  width: 2.35rem;
  height: 2.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #3d7260;
  color: #fff;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(61, 114, 96, 0.25);
}

.cje-wizard-launch__icon svg {
  display: block;
}

.cje-wizard-launch__text {
  flex: 1;
  min-width: 10rem;
  font-size: 0.8125rem;
  color: var(--co-ink-muted, #64748b);
  line-height: 1.45;
}

.cje-wizard-launch__text strong {
  display: block;
  color: #14532d;
  font-size: 0.9375rem;
  margin-bottom: 0.2rem;
}

.cje-wizard-launch__btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.cje-wizard-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.cje-wizard-modal.is-open {
  display: flex;
}

.cje-wizard-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 18, 32, 0.58);
}

.cje-wizard-dialog {
  position: relative;
  z-index: 1;
  width: min(1320px, calc(100vw - 2.5rem));
  height: min(92vh, 980px);
  max-height: min(92vh, 980px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--co-surface, #fff);
  border-radius: 16px;
  box-shadow: 0 28px 56px rgba(11, 18, 32, 0.2);
  border: 1px solid var(--co-border, rgba(11, 18, 32, 0.1));
}

.cje-wizard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  min-height: 0;
  flex: 1;
  overflow: hidden;
}

.cje-wizard-main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 1.5rem 1.65rem 1.2rem;
}

.cje-wizard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.cje-wizard-kicker {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--co-btn, #363d4b);
  margin-bottom: 0.25rem;
}

.cje-wizard-title {
  margin: 0 0 0.3rem;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--co-ink, #0b1220);
  letter-spacing: -0.02em;
}

.cje-wizard-subtitle {
  margin: 0;
  font-size: 0.9rem;
  color: var(--co-ink-muted, #64748b);
  line-height: 1.5;
  max-width: 42rem;
}

.cje-wizard-close {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--co-border, rgba(11, 18, 32, 0.1));
  border-radius: 999px;
  background: #fff;
  color: var(--co-ink-muted, #64748b);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.cje-wizard-close:hover {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.cje-wizard-progress {
  height: 4px;
  background: var(--co-surface-inset, #f1f5f9);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.85rem;
}

.cje-wizard-progress-bar {
  display: block;
  height: 100%;
  width: 0;
  background: var(--co-btn, #363d4b);
  border-radius: 999px;
  transition: width 0.28s ease;
}

.cje-wizard-stepper {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.cje-wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  text-align: center;
  min-width: 0;
}

.cje-wizard-step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 999px;
  background: var(--co-surface-inset, #f1f5f9);
  color: var(--co-ink-muted, #64748b);
  font-size: 0.75rem;
  font-weight: 700;
}

.cje-wizard-step-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: #94a3b8;
  line-height: 1.2;
}

.cje-wizard-step.is-active .cje-wizard-step-badge,
.cje-wizard-step.is-done .cje-wizard-step-badge {
  background: var(--co-btn, #363d4b);
  color: #fff;
}

.cje-wizard-step.is-active .cje-wizard-step-label,
.cje-wizard-step.is-done .cje-wizard-step-label {
  color: var(--co-ink-soft, #334155);
}

.cje-wizard-panels {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.cje-wizard-panel[hidden] {
  display: none !important;
}

.cje-wizard-lead {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--co-ink-soft, #334155);
}

.cje-wizard-choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.cje-wizard-choice {
  cursor: pointer;
  display: block;
  margin: 0;
}

.cje-wizard-choice input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.cje-wizard-choice-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 11.5rem;
  padding: 1.4rem 1.1rem;
  border: 2px solid var(--co-border, rgba(11, 18, 32, 0.1));
  border-radius: 14px;
  background: #fff;
  text-align: center;
  transition: border-color 0.15s, box-shadow 0.15s;
  height: 100%;
}

.cje-wizard-choice:hover .cje-wizard-choice-card {
  border-color: rgba(54, 61, 75, 0.28);
}

.cje-wizard-choice input:checked + .cje-wizard-choice-card {
  border-color: var(--co-btn, #363d4b);
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  box-shadow: 0 8px 18px rgba(11, 18, 32, 0.08);
}

.cje-wizard-choice-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  color: var(--co-ink, #0b1220);
}

.cje-wizard-choice-icon svg {
  display: block;
}

.cje-wizard-choice-card strong {
  font-size: 1.02rem;
  color: var(--co-ink, #0b1220);
}

.cje-wizard-choice-card small {
  font-size: 0.84rem;
  color: var(--co-ink-muted, #64748b);
  line-height: 1.45;
  max-width: 18rem;
}

.cje-wizard-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.cje-wizard-field--full {
  grid-column: 1 / -1;
}

.cje-wizard-field {
  position: relative;
}

.cje-wizard-field label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--co-ink-muted, #64748b);
  margin-bottom: 0.35rem;
}

.cje-wizard-input,
.cje-wizard-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--co-border-strong, rgba(11, 18, 32, 0.16));
  border-radius: var(--co-radius-sm, 6px);
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--co-ink, #0b1220);
  background: #fff;
}

.cje-wizard-textarea {
  resize: vertical;
  min-height: 4rem;
}

.cje-wizard-input--error {
  border-color: #f87171;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.2);
}

.cje-wizard-brief {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
  padding: 0.75rem 0.85rem;
  border-radius: var(--co-radius, 8px);
  background: var(--co-surface-muted, #f8fafc);
  border: 1px solid var(--co-border, rgba(11, 18, 32, 0.1));
  font-size: 0.8125rem;
}

.cje-wizard-brief-row {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 0.5rem;
}

.cje-wizard-brief-row span {
  color: var(--co-ink-muted, #64748b);
  font-weight: 600;
}

.cje-wizard-brief-row strong {
  color: var(--co-ink-soft, #334155);
  font-weight: 500;
  white-space: pre-wrap;
}

.cje-wizard-brief-row--full {
  grid-template-columns: 1fr;
}

.cje-wizard-generate {
  font-size: 0.875rem;
}

.cje-wizard-legal,
.cje-wizard-unavailable {
  margin: 0.65rem 0 0;
  font-size: 0.75rem;
  color: var(--co-ink-muted, #64748b);
  line-height: 1.45;
}

.cje-wizard-status {
  margin-top: 0.65rem;
  font-size: 0.8125rem;
  color: var(--co-ink-muted, #64748b);
}

.cje-wizard-status--ok { color: var(--co-success-ink, #1e4536); }
.cje-wizard-status--warn { color: #92400e; }
.cje-wizard-status--err { color: var(--co-error-ink, #912018); }
.cje-wizard-status--loading { color: var(--co-btn, #363d4b); }

.cje-wizard-preview {
  display: grid;
  gap: 0.65rem;
  max-height: 14rem;
  overflow-y: auto;
  margin-bottom: 0.65rem;
}

.cje-wizard-preview-block {
  padding: 0.65rem 0.75rem;
  border-radius: var(--co-radius-sm, 6px);
  background: var(--co-surface-muted, #f8fafc);
  border: 1px solid var(--co-border, rgba(11, 18, 32, 0.08));
}

.cje-wizard-preview-block h4 {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--co-ink-muted, #64748b);
}

.cje-wizard-preview-block p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--co-ink-soft, #334155);
  white-space: pre-wrap;
  line-height: 1.45;
}

.cje-wizard-hints {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.75rem;
  color: #92400e;
}

.cje-wizard-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--co-border, rgba(11, 18, 32, 0.1));
}

.cje-wizard-footer-nav {
  display: flex;
  gap: 0.5rem;
}

.cje-wizard-hidden {
  display: none !important;
}

.cje-wizard-assistant {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-left: 1px solid var(--co-border, rgba(11, 18, 32, 0.1));
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  padding: 1.25rem 1.1rem;
}

.cje-wizard-assistant-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--co-border, rgba(11, 18, 32, 0.08));
}

.cje-wizard-assistant-avatar {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--co-btn, #363d4b);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.cje-wizard-assistant-name {
  display: block;
  font-size: 0.8125rem;
  color: var(--co-ink, #0b1220);
}

.cje-wizard-assistant-role {
  display: block;
  font-size: 0.68rem;
  color: var(--co-ink-muted, #64748b);
}

.cje-wizard-chat {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding-right: 0.15rem;
}

.cje-wizard-msg {
  max-width: 95%;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  font-size: 0.78rem;
  line-height: 1.45;
}

.cje-wizard-msg--assistant {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--co-border, rgba(11, 18, 32, 0.1));
  color: var(--co-ink-soft, #334155);
}

.cje-wizard-typing {
  display: flex;
  gap: 0.25rem;
  padding: 0.35rem 0.15rem 0;
}

.cje-wizard-typing span {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 999px;
  background: var(--co-ink-muted, #64748b);
  animation: cje-wz-typing 1s infinite ease-in-out;
}

.cje-wizard-typing span:nth-child(2) { animation-delay: 0.15s; }
.cje-wizard-typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes cje-wz-typing {
  0%, 80%, 100% { opacity: 0.35; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2px); }
}

@media (max-width: 1024px) {
  .cje-layout {
    grid-template-columns: 1fr;
  }

  .cje-assistant {
    position: relative;
    top: 0;
    order: -1;
  }

  .cje-salary-grid {
    grid-template-columns: 1fr;
  }

  .cje-wizard-layout {
    grid-template-columns: 1fr;
  }

  .cje-wizard-assistant {
    border-left: none;
    border-top: 1px solid var(--co-border, rgba(11, 18, 32, 0.1));
    max-height: 11rem;
  }

  .cje-wizard-dialog {
    width: min(100vw - 1rem, 100%);
    height: min(96vh, 100%);
    max-height: 96vh;
  }
}

@media (max-width: 720px) {
  .cje-ai-grid {
    grid-template-columns: 1fr;
  }

  .cje-wizard-stepper {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.2rem;
  }

  .cje-wizard-step-label {
    font-size: 0.58rem;
  }

  .cje-wizard-choice-grid,
  .cje-wizard-fields {
    grid-template-columns: 1fr;
  }

  .cje-wizard-brief-row {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

@media (max-width: 640px) {
  .cje-checkboxes {
    grid-template-columns: 1fr;
  }
}
