.aisg-tela1-shell {
    width: 100%;
}

.aisg-tela1-wrapper {
    max-width: 620px;
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    font-family: inherit;
    color: #111827;
}

.aisg-tela-label {
    display: inline-block;
    background: #6633d9;
    color: #ffffff;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 0.04em;
    padding: 8px 16px;
    border-radius: 7px;
    margin-bottom: 18px;
}

.aisg-tela1-header {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 24px;
}

.aisg-tela1-header h2 {
    margin: 0 0 8px;
    font-size: 28px;
    line-height: 1.2;
    color: #111827;
}

.aisg-tela1-header p {
    margin: 0;
    color: #6b7280;
    font-size: 15px;
    line-height: 1.5;
}

.aisg-logo-text {
    flex: 0 0 auto;
    text-align: right;
    color: #111827;
    line-height: 1;
    padding-top: 2px;
}

.aisg-logo-text strong {
    display: block;
    font-size: 28px;
    letter-spacing: 0.05em;
}

.aisg-logo-text span {
    display: block;
    margin-top: 5px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.aisg-field-group {
    margin-bottom: 20px;
}

.aisg-field-group label,
.aisg-quality-heading label {
    display: block;
    font-weight: 800;
    color: #111827;
    margin-bottom: 8px;
    font-size: 14px;
}

.aisg-radio-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.aisg-radio-card {
    position: relative;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 14px;
    text-align: center;
    cursor: pointer;
    background: #ffffff;
    transition: 0.2s ease;
    margin: 0 !important;
}

.aisg-radio-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.aisg-radio-card:has(input:checked) {
    border-color: #6633d9;
    background: #f5f1ff;
    color: #4c1d95;
    box-shadow: 0 0 0 1px rgba(102, 51, 217, 0.15);
}

.aisg-radio-icon {
    font-size: 17px;
    line-height: 1;
}

.aisg-radio-card {
    align-items: flex-start;
    text-align: left;
    padding: 14px 16px;
}

.aisg-radio-card .aisg-radio-icon {
    margin-top: 2px;
}

.aisg-radio-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.aisg-radio-title {
    font-weight: 700;
    font-size: 14px;
}

.aisg-radio-subtitle {
    font-weight: 400;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.35;
}

.aisg-field-group input,
.aisg-field-group textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 13px 15px;
    font-size: 15px;
    color: #111827;
    background: #ffffff;
    box-sizing: border-box;
    outline: none;
    transition: 0.2s ease;
}

.aisg-field-group input:focus,
.aisg-field-group textarea:focus {
    border-color: #6633d9;
    box-shadow: 0 0 0 3px rgba(102, 51, 217, 0.12);
}

.aisg-field-group textarea {
    resize: vertical;
    min-height: 120px;
}

.aisg-label-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.aisg-label-row > span {
    color: #6633d9;
    font-size: 13px;
}

.aisg-tooltip-trigger {
    position: relative;
    cursor: help;
    text-decoration: underline dotted;
    text-underline-offset: 3px;
}

.aisg-tooltip-balloon {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 260px;
    max-width: min(260px, 75vw);
    background: #6633d9;
    color: #ffffff;
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
    text-align: left;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.25);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 20;
}

.aisg-tooltip-balloon::after {
    content: '';
    position: absolute;
    bottom: 100%;
    right: 16px;
    border: 6px solid transparent;
    border-bottom-color: #6633d9;
}

.aisg-tooltip-balloon strong {
    display: block;
    margin-bottom: 8px;
    color: #ffffff;
}

.aisg-tooltip-balloon ul {
    margin: 0;
    padding-left: 18px;
    color: #ffffff;
}

.aisg-tooltip-balloon li {
    margin-bottom: 4px;
    color: #ffffff;
}

.aisg-tooltip-trigger:hover .aisg-tooltip-balloon,
.aisg-tooltip-trigger:focus .aisg-tooltip-balloon,
.aisg-tooltip-trigger:focus-within .aisg-tooltip-balloon {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.aisg-char-count {
    text-align: right;
    color: #6b7280;
    font-size: 12px;
    margin-top: 6px;
}

.aisg-briefing-quality {
    margin: 24px 0;
}

.aisg-quality-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.aisg-quality-heading label {
    margin-bottom: 0;
}

.aisg-quality-heading strong {
    font-size: 16px;
    color: #111827;
}

.aisg-quality-text {
    color: #374151;
    font-size: 14px;
    margin-bottom: 10px;
    line-height: 1.45;
}

.aisg-quality-text strong {
    color: #16a34a;
    margin-right: 4px;
}

.aisg-progress {
    height: 12px;
    background: #e5f4ea;
    border-radius: 999px;
    overflow: hidden;
}

.aisg-progress-bar {
    height: 100%;
    background: #16a34a;
    border-radius: 999px;
    transition: width 0.25s ease;
}

.aisg-inspiration-box {
    border: 1px solid #c4b5fd;
    background: #f7f2ff;
    border-radius: 12px;
    padding: 18px;
}

.aisg-inspiration-box label {
    color: #4c1d95;
}

.aisg-inspiration-box small {
    font-weight: 500;
    color: #6b7280;
}

.aisg-beta-tag {
    display: inline-block;
    background: #fef3c7;
    color: #92400e;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    padding: 2px 7px;
    border-radius: 999px;
    vertical-align: middle;
}

.aisg-inspiration-box p {
    color: #4b5563;
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.5;
}

.aisg-submit-button {
    width: 100%;
    border: none;
    border-radius: 8px;
    background: #6633d9;
    color: #ffffff;
    font-size: 16px;
    font-weight: 900;
    padding: 16px 20px;
    cursor: pointer;
    transition: 0.2s ease;
}

.aisg-submit-button:hover,
.aisg-submit-button:focus {
    background: #5427b8;
}

.aisg-security-note {
    text-align: center;
    color: #6b7280;
    font-size: 13px;
    margin: 18px 0 0;
}

@media (max-width: 767px) {
    .aisg-tela1-wrapper {
        padding: 22px;
    }

    .aisg-tela1-header {
        flex-direction: column;
    }

    .aisg-logo-text {
        text-align: left;
    }

    .aisg-radio-grid {
        grid-template-columns: 1fr;
    }

    .aisg-label-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .aisg-tooltip-balloon {
        right: auto;
        left: 0;
    }

    .aisg-tooltip-balloon::after {
        right: auto;
        left: 16px;
    }
}


/* Tela 2 - Builder 3 Colunas v1 */
.aisg-tela2-shell,
.aisg-builder-v1 {
    width: 100%;
    color: #111827;
    font-family: inherit;
}

.aisg-builder-shell {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(300px, 1fr) minmax(560px, 2fr);
    gap: 18px;
    align-items: start;
    max-width: 1560px;
    margin: 0 auto;
}

.aisg-builder-column {
    min-width: 0;
}

.aisg-panel-card,
.aisg-preview-panel-v2 {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.07);
    padding: 20px;
    margin-bottom: 18px;
}

