/* ===================================================================
   ARQUIVO: style.css
   DESCRIÇÃO: Estilos do componente embedado (novo layout)
   =================================================================== */

/* 1) TOKENS (inspiração Technum/EARQ) */
:root{
    --rt-bg: #ffffff;
    --rt-text: #111827;
    --rt-muted: #6b7280;
    --rt-border: #e5e7eb;
    --rt-border-2: #d1d5db;
    --rt-surface: #ffffff;
    --rt-surface-2: #f8fafc;
    --rt-primary: #2a78ff;
    --rt-success: #00D18B;
    --rt-warning: #ffc107;
    --rt-danger: #dc3545;
    --rt-radius-lg: 18px;
    --rt-radius-md: 14px;
    --rt-shadow: 0 12px 28px rgba(17,24,39,.08);
}

.rt-only-mobile{ display: none; }
.rt-hide-mobile{ display: block; }

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

html {
    scroll-behavior: smooth;
    width: 100%;
    height: 100%;
}
body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: var(--rt-bg);
    color: var(--rt-text);
    width: 100%;
    min-height: 100%;
    height: 100%;
}

.rt-price-list-page{
    --rt-bg: #F2F5FA;
}

.embed-wrapper{
    width: 100%;
    height: 100%;
    min-height: 96vh; /* fallback quando não estiver em iframe */
    background: var(--rt-bg);
    overflow: hidden; /* evita scroll externo do iframe */
}

/* Standalone (/try-now): permitir rolagem vertical natural */
body.rt-standalone-page{
    height: auto;
    min-height: 100vh;
    overflow: auto;
}
body.rt-standalone-page .embed-wrapper{
    height: auto;
    min-height: 100vh;
    overflow: auto;
}
body.rt-standalone-page .rt-step,
body.rt-standalone-page .rt-shell,
body.rt-standalone-page .rt-card--upload{
    height: auto;
}
body.rt-standalone-page .rt-card--upload{
    flex: 0 0 auto;
    min-height: unset;
}
body.rt-standalone-page .rt-card{
    overflow: visible; /* não cortar conteúdo no mobile */
}

/* 2) LAYOUT */
.rt-step{
    width: 100%;
    height: 100%;
}
.rt-step.d-none{
    display: none !important;
}
.rt-shell{
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px;
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.rt-header{
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.rt-brand{
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Rajdhani', system-ui, sans-serif;
    font-weight: 700;
    letter-spacing: .3px;
    font-size: 22px;
}
.rt-brand__mark{
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--rt-primary), var(--rt-success));
    box-shadow: 0 0 0 4px rgba(42,120,255,.10);
}
.rt-header__hint{
    font-size: 13px;
    color: var(--rt-muted);
}

.rt-card{
    background: var(--rt-surface);
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-radius-lg);
    box-shadow: var(--rt-shadow);
    overflow: hidden;
}
.rt-card--upload{
    padding: 16px;
    height: 100%;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

/* 3) UPLOAD */
.upload-viewer-wrapper{
    position: relative;
    width: 100%;
    flex: 1;
    min-height: 360px;
    border-radius: var(--rt-radius-md);
    overflow: hidden;
}
.upload-zone{
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--rt-border-2);
    border-radius: var(--rt-radius-md);
    cursor: pointer;
    background: var(--rt-surface-2);
    transition: background-color .2s ease, border-color .2s ease;
}
.upload-zone:hover, .upload-zone.dragover{
    background: #eef2ff;
    border-color: var(--rt-primary);
}

