/* ============================================
   CT-BRUX PRO - DESIGN CÓSMICO REVOLUCIONÁRIO
   Efeitos: Partículas, Neon, Glitch, 3D Tilt
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Orbitron:wght@400;500;600;700;800;900&display=swap');

:root {
    --primary: #0d4fb8;
    --primary-dark: #073b8a;
    --primary-light: #2b6dd9;
    --accent: #00d4ff;
    --accent-purple: #b000ff;
    --success: #00ff88;
    --warning: #ffaa00;
    --danger: #ff3366;
    --bg-dark: #0a0a1a;
    --bg-card: rgba(10, 15, 30, 0.75);
    --text-light: #eef2ff;
    --text-dim: #a0a8c0;
    --border-glow: rgba(0, 212, 255, 0.6);
    --gradient-primary: linear-gradient(135deg, #0d4fb8 0%, #00d4ff 50%, #b000ff 100%);
    --gradient-card: linear-gradient(145deg, rgba(15, 25, 55, 0.9) 0%, rgba(10, 18, 40, 0.95) 100%);
    --shadow-glow: 0 0 30px rgba(0, 212, 255, 0.4);
    --shadow-glow-purple: 0 0 30px rgba(176, 0, 255, 0.4);
    --glitch-offset: 2px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ====================
   FUNDO CÓSMICO COM PARTÍCULAS
   ==================== */
