/* ==========================================================================
   FICHA DE CADASTRO - PERFIL DO MÉDICO
   Cores: #392761 (primária) / #FF3892 (secundária)
   Fontes: Urbanist + Poppins
   ========================================================================== */

.pm-wrapper {
    --pm-primary: #392761;
    --pm-primary-dark: #2a1d49;
    --pm-primary-light: #5a4082;
    --pm-secondary: #FF3892;
    --pm-secondary-light: #ff66ad;
    --pm-secondary-dark: #e01f78;
    --pm-bg: #fafafe;
    --pm-bg-alt: #ffffff;
    --pm-text: #1a1530;
    --pm-text-muted: #6b6585;
    --pm-border: #e8e4f0;
    --pm-border-focus: #392761;
    --pm-shadow-sm: 0 2px 8px rgba(57, 39, 97, 0.06);
    --pm-shadow: 0 8px 30px rgba(57, 39, 97, 0.08);
    --pm-shadow-lg: 0 20px 60px rgba(57, 39, 97, 0.15);
    --pm-radius: 16px;
    --pm-radius-sm: 10px;

    position: relative;
    min-height: 100vh;
    padding: 60px 20px 80px;
    background:
        radial-gradient(ellipse at top left, rgba(255, 56, 146, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(57, 39, 97, 0.08) 0%, transparent 50%),
        linear-gradient(180deg, #fafafe 0%, #f5f2fa 100%);
    font-family: 'Poppins', -apple-system, sans-serif;
    color: var(--pm-text);
    overflow: hidden;
    box-sizing: border-box;
}

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

/* Decorações de fundo */
.pm-bg-decoration {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
}

.pm-logo{
	text-align: center;
}

.pm-bg-decoration--1 {
    width: 500px;
    height: 500px;
    background: var(--pm-secondary);
    top: -200px;
    right: -200px;
    animation: pm-float 20s ease-in-out infinite;
}

.pm-bg-decoration--2 {
    width: 400px;
    height: 400px;
    background: var(--pm-primary);
    bottom: -100px;
    left: -150px;
    animation: pm-float 25s ease-in-out infinite reverse;
}

.pm-bg-decoration--3 {
    width: 300px;
    height: 300px;
    background: var(--pm-secondary-light);
    top: 50%;
    right: 10%;
    opacity: 0.15;
    animation: pm-float 30s ease-in-out infinite;
}

@keyframes pm-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* Container */
.pm-container {
    position: relative;
    max-width: 820px;
    margin: 0 auto;
    z-index: 1;
}

/* ==========================================================================
   LOGO
   ========================================================================== */

.pm-logo {
    text-align: center;
    margin-bottom: 30px;
    animation: pm-fade-in-up 0.5s ease-out;
}

.pm-logo img {
    max-width: 180px;
    height: auto;
    width: auto;
    transition: transform 0.3s ease;
}

.pm-logo img:hover {
    transform: scale(1.03);
}

@media (max-width: 768px) {
    .pm-logo img {
        max-width: 140px;
    }
    .pm-logo {
        margin-bottom: 22px;
    }
}

/* ==========================================================================
   HEADER
   ========================================================================== */

.pm-header {
    text-align: center;
    margin-bottom: 50px;
    animation: pm-fade-in-up 0.7s ease-out;
}

.pm-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: rgba(255, 56, 146, 0.1);
    border: 1px solid rgba(255, 56, 146, 0.2);
    border-radius: 100px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--pm-secondary-dark);
    margin-bottom: 24px;
    letter-spacing: 0.3px;
}

.pm-badge-dot {
    width: 8px;
    height: 8px;
    background: var(--pm-secondary);
    border-radius: 50%;
    animation: pm-pulse 2s ease-in-out infinite;
}

@keyframes pm-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.3); }
}

.pm-title {
    font-family: 'Urbanist', sans-serif;
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--pm-primary);
    margin: 0 0 18px;
}

.pm-title-highlight {
    background: linear-gradient(135deg, var(--pm-secondary) 0%, var(--pm-secondary-dark) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    display: inline-block;
}

.pm-title-highlight::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 8px;
    background: var(--pm-secondary);
    opacity: 0.15;
    border-radius: 4px;
    z-index: -1;
}

.pm-subtitle {
    font-family: 'Poppins', sans-serif;
    font-size: 1.05rem;
    color: var(--pm-text-muted);
    max-width: 580px;
    margin: 0 auto;
    line-height: 1.6;
    font-weight: 400;
}

/* ==========================================================================
   ALERTS
   ========================================================================== */