.aisg-project-card-v2 h2 {
    margin: 0 0 8px;
    font-size: 26px;
    line-height: 1.15;
}

.aisg-project-card-v2 > p,
.aisg-panel-heading p {
    margin: 0;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.5;
}

.aisg-panel-heading {
    margin-bottom: 16px;
}

.aisg-panel-heading h3 {
    margin: 4px 0 6px;
    font-size: 17px;
    line-height: 1.25;
    color: #111827;
}

.aisg-panel-kicker {
    display: block;
    color: #6633d9;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.aisg-message {
    border-radius: 10px;
    padding: 12px 14px;
    margin: 16px 0;
    font-size: 14px;
    line-height: 1.45;
}

.aisg-message-success {
    background: #ecfdf3;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.aisg-message-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.aisg-project-summary-card {
    background: #f8f5ff;
    border: 1px solid #e5d9ff;
    border-radius: 12px;
    padding: 14px;
    margin: 18px 0 0;
}

.aisg-project-summary-card.compact {
    margin-top: 16px;
}

.aisg-project-summary-card strong,
.aisg-project-summary-card span {
    display: block;
}

.aisg-project-summary-card strong {
    font-size: 11px;
    color: #6633d9;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.aisg-project-summary-card span {
    font-weight: 900;
    font-size: 15px;
}

.aisg-project-summary-card p {
    margin: 8px 0 0;
    color: #4b5563;
    font-size: 12px;
    line-height: 1.45;
}

.aisg-builder-v1 .aisg-field-group {
    margin-bottom: 14px;
}

.aisg-builder-v1 .aisg-field-group label {
    font-size: 12px;
    margin-bottom: 6px;
}

.aisg-builder-v1 .aisg-field-group input,
.aisg-builder-v1 .aisg-field-group textarea,
.aisg-builder-v1 .aisg-field-group select {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 9px;
    padding: 11px 12px;
    font-size: 13px;
    color: #111827;
    background: #ffffff;
    box-sizing: border-box;
    outline: none;
    transition: 0.2s ease;
}

.aisg-builder-v1 .aisg-field-group textarea {
    min-height: 96px;
}

.aisg-builder-v1 .aisg-field-group input:focus,
.aisg-builder-v1 .aisg-field-group textarea:focus,
.aisg-builder-v1 .aisg-field-group select:focus {
    border-color: #6633d9;
    box-shadow: 0 0 0 3px rgba(102, 51, 217, 0.11);
}

.aisg-two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.aisg-style-grid.compact .aisg-radio-card {
    min-height: 58px;
    padding: 11px 8px;
    font-size: 13px;
}

/* Tela 2 — Seletor de estilo visual (templates) */
.aisg-style-template-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.aisg-style-template-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    width: 100%;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px;
    background: #ffffff;
    cursor: pointer;
    text-align: left;
    font: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.aisg-style-template-card:hover {
    border-color: #c7c7d1;
}

.aisg-style-template-card.is-selected {
    border-color: #6633d9;
    box-shadow: 0 0 0 1px #6633d9;
}

.aisg-style-template-badge {
    position: absolute;
    top: -9px;
    left: 50%;
    transform: translateX(-50%);
    background: #16a34a;
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 999px;
    white-space: nowrap;
}

.aisg-style-template-thumb {
    width: 100%;
    height: 74px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    background: #f3f4f6;
}

.aisg-thumb-dots {
    display: flex;
    gap: 3px;
    padding: 4px 6px;
    background: rgba(0, 0, 0, 0.05);
}

.aisg-thumb-dots span {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.15);
}

.aisg-thumb-nav {
    height: 10px;
    background: rgba(255, 255, 255, 0.6);
}

.aisg-thumb-hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 6px 8px;
}

.aisg-thumb-line {
    display: block;
    height: 5px;
    border-radius: 3px;
    background: #9ca3af;
}

.aisg-thumb-line-lg {
    width: 70%;
}

.aisg-thumb-line-sm {
    width: 45%;
}

.aisg-thumb-btn {
    width: 28px;
    height: 8px;
    border-radius: 4px;
    margin-top: 2px;
    background: #9ca3af;
}

.aisg-style-template-name {
    font-weight: 800;
    font-size: 13px;
    color: #111827;
}

.aisg-style-template-note {
    font-size: 11px;
    color: #6b7280;
    line-height: 1.35;
}