body.ct-max-active {
    background: radial-gradient(ellipse at 30% 40%, #0a0f2a, #03050b);
    position: relative;
    overflow-x: hidden;
}

body.ct-max-active::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, #fff, rgba(0,0,0,0)),
        radial-gradient(3px 3px at 80% 70%, #00d4ff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 40% 90%, #ffd966, rgba(0,0,0,0)),
        radial-gradient(4px 4px at 95% 15%, #b000ff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 55% 45%, #00ff88, rgba(0,0,0,0));
    background-repeat: no-repeat;
    background-size: 250px 250px, 350px 350px, 200px 200px, 300px 300px, 280px 280px;
    opacity: 0.5;
    pointer-events: none;
    animation: floatingStars 30s linear infinite;
    z-index: 0;
}

@keyframes floatingStars {
    0% { transform: translateY(0px) translateX(0px); opacity: 0.3; }
    50% { transform: translateY(-30px) translateX(20px); opacity: 0.6; }
    100% { transform: translateY(0px) translateX(0px); opacity: 0.3; }
}

/* Container principal */
.ct-max-wrapper {
    position: relative;
    z-index: 10;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    font-family: 'Inter', 'Orbitron', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-light);
    backdrop-filter: blur(2px);
}

/* ====================
   TÍTULOS COM EFEITO GLITCH
   ==================== */
.ct-max-title {
    font-size: 3.5rem;
    font-weight: 900;
    font-family: 'Orbitron', monospace;
    text-align: center;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    position: relative;
    animation: glitch 3s infinite;
    text-transform: uppercase;
    background: linear-gradient(135deg, #ffffff, #00d4ff, #b000ff, #00ff88);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: glitch 3s infinite, gradientShift 6s ease infinite;
}

@keyframes glitch {
    0%, 100% { text-shadow: var(--glitch-offset) 0 0 rgba(255,0,0,0.4), calc(var(--glitch-offset) * -1) 0 0 rgba(0,255,255,0.4); }
    25% { text-shadow: calc(var(--glitch-offset) * 2) 0 0 rgba(255,0,0,0.6), calc(var(--glitch-offset) * -1.5) 0 0 rgba(0,255,255,0.6); }
    50% { text-shadow: calc(var(--glitch-offset) * -1) 0 0 rgba(255,0,0,0.5), calc(var(--glitch-offset) * 1.5) 0 0 rgba(0,255,255,0.5); }
    75% { text-shadow: calc(var(--glitch-offset) * 0.5) 0 0 rgba(255,0,0,0.3), calc(var(--glitch-offset) * -0.8) 0 0 rgba(0,255,255,0.3); }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.ct-max-subtitle {
    text-align: center;
    color: var(--text-dim);
    margin-bottom: 2rem;
    font-size: 1.1rem;
    letter-spacing: 2px;
    backdrop-filter: blur(4px);
}

/* ====================
   WIZARD CÓSMICO
   ==================== */
.ct-max-wizard {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
    position: relative;
    flex-wrap: wrap;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    padding: 1rem;
    border-radius: 80px;
    border: 1px solid rgba(0, 212, 255, 0.3);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}

.ct-max-step {
    position: relative;
    z-index: 1;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border-radius: 60px;
    padding: 0.9rem 1.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 700;
    font-family: 'Orbitron', monospace;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex: 1;
    justify-content: center;
    letter-spacing: 1px;
}

.ct-max-step.active {
    background: var(--gradient-primary);
    border-color: transparent;
    box-shadow: var(--shadow-glow);
    transform: scale(1.02);
    animation: pulseStep 1.5s infinite;
}

@keyframes pulseStep {
    0%, 100% { box-shadow: 0 0 15px rgba(0, 212, 255, 0.4); }
    50% { box-shadow: 0 0 30px rgba(0, 212, 255, 0.8); }
}

.ct-max-step.completed {
    border-color: var(--success);
    color: var(--success);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.4);
}

.ct-max-step .step-number {
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 800;
}

.ct-max-step.active .step-number {
    background: white;
    color: var(--primary);
    box-shadow: 0 0 10px white;
}

/* ====================
   CARDS GLASSMORPHISM EXTREMO
   ==================== */
.ct-max-card {
    background: var(--gradient-card);
    backdrop-filter: blur(16px);
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    animation: fadeInUp 0.6s ease-out;
    position: relative;
    overflow: hidden;
}

.ct-max-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0,212,255,0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.6s;
    pointer-events: none;
}

.ct-max-card:hover::before {
    opacity: 0.5;
}

.ct-max-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-glow);
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.4), 0 0 25px rgba(0, 212, 255, 0.3);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ct-max-card h3 {
    font-size: 1.8rem;
    font-weight: 800;
    font-family: 'Orbitron', monospace;
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

.ct-max-card .card-subtitle {
    color: var(--text-dim);
    font-size: 1.00rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* ====================
   TABELAS NEON
   ==================== */
.ct-max-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 12px;
}

.ct-max-table thead th {
    background: rgba(0, 212, 255, 0.15);
    padding: 14px 16px;
    font-weight: 700;
    font-family: 'Orbitron', monospace;
    font-size: 0.8rem;
    color: var(--text-light);
    text-align: center;
    border: none;
    letter-spacing: 1px;
}

.ct-max-table thead th:first-child { border-radius: 16px 0 0 16px; text-align: left; }
.ct-max-table thead th:last-child { border-radius: 0 16px 16px 0; }

.ct-max-table tbody tr {
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.3s ease;
    border-radius: 16px;
}

.ct-max-table tbody tr:hover {
    background: rgba(0, 212, 255, 0.1);
    transform: scale(1.01);
}

.ct-max-table tbody td {
    padding: 14px 12px;
    text-align: center;
    font-size: 0.9rem;
    border: none;
}

.ct-max-table tbody td:first-child { text-align: left; font-weight: 600; }

/* ====================
   INPUTS CÓSMICOS
   ==================== */
.ct-max-input,
.ct-max-select {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 212, 255, 0.4);
    border-radius: 16px;
    padding: 12px 16px;
    color: var(--text-light);
    font-size: 0.9rem;
    width: 100%;
    max-width: 200px;
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.ct-max-input:focus,
.ct-max-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.3), 0 0 15px rgba(0, 212, 255, 0.5);
    background: rgba(0, 0, 0, 0.7);
}

.ct-max-input:disabled,
.ct-max-select:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ====================
   RADIO BUTTONS CÓSMICOS
   ==================== */
.ct-max-radio-group {
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.ct-max-radio {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    padding: 0.6rem 1.3rem;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 60px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 212, 255, 0.3);
    backdrop-filter: blur(4px);
}

.ct-max-radio input { display: none; }
.ct-max-radio span { font-size: 0.9rem; font-weight: 500; }

.ct-max-radio.active {
    background: var(--gradient-primary);
    border-color: transparent;
    box-shadow: var(--shadow-glow);
    transform: scale(1.02);
}