.pm-alert {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 22px;
    border-radius: var(--pm-radius);
    margin-bottom: 30px;
    animation: pm-fade-in-up 0.5s ease-out;
}

.pm-alert--success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.08), rgba(34, 197, 94, 0.04));
    border: 1px solid rgba(34, 197, 94, 0.25);
    color: #15803d;
}

.pm-alert--error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(239, 68, 68, 0.04));
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #b91c1c;
}

.pm-alert-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

.pm-alert-icon svg {
    width: 100%;
    height: 100%;
}

.pm-alert-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
}

.pm-alert-content strong {
    font-weight: 600;
}

.pm-alert-content span {
    opacity: 0.85;
}

/* ==========================================================================
   CARDS
   ========================================================================== */

.pm-card {
    background: var(--pm-bg-alt);
    border-radius: var(--pm-radius);
    box-shadow: var(--pm-shadow);
    margin-bottom: 24px;
    overflow: hidden;
    border: 1px solid var(--pm-border);
    animation: pm-fade-in-up 0.6s ease-out backwards;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.pm-card:nth-child(1) { animation-delay: 0.1s; }
.pm-card:nth-child(2) { animation-delay: 0.2s; }
.pm-card:nth-child(3) { animation-delay: 0.3s; }

.pm-card:hover {
    box-shadow: var(--pm-shadow-lg);
}

.pm-card-header {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 28px 32px 20px;
    border-bottom: 1px solid var(--pm-border);
    background: linear-gradient(180deg, rgba(57, 39, 97, 0.02), transparent);
}

.pm-card-number {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--pm-primary) 0%, var(--pm-primary-light) 100%);
    color: white;
    font-family: 'Urbanist', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(57, 39, 97, 0.25);
    position: relative;
}

.pm-card-number::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--pm-secondary), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.pm-card:hover .pm-card-number::after {
    opacity: 0.3;
}

.pm-card-title {
    font-family: 'Urbanist', sans-serif;
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--pm-primary);
    margin: 0 0 2px;
    letter-spacing: -0.01em;
}

.pm-card-desc {
    font-family: 'Poppins', sans-serif;
    font-size: 0.88rem;
    color: var(--pm-text-muted);
    margin: 0;
    font-weight: 400;
}

.pm-card-body {
    padding: 28px 32px 32px;
}

/* ==========================================================================
   PHOTO UPLOAD
   ========================================================================== */

.pm-photo-upload {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 22px;
    background: linear-gradient(135deg, rgba(57, 39, 97, 0.03), rgba(255, 56, 146, 0.03));
    border: 2px dashed var(--pm-border);
    border-radius: var(--pm-radius);
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.pm-photo-upload:hover {
    border-color: var(--pm-secondary);
    background: linear-gradient(135deg, rgba(57, 39, 97, 0.05), rgba(255, 56, 146, 0.05));
}

.pm-photo-preview {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pm-primary) 0%, var(--pm-primary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(57, 39, 97, 0.2);
    transition: transform 0.3s ease;
}

.pm-photo-preview:hover {
    transform: scale(1.05);
}

.pm-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pm-photo-icon {
    width: 36px;
    height: 36px;
    opacity: 0.9;
}

.pm-photo-info {
    flex: 1;
    min-width: 0;
}

.pm-photo-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--pm-primary);
    color: white;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: var(--pm-radius-sm);
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(57, 39, 97, 0.2);
}

.pm-photo-button:hover {
    background: var(--pm-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(57, 39, 97, 0.3);
}

.pm-photo-button svg {
    width: 16px;
    height: 16px;
}

.pm-input-file {
    display: none;
}

.pm-photo-hint {
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    color: var(--pm-text-muted);
    margin: 8px 0 0;
}

/* ==========================================================================
   FIELDS
   ========================================================================== */

.pm-field {
    margin-bottom: 20px;
    position: relative;
}

.pm-field:last-child {
    margin-bottom: 0;
}

.pm-grid {
    display: grid;
    gap: 18px;
}

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

.pm-grid .pm-field {
    margin-bottom: 0;
}

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

.pm-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Urbanist', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--pm-primary);
    margin-bottom: 8px;
    letter-spacing: 0.01em;
}

.pm-required {
    color: var(--pm-secondary);
    font-size: 1rem;
}

.pm-label-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.85;
}

.pm-icon-email {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23392761' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z'/><polyline points='22,6 12,13 2,6'/></svg>");
}

.pm-icon-whatsapp {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23392761'><path d='M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z'/></svg>");
}

.pm-icon-instagram {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23392761' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='2' y='2' width='20' height='20' rx='5' ry='5'/><path d='M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z'/><line x1='17.5' y1='6.5' x2='17.51' y2='6.5'/></svg>");
}

