/* ==========================================================================
   Briefing Estratégico de Lançamento — AlphaDev Tecnologia
   CSS Puro (Compatível com todos os navegadores, iframes e hospedagens estáticas)
   ========================================================================== */

:root {
  --bg-canvas: #0b0e14;
  --bg-card: #121722;
  --bg-input: #0d111a;
  --bg-subtle: #141a26;
  --border-subtle: rgba(148, 163, 184, 0.16);
  --border-input: rgba(148, 163, 184, 0.24);
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --blue-400: #60a5fa;
  --emerald-400: #34d399;
  --rose-400: #fb7185;
  --radius-md: 8px;
  --radius-lg: 12px;
  --font-display: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-family: var(--font-sans);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  margin: 0;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

button,
input,
textarea {
  font-family: inherit;
}

.hidden {
  display: none !important;
}

/* App Shell & Backdrop */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  background-color: var(--bg-canvas);
}

.app-shell.is-embed {
  min-height: auto;
  padding-top: 8px;
  padding-bottom: 8px;
}

.bg-grid-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.42;
  background-image:
    radial-gradient(ellipse 75% 40% at 50% -10%, rgba(37, 99, 235, 0.24), transparent 70%),
    linear-gradient(to right, rgba(148, 163, 184, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
  background-size: 100% 100%, 48px 48px, 48px 48px;
}

.app-shell.is-embed .bg-grid-glow,
.app-shell.is-embed .site-header,
.app-shell.is-embed .site-footer {
  display: none !important;
}

/* Header */
.site-header {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid var(--border-subtle);
  background-color: rgba(11, 14, 20, 0.9);
  backdrop-filter: blur(8px);
}

.container {
  width: 100%;
  max-width: 896px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
  white-space: nowrap;
}

.brand-name span {
  color: var(--blue-400);
}

.header-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.header-link:hover {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Main Content */
.main-content {
  position: relative;
  z-index: 10;
  flex: 1;
  padding-top: 28px;
  padding-bottom: 40px;
}

.app-shell.is-embed .main-content {
  padding-top: 16px;
  padding-bottom: 24px;
}

.hero-intro {
  margin-bottom: 28px;
}

.hero-kicker {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--blue-400);
  margin-bottom: 8px;
}

.hero-title {
  font-size: clamp(1.65rem, 3.6vw, 2.25rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #ffffff;
  text-wrap: balance;
  margin-bottom: 10px;
}

.hero-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 660px;
  line-height: 1.6;
}

/* Progress Bar & Steps */
.progress-wrapper {
  margin-bottom: 24px;
}

.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.progress-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.progress-label .sep {
  color: var(--text-dim);
  margin: 0 6px;
}

.progress-label .step-name {
  color: var(--text-muted);
}

.progress-percent {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--blue-400);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.progress-track {
  width: 100%;
  height: 6px;
  background-color: rgba(30, 41, 59, 0.9);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 18px;
}

.progress-fill {
  height: 100%;
  width: 25%;
  background: linear-gradient(90deg, var(--blue-600), var(--blue-400));
  border-radius: 999px;
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.step-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.step-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(30, 41, 59, 0.7);
  background-color: #0e121b;
  color: var(--text-dim);
  text-align: left;
  cursor: not-allowed;
  opacity: 0.75;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.step-tab.is-reachable {
  cursor: pointer;
  opacity: 1;
  background-color: #111620;
  border-color: rgba(51, 65, 85, 0.7);
  color: var(--text-secondary);
}

.step-tab.is-completed {
  cursor: pointer;
  opacity: 1;
  background-color: var(--bg-subtle);
  border-color: rgba(51, 65, 85, 0.85);
  color: #e2e8f0;
}

.step-tab.is-completed:hover,
.step-tab.is-reachable:hover {
  border-color: rgba(59, 130, 246, 0.55);
}

.step-tab.is-active {
  cursor: default;
  opacity: 1;
  background-color: rgba(37, 99, 235, 0.15);
  border-color: rgba(59, 130, 246, 0.75);
  color: #ffffff;
}

.step-badge {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  background-color: rgba(30, 41, 59, 0.9);
  color: var(--text-muted);
  flex-shrink: 0;
}

.step-tab.is-active .step-badge {
  background-color: var(--blue-600);
  color: #ffffff;
}

.step-tab.is-completed .step-badge {
  background-color: rgba(59, 130, 246, 0.2);
  color: var(--blue-400);
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.step-tab-label {
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Main Card */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.step-header {
  padding-bottom: 16px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--border-subtle);
}

.step-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #ffffff;
}

.step-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Form Layout & Fields */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

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

.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.field-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #e2e8f0;
}

.req-star {
  color: var(--blue-400);
  margin-left: 3px;
}

.opt-tag {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.input-control,
.textarea-control {
  width: 100%;
  background-color: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-size: 0.9rem;
  padding: 11px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-control {
  min-height: 46px;
}

.textarea-control {
  min-height: 110px;
  resize: vertical;
  line-height: 1.55;
}

.input-control.is-mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.input-control::placeholder,
.textarea-control::placeholder {
  color: var(--text-dim);
}

.input-control:hover,
.textarea-control:hover {
  border-color: rgba(148, 163, 184, 0.42);
}

.input-control:focus-visible,
.textarea-control:focus-visible {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.input-control.has-error,
.textarea-control.has-error {
  border-color: rgba(244, 63, 94, 0.75);
}

.input-control.has-error:focus-visible,
.textarea-control.has-error:focus-visible {
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.25);
}

input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.85) hue-rotate(180deg);
  cursor: pointer;
}

.field-hint {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.field-error {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--rose-400);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

/* Radio Option Cards */
.option-grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding-top: 4px;
}

.option-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding-top: 4px;
}