/* ====================
   MAPA INTERATIVO NEON
   ==================== */
.ct-max-mapa-container {
    text-align: center;
    margin: 2rem 0;
    background: var(--gradient-card);
    border-radius: 32px;
    padding: 1.8rem;
    border: 1px solid rgba(0, 212, 255, 0.3);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.2);
}

.ct-max-mapa-title {
    font-size: 1.3rem;
    font-weight: 700;
    font-family: 'Orbitron', monospace;
    margin-bottom: 1.5rem;
    color: var(--text-light);
    letter-spacing: 2px;
}

.ct-max-mapa-svg {
    max-width: 100%;
    height: auto;
    cursor: pointer;
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.5));
}

.ct-max-mapa-svg path {
    transition: all 0.3s ease;
    stroke: rgba(255, 255, 255, 0.4);
    stroke-width: 1.5;
}

.ct-max-mapa-svg path:hover {
    stroke: var(--accent);
    stroke-width: 3;
    filter: drop-shadow(0 0 12px var(--accent));
    transform: scale(1.02);
}

.ct-max-mapa-svg path.selected {
    stroke: var(--accent-purple);
    stroke-width: 3.5;
    filter: drop-shadow(0 0 18px var(--accent-purple));
}

.ct-max-fator-display {
    background: var(--gradient-primary);
    border-radius: 60px;
    padding: 0.8rem 1.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 800;
    margin-top: 1.5rem;
    box-shadow: var(--shadow-glow);
    animation: pulseFator 2s infinite;
}

@keyframes pulseFator {
    0%, 100% { box-shadow: 0 0 10px rgba(0, 212, 255, 0.5); }
    50% { box-shadow: 0 0 25px rgba(0, 212, 255, 0.9); }
}

.ct-max-fator-display span:first-child { font-size: 1rem; letter-spacing: 1px; }
.ct-max-fator-display span:last-child {
    font-size: 2rem;
    font-weight: 900;
    font-family: 'Orbitron', monospace;
}

/* ====================
   RESULTADO FINAL - BOTÃO ABRIR A BOCA
   ==================== */
.ct-max-result-card {
    background: var(--gradient-primary);
    border-radius: 48px;
    padding: 2.5rem;
    text-align: center;
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
    animation: pulseGlow 2s infinite;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.ct-max-result-card:active {
    transform: scale(0.98);
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 30px rgba(13, 79, 184, 0.4), 0 0 60px rgba(0, 212, 255, 0.2); }
    50% { box-shadow: 0 0 60px rgba(13, 79, 184, 0.7), 0 0 100px rgba(0, 212, 255, 0.4); }
}

.ct-max-result-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    animation: rotateGlow 8s linear infinite;
    pointer-events: none;
}

@keyframes rotateGlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.ct-max-result-btu {
    font-size: 5rem;
    font-weight: 900;
    font-family: 'Orbitron', monospace;
    letter-spacing: -0.02em;
    line-height: 1;
    text-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.ct-max-result-label {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-top: 0.8rem;
    letter-spacing: 1px;
}

.ct-max-result-sub {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.2rem;
    font-size: 0.9rem;
}

/* ====================
   TABELA DE RESULTADOS NEON
   ==================== */
.ct-max-result-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
    margin-top: 1.5rem;
}

.ct-max-result-table thead th {
    background: rgba(0, 212, 255, 0.2);
    padding: 14px;
    font-weight: 700;
    font-family: 'Orbitron', monospace;
    font-size: 0.85rem;
    color: var(--text-light);
    text-align: center;
}

.ct-max-result-table tbody tr {
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.2s;
}

.ct-max-result-table tbody tr:hover {
    background: rgba(0, 212, 255, 0.1);
}

.ct-max-result-table tbody td {
    padding: 12px;
    font-size: 0.9rem;
    text-align: center;
}

.ct-max-result-table .total-row {
    background: rgba(0, 255, 136, 0.1);
    font-weight: 800;
}

/* ====================
   BOTÃO CÓSMICO (ABRIR A BOCA)
   ==================== */