.viewer-container{
    position: absolute;
    inset: 0;
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-radius-md);
    background: var(--rt-surface);
    visibility: hidden;
    opacity: 0;
    transition: opacity .25s ease, visibility .25s ease;
}
.viewer-container.visible{
    visibility: visible;
    opacity: 1;
}
.viewer-container > *{
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.viewer-container--doc{
    position: relative;
    flex: 1;
    min-height: 0;
    visibility: visible;
    opacity: 1;
    border-radius: var(--rt-radius-md);
}

.click-overlay{
    position: absolute;
    inset: 0;
    cursor: pointer;
    background: transparent;
    display: none;
    pointer-events: none; /* não bloquear scroll/interação no PDF */
}
.viewer-container.visible + .click-overlay,
.click-overlay.visible{
    display: block;
}

.rt-actions{
    margin-top: 12px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* O reconhecimento agora é automático ao carregar o documento */
#upload-button{
    display: none !important;
}
.rt-actions .btn{
    border-radius: 12px;
    padding: 10px 14px;
    font-weight: 600;
    font-size: 14px;
}
.btn-primary{
    background-color: var(--rt-primary);
    border-color: var(--rt-primary);
}
.btn-outline-primary{
    border-color: var(--rt-primary);
    color: var(--rt-primary);
}
.btn-success{
    background-color: var(--rt-success);
    border-color: var(--rt-success);
}
.btn-success:hover{
    background-color: #00b377;
    border-color: #00a06a;
}
.btn-secondary{
    background-color: #f8f9fa;
    border-color: #dee2e6;
    color: #212529;
}
.btn-secondary:hover{
    background-color: #e9ecef;
    border-color: #ced4da;
}

/* Botão EARQ (sweep esquerda->direita no hover) */
.rt-btn-sweep{
    --rt-btn-from: #42DCB0;
    --rt-btn-to: #3ABDEC;
    color: #ffffff;
    border: 0;
    background-image: linear-gradient(90deg, var(--rt-btn-from) 0%, var(--rt-btn-from) 50%, var(--rt-btn-to) 50%, var(--rt-btn-to) 100%);
    background-size: 200% 100%;
    /* Começa "estável" e varre para a direita no hover */
    background-position: 100% 0%;
    transition: background-position .38s ease, transform .12s ease;
}
.rt-btn-sweep:hover{
    background-position: 0% 0%;
    color: #ffffff;
}
.rt-btn-sweep:focus{
    color: #ffffff;
}
.rt-btn-sweep:active{
    transform: translateY(1px);
}
.rt-btn-sweep:focus{
    box-shadow: 0 0 0 3px rgba(58, 189, 236, 0.25);
}
.rt-btn-sweep:disabled,
.rt-btn-sweep.disabled{
    opacity: .65;
    cursor: not-allowed;
}

/* 4) RESULTADO (2 colunas) */
.rt-results-grid{
    display: grid;
    grid-template-columns: minmax(320px, 1.05fr) minmax(360px, .95fr);
    gap: 16px;
    align-items: stretch;
    height: 100%;
    min-height: 0;
    flex: 1;
}
.rt-pane{
    background: var(--rt-surface);
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-radius-lg);
    box-shadow: var(--rt-shadow);
    overflow: hidden;
    min-width: 0; /* essencial para grid dentro de iframes/containers estreitos */
    height: 100%;
    min-height: 0;
}
.rt-pane--doc{
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.rt-pane--data{
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.rt-pane__footer{
    margin-top: 10px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-shrink: 0;
}
.btn-try-cta{
    background: #00DBB0;
    border-color: #00DBB0;
    color: #fff;
    font-weight: 800;
}
.btn-try-cta:hover{
    background: #00BBEE;
    border-color: #00BBEE;
    color: #fff;
}
.btn-try-cta:focus{
    box-shadow: 0 0 0 3px rgba(0, 219, 176, 0.22);
}

/* CTA do modal de boas-vindas */
.rt-login-cta{
    background: #5BDEAF;
    border: 1px solid #5BDEAF;
    color: #FFFFFF;
    font-weight: 800;
    border-radius: 12px;
}
.rt-login-cta:hover{
    background: #49d6a6;
    border-color: #49d6a6;
    color: #FFFFFF;
}
.rt-login-cta:focus{
    box-shadow: 0 0 0 3px rgba(91, 222, 175, 0.25);
}

/* Espaçamento do texto do welcome */
.rt-welcome-desc{
    margin-top: 8px;
}
.rt-welcome-note{
    margin-top: 2px;
    margin-bottom: 12px;
}
.rt-welcome-note-line{
    display: block;
}
.rt-welcome-note-line--spaced{
    margin-top: 8px;
}
.rt-pane__footer .btn{
    border-radius: 12px;
}

/* 5) ABAS / CONTEÚDO */
.nav-tabs{
    border-bottom: 1px solid var(--rt-border);
}
.nav-tabs .nav-link{
    color: var(--rt-muted);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.8rem 1.1rem;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}
.rt-tab-text{ display: inline; }
.rt-tab-img{ display: none; }
.rt-mobile-results-footer{ display: none; }
.rt-mobile-results-actions{ display: flex; gap: 10px; justify-content: space-between; }
.rt-mobile-results-actions .btn{ flex: 1 1 0; }
.rt-img-tab-mount{ height: 100%; min-height: 0; }
.nav-tabs .nav-link.rt-try-cta{
    color: #0b3b31;
    font-weight: 800;
}
.nav-tabs .nav-link.rt-try-cta:not(.active){
    background: rgba(0, 219, 176, 0.14);
    border-color: rgba(0, 219, 176, 0.22);
}
.nav-tabs .nav-link.rt-try-cta:hover{
    background: rgba(0, 219, 176, 0.22);
    border-color: rgba(0, 219, 176, 0.35);
}
.nav-tabs .nav-link.rt-try-cta.active{
    color: #00483b;
    background: rgba(0, 219, 176, 0.18);
    border-color: var(--rt-border) var(--rt-border) #fff;
}
.nav-tabs .nav-link.active{
    color: var(--rt-primary);
    border-color: var(--rt-border) var(--rt-border) #fff;
}
.nav-tabs .nav-link.cta-tab{
    color: var(--rt-success);
    font-weight: 700;
}
.tab-content{
    border: 1px solid var(--rt-border);
    border-top: 0;
    border-radius: 0 0 var(--rt-radius-lg) var(--rt-radius-lg);
    background: #fff;
    flex: 1;
    min-height: 0;
    display: flex;
}
.tab-pane{
    padding: 14px;
    flex: 1;
    min-height: 0;
    overflow: auto;
}
.rt-json-panel{
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.rt-json-toolbar{
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: auto;
    gap: 10px;
    border-top: 1px solid var(--rt-border);
    padding-top: 8px;
}
.rt-json-toolbar .btn{
    border-radius: 999px;
    font-size: 11px;
    padding: 0;
}
.rt-json-icon-btn{
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.rt-json-feedback{
    min-height: 1em;
    font-size: 11px;
    color: var(--rt-muted);
}
.rt-json-feedback.is-error{
    color: #d44949;
}
.rt-json-output{
    margin: 0;
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 12px;
    border: 1px solid var(--rt-border);
    border-radius: 12px;
    background: #fbfcfe;
    color: #1f2f48;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 12px;
    line-height: 1.45;
    white-space: pre;
    min-height: 220px;
}
.parsed-data-output{
    font-size: 0.82rem;
}

.rt-try-tab{
    max-width: 820px;
}
.rt-try-mount{
    border: none;
    border-radius: 0;
    background: transparent;
    padding: 0;
}

/* 5.1) Tabelas (Dados) */
.rt-block{
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.rt-kv-wrap{
    border: 1px solid var(--rt-border);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}
.rt-kv-table{
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}
.rt-kv-table td{
    padding: 10px 12px;
    border-top: 1px solid var(--rt-border);
    vertical-align: top;
}
.rt-kv-table tr:first-child td{
    border-top: none;
}
.rt-kv__key{
    width: 40%;
    color: var(--rt-muted);
    font-weight: 600;
    word-break: break-word;
    background: #fbfcfe;
}
.rt-kv__value{
    width: 60%;
    color: var(--rt-text);
    word-break: break-word;
}

.rt-section{
    border: 1px solid var(--rt-border);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}
.rt-section__title{
    padding: 10px 12px;
    font-family: 'Rajdhani', system-ui, sans-serif;
    font-weight: 700;
    font-size: 15px;
    border-bottom: 1px solid var(--rt-border);
    background: #fbfcfe;
}
.rt-section__body{
    padding: 12px;
}

.rt-table-wrap{
    border: 1px solid var(--rt-border);
    border-radius: 14px;
    overflow: auto;
    background: #fff;
}
.rt-data-table{
    width: 100%;
    border-collapse: collapse;
    min-width: 520px; /* habilita scroll horizontal quando necessário */
}
.rt-data-table th,
.rt-data-table td{
    padding: 8px 10px;
    border-top: 1px solid var(--rt-border);
    white-space: nowrap;
}
.rt-data-table thead th{
    position: sticky;
    top: 0;
    background: #fbfcfe;
    border-top: none;
    font-weight: 700;
    font-size: 12px;
    color: var(--rt-muted);
}

.rt-more-btn{
    margin-top: 8px;
    border: 1px solid var(--rt-border);
    background: #fff;
    color: var(--rt-primary);
    font-weight: 700;
    border-radius: 12px;
    padding: 8px 10px;
    font-size: 13px;
    align-self: flex-start;
}

.rt-list-wrap{
    border: 1px solid var(--rt-border);
    border-radius: 14px;
    padding: 10px 12px;
    background: #fff;
}
.rt-list{
    margin: 0;
    padding-left: 16px;
}
.rt-plain{
    white-space: pre-wrap;
    word-break: break-word;
}

/* 6) MODAIS (mantém base) */
.app-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(33, 37, 41, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1055;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    cursor: pointer;
}

/* Alert sempre acima de outros modais (ex.: formulário aberto) */
#alert-modal{
    z-index: 2000;
}

/* Success modal (price-list) */
#price-success-modal .app-modal-content.rt-success-modal{
    width: 50vw;  /* +25% (de 40vw -> 50vw) */
    height: 60vh; /* 3/5 da tela */
    max-width: 50vw;
    max-height: 60vh;
    padding: 1.6rem 1.7rem;
    gap: 14px;
    overflow: hidden; /* sem scroll */
}

/* Sucesso: empurra CTAs para o rodapé */
#price-success-modal .app-modal-content.rt-success-modal{
    align-items: stretch;
}
#price-success-modal .modal-text-container{
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}
.rt-success-actions{
    margin-top: auto;
    padding-top: 10px;
}
.rt-success-feedback{
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
}
.rt-success-feedback .btn{
    width: 100%;
}
.rt-success-hint{
    margin-top: 6px;
    font-size: 11.5px;
    color: #94a3b8;
    text-align: right;
}
.rt-success-icon{
    font-size: 1.9rem;
    line-height: 1;
    color: var(--rt-success);
    flex: 0 0 auto;
    margin-top: 1px;
}
.rt-success-title{
    font-size: 1.08rem;
    font-weight: 800;
    margin: 0 0 0.25rem 0;
    color: #111827;
}
.rt-success-desc{
    font-size: 0.9rem;
    color: #475569;
    margin: 0;
}
.rt-success-spacer{
    height: 10px;
}
.rt-success-text{
    font-size: 0.9rem;
    color: #334155;
    margin: 0 0 0.85rem 0;
    line-height: 1.35;
}
.rt-success-actions{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: start; /* não desalinhar por causa do hint */
}
.rt-success-actions .btn{
    width: 100%;
    min-height: 32px;
    white-space: nowrap; /* sem quebra */
}

@media (max-width: 760px){
    #price-success-modal .app-modal-content.rt-success-modal{
        width: 92vw;
        height: auto;
        max-width: 92vw;
        max-height: 92vh;
        padding: 1.35rem 1.25rem;
    }
    .rt-success-actions{
        grid-template-columns: 1fr;
    }
    .rt-success-actions .btn{
        width: 100%;
        min-height: 32px;
    }
}