.pm-icon-facebook {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23392761'><path d='M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z'/></svg>");
}

.pm-icon-linkedin {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23392761'><path d='M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 01-2.063-2.065 2.063 2.063 0 112.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z'/></svg>");
}

.pm-input,
.pm-textarea {
    width: 100%;
    padding: 14px 18px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--pm-text);
    background: var(--pm-bg-alt);
    border: 1.5px solid var(--pm-border);
    border-radius: var(--pm-radius-sm);
    transition: all 0.25s ease;
    outline: none;
}

.pm-input::placeholder,
.pm-textarea::placeholder {
    color: #a8a3bd;
    font-weight: 400;
}

.pm-input:hover,
.pm-textarea:hover {
    border-color: var(--pm-primary-light);
}

.pm-input:focus,
.pm-textarea:focus {
    border-color: var(--pm-primary);
    box-shadow: 0 0 0 4px rgba(57, 39, 97, 0.1);
    background: white;
}

.pm-textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.pm-field-hint {
    display: block;
    margin-top: 6px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    color: var(--pm-text-muted);
}

/* SELECT customizado */
.pm-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    padding-right: 44px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23392761' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 14px;
}

.pm-select:focus {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23FF3892' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='18 15 12 9 6 15'/></svg>");
}

/* WHATSAPP preview do link */
.pm-whatsapp-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.08), rgba(37, 211, 102, 0.04));
    border: 1px solid rgba(37, 211, 102, 0.25);
    border-radius: var(--pm-radius-sm);
    color: #128c7e;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    flex-wrap: wrap;
}

.pm-whatsapp-preview svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: #25D366;
}

.pm-whatsapp-preview span {
    font-weight: 500;
    color: #128c7e;
}

.pm-whatsapp-preview a {
    color: var(--pm-primary);
    font-weight: 600;
    text-decoration: none;
    word-break: break-all;
    font-size: 0.85rem;
    transition: color 0.2s ease;
}

.pm-whatsapp-preview a:hover {
    color: var(--pm-secondary);
    text-decoration: underline;
}

/* ==========================================================================
   SUBMIT
   ========================================================================== */

.pm-submit-area {
    margin-top: 36px;
    padding: 30px 32px;
    background: linear-gradient(135deg, var(--pm-primary) 0%, var(--pm-primary-dark) 100%);
    border-radius: var(--pm-radius);
    box-shadow: var(--pm-shadow-lg);
    text-align: center;
    position: relative;
    overflow: hidden;
    animation: pm-fade-in-up 0.6s ease-out 0.4s backwards;
}

.pm-submit-area::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--pm-secondary) 0%, transparent 70%);
    opacity: 0.25;
    border-radius: 50%;
    pointer-events: none;
}

.pm-submit-area::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -10%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, var(--pm-secondary-light) 0%, transparent 70%);
    opacity: 0.15;
    border-radius: 50%;
    pointer-events: none;
}

.pm-disclaimer {
    position: relative;
    font-family: 'Poppins', sans-serif;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 500px;
    margin: 0 auto 22px;
    line-height: 1.6;
    z-index: 1;
}

.pm-button {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 38px;
    background: var(--pm-secondary);
    color: white;
    font-family: 'Urbanist', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.02em;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 8px 20px rgba(255, 56, 146, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
}

.pm-button:hover {
    background: var(--pm-secondary-dark);
    transform: translateY(-2px);
    box-shadow:
        0 12px 28px rgba(255, 56, 146, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.pm-button:active {
    transform: translateY(0);
}

.pm-button svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.pm-button:hover svg {
    transform: translateX(4px);
}

/* ==========================================================================
   ANIMAÇÕES
   ========================================================================== */

@keyframes pm-fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@media (max-width: 768px) {
    .pm-wrapper {
        padding: 40px 16px 60px;
    }

    .pm-card-header {
        padding: 22px 22px 16px;
        gap: 14px;
    }

    .pm-card-body {
        padding: 22px;
    }

    .pm-card-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .pm-card-title {
        font-size: 1.15rem;
    }

    .pm-card-desc {
        font-size: 0.82rem;
    }

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

    .pm-photo-upload {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .pm-photo-preview {
        width: 90px;
        height: 90px;
    }

    .pm-submit-area {
        padding: 24px 20px;
    }

    .pm-button {
        width: 100%;
        justify-content: center;
        padding: 16px 24px;
    }
}

@media (max-width: 480px) {
    .pm-input,
    .pm-textarea {
        padding: 12px 14px;
        font-size: 0.92rem;
    }

    .pm-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}
