* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

/* Cabeçalho */
.page-header {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.header-content h1 {
    color: #4CAF50;
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.header-content p {
    color: #666;
    font-size: 1.1rem;
}

.back-btn {
    position: absolute;
    top: 30px;
    left: 30px;
    background: #4CAF50;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

/* Container Principal */
.settings-container {
    max-width: 900px;
    margin: 0 auto;
}

/* Seções */
.settings-section {
    background: white;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.section-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.section-header h2 {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.section-toggle.active {
    transform: rotate(180deg);
}

.section-content {
    padding: 25px 30px;
    display: none;
}

.section-content.active {
    display: block;
}

/* Seção de Foto de Perfil */
.profile-picture-section {
    margin-bottom: 25px;
}

.profile-picture-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.current-profile-picture {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #4CAF50;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin: 0;
}

.current-profile-picture:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(76, 175, 80, 0.4);
}

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

.profile-picture-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.current-profile-picture:hover .profile-picture-overlay {
    opacity: 1;
}

.profile-picture-overlay i {
    font-size: 1.5rem;
    margin-bottom: 6px;
}

.profile-picture-overlay span {
    font-size: 0.85rem;
}

.profile-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.change-profile-btn,
.remove-profile-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.change-profile-btn {
    background: #4CAF50;
    color: white;
}

.change-profile-btn:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

.remove-profile-btn {
    background: #f44336;
    color: white;
}

.remove-profile-btn:hover {
    background: #da190b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(244, 67, 54, 0.3);
}

/* Grid de Configurações */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.form-group input {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* Configurações de Segurança */
.security-settings {
    margin-bottom: 30px;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 10px;
}

.security-settings h3 {
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

.security-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.security-btn {
    padding: 12px 24px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.security-btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* Ações de Formulário */
.form-actions {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.save-btn {
    padding: 14px 40px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.save-btn:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(76, 175, 80, 0.4);
}

/* Configurações de Notificação */
.notification-settings {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.toggle-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.toggle-item:hover {
    background: #f0f0f0;
    transform: translateX(5px);
}

.toggle-info h4 {
    color: #333;
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.toggle-info p {
    color: #666;
    font-size: 0.9rem;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 30px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #4CAF50;
}

input:checked + .slider:before {
    transform: translateX(30px);
}

/* Configurações de Acessibilidade */
.accessibility-settings {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setting-item label {
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

.setting-item select {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.setting-item select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* Histórico */
.history-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.history-tab {
    padding: 12px 30px;
    background: #f0f0f0;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.history-tab:hover {
    background: #e0e0e0;
}

.history-tab.active {
    background: #4CAF50;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

.history-content {
    min-height: 300px;
}

.history-tab-content {
    display: none;
}

.history-tab-content.active {
    display: block;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.history-item:hover {
    background: #f0f0f0;
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.history-image {
    flex-shrink: 0;
}

.history-image img {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    object-fit: cover;
}

.history-details {
    flex: 1;
}

.history-details h4 {
    color: #333;
    margin-bottom: 8px;
    font-size: 1.2rem;
}

.history-date {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.history-price {
    color: #4CAF50;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.history-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.history-status.purchased {
    background: #e8f5e9;
    color: #2e7d32;
}

.history-status.sold {
    background: #e3f2fd;
    color: #1976d2;
}

.history-actions {
    flex-shrink: 0;
}

.view-btn {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.view-btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 15px 15px 0 0;
}

.modal-header h3 {
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.modal-close:hover {
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
}

.purchase-details,
.sale-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 8px;
}

.detail-row span:first-child {
    font-weight: 600;
    color: #333;
}

.detail-row span:last-child {
    color: #666;
}

/* Responsividade */
@media (max-width: 768px) {
    .page-header {
        padding: 20px;
    }

    .header-content h1 {
        font-size: 1.8rem;
    }

    .back-btn {
        position: static;
        margin-bottom: 20px;
        width: 100%;
        justify-content: center;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .security-actions {
        flex-direction: column;
    }

    .security-btn {
        width: 100%;
        justify-content: center;
    }

    .history-item {
        flex-direction: column;
        text-align: center;
    }

    .history-actions {
        width: 100%;
    }

    .view-btn {
        width: 100%;
        justify-content: center;
    }

    .toggle-item {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .profile-buttons {
        flex-direction: column;
        width: 100%;
    }

    .change-profile-btn,
    .remove-profile-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .section-header {
        padding: 15px 20px;
    }

    .section-header h2 {
        font-size: 1.2rem;
    }

    .section-content {
        padding: 20px;
    }

    .modal-content {
        width: 95%;
    }
}