/* Price lead modal: -15% (encaixotado) */
#price-lead-modal .app-modal-content.registration{
    width: 60vw;  /* 3/5 da tela */
    height: 80vh; /* 4/5 da tela */
    max-width: 60vw;
    max-height: 80vh;
    padding: 1.7rem;
    overflow: hidden; /* sem scroll */
    display: flex;
    flex-direction: column;
}
#price-lead-modal .registration-modal-header{
    margin-bottom: 1.1rem;
}

/* Price lead: etapa verify mais enxuta (largura menor) */
#price-lead-modal.rt-price-lead--verify .app-modal-content.registration{
    width: 40vw;  /* 2/5 da tela */
    height: 60vh; /* 3/5 da tela */
    max-width: 40vw;
    max-height: 60vh;
}

#price-lead-modal .rt-try-flow{
    flex: 1 1 auto;
    min-height: 0;
}

/* Mantém o botão sempre visível (sem scroll) */
#price-lead-modal .rt-try-flow,
#price-lead-modal .registration-form{
    display: flex;
    flex-direction: column;
}
#price-lead-modal .registration-form{
    flex: 1 1 auto;
    min-height: 0;
}
#price-lead-modal .rt-try-grid{
    flex: 1 1 auto;
    min-height: 0;
    gap: 10px 16px; /* mais compacto no desktop */
}
#price-lead-modal .rt-field{
    gap: 4px;
}
#price-lead-modal .rt-field label{
    font-size: 11.5px;
}
#price-lead-modal .rt-field .form-control,
#price-lead-modal .rt-field .form-select,
#price-lead-modal .rt-field textarea{
    padding: 9px 11px;
    font-size: 13.5px;
}
#price-lead-modal .rt-field .form-control,
#price-lead-modal .rt-field .form-select{
    min-height: 34px;
}
#price-lead-modal textarea.form-control{
    min-height: 64px;
}
#price-lead-modal .rt-try-actions{
    margin-top: auto;
    padding-top: 10px;
}
#price-lead-modal .rt-try-actions .btn{
    padding: 8px 14px;
    font-size: 12.5px;
    min-height: 34px;
}

/* Token stack (price lead verify) */
#price-lead-modal.rt-price-lead--verify .rt-token-stack{
    max-width: 360px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
}
#price-lead-modal.rt-price-lead--verify .rt-token-stack .form-control{
    text-align: left;
}
#price-lead-modal.rt-price-lead--verify .rt-token-stack .btn{
    width: 100%;
}
#price-lead-modal.rt-price-lead--verify .rt-token-stack .btn-link{
    width: auto;
    align-self: center;
    padding: 0.15rem 0.25rem;
}

.rt-try-link--muted{
    font-weight: 600;
    font-size: 12px;
    color: #64748b;
    opacity: 0.9;
}
.rt-try-link--muted:hover{
    color: #475569;
    text-decoration: none;
}

.app-modal[data-closable="false"] {
    cursor: default;
}

.app-modal.visible {
    visibility: visible;
    opacity: 1;
}

.app-modal-content {
    background-color: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    width: 90%;
    max-width: 400px;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    cursor: default;
    position: relative; /* âncora para o X */
}

.rt-modal-x{
    position: absolute;
    top: 14px;
    right: 14px;
    border: 0;
    background: transparent;
    color: #64748b;
    padding: 6px 8px;
    border-radius: 10px;
    line-height: 1;
    z-index: 2;
}
.rt-modal-x:hover{
    background: rgba(100, 116, 139, 0.12);
    color: #334155;
}
.app-modal[data-closable="false"] .rt-modal-x{
    display: none !important;
}