.aisg-mockup-auto .aisg-style-template-thumb {
    background: repeating-linear-gradient(45deg, #f3f4f6, #f3f4f6 6px, #e5e7eb 6px, #e5e7eb 12px);
}

.aisg-mockup-auto .aisg-thumb-nav {
    background: rgba(255, 255, 255, 0.7);
    border-bottom: 1px dashed #9ca3af;
}

.aisg-mockup-classico .aisg-style-template-thumb {
    background: #eff6ff;
}

.aisg-mockup-classico .aisg-thumb-nav {
    background: #ffffff;
    border-bottom: 2px solid #1d4ed8;
}

.aisg-mockup-classico .aisg-thumb-line {
    background: #374151;
}

.aisg-mockup-classico .aisg-thumb-btn {
    background: #1d4ed8;
}

.aisg-mockup-moderno .aisg-style-template-thumb {
    background: #f9fafb;
}

.aisg-mockup-moderno .aisg-thumb-nav {
    background: #ffffff;
    border-bottom: 2px solid #111827;
}

.aisg-mockup-moderno .aisg-thumb-line {
    background: #6b7280;
}

.aisg-mockup-moderno .aisg-thumb-btn {
    background: #111827;
}

.aisg-mockup-vibrante .aisg-style-template-thumb {
    background: #fff4ee;
}

.aisg-mockup-vibrante .aisg-thumb-nav {
    background: #ffffff;
    border-bottom: 2px solid #e8571a;
}

.aisg-mockup-vibrante .aisg-thumb-line {
    background: #2d2a27;
}

.aisg-mockup-vibrante .aisg-thumb-btn {
    background: #e8571a;
}

.aisg-mockup-premium .aisg-style-template-thumb {
    background: #f7f3ec;
}

.aisg-mockup-premium .aisg-thumb-nav {
    background: #ffffff;
    border-bottom: 2px solid #cdaa52;
}

.aisg-mockup-premium .aisg-thumb-line {
    background: #221c18;
}

.aisg-mockup-premium .aisg-thumb-btn {
    background: #cdaa52;
}

.aisg-mockup-tecnologia .aisg-style-template-thumb {
    background: #0f172a;
}

.aisg-mockup-tecnologia .aisg-thumb-nav {
    background: #111827;
    border-bottom: 2px solid #6366f1;
}

.aisg-mockup-tecnologia .aisg-thumb-dots span {
    background: rgba(255, 255, 255, 0.25);
}

.aisg-mockup-tecnologia .aisg-thumb-line {
    background: #94a3b8;
}

.aisg-mockup-tecnologia .aisg-thumb-btn {
    background: #10b981;
}

.aisg-advanced-card {
    padding: 0;
    overflow: hidden;
}

.aisg-advanced-card summary {
    padding: 18px 20px;
    cursor: pointer;
    font-weight: 900;
    color: #111827;
}

.aisg-advanced-card[open] {
    padding: 0 20px 20px;
}

.aisg-advanced-card[open] summary {
    margin: 0 -20px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.aisg-agent-card {
    background: linear-gradient(180deg, #ffffff 0%, #faf7ff 100%);
}

.aisg-agent-message {
    border: 1px solid #e5d9ff;
    background: #f8f5ff;
    color: #312e81;
    border-radius: 12px;
    padding: 13px 14px;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 14px;
}

.aisg-agent-steps {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 9px;
}

.aisg-agent-steps li {
    position: relative;
    padding: 9px 10px 9px 34px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.35;
}

.aisg-agent-steps li::before {
    content: '○';
    position: absolute;
    left: 12px;
    top: 9px;
    color: #9ca3af;
    font-weight: 900;
}

.aisg-agent-steps li.is-done {
    color: #166534;
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.aisg-agent-steps li.is-done::before {
    content: '✓';
    color: #16a34a;
}

.aisg-agent-steps li.is-active {
    color: #4c1d95;
    background: #f7f2ff;
    border-color: #c4b5fd;
}

.aisg-agent-steps li.is-active::before {
    content: '⏳';
}

.builder-actions {
    display: grid;
    gap: 10px;
}

.aisg-secondary-button,
.aisg-submit-button.aisg-generate-placeholder {
    width: 100%;
    border-radius: 9px !important;
    font-size: 14px !important;
    font-weight: 900 !important;
    padding: 13px 16px !important;
    cursor: pointer;
    text-align: center;
    text-transform: none !important;
}

.aisg-secondary-button {
    border: 1px solid #6633d9;
    background: #ffffff;
    color: #6633d9;
}

.aisg-submit-button.aisg-generate-placeholder {
    border: none !important;
    background: #6633d9 !important;
    color: #ffffff !important;
    opacity: 0.55;
    cursor: not-allowed;
}

.aisg-next-step-note {
    display: block;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.45;
    text-align: center;
}

.aisg-builder-preview {
    position: sticky;
    top: 24px;
}

.aisg-preview-panel-v2 {
    padding: 0;
    overflow: hidden;
}

.aisg-preview-cta-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(6px);
    border-top: 1px solid #e5e7eb;
    border-radius: 0 0 18px 18px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    box-shadow: 0 -8px 20px rgba(15, 23, 42, 0.1);
}

.aisg-preview-cta-text {
    margin: 0;
    font-weight: 800;
    font-size: 13px;
    color: #111827;
}

.aisg-preview-cta-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.aisg-cta-btn {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    transition: 0.2s ease;
}

.aisg-cta-btn-primary {
    background: #6633d9;
    color: #ffffff;
}

.aisg-cta-btn-primary:hover {
    background: #5427b8;
}

.aisg-cta-btn-secondary {
    background: #ffffff;
    border: 1px solid #6633d9;
    color: #6633d9;
}

.aisg-cta-btn-secondary:hover {
    background: #f5f1ff;
}

@media (max-width: 767px) {
    .aisg-preview-cta-bar {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .aisg-preview-cta-actions {
        flex-direction: column;
    }
}

..aisg-preview-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.90) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.75);
}

.aisg-device-icons {
    display: flex;
    gap: 10px;
    color: #6633d9;
    font-size: 15px;
}

.aisg-live-preview {
    --aisg-accent: #f59e0b;
    --aisg-dark: #09090b;
    --aisg-muted: #f3f4f6;
    background: #f3f4f6;
    min-height: 680px;
}

.aisg-live-preview.is-style-elegante {
    --aisg-accent: #c8a96a;
    --aisg-dark: #111827;
}

.aisg-live-preview.is-style-minimalista {
    --aisg-accent: #111827;
    --aisg-dark: #ffffff;
}

.aisg-live-preview.is-style-ousado {
    --aisg-accent: #e11d48;
    --aisg-dark: #120617;
}

.aisg-live-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 18px 28px;
    background: var(--aisg-dark);
    color: #ffffff;
}

.aisg-live-preview.is-style-minimalista .aisg-live-header {
    color: #111827;
    border-bottom: 1px solid #e5e7eb;
}