.ct-max-btn {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(0, 212, 255, 0.5);
    border-radius: 60px;
    padding: 14px 32px;
    font-weight: 700;
    font-family: 'Orbitron', monospace;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-light);
    letter-spacing: 1px;
    backdrop-filter: blur(4px);
}

.ct-max-btn-primary {
    background: var(--gradient-primary);
    border: none;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.4);
    position: relative;
    overflow: hidden;
}

.ct-max-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.6);
    letter-spacing: 2px;
}

.ct-max-btn-primary:active {
    transform: scale(0.96);
}

/* Botão especial do PDF */
#btn-baixar-pdf-max {
    background: linear-gradient(135deg, #00d4ff, #b000ff);
    padding: 16px 40px;
    font-size: 1.1rem;
    font-weight: 800;
    position: relative;
    overflow: hidden;
}

#btn-baixar-pdf-max::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s;
}

#btn-baixar-pdf-max:hover::before {
    left: 100%;
}

/* ====================
   FORMULÁRIO PDF
   ==================== */
.ct-max-pdf-form {
    background: var(--gradient-card);
    backdrop-filter: blur(16px);
    border-radius: 32px;
    padding: 2rem;
    margin-top: 2rem;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.ct-max-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.ct-max-form-group {
    margin-bottom: 1.2rem;
}

.ct-max-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-dim);
    letter-spacing: 1px;
}

.ct-max-form-group input,
.ct-max-form-group select,
.ct-max-form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 20px;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ====================
   ANIMAÇÕES EXTRAS
   ==================== */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.ct-max-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 10px;
}

/* Autocomplete */
.ct-max-cidades-list {
    position: absolute;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border-radius: 20px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    width: 100%;
    margin-top: 5px;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.ct-max-cidades-list div {
    padding: 10px 15px;
    cursor: pointer;
    transition: all 0.2s;
}

.ct-max-cidades-list div:hover {
    background: rgba(0, 212, 255, 0.2);
}

/* ====================
   RESPONSIVIDADE
   ==================== */
@media (max-width: 768px) {
    .ct-max-wrapper {
        padding: 1rem;
    }
    
    .ct-max-title {
        font-size: 2rem;
    }
    
    .ct-max-wizard {
        flex-direction: column;
        border-radius: 32px;
        gap: 0.8rem;
    }
    
    .ct-max-step {
        justify-content: center;
        padding: 0.7rem 1rem;
        font-size: 0.75rem;
    }
    
    .ct-max-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .ct-max-result-btu {
        font-size: 2.5rem;
    }
    
    .ct-max-input,
    .ct-max-select {
        max-width: 100%;
        min-width: 100px;
    }
    
    .ct-max-form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .ct-max-nav-buttons {
        flex-direction: column;
    }
    
    .ct-max-nav-buttons button {
        width: 100%;
    }
    
    .ct-max-fator-display span:last-child {
        font-size: 1.5rem;
    }
}

/* ====================
   TABELA DE RESULTADOS - CONTRASTE FORTE
   ==================== */
.ct-max-result-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
    margin-top: 1.5rem;
    background: transparent;
}