.rt-modal-step{
    position: absolute;
    top: 16px;
    right: 52px; /* alinhado ao X */
    font-size: 12px;
    font-weight: 800;
    color: #64748b;
    letter-spacing: 0.02em;
    user-select: none;
}
.rt-modal-step:empty{
    display: none;
}

.app-modal-content.registration {
    max-width: 800px;
    border-top: 4px solid var(--rt-primary);
    box-shadow: 0 0.5rem 1.5rem rgba(0,0,0,0.1);
    display: block;
    padding: 2rem;
}

/* Modais do fluxo try-now (mesmo estilo do formulário) */
.app-modal-content.registration.rt-try-modal{
    max-width: 620px;
    border-top-color: #00DBB0;
}
.rt-try-modal-flow{
    max-width: 560px;
}
.rt-try-welcome-title{
    font-family: 'Rajdhani', system-ui, sans-serif;
    font-weight: 700;
    font-size: 22px;
    letter-spacing: .02em;
    color: #111827;
}
.rt-try-welcome-text{
    margin-top: 6px;
    font-size: 14px;
    color: #546e7a;
    line-height: 1.35;
}
.rt-try-welcome-actions{
    margin-top: 14px;
    display: flex;
    justify-content: flex-end;
}

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

.modal-header-icon {
    font-size: 1.5rem;
    color: var(--rt-primary);
    background-color: #f0f5ff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.modal-icon-container {
    font-size: 1.75rem;
    color: var(--rt-primary);
}

.modal-icon-container.text-warning { color: var(--rt-warning); }
.modal-icon-container.text-danger { color: var(--rt-danger); }
.modal-icon-container.text-success { color: var(--rt-success); }


.modal-text-container {
    flex-grow: 1;
}

.modal-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-text);
    margin: 0 0 0.25rem 0;
}

.modal-description {
    font-size: 0.875rem;
    color: var(--muted-text);
    margin-bottom: 1rem;
}

#alert-modal-message{
    white-space: pre-line;
}

#alert-modal-message.rt-alert-rich{
    white-space: normal;
}
.rt-alert-rich__headline{
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--dark-text);
    margin: 0 0 0.85rem 0;
}
.rt-alert-rich__p{
    display: block;
    margin: 0 0 0.85rem 0;
}
.rt-alert-rich__p--last{
    margin-bottom: 0;
}
.rt-alert-actions{
    margin-top: 10px;
}

#existing-account-modal .app-modal-content{
    /* +15% vs padrão (400px -> 460px) */
    max-width: 460px;
    width: min(460px, 92vw);
}

.rt-suggest-tag{
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(42, 120, 255, 0.28);
    background: rgba(42, 120, 255, 0.10);
    color: #1d4ed8;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    margin: 0 2px;
    transition: background-color .15s ease, border-color .15s ease, transform .12s ease;
}
.rt-suggest-tag:hover{
    background: rgba(0, 219, 176, 0.14);
    border-color: rgba(0, 219, 176, 0.40);
    color: #0f766e;
}
.rt-suggest-tag:active{
    transform: translateY(1px);
}

.rt-btn-tall{
    padding-top: 10px;
    padding-bottom: 10px;
    min-height: 40px;
    font-weight: 700;
}

#price-question-modal .app-modal-content{
    /* +20% vs padrão (400px -> 480px) para caber textos */
    max-width: 480px;
}
#price-question-modal .modal-title{
    margin-bottom: 0.65rem; /* mais respiro entre título e pergunta */
}
#price-question-modal .rt-alert-actions{
    margin-top: 14px;
}

.rt-modal-subtle{
    margin-top: -6px;
    margin-bottom: 10px;
    font-size: 0.8rem;
    color: var(--muted-text);
}
.rt-modal-link{
    color: var(--muted-text);
    text-decoration: none;
    font-weight: 600;
}
.rt-modal-link:hover{
    color: var(--rt-primary);
    text-decoration: underline;
}
.rt-modal-actions-row{
    display: flex;
    justify-content: flex-end;
    margin-top: 6px;
}

#registration-modal .modal-title {
    font-size: 1.1rem;
    text-align: left;
    margin-bottom: 0.1rem;
}

#registration-modal .modal-description {
    text-align: left;
    margin-bottom: 0;
}

#registration-modal .form-label {
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}
#registration-modal .form-control, #registration-modal .form-select {
    font-size: 0.9rem;
}
#registration-modal .row {
    --bs-gutter-x: 1rem;
    --bs-gutter-y: 0.75rem;
}

