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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 20px;
    background: linear-gradient(135deg, #38a3a5 0%, #22577a 100%);
    min-height: 100vh;
}

/* Navigation Sections */
.sections-nav {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.sections-nav button {
    flex: 1;
    min-width: 150px;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    background: white;
    color: #666;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sections-nav button:hover {
    border-color: #38a3a5;
    color: #38a3a5;
    background: #c7f9cc;
}

.sections-nav button.active {
    border-color: #22577a;
    background: linear-gradient(135deg, #38a3a5 0%, #22577a 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Content Sections */
.content-section {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

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

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

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

h1 {
    color: white;
    text-align: center;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.title-icon {
    width: 48px;
    height: 48px;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.2));
}

.card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin-bottom: 30px;
}

.card-projeto {
    margin-top: 30px;
}

.section.active h2 {
    color: #22577a;
    font-size: 24px;
    border-bottom: 3px solid #57cc99;
}

h3 {
    color: #22577a;
    margin-top: 30px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
}

.form-group label.required::after {
    content: ' *';
    color: #e74c3c;
}

/* Two Column Grid for Forms */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.form-grid-3cols {
    grid-template-columns: repeat(3, 1fr);
}

.form-grid .form-group {
    margin-bottom: 0;
}

.form-grid .optional-field {
    display: none;
}

/* Toggle Optional Fields */
.toggle-fields {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.toggle-fields label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    user-select: none;
}

.toggle-fields input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #38a3a5;
}

.toggle-fields label:hover {
    color: #38a3a5;
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.summary-card {
    background: linear-gradient(135deg, #57cc99 0%, #38a3a5 100%);
    color: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.summary-card label {
    display: block;
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 5px;
}

.summary-card .value {
    font-size: 20px;
    font-weight: bold;
}

/* Action Buttons */
.action-buttons {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.pdf-options {
    display: flex;
    justify-content: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    user-select: none;
}

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

.checkbox-label span {
    font-weight: 500;
}

.btn-primary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: linear-gradient(135deg, #57cc99 0%, #38a3a5 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(87, 204, 153, 0.3);
}

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

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

.btn-primary svg {
    flex-shrink: 0;
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Spinner animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner {
    animation: spin 1s linear infinite;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #38a3a5;
    box-shadow: 0 0 0 3px rgba(56, 163, 165, 0.1);
}

.kit-info {
    display: block;
    margin-top: 8px;
    color: #666;
    font-size: 14px;
}

.kit-info strong {
    color: #22577a;
    font-size: 16px;
}

.results {
    margin-top: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 10px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.result-item label {
    font-weight: 600;
    color: #555;
}

.result-item span {
    font-size: 18px;
    color: #38a3a5;
    font-weight: 700;
}

.result-item.highlight {
    background: linear-gradient(135deg, #57cc99 0%, #38a3a5 100%);
    transform: scale(1.02);
}

.result-item.highlight label,
.result-item.highlight span {
    color: white;
}

.charts-section {
    margin-top: 30px;
}

.chart-container {
    margin-bottom: 40px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    min-height: 300px !important;
}

.chart-container h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #22577a;
    font-size: 18px;
    text-align: center;
}

.chart-container canvas {
    max-height: 500px;
}

.orcamento-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.orcamento-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #38a3a5;
}

.orcamento-item.editable {
    background: linear-gradient(135deg, #c7f9cc 0%, #80ed99 100%);
    border-left-color: #57cc99;
}

.orcamento-item.total {
    background: linear-gradient(135deg, #80ed99 0%, #57cc99 100%);
    border-left-color: #22577a;
    font-weight: bold;
    font-size: 18px;
}

.orcamento-item label {
    font-weight: 600;
    color: #333;
    margin-bottom: 0;
}

.input-with-currency,
.value-display {
    display: flex;
    align-items: center;
    gap: 8px;
}

.currency {
    font-weight: 700;
    color: #38a3a5;
    font-size: 16px;
}

.orcamento-item.total .currency,
.orcamento-item.total span:not(.currency) {
    color: #22577a;
    font-size: 20px;
}

.input-with-currency input {
    flex: 1;
    min-width: 0;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
}

.input-with-currency input:focus {
    outline: none;
    border-color: #38a3a5;
    box-shadow: 0 0 0 3px rgba(56, 163, 165, 0.1);
}

.value-display span:not(.currency) {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    min-width: 120px;
    text-align: right;
}

.percentual-section {
    border-top: 2px solid #e0e0e0;
    padding-top: 30px;
    margin-top: 20px;
}

.input-with-percent {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.input-with-percent input {
    padding-right: 35px;
}

.percent-symbol {
    position: absolute;
    right: 12px;
    font-weight: 700;
    color: #38a3a5;
    font-size: 16px;
    pointer-events: none;
}

.percentual-results {
    margin-top: 20px;
    display: grid;
    gap: 15px;
}

.orcamento-item.highlight-result {
    background: linear-gradient(135deg, #57cc99 0%, #38a3a5 100%);
    border-left: none;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(87, 204, 153, 0.3);
}

.orcamento-item.highlight-result label,
.orcamento-item.highlight-result .currency,
.orcamento-item.highlight-result span:not(.currency) {
    color: white !important;
    font-size: 18px;
}

.economia-header {
    background: linear-gradient(135deg, #57cc99 0%, #38a3a5 100%);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    text-align: center;
}

.media-capacidade {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    color: white;
}

.media-capacidade label {
    font-weight: 600;
    font-size: 16px;
}

.media-capacidade span {
    font-size: 24px;
    font-weight: 700;
}

.media-capacidade .unit {
    font-size: 16px;
    font-weight: 400;
    opacity: 0.9;
}

.table-responsive {
    overflow-x: auto;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.economia-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.economia-table thead {
    background: linear-gradient(135deg, #57cc99 0%, #38a3a5 100%);
    color: white;
}

.economia-table th {
    padding: 15px 10px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.economia-table tbody tr {
    transition: background-color 0.2s;
}

.economia-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.economia-table tbody tr:hover {
    background-color: #e3f2fd;
}

.economia-table td {
    padding: 12px 10px;
    text-align: center;
    border: 1px solid #e0e0e0;
    font-size: 14px;
}

.economia-table td:first-child {
    font-weight: 600;
    color: #38a3a5;
    text-align: left;
    padding-left: 20px;
}

.economia-table td.currency-cell {
    text-align: right;
    padding-right: 15px;
}

.economia-table td.value-cell {
    text-align: right;
    padding-right: 20px;
    font-weight: 600;
    color: #333;
}

.economia-table td.empty-cell {
    color: #999;
}

.roi-concessionaria-selector {
    background: linear-gradient(135deg, #57cc99 0%, #38a3a5 100%);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.roi-concessionaria-selector label {
    color: white;
    font-weight: 600;
    font-size: 16px;
    white-space: nowrap;
}

.roi-concessionaria-selector select {
    flex: 1;
    padding: 12px;
    border: 2px solid white;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    color: #333;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.roi-concessionaria-selector select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.roi-parameters {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 25px;
}

.roi-param-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.roi-param-row:last-child {
    margin-bottom: 0;
}

.roi-param {
    flex: 1;
    min-width: 200px;
}

.roi-param label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.roi-param input[readonly] {
    background-color: #e9ecef;
    cursor: not-allowed;
}

.roi-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #57cc99 0%, #38a3a5 100%);
    border-radius: 10px;
}

.roi-summary-item {
    text-align: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.roi-summary-item label {
    display: block;
    color: white;
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: 500;
}

.roi-summary-item .roi-value {
    color: white;
    font-size: 20px;
    font-weight: 700;
}

.roi-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 13px;
}

.roi-table thead {
    background: linear-gradient(135deg, #57cc99 0%, #38a3a5 100%);
    color: white;
}

.roi-table th {
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.roi-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.roi-table tbody tr:hover {
    background-color: #e3f2fd;
}

.roi-table tbody tr.year-zero {
    background-color: #ffebee !important;
    font-weight: 600;
}

.roi-table td {
    padding: 10px 8px;
    text-align: center;
    border: 1px solid #e0e0e0;
}

.roi-table td:first-child {
    font-weight: 600;
    color: #38a3a5;
}

.roi-table td.currency-cell {
    text-align: right;
    padding-right: 10px;
    color: #666;
}

.roi-table td.value-cell {
    text-align: right;
    padding-right: 15px;
    font-weight: 500;
}

.roi-table td.negative {
    color: #d32f2f;
}

.roi-table td.positive {
    color: #388e3c;
}

/* Footer */
.app-footer {
    background: transparent;
    color: white;
    margin-top: 50px;
    padding: 30px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
}

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

.v3-logo {
    height: 60px;
    width: auto;
    filter: drop-shadow(0 0 0 1px rgba(255, 255, 255, 0.3));
    transition: all 0.3s ease;
}

.v3-logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 0 1px rgba(255, 255, 255, 0.6));
}

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

.footer-text p {
    margin: 5px 0;
    font-size: 14px;
    line-height: 1.6;
}

.footer-text a.v3-link {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-text a.v3-link:hover {
    text-decoration: none;
}

.footer-text a.v3-link strong {
    font-weight: 700;
    color: #c7f9cc;
    transition: color 0.3s ease;
}

.footer-text a.v3-link:hover strong {
    color: #80ed99;
}

.footer-text .copyright {
    font-size: 12px;
    opacity: 0.9;
    margin-top: 8px;
}

/* Equipamentos Section */
.equipamentos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.equipamento-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
}

.equipamento-section h3 {
    color: #22577a;
    margin-bottom: 20px;
    font-size: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #38a3a5;
}

.equipamento-specs {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    border: 1px solid #ddd;
    min-height: 120px;
}

.equipamento-specs h4 {
    color: #22577a;
    font-size: 14px;
    margin-bottom: 10px;
}

.equipamento-specs p {
    color: #666;
    font-size: 13px;
    line-height: 1.6;
    margin: 5px 0;
}

.equipamento-specs .spec-placeholder {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 30px 0;
}

.outros-componentes {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    margin-bottom: 20px;
}

.outros-componentes h3 {
    color: #22577a;
    margin-bottom: 20px;
    font-size: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #38a3a5;
}

.garantias-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
}

.garantias-section h3 {
    color: #22577a;
    margin-bottom: 20px;
    font-size: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #38a3a5;
}

/* Seção Página Final */
.section-description {
    color: #fff;
    font-size: 14px;
    margin-bottom: 25px;
    padding: 18px 20px;
    background: linear-gradient(135deg, rgba(56, 163, 165, 0.95) 0%, rgba(34, 87, 122, 0.95) 100%);
    border-left: 5px solid #c7f9cc;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-weight: 500;
}

.projeto-card {
    background: white;
    border: 2px solid transparent;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.projeto-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #38a3a5 0%, #22577a 100%);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.projeto-card:hover::before {
    transform: scaleX(1);
}

.projeto-card:hover {
    border-color: #38a3a5;
    box-shadow: 0 8px 25px rgba(56, 163, 165, 0.2);
    transform: translateY(-2px);
}

.projeto-card .projeto-header {
    background: linear-gradient(135deg, #38a3a5 0%, #22577a 100%);
    margin: -25px -25px 25px -25px;
    padding: 20px 25px;
    border-radius: 14px 14px 0 0;
}

.projeto-card .projeto-header h3 {
    color: white;
    font-size: 18px;
    margin: 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.projeto-card .projeto-header h3::before {
    content: '⚡';
    font-size: 20px;
}

.projeto-card .projeto-content {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 30px;
    align-items: start;
}

.projeto-card .projeto-image-upload {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    border: 3px dashed #c7f9cc;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #e8f5f5 100%);
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.projeto-card .projeto-image-upload:hover {
    border-color: #38a3a5;
    border-style: solid;
    background: linear-gradient(135deg, #e8f5f5 0%, #d8eeee 100%);
    box-shadow: 0 6px 15px rgba(56, 163, 165, 0.15);
}

.projeto-card .projeto-image-upload img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.projeto-card .image-input {
    display: none;
}

.projeto-card .image-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(56, 163, 165, 0.95) 0%, rgba(34, 87, 122, 0.95) 100%);
    color: white;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.projeto-card .image-label::before {
    content: '📷';
    font-size: 16px;
}

.projeto-card .image-label:hover {
    background: linear-gradient(135deg, rgba(199, 249, 204, 0.95) 0%, rgba(56, 163, 165, 0.95) 100%);
    color: #22577a;
    padding: 15px 12px;
}

.projeto-card .projeto-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.projeto-card .projeto-form .form-group {
    margin-bottom: 0;
}

.projeto-card .projeto-form .form-group:nth-child(1),
.projeto-card .projeto-form .form-group:nth-child(4) {
    grid-column: 1 / -1;
}

.projeto-card .projeto-form .form-group label {
    color: #22577a;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 6px;
    display: block;
}

.projeto-card .projeto-form .form-group input {
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
    font-size: 14px;
    padding: 10px 12px;
    background: white;
}

.projeto-card .projeto-form .form-group input:hover {
    border-color: #c7f9cc;
}

.projeto-card .projeto-form .form-group input:focus {
    border-color: #38a3a5;
    box-shadow: 0 0 0 3px rgba(56, 163, 165, 0.1);
    background: #fafffe;
}

/* Ícones nos labels */
.projeto-card .projeto-form .form-group:nth-child(1) label::before {
    content: '📝 ';
}

.projeto-card .projeto-form .form-group:nth-child(2) label::before {
    content: '🏢 ';
}

.projeto-card .projeto-form .form-group:nth-child(3) label::before {
    content: '📍 ';
}

.projeto-card .projeto-form .form-group:nth-child(4) label::before {
    content: '⚡ ';
}

@media (max-width: 900px) {
    .projeto-card .projeto-content {
        grid-template-columns: 1fr;
    }
    
    .projeto-card .projeto-image-upload {
        max-width: 400px;
        margin: 0 auto;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 10px;
    }
    
    .card {
        padding: 20px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .form-grid,
    .form-grid-3cols,
    .equipamentos-grid {
        grid-template-columns: 1fr;
    }
    
    .projeto-card .projeto-form {
        grid-template-columns: 1fr;
    }
    
    .projeto-card .projeto-form .form-group:nth-child(1),
    .projeto-card .projeto-form .form-group:nth-child(4) {
        grid-column: 1;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .v3-logo {
        height: 50px;
    }
}
