:root {
    --primary: #1D2749;
    --secondary: #005CAA;
    --accent: #e74c3c;
    --light: #ecf0f1;
    --success: #2ecc71;
    --warning: #f39c12;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: #1D2749 url(https://cdn.cdatech.com.br/bg.png) no-repeat;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.calculator-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    padding: 30px;
    margin-top: 30px;
}

h2 {
    color: var(--primary);
    margin-bottom: 20px;
    text-align: center;
}

.subtitle {
    text-align: center;
    margin-bottom: 25px;
    color: #666;
}

.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary);
}

.text-input, select, textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.text-input:focus, select:focus, textarea:focus {
    border-color: var(--secondary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 92, 170, 0.2);
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.form-column {
    flex: 1;
}

/* CAPTCHA Styles */
.captcha-container {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
    text-align: center;
}

.captcha-text {
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 3px;
    background: linear-gradient(45deg, #666, #333);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    padding: 10px;
    border: 1px dashed #ccc;
    border-radius: 4px;
}

.captcha-input {
    width: 200px;
    text-align: center;
    font-size: 1.1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.btn {
    display: inline-block;
    background: var(--secondary);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.btn:hover {
    background: #004885;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-calculate {
    background: var(--secondary);
    width: 100%;
    margin-top: 20px;
    padding: 15px;
    font-size: 1.1rem;
}

.btn-submit {
    background: var(--success);
    width: 100%;
    margin-top: 15px;
    padding: 15px;
    font-size: 1.1rem;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.btn-secondary:hover {
    background: #5a6268;
}

.result-container {
    background: var(--light);
    border-radius: 8px;
    padding: 25px;
    margin-top: 30px;
}

.result-title {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--primary);
    text-align: center;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.result-item {
    background: white;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid var(--secondary);
}

.result-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
}

.result-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}

.result-note {
    font-size: 0.8rem;
    color: #666;
    margin-top: 5px;
}

/* CENÁRIOS COM TABS - CORRIGIDO */
.cenarios-container {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin: 25px 0;
    border: 2px solid var(--light);
}

.cenarios-container h4 {
    color: var(--primary);
    margin-bottom: 20px;
    text-align: center;
}

.tabs-container {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

.tabs-header {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    overflow-x: auto;
}

.tab-button {
    flex: 1;
    background: none;
    border: none;
    padding: 15px 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 120px;
    border-bottom: 3px solid transparent;
}

.tab-button:hover {
    background: #e9ecef;
    color: var(--primary);
}

.tab-button.active {
    background: white;
    color: var(--primary);
    border-bottom: 3px solid var(--secondary);
}

.tabs-content {
    background: white;
}

.tab-content {
    display: none;
    padding: 25px;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

.cenario-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.cenario-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.stat {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid var(--secondary);
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary);
}

/* CAPACIDADE TOTAL EM 100% DE LARGURA */
.stat.full-width {
    grid-column: 1 / -1;
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--success);
}

.stat.full-width .stat-label {
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 10px;
    display: block;
}

.stat.full-width .stat-value {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--success);
    display: block;
}

/* Seção de orçamento */
.orcamento-section {
    margin-top: 30px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.orcamento-section h5 {
    color: var(--primary);
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.2rem;
}

/* Ajustes para formulário de orçamento */
.orcamento-form .form-row {
    margin-bottom: 15px;
}

.orcamento-form .captcha-container {
    margin: 20px 0;
    text-align: center;
}

/* SOLUÇÃO DETALHADA */
.solucao-detalhada {
    margin: 20px 0;
}

.solucao-detalhada h5 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.aps-lista {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ap-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    background: #fafafa;
    transition: all 0.3s ease;
}

.ap-item:hover {
    border-color: var(--secondary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.ap-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.ap-numero {
    background: var(--secondary);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

.ap-modelo {
    flex: 1;
    font-size: 1.1rem;
    color: var(--primary);
}

.ap-quantidade {
    background: var(--success);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
}

.ap-detalhes {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ap-info {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.ap-info span {
    background: #e3f2fd;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--secondary);
}

.ap-descricao {
    color: #666;
    font-style: italic;
    font-size: 0.9rem;
}

.ap-investimento {
    font-weight: bold;
    color: var(--primary);
    font-size: 0.9rem;
    line-height: 1.4;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid var(--success);
}

.cenario-action {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: center;
}

.orcamento-form {
    margin: 0;
}

.recomendacoes {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 20px;
    margin-top: 20px;
}

.recomendacoes h4 {
    color: #856404;
    margin-bottom: 10px;
}

.recomendacoes ul {
    list-style-type: none;
    padding-left: 0;
}

.recomendacoes li {
    padding: 5px 0;
    color: #856404;
}

.action-buttons {
    margin-top: 20px;
    text-align: center;
}

.error-message {
    background: var(--accent);
    color: white;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    margin-bottom: 20px;
}

.success-message {
    background: var(--success);
    color: white;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    margin-bottom: 20px;
}

.info-text {
    text-align: center;
    margin-top: 20px;
    color: #666;
    font-style: italic;
}

.text-input-label {
    font-size: 0.8rem;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

/* Múltiplas Áreas */
.local-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    background: #f9f9f9;
    transition: all 0.3s ease;
}

.local-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.local-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.local-header span {
    font-weight: bold;
    color: #333;
}

.btn-remove-local {
    background: #ff4757;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.btn-remove-local:hover {
    background: #ff3742;
}

.area-result {
    background-color: #f8f9fa !important;
    font-weight: bold;
    color: #495057;
}

/* DIMENSÕES - 3 COLUNAS IGUAIS RESPONSIVAS */
.dimensions-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    gap: 12px;
    align-items: end;
    margin-top: 15px;
}

.dimension-column {
    display: flex;
    flex-direction: column;
}

.dimension-column.operator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 8px;
}

.operator-symbol {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--secondary);
    margin: 0 5px;
}

.dimension-column label {
    font-size: 0.8rem;
    margin-bottom: 5px;
    color: #555;
    font-weight: 600;
}

.dimension-column .text-input {
    margin-bottom: 0;
}

/* Destaque para valores totais */
.investimento-total {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    margin: 15px 0;
}

.investimento-total .label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.investimento-total .value {
    font-size: 1.4rem;
    font-weight: bold;
    margin-top: 5px;
}

/* Ajustes para dias de evento */
.dias-evento-info {
    background: #e3f2fd;
    border: 1px solid #2196f3;
    border-radius: 6px;
    padding: 10px 15px;
    margin: 10px 0;
    text-align: center;
    font-size: 0.9rem;
    color: #1976d2;
}

/* ANIMAÇÕES */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* RESPONSIVIDADE - MOBILE FIRST */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-column {
        margin-bottom: 15px;
    }
    
    .calculator-container {
        padding: 20px;
    }
    
    .result-grid {
        grid-template-columns: 1fr;
    }
    
    .captcha-input {
        width: 100%;
    }
    
    /* TABS MOBILE */
    .tabs-header {
        flex-direction: column;
    }
    
    .tab-button {
        min-width: auto;
        text-align: center;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .tab-button.active {
        border-bottom: 3px solid var(--secondary);
    }
    
    .cenario-stats {
        grid-template-columns: 1fr;
    }
    
    /* CAPACIDADE TOTAL MOBILE */
    .stat.full-width {
        grid-column: 1;
    }
    
    .stat.full-width .stat-label {
        font-size: 0.9rem;
    }
    
    .stat.full-width .stat-value {
        font-size: 1.2rem;
    }
    
    /* DIMENSÕES MOBILE */
    .dimensions-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .dimension-column.operator {
        display: none;
    }
    
    .dimension-column {
        text-align: center;
    }
    
    .dimension-column label {
        font-size: 0.9rem;
    }
    
    .local-item {
        padding: 12px;
    }
    
    .local-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .btn-remove-local {
        width: 100%;
    }
    
    /* APs MOBILE */
    .ap-header {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .ap-info {
        flex-direction: column;
        gap: 5px;
    }
    
    .ap-info span {
        text-align: center;
    }
    
    .ap-investimento {
        font-size: 0.8rem;
        text-align: center;
    }
    
    /* ORÇAMENTO MOBILE */
    .orcamento-section {
        padding: 15px;
    }
}

/* TABLETS */
@media (min-width: 769px) and (max-width: 1024px) {
    .dimensions-row {
        grid-template-columns: 1fr auto 1fr auto 1fr;
        gap: 8px;
    }
    
    .operator-symbol {
        font-size: 1.3rem;
    }
    
    .tabs-header {
        flex-wrap: wrap;
    }
    
    .tab-button {
        min-width: 140px;
    }
    
    .cenario-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat.full-width {
        grid-column: 1 / -1;
    }
}

/* DESKTOP */
@media (min-width: 1025px) {
    .dimensions-row {
        grid-template-columns: 1fr auto 1fr auto 1fr;
        gap: 12px;
    }
    
    .operator-symbol {
        font-size: 1.5rem;
    }
    
    .cenario-stats {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .stat.full-width {
        grid-column: 3 / -1;
    }
}

/* ESTILOS ESPECÍFICOS PARA INVESTIMENTO POR DIA */
.investimento-por-dia {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 12px;
    border-radius: 6px;
    margin: 5px 0;
}

.investimento-por-dia .label {
    font-size: 0.8rem;
    opacity: 0.9;
}

.investimento-por-dia .value {
    font-size: 1.1rem;
    font-weight: bold;
}

.investimento-total-dias {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    padding: 12px;
    border-radius: 6px;
    margin: 5px 0;
}

.investimento-total-dias .label {
    font-size: 0.8rem;
    opacity: 0.9;
}

.investimento-total-dias .value {
    font-size: 1.2rem;
    font-weight: bold;
}

/* Melhorias visuais para os stats */
.stat .stat-value:nth-child(2) {
    color: #3498db;
    font-size: 1rem;
}

.stat .stat-value:nth-child(3) {
    color: #2ecc71;
    font-size: 1.1rem;
    font-weight: bold;
    margin-top: 5px;
}

/* Destaque para o formulário de orçamento */
.orcamento-form {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.orcamento-form .form-group {
    margin-bottom: 15px;
}

/* Loading states */
.btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

.btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Estados de foco melhorados */
.text-input:focus, 
select:focus, 
textarea:focus {
    border-color: var(--secondary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 92, 170, 0.1);
}

/* Melhorias de acessibilidade */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary: #000000;
        --secondary: #0000FF;
        --accent: #FF0000;
        --success: #008000;
    }
    
    .text-input, select, textarea {
        border-width: 2px;
    }
}