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

:root {
    --primary-blue: #1F4DFF;
    --bg-light: #F4F6FA;
    --text-dark: #1E293B;
    --text-gray: #64748B;
    --green-good: #22C55E;
    --yellow-warning: #FACC15;
    --red-danger: #EF4444;
    --white: #ffffff;
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header {
    padding: 40px 0;
    text-align: center;
}

.logo-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.logo-icon {
    flex-shrink: 0;
}

.header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.subtitle {
    font-size: 16px;
    color: var(--text-gray);
    font-weight: 500;
}

.main-content {
    margin-bottom: 60px;
}

.form-section, .loading-section, .results-section {
    background: var(--white);
    border-radius: 12px;
    padding: 40px;
    box-shadow: var(--shadow-sm);
}

.hero-text {
    text-align: center;
    margin-bottom: 40px;
}

.hero-text h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.hero-text p {
    font-size: 18px;
    color: var(--text-gray);
    max-width: 700px;
    margin: 0 auto;
}

.contract-form {
    max-width: 800px;
    margin: 0 auto;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    border: 2px solid #E2E8F0;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    background-color: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(31, 77, 255, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 200px;
    line-height: 1.6;
}

.form-group small {
    color: var(--text-gray);
    font-size: 12px;
    margin-top: 4px;
}

.checkbox-group {
    margin: 24px 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 4px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-label span {
    font-size: 14px;
    color: var(--text-gray);
}

.btn-primary {
    width: 100%;
    background: var(--primary-blue);
    color: var(--white);
    border: none;
    padding: 16px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.btn-primary:hover {
    background: #1a3dd9;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--primary-blue);
    color: var(--white);
}

.loader-container {
    text-align: center;
    padding: 60px 20px;
}

.loader {
    width: 60px;
    height: 60px;
    border: 4px solid #E2E8F0;
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 24px;
}

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

.loader-container h3 {
    font-size: 24px;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.loader-container p {
    color: var(--text-gray);
    font-size: 16px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.results-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
}

.criteria-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.criteria-card {
    background: var(--white);
    border: 2px solid #E2E8F0;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
}

.criteria-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.criteria-card.good {
    border-color: var(--green-good);
    background: rgba(34, 197, 94, 0.05);
}

.criteria-card.warning {
    border-color: var(--yellow-warning);
    background: rgba(250, 204, 21, 0.05);
}

.criteria-card.danger {
    border-color: var(--red-danger);
    background: rgba(239, 68, 68, 0.05);
}

.criteria-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.criteria-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
}

.criteria-score {
    font-size: 24px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 6px;
}

.criteria-card.good .criteria-score {
    color: var(--green-good);
    background: rgba(34, 197, 94, 0.1);
}

.criteria-card.warning .criteria-score {
    color: #D97706;
    background: rgba(250, 204, 21, 0.1);
}

.criteria-card.danger .criteria-score {
    color: var(--red-danger);
    background: rgba(239, 68, 68, 0.1);
}

.criteria-description {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.6;
}

.summary-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    border-radius: 12px;
    padding: 32px;
}

.summary-card h3 {
    font-size: 24px;
    margin-bottom: 16px;
}

.summary-text {
    font-size: 16px;
    line-height: 1.8;
    white-space: pre-wrap;
}

.footer {
    background: var(--white);
    border-top: 1px solid #E2E8F0;
    padding: 40px 0;
    margin-top: 60px;
}

.footer-content {
    text-align: center;
}

.disclaimer {
    color: var(--text-gray);
    font-size: 14px;
    margin-bottom: 16px;
    max-width: 800px;
    margin: 0 auto 16px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 16px;
}

.footer-links a {
    color: var(--primary-blue);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.footer-links a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .logo-section {
        flex-direction: column;
        text-align: center;
    }

    .header h1 {
        font-size: 24px;
    }

    .hero-text h2 {
        font-size: 24px;
    }

    .hero-text p {
        font-size: 16px;
    }

    .form-section, .loading-section, .results-section {
        padding: 24px;
    }

    .results-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .criteria-cards {
        grid-template-columns: 1fr;
    }

    .footer-links {
        flex-direction: column;
        gap: 12px;
    }
}

.contract-input-options {
    margin-top: 8px;
}

.option-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.tab-btn {
    flex: 1;
    background: var(--white);
    border: 2px solid #E2E8F0;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-gray);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.tab-btn.active {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: var(--white);
}

.tab-content {
    display: none;
}

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

.text-input-container {
    background: var(--white);
    border: 2px solid #E2E8F0;
    border-radius: 12px;
    padding: 4px;
    transition: all 0.3s ease;
}

.text-input-container:focus-within {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(31, 77, 255, 0.1);
}

.text-input-container textarea {
    width: 100%;
    border: none;
    padding: 16px;
    font-size: 15px;
    line-height: 1.7;
    resize: vertical;
    min-height: 220px;
    font-family: inherit;
    background: transparent;
}

.text-input-container textarea:focus {
    outline: none;
    border: none;
    box-shadow: none;
}

.text-input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    border-top: 1px solid #F1F5F9;
    background: #F8FAFC;
    border-radius: 0 0 8px 8px;
}

.text-input-footer small {
    color: var(--text-gray);
    font-size: 12px;
}

.char-counter {
    font-weight: 500;
    color: var(--text-dark);
}

.file-upload-area {
    border: 2px dashed #E2E8F0;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #FAFBFC;
}

.file-upload-area:hover {
    border-color: var(--primary-blue);
    background: rgba(31, 77, 255, 0.02);
}

.file-upload-area.drag-over {
    border-color: var(--primary-blue);
    background: rgba(31, 77, 255, 0.05);
}

.upload-placeholder p {
    color: var(--text-dark);
    margin: 12px 0 8px;
    font-size: 15px;
}

.upload-placeholder small {
    color: var(--text-gray);
    font-size: 13px;
}

.file-selected {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(34, 197, 94, 0.05);
    border-radius: 8px;
}

.file-selected svg {
    flex-shrink: 0;
}

.file-selected div {
    flex: 1;
    text-align: left;
}

.file-selected .file-name {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.file-selected .file-size {
    color: var(--text-gray);
    font-size: 12px;
}

.remove-file-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--red-danger);
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.3s ease;
}

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