.ct-max-result-table thead th {
    background: linear-gradient(135deg, #0d4fb8, #00d4ff);
    color: white;
    padding: 14px;
    font-weight: 800;
    font-family: 'Orbitron', monospace;
    font-size: 0.85rem;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.ct-max-result-table thead th:first-child { border-radius: 16px 0 0 16px; text-align: left; }
.ct-max-result-table thead th:last-child { border-radius: 0 16px 16px 0; }

.ct-max-result-table tbody tr {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    transition: all 0.2s;
}

.ct-max-result-table tbody tr:hover {
    background: rgba(0, 212, 255, 0.2);
    transform: scale(1.01);
}

.ct-max-result-table tbody td {
    padding: 12px;
    font-size: 0.9rem;
    text-align: center;
    color: #eef2ff;
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
}

.ct-max-result-table tbody td:first-child {
    text-align: left;
    font-weight: 600;
    color: #ffffff;
}

.ct-max-result-table .total-row {
    background: linear-gradient(135deg, rgba(0, 100, 0, 0.3), rgba(0, 212, 255, 0.2));
    font-weight: 800;
}

.ct-max-result-table .total-row td {
    font-weight: 800;
    color: #00ff88;
    text-shadow: 0 0 5px #00ff88;
}

/* Destaque para o subtotal */
.ct-max-result-table tbody tr:nth-child(11) {
    background: linear-gradient(135deg, rgba(0, 100, 0, 0.4), rgba(0, 150, 100, 0.3));
    border-top: 2px solid #00ff88;
}

/* Centralização de elementos */
.ct-max-radio-group {
    justify-content: center !important;
}

.ct-max-nav-buttons {
    justify-content: center !important;
    gap: 1rem;
}

/* Resultado principal - BTU no mesmo tamanho do número */
.ct-max-result-btu {
    font-size: 4rem;
    font-weight: 900;
    font-family: 'Orbitron', monospace;
    line-height: 1;
}

.ct-max-result-label {
    font-size: 1rem;
    margin-top: 0.5rem;
}

/* Card do resultado maior */
.ct-max-result-card {
    padding: 2rem;
    margin: 1rem 0;
}

/* Fator geográfico na tabela */
#fator_geografico_valor {
    font-weight: 700;
    color: #00ff88;
    font-size: 1.1rem;
}

/* Ajuste do formulário PDF */
.ct-max-pdf-form {
    max-width: 600px;
    margin: 2rem auto;
    padding: 1.5rem;
}

.ct-max-pdf-form .ct-max-form-group {
    margin-bottom: 0.8rem;
}

.ct-max-pdf-form input,
.ct-max-pdf-form select,
.ct-max-pdf-form textarea {
    padding: 10px 12px;
}

/* Abreviações mobile para orientação */
@media (max-width: 768px) {
    .orientacao-select option {
        font-size: 0.7rem;
    }
}

/* ====================
   FEEDBACK VISUAL - TIPO DE JANELA SELECIONADO
   ==================== */
.ct-max-radio.active {
    background: linear-gradient(135deg, rgba(13, 79, 184, 0.3), rgba(0, 212, 255, 0.2));
    border-color: var(--accent);
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.4);
    transform: scale(1.02);
}

.ct-max-radio.active span {
    color: var(--accent);
    text-shadow: 0 0 4px rgba(0, 212, 255, 0.5);
}

/* Efeito sutil no hover */
.ct-max-radio:hover {
    background: rgba(0, 212, 255, 0.15);
    transform: scale(1.01);
}

/* ====================
   VERSÃO 2.0 - CORES LEGÍVEIS
   ==================== */
.total-row td,
.total-row-final td,
#fator_geografico_valor,
#rf_subtotal_kcal,
#rf_subtotal_btu,
#rf_subtotal_tr,
#rf_total_kcal,
#rf_total_btu,
#rf_total_tr {
    color: #ffffff !important;
    text-shadow: 0 0 5px rgba(0,212,255,0.5);
    font-weight: 800;
}

.total-row-final {
    background: linear-gradient(135deg, #0d4fb8, #00d4ff);
}

.total-row-final td {
    color: white !important;
    text-shadow: none;
}

/* Botão deletar linha */
.delete-cell {
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s;
}

.delete-cell:hover {
    color: #ff3366;
    text-shadow: 0 0 5px #ff3366;
}

/* Estilo para os totais individuais */
.total-rito {
    background: rgba(0,212,255,0.1);
    border: 1px solid rgba(0,212,255,0.3);
}

.total-rito span {
    color: #00d4ff;
    font-weight: 700;
}

/* Ajuste do card de resultado */
.ct-max-result-btu {
    font-size: 3.5rem;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.ct-max-result-btu span:first-child {
    font-size: 3.5rem;
    font-weight: 900;
}

.ct-max-result-btu span:last-child {
    font-size: 1.3rem;
    font-weight: 600;
}

/* ====================
   VERSÃO 2.1 - CORES MELHORADAS
   ==================== */

/* Título do formulário PDF */
.ct-max-pdf-form h3 {
    color: #00d4ff !important;
    text-shadow: 0 0 10px rgba(0,212,255,0.5);
}

/* Sub-total com cor legível */
.total-row td,
#rf_subtotal_btu,
#rf_subtotal_kcal,
#rf_subtotal_tr {
    color: #00ff88 !important;
    text-shadow: 0 0 5px rgba(0,255,136,0.3);
    font-weight: 800;
}

/* Total final */
.total-row-final td,
#rf_total_btu,
#rf_total_kcal,
#rf_total_tr {
    color: #ffffff !important;
    text-shadow: 0 0 5px rgba(0,212,255,0.5);
    font-weight: 800;
}

