/* Layout do Perfil */
.profile-container {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    align-items: flex-start;
}

.profile-sidebar {
    flex: 0 0 260px;
    background: var(--surface-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem 1rem;
    box-shadow: var(--shadow-sm);
}

.profile-sidebar-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary-light);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.xp-container {
    background: rgba(0,0,0,0.05);
    border-radius: 10px;
    height: 8px;
    width: 100%;
    margin: 0.8rem 0;
    overflow: hidden;
}

.xp-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-light), var(--primary-dark));
    border-radius: 10px;
    transition: width 1s ease-in-out;
}

.profile-content {
    flex: 1;
    background: var(--surface-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
    min-height: 600px;
}

.profile-tab-btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
}

.profile-tab-btn:hover {
    background: rgba(67, 100, 247, 0.05);
    color: var(--primary);
}

.profile-tab-btn.active {
    background: linear-gradient(135deg, rgba(67, 100, 247, 0.1), rgba(111, 177, 252, 0.1));
    color: var(--primary-dark);
    font-weight: 600;
    border-left: 4px solid var(--primary);
}

.profile-tab-btn i {
    margin-right: 0.75rem;
    font-size: 1.25rem;
    vertical-align: middle;
}

/* Gamificação e Componentes do Dashboard */
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
}

.progress-bar-container {
    width: 100%;
    background: #e2e8f0;
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 1rem;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 6px;
    transition: width 1s ease-in-out;
}

.badge {
    background: linear-gradient(135deg, #fef08a, #ca8a04);
    color: white;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    box-shadow: 0 4px 15px rgba(202, 138, 4, 0.3);
    margin: 0 auto;
    position: relative;
}

.badge.silver { background: linear-gradient(135deg, #e2e8f0, #94a3b8); box-shadow: 0 4px 15px rgba(148, 163, 184, 0.3); }
.badge.bronze { background: linear-gradient(135deg, #fed7aa, #c2410c); box-shadow: 0 4px 15px rgba(194, 65, 12, 0.3); }

.badge::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px dashed rgba(202, 138, 4, 0.5);
    animation: rotate 15s linear infinite;
}

.badge.silver::after { border-color: rgba(148, 163, 184, 0.5); }
.badge.bronze::after { border-color: rgba(194, 65, 12, 0.5); }

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

.chart-container {
    position: relative;
    height: 350px;
    width: 100%;
    margin-top: 2rem;
}

/* Formulário do Construtor de Currículo */
.resume-section {
    background: transparent;
    padding: 0;
    margin-bottom: 2rem;
}

.resume-builder-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.resume-builder-card h3 {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.resume-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.dynamic-block-container {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: rgba(0,0,0,0.02);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    position: relative;
    margin-bottom: 1rem;
}

.remove-block-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: white;
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    cursor: pointer;
}

.remove-block-btn:hover {
    background: rgba(239, 68, 68, 0.1);
}

.btn-add-dynamic {
    background: transparent;
    color: var(--primary);
    border: 2px dashed var(--primary);
    width: 100%;
    padding: 1rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-add-dynamic:hover {
    background: rgba(67, 100, 247, 0.05);
}

/* Saída de Visualização do Currículo no Formato ATS */
#curriculo-preview {
    background: white;
    color: #000;
    padding: 40px;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
    max-width: 800px;
    margin: 0 auto;
}
#curriculo-preview .cv-header-container { text-align: left; margin-bottom: 25px; }
#curriculo-preview .cv-name-title { font-size: 24pt; font-weight: bold; margin: 0 0 8px 0; text-transform: uppercase; color: #000; border: none; }
#curriculo-preview .cv-header-line { font-size: 11pt; margin: 3px 0; color: #333; }
#curriculo-preview .cv-divider { border: 0; border-top: 1px solid #000; margin: 20px 0 15px 0; }
#curriculo-preview .cv-section-title { font-size: 13pt; font-weight: bold; margin: 0 0 10px 0; text-transform: uppercase; color: #000; }
#curriculo-preview .cv-text { font-size: 10.5pt; margin: 0 0 10px 0; text-align: justify; }
#curriculo-preview .cv-entry { margin-bottom: 12px; font-size: 10.5pt; }
#curriculo-preview .cv-entry strong { display: block; margin-bottom: 3px; font-weight: bold; color: #000; }
#curriculo-preview .cv-bullet-list { margin: 5px 0 15px 0; padding-left: 20px; font-size: 10.5pt; }
#curriculo-preview .cv-bullet-list li { margin-bottom: 4px; }

@media print {
    body {
        background: white !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    body.is-printing header.navbar,
    body.is-printing footer.footer,
    body.is-printing .profile-sidebar {
        display: none !important;
    }

    body.is-printing #profile-content-root > *:not(.resume-section) {
        display: none !important;
    }

    body.is-printing .resume-section > *:not(#curriculo-preview) {
        display: none !important;
    }

    body.is-printing .profile-content,
    body.is-printing .profile-container,
    body.is-printing .container,
    body.is-printing .resume-section {
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
        background: transparent !important;
        width: 100% !important;
        max-width: none !important;
    }

    body.is-printing #curriculo-preview {
        display: block !important;
        padding: 1.5cm !important;
        margin: 0 auto !important;
        width: 100% !important;
        max-width: 100% !important;
        color: black !important;
        box-sizing: border-box !important;
    }

    @page {
        margin: 0;
    }
}

/* Caixa de Upload de Foto */
.photo-upload-box {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    border: 2px dashed var(--border);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 1.5rem;
}

.photo-upload-box:hover {
    border-color: var(--primary);
    background: rgba(67, 100, 247, 0.03);
}

.photo-upload-box input[type="file"] {
    display: none;
}

/* Interruptores e Caixas de Seleção */
.daily-goal {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--radius-sm);
    background: var(--surface);
    margin-bottom: 0.5rem;
    border: 1px solid var(--border);
}

.daily-goal input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
}

@media (max-width: 768px) {
    .profile-container {
        flex-direction: column;
    }
    .profile-sidebar {
        width: 100%;
        display: flex;
        overflow-x: auto;
        padding: 0.5rem;
        gap: 0.5rem;
    }
    .profile-sidebar-header {
        display: none;
    }
    .profile-tab-btn {
        width: auto;
        white-space: nowrap;
        margin-bottom: 0;
        border-left: none;
        border-bottom: 4px solid transparent;
        padding: 0.75rem 1rem;
    }
    .profile-tab-btn.active {
        border-left: none;
        border-bottom: 4px solid var(--primary);
    }
}
