/* === DESIGN SYSTEM - RAWAN BRAGA === */
:root {
    --verde-musgo: #4A5D4A;
    --verde-claro: #6B7F6B;
    --dourado: #C9A962;
    --dourado-claro: #E5D4A1;
    --terracota: #B87A5B;
    --marrom: #3D2B1F;
    --ivory: #FFFDF5;
    --ivory-escuro: #F5EFE0;
    --ambar: #F5E6D3;
    --texto: #2D2418;
    --texto-claro: #5C5043;
    --erro: #C45C5C;
    --sucesso: #5C8A5C;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.7;
    color: var(--texto);
    background: var(--ivory);
    min-height: 100vh;
}

/* === HEADER === */
.header {
    background: linear-gradient(135deg, var(--verde-musgo) 0%, #3D4D3D 100%);
    padding: 30px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.header-content { position: relative; z-index: 1; }

.logo {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--ivory);
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.tagline {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    font-style: italic;
    color: var(--dourado-claro);
    letter-spacing: 1px;
}

.leaf-decoration {
    color: var(--dourado);
    font-size: 1.5rem;
    margin: 15px 0;
    opacity: 0.8;
}

/* === PROGRESS BAR === */
.progress-container {
    background: var(--ivory-escuro);
    padding: 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
}

.progress-wrapper { max-width: 600px; margin: 0 auto; }

.progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--ivory);
    border: 2px solid #DDD;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--texto-claro);
    transition: all 0.4s ease;
    z-index: 2;
}

.step-label {
    font-size: 0.65rem;
    color: var(--texto-claro);
    margin-top: 6px;
    text-align: center;
    transition: all 0.3s ease;
}

.progress-step.active .step-number {
    background: var(--verde-musgo);
    border-color: var(--verde-musgo);
    color: white;
    transform: scale(1.1);
}

.progress-step.active .step-label {
    color: var(--verde-musgo);
    font-weight: 600;
}

.progress-step.completed .step-number {
    background: var(--dourado);
    border-color: var(--dourado);
    color: white;
}

.progress-bar {
    height: 4px;
    background: #E0E0E0;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--verde-musgo), var(--dourado));
    border-radius: 2px;
    transition: width 0.5s ease;
    width: 0%;
}

/* === MAIN CONTAINER === */
.main-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px 20px 100px;
}

/* === SECTIONS === */
.section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.section.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-header {
    text-align: center;
    margin-bottom: 35px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--dourado-claro);
}

.section-icon { font-size: 2.5rem; margin-bottom: 15px; }

.section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--verde-musgo);
    margin-bottom: 10px;
}

.section-subtitle {
    font-size: 0.9rem;
    color: var(--texto-claro);
    font-style: italic;
}

/* === FORM GROUPS === */
.form-group { margin-bottom: 25px; }

.form-group label {
    display: block;
    font-weight: 500;
    color: var(--marrom);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.form-group label .required { color: var(--terracota); margin-left: 3px; }

.form-group small {
    display: block;
    color: var(--texto-claro);
    font-size: 0.8rem;
    margin-top: 5px;
    font-style: italic;
}

/* === INPUTS === */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #DDD;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--texto);
    background: white;
    transition: all 0.3s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--verde-musgo);
    box-shadow: 0 0 0 3px rgba(74, 93, 74, 0.1);
}

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

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234A5D4A' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

/* === RADIO & CHECKBOX === */
.radio-group, .checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-option, .checkbox-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    background: white;
    border: 1px solid #E8E8E8;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.radio-option:hover, .checkbox-option:hover {
    border-color: var(--verde-claro);
    background: var(--ivory);
}

.radio-option.selected, .checkbox-option.selected {
    border-color: var(--verde-musgo);
    background: rgba(74, 93, 74, 0.05);
}