.total-row-final {
    background: linear-gradient(135deg, #0d4fb8, #00d4ff);
}

/* Fator geográfico */
#fator_geografico_valor {
    color: #ffaa00 !important;
    font-weight: 800;
    font-size: 1.2rem;
    text-shadow: 0 0 5px rgba(255,170,0,0.5);
}

/* Botão abrir formulário PDF */
#btn-abrir-form-pdf {
    background: linear-gradient(135deg, #00d4ff, #b000ff);
    transition: all 0.3s ease;
}

#btn-abrir-form-pdf:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,212,255,0.5);
    letter-spacing: 2px;
}

/* ====================
   VERSÃO 2.2 - CORES LEGÍVEIS
   ==================== */

/* Sub-total - cor azul clara legível (NÃO VERDE) */
.total-row td,
#rf_subtotal_btu,
#rf_subtotal_kcal,
#rf_subtotal_tr {
    color: #88ddff !important;
    text-shadow: 0 0 3px rgba(136,221,255,0.3);
    font-weight: 800;
}

/* Total final */
.total-row-final td,
#rf_total_btu,
#rf_total_kcal,
#rf_total_tr {
    color: #ffffff !important;
    text-shadow: 0 0 5px rgba(0,212,255,0.5);
    font-weight: 800;
}

.total-row-final {
    background: linear-gradient(135deg, #0d4fb8, #00d4ff);
}

/* Fator geográfico */
#fator_geografico_valor {
    color: #ffaa00 !important;
    font-weight: 800;
    font-size: 1.2rem;
    text-shadow: 0 0 5px rgba(255,170,0,0.5);
}

/* Botão abrir formulário PDF */
#btn-abrir-form-pdf {
    background: linear-gradient(135deg, #00d4ff, #b000ff);
    transition: all 0.3s ease;
}

#btn-abrir-form-pdf:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,212,255,0.5);
    letter-spacing: 2px;
}

/* Fator geográfico não selecionado */
.fator-nao-selecionado {
    color: #ffaa00 !important;
    text-shadow: 0 0 5px rgba(255,170,0,0.5);
    animation: piscaFator 1.5s infinite;
}

@keyframes piscaFator {
    0%, 100% { opacity: 1; text-shadow: 0 0 5px rgba(255,170,0,0.5); }
    50% { opacity: 0.6; text-shadow: 0 0 15px rgba(255,170,0,0.8); }
}

.fator-selecionado {
    color: #00ff88 !important;
    text-shadow: 0 0 5px rgba(0,255,136,0.5);
    animation: none;
}

/* Aviso do mapa */
.ct-max-mapa-aviso {
    transition: all 0.3s ease;
}

/* Destaque para o campo fator quando não selecionado */
#fator_geografico_valor,
#fator_geografico_escolhido {
    transition: all 0.3s ease;
}

#fator_geografico_valor:contains("?"),
#fator_geografico_escolhido:contains("?") {
    color: #ffaa00 !important;
    animation: piscaFator 1.5s infinite;
}

/* Melhorias para o campo Observações */
.ct-max-form-group textarea {
    font-family: inherit;
    line-height: 1.5;
    resize: vertical;
    min-height: 120px;
}

/* Garantir que o estado fique bem posicionado */
.ct-max-pdf-form .ct-max-form-group {
    margin-bottom: 1rem;
}































/* ====================
   RESULTADO MATRIX - CALOR VS FRIO
   ==================== */