.option-grid-1 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding-top: 4px;
}

.option-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-input);
  background-color: var(--bg-input);
  color: var(--text-secondary);
  text-align: left;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.option-card.is-tall {
  align-items: flex-start;
  padding: 14px 16px;
}

.option-card:hover {
  border-color: rgba(148, 163, 184, 0.45);
  color: #ffffff;
}

.option-card.is-selected {
  background-color: rgba(37, 99, 235, 0.15);
  border-color: var(--blue-500);
  color: #ffffff;
}

.option-card:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.35);
}

.option-title {
  display: block;
  font-weight: 600;
  color: inherit;
}

.option-hint {
  display: block;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 3px;
  line-height: 1.45;
}

.radio-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.option-card.is-selected .radio-dot {
  border-color: var(--blue-400);
  background-color: var(--blue-500);
}

.radio-dot-inner {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #ffffff;
  display: none;
}

.option-card.is-selected .radio-dot-inner {
  display: block;
}

/* Conditional Box */
.conditional-box {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius-md);
  background-color: var(--bg-input);
  border: 1px solid rgba(59, 130, 246, 0.35);
}

/* Summary Box */
.summary-box {
  margin-top: 8px;
  border-radius: var(--radius-lg);
  background-color: var(--bg-input);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.summary-top {
  padding: 14px 18px;
  background-color: #121826;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.summary-top h3 {
  font-size: 0.92rem;
  font-weight: 600;
  color: #ffffff;
}

.summary-top span {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.summary-section {
  padding: 18px;
  border-bottom: 1px solid var(--border-subtle);
}

.summary-section:last-child {
  border-bottom: 0;
}

.summary-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.summary-section-head h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--blue-400);
}

.btn-edit-step {
  background: transparent;
  border: 0;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.btn-edit-step:hover {
  color: #ffffff;
  background-color: rgba(148, 163, 184, 0.12);
}

.summary-dl {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px 24px;
  margin: 0;
}

.summary-item dt {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.summary-item dd {
  margin: 0;
  font-size: 0.88rem;
  color: #f1f5f9;
  white-space: pre-line;
  word-break: break-word;
}

.summary-item dd.is-mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* Error Banner */
.alert-error {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background-color: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: #fecdd3;
  font-size: 0.875rem;
}

.alert-error strong {
  display: block;
  color: #ffe4e6;
  margin-bottom: 2px;
}

/* Form Footer Actions */
.form-actions {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.4);
}

.btn-primary {
  background-color: var(--blue-600);
  color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--blue-500);
}

.btn-primary.is-success {
  background-color: #059669;
}

.btn-primary:disabled {
  opacity: 0.65;
  cursor: wait;
}

.btn-secondary {
  background-color: var(--bg-input);
  border-color: var(--border-input);
  color: #e2e8f0;
}