/* Try-now / Registro (section-like, small controls, no scroll noise) */
.rt-try-flow{
    max-width: 560px;
    margin: 0 auto;
}
.rt-try-grid{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 18px;
}
.rt-field{
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.rt-field label{
    font-size: 12px;
    letter-spacing: 0.02em;
    color: #37474f;
    font-weight: 700;
    margin: 0;
}
.rt-field .form-control,
.rt-field .form-select,
.rt-field textarea{
    border-radius: 6px;
    border: 1px solid #cfd8dc;
    padding: 10px 12px; /* small, mas confortável */
    font-size: 14px;
    line-height: 1.15;
    background: #fff;
    box-shadow: none;
}
.rt-field textarea{
    resize: none;
    padding-top: 10px;
    padding-bottom: 10px;
}
.rt-field--wide{
    grid-column: 1 / -1;
}
.rt-field--textarea{
    align-items: stretch;
}
.rt-try-flow .form-control::placeholder{ color: #94a3b8; }
.rt-try-flow .form-control:focus,
.rt-try-flow .form-select:focus,
.rt-try-flow textarea:focus{
    border-color: rgba(0, 0, 0, 0.35);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.08);
}

.rt-try-actions{
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 14px;
    justify-content: space-between;
}
.rt-try-actions--single{
    justify-content: flex-end;
}

.rt-highlight{
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(66, 220, 176, 0.18);
    color: #0b3b33;
    font-weight: 800;
    letter-spacing: .02em;
}

.rt-rating{
    display: inline-flex;
    gap: 10px;
    flex-wrap: wrap;
}
.rt-rating__btn{
    border: 1px solid var(--rt-border-2);
    background: #ffffff;
    color: #111827;
    border-radius: 10px;
    padding: 8px 12px;
    min-width: 42px;
    font-weight: 800;
    transition: transform .12s ease, border-color .15s ease, box-shadow .15s ease;
}
.rt-rating__btn:hover{
    border-color: rgba(58, 189, 236, 0.9);
    box-shadow: 0 0 0 2px rgba(58, 189, 236, 0.18);
}
.rt-rating__btn.is-active{
    border-color: rgba(66, 220, 176, 0.95);
    box-shadow: 0 0 0 2px rgba(66, 220, 176, 0.20);
    transform: translateY(-1px);
}

/* Cores por nota (1=baixo, 5=alto) */
.rt-rating__btn[data-rating="1"]{ --rt-rate: #ef4444; }
.rt-rating__btn[data-rating="2"]{ --rt-rate: #f97316; }
.rt-rating__btn[data-rating="3"]{ --rt-rate: #f59e0b; }
.rt-rating__btn[data-rating="4"]{ --rt-rate: #22c55e; }
.rt-rating__btn[data-rating="5"]{ --rt-rate: #16a34a; }
.rt-rating__btn.is-active{
    background: var(--rt-rate);
    border-color: var(--rt-rate);
    color: #ffffff;
    box-shadow: 0 0 0 2px rgba(66, 220, 176, 0.18);
}

.rt-yn{
    display: inline-flex;
    gap: 10px;
    flex-wrap: wrap;
}
.rt-yn__btn{
    border: 1px solid var(--rt-border-2);
    background: #ffffff;
    color: #111827;
    border-radius: 10px;
    padding: 8px 14px;
    font-weight: 800;
    transition: transform .12s ease, border-color .15s ease, box-shadow .15s ease;
}
.rt-yn__btn:hover{
    border-color: rgba(58, 189, 236, 0.9);
    box-shadow: 0 0 0 2px rgba(58, 189, 236, 0.18);
}
.rt-yn__btn.is-active{
    background: #42DCB0;
    border-color: #42DCB0;
    color: #ffffff;
    box-shadow: 0 0 0 2px rgba(66, 220, 176, 0.20);
    transform: translateY(-1px);
}

/* Feedback modal: compacto, sem scroll */
#rt-feedback-modal .app-modal-content.registration{
    width: 60vw;  /* 3/5 da tela */
    height: 80vh; /* 4/5 da tela */
    max-width: 60vw;
    max-height: 80vh;
    padding: 1.05rem 1.25rem;
    overflow: hidden; /* sem scroll */
    display: flex;
    flex-direction: column;
}
#rt-feedback-modal .registration-modal-header{
    margin-bottom: 0.65rem;
    position: relative;
}
#rt-feedback-modal .registration-modal-header{
    display: flex;
    align-items: center;
}
#rt-feedback-modal .registration-modal-header .modal-header-text{
    flex: 1 1 auto;
    min-width: 0;
}

.rt-modal-close{
    border: 0;
    background: transparent;
    color: #64748b;
    padding: 6px 8px;
    border-radius: 10px;
    line-height: 1;
    flex: 0 0 auto;
}
.rt-modal-close:hover{
    background: rgba(100, 116, 139, 0.12);
    color: #334155;
}

#rt-feedback-modal .rt-feedback-comment-field{
    max-width: 75%;
    align-self: flex-start;
}
@media (max-width: 760px){
    #rt-feedback-modal .rt-feedback-comment-field{
        max-width: 100%;
    }
}
#rt-feedback-modal .modal-title{
    font-size: 1.05rem;
}
#rt-feedback-modal .modal-description{
    font-size: 0.82rem;
    margin-bottom: 0;
}
#rt-feedback-modal .rt-try-flow{
    max-width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
#rt-feedback-modal #rt-feedback-form{
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

#rt-feedback-modal .rt-feedback-fields{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 14px;
    align-content: start;
    flex: 1 1 auto;
    min-height: 0;
}
#rt-feedback-modal .rt-feedback-fields .rt-field{
    margin-bottom: 0; /* grid controla espaçamento */
}
#rt-feedback-modal .rt-feedback-fields .rt-field--wide{
    grid-column: 1 / -1;
}
#rt-feedback-modal .rt-field{
    gap: 4px;
    margin-bottom: 6px;
}
#rt-feedback-modal .rt-field:last-of-type{
    margin-bottom: 0;
}
#rt-feedback-modal .rt-field label{
    font-size: 11.5px;
}
#rt-feedback-modal .rt-rating{
    gap: 6px;
}
#rt-feedback-modal .rt-rating__btn{
    padding: 4px 8px;
    min-width: 32px;
    font-size: 11.5px;
    border-radius: 8px;
}
#rt-feedback-modal .rt-yn__btn{
    padding: 4px 9px;
    font-size: 11.5px;
    border-radius: 8px;
}
#rt-feedback-modal textarea.form-control{
    font-size: 12.5px;
    padding: 7px 9px;
    min-height: 46px; /* ~2 linhas */
}

/* Mantém o botão sempre visível */
#rt-feedback-modal .rt-try-actions{
    margin-top: auto;
    padding-top: 8px;
}
#rt-feedback-modal .rt-try-actions .btn{
    padding: 7px 12px;
    font-size: 11.5px;
    min-height: 34px;
}