.ct-max-result-card-container {
    position: relative;
    overflow: hidden;
    border-radius: 48px;
    background: linear-gradient(145deg, #0a0a1a, #050510);
    border: 2px solid transparent;
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
    animation: borderPulse 2s infinite;
}

@keyframes borderPulse {
    0%, 100% { 
        border-color: rgba(0, 212, 255, 0.5);
        box-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
    }
    50% { 
        border-color: rgba(255, 51, 102, 0.5);
        box-shadow: 0 0 50px rgba(255, 51, 102, 0.5);
    }
}

/* Gelo caindo */
.gelo-caindo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.floco {
    position: absolute;
    top: -20px;
    font-size: 1.2rem;
    opacity: 0.8;
    animation: cairGelo 8s linear infinite;
    text-shadow: 0 0 5px #00d4ff;
}

.floco:nth-child(1) { left: 5%; animation-duration: 6s; animation-delay: 0s; font-size: 1rem; }
.floco:nth-child(2) { left: 15%; animation-duration: 8s; animation-delay: 1s; font-size: 1.5rem; }
.floco:nth-child(3) { left: 25%; animation-duration: 7s; animation-delay: 2s; font-size: 0.8rem; }
.floco:nth-child(4) { left: 35%; animation-duration: 9s; animation-delay: 0.5s; font-size: 1.2rem; }
.floco:nth-child(5) { left: 45%; animation-duration: 5s; animation-delay: 3s; font-size: 1rem; }
.floco:nth-child(6) { left: 55%; animation-duration: 7.5s; animation-delay: 1.5s; font-size: 1.4rem; }
.floco:nth-child(7) { left: 65%; animation-duration: 6.5s; animation-delay: 2.5s; font-size: 0.9rem; }
.floco:nth-child(8) { left: 75%; animation-duration: 8.5s; animation-delay: 0.8s; font-size: 1.3rem; }
.floco:nth-child(9) { left: 85%; animation-duration: 5.5s; animation-delay: 4s; font-size: 1rem; }
.floco:nth-child(10) { left: 95%; animation-duration: 7s; animation-delay: 1.2s; font-size: 1.1rem; }
.floco:nth-child(11) { left: 10%; animation-duration: 9.5s; animation-delay: 3.5s; font-size: 1.5rem; }
.floco:nth-child(12) { left: 50%; animation-duration: 6s; animation-delay: 5s; font-size: 0.7rem; }
.floco:nth-child(13) { left: 70%; animation-duration: 8s; animation-delay: 2s; font-size: 1.2rem; }
.floco:nth-child(14) { left: 30%; animation-duration: 7s; animation-delay: 4.5s; font-size: 1rem; }
.floco:nth-child(15) { left: 88%; animation-duration: 6.5s; animation-delay: 0.3s; font-size: 1.4rem; }

@keyframes cairGelo {
    0% {
        top: -20px;
        transform: rotate(0deg);
        opacity: 1;
    }
    80% {
        opacity: 0.8;
    }
    100% {
        top: 100%;
        transform: rotate(360deg);
        opacity: 0;
    }
}

/* Card principal estilo MATRIX */
.ct-max-result-card {
    position: relative;
    z-index: 2;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7), rgba(10, 10, 30, 0.8));
    backdrop-filter: blur(20px);
    border-radius: 48px;
    padding: 3rem 2rem;
    text-align: center;
    margin: 0;
    transition: all 0.4s ease;
    cursor: pointer;
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.ct-max-result-card:hover {
    transform: scale(1.02);
    box-shadow: 0 0 60px rgba(0, 255, 136, 0.4);
    border-color: rgba(0, 255, 136, 0.8);
}

/* Número BTU gigante com gradiente quente-frio */
.ct-max-result-btu {
    font-size: 4rem;
    font-weight: 900;
    font-family: 'Orbitron', monospace;
    letter-spacing: -0.02em;
    line-height: 1;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    position: relative;
}