.radio-option input, .checkbox-option input {
    margin-top: 2px;
    accent-color: var(--verde-musgo);
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.radio-option span, .checkbox-option span { flex: 1; font-size: 0.95rem; }

/* === SCALE INPUT === */
.scale-input {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: space-between;
}

.scale-option { flex: 1; min-width: 50px; text-align: center; }
.scale-option input { display: none; }

.scale-option label {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    background: white;
    border: 1px solid #E8E8E8;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.scale-option label:hover { border-color: var(--verde-claro); }

.scale-option input:checked + label {
    background: var(--verde-musgo);
    border-color: var(--verde-musgo);
    color: white;
}

.scale-number { font-size: 1.2rem; font-weight: 600; }
.scale-label { font-size: 0.7rem; margin-top: 4px; }

/* === CONDITIONAL FIELDS === */
.conditional-field {
    display: none;
    margin-top: 15px;
    padding: 20px;
    background: var(--ambar);
    border-radius: 8px;
    animation: slideDown 0.3s ease;
}

.conditional-field.visible { display: block; }

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

/* === FILE UPLOAD === */
.upload-area {
    border: 2px dashed var(--verde-claro);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: var(--verde-musgo);
    background: rgba(74, 93, 74, 0.02);
}

.upload-area.dragover {
    border-color: var(--dourado);
    background: rgba(201, 169, 98, 0.1);
}

.upload-icon { font-size: 3rem; margin-bottom: 15px; }
.upload-text { font-weight: 500; color: var(--verde-musgo); margin-bottom: 8px; }
.upload-hint { font-size: 0.85rem; color: var(--texto-claro); }
.upload-input { display: none; }

/* === PHOTO PREVIEW === */
.photo-previews {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.photo-preview {
    position: relative;
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

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

.photo-preview .remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.photo-preview .remove-btn:hover { background: var(--erro); }

.photo-preview .photo-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    font-size: 0.75rem;
    text-align: center;
}

/* === PHOTO GUIDE === */
.photo-guide {
    background: var(--ambar);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
}

.photo-guide-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--verde-musgo);
    margin-bottom: 15px;
}

.photo-guide-list { list-style: none; }

.photo-guide-list li {
    padding: 8px 0;
    padding-left: 30px;
    position: relative;
    font-size: 0.9rem;
}

.photo-guide-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--verde-musgo);
    font-weight: bold;
}

.photo-examples {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 20px;
}

.photo-example {
    text-align: center;
    padding: 12px 8px;
    background: white;
    border-radius: 8px;
}

.photo-example-icon { font-size: 1.5rem; margin-bottom: 5px; }
.photo-example-label { font-size: 0.7rem; color: var(--texto-claro); }

/* === TERMS === */
.terms-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid #E8E8E8;
}

.terms-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--marrom);
    margin-bottom: 20px;
}

.term-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #F0F0F0;
    align-items: flex-start;
}

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

.term-item input {
    margin-top: 3px;
    accent-color: var(--verde-musgo);
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.term-item span { flex: 1; font-size: 0.9rem; color: var(--texto); }

/* === NAVIGATION BUTTONS === */
.nav-buttons {
    display: flex;
    gap: 15px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #E8E8E8;
}

.btn {
    flex: 1;
    padding: 16px 30px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-secondary {
    background: white;
    border: 1px solid #DDD;
    color: var(--texto);
}

.btn-secondary:hover {
    border-color: var(--verde-musgo);
    color: var(--verde-musgo);
}

.btn-primary {
    background: linear-gradient(135deg, var(--verde-musgo), #3D4D3D);
    border: none;
    color: white;
    box-shadow: 0 4px 15px rgba(74, 93, 74, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 93, 74, 0.4);
}

.btn-primary:disabled {
    background: #CCC;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.btn-submit {
    background: linear-gradient(135deg, var(--dourado), #B89952);
    color: var(--marrom);
}

.btn-submit:hover { box-shadow: 0 6px 20px rgba(201, 169, 98, 0.4); }

/* === LOADING === */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 253, 245, 0.95);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.loading-overlay.active { display: flex; }

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid var(--ivory-escuro);
    border-top-color: var(--verde-musgo);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-text { margin-top: 20px; font-size: 1rem; color: var(--verde-musgo); }
.loading-subtext { margin-top: 8px; font-size: 0.85rem; color: var(--texto-claro); }

/* === ALERTS === */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.alert-error {
    background: #FDF2F2;
    border: 1px solid #FADCDC;
    color: var(--erro);
}

.alert-success {
    background: #F2FDF4;
    border: 1px solid #DCFADF;
    color: var(--sucesso);
}

.alert-icon { font-size: 1.2rem; }
.alert-content { flex: 1; }

/* === FOOTER === */
.footer {
    text-align: center;
    padding: 30px 20px;
    background: var(--ivory-escuro);
    border-top: 1px solid #E8E8E8;
}

.footer-text { font-size: 0.85rem; color: var(--texto-claro); }

.footer-brand {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    color: var(--verde-musgo);
}

/* === RESPONSIVE === */
@media (max-width: 600px) {
    .header { padding: 25px 15px; }
    .logo { font-size: 1.8rem; }
    .progress-container { padding: 15px; }
    .step-label { display: none; }
    .step-number { width: 28px; height: 28px; font-size: 0.7rem; }
    .main-container { padding: 20px 15px 80px; }
    .section-title { font-size: 1.5rem; }
    .nav-buttons { flex-direction: column; }
    .photo-examples { grid-template-columns: repeat(2, 1fr); }
    .scale-input { gap: 5px; }
    .scale-option { min-width: 45px; }
    .scale-option label { padding: 10px 5px; }
    .scale-number { font-size: 1rem; }
    .scale-label { font-size: 0.6rem; }
    .photo-previews { grid-template-columns: repeat(2, 1fr); }
}