@media (max-width: 576px){
    /* Mobile: ~15% menor para caber inteiro na tela */
    #rt-feedback-modal .app-modal-content.registration{
        width: 92vw;
        height: auto;
        max-width: 92vw;
        max-height: 92vh;
        padding: 0.95rem 1.05rem;
    }
    #rt-feedback-modal .rt-feedback-fields{
        grid-template-columns: 1fr;
        gap: 6px 12px;
    }
    #rt-feedback-modal .registration-modal-header{
        margin-bottom: 0.6rem;
    }
    #rt-feedback-modal .modal-title{
        font-size: 0.95rem;
    }
    #rt-feedback-modal .rt-field{
        margin-bottom: 6px;
    }
    #rt-feedback-modal .rt-rating{
        gap: 6px;
    }
    #rt-feedback-modal .rt-rating__btn{
        padding: 4px 8px;
        min-width: 32px;
        font-size: 11px;
    }
    #rt-feedback-modal .rt-yn__btn{
        padding: 4px 9px;
        font-size: 11px;
    }
    #rt-feedback-modal textarea.form-control{
        padding: 6px 8px;
        font-size: 11.5px;
        min-height: 42px; /* ~2 linhas */
    }
    #rt-feedback-modal .rt-try-actions .btn{
        padding: 6px 11px;
        font-size: 11.2px;
    }
}
.rt-try-consent{
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}
.rt-try-consent--inline label{
    display: block;
    max-width: 100%;
}
.rt-try-consent input[type="checkbox"]{
    margin-top: 0;
    cursor: pointer;
}
.rt-try-consent label{
    font-size: 12px;
    color: #546e7a;
    line-height: 1.25;
    cursor: pointer;
    margin: 0;
}
.rt-try-consent a{
    color: #00acc1;
    text-decoration: none;
    font-weight: 600;
}
.rt-try-consent a:hover{
    text-decoration: underline;
}
.rt-try-flow .btn{
    border-radius: 6px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.rt-try-actions .btn.btn-primary{
    flex: 0 0 auto;
    min-width: 170px;
}
.rt-try-flow .btn.btn-primary{
    background: #00DBB0;
    border-color: #00DBB0;
    color: #fff;
}
.rt-try-flow .btn.btn-primary:hover{
    background: #00BBEE;
    border-color: #00BBEE;
    color: #fff;
}
.rt-try-flow .btn.btn-primary:focus{
    box-shadow: 0 0 0 3px rgba(0, 219, 176, 0.22);
}
.rt-try-flow .btn.btn-secondary{
    background: #e9eef2;
    border-color: #e9eef2;
    color: #111827;
    text-transform: none;
    letter-spacing: 0;
}
.rt-try-verify-hint{
    font-size: 0.8rem;
    color: #37474f;
    font-weight: 600;
}
.rt-try-verify-row{
    margin-top: 8px;
    display: grid;
    grid-template-columns: 60px 1fr auto;
    gap: 10px;
    align-items: center;
}

/* Verify row compacta (sem rótulo) - override após base */
.rt-try-verify-row.rt-try-verify-row--compact{
    display: flex;
    align-items: center;
    gap: 10px;
}
.rt-try-verify-row.rt-try-verify-row--compact input{
    flex: 0 1 70%;
    min-width: 0;
    max-width: none;
}
.rt-try-verify-row.rt-try-verify-row--compact input.form-control-sm{
    height: 36px;
}
.rt-try-verify-row.rt-try-verify-row--compact button{
    flex: 0 0 30%;
    width: auto;
    min-width: 0;
    padding: 0.25rem 0.5rem;
    white-space: nowrap;
    text-align: center;
    justify-content: center;
    height: 36px;
}

/* Input/token: mesmo padrão visual dos forms */
.rt-try-verify-row.rt-try-verify-row--compact .form-control{
    border-radius: 6px;
    border: 1px solid #cfd8dc;
    padding: 8px 10px;
    font-size: 13px;
    line-height: 1.15;
    background: #fff;
    box-shadow: none;
}
.rt-try-verify-row.rt-try-verify-row--compact .form-control:focus{
    border-color: rgba(0, 0, 0, 0.35);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.08);
}
.rt-try-code-label{
    font-size: 0.72rem;
    font-weight: 700;
    color: #37474f;
    margin: 0;
    white-space: nowrap;
}
.rt-try-verify-actions{
    margin-top: 6px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}
.rt-try-verify-actions .btn-secondary{
    padding: 0.4rem 0.7rem;
    font-size: 0.82rem;
}
.rt-try-verify-actions .btn-link{
    padding: 0.25rem 0.2rem;
}
.rt-try-link{
    text-decoration: none;
    font-weight: 700;
    color: #00acc1;
}
.rt-try-link:hover{
    text-decoration: underline;
}