.ct-max-result-btu span:first-child {
    font-size: 6rem;
    font-weight: 900;
    background: linear-gradient(135deg, #ff3366, #ffaa00, #00ff88, #00d4ff);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradienteQuenteFrio 3s ease infinite;
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
}

@keyframes gradienteQuenteFrio {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.ct-max-result-btu span:last-child {
    font-size: 1.8rem;
    font-weight: 700;
    color: #eef2ff;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.ct-max-result-label {
    font-size: 1.2rem;
    margin-top: 1rem;
    letter-spacing: 3px;
    color: #00d4ff;
    text-transform: uppercase;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
    animation: piscaLabel 2s infinite;
}

@keyframes piscaLabel {
    0%, 100% { opacity: 1; text-shadow: 0 0 10px rgba(0, 212, 255, 0.5); }
    50% { opacity: 0.8; text-shadow: 0 0 20px rgba(0, 212, 255, 0.8); }
}

.ct-max-result-sub {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 1.5rem;
    font-size: 1rem;
}

.ct-max-result-sub span {
    background: rgba(0, 0, 0, 0.6);
    padding: 0.5rem 1.2rem;
    border-radius: 60px;
    font-weight: 700;
    backdrop-filter: blur(4px);
}

.ct-max-result-sub span:first-child {
    border: 1px solid #ff6600;
    color: #ffaa00;
    box-shadow: 0 0 15px rgba(255, 102, 0, 0.3);
}

.ct-max-result-sub span:last-child {
    border: 1px solid #00d4ff;
    color: #00d4ff;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

.ct-max-result-sub span:hover {
    transform: scale(1.05);
    transition: all 0.3s;
}

/* Efeito de chamas e gelo nas bordas */
.ct-max-result-card::before,
.ct-max-result-card::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 48px;
    background: linear-gradient(45deg, #ff3366, #ffaa00, #00ff88, #00d4ff, #ff3366);
    background-size: 400%;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s;
    animation: bordaMatrix 6s linear infinite;
}

.ct-max-result-card::before {
    filter: blur(20px);
}

.ct-max-result-card:hover::before,
.ct-max-result-card:hover::after {
    opacity: 0.6;
}

@keyframes bordaMatrix {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Responsivo */
@media (max-width: 768px) {
    .ct-max-result-btu span:first-child {
        font-size: 3rem;
    }
    
    .ct-max-result-btu span:last-child {
        font-size: 1rem;
    }
    
    .ct-max-result-card {
        padding: 1.5rem;
    }
    
    .ct-max-result-sub {
        gap: 1rem;
        flex-direction: column;
        align-items: center;
    }
    
    .floco {
        font-size: 0.8rem;
    }
}

/* ============================================
   CT-BRUX PRO - PARTE DO BUSCAR CÁLCULOS
   ============================================ */
   
   /* Estilos da busca */
.ct-max-busca-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}
.ct-max-busca-filtros {
    background: var(--bg-card);
    border-radius: 32px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}
.filtros-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}
.filtros-grid input, .filtros-grid select {
    background: rgba(0,0,0,0.6);
    border: 1px solid rgba(0,212,255,0.4);
    border-radius: 16px;
    padding: 12px;
    color: #eef2ff;
}
.filtros-acoes {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}
#tabela-busca td, #tabela-busca th {
    padding: 10px;
}
.btn-ver, .btn-pdf, .btn-deletar {
    background: rgba(0,0,0,0.6);
    border: 1px solid cyan;
    border-radius: 30px;
    padding: 4px 12px;
    margin: 0 2px;
    cursor: pointer;
    transition: 0.2s;
}
.btn-ver:hover, .btn-pdf:hover, .btn-deletar:hover {
    background: cyan;
    color: black;
}



/* ============================================
   teste
   ============================================ */
   
   /* Paginação – estilo CT-BRUX PRO (front-end) */
.ct-max-paginacao {
    text-align: center;
    margin-top: 20px;
    padding: 10px;
}

.ct-max-paginacao button.btn-pagina {
    background: linear-gradient(135deg, #0d4fb8, #00d4ff, #b000ff);
    background-size: 200% 200%;
    border: none;
    border-radius: 60px;
    padding: 8px 20px;
    font-family: 'Orbitron', 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    color: white;
    cursor: pointer;
    margin: 0 8px;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
    letter-spacing: 1px;
}

.ct-max-paginacao button.btn-pagina:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.7);
    background-position: 100% 100%;
    letter-spacing: 2px;
}

.ct-max-paginacao button.btn-pagina:active {
    transform: scale(0.96);
}

.ct-max-paginacao span {
    color: #eef2ff;
    background: rgba(0, 0, 0, 0.5);
    padding: 6px 15px;
    border-radius: 30px;
    font-family: 'Orbitron', monospace;
    font-size: 0.85rem;
    backdrop-filter: blur(4px);
}