/**
 * Primeiro Acesso — single-column centered layout
 */

/* ============================================================
   PÁGINA
   ============================================================ */

.pa-container {
    min-height: 100vh;
    background: #ECEEF5;
    display: flex;
    flex-direction: column;
    align-items: stretch;

    --pa-dark:   #12151F;
    --pa-text:   #394360;
    --pa-muted:  #7A839F;
    --pa-border: #E4E6EF;
    --pa-subtle: #F6F6F9;
    --pa-red:    #C90A0A;
    --pa-blue:   #3E68FB;
    --pa-green:  #519000;

    color-scheme: light;
}

/* Coluna centralizada (só o conteúdo do formulário) */
.pa-wrap {
    width: 100%;
    max-width: 520px;
    padding: 48px 40px 80px;
    align-self: center;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* ============================================================
   CABEÇALHO — ocupa a largura total da página
   ============================================================ */

.pa-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 28px 48px;
    flex-shrink: 0;
}

.pa-header-logo img {
    height: 24px;
    width: auto;
    object-fit: contain;
}

/* ============================================================
   TRACINHOS DE PROGRESSO
   ============================================================ */

.pa-steps {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pa-step {
    height: 3px;
    width: 28px;
    border-radius: 2px;
    background: #E0E2EC;
    transition: all 0.3s ease;
}

.pa-step.is-done {
    background: #9CA3AF;
    width: 28px;
}

.pa-step.is-active {
    background: var(--pa-dark);
    width: 40px;
}

/* ============================================================
   CONTEÚDO DO FORMULÁRIO
   ============================================================ */

.pa-content {
    display: flex;
    flex-direction: column;
    gap: 32px;
    flex: 1;
}

.pa-form-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pa-form-title {
    font-family: 'Inter', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: #12151F;
    line-height: 1.25;
    margin: 0;
}

.pa-form-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #394360;
    line-height: 1.65;
    margin: 0;
}

/* ============================================================
   OVERRIDE DESIGN SYSTEM — labels e selects
   ============================================================ */

/* select-group tem margin-bottom do design-system que quebra alinhamento em grids de 2 colunas */
.pa-container .select-group {
    margin-bottom: 0;
}

/* Labels: cor escura, alinhados à esquerda e sem asterisco vermelho */
.pa-container .select-label,
.pa-container .select-label-required,
.pa-container .input-label,
.pa-container .input-label-required {
    color: #12151F;
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    display: block;
}

.pa-container .input-label-required::after {
    content: none; /* asterisco vermelho não aparece no design Figma */
}

.pa-container .select-native,
.pa-container .select-native option {
    color: #12151F;
}

/* Inputs: forçar cores claras e neutralizar autofill escuro do browser */
.pa-container .input,
.pa-container .select-native {
    background-color: #FFFFFF !important;
    color: #12151F !important;
}

.pa-container .input:-webkit-autofill,
.pa-container .input:-webkit-autofill:hover,
.pa-container .input:-webkit-autofill:focus,
.pa-container .input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #FFFFFF inset !important;
    -webkit-text-fill-color: #12151F !important;
    caret-color: #12151F;
}


/* btn-primary: texto branco explícito — cobre container, modal e drawer (todos fora do fluxo normal) */
.pa-container .btn-primary,
.pa-container .btn-primary:hover,
.pa-container .btn-primary:active,
.pa-container .btn-primary:focus,
.pa-modal-overlay .btn-primary,
.pa-modal-overlay .btn-primary:hover,
.pa-modal-overlay .btn-primary:active,
.pa-modal-overlay .btn-primary:focus,
.pa-drawer .btn-primary,
.pa-drawer .btn-primary:hover,
.pa-drawer .btn-primary:active,
.pa-drawer .btn-primary:focus {
    color: #FFFFFF !important;
}

.pa-container .btn-outline,
.pa-drawer .btn-outline {
    background-color: transparent !important;
    color: var(--color-primary) !important;
    border: 1px solid var(--color-primary) !important;
}

.pa-container .btn-outline:hover,
.pa-drawer .btn-outline:hover {
    background-color: transparent !important;
    opacity: 0.85;
}

/* ============================================================
   CAMPOS
   ============================================================ */

.pa-fields {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pa-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.pa-field-group {
    display: flex;
    flex-direction: column;
}

.pa-field-error {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: var(--pa-red);
    margin-top: 6px;
}

.pa-field-error .material-icons {
    font-size: 14px !important;
}

/* ============================================================
   INFO BOX
   ============================================================ */

.pa-info-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: #EEF2FF;
    border-left: 3px solid var(--pa-blue);
    border-radius: 0 6px 6px 0;
}

.pa-info-box-icon {
    color: var(--pa-blue);
    flex-shrink: 0;
    margin-top: 1px;
    font-size: 18px !important;
}

.pa-info-box-text {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #394360;
    line-height: 1.6;
}

/* ============================================================
   NAVEGAÇÃO (botões)
   ============================================================ */

.pa-navigation {
    display: flex;
    gap: 12px;
    padding-top: 8px;
}

.pa-navigation a,
.pa-navigation button {
    flex: 1;
    text-align: center;
    justify-content: center;
}

/* ============================================================
   RODAPÉ (link login)
   ============================================================ */

.pa-footer {
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #7A839F;
    margin-top: 28px;
}

.pa-footer a {
    color: #12151F;
    font-weight: 600;
    text-decoration: none;
}

.pa-footer a:hover {
    text-decoration: underline;
}

/* ============================================================
   ALERTAS
   ============================================================ */

.pa-alert-error {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #FFF2F2;
    border-left: 3px solid var(--pa-red);
    border-radius: 0 6px 6px 0;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #8B0000;
}