@media (max-width: 520px){
    /* Abas em 1 linha no mobile */
    .nav-tabs{
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
    }
    .nav-tabs .nav-item{
        flex: 0 0 auto;
        min-width: 0;
    }
    .nav-tabs .nav-link{
        width: auto;
        text-align: center;
        white-space: nowrap;
        padding: 0.55rem 0.65rem;
        font-size: 0.82rem;
        min-width: 84px; /* confortável para toque */
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    /* Mobile: economizar espaço, mostrar apenas ícones */
    .rt-tab-text{ display: none; }
    .nav-tabs .nav-link .rt-tab-icon i{ margin-right: 0 !important; }
    .rt-tab-img{ display: block; }

    .rt-try-grid{ grid-template-columns: 1fr; }

    /* ~10% menor no mobile (duas reduções de ~5%) para evitar scroll */
    .rt-try-grid{ gap: 10px 16px; }
    .rt-field{ gap: 4px; }
    .rt-field .form-control,
    .rt-field .form-select,
    .rt-field textarea{
        padding: 8px 11px;
        font-size: 13px;
    }
    .rt-try-actions{ margin-top: 8px; }
    .rt-try-flow .btn{
        padding: 8px 16px;
        font-size: 12px;
    }
    .rt-try-consent label{ font-size: 11px; }

    .rt-try-actions{
        flex-direction: column;
        align-items: stretch;
    }
    .rt-try-actions .btn.btn-primary{ min-width: 0; width: 100%; }
    .rt-try-consent{ justify-content: flex-start; }
    .rt-try-verify-row:not(.rt-try-verify-row--compact){
        grid-template-columns: 60px 1fr;
        grid-template-areas:
            "lbl inp"
            "btn btn";
    }
    .rt-try-verify-row:not(.rt-try-verify-row--compact) .rt-try-code-label{ grid-area: lbl; }
    .rt-try-verify-row:not(.rt-try-verify-row--compact) input{ grid-area: inp; }
    .rt-try-verify-row:not(.rt-try-verify-row--compact) button{ grid-area: btn; width: 100%; }
}

/* Mobile: dar mais altura útil para abas (Dados/Perform./Começar grátis) */
@media (max-width: 520px){
    /* Permite que a seção de resultados cresça e use scroll vertical da página/iframe */
    .rt-results-grid{ height: auto; }
    .rt-pane{ height: auto; }

    /* Aumenta significativamente a área das abas (≈3x em relação ao que estava visível) */
    .rt-pane--data .tab-content{
        min-height: 60vh;
    }
    .rt-pane--data .tab-pane{
        min-height: 60vh;
    }

    /* Mais linhas visíveis em Dados: reduz altura do preview e espaçamentos */
    .viewer-container--doc{
        height: 30vh;
        min-height: 200px;
    }
    .tab-pane{
        padding: 10px;
    }
    .rt-kv-table td{
        padding: 8px 10px;
    }
    .parsed-data-output{
        font-size: 0.80rem;
    }

    /* Mobile only: mover o viewer para a aba Img e deixar Dados ocupar mais altura */
    body.rt-mobile-results-tabs #results-container .rt-pane--doc{
        display: none;
    }
    body.rt-mobile-results-tabs #results-container .rt-results-grid{
        grid-template-columns: 1fr;
    }
    body.rt-mobile-results-tabs #results-container .rt-pane--data{
        height: auto;
    }
    body.rt-mobile-results-tabs #results-container .rt-mobile-results-footer{
        display: block;
        border-top: 1px solid var(--rt-border);
        padding: 10px 12px 12px;
        background: #fff;
    }
    body.rt-mobile-results-tabs #results-container .rt-pane--data .tab-content{
        min-height: 72vh; /* mais alto, agora sem dividir com o viewer */
    }
    body.rt-mobile-results-tabs #results-container .rt-pane--data .tab-pane{
        min-height: 72vh;
    }

    /* Aba Img: viewer deve usar 100% da altura disponível */
    body.rt-mobile-results-tabs #img-tab-pane{
        padding: 0;
        overflow: hidden;
    }
    body.rt-mobile-results-tabs #img-viewer-mount{
        height: 100%;
        min-height: 0;
    }
    body.rt-mobile-results-tabs #img-tab-pane #viewer-container-doc.viewer-container--doc{
        height: 100% !important;
        min-height: 0 !important;
    }

    /* Mobile + aba "Começar grátis": reduzir ~10% alturas para não gerar scroll */
    body.rt-mobile-results-tabs #try-now-tab-pane{
        overflow: hidden;
    }
    body.rt-mobile-results-tabs #try-now-tab-pane .rt-try-flow{
        max-width: 100%;
        margin: 0;
    }
    body.rt-mobile-results-tabs #try-now-tab-pane .rt-try-grid{
        gap: 9px 14px;
    }
    body.rt-mobile-results-tabs #try-now-tab-pane .rt-field{
        gap: 3px;
    }
    body.rt-mobile-results-tabs #try-now-tab-pane .rt-field label{
        font-size: 11px;
    }
    body.rt-mobile-results-tabs #try-now-tab-pane .rt-field .form-control,
    body.rt-mobile-results-tabs #try-now-tab-pane .rt-field .form-select,
    body.rt-mobile-results-tabs #try-now-tab-pane .rt-field textarea{
        padding: 7px 10px;
        font-size: 12.5px;
    }
    body.rt-mobile-results-tabs #try-now-tab-pane .rt-field textarea{
        height: 54px; /* garante encaixe */
    }
    body.rt-mobile-results-tabs #try-now-tab-pane .rt-try-actions{
        margin-top: 7px;
        gap: 10px;
    }
    body.rt-mobile-results-tabs #try-now-tab-pane .rt-try-consent label{
        font-size: 10.5px;
    }
    body.rt-mobile-results-tabs #try-now-tab-pane .rt-try-flow .btn{
        padding: 7px 14px;
        font-size: 11.5px;
    }

    /* Mobile: quando estiver na aba "Começar grátis", esconder footer (Reconhecer outro) */
    body.rt-mobile-try-now-active #results-container .rt-mobile-results-footer{
        display: none !important;
    }
}


.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: .25rem;
    font-size: .875em;
    color: var(--rt-danger);
}

.invalid-feedback.d-block {
    display: block;
}

#loading-message {
    font-size: 1rem;
    font-weight: 500;
    color: var(--dark-text);
    margin: 0;
    display: flex;
    align-items: center;
}

.progress-container {
    position: relative;
    width: 100%;
}

.progress-bar {
    background-color: var(--rt-primary);
    transition: width 1s linear;
}

.timer {
    position: absolute;
    right: 0;
    top: -18px;
    font-size: 0.75rem;
    color: var(--rt-muted);
}


/* 6. RESPONSIVIDADE
   ------------------------------------------------------------------- */
@media (max-width: 860px) {
    .rt-results-grid{
        grid-template-columns: 1fr;
    }
    .upload-viewer-wrapper{
        height: min(56vh, 520px);
        min-height: 340px;
    }
    .app-modal-content.registration {
        max-width: 90%;
    }
}

@media (max-width: 576px){
    .rt-header{
        flex-direction: column;
        align-items: flex-start;
    }
    .rt-actions{
        flex-direction: column;
        align-items: stretch;
    }

    .rt-only-mobile{ display: block; }
    .rt-hide-mobile{ display: none; }
}

/* Ajustes para mobile dentro de iframe: reduzir o preview mínimo do documento */
@media (max-width: 860px){
    .viewer-container--doc{
        height: 42vh;
        min-height: 260px;
    }
    .tab-pane{
        max-height: none; /* deixa o iframe/página rolar naturalmente */
    }
    .rt-data-table{
        min-width: 440px;
    }
}

/* 7) PRICE LIST (/price-list)
   ------------------------------------------------------------------- */
.rt-price-wrap{
    width: 100%;
    overflow-x: auto;
    padding: 4px 2px;
}
.rt-price-grid{
    display: grid;
    grid-template-columns: repeat(4, minmax(220px, 1fr));
    gap: 16px;
    align-items: stretch;
}

/* 8) PRICE TABLE (/price-table) removida (não utilizada) */
.rt-price-plan{
    background: var(--rt-surface);
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-radius-lg);
    box-shadow: var(--rt-shadow);
    padding: 18px 18px 16px;
    display: flex;
    flex-direction: column;
    min-height: 420px;
}
.rt-price-badge{
    align-self: center;
    background: #00bcd4;
    color: #fff;
    font-weight: 800;
    letter-spacing: .06em;
    font-size: 12px;
    padding: 7px 12px;
    border-radius: 10px;
    text-transform: uppercase;
}
.rt-price-badge--usage{
    background: linear-gradient(135deg, var(--rt-primary), var(--rt-success));
}
.rt-price-amount{
    margin-top: 18px;
    text-align: center;
    font-family: 'Rajdhani', system-ui, sans-serif;
    font-weight: 800;
    color: #111827;
    line-height: 1;
}
.rt-price-currency{
    font-size: 18px;
    margin-right: 4px;
    vertical-align: top;
    opacity: .9;
}
.rt-price-value{
    font-size: 46px;
    letter-spacing: .02em;
}
.rt-price-period{
    font-size: 18px;
    margin-left: 3px;
    opacity: .85;
}
.rt-price-amount--usage{
    margin-top: 26px;
}
.rt-price-value--usage{
    font-size: 28px;
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 700;
    color: #111827;
}
.rt-price-features{
    list-style: none;
    padding: 0;
    margin: 18px 0 0 0;
    display: grid;
    gap: 10px;
    color: #64748b;
    font-size: 14px;
}
.rt-price-features li{
    display: flex;
    gap: 10px;
    align-items: flex-start;
    line-height: 1.35;
}
.rt-price-features .bi{
    color: var(--rt-primary);
    font-size: 16px;
    margin-top: 1px;
    flex: 0 0 auto;
}
.rt-price-choose{
    margin-top: auto;
    width: 100%;
    border-radius: 12px;
    padding: 10px 14px;
    font-weight: 700;
    color: #ffffff;
}