/* ======= ESTILOS PARA DIFF (COMPARE.HTML) ======= */

.removed {
    color: #EF4444;
    text-decoration: line-through;
    background: #FEF2F2;
    padding: 2px 4px;
    border-radius: 3px;
}

.added {
    color: #1F4DFF;
    font-weight: 600;
    background: #EFF6FF;
    padding: 2px 4px;
    border-radius: 3px;
}

/* ======= ESTILOS PARA REVIEWS (INDEX.HTML) ======= */

.reviews-section {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 60px 40px;
    margin: 40px 0;
    box-shadow: 0 12px 32px rgba(0,0,0,0.06);
}

.reviews-section h2 {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    color: #1E293B;
    margin-bottom: 16px;
}

.reviews-section > p {
    text-align: center;
    color: #64748B;
    font-size: 18px;
    margin-bottom: 48px;
}

.review-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 24px;
}

@media(max-width: 900px) {
    .review-grid {
        grid-template-columns: 1fr;
    }
}

.review-card {
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.06);
    padding: 24px;
    color: #1E293B;
    border: 1px solid #E5E7EB;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.review-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.10);
}

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 12px;
    border: 2px solid #E5E7EB;
}

.review-name {
    font-weight: 600;
    color: #1E293B;
    font-size: 15px;
    margin-bottom: 4px;
}

.review-location {
    color: #64748B;
    font-size: 13px;
    margin-bottom: 8px;
}

.review-stars {
    color: #FACC15;
    font-size: 14px;
    margin-bottom: 12px;
}

.review-text {
    color: #475569;
    font-size: 14px;
    line-height: 1.6;
    font-style: italic;
}

/* ======= SEÇÃO "COMO FUNCIONA" ======= */

.how-it-works-section {
    background: linear-gradient(135deg, #1F4DFF 0%, #1840D9 100%);
    border-radius: 12px;
    padding: 60px 40px;
    margin: 40px 0;
    color: white;
}

.how-it-works-section h2 {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 16px;
}

.how-it-works-section > p {
    text-align: center;
    font-size: 18px;
    margin-bottom: 48px;
    opacity: 0.95;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

@media(max-width: 900px) {
    .steps-grid {
        grid-template-columns: 1fr;
    }
}

.step-card {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.step-number {
    width: 48px;
    height: 48px;
    background: white;
    color: #1F4DFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    margin: 0 auto 16px;
}

.step-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.step-description {
    font-size: 14px;
    opacity: 0.9;
    line-height: 1.5;
}

/* Kaikaku Labs Footer */
.kaikaku-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(100, 116, 139, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.kaikaku-logo {
    height: 28px;
    width: auto;
    border-radius: 6px;
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.kaikaku-logo:hover {
    opacity: 1;
}

.kaikaku-text {
    font-size: 13px;
    color: var(--text-gray);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.kaikaku-text a {
    color: var(--text-gray);
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 500;
}

.kaikaku-text a:hover {
    color: var(--primary-blue);
}

.kaikaku-divider {
    color: rgba(100, 116, 139, 0.3);
    font-weight: 300;
}

@media (max-width: 640px) {
    .kaikaku-footer {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .kaikaku-text {
        flex-direction: column;
        gap: 4px;
    }
}
