/* ============================================================
 * Pandax-diretorio - Estilos do Portal (Formulários e Painel)
 * ============================================================ */

.pandax-form-wrap,
.pandax-painel,
.pandax-candidatar-wrap {
    max-width: 800px;
    margin: 0 auto;
}

.pandax-form-wrap .pandax-form-header {
    text-align: center;
    margin-bottom: 32px;
}

.pandax-form-wrap .pandax-form-header h2 {
    color: var(--catho-primary, #4318D1);
    margin-bottom: 8px;
}

.pandax-form-wrap .pandax-form-header p {
    color: var(--catho-gray-600, #757575);
    font-size: 0.9375rem;
}

/* ===== Formulários ===== */
.pandax-form {
    background: var(--catho-white, #fff);
    border-radius: 12px;
    padding: 32px;
    box-shadow: var(--catho-shadow, 0 1px 3px rgba(0,0,0,0.12));
    border: 1px solid var(--catho-gray-200, #eee);
}

.pandax-form-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--catho-gray-100, #f5f5f5);
}

.pandax-form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.pandax-form-section h3 {
    font-size: 1.0625rem;
    color: var(--catho-gray-900, #212121);
    margin-bottom: 16px;
    position: relative;
    padding-bottom: 8px;
}

.pandax-form-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--catho-primary, #4318D1);
    border-radius: 2px;
}

.pandax-field {
    margin-bottom: 16px;
    flex: 1;
    min-width: 0;
}

.pandax-field-group {
    display: flex;
    gap: 16px;
}

.pandax-field label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--catho-gray-700, #616161);
    margin-bottom: 6px;
}

.pandax-input {
    width: 100%;
    padding: 10px 14px;
    font-family: inherit;
    font-size: 0.9375rem;
    color: var(--catho-gray-800, #424242);
    background: #fff;
    border: 1px solid var(--catho-gray-300, #e0e0e0);
    border-radius: 8px;
    transition: all 0.2s ease;
    outline: none;
}

.pandax-input:focus {
    border-color: var(--catho-primary, #4318D1);
    box-shadow: 0 0 0 3px rgba(67, 24, 209, 0.1);
}

.pandax-input::placeholder {
    color: var(--catho-gray-400, #bdbdbd);
}

.pandax-textarea {
    min-height: 120px;
    resize: vertical;
}

select.pandax-input {
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23757575' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.pandax-form-actions {
    margin-top: 24px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ===== Mensagens ===== */
.pandax-form-message {
    display: none;
    padding: 14px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.pandax-form-message.success {
    display: block;
    background: rgba(76, 175, 80, 0.1);
    color: #2E7D32;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.pandax-form-message.error {
    display: block;
    background: rgba(244, 67, 54, 0.1);
    color: #C62828;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.pandax-form-message.loading {
    display: block;
    background: rgba(33, 150, 243, 0.1);
    color: #1565C0;
    border: 1px solid rgba(33, 150, 243, 0.3);
}

/* ===== Alertas ===== */
.pandax-alert {
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.pandax-alert-success {
    background: rgba(76, 175, 80, 0.1);
    color: #2E7D32;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.pandax-alert-error {
    background: rgba(244, 67, 54, 0.1);
    color: #C62828;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

/* ===== Painel ===== */
.pandax-painel {
    max-width: 960px;
}

.pandax-painel-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--catho-gray-200, #eee);
    padding-bottom: 0;
}

.pandax-tab {
    display: inline-block;
    padding: 12px 24px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--catho-gray-600, #757575);
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s ease;
}

.pandax-tab:hover {
    color: var(--catho-primary, #4318D1);
}

.pandax-tab.active {
    color: var(--catho-primary, #4318D1);
    border-bottom-color: var(--catho-primary, #4318D1);
}

.pandax-painel-content {
    background: var(--catho-white, #fff);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--catho-shadow, 0 1px 3px rgba(0,0,0,0.12));
    border: 1px solid var(--catho-gray-200, #eee);
}

/* ===== Tabela ===== */
.pandax-tabela {
    overflow-x: auto;
}

.pandax-tabela table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.pandax-tabela th {
    text-align: left;
    padding: 12px;
    background: var(--catho-gray-50, #fafafa);
    color: var(--catho-gray-700, #616161);
    font-weight: 700;
    border-bottom: 2px solid var(--catho-gray-200, #eee);
    white-space: nowrap;
}

.pandax-tabela td {
    padding: 12px;
    border-bottom: 1px solid var(--catho-gray-100, #f5f5f5);
    vertical-align: middle;
}

.pandax-tabela tbody tr:hover {
    background: rgba(67, 24, 209, 0.02);
}

.pandax-tabela small {
    color: var(--catho-gray-500, #9e9e9e);
    font-size: 0.75rem;
}

.pandax-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.pandax-status-publish {
    background: rgba(76, 175, 80, 0.1);
    color: #2E7D32;
}

.pandax-status-draft {
    background: rgba(158, 158, 158, 0.15);
    color: #616161;
}

.pandax-status-pending {
    background: rgba(255, 152, 0, 0.15);
    color: #E65100;
}

.pandax-acoes {
    white-space: nowrap;
}

.pandax-acoes .btn {
    margin-right: 4px;
}

.btn-danger {
    background: var(--catho-danger, #F44336);
    color: #fff;
    border: none;
}

.btn-danger:hover {
    background: #D32F2F;
    color: #fff;
}

/* ===== Empty state ===== */
.pandax-empty-state {
    text-align: center;
    padding: 48px 24px;
}

.pandax-empty-state p {
    color: var(--catho-gray-600, #757575);
    margin-bottom: 20px;
    font-size: 1.0625rem;
}

/* ===== Página Portal (conteúdo) ===== */
.pandax-page-content {
    max-width: 800px;
    margin: 0 auto;
}

/* ===== Área de Autenticação ===== */
.pandax-auth-wrap .pandax-form-header {
    margin-bottom: 16px;
}

.pandax-auth-wrap .pandax-alert-success {
    text-align: center;
}

/* ===== Escolha do tipo de conta ===== */
.pandax-auth-types {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.pandax-type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    padding: 32px 24px;
    background: var(--catho-white, #fff);
    border: 2px solid var(--catho-gray-200, #eee);
    border-radius: 14px;
    text-decoration: none;
    color: var(--catho-gray-900, #212121);
    transition: all 0.2s ease;
}

.pandax-type-card:hover {
    border-color: var(--catho-primary, #4318D1);
    color: var(--catho-primary, #4318D1);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(67, 24, 209, 0.12);
}

.pandax-type-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(67, 24, 209, 0.08);
    color: var(--catho-primary, #4318D1);
}

.pandax-type-icon svg {
    width: 26px;
    height: 26px;
}

.pandax-type-card strong {
    font-size: 1.0625rem;
    font-weight: 700;
}

.pandax-type-card small {
    color: var(--catho-gray-600, #757575);
    line-height: 1.45;
    font-size: 0.8125rem;
}

/* ===== Divisor ===== */
.pandax-auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 20px 0;
    color: var(--catho-gray-500, #9e9e9e);
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.pandax-auth-divider::before,
.pandax-auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--catho-gray-200, #eee);
}

.pandax-auth-divider.small {
    margin: 12px 0;
    font-size: 0.75rem;
}

/* ===== Botão Voltar ===== */
.pandax-auth-back {
    margin-bottom: 16px;
}

.pandax-auth-back a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--catho-gray-600, #757575);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
}

.pandax-auth-back a:hover {
    color: var(--catho-primary, #4318D1);
}

/* ===== Botões OAuth ===== */
.pandax-oauth {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 8px 0 4px;
}

.pandax-oauth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 11px 16px;
    border-radius: 8px;
    border: 1px solid var(--catho-gray-300, #e0e0e0);
    background: #fff;
    color: var(--catho-gray-800, #424242);
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pandax-oauth-btn:hover {
    background: #fafafa;
    color: var(--catho-gray-900, #212121);
}

/* ===== Checklist de interesse ===== */
.pandax-checklist {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 6px;
}

.pandax-check {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border: 1px solid var(--catho-gray-200, #eee);
    border-radius: 8px;
    background: #fafafa;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pandax-check:hover {
    border-color: var(--catho-primary, #4318D1);
}

.pandax-check input {
    accent-color: var(--catho-primary, #4318D1);
}

/* ===== Hint ===== */
.pandax-input-hint {
    display: block;
    margin-top: 4px;
    color: var(--catho-gray-500, #9e9e9e);
    font-size: 0.75rem;
}

/* ===== Responsivo ===== */
@media (max-width: 768px) {
    .pandax-form {
        padding: 20px;
    }

    .pandax-field-group {
        flex-direction: column;
        gap: 0;
    }

    .pandax-painel-tabs {
        flex-direction: column;
        gap: 0;
    }

    .pandax-tab {
        padding: 12px 16px;
        border-bottom: 1px solid var(--catho-gray-200, #eee);
        margin-bottom: 0;
    }

    .pandax-tab.active {
        border-bottom: 1px solid var(--catho-primary, #4318D1);
    }

    .pandax-auth-types,
    .pandax-checklist {
        grid-template-columns: 1fr;
    }
}