.aisg-live-header strong {
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.aisg-live-header nav {
    display: flex;
    gap: 18px;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.aisg-live-hero {
    min-height: 360px;
    padding: 54px 42px;
    color: #ffffff;
    background:
        radial-gradient(circle at 84% 30%, rgba(245, 158, 11, 0.52), transparent 24%),
        linear-gradient(135deg, #070707, #171717 58%, #0f172a);
}

.aisg-live-preview.is-style-elegante .aisg-live-hero {
    background: linear-gradient(135deg, #111827, #312e81 62%, #1f2937);
}

.aisg-live-preview.is-style-minimalista .aisg-live-hero {
    color: #111827;
    background: #ffffff;
}

.aisg-live-preview.is-style-ousado .aisg-live-hero {
    background: radial-gradient(circle at 75% 30%, rgba(225, 29, 72, 0.55), transparent 24%), linear-gradient(135deg, #120617, #3b0764 60%, #111827);
}

.aisg-live-location {
    display: inline-block;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    padding: 8px 13px;
    margin-bottom: 30px;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--aisg-accent);
}

.aisg-live-preview.is-style-minimalista .aisg-live-location {
    background: #f3f4f6;
    border-color: #e5e7eb;
}

.aisg-live-hero h1 {
    max-width: 680px;
    margin: 0 0 14px;
    font-size: clamp(36px, 5vw, 72px);
    line-height: 0.95;
    letter-spacing: -0.04em;
    text-transform: uppercase;
}

.aisg-live-hero p {
    max-width: 600px;
    margin: 0 0 28px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 16px;
    line-height: 1.55;
}

.aisg-live-preview.is-style-minimalista .aisg-live-hero p {
    color: #4b5563;
}

.aisg-live-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.aisg-live-buttons span {
    display: inline-block;
    background: var(--aisg-accent);
    color: #111827;
    border-radius: 8px;
    padding: 13px 18px;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.aisg-live-buttons span + span {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.aisg-live-preview.is-style-minimalista .aisg-live-buttons span + span {
    color: #111827;
    border-color: #d1d5db;
}

.aisg-live-benefits {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: #e5e7eb;
}

.aisg-live-benefits span {
    background: #ffffff;
    padding: 18px 20px;
    color: #374151;
    font-size: 13px;
    font-weight: 900;
    text-align: center;
}

.aisg-live-section {
    background: #f9fafb;
    padding: 34px 34px 40px;
}

.aisg-live-section-heading {
    text-align: center;
    margin-bottom: 22px;
}

.aisg-live-section-heading span {
    display: block;
    color: var(--aisg-accent);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 6px;
}

.aisg-live-section-heading h2 {
    margin: 0;
    color: #111827;
    font-size: 28px;
    line-height: 1.15;
}

.aisg-live-offer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.aisg-live-offer-grid article {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 18px;
    min-height: 118px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.aisg-live-offer-grid strong {
    display: block;
    margin-bottom: 8px;
    color: #111827;
    font-size: 15px;
}

.aisg-live-offer-grid p {
    margin: 0;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.45;
}

.aisg-live-cta {
    background: var(--aisg-dark);
    color: #ffffff;
    padding: 34px 40px;
    text-align: center;
}

.aisg-live-preview.is-style-minimalista .aisg-live-cta {
    background: #111827;
}

.aisg-live-cta span {
    display: block;
    font-size: 26px;
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 8px;
}

.aisg-live-cta p {
    max-width: 560px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
}

.aisg-live-footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    padding: 18px 24px;
    color: #4b5563;
    font-size: 13px;
}

.aisg-live-footer span:first-child {
    font-weight: 900;
    color: #111827;
}

@media (max-width: 1200px) {
    .aisg-builder-shell {
        grid-template-columns: 1fr;
        max-width: 920px;
    }

    .aisg-builder-preview {
        position: static;
    }
}

@media (max-width: 767px) {
    .aisg-panel-card,
    .aisg-preview-panel-v2 {
        border-radius: 14px;
        padding: 18px;
    }

    .aisg-preview-panel-v2 {
        padding: 0;
    }

    .aisg-two-cols,
    .aisg-style-grid,
    .aisg-live-benefits,
    .aisg-live-offer-grid {
        grid-template-columns: 1fr;
    }

    .aisg-live-header {
        align-items: flex-start;
        flex-direction: column;
        padding: 18px 22px;
    }

    .aisg-live-header nav {
        gap: 12px;
        flex-wrap: wrap;
    }

    .aisg-live-hero {
        min-height: auto;
        padding: 38px 24px;
    }

    .aisg-live-hero h1 {
        font-size: 36px;
    }

    .aisg-live-section,
    .aisg-live-cta {
        padding: 28px 22px;
    }

    .aisg-live-footer {
        flex-direction: column;
    }
}

/* Tela 2 - Ajustes de hierarquia visual v1.1 */
.aisg-builder-intro-card .aisg-design-heading-inline {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #e5e7eb;
}

.aisg-preview-project-card {
    margin: 0 0 14px;
}

.aisg-preview-project-card p {
    max-width: 720px;
}

.aisg-muted-note,
.aisg-field-help {
    margin: 0 0 14px;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.45;
}

.aisg-field-help {
    margin-top: -8px;
}

/* Tela 2 v1.3 — reorganização de colunas */
.aisg-status-project-card {
    margin: 0 0 18px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.07);
}

.aisg-builder-status .aisg-agent-card,
.aisg-builder-status .aisg-status-actions-card {
    margin-bottom: 18px;
}

.aisg-builder-sources .aisg-panel-card:last-child,
.aisg-builder-status .aisg-panel-card:last-child {
    margin-bottom: 0;
}

/* Tela 2 v1.4 — Builder por milestones */
.aisg-milestone-builder .aisg-milestone-shell {
    grid-template-columns: minmax(280px, 0.82fr) minmax(320px, 0.9fr) minmax(620px, 1.85fr);
    gap: 18px;
    max-width: 1680px;
}

.aisg-milestone-left .aisg-panel-card,
.aisg-milestone-middle .aisg-panel-card {
    margin-bottom: 14px;
}

.aisg-prompt-card .aisg-panel-heading {
    margin-bottom: 10px;
}

.aisg-prompt-text {
    margin: 0;
    color: #374151;
    font-size: 13px;
    line-height: 1.55;
}

.aisg-milestone-card {
    background: linear-gradient(180deg, #ffffff 0%, #faf7ff 100%);
}

.aisg-milestone-card .aisg-agent-message {
    margin-bottom: 16px;
}

.aisg-milestone-steps li {
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.aisg-milestone-steps li.is-active {
    transform: translateX(2px);
}

.aisg-builder-chat-card textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 12px;
    font-size: 13px;
    resize: vertical;
    box-sizing: border-box;
    outline: none;
}

.aisg-builder-chat-card textarea:focus {
    border-color: #6633d9;
    box-shadow: 0 0 0 3px rgba(102, 51, 217, 0.11);
}

.aisg-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.aisg-chip-row button,
.aisg-style-picker-inline button {
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #374151;
    border-radius: 999px;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s ease;
}

.aisg-chip-row button:hover,
.aisg-style-picker-inline button:hover,
.aisg-style-picker-inline button.is-selected {
    border-color: #6633d9;
    background: #f5f1ff;
    color: #4c1d95;
}

.aisg-mini-insights {
    display: grid;
    gap: 8px;
    margin: 12px 0 14px;
}

.aisg-mini-insights span {
    display: block;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 10px;
    padding: 10px 12px;
    color: #4b5563;
    font-size: 12px;
    line-height: 1.35;
}

.aisg-mini-insights strong {
    color: #111827;
}

.aisg-mini-insights em {
    font-style: normal;
    font-weight: 800;
    color: #6633d9;
}

.aisg-style-picker-inline {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.aisg-milestone-preview .aisg-preview-panel-v2 {
    min-height: 780px;
}

.aisg-live-preview.is-building {
    position: relative;
    overflow: hidden;
}

.aisg-building-toast {
    position: absolute;
    z-index: 5;
    right: 18px;
    bottom: 18px;
    background: rgba(255, 255, 255, 0.92);
    color: #111827;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
    padding: 11px 14px;
    font-size: 13px;
    font-weight: 800;
}

.aisg-build-section {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.aisg-build-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.aisg-live-preview .aisg-live-header.aisg-build-section {
    transform: translateY(-10px);
}

.aisg-live-preview .aisg-live-header.aisg-build-section.is-visible {
    transform: translateY(0);
}

.aisg-milestone-builder .aisg-panel-heading h3 {
    font-size: 16px;
}

.aisg-milestone-builder .aisg-field-group textarea {
    min-height: 78px;
}

.aisg-milestone-builder .aisg-advanced-card summary {
    font-size: 14px;
}

@media (max-width: 1200px) {
    .aisg-milestone-builder .aisg-milestone-shell {
        grid-template-columns: 1fr;
        max-width: 920px;
    }

    .aisg-milestone-preview .aisg-preview-panel-v2 {
        min-height: auto;
    }
}

@media (max-width: 767px) {
    .aisg-style-picker-inline {
        grid-template-columns: 1fr;
    }

    .aisg-building-toast {
        position: static;
        margin: 12px;
    }
}

/* Tela 2 — Preview real com milestones */
.aisg-real-preview-panel {
    min-height: 820px;
    display: flex;
    flex-direction: column;
}

.aisg-real-preview-stage {
    position: relative;
    flex: 1;
    min-height: 760px;
    border-radius: 18px;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}

.aisg-real-preview-stage iframe {
    width: 100%;
    height: 100%;
    min-height: 760px;
    border: 0;
    display: block;
    background: #ffffff;
}

.aisg-real-preview-empty {
    min-height: 760px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 42px;
    color: #4b5563;
    background:
        radial-gradient(circle at top, rgba(102, 51, 217, 0.11), transparent 38%),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.aisg-real-preview-empty h3 {
    margin: 16px 0 8px;
    font-size: 22px;
    color: #111827;
}

.aisg-real-preview-empty p {
    max-width: 520px;
    margin: 0 auto 12px;
    line-height: 1.55;
    font-size: 15px;
}

.aisg-real-preview-empty small {
    color: #6b7280;
    font-weight: 700;
}

.aisg-preview-loader {
    width: 54px;
    height: 54px;
    border-radius: 999px;
    border: 4px solid #ede9fe;
    border-top-color: #6633d9;
    animation: aisgSpin 1s linear infinite;
}

.aisg-real-preview-stage.is-waiting .aisg-preview-loader {
    animation-play-state: paused;
}

.aisg-real-preview-stage.is-generating .aisg-preview-loader {
    animation-play-state: running;
}

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

.aisg-preview-status-box {
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 14px;
    padding: 13px 14px;
    margin-bottom: 14px;
    display: grid;
    gap: 4px;
}

.aisg-preview-status-box strong {
    color: #111827;
    font-size: 13px;
}

.aisg-preview-status-box span {
    color: #6b7280;
    font-size: 12px;
    line-height: 1.45;
}

.aisg-preview-status-box.is-saving,
.aisg-preview-status-box.is-generating {
    border-color: #c4b5fd;
    background: #f5f1ff;
}

.aisg-preview-status-box.is-ready {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.aisg-preview-status-box.is-error {
    border-color: #fecaca;
    background: #fef2f2;
}

.aisg-preview-status-box.is-error strong {
    color: #991b1b;
}

.aisg-preview-status-box.is-ready strong {
    color: #166534;
}

@media (max-width: 1200px) {
    .aisg-real-preview-panel,
    .aisg-real-preview-stage,
    .aisg-real-preview-stage iframe,
    .aisg-real-preview-empty {
        min-height: 620px;
    }
}

@media (max-width: 767px) {
    .aisg-real-preview-panel,
    .aisg-real-preview-stage,
    .aisg-real-preview-stage iframe,
    .aisg-real-preview-empty {
        min-height: 520px;
    }
}

/* Diagnóstico temporário do Preview Real Kajhu */
.aisg-diagnostic-panel {
    margin-top: 14px;
    border: 1px dashed #8b5cf6;
    background: #fbf8ff;
    border-radius: 12px;
    padding: 12px 14px;
    color: #1f2937;
}

.aisg-diagnostic-panel summary {
    cursor: pointer;
    font-weight: 800;
    color: #4c1d95;
}

.aisg-diagnostic-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 12px;
}

.aisg-diagnostic-grid > div {
    display: grid;
    grid-template-columns: minmax(140px, 42%) 1fr;
    gap: 8px;
    padding: 7px 0;
    border-bottom: 1px solid rgba(124, 58, 237, 0.12);
    font-size: 12px;
}

.aisg-diagnostic-grid strong {
    color: #5b21b6;
}

.aisg-diagnostic-grid span {
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.aisg-diagnostic-raw {
    margin-top: 12px;
}

.aisg-diagnostic-raw pre {
    max-height: 240px;
    overflow: auto;
    background: #111827;
    color: #e5e7eb;
    padding: 12px;
    border-radius: 10px;
    font-size: 11px;
    line-height: 1.5;
}

/* Tela 2 v1.6 — layout simplificado em 2 colunas: 25% inputs / 75% preview */
.aisg-tela2-form.aisg-two-column-builder,
.aisg-milestone-builder .aisg-milestone-shell.aisg-two-column-builder {
    display: grid;
    grid-template-columns: minmax(280px, 25%) minmax(640px, 75%);
    gap: 18px;
    align-items: start;
    max-width: 1680px;
    margin: 0 auto;
}

.aisg-two-column-builder .aisg-milestone-left {
    min-width: 0;
}

.aisg-two-column-builder .aisg-milestone-preview {
    min-width: 0;
}

.aisg-left-progress-stack {
    margin-top: 18px;
}

.aisg-left-progress-heading {
    margin: 4px 0 12px;
}

.aisg-left-progress-stack .aisg-milestone-card,
.aisg-left-progress-stack .aisg-status-actions-card {
    margin-bottom: 14px;
}

.aisg-two-column-builder .aisg-preview-panel-v2,
.aisg-two-column-builder .aisg-real-preview-panel {
    min-height: calc(100vh - 72px);
}

.aisg-two-column-builder .aisg-real-preview-stage {
    min-height: calc(100vh - 150px);
}

.aisg-two-column-builder [data-aisg-preview-iframe] {
    min-height: calc(100vh - 150px);
}

@media (min-width: 1201px) {
    .aisg-two-column-builder .aisg-milestone-left {
        max-height: calc(100vh - 48px);
        overflow-y: auto;
        padding-right: 4px;
    }

    .aisg-two-column-builder .aisg-milestone-preview {
        position: sticky;
        top: 24px;
    }
}

@media (max-width: 1200px) {
    .aisg-tela2-form.aisg-two-column-builder,
    .aisg-milestone-builder .aisg-milestone-shell.aisg-two-column-builder {
        grid-template-columns: 1fr;
        max-width: 960px;
    }

    .aisg-two-column-builder .aisg-milestone-left {
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }

    .aisg-two-column-builder .aisg-milestone-preview {
        position: static;
    }

    .aisg-two-column-builder .aisg-preview-panel-v2,
    .aisg-two-column-builder .aisg-real-preview-panel,
    .aisg-two-column-builder .aisg-real-preview-stage,
    .aisg-two-column-builder [data-aisg-preview-iframe] {
        min-height: 680px;
    }
}

/* Tela 2 — Preview Desktop Escalado v1
   Faz o iframe renderizar como uma tela desktop larga e escalar proporcionalmente
   dentro da coluna de preview, evitando que cards/textos fiquem espremidos. */
.aisg-two-column-builder .aisg-real-preview-panel {
    width: 100%;
}

.aisg-two-column-builder .aisg-real-preview-stage {
    position: relative;
    width: 100%;
    height: calc(100vh - 150px);
    min-height: 620px;
    max-height: calc(100vh - 150px);
    overflow: hidden !important;
    background: #f8fafc;
    border-radius: 18px;
}

.aisg-two-column-builder .aisg-real-preview-stage.has-preview {
    background: #111827;
}

.aisg-two-column-builder .aisg-real-preview-stage iframe[data-aisg-preview-iframe] {
    position: absolute;
    top: 0;
    left: 0;
    width: 1440px;
    max-width: none !important;
    min-width: 1440px;
    height: 1200px;
    min-height: 0 !important;
    border: 0;
    background: #ffffff;
    transform-origin: top left;
    will-change: transform;
}

.aisg-two-column-builder .aisg-real-preview-stage.is-scaled-desktop iframe[data-aisg-preview-iframe] {
    box-shadow: none;
}

.aisg-two-column-builder .aisg-preview-topbar {
    position: relative;
    z-index: 2;
}

@media (max-width: 1200px) {
    .aisg-two-column-builder .aisg-real-preview-stage {
        height: 720px;
        min-height: 720px;
        max-height: none;
    }
}

@media (max-width: 767px) {
    .aisg-two-column-builder .aisg-real-preview-stage {
        height: 680px;
        min-height: 680px;
    }
}

/* Tela 2 — opções de visualização: Computador / Tablet / Smartphone / Nova aba */
.aisg-preview-topbar-with-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.aisg-preview-title-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.aisg-preview-device-controls {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.aisg-preview-device-controls button,
.aisg-preview-device-controls a {
    appearance: none;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #374151;
    border-radius: 999px;
    padding: 7px 11px;
    font-size: 12px;
    line-height: 1;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: .18s ease;
}

.aisg-preview-device-controls button:hover,
.aisg-preview-device-controls a:hover {
    border-color: #7c3aed;
    color: #5b21b6;
}

.aisg-preview-device-controls button.is-active {
    border-color: #7c3aed;
    background: #f3ecff;
    color: #5b21b6;
}

.aisg-preview-device-controls a {
    background: #111827;
    border-color: #111827;
    color: #ffffff;
}

.aisg-preview-device-controls a:hover {
    background: #000000;
    border-color: #000000;
    color: #ffffff;
}

.aisg-preview-device-controls a.is-disabled {
    opacity: .45;
    pointer-events: none;
}

.aisg-two-column-builder .aisg-real-preview-stage.is-preview-tablet,
.aisg-two-column-builder .aisg-real-preview-stage.is-preview-mobile {
    background: #e5e7eb;
}

.aisg-two-column-builder .aisg-real-preview-stage.is-preview-tablet iframe[data-aisg-preview-iframe],
.aisg-two-column-builder .aisg-real-preview-stage.is-preview-mobile iframe[data-aisg-preview-iframe] {
    border-radius: 18px;
    box-shadow: 0 20px 55px rgba(15, 23, 42, .22);
}

.aisg-two-column-builder .aisg-real-preview-stage.is-preview-mobile iframe[data-aisg-preview-iframe] {
    border-radius: 26px;
}

@media (max-width: 767px) {
    .aisg-preview-topbar-with-controls {
        align-items: flex-start;
    }

    .aisg-preview-device-controls {
        width: 100%;
    }

    .aisg-preview-device-controls button,
    .aisg-preview-device-controls a {
        flex: 1 1 auto;
        text-align: center;
    }
}

/* Tela 2 — Equal Height Columns v1
   Faz a coluna esquerda e o preview trabalharem com a mesma altura visual.
   A coluna esquerda rola internamente, enquanto o preview permanece como app viewer. */
@media (min-width: 1201px) {
    .aisg-tela2-form.aisg-two-column-builder,
    .aisg-milestone-builder .aisg-milestone-shell.aisg-two-column-builder {
        align-items: stretch !important;
        height: calc(100vh - 150px);
        min-height: 680px;
        max-height: calc(100vh - 150px);
        overflow: hidden;
    }

    .aisg-two-column-builder .aisg-milestone-left,
    .aisg-two-column-builder .aisg-milestone-preview {
        height: 100% !important;
        max-height: 100% !important;
        min-height: 0 !important;
    }

    .aisg-two-column-builder .aisg-milestone-left {
        overflow-y: auto !important;
        overflow-x: hidden;
        padding-right: 8px;
        scrollbar-gutter: stable;
    }

    .aisg-two-column-builder .aisg-milestone-preview {
        position: static !important;
        top: auto !important;
        display: flex;
        min-width: 0;
    }

    .aisg-two-column-builder .aisg-preview-panel-v2,
    .aisg-two-column-builder .aisg-real-preview-panel {
        height: 100% !important;
        min-height: 0 !important;
        max-height: 100% !important;
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .aisg-two-column-builder .aisg-preview-topbar,
    .aisg-two-column-builder .aisg-preview-topbar-with-controls {
        flex: 0 0 auto;
    }

    .aisg-two-column-builder .aisg-real-preview-stage {
        flex: 1 1 auto;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
    }
}

/* Tela 2 — Preview Topbar Fixa v1
   Centraliza o título e os modos de visualização, remove o subtítulo WordPress/Elementor
   e mantém a barra superior do preview sempre acessível. */
.aisg-preview-topbar-with-controls {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    text-align: center;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #eef0f4;
    border-radius: 16px 16px 0 0;
    z-index: 30;
}

.aisg-preview-title-block {
    width: 100%;
    align-items: center !important;
    justify-content: center;
    text-align: center;
}

.aisg-preview-title-block strong {
    display: block;
    font-size: 15px;
    line-height: 1.2;
    letter-spacing: .01em;
}

.aisg-preview-title-block span {
    display: none !important;
}

.aisg-preview-device-controls {
    justify-content: center !important;
    width: 100%;
}

.aisg-two-column-builder .aisg-preview-topbar,
.aisg-two-column-builder .aisg-preview-topbar-with-controls {
    position: sticky !important;
    top: 0;
    flex: 0 0 auto;
}

/* Mantém a barra visível mesmo quando o painel inteiro estiver dentro de uma área com rolagem. */
.aisg-two-column-builder .aisg-real-preview-panel {
    overflow: hidden;
}

.aisg-two-column-builder .aisg-real-preview-stage {
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
}

@media (max-width: 767px) {
    .aisg-preview-device-controls {
        justify-content: center !important;
    }

    .aisg-preview-device-controls button,
    .aisg-preview-device-controls a {
        flex: 0 1 auto;
    }
}

/* ==========================================================
   ONBOARDING EM 3 STEPS (Tela 1)
   ========================================================== */

.aisg-onboarding-shell .aisg-tela1-wrapper {
    position: relative;
}

/* Dots de progresso */
.aisg-onb-dots {
    display: flex;
    justify-content: center;
    gap: 28px;
    list-style: none;
    margin: 0 0 26px;
    padding: 0;
}

.aisg-onb-dots li {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: #9ca3af;
    font-size: 12px;
    font-weight: 700;
}

.aisg-onb-dot-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    background: #ffffff;
    font-size: 13px;
    transition: 0.2s ease;
}

.aisg-onb-dots li.is-active {
    color: #4c1d95;
}

.aisg-onb-dots li.is-active .aisg-onb-dot-num {
    border-color: #6633d9;
    background: #6633d9;
    color: #ffffff;
    box-shadow: 0 0 0 4px rgba(102, 51, 217, 0.15);
}

.aisg-onb-dots li.is-done {
    color: #6633d9;
}

.aisg-onb-dots li.is-done .aisg-onb-dot-num {
    border-color: #6633d9;
    background: #f5f1ff;
    color: #6633d9;
}

/* Steps */
.aisg-onb-step[hidden] {
    display: none;
}

.aisg-onb-question {
    margin: 0 0 18px;
    font-size: 20px;
    line-height: 1.3;
    color: #111827;
}

.aisg-onb-field-hint {
    margin: -4px 0 8px;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.5;
}

.aisg-onb-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 22px;
}

.aisg-onb-actions .aisg-submit-button {
    flex: 1;
}

.aisg-onb-actions .aisg-secondary-button {
    flex: 0 0 auto;
}

/* Erros inline */
.aisg-onb-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    margin-top: 4px;
}

/* Textarea do Step 1 */
.aisg-onb-textarea-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
}

.aisg-onb-examples-chip {
    border: 1px solid #ddd6fe;
    background: #f5f1ff;
    color: #6633d9;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
}

.aisg-onb-examples-chip:hover {
    background: #ede9fe;
}

/* Chips rápidos de área de atuação (Step 1) */
.aisg-onb-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.aisg-onb-chip {
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #374151;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
}

.aisg-onb-chip:hover {
    border-color: #6633d9;
    background: #f5f1ff;
    color: #4c1d95;
}

/* Toggle WhatsApp */
.aisg-onb-toggle {
    display: flex !important;
    align-items: center;
    gap: 8px;
    margin-top: 10px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #374151 !important;
    cursor: pointer;
}

.aisg-onb-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.aisg-onb-toggle-track {
    flex: 0 0 auto;
    width: 36px;
    height: 20px;
    border-radius: 999px;
    background: #d1d5db;
    position: relative;
    transition: 0.2s ease;
}

.aisg-onb-toggle-track::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ffffff;
    transition: 0.2s ease;
}

.aisg-onb-toggle input:checked + .aisg-onb-toggle-track {
    background: #6633d9;
}

.aisg-onb-toggle input:checked + .aisg-onb-toggle-track::after {
    left: 18px;
}

/* Alcance (Presencial / Online / Ambos) */
.aisg-onb-scope-grid {
    grid-template-columns: 1fr 1fr 1fr;
}

.aisg-radio-card-compact {
    padding: 10px !important;
}

/* Step 3 — referência e divisor */
.aisg-onb-reference-box input[type="url"] {
    border-color: #6633d9;
    box-shadow: 0 0 0 1px rgba(102, 51, 217, 0.12);
}

.aisg-onb-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #9ca3af;
    font-size: 13px;
    font-weight: 700;
    margin: 4px 0 18px;
}

.aisg-onb-divider::before,
.aisg-onb-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.aisg-onb-choose-style {
    width: 100%;
}

.aisg-onb-style-grid {
    margin-top: 14px;
}

.aisg-onb-style-grid[hidden] {
    display: none;
}

/* Chip de status da análise da referência */
.aisg-onb-ref-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    background: #f5f1ff;
    color: #4c1d95;
    border: 1px solid #ddd6fe;
}

.aisg-onb-ref-chip[data-status="done"] {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
}

.aisg-onb-ref-chip[data-status="done"] .aisg-onb-ref-spinner {
    display: none;
}

.aisg-onb-ref-chip[data-status="failed"] {
    background: #fffbeb;
    color: #b45309;
    border-color: #fde68a;
}

.aisg-onb-ref-chip[data-status="failed"] .aisg-onb-ref-spinner {
    display: none;
}

.aisg-onb-ref-spinner {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #ddd6fe;
    border-top-color: #6633d9;
    animation: aisg-onb-spin 0.8s linear infinite;
}

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

/* Uploads com tag */
.aisg-onb-upload-list {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.aisg-onb-upload-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
}

.aisg-onb-upload-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #374151;
}

.aisg-onb-upload-item select {
    flex: 0 0 auto;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 13px;
    background: #ffffff;
}

/* Link inline (sugestões de nome — Fase 4) */
.aisg-onb-inline-link {
    background: none;
    border: none;
    color: #6633d9;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
}

/* Bottom sheet de exemplos */
.aisg-onb-sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 9998;
}

.aisg-onb-sheet {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: min(620px, 100%);
    max-height: 70vh;
    overflow-y: auto;
    background: #ffffff;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -18px 45px rgba(15, 23, 42, 0.18);
    padding: 20px 24px 28px;
    z-index: 9999;
}

.aisg-onb-sheet[hidden],
.aisg-onb-sheet-backdrop[hidden] {
    display: none;
}

.aisg-onb-sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 16px;
    color: #111827;
}

.aisg-onb-sheet-close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
}

.aisg-onb-sheet-example {
    display: block;
    width: 100%;
    text-align: left;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 14px;
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.5;
    color: #374151;
    cursor: pointer;
    transition: 0.2s ease;
}

.aisg-onb-sheet-example:hover {
    border-color: #6633d9;
    background: #f5f1ff;
}

/* CNPJ (Fase 2 usa o slot de status) */
.aisg-cnpj-status {
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
    background: #f5f1ff;
    border: 1px solid #ddd6fe;
    color: #4c1d95;
}

.aisg-cnpj-status p {
    margin: 0;
}

.aisg-cnpj-status[data-status="loading"] {
    display: flex;
    align-items: center;
    gap: 8px;
}

.aisg-cnpj-status[data-status="confirmed"] {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #047857;
}

.aisg-cnpj-status[data-status="confirmed"] p {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.aisg-cnpj-status[data-status="not_found"],
.aisg-cnpj-status[data-status="api_error"] {
    background: #fffbeb;
    border-color: #fde68a;
    color: #b45309;
}

.aisg-cnpj-status-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 8px;
}

/* Perguntas guiadas (Step 3) */
.aisg-onb-guided {
    margin: 0 0 12px;
}

.aisg-onb-guided-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.aisg-onb-guided-counter {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 700;
    color: #6633d9;
    background: #f5f1ff;
    border-radius: 999px;
    padding: 2px 10px;
}

.aisg-onb-guided-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.aisg-onb-guided-card {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #374151;
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
}

.aisg-onb-guided-card:hover {
    border-color: #6633d9;
    background: #f5f1ff;
    color: #4c1d95;
}

.aisg-onb-guided-check {
    display: none;
    color: #047857;
    font-weight: 800;
}

.aisg-onb-guided-card.is-answered {
    border-color: #a7f3d0;
    background: #ecfdf5;
    color: #047857;
    opacity: 0.7;
}

.aisg-onb-guided-card.is-answered .aisg-onb-guided-check {
    display: inline;
}

@media (max-width: 600px) {
    .aisg-onb-dots {
        gap: 18px;
    }

    .aisg-onb-scope-grid {
        grid-template-columns: 1fr;
    }

    .aisg-onb-actions {
        flex-direction: column-reverse;
    }

    .aisg-onb-textarea-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Cards respondidos de-enfatizados no mobile (espaço crítico) */
    .aisg-onb-guided-card.is-answered {
        font-size: 12px;
        padding: 5px 10px;
        opacity: 0.55;
    }
}