/* ============================================================
   UPLOAD DE ARQUIVOS
   ============================================================ */

.pa-dropzone {
    border: 2px dashed #D1D5E0;
    border-radius: 8px;
    padding: 32px 24px;
    text-align: center;
    cursor: pointer;
    background: #FAFBFC;
    transition: all 0.2s ease;
}

.pa-dropzone:hover,
.pa-dropzone.drag-over {
    border-color: var(--pa-blue);
    background: #F5F8FF;
}

.pa-dropzone-icon {
    font-size: 40px !important;
    color: #C8CCE0;
    margin-bottom: 10px;
    display: block;
    transition: color 0.2s ease;
}

.pa-dropzone:hover .pa-dropzone-icon {
    color: #7A839F;
}

.pa-dropzone-text {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #394360;
    margin-bottom: 4px;
}

.pa-dropzone-hint {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: #7A839F;
}

.pa-file-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.pa-file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #FFFFFF;
    border: 1px solid #ECEDF2;
    border-radius: 6px;
    transition: border-color 0.15s ease;
}

.pa-file-item:hover {
    border-color: #CED3E2;
}

.pa-file-item-icon {
    color: var(--pa-blue);
    font-size: 20px !important;
    flex-shrink: 0;
}

.pa-file-item-info {
    flex: 1;
    min-width: 0;
}

.pa-file-item-name {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #12151F;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pa-file-item-size {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    color: #7A839F;
}

.pa-file-item-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: #7A839F;
    padding: 0;
    display: flex;
    align-items: center;
    transition: color 0.15s ease;
}

.pa-file-item-remove:hover {
    color: var(--pa-red);
}

.pa-file-item-remove .material-icons {
    font-size: 18px !important;
}

.pa-upload-counter {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: #7A839F;
    margin-top: 6px;
    text-align: right;
}

/* ============================================================
   RESUMO (tela de confirmação)
   ============================================================ */

.pa-resumo-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pa-resumo-section {
    border: 1px solid #ECEDF2;
    border-radius: 8px;
    overflow: hidden;
}

.pa-resumo-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #F6F6F9;
    border-bottom: 1px solid #ECEDF2;
}

.pa-resumo-header-icon {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: #ECEDF2;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pa-resumo-header-icon .material-icons {
    font-size: 14px !important;
    color: #394360;
}

.pa-resumo-title {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #12151F;
    margin: 0;
}

.pa-resumo-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 16px;
    gap: 16px;
    border-bottom: 1px solid #F6F6F9;
}

.pa-resumo-item:last-child {
    border-bottom: none;
}

.pa-resumo-label {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #7A839F;
    flex-shrink: 0;
    min-width: 120px;
}

.pa-resumo-value {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #12151F;
    font-weight: 500;
    text-align: right;
}

/* ============================================================
   SUCESSO
   ============================================================ */

.pa-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px 0 24px;
    gap: 16px;
}

.pa-success-icon-wrap {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #EEF2FF;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.pa-success-icon-wrap .material-icons {
    font-size: 40px !important;
    color: var(--pa-blue);
}

.pa-success-title {
    font-family: 'Inter', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: #12151F;
    margin: 0;
}

.pa-success-message {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    line-height: 1.7;
    color: #394360;
    margin: 0;
    max-width: 380px;
}

/* ============================================================
   RESPONSIVO
   ============================================================ */

@media (max-width: 580px) {
    .pa-wrap {
        padding: 40px 24px 64px;
    }

    .pa-header {
        margin-bottom: 40px;
    }

    .pa-form-title {
        font-size: 22px;
    }

    .pa-row-2 {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   DOCUMENTOS — caixa compacta
   ============================================================ */

.pa-doc-box {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid #E4E6EF;
    border-radius: 8px;
    background: #FFFFFF;
}

.pa-doc-main { flex: 1; min-width: 0; }

.pa-doc-title {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #12151F;
    margin-bottom: 3px;
}

.pa-doc-desc {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #7A839F;
    line-height: 1.5;
}

.pa-doc-chips-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.pa-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    background: #ECEEF5;
    border-radius: 100px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: #394360;
    font-weight: 500;
    white-space: nowrap;
}

/* ============================================================
   DRAWER (upload de documentos)
   ============================================================ */

.pa-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 200;
}
.pa-overlay.is-open { display: block; }

.pa-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 380px;
    height: 100vh;
    background: #FFFFFF;
    z-index: 201;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
}
.pa-drawer.is-open { transform: translateX(0); }

.pa-drawer-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #E4E6EF;
    flex-shrink: 0;
}

.pa-drawer-title {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #12151F;
}

.pa-drawer-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #7A839F;
    padding: 4px;
    display: flex;
    align-items: center;
    border-radius: 4px;
}
.pa-drawer-close:hover { color: #12151F; background: #F0F1F7; }

.pa-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pa-drawer-hint {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #7A839F;
    line-height: 1.5;
    margin: 0;
}

.pa-drawer-foot {
    padding: 16px 24px;
    border-top: 1px solid #E4E6EF;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

/* ============================================================
   MODAL DE SUCESSO
   ============================================================ */

.pa-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 300;
    align-items: center;
    justify-content: center;
}
.pa-modal-overlay.is-open { display: flex; }

.pa-modal {
    background: #FFFFFF;
    border-radius: 14px;
    padding: 40px 36px;
    max-width: 570px;
    width: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 40px;
}

.pa-modal-icon-wrap {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #F0F1F7;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pa-modal-icon-wrap .material-icons {
    font-size: 32px !important;
    color: #394360;
}

.pa-modal-title {
    font-family: 'Inter', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #12151F;
    margin: 0;
}

.pa-modal-message {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    line-height: 1.7;
    color: #394360;
    margin: 0;
}