.rt-price-plan--featured{
    background: #1f5ea8;
    border-color: rgba(31, 94, 168, 0.65);
}
.rt-price-plan--featured .rt-price-badge{
    background: rgba(255,255,255,.16);
    color: #fff;
}
.rt-price-plan--featured .rt-price-amount,
.rt-price-plan--featured .rt-price-value,
.rt-price-plan--featured .rt-price-period,
.rt-price-plan--featured .rt-price-currency{
    color: #fff;
}
.rt-price-plan--featured .rt-price-features{
    color: rgba(255,255,255,.82);
}
.rt-price-plan--featured .rt-price-features .bi{
    color: rgba(255,255,255,.92);
}

@media (max-width: 1020px){
    .rt-price-grid{
        grid-template-columns: repeat(2, minmax(240px, 1fr));
    }
}
@media (max-width: 576px){
    /* Mobile: carrossel (1 plano por vez) */
    .rt-price-grid{
        display: block;
    }
    .rt-price-carousel{
        width: 100%;
    }
    .rt-price-carousel .carousel-inner{
        overflow: hidden;
    }
    .rt-price-carousel .carousel-item{
        padding: 0 2px;
    }
    .rt-price-carousel .carousel-indicators{
        position: static;
        margin: 12px 0 0;
    }
    .rt-price-carousel .carousel-indicators [data-bs-target]{
        width: 8px;
        height: 8px;
        border-radius: 999px;
        background-color: rgba(15, 23, 42, 0.25);
        opacity: 1;
    }
    .rt-price-carousel .carousel-indicators .active{
        background-color: rgba(66, 220, 176, 0.95);
    }
    .rt-price-carousel .carousel-control-prev,
    .rt-price-carousel .carousel-control-next{
        width: 42px;
        opacity: 0.85;
    }
    .rt-price-carousel .carousel-control-prev-icon,
    .rt-price-carousel .carousel-control-next-icon{
        filter: none;
        background-color: rgba(15, 23, 42, 0.75);
        border-radius: 999px;
        background-size: 58% 58%;
        width: 34px;
        height: 34px;
    }

    /* Cards mais compactos */
    .rt-price-plan{
        min-height: unset;
        padding: 16px 14px 14px; /* +~10% altura/conforto */
    }
    .rt-price-badge{
        font-size: 11px;
        padding: 6px 10px;
        border-radius: 10px;
    }
    .rt-price-value{
        font-size: 40px;
    }
    .rt-price-period, .rt-price-currency{
        font-size: 16px;
    }
    .rt-price-features{
        font-size: 13px;
        gap: 9px;
        margin-top: 16px;
    }
    .rt-price-choose{
        padding: 9px 12px;
    }
}

/* Price lead modal: mobile mais enxuto */
@media (max-width: 576px){
    #price-lead-modal .app-modal-content.registration{
        /* ~20% menor para encaixar melhor no iframe */
        padding: 0.9rem 0.9rem;
        width: 92vw;
        height: auto;
        max-width: 92vw;
        max-height: 92vh;
    }
    #price-lead-modal .modal-title{
        font-size: 0.95rem;
    }
    #price-lead-modal .modal-description{
        font-size: 0.76rem;
    }
    #price-lead-modal .registration-modal-header{
        gap: 0.65rem;
        margin-bottom: 0.65rem;
    }
    #price-lead-modal .modal-header-icon{
        width: 34px;
        height: 34px;
        font-size: 1.25rem;
    }
    #price-lead-modal .rt-try-grid{
        gap: 6px 12px;
    }
    #price-lead-modal .rt-field{
        gap: 3px;
    }
    #price-lead-modal .rt-field label{
        font-size: 11px;
    }
    #price-lead-modal .rt-field .form-control,
    #price-lead-modal .rt-field .form-select,
    #price-lead-modal .rt-field textarea{
        padding: 6px 9px; /* ~5% menor */
        font-size: 12.5px;
    }
    #price-lead-modal .rt-field textarea{
        height: 50px; /* libera mais espaço acima do botão */
    }
    #price-lead-modal .rt-try-actions .btn{
        padding: 6px 11px; /* ~5% menor */
        font-size: 11.5px;
    }

    /* Leve respiro entre "Necessidade" e Enviar */
    #price-lead-modal .rt-try-actions{
        padding-top: 14px;
    }
    #price-lead-modal .rt-field--textarea{
        margin-bottom: 2px;
    }
    #price-lead-modal .rt-try-verify-actions{
        margin-top: 4px;
    }
    #price-lead-modal .rt-try-link{
        font-size: 11.5px;
    }
    #price-lead-modal .rt-try-verify-row--compact input.form-control-sm{
        height: 30px; /* ~5% menor */
        font-size: 12.5px;
    }

    /* Mobile (verify): centralizar input/botão/link */
    #price-lead-modal.rt-price-lead--verify .registration-modal-header{
        justify-content: space-between;
        align-items: center;
    }
    /* Passo 2: mesma largura do passo 1 no mobile */
    #price-lead-modal.rt-price-lead--verify .rt-token-stack{
        max-width: 100%;
        width: 100%;
    }
    #price-lead-modal.rt-price-lead--verify .app-modal-content.registration{
        width: 92vw;
        max-width: 92vw;
    }
    #price-lead-modal.rt-price-lead--verify .rt-try-verify-row--compact{
        max-width: 92vw; /* ~2x+ maior no mobile */
        margin-left: auto;
        margin-right: auto;
    }
    #price-lead-modal.rt-price-lead--verify .rt-try-verify-actions{
        justify-content: center;
    }
    #price-lead-modal.rt-price-lead--verify #price-lead-resend{
        text-align: center;
    }
}