.btn-secondary:hover:not(:disabled) {
  background-color: rgba(30, 41, 59, 0.85);
  color: #ffffff;
}

.btn-secondary.is-success {
  background-color: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.5);
  color: #6ee7b7;
}

.btn-secondary:disabled {
  border-color: rgba(30, 41, 59, 0.7);
  color: #475569;
  cursor: not-allowed;
}

.btn-ghost {
  background-color: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background-color: rgba(30, 41, 59, 0.55);
  color: #ffffff;
}

/* Confirmation Screen */
.confirmation-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.success-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background-color: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--emerald-400);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.confirmation-meta {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--emerald-400);
  margin-bottom: 6px;
}

.confirmation-meta span {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.confirmation-title {
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
}

.confirmation-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 680px;
}

.confirmation-actions {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.confirmation-tip {
  margin-top: 14px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  position: relative;
  z-index: 10;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  margin-top: auto;
}

.footer-inner {
  padding-top: 18px;
  padding-bottom: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* Responsive Breakpoints */
@media (min-width: 640px) {
  .container {
    padding-left: 24px;
    padding-right: 24px;
  }

  .card {
    padding: 32px;
  }

  .step-tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
  }

  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  .option-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .option-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .conditional-box {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 20px;
  }

  .summary-dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .summary-item.is-full {
    grid-column: 1 / -1;
  }

  .confirmation-head {
    flex-direction: row;
    align-items: flex-start;
    gap: 20px;
  }

  .confirmation-actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .confirmation-actions .btn-new {
    margin-left: auto;
  }

  .footer-inner {
    flex-direction: row;
  }
}

/* ==========================================================================
   Executive A4 Print Stylesheet (Hidden on screen, visible on Ctrl+P / Print)
   ========================================================================== */
.print-report {
  display: none;
}

@page {
  size: A4 portrait;
  margin: 14mm 16mm;
}

@media print {
  html,
  body {
    background: #ffffff !important;
    color: #0f172a !important;
    color-scheme: light !important;
    margin: 0 !important;
    padding: 0 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .no-print {
    display: none !important;
  }

  .print-report {
    display: block !important;
    background: #ffffff;
    color: #0f172a;
    font-family: var(--font-sans);
    font-size: 10pt;
    line-height: 1.5;
  }

  .print-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    border-bottom: 2px solid #0f172a;
    padding-bottom: 12px;
    margin-bottom: 18px;
  }

  .print-brand-title {
    font-family: var(--font-display);
    font-size: 14pt;
    font-weight: 700;
    color: #0f172a;
  }

  .print-brand-url {
    font-size: 8.5pt;
    color: #475569;
  }

  .print-doc-meta {
    text-align: right;
  }

  .print-doc-kicker {
    font-size: 8pt;
    font-weight: 700;
    text-transform: uppercase;
    color: #1d4ed8;
  }

  .print-doc-title {
    font-family: var(--font-display);
    font-size: 13pt;
    font-weight: 700;
    color: #0f172a;
  }

  .print-doc-date {
    font-family: var(--font-mono);
    font-size: 8pt;
    color: #475569;
  }

  .print-highlights {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 18px;
    break-inside: avoid;
  }

  .print-hl-label {
    font-size: 7.5pt;
    text-transform: uppercase;
    font-weight: 700;
    color: #64748b;
  }

  .print-hl-val {
    font-size: 10pt;
    font-weight: 700;
    color: #0f172a;
    margin-top: 2px;
  }

  .print-section {
    margin-bottom: 16px;
    break-inside: avoid;
  }

  .print-section h2 {
    font-family: var(--font-display);
    font-size: 11pt;
    font-weight: 700;
    color: #1d4ed8;
    border-bottom: 1px solid #cbd5e1;
    padding-bottom: 4px;
    margin-bottom: 10px;
  }

  .print-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 20px;
  }

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

  .print-lbl {
    display: block;
    font-size: 8pt;
    color: #64748b;
  }

  .print-val {
    font-weight: 600;
    color: #0f172a;
  }

  .print-box-text {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 8px 10px;
    white-space: pre-line;
    margin-top: 3px;
  }

  .print-footer {
    border-top: 1px solid #cbd5e1;
    padding-top: 8px;
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    font-size: 8pt;
    color: #64748b;
  }
}